@riddix/hamh 2.1.0-alpha.377 → 2.1.0-alpha.379
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 CF(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
144
144
|
animation: ${bT} 1.4s linear infinite;
|
|
145
145
|
`:null,vye=typeof vT!="string"?$g`
|
|
146
146
|
animation: ${vT} 1.4s ease-in-out infinite;
|
|
147
|
-
`:null,xye=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ye(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ye(n)}`,i&&"circleDisableShrink"]};return Ze(o,yye,t)},Sye=me("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ye(n.color)}`]]}})(qe(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:bye||{animation:`${bT} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),wye=me("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Cye=me("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ye(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(qe(({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:vye||{animation:`${vT} 1.4s ease-in-out infinite`}}]}))),Eye=me("circle",{name:"MuiCircularProgress",slot:"Track"})(qe(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),zr=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:u,thickness:c=3.6,value:f=0,variant:h="indeterminate",...g}=r,y={...r,color:o,disableShrink:s,size:l,thickness:c,value:f,variant:h,enableTrackSlot:a},b=xye(y),v={},S={},C={};if(h==="determinate"){const w=2*Math.PI*((Ia-c)/2);v.strokeDasharray=w.toFixed(3),C["aria-valuenow"]=Math.round(f),v.strokeDashoffset=`${((100-f)/100*w).toFixed(3)}px`,S.transform="rotate(-90deg)"}return m.jsx(Sye,{className:Oe(b.root,i),style:{width:l,height:l,...S,...u},ownerState:y,ref:n,role:"progressbar",...C,...g,children:m.jsxs(wye,{className:b.svg,ownerState:y,viewBox:`${Ia/2} ${Ia/2} ${Ia} ${Ia}`,children:[a?m.jsx(Eye,{className:b.track,ownerState:y,cx:Ia,cy:Ia,r:(Ia-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,m.jsx(Cye,{className:b.circle,style:v,ownerState:y,cx:Ia,cy:Ia,r:(Ia-c)/2,fill:"none",strokeWidth:c})]})})});function Aye(e){return Qe("MuiIconButton",e)}const OF=tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),kye=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${ye(r)}`,i&&`edge${ye(i)}`,`size${ye(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ze(a,Aye,t)},_ye=me(pa,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ye(n.color)}`],n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})(qe(({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}}]})),qe(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Ln()).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)}}],[`&.${OF.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${OF.loading}`]:{color:"transparent"}}))),Dye=me("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"}}]})),Fn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium",id:f,loading:h=null,loadingIndicator:g,...y}=r,b=Oc(f),v=g??m.jsx(zr,{"aria-labelledby":b,color:"inherit",size:16}),S={...r,edge:i,color:a,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:v,size:c},C=kye(S);return m.jsxs(_ye,{id:h?b:f,className:Oe(C.root,s),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...y,ownerState:S,children:[typeof h=="boolean"&&m.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:m.jsx(Dye,{className:C.loadingIndicator,ownerState:S,children:h&&v})}),o]})}),Oye=De(m.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"})),Tye=De(m.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Rye=De(m.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"})),Iye=De(m.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"})),aX=De(m.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"})),Mye=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${ye(n||r)}`,`${t}${ye(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Ze(o,H0e,i)},Pye=me(Nr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color||n.severity)}`]]}})(qe(({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(Ln(["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),[`& .${kF.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Ln(["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}`,[`& .${kF.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Ln(["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)}}}))]}})),jye=me("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),$ye=me("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),Nye=me("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),TF={success:m.jsx(Oye,{fontSize:"inherit"}),warning:m.jsx(Tye,{fontSize:"inherit"}),error:m.jsx(Rye,{fontSize:"inherit"}),info:m.jsx(Iye,{fontSize:"inherit"})},kn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:u={},componentsProps:c={},icon:f,iconMapping:h=TF,onClose:g,role:y="alert",severity:b="success",slotProps:v={},slots:S={},variant:C="standard",...w}=r,A={...r,color:l,severity:b,variant:C,colorSeverity:l||b},E=Mye(A),_={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...S},slotProps:{...c,...v}},[D,T]=ut("root",{ref:n,shouldForwardComponentProp:!0,className:Oe(E.root,s),elementType:Pye,externalForwardedProps:{..._,...w},ownerState:A,additionalProps:{role:y,elevation:0}}),[M,L]=ut("icon",{className:E.icon,elementType:jye,externalForwardedProps:_,ownerState:A}),[j,I]=ut("message",{className:E.message,elementType:$ye,externalForwardedProps:_,ownerState:A}),[N,$]=ut("action",{className:E.action,elementType:Nye,externalForwardedProps:_,ownerState:A}),[z,F]=ut("closeButton",{elementType:Fn,externalForwardedProps:_,ownerState:A}),[G,V]=ut("closeIcon",{elementType:aX,externalForwardedProps:_,ownerState:A});return m.jsxs(D,{...T,children:[f!==!1?m.jsx(M,{...L,children:f||h[b]||TF[b]}):null,m.jsx(j,{...I,children:o}),i!=null?m.jsx(N,{...$,children:i}):null,i==null&&g?m.jsx(N,{...$,children:m.jsx(z,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:m.jsx(G,{fontSize:"small",...V})})}):null]})});function Lye(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Dd();O.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=Li((S,C)=>{r?.(S,C)}),l=Li(S=>{!r||S==null||s.start(S,()=>{a(null,"timeout")})});O.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const u=S=>{r?.(S,"clickaway")},c=s.clear,f=O.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),h=S=>C=>{const w=S.onBlur;w?.(C),f()},g=S=>C=>{const w=S.onFocus;w?.(C),c()},y=S=>C=>{const w=S.onMouseEnter;w?.(C),c()},b=S=>C=>{const w=S.onMouseLeave;w?.(C),f()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",f),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",c)}},[n,i,f,c]),{getRootProps:(S={})=>{const C={...Yi(e),...Yi(S)};return{role:"presentation",...S,...C,onBlur:h(C),onFocus:g(C),onMouseEnter:y(C),onMouseLeave:b(C)}},onClickAway:u}}function hf(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function RF(e){return e.substring(2).toLowerCase()}function Fye(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Bye(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=O.useRef(!1),a=O.useRef(null),l=O.useRef(!1),u=O.useRef(!1);O.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=Tr(hf(t),a),f=Li(y=>{const b=u.current;u.current=!1;const v=_i(a.current);if(!l.current||!a.current||"clientX"in y&&Fye(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)}),h=y=>b=>{u.current=!0;const v=t.props[y];v&&v(b)},g={ref:c};return o!==!1&&(g[o]=h(o)),O.useEffect(()=>{if(o!==!1){const y=RF(o),b=_i(a.current),v=()=>{s.current=!0};return b.addEventListener(y,f),b.addEventListener("touchmove",v),()=>{b.removeEventListener(y,f),b.removeEventListener("touchmove",v)}}},[f,o]),r!==!1&&(g[r]=h(r)),O.useEffect(()=>{if(r!==!1){const y=RF(r),b=_i(a.current);return b.addEventListener(y,f),()=>{b.removeEventListener(y,f)}}},[f,r]),O.cloneElement(t,g)}const RI=e=>e.scrollTop;function Gd(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 xT(e){return`scale(${e}, ${e**2})`}const zye={entering:{opacity:1,transform:xT(1)},entered:{opacity:1,transform:"none"}},S4=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),V1=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:f,onExited:h,onExiting:g,style:y,timeout:b="auto",TransitionComponent:v=_a,...S}=t,C=Dd(),w=O.useRef(),A=ka(),E=O.useRef(null),_=Tr(E,hf(o),n),D=z=>F=>{if(z){const G=E.current;F===void 0?z(G):z(G,F)}},T=D(c),M=D((z,F)=>{RI(z);const{duration:G,delay:V,easing:H}=Gd({style:y,timeout:b,easing:s},{mode:"enter"});let X;b==="auto"?(X=A.transitions.getAutoHeightDuration(z.clientHeight),w.current=X):X=G,z.style.transition=[A.transitions.create("opacity",{duration:X,delay:V}),A.transitions.create("transform",{duration:S4?X:X*.666,delay:V,easing:H})].join(","),l&&l(z,F)}),L=D(u),j=D(g),I=D(z=>{const{duration:F,delay:G,easing:V}=Gd({style:y,timeout:b,easing:s},{mode:"exit"});let H;b==="auto"?(H=A.transitions.getAutoHeightDuration(z.clientHeight),w.current=H):H=F,z.style.transition=[A.transitions.create("opacity",{duration:H,delay:G}),A.transitions.create("transform",{duration:S4?H:H*.666,delay:S4?G:G||H*.333,easing:V})].join(","),z.style.opacity=0,z.style.transform=xT(.75),f&&f(z)}),N=D(h),$=z=>{b==="auto"&&C.start(w.current||0,z),r&&r(E.current,z)};return m.jsx(v,{appear:i,in:a,nodeRef:E,onEnter:M,onEntered:L,onEntering:T,onExit:I,onExited:N,onExiting:j,addEndListener:$,timeout:b==="auto"?null:b,...S,children:(z,{ownerState:F,...G})=>O.cloneElement(o,{style:{opacity:0,transform:xT(.75),visibility:z==="exited"&&!a?"hidden":void 0,...zye[z],...y,...o.props.style},ref:_,...G})})});V1&&(V1.muiSupportAuto=!0);function Uye(e){return Qe("MuiSnackbarContent",e)}tt("MuiSnackbarContent",["root","message","action"]);const Hye=e=>{const{classes:t}=e;return Ze({root:["root"],action:["action"],message:["message"]},Uye,t)},Vye=me(Nr,{name:"MuiSnackbarContent",slot:"Root"})(qe(({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(U1(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:U1(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Wye=me("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),qye=me("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Gye=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert",...l}=r,u=r,c=Hye(u);return m.jsxs(Vye,{role:a,elevation:6,className:Oe(c.root,o),ownerState:u,ref:n,...l,children:[m.jsx(Wye,{className:c.message,ownerState:u,children:s}),i?m.jsx(qye,{className:c.action,ownerState:u,children:i}):null]})});function Kye(e){return Qe("MuiSnackbar",e)}tt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Yye=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`]};return Ze(r,Kye,t)},Xye=me("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}`]]}})(qe(({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%)"}}}]}))),II=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbar"}),i=ka(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:c,className:f,ClickAwayListenerProps:h,ContentProps:g,disableWindowBlurListener:y=!1,message:b,onBlur:v,onClose:S,onFocus:C,onMouseEnter:w,onMouseLeave:A,open:E,resumeHideDuration:_,slots:D={},slotProps:T={},TransitionComponent:M,transitionDuration:L=o,TransitionProps:{onEnter:j,onExited:I,...N}={},...$}=r,z={...r,anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:u,disableWindowBlurListener:y,TransitionComponent:M,transitionDuration:L},F=Yye(z),{getRootProps:G,onClickAway:V}=Lye(z),[H,X]=O.useState(!0),B=oe=>{X(!0),I&&I(oe)},W=(oe,ue)=>{X(!1),j&&j(oe,ue)},Y={slots:{transition:M,...D},slotProps:{content:g,clickAwayListener:h,transition:N,...T}},[U,K]=ut("root",{ref:n,className:[F.root,f],elementType:Xye,getSlotProps:G,externalForwardedProps:{...Y,...$},ownerState:z}),[Z,{ownerState:J,...Q}]=ut("clickAwayListener",{elementType:Bye,externalForwardedProps:Y,getSlotProps:oe=>({onClickAway:(...ue)=>{const pe=ue[0];oe.onClickAway?.(...ue),!pe?.defaultMuiPrevented&&V(...ue)}}),ownerState:z}),[ie,le]=ut("content",{elementType:Gye,shouldForwardComponentProp:!0,externalForwardedProps:Y,additionalProps:{message:b,action:s},ownerState:z}),[te,ne]=ut("transition",{elementType:V1,externalForwardedProps:Y,getSlotProps:oe=>({onEnter:(...ue)=>{oe.onEnter?.(...ue),W(...ue)},onExited:(...ue)=>{oe.onExited?.(...ue),B(...ue)}}),additionalProps:{appear:!0,in:E,timeout:L,direction:a==="top"?"down":"up"},ownerState:z});return!E&&H?null:m.jsx(Z,{...Q,...D.clickAwayListener&&{ownerState:J},children:m.jsx(U,{...K,children:m.jsx(te,{...ne,children:c||m.jsx(ie,{...le})})})})}),lX=O.createContext({show:()=>{}});let Jye=0;const Qye=e=>{const[t,n]=O.useState([]),r=O.useCallback(o=>{n(s=>[...s,{...o,autoHideDuration:o.autoHideDuration??6e3,notificationId:Jye++}])},[]),i=o=>{n(s=>s.filter(a=>a.notificationId!==o))};return m.jsxs(lX.Provider,{value:{show:r},children:[e.children,t.map(o=>m.jsx(II,{open:!0,autoHideDuration:o.autoHideDuration,onClose:()=>i(o.notificationId),children:m.jsx(kn,{severity:o.severity,variant:"filled",sx:{minWidth:"300px"},children:o.message})},o.notificationId))]})};function co(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 Zye=typeof Symbol=="function"&&Symbol.observable||"@@observable",IF=Zye,w4=()=>Math.random().toString(36).substring(7).split("").join("."),e1e={INIT:`@@redux/INIT${w4()}`,REPLACE:`@@redux/REPLACE${w4()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${w4()}`},RC=e1e;function MI(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 uX(e,t,n){if(typeof e!="function")throw new Error(co(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(co(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(co(1));return n(uX)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((v,S)=>{s.set(S,v)}))}function c(){if(l)throw new Error(co(3));return i}function f(v){if(typeof v!="function")throw new Error(co(4));if(l)throw new Error(co(5));let S=!0;u();const C=a++;return s.set(C,v),function(){if(S){if(l)throw new Error(co(6));S=!1,u(),s.delete(C),o=null}}}function h(v){if(!MI(v))throw new Error(co(7));if(typeof v.type>"u")throw new Error(co(8));if(typeof v.type!="string")throw new Error(co(17));if(l)throw new Error(co(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(co(10));r=v,h({type:RC.REPLACE})}function y(){const v=f;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(co(11));function C(){const A=S;A.next&&A.next(c())}return C(),{unsubscribe:v(C)}},[IF](){return this}}}return h({type:RC.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:g,[IF]:y}}function t1e(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:RC.INIT})>"u")throw new Error(co(12));if(typeof n(void 0,{type:RC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(co(13))})}function n1e(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{t1e(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const f=r[c],h=n[f],g=s[f],y=h(g,a);if(typeof y>"u")throw a&&a.type,new Error(co(14));u[f]=y,l=l||y!==g}return l=l||r.length!==Object.keys(s).length,l?u:s}}function IC(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function r1e(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(co(15))};const s={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},a=e.map(l=>l(s));return o=IC(...a)(i.dispatch),{...i,dispatch:o}}}function i1e(e){return MI(e)&&"type"in e&&typeof e.type=="string"}var cX=Symbol.for("immer-nothing"),MF=Symbol.for("immer-draftable"),Uo=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ms=Object,ng=Ms.getPrototypeOf,MC="constructor",KA="prototype",ST="configurable",PC="enumerable",Iw="writable",W1="value",gc=e=>!!e&&!!e[Uo];function nl(e){return e?dX(e)||XA(e)||!!e[MF]||!!e[MC]?.[MF]||JA(e)||QA(e):!1}var o1e=Ms[KA][MC].toString(),PF=new WeakMap;function dX(e){if(!e||!PI(e))return!1;const t=ng(e);if(t===null||t===Ms[KA])return!0;const n=Ms.hasOwnProperty.call(t,MC)&&t[MC];if(n===Object)return!0;if(!lm(n))return!1;let r=PF.get(n);return r===void 0&&(r=Function.toString.call(n),PF.set(n,r)),r===o1e}function YA(e,t,n=!0){hv(e)===0?(n?Reflect.ownKeys(e):Ms.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function hv(e){const t=e[Uo];return t?t.type_:XA(e)?1:JA(e)?2:QA(e)?3:0}var jF=(e,t,n=hv(e))=>n===2?e.has(t):Ms[KA].hasOwnProperty.call(e,t),wT=(e,t,n=hv(e))=>n===2?e.get(t):e[t],jC=(e,t,n,r=hv(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function s1e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var XA=Array.isArray,JA=e=>e instanceof Map,QA=e=>e instanceof Set,PI=e=>typeof e=="object",lm=e=>typeof e=="function",C4=e=>typeof e=="boolean";function a1e(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Zu=e=>e.copy_||e.base_,jI=e=>e.modified_?e.copy_:e.base_;function CT(e,t){if(JA(e))return new Map(e);if(QA(e))return new Set(e);if(XA(e))return Array[KA].slice.call(e);const n=dX(e);if(t===!0||t==="class_only"&&!n){const r=Ms.getOwnPropertyDescriptors(e);delete r[Uo];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[Iw]===!1&&(a[Iw]=!0,a[ST]=!0),(a.get||a.set)&&(r[s]={[ST]:!0,[Iw]:!0,[PC]:a[PC],[W1]:e[s]})}return Ms.create(ng(e),r)}else{const r=ng(e);if(r!==null&&n)return{...e};const i=Ms.create(r);return Ms.assign(i,e)}}function $I(e,t=!1){return ZA(e)||gc(e)||!nl(e)||(hv(e)>1&&Ms.defineProperties(e,{set:S2,add:S2,clear:S2,delete:S2}),Ms.freeze(e),t&&YA(e,(n,r)=>{$I(r,!0)},!1)),e}function l1e(){Na(2)}var S2={[W1]:l1e};function ZA(e){return e===null||!PI(e)?!0:Ms.isFrozen(e)}var $C="MapSet",ET="Patches",$F="ArrayMethods",fX={};function Oh(e){const t=fX[e];return t||Na(0,e),t}var NF=e=>!!fX[e],q1,hX=()=>q1,u1e=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:NF($C)?Oh($C):void 0,arrayMethodsPlugin_:NF($F)?Oh($F):void 0});function LF(e,t){t&&(e.patchPlugin_=Oh(ET),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function AT(e){kT(e),e.drafts_.forEach(c1e),e.drafts_=null}function kT(e){e===q1&&(q1=e.parent_)}var FF=e=>q1=u1e(q1,e);function c1e(e){const t=e[Uo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BF(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Uo].modified_&&(AT(t),Na(4)),nl(e)&&(e=zF(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Uo].base_,e,t)}else e=zF(t,n);return d1e(t,e,!0),AT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cX?e:void 0}function zF(e,t){if(ZA(t))return t;const n=t[Uo];if(!n)return NC(t,e.handledSet_,e);if(!e3(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);gX(n,e)}return n.copy_}function d1e(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$I(t,n)}function pX(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var e3=(e,t)=>e.scope_===t,f1e=[];function mX(e,t,n,r){const i=Zu(e),o=e.type_;if(r!==void 0&&wT(i,r,o)===t){jC(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;YA(i,(l,u)=>{if(gc(u)){const c=a.get(u)||[];c.push(l),a.set(u,c)}})}const s=e.draftLocations_.get(t)??f1e;for(const a of s)jC(i,a,n,o)}function h1e(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!e3(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=jI(o);mX(e,o.draft_??o,s,n),gX(o,i)})}function gX(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)}pX(e)}}function p1e(e,t,n){const{scope_:r}=e;if(gc(n)){const i=n[Uo];e3(i,r)&&i.callbacks_.push(function(){Mw(e);const s=jI(i);mX(e,n,s,t)})}else nl(n)&&e.callbacks_.push(function(){const o=Zu(e);e.type_===3?o.has(n)&&NC(n,r.handledSet_,r):wT(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&NC(wT(e.copy_,t,e.type_),r.handledSet_,r)})}function NC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||gc(e)||t.has(e)||!nl(e)||ZA(e)||(t.add(e),YA(e,(r,i)=>{if(gc(i)){const o=i[Uo];if(e3(o,n)){const s=jI(o);jC(e,r,s,e.type_),pX(o)}}else nl(i)&&NC(i,t,n)})),e}function m1e(e,t){const n=XA(e),r={type_:n?1:0,scope_:t?t.scope_:hX(),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=LC;n&&(i=[r],o=G1);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var LC={get(e,t){if(t===Uo)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=Zu(e);if(!jF(i,t,e.type_))return g1e(e,i,t);const o=i[t];if(e.finalized_||!nl(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&a1e(t))return o;if(o===E4(e.base_,t)){Mw(e);const s=e.type_===1?+t:t,a=DT(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in Zu(e)},ownKeys(e){return Reflect.ownKeys(Zu(e))},set(e,t,n){const r=yX(Zu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=E4(Zu(e),t),o=i?.[Uo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(s1e(n,i)&&(n!==void 0||jF(e.base_,t,e.type_)))return!0;Mw(e),_T(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),p1e(e,t,n)),!0},deleteProperty(e,t){return Mw(e),E4(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),_T(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Zu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Iw]:!0,[ST]:e.type_!==1||t!=="length",[PC]:r[PC],[W1]:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return ng(e.base_)},setPrototypeOf(){Na(12)}},G1={};for(let e in LC){let t=LC[e];G1[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}G1.deleteProperty=function(e,t){return G1.set.call(this,e,t,void 0)};G1.set=function(e,t,n){return LC.set.call(this,e[0],t,n,e[0])};function E4(e,t){const n=e[Uo];return(n?Zu(n):e)[t]}function g1e(e,t,n){const r=yX(t,n);return r?W1 in r?r[W1]:r.get?.call(e.draft_):void 0}function yX(e,t){if(!(t in e))return;let n=ng(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ng(n)}}function _T(e){e.modified_||(e.modified_=!0,e.parent_&&_T(e.parent_))}function Mw(e){e.copy_||(e.assigned_=new Map,e.copy_=CT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y1e=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(lm(t)&&!lm(n)){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}lm(n)||Na(6),r!==void 0&&!lm(r)&&Na(7);let i;if(nl(t)){const o=FF(this),s=DT(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?AT(o):kT(o)}return LF(o,r),BF(i,o)}else if(!t||!PI(t)){if(i=n(t),i===void 0&&(i=t),i===cX&&(i=void 0),this.autoFreeze_&&$I(i,!0),r){const o=[],s=[];Oh(ET).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(lm(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]},C4(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),C4(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),C4(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nl(e)||Na(8),gc(e)&&(e=b1e(e));const t=FF(this),n=DT(t,e,void 0);return n[Uo].isManual_=!0,kT(t),n}finishDraft(e,t){const n=e&&e[Uo];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return LF(r,t),BF(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=Oh(ET).applyPatches_;return gc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function DT(e,t,n,r){const[i,o]=JA(t)?Oh($C).proxyMap_(t,n):QA(t)?Oh($C).proxySet_(t,n):m1e(t,n);return(n?.scope_??hX()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?h1e(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:u}=l;o.modified_&&u&&u.generatePatches_(o,[],l)}),i}function b1e(e){return gc(e)||Na(10,e),bX(e)}function bX(e){if(!nl(e)||ZA(e))return e;const t=e[Uo];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=CT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=CT(e,!0);return YA(n,(i,o)=>{jC(n,i,bX(o))},r),t&&(t.finalized_=!1),n}var v1e=new y1e,vX=v1e.produce,FC=Symbol("NOT_FOUND");function x1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function S1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function w1e(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 UF=e=>Array.isArray(e)?e:[e];function C1e(e){const t=Array.isArray(e[0])?e[0]:e;return w1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function E1e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function A1e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:FC},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function k1e(e,t){let n=[];function r(a){const l=n.findIndex(u=>t(a,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return FC}function i(a,l){r(a)===FC&&(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 _1e=(e,t)=>e===t;function D1e(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 O1e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=_1e,maxSize:i=1,resultEqualityCheck:o}=n,s=D1e(r);let a=0;const l=i<=1?A1e(s):k1e(i,s);function u(){let c=l.get(arguments);if(c===FC){if(c=e.apply(null,arguments),a++,o){const h=l.getEntries().find(g=>o(g.value,c));h&&(c=h.value,a!==0&&a--)}l.put(arguments,c)}return c}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var T1e=class{constructor(e){this.value=e}deref(){return this.value}},R1e=typeof WeakRef<"u"?WeakRef:T1e,I1e=0,HF=1;function w2(){return{s:I1e,v:void 0,o:null,p:null}}function xX(e,t={}){let n=w2();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const g=arguments[f];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=w2(),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=w2(),y.set(g,a)):a=b}}const u=a;let c;if(a.s===HF)c=a.v;else if(c=e.apply(null,arguments),o++,r){const f=i?.deref?.()??i;f!=null&&r(f,c)&&(c=f,o!==0&&o--),i=typeof c=="object"&&c!==null||typeof c=="function"?new R1e(c):c}return u.s=HF,u.v=c,c}return s.clearCache=()=>{n=w2(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function SX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),x1e(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:g=xX,argsMemoizeOptions:y=[]}=c,b=UF(h),v=UF(y),S=C1e(i),C=f(function(){return o++,u.apply(null,arguments)},...b),w=g(function(){s++;const E=E1e(S,arguments);return a=C.apply(null,E),a},...v);return Object.assign(w,{resultFunc:u,memoizedResultFunc:C,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var wX=SX(xX),M1e=Object.assign((e,t=wX)=>{S1e(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:()=>M1e});function CX(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var P1e=CX(),j1e=CX,$1e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?IC:IC.apply(null,arguments)},N1e=e=>e&&typeof e.match=="function";function r1(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(BC(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=>i1e(r)&&r.type===e,n}var EX=class Ly extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ly.prototype)}static get[Symbol.species](){return Ly}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ly(...t[0].concat(this)):new Ly(...t.concat(this))}};function VF(e){return nl(e)?vX(e,()=>{}):e}function L1e(e){return typeof e=="boolean"}var F1e=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new EX;return n&&(L1e(n)?s.push(P1e):s.push(j1e(n.extraArgument))),s},B1e="RTK_autoBatch",WF=e=>t=>{setTimeout(t,e)},z1e=(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:WF(10):e.type==="callback"?e.queueNotification:WF(e.timeout),u=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return a.add(c),()=>{h(),a.delete(c)}},dispatch(c){try{return i=!c?.meta?.[B1e],o=!i,o&&(s||(s=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},U1e=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new EX(e);return r&&i.push(z1e(typeof r=="object"?r:void 0)),i};function H1e(e){const t=F1e(),{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(MI(n))a=n1e(n);else throw new Error(BC(1));let l;typeof r=="function"?l=r(t):l=t();let u=IC;i&&(u=$1e({trace:!1,...typeof i=="object"&&i}));const c=r1e(...l),f=U1e(c);let h=typeof s=="function"?s(f):f();const g=u(...h);return uX(a,o,g)}function V1e(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(BC(28));if(a in t)throw new Error(BC(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 W1e(e){return typeof e=="function"}function NI(e,t){let[n,r,i]=V1e(t),o;if(W1e(e))o=()=>VF(e());else{const a=VF(e);o=()=>a}function s(a=o(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,f)=>{if(f)if(gc(c)){const g=f(c,l);return g===void 0?c:g}else{if(nl(c))return vX(c,h=>f(h,l));{const h=f(c,l);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},a)}return s.getInitialState=o,s}var q1e=(e,t)=>N1e(e)?e.match(t):e(t);function G1e(...e){return t=>e.some(n=>q1e(n,t))}var K1e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Y1e=(e=21)=>{let t="",n=e;for(;n--;)t+=K1e[Math.random()*64|0];return t},X1e=["name","message","stack","code"],A4=class{constructor(e,t){this.payload=e,this.meta=t}_type},qF=class{constructor(e,t){this.payload=e,this.meta=t}_type},J1e=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of X1e)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},GF="External signal was aborted",Q1e=(()=>{function e(t,n,r){const i=r1(t+"/fulfilled",(l,u,c,f)=>({payload:l,meta:{...f||{},arg:c,requestId:u,requestStatus:"fulfilled"}})),o=r1(t+"/pending",(l,u,c)=>({payload:void 0,meta:{...c||{},arg:u,requestId:l,requestStatus:"pending"}})),s=r1(t+"/rejected",(l,u,c,f,h)=>({payload:f,error:(r&&r.serializeError||J1e)(l||"Rejected"),meta:{...h||{},arg:c,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:u}={}){return(c,f,h)=>{const g=r?.idGenerator?r.idGenerator(l):Y1e(),y=new AbortController;let b,v;function S(w){v=w,y.abort()}u&&(u.aborted?S(GF):u.addEventListener("abort",()=>S(GF),{once:!0}));const C=(async function(){let w;try{let E=r?.condition?.(l,{getState:f,extra:h});if(ebe(E)&&(E=await E),E===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((D,T)=>{b=()=>{T({name:"AbortError",message:v||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});c(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:f,extra:h}))),w=await Promise.race([_,Promise.resolve(n(l,{dispatch:c,getState:f,extra:h,requestId:g,signal:y.signal,abort:S,rejectWithValue:(D,T)=>new A4(D,T),fulfillWithValue:(D,T)=>new qF(D,T)})).then(D=>{if(D instanceof A4)throw D;return D instanceof qF?i(D.payload,g,l,D.meta):i(D,g,l)})])}catch(E){w=E instanceof A4?s(null,g,l,E.payload,E.meta):s(E,g,l)}finally{b&&y.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||c(w),w})();return Object.assign(C,{abort:S,requestId:g,arg:l,unwrap(){return C.then(Z1e)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:G1e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Z1e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ebe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function BC(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. `}async function tbe(){return await(await fetch(`api/matter/bridges?_s=${Date.now()}`)).json()}async function AX(e){return fetch("api/matter/bridges",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json())}async function kX(e){return fetch(`api/matter/bridges/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json())}async function nbe(e){await fetch(`api/matter/bridges/${e}`,{method:"DELETE"})}async function rbe(e){return await fetch(`api/matter/bridges/${e}/actions/factory-reset`,{method:"POST"}).then(t=>t.json())}async function _X(e){return await fetch(`api/matter/bridges/${e}/actions/force-sync`,{method:"POST"}).then(t=>t.json())}async function ibe(e){const t=await fetch(`api/matter/bridges/${e}/actions/open-commissioning-window`,{method:"POST"});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to open commissioning window"}));throw new Error(n.error??"Failed to open commissioning window")}return t.json()}async function obe(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 sbe(){return(await fetch("api/matter/bridges/actions/start-all",{method:"POST"})).json()}async function abe(){return(await fetch("api/matter/bridges/actions/stop-all",{method:"POST"})).json()}async function lbe(){return(await fetch("api/matter/bridges/actions/restart-all",{method:"POST"})).json()}const Fg=Q1e.withTypes(),t3=wX.withTypes(),Fo=Fg("bridges/load",tbe),DX=Fg("bridges/create",AX),OX=Fg("bridges/delete",nbe),TX=Fg("bridges/update",kX),RX=Fg("bridges/reset",rbe),IX=r1("bridges/setFromWebSocket"),MX=r1("bridges/updateFromWebSocket"),zs=ade.withTypes(),Bg=cde.withTypes(),PX=O.createContext({isConnected:!1,error:null});function ube(){return O.useContext(PX)}function cbe({children:e}){const t=zs(),[n,r]=O.useState(!1),[i,o]=O.useState(null),s=O.useRef(null),a=O.useRef(void 0),l=O.useCallback(c=>{switch(c.type){case"bridges_update":t(IX(c.data));break;case"bridge_update":t(MX(c.data));break;case"ping":s.current?.send(JSON.stringify({type:"pong"}));break}},[t]),u=O.useCallback(()=>{if(s.current?.readyState===WebSocket.OPEN)return;const c=window.location.protocol==="https:"?"wss:":"ws:",f=document.querySelector("base")?.href||window.location.origin,h=new URL(f),g=`${c}//${h.host}${h.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(u,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 O.useEffect(()=>(u(),()=>{a.current&&clearTimeout(a.current),s.current?.close()}),[u]),m.jsx(PX.Provider,{value:{isConnected:n,error:i},children:e})}const dbe=()=>{const e=zs();return O.useEffect(()=>{e(Fo())},[e]),m.jsx(aY,{})},rg=De(m.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"})),n3=De(m.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}));function fbe(e){return Qe("MuiTypography",e)}const KF=tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),hbe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},pbe=_0e(),mbe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Ze(a,fbe,s)},gbe=me("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${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(qe(({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(Ln()).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${ye(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}}]}))),YF={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},re=O.forwardRef(function(t,n){const{color:r,...i}=it({props:t,name:"MuiTypography"}),o=!hbe[r],s=pbe({...i,...o&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:f=!1,paragraph:h=!1,variant:g="body1",variantMapping:y=YF,...b}=s,v={...s,align:a,color:r,className:l,component:u,gutterBottom:c,noWrap:f,paragraph:h,variant:g,variantMapping:y},S=u||(h?"p":y[g]||YF[g])||"span",C=mbe(v);return m.jsx(gbe,{as:S,ref:n,className:Oe(C.root,l),...b,ownerState:v,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...b.style}})});function ybe(e){return Qe("MuiAlertTitle",e)}tt("MuiAlertTitle",["root"]);const bbe=e=>{const{classes:t}=e;return Ze({root:["root"]},ybe,t)},vbe=me(re,{name:"MuiAlertTitle",slot:"Root"})(qe(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),zC=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlertTitle"}),{className:i,...o}=r,s=r,a=bbe(s);return m.jsx(vbe,{gutterBottom:!0,component:"div",ownerState:s,ref:n,className:Oe(a.root,i),...o})}),xbe=tt("MuiBox",["root"]),Sbe=HA(),ce=$me({themeId:ua,defaultTheme:Sbe,defaultClassName:xbe.root,generateClassName:MY.generate});function wbe(e){return Qe("MuiButton",e)}const zf=tt("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"]),Cbe=O.createContext({}),Ebe=O.createContext(void 0),Abe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:s,loadingPosition:a,classes:l}=e,u={root:["root",s&&"loading",o,`${o}${ye(t)}`,`size${ye(i)}`,`${o}Size${ye(i)}`,`color${ye(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${ye(a)}`],startIcon:["icon","startIcon",`iconSize${ye(i)}`],endIcon:["icon","endIcon",`iconSize${ye(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=Ze(u,wbe,l);return{...l,...c}},jX=[{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}}}],kbe=me(pa,{shouldForwardProp:e=>ro(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(qe(({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"},[`&.${zf.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]},[`&.${zf.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${zf.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)",[`&.${zf.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(Ln()).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"},[`&.${zf.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${zf.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}),[`&.${zf.loading}`]:{color:"transparent"}}}]}})),_be=me("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ye(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}},...jX]})),Dbe=me("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ye(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}},...jX]})),Obe=me("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}}]})),XF=me("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Tt=O.forwardRef(function(t,n){const r=O.useContext(Cbe),i=O.useContext(Ebe),o=tg(r,t),s=it({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:c,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:y,focusVisibleClassName:b,fullWidth:v=!1,id:S,loading:C=null,loadingIndicator:w,loadingPosition:A="center",size:E="medium",startIcon:_,type:D,variant:T="text",...M}=s,L=Oc(S),j=w??m.jsx(zr,{"aria-labelledby":L,color:"inherit",size:16}),I={...s,color:l,component:u,disabled:f,disableElevation:h,disableFocusRipple:g,fullWidth:v,loading:C,loadingIndicator:j,loadingPosition:A,size:E,type:D,variant:T},N=Abe(I),$=(_||C&&A==="start")&&m.jsx(_be,{className:N.startIcon,ownerState:I,children:_||m.jsx(XF,{className:N.loadingIconPlaceholder,ownerState:I})}),z=(y||C&&A==="end")&&m.jsx(Dbe,{className:N.endIcon,ownerState:I,children:y||m.jsx(XF,{className:N.loadingIconPlaceholder,ownerState:I})}),F=i||"",G=typeof C=="boolean"?m.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:C&&m.jsx(Obe,{className:N.loadingIndicator,ownerState:I,children:j})}):null;return m.jsxs(kbe,{ownerState:I,className:Oe(r.className,N.root,c,F),component:u,disabled:f||C,focusRipple:!g,focusVisibleClassName:Oe(N.focusVisible,b),ref:n,type:D,id:C?L:S,...M,classes:N,children:[$,A!=="end"&&G,a,A==="end"&&G,z]})});function Tbe(e){return Qe("MuiCollapse",e)}tt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Rbe=e=>{const{orientation:t,classes:n}=e;return Ze({root:["root",t],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",t],wrapperInner:["wrapperInner",t]},Tbe,n)},Ibe=me("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(qe(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),Mbe=me("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Pbe=me("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ka=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:u,in:c,onEnter:f,onEntered:h,onEntering:g,onExit:y,onExited:b,onExiting:v,orientation:S="vertical",slots:C={},slotProps:w={},style:A,timeout:E=JY.standard,TransitionComponent:_=_a,...D}=r,T={...r,orientation:S,collapsedSize:a},M=Rbe(T),L=ka(),j=Dd(),I=O.useRef(null),N=O.useRef(),$=typeof a=="number"?`${a}px`:a,z=S==="horizontal",F=z?"width":"height",G=O.useRef(null),V=Tr(n,G),H=pe=>we=>{if(pe){const ke=G.current;we===void 0?pe(ke):pe(ke,we)}},X=()=>I.current?I.current[z?"clientWidth":"clientHeight"]:0,B=H((pe,we)=>{I.current&&z&&(I.current.style.position="absolute"),pe.style[F]=$,f&&f(pe,we)}),W=H((pe,we)=>{const ke=X();I.current&&z&&(I.current.style.position="");const{duration:Ae,easing:Fe}=Gd({style:A,timeout:E,easing:u},{mode:"enter"});if(E==="auto"){const Me=L.transitions.getAutoHeightDuration(ke);pe.style.transitionDuration=`${Me}ms`,N.current=Me}else pe.style.transitionDuration=typeof Ae=="string"?Ae:`${Ae}ms`;pe.style[F]=`${ke}px`,pe.style.transitionTimingFunction=Fe,g&&g(pe,we)}),Y=H((pe,we)=>{pe.style[F]="auto",h&&h(pe,we)}),U=H(pe=>{pe.style[F]=`${X()}px`,y&&y(pe)}),K=H(b),Z=H(pe=>{const we=X(),{duration:ke,easing:Ae}=Gd({style:A,timeout:E,easing:u},{mode:"exit"});if(E==="auto"){const Fe=L.transitions.getAutoHeightDuration(we);pe.style.transitionDuration=`${Fe}ms`,N.current=Fe}else pe.style.transitionDuration=typeof ke=="string"?ke:`${ke}ms`;pe.style[F]=$,pe.style.transitionTimingFunction=Ae,v&&v(pe)}),J=pe=>{E==="auto"&&j.start(N.current||0,pe),i&&i(G.current,pe)},Q={slots:C,slotProps:w,component:l},[ie,le]=ut("root",{ref:V,className:Oe(M.root,s),elementType:Ibe,externalForwardedProps:Q,ownerState:T,additionalProps:{style:{[z?"minWidth":"minHeight"]:$,...A}}}),[te,ne]=ut("wrapper",{ref:I,className:M.wrapper,elementType:Mbe,externalForwardedProps:Q,ownerState:T}),[oe,ue]=ut("wrapperInner",{className:M.wrapperInner,elementType:Pbe,externalForwardedProps:Q,ownerState:T});return m.jsx(_,{in:c,onEnter:B,onEntered:Y,onEntering:W,onExit:U,onExited:K,onExiting:Z,addEndListener:J,nodeRef:G,timeout:E==="auto"?null:E,...D,children:(pe,{ownerState:we,...ke})=>{const Ae={...T,state:pe};return m.jsx(ie,{...le,className:Oe(le.className,{entered:M.entered,exited:!c&&$==="0px"&&M.hidden}[pe]),ownerState:Ae,...ke,children:m.jsx(te,{...ne,ownerState:Ae,children:m.jsx(oe,{...ue,ownerState:Ae,children:o})})})}})});Ka&&(Ka.muiSupportAuto=!0);const Ya=O.createContext({});function jbe(e){return Qe("MuiList",e)}tt("MuiList",["root","padding","dense","subheader"]);const $be=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ze({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},jbe,t)},Nbe=me("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),yu=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...c}=r,f=O.useMemo(()=>({dense:a}),[a]),h={...r,component:s,dense:a,disablePadding:l},g=$be(h);return m.jsx(Ya.Provider,{value:f,children:m.jsxs(Nbe,{as:s,className:Oe(g.root,o),ref:n,ownerState:h,...c,children:[u,i]})})});function Lbe(e){return Qe("MuiListItem",e)}tt("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function Fbe(e){return Qe("MuiListItemButton",e)}const um=tt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Bbe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},zbe=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,u=Ze({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Fbe,n);return{...n,...u}},Ube=me(pa,{shouldForwardProp:e=>ro(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Bbe})(qe(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${um.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${um.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${um.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${um.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${um.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Hbe=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:f,selected:h=!1,className:g,...y}=r,b=O.useContext(Ya),v=O.useMemo(()=>({dense:l||b.dense||!1,alignItems:i,disableGutters:u}),[i,b.dense,l,u]),S=O.useRef(null);zo(()=>{o&&S.current&&S.current.focus()},[o]);const C={...r,alignItems:i,dense:v.dense,disableGutters:u,divider:c,selected:h},w=zbe(C),A=Tr(S,n);return m.jsx(Ya.Provider,{value:v,children:m.jsx(Ube,{ref:A,href:y.href||y.to,component:(y.href||y.to)&&s==="div"?"button":s,focusVisibleClassName:Oe(w.focusVisible,f),ownerState:C,className:Oe(w.root,g),...y,classes:w,children:a})})});function Vbe(e){return Qe("MuiListItemSecondaryAction",e)}tt("MuiListItemSecondaryAction",["root","disableGutters"]);const Wbe=e=>{const{disableGutters:t,classes:n}=e;return Ze({root:["root",t&&"disableGutters"]},Vbe,n)},qbe=me("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),LI=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemSecondaryAction"}),{className:i,...o}=r,s=O.useContext(Ya),a={...r,disableGutters:s.disableGutters},l=Wbe(a);return m.jsx(qbe,{className:Oe(l.root,i),ownerState:a,ref:n,...o})});LI.muiName="ListItemSecondaryAction";const Gbe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},Kbe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:s,hasSecondaryAction:a}=e;return Ze({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",s&&"divider",t==="flex-start"&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},Lbe,n)},Ybe=me("div",{name:"MuiListItem",slot:"Root",overridesResolver:Gbe})(qe(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${um.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Xbe=me("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),pf=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItem"}),{alignItems:i="center",children:o,className:s,component:a,components:l={},componentsProps:u={},ContainerComponent:c="li",ContainerProps:{className:f,...h}={},dense:g=!1,disableGutters:y=!1,disablePadding:b=!1,divider:v=!1,secondaryAction:S,slotProps:C={},slots:w={},...A}=r,E=O.useContext(Ya),_=O.useMemo(()=>({dense:g||E.dense||!1,alignItems:i,disableGutters:y}),[i,E.dense,g,y]),D=O.useRef(null),T=O.Children.toArray(o),M=T.length&&n1(T[T.length-1],["ListItemSecondaryAction"]),L={...r,alignItems:i,dense:_.dense,disableGutters:y,disablePadding:b,divider:v,hasSecondaryAction:M},j=Kbe(L),I=Tr(D,n),N={slots:w,slotProps:C},[$,z]=ut("secondaryAction",{elementType:LI,externalForwardedProps:N,ownerState:L,className:j.secondaryAction}),F=w.root||l.Root||Ybe,G=C.root||u.root||{},V={className:Oe(j.root,G.className,s),...A};let H=a||"li";return M?(H=!V.component&&!a?"div":H,c==="li"&&(H==="li"?H="div":V.component==="li"&&(V.component="div")),m.jsx(Ya.Provider,{value:_,children:m.jsxs(Xbe,{as:c,className:Oe(j.container,f),ref:I,ownerState:L,...h,children:[m.jsx(F,{...G,...!iu(F)&&{as:H,ownerState:{...L,...G.ownerState}},...V,children:T}),T.pop()]})})):m.jsx(Ya.Provider,{value:_,children:m.jsxs(F,{...G,as:H,ref:I,...!iu(F)&&{ownerState:{...L,...G.ownerState}},...V,children:[T,S&&m.jsx($,{...z,children:S})]})})});function Jbe(e){return Qe("MuiListItemIcon",e)}const JF=tt("MuiListItemIcon",["root","alignItemsFlexStart"]),Qbe=e=>{const{alignItems:t,classes:n}=e;return Ze({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Jbe,n)},Zbe=me("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(qe(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Hl=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemIcon"}),{className:i,...o}=r,s=O.useContext(Ya),a={...r,alignItems:s.alignItems},l=Qbe(a);return m.jsx(Zbe,{className:Oe(l.root,i),ownerState:a,ref:n,...o})});function eve(e){return Qe("MuiListItemText",e)}const mm=tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),tve=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Ze({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},eve,t)},nve=me("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mm.primary}`]:t.primary},{[`& .${mm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${KF.root}:where(& .${mm.primary})`]:{display:"block"},[`.${KF.root}:where(& .${mm.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),za=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:f,slots:h={},slotProps:g={},...y}=r,{dense:b}=O.useContext(Ya);let v=l??i,S=c;const C={...r,disableTypography:s,inset:a,primary:!!v,secondary:!!S,dense:b},w=tve(C),A={slots:h,slotProps:{primary:u,secondary:f,...g}},[E,_]=ut("root",{className:Oe(w.root,o),elementType:nve,externalForwardedProps:{...A,...y},ownerState:C,ref:n}),[D,T]=ut("primary",{className:w.primary,elementType:re,externalForwardedProps:A,ownerState:C}),[M,L]=ut("secondary",{className:w.secondary,elementType:re,externalForwardedProps:A,ownerState:C});return v!=null&&v.type!==re&&!s&&(v=m.jsx(D,{variant:b?"body2":"body1",component:T?.variant?void 0:"span",...T,children:v})),S!=null&&S.type!==re&&!s&&(S=m.jsx(M,{variant:"body2",color:"textSecondary",...L,children:S})),m.jsxs(E,{..._,children:[v,S]})}),Ut=Yge({createStyledComponent:me("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>it({props:e,name:"MuiStack"})});var is="top",ma="bottom",ga="right",os="left",FI="auto",pv=[is,ma,ga,os],ig="start",K1="end",rve="clippingParents",$X="viewport",uy="popper",ive="reference",QF=pv.reduce(function(e,t){return e.concat([t+"-"+ig,t+"-"+K1])},[]),NX=[].concat(pv,[FI]).reduce(function(e,t){return e.concat([t,t+"-"+ig,t+"-"+K1])},[]),ove="beforeRead",sve="read",ave="afterRead",lve="beforeMain",uve="main",cve="afterMain",dve="beforeWrite",fve="write",hve="afterWrite",pve=[ove,sve,ave,lve,uve,cve,dve,fve,hve];function du(e){return e?(e.nodeName||"").toLowerCase():null}function Ls(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Th(e){var t=Ls(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Ls(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function BI(e){if(typeof ShadowRoot>"u")return!1;var t=Ls(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mve(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ca(o)||!du(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function gve(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!ca(i)||!du(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const yve={name:"applyStyles",enabled:!0,phase:"write",fn:mve,effect:gve,requires:["computeStyles"]};function ou(e){return e.split("-")[0]}var Sh=Math.max,UC=Math.min,og=Math.round;function OT(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function LX(){return!/^((?!chrome|android).)*safari/i.test(OT())}function sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&og(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&og(r.height)/e.offsetHeight||1);var s=Th(e)?Ls(e):window,a=s.visualViewport,l=!LX()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:c,right:u+f,bottom:c+h,left:u,x:u,y:c}}function zI(e){var t=sg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function FX(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&BI(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yc(e){return Ls(e).getComputedStyle(e)}function bve(e){return["table","td","th"].indexOf(du(e))>=0}function mf(e){return((Th(e)?e.ownerDocument:e.document)||window.document).documentElement}function r3(e){return du(e)==="html"?e:e.assignedSlot||e.parentNode||(BI(e)?e.host:null)||mf(e)}function ZF(e){return!ca(e)||yc(e).position==="fixed"?null:e.offsetParent}function vve(e){var t=/firefox/i.test(OT()),n=/Trident/i.test(OT());if(n&&ca(e)){var r=yc(e);if(r.position==="fixed")return null}var i=r3(e);for(BI(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(du(i))<0;){var o=yc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function mv(e){for(var t=Ls(e),n=ZF(e);n&&bve(n)&&yc(n).position==="static";)n=ZF(n);return n&&(du(n)==="html"||du(n)==="body"&&yc(n).position==="static")?t:n||vve(e)||t}function UI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function i1(e,t,n){return Sh(e,UC(t,n))}function xve(e,t,n){var r=i1(e,t,n);return r>n?n:r}function BX(){return{top:0,right:0,bottom:0,left:0}}function zX(e){return Object.assign({},BX(),e)}function UX(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Sve=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zX(typeof t!="number"?t:UX(t,pv))};function wve(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ou(n.placement),l=UI(a),u=[os,ga].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var f=Sve(i.padding,n),h=zI(o),g=l==="y"?is:os,y=l==="y"?ma:ga,b=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],v=s[l]-n.rects.reference[l],S=mv(o),C=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,w=b/2-v/2,A=f[g],E=C-h[c]-f[y],_=C/2-h[c]/2+w,D=i1(A,_,E),T=l;n.modifiersData[r]=(t={},t[T]=D,t.centerOffset=D-_,t)}}function Cve(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||FX(t.elements.popper,i)&&(t.elements.arrow=i))}const Eve={name:"arrow",enabled:!0,phase:"main",fn:wve,effect:Cve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ag(e){return e.split("-")[1]}var Ave={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kve(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:og(n*i)/i||0,y:og(r*i)/i||0}}function e7(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,h=s.x,g=h===void 0?0:h,y=s.y,b=y===void 0?0:y,v=typeof c=="function"?c({x:g,y:b}):{x:g,y:b};g=v.x,b=v.y;var S=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),w=os,A=is,E=window;if(u){var _=mv(n),D="clientHeight",T="clientWidth";if(_===Ls(n)&&(_=mf(n),yc(_).position!=="static"&&a==="absolute"&&(D="scrollHeight",T="scrollWidth")),_=_,i===is||(i===os||i===ga)&&o===K1){A=ma;var M=f&&_===E&&E.visualViewport?E.visualViewport.height:_[D];b-=M-r.height,b*=l?1:-1}if(i===os||(i===is||i===ma)&&o===K1){w=ga;var L=f&&_===E&&E.visualViewport?E.visualViewport.width:_[T];g-=L-r.width,g*=l?1:-1}}var j=Object.assign({position:a},u&&Ave),I=c===!0?kve({x:g,y:b},Ls(n)):{x:g,y:b};if(g=I.x,b=I.y,l){var N;return Object.assign({},j,(N={},N[A]=C?"0":"",N[w]=S?"0":"",N.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",N))}return Object.assign({},j,(t={},t[A]=C?b+"px":"",t[w]=S?g+"px":"",t.transform="",t))}function _ve(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:ou(t.placement),variation:ag(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,e7(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,e7(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Dve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_ve,data:{}};var C2={passive:!0};function Ove(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Ls(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,C2)}),a&&l.addEventListener("resize",n.update,C2),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,C2)}),a&&l.removeEventListener("resize",n.update,C2)}}const Tve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ove,data:{}};var Rve={left:"right",right:"left",bottom:"top",top:"bottom"};function Pw(e){return e.replace(/left|right|bottom|top/g,function(t){return Rve[t]})}var Ive={start:"end",end:"start"};function t7(e){return e.replace(/start|end/g,function(t){return Ive[t]})}function HI(e){var t=Ls(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function VI(e){return sg(mf(e)).left+HI(e).scrollLeft}function Mve(e,t){var n=Ls(e),r=mf(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=LX();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+VI(e),y:l}}function Pve(e){var t,n=mf(e),r=HI(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Sh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Sh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+VI(e),l=-r.scrollTop;return yc(i||n).direction==="rtl"&&(a+=Sh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function WI(e){var t=yc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function HX(e){return["html","body","#document"].indexOf(du(e))>=0?e.ownerDocument.body:ca(e)&&WI(e)?e:HX(r3(e))}function o1(e,t){var n;t===void 0&&(t=[]);var r=HX(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ls(r),s=i?[o].concat(o.visualViewport||[],WI(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(o1(r3(s)))}function TT(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jve(e,t){var n=sg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function n7(e,t,n){return t===$X?TT(Mve(e,n)):Th(t)?jve(t,n):TT(Pve(mf(e)))}function $ve(e){var t=o1(r3(e)),n=["absolute","fixed"].indexOf(yc(e).position)>=0,r=n&&ca(e)?mv(e):e;return Th(r)?t.filter(function(i){return Th(i)&&FX(i,r)&&du(i)!=="body"}):[]}function Nve(e,t,n,r){var i=t==="clippingParents"?$ve(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=n7(e,u,r);return l.top=Sh(c.top,l.top),l.right=UC(c.right,l.right),l.bottom=UC(c.bottom,l.bottom),l.left=Sh(c.left,l.left),l},n7(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function VX(e){var t=e.reference,n=e.element,r=e.placement,i=r?ou(r):null,o=r?ag(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case is:l={x:s,y:t.y-n.height};break;case ma:l={x:s,y:t.y+t.height};break;case ga:l={x:t.x+t.width,y:a};break;case os:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?UI(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ig:l[u]=l[u]-(t[c]/2-n[c]/2);break;case K1:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function Y1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?rve:a,u=n.rootBoundary,c=u===void 0?$X:u,f=n.elementContext,h=f===void 0?uy:f,g=n.altBoundary,y=g===void 0?!1:g,b=n.padding,v=b===void 0?0:b,S=zX(typeof v!="number"?v:UX(v,pv)),C=h===uy?ive:uy,w=e.rects.popper,A=e.elements[y?C:h],E=Nve(Th(A)?A:A.contextElement||mf(e.elements.popper),l,c,s),_=sg(e.elements.reference),D=VX({reference:_,element:w,placement:i}),T=TT(Object.assign({},w,D)),M=h===uy?T:_,L={top:E.top-M.top+S.top,bottom:M.bottom-E.bottom+S.bottom,left:E.left-M.left+S.left,right:M.right-E.right+S.right},j=e.modifiersData.offset;if(h===uy&&j){var I=j[i];Object.keys(L).forEach(function(N){var $=[ga,ma].indexOf(N)>=0?1:-1,z=[is,ma].indexOf(N)>=0?"y":"x";L[N]+=I[z]*$})}return L}function Lve(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?NX:l,c=ag(r),f=c?a?QF:QF.filter(function(y){return ag(y)===c}):pv,h=f.filter(function(y){return u.indexOf(y)>=0});h.length===0&&(h=f);var g=h.reduce(function(y,b){return y[b]=Y1(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[ou(b)],y},{});return Object.keys(g).sort(function(y,b){return g[y]-g[b]})}function Fve(e){if(ou(e)===FI)return[];var t=Pw(e);return[t7(e),t,t7(t)]}function Bve(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,b=n.allowedAutoPlacements,v=t.options.placement,S=ou(v),C=S===v,w=l||(C||!y?[Pw(v)]:Fve(v)),A=[v].concat(w).reduce(function(U,K){return U.concat(ou(K)===FI?Lve(t,{placement:K,boundary:c,rootBoundary:f,padding:u,flipVariations:y,allowedAutoPlacements:b}):K)},[]),E=t.rects.reference,_=t.rects.popper,D=new Map,T=!0,M=A[0],L=0;L<A.length;L++){var j=A[L],I=ou(j),N=ag(j)===ig,$=[is,ma].indexOf(I)>=0,z=$?"width":"height",F=Y1(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:h,padding:u}),G=$?N?ga:os:N?ma:is;E[z]>_[z]&&(G=Pw(G));var V=Pw(G),H=[];if(o&&H.push(F[I]<=0),a&&H.push(F[G]<=0,F[V]<=0),H.every(function(U){return U})){M=j,T=!1;break}D.set(j,H)}if(T)for(var X=y?3:1,B=function(K){var Z=A.find(function(J){var Q=D.get(J);if(Q)return Q.slice(0,K).every(function(ie){return ie})});if(Z)return M=Z,"break"},W=X;W>0;W--){var Y=B(W);if(Y==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const zve={name:"flip",enabled:!0,phase:"main",fn:Bve,requiresIfExists:["offset"],data:{_skip:!1}};function r7(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function i7(e){return[is,ga,ma,os].some(function(t){return e[t]>=0})}function Uve(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Y1(t,{elementContext:"reference"}),a=Y1(t,{altBoundary:!0}),l=r7(s,r),u=r7(a,i,o),c=i7(l),f=i7(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const Hve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Uve};function Vve(e,t,n){var r=ou(e),i=[os,is].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[os,ga].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Wve(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=NX.reduce(function(c,f){return c[f]=Vve(f,t.rects,o),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const qve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Wve};function Gve(e){var t=e.state,n=e.name;t.modifiersData[n]=VX({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Kve={name:"popperOffsets",enabled:!0,phase:"read",fn:Gve,data:{}};function Yve(e){return e==="x"?"y":"x"}function Xve(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,g=h===void 0?!0:h,y=n.tetherOffset,b=y===void 0?0:y,v=Y1(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),S=ou(t.placement),C=ag(t.placement),w=!C,A=UI(S),E=Yve(A),_=t.modifiersData.popperOffsets,D=t.rects.reference,T=t.rects.popper,M=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,L=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(_){if(o){var N,$=A==="y"?is:os,z=A==="y"?ma:ga,F=A==="y"?"height":"width",G=_[A],V=G+v[$],H=G-v[z],X=g?-T[F]/2:0,B=C===ig?D[F]:T[F],W=C===ig?-T[F]:-D[F],Y=t.elements.arrow,U=g&&Y?zI(Y):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:BX(),Z=K[$],J=K[z],Q=i1(0,D[F],U[F]),ie=w?D[F]/2-X-Q-Z-L.mainAxis:B-Q-Z-L.mainAxis,le=w?-D[F]/2+X+Q+J+L.mainAxis:W+Q+J+L.mainAxis,te=t.elements.arrow&&mv(t.elements.arrow),ne=te?A==="y"?te.clientTop||0:te.clientLeft||0:0,oe=(N=j?.[A])!=null?N:0,ue=G+ie-oe-ne,pe=G+le-oe,we=i1(g?UC(V,ue):V,G,g?Sh(H,pe):H);_[A]=we,I[A]=we-G}if(a){var ke,Ae=A==="x"?is:os,Fe=A==="x"?ma:ga,Me=_[E],st=E==="y"?"height":"width",Ge=Me+v[Ae],Mt=Me-v[Fe],pt=[is,os].indexOf(S)!==-1,Be=(ke=j?.[E])!=null?ke:0,Ie=pt?Ge:Me-D[st]-T[st]-Be+L.altAxis,ze=pt?Me+D[st]+T[st]-Be-L.altAxis:Mt,Je=g&&pt?xve(Ie,Me,ze):i1(g?Ie:Ge,Me,g?ze:Mt);_[E]=Je,I[E]=Je-Me}t.modifiersData[r]=I}}const Jve={name:"preventOverflow",enabled:!0,phase:"main",fn:Xve,requiresIfExists:["offset"]};function Qve(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zve(e){return e===Ls(e)||!ca(e)?HI(e):Qve(e)}function exe(e){var t=e.getBoundingClientRect(),n=og(t.width)/e.offsetWidth||1,r=og(t.height)/e.offsetHeight||1;return n!==1||r!==1}function txe(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&exe(t),o=mf(t),s=sg(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((du(t)!=="body"||WI(o))&&(a=Zve(t)),ca(t)?(l=sg(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=VI(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function nxe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function rxe(e){var t=nxe(e);return pve.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ixe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function oxe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var o7={placement:"bottom",modifiers:[],strategy:"absolute"};function s7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function sxe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?o7:i;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},o7,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],h=!1,g={state:c,setOptions:function(S){var C=typeof S=="function"?S(c.options):S;b(),c.options=Object.assign({},o,c.options,C),c.scrollParents={reference:Th(a)?o1(a):a.contextElement?o1(a.contextElement):[],popper:o1(l)};var w=rxe(oxe([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(A){return A.enabled}),y(),g.update()},forceUpdate:function(){if(!h){var S=c.elements,C=S.reference,w=S.popper;if(s7(C,w)){c.rects={reference:txe(C,mv(w),c.options.strategy==="fixed"),popper:zI(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var A=0;A<c.orderedModifiers.length;A++){if(c.reset===!0){c.reset=!1,A=-1;continue}var E=c.orderedModifiers[A],_=E.fn,D=E.options,T=D===void 0?{}:D,M=E.name;typeof _=="function"&&(c=_({state:c,options:T,name:M,instance:g})||c)}}}},update:ixe(function(){return new Promise(function(v){g.forceUpdate(),v(c)})}),destroy:function(){b(),h=!0}};if(!s7(a,l))return g;g.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function y(){c.orderedModifiers.forEach(function(v){var S=v.name,C=v.options,w=C===void 0?{}:C,A=v.effect;if(typeof A=="function"){var E=A({state:c,name:S,instance:g,options:w}),_=function(){};f.push(E||_)}})}function b(){f.forEach(function(v){return v()}),f=[]}return g}}var axe=[Tve,Kve,Dve,yve,qve,zve,Jve,Eve,Hve],lxe=sxe({defaultModifiers:axe});function Kr(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,s=i?{}:_C(n,r),{props:a,internalRef:l}=iX({...o,externalSlotProps:s}),u=Tr(l,s?.ref,e.additionalProps?.ref);return rX(t,{...a,ref:u},r)}function uxe(e){return typeof e=="function"?e():e}const WX=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=O.useState(null),l=Tr(O.isValidElement(r)?hf(r):null,n);if(zo(()=>{o||a(uxe(i)||document.body)},[i,o]),zo(()=>{if(s&&!o)return pT(n,s),()=>{pT(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const u={ref:l};return O.cloneElement(r,u)}return r}return s&&_d.createPortal(r,s)});function cxe(e){return Qe("MuiPopper",e)}tt("MuiPopper",["root"]);function dxe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function RT(e){return typeof e=="function"?e():e}function fxe(e){return e.nodeType!==void 0}const hxe=e=>{const{classes:t}=e;return Ze({root:["root"]},cxe,t)},pxe={},mxe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:c,popperRef:f,slotProps:h={},slots:g={},TransitionProps:y,ownerState:b,...v}=t,S=O.useRef(null),C=Tr(S,n),w=O.useRef(null),A=Tr(w,f),E=O.useRef(A);zo(()=>{E.current=A},[A]),O.useImperativeHandle(f,()=>w.current,[]);const _=dxe(u,o),[D,T]=O.useState(_),[M,L]=O.useState(RT(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&L(RT(r))},[r]),zo(()=>{if(!M||!l)return;const z=V=>{T(V.placement)};let F=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{z(V)}}];a!=null&&(F=F.concat(a)),c&&c.modifiers!=null&&(F=F.concat(c.modifiers));const G=lxe(M,S.current,{placement:_,...c,modifiers:F});return E.current(G),()=>{G.destroy(),E.current(null)}},[M,s,a,l,c,_]);const j={placement:D};y!==null&&(j.TransitionProps=y);const I=hxe(t),N=g.root??"div",$=Kr({elementType:N,externalSlotProps:h.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:C},ownerState:t,className:I.root});return m.jsx(N,{...$,children:typeof i=="function"?i(j):i})}),gxe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:c,placement:f="bottom",popperOptions:h=pxe,popperRef:g,style:y,transition:b=!1,slotProps:v={},slots:S={},...C}=t,[w,A]=O.useState(!0),E=()=>{A(!1)},_=()=>{A(!0)};if(!l&&!c&&(!b||w))return null;let D;if(o)D=o;else if(r){const L=RT(r);D=L&&fxe(L)?_i(L).body:_i(null).body}const T=!c&&l&&(!b||w)?"none":void 0,M=b?{in:c,onEnter:E,onExited:_}:void 0;return m.jsx(WX,{disablePortal:a,container:D,children:m.jsx(mxe,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:b?!w:c,placement:f,popperOptions:h,popperRef:g,slotProps:v,slots:S,...C,style:{position:"fixed",top:0,left:0,display:T,...y},TransitionProps:M,children:i})})}),yxe=me(gxe,{name:"MuiPopper",slot:"Root"})({}),i3=O.forwardRef(function(t,n){const r=ff(),i=it({props:t,name:"MuiPopper"}),{anchorEl:o,component:s,components:a,componentsProps:l,container:u,disablePortal:c,keepMounted:f,modifiers:h,open:g,placement:y,popperOptions:b,popperRef:v,transition:S,slots:C,slotProps:w,...A}=i,E=C?.root??a?.Root,_={anchorEl:o,container:u,disablePortal:c,keepMounted:f,modifiers:h,open:g,placement:y,popperOptions:b,popperRef:v,transition:S,...A};return m.jsx(yxe,{as:s,direction:r?"rtl":"ltr",slots:{root:E},slotProps:w??l,..._,ref:n})});function bxe(e){return Qe("MuiTooltip",e)}const si=tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function vxe(e){return Math.round(e*1e5)/1e5}const xxe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${ye(o.split("-")[0])}`],arrow:["arrow"]};return Ze(s,bxe,t)},Sxe=me(i3,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(qe(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${si.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${si.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${si.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${si.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${si.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${si.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${si.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${si.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),wxe=me("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ye(n.placement.split("-")[0])}`]]}})(qe(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${si.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${si.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${si.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${si.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${vxe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${si.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${si.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Cxe=me("span",{name:"MuiTooltip",slot:"Arrow"})(qe(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let E2=!1;const a7=new GA;let cy={x:0,y:0};function A2(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const bn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:s,components:a={},componentsProps:l={},describeChild:u=!1,disableFocusListener:c=!1,disableHoverListener:f=!1,disableInteractive:h=!1,disableTouchListener:g=!1,enterDelay:y=100,enterNextDelay:b=0,enterTouchDelay:v=700,followCursor:S=!1,id:C,leaveDelay:w=0,leaveTouchDelay:A=1500,onClose:E,onOpen:_,open:D,placement:T="bottom",PopperComponent:M,PopperProps:L={},slotProps:j={},slots:I={},title:N,TransitionComponent:$,TransitionProps:z,...F}=r,G=O.isValidElement(o)?o:m.jsx("span",{children:o}),V=ka(),H=ff(),[X,B]=O.useState(),[W,Y]=O.useState(null),U=O.useRef(!1),K=h||S,Z=Dd(),J=Dd(),Q=Dd(),ie=Dd(),[le,te]=Ga({controlled:D,default:!1,name:"Tooltip",state:"open"});let ne=le;const oe=Oc(C),ue=O.useRef(),pe=Li(()=>{ue.current!==void 0&&(document.body.style.WebkitUserSelect=ue.current,ue.current=void 0),ie.clear()});O.useEffect(()=>pe,[pe]);const we=xt=>{a7.clear(),E2=!0,te(!0),_&&!ne&&_(xt)},ke=Li(xt=>{a7.start(800+w,()=>{E2=!1}),te(!1),E&&ne&&E(xt),Z.start(V.transitions.duration.shortest,()=>{U.current=!1})}),Ae=xt=>{U.current&&xt.type!=="touchstart"||(X&&X.removeAttribute("title"),J.clear(),Q.clear(),y||E2&&b?J.start(E2?b:y,()=>{we(xt)}):we(xt))},Fe=xt=>{J.clear(),Q.start(w,()=>{ke(xt)})},[,Me]=O.useState(!1),st=xt=>{qd(xt.target)||(Me(!1),Fe(xt))},Ge=xt=>{X||B(xt.currentTarget),qd(xt.target)&&(Me(!0),Ae(xt))},Mt=xt=>{U.current=!0;const pn=G.props;pn.onTouchStart&&pn.onTouchStart(xt)},pt=xt=>{Mt(xt),Q.clear(),Z.clear(),pe(),ue.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ie.start(v,()=>{document.body.style.WebkitUserSelect=ue.current,Ae(xt)})},Be=xt=>{G.props.onTouchEnd&&G.props.onTouchEnd(xt),pe(),Q.start(A,()=>{ke(xt)})};O.useEffect(()=>{if(!ne)return;function xt(pn){pn.key==="Escape"&&ke(pn)}return document.addEventListener("keydown",xt),()=>{document.removeEventListener("keydown",xt)}},[ke,ne]);const Ie=Tr(hf(G),B,n);!N&&N!==0&&(ne=!1);const ze=O.useRef(),Je=xt=>{const pn=G.props;pn.onMouseMove&&pn.onMouseMove(xt),cy={x:xt.clientX,y:xt.clientY},ze.current&&ze.current.update()},nt={},ot=typeof N=="string";u?(nt.title=!ne&&ot&&!f?N:null,nt["aria-describedby"]=ne?oe:null):(nt["aria-label"]=ot?N:null,nt["aria-labelledby"]=ne&&!ot?oe:null);const Ye={...nt,...F,...G.props,className:Oe(F.className,G.props.className),onTouchStart:Mt,ref:Ie,...S?{onMouseMove:Je}:{}},Nt={};g||(Ye.onTouchStart=pt,Ye.onTouchEnd=Be),f||(Ye.onMouseOver=A2(Ae,Ye.onMouseOver),Ye.onMouseLeave=A2(Fe,Ye.onMouseLeave),K||(Nt.onMouseOver=Ae,Nt.onMouseLeave=Fe)),c||(Ye.onFocus=A2(Ge,Ye.onFocus),Ye.onBlur=A2(st,Ye.onBlur),K||(Nt.onFocus=Ge,Nt.onBlur=st));const Lt={...r,isRtl:H,arrow:i,disableInteractive:K,placement:T,PopperComponentProp:M,touch:U.current},_t=typeof j.popper=="function"?j.popper(Lt):j.popper,Xn=O.useMemo(()=>{let xt=[{name:"arrow",enabled:!!W,options:{element:W,padding:4}}];return L.popperOptions?.modifiers&&(xt=xt.concat(L.popperOptions.modifiers)),_t?.popperOptions?.modifiers&&(xt=xt.concat(_t.popperOptions.modifiers)),{...L.popperOptions,..._t?.popperOptions,modifiers:xt}},[W,L.popperOptions,_t?.popperOptions]),rn=xxe(Lt),lt=typeof j.transition=="function"?j.transition(Lt):j.transition,zt={slots:{popper:a.Popper,transition:a.Transition??$,tooltip:a.Tooltip,arrow:a.Arrow,...I},slotProps:{arrow:j.arrow??l.arrow,popper:{...L,..._t??l.popper},tooltip:j.tooltip??l.tooltip,transition:{...z,...lt??l.transition}}},[_n,Gn]=ut("popper",{elementType:Sxe,externalForwardedProps:zt,ownerState:Lt,className:Oe(rn.popper,L?.className)}),[yr,kt]=ut("transition",{elementType:V1,externalForwardedProps:zt,ownerState:Lt}),[Pt,Qt]=ut("tooltip",{elementType:wxe,className:rn.tooltip,externalForwardedProps:zt,ownerState:Lt}),[Pn,on]=ut("arrow",{elementType:Cxe,className:rn.arrow,externalForwardedProps:zt,ownerState:Lt,ref:Y});return m.jsxs(O.Fragment,{children:[O.cloneElement(G,Ye),m.jsx(_n,{as:M??i3,placement:T,anchorEl:S?{getBoundingClientRect:()=>({top:cy.y,left:cy.x,right:cy.x,bottom:cy.y,width:0,height:0})}:X,popperRef:ze,open:X?ne:!1,id:oe,transition:!0,...Nt,...Gn,popperOptions:Xn,children:({TransitionProps:xt})=>m.jsx(yr,{timeout:V.transitions.duration.shorter,...xt,...kt,children:m.jsxs(Pt,{...Qt,children:[N,i?m.jsx(Pn,{...on}):null]})})})]})}),Exe=De(m.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Axe=me(pa,{name:"MuiBreadcrumbCollapsed"})(qe(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:U1(e.palette.grey[200],.12)}:{backgroundColor:U1(e.palette.grey[600],.12)}}}))),kxe=me(Exe)({width:24,height:16});function _xe(e){const{slots:t={},slotProps:n={},...r}=e,i=e;return m.jsx("li",{children:m.jsx(Axe,{focusRipple:!0,...r,ownerState:i,children:m.jsx(kxe,{as:t.CollapsedIcon,ownerState:i,...n.collapsedIcon})})})}function Dxe(e){return Qe("MuiBreadcrumbs",e)}const Oxe=tt("MuiBreadcrumbs",["root","ol","li","separator"]),Txe=e=>{const{classes:t}=e;return Ze({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Dxe,t)},Rxe=me(re,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Oxe.li}`]:t.li},t.root]})({}),Ixe=me("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Mxe=me("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Pxe(e,t,n,r){return e.reduce((i,o,s)=>(s<e.length-1?i=i.concat(o,m.jsx(Mxe,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${s}`)):i.push(o),i),[])}const jxe=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiBreadcrumbs"}),{children:i,className:o,component:s="nav",slots:a={},slotProps:l={},expandText:u="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:f=1,maxItems:h=8,separator:g="/",...y}=r,[b,v]=O.useState(!1),S={...r,component:s,expanded:b,expandText:u,itemsAfterCollapse:c,itemsBeforeCollapse:f,maxItems:h,separator:g},C=Txe(S),w=Kr({elementType:a.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:S}),A=O.useRef(null),E=D=>{const T=()=>{v(!0);const M=A.current.querySelector("a[href],button,[tabindex]");M&&M.focus()};return f+c>=D.length?D:[...D.slice(0,f),m.jsx(_xe,{"aria-label":u,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:T},"ellipsis"),...D.slice(D.length-c,D.length)]},_=O.Children.toArray(i).filter(D=>O.isValidElement(D)).map((D,T)=>m.jsx("li",{className:C.li,children:D},`child-${T}`));return m.jsx(Rxe,{ref:n,component:s,color:"textSecondary",className:Oe(C.root,o),ownerState:S,...y,children:m.jsx(Ixe,{className:C.ol,ref:A,ownerState:S,children:Pxe(b||h&&_.length<=h?_:E(_),C.separator,g,S)})})});function $xe(e){return Qe("MuiLink",e)}const Nxe=tt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Lxe=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const o=Il(e,`palette.${n}.main`)||Il(e,`palette.${n}`)||t.color;return e.alpha(o,.4)}const r=Il(e,`palette.${n}.main`,!1)||Il(e,`palette.${n}`,!1)||t.color,i=Il(e,`palette.${n}.mainChannel`)||Il(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Ul(r,.4)},l7={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Fxe=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${ye(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Ze(o,$xe,t)},Bxe=me(re,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ye(n.underline)}`],n.component==="button"&&t.button]}})(qe(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Nxe.focusVisible}`]:{outline:"auto"}}}]}))),o3=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiLink"}),i=ka(),{className:o,color:s="primary",component:a="a",onBlur:l,onFocus:u,TypographyClasses:c,underline:f="always",variant:h="inherit",sx:g,...y}=r,[b,v]=O.useState(!1),S=E=>{qd(E.target)||v(!1),l&&l(E)},C=E=>{qd(E.target)&&v(!0),u&&u(E)},w={...r,color:s,component:a,focusVisible:b,underline:f,variant:h},A=Fxe(w);return m.jsx(Bxe,{color:s,className:Oe(A.root,o),classes:c,component:a,onBlur:S,onFocus:C,ref:n,ownerState:w,variant:h,...y,sx:[...l7[s]===void 0?[{color:s}]:[],...Array.isArray(g)?g:[g]],style:{...y.style,...f==="always"&&s!=="inherit"&&!l7[s]&&{"--Link-underlineColor":Lxe({theme:i,ownerState:w})}}})}),zxe=({name:e,to:t})=>m.jsx(o3,{color:"inherit",underline:"hover",component:Dc,to:t,children:e}),s3=({items:e})=>m.jsx(jxe,{separator:"›",children:e.map((t,n)=>m.jsx(zxe,{...t},n.toString()))}),bc=De(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),wh=De(m.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),ss=De(m.jsx("path",{d:"M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z"})),a3=De(m.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),qX=De(m.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),l3=De(m.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"})),qI=De(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),jw=De(m.jsx("path",{d:"M15 21h-2v-2h2zm-2-7h-2v5h2zm8-2h-2v4h2zm-2-2h-2v2h2zM7 12H5v2h2zm-2-2H3v2h2zm7-5h2V3h-2zm-7.5-.5v3h3v-3zM9 9H3V3h6zm-4.5 7.5v3h3v-3zM9 21H3v-6h6zm7.5-16.5v3h3v-3zM21 9h-6V3h6zm-2 10v-3h-4v2h2v3h4v-2zm-2-7h-4v2h4zm-4-2H7v2h2v2h2v-2h2zm1-1V7h-2V5h-2v4zM6.75 5.25h-1.5v1.5h1.5zm0 12h-1.5v1.5h1.5zm12-12h-1.5v1.5h1.5z"})),GX=De(m.jsx("path",{d:"M19 13H5v-2h14z"})),u3=De(m.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"})),Kd=De([m.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),m.jsx("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")]),KX=De(m.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"})),Uxe=De(m.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function Hxe(e){return Qe("MuiAvatar",e)}tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Vxe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ze({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Hxe,t)},Wxe=me("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(qe(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),qxe=me("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Gxe=me(Uxe,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function Kxe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=O.useState(!1);return O.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const a=new Image;return a.onload=()=>{s&&o("loaded")},a.onerror=()=>{s&&o("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const rl=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:a="div",slots:l={},slotProps:u={},imgProps:c,sizes:f,src:h,srcSet:g,variant:y="circular",...b}=r;let v=null;const S={...r,component:a,variant:y},C=Kxe({...c,...typeof u.img=="function"?u.img(S):u.img,src:h,srcSet:g}),w=h||g,A=w&&C!=="error";S.colorDefault=!A,delete S.ownerState;const E=Vxe(S),[_,D]=ut("root",{ref:n,className:Oe(E.root,s),elementType:Wxe,externalForwardedProps:{slots:l,slotProps:u,component:a,...b},ownerState:S}),[T,M]=ut("img",{className:E.img,elementType:qxe,externalForwardedProps:{slots:l,slotProps:{img:{...c,...u.img}}},additionalProps:{alt:i,src:h,srcSet:g,sizes:f},ownerState:S}),[L,j]=ut("fallback",{className:E.fallback,elementType:Gxe,externalForwardedProps:{slots:l,slotProps:u},shouldForwardComponentProp:!0,ownerState:S});return A?v=m.jsx(T,{...M}):o||o===0?v=o:w&&i?v=i[0]:v=m.jsx(L,{...j}),m.jsx(_,{...D,children:v})});function Yxe(e){return Qe("MuiCard",e)}tt("MuiCard",["root"]);const Xxe=e=>{const{classes:t}=e;return Ze({root:["root"]},Yxe,t)},Jxe=me(Nr,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),er=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=Xxe(a);return m.jsx(Jxe,{className:Oe(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function Qxe(e){return Qe("MuiCardContent",e)}tt("MuiCardContent",["root"]);const Zxe=e=>{const{classes:t}=e;return Ze({root:["root"]},Qxe,t)},e2e=me("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),gr=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=Zxe(a);return m.jsx(e2e,{as:o,className:Oe(l.root,i),ownerState:a,ref:n,...s})}),t2e=De(m.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 n2e(e){return Qe("MuiChip",e)}const Cn=tt("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"]),r2e=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,u={root:["root",l,n&&"disabled",`size${ye(r)}`,`color${ye(i)}`,a&&"clickable",a&&`clickableColor${ye(i)}`,s&&"deletable",s&&`deletableColor${ye(i)}`,`${l}${ye(i)}`],label:["label",`label${ye(r)}`],avatar:["avatar",`avatar${ye(r)}`,`avatarColor${ye(i)}`],icon:["icon",`icon${ye(r)}`,`iconColor${ye(o)}`],deleteIcon:["deleteIcon",`deleteIcon${ye(r)}`,`deleteIconColor${ye(i)}`,`deleteIcon${ye(l)}Color${ye(i)}`]};return Ze(u,n2e,t)},i2e=me("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[{[`& .${Cn.avatar}`]:t.avatar},{[`& .${Cn.avatar}`]:t[`avatar${ye(a)}`]},{[`& .${Cn.avatar}`]:t[`avatarColor${ye(r)}`]},{[`& .${Cn.icon}`]:t.icon},{[`& .${Cn.icon}`]:t[`icon${ye(a)}`]},{[`& .${Cn.icon}`]:t[`iconColor${ye(i)}`]},{[`& .${Cn.deleteIcon}`]:t.deleteIcon},{[`& .${Cn.deleteIcon}`]:t[`deleteIcon${ye(a)}`]},{[`& .${Cn.deleteIcon}`]:t[`deleteIconColor${ye(r)}`]},{[`& .${Cn.deleteIcon}`]:t[`deleteIcon${ye(l)}Color${ye(r)}`]},t.root,t[`size${ye(a)}`],t[`color${ye(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${ye(r)}`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ye(r)}`],t[l],t[`${l}${ye(r)}`]]}})(qe(({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",[`&.${Cn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Cn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Cn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Cn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Cn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Cn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Cn.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,[`& .${Cn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Cn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Ln(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Cn.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:{[`& .${Cn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Cn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Cn.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(Ln(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Cn.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}`)},[`&.${Cn.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(Ln(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Cn.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]}`,[`&.${Cn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Cn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Cn.avatar}`]:{marginLeft:4},[`& .${Cn.avatarSmall}`]:{marginLeft:2},[`& .${Cn.icon}`]:{marginLeft:4},[`& .${Cn.iconSmall}`]:{marginLeft:2},[`& .${Cn.deleteIcon}`]:{marginRight:5},[`& .${Cn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Ln()).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)}`,[`&.${Cn.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Cn.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Cn.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),o2e=me("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ye(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 u7(e){return e.key==="Backspace"||e.key==="Delete"}const Et=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:c=!1,icon:f,label:h,onClick:g,onDelete:y,onKeyDown:b,onKeyUp:v,size:S="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:A=!1,slots:E={},slotProps:_={},...D}=r,T=O.useRef(null),M=Tr(T,n),L=Z=>{Z.stopPropagation(),y(Z)},j=Z=>{Z.currentTarget===Z.target&&u7(Z)&&Z.preventDefault(),b&&b(Z)},I=Z=>{Z.currentTarget===Z.target&&y&&u7(Z)&&y(Z),v&&v(Z)},N=s!==!1&&g?!0:s,$=N||y?pa:l||"div",z={...r,component:$,disabled:c,size:S,color:a,iconColor:O.isValidElement(f)&&f.props.color||a,onDelete:!!y,clickable:N,variant:C},F=r2e(z),G=$===pa?{component:l||"div",focusVisibleClassName:F.focusVisible,...y&&{disableRipple:!0}}:{};let V=null;y&&(V=u&&O.isValidElement(u)?O.cloneElement(u,{className:Oe(u.props.className,F.deleteIcon),onClick:L}):m.jsx(t2e,{className:F.deleteIcon,onClick:L}));let H=null;i&&O.isValidElement(i)&&(H=O.cloneElement(i,{className:Oe(F.avatar,i.props.className)}));let X=null;f&&O.isValidElement(f)&&(X=O.cloneElement(f,{className:Oe(F.icon,f.props.className)}));const B={slots:E,slotProps:_},[W,Y]=ut("root",{elementType:i2e,externalForwardedProps:{...B,...D},ownerState:z,shouldForwardComponentProp:!0,ref:M,className:Oe(F.root,o),additionalProps:{disabled:N&&c?!0:void 0,tabIndex:A&&c?-1:w,...G},getSlotProps:Z=>({...Z,onClick:J=>{Z.onClick?.(J),g?.(J)},onKeyDown:J=>{Z.onKeyDown?.(J),j(J)},onKeyUp:J=>{Z.onKeyUp?.(J),I(J)}})}),[U,K]=ut("label",{elementType:o2e,externalForwardedProps:B,ownerState:z,className:F.label});return m.jsxs(W,{as:$,...Y,children:[H||X,m.jsx(U,{...K,children:h}),V]})});function YX(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function s2e(e){const t=_i(e);return t.body===e?tl(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function s1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function c7(e){return parseFloat(tl(e).getComputedStyle(e).paddingRight)||0}function a2e(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function d7(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=!o.includes(s),l=!a2e(s);a&&l&&s1(s,i)})}function k4(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function l2e(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(s2e(r)){const s=YX(tl(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${c7(r)+s}px`;const a=_i(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${c7(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=_i(r).body;else{const s=r.parentElement,a=tl(r);o=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function u2e(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class c2e{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&s1(t.modalRef,!1);const i=u2e(n);d7(n,t.mount,t.modalRef,i,!0);const o=k4(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=k4(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=l2e(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=k4(this.containers,s=>s.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&s1(t.modalRef,n),d7(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&s1(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Fy(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const d2e=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function f2e(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function h2e(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function p2e(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||h2e(e))}function m2e(e){const t=[],n=[];return Array.from(e.querySelectorAll(d2e)).forEach((r,i)=>{const o=f2e(r);o===-1||!p2e(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function g2e(){return!0}function y2e(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=m2e,isEnabled:s=g2e,open:a}=e,l=O.useRef(!1),u=O.useRef(null),c=O.useRef(null),f=O.useRef(null),h=O.useRef(null),g=O.useRef(!1),y=O.useRef(null),b=Tr(hf(t),y),v=O.useRef(null);O.useEffect(()=>{!a||!y.current||(g.current=!n)},[n,a]),O.useEffect(()=>{if(!a||!y.current)return;const w=_i(y.current),A=Fy(w);return y.current.contains(A)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),g.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),O.useEffect(()=>{if(!a||!y.current)return;const w=_i(y.current),A=D=>{if(v.current=D,r||!s()||D.key!=="Tab")return;Fy(w)===y.current&&D.shiftKey&&(l.current=!0,c.current&&c.current.focus())},E=()=>{const D=y.current;if(D===null)return;const T=Fy(w);if(!w.hasFocus()||!s()||l.current){l.current=!1;return}if(D.contains(T)||r&&T!==u.current&&T!==c.current)return;if(T!==h.current)h.current=null;else if(h.current!==null)return;if(!g.current)return;let M=[];if((T===u.current||T===c.current)&&(M=o(y.current)),M.length>0){const L=!!(v.current?.shiftKey&&v.current?.key==="Tab"),j=M[0],I=M[M.length-1];typeof j!="string"&&typeof I!="string"&&(L?I.focus():j.focus())}else D.focus()};w.addEventListener("focusin",E),w.addEventListener("keydown",A,!0);const _=setInterval(()=>{const D=Fy(w);D&&D.tagName==="BODY"&&E()},50);return()=>{clearInterval(_),w.removeEventListener("focusin",E),w.removeEventListener("keydown",A,!0)}},[n,r,i,s,a,o]);const S=w=>{f.current===null&&(f.current=w.relatedTarget),g.current=!0,h.current=w.target;const A=t.props.onFocus;A&&A(w)},C=w=>{f.current===null&&(f.current=w.relatedTarget),g.current=!0};return m.jsxs(O.Fragment,{children:[m.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:b,onFocus:S}),m.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:c,"data-testid":"sentinelEnd"})]})}const b2e={entering:{opacity:1},entered:{opacity:1}},IT=O.forwardRef(function(t,n){const r=ka(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:f,onEntering:h,onExit:g,onExited:y,onExiting:b,style:v,timeout:S=i,TransitionComponent:C=_a,...w}=t,A=O.useRef(null),E=Tr(A,hf(a),n),_=$=>z=>{if($){const F=A.current;z===void 0?$(F):$(F,z)}},D=_(h),T=_(($,z)=>{RI($);const F=Gd({style:v,timeout:S,easing:l},{mode:"enter"});$.style.webkitTransition=r.transitions.create("opacity",F),$.style.transition=r.transitions.create("opacity",F),c&&c($,z)}),M=_(f),L=_(b),j=_($=>{const z=Gd({style:v,timeout:S,easing:l},{mode:"exit"});$.style.webkitTransition=r.transitions.create("opacity",z),$.style.transition=r.transitions.create("opacity",z),g&&g($)}),I=_(y),N=$=>{o&&o(A.current,$)};return m.jsx(C,{appear:s,in:u,nodeRef:A,onEnter:T,onEntered:M,onEntering:D,onExit:j,onExited:I,onExiting:L,addEndListener:N,timeout:S,...w,children:($,{ownerState:z,...F})=>O.cloneElement(a,{style:{opacity:0,visibility:$==="exited"&&!u?"hidden":void 0,...b2e[$],...v,...a.props.style},ref:E,...F})})});function v2e(e){return Qe("MuiBackdrop",e)}tt("MuiBackdrop",["root","invisible"]);const x2e=e=>{const{classes:t,invisible:n}=e;return Ze({root:["root",n&&"invisible"]},v2e,t)},S2e=me("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),GI=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:c={},slotProps:f={},slots:h={},TransitionComponent:g,transitionDuration:y,...b}=r,v={...r,component:s,invisible:a},S=x2e(v),C={transition:g,root:u.Root,...h},w={...c,...f},A={component:s,slots:C,slotProps:w},[E,_]=ut("root",{elementType:S2e,externalForwardedProps:A,className:Oe(S.root,o),ownerState:v}),[D,T]=ut("transition",{elementType:IT,externalForwardedProps:A,ownerState:v});return m.jsx(D,{in:l,timeout:y,...b,...T,children:m.jsx(E,{"aria-hidden":!0,..._,ref:n,children:i})})});function w2e(e){return typeof e=="function"?e():e}function C2e(e){return e?e.props.hasOwnProperty("in"):!1}const f7=()=>{},k2=new c2e;function E2e(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:c}=e,f=O.useRef({}),h=O.useRef(null),g=O.useRef(null),y=Tr(g,c),[b,v]=O.useState(!u),S=C2e(a);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const w=()=>_i(h.current),A=()=>(f.current.modalRef=g.current,f.current.mount=h.current,f.current),E=()=>{k2.mount(A(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},_=Li(()=>{const z=w2e(t)||w().body;k2.add(A(),z),g.current&&E()}),D=()=>k2.isTopModal(A()),T=Li(z=>{h.current=z,z&&(u&&D()?E():g.current&&s1(g.current,C))}),M=O.useCallback(()=>{k2.remove(A(),C)},[C]);O.useEffect(()=>()=>{M()},[M]),O.useEffect(()=>{u?_():(!S||!i)&&M()},[u,M,S,i,_]);const L=z=>F=>{z.onKeyDown?.(F),!(F.key!=="Escape"||F.which===229||!D())&&(n||(F.stopPropagation(),l&&l(F,"escapeKeyDown")))},j=z=>F=>{z.onClick?.(F),F.target===F.currentTarget&&l&&l(F,"backdropClick")};return{getRootProps:(z={})=>{const F=Yi(e);delete F.onTransitionEnter,delete F.onTransitionExited;const G={...F,...z};return{role:"presentation",...G,onKeyDown:L(G),ref:y}},getBackdropProps:(z={})=>{const F=z;return{"aria-hidden":!0,...F,onClick:j(F),open:u}},getTransitionProps:()=>{const z=()=>{v(!1),o&&o()},F=()=>{v(!0),s&&s(),i&&M()};return{onEnter:hT(z,a?.props.onEnter??f7),onExited:hT(F,a?.props.onExited??f7)}},rootRef:y,portalRef:T,isTopModal:D,exited:b,hasTransition:S}}function A2e(e){return Qe("MuiModal",e)}tt("MuiModal",["root","hidden","backdrop"]);const k2e=e=>{const{open:t,exited:n,classes:r}=e;return Ze({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},A2e,r)},_2e=me("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qe(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),D2e=me(GI,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),KI=O.forwardRef(function(t,n){const r=it({name:"MuiModal",props:t}),{BackdropComponent:i=D2e,BackdropProps:o,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:c,component:f,components:h={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:v=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:A=!1,keepMounted:E=!1,onClose:_,onTransitionEnter:D,onTransitionExited:T,open:M,slotProps:L={},slots:j={},theme:I,...N}=r,$={...r,closeAfterTransition:l,disableAutoFocus:y,disableEnforceFocus:b,disableEscapeKeyDown:v,disablePortal:S,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:A,keepMounted:E},{getRootProps:z,getBackdropProps:F,getTransitionProps:G,portalRef:V,isTopModal:H,exited:X,hasTransition:B}=E2e({...$,rootRef:n}),W={...$,exited:X},Y=k2e(W),U={};if(u.props.tabIndex===void 0&&(U.tabIndex="-1"),B){const{onEnter:le,onExited:te}=G();U.onEnter=le,U.onExited=te}const K={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...g,...L}},[Z,J]=ut("root",{ref:n,elementType:_2e,externalForwardedProps:{...K,...N,component:f},getSlotProps:z,ownerState:W,className:Oe(a,Y?.root,!W.open&&W.exited&&Y?.hidden)}),[Q,ie]=ut("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:le=>F({...le,onClick:te=>{le?.onClick&&le.onClick(te)}}),className:Oe(o?.className,Y?.backdrop),ownerState:W});return!E&&!M&&(!B||X)?null:m.jsx(WX,{ref:V,container:c,disablePortal:S,children:m.jsxs(Z,{...J,children:[!A&&i?m.jsx(Q,{...ie}):null,m.jsx(y2e,{disableEnforceFocus:b,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:H,open:M,children:O.cloneElement(u,U)})]})})});function O2e(e){return Qe("MuiDialog",e)}const _4=tt("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),XX=O.createContext({}),T2e=me(GI,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),R2e=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],backdrop:["backdrop"],container:["container",`scroll${ye(n)}`],paper:["paper",`paperScroll${ye(n)}`,`paperWidth${ye(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Ze(s,O2e,t)},I2e=me(KI,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),M2e=me("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ye(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),P2e=me(Nr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ye(n.scroll)}`],t[`paperWidth${ye(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(qe(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${_4.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${_4.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${_4.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),vc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialog"}),i=ka(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:f,className:h,disableEscapeKeyDown:g=!1,fullScreen:y=!1,fullWidth:b=!1,maxWidth:v="sm",onClick:S,onClose:C,open:w,PaperComponent:A=Nr,PaperProps:E={},scroll:_="paper",slots:D={},slotProps:T={},TransitionComponent:M=IT,transitionDuration:L=o,TransitionProps:j,...I}=r,N={...r,disableEscapeKeyDown:g,fullScreen:y,fullWidth:b,maxWidth:v,scroll:_},$=R2e(N),z=O.useRef(),F=oe=>{z.current=oe.target===oe.currentTarget},G=oe=>{S&&S(oe),z.current&&(z.current=null,C&&C(oe,"backdropClick"))},V=Oc(a),H=O.useMemo(()=>({titleId:V}),[V]),X={transition:M,...D},B={transition:j,paper:E,backdrop:c,...T},W={slots:X,slotProps:B},[Y,U]=ut("root",{elementType:I2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:Oe($.root,h),ref:n}),[K,Z]=ut("backdrop",{elementType:T2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:$.backdrop}),[J,Q]=ut("paper",{elementType:P2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:Oe($.paper,E.className)}),[ie,le]=ut("container",{elementType:M2e,externalForwardedProps:W,ownerState:N,className:$.container}),[te,ne]=ut("transition",{elementType:IT,externalForwardedProps:W,ownerState:N,additionalProps:{appear:!0,in:w,timeout:L,role:"presentation"}});return m.jsx(Y,{closeAfterTransition:!0,slots:{backdrop:K},slotProps:{backdrop:{transitionDuration:L,as:u,...Z}},disableEscapeKeyDown:g,onClose:C,open:w,onClick:G,...U,...I,children:m.jsx(te,{...ne,children:m.jsx(ie,{onMouseDown:F,...le,children:m.jsx(J,{as:A,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":V,"aria-modal":l,...Q,children:m.jsx(XX.Provider,{value:H,children:f})})})})})});function j2e(e){return Qe("MuiDialogActions",e)}tt("MuiDialogActions",["root","spacing"]);const $2e=e=>{const{classes:t,disableSpacing:n}=e;return Ze({root:["root",!n&&"spacing"]},j2e,t)},N2e=me("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Yd=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1,...s}=r,a={...r,disableSpacing:o},l=$2e(a);return m.jsx(N2e,{className:Oe(l.root,i),ownerState:a,ref:n,...s})});function L2e(e){return Qe("MuiDialogContent",e)}tt("MuiDialogContent",["root","dividers"]);function F2e(e){return Qe("MuiDialogTitle",e)}const B2e=tt("MuiDialogTitle",["root"]),z2e=e=>{const{classes:t,dividers:n}=e;return Ze({root:["root",n&&"dividers"]},L2e,t)},U2e=me("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(qe(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${B2e.root} + &`]:{paddingTop:0}}}]}))),xc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1,...s}=r,a={...r,dividers:o},l=z2e(a);return m.jsx(U2e,{className:Oe(l.root,i),ownerState:a,ref:n,...s})}),H2e=e=>{const{classes:t}=e;return Ze({root:["root"]},F2e,t)},V2e=me(re,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Sc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogTitle"}),{className:i,id:o,...s}=r,a=r,l=H2e(a),{titleId:u=o}=O.useContext(XX);return m.jsx(V2e,{component:"h2",className:Oe(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??u,...s})});function W2e(e){return Qe("MuiDivider",e)}const h7=tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),q2e=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return Ze({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},W2e,r)},G2e=me("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(qe(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),K2e=me("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(qe(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Di=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,orientation:a="horizontal",component:l=o||a==="vertical"?"div":"hr",flexItem:u=!1,light:c=!1,role:f=l!=="hr"?"separator":void 0,textAlign:h="center",variant:g="fullWidth",...y}=r,b={...r,absolute:i,component:l,flexItem:u,light:c,orientation:a,role:f,textAlign:h,variant:g},v=q2e(b);return m.jsx(G2e,{as:l,className:Oe(v.root,s),role:f,ref:n,ownerState:b,"aria-orientation":f==="separator"&&(l!=="hr"||a==="vertical")?a:void 0,...y,children:o?m.jsx(K2e,{className:v.wrapper,ownerState:b,children:o}):null})});Di&&(Di.muiSkipListHighlight=!0);const et=Uge({createStyledComponent:me("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>it({props:e,name:"MuiGrid"}),useTheme:ka});var Y2e=Object.defineProperty,HC=Object.getOwnPropertySymbols,JX=Object.prototype.hasOwnProperty,QX=Object.prototype.propertyIsEnumerable,p7=(e,t,n)=>t in e?Y2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MT=(e,t)=>{for(var n in t||(t={}))JX.call(t,n)&&p7(e,n,t[n]);if(HC)for(var n of HC(t))QX.call(t,n)&&p7(e,n,t[n]);return e},PT=(e,t)=>{var n={};for(var r in e)JX.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&HC)for(var r of HC(e))t.indexOf(r)<0&&QX.call(e,r)&&(n[r]=e[r]);return n};var Rh;(e=>{const t=class En{constructor(l,u,c,f){if(this.version=l,this.errorCorrectionLevel=u,this.modules=[],this.isFunction=[],l<En.MIN_VERSION||l>En.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let h=[];for(let y=0;y<this.size;y++)h.push(!1);for(let y=0;y<this.size;y++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(c);if(this.drawCodewords(g),f==-1){let y=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);const v=this.getPenaltyScore();v<y&&(f=b,y=v),this.applyMask(b)}}i(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(l,u){const c=e.QrSegment.makeSegments(l);return En.encodeSegments(c,u)}static encodeBinary(l,u){const c=e.QrSegment.makeBytes(l);return En.encodeSegments([c],u)}static encodeSegments(l,u,c=1,f=40,h=-1,g=!0){if(!(En.MIN_VERSION<=c&&c<=f&&f<=En.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let y,b;for(y=c;;y++){const w=En.getNumDataCodewords(y,u)*8,A=s.getTotalBits(l,y);if(A<=w){b=A;break}if(y>=f)throw new RangeError("Data too long")}for(const w of[En.Ecc.MEDIUM,En.Ecc.QUARTILE,En.Ecc.HIGH])g&&b<=En.getNumDataCodewords(y,w)*8&&(u=w);let v=[];for(const w of l){n(w.mode.modeBits,4,v),n(w.numChars,w.mode.numCharCountBits(y),v);for(const A of w.getData())v.push(A)}i(v.length==b);const S=En.getNumDataCodewords(y,u)*8;i(v.length<=S),n(0,Math.min(4,S-v.length),v),n(0,(8-v.length%8)%8,v),i(v.length%8==0);for(let w=236;v.length<S;w^=253)n(w,8,v);let C=[];for(;C.length*8<v.length;)C.push(0);return v.forEach((w,A)=>C[A>>>3]|=w<<7-(A&7)),new En(y,u,C,h)}getModule(l,u){return 0<=l&&l<this.size&&0<=u&&u<this.size&&this.modules[u][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),u=l.length;for(let c=0;c<u;c++)for(let f=0;f<u;f++)c==0&&f==0||c==0&&f==u-1||c==u-1&&f==0||this.drawAlignmentPattern(l[c],l[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const u=this.errorCorrectionLevel.formatBits<<3|l;let c=u;for(let h=0;h<10;h++)c=c<<1^(c>>>9)*1335;const f=(u<<10|c)^21522;i(f>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(f,h));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(f,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(f,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(f,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let c=0;c<12;c++)l=l<<1^(l>>>11)*7973;const u=this.version<<12|l;i(u>>>18==0);for(let c=0;c<18;c++){const f=r(u,c),h=this.size-11+c%3,g=Math.floor(c/3);this.setFunctionModule(h,g,f),this.setFunctionModule(g,h,f)}}drawFinderPattern(l,u){for(let c=-4;c<=4;c++)for(let f=-4;f<=4;f++){const h=Math.max(Math.abs(f),Math.abs(c)),g=l+f,y=u+c;0<=g&&g<this.size&&0<=y&&y<this.size&&this.setFunctionModule(g,y,h!=2&&h!=4)}}drawAlignmentPattern(l,u){for(let c=-2;c<=2;c++)for(let f=-2;f<=2;f++)this.setFunctionModule(l+f,u+c,Math.max(Math.abs(f),Math.abs(c))!=1)}setFunctionModule(l,u,c){this.modules[u][l]=c,this.isFunction[u][l]=!0}addEccAndInterleave(l){const u=this.version,c=this.errorCorrectionLevel;if(l.length!=En.getNumDataCodewords(u,c))throw new RangeError("Invalid argument");const f=En.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][u],h=En.ECC_CODEWORDS_PER_BLOCK[c.ordinal][u],g=Math.floor(En.getNumRawDataModules(u)/8),y=f-g%f,b=Math.floor(g/f);let v=[];const S=En.reedSolomonComputeDivisor(h);for(let w=0,A=0;w<f;w++){let E=l.slice(A,A+b-h+(w<y?0:1));A+=E.length;const _=En.reedSolomonComputeRemainder(E,S);w<y&&E.push(0),v.push(E.concat(_))}let C=[];for(let w=0;w<v[0].length;w++)v.forEach((A,E)=>{(w!=b-h||E>=y)&&C.push(A[w])});return i(C.length==g),C}drawCodewords(l){if(l.length!=Math.floor(En.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let u=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let f=0;f<this.size;f++)for(let h=0;h<2;h++){const g=c-h,b=(c+1&2)==0?this.size-1-f:f;!this.isFunction[b][g]&&u<l.length*8&&(this.modules[b][g]=r(l[u>>>3],7-(u&7)),u++)}}i(u==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let u=0;u<this.size;u++)for(let c=0;c<this.size;c++){let f;switch(l){case 0:f=(c+u)%2==0;break;case 1:f=u%2==0;break;case 2:f=c%3==0;break;case 3:f=(c+u)%3==0;break;case 4:f=(Math.floor(c/3)+Math.floor(u/2))%2==0;break;case 5:f=c*u%2+c*u%3==0;break;case 6:f=(c*u%2+c*u%3)%2==0;break;case 7:f=((c+u)%2+c*u%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[u][c]&&f&&(this.modules[u][c]=!this.modules[u][c])}}getPenaltyScore(){let l=0;for(let h=0;h<this.size;h++){let g=!1,y=0,b=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[h][v]==g?(y++,y==5?l+=En.PENALTY_N1:y>5&&l++):(this.finderPenaltyAddHistory(y,b),g||(l+=this.finderPenaltyCountPatterns(b)*En.PENALTY_N3),g=this.modules[h][v],y=1);l+=this.finderPenaltyTerminateAndCount(g,y,b)*En.PENALTY_N3}for(let h=0;h<this.size;h++){let g=!1,y=0,b=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][h]==g?(y++,y==5?l+=En.PENALTY_N1:y>5&&l++):(this.finderPenaltyAddHistory(y,b),g||(l+=this.finderPenaltyCountPatterns(b)*En.PENALTY_N3),g=this.modules[v][h],y=1);l+=this.finderPenaltyTerminateAndCount(g,y,b)*En.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let g=0;g<this.size-1;g++){const y=this.modules[h][g];y==this.modules[h][g+1]&&y==this.modules[h+1][g]&&y==this.modules[h+1][g+1]&&(l+=En.PENALTY_N2)}let u=0;for(const h of this.modules)u=h.reduce((g,y)=>g+(y?1:0),u);const c=this.size*this.size,f=Math.ceil(Math.abs(u*20-c*10)/c)-1;return i(0<=f&&f<=9),l+=f*En.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,u=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let c=[6];for(let f=this.size-7;c.length<l;f-=u)c.splice(1,0,f);return c}}static getNumRawDataModules(l){if(l<En.MIN_VERSION||l>En.MAX_VERSION)throw new RangeError("Version number out of range");let u=(16*l+128)*l+64;if(l>=2){const c=Math.floor(l/7)+2;u-=(25*c-10)*c-55,l>=7&&(u-=36)}return i(208<=u&&u<=29648),u}static getNumDataCodewords(l,u){return Math.floor(En.getNumRawDataModules(l)/8)-En.ECC_CODEWORDS_PER_BLOCK[u.ordinal][l]*En.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let u=[];for(let f=0;f<l-1;f++)u.push(0);u.push(1);let c=1;for(let f=0;f<l;f++){for(let h=0;h<u.length;h++)u[h]=En.reedSolomonMultiply(u[h],c),h+1<u.length&&(u[h]^=u[h+1]);c=En.reedSolomonMultiply(c,2)}return u}static reedSolomonComputeRemainder(l,u){let c=u.map(f=>0);for(const f of l){const h=f^c.shift();c.push(0),u.forEach((g,y)=>c[y]^=En.reedSolomonMultiply(g,h))}return c}static reedSolomonMultiply(l,u){if(l>>>8||u>>>8)throw new RangeError("Byte out of range");let c=0;for(let f=7;f>=0;f--)c=c<<1^(c>>>7)*285,c^=(u>>>f&1)*l;return i(c>>>8==0),c}finderPenaltyCountPatterns(l){const u=l[1];i(u<=this.size*3);const c=u>0&&l[2]==u&&l[3]==u*3&&l[4]==u&&l[5]==u;return(c&&l[0]>=u*4&&l[6]>=u?1:0)+(c&&l[6]>=u*4&&l[0]>=u?1:0)}finderPenaltyTerminateAndCount(l,u,c){return l&&(this.finderPenaltyAddHistory(u,c),u=0),u+=this.size,this.finderPenaltyAddHistory(u,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(l,u){u[0]==0&&(l+=this.size),u.pop(),u.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(a,l,u){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let c=l-1;c>=0;c--)u.push(a>>>c&1)}function r(a,l){return(a>>>l&1)!=0}function i(a){if(!a)throw new Error("Assertion error")}const o=class ri{constructor(l,u,c){if(this.mode=l,this.numChars=u,this.bitData=c,u<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(l){let u=[];for(const c of l)n(c,8,u);return new ri(ri.Mode.BYTE,l.length,u)}static makeNumeric(l){if(!ri.isNumeric(l))throw new RangeError("String contains non-numeric characters");let u=[];for(let c=0;c<l.length;){const f=Math.min(l.length-c,3);n(parseInt(l.substring(c,c+f),10),f*3+1,u),c+=f}return new ri(ri.Mode.NUMERIC,l.length,u)}static makeAlphanumeric(l){if(!ri.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let u=[],c;for(c=0;c+2<=l.length;c+=2){let f=ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c))*45;f+=ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c+1)),n(f,11,u)}return c<l.length&&n(ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c)),6,u),new ri(ri.Mode.ALPHANUMERIC,l.length,u)}static makeSegments(l){return l==""?[]:ri.isNumeric(l)?[ri.makeNumeric(l)]:ri.isAlphanumeric(l)?[ri.makeAlphanumeric(l)]:[ri.makeBytes(ri.toUtf8ByteArray(l))]}static makeEci(l){let u=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,u);else if(l<16384)n(2,2,u),n(l,14,u);else if(l<1e6)n(6,3,u),n(l,21,u);else throw new RangeError("ECI assignment value out of range");return new ri(ri.Mode.ECI,0,u)}static isNumeric(l){return ri.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return ri.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,u){let c=0;for(const f of l){const h=f.mode.numCharCountBits(u);if(f.numChars>=1<<h)return 1/0;c+=4+h+f.bitData.length}return c}static toUtf8ByteArray(l){l=encodeURI(l);let u=[];for(let c=0;c<l.length;c++)l.charAt(c)!="%"?u.push(l.charCodeAt(c)):(u.push(parseInt(l.substring(c+1,c+3),16)),c+=2);return u}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=o;e.QrSegment=o})(Rh||(Rh={}));(e=>{(t=>{const n=class{constructor(i,o){this.ordinal=i,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Rh||(Rh={}));(e=>{(t=>{const n=class{constructor(i,o){this.modeBits=i,this.numBitsCharCount=o}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Rh||(Rh={}));var gm=Rh;var X2e={L:gm.QrCode.Ecc.LOW,M:gm.QrCode.Ecc.MEDIUM,Q:gm.QrCode.Ecc.QUARTILE,H:gm.QrCode.Ecc.HIGH},ZX=128,eJ="L",tJ="#FFFFFF",nJ="#000000",rJ=!1,iJ=1,J2e=4,Q2e=0,Z2e=.1;function oJ(e,t=0){const n=[];return e.forEach(function(r,i){let o=null;r.forEach(function(s,a){if(!s&&o!==null){n.push(`M${o+t} ${i+t}h${a-o}v1H${o+t}z`),o=null;return}if(a===r.length-1){if(!s)return;o===null?n.push(`M${a+t},${i+t} h1v1H${a+t}z`):n.push(`M${o+t},${i+t} h${a+1-o}v1H${o+t}z`);return}s&&o===null&&(o=a)})}),n.join("")}function sJ(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,o)=>o<t.x||o>=t.x+t.w?i:!1))}function eSe(e,t,n,r){if(r==null)return null;const i=e.length+n*2,o=Math.floor(t*Z2e),s=i/t,a=(r.width||o)*s,l=(r.height||o)*s,u=r.x==null?e.length/2-a/2:r.x*s,c=r.y==null?e.length/2-l/2:r.y*s,f=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let y=Math.floor(u),b=Math.floor(c),v=Math.ceil(a+u-y),S=Math.ceil(l+c-b);h={x:y,y:b,w:v,h:S}}const g=r.crossOrigin;return{x:u,y:c,h:l,w:a,excavation:h,opacity:f,crossOrigin:g}}function tSe(e,t){return t!=null?Math.max(Math.floor(t),0):e?J2e:Q2e}function aJ({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:o,size:s,boostLevel:a}){let l=qt.useMemo(()=>{const y=(Array.isArray(e)?e:[e]).reduce((b,v)=>(b.push(...gm.QrSegment.makeSegments(v)),b),[]);return gm.QrCode.encodeSegments(y,X2e[t],n,void 0,void 0,a)},[e,t,n,a]);const{cells:u,margin:c,numCells:f,calculatedImageSettings:h}=qt.useMemo(()=>{let g=l.getModules();const y=tSe(r,i),b=g.length+y*2,v=eSe(g,s,y,o);return{cells:g,margin:y,numCells:b,calculatedImageSettings:v}},[l,s,o,r,i]);return{qrcode:l,margin:c,cells:u,numCells:f,calculatedImageSettings:h}}var nSe=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),rSe=qt.forwardRef(function(t,n){const r=t,{value:i,size:o=ZX,level:s=eJ,bgColor:a=tJ,fgColor:l=nJ,includeMargin:u=rJ,minVersion:c=iJ,boostLevel:f,marginSize:h,imageSettings:g}=r,b=PT(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=b,S=PT(b,["style"]),C=g?.src,w=qt.useRef(null),A=qt.useRef(null),E=qt.useCallback($=>{w.current=$,typeof n=="function"?n($):n&&(n.current=$)},[n]),[_,D]=qt.useState(!1),{margin:T,cells:M,numCells:L,calculatedImageSettings:j}=aJ({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:u,marginSize:h,imageSettings:g,size:o});qt.useEffect(()=>{if(w.current!=null){const $=w.current,z=$.getContext("2d");if(!z)return;let F=M;const G=A.current,V=j!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;V&&j.excavation!=null&&(F=sJ(M,j.excavation));const H=window.devicePixelRatio||1;$.height=$.width=o*H;const X=o/L*H;z.scale(X,X),z.fillStyle=a,z.fillRect(0,0,L,L),z.fillStyle=l,nSe?z.fill(new Path2D(oJ(F,T))):M.forEach(function(B,W){B.forEach(function(Y,U){Y&&z.fillRect(U+T,W+T,1,1)})}),j&&(z.globalAlpha=j.opacity),V&&z.drawImage(G,j.x+T,j.y+T,j.w,j.h)}}),qt.useEffect(()=>{D(!1)},[C]);const I=MT({height:o,width:o},v);let N=null;return C!=null&&(N=qt.createElement("img",{src:C,key:C,style:{display:"none"},onLoad:()=>{D(!0)},ref:A,crossOrigin:j?.crossOrigin})),qt.createElement(qt.Fragment,null,qt.createElement("canvas",MT({style:I,height:o,width:o,ref:E,role:"img"},S)),N)});rSe.displayName="QRCodeCanvas";var YI=qt.forwardRef(function(t,n){const r=t,{value:i,size:o=ZX,level:s=eJ,bgColor:a=tJ,fgColor:l=nJ,includeMargin:u=rJ,minVersion:c=iJ,boostLevel:f,title:h,marginSize:g,imageSettings:y}=r,b=PT(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:S,numCells:C,calculatedImageSettings:w}=aJ({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:u,marginSize:g,imageSettings:y,size:o});let A=S,E=null;y!=null&&w!=null&&(w.excavation!=null&&(A=sJ(S,w.excavation)),E=qt.createElement("image",{href:y.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none",opacity:w.opacity,crossOrigin:w.crossOrigin}));const _=oJ(A,v);return qt.createElement("svg",MT({height:o,width:o,viewBox:`0 0 ${C} ${C}`,ref:n,role:"img"},b),!!h&&qt.createElement("title",null,h),qt.createElement("path",{fill:a,d:`M0,0 h${C}v${C}H0z`,shapeRendering:"crispEdges"}),qt.createElement("path",{fill:l,d:_,shapeRendering:"crispEdges"}),E)});YI.displayName="QRCodeSVG";const iSe=De(m.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"})),lJ=e=>O.createElement("svg",{viewBox:"0 0 250 260",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("g",{fillRule:"evenodd"},O.createElement("path",{d:"m221.503 210.324c-105.235 50.083-170.545 8.18-212.352-17.271-2.587-1.604-6.984.375-3.169 4.757 13.928 16.888 59.573 57.593 119.153 57.593 59.621 0 95.09-32.532 99.527-38.207 4.407-5.627 1.294-8.731-3.16-6.872zm29.555-16.322c-2.826-3.68-17.184-4.366-26.22-3.256-9.05 1.078-22.634 6.609-21.453 9.93.606 1.244 1.843.686 8.06.127 6.234-.622 23.698-2.826 27.337 1.931 3.656 4.79-5.57 27.608-7.255 31.288-1.628 3.68.622 4.629 3.68 2.178 3.016-2.45 8.476-8.795 12.14-17.774 3.639-9.028 5.858-21.622 3.71-24.424z"}),O.createElement("path",{d:"m150.744 108.13c0 13.141.332 24.1-6.31 35.77-5.361 9.489-13.853 15.324-23.341 15.324-12.952 0-20.495-9.868-20.495-24.432 0-28.75 25.76-33.968 50.146-33.968zm34.015 82.216c-2.23 1.992-5.456 2.135-7.97.806-11.196-9.298-13.189-13.615-19.356-22.487-18.502 18.882-31.596 24.527-55.601 24.527-28.37 0-50.478-17.506-50.478-52.565 0-27.373 14.85-46.018 35.96-55.126 18.313-8.066 43.884-9.489 63.43-11.718v-4.365c0-8.018.616-17.506-4.08-24.432-4.128-6.215-12.003-8.777-18.93-8.777-12.856 0-24.337 6.594-27.136 20.257-.57 3.037-2.799 6.026-5.835 6.168l-32.735-3.51c-2.751-.618-5.787-2.847-5.028-7.07 7.543-39.66 43.36-51.616 75.43-51.616 16.415 0 37.858 4.365 50.81 16.795 16.415 15.323 14.849 35.77 14.849 58.02v52.565c0 15.798 6.547 22.724 12.714 31.264 2.182 3.036 2.657 6.69-.095 8.966-6.879 5.74-19.119 16.415-25.855 22.393l-.095-.095"}),O.createElement("path",{d:"m221.503 210.324c-105.235 50.083-170.545 8.18-212.352-17.271-2.587-1.604-6.984.375-3.169 4.757 13.928 16.888 59.573 57.593 119.153 57.593 59.621 0 95.09-32.532 99.527-38.207 4.407-5.627 1.294-8.731-3.16-6.872zm29.555-16.322c-2.826-3.68-17.184-4.366-26.22-3.256-9.05 1.078-22.634 6.609-21.453 9.93.606 1.244 1.843.686 8.06.127 6.234-.622 23.698-2.826 27.337 1.931 3.656 4.79-5.57 27.608-7.255 31.288-1.628 3.68.622 4.629 3.68 2.178 3.016-2.45 8.476-8.795 12.14-17.774 3.639-9.028 5.858-21.622 3.71-24.424z"}),O.createElement("path",{d:"m150.744 108.13c0 13.141.332 24.1-6.31 35.77-5.361 9.489-13.853 15.324-23.341 15.324-12.952 0-20.495-9.868-20.495-24.432 0-28.75 25.76-33.968 50.146-33.968zm34.015 82.216c-2.23 1.992-5.456 2.135-7.97.806-11.196-9.298-13.189-13.615-19.356-22.487-18.502 18.882-31.596 24.527-55.601 24.527-28.37 0-50.478-17.506-50.478-52.565 0-27.373 14.85-46.018 35.96-55.126 18.313-8.066 43.884-9.489 63.43-11.718v-4.365c0-8.018.616-17.506-4.08-24.432-4.128-6.215-12.003-8.777-18.93-8.777-12.856 0-24.337 6.594-27.136 20.257-.57 3.037-2.799 6.026-5.835 6.168l-32.735-3.51c-2.751-.618-5.787-2.847-5.028-7.07 7.543-39.66 43.36-51.616 75.43-51.616 16.415 0 37.858 4.365 50.81 16.795 16.415 15.323 14.849 35.77 14.849 58.02v52.565c0 15.798 6.547 22.724 12.714 31.264 2.182 3.036 2.657 6.69-.095 8.966-6.879 5.74-19.119 16.415-25.855 22.393l-.095-.095"}))),jT=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41.5 51",...e},O.createElement("g",null,O.createElement("path",{d:"M40.2,17.4c-3.4,2.1-5.5,5.7-5.5,9.7c0,4.5,2.7,8.6,6.8,10.3c-0.8,2.6-2,5-3.5,7.2c-2.2,3.1-4.5,6.3-7.9,6.3s-4.4-2-8.4-2 c-3.9,0-5.3,2.1-8.5,2.1s-5.4-2.9-7.9-6.5C2,39.5,0.1,33.7,0,27.6c0-9.9,6.4-15.2,12.8-15.2c3.4,0,6.2,2.2,8.3,2.2 c2,0,5.2-2.3,9-2.3C34.1,12.2,37.9,14.1,40.2,17.4z M28.3,8.1C30,6.1,30.9,3.6,31,1c0-0.3,0-0.7-0.1-1c-2.9,0.3-5.6,1.7-7.5,3.9 c-1.7,1.9-2.7,4.3-2.8,6.9c0,0.3,0,0.6,0.1,0.9c0.2,0,0.5,0.1,0.7,0.1C24.1,11.6,26.6,10.2,28.3,8.1z"}))),uJ=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e},O.createElement("g",null,O.createElement("path",{d:"M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z"}),O.createElement("path",{d:"M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z"}),O.createElement("path",{d:"M11.69 28.18C11.25 26.86 11 25.45 11 24s.25-2.86.69-4.18v-5.7H4.34A21.991 21.991 0 0 0 2 24c0 3.55.85 6.91 2.34 9.88l7.35-5.7z"}),O.createElement("path",{d:"M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z"}))),m7=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 544.8 83.4",...e},O.createElement("g",null,O.createElement("path",{d:"M20.7,22.6c-0.4-1.6-0.3-3.2-0.1-4.1c0.5-2.5,2.2-5.2,7.1-5.2c4.6,0,7.2,2.8,7.2,7.1c0,1.4,0,4.8,0,4.8h19.4v-5.5 C54.4,2.7,39.1,0,28.1,0C14.3,0,3,4.6,0.9,17.3c-0.6,3.5-0.7,6.6,0.2,10.5c3.4,15.9,31.1,20.5,35.1,30.6c0.8,1.9,0.5,4.3,0.2,5.8 c-0.6,2.6-2.4,5.3-7.6,5.3c-4.9,0-7.8-2.8-7.8-7.1l0-7.5H0v6c0,17.4,13.7,22.6,28.3,22.6c14.1,0,25.6-4.8,27.5-17.8 c0.9-6.7,0.2-11.1-0.1-12.7C52.5,36.5,22.9,31.7,20.7,22.6z M274,22.7c-0.3-1.5-0.2-3.2-0.1-4c0.6-2.5,2.2-5.2,7.1-5.2 c4.5,0,7.1,2.8,7.1,7c0,1.4,0,4.8,0,4.8h19.2v-5.4c0-16.8-15-19.4-25.9-19.4c-13.7,0-24.9,4.5-27,17.1c-0.5,3.4-0.7,6.5,0.2,10.4 c3.3,15.7,30.7,20.3,34.7,30.3c0.7,1.9,0.5,4.3,0.1,5.7c-0.6,2.6-2.3,5.2-7.5,5.2c-4.8,0-7.8-2.8-7.8-7l0-7.5h-20.7v5.9 c0,17.2,13.5,22.4,28,22.4c13.9,0,25.4-4.8,27.2-17.6c0.9-6.7,0.2-11-0.1-12.6C305.4,36.6,276.2,31.8,274,22.7z M450.8,65.2 L432.5,2.5h-28.9v77.1h19.1l-1.1-64.7l19.7,64.7H469V2.5h-19.2L450.8,65.2z M83.4,2.5L68.9,80.4h21l10.9-72.1l10.6,72.1h20.9 L118,2.5H83.4z M201,2.5l-9.8,60.9l-9.8-60.9h-31.8l-1.7,77.9h19.5l0.5-72.1l13.4,72.1H201l13.4-72.1l0.5,72.1h19.5l-1.7-77.9H201z M382,2.5h-19.7v57.6c0,1,0,2.1-0.2,3c-0.4,1.9-2,5.7-7.5,5.7c-5.4,0-7-3.7-7.4-5.7c-0.2-0.8-0.2-2-0.2-3V2.5h-19.7v55.8 c0,1.4,0.1,4.4,0.2,5.1c1.4,14.5,12.8,19.3,27.1,19.3c14.3,0,25.8-4.7,27.2-19.3c0.1-0.8,0.3-3.7,0.2-5.1V2.5z M517.2,36.6V48h8 v11.3c0,1,0,2.1-0.2,3c-0.3,2.1-2.3,5.7-8,5.7c-5.6,0-7.6-3.6-7.9-5.7c-0.1-0.9-0.2-2-0.2-3V23.7c0-1.3,0.1-2.6,0.4-3.7 c0.4-1.9,2.1-5.6,7.7-5.6c6,0,7.4,3.9,7.8,5.6c0.2,1.1,0.2,3,0.2,3v4.3h19.6v-2.6c0,0,0.1-2.7-0.1-5.2C543,5,530.9,0.4,517.1,0.4 c-13.8,0-25.6,4.7-27.3,19.2c-0.2,1.3-0.4,3.7-0.4,5.2v32.7c0,1.4,0,2.5,0.3,5.1c1.3,14.2,13.6,19.2,27.4,19.2 c13.9,0,26.1-5,27.4-19.2c0.2-2.6,0.3-3.7,0.3-5.1V36.6H517.2z"}))),oSe={Alexa:lJ,Apple:jT,Google:uJ},sSe={4631:lJ,4937:jT,4996:jT,24582:uJ,4321:m7,4362:m7};function aSe(e){const t=sSe[e.rootVendorId];return t||Object.entries(oSe).find(([n])=>e.label.toUpperCase().includes(n.toUpperCase()))?.[1]}const cJ=({fabric:e})=>{const t=O.useMemo(()=>aSe(e),[e]);return m.jsx(bn,{title:`${e.label} (0x${e.rootVendorId.toString(16)})`,arrow:!0,children:m.jsx(ce,{component:"span",sx:{fill:n=>n.palette.text.primary},children:t?m.jsx(t,{style:{height:"1.4em",width:"auto",maxWidth:"3em",display:"block"}}):m.jsx(iSe,{})})})},lSe={4362:"Samsung SmartThings",4417:"Tuya",4442:"LG ThinQ",4447:"Aqara",4448:"Amazon Alexa",4631:"Amazon Alexa",4937:"Apple Home",4996:"Apple (iCloud Keychain)",24582:"Google Home"};function dJ(e){return lSe[e]??`Vendor ${e}`}const uSe=e=>m.jsx(m.Fragment,{children:e.fabrics.map(t=>m.jsxs(ce,{display:"flex",alignItems:"center",gap:1.5,py:.5,children:[m.jsx(cJ,{fabric:t}),m.jsx(re,{variant:"body2",children:t.label||dJ(t.rootVendorId)})]},t.fabricId))});function Tc(){return{show:O.useContext(lX).show}}const cSe=({bridge:e})=>m.jsxs(et,{container:!0,spacing:2,children:[e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff===!1&&m.jsx(et,{size:{xs:12},children:m.jsxs(kn,{severity:"warning",icon:m.jsx(Kd,{}),children:[m.jsx(zC,{children:"Vacuum OnOff Disabled (Alexa incompatible)"}),"Alexa ",m.jsx("strong",{children:"requires"})," the OnOff cluster (PowerController) for robotic vacuums. With OnOff disabled, the vacuum commissions but never appears in the Alexa app. Only disable this if you exclusively use ",m.jsx("strong",{children:"Apple Home"}),"."]})}),!e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff&&m.jsx(et,{size:{xs:12},children:m.jsxs(kn,{severity:"info",icon:m.jsx(Kd,{}),children:[m.jsx(zC,{children:"Vacuum OnOff Cluster Enabled (Alexa)"}),"OnOff cluster is active for Alexa PowerController compatibility. This may cause issues with ",m.jsx("strong",{children:"Apple Home"})," and"," ",m.jsx("strong",{children:"Google Home"}),"."]})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(dSe,{bridge:e})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(fSe,{bridge:e})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(hSe,{bridge:e})}),m.jsx(et,{size:{xs:12},children:m.jsx(pSe,{bridge:e})}),m.jsx(et,{size:{xs:12},children:m.jsx(gSe,{bridge:e})})]}),dSe=({bridge:e})=>{const[t,n]=O.useState(!1),[r,i]=O.useState(!1),o=Tc(),s=async()=>{i(!0);try{await ibe(e.id),n(!0)}catch(l){o.show({message:`Failed to open commissioning window: ${l instanceof Error?l.message:String(l)}`,severity:"error"})}finally{i(!1)}};if(!e.commissioning)return m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"grey.500"},children:m.jsx(jw,{})}),m.jsx(re,{variant:"h6",children:"Pairing"})]}),m.jsx(re,{color:"text.secondary",children:"Bridge is not running. Start the bridge to see pairing information."})]})});const a=l=>{navigator.clipboard.writeText(l)};return m.jsxs(m.Fragment,{children:[m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"primary.main"},children:m.jsx(jw,{})}),m.jsx(re,{variant:"h6",children:"Pairing"})]}),m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,children:[m.jsxs(ce,{position:"relative",children:[e.commissioning.isCommissioned&&m.jsx(ce,{position:"absolute",top:"50%",left:"50%",sx:{transform:"translate(-50%, -50%) rotate(-45deg)",zIndex:1},children:m.jsx(Et,{label:"Commissioned",color:"success",size:"small"})}),m.jsx(ce,{sx:{background:"white",padding:1,borderRadius:1,opacity:e.commissioning.isCommissioned?.5:1},children:m.jsx(YI,{value:e.commissioning.qrPairingCode,size:120})})]}),m.jsx(Ut,{spacing:1,width:"100%",children:m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Manual Code:"}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:.5,children:[m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.manualPairingCode}),m.jsx(Fn,{size:"small",onClick:()=>a(e.commissioning.manualPairingCode),children:m.jsx(wh,{fontSize:"small"})})]})]})}),e.commissioning.isCommissioned&&m.jsx(Tt,{variant:"outlined",size:"small",startIcon:r?m.jsx(zr,{size:16}):m.jsx(jw,{}),onClick:s,disabled:r,fullWidth:!0,children:r?"Opening Commissioning Window...":"Add Another Controller"})]})]})}),m.jsx(mSe,{bridge:e,open:t,onClose:()=>n(!1)})]})},fSe=({bridge:e})=>m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"info.main"},children:m.jsx(qI,{})}),m.jsx(re,{variant:"h6",children:"Bridge Info"})]}),m.jsxs(Ut,{spacing:1.5,children:[m.jsxs(ce,{children:[m.jsx(re,{variant:"caption",color:"text.secondary",children:"Bridge ID"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",noWrap:!0,children:e.id})]}),m.jsx(Di,{}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Port"}),m.jsx(re,{variant:"body2",fontWeight:"medium",children:e.port})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Devices"}),m.jsx(Et,{icon:m.jsx(ss,{}),label:e.deviceCount,size:"small",color:"primary",variant:"outlined"})]}),e.commissioning&&m.jsxs(m.Fragment,{children:[m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Passcode"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.passcode})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Discriminator"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.discriminator})]})]})]})]})}),hSe=({bridge:e})=>{const t=e.commissioning?.fabrics??[],[n,r]=O.useState(!1),i=Tc(),o=async()=>{r(!0);try{const s=await _X(e.id);i.show({message:`Synced ${s.syncedCount} devices to controllers`,severity:"success"})}catch(s){i.show({message:`Force sync failed: ${s instanceof Error?s.message:String(s)}`,severity:"error"})}finally{r(!1)}};return m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:t.length>0?"success.main":"grey.500"},children:m.jsx(KX,{})}),m.jsxs(re,{variant:"h6",children:["Connected Fabrics (",t.length,")"]})]}),t.length===0?m.jsx(re,{color:"text.secondary",children:"No controllers connected yet. Scan the QR code with your Matter controller to pair this bridge."}):m.jsxs(Ut,{spacing:2,children:[m.jsx(uSe,{fabrics:t}),m.jsx(bn,{title:"Push all current device states to connected controllers",children:m.jsx(Tt,{variant:"outlined",size:"small",startIcon:n?m.jsx(zr,{size:16}):m.jsx(u3,{}),onClick:o,disabled:n,fullWidth:!0,children:n?"Syncing...":"Force Sync"})})]})]})})},pSe=({bridge:e})=>{const t=Xh(),n=e.filter.include.length>0||e.filter.exclude.length>0;return m.jsx(er,{children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"warning.main"},children:m.jsx(l3,{})}),m.jsx(re,{variant:"h6",sx:{flexGrow:1},children:"Entity Filters"}),m.jsx(bn,{title:n?"Edit Filters":"Add Filters",children:m.jsx(Fn,{size:"small",onClick:()=>t(jt.editBridge(e.id)),children:n?m.jsx(a3,{}):m.jsx(bc,{})})})]}),n?m.jsxs(Ut,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[e.filter.include.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(bc,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"success",variant:"outlined"},`include-${r.type}-${r.value}`)),e.filter.exclude.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(GX,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"error",variant:"outlined"},`exclude-${r.type}-${r.value}`))]}):m.jsx(re,{variant:"body2",color:"text.secondary",children:"No filters configured. All supported entities will be exposed."})]})})},mSe=({bridge:e,open:t,onClose:n})=>{if(!e.commissioning)return null;const r=i=>{navigator.clipboard.writeText(i)};return m.jsxs(vc,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[m.jsx(Sc,{children:m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,children:[m.jsx(jw,{}),"Add Another Controller"]})}),m.jsxs(xc,{children:[m.jsx(re,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"Scan this QR code with your Matter controller (Apple Home, Google Home, Alexa, etc.) to add this bridge to another ecosystem."}),m.jsx(ce,{display:"flex",justifyContent:"center",my:3,children:m.jsx(ce,{sx:{background:"white",padding:2,borderRadius:1},children:m.jsx(YI,{value:e.commissioning.qrPairingCode,size:200})})}),m.jsxs(Ut,{spacing:1,children:[m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Manual Code:"})," ",e.commissioning.manualPairingCode]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.manualPairingCode),children:m.jsx(wh,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Passcode:"})," ",e.commissioning.passcode]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.passcode.toString()),children:m.jsx(wh,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Discriminator:"})," ",e.commissioning.discriminator]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.discriminator.toString()),children:m.jsx(wh,{fontSize:"small"})})})]})]}),m.jsx(kn,{severity:"info",sx:{mt:2},children:m.jsx(re,{variant:"body2",children:"Matter supports connecting the same bridge to multiple controllers simultaneously. Each controller will have independent control."})})]}),m.jsx(Yd,{children:m.jsx(Tt,{onClick:n,children:"Close"})})]})},gSe=({bridge:e})=>{const t=e.failedEntities;return!t||t.length===0?null:m.jsx(er,{children:m.jsx(gr,{children:m.jsxs(kn,{severity:"warning",icon:m.jsx(qX,{}),children:[m.jsxs(zC,{children:["Failed Entities (",t.length,")"]}),m.jsx(re,{variant:"body2",component:"div",children:"The following entities could not be added to the bridge:"}),m.jsx(ce,{sx:{mt:1,maxHeight:200,overflow:"auto"},children:t.map(n=>m.jsxs(ce,{sx:{mb:.5},children:[m.jsx(re,{variant:"body2",component:"span",fontWeight:"bold",children:n.entityId}),m.jsxs(re,{variant:"body2",component:"span",color:"text.secondary",children:[" — ",n.reason]})]},n.entityId))})]})})})};var Vl;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(Vl||(Vl={}));var Ar;(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"})(Ar||(Ar={}));const fJ=[{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:Ar.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:Ar.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:Ar.Domain,value:"sensor"},{type:Ar.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:Ar.Domain,value:"climate"},{type:Ar.Domain,value:"fan"},{type:Ar.Domain,value:"cover"},{type:Ar.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:Ar.Domain,value:"lock"},{type:Ar.Domain,value:"alarm_control_panel"},{type:Ar.DeviceClass,value:"motion"},{type:Ar.DeviceClass,value:"door"},{type:Ar.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:Ar.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:Ar.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:Ar.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:Ar.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:Ar.Domain,value:"automation"},{type:Ar.Domain,value:"script"},{type:Ar.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var g7;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(g7||(g7={}));var y7;(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"})(y7||(y7={}));var b7;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(b7||(b7={}));var v7;(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"})(v7||(v7={}));var x7;(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"})(x7||(x7={}));var S7;(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"})(S7||(S7={}));var $T;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.colorControl="colorControl",e.doorLock="doorLock",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",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"})($T||($T={}));var w7;(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.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(w7||(w7={}));var C7;(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"})(C7||(C7={}));var E7;(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"})(E7||(E7={}));var A7;(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"})(A7||(A7={}));var k7;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(k7||(k7={}));var _7;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(_7||(_7={}));var D7;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(D7||(D7={}));var O7;(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_OFF=16]="TURN_OFF",e[e.TURN_ON=32]="TURN_ON"})(O7||(O7={}));var T7;(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"})(T7||(T7={}));var R7;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(R7||(R7={}));var I7;(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"})(I7||(I7={}));var M7;(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.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"})(M7||(M7={}));var P7;(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"})(P7||(P7={}));var j7;(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"})(j7||(j7={}));var $7;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})($7||($7={}));var N7;(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"})(N7||(N7={}));var L7;(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"})(L7||(L7={}));const F7={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",color_dimmer_switch:"Color Dimmer Switch",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",dimmer_switch:"Dimmer Switch",door_lock:"Door Lock",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",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",pressure_sensor:"Pressure Sensor",pump:"Pump",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"},ySe={automation:["on_off_switch"],binary_sensor:["contact_sensor","occupancy_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","humidity_sensor","light_sensor","pressure_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],switch:["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 B7;(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.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(B7||(B7={}));const z7={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:"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},bSe={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:z7},exclude:{title:"Exclude",type:"array",items:z7},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},vSe={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},alexaPreserveBrightnessOnTurnOn:{title:"Alexa: Preserve Brightness on Turn-On (Deprecated)",description:"This workaround is now always active and this setting has no effect. The bridge automatically ignores brightness commands that set lights to 100% immediately after a turn-on command.",type:"boolean",default:!0},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},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"},vacuumMinimalClusters:{title:"Vacuum: Minimal Clusters (Alexa troubleshooting)",description:"Strip the vacuum endpoint to only the clusters required by the Matter RVC spec. Removes PowerSource (battery) and the default ServiceArea placeholder. Enable this if Alexa commissions the vacuum but the device never appears in the app. Trade-off: battery percentage will not be reported to Matter controllers.",type:"boolean",default:!1}},additionalProperties:!1},a1={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},filter:bSe,featureFlags:vSe},required:["name","port","filter"],additionalProperties:!1};({...a1,properties:{...a1.properties},required:[...a1?.required??[]]});const xSe={[Vl.Failed]:"error",[Vl.Stopped]:"warning",[Vl.Starting]:"info",[Vl.Running]:"success"},SSe=({status:e,reason:t})=>{if(t)return m.jsx(kn,{severity:xSe[e],variant:"outlined",children:t})},Rc=De(m.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"})),gf=De(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),wSe=De(m.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-1 14H9V8h2zm4 0h-2V8h2z"})),CSe={[Vl.Starting]:{label:"Starting",color:"info",icon:m.jsx(u3,{fontSize:"small"})},[Vl.Running]:{label:"Running",color:"success",icon:m.jsx(Rc,{fontSize:"small"})},[Vl.Stopped]:{label:"Stopped",color:"warning",icon:m.jsx(wSe,{fontSize:"small"})},[Vl.Failed]:{label:"Failed",color:"error",icon:m.jsx(gf,{fontSize:"small"})}},hJ=({status:e,reason:t})=>{const n=CSe[e],r=m.jsx(Et,{icon:n.icon,label:n.label,size:"small",color:n.color,variant:"filled",sx:{fontWeight:500}});return t?m.jsx(bn,{title:t,children:r}):r},pJ=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M13 18h-2v-2h2zm0-4h-2V9h2z"})),mJ=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M11 20v-5.5H9L13 7v5.5h2z"})),NT=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4"})),X1=De(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"})),VC=De([m.jsx("path",{d:"M15.11 12.45 14 10.24l-3.11 6.21c-.16.34-.51.55-.89.55s-.73-.21-.89-.55L7.38 13H2v5c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-5h-6c-.38 0-.73-.21-.89-.55"},"0"),m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v5h6c.38 0 .73.21.89.55L10 13.76l3.11-6.21c.34-.68 1.45-.68 1.79 0L16.62 11H22V6c0-1.1-.9-2-2-2"},"1")]);function ESe(e){return Qe("MuiLinearProgress",e)}tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const LT=4,FT=df`
|
|
147
|
+
`:null,xye=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ye(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ye(n)}`,i&&"circleDisableShrink"]};return Ze(o,yye,t)},Sye=me("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ye(n.color)}`]]}})(qe(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:bye||{animation:`${bT} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),wye=me("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Cye=me("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ye(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(qe(({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:vye||{animation:`${vT} 1.4s ease-in-out infinite`}}]}))),Eye=me("circle",{name:"MuiCircularProgress",slot:"Track"})(qe(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),zr=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:u,thickness:c=3.6,value:f=0,variant:h="indeterminate",...g}=r,y={...r,color:o,disableShrink:s,size:l,thickness:c,value:f,variant:h,enableTrackSlot:a},b=xye(y),v={},S={},C={};if(h==="determinate"){const w=2*Math.PI*((Ia-c)/2);v.strokeDasharray=w.toFixed(3),C["aria-valuenow"]=Math.round(f),v.strokeDashoffset=`${((100-f)/100*w).toFixed(3)}px`,S.transform="rotate(-90deg)"}return m.jsx(Sye,{className:Oe(b.root,i),style:{width:l,height:l,...S,...u},ownerState:y,ref:n,role:"progressbar",...C,...g,children:m.jsxs(wye,{className:b.svg,ownerState:y,viewBox:`${Ia/2} ${Ia/2} ${Ia} ${Ia}`,children:[a?m.jsx(Eye,{className:b.track,ownerState:y,cx:Ia,cy:Ia,r:(Ia-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,m.jsx(Cye,{className:b.circle,style:v,ownerState:y,cx:Ia,cy:Ia,r:(Ia-c)/2,fill:"none",strokeWidth:c})]})})});function Aye(e){return Qe("MuiIconButton",e)}const OF=tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),kye=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${ye(r)}`,i&&`edge${ye(i)}`,`size${ye(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ze(a,Aye,t)},_ye=me(pa,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ye(n.color)}`],n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})(qe(({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}}]})),qe(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Ln()).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)}}],[`&.${OF.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${OF.loading}`]:{color:"transparent"}}))),Dye=me("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"}}]})),Fn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium",id:f,loading:h=null,loadingIndicator:g,...y}=r,b=Oc(f),v=g??m.jsx(zr,{"aria-labelledby":b,color:"inherit",size:16}),S={...r,edge:i,color:a,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:v,size:c},C=kye(S);return m.jsxs(_ye,{id:h?b:f,className:Oe(C.root,s),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...y,ownerState:S,children:[typeof h=="boolean"&&m.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:m.jsx(Dye,{className:C.loadingIndicator,ownerState:S,children:h&&v})}),o]})}),Oye=De(m.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"})),Tye=De(m.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Rye=De(m.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"})),Iye=De(m.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"})),aX=De(m.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"})),Mye=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${ye(n||r)}`,`${t}${ye(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Ze(o,H0e,i)},Pye=me(Nr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color||n.severity)}`]]}})(qe(({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(Ln(["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),[`& .${kF.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Ln(["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}`,[`& .${kF.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Ln(["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)}}}))]}})),jye=me("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),$ye=me("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),Nye=me("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),TF={success:m.jsx(Oye,{fontSize:"inherit"}),warning:m.jsx(Tye,{fontSize:"inherit"}),error:m.jsx(Rye,{fontSize:"inherit"}),info:m.jsx(Iye,{fontSize:"inherit"})},kn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:u={},componentsProps:c={},icon:f,iconMapping:h=TF,onClose:g,role:y="alert",severity:b="success",slotProps:v={},slots:S={},variant:C="standard",...w}=r,A={...r,color:l,severity:b,variant:C,colorSeverity:l||b},E=Mye(A),_={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...S},slotProps:{...c,...v}},[D,T]=ut("root",{ref:n,shouldForwardComponentProp:!0,className:Oe(E.root,s),elementType:Pye,externalForwardedProps:{..._,...w},ownerState:A,additionalProps:{role:y,elevation:0}}),[M,L]=ut("icon",{className:E.icon,elementType:jye,externalForwardedProps:_,ownerState:A}),[j,I]=ut("message",{className:E.message,elementType:$ye,externalForwardedProps:_,ownerState:A}),[N,$]=ut("action",{className:E.action,elementType:Nye,externalForwardedProps:_,ownerState:A}),[z,F]=ut("closeButton",{elementType:Fn,externalForwardedProps:_,ownerState:A}),[G,V]=ut("closeIcon",{elementType:aX,externalForwardedProps:_,ownerState:A});return m.jsxs(D,{...T,children:[f!==!1?m.jsx(M,{...L,children:f||h[b]||TF[b]}):null,m.jsx(j,{...I,children:o}),i!=null?m.jsx(N,{...$,children:i}):null,i==null&&g?m.jsx(N,{...$,children:m.jsx(z,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:m.jsx(G,{fontSize:"small",...V})})}):null]})});function Lye(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Dd();O.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=Li((S,C)=>{r?.(S,C)}),l=Li(S=>{!r||S==null||s.start(S,()=>{a(null,"timeout")})});O.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const u=S=>{r?.(S,"clickaway")},c=s.clear,f=O.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),h=S=>C=>{const w=S.onBlur;w?.(C),f()},g=S=>C=>{const w=S.onFocus;w?.(C),c()},y=S=>C=>{const w=S.onMouseEnter;w?.(C),c()},b=S=>C=>{const w=S.onMouseLeave;w?.(C),f()};return O.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",f),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",c)}},[n,i,f,c]),{getRootProps:(S={})=>{const C={...Yi(e),...Yi(S)};return{role:"presentation",...S,...C,onBlur:h(C),onFocus:g(C),onMouseEnter:y(C),onMouseLeave:b(C)}},onClickAway:u}}function hf(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function RF(e){return e.substring(2).toLowerCase()}function Fye(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Bye(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=O.useRef(!1),a=O.useRef(null),l=O.useRef(!1),u=O.useRef(!1);O.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=Tr(hf(t),a),f=Li(y=>{const b=u.current;u.current=!1;const v=_i(a.current);if(!l.current||!a.current||"clientX"in y&&Fye(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)}),h=y=>b=>{u.current=!0;const v=t.props[y];v&&v(b)},g={ref:c};return o!==!1&&(g[o]=h(o)),O.useEffect(()=>{if(o!==!1){const y=RF(o),b=_i(a.current),v=()=>{s.current=!0};return b.addEventListener(y,f),b.addEventListener("touchmove",v),()=>{b.removeEventListener(y,f),b.removeEventListener("touchmove",v)}}},[f,o]),r!==!1&&(g[r]=h(r)),O.useEffect(()=>{if(r!==!1){const y=RF(r),b=_i(a.current);return b.addEventListener(y,f),()=>{b.removeEventListener(y,f)}}},[f,r]),O.cloneElement(t,g)}const RI=e=>e.scrollTop;function Gd(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 xT(e){return`scale(${e}, ${e**2})`}const zye={entering:{opacity:1,transform:xT(1)},entered:{opacity:1,transform:"none"}},S4=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),V1=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:f,onExited:h,onExiting:g,style:y,timeout:b="auto",TransitionComponent:v=_a,...S}=t,C=Dd(),w=O.useRef(),A=ka(),E=O.useRef(null),_=Tr(E,hf(o),n),D=z=>F=>{if(z){const G=E.current;F===void 0?z(G):z(G,F)}},T=D(c),M=D((z,F)=>{RI(z);const{duration:G,delay:V,easing:H}=Gd({style:y,timeout:b,easing:s},{mode:"enter"});let X;b==="auto"?(X=A.transitions.getAutoHeightDuration(z.clientHeight),w.current=X):X=G,z.style.transition=[A.transitions.create("opacity",{duration:X,delay:V}),A.transitions.create("transform",{duration:S4?X:X*.666,delay:V,easing:H})].join(","),l&&l(z,F)}),L=D(u),j=D(g),I=D(z=>{const{duration:F,delay:G,easing:V}=Gd({style:y,timeout:b,easing:s},{mode:"exit"});let H;b==="auto"?(H=A.transitions.getAutoHeightDuration(z.clientHeight),w.current=H):H=F,z.style.transition=[A.transitions.create("opacity",{duration:H,delay:G}),A.transitions.create("transform",{duration:S4?H:H*.666,delay:S4?G:G||H*.333,easing:V})].join(","),z.style.opacity=0,z.style.transform=xT(.75),f&&f(z)}),N=D(h),$=z=>{b==="auto"&&C.start(w.current||0,z),r&&r(E.current,z)};return m.jsx(v,{appear:i,in:a,nodeRef:E,onEnter:M,onEntered:L,onEntering:T,onExit:I,onExited:N,onExiting:j,addEndListener:$,timeout:b==="auto"?null:b,...S,children:(z,{ownerState:F,...G})=>O.cloneElement(o,{style:{opacity:0,transform:xT(.75),visibility:z==="exited"&&!a?"hidden":void 0,...zye[z],...y,...o.props.style},ref:_,...G})})});V1&&(V1.muiSupportAuto=!0);function Uye(e){return Qe("MuiSnackbarContent",e)}tt("MuiSnackbarContent",["root","message","action"]);const Hye=e=>{const{classes:t}=e;return Ze({root:["root"],action:["action"],message:["message"]},Uye,t)},Vye=me(Nr,{name:"MuiSnackbarContent",slot:"Root"})(qe(({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(U1(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:U1(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Wye=me("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),qye=me("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Gye=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert",...l}=r,u=r,c=Hye(u);return m.jsxs(Vye,{role:a,elevation:6,className:Oe(c.root,o),ownerState:u,ref:n,...l,children:[m.jsx(Wye,{className:c.message,ownerState:u,children:s}),i?m.jsx(qye,{className:c.action,ownerState:u,children:i}):null]})});function Kye(e){return Qe("MuiSnackbar",e)}tt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Yye=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`]};return Ze(r,Kye,t)},Xye=me("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}`]]}})(qe(({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%)"}}}]}))),II=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbar"}),i=ka(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:c,className:f,ClickAwayListenerProps:h,ContentProps:g,disableWindowBlurListener:y=!1,message:b,onBlur:v,onClose:S,onFocus:C,onMouseEnter:w,onMouseLeave:A,open:E,resumeHideDuration:_,slots:D={},slotProps:T={},TransitionComponent:M,transitionDuration:L=o,TransitionProps:{onEnter:j,onExited:I,...N}={},...$}=r,z={...r,anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:u,disableWindowBlurListener:y,TransitionComponent:M,transitionDuration:L},F=Yye(z),{getRootProps:G,onClickAway:V}=Lye(z),[H,X]=O.useState(!0),B=oe=>{X(!0),I&&I(oe)},W=(oe,ue)=>{X(!1),j&&j(oe,ue)},Y={slots:{transition:M,...D},slotProps:{content:g,clickAwayListener:h,transition:N,...T}},[U,K]=ut("root",{ref:n,className:[F.root,f],elementType:Xye,getSlotProps:G,externalForwardedProps:{...Y,...$},ownerState:z}),[Z,{ownerState:J,...Q}]=ut("clickAwayListener",{elementType:Bye,externalForwardedProps:Y,getSlotProps:oe=>({onClickAway:(...ue)=>{const pe=ue[0];oe.onClickAway?.(...ue),!pe?.defaultMuiPrevented&&V(...ue)}}),ownerState:z}),[ie,le]=ut("content",{elementType:Gye,shouldForwardComponentProp:!0,externalForwardedProps:Y,additionalProps:{message:b,action:s},ownerState:z}),[te,ne]=ut("transition",{elementType:V1,externalForwardedProps:Y,getSlotProps:oe=>({onEnter:(...ue)=>{oe.onEnter?.(...ue),W(...ue)},onExited:(...ue)=>{oe.onExited?.(...ue),B(...ue)}}),additionalProps:{appear:!0,in:E,timeout:L,direction:a==="top"?"down":"up"},ownerState:z});return!E&&H?null:m.jsx(Z,{...Q,...D.clickAwayListener&&{ownerState:J},children:m.jsx(U,{...K,children:m.jsx(te,{...ne,children:c||m.jsx(ie,{...le})})})})}),lX=O.createContext({show:()=>{}});let Jye=0;const Qye=e=>{const[t,n]=O.useState([]),r=O.useCallback(o=>{n(s=>[...s,{...o,autoHideDuration:o.autoHideDuration??6e3,notificationId:Jye++}])},[]),i=o=>{n(s=>s.filter(a=>a.notificationId!==o))};return m.jsxs(lX.Provider,{value:{show:r},children:[e.children,t.map(o=>m.jsx(II,{open:!0,autoHideDuration:o.autoHideDuration,onClose:()=>i(o.notificationId),children:m.jsx(kn,{severity:o.severity,variant:"filled",sx:{minWidth:"300px"},children:o.message})},o.notificationId))]})};function co(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 Zye=typeof Symbol=="function"&&Symbol.observable||"@@observable",IF=Zye,w4=()=>Math.random().toString(36).substring(7).split("").join("."),e1e={INIT:`@@redux/INIT${w4()}`,REPLACE:`@@redux/REPLACE${w4()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${w4()}`},RC=e1e;function MI(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 uX(e,t,n){if(typeof e!="function")throw new Error(co(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(co(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(co(1));return n(uX)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((v,S)=>{s.set(S,v)}))}function c(){if(l)throw new Error(co(3));return i}function f(v){if(typeof v!="function")throw new Error(co(4));if(l)throw new Error(co(5));let S=!0;u();const C=a++;return s.set(C,v),function(){if(S){if(l)throw new Error(co(6));S=!1,u(),s.delete(C),o=null}}}function h(v){if(!MI(v))throw new Error(co(7));if(typeof v.type>"u")throw new Error(co(8));if(typeof v.type!="string")throw new Error(co(17));if(l)throw new Error(co(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(co(10));r=v,h({type:RC.REPLACE})}function y(){const v=f;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(co(11));function C(){const A=S;A.next&&A.next(c())}return C(),{unsubscribe:v(C)}},[IF](){return this}}}return h({type:RC.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:g,[IF]:y}}function t1e(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:RC.INIT})>"u")throw new Error(co(12));if(typeof n(void 0,{type:RC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(co(13))})}function n1e(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{t1e(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const f=r[c],h=n[f],g=s[f],y=h(g,a);if(typeof y>"u")throw a&&a.type,new Error(co(14));u[f]=y,l=l||y!==g}return l=l||r.length!==Object.keys(s).length,l?u:s}}function IC(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function r1e(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(co(15))};const s={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},a=e.map(l=>l(s));return o=IC(...a)(i.dispatch),{...i,dispatch:o}}}function i1e(e){return MI(e)&&"type"in e&&typeof e.type=="string"}var cX=Symbol.for("immer-nothing"),MF=Symbol.for("immer-draftable"),Uo=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ms=Object,ng=Ms.getPrototypeOf,MC="constructor",KA="prototype",ST="configurable",PC="enumerable",Iw="writable",W1="value",gc=e=>!!e&&!!e[Uo];function nl(e){return e?dX(e)||XA(e)||!!e[MF]||!!e[MC]?.[MF]||JA(e)||QA(e):!1}var o1e=Ms[KA][MC].toString(),PF=new WeakMap;function dX(e){if(!e||!PI(e))return!1;const t=ng(e);if(t===null||t===Ms[KA])return!0;const n=Ms.hasOwnProperty.call(t,MC)&&t[MC];if(n===Object)return!0;if(!lm(n))return!1;let r=PF.get(n);return r===void 0&&(r=Function.toString.call(n),PF.set(n,r)),r===o1e}function YA(e,t,n=!0){hv(e)===0?(n?Reflect.ownKeys(e):Ms.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function hv(e){const t=e[Uo];return t?t.type_:XA(e)?1:JA(e)?2:QA(e)?3:0}var jF=(e,t,n=hv(e))=>n===2?e.has(t):Ms[KA].hasOwnProperty.call(e,t),wT=(e,t,n=hv(e))=>n===2?e.get(t):e[t],jC=(e,t,n,r=hv(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function s1e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var XA=Array.isArray,JA=e=>e instanceof Map,QA=e=>e instanceof Set,PI=e=>typeof e=="object",lm=e=>typeof e=="function",C4=e=>typeof e=="boolean";function a1e(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Zu=e=>e.copy_||e.base_,jI=e=>e.modified_?e.copy_:e.base_;function CT(e,t){if(JA(e))return new Map(e);if(QA(e))return new Set(e);if(XA(e))return Array[KA].slice.call(e);const n=dX(e);if(t===!0||t==="class_only"&&!n){const r=Ms.getOwnPropertyDescriptors(e);delete r[Uo];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[Iw]===!1&&(a[Iw]=!0,a[ST]=!0),(a.get||a.set)&&(r[s]={[ST]:!0,[Iw]:!0,[PC]:a[PC],[W1]:e[s]})}return Ms.create(ng(e),r)}else{const r=ng(e);if(r!==null&&n)return{...e};const i=Ms.create(r);return Ms.assign(i,e)}}function $I(e,t=!1){return ZA(e)||gc(e)||!nl(e)||(hv(e)>1&&Ms.defineProperties(e,{set:S2,add:S2,clear:S2,delete:S2}),Ms.freeze(e),t&&YA(e,(n,r)=>{$I(r,!0)},!1)),e}function l1e(){Na(2)}var S2={[W1]:l1e};function ZA(e){return e===null||!PI(e)?!0:Ms.isFrozen(e)}var $C="MapSet",ET="Patches",$F="ArrayMethods",fX={};function Oh(e){const t=fX[e];return t||Na(0,e),t}var NF=e=>!!fX[e],q1,hX=()=>q1,u1e=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:NF($C)?Oh($C):void 0,arrayMethodsPlugin_:NF($F)?Oh($F):void 0});function LF(e,t){t&&(e.patchPlugin_=Oh(ET),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function AT(e){kT(e),e.drafts_.forEach(c1e),e.drafts_=null}function kT(e){e===q1&&(q1=e.parent_)}var FF=e=>q1=u1e(q1,e);function c1e(e){const t=e[Uo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BF(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Uo].modified_&&(AT(t),Na(4)),nl(e)&&(e=zF(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Uo].base_,e,t)}else e=zF(t,n);return d1e(t,e,!0),AT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cX?e:void 0}function zF(e,t){if(ZA(t))return t;const n=t[Uo];if(!n)return NC(t,e.handledSet_,e);if(!e3(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);gX(n,e)}return n.copy_}function d1e(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$I(t,n)}function pX(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var e3=(e,t)=>e.scope_===t,f1e=[];function mX(e,t,n,r){const i=Zu(e),o=e.type_;if(r!==void 0&&wT(i,r,o)===t){jC(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;YA(i,(l,u)=>{if(gc(u)){const c=a.get(u)||[];c.push(l),a.set(u,c)}})}const s=e.draftLocations_.get(t)??f1e;for(const a of s)jC(i,a,n,o)}function h1e(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!e3(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=jI(o);mX(e,o.draft_??o,s,n),gX(o,i)})}function gX(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)}pX(e)}}function p1e(e,t,n){const{scope_:r}=e;if(gc(n)){const i=n[Uo];e3(i,r)&&i.callbacks_.push(function(){Mw(e);const s=jI(i);mX(e,n,s,t)})}else nl(n)&&e.callbacks_.push(function(){const o=Zu(e);e.type_===3?o.has(n)&&NC(n,r.handledSet_,r):wT(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&NC(wT(e.copy_,t,e.type_),r.handledSet_,r)})}function NC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||gc(e)||t.has(e)||!nl(e)||ZA(e)||(t.add(e),YA(e,(r,i)=>{if(gc(i)){const o=i[Uo];if(e3(o,n)){const s=jI(o);jC(e,r,s,e.type_),pX(o)}}else nl(i)&&NC(i,t,n)})),e}function m1e(e,t){const n=XA(e),r={type_:n?1:0,scope_:t?t.scope_:hX(),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=LC;n&&(i=[r],o=G1);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var LC={get(e,t){if(t===Uo)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=Zu(e);if(!jF(i,t,e.type_))return g1e(e,i,t);const o=i[t];if(e.finalized_||!nl(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&a1e(t))return o;if(o===E4(e.base_,t)){Mw(e);const s=e.type_===1?+t:t,a=DT(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in Zu(e)},ownKeys(e){return Reflect.ownKeys(Zu(e))},set(e,t,n){const r=yX(Zu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=E4(Zu(e),t),o=i?.[Uo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(s1e(n,i)&&(n!==void 0||jF(e.base_,t,e.type_)))return!0;Mw(e),_T(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),p1e(e,t,n)),!0},deleteProperty(e,t){return Mw(e),E4(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),_T(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Zu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Iw]:!0,[ST]:e.type_!==1||t!=="length",[PC]:r[PC],[W1]:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return ng(e.base_)},setPrototypeOf(){Na(12)}},G1={};for(let e in LC){let t=LC[e];G1[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}G1.deleteProperty=function(e,t){return G1.set.call(this,e,t,void 0)};G1.set=function(e,t,n){return LC.set.call(this,e[0],t,n,e[0])};function E4(e,t){const n=e[Uo];return(n?Zu(n):e)[t]}function g1e(e,t,n){const r=yX(t,n);return r?W1 in r?r[W1]:r.get?.call(e.draft_):void 0}function yX(e,t){if(!(t in e))return;let n=ng(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ng(n)}}function _T(e){e.modified_||(e.modified_=!0,e.parent_&&_T(e.parent_))}function Mw(e){e.copy_||(e.assigned_=new Map,e.copy_=CT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y1e=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(lm(t)&&!lm(n)){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}lm(n)||Na(6),r!==void 0&&!lm(r)&&Na(7);let i;if(nl(t)){const o=FF(this),s=DT(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?AT(o):kT(o)}return LF(o,r),BF(i,o)}else if(!t||!PI(t)){if(i=n(t),i===void 0&&(i=t),i===cX&&(i=void 0),this.autoFreeze_&&$I(i,!0),r){const o=[],s=[];Oh(ET).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(lm(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]},C4(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),C4(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),C4(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nl(e)||Na(8),gc(e)&&(e=b1e(e));const t=FF(this),n=DT(t,e,void 0);return n[Uo].isManual_=!0,kT(t),n}finishDraft(e,t){const n=e&&e[Uo];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return LF(r,t),BF(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=Oh(ET).applyPatches_;return gc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function DT(e,t,n,r){const[i,o]=JA(t)?Oh($C).proxyMap_(t,n):QA(t)?Oh($C).proxySet_(t,n):m1e(t,n);return(n?.scope_??hX()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?h1e(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:u}=l;o.modified_&&u&&u.generatePatches_(o,[],l)}),i}function b1e(e){return gc(e)||Na(10,e),bX(e)}function bX(e){if(!nl(e)||ZA(e))return e;const t=e[Uo];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=CT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=CT(e,!0);return YA(n,(i,o)=>{jC(n,i,bX(o))},r),t&&(t.finalized_=!1),n}var v1e=new y1e,vX=v1e.produce,FC=Symbol("NOT_FOUND");function x1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function S1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function w1e(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 UF=e=>Array.isArray(e)?e:[e];function C1e(e){const t=Array.isArray(e[0])?e[0]:e;return w1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function E1e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function A1e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:FC},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function k1e(e,t){let n=[];function r(a){const l=n.findIndex(u=>t(a,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return FC}function i(a,l){r(a)===FC&&(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 _1e=(e,t)=>e===t;function D1e(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 O1e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=_1e,maxSize:i=1,resultEqualityCheck:o}=n,s=D1e(r);let a=0;const l=i<=1?A1e(s):k1e(i,s);function u(){let c=l.get(arguments);if(c===FC){if(c=e.apply(null,arguments),a++,o){const h=l.getEntries().find(g=>o(g.value,c));h&&(c=h.value,a!==0&&a--)}l.put(arguments,c)}return c}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var T1e=class{constructor(e){this.value=e}deref(){return this.value}},R1e=typeof WeakRef<"u"?WeakRef:T1e,I1e=0,HF=1;function w2(){return{s:I1e,v:void 0,o:null,p:null}}function xX(e,t={}){let n=w2();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const g=arguments[f];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=w2(),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=w2(),y.set(g,a)):a=b}}const u=a;let c;if(a.s===HF)c=a.v;else if(c=e.apply(null,arguments),o++,r){const f=i?.deref?.()??i;f!=null&&r(f,c)&&(c=f,o!==0&&o--),i=typeof c=="object"&&c!==null||typeof c=="function"?new R1e(c):c}return u.s=HF,u.v=c,c}return s.clearCache=()=>{n=w2(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function SX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),x1e(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:g=xX,argsMemoizeOptions:y=[]}=c,b=UF(h),v=UF(y),S=C1e(i),C=f(function(){return o++,u.apply(null,arguments)},...b),w=g(function(){s++;const E=E1e(S,arguments);return a=C.apply(null,E),a},...v);return Object.assign(w,{resultFunc:u,memoizedResultFunc:C,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var wX=SX(xX),M1e=Object.assign((e,t=wX)=>{S1e(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:()=>M1e});function CX(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var P1e=CX(),j1e=CX,$1e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?IC:IC.apply(null,arguments)},N1e=e=>e&&typeof e.match=="function";function r1(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(BC(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=>i1e(r)&&r.type===e,n}var EX=class Ly extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ly.prototype)}static get[Symbol.species](){return Ly}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ly(...t[0].concat(this)):new Ly(...t.concat(this))}};function VF(e){return nl(e)?vX(e,()=>{}):e}function L1e(e){return typeof e=="boolean"}var F1e=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new EX;return n&&(L1e(n)?s.push(P1e):s.push(j1e(n.extraArgument))),s},B1e="RTK_autoBatch",WF=e=>t=>{setTimeout(t,e)},z1e=(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:WF(10):e.type==="callback"?e.queueNotification:WF(e.timeout),u=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return a.add(c),()=>{h(),a.delete(c)}},dispatch(c){try{return i=!c?.meta?.[B1e],o=!i,o&&(s||(s=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},U1e=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new EX(e);return r&&i.push(z1e(typeof r=="object"?r:void 0)),i};function H1e(e){const t=F1e(),{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(MI(n))a=n1e(n);else throw new Error(BC(1));let l;typeof r=="function"?l=r(t):l=t();let u=IC;i&&(u=$1e({trace:!1,...typeof i=="object"&&i}));const c=r1e(...l),f=U1e(c);let h=typeof s=="function"?s(f):f();const g=u(...h);return uX(a,o,g)}function V1e(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(BC(28));if(a in t)throw new Error(BC(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 W1e(e){return typeof e=="function"}function NI(e,t){let[n,r,i]=V1e(t),o;if(W1e(e))o=()=>VF(e());else{const a=VF(e);o=()=>a}function s(a=o(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,f)=>{if(f)if(gc(c)){const g=f(c,l);return g===void 0?c:g}else{if(nl(c))return vX(c,h=>f(h,l));{const h=f(c,l);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},a)}return s.getInitialState=o,s}var q1e=(e,t)=>N1e(e)?e.match(t):e(t);function G1e(...e){return t=>e.some(n=>q1e(n,t))}var K1e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Y1e=(e=21)=>{let t="",n=e;for(;n--;)t+=K1e[Math.random()*64|0];return t},X1e=["name","message","stack","code"],A4=class{constructor(e,t){this.payload=e,this.meta=t}_type},qF=class{constructor(e,t){this.payload=e,this.meta=t}_type},J1e=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of X1e)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},GF="External signal was aborted",Q1e=(()=>{function e(t,n,r){const i=r1(t+"/fulfilled",(l,u,c,f)=>({payload:l,meta:{...f||{},arg:c,requestId:u,requestStatus:"fulfilled"}})),o=r1(t+"/pending",(l,u,c)=>({payload:void 0,meta:{...c||{},arg:u,requestId:l,requestStatus:"pending"}})),s=r1(t+"/rejected",(l,u,c,f,h)=>({payload:f,error:(r&&r.serializeError||J1e)(l||"Rejected"),meta:{...h||{},arg:c,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:u}={}){return(c,f,h)=>{const g=r?.idGenerator?r.idGenerator(l):Y1e(),y=new AbortController;let b,v;function S(w){v=w,y.abort()}u&&(u.aborted?S(GF):u.addEventListener("abort",()=>S(GF),{once:!0}));const C=(async function(){let w;try{let E=r?.condition?.(l,{getState:f,extra:h});if(ebe(E)&&(E=await E),E===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((D,T)=>{b=()=>{T({name:"AbortError",message:v||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});c(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:f,extra:h}))),w=await Promise.race([_,Promise.resolve(n(l,{dispatch:c,getState:f,extra:h,requestId:g,signal:y.signal,abort:S,rejectWithValue:(D,T)=>new A4(D,T),fulfillWithValue:(D,T)=>new qF(D,T)})).then(D=>{if(D instanceof A4)throw D;return D instanceof qF?i(D.payload,g,l,D.meta):i(D,g,l)})])}catch(E){w=E instanceof A4?s(null,g,l,E.payload,E.meta):s(E,g,l)}finally{b&&y.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||c(w),w})();return Object.assign(C,{abort:S,requestId:g,arg:l,unwrap(){return C.then(Z1e)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:G1e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Z1e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ebe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function BC(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. `}async function tbe(){return await(await fetch(`api/matter/bridges?_s=${Date.now()}`)).json()}async function AX(e){return fetch("api/matter/bridges",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json())}async function kX(e){return fetch(`api/matter/bridges/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json())}async function nbe(e){await fetch(`api/matter/bridges/${e}`,{method:"DELETE"})}async function rbe(e){return await fetch(`api/matter/bridges/${e}/actions/factory-reset`,{method:"POST"}).then(t=>t.json())}async function _X(e){return await fetch(`api/matter/bridges/${e}/actions/force-sync`,{method:"POST"}).then(t=>t.json())}async function ibe(e){const t=await fetch(`api/matter/bridges/${e}/actions/open-commissioning-window`,{method:"POST"});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to open commissioning window"}));throw new Error(n.error??"Failed to open commissioning window")}return t.json()}async function obe(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 sbe(){return(await fetch("api/matter/bridges/actions/start-all",{method:"POST"})).json()}async function abe(){return(await fetch("api/matter/bridges/actions/stop-all",{method:"POST"})).json()}async function lbe(){return(await fetch("api/matter/bridges/actions/restart-all",{method:"POST"})).json()}const Fg=Q1e.withTypes(),t3=wX.withTypes(),Fo=Fg("bridges/load",tbe),DX=Fg("bridges/create",AX),OX=Fg("bridges/delete",nbe),TX=Fg("bridges/update",kX),RX=Fg("bridges/reset",rbe),IX=r1("bridges/setFromWebSocket"),MX=r1("bridges/updateFromWebSocket"),zs=ade.withTypes(),Bg=cde.withTypes(),PX=O.createContext({isConnected:!1,error:null});function ube(){return O.useContext(PX)}function cbe({children:e}){const t=zs(),[n,r]=O.useState(!1),[i,o]=O.useState(null),s=O.useRef(null),a=O.useRef(void 0),l=O.useCallback(c=>{switch(c.type){case"bridges_update":t(IX(c.data));break;case"bridge_update":t(MX(c.data));break;case"ping":s.current?.send(JSON.stringify({type:"pong"}));break}},[t]),u=O.useCallback(()=>{if(s.current?.readyState===WebSocket.OPEN)return;const c=window.location.protocol==="https:"?"wss:":"ws:",f=document.querySelector("base")?.href||window.location.origin,h=new URL(f),g=`${c}//${h.host}${h.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(u,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 O.useEffect(()=>(u(),()=>{a.current&&clearTimeout(a.current),s.current?.close()}),[u]),m.jsx(PX.Provider,{value:{isConnected:n,error:i},children:e})}const dbe=()=>{const e=zs();return O.useEffect(()=>{e(Fo())},[e]),m.jsx(aY,{})},rg=De(m.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"})),n3=De(m.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}));function fbe(e){return Qe("MuiTypography",e)}const KF=tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),hbe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},pbe=_0e(),mbe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Ze(a,fbe,s)},gbe=me("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${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(qe(({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(Ln()).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${ye(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}}]}))),YF={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},re=O.forwardRef(function(t,n){const{color:r,...i}=it({props:t,name:"MuiTypography"}),o=!hbe[r],s=pbe({...i,...o&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:f=!1,paragraph:h=!1,variant:g="body1",variantMapping:y=YF,...b}=s,v={...s,align:a,color:r,className:l,component:u,gutterBottom:c,noWrap:f,paragraph:h,variant:g,variantMapping:y},S=u||(h?"p":y[g]||YF[g])||"span",C=mbe(v);return m.jsx(gbe,{as:S,ref:n,className:Oe(C.root,l),...b,ownerState:v,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...b.style}})});function ybe(e){return Qe("MuiAlertTitle",e)}tt("MuiAlertTitle",["root"]);const bbe=e=>{const{classes:t}=e;return Ze({root:["root"]},ybe,t)},vbe=me(re,{name:"MuiAlertTitle",slot:"Root"})(qe(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),zC=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlertTitle"}),{className:i,...o}=r,s=r,a=bbe(s);return m.jsx(vbe,{gutterBottom:!0,component:"div",ownerState:s,ref:n,className:Oe(a.root,i),...o})}),xbe=tt("MuiBox",["root"]),Sbe=HA(),ce=$me({themeId:ua,defaultTheme:Sbe,defaultClassName:xbe.root,generateClassName:MY.generate});function wbe(e){return Qe("MuiButton",e)}const zf=tt("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"]),Cbe=O.createContext({}),Ebe=O.createContext(void 0),Abe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:s,loadingPosition:a,classes:l}=e,u={root:["root",s&&"loading",o,`${o}${ye(t)}`,`size${ye(i)}`,`${o}Size${ye(i)}`,`color${ye(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${ye(a)}`],startIcon:["icon","startIcon",`iconSize${ye(i)}`],endIcon:["icon","endIcon",`iconSize${ye(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=Ze(u,wbe,l);return{...l,...c}},jX=[{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}}}],kbe=me(pa,{shouldForwardProp:e=>ro(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(qe(({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"},[`&.${zf.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]},[`&.${zf.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${zf.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)",[`&.${zf.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(Ln()).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"},[`&.${zf.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${zf.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}),[`&.${zf.loading}`]:{color:"transparent"}}}]}})),_be=me("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ye(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}},...jX]})),Dbe=me("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ye(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}},...jX]})),Obe=me("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}}]})),XF=me("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Tt=O.forwardRef(function(t,n){const r=O.useContext(Cbe),i=O.useContext(Ebe),o=tg(r,t),s=it({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:c,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:y,focusVisibleClassName:b,fullWidth:v=!1,id:S,loading:C=null,loadingIndicator:w,loadingPosition:A="center",size:E="medium",startIcon:_,type:D,variant:T="text",...M}=s,L=Oc(S),j=w??m.jsx(zr,{"aria-labelledby":L,color:"inherit",size:16}),I={...s,color:l,component:u,disabled:f,disableElevation:h,disableFocusRipple:g,fullWidth:v,loading:C,loadingIndicator:j,loadingPosition:A,size:E,type:D,variant:T},N=Abe(I),$=(_||C&&A==="start")&&m.jsx(_be,{className:N.startIcon,ownerState:I,children:_||m.jsx(XF,{className:N.loadingIconPlaceholder,ownerState:I})}),z=(y||C&&A==="end")&&m.jsx(Dbe,{className:N.endIcon,ownerState:I,children:y||m.jsx(XF,{className:N.loadingIconPlaceholder,ownerState:I})}),F=i||"",G=typeof C=="boolean"?m.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:C&&m.jsx(Obe,{className:N.loadingIndicator,ownerState:I,children:j})}):null;return m.jsxs(kbe,{ownerState:I,className:Oe(r.className,N.root,c,F),component:u,disabled:f||C,focusRipple:!g,focusVisibleClassName:Oe(N.focusVisible,b),ref:n,type:D,id:C?L:S,...M,classes:N,children:[$,A!=="end"&&G,a,A==="end"&&G,z]})});function Tbe(e){return Qe("MuiCollapse",e)}tt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Rbe=e=>{const{orientation:t,classes:n}=e;return Ze({root:["root",t],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",t],wrapperInner:["wrapperInner",t]},Tbe,n)},Ibe=me("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(qe(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),Mbe=me("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Pbe=me("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ka=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:u,in:c,onEnter:f,onEntered:h,onEntering:g,onExit:y,onExited:b,onExiting:v,orientation:S="vertical",slots:C={},slotProps:w={},style:A,timeout:E=JY.standard,TransitionComponent:_=_a,...D}=r,T={...r,orientation:S,collapsedSize:a},M=Rbe(T),L=ka(),j=Dd(),I=O.useRef(null),N=O.useRef(),$=typeof a=="number"?`${a}px`:a,z=S==="horizontal",F=z?"width":"height",G=O.useRef(null),V=Tr(n,G),H=pe=>we=>{if(pe){const ke=G.current;we===void 0?pe(ke):pe(ke,we)}},X=()=>I.current?I.current[z?"clientWidth":"clientHeight"]:0,B=H((pe,we)=>{I.current&&z&&(I.current.style.position="absolute"),pe.style[F]=$,f&&f(pe,we)}),W=H((pe,we)=>{const ke=X();I.current&&z&&(I.current.style.position="");const{duration:Ae,easing:Fe}=Gd({style:A,timeout:E,easing:u},{mode:"enter"});if(E==="auto"){const Me=L.transitions.getAutoHeightDuration(ke);pe.style.transitionDuration=`${Me}ms`,N.current=Me}else pe.style.transitionDuration=typeof Ae=="string"?Ae:`${Ae}ms`;pe.style[F]=`${ke}px`,pe.style.transitionTimingFunction=Fe,g&&g(pe,we)}),Y=H((pe,we)=>{pe.style[F]="auto",h&&h(pe,we)}),U=H(pe=>{pe.style[F]=`${X()}px`,y&&y(pe)}),K=H(b),Z=H(pe=>{const we=X(),{duration:ke,easing:Ae}=Gd({style:A,timeout:E,easing:u},{mode:"exit"});if(E==="auto"){const Fe=L.transitions.getAutoHeightDuration(we);pe.style.transitionDuration=`${Fe}ms`,N.current=Fe}else pe.style.transitionDuration=typeof ke=="string"?ke:`${ke}ms`;pe.style[F]=$,pe.style.transitionTimingFunction=Ae,v&&v(pe)}),J=pe=>{E==="auto"&&j.start(N.current||0,pe),i&&i(G.current,pe)},Q={slots:C,slotProps:w,component:l},[ie,le]=ut("root",{ref:V,className:Oe(M.root,s),elementType:Ibe,externalForwardedProps:Q,ownerState:T,additionalProps:{style:{[z?"minWidth":"minHeight"]:$,...A}}}),[te,ne]=ut("wrapper",{ref:I,className:M.wrapper,elementType:Mbe,externalForwardedProps:Q,ownerState:T}),[oe,ue]=ut("wrapperInner",{className:M.wrapperInner,elementType:Pbe,externalForwardedProps:Q,ownerState:T});return m.jsx(_,{in:c,onEnter:B,onEntered:Y,onEntering:W,onExit:U,onExited:K,onExiting:Z,addEndListener:J,nodeRef:G,timeout:E==="auto"?null:E,...D,children:(pe,{ownerState:we,...ke})=>{const Ae={...T,state:pe};return m.jsx(ie,{...le,className:Oe(le.className,{entered:M.entered,exited:!c&&$==="0px"&&M.hidden}[pe]),ownerState:Ae,...ke,children:m.jsx(te,{...ne,ownerState:Ae,children:m.jsx(oe,{...ue,ownerState:Ae,children:o})})})}})});Ka&&(Ka.muiSupportAuto=!0);const Ya=O.createContext({});function jbe(e){return Qe("MuiList",e)}tt("MuiList",["root","padding","dense","subheader"]);const $be=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ze({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},jbe,t)},Nbe=me("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),yu=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...c}=r,f=O.useMemo(()=>({dense:a}),[a]),h={...r,component:s,dense:a,disablePadding:l},g=$be(h);return m.jsx(Ya.Provider,{value:f,children:m.jsxs(Nbe,{as:s,className:Oe(g.root,o),ref:n,ownerState:h,...c,children:[u,i]})})});function Lbe(e){return Qe("MuiListItem",e)}tt("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function Fbe(e){return Qe("MuiListItemButton",e)}const um=tt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Bbe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},zbe=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,u=Ze({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Fbe,n);return{...n,...u}},Ube=me(pa,{shouldForwardProp:e=>ro(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Bbe})(qe(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${um.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${um.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${um.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${um.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${um.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Hbe=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:f,selected:h=!1,className:g,...y}=r,b=O.useContext(Ya),v=O.useMemo(()=>({dense:l||b.dense||!1,alignItems:i,disableGutters:u}),[i,b.dense,l,u]),S=O.useRef(null);zo(()=>{o&&S.current&&S.current.focus()},[o]);const C={...r,alignItems:i,dense:v.dense,disableGutters:u,divider:c,selected:h},w=zbe(C),A=Tr(S,n);return m.jsx(Ya.Provider,{value:v,children:m.jsx(Ube,{ref:A,href:y.href||y.to,component:(y.href||y.to)&&s==="div"?"button":s,focusVisibleClassName:Oe(w.focusVisible,f),ownerState:C,className:Oe(w.root,g),...y,classes:w,children:a})})});function Vbe(e){return Qe("MuiListItemSecondaryAction",e)}tt("MuiListItemSecondaryAction",["root","disableGutters"]);const Wbe=e=>{const{disableGutters:t,classes:n}=e;return Ze({root:["root",t&&"disableGutters"]},Vbe,n)},qbe=me("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),LI=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemSecondaryAction"}),{className:i,...o}=r,s=O.useContext(Ya),a={...r,disableGutters:s.disableGutters},l=Wbe(a);return m.jsx(qbe,{className:Oe(l.root,i),ownerState:a,ref:n,...o})});LI.muiName="ListItemSecondaryAction";const Gbe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},Kbe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:s,hasSecondaryAction:a}=e;return Ze({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",s&&"divider",t==="flex-start"&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},Lbe,n)},Ybe=me("div",{name:"MuiListItem",slot:"Root",overridesResolver:Gbe})(qe(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${um.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Xbe=me("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),pf=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItem"}),{alignItems:i="center",children:o,className:s,component:a,components:l={},componentsProps:u={},ContainerComponent:c="li",ContainerProps:{className:f,...h}={},dense:g=!1,disableGutters:y=!1,disablePadding:b=!1,divider:v=!1,secondaryAction:S,slotProps:C={},slots:w={},...A}=r,E=O.useContext(Ya),_=O.useMemo(()=>({dense:g||E.dense||!1,alignItems:i,disableGutters:y}),[i,E.dense,g,y]),D=O.useRef(null),T=O.Children.toArray(o),M=T.length&&n1(T[T.length-1],["ListItemSecondaryAction"]),L={...r,alignItems:i,dense:_.dense,disableGutters:y,disablePadding:b,divider:v,hasSecondaryAction:M},j=Kbe(L),I=Tr(D,n),N={slots:w,slotProps:C},[$,z]=ut("secondaryAction",{elementType:LI,externalForwardedProps:N,ownerState:L,className:j.secondaryAction}),F=w.root||l.Root||Ybe,G=C.root||u.root||{},V={className:Oe(j.root,G.className,s),...A};let H=a||"li";return M?(H=!V.component&&!a?"div":H,c==="li"&&(H==="li"?H="div":V.component==="li"&&(V.component="div")),m.jsx(Ya.Provider,{value:_,children:m.jsxs(Xbe,{as:c,className:Oe(j.container,f),ref:I,ownerState:L,...h,children:[m.jsx(F,{...G,...!iu(F)&&{as:H,ownerState:{...L,...G.ownerState}},...V,children:T}),T.pop()]})})):m.jsx(Ya.Provider,{value:_,children:m.jsxs(F,{...G,as:H,ref:I,...!iu(F)&&{ownerState:{...L,...G.ownerState}},...V,children:[T,S&&m.jsx($,{...z,children:S})]})})});function Jbe(e){return Qe("MuiListItemIcon",e)}const JF=tt("MuiListItemIcon",["root","alignItemsFlexStart"]),Qbe=e=>{const{alignItems:t,classes:n}=e;return Ze({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Jbe,n)},Zbe=me("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(qe(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Hl=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemIcon"}),{className:i,...o}=r,s=O.useContext(Ya),a={...r,alignItems:s.alignItems},l=Qbe(a);return m.jsx(Zbe,{className:Oe(l.root,i),ownerState:a,ref:n,...o})});function eve(e){return Qe("MuiListItemText",e)}const mm=tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),tve=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Ze({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},eve,t)},nve=me("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mm.primary}`]:t.primary},{[`& .${mm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${KF.root}:where(& .${mm.primary})`]:{display:"block"},[`.${KF.root}:where(& .${mm.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),za=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:f,slots:h={},slotProps:g={},...y}=r,{dense:b}=O.useContext(Ya);let v=l??i,S=c;const C={...r,disableTypography:s,inset:a,primary:!!v,secondary:!!S,dense:b},w=tve(C),A={slots:h,slotProps:{primary:u,secondary:f,...g}},[E,_]=ut("root",{className:Oe(w.root,o),elementType:nve,externalForwardedProps:{...A,...y},ownerState:C,ref:n}),[D,T]=ut("primary",{className:w.primary,elementType:re,externalForwardedProps:A,ownerState:C}),[M,L]=ut("secondary",{className:w.secondary,elementType:re,externalForwardedProps:A,ownerState:C});return v!=null&&v.type!==re&&!s&&(v=m.jsx(D,{variant:b?"body2":"body1",component:T?.variant?void 0:"span",...T,children:v})),S!=null&&S.type!==re&&!s&&(S=m.jsx(M,{variant:"body2",color:"textSecondary",...L,children:S})),m.jsxs(E,{..._,children:[v,S]})}),Ut=Yge({createStyledComponent:me("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>it({props:e,name:"MuiStack"})});var is="top",ma="bottom",ga="right",os="left",FI="auto",pv=[is,ma,ga,os],ig="start",K1="end",rve="clippingParents",$X="viewport",uy="popper",ive="reference",QF=pv.reduce(function(e,t){return e.concat([t+"-"+ig,t+"-"+K1])},[]),NX=[].concat(pv,[FI]).reduce(function(e,t){return e.concat([t,t+"-"+ig,t+"-"+K1])},[]),ove="beforeRead",sve="read",ave="afterRead",lve="beforeMain",uve="main",cve="afterMain",dve="beforeWrite",fve="write",hve="afterWrite",pve=[ove,sve,ave,lve,uve,cve,dve,fve,hve];function du(e){return e?(e.nodeName||"").toLowerCase():null}function Ls(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Th(e){var t=Ls(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=Ls(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function BI(e){if(typeof ShadowRoot>"u")return!1;var t=Ls(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mve(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ca(o)||!du(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function gve(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!ca(i)||!du(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const yve={name:"applyStyles",enabled:!0,phase:"write",fn:mve,effect:gve,requires:["computeStyles"]};function ou(e){return e.split("-")[0]}var Sh=Math.max,UC=Math.min,og=Math.round;function OT(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function LX(){return!/^((?!chrome|android).)*safari/i.test(OT())}function sg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ca(e)&&(i=e.offsetWidth>0&&og(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&og(r.height)/e.offsetHeight||1);var s=Th(e)?Ls(e):window,a=s.visualViewport,l=!LX()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:c,right:u+f,bottom:c+h,left:u,x:u,y:c}}function zI(e){var t=sg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function FX(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&BI(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yc(e){return Ls(e).getComputedStyle(e)}function bve(e){return["table","td","th"].indexOf(du(e))>=0}function mf(e){return((Th(e)?e.ownerDocument:e.document)||window.document).documentElement}function r3(e){return du(e)==="html"?e:e.assignedSlot||e.parentNode||(BI(e)?e.host:null)||mf(e)}function ZF(e){return!ca(e)||yc(e).position==="fixed"?null:e.offsetParent}function vve(e){var t=/firefox/i.test(OT()),n=/Trident/i.test(OT());if(n&&ca(e)){var r=yc(e);if(r.position==="fixed")return null}var i=r3(e);for(BI(i)&&(i=i.host);ca(i)&&["html","body"].indexOf(du(i))<0;){var o=yc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function mv(e){for(var t=Ls(e),n=ZF(e);n&&bve(n)&&yc(n).position==="static";)n=ZF(n);return n&&(du(n)==="html"||du(n)==="body"&&yc(n).position==="static")?t:n||vve(e)||t}function UI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function i1(e,t,n){return Sh(e,UC(t,n))}function xve(e,t,n){var r=i1(e,t,n);return r>n?n:r}function BX(){return{top:0,right:0,bottom:0,left:0}}function zX(e){return Object.assign({},BX(),e)}function UX(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Sve=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zX(typeof t!="number"?t:UX(t,pv))};function wve(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ou(n.placement),l=UI(a),u=[os,ga].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var f=Sve(i.padding,n),h=zI(o),g=l==="y"?is:os,y=l==="y"?ma:ga,b=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],v=s[l]-n.rects.reference[l],S=mv(o),C=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,w=b/2-v/2,A=f[g],E=C-h[c]-f[y],_=C/2-h[c]/2+w,D=i1(A,_,E),T=l;n.modifiersData[r]=(t={},t[T]=D,t.centerOffset=D-_,t)}}function Cve(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||FX(t.elements.popper,i)&&(t.elements.arrow=i))}const Eve={name:"arrow",enabled:!0,phase:"main",fn:wve,effect:Cve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ag(e){return e.split("-")[1]}var Ave={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kve(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:og(n*i)/i||0,y:og(r*i)/i||0}}function e7(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,h=s.x,g=h===void 0?0:h,y=s.y,b=y===void 0?0:y,v=typeof c=="function"?c({x:g,y:b}):{x:g,y:b};g=v.x,b=v.y;var S=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),w=os,A=is,E=window;if(u){var _=mv(n),D="clientHeight",T="clientWidth";if(_===Ls(n)&&(_=mf(n),yc(_).position!=="static"&&a==="absolute"&&(D="scrollHeight",T="scrollWidth")),_=_,i===is||(i===os||i===ga)&&o===K1){A=ma;var M=f&&_===E&&E.visualViewport?E.visualViewport.height:_[D];b-=M-r.height,b*=l?1:-1}if(i===os||(i===is||i===ma)&&o===K1){w=ga;var L=f&&_===E&&E.visualViewport?E.visualViewport.width:_[T];g-=L-r.width,g*=l?1:-1}}var j=Object.assign({position:a},u&&Ave),I=c===!0?kve({x:g,y:b},Ls(n)):{x:g,y:b};if(g=I.x,b=I.y,l){var N;return Object.assign({},j,(N={},N[A]=C?"0":"",N[w]=S?"0":"",N.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",N))}return Object.assign({},j,(t={},t[A]=C?b+"px":"",t[w]=S?g+"px":"",t.transform="",t))}function _ve(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:ou(t.placement),variation:ag(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,e7(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,e7(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Dve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_ve,data:{}};var C2={passive:!0};function Ove(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Ls(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,C2)}),a&&l.addEventListener("resize",n.update,C2),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,C2)}),a&&l.removeEventListener("resize",n.update,C2)}}const Tve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ove,data:{}};var Rve={left:"right",right:"left",bottom:"top",top:"bottom"};function Pw(e){return e.replace(/left|right|bottom|top/g,function(t){return Rve[t]})}var Ive={start:"end",end:"start"};function t7(e){return e.replace(/start|end/g,function(t){return Ive[t]})}function HI(e){var t=Ls(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function VI(e){return sg(mf(e)).left+HI(e).scrollLeft}function Mve(e,t){var n=Ls(e),r=mf(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=LX();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+VI(e),y:l}}function Pve(e){var t,n=mf(e),r=HI(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Sh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Sh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+VI(e),l=-r.scrollTop;return yc(i||n).direction==="rtl"&&(a+=Sh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function WI(e){var t=yc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function HX(e){return["html","body","#document"].indexOf(du(e))>=0?e.ownerDocument.body:ca(e)&&WI(e)?e:HX(r3(e))}function o1(e,t){var n;t===void 0&&(t=[]);var r=HX(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ls(r),s=i?[o].concat(o.visualViewport||[],WI(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(o1(r3(s)))}function TT(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jve(e,t){var n=sg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function n7(e,t,n){return t===$X?TT(Mve(e,n)):Th(t)?jve(t,n):TT(Pve(mf(e)))}function $ve(e){var t=o1(r3(e)),n=["absolute","fixed"].indexOf(yc(e).position)>=0,r=n&&ca(e)?mv(e):e;return Th(r)?t.filter(function(i){return Th(i)&&FX(i,r)&&du(i)!=="body"}):[]}function Nve(e,t,n,r){var i=t==="clippingParents"?$ve(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=n7(e,u,r);return l.top=Sh(c.top,l.top),l.right=UC(c.right,l.right),l.bottom=UC(c.bottom,l.bottom),l.left=Sh(c.left,l.left),l},n7(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function VX(e){var t=e.reference,n=e.element,r=e.placement,i=r?ou(r):null,o=r?ag(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case is:l={x:s,y:t.y-n.height};break;case ma:l={x:s,y:t.y+t.height};break;case ga:l={x:t.x+t.width,y:a};break;case os:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?UI(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ig:l[u]=l[u]-(t[c]/2-n[c]/2);break;case K1:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function Y1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?rve:a,u=n.rootBoundary,c=u===void 0?$X:u,f=n.elementContext,h=f===void 0?uy:f,g=n.altBoundary,y=g===void 0?!1:g,b=n.padding,v=b===void 0?0:b,S=zX(typeof v!="number"?v:UX(v,pv)),C=h===uy?ive:uy,w=e.rects.popper,A=e.elements[y?C:h],E=Nve(Th(A)?A:A.contextElement||mf(e.elements.popper),l,c,s),_=sg(e.elements.reference),D=VX({reference:_,element:w,placement:i}),T=TT(Object.assign({},w,D)),M=h===uy?T:_,L={top:E.top-M.top+S.top,bottom:M.bottom-E.bottom+S.bottom,left:E.left-M.left+S.left,right:M.right-E.right+S.right},j=e.modifiersData.offset;if(h===uy&&j){var I=j[i];Object.keys(L).forEach(function(N){var $=[ga,ma].indexOf(N)>=0?1:-1,z=[is,ma].indexOf(N)>=0?"y":"x";L[N]+=I[z]*$})}return L}function Lve(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?NX:l,c=ag(r),f=c?a?QF:QF.filter(function(y){return ag(y)===c}):pv,h=f.filter(function(y){return u.indexOf(y)>=0});h.length===0&&(h=f);var g=h.reduce(function(y,b){return y[b]=Y1(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[ou(b)],y},{});return Object.keys(g).sort(function(y,b){return g[y]-g[b]})}function Fve(e){if(ou(e)===FI)return[];var t=Pw(e);return[t7(e),t,t7(t)]}function Bve(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,b=n.allowedAutoPlacements,v=t.options.placement,S=ou(v),C=S===v,w=l||(C||!y?[Pw(v)]:Fve(v)),A=[v].concat(w).reduce(function(U,K){return U.concat(ou(K)===FI?Lve(t,{placement:K,boundary:c,rootBoundary:f,padding:u,flipVariations:y,allowedAutoPlacements:b}):K)},[]),E=t.rects.reference,_=t.rects.popper,D=new Map,T=!0,M=A[0],L=0;L<A.length;L++){var j=A[L],I=ou(j),N=ag(j)===ig,$=[is,ma].indexOf(I)>=0,z=$?"width":"height",F=Y1(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:h,padding:u}),G=$?N?ga:os:N?ma:is;E[z]>_[z]&&(G=Pw(G));var V=Pw(G),H=[];if(o&&H.push(F[I]<=0),a&&H.push(F[G]<=0,F[V]<=0),H.every(function(U){return U})){M=j,T=!1;break}D.set(j,H)}if(T)for(var X=y?3:1,B=function(K){var Z=A.find(function(J){var Q=D.get(J);if(Q)return Q.slice(0,K).every(function(ie){return ie})});if(Z)return M=Z,"break"},W=X;W>0;W--){var Y=B(W);if(Y==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const zve={name:"flip",enabled:!0,phase:"main",fn:Bve,requiresIfExists:["offset"],data:{_skip:!1}};function r7(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function i7(e){return[is,ga,ma,os].some(function(t){return e[t]>=0})}function Uve(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Y1(t,{elementContext:"reference"}),a=Y1(t,{altBoundary:!0}),l=r7(s,r),u=r7(a,i,o),c=i7(l),f=i7(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const Hve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Uve};function Vve(e,t,n){var r=ou(e),i=[os,is].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[os,ga].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Wve(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=NX.reduce(function(c,f){return c[f]=Vve(f,t.rects,o),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const qve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Wve};function Gve(e){var t=e.state,n=e.name;t.modifiersData[n]=VX({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Kve={name:"popperOffsets",enabled:!0,phase:"read",fn:Gve,data:{}};function Yve(e){return e==="x"?"y":"x"}function Xve(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,g=h===void 0?!0:h,y=n.tetherOffset,b=y===void 0?0:y,v=Y1(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),S=ou(t.placement),C=ag(t.placement),w=!C,A=UI(S),E=Yve(A),_=t.modifiersData.popperOffsets,D=t.rects.reference,T=t.rects.popper,M=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,L=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(_){if(o){var N,$=A==="y"?is:os,z=A==="y"?ma:ga,F=A==="y"?"height":"width",G=_[A],V=G+v[$],H=G-v[z],X=g?-T[F]/2:0,B=C===ig?D[F]:T[F],W=C===ig?-T[F]:-D[F],Y=t.elements.arrow,U=g&&Y?zI(Y):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:BX(),Z=K[$],J=K[z],Q=i1(0,D[F],U[F]),ie=w?D[F]/2-X-Q-Z-L.mainAxis:B-Q-Z-L.mainAxis,le=w?-D[F]/2+X+Q+J+L.mainAxis:W+Q+J+L.mainAxis,te=t.elements.arrow&&mv(t.elements.arrow),ne=te?A==="y"?te.clientTop||0:te.clientLeft||0:0,oe=(N=j?.[A])!=null?N:0,ue=G+ie-oe-ne,pe=G+le-oe,we=i1(g?UC(V,ue):V,G,g?Sh(H,pe):H);_[A]=we,I[A]=we-G}if(a){var ke,Ae=A==="x"?is:os,Fe=A==="x"?ma:ga,Me=_[E],st=E==="y"?"height":"width",Ge=Me+v[Ae],Mt=Me-v[Fe],pt=[is,os].indexOf(S)!==-1,Be=(ke=j?.[E])!=null?ke:0,Ie=pt?Ge:Me-D[st]-T[st]-Be+L.altAxis,ze=pt?Me+D[st]+T[st]-Be-L.altAxis:Mt,Je=g&&pt?xve(Ie,Me,ze):i1(g?Ie:Ge,Me,g?ze:Mt);_[E]=Je,I[E]=Je-Me}t.modifiersData[r]=I}}const Jve={name:"preventOverflow",enabled:!0,phase:"main",fn:Xve,requiresIfExists:["offset"]};function Qve(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Zve(e){return e===Ls(e)||!ca(e)?HI(e):Qve(e)}function exe(e){var t=e.getBoundingClientRect(),n=og(t.width)/e.offsetWidth||1,r=og(t.height)/e.offsetHeight||1;return n!==1||r!==1}function txe(e,t,n){n===void 0&&(n=!1);var r=ca(t),i=ca(t)&&exe(t),o=mf(t),s=sg(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((du(t)!=="body"||WI(o))&&(a=Zve(t)),ca(t)?(l=sg(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=VI(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function nxe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function rxe(e){var t=nxe(e);return pve.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ixe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function oxe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var o7={placement:"bottom",modifiers:[],strategy:"absolute"};function s7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function sxe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?o7:i;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},o7,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],h=!1,g={state:c,setOptions:function(S){var C=typeof S=="function"?S(c.options):S;b(),c.options=Object.assign({},o,c.options,C),c.scrollParents={reference:Th(a)?o1(a):a.contextElement?o1(a.contextElement):[],popper:o1(l)};var w=rxe(oxe([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(A){return A.enabled}),y(),g.update()},forceUpdate:function(){if(!h){var S=c.elements,C=S.reference,w=S.popper;if(s7(C,w)){c.rects={reference:txe(C,mv(w),c.options.strategy==="fixed"),popper:zI(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var A=0;A<c.orderedModifiers.length;A++){if(c.reset===!0){c.reset=!1,A=-1;continue}var E=c.orderedModifiers[A],_=E.fn,D=E.options,T=D===void 0?{}:D,M=E.name;typeof _=="function"&&(c=_({state:c,options:T,name:M,instance:g})||c)}}}},update:ixe(function(){return new Promise(function(v){g.forceUpdate(),v(c)})}),destroy:function(){b(),h=!0}};if(!s7(a,l))return g;g.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function y(){c.orderedModifiers.forEach(function(v){var S=v.name,C=v.options,w=C===void 0?{}:C,A=v.effect;if(typeof A=="function"){var E=A({state:c,name:S,instance:g,options:w}),_=function(){};f.push(E||_)}})}function b(){f.forEach(function(v){return v()}),f=[]}return g}}var axe=[Tve,Kve,Dve,yve,qve,zve,Jve,Eve,Hve],lxe=sxe({defaultModifiers:axe});function Kr(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,s=i?{}:_C(n,r),{props:a,internalRef:l}=iX({...o,externalSlotProps:s}),u=Tr(l,s?.ref,e.additionalProps?.ref);return rX(t,{...a,ref:u},r)}function uxe(e){return typeof e=="function"?e():e}const WX=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=O.useState(null),l=Tr(O.isValidElement(r)?hf(r):null,n);if(zo(()=>{o||a(uxe(i)||document.body)},[i,o]),zo(()=>{if(s&&!o)return pT(n,s),()=>{pT(n,null)}},[n,s,o]),o){if(O.isValidElement(r)){const u={ref:l};return O.cloneElement(r,u)}return r}return s&&_d.createPortal(r,s)});function cxe(e){return Qe("MuiPopper",e)}tt("MuiPopper",["root"]);function dxe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function RT(e){return typeof e=="function"?e():e}function fxe(e){return e.nodeType!==void 0}const hxe=e=>{const{classes:t}=e;return Ze({root:["root"]},cxe,t)},pxe={},mxe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:c,popperRef:f,slotProps:h={},slots:g={},TransitionProps:y,ownerState:b,...v}=t,S=O.useRef(null),C=Tr(S,n),w=O.useRef(null),A=Tr(w,f),E=O.useRef(A);zo(()=>{E.current=A},[A]),O.useImperativeHandle(f,()=>w.current,[]);const _=dxe(u,o),[D,T]=O.useState(_),[M,L]=O.useState(RT(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&L(RT(r))},[r]),zo(()=>{if(!M||!l)return;const z=V=>{T(V.placement)};let F=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{z(V)}}];a!=null&&(F=F.concat(a)),c&&c.modifiers!=null&&(F=F.concat(c.modifiers));const G=lxe(M,S.current,{placement:_,...c,modifiers:F});return E.current(G),()=>{G.destroy(),E.current(null)}},[M,s,a,l,c,_]);const j={placement:D};y!==null&&(j.TransitionProps=y);const I=hxe(t),N=g.root??"div",$=Kr({elementType:N,externalSlotProps:h.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:C},ownerState:t,className:I.root});return m.jsx(N,{...$,children:typeof i=="function"?i(j):i})}),gxe=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:c,placement:f="bottom",popperOptions:h=pxe,popperRef:g,style:y,transition:b=!1,slotProps:v={},slots:S={},...C}=t,[w,A]=O.useState(!0),E=()=>{A(!1)},_=()=>{A(!0)};if(!l&&!c&&(!b||w))return null;let D;if(o)D=o;else if(r){const L=RT(r);D=L&&fxe(L)?_i(L).body:_i(null).body}const T=!c&&l&&(!b||w)?"none":void 0,M=b?{in:c,onEnter:E,onExited:_}:void 0;return m.jsx(WX,{disablePortal:a,container:D,children:m.jsx(mxe,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:b?!w:c,placement:f,popperOptions:h,popperRef:g,slotProps:v,slots:S,...C,style:{position:"fixed",top:0,left:0,display:T,...y},TransitionProps:M,children:i})})}),yxe=me(gxe,{name:"MuiPopper",slot:"Root"})({}),i3=O.forwardRef(function(t,n){const r=ff(),i=it({props:t,name:"MuiPopper"}),{anchorEl:o,component:s,components:a,componentsProps:l,container:u,disablePortal:c,keepMounted:f,modifiers:h,open:g,placement:y,popperOptions:b,popperRef:v,transition:S,slots:C,slotProps:w,...A}=i,E=C?.root??a?.Root,_={anchorEl:o,container:u,disablePortal:c,keepMounted:f,modifiers:h,open:g,placement:y,popperOptions:b,popperRef:v,transition:S,...A};return m.jsx(yxe,{as:s,direction:r?"rtl":"ltr",slots:{root:E},slotProps:w??l,..._,ref:n})});function bxe(e){return Qe("MuiTooltip",e)}const si=tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function vxe(e){return Math.round(e*1e5)/1e5}const xxe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${ye(o.split("-")[0])}`],arrow:["arrow"]};return Ze(s,bxe,t)},Sxe=me(i3,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(qe(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${si.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${si.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${si.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${si.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${si.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${si.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${si.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${si.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),wxe=me("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ye(n.placement.split("-")[0])}`]]}})(qe(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${si.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${si.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${si.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${si.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${vxe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${si.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${si.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${si.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${si.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Cxe=me("span",{name:"MuiTooltip",slot:"Arrow"})(qe(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let E2=!1;const a7=new GA;let cy={x:0,y:0};function A2(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const bn=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:s,components:a={},componentsProps:l={},describeChild:u=!1,disableFocusListener:c=!1,disableHoverListener:f=!1,disableInteractive:h=!1,disableTouchListener:g=!1,enterDelay:y=100,enterNextDelay:b=0,enterTouchDelay:v=700,followCursor:S=!1,id:C,leaveDelay:w=0,leaveTouchDelay:A=1500,onClose:E,onOpen:_,open:D,placement:T="bottom",PopperComponent:M,PopperProps:L={},slotProps:j={},slots:I={},title:N,TransitionComponent:$,TransitionProps:z,...F}=r,G=O.isValidElement(o)?o:m.jsx("span",{children:o}),V=ka(),H=ff(),[X,B]=O.useState(),[W,Y]=O.useState(null),U=O.useRef(!1),K=h||S,Z=Dd(),J=Dd(),Q=Dd(),ie=Dd(),[le,te]=Ga({controlled:D,default:!1,name:"Tooltip",state:"open"});let ne=le;const oe=Oc(C),ue=O.useRef(),pe=Li(()=>{ue.current!==void 0&&(document.body.style.WebkitUserSelect=ue.current,ue.current=void 0),ie.clear()});O.useEffect(()=>pe,[pe]);const we=xt=>{a7.clear(),E2=!0,te(!0),_&&!ne&&_(xt)},ke=Li(xt=>{a7.start(800+w,()=>{E2=!1}),te(!1),E&&ne&&E(xt),Z.start(V.transitions.duration.shortest,()=>{U.current=!1})}),Ae=xt=>{U.current&&xt.type!=="touchstart"||(X&&X.removeAttribute("title"),J.clear(),Q.clear(),y||E2&&b?J.start(E2?b:y,()=>{we(xt)}):we(xt))},Fe=xt=>{J.clear(),Q.start(w,()=>{ke(xt)})},[,Me]=O.useState(!1),st=xt=>{qd(xt.target)||(Me(!1),Fe(xt))},Ge=xt=>{X||B(xt.currentTarget),qd(xt.target)&&(Me(!0),Ae(xt))},Mt=xt=>{U.current=!0;const pn=G.props;pn.onTouchStart&&pn.onTouchStart(xt)},pt=xt=>{Mt(xt),Q.clear(),Z.clear(),pe(),ue.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ie.start(v,()=>{document.body.style.WebkitUserSelect=ue.current,Ae(xt)})},Be=xt=>{G.props.onTouchEnd&&G.props.onTouchEnd(xt),pe(),Q.start(A,()=>{ke(xt)})};O.useEffect(()=>{if(!ne)return;function xt(pn){pn.key==="Escape"&&ke(pn)}return document.addEventListener("keydown",xt),()=>{document.removeEventListener("keydown",xt)}},[ke,ne]);const Ie=Tr(hf(G),B,n);!N&&N!==0&&(ne=!1);const ze=O.useRef(),Je=xt=>{const pn=G.props;pn.onMouseMove&&pn.onMouseMove(xt),cy={x:xt.clientX,y:xt.clientY},ze.current&&ze.current.update()},nt={},ot=typeof N=="string";u?(nt.title=!ne&&ot&&!f?N:null,nt["aria-describedby"]=ne?oe:null):(nt["aria-label"]=ot?N:null,nt["aria-labelledby"]=ne&&!ot?oe:null);const Ye={...nt,...F,...G.props,className:Oe(F.className,G.props.className),onTouchStart:Mt,ref:Ie,...S?{onMouseMove:Je}:{}},Nt={};g||(Ye.onTouchStart=pt,Ye.onTouchEnd=Be),f||(Ye.onMouseOver=A2(Ae,Ye.onMouseOver),Ye.onMouseLeave=A2(Fe,Ye.onMouseLeave),K||(Nt.onMouseOver=Ae,Nt.onMouseLeave=Fe)),c||(Ye.onFocus=A2(Ge,Ye.onFocus),Ye.onBlur=A2(st,Ye.onBlur),K||(Nt.onFocus=Ge,Nt.onBlur=st));const Lt={...r,isRtl:H,arrow:i,disableInteractive:K,placement:T,PopperComponentProp:M,touch:U.current},_t=typeof j.popper=="function"?j.popper(Lt):j.popper,Xn=O.useMemo(()=>{let xt=[{name:"arrow",enabled:!!W,options:{element:W,padding:4}}];return L.popperOptions?.modifiers&&(xt=xt.concat(L.popperOptions.modifiers)),_t?.popperOptions?.modifiers&&(xt=xt.concat(_t.popperOptions.modifiers)),{...L.popperOptions,..._t?.popperOptions,modifiers:xt}},[W,L.popperOptions,_t?.popperOptions]),rn=xxe(Lt),lt=typeof j.transition=="function"?j.transition(Lt):j.transition,zt={slots:{popper:a.Popper,transition:a.Transition??$,tooltip:a.Tooltip,arrow:a.Arrow,...I},slotProps:{arrow:j.arrow??l.arrow,popper:{...L,..._t??l.popper},tooltip:j.tooltip??l.tooltip,transition:{...z,...lt??l.transition}}},[_n,Gn]=ut("popper",{elementType:Sxe,externalForwardedProps:zt,ownerState:Lt,className:Oe(rn.popper,L?.className)}),[yr,kt]=ut("transition",{elementType:V1,externalForwardedProps:zt,ownerState:Lt}),[Pt,Qt]=ut("tooltip",{elementType:wxe,className:rn.tooltip,externalForwardedProps:zt,ownerState:Lt}),[Pn,on]=ut("arrow",{elementType:Cxe,className:rn.arrow,externalForwardedProps:zt,ownerState:Lt,ref:Y});return m.jsxs(O.Fragment,{children:[O.cloneElement(G,Ye),m.jsx(_n,{as:M??i3,placement:T,anchorEl:S?{getBoundingClientRect:()=>({top:cy.y,left:cy.x,right:cy.x,bottom:cy.y,width:0,height:0})}:X,popperRef:ze,open:X?ne:!1,id:oe,transition:!0,...Nt,...Gn,popperOptions:Xn,children:({TransitionProps:xt})=>m.jsx(yr,{timeout:V.transitions.duration.shorter,...xt,...kt,children:m.jsxs(Pt,{...Qt,children:[N,i?m.jsx(Pn,{...on}):null]})})})]})}),Exe=De(m.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Axe=me(pa,{name:"MuiBreadcrumbCollapsed"})(qe(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:U1(e.palette.grey[200],.12)}:{backgroundColor:U1(e.palette.grey[600],.12)}}}))),kxe=me(Exe)({width:24,height:16});function _xe(e){const{slots:t={},slotProps:n={},...r}=e,i=e;return m.jsx("li",{children:m.jsx(Axe,{focusRipple:!0,...r,ownerState:i,children:m.jsx(kxe,{as:t.CollapsedIcon,ownerState:i,...n.collapsedIcon})})})}function Dxe(e){return Qe("MuiBreadcrumbs",e)}const Oxe=tt("MuiBreadcrumbs",["root","ol","li","separator"]),Txe=e=>{const{classes:t}=e;return Ze({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Dxe,t)},Rxe=me(re,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Oxe.li}`]:t.li},t.root]})({}),Ixe=me("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Mxe=me("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Pxe(e,t,n,r){return e.reduce((i,o,s)=>(s<e.length-1?i=i.concat(o,m.jsx(Mxe,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${s}`)):i.push(o),i),[])}const jxe=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiBreadcrumbs"}),{children:i,className:o,component:s="nav",slots:a={},slotProps:l={},expandText:u="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:f=1,maxItems:h=8,separator:g="/",...y}=r,[b,v]=O.useState(!1),S={...r,component:s,expanded:b,expandText:u,itemsAfterCollapse:c,itemsBeforeCollapse:f,maxItems:h,separator:g},C=Txe(S),w=Kr({elementType:a.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:S}),A=O.useRef(null),E=D=>{const T=()=>{v(!0);const M=A.current.querySelector("a[href],button,[tabindex]");M&&M.focus()};return f+c>=D.length?D:[...D.slice(0,f),m.jsx(_xe,{"aria-label":u,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:T},"ellipsis"),...D.slice(D.length-c,D.length)]},_=O.Children.toArray(i).filter(D=>O.isValidElement(D)).map((D,T)=>m.jsx("li",{className:C.li,children:D},`child-${T}`));return m.jsx(Rxe,{ref:n,component:s,color:"textSecondary",className:Oe(C.root,o),ownerState:S,...y,children:m.jsx(Ixe,{className:C.ol,ref:A,ownerState:S,children:Pxe(b||h&&_.length<=h?_:E(_),C.separator,g,S)})})});function $xe(e){return Qe("MuiLink",e)}const Nxe=tt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Lxe=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const o=Il(e,`palette.${n}.main`)||Il(e,`palette.${n}`)||t.color;return e.alpha(o,.4)}const r=Il(e,`palette.${n}.main`,!1)||Il(e,`palette.${n}`,!1)||t.color,i=Il(e,`palette.${n}.mainChannel`)||Il(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Ul(r,.4)},l7={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Fxe=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${ye(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Ze(o,$xe,t)},Bxe=me(re,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ye(n.underline)}`],n.component==="button"&&t.button]}})(qe(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Ln()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Nxe.focusVisible}`]:{outline:"auto"}}}]}))),o3=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiLink"}),i=ka(),{className:o,color:s="primary",component:a="a",onBlur:l,onFocus:u,TypographyClasses:c,underline:f="always",variant:h="inherit",sx:g,...y}=r,[b,v]=O.useState(!1),S=E=>{qd(E.target)||v(!1),l&&l(E)},C=E=>{qd(E.target)&&v(!0),u&&u(E)},w={...r,color:s,component:a,focusVisible:b,underline:f,variant:h},A=Fxe(w);return m.jsx(Bxe,{color:s,className:Oe(A.root,o),classes:c,component:a,onBlur:S,onFocus:C,ref:n,ownerState:w,variant:h,...y,sx:[...l7[s]===void 0?[{color:s}]:[],...Array.isArray(g)?g:[g]],style:{...y.style,...f==="always"&&s!=="inherit"&&!l7[s]&&{"--Link-underlineColor":Lxe({theme:i,ownerState:w})}}})}),zxe=({name:e,to:t})=>m.jsx(o3,{color:"inherit",underline:"hover",component:Dc,to:t,children:e}),s3=({items:e})=>m.jsx(jxe,{separator:"›",children:e.map((t,n)=>m.jsx(zxe,{...t},n.toString()))}),bc=De(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),wh=De(m.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),ss=De(m.jsx("path",{d:"M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z"})),a3=De(m.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),qX=De(m.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),l3=De(m.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"})),qI=De(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),jw=De(m.jsx("path",{d:"M15 21h-2v-2h2zm-2-7h-2v5h2zm8-2h-2v4h2zm-2-2h-2v2h2zM7 12H5v2h2zm-2-2H3v2h2zm7-5h2V3h-2zm-7.5-.5v3h3v-3zM9 9H3V3h6zm-4.5 7.5v3h3v-3zM9 21H3v-6h6zm7.5-16.5v3h3v-3zM21 9h-6V3h6zm-2 10v-3h-4v2h2v3h4v-2zm-2-7h-4v2h4zm-4-2H7v2h2v2h2v-2h2zm1-1V7h-2V5h-2v4zM6.75 5.25h-1.5v1.5h1.5zm0 12h-1.5v1.5h1.5zm12-12h-1.5v1.5h1.5z"})),GX=De(m.jsx("path",{d:"M19 13H5v-2h14z"})),u3=De(m.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"})),Kd=De([m.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),m.jsx("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")]),KX=De(m.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"})),Uxe=De(m.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function Hxe(e){return Qe("MuiAvatar",e)}tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Vxe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ze({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Hxe,t)},Wxe=me("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(qe(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),qxe=me("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Gxe=me(Uxe,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function Kxe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,o]=O.useState(!1);return O.useEffect(()=>{if(!n&&!r)return;o(!1);let s=!0;const a=new Image;return a.onload=()=>{s&&o("loaded")},a.onerror=()=>{s&&o("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),i}const rl=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatar"}),{alt:i,children:o,className:s,component:a="div",slots:l={},slotProps:u={},imgProps:c,sizes:f,src:h,srcSet:g,variant:y="circular",...b}=r;let v=null;const S={...r,component:a,variant:y},C=Kxe({...c,...typeof u.img=="function"?u.img(S):u.img,src:h,srcSet:g}),w=h||g,A=w&&C!=="error";S.colorDefault=!A,delete S.ownerState;const E=Vxe(S),[_,D]=ut("root",{ref:n,className:Oe(E.root,s),elementType:Wxe,externalForwardedProps:{slots:l,slotProps:u,component:a,...b},ownerState:S}),[T,M]=ut("img",{className:E.img,elementType:qxe,externalForwardedProps:{slots:l,slotProps:{img:{...c,...u.img}}},additionalProps:{alt:i,src:h,srcSet:g,sizes:f},ownerState:S}),[L,j]=ut("fallback",{className:E.fallback,elementType:Gxe,externalForwardedProps:{slots:l,slotProps:u},shouldForwardComponentProp:!0,ownerState:S});return A?v=m.jsx(T,{...M}):o||o===0?v=o:w&&i?v=i[0]:v=m.jsx(L,{...j}),m.jsx(_,{...D,children:v})});function Yxe(e){return Qe("MuiCard",e)}tt("MuiCard",["root"]);const Xxe=e=>{const{classes:t}=e;return Ze({root:["root"]},Yxe,t)},Jxe=me(Nr,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),er=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=Xxe(a);return m.jsx(Jxe,{className:Oe(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function Qxe(e){return Qe("MuiCardContent",e)}tt("MuiCardContent",["root"]);const Zxe=e=>{const{classes:t}=e;return Ze({root:["root"]},Qxe,t)},e2e=me("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),gr=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=Zxe(a);return m.jsx(e2e,{as:o,className:Oe(l.root,i),ownerState:a,ref:n,...s})}),t2e=De(m.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 n2e(e){return Qe("MuiChip",e)}const Cn=tt("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"]),r2e=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,u={root:["root",l,n&&"disabled",`size${ye(r)}`,`color${ye(i)}`,a&&"clickable",a&&`clickableColor${ye(i)}`,s&&"deletable",s&&`deletableColor${ye(i)}`,`${l}${ye(i)}`],label:["label",`label${ye(r)}`],avatar:["avatar",`avatar${ye(r)}`,`avatarColor${ye(i)}`],icon:["icon",`icon${ye(r)}`,`iconColor${ye(o)}`],deleteIcon:["deleteIcon",`deleteIcon${ye(r)}`,`deleteIconColor${ye(i)}`,`deleteIcon${ye(l)}Color${ye(i)}`]};return Ze(u,n2e,t)},i2e=me("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[{[`& .${Cn.avatar}`]:t.avatar},{[`& .${Cn.avatar}`]:t[`avatar${ye(a)}`]},{[`& .${Cn.avatar}`]:t[`avatarColor${ye(r)}`]},{[`& .${Cn.icon}`]:t.icon},{[`& .${Cn.icon}`]:t[`icon${ye(a)}`]},{[`& .${Cn.icon}`]:t[`iconColor${ye(i)}`]},{[`& .${Cn.deleteIcon}`]:t.deleteIcon},{[`& .${Cn.deleteIcon}`]:t[`deleteIcon${ye(a)}`]},{[`& .${Cn.deleteIcon}`]:t[`deleteIconColor${ye(r)}`]},{[`& .${Cn.deleteIcon}`]:t[`deleteIcon${ye(l)}Color${ye(r)}`]},t.root,t[`size${ye(a)}`],t[`color${ye(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${ye(r)}`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ye(r)}`],t[l],t[`${l}${ye(r)}`]]}})(qe(({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",[`&.${Cn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Cn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Cn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Cn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Cn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Cn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Cn.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,[`& .${Cn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Cn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Ln(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Cn.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:{[`& .${Cn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Cn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Cn.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(Ln(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Cn.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}`)},[`&.${Cn.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(Ln(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Cn.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]}`,[`&.${Cn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Cn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Cn.avatar}`]:{marginLeft:4},[`& .${Cn.avatarSmall}`]:{marginLeft:2},[`& .${Cn.icon}`]:{marginLeft:4},[`& .${Cn.iconSmall}`]:{marginLeft:2},[`& .${Cn.deleteIcon}`]:{marginRight:5},[`& .${Cn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Ln()).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)}`,[`&.${Cn.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Cn.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Cn.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),o2e=me("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ye(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 u7(e){return e.key==="Backspace"||e.key==="Delete"}const Et=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:c=!1,icon:f,label:h,onClick:g,onDelete:y,onKeyDown:b,onKeyUp:v,size:S="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:A=!1,slots:E={},slotProps:_={},...D}=r,T=O.useRef(null),M=Tr(T,n),L=Z=>{Z.stopPropagation(),y(Z)},j=Z=>{Z.currentTarget===Z.target&&u7(Z)&&Z.preventDefault(),b&&b(Z)},I=Z=>{Z.currentTarget===Z.target&&y&&u7(Z)&&y(Z),v&&v(Z)},N=s!==!1&&g?!0:s,$=N||y?pa:l||"div",z={...r,component:$,disabled:c,size:S,color:a,iconColor:O.isValidElement(f)&&f.props.color||a,onDelete:!!y,clickable:N,variant:C},F=r2e(z),G=$===pa?{component:l||"div",focusVisibleClassName:F.focusVisible,...y&&{disableRipple:!0}}:{};let V=null;y&&(V=u&&O.isValidElement(u)?O.cloneElement(u,{className:Oe(u.props.className,F.deleteIcon),onClick:L}):m.jsx(t2e,{className:F.deleteIcon,onClick:L}));let H=null;i&&O.isValidElement(i)&&(H=O.cloneElement(i,{className:Oe(F.avatar,i.props.className)}));let X=null;f&&O.isValidElement(f)&&(X=O.cloneElement(f,{className:Oe(F.icon,f.props.className)}));const B={slots:E,slotProps:_},[W,Y]=ut("root",{elementType:i2e,externalForwardedProps:{...B,...D},ownerState:z,shouldForwardComponentProp:!0,ref:M,className:Oe(F.root,o),additionalProps:{disabled:N&&c?!0:void 0,tabIndex:A&&c?-1:w,...G},getSlotProps:Z=>({...Z,onClick:J=>{Z.onClick?.(J),g?.(J)},onKeyDown:J=>{Z.onKeyDown?.(J),j(J)},onKeyUp:J=>{Z.onKeyUp?.(J),I(J)}})}),[U,K]=ut("label",{elementType:o2e,externalForwardedProps:B,ownerState:z,className:F.label});return m.jsxs(W,{as:$,...Y,children:[H||X,m.jsx(U,{...K,children:h}),V]})});function YX(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function s2e(e){const t=_i(e);return t.body===e?tl(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function s1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function c7(e){return parseFloat(tl(e).getComputedStyle(e).paddingRight)||0}function a2e(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function d7(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=!o.includes(s),l=!a2e(s);a&&l&&s1(s,i)})}function k4(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function l2e(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(s2e(r)){const s=YX(tl(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${c7(r)+s}px`;const a=_i(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${c7(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=_i(r).body;else{const s=r.parentElement,a=tl(r);o=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function u2e(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class c2e{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&s1(t.modalRef,!1);const i=u2e(n);d7(n,t.mount,t.modalRef,i,!0);const o=k4(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=k4(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=l2e(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=k4(this.containers,s=>s.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&s1(t.modalRef,n),d7(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&s1(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Fy(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const d2e=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function f2e(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function h2e(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function p2e(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||h2e(e))}function m2e(e){const t=[],n=[];return Array.from(e.querySelectorAll(d2e)).forEach((r,i)=>{const o=f2e(r);o===-1||!p2e(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function g2e(){return!0}function y2e(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=m2e,isEnabled:s=g2e,open:a}=e,l=O.useRef(!1),u=O.useRef(null),c=O.useRef(null),f=O.useRef(null),h=O.useRef(null),g=O.useRef(!1),y=O.useRef(null),b=Tr(hf(t),y),v=O.useRef(null);O.useEffect(()=>{!a||!y.current||(g.current=!n)},[n,a]),O.useEffect(()=>{if(!a||!y.current)return;const w=_i(y.current),A=Fy(w);return y.current.contains(A)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),g.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),O.useEffect(()=>{if(!a||!y.current)return;const w=_i(y.current),A=D=>{if(v.current=D,r||!s()||D.key!=="Tab")return;Fy(w)===y.current&&D.shiftKey&&(l.current=!0,c.current&&c.current.focus())},E=()=>{const D=y.current;if(D===null)return;const T=Fy(w);if(!w.hasFocus()||!s()||l.current){l.current=!1;return}if(D.contains(T)||r&&T!==u.current&&T!==c.current)return;if(T!==h.current)h.current=null;else if(h.current!==null)return;if(!g.current)return;let M=[];if((T===u.current||T===c.current)&&(M=o(y.current)),M.length>0){const L=!!(v.current?.shiftKey&&v.current?.key==="Tab"),j=M[0],I=M[M.length-1];typeof j!="string"&&typeof I!="string"&&(L?I.focus():j.focus())}else D.focus()};w.addEventListener("focusin",E),w.addEventListener("keydown",A,!0);const _=setInterval(()=>{const D=Fy(w);D&&D.tagName==="BODY"&&E()},50);return()=>{clearInterval(_),w.removeEventListener("focusin",E),w.removeEventListener("keydown",A,!0)}},[n,r,i,s,a,o]);const S=w=>{f.current===null&&(f.current=w.relatedTarget),g.current=!0,h.current=w.target;const A=t.props.onFocus;A&&A(w)},C=w=>{f.current===null&&(f.current=w.relatedTarget),g.current=!0};return m.jsxs(O.Fragment,{children:[m.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:b,onFocus:S}),m.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:c,"data-testid":"sentinelEnd"})]})}const b2e={entering:{opacity:1},entered:{opacity:1}},IT=O.forwardRef(function(t,n){const r=ka(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:f,onEntering:h,onExit:g,onExited:y,onExiting:b,style:v,timeout:S=i,TransitionComponent:C=_a,...w}=t,A=O.useRef(null),E=Tr(A,hf(a),n),_=$=>z=>{if($){const F=A.current;z===void 0?$(F):$(F,z)}},D=_(h),T=_(($,z)=>{RI($);const F=Gd({style:v,timeout:S,easing:l},{mode:"enter"});$.style.webkitTransition=r.transitions.create("opacity",F),$.style.transition=r.transitions.create("opacity",F),c&&c($,z)}),M=_(f),L=_(b),j=_($=>{const z=Gd({style:v,timeout:S,easing:l},{mode:"exit"});$.style.webkitTransition=r.transitions.create("opacity",z),$.style.transition=r.transitions.create("opacity",z),g&&g($)}),I=_(y),N=$=>{o&&o(A.current,$)};return m.jsx(C,{appear:s,in:u,nodeRef:A,onEnter:T,onEntered:M,onEntering:D,onExit:j,onExited:I,onExiting:L,addEndListener:N,timeout:S,...w,children:($,{ownerState:z,...F})=>O.cloneElement(a,{style:{opacity:0,visibility:$==="exited"&&!u?"hidden":void 0,...b2e[$],...v,...a.props.style},ref:E,...F})})});function v2e(e){return Qe("MuiBackdrop",e)}tt("MuiBackdrop",["root","invisible"]);const x2e=e=>{const{classes:t,invisible:n}=e;return Ze({root:["root",n&&"invisible"]},v2e,t)},S2e=me("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),GI=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:c={},slotProps:f={},slots:h={},TransitionComponent:g,transitionDuration:y,...b}=r,v={...r,component:s,invisible:a},S=x2e(v),C={transition:g,root:u.Root,...h},w={...c,...f},A={component:s,slots:C,slotProps:w},[E,_]=ut("root",{elementType:S2e,externalForwardedProps:A,className:Oe(S.root,o),ownerState:v}),[D,T]=ut("transition",{elementType:IT,externalForwardedProps:A,ownerState:v});return m.jsx(D,{in:l,timeout:y,...b,...T,children:m.jsx(E,{"aria-hidden":!0,..._,ref:n,children:i})})});function w2e(e){return typeof e=="function"?e():e}function C2e(e){return e?e.props.hasOwnProperty("in"):!1}const f7=()=>{},k2=new c2e;function E2e(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:c}=e,f=O.useRef({}),h=O.useRef(null),g=O.useRef(null),y=Tr(g,c),[b,v]=O.useState(!u),S=C2e(a);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const w=()=>_i(h.current),A=()=>(f.current.modalRef=g.current,f.current.mount=h.current,f.current),E=()=>{k2.mount(A(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},_=Li(()=>{const z=w2e(t)||w().body;k2.add(A(),z),g.current&&E()}),D=()=>k2.isTopModal(A()),T=Li(z=>{h.current=z,z&&(u&&D()?E():g.current&&s1(g.current,C))}),M=O.useCallback(()=>{k2.remove(A(),C)},[C]);O.useEffect(()=>()=>{M()},[M]),O.useEffect(()=>{u?_():(!S||!i)&&M()},[u,M,S,i,_]);const L=z=>F=>{z.onKeyDown?.(F),!(F.key!=="Escape"||F.which===229||!D())&&(n||(F.stopPropagation(),l&&l(F,"escapeKeyDown")))},j=z=>F=>{z.onClick?.(F),F.target===F.currentTarget&&l&&l(F,"backdropClick")};return{getRootProps:(z={})=>{const F=Yi(e);delete F.onTransitionEnter,delete F.onTransitionExited;const G={...F,...z};return{role:"presentation",...G,onKeyDown:L(G),ref:y}},getBackdropProps:(z={})=>{const F=z;return{"aria-hidden":!0,...F,onClick:j(F),open:u}},getTransitionProps:()=>{const z=()=>{v(!1),o&&o()},F=()=>{v(!0),s&&s(),i&&M()};return{onEnter:hT(z,a?.props.onEnter??f7),onExited:hT(F,a?.props.onExited??f7)}},rootRef:y,portalRef:T,isTopModal:D,exited:b,hasTransition:S}}function A2e(e){return Qe("MuiModal",e)}tt("MuiModal",["root","hidden","backdrop"]);const k2e=e=>{const{open:t,exited:n,classes:r}=e;return Ze({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},A2e,r)},_2e=me("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qe(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),D2e=me(GI,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),KI=O.forwardRef(function(t,n){const r=it({name:"MuiModal",props:t}),{BackdropComponent:i=D2e,BackdropProps:o,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:c,component:f,components:h={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:v=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:A=!1,keepMounted:E=!1,onClose:_,onTransitionEnter:D,onTransitionExited:T,open:M,slotProps:L={},slots:j={},theme:I,...N}=r,$={...r,closeAfterTransition:l,disableAutoFocus:y,disableEnforceFocus:b,disableEscapeKeyDown:v,disablePortal:S,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:A,keepMounted:E},{getRootProps:z,getBackdropProps:F,getTransitionProps:G,portalRef:V,isTopModal:H,exited:X,hasTransition:B}=E2e({...$,rootRef:n}),W={...$,exited:X},Y=k2e(W),U={};if(u.props.tabIndex===void 0&&(U.tabIndex="-1"),B){const{onEnter:le,onExited:te}=G();U.onEnter=le,U.onExited=te}const K={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...g,...L}},[Z,J]=ut("root",{ref:n,elementType:_2e,externalForwardedProps:{...K,...N,component:f},getSlotProps:z,ownerState:W,className:Oe(a,Y?.root,!W.open&&W.exited&&Y?.hidden)}),[Q,ie]=ut("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:le=>F({...le,onClick:te=>{le?.onClick&&le.onClick(te)}}),className:Oe(o?.className,Y?.backdrop),ownerState:W});return!E&&!M&&(!B||X)?null:m.jsx(WX,{ref:V,container:c,disablePortal:S,children:m.jsxs(Z,{...J,children:[!A&&i?m.jsx(Q,{...ie}):null,m.jsx(y2e,{disableEnforceFocus:b,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:H,open:M,children:O.cloneElement(u,U)})]})})});function O2e(e){return Qe("MuiDialog",e)}const _4=tt("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),XX=O.createContext({}),T2e=me(GI,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),R2e=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],backdrop:["backdrop"],container:["container",`scroll${ye(n)}`],paper:["paper",`paperScroll${ye(n)}`,`paperWidth${ye(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Ze(s,O2e,t)},I2e=me(KI,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),M2e=me("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ye(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),P2e=me(Nr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ye(n.scroll)}`],t[`paperWidth${ye(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(qe(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${_4.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${_4.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${_4.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),vc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialog"}),i=ka(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:f,className:h,disableEscapeKeyDown:g=!1,fullScreen:y=!1,fullWidth:b=!1,maxWidth:v="sm",onClick:S,onClose:C,open:w,PaperComponent:A=Nr,PaperProps:E={},scroll:_="paper",slots:D={},slotProps:T={},TransitionComponent:M=IT,transitionDuration:L=o,TransitionProps:j,...I}=r,N={...r,disableEscapeKeyDown:g,fullScreen:y,fullWidth:b,maxWidth:v,scroll:_},$=R2e(N),z=O.useRef(),F=oe=>{z.current=oe.target===oe.currentTarget},G=oe=>{S&&S(oe),z.current&&(z.current=null,C&&C(oe,"backdropClick"))},V=Oc(a),H=O.useMemo(()=>({titleId:V}),[V]),X={transition:M,...D},B={transition:j,paper:E,backdrop:c,...T},W={slots:X,slotProps:B},[Y,U]=ut("root",{elementType:I2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:Oe($.root,h),ref:n}),[K,Z]=ut("backdrop",{elementType:T2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:$.backdrop}),[J,Q]=ut("paper",{elementType:P2e,shouldForwardComponentProp:!0,externalForwardedProps:W,ownerState:N,className:Oe($.paper,E.className)}),[ie,le]=ut("container",{elementType:M2e,externalForwardedProps:W,ownerState:N,className:$.container}),[te,ne]=ut("transition",{elementType:IT,externalForwardedProps:W,ownerState:N,additionalProps:{appear:!0,in:w,timeout:L,role:"presentation"}});return m.jsx(Y,{closeAfterTransition:!0,slots:{backdrop:K},slotProps:{backdrop:{transitionDuration:L,as:u,...Z}},disableEscapeKeyDown:g,onClose:C,open:w,onClick:G,...U,...I,children:m.jsx(te,{...ne,children:m.jsx(ie,{onMouseDown:F,...le,children:m.jsx(J,{as:A,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":V,"aria-modal":l,...Q,children:m.jsx(XX.Provider,{value:H,children:f})})})})})});function j2e(e){return Qe("MuiDialogActions",e)}tt("MuiDialogActions",["root","spacing"]);const $2e=e=>{const{classes:t,disableSpacing:n}=e;return Ze({root:["root",!n&&"spacing"]},j2e,t)},N2e=me("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Yd=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1,...s}=r,a={...r,disableSpacing:o},l=$2e(a);return m.jsx(N2e,{className:Oe(l.root,i),ownerState:a,ref:n,...s})});function L2e(e){return Qe("MuiDialogContent",e)}tt("MuiDialogContent",["root","dividers"]);function F2e(e){return Qe("MuiDialogTitle",e)}const B2e=tt("MuiDialogTitle",["root"]),z2e=e=>{const{classes:t,dividers:n}=e;return Ze({root:["root",n&&"dividers"]},L2e,t)},U2e=me("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(qe(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${B2e.root} + &`]:{paddingTop:0}}}]}))),xc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1,...s}=r,a={...r,dividers:o},l=z2e(a);return m.jsx(U2e,{className:Oe(l.root,i),ownerState:a,ref:n,...s})}),H2e=e=>{const{classes:t}=e;return Ze({root:["root"]},F2e,t)},V2e=me(re,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Sc=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogTitle"}),{className:i,id:o,...s}=r,a=r,l=H2e(a),{titleId:u=o}=O.useContext(XX);return m.jsx(V2e,{component:"h2",className:Oe(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??u,...s})});function W2e(e){return Qe("MuiDivider",e)}const h7=tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),q2e=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return Ze({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},W2e,r)},G2e=me("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(qe(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),K2e=me("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(qe(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Di=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,orientation:a="horizontal",component:l=o||a==="vertical"?"div":"hr",flexItem:u=!1,light:c=!1,role:f=l!=="hr"?"separator":void 0,textAlign:h="center",variant:g="fullWidth",...y}=r,b={...r,absolute:i,component:l,flexItem:u,light:c,orientation:a,role:f,textAlign:h,variant:g},v=q2e(b);return m.jsx(G2e,{as:l,className:Oe(v.root,s),role:f,ref:n,ownerState:b,"aria-orientation":f==="separator"&&(l!=="hr"||a==="vertical")?a:void 0,...y,children:o?m.jsx(K2e,{className:v.wrapper,ownerState:b,children:o}):null})});Di&&(Di.muiSkipListHighlight=!0);const et=Uge({createStyledComponent:me("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>it({props:e,name:"MuiGrid"}),useTheme:ka});var Y2e=Object.defineProperty,HC=Object.getOwnPropertySymbols,JX=Object.prototype.hasOwnProperty,QX=Object.prototype.propertyIsEnumerable,p7=(e,t,n)=>t in e?Y2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MT=(e,t)=>{for(var n in t||(t={}))JX.call(t,n)&&p7(e,n,t[n]);if(HC)for(var n of HC(t))QX.call(t,n)&&p7(e,n,t[n]);return e},PT=(e,t)=>{var n={};for(var r in e)JX.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&HC)for(var r of HC(e))t.indexOf(r)<0&&QX.call(e,r)&&(n[r]=e[r]);return n};var Rh;(e=>{const t=class En{constructor(l,u,c,f){if(this.version=l,this.errorCorrectionLevel=u,this.modules=[],this.isFunction=[],l<En.MIN_VERSION||l>En.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let h=[];for(let y=0;y<this.size;y++)h.push(!1);for(let y=0;y<this.size;y++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(c);if(this.drawCodewords(g),f==-1){let y=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);const v=this.getPenaltyScore();v<y&&(f=b,y=v),this.applyMask(b)}}i(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(l,u){const c=e.QrSegment.makeSegments(l);return En.encodeSegments(c,u)}static encodeBinary(l,u){const c=e.QrSegment.makeBytes(l);return En.encodeSegments([c],u)}static encodeSegments(l,u,c=1,f=40,h=-1,g=!0){if(!(En.MIN_VERSION<=c&&c<=f&&f<=En.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let y,b;for(y=c;;y++){const w=En.getNumDataCodewords(y,u)*8,A=s.getTotalBits(l,y);if(A<=w){b=A;break}if(y>=f)throw new RangeError("Data too long")}for(const w of[En.Ecc.MEDIUM,En.Ecc.QUARTILE,En.Ecc.HIGH])g&&b<=En.getNumDataCodewords(y,w)*8&&(u=w);let v=[];for(const w of l){n(w.mode.modeBits,4,v),n(w.numChars,w.mode.numCharCountBits(y),v);for(const A of w.getData())v.push(A)}i(v.length==b);const S=En.getNumDataCodewords(y,u)*8;i(v.length<=S),n(0,Math.min(4,S-v.length),v),n(0,(8-v.length%8)%8,v),i(v.length%8==0);for(let w=236;v.length<S;w^=253)n(w,8,v);let C=[];for(;C.length*8<v.length;)C.push(0);return v.forEach((w,A)=>C[A>>>3]|=w<<7-(A&7)),new En(y,u,C,h)}getModule(l,u){return 0<=l&&l<this.size&&0<=u&&u<this.size&&this.modules[u][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),u=l.length;for(let c=0;c<u;c++)for(let f=0;f<u;f++)c==0&&f==0||c==0&&f==u-1||c==u-1&&f==0||this.drawAlignmentPattern(l[c],l[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const u=this.errorCorrectionLevel.formatBits<<3|l;let c=u;for(let h=0;h<10;h++)c=c<<1^(c>>>9)*1335;const f=(u<<10|c)^21522;i(f>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(f,h));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(f,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(f,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(f,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let c=0;c<12;c++)l=l<<1^(l>>>11)*7973;const u=this.version<<12|l;i(u>>>18==0);for(let c=0;c<18;c++){const f=r(u,c),h=this.size-11+c%3,g=Math.floor(c/3);this.setFunctionModule(h,g,f),this.setFunctionModule(g,h,f)}}drawFinderPattern(l,u){for(let c=-4;c<=4;c++)for(let f=-4;f<=4;f++){const h=Math.max(Math.abs(f),Math.abs(c)),g=l+f,y=u+c;0<=g&&g<this.size&&0<=y&&y<this.size&&this.setFunctionModule(g,y,h!=2&&h!=4)}}drawAlignmentPattern(l,u){for(let c=-2;c<=2;c++)for(let f=-2;f<=2;f++)this.setFunctionModule(l+f,u+c,Math.max(Math.abs(f),Math.abs(c))!=1)}setFunctionModule(l,u,c){this.modules[u][l]=c,this.isFunction[u][l]=!0}addEccAndInterleave(l){const u=this.version,c=this.errorCorrectionLevel;if(l.length!=En.getNumDataCodewords(u,c))throw new RangeError("Invalid argument");const f=En.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][u],h=En.ECC_CODEWORDS_PER_BLOCK[c.ordinal][u],g=Math.floor(En.getNumRawDataModules(u)/8),y=f-g%f,b=Math.floor(g/f);let v=[];const S=En.reedSolomonComputeDivisor(h);for(let w=0,A=0;w<f;w++){let E=l.slice(A,A+b-h+(w<y?0:1));A+=E.length;const _=En.reedSolomonComputeRemainder(E,S);w<y&&E.push(0),v.push(E.concat(_))}let C=[];for(let w=0;w<v[0].length;w++)v.forEach((A,E)=>{(w!=b-h||E>=y)&&C.push(A[w])});return i(C.length==g),C}drawCodewords(l){if(l.length!=Math.floor(En.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let u=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let f=0;f<this.size;f++)for(let h=0;h<2;h++){const g=c-h,b=(c+1&2)==0?this.size-1-f:f;!this.isFunction[b][g]&&u<l.length*8&&(this.modules[b][g]=r(l[u>>>3],7-(u&7)),u++)}}i(u==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let u=0;u<this.size;u++)for(let c=0;c<this.size;c++){let f;switch(l){case 0:f=(c+u)%2==0;break;case 1:f=u%2==0;break;case 2:f=c%3==0;break;case 3:f=(c+u)%3==0;break;case 4:f=(Math.floor(c/3)+Math.floor(u/2))%2==0;break;case 5:f=c*u%2+c*u%3==0;break;case 6:f=(c*u%2+c*u%3)%2==0;break;case 7:f=((c+u)%2+c*u%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[u][c]&&f&&(this.modules[u][c]=!this.modules[u][c])}}getPenaltyScore(){let l=0;for(let h=0;h<this.size;h++){let g=!1,y=0,b=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[h][v]==g?(y++,y==5?l+=En.PENALTY_N1:y>5&&l++):(this.finderPenaltyAddHistory(y,b),g||(l+=this.finderPenaltyCountPatterns(b)*En.PENALTY_N3),g=this.modules[h][v],y=1);l+=this.finderPenaltyTerminateAndCount(g,y,b)*En.PENALTY_N3}for(let h=0;h<this.size;h++){let g=!1,y=0,b=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][h]==g?(y++,y==5?l+=En.PENALTY_N1:y>5&&l++):(this.finderPenaltyAddHistory(y,b),g||(l+=this.finderPenaltyCountPatterns(b)*En.PENALTY_N3),g=this.modules[v][h],y=1);l+=this.finderPenaltyTerminateAndCount(g,y,b)*En.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let g=0;g<this.size-1;g++){const y=this.modules[h][g];y==this.modules[h][g+1]&&y==this.modules[h+1][g]&&y==this.modules[h+1][g+1]&&(l+=En.PENALTY_N2)}let u=0;for(const h of this.modules)u=h.reduce((g,y)=>g+(y?1:0),u);const c=this.size*this.size,f=Math.ceil(Math.abs(u*20-c*10)/c)-1;return i(0<=f&&f<=9),l+=f*En.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,u=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let c=[6];for(let f=this.size-7;c.length<l;f-=u)c.splice(1,0,f);return c}}static getNumRawDataModules(l){if(l<En.MIN_VERSION||l>En.MAX_VERSION)throw new RangeError("Version number out of range");let u=(16*l+128)*l+64;if(l>=2){const c=Math.floor(l/7)+2;u-=(25*c-10)*c-55,l>=7&&(u-=36)}return i(208<=u&&u<=29648),u}static getNumDataCodewords(l,u){return Math.floor(En.getNumRawDataModules(l)/8)-En.ECC_CODEWORDS_PER_BLOCK[u.ordinal][l]*En.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let u=[];for(let f=0;f<l-1;f++)u.push(0);u.push(1);let c=1;for(let f=0;f<l;f++){for(let h=0;h<u.length;h++)u[h]=En.reedSolomonMultiply(u[h],c),h+1<u.length&&(u[h]^=u[h+1]);c=En.reedSolomonMultiply(c,2)}return u}static reedSolomonComputeRemainder(l,u){let c=u.map(f=>0);for(const f of l){const h=f^c.shift();c.push(0),u.forEach((g,y)=>c[y]^=En.reedSolomonMultiply(g,h))}return c}static reedSolomonMultiply(l,u){if(l>>>8||u>>>8)throw new RangeError("Byte out of range");let c=0;for(let f=7;f>=0;f--)c=c<<1^(c>>>7)*285,c^=(u>>>f&1)*l;return i(c>>>8==0),c}finderPenaltyCountPatterns(l){const u=l[1];i(u<=this.size*3);const c=u>0&&l[2]==u&&l[3]==u*3&&l[4]==u&&l[5]==u;return(c&&l[0]>=u*4&&l[6]>=u?1:0)+(c&&l[6]>=u*4&&l[0]>=u?1:0)}finderPenaltyTerminateAndCount(l,u,c){return l&&(this.finderPenaltyAddHistory(u,c),u=0),u+=this.size,this.finderPenaltyAddHistory(u,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(l,u){u[0]==0&&(l+=this.size),u.pop(),u.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(a,l,u){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let c=l-1;c>=0;c--)u.push(a>>>c&1)}function r(a,l){return(a>>>l&1)!=0}function i(a){if(!a)throw new Error("Assertion error")}const o=class ri{constructor(l,u,c){if(this.mode=l,this.numChars=u,this.bitData=c,u<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(l){let u=[];for(const c of l)n(c,8,u);return new ri(ri.Mode.BYTE,l.length,u)}static makeNumeric(l){if(!ri.isNumeric(l))throw new RangeError("String contains non-numeric characters");let u=[];for(let c=0;c<l.length;){const f=Math.min(l.length-c,3);n(parseInt(l.substring(c,c+f),10),f*3+1,u),c+=f}return new ri(ri.Mode.NUMERIC,l.length,u)}static makeAlphanumeric(l){if(!ri.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let u=[],c;for(c=0;c+2<=l.length;c+=2){let f=ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c))*45;f+=ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c+1)),n(f,11,u)}return c<l.length&&n(ri.ALPHANUMERIC_CHARSET.indexOf(l.charAt(c)),6,u),new ri(ri.Mode.ALPHANUMERIC,l.length,u)}static makeSegments(l){return l==""?[]:ri.isNumeric(l)?[ri.makeNumeric(l)]:ri.isAlphanumeric(l)?[ri.makeAlphanumeric(l)]:[ri.makeBytes(ri.toUtf8ByteArray(l))]}static makeEci(l){let u=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,u);else if(l<16384)n(2,2,u),n(l,14,u);else if(l<1e6)n(6,3,u),n(l,21,u);else throw new RangeError("ECI assignment value out of range");return new ri(ri.Mode.ECI,0,u)}static isNumeric(l){return ri.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return ri.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,u){let c=0;for(const f of l){const h=f.mode.numCharCountBits(u);if(f.numChars>=1<<h)return 1/0;c+=4+h+f.bitData.length}return c}static toUtf8ByteArray(l){l=encodeURI(l);let u=[];for(let c=0;c<l.length;c++)l.charAt(c)!="%"?u.push(l.charCodeAt(c)):(u.push(parseInt(l.substring(c+1,c+3),16)),c+=2);return u}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=o;e.QrSegment=o})(Rh||(Rh={}));(e=>{(t=>{const n=class{constructor(i,o){this.ordinal=i,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Rh||(Rh={}));(e=>{(t=>{const n=class{constructor(i,o){this.modeBits=i,this.numBitsCharCount=o}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Rh||(Rh={}));var gm=Rh;var X2e={L:gm.QrCode.Ecc.LOW,M:gm.QrCode.Ecc.MEDIUM,Q:gm.QrCode.Ecc.QUARTILE,H:gm.QrCode.Ecc.HIGH},ZX=128,eJ="L",tJ="#FFFFFF",nJ="#000000",rJ=!1,iJ=1,J2e=4,Q2e=0,Z2e=.1;function oJ(e,t=0){const n=[];return e.forEach(function(r,i){let o=null;r.forEach(function(s,a){if(!s&&o!==null){n.push(`M${o+t} ${i+t}h${a-o}v1H${o+t}z`),o=null;return}if(a===r.length-1){if(!s)return;o===null?n.push(`M${a+t},${i+t} h1v1H${a+t}z`):n.push(`M${o+t},${i+t} h${a+1-o}v1H${o+t}z`);return}s&&o===null&&(o=a)})}),n.join("")}function sJ(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,o)=>o<t.x||o>=t.x+t.w?i:!1))}function eSe(e,t,n,r){if(r==null)return null;const i=e.length+n*2,o=Math.floor(t*Z2e),s=i/t,a=(r.width||o)*s,l=(r.height||o)*s,u=r.x==null?e.length/2-a/2:r.x*s,c=r.y==null?e.length/2-l/2:r.y*s,f=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let y=Math.floor(u),b=Math.floor(c),v=Math.ceil(a+u-y),S=Math.ceil(l+c-b);h={x:y,y:b,w:v,h:S}}const g=r.crossOrigin;return{x:u,y:c,h:l,w:a,excavation:h,opacity:f,crossOrigin:g}}function tSe(e,t){return t!=null?Math.max(Math.floor(t),0):e?J2e:Q2e}function aJ({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:o,size:s,boostLevel:a}){let l=qt.useMemo(()=>{const y=(Array.isArray(e)?e:[e]).reduce((b,v)=>(b.push(...gm.QrSegment.makeSegments(v)),b),[]);return gm.QrCode.encodeSegments(y,X2e[t],n,void 0,void 0,a)},[e,t,n,a]);const{cells:u,margin:c,numCells:f,calculatedImageSettings:h}=qt.useMemo(()=>{let g=l.getModules();const y=tSe(r,i),b=g.length+y*2,v=eSe(g,s,y,o);return{cells:g,margin:y,numCells:b,calculatedImageSettings:v}},[l,s,o,r,i]);return{qrcode:l,margin:c,cells:u,numCells:f,calculatedImageSettings:h}}var nSe=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),rSe=qt.forwardRef(function(t,n){const r=t,{value:i,size:o=ZX,level:s=eJ,bgColor:a=tJ,fgColor:l=nJ,includeMargin:u=rJ,minVersion:c=iJ,boostLevel:f,marginSize:h,imageSettings:g}=r,b=PT(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=b,S=PT(b,["style"]),C=g?.src,w=qt.useRef(null),A=qt.useRef(null),E=qt.useCallback($=>{w.current=$,typeof n=="function"?n($):n&&(n.current=$)},[n]),[_,D]=qt.useState(!1),{margin:T,cells:M,numCells:L,calculatedImageSettings:j}=aJ({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:u,marginSize:h,imageSettings:g,size:o});qt.useEffect(()=>{if(w.current!=null){const $=w.current,z=$.getContext("2d");if(!z)return;let F=M;const G=A.current,V=j!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;V&&j.excavation!=null&&(F=sJ(M,j.excavation));const H=window.devicePixelRatio||1;$.height=$.width=o*H;const X=o/L*H;z.scale(X,X),z.fillStyle=a,z.fillRect(0,0,L,L),z.fillStyle=l,nSe?z.fill(new Path2D(oJ(F,T))):M.forEach(function(B,W){B.forEach(function(Y,U){Y&&z.fillRect(U+T,W+T,1,1)})}),j&&(z.globalAlpha=j.opacity),V&&z.drawImage(G,j.x+T,j.y+T,j.w,j.h)}}),qt.useEffect(()=>{D(!1)},[C]);const I=MT({height:o,width:o},v);let N=null;return C!=null&&(N=qt.createElement("img",{src:C,key:C,style:{display:"none"},onLoad:()=>{D(!0)},ref:A,crossOrigin:j?.crossOrigin})),qt.createElement(qt.Fragment,null,qt.createElement("canvas",MT({style:I,height:o,width:o,ref:E,role:"img"},S)),N)});rSe.displayName="QRCodeCanvas";var YI=qt.forwardRef(function(t,n){const r=t,{value:i,size:o=ZX,level:s=eJ,bgColor:a=tJ,fgColor:l=nJ,includeMargin:u=rJ,minVersion:c=iJ,boostLevel:f,title:h,marginSize:g,imageSettings:y}=r,b=PT(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:S,numCells:C,calculatedImageSettings:w}=aJ({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:u,marginSize:g,imageSettings:y,size:o});let A=S,E=null;y!=null&&w!=null&&(w.excavation!=null&&(A=sJ(S,w.excavation)),E=qt.createElement("image",{href:y.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none",opacity:w.opacity,crossOrigin:w.crossOrigin}));const _=oJ(A,v);return qt.createElement("svg",MT({height:o,width:o,viewBox:`0 0 ${C} ${C}`,ref:n,role:"img"},b),!!h&&qt.createElement("title",null,h),qt.createElement("path",{fill:a,d:`M0,0 h${C}v${C}H0z`,shapeRendering:"crispEdges"}),qt.createElement("path",{fill:l,d:_,shapeRendering:"crispEdges"}),E)});YI.displayName="QRCodeSVG";const iSe=De(m.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"})),lJ=e=>O.createElement("svg",{viewBox:"0 0 250 260",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("g",{fillRule:"evenodd"},O.createElement("path",{d:"m221.503 210.324c-105.235 50.083-170.545 8.18-212.352-17.271-2.587-1.604-6.984.375-3.169 4.757 13.928 16.888 59.573 57.593 119.153 57.593 59.621 0 95.09-32.532 99.527-38.207 4.407-5.627 1.294-8.731-3.16-6.872zm29.555-16.322c-2.826-3.68-17.184-4.366-26.22-3.256-9.05 1.078-22.634 6.609-21.453 9.93.606 1.244 1.843.686 8.06.127 6.234-.622 23.698-2.826 27.337 1.931 3.656 4.79-5.57 27.608-7.255 31.288-1.628 3.68.622 4.629 3.68 2.178 3.016-2.45 8.476-8.795 12.14-17.774 3.639-9.028 5.858-21.622 3.71-24.424z"}),O.createElement("path",{d:"m150.744 108.13c0 13.141.332 24.1-6.31 35.77-5.361 9.489-13.853 15.324-23.341 15.324-12.952 0-20.495-9.868-20.495-24.432 0-28.75 25.76-33.968 50.146-33.968zm34.015 82.216c-2.23 1.992-5.456 2.135-7.97.806-11.196-9.298-13.189-13.615-19.356-22.487-18.502 18.882-31.596 24.527-55.601 24.527-28.37 0-50.478-17.506-50.478-52.565 0-27.373 14.85-46.018 35.96-55.126 18.313-8.066 43.884-9.489 63.43-11.718v-4.365c0-8.018.616-17.506-4.08-24.432-4.128-6.215-12.003-8.777-18.93-8.777-12.856 0-24.337 6.594-27.136 20.257-.57 3.037-2.799 6.026-5.835 6.168l-32.735-3.51c-2.751-.618-5.787-2.847-5.028-7.07 7.543-39.66 43.36-51.616 75.43-51.616 16.415 0 37.858 4.365 50.81 16.795 16.415 15.323 14.849 35.77 14.849 58.02v52.565c0 15.798 6.547 22.724 12.714 31.264 2.182 3.036 2.657 6.69-.095 8.966-6.879 5.74-19.119 16.415-25.855 22.393l-.095-.095"}),O.createElement("path",{d:"m221.503 210.324c-105.235 50.083-170.545 8.18-212.352-17.271-2.587-1.604-6.984.375-3.169 4.757 13.928 16.888 59.573 57.593 119.153 57.593 59.621 0 95.09-32.532 99.527-38.207 4.407-5.627 1.294-8.731-3.16-6.872zm29.555-16.322c-2.826-3.68-17.184-4.366-26.22-3.256-9.05 1.078-22.634 6.609-21.453 9.93.606 1.244 1.843.686 8.06.127 6.234-.622 23.698-2.826 27.337 1.931 3.656 4.79-5.57 27.608-7.255 31.288-1.628 3.68.622 4.629 3.68 2.178 3.016-2.45 8.476-8.795 12.14-17.774 3.639-9.028 5.858-21.622 3.71-24.424z"}),O.createElement("path",{d:"m150.744 108.13c0 13.141.332 24.1-6.31 35.77-5.361 9.489-13.853 15.324-23.341 15.324-12.952 0-20.495-9.868-20.495-24.432 0-28.75 25.76-33.968 50.146-33.968zm34.015 82.216c-2.23 1.992-5.456 2.135-7.97.806-11.196-9.298-13.189-13.615-19.356-22.487-18.502 18.882-31.596 24.527-55.601 24.527-28.37 0-50.478-17.506-50.478-52.565 0-27.373 14.85-46.018 35.96-55.126 18.313-8.066 43.884-9.489 63.43-11.718v-4.365c0-8.018.616-17.506-4.08-24.432-4.128-6.215-12.003-8.777-18.93-8.777-12.856 0-24.337 6.594-27.136 20.257-.57 3.037-2.799 6.026-5.835 6.168l-32.735-3.51c-2.751-.618-5.787-2.847-5.028-7.07 7.543-39.66 43.36-51.616 75.43-51.616 16.415 0 37.858 4.365 50.81 16.795 16.415 15.323 14.849 35.77 14.849 58.02v52.565c0 15.798 6.547 22.724 12.714 31.264 2.182 3.036 2.657 6.69-.095 8.966-6.879 5.74-19.119 16.415-25.855 22.393l-.095-.095"}))),jT=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41.5 51",...e},O.createElement("g",null,O.createElement("path",{d:"M40.2,17.4c-3.4,2.1-5.5,5.7-5.5,9.7c0,4.5,2.7,8.6,6.8,10.3c-0.8,2.6-2,5-3.5,7.2c-2.2,3.1-4.5,6.3-7.9,6.3s-4.4-2-8.4-2 c-3.9,0-5.3,2.1-8.5,2.1s-5.4-2.9-7.9-6.5C2,39.5,0.1,33.7,0,27.6c0-9.9,6.4-15.2,12.8-15.2c3.4,0,6.2,2.2,8.3,2.2 c2,0,5.2-2.3,9-2.3C34.1,12.2,37.9,14.1,40.2,17.4z M28.3,8.1C30,6.1,30.9,3.6,31,1c0-0.3,0-0.7-0.1-1c-2.9,0.3-5.6,1.7-7.5,3.9 c-1.7,1.9-2.7,4.3-2.8,6.9c0,0.3,0,0.6,0.1,0.9c0.2,0,0.5,0.1,0.7,0.1C24.1,11.6,26.6,10.2,28.3,8.1z"}))),uJ=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e},O.createElement("g",null,O.createElement("path",{d:"M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z"}),O.createElement("path",{d:"M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z"}),O.createElement("path",{d:"M11.69 28.18C11.25 26.86 11 25.45 11 24s.25-2.86.69-4.18v-5.7H4.34A21.991 21.991 0 0 0 2 24c0 3.55.85 6.91 2.34 9.88l7.35-5.7z"}),O.createElement("path",{d:"M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z"}))),m7=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 544.8 83.4",...e},O.createElement("g",null,O.createElement("path",{d:"M20.7,22.6c-0.4-1.6-0.3-3.2-0.1-4.1c0.5-2.5,2.2-5.2,7.1-5.2c4.6,0,7.2,2.8,7.2,7.1c0,1.4,0,4.8,0,4.8h19.4v-5.5 C54.4,2.7,39.1,0,28.1,0C14.3,0,3,4.6,0.9,17.3c-0.6,3.5-0.7,6.6,0.2,10.5c3.4,15.9,31.1,20.5,35.1,30.6c0.8,1.9,0.5,4.3,0.2,5.8 c-0.6,2.6-2.4,5.3-7.6,5.3c-4.9,0-7.8-2.8-7.8-7.1l0-7.5H0v6c0,17.4,13.7,22.6,28.3,22.6c14.1,0,25.6-4.8,27.5-17.8 c0.9-6.7,0.2-11.1-0.1-12.7C52.5,36.5,22.9,31.7,20.7,22.6z M274,22.7c-0.3-1.5-0.2-3.2-0.1-4c0.6-2.5,2.2-5.2,7.1-5.2 c4.5,0,7.1,2.8,7.1,7c0,1.4,0,4.8,0,4.8h19.2v-5.4c0-16.8-15-19.4-25.9-19.4c-13.7,0-24.9,4.5-27,17.1c-0.5,3.4-0.7,6.5,0.2,10.4 c3.3,15.7,30.7,20.3,34.7,30.3c0.7,1.9,0.5,4.3,0.1,5.7c-0.6,2.6-2.3,5.2-7.5,5.2c-4.8,0-7.8-2.8-7.8-7l0-7.5h-20.7v5.9 c0,17.2,13.5,22.4,28,22.4c13.9,0,25.4-4.8,27.2-17.6c0.9-6.7,0.2-11-0.1-12.6C305.4,36.6,276.2,31.8,274,22.7z M450.8,65.2 L432.5,2.5h-28.9v77.1h19.1l-1.1-64.7l19.7,64.7H469V2.5h-19.2L450.8,65.2z M83.4,2.5L68.9,80.4h21l10.9-72.1l10.6,72.1h20.9 L118,2.5H83.4z M201,2.5l-9.8,60.9l-9.8-60.9h-31.8l-1.7,77.9h19.5l0.5-72.1l13.4,72.1H201l13.4-72.1l0.5,72.1h19.5l-1.7-77.9H201z M382,2.5h-19.7v57.6c0,1,0,2.1-0.2,3c-0.4,1.9-2,5.7-7.5,5.7c-5.4,0-7-3.7-7.4-5.7c-0.2-0.8-0.2-2-0.2-3V2.5h-19.7v55.8 c0,1.4,0.1,4.4,0.2,5.1c1.4,14.5,12.8,19.3,27.1,19.3c14.3,0,25.8-4.7,27.2-19.3c0.1-0.8,0.3-3.7,0.2-5.1V2.5z M517.2,36.6V48h8 v11.3c0,1,0,2.1-0.2,3c-0.3,2.1-2.3,5.7-8,5.7c-5.6,0-7.6-3.6-7.9-5.7c-0.1-0.9-0.2-2-0.2-3V23.7c0-1.3,0.1-2.6,0.4-3.7 c0.4-1.9,2.1-5.6,7.7-5.6c6,0,7.4,3.9,7.8,5.6c0.2,1.1,0.2,3,0.2,3v4.3h19.6v-2.6c0,0,0.1-2.7-0.1-5.2C543,5,530.9,0.4,517.1,0.4 c-13.8,0-25.6,4.7-27.3,19.2c-0.2,1.3-0.4,3.7-0.4,5.2v32.7c0,1.4,0,2.5,0.3,5.1c1.3,14.2,13.6,19.2,27.4,19.2 c13.9,0,26.1-5,27.4-19.2c0.2-2.6,0.3-3.7,0.3-5.1V36.6H517.2z"}))),oSe={Alexa:lJ,Apple:jT,Google:uJ},sSe={4631:lJ,4937:jT,4996:jT,24582:uJ,4321:m7,4362:m7};function aSe(e){const t=sSe[e.rootVendorId];return t||Object.entries(oSe).find(([n])=>e.label.toUpperCase().includes(n.toUpperCase()))?.[1]}const cJ=({fabric:e})=>{const t=O.useMemo(()=>aSe(e),[e]);return m.jsx(bn,{title:`${e.label} (0x${e.rootVendorId.toString(16)})`,arrow:!0,children:m.jsx(ce,{component:"span",sx:{fill:n=>n.palette.text.primary},children:t?m.jsx(t,{style:{height:"1.4em",width:"auto",maxWidth:"3em",display:"block"}}):m.jsx(iSe,{})})})},lSe={4362:"Samsung SmartThings",4417:"Tuya",4442:"LG ThinQ",4447:"Aqara",4448:"Amazon Alexa",4631:"Amazon Alexa",4937:"Apple Home",4996:"Apple (iCloud Keychain)",24582:"Google Home"};function dJ(e){return lSe[e]??`Vendor ${e}`}const uSe=e=>m.jsx(m.Fragment,{children:e.fabrics.map(t=>m.jsxs(ce,{display:"flex",alignItems:"center",gap:1.5,py:.5,children:[m.jsx(cJ,{fabric:t}),m.jsx(re,{variant:"body2",children:t.label||dJ(t.rootVendorId)})]},t.fabricId))});function Tc(){return{show:O.useContext(lX).show}}const cSe=({bridge:e})=>m.jsxs(et,{container:!0,spacing:2,children:[e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff===!1&&m.jsx(et,{size:{xs:12},children:m.jsxs(kn,{severity:"warning",icon:m.jsx(Kd,{}),children:[m.jsx(zC,{children:"Vacuum OnOff Disabled (Alexa incompatible)"}),"Alexa ",m.jsx("strong",{children:"requires"})," the OnOff cluster (PowerController) for robotic vacuums. With OnOff disabled, the vacuum commissions but never appears in the Alexa app. Only disable this if you exclusively use ",m.jsx("strong",{children:"Apple Home"}),"."]})}),!e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff&&m.jsx(et,{size:{xs:12},children:m.jsxs(kn,{severity:"info",icon:m.jsx(Kd,{}),children:[m.jsx(zC,{children:"Vacuum OnOff Cluster Enabled (Alexa)"}),"OnOff cluster is active for Alexa PowerController compatibility. This may cause issues with ",m.jsx("strong",{children:"Apple Home"})," and"," ",m.jsx("strong",{children:"Google Home"}),"."]})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(dSe,{bridge:e})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(fSe,{bridge:e})}),m.jsx(et,{size:{xs:12,md:4},children:m.jsx(hSe,{bridge:e})}),m.jsx(et,{size:{xs:12},children:m.jsx(pSe,{bridge:e})}),m.jsx(et,{size:{xs:12},children:m.jsx(gSe,{bridge:e})})]}),dSe=({bridge:e})=>{const[t,n]=O.useState(!1),[r,i]=O.useState(!1),o=Tc(),s=async()=>{i(!0);try{await ibe(e.id),n(!0)}catch(l){o.show({message:`Failed to open commissioning window: ${l instanceof Error?l.message:String(l)}`,severity:"error"})}finally{i(!1)}};if(!e.commissioning)return m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"grey.500"},children:m.jsx(jw,{})}),m.jsx(re,{variant:"h6",children:"Pairing"})]}),m.jsx(re,{color:"text.secondary",children:"Bridge is not running. Start the bridge to see pairing information."})]})});const a=l=>{navigator.clipboard.writeText(l)};return m.jsxs(m.Fragment,{children:[m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"primary.main"},children:m.jsx(jw,{})}),m.jsx(re,{variant:"h6",children:"Pairing"})]}),m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,children:[m.jsxs(ce,{position:"relative",children:[e.commissioning.isCommissioned&&m.jsx(ce,{position:"absolute",top:"50%",left:"50%",sx:{transform:"translate(-50%, -50%) rotate(-45deg)",zIndex:1},children:m.jsx(Et,{label:"Commissioned",color:"success",size:"small"})}),m.jsx(ce,{sx:{background:"white",padding:1,borderRadius:1,opacity:e.commissioning.isCommissioned?.5:1},children:m.jsx(YI,{value:e.commissioning.qrPairingCode,size:120})})]}),m.jsx(Ut,{spacing:1,width:"100%",children:m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Manual Code:"}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:.5,children:[m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.manualPairingCode}),m.jsx(Fn,{size:"small",onClick:()=>a(e.commissioning.manualPairingCode),children:m.jsx(wh,{fontSize:"small"})})]})]})}),e.commissioning.isCommissioned&&m.jsx(Tt,{variant:"outlined",size:"small",startIcon:r?m.jsx(zr,{size:16}):m.jsx(jw,{}),onClick:s,disabled:r,fullWidth:!0,children:r?"Opening Commissioning Window...":"Add Another Controller"})]})]})}),m.jsx(mSe,{bridge:e,open:t,onClose:()=>n(!1)})]})},fSe=({bridge:e})=>m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"info.main"},children:m.jsx(qI,{})}),m.jsx(re,{variant:"h6",children:"Bridge Info"})]}),m.jsxs(Ut,{spacing:1.5,children:[m.jsxs(ce,{children:[m.jsx(re,{variant:"caption",color:"text.secondary",children:"Bridge ID"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",noWrap:!0,children:e.id})]}),m.jsx(Di,{}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Port"}),m.jsx(re,{variant:"body2",fontWeight:"medium",children:e.port})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Devices"}),m.jsx(Et,{icon:m.jsx(ss,{}),label:e.deviceCount,size:"small",color:"primary",variant:"outlined"})]}),e.commissioning&&m.jsxs(m.Fragment,{children:[m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Passcode"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.passcode})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(re,{variant:"body2",color:"text.secondary",children:"Discriminator"}),m.jsx(re,{variant:"body2",fontFamily:"monospace",children:e.commissioning.discriminator})]})]})]})]})}),hSe=({bridge:e})=>{const t=e.commissioning?.fabrics??[],[n,r]=O.useState(!1),i=Tc(),o=async()=>{r(!0);try{const s=await _X(e.id);i.show({message:`Synced ${s.syncedCount} devices to controllers`,severity:"success"})}catch(s){i.show({message:`Force sync failed: ${s instanceof Error?s.message:String(s)}`,severity:"error"})}finally{r(!1)}};return m.jsx(er,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:t.length>0?"success.main":"grey.500"},children:m.jsx(KX,{})}),m.jsxs(re,{variant:"h6",children:["Connected Fabrics (",t.length,")"]})]}),t.length===0?m.jsx(re,{color:"text.secondary",children:"No controllers connected yet. Scan the QR code with your Matter controller to pair this bridge."}):m.jsxs(Ut,{spacing:2,children:[m.jsx(uSe,{fabrics:t}),m.jsx(bn,{title:"Push all current device states to connected controllers",children:m.jsx(Tt,{variant:"outlined",size:"small",startIcon:n?m.jsx(zr,{size:16}):m.jsx(u3,{}),onClick:o,disabled:n,fullWidth:!0,children:n?"Syncing...":"Force Sync"})})]})]})})},pSe=({bridge:e})=>{const t=Xh(),n=e.filter.include.length>0||e.filter.exclude.length>0;return m.jsx(er,{children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"warning.main"},children:m.jsx(l3,{})}),m.jsx(re,{variant:"h6",sx:{flexGrow:1},children:"Entity Filters"}),m.jsx(bn,{title:n?"Edit Filters":"Add Filters",children:m.jsx(Fn,{size:"small",onClick:()=>t(jt.editBridge(e.id)),children:n?m.jsx(a3,{}):m.jsx(bc,{})})})]}),n?m.jsxs(Ut,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[e.filter.include.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(bc,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"success",variant:"outlined"},`include-${r.type}-${r.value}`)),e.filter.exclude.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(GX,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"error",variant:"outlined"},`exclude-${r.type}-${r.value}`))]}):m.jsx(re,{variant:"body2",color:"text.secondary",children:"No filters configured. All supported entities will be exposed."})]})})},mSe=({bridge:e,open:t,onClose:n})=>{if(!e.commissioning)return null;const r=i=>{navigator.clipboard.writeText(i)};return m.jsxs(vc,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[m.jsx(Sc,{children:m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,children:[m.jsx(jw,{}),"Add Another Controller"]})}),m.jsxs(xc,{children:[m.jsx(re,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"Scan this QR code with your Matter controller (Apple Home, Google Home, Alexa, etc.) to add this bridge to another ecosystem."}),m.jsx(ce,{display:"flex",justifyContent:"center",my:3,children:m.jsx(ce,{sx:{background:"white",padding:2,borderRadius:1},children:m.jsx(YI,{value:e.commissioning.qrPairingCode,size:200})})}),m.jsxs(Ut,{spacing:1,children:[m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Manual Code:"})," ",e.commissioning.manualPairingCode]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.manualPairingCode),children:m.jsx(wh,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Passcode:"})," ",e.commissioning.passcode]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.passcode.toString()),children:m.jsx(wh,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(re,{variant:"body2",children:[m.jsx("strong",{children:"Discriminator:"})," ",e.commissioning.discriminator]}),m.jsx(bn,{title:"Copy",children:m.jsx(Fn,{size:"small",onClick:()=>r(e.commissioning.discriminator.toString()),children:m.jsx(wh,{fontSize:"small"})})})]})]}),m.jsx(kn,{severity:"info",sx:{mt:2},children:m.jsx(re,{variant:"body2",children:"Matter supports connecting the same bridge to multiple controllers simultaneously. Each controller will have independent control."})})]}),m.jsx(Yd,{children:m.jsx(Tt,{onClick:n,children:"Close"})})]})},gSe=({bridge:e})=>{const t=e.failedEntities;return!t||t.length===0?null:m.jsx(er,{children:m.jsx(gr,{children:m.jsxs(kn,{severity:"warning",icon:m.jsx(qX,{}),children:[m.jsxs(zC,{children:["Failed Entities (",t.length,")"]}),m.jsx(re,{variant:"body2",component:"div",children:"The following entities could not be added to the bridge:"}),m.jsx(ce,{sx:{mt:1,maxHeight:200,overflow:"auto"},children:t.map(n=>m.jsxs(ce,{sx:{mb:.5},children:[m.jsx(re,{variant:"body2",component:"span",fontWeight:"bold",children:n.entityId}),m.jsxs(re,{variant:"body2",component:"span",color:"text.secondary",children:[" — ",n.reason]})]},n.entityId))})]})})})};var Vl;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(Vl||(Vl={}));var Ar;(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"})(Ar||(Ar={}));const fJ=[{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:Ar.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:Ar.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:Ar.Domain,value:"sensor"},{type:Ar.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:Ar.Domain,value:"climate"},{type:Ar.Domain,value:"fan"},{type:Ar.Domain,value:"cover"},{type:Ar.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:Ar.Domain,value:"lock"},{type:Ar.Domain,value:"alarm_control_panel"},{type:Ar.DeviceClass,value:"motion"},{type:Ar.DeviceClass,value:"door"},{type:Ar.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:Ar.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:Ar.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:Ar.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:Ar.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:Ar.Domain,value:"automation"},{type:Ar.Domain,value:"script"},{type:Ar.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var g7;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(g7||(g7={}));var y7;(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"})(y7||(y7={}));var b7;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(b7||(b7={}));var v7;(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"})(v7||(v7={}));var x7;(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"})(x7||(x7={}));var S7;(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"})(S7||(S7={}));var $T;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.colorControl="colorControl",e.doorLock="doorLock",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",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"})($T||($T={}));var w7;(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.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(w7||(w7={}));var C7;(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"})(C7||(C7={}));var E7;(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"})(E7||(E7={}));var A7;(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"})(A7||(A7={}));var k7;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(k7||(k7={}));var _7;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(_7||(_7={}));var D7;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(D7||(D7={}));var O7;(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_OFF=16]="TURN_OFF",e[e.TURN_ON=32]="TURN_ON"})(O7||(O7={}));var T7;(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"})(T7||(T7={}));var R7;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(R7||(R7={}));var I7;(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"})(I7||(I7={}));var M7;(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.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"})(M7||(M7={}));var P7;(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"})(P7||(P7={}));var j7;(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"})(j7||(j7={}));var $7;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})($7||($7={}));var N7;(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"})(N7||(N7={}));var L7;(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"})(L7||(L7={}));const F7={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",color_dimmer_switch:"Color Dimmer Switch",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",dimmer_switch:"Dimmer Switch",door_lock:"Door Lock",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",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",pressure_sensor:"Pressure Sensor",pump:"Pump",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"},ySe={alarm_control_panel:["mode_select","on_off_plugin_unit"],automation:["on_off_switch"],binary_sensor:["contact_sensor","occupancy_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","humidity_sensor","light_sensor","pressure_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],switch:["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 B7;(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.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(B7||(B7={}));const z7={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:"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},bSe={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:z7},exclude:{title:"Exclude",type:"array",items:z7},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},vSe={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},alexaPreserveBrightnessOnTurnOn:{title:"Alexa: Preserve Brightness on Turn-On (Deprecated)",description:"This workaround is now always active and this setting has no effect. The bridge automatically ignores brightness commands that set lights to 100% immediately after a turn-on command.",type:"boolean",default:!0},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},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"},vacuumMinimalClusters:{title:"Vacuum: Minimal Clusters (Alexa troubleshooting)",description:"Strip the vacuum endpoint to only the clusters required by the Matter RVC spec. Removes PowerSource (battery) and the default ServiceArea placeholder. Enable this if Alexa commissions the vacuum but the device never appears in the app. Trade-off: battery percentage will not be reported to Matter controllers.",type:"boolean",default:!1}},additionalProperties:!1},a1={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},filter:bSe,featureFlags:vSe},required:["name","port","filter"],additionalProperties:!1};({...a1,properties:{...a1.properties},required:[...a1?.required??[]]});const xSe={[Vl.Failed]:"error",[Vl.Stopped]:"warning",[Vl.Starting]:"info",[Vl.Running]:"success"},SSe=({status:e,reason:t})=>{if(t)return m.jsx(kn,{severity:xSe[e],variant:"outlined",children:t})},Rc=De(m.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"})),gf=De(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),wSe=De(m.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-1 14H9V8h2zm4 0h-2V8h2z"})),CSe={[Vl.Starting]:{label:"Starting",color:"info",icon:m.jsx(u3,{fontSize:"small"})},[Vl.Running]:{label:"Running",color:"success",icon:m.jsx(Rc,{fontSize:"small"})},[Vl.Stopped]:{label:"Stopped",color:"warning",icon:m.jsx(wSe,{fontSize:"small"})},[Vl.Failed]:{label:"Failed",color:"error",icon:m.jsx(gf,{fontSize:"small"})}},hJ=({status:e,reason:t})=>{const n=CSe[e],r=m.jsx(Et,{icon:n.icon,label:n.label,size:"small",color:n.color,variant:"filled",sx:{fontWeight:500}});return t?m.jsx(bn,{title:t,children:r}):r},pJ=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M13 18h-2v-2h2zm0-4h-2V9h2z"})),mJ=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M11 20v-5.5H9L13 7v5.5h2z"})),NT=De(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4"})),X1=De(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"})),VC=De([m.jsx("path",{d:"M15.11 12.45 14 10.24l-3.11 6.21c-.16.34-.51.55-.89.55s-.73-.21-.89-.55L7.38 13H2v5c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-5h-6c-.38 0-.73-.21-.89-.55"},"0"),m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v5h6c.38 0 .73.21.89.55L10 13.76l3.11-6.21c.34-.68 1.45-.68 1.79 0L16.62 11H22V6c0-1.1-.9-2-2-2"},"1")]);function ESe(e){return Qe("MuiLinearProgress",e)}tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const LT=4,FT=df`
|
|
148
148
|
0% {
|
|
149
149
|
left: -35%;
|
|
150
150
|
right: 100%;
|
|
@@ -480,4 +480,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
480
480
|
To pick up a draggable item, press the space bar.
|
|
481
481
|
While dragging, use the arrow keys to move the item.
|
|
482
482
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
483
|
-
`},pat={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 mat(e){let{announcements:t=pat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=hat}=e;const{announce:o,announcement:s}=cat(),a=nx("DndLiveRegion"),[l,u]=O.useState(!1);if(O.useEffect(()=>{u(!0)},[]),dat(O.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const c=qt.createElement(qt.Fragment,null,qt.createElement(lat,{id:r,value:i.draggable}),qt.createElement(uat,{id:a,announcement:s}));return n?_d.createPortal(c,n):c}var Ni;(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"})(Ni||(Ni={}));function SA(){}function gK(e,t){return O.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function gat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return O.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function ile(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ole(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function yat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function yK(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 sle(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function bK(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 bat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=bK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=ile(bK(l),i);o.push({id:a,data:{droppableContainer:s,value:u}})}}return o.sort(ole)},vat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=yK(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=yK(l),c=i.reduce((h,g,y)=>h+ile(u[y],g),0),f=Number((c/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(ole)};function xat(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,u=e.width*e.height,c=s*a,f=c/(l+u-c);return Number(f.toFixed(4))}return 0}const Sat=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=xat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(yat)};function wat(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ale(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function Cat(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 Eat=Cat(1);function Aat(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 kat(e,t,n){const r=Aat(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),u=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}const _at={ignoreTransform:!1};function h0(e,t){t===void 0&&(t=_at);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:c}=fs(e).getComputedStyle(e);u&&(n=kat(n,u,c))}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 vK(e){return h0(e,{ignoreTransform:!0})}function Dat(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Oat(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function Tat(e,t){t===void 0&&(t=fs(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 Vk(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(f8(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ex(i)||tle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&Tat(i,o)&&n.push(i),Oat(i,o)?n:r(i.parentNode)}return e?r(e):n}function lle(e){const[t]=Vk(e,1);return t??null}function GO(e){return!Hk||!e?null:d0(e)?e:d8(e)?f8(e)||e===f0(e).scrollingElement?window:ex(e)?e:null:null}function ule(e){return d0(e)?e.scrollX:e.scrollLeft}function cle(e){return d0(e)?e.scrollY:e.scrollTop}function KR(e){return{x:ule(e),y:cle(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function dle(e){return!Hk||!e?!1:e===document.scrollingElement}function fle(e){const t={x:0,y:0},n=dle(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 Rat={x:.2,y:.2};function Iat(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Rat);const{isTop:u,isBottom:c,isLeft:f,isRight:h}=fle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!c&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Mat(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 hle(e){return e.reduce((t,n)=>Zm(t,KR(n)),sl)}function Pat(e){return e.reduce((t,n)=>t+ule(n),0)}function jat(e){return e.reduce((t,n)=>t+cle(n),0)}function $at(e,t){if(t===void 0&&(t=h0),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);lle(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Nat=[["x",["left","right"],Pat],["y",["top","bottom"],jat]];class m8{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=Vk(n),i=hle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of Nat)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(r),c=i[o]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class I1{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 Lat(e){const{EventTarget:t}=fs(e);return e instanceof t?e:f0(e)}function KO(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 ta;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ta||(ta={}));function xK(e){e.preventDefault()}function Fat(e){e.stopPropagation()}var $n;(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"})($n||($n={}));const ple={start:[$n.Space,$n.Enter],cancel:[$n.Esc],end:[$n.Space,$n.Enter,$n.Tab]},Bat=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $n.Right:return{...n,x:n.x+25};case $n.Left:return{...n,x:n.x-25};case $n.Down:return{...n,y:n.y+25};case $n.Up:return{...n,y:n.y-25}}};class g8{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 I1(f0(n)),this.windowListeners=new I1(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ta.Resize,this.handleCancel),this.windowListeners.add(ta.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ta.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&$at(r),n(sl)}handleKeyDown(t){if(p8(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=ple,coordinateGetter:s=Bat,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:u}=r.current,c=u?{x:u.left,y:u.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=c);const f=s(t,{active:n,context:r.current,currentCoordinates:c});if(f){const h=Zb(f,c),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:A,maxScroll:E,minScroll:_}=fle(b),D=Mat(b),T={x:Math.min(v===$n.Right?D.right-D.width/2:D.right,Math.max(v===$n.Right?D.left:D.left+D.width/2,f.x)),y:Math.min(v===$n.Down?D.bottom-D.height/2:D.bottom,Math.max(v===$n.Down?D.top:D.top+D.height/2,f.y))},M=v===$n.Right&&!C||v===$n.Left&&!w,L=v===$n.Down&&!A||v===$n.Up&&!S;if(M&&T.x!==f.x){const j=b.scrollLeft+h.x,I=v===$n.Right&&j<=E.x||v===$n.Left&&j>=_.x;if(I&&!h.y){b.scrollTo({left:j,behavior:a});return}I?g.x=b.scrollLeft-j:g.x=v===$n.Right?b.scrollLeft-E.x:b.scrollLeft-_.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(L&&T.y!==f.y){const j=b.scrollTop+h.y,I=v===$n.Down&&j<=E.y||v===$n.Up&&j>=_.y;if(I&&!h.x){b.scrollTo({top:j,behavior:a});return}I?g.y=b.scrollTop-j:g.y=v===$n.Down?b.scrollTop-E.y:b.scrollTop-_.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,Zm(Zb(f,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()}}g8.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ple,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 SK(e){return!!(e&&"distance"in e)}function wK(e){return!!(e&&"delay"in e)}class y8{constructor(t,n,r){var i;r===void 0&&(r=Lat(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=f0(s),this.documentListeners=new I1(this.document),this.listeners=new I1(r),this.windowListeners=new I1(fs(s)),this.initialCoordinates=(i=GR(o))!=null?i:sl,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(ta.Resize,this.handleCancel),this.windowListeners.add(ta.DragStart,xK),this.windowListeners.add(ta.VisibilityChange,this.handleCancel),this.windowListeners.add(ta.ContextMenu,xK),this.documentListeners.add(ta.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(SK(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(ta.Click,Fat,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ta.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=GR(t))!=null?n:sl,u=Zb(i,l);if(!r&&a){if(SK(a)){if(a.tolerance!=null&&KO(u,a.tolerance))return this.handleCancel();if(KO(u,a.distance))return this.handleStart()}if(wK(a)&&KO(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);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===$n.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const zat={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class b8 extends y8{constructor(t){const{event:n}=t,r=f0(n.target);super(t,zat,r)}}b8.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 Uat={move:{name:"mousemove"},end:{name:"mouseup"}};var YR;(function(e){e[e.RightClick=2]="RightClick"})(YR||(YR={}));class Hat extends y8{constructor(t){super(t,Uat,f0(t.event.target))}}Hat.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===YR.RightClick?!1:(r?.({event:n}),!0)}}];const YO={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Vat extends y8{constructor(t){super(t,YO)}static setup(){return window.addEventListener(YO.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(YO.move.name,t)};function t(){}}}Vat.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 M1;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(M1||(M1={}));var wA;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(wA||(wA={}));function Wat(e){let{acceleration:t,activator:n=M1.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=wA.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:f,threshold:h}=e;const g=Gat({delta:f,disabled:!o}),[y,b]=rat(),v=O.useRef({x:0,y:0}),S=O.useRef({x:0,y:0}),C=O.useMemo(()=>{switch(n){case M1.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case M1.DraggableRect:return i}},[n,i,l]),w=O.useRef(null),A=O.useCallback(()=>{const _=w.current;if(!_)return;const D=v.current.x*S.current.x,T=v.current.y*S.current.y;_.scrollBy(D,T)},[]),E=O.useMemo(()=>a===wA.TreeOrder?[...u].reverse():u,[a,u]);O.useEffect(()=>{if(!o||!u.length||!C){b();return}for(const _ of E){if(r?.(_)===!1)continue;const D=u.indexOf(_),T=c[D];if(!T)continue;const{direction:M,speed:L}=Iat(_,T,C,t,h);for(const j of["x","y"])g[j][M[j]]||(L[j]=0,M[j]=0);if(L.x>0||L.y>0){b(),w.current=_,y(A,s),v.current=L,S.current=M;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,u,E,c,JSON.stringify(h)])}const qat={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function Gat(e){let{delta:t,disabled:n}=e;const r=qR(t);return tx(i=>{if(n||!r||!i)return qat;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function Kat(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return tx(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Yat(e,t){return O.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 tv;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(tv||(tv={}));var XR;(function(e){e.Optimized="optimized"})(XR||(XR={}));const CK=new Map;function Xat(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=O.useState(null),{frequency:a,measure:l,strategy:u}=i,c=O.useRef(e),f=v(),h=Qb(f),g=O.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=O.useRef(null),b=tx(S=>{if(f&&!n)return CK;if(!S||S===CK||c.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 A=w.node.current,E=A?new m8(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return O.useEffect(()=>{c.current=e},[e]),O.useEffect(()=>{f||g()},[n,f]),O.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),O.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(u){case tv.Always:return!1;case tv.BeforeDragging:return n;default:return!n}}}function mle(e,t){return tx(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Jat(e,t){return mle(e,t)}function Qat(e){let{callback:t,disabled:n}=e;const r=h8(t),i=O.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return O.useEffect(()=>()=>i?.disconnect(),[i]),i}function Wk(e){let{callback:t,disabled:n}=e;const r=h8(t),i=O.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return O.useEffect(()=>()=>i?.disconnect(),[i]),i}function Zat(e){return new m8(h0(e),e)}function EK(e,t,n){t===void 0&&(t=Zat);const[r,i]=O.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c})}const s=Qat({callback(l){if(e)for(const u of l){const{type:c,target:f}=u;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=Wk({callback:o});return gu(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function elt(e){const t=mle(e);return ale(e,t)}const AK=[];function tlt(e){const t=O.useRef(e),n=tx(r=>e?r&&r!==AK&&e&&t.current&&e.parentNode===t.current.parentNode?r:Vk(e):AK,[e]);return O.useEffect(()=>{t.current=e},[e]),n}function nlt(e){const[t,n]=O.useState(null),r=O.useRef(e),i=O.useCallback(o=>{const s=GO(o.target);s&&n(a=>a?(a.set(s,KR(s)),new Map(a)):null)},[]);return O.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const u=GO(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,KR(u)]):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 u=GO(l);u?.removeEventListener("scroll",i)})}},[i,e]),O.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Zm(o,s),sl):hle(e):sl,[e,t])}function kK(e,t){t===void 0&&(t=[]);const n=O.useRef(null);return O.useEffect(()=>{n.current=null},t),O.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Zb(e,n.current):sl}function rlt(e){O.useEffect(()=>{if(!Hk)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 ilt(e,t){return O.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function gle(e){return O.useMemo(()=>e?Dat(e):null,[e])}const _K=[];function olt(e,t){t===void 0&&(t=h0);const[n]=e,r=gle(n?fs(n):null),[i,o]=O.useState(_K);function s(){o(()=>e.length?e.map(l=>dle(l)?r:new m8(t(l),l)):_K)}const a=Wk({callback:s});return gu(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function slt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ex(t)?t:e}function alt(e){let{measure:t}=e;const[n,r]=O.useState(null),i=O.useCallback(u=>{for(const{target:c}of u)if(ex(c)){r(f=>{const h=t(c);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=Wk({callback:i}),s=O.useCallback(u=>{const c=slt(u);o?.disconnect(),c&&o?.observe(c),r(c?t(c):null)},[t,o]),[a,l]=xA(s);return O.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const llt=[{sensor:b8,options:{}},{sensor:g8,options:{}}],ult={current:{}},SC={draggable:{measure:vK},droppable:{measure:vK,strategy:tv.WhileDragging,frequency:XR.Optimized},dragOverlay:{measure:h0}};class P1 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 clt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new P1,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:SA},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:SC,measureDroppableContainers:SA,windowRect:null,measuringScheduled:!1},dlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:SA,draggableNodes:new Map,over:null,measureDroppableContainers:SA},qk=O.createContext(dlt),yle=O.createContext(clt);function flt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new P1}}}function hlt(e,t){switch(t.type){case Ni.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ni.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 Ni.DragEnd:case Ni.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ni.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new P1(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Ni.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 P1(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Ni.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new P1(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function plt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=O.useContext(qk),o=qR(r),s=qR(n?.id);return O.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!p8(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const f=sat(c);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function mlt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function glt(e){return O.useMemo(()=>({draggable:{...SC.draggable,...e?.draggable},droppable:{...SC.droppable,...e?.droppable},dragOverlay:{...SC.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function ylt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=O.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;gu(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const c=n(u),f=ale(c,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=lle(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const ble=O.createContext({...sl,scaleX:1,scaleY:1});var vd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(vd||(vd={}));const blt=O.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:c=llt,collisionDetection:f=Sat,measuring:h,modifiers:g,...y}=t;const b=O.useReducer(hlt,void 0,flt),[v,S]=b,[C,w]=fat(),[A,E]=O.useState(vd.Uninitialized),_=A===vd.Initialized,{draggable:{active:D,nodes:T,translate:M},droppable:{containers:L}}=v,j=D!=null?T.get(D):null,I=O.useRef({initial:null,translated:null}),N=O.useMemo(()=>{var kt;return D!=null?{id:D,data:(kt=j?.data)!=null?kt:ult,rect:I}:null},[D,j]),$=O.useRef(null),[z,F]=O.useState(null),[G,V]=O.useState(null),H=Qb(y,Object.values(y)),X=nx("DndDescribedBy",s),B=O.useMemo(()=>L.getEnabled(),[L]),W=glt(h),{droppableRects:Y,measureDroppableContainers:U,measuringScheduled:K}=Xat(B,{dragging:_,dependencies:[M.x,M.y],config:W.droppable}),Z=Kat(T,D),J=O.useMemo(()=>G?GR(G):null,[G]),Q=yr(),ie=Jat(Z,W.draggable.measure);ylt({activeNode:D!=null?T.get(D):null,config:Q.layoutShiftCompensation,initialRect:ie,measure:W.draggable.measure});const le=EK(Z,W.draggable.measure,ie),te=EK(Z?Z.parentElement:null),ne=O.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=L.getNodeFor((n=ne.current.over)==null?void 0:n.id),ue=alt({measure:W.dragOverlay.measure}),pe=(r=ue.nodeRef.current)!=null?r:Z,we=_?(i=ue.rect)!=null?i:le:null,ke=!!(ue.nodeRef.current&&ue.rect),Ae=elt(ke?null:le),Fe=gle(pe?fs(pe):null),Me=tlt(_?oe??Z:null),st=olt(Me),Ge=mlt(g,{transform:{x:M.x-Ae.x,y:M.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:G,active:N,activeNodeRect:le,containerNodeRect:te,draggingNodeRect:we,over:ne.current.over,overlayNodeRect:ue.rect,scrollableAncestors:Me,scrollableAncestorRects:st,windowRect:Fe}),Mt=J?Zm(J,M):null,pt=nlt(Me),Be=kK(pt),Ie=kK(pt,[le]),ze=Zm(Ge,Be),Je=we?Eat(we,Ge):null,nt=N&&Je?f({active:N,collisionRect:Je,droppableRects:Y,droppableContainers:B,pointerCoordinates:Mt}):null,ot=sle(nt,"id"),[Ye,Nt]=O.useState(null),Lt=ke?Ge:Zm(Ge,Ie),_t=wat(Lt,(o=Ye?.rect)!=null?o:null,le),Xn=O.useRef(null),rn=O.useCallback((kt,Pt)=>{let{sensor:Qt,options:Pn}=Pt;if($.current==null)return;const on=T.get($.current);if(!on)return;const xt=kt.nativeEvent,pn=new Qt({active:$.current,activeNode:on,event:xt,options:Pn,context:ne,onAbort(br){if(!T.get(br))return;const{onDragAbort:ae}=H.current,he={id:br};ae?.(he),C({type:"onDragAbort",event:he})},onPending(br,ei,ae,he){if(!T.get(br))return;const{onDragPending:Ne}=H.current,Ue={id:br,constraint:ei,initialCoordinates:ae,offset:he};Ne?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=$.current;if(ei==null)return;const ae=T.get(ei);if(!ae)return;const{onDragStart:he}=H.current,ve={activatorEvent:xt,active:{id:ei,data:ae.data,rect:I}};_d.unstable_batchedUpdates(()=>{he?.(ve),E(vd.Initializing),S({type:Ni.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:ve}),F(Xn.current),V(xt)})},onMove(br){S({type:Ni.DragMove,coordinates:br})},onEnd:Zr(Ni.DragEnd),onCancel:Zr(Ni.DragCancel)});Xn.current=pn;function Zr(br){return async function(){const{active:ae,collisions:he,over:ve,scrollAdjustedTranslate:Ne}=ne.current;let Ue=null;if(ae&&Ne){const{cancelDrop:gt}=H.current;Ue={activatorEvent:xt,active:ae,collisions:he,delta:Ne,over:ve},br===Ni.DragEnd&&typeof gt=="function"&&await Promise.resolve(gt(Ue))&&(br=Ni.DragCancel)}$.current=null,_d.unstable_batchedUpdates(()=>{S({type:br}),E(vd.Uninitialized),Nt(null),F(null),V(null),Xn.current=null;const gt=br===Ni.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=H.current[gt];rt?.(Ue),C({type:gt,event:Ue})}})}}},[T]),lt=O.useCallback((kt,Pt)=>(Qt,Pn)=>{const on=Qt.nativeEvent,xt=T.get(Pn);if($.current!==null||!xt||on.dndKit||on.defaultPrevented)return;const pn={active:xt};kt(Qt,Pt.options,pn)===!0&&(on.dndKit={capturedBy:Pt.sensor},$.current=Pn,rn(Qt,Pt))},[T,rn]),zt=Yat(c,lt);rlt(c),gu(()=>{le&&A===vd.Initializing&&E(vd.Initialized)},[le,A]),O.useEffect(()=>{const{onDragMove:kt}=H.current,{active:Pt,activatorEvent:Qt,collisions:Pn,over:on}=ne.current;if(!Pt||!Qt)return;const xt={active:Pt,activatorEvent:Qt,collisions:Pn,delta:{x:ze.x,y:ze.y},over:on};_d.unstable_batchedUpdates(()=>{kt?.(xt),C({type:"onDragMove",event:xt})})},[ze.x,ze.y]),O.useEffect(()=>{const{active:kt,activatorEvent:Pt,collisions:Qt,droppableContainers:Pn,scrollAdjustedTranslate:on}=ne.current;if(!kt||$.current==null||!Pt||!on)return;const{onDragOver:xt}=H.current,pn=Pn.get(ot),Zr=pn&&pn.rect.current?{id:pn.id,rect:pn.rect.current,data:pn.data,disabled:pn.disabled}:null,br={active:kt,activatorEvent:Pt,collisions:Qt,delta:{x:on.x,y:on.y},over:Zr};_d.unstable_batchedUpdates(()=>{Nt(Zr),xt?.(br),C({type:"onDragOver",event:br})})},[ot]),gu(()=>{ne.current={activatorEvent:G,active:N,activeNode:Z,collisionRect:Je,collisions:nt,droppableRects:Y,draggableNodes:T,draggingNode:pe,draggingNodeRect:we,droppableContainers:L,over:Ye,scrollableAncestors:Me,scrollAdjustedTranslate:ze},I.current={initial:we,translated:Je}},[N,Z,nt,Je,T,pe,we,Y,L,Ye,Me,ze]),Wat({...Q,delta:M,draggingRect:Je,pointerCoordinates:Mt,scrollableAncestors:Me,scrollableAncestorRects:st});const _n=O.useMemo(()=>({active:N,activeNode:Z,activeNodeRect:le,activatorEvent:G,collisions:nt,containerNodeRect:te,dragOverlay:ue,draggableNodes:T,droppableContainers:L,droppableRects:Y,over:Ye,measureDroppableContainers:U,scrollableAncestors:Me,scrollableAncestorRects:st,measuringConfiguration:W,measuringScheduled:K,windowRect:Fe}),[N,Z,le,G,nt,te,ue,T,L,Y,Ye,U,Me,st,W,K,Fe]),Gn=O.useMemo(()=>({activatorEvent:G,activators:zt,active:N,activeNodeRect:le,ariaDescribedById:{draggable:X},dispatch:S,draggableNodes:T,over:Ye,measureDroppableContainers:U}),[G,zt,N,le,S,X,T,Ye,U]);return qt.createElement(rle.Provider,{value:w},qt.createElement(qk.Provider,{value:Gn},qt.createElement(yle.Provider,{value:_n},qt.createElement(ble.Provider,{value:_t},u)),qt.createElement(plt,{disabled:a?.restoreFocus===!1})),qt.createElement(mat,{...a,hiddenTextDescribedById:X}));function yr(){const kt=z?.autoScrollEnabled===!1,Pt=typeof l=="object"?l.enabled===!1:l===!1,Qt=_&&!kt&&!Pt;return typeof l=="object"?{...l,enabled:Qt}:{enabled:Qt}}}),vlt=O.createContext(null),DK="button",xlt="Draggable";function Slt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=nx(xlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:f,over:h}=O.useContext(qk),{role:g=DK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=O.useContext(v?ble:vlt),[C,w]=xA(),[A,E]=xA(),_=ilt(s,t),D=Qb(n);gu(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:D}),()=>{const M=f.get(t);M&&M.key===o&&f.delete(t)}),[f,t]);const T=O.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===DK?!0:void 0,"aria-roledescription":y,"aria-describedby":c.draggable}),[r,g,b,v,y,c.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:T,isDragging:v,listeners:r?void 0:_,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function wlt(){return O.useContext(yle)}const Clt="Droppable",Elt={timeout:25};function Alt(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=nx(Clt),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=O.useContext(qk),c=O.useRef({disabled:n}),f=O.useRef(!1),h=O.useRef(null),g=O.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...Elt,...i},S=Qb(b??r),C=O.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=Wk({callback:C,disabled:y||!s}),A=O.useCallback((T,M)=>{w&&(M&&(w.unobserve(M),f.current=!1),T&&w.observe(T))},[w]),[E,_]=xA(A),D=Qb(t);return O.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),O.useEffect(()=>(a({type:Ni.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:D}}),()=>a({type:Ni.UnregisterDroppable,key:o,id:r})),[r]),O.useEffect(()=>{n!==c.current.disabled&&(a({type:Ni.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:_}}function v8(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function klt(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Sw(e){return e!==null&&e>=0}function _lt(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 Dlt(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const vle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=v8(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}},ww={scaleX:1,scaleY:1},Olt=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 u=o[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...ww}:null}const l=Tlt(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...ww}:i<n&&i>=s?{x:0,y:a.height+l,...ww}:{x:0,y:0,...ww}};function Tlt(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 xle="Sortable",Sle=qt.createContext({activeIndex:-1,containerId:xle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:vle,disabled:{draggable:!1,droppable:!1}});function Rlt(e){let{children:t,id:n,items:r,strategy:i=vle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=wlt(),f=nx(xle,n),h=a.rect!==null,g=O.useMemo(()=>r.map(_=>typeof _=="object"&&"id"in _?_.id:_),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=u?g.indexOf(u.id):-1,S=O.useRef(g),C=!_lt(g,S.current),w=v!==-1&&b===-1||C,A=Dlt(o);gu(()=>{C&&y&&c(g)},[C,g,y,c]),O.useEffect(()=>{S.current=g},[g]);const E=O.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:klt(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Sle.Provider,{value:E},t)}const Ilt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return v8(n,r,i).indexOf(t)},Mlt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},Plt={duration:200,easing:"ease"},wle="transform",jlt=ev.Transition.toString({property:wle,duration:0,easing:"linear"}),$lt={roleDescription:"sortable"};function Nlt(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=O.useState(null),a=O.useRef(n);return gu(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const u=h0(r.current,{ignoreTransform:!0}),c={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(c.x||c.y)&&s(c)}}n!==a.current&&(a.current=n)},[t,n,r,i]),O.useEffect(()=>{o&&s(null)},[o]),o}function Llt(e){let{animateLayoutChanges:t=Mlt,attributes:n,disabled:r,data:i,getNewIndex:o=Ilt,id:s,strategy:a,resizeObserverConfig:l,transition:u=Plt}=e;const{items:c,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=O.useContext(Sle),w=Flt(r,g),A=c.indexOf(s),E=O.useMemo(()=>({sortable:{containerId:f,index:A,items:c},...i}),[f,i,A,c]),_=O.useMemo(()=>c.slice(c.indexOf(s)),[c,s]),{rect:D,node:T,isOver:M,setNodeRef:L}=Alt({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...l}}),{active:j,activatorEvent:I,activeNodeRect:N,attributes:$,setNodeRef:z,listeners:F,isDragging:G,over:V,setActivatorNodeRef:H,transform:X}=Slt({id:s,data:E,attributes:{...$lt,...n},disabled:w.draggable}),B=nat(L,z),W=!!j,Y=W&&!y&&Sw(h)&&Sw(v),U=!S&&G,K=U&&Y?X:null,J=Y?K??(a??C)({rects:b,activeNodeRect:N,activeIndex:h,overIndex:v,index:A}):null,Q=Sw(h)&&Sw(v)?o({id:s,items:c,activeIndex:h,overIndex:v}):A,ie=j?.id,le=O.useRef({activeId:ie,items:c,newIndex:Q,containerId:f}),te=c!==le.current.items,ne=t({active:j,containerId:f,isDragging:G,isSorting:W,id:s,index:A,items:c,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:u,wasDragging:le.current.activeId!=null}),oe=Nlt({disabled:!ne,index:A,node:T,rect:D});return O.useEffect(()=>{W&&le.current.newIndex!==Q&&(le.current.newIndex=Q),f!==le.current.containerId&&(le.current.containerId=f),c!==le.current.items&&(le.current.items=c)},[W,Q,f,c]),O.useEffect(()=>{if(ie===le.current.activeId)return;if(ie!=null&&le.current.activeId==null){le.current.activeId=ie;return}const pe=setTimeout(()=>{le.current.activeId=ie},50);return()=>clearTimeout(pe)},[ie]),{active:j,activeIndex:h,attributes:$,data:E,rect:D,index:A,newIndex:Q,items:c,isOver:M,isSorting:W,isDragging:G,listeners:F,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:L,setDraggableNodeRef:z,transform:oe??J,transition:ue()};function ue(){if(oe||te&&le.current.newIndex===A)return jlt;if(!(U&&!p8(I)||!u)&&(W||ne))return ev.Transition.toString({...u,property:wle})}}function Flt(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 CA(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 Blt=[$n.Down,$n.Right,$n.Up,$n.Left],zlt=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(Blt.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case $n.Down:r.top<h.top&&l.push(f);break;case $n.Up:r.top>h.top&&l.push(f);break;case $n.Left:r.left>h.left&&l.push(f);break;case $n.Right:r.left<h.left&&l.push(f);break}});const u=vat({collisionRect:r,droppableRects:i,droppableContainers:l});let c=sle(u,"id");if(c===s?.id&&u.length>1&&(c=u[1].id),c!=null){const f=o.get(n.id),h=o.get(c),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=Vk(y).some((_,D)=>a[D]!==_),S=Cle(f,h),C=Ult(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:Zb(A,w)}}}};function Cle(e,t){return!CA(e)||!CA(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ult(e,t){return!CA(e)||!CA(t)||!Cle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const Hlt=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=Llt({id:e.id}),[l,u]=O.useState(!1);O.useEffect(()=>{A3(e.id).then(u)},[e.id]);const c={transform:ev.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(er,{ref:i,style:c,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(vke,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:Q1(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:EM(e),width:40,height:40,boxShadow:2},children:(()=>{const f=CM(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Vlt=()=>{const e=Tc(),{content:t,isLoading:n}=Hg(),r=H3e(),[i,o]=O.useState([]),[s,a]=O.useState(!1);O.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=gat(gK(b8),gK(g8,{coordinateGetter:zlt})),u=O.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return v8(b,v,S)}),a(!0))},[]),c=O.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=O.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(re,{children:"Loading..."}):m.jsxs(Ut,{spacing:3,children:[m.jsx(s3,{items:[{name:"Bridges",to:jt.bridges},{name:"Startup Order",to:jt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(rg,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(re,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(re,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(kn,{severity:"info",action:m.jsx(Tt,{color:"inherit",size:"small",startIcon:m.jsx(eE,{}),onClick:c,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(blt,{sensors:l,collisionDetection:bat,onDragEnd:u,children:m.jsx(Rlt,{items:f,strategy:Olt,children:m.jsx(Ut,{spacing:1,children:i.map((h,g)=>m.jsx(Hlt,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(Tt,{variant:"contained",startIcon:m.jsx(eE,{}),onClick:c,children:"Save Startup Order"})})]})},XO="https://riddix.github.io/home-assistant-matter-hub",jt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:XO,faq:{multiFabric:`${XO}/connect-multiple-fabrics`,bridgeConfig:`${XO}/bridge-configuration`}},Wlt=[{path:"",element:m.jsx(dbe,{}),children:[{path:"",element:m.jsx(I_e,{})},{path:jt.bridges,element:m.jsx(O_e,{})},{path:jt.createBridge,element:m.jsx(vZe,{})},{path:jt.bridge(":bridgeId"),element:m.jsx(tke,{})},{path:jt.editBridge(":bridgeId"),element:m.jsx(xZe,{})},{path:jt.devices,element:m.jsx(X_e,{})},{path:jt.networkMap,element:m.jsx(Jst,{})},{path:jt.health,element:m.jsx(DZe,{})},{path:jt.labels,element:m.jsx(IZe,{})},{path:jt.lockCredentials,element:m.jsx(LZe,{})},{path:jt.settings,element:m.jsx(tat,{})},{path:jt.startup,element:m.jsx(Vlt,{})}]}],qlt={items:{isInitialized:!1,isLoading:!1}},Glt=NI(qlt,e=>{e.addCase(Fo.pending,t=>{t.items.isLoading=!0}).addCase(Fo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Fo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(DX.fulfilled,(t,n)=>{t.items.content?.push(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(RX.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(OX.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(IX,(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)}})}),Klt={byBridge:{}},Ylt=NI(Klt,e=>{e.addCase(cc.pending,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)}).addCase(cc.rejected,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)}).addCase(cc.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)})}),Xlt={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},JO=NI(Xlt,e=>{e.addCase(cc.pending,t=>{t.isLoading=!0}).addCase(cc.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(cc.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Jlt=H1e({reducer:{bridges:Glt,devices:Ylt}}),x8=kge({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Qlt(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Zlt=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Ze({root:["root",!n&&"gutters",r]},Qlt,t)},eut=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(qe(({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}]}))),Ele=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,u={...r,component:o,disableGutters:s,variant:a},c=Zlt(u);return m.jsx(eut,{as:o,className:Oe(c.root,i),ref:n,ownerState:u,...l})}),tut=[{name:"GitHub",url:jt.githubRepository},{name:"Documentation",url:jt.documentation}],nut=()=>m.jsxs(x8,{sx:{mt:16,mb:4},children:[m.jsx(Di,{sx:{mt:4,mb:4}}),m.jsx(et,{container:!0,spacing:2,justifyContent:"center",children:tut.map((e,t)=>m.jsx(et,{size:{xs:12,sm:"auto"},children:m.jsx(Tt,{fullWidth:!0,size:"small",variant:"outlined",component:o3,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function rut(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const iut=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return Ze(i,rut,r)},OK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,out=me(Nr,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(qe(({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(Ln(["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?OK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?OK(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"})}}]}))),sut=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,u={...r,color:o,position:a,enableColorOnDark:s},c=iut(u);return m.jsx(out,{square:!0,component:"header",ownerState:u,elevation:4,className:Oe(c.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function aut(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=o.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");a=parseInt(u[4],10),l=parseInt(u[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 lut(e){return typeof e=="function"?e():e}function Cw(e,t,n){const r=lut(n),i=aut(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const uut=O.forwardRef(function(t,n){const r=ka(),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:u,direction:c="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=_a,..._}=t,D=O.useRef(null),T=Tr(hf(l),D,n),M=V=>H=>{V&&(H===void 0?V(D.current):V(D.current,H))},L=M((V,H)=>{Cw(c,V,u),RI(V),g&&g(V,H)}),j=M((V,H)=>{const X=Gd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...X}),V.style.transition=r.transitions.create("transform",{...X}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,H)}),I=M(y),N=M(C),$=M(V=>{const H=Gd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",H),V.style.transition=r.transitions.create("transform",H),Cw(c,V,u),v&&v(V)}),z=M(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),F=V=>{s&&s(D.current,V)},G=O.useCallback(()=>{D.current&&Cw(c,D.current,u)},[c,u]);return O.useEffect(()=>{if(h||c==="down"||c==="right")return;const V=_I(()=>{D.current&&Cw(c,D.current,u)}),H=tl(D.current);return H.addEventListener("resize",V),()=>{V.clear(),H.removeEventListener("resize",V)}},[c,h,u]),O.useEffect(()=>{h||G()},[h,G]),m.jsx(E,{nodeRef:D,onEnter:L,onEntered:I,onEntering:j,onExit:$,onExited:z,onExiting:N,addEndListener:F,appear:a,in:h,timeout:A,..._,children:(V,{ownerState:H,...X})=>O.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...X})})});function cut(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ale=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},dut=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return Ze(i,cut,t)},fut=me(KI,{name:"MuiDrawer",slot:"Root",overridesResolver:Ale})(qe(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),hut=me("div",{shouldForwardProp:ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ale})({flex:"0 0 auto"}),put=me(Nr,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(qe(({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}`}}]}))),kle={left:"right",right:"left",top:"down",bottom:"up"};function mut(e){return["left","right"].includes(e)}function gut({direction:e},t){return e==="rtl"&&mut(t)?kle[t]:t}const yut=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ka(),o=ff(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:u,className:c,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:_={},slotProps:D={},...T}=r,M=O.useRef(!1);O.useEffect(()=>{M.current=!0},[]);const L=gut({direction:o?"rtl":"ltr"},a),I={...r,anchor:a,elevation:f,open:v,variant:E,...T},N=dut(I),$={slots:{transition:w,..._},slotProps:{paper:S,transition:C,...D,backdrop:DI(D.backdrop||{...l,...g},{transitionDuration:A})}},[z,F]=ut("root",{ref:n,elementType:fut,className:Oe(N.root,N.modal,c),shouldForwardComponentProp:!0,ownerState:I,externalForwardedProps:{...$,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:$.slots.backdrop},slotProps:{backdrop:$.slotProps.backdrop}}}),[G,V]=ut("paper",{elementType:put,shouldForwardComponentProp:!0,className:Oe(N.paper,S.className),ownerState:I,externalForwardedProps:$,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[H,X]=ut("docked",{elementType:hut,ref:n,className:Oe(N.root,N.docked,c),ownerState:I,externalForwardedProps:$,additionalProps:T}),[B,W]=ut("transition",{elementType:uut,ownerState:I,externalForwardedProps:$,additionalProps:{in:v,direction:kle[L],timeout:A,appear:M.current}}),Y=m.jsx(G,{...V,children:u});if(E==="permanent")return m.jsx(H,{...X,children:Y});const U=m.jsx(B,{...W,children:Y});return E==="persistent"?m.jsx(H,{...X,children:U}):m.jsx(z,{...F,children:U})}),but=BY({themeId:ua}),QO={error:"#d32f2f",warn:"#ed6c02",info:"#0288d1",debug:"#7b1fa2"},vut={error:gf,warn:n3,info:qI,debug:C3},xut=({open:e,onClose:t})=>{const[n,r]=O.useState([]),[i,o]=O.useState(!0),[s,a]=O.useState("error,warn,info".split(",")),[l,u]=O.useState(""),[c,f]=O.useState(!0),h=O.useCallback(async()=>{try{const S=new URLSearchParams({level:s.join(","),limit:"500",...l&&{search:l}}),C=await fetch(`api/logs?${S}`);if(C.ok){const w=await C.json();r(w.entries)}}catch(S){console.error("Failed to fetch logs:",S)}finally{o(!1)}},[s,l]);O.useEffect(()=>{e&&h()},[e,h]),O.useEffect(()=>{if(!c||!e)return;const S=setInterval(h,5e3);return()=>clearInterval(S)},[c,e,h]);const g=S=>{a(Array.isArray(S.target.value)?S.target.value:[S.target.value])},y=S=>{u(S.target.value)},b=async()=>{try{await fetch("api/logs",{method:"DELETE"}),r([])}catch(S){console.error("Failed to clear logs:",S)}},v=S=>{const C=vut[S]||qI;return m.jsx(C,{sx:{fontSize:16,color:QO[S]}})};return m.jsxs(vc,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Sc,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(C3,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(bn,{title:"Auto Refresh",children:m.jsx(Et,{label:c?"Auto":"Manual",color:c?"success":"default",size:"small",onClick:()=>f(!c),sx:{cursor:"pointer"}})}),m.jsx(Fn,{onClick:t,children:m.jsx(fke,{})})]}),m.jsxs(xc,{children:[m.jsx(Ut,{spacing:2,sx:{mb:2},children:m.jsxs(Ut,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(Xa,{size:"small",sx:{minWidth:200},children:[m.jsx(uc,{children:"Log Level"}),m.jsxs(Ua,{value:s,label:"Log Level",onChange:g,multiple:!0,renderValue:S=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(S)?S:[S]).map(C=>m.jsx(Et,{label:C.toUpperCase(),size:"small",sx:{backgroundColor:QO[C],color:"white"}},C))}),children:[m.jsx(rr,{value:"error",children:"Error"}),m.jsx(rr,{value:"warn",children:"Warning"}),m.jsx(rr,{value:"info",children:"Info"}),m.jsx(rr,{value:"debug",children:"Debug"})]})]}),m.jsx(Xr,{size:"small",placeholder:"Search logs...",value:l,onChange:y,sx:{flexGrow:1}}),m.jsx(Tt,{variant:"outlined",onClick:h,children:"Refresh"}),m.jsx(Tt,{variant:"outlined",color:"error",onClick:b,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:i?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(re,{children:"Loading logs..."})}):n.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(re,{color:"text.secondary",children:"No logs found"})}):m.jsx(Ut,{spacing:1,children:n.map((S,C)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[v(S.level),m.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(S.timestamp).toLocaleString()}),m.jsx(Et,{label:S.level.toUpperCase(),size:"small",sx:{backgroundColor:QO[S.level],color:"white",fontSize:"0.7rem",height:20}})]}),m.jsx(re,{sx:{ml:3},children:S.message}),S.context&&m.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(S.context,null,2)})]},`${S.timestamp}-${S.level}-${C}`))})})]}),m.jsx(Yd,{children:m.jsx(Tt,{onClick:t,children:"Close"})})]})};function TK(){const{isConnected:e}=ube(),[t,n]=O.useState(null),[r,i]=O.useState(!1);O.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,u=a&&a.total===0,c=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(gf,{fontSize:"small"}):l?m.jsx(Rc,{fontSize:"small"}):m.jsx(u3,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?u?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(bn,{title:c,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const Sut=e=>O.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("g",{style:{display:"inline"}},O.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"}),O.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"}))),wut="home-assistant-matter-hub",Cut={name:wut};function Eut(){const[e,t]=O.useState("2.1.0-alpha.377");return O.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),O.useMemo(()=>({name:Cut.name,version:e}),[e])}const Aut=e=>{const t=Eut();return m.jsxs(ce,{component:Dc,to:jt.bridges,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(Sut,{style:{height:"40px"}}),m.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(re,{variant:"caption",component:"span",children:t.version})]})},kut=()=>{const e=but("(min-width:600px)"),{mode:t,setMode:n}=qA(),[r,i]=O.useState(!1),[o,s]=O.useState(!1),a=Xh(),l=()=>{n(t==="dark"?"light":"dark")},u=[{label:"Dashboard",icon:m.jsx(KT,{}),to:jt.dashboard},{label:"Bridges",icon:m.jsx(c1,{}),to:jt.bridges},{label:"All Devices",icon:m.jsx(ss,{}),to:jt.devices},{label:"Network Map",icon:m.jsx(JC,{}),to:jt.networkMap},{label:"Startup Order",icon:m.jsx(rg,{}),to:jt.startup},{label:"Lock Credentials",icon:m.jsx(su,{}),to:jt.lockCredentials},{label:"Filter Reference",icon:m.jsx(QC,{}),to:jt.labels},{label:"Settings",icon:m.jsx(w3,{}),to:jt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(_ke,{}):m.jsx(mke,{}),onClick:l},{label:"System Logs",icon:m.jsx(C3,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(VC,{}),to:jt.health}],c=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(sut,{sx:{height:"72px"},children:m.jsx(Ele,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(x8,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(Aut,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.map(f=>f.to?m.jsx(bn,{title:f.label,children:m.jsx(Fn,{component:Dc,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(bn,{title:f.label,children:m.jsx(Fn,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(TK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(TK,{}),m.jsx(Fn,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(Dke,{})})]})]})})}),m.jsx(yut,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(yu,{sx:{width:250},children:u.map(f=>m.jsxs(Hbe,{onClick:()=>c(f),children:[m.jsx(Hl,{children:f.icon}),m.jsx(za,{primary:f.label})]},f.label))})}),m.jsx(xut,{open:r,onClose:()=>i(!1)})]})},_ut=()=>m.jsxs(ce,{children:[m.jsx(kut,{}),m.jsx(Ele,{}),m.jsx(x8,{sx:{p:2},children:m.jsx(aY,{})}),m.jsx(nut,{})]}),Dut=HA({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 wC=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");wC?.startsWith("http")&&(wC=new URL(wC).pathname);const Out=Che([{path:"/",element:m.jsx(_ut,{}),children:Wlt}],{basename:wC});zce.createRoot(document.getElementById("root")).render(m.jsx(O.StrictMode,{children:m.jsx(ide,{store:Jlt,children:m.jsxs(N0e,{theme:Dut,children:[m.jsx(I0e,{}),m.jsx(tX,{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}}}),m.jsx(cbe,{children:m.jsx(Qye,{children:m.jsx(jhe,{router:Out})})})]})})}));
|
|
483
|
+
`},pat={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 mat(e){let{announcements:t=pat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=hat}=e;const{announce:o,announcement:s}=cat(),a=nx("DndLiveRegion"),[l,u]=O.useState(!1);if(O.useEffect(()=>{u(!0)},[]),dat(O.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const c=qt.createElement(qt.Fragment,null,qt.createElement(lat,{id:r,value:i.draggable}),qt.createElement(uat,{id:a,announcement:s}));return n?_d.createPortal(c,n):c}var Ni;(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"})(Ni||(Ni={}));function SA(){}function gK(e,t){return O.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function gat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return O.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function ile(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ole(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function yat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function yK(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 sle(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function bK(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 bat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=bK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=ile(bK(l),i);o.push({id:a,data:{droppableContainer:s,value:u}})}}return o.sort(ole)},vat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=yK(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=yK(l),c=i.reduce((h,g,y)=>h+ile(u[y],g),0),f=Number((c/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(ole)};function xat(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,u=e.width*e.height,c=s*a,f=c/(l+u-c);return Number(f.toFixed(4))}return 0}const Sat=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=xat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(yat)};function wat(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ale(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function Cat(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 Eat=Cat(1);function Aat(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 kat(e,t,n){const r=Aat(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),u=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}const _at={ignoreTransform:!1};function h0(e,t){t===void 0&&(t=_at);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:c}=fs(e).getComputedStyle(e);u&&(n=kat(n,u,c))}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 vK(e){return h0(e,{ignoreTransform:!0})}function Dat(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Oat(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function Tat(e,t){t===void 0&&(t=fs(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 Vk(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(f8(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ex(i)||tle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&Tat(i,o)&&n.push(i),Oat(i,o)?n:r(i.parentNode)}return e?r(e):n}function lle(e){const[t]=Vk(e,1);return t??null}function GO(e){return!Hk||!e?null:d0(e)?e:d8(e)?f8(e)||e===f0(e).scrollingElement?window:ex(e)?e:null:null}function ule(e){return d0(e)?e.scrollX:e.scrollLeft}function cle(e){return d0(e)?e.scrollY:e.scrollTop}function KR(e){return{x:ule(e),y:cle(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function dle(e){return!Hk||!e?!1:e===document.scrollingElement}function fle(e){const t={x:0,y:0},n=dle(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 Rat={x:.2,y:.2};function Iat(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Rat);const{isTop:u,isBottom:c,isLeft:f,isRight:h}=fle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!c&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Mat(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 hle(e){return e.reduce((t,n)=>Zm(t,KR(n)),sl)}function Pat(e){return e.reduce((t,n)=>t+ule(n),0)}function jat(e){return e.reduce((t,n)=>t+cle(n),0)}function $at(e,t){if(t===void 0&&(t=h0),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);lle(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Nat=[["x",["left","right"],Pat],["y",["top","bottom"],jat]];class m8{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=Vk(n),i=hle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of Nat)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(r),c=i[o]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class I1{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 Lat(e){const{EventTarget:t}=fs(e);return e instanceof t?e:f0(e)}function KO(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 ta;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ta||(ta={}));function xK(e){e.preventDefault()}function Fat(e){e.stopPropagation()}var $n;(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"})($n||($n={}));const ple={start:[$n.Space,$n.Enter],cancel:[$n.Esc],end:[$n.Space,$n.Enter,$n.Tab]},Bat=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $n.Right:return{...n,x:n.x+25};case $n.Left:return{...n,x:n.x-25};case $n.Down:return{...n,y:n.y+25};case $n.Up:return{...n,y:n.y-25}}};class g8{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 I1(f0(n)),this.windowListeners=new I1(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ta.Resize,this.handleCancel),this.windowListeners.add(ta.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ta.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&$at(r),n(sl)}handleKeyDown(t){if(p8(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=ple,coordinateGetter:s=Bat,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:u}=r.current,c=u?{x:u.left,y:u.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=c);const f=s(t,{active:n,context:r.current,currentCoordinates:c});if(f){const h=Zb(f,c),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:A,maxScroll:E,minScroll:_}=fle(b),D=Mat(b),T={x:Math.min(v===$n.Right?D.right-D.width/2:D.right,Math.max(v===$n.Right?D.left:D.left+D.width/2,f.x)),y:Math.min(v===$n.Down?D.bottom-D.height/2:D.bottom,Math.max(v===$n.Down?D.top:D.top+D.height/2,f.y))},M=v===$n.Right&&!C||v===$n.Left&&!w,L=v===$n.Down&&!A||v===$n.Up&&!S;if(M&&T.x!==f.x){const j=b.scrollLeft+h.x,I=v===$n.Right&&j<=E.x||v===$n.Left&&j>=_.x;if(I&&!h.y){b.scrollTo({left:j,behavior:a});return}I?g.x=b.scrollLeft-j:g.x=v===$n.Right?b.scrollLeft-E.x:b.scrollLeft-_.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(L&&T.y!==f.y){const j=b.scrollTop+h.y,I=v===$n.Down&&j<=E.y||v===$n.Up&&j>=_.y;if(I&&!h.x){b.scrollTo({top:j,behavior:a});return}I?g.y=b.scrollTop-j:g.y=v===$n.Down?b.scrollTop-E.y:b.scrollTop-_.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,Zm(Zb(f,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()}}g8.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ple,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 SK(e){return!!(e&&"distance"in e)}function wK(e){return!!(e&&"delay"in e)}class y8{constructor(t,n,r){var i;r===void 0&&(r=Lat(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=f0(s),this.documentListeners=new I1(this.document),this.listeners=new I1(r),this.windowListeners=new I1(fs(s)),this.initialCoordinates=(i=GR(o))!=null?i:sl,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(ta.Resize,this.handleCancel),this.windowListeners.add(ta.DragStart,xK),this.windowListeners.add(ta.VisibilityChange,this.handleCancel),this.windowListeners.add(ta.ContextMenu,xK),this.documentListeners.add(ta.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(SK(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(ta.Click,Fat,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ta.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=GR(t))!=null?n:sl,u=Zb(i,l);if(!r&&a){if(SK(a)){if(a.tolerance!=null&&KO(u,a.tolerance))return this.handleCancel();if(KO(u,a.distance))return this.handleStart()}if(wK(a)&&KO(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);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===$n.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const zat={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class b8 extends y8{constructor(t){const{event:n}=t,r=f0(n.target);super(t,zat,r)}}b8.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 Uat={move:{name:"mousemove"},end:{name:"mouseup"}};var YR;(function(e){e[e.RightClick=2]="RightClick"})(YR||(YR={}));class Hat extends y8{constructor(t){super(t,Uat,f0(t.event.target))}}Hat.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===YR.RightClick?!1:(r?.({event:n}),!0)}}];const YO={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Vat extends y8{constructor(t){super(t,YO)}static setup(){return window.addEventListener(YO.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(YO.move.name,t)};function t(){}}}Vat.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 M1;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(M1||(M1={}));var wA;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(wA||(wA={}));function Wat(e){let{acceleration:t,activator:n=M1.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=wA.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:f,threshold:h}=e;const g=Gat({delta:f,disabled:!o}),[y,b]=rat(),v=O.useRef({x:0,y:0}),S=O.useRef({x:0,y:0}),C=O.useMemo(()=>{switch(n){case M1.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case M1.DraggableRect:return i}},[n,i,l]),w=O.useRef(null),A=O.useCallback(()=>{const _=w.current;if(!_)return;const D=v.current.x*S.current.x,T=v.current.y*S.current.y;_.scrollBy(D,T)},[]),E=O.useMemo(()=>a===wA.TreeOrder?[...u].reverse():u,[a,u]);O.useEffect(()=>{if(!o||!u.length||!C){b();return}for(const _ of E){if(r?.(_)===!1)continue;const D=u.indexOf(_),T=c[D];if(!T)continue;const{direction:M,speed:L}=Iat(_,T,C,t,h);for(const j of["x","y"])g[j][M[j]]||(L[j]=0,M[j]=0);if(L.x>0||L.y>0){b(),w.current=_,y(A,s),v.current=L,S.current=M;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,u,E,c,JSON.stringify(h)])}const qat={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function Gat(e){let{delta:t,disabled:n}=e;const r=qR(t);return tx(i=>{if(n||!r||!i)return qat;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function Kat(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return tx(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Yat(e,t){return O.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 tv;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(tv||(tv={}));var XR;(function(e){e.Optimized="optimized"})(XR||(XR={}));const CK=new Map;function Xat(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=O.useState(null),{frequency:a,measure:l,strategy:u}=i,c=O.useRef(e),f=v(),h=Qb(f),g=O.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=O.useRef(null),b=tx(S=>{if(f&&!n)return CK;if(!S||S===CK||c.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 A=w.node.current,E=A?new m8(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return O.useEffect(()=>{c.current=e},[e]),O.useEffect(()=>{f||g()},[n,f]),O.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),O.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(u){case tv.Always:return!1;case tv.BeforeDragging:return n;default:return!n}}}function mle(e,t){return tx(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Jat(e,t){return mle(e,t)}function Qat(e){let{callback:t,disabled:n}=e;const r=h8(t),i=O.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return O.useEffect(()=>()=>i?.disconnect(),[i]),i}function Wk(e){let{callback:t,disabled:n}=e;const r=h8(t),i=O.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return O.useEffect(()=>()=>i?.disconnect(),[i]),i}function Zat(e){return new m8(h0(e),e)}function EK(e,t,n){t===void 0&&(t=Zat);const[r,i]=O.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c})}const s=Qat({callback(l){if(e)for(const u of l){const{type:c,target:f}=u;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=Wk({callback:o});return gu(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function elt(e){const t=mle(e);return ale(e,t)}const AK=[];function tlt(e){const t=O.useRef(e),n=tx(r=>e?r&&r!==AK&&e&&t.current&&e.parentNode===t.current.parentNode?r:Vk(e):AK,[e]);return O.useEffect(()=>{t.current=e},[e]),n}function nlt(e){const[t,n]=O.useState(null),r=O.useRef(e),i=O.useCallback(o=>{const s=GO(o.target);s&&n(a=>a?(a.set(s,KR(s)),new Map(a)):null)},[]);return O.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const u=GO(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,KR(u)]):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 u=GO(l);u?.removeEventListener("scroll",i)})}},[i,e]),O.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Zm(o,s),sl):hle(e):sl,[e,t])}function kK(e,t){t===void 0&&(t=[]);const n=O.useRef(null);return O.useEffect(()=>{n.current=null},t),O.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Zb(e,n.current):sl}function rlt(e){O.useEffect(()=>{if(!Hk)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 ilt(e,t){return O.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function gle(e){return O.useMemo(()=>e?Dat(e):null,[e])}const _K=[];function olt(e,t){t===void 0&&(t=h0);const[n]=e,r=gle(n?fs(n):null),[i,o]=O.useState(_K);function s(){o(()=>e.length?e.map(l=>dle(l)?r:new m8(t(l),l)):_K)}const a=Wk({callback:s});return gu(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function slt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ex(t)?t:e}function alt(e){let{measure:t}=e;const[n,r]=O.useState(null),i=O.useCallback(u=>{for(const{target:c}of u)if(ex(c)){r(f=>{const h=t(c);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=Wk({callback:i}),s=O.useCallback(u=>{const c=slt(u);o?.disconnect(),c&&o?.observe(c),r(c?t(c):null)},[t,o]),[a,l]=xA(s);return O.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const llt=[{sensor:b8,options:{}},{sensor:g8,options:{}}],ult={current:{}},SC={draggable:{measure:vK},droppable:{measure:vK,strategy:tv.WhileDragging,frequency:XR.Optimized},dragOverlay:{measure:h0}};class P1 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 clt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new P1,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:SA},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:SC,measureDroppableContainers:SA,windowRect:null,measuringScheduled:!1},dlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:SA,draggableNodes:new Map,over:null,measureDroppableContainers:SA},qk=O.createContext(dlt),yle=O.createContext(clt);function flt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new P1}}}function hlt(e,t){switch(t.type){case Ni.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ni.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 Ni.DragEnd:case Ni.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ni.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new P1(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Ni.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 P1(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Ni.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new P1(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function plt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=O.useContext(qk),o=qR(r),s=qR(n?.id);return O.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!p8(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const f=sat(c);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function mlt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function glt(e){return O.useMemo(()=>({draggable:{...SC.draggable,...e?.draggable},droppable:{...SC.droppable,...e?.droppable},dragOverlay:{...SC.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function ylt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=O.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;gu(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const c=n(u),f=ale(c,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=lle(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const ble=O.createContext({...sl,scaleX:1,scaleY:1});var vd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(vd||(vd={}));const blt=O.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:c=llt,collisionDetection:f=Sat,measuring:h,modifiers:g,...y}=t;const b=O.useReducer(hlt,void 0,flt),[v,S]=b,[C,w]=fat(),[A,E]=O.useState(vd.Uninitialized),_=A===vd.Initialized,{draggable:{active:D,nodes:T,translate:M},droppable:{containers:L}}=v,j=D!=null?T.get(D):null,I=O.useRef({initial:null,translated:null}),N=O.useMemo(()=>{var kt;return D!=null?{id:D,data:(kt=j?.data)!=null?kt:ult,rect:I}:null},[D,j]),$=O.useRef(null),[z,F]=O.useState(null),[G,V]=O.useState(null),H=Qb(y,Object.values(y)),X=nx("DndDescribedBy",s),B=O.useMemo(()=>L.getEnabled(),[L]),W=glt(h),{droppableRects:Y,measureDroppableContainers:U,measuringScheduled:K}=Xat(B,{dragging:_,dependencies:[M.x,M.y],config:W.droppable}),Z=Kat(T,D),J=O.useMemo(()=>G?GR(G):null,[G]),Q=yr(),ie=Jat(Z,W.draggable.measure);ylt({activeNode:D!=null?T.get(D):null,config:Q.layoutShiftCompensation,initialRect:ie,measure:W.draggable.measure});const le=EK(Z,W.draggable.measure,ie),te=EK(Z?Z.parentElement:null),ne=O.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=L.getNodeFor((n=ne.current.over)==null?void 0:n.id),ue=alt({measure:W.dragOverlay.measure}),pe=(r=ue.nodeRef.current)!=null?r:Z,we=_?(i=ue.rect)!=null?i:le:null,ke=!!(ue.nodeRef.current&&ue.rect),Ae=elt(ke?null:le),Fe=gle(pe?fs(pe):null),Me=tlt(_?oe??Z:null),st=olt(Me),Ge=mlt(g,{transform:{x:M.x-Ae.x,y:M.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:G,active:N,activeNodeRect:le,containerNodeRect:te,draggingNodeRect:we,over:ne.current.over,overlayNodeRect:ue.rect,scrollableAncestors:Me,scrollableAncestorRects:st,windowRect:Fe}),Mt=J?Zm(J,M):null,pt=nlt(Me),Be=kK(pt),Ie=kK(pt,[le]),ze=Zm(Ge,Be),Je=we?Eat(we,Ge):null,nt=N&&Je?f({active:N,collisionRect:Je,droppableRects:Y,droppableContainers:B,pointerCoordinates:Mt}):null,ot=sle(nt,"id"),[Ye,Nt]=O.useState(null),Lt=ke?Ge:Zm(Ge,Ie),_t=wat(Lt,(o=Ye?.rect)!=null?o:null,le),Xn=O.useRef(null),rn=O.useCallback((kt,Pt)=>{let{sensor:Qt,options:Pn}=Pt;if($.current==null)return;const on=T.get($.current);if(!on)return;const xt=kt.nativeEvent,pn=new Qt({active:$.current,activeNode:on,event:xt,options:Pn,context:ne,onAbort(br){if(!T.get(br))return;const{onDragAbort:ae}=H.current,he={id:br};ae?.(he),C({type:"onDragAbort",event:he})},onPending(br,ei,ae,he){if(!T.get(br))return;const{onDragPending:Ne}=H.current,Ue={id:br,constraint:ei,initialCoordinates:ae,offset:he};Ne?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=$.current;if(ei==null)return;const ae=T.get(ei);if(!ae)return;const{onDragStart:he}=H.current,ve={activatorEvent:xt,active:{id:ei,data:ae.data,rect:I}};_d.unstable_batchedUpdates(()=>{he?.(ve),E(vd.Initializing),S({type:Ni.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:ve}),F(Xn.current),V(xt)})},onMove(br){S({type:Ni.DragMove,coordinates:br})},onEnd:Zr(Ni.DragEnd),onCancel:Zr(Ni.DragCancel)});Xn.current=pn;function Zr(br){return async function(){const{active:ae,collisions:he,over:ve,scrollAdjustedTranslate:Ne}=ne.current;let Ue=null;if(ae&&Ne){const{cancelDrop:gt}=H.current;Ue={activatorEvent:xt,active:ae,collisions:he,delta:Ne,over:ve},br===Ni.DragEnd&&typeof gt=="function"&&await Promise.resolve(gt(Ue))&&(br=Ni.DragCancel)}$.current=null,_d.unstable_batchedUpdates(()=>{S({type:br}),E(vd.Uninitialized),Nt(null),F(null),V(null),Xn.current=null;const gt=br===Ni.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=H.current[gt];rt?.(Ue),C({type:gt,event:Ue})}})}}},[T]),lt=O.useCallback((kt,Pt)=>(Qt,Pn)=>{const on=Qt.nativeEvent,xt=T.get(Pn);if($.current!==null||!xt||on.dndKit||on.defaultPrevented)return;const pn={active:xt};kt(Qt,Pt.options,pn)===!0&&(on.dndKit={capturedBy:Pt.sensor},$.current=Pn,rn(Qt,Pt))},[T,rn]),zt=Yat(c,lt);rlt(c),gu(()=>{le&&A===vd.Initializing&&E(vd.Initialized)},[le,A]),O.useEffect(()=>{const{onDragMove:kt}=H.current,{active:Pt,activatorEvent:Qt,collisions:Pn,over:on}=ne.current;if(!Pt||!Qt)return;const xt={active:Pt,activatorEvent:Qt,collisions:Pn,delta:{x:ze.x,y:ze.y},over:on};_d.unstable_batchedUpdates(()=>{kt?.(xt),C({type:"onDragMove",event:xt})})},[ze.x,ze.y]),O.useEffect(()=>{const{active:kt,activatorEvent:Pt,collisions:Qt,droppableContainers:Pn,scrollAdjustedTranslate:on}=ne.current;if(!kt||$.current==null||!Pt||!on)return;const{onDragOver:xt}=H.current,pn=Pn.get(ot),Zr=pn&&pn.rect.current?{id:pn.id,rect:pn.rect.current,data:pn.data,disabled:pn.disabled}:null,br={active:kt,activatorEvent:Pt,collisions:Qt,delta:{x:on.x,y:on.y},over:Zr};_d.unstable_batchedUpdates(()=>{Nt(Zr),xt?.(br),C({type:"onDragOver",event:br})})},[ot]),gu(()=>{ne.current={activatorEvent:G,active:N,activeNode:Z,collisionRect:Je,collisions:nt,droppableRects:Y,draggableNodes:T,draggingNode:pe,draggingNodeRect:we,droppableContainers:L,over:Ye,scrollableAncestors:Me,scrollAdjustedTranslate:ze},I.current={initial:we,translated:Je}},[N,Z,nt,Je,T,pe,we,Y,L,Ye,Me,ze]),Wat({...Q,delta:M,draggingRect:Je,pointerCoordinates:Mt,scrollableAncestors:Me,scrollableAncestorRects:st});const _n=O.useMemo(()=>({active:N,activeNode:Z,activeNodeRect:le,activatorEvent:G,collisions:nt,containerNodeRect:te,dragOverlay:ue,draggableNodes:T,droppableContainers:L,droppableRects:Y,over:Ye,measureDroppableContainers:U,scrollableAncestors:Me,scrollableAncestorRects:st,measuringConfiguration:W,measuringScheduled:K,windowRect:Fe}),[N,Z,le,G,nt,te,ue,T,L,Y,Ye,U,Me,st,W,K,Fe]),Gn=O.useMemo(()=>({activatorEvent:G,activators:zt,active:N,activeNodeRect:le,ariaDescribedById:{draggable:X},dispatch:S,draggableNodes:T,over:Ye,measureDroppableContainers:U}),[G,zt,N,le,S,X,T,Ye,U]);return qt.createElement(rle.Provider,{value:w},qt.createElement(qk.Provider,{value:Gn},qt.createElement(yle.Provider,{value:_n},qt.createElement(ble.Provider,{value:_t},u)),qt.createElement(plt,{disabled:a?.restoreFocus===!1})),qt.createElement(mat,{...a,hiddenTextDescribedById:X}));function yr(){const kt=z?.autoScrollEnabled===!1,Pt=typeof l=="object"?l.enabled===!1:l===!1,Qt=_&&!kt&&!Pt;return typeof l=="object"?{...l,enabled:Qt}:{enabled:Qt}}}),vlt=O.createContext(null),DK="button",xlt="Draggable";function Slt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=nx(xlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:f,over:h}=O.useContext(qk),{role:g=DK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=O.useContext(v?ble:vlt),[C,w]=xA(),[A,E]=xA(),_=ilt(s,t),D=Qb(n);gu(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:D}),()=>{const M=f.get(t);M&&M.key===o&&f.delete(t)}),[f,t]);const T=O.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===DK?!0:void 0,"aria-roledescription":y,"aria-describedby":c.draggable}),[r,g,b,v,y,c.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:T,isDragging:v,listeners:r?void 0:_,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function wlt(){return O.useContext(yle)}const Clt="Droppable",Elt={timeout:25};function Alt(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=nx(Clt),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=O.useContext(qk),c=O.useRef({disabled:n}),f=O.useRef(!1),h=O.useRef(null),g=O.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...Elt,...i},S=Qb(b??r),C=O.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=Wk({callback:C,disabled:y||!s}),A=O.useCallback((T,M)=>{w&&(M&&(w.unobserve(M),f.current=!1),T&&w.observe(T))},[w]),[E,_]=xA(A),D=Qb(t);return O.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),O.useEffect(()=>(a({type:Ni.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:D}}),()=>a({type:Ni.UnregisterDroppable,key:o,id:r})),[r]),O.useEffect(()=>{n!==c.current.disabled&&(a({type:Ni.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:_}}function v8(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function klt(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Sw(e){return e!==null&&e>=0}function _lt(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 Dlt(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const vle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=v8(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}},ww={scaleX:1,scaleY:1},Olt=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 u=o[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...ww}:null}const l=Tlt(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...ww}:i<n&&i>=s?{x:0,y:a.height+l,...ww}:{x:0,y:0,...ww}};function Tlt(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 xle="Sortable",Sle=qt.createContext({activeIndex:-1,containerId:xle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:vle,disabled:{draggable:!1,droppable:!1}});function Rlt(e){let{children:t,id:n,items:r,strategy:i=vle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:c}=wlt(),f=nx(xle,n),h=a.rect!==null,g=O.useMemo(()=>r.map(_=>typeof _=="object"&&"id"in _?_.id:_),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=u?g.indexOf(u.id):-1,S=O.useRef(g),C=!_lt(g,S.current),w=v!==-1&&b===-1||C,A=Dlt(o);gu(()=>{C&&y&&c(g)},[C,g,y,c]),O.useEffect(()=>{S.current=g},[g]);const E=O.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:klt(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Sle.Provider,{value:E},t)}const Ilt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return v8(n,r,i).indexOf(t)},Mlt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},Plt={duration:200,easing:"ease"},wle="transform",jlt=ev.Transition.toString({property:wle,duration:0,easing:"linear"}),$lt={roleDescription:"sortable"};function Nlt(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=O.useState(null),a=O.useRef(n);return gu(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const u=h0(r.current,{ignoreTransform:!0}),c={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(c.x||c.y)&&s(c)}}n!==a.current&&(a.current=n)},[t,n,r,i]),O.useEffect(()=>{o&&s(null)},[o]),o}function Llt(e){let{animateLayoutChanges:t=Mlt,attributes:n,disabled:r,data:i,getNewIndex:o=Ilt,id:s,strategy:a,resizeObserverConfig:l,transition:u=Plt}=e;const{items:c,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=O.useContext(Sle),w=Flt(r,g),A=c.indexOf(s),E=O.useMemo(()=>({sortable:{containerId:f,index:A,items:c},...i}),[f,i,A,c]),_=O.useMemo(()=>c.slice(c.indexOf(s)),[c,s]),{rect:D,node:T,isOver:M,setNodeRef:L}=Alt({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...l}}),{active:j,activatorEvent:I,activeNodeRect:N,attributes:$,setNodeRef:z,listeners:F,isDragging:G,over:V,setActivatorNodeRef:H,transform:X}=Slt({id:s,data:E,attributes:{...$lt,...n},disabled:w.draggable}),B=nat(L,z),W=!!j,Y=W&&!y&&Sw(h)&&Sw(v),U=!S&&G,K=U&&Y?X:null,J=Y?K??(a??C)({rects:b,activeNodeRect:N,activeIndex:h,overIndex:v,index:A}):null,Q=Sw(h)&&Sw(v)?o({id:s,items:c,activeIndex:h,overIndex:v}):A,ie=j?.id,le=O.useRef({activeId:ie,items:c,newIndex:Q,containerId:f}),te=c!==le.current.items,ne=t({active:j,containerId:f,isDragging:G,isSorting:W,id:s,index:A,items:c,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:u,wasDragging:le.current.activeId!=null}),oe=Nlt({disabled:!ne,index:A,node:T,rect:D});return O.useEffect(()=>{W&&le.current.newIndex!==Q&&(le.current.newIndex=Q),f!==le.current.containerId&&(le.current.containerId=f),c!==le.current.items&&(le.current.items=c)},[W,Q,f,c]),O.useEffect(()=>{if(ie===le.current.activeId)return;if(ie!=null&&le.current.activeId==null){le.current.activeId=ie;return}const pe=setTimeout(()=>{le.current.activeId=ie},50);return()=>clearTimeout(pe)},[ie]),{active:j,activeIndex:h,attributes:$,data:E,rect:D,index:A,newIndex:Q,items:c,isOver:M,isSorting:W,isDragging:G,listeners:F,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:L,setDraggableNodeRef:z,transform:oe??J,transition:ue()};function ue(){if(oe||te&&le.current.newIndex===A)return jlt;if(!(U&&!p8(I)||!u)&&(W||ne))return ev.Transition.toString({...u,property:wle})}}function Flt(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 CA(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 Blt=[$n.Down,$n.Right,$n.Up,$n.Left],zlt=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(Blt.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case $n.Down:r.top<h.top&&l.push(f);break;case $n.Up:r.top>h.top&&l.push(f);break;case $n.Left:r.left>h.left&&l.push(f);break;case $n.Right:r.left<h.left&&l.push(f);break}});const u=vat({collisionRect:r,droppableRects:i,droppableContainers:l});let c=sle(u,"id");if(c===s?.id&&u.length>1&&(c=u[1].id),c!=null){const f=o.get(n.id),h=o.get(c),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=Vk(y).some((_,D)=>a[D]!==_),S=Cle(f,h),C=Ult(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:Zb(A,w)}}}};function Cle(e,t){return!CA(e)||!CA(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ult(e,t){return!CA(e)||!CA(t)||!Cle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const Hlt=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=Llt({id:e.id}),[l,u]=O.useState(!1);O.useEffect(()=>{A3(e.id).then(u)},[e.id]);const c={transform:ev.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(er,{ref:i,style:c,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(vke,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:Q1(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:EM(e),width:40,height:40,boxShadow:2},children:(()=>{const f=CM(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Vlt=()=>{const e=Tc(),{content:t,isLoading:n}=Hg(),r=H3e(),[i,o]=O.useState([]),[s,a]=O.useState(!1);O.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=gat(gK(b8),gK(g8,{coordinateGetter:zlt})),u=O.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return v8(b,v,S)}),a(!0))},[]),c=O.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=O.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(re,{children:"Loading..."}):m.jsxs(Ut,{spacing:3,children:[m.jsx(s3,{items:[{name:"Bridges",to:jt.bridges},{name:"Startup Order",to:jt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(rg,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(re,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(re,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(kn,{severity:"info",action:m.jsx(Tt,{color:"inherit",size:"small",startIcon:m.jsx(eE,{}),onClick:c,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(blt,{sensors:l,collisionDetection:bat,onDragEnd:u,children:m.jsx(Rlt,{items:f,strategy:Olt,children:m.jsx(Ut,{spacing:1,children:i.map((h,g)=>m.jsx(Hlt,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(Tt,{variant:"contained",startIcon:m.jsx(eE,{}),onClick:c,children:"Save Startup Order"})})]})},XO="https://riddix.github.io/home-assistant-matter-hub",jt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:XO,faq:{multiFabric:`${XO}/connect-multiple-fabrics`,bridgeConfig:`${XO}/bridge-configuration`}},Wlt=[{path:"",element:m.jsx(dbe,{}),children:[{path:"",element:m.jsx(I_e,{})},{path:jt.bridges,element:m.jsx(O_e,{})},{path:jt.createBridge,element:m.jsx(vZe,{})},{path:jt.bridge(":bridgeId"),element:m.jsx(tke,{})},{path:jt.editBridge(":bridgeId"),element:m.jsx(xZe,{})},{path:jt.devices,element:m.jsx(X_e,{})},{path:jt.networkMap,element:m.jsx(Jst,{})},{path:jt.health,element:m.jsx(DZe,{})},{path:jt.labels,element:m.jsx(IZe,{})},{path:jt.lockCredentials,element:m.jsx(LZe,{})},{path:jt.settings,element:m.jsx(tat,{})},{path:jt.startup,element:m.jsx(Vlt,{})}]}],qlt={items:{isInitialized:!1,isLoading:!1}},Glt=NI(qlt,e=>{e.addCase(Fo.pending,t=>{t.items.isLoading=!0}).addCase(Fo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Fo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(DX.fulfilled,(t,n)=>{t.items.content?.push(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(RX.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(OX.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(IX,(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)}})}),Klt={byBridge:{}},Ylt=NI(Klt,e=>{e.addCase(cc.pending,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)}).addCase(cc.rejected,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)}).addCase(cc.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=JO(t.byBridge[n.meta.arg],n)})}),Xlt={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},JO=NI(Xlt,e=>{e.addCase(cc.pending,t=>{t.isLoading=!0}).addCase(cc.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(cc.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Jlt=H1e({reducer:{bridges:Glt,devices:Ylt}}),x8=kge({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Qlt(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Zlt=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Ze({root:["root",!n&&"gutters",r]},Qlt,t)},eut=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(qe(({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}]}))),Ele=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,u={...r,component:o,disableGutters:s,variant:a},c=Zlt(u);return m.jsx(eut,{as:o,className:Oe(c.root,i),ref:n,ownerState:u,...l})}),tut=[{name:"GitHub",url:jt.githubRepository},{name:"Documentation",url:jt.documentation}],nut=()=>m.jsxs(x8,{sx:{mt:16,mb:4},children:[m.jsx(Di,{sx:{mt:4,mb:4}}),m.jsx(et,{container:!0,spacing:2,justifyContent:"center",children:tut.map((e,t)=>m.jsx(et,{size:{xs:12,sm:"auto"},children:m.jsx(Tt,{fullWidth:!0,size:"small",variant:"outlined",component:o3,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function rut(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const iut=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return Ze(i,rut,r)},OK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,out=me(Nr,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(qe(({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(Ln(["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?OK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?OK(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"})}}]}))),sut=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,u={...r,color:o,position:a,enableColorOnDark:s},c=iut(u);return m.jsx(out,{square:!0,component:"header",ownerState:u,elevation:4,className:Oe(c.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function aut(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=o.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");a=parseInt(u[4],10),l=parseInt(u[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 lut(e){return typeof e=="function"?e():e}function Cw(e,t,n){const r=lut(n),i=aut(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const uut=O.forwardRef(function(t,n){const r=ka(),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:u,direction:c="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=_a,..._}=t,D=O.useRef(null),T=Tr(hf(l),D,n),M=V=>H=>{V&&(H===void 0?V(D.current):V(D.current,H))},L=M((V,H)=>{Cw(c,V,u),RI(V),g&&g(V,H)}),j=M((V,H)=>{const X=Gd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...X}),V.style.transition=r.transitions.create("transform",{...X}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,H)}),I=M(y),N=M(C),$=M(V=>{const H=Gd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",H),V.style.transition=r.transitions.create("transform",H),Cw(c,V,u),v&&v(V)}),z=M(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),F=V=>{s&&s(D.current,V)},G=O.useCallback(()=>{D.current&&Cw(c,D.current,u)},[c,u]);return O.useEffect(()=>{if(h||c==="down"||c==="right")return;const V=_I(()=>{D.current&&Cw(c,D.current,u)}),H=tl(D.current);return H.addEventListener("resize",V),()=>{V.clear(),H.removeEventListener("resize",V)}},[c,h,u]),O.useEffect(()=>{h||G()},[h,G]),m.jsx(E,{nodeRef:D,onEnter:L,onEntered:I,onEntering:j,onExit:$,onExited:z,onExiting:N,addEndListener:F,appear:a,in:h,timeout:A,..._,children:(V,{ownerState:H,...X})=>O.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...X})})});function cut(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ale=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},dut=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return Ze(i,cut,t)},fut=me(KI,{name:"MuiDrawer",slot:"Root",overridesResolver:Ale})(qe(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),hut=me("div",{shouldForwardProp:ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ale})({flex:"0 0 auto"}),put=me(Nr,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(qe(({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}`}}]}))),kle={left:"right",right:"left",top:"down",bottom:"up"};function mut(e){return["left","right"].includes(e)}function gut({direction:e},t){return e==="rtl"&&mut(t)?kle[t]:t}const yut=O.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ka(),o=ff(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:u,className:c,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:_={},slotProps:D={},...T}=r,M=O.useRef(!1);O.useEffect(()=>{M.current=!0},[]);const L=gut({direction:o?"rtl":"ltr"},a),I={...r,anchor:a,elevation:f,open:v,variant:E,...T},N=dut(I),$={slots:{transition:w,..._},slotProps:{paper:S,transition:C,...D,backdrop:DI(D.backdrop||{...l,...g},{transitionDuration:A})}},[z,F]=ut("root",{ref:n,elementType:fut,className:Oe(N.root,N.modal,c),shouldForwardComponentProp:!0,ownerState:I,externalForwardedProps:{...$,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:$.slots.backdrop},slotProps:{backdrop:$.slotProps.backdrop}}}),[G,V]=ut("paper",{elementType:put,shouldForwardComponentProp:!0,className:Oe(N.paper,S.className),ownerState:I,externalForwardedProps:$,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[H,X]=ut("docked",{elementType:hut,ref:n,className:Oe(N.root,N.docked,c),ownerState:I,externalForwardedProps:$,additionalProps:T}),[B,W]=ut("transition",{elementType:uut,ownerState:I,externalForwardedProps:$,additionalProps:{in:v,direction:kle[L],timeout:A,appear:M.current}}),Y=m.jsx(G,{...V,children:u});if(E==="permanent")return m.jsx(H,{...X,children:Y});const U=m.jsx(B,{...W,children:Y});return E==="persistent"?m.jsx(H,{...X,children:U}):m.jsx(z,{...F,children:U})}),but=BY({themeId:ua}),QO={error:"#d32f2f",warn:"#ed6c02",info:"#0288d1",debug:"#7b1fa2"},vut={error:gf,warn:n3,info:qI,debug:C3},xut=({open:e,onClose:t})=>{const[n,r]=O.useState([]),[i,o]=O.useState(!0),[s,a]=O.useState("error,warn,info".split(",")),[l,u]=O.useState(""),[c,f]=O.useState(!0),h=O.useCallback(async()=>{try{const S=new URLSearchParams({level:s.join(","),limit:"500",...l&&{search:l}}),C=await fetch(`api/logs?${S}`);if(C.ok){const w=await C.json();r(w.entries)}}catch(S){console.error("Failed to fetch logs:",S)}finally{o(!1)}},[s,l]);O.useEffect(()=>{e&&h()},[e,h]),O.useEffect(()=>{if(!c||!e)return;const S=setInterval(h,5e3);return()=>clearInterval(S)},[c,e,h]);const g=S=>{a(Array.isArray(S.target.value)?S.target.value:[S.target.value])},y=S=>{u(S.target.value)},b=async()=>{try{await fetch("api/logs",{method:"DELETE"}),r([])}catch(S){console.error("Failed to clear logs:",S)}},v=S=>{const C=vut[S]||qI;return m.jsx(C,{sx:{fontSize:16,color:QO[S]}})};return m.jsxs(vc,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Sc,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(C3,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(bn,{title:"Auto Refresh",children:m.jsx(Et,{label:c?"Auto":"Manual",color:c?"success":"default",size:"small",onClick:()=>f(!c),sx:{cursor:"pointer"}})}),m.jsx(Fn,{onClick:t,children:m.jsx(fke,{})})]}),m.jsxs(xc,{children:[m.jsx(Ut,{spacing:2,sx:{mb:2},children:m.jsxs(Ut,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(Xa,{size:"small",sx:{minWidth:200},children:[m.jsx(uc,{children:"Log Level"}),m.jsxs(Ua,{value:s,label:"Log Level",onChange:g,multiple:!0,renderValue:S=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(S)?S:[S]).map(C=>m.jsx(Et,{label:C.toUpperCase(),size:"small",sx:{backgroundColor:QO[C],color:"white"}},C))}),children:[m.jsx(rr,{value:"error",children:"Error"}),m.jsx(rr,{value:"warn",children:"Warning"}),m.jsx(rr,{value:"info",children:"Info"}),m.jsx(rr,{value:"debug",children:"Debug"})]})]}),m.jsx(Xr,{size:"small",placeholder:"Search logs...",value:l,onChange:y,sx:{flexGrow:1}}),m.jsx(Tt,{variant:"outlined",onClick:h,children:"Refresh"}),m.jsx(Tt,{variant:"outlined",color:"error",onClick:b,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:i?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(re,{children:"Loading logs..."})}):n.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(re,{color:"text.secondary",children:"No logs found"})}):m.jsx(Ut,{spacing:1,children:n.map((S,C)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[v(S.level),m.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(S.timestamp).toLocaleString()}),m.jsx(Et,{label:S.level.toUpperCase(),size:"small",sx:{backgroundColor:QO[S.level],color:"white",fontSize:"0.7rem",height:20}})]}),m.jsx(re,{sx:{ml:3},children:S.message}),S.context&&m.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(S.context,null,2)})]},`${S.timestamp}-${S.level}-${C}`))})})]}),m.jsx(Yd,{children:m.jsx(Tt,{onClick:t,children:"Close"})})]})};function TK(){const{isConnected:e}=ube(),[t,n]=O.useState(null),[r,i]=O.useState(!1);O.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,u=a&&a.total===0,c=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(gf,{fontSize:"small"}):l?m.jsx(Rc,{fontSize:"small"}):m.jsx(u3,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?u?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(bn,{title:c,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const Sut=e=>O.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("g",{style:{display:"inline"}},O.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"}),O.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"}))),wut="home-assistant-matter-hub",Cut={name:wut};function Eut(){const[e,t]=O.useState("2.1.0-alpha.379");return O.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),O.useMemo(()=>({name:Cut.name,version:e}),[e])}const Aut=e=>{const t=Eut();return m.jsxs(ce,{component:Dc,to:jt.bridges,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(Sut,{style:{height:"40px"}}),m.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(re,{variant:"caption",component:"span",children:t.version})]})},kut=()=>{const e=but("(min-width:600px)"),{mode:t,setMode:n}=qA(),[r,i]=O.useState(!1),[o,s]=O.useState(!1),a=Xh(),l=()=>{n(t==="dark"?"light":"dark")},u=[{label:"Dashboard",icon:m.jsx(KT,{}),to:jt.dashboard},{label:"Bridges",icon:m.jsx(c1,{}),to:jt.bridges},{label:"All Devices",icon:m.jsx(ss,{}),to:jt.devices},{label:"Network Map",icon:m.jsx(JC,{}),to:jt.networkMap},{label:"Startup Order",icon:m.jsx(rg,{}),to:jt.startup},{label:"Lock Credentials",icon:m.jsx(su,{}),to:jt.lockCredentials},{label:"Filter Reference",icon:m.jsx(QC,{}),to:jt.labels},{label:"Settings",icon:m.jsx(w3,{}),to:jt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(_ke,{}):m.jsx(mke,{}),onClick:l},{label:"System Logs",icon:m.jsx(C3,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(VC,{}),to:jt.health}],c=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(sut,{sx:{height:"72px"},children:m.jsx(Ele,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(x8,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(Aut,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.map(f=>f.to?m.jsx(bn,{title:f.label,children:m.jsx(Fn,{component:Dc,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(bn,{title:f.label,children:m.jsx(Fn,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(TK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(TK,{}),m.jsx(Fn,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(Dke,{})})]})]})})}),m.jsx(yut,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(yu,{sx:{width:250},children:u.map(f=>m.jsxs(Hbe,{onClick:()=>c(f),children:[m.jsx(Hl,{children:f.icon}),m.jsx(za,{primary:f.label})]},f.label))})}),m.jsx(xut,{open:r,onClose:()=>i(!1)})]})},_ut=()=>m.jsxs(ce,{children:[m.jsx(kut,{}),m.jsx(Ele,{}),m.jsx(x8,{sx:{p:2},children:m.jsx(aY,{})}),m.jsx(nut,{})]}),Dut=HA({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 wC=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");wC?.startsWith("http")&&(wC=new URL(wC).pathname);const Out=Che([{path:"/",element:m.jsx(_ut,{}),children:Wlt}],{basename:wC});zce.createRoot(document.getElementById("root")).render(m.jsx(O.StrictMode,{children:m.jsx(ide,{store:Jlt,children:m.jsxs(N0e,{theme:Dut,children:[m.jsx(I0e,{}),m.jsx(tX,{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}}}),m.jsx(cbe,{children:m.jsx(Qye,{children:m.jsx(jhe,{router:Out})})})]})})}));
|