@staff0rd/assist 0.1045.0 → 0.1045.1
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.
|
@@ -188,7 +188,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
188
188
|
animation: ${uh} 1.4s ease-in-out infinite;
|
|
189
189
|
`:null,bD=e=>{let{classes:t,variant:o,color:r,disableShrink:n}=e,a={root:["root",o,`color${K(r)}`],svg:["svg"],track:["track"],circle:["circle",n&&"circleDisableShrink"]};return F(a,Zx,t)},TD=L("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[o.variant],t[`color${K(o.color)}`]]}})(X(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:hD||{animation:`${lh} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),vD=L("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),xD=L("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.circle,o.disableShrink&&t.circleDisableShrink]}})(X(({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:gD||{animation:`${uh} 1.4s ease-in-out infinite`}}]}))),SD=L("circle",{name:"MuiCircularProgress",slot:"Track"})(X(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),CD=Jx.forwardRef(function(t,o){let r=q({props:t,name:"MuiCircularProgress"}),{className:n,color:a="primary",disableShrink:i=!1,enableTrackSlot:s=!1,size:l=40,style:u,thickness:p=3.6,value:f=0,variant:d="indeterminate",...c}=r,T={...r,color:a,disableShrink:i,size:l,thickness:p,value:f,variant:d,enableTrackSlot:s},v=bD(T),x={},m={},y={};if(d==="determinate"){let g=2*Math.PI*((rr-p)/2);x.strokeDasharray=g.toFixed(3),y["aria-valuenow"]=Math.round(f),x.strokeDashoffset=`${((100-f)/100*g).toFixed(3)}px`,m.transform="rotate(-90deg)"}return(0,ns.jsx)(TD,{className:j(v.root,n),style:{width:l,height:l,...m,...u},ownerState:T,ref:o,role:"progressbar",...y,...c,children:(0,ns.jsxs)(vD,{className:v.svg,ownerState:T,viewBox:`${rr/2} ${rr/2} ${rr} ${rr}`,children:[s?(0,ns.jsx)(SD,{className:v.track,ownerState:T,cx:rr,cy:rr,r:(rr-p)/2,fill:"none",strokeWidth:p,"aria-hidden":"true"}):null,(0,ns.jsx)(xD,{className:v.circle,style:x,ownerState:T,cx:rr,cy:rr,r:(rr-p)/2,fill:"none",strokeWidth:p})]})})}),ru=CD;function eS(e){return V("MuiIconButton",e)}var ED=H("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),ch=ED;var as=S(z(),1),PD=e=>{let{classes:t,disabled:o,color:r,edge:n,size:a,loading:i}=e,s={root:["root",i&&"loading",o&&"disabled",r!=="default"&&`color${K(r)}`,n&&`edge${K(n)}`,`size${K(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return F(s,eS,t)},RD=L(Lr,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.loading&&t.loading,o.color!=="default"&&t[`color${K(o.color)}`],o.edge&&t[`edge${K(o.edge)}`],t[`size${K(o.size)}`]]}})(X(({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}}]})),X(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ot()).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)}}],[`&.${ch.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${ch.loading}`]:{color:"transparent"}}))),OD=L("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"}}]})),AD=uf.forwardRef(function(t,o){let r=q({props:t,name:"MuiIconButton"}),{edge:n=!1,children:a,className:i,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:p="medium",id:f,loading:d=null,loadingIndicator:c,...T}=r,v=Ra(f),x=c??(0,as.jsx)(ru,{"aria-labelledby":v,color:"inherit",size:16}),m={...r,edge:n,color:s,disabled:l,disableFocusRipple:u,loading:d,loadingIndicator:x,size:p},y=PD(m);return(0,as.jsxs)(RD,{id:d?v:f,className:j(y.root,i),centerRipple:!0,internalNativeButton:!0,focusRipple:!u,disabled:l||d,ref:o,...T,ownerState:m,children:[typeof d=="boolean"&&(0,as.jsx)("span",{className:y.loadingWrapper,style:{display:"contents"},children:(0,as.jsx)(OD,{className:y.loadingIndicator,ownerState:m,children:d&&x})}),a]})}),Na=AD;var rS=S(U(),1);function tS(e){return V("MuiTypography",e)}var VG=H("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom"]);var nS=S(z(),1),MD=e=>{let{align:t,gutterBottom:o,noWrap:r,variant:n,classes:a}=e,i={root:["root",n,e.align!=="inherit"&&`align${K(t)}`,o&&"gutterBottom",r&&"noWrap"]};return F(i,tS,a)},wD=L("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.variant&&t[o.variant],o.align!=="inherit"&&t[`align${K(o.align)}`],o.noWrap&&t.noWrap,o.gutterBottom&&t.gutterBottom]}})(X(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,o])=>t!=="inherit"&&o&&typeof o=="object").map(([t,o])=>({props:{variant:t},style:o})),...Object.entries(e.palette).filter(ot()).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${K(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"}}]}))),oS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ND=rS.forwardRef(function(t,o){let r=q({props:t,name:"MuiTypography"}),{color:n,align:a="inherit",className:i,component:s,gutterBottom:l=!1,noWrap:u=!1,variant:p="body1",variantMapping:f=oS,...d}=r,c={...r,align:a,color:n,className:i,component:s,gutterBottom:l,noWrap:u,variant:p,variantMapping:f},T=s||f[p]||oS[p]||"span",v=MD(c);return(0,nS.jsx)(wD,{as:T,ref:o,className:j(v.root,i),...d,ownerState:c,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...d.style}})}),nu=ND;function DD(e){let{elementType:t,externalSlotProps:o,ownerState:r,skipResolvingSlotProps:n=!1,...a}=e,i=n?{}:Jl(o,r),{props:s,internalRef:l}=tu({...a,externalSlotProps:i}),u=xt(l,i?.ref,e.additionalProps?.ref);return Zl(t,{...s,ref:u},r)}var ph=DD;var Ir=S(U(),1),iS=S(Zp(),1);var aS=S(U(),1);function Io(e){return parseInt(aS.version,10)>=19?e?.props?.ref||null:e?.ref||null}function _D(e){return typeof e=="function"?e():e}var BD=Ir.forwardRef(function(t,o){let{children:r,container:n,disablePortal:a=!1}=t,[i,s]=Ir.useState(null),l=xt(Ir.isValidElement(r)?Io(r):null,o);return Tt(()=>{a||s(_D(n)||document.body)},[n,a]),Tt(()=>{if(i&&!a)return Pa(o,i),()=>{Pa(o,null)}},[o,i,a]),a?Ir.isValidElement(r)?Ir.cloneElement(r,{ref:l}):r:i&&iS.createPortal(r,i)}),fh=BD;var Vt=S(U(),1);var bo=S(U(),1);var au=S(z(),1);function cf(e){return parseInt(e,10)||0}var zD={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function kD(e){for(let t in e)return!1;return!0}function sS(e){return kD(e)||e.outerHeightStyle===0&&!e.overflowing}var UD=bo.forwardRef(function(t,o){let{onChange:r,maxRows:n,minRows:a=1,style:i,value:s,...l}=t,{current:u}=bo.useRef(s!=null),p=bo.useRef(null),f=xt(o,p),d=bo.useRef(null),c=bo.useRef(null),T=bo.useCallback(()=>{let g=p.current,b=c.current;if(!g||!b)return;let C=ko(g).getComputedStyle(g);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};b.style.width=C.width,b.value=g.value||t.placeholder||"x",b.value.slice(-1)===`
|
|
190
190
|
`&&(b.value+=" ");let E=C.boxSizing,O=cf(C.paddingBottom)+cf(C.paddingTop),M=cf(C.borderBottomWidth)+cf(C.borderTopWidth),N=b.scrollHeight;b.value="x";let A=b.scrollHeight,h=N;a&&(h=Math.max(Number(a)*A,h)),n&&(h=Math.min(Number(n)*A,h)),h=Math.max(h,A);let D=h+(E==="border-box"?O+M:0),R=Math.abs(h-N)<=1;return{outerHeightStyle:D,overflowing:R}},[n,a,t.placeholder]),v=Uo(()=>{let g=p.current,b=T();if(!g||!b||sS(b))return!1;let P=b.outerHeightStyle;return d.current!=null&&d.current!==P}),x=bo.useCallback(()=>{let g=p.current,b=T();if(!g||!b||sS(b))return;let P=b.outerHeightStyle;d.current!==P&&(d.current=P,g.style.height=`${P}px`),g.style.overflow=b.overflowing?"hidden":""},[T]),m=bo.useRef(-1);return Tt(()=>{let g=Yi(x),b=p?.current;if(!b)return;let P=ko(b);P.addEventListener("resize",g);let C;return typeof ResizeObserver<"u"&&(C=new ResizeObserver(()=>{v()&&(C.unobserve(b),cancelAnimationFrame(m.current),x(),m.current=requestAnimationFrame(()=>{C.observe(b)}))}),C.observe(b)),()=>{g.clear(),cancelAnimationFrame(m.current),P.removeEventListener("resize",g),C&&C.disconnect()}},[T,x,v]),Tt(()=>{x()}),(0,au.jsxs)(bo.Fragment,{children:[(0,au.jsx)("textarea",{value:s,onChange:g=>{u||x();let b=g.target,P=b.value.length,C=b.value.endsWith(`
|
|
191
|
-
`),E=b.selectionStart===P;C&&E&&b.setSelectionRange(P,P),r&&r(g)},ref:f,rows:a,style:i,...l}),(0,au.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:c,tabIndex:-1,style:{...zD.shadow,...i,paddingTop:0,paddingBottom:0}})]})}),dh=UD;function To({props:e,states:t,muiFormControl:o}){return t.reduce((r,n)=>(r[n]=e[n],o&&typeof e[n]>"u"&&(r[n]=o[n]),r),{})}var lS=S(U(),1),LD=lS.createContext(void 0),is=LD;var uS=S(U(),1);function Zt(){return uS.useContext(is)}function cS(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Da(e,t=!1){return e&&(cS(e.value)&&e.value!==""||t&&cS(e.defaultValue)&&e.defaultValue!=="")}function pS(e){return e.startAdornment}function fS(e){return V("MuiInputBase",e)}var ID=H("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputTypeSearch"]),nr=ID;var _a=S(z(),1),dS,Ba=(e,t)=>{let{ownerState:o}=e;return[t.root,o.formControl&&t.formControl,o.startAdornment&&t.adornedStart,o.endAdornment&&t.adornedEnd,o.error&&t.error,o.size==="small"&&t.sizeSmall,o.multiline&&t.multiline,o.color&&t[`color${K(o.color)}`],o.fullWidth&&t.fullWidth,o.hiddenLabel&&t.hiddenLabel]},za=(e,t)=>{let{ownerState:o}=e;return[t.input,o.type==="search"&&t.inputTypeSearch]},jD=e=>{let{classes:t,color:o,disabled:r,error:n,endAdornment:a,focused:i,formControl:s,fullWidth:l,hiddenLabel:u,multiline:p,readOnly:f,size:d,startAdornment:c,type:T}=e,v={root:["root",`color${K(o)}`,r&&"disabled",n&&"error",l&&"fullWidth",i&&"focused",s&&"formControl",d&&d!=="medium"&&`size${K(d)}`,p&&"multiline",c&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",T==="search"&&"inputTypeSearch",f&&"readOnly"]};return F(v,fS,t)},ka=L("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ba})(X(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${nr.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:o})=>t.multiline&&o==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Ua=L("input",{name:"MuiInputBase",slot:"Input",overridesResolver:za})(X(({theme:e})=>{let t=e.palette.mode==="light",o={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},n=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${nr.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":n,"&:focus::-moz-placeholder":n,"&:focus::-ms-input-placeholder":n},[`&.${nr.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),mS=Ox({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),HD=Vt.forwardRef(function(t,o){let r=q({props:t,name:"MuiInputBase"}),{"aria-describedby":n,autoComplete:a,autoFocus:i,className:s,color:l,defaultValue:u,disabled:p,disableInjectingGlobalStyles:f,endAdornment:d,error:c,fullWidth:T=!1,id:v,inputComponent:x="input",inputProps:m={},inputRef:y,margin:g,maxRows:b,minRows:P,multiline:C=!1,name:E,onBlur:O,onChange:M,onClick:N,onFocus:A,onKeyDown:h,onKeyUp:D,placeholder:R,readOnly:w,renderSuffix:k,rows:I,size:$,slotProps:de={},slots:ne={},startAdornment:Q,type:ue="text",value:Ge,...Ne}=r,ee=m.value!=null?m.value:Ge,{current:ae}=Vt.useRef(ee!=null),W=Vt.useRef(),te=Vt.useCallback(re=>{},[]),oe=Dt(W,y,m.ref,te),[be,Pt]=Vt.useState(!1),ce=Zt(),Oe=To({props:r,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Oe.focused=ce?ce.focused:be,Vt.useEffect(()=>{!ce&&p&&be&&(Pt(!1),O&&O())},[ce,p,be,O]);let pt=ce&&ce.onFilled,qt=ce&&ce.onEmpty,Ke=Vt.useCallback(re=>{Da(re)?pt&&pt():qt&&qt()},[pt,qt]);Xi(()=>{ae&&Ke({value:ee})},[ee,Ke,ae]);let ft=re=>{A&&A(re),m.onFocus&&m.onFocus(re),ce&&ce.onFocus?ce.onFocus(re):Pt(!0)},Rt=re=>{O&&O(re),m.onBlur&&m.onBlur(re),ce&&ce.onBlur?ce.onBlur(re):Pt(!1)},ye=(re,...fo)=>{if(!ae){let cn=re.target||W.current;if(cn==null)throw new Error(gt(1));Ke({value:cn.value})}m.onChange&&m.onChange(re,...fo),M&&M(re,...fo)};Vt.useEffect(()=>{Ke(W.current)},[]);let po=re=>{W.current&&re.currentTarget===re.target&&W.current.focus(),N&&N(re)},No=x,dt=m;C&&No==="input"&&(I?dt={type:void 0,minRows:I,maxRows:I,...dt}:dt={type:void 0,maxRows:b,minRows:P,...dt},No=dh);let ia=re=>{Ke(re.animationName==="mui-auto-fill-cancel"?W.current:{value:"x"})};Vt.useEffect(()=>{ce&&ce.setAdornedStart(!!Q)},[ce,Q]);let pr={...r,color:Oe.color||"primary",disabled:Oe.disabled,endAdornment:d,error:Oe.error,focused:Oe.focused,formControl:ce,fullWidth:T,hiddenLabel:Oe.hiddenLabel,multiline:C,size:Oe.size,startAdornment:Q,type:ue},Ar=jD(pr),Le=ne.root||ka,Te=de.root||{},We=ne.input||Ua;return dt={...dt,...de.input},(0,_a.jsxs)(Vt.Fragment,{children:[!f&&typeof mS=="function"&&(dS||(dS=(0,_a.jsx)(mS,{}))),(0,_a.jsxs)(Le,{...Te,ref:o,onClick:po,...Ne,...!Sn(Le)&&{ownerState:{...pr,...Te.ownerState}},className:j(Ar.root,Te.className,s,w&&"MuiInputBase-readOnly"),children:[Q,(0,_a.jsx)(is.Provider,{value:null,children:(0,_a.jsx)(We,{"aria-invalid":Oe.error,"aria-describedby":n,autoComplete:a,autoFocus:i,defaultValue:u,disabled:Oe.disabled,id:v,onAnimationStart:ia,name:E,placeholder:R,readOnly:w,required:Oe.required,rows:I,value:ee,onKeyDown:h,onKeyUp:D,type:ue,...dt,...!Sn(We)&&{as:No,ownerState:{...pr,...dt.ownerState}},ref:oe,className:j(Ar.input,dt.className,w&&"MuiInputBase-readOnly"),onBlur:Rt,onChange:ye,onFocus:ft})}),d,k?k({...Oe,startAdornment:Q}):null]})]})}),jo=HD;function yS(e){return V("MuiInput",e)}var VD={...nr,...H("MuiInput",["root","underline","input"])},ss=VD;function hS(e){return V("MuiOutlinedInput",e)}var FD={...nr,...H("MuiOutlinedInput",["root","notchedOutline","input"])},ar=FD;function gS(e){return V("MuiFilledInput",e)}var $D={...nr,...H("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Rn=$D;var bS=S(z(),1),TS=it((0,bS.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var SS=S(U(),1);var ls=S(U(),1);var vS=S(z(),1),qD={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},GD={opacity:0,visibility:"hidden"},KD=ls.forwardRef(function(t,o){let r=gn(),n={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:i=!0,children:s,easing:l,in:u,onEnter:p,onEntered:f,onEntering:d,onExit:c,onExited:T,onExiting:v,style:x,timeout:m=n,...y}=t,g=ls.useRef(null),b=Dt(g,Io(s),o),P=oo(g,d),C=oo(g,(h,D)=>{ef(h);let R=rs({style:x,timeout:m,easing:l},{mode:"enter"});h.style.transition=r.transitions.create("opacity",R),p&&p(h,D)}),E=oo(g,f),O=oo(g,v),M=oo(g,h=>{let D=rs({style:x,timeout:m,easing:l},{mode:"exit"});h.style.transition=r.transitions.create("opacity",D),c&&c(h)}),N=oo(g,h=>{h.style.transition="",T&&T(h)});return(0,vS.jsx)(Ql,{appear:i,in:u,nodeRef:g,onEnter:C,onEntered:E,onEntering:P,onExit:M,onExited:N,onExiting:O,addEndListener:h=>{a&&a(g.current,h)},timeout:m,...y,children:(h,{ownerState:D,...R})=>{let w=tf(h,u,qD,GD,x,s.props.style);return ls.cloneElement(s,{style:w,ref:b,...R})}})}),mh=KD;function xS(e){return V("MuiBackdrop",e)}var RY=H("MuiBackdrop",["root","invisible"]);var yh=S(z(),1),YD=e=>{let{classes:t,invisible:o}=e;return F({root:["root",o&&"invisible"]},xS,t)},XD=L("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.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"}}]}),QD=SS.forwardRef(function(t,o){let r=q({props:t,name:"MuiBackdrop"}),{children:n,className:a,component:i="div",invisible:s=!1,open:l,slotProps:u={},slots:p={},transitionDuration:f,...d}=r,c={...r,component:i,invisible:s},T=YD(c),v={component:i,slots:p,slotProps:u},[x,m]=Ae("root",{elementType:XD,externalForwardedProps:v,className:j(T.root,a),ownerState:c}),[y,g]=Ae("transition",{elementType:mh,externalForwardedProps:v,ownerState:c});return(0,yh.jsx)(y,{in:l,timeout:f,...d,...g,children:(0,yh.jsx)(x,{...m,ref:o,children:n})})}),hh=QD;var WD=H("MuiBox",["root"]),CS=WD;var ZD=br(),JD=Nl({themeId:At,defaultTheme:ZD,defaultClassName:CS.root,generateClassName:Ii.generate}),_t=JD;var iu=S(U(),1);function ES(e){return V("MuiButton",e)}var e_=H("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),On=e_;var PS=S(U(),1),t_=PS.createContext({}),RS=t_;var OS=S(U(),1),o_=OS.createContext(void 0),AS=o_;var Tr=S(z(),1),r_=e=>{let{color:t,disableElevation:o,fullWidth:r,size:n,variant:a,loading:i,loadingPosition:s,classes:l}=e,u={root:["root",i&&"loading",a,`size${K(n)}`,`color${K(t)}`,o&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${K(s)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},p=F(u,ES,l);return{...l,...p}},wS=[{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}}}],n_=L(Lr,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[o.variant],t[`size${K(o.size)}`],o.color==="inherit"&&t.colorInherit,o.disableElevation&&t.disableElevation,o.fullWidth&&t.fullWidth,o.loading&&t.loading]}})(X(({theme:e})=>{let t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=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"},[`&.${On.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]},[`&.${On.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${On.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)",[`&.${On.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(ot()).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:o,"--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"},[`&.${On.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${On.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}),[`&.${On.loading}`]:{color:"transparent"}}}]}})),a_=L("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.startIcon,o.loading&&t.startIconLoadingStart]}})(({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}},...wS]})),i_=L("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.endIcon,o.loading&&t.endIconLoadingEnd]}})(({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}},...wS]})),s_=L("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}}]})),MS=L("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),l_=iu.forwardRef(function(t,o){let r=iu.useContext(RS),n=iu.useContext(AS),a=hr(r,t),i=q({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:p,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:c=!1,endIcon:T,focusVisibleClassName:v,fullWidth:x=!1,id:m,loading:y=null,loadingIndicator:g,loadingPosition:b="center",size:P="medium",startIcon:C,type:E,variant:O="text",...M}=i,N=Ra(m),A=g??(0,Tr.jsx)(ru,{"aria-labelledby":N,color:"inherit",size:16}),h={...i,color:l,component:u,disabled:f,disableElevation:d,disableFocusRipple:c,fullWidth:x,loading:y,loadingIndicator:A,loadingPosition:b,size:P,type:E,variant:O},D=r_(h),R=(C||y&&b==="start")&&(0,Tr.jsx)(a_,{className:D.startIcon,ownerState:h,children:C||(0,Tr.jsx)(MS,{className:D.loadingIconPlaceholder,ownerState:h})}),w=(T||y&&b==="end")&&(0,Tr.jsx)(i_,{className:D.endIcon,ownerState:h,children:T||(0,Tr.jsx)(MS,{className:D.loadingIconPlaceholder,ownerState:h})}),k=n||"",I=typeof y=="boolean"?(0,Tr.jsx)("span",{className:D.loadingWrapper,style:{display:"contents"},children:y&&(0,Tr.jsx)(s_,{className:D.loadingIndicator,ownerState:h,children:A})}):null;return(0,Tr.jsxs)(n_,{ownerState:h,className:j(r.className,D.root,p,k),component:u,disabled:f||y,focusRipple:!c,focusVisibleClassName:j(D.focusVisible,v),ref:o,internalNativeButton:!0,type:E,id:y?N:m,...M,classes:D,children:[R,b!=="end"&&I,s,b==="end"&&I,w]})}),us=l_;var su=S(U(),1);var DS=S(U(),1);function NS(e){return V("PrivateSwitchBase",e)}var EX=H("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var pf=S(z(),1),u_=e=>{let{classes:t,checked:o,disabled:r,edge:n}=e,a={root:["root",o&&"checked",r&&"disabled",n&&`edge${K(n)}`],input:["input"]};return F(a,NS,t)},c_=L(Lr,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),p_=L("input",{name:"MuiSwitchBase",shouldForwardProp:Be})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),f_=DS.forwardRef(function(t,o){let{autoFocus:r,checked:n,checkedIcon:a,defaultChecked:i,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:p,id:f,name:d,onBlur:c,onChange:T,onFocus:v,readOnly:x,required:m=!1,tabIndex:y,type:g,value:b,slots:P={},slotProps:C={},...E}=t,{nativeButton:O,...M}=E,[N,A]=ql({controlled:n,default:!!i,name:"SwitchBase",state:"checked"}),h=Zt(),D=ee=>{v&&v(ee),h&&h.onFocus&&h.onFocus(ee)},R=ee=>{c&&c(ee),h&&h.onBlur&&h.onBlur(ee)},w=ee=>{if(ee.nativeEvent.defaultPrevented||x)return;let ae=ee.target.checked;A(ae),T&&T(ee,ae)},k=s;h&&typeof k>"u"&&(k=h.disabled);let I=g==="checkbox"||g==="radio",$={...t,checked:N,disabled:k,disableFocusRipple:l,edge:u},de=u_($),ne={slots:P,slotProps:C},[Q,ue]=Ae("root",{ref:o,elementType:c_,className:de.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:"span",...M},getSlotProps:ee=>({...ee,onFocus:ae=>{ee.onFocus?.(ae),D(ae)},onBlur:ae=>{ee.onBlur?.(ae),R(ae)}}),ownerState:$,additionalProps:{centerRipple:!0,focusRipple:!l,role:void 0,tabIndex:null}}),[Ge,Ne]=Ae("input",{elementType:p_,className:de.input,externalForwardedProps:ne,getSlotProps:ee=>({...ee,onChange:ae=>{ee.onChange?.(ae),w(ae)}}),ownerState:$,additionalProps:{autoFocus:r,checked:n,defaultChecked:i,disabled:k,id:I?f:void 0,name:d,readOnly:x,required:m,tabIndex:y,type:g,...g==="checkbox"&&b===void 0?{}:{value:b}}});return(0,pf.jsxs)(Q,{...ue,children:[(0,pf.jsx)(Ge,{...Ne}),N?a:p]})}),_S=f_;var BS=S(z(),1),zS=it((0,BS.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");var kS=S(z(),1),US=it((0,kS.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");var LS=S(z(),1),IS=it((0,LS.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function jS(e){return V("MuiCheckbox",e)}var d_=H("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ff=d_;var lu=S(z(),1),m_=e=>{let{classes:t,indeterminate:o,color:r,size:n}=e,a={root:["root",o&&"indeterminate",`color${K(r)}`,`size${K(n)}`]},i=F(a,jS,t);return{...t,...i}},y_=L(_S,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,t[`size${K(o.size)}`],o.color!=="default"&&t[`color${K(o.color)}`]]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{[`&.${ff.checked}, &.${ff.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${ff.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),h_=(0,lu.jsx)(US,{}),g_=(0,lu.jsx)(zS,{}),b_=(0,lu.jsx)(IS,{}),T_=su.forwardRef(function(t,o){let r=q({props:t,name:"MuiCheckbox"}),{checkedIcon:n=h_,color:a="primary",icon:i=g_,indeterminate:s=!1,indeterminateIcon:l=b_,size:u="medium",disableRipple:p=!1,className:f,slots:d={},slotProps:c={},...T}=r,v=s?l:i,x=s?l:n,m={...r,disableRipple:p,color:a,indeterminate:s,size:u},y=m_(m),g=c.input,[b,P]=Ae("root",{ref:o,elementType:y_,className:j(y.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:c,...T},ownerState:m,additionalProps:{type:"checkbox",icon:su.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:su.cloneElement(x,{fontSize:x.props.fontSize??u}),disableRipple:p,slots:d,slotProps:{input:Wi(typeof g=="function"?g(m):g,{"data-indeterminate":s})}}});return(0,lu.jsx)(b,{...P,classes:y})}),df=T_;function cs(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function v_(e){let t=vt(e);return t.body===e?ko(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ps(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function HS(e){return parseFloat(ko(e).getComputedStyle(e).paddingRight)||0}function x_(e){let o=["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 o||r}function VS(e,t,o,r,n){let a=[t,o,...r];[].forEach.call(e.children,i=>{let s=!a.includes(i),l=!x_(i);s&&l&&ps(i,n)})}function gh(e,t){let o=-1;return e.some((r,n)=>t(r)?(o=n,!0):!1),o}function S_(e,t){let o=[],r=e.container;if(!t.disableScrollLock){if(v_(r)){let i=cs(ko(r));o.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HS(r)+i}px`;let s=vt(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{o.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${HS(l)+i}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=vt(r).body;else{let i=r.parentElement,s=ko(r);a=i?.nodeName==="HTML"&&s.getComputedStyle(i).overflowY==="scroll"?i:r}o.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{o.forEach(({value:a,el:i,property:s})=>{a?i.style.setProperty(s,a):i.style.removeProperty(s)})}}function C_(e){let t=[];return[].forEach.call(e.children,o=>{o.getAttribute("aria-hidden")==="true"&&t.push(o)}),t}var mf=class{constructor(){this.modals=[],this.containers=[]}add(t,o){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ps(t.modalRef,!1);let n=C_(o);VS(o,t.mount,t.modalRef,n,!0);let a=gh(this.containers,i=>i.container===o);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:o,restore:null,hiddenSiblings:n}),r)}mount(t,o){let r=gh(this.containers,a=>a.modals.includes(t)),n=this.containers[r];n.restore||(n.restore=S_(n,o))}remove(t,o=!0){let r=this.modals.indexOf(t);if(r===-1)return r;let n=gh(this.containers,i=>i.modals.includes(t)),a=this.containers[n];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ps(t.modalRef,o),VS(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(n,1);else{let i=a.modals[a.modals.length-1];i.modalRef&&ps(i.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};var hf=S(U(),1);var Bt=S(U(),1);var uu=S(z(),1),E_=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function P_(e){let 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 R_(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;let t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`),o=t(`[name="${e.name}"]:checked`);return o||(o=t(`[name="${e.name}"]`)),o!==e}function O_(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||R_(e))}function A_(e){let t=[],o=[];return Array.from(e.querySelectorAll(E_)).forEach((r,n)=>{let a=P_(r);a===-1||!O_(r)||(a===0?t.push(r):o.push({documentOrder:n,tabIndex:a,node:r}))}),o.sort((r,n)=>r.tabIndex===n.tabIndex?r.documentOrder-n.documentOrder:r.tabIndex-n.tabIndex).map(r=>r.node).concat(t)}function M_(){return!0}function w_(e){let{children:t,disableAutoFocus:o=!1,disableEnforceFocus:r=!1,disableRestoreFocus:n=!1,getTabbable:a=A_,isEnabled:i=M_,open:s}=e,l=Bt.useRef(!1),u=Bt.useRef(null),p=Bt.useRef(null),f=Bt.useRef(null),d=Bt.useRef(null),c=Bt.useRef(!1),T=Bt.useRef(null),v=xt(Io(t),T),x=Bt.useRef(null);Bt.useEffect(()=>{!s||!T.current||(c.current=!o)},[o,s]),Bt.useEffect(()=>{if(!s||!T.current)return;let g=vt(T.current),b=bn(g);return T.current.contains(b)||(T.current.hasAttribute("tabIndex")||T.current.setAttribute("tabIndex","-1"),c.current&&T.current.focus()),()=>{n||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),Bt.useEffect(()=>{if(!s||!T.current)return;let g=vt(T.current),b=E=>{if(x.current=E,r||!i()||E.key!=="Tab")return;bn(g)===T.current&&E.shiftKey&&(l.current=!0,p.current&&p.current.focus())},P=()=>{let E=T.current;if(E===null)return;let O=bn(g);if(!g.hasFocus()||!i()||l.current){l.current=!1;return}if(E.contains(O)||r&&O!==u.current&&O!==p.current)return;if(O!==d.current)d.current=null;else if(d.current!==null)return;if(!c.current)return;let M=[];if((O===u.current||O===p.current)&&(M=a(T.current)),M.length>0){let N=!!(x.current?.shiftKey&&x.current?.key==="Tab"),A=M[0],h=M[M.length-1];typeof A!="string"&&typeof h!="string"&&(N?h.focus():A.focus())}else E.focus()};g.addEventListener("focusin",P),g.addEventListener("keydown",b,!0);let C=setInterval(()=>{let E=bn(g);E&&E.tagName==="BODY"&&P()},50);return()=>{clearInterval(C),g.removeEventListener("focusin",P),g.removeEventListener("keydown",b,!0)}},[o,r,n,i,s,a]);let m=g=>{f.current===null&&(f.current=g.relatedTarget),c.current=!0,d.current=g.target;let b=t.props.onFocus;b&&b(g)},y=g=>{f.current===null&&(f.current=g.relatedTarget),c.current=!0};return(0,uu.jsxs)(Bt.Fragment,{children:[(0,uu.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),Bt.cloneElement(t,{ref:v,onFocus:m}),(0,uu.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:p,"data-testid":"sentinelEnd"})]})}var bh=w_;var ir=S(U(),1);function N_(e){return typeof e=="function"?e():e}function D_(e){return e?e.props.hasOwnProperty("in"):!1}var FS=()=>{},yf=new mf;function __(e){let{container:t,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:n,onTransitionExited:a,children:i,onClose:s,open:l,rootRef:u}=e,p=ir.useRef({}),f=ir.useRef(null),d=ir.useRef(null),c=xt(d,u),[T,v]=ir.useState(!l),x=D_(i),m=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(m=!1);let y=()=>vt(f.current),g=()=>(p.current.modalRef=d.current,p.current.mount=f.current,p.current),b=()=>{yf.mount(g(),{disableScrollLock:o}),d.current&&(d.current.scrollTop=0)},P=Uo(()=>{let R=N_(t)||y().body;yf.add(g(),R),d.current&&b()}),C=()=>yf.isTopModal(g()),E=Uo(R=>{f.current=R,R&&(l&&C()?b():d.current&&ps(d.current,m))}),O=ir.useCallback(()=>{yf.remove(g(),m)},[m]);ir.useEffect(()=>()=>{O()},[O]),ir.useEffect(()=>{l?P():(!x||!r)&&O()},[l,O,x,r,P]);let M=R=>w=>{R.onKeyDown?.(w),!(w.key!=="Escape"||w.which===229||!C())&&(w.stopPropagation(),s&&s(w,"escapeKeyDown"))},N=R=>w=>{R.onClick?.(w),w.target===w.currentTarget&&s&&s(w,"backdropClick")};return{getRootProps:(R={})=>{let w=eu(e);delete w.onTransitionEnter,delete w.onTransitionExited;let k={...w,...R};return{role:"presentation",...k,onKeyDown:M(k),ref:c}},getBackdropProps:(R={})=>{let w=R;return{"aria-hidden":!0,...w,onClick:N(w),open:l}},getTransitionProps:()=>{let R=()=>{v(!1),n&&n()},w=()=>{v(!0),a&&a(),r&&O()};return{onEnter:Fl(R,i?.props.onEnter??FS),onExited:Fl(w,i?.props.onExited??FS)}},rootRef:c,portalRef:E,isTopModal:C,exited:T,hasTransition:x}}var $S=__;function qS(e){return V("MuiModal",e)}var _Q=H("MuiModal",["root","hidden","backdrop"]);var fs=S(z(),1),B_=e=>{let{open:t,exited:o,classes:r}=e;return F({root:["root",!t&&o&&"hidden"],backdrop:["backdrop"]},qS,r)},z_=L("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,!o.open&&o.exited&&t.hidden]}})(X(({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"}}]}))),k_=L(hh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),U_=hf.forwardRef(function(t,o){let r=q({name:"MuiModal",props:t}),{classes:n,className:a,closeAfterTransition:i=!1,children:s,container:l,component:u,disableAutoFocus:p=!1,disableEnforceFocus:f=!1,disablePortal:d=!1,disableRestoreFocus:c=!1,disableScrollLock:T=!1,hideBackdrop:v=!1,keepMounted:x=!1,onClose:m,onTransitionEnter:y,onTransitionExited:g,open:b,slotProps:P={},slots:C={},theme:E,...O}=r,M={...r,closeAfterTransition:i,disableAutoFocus:p,disableEnforceFocus:f,disablePortal:d,disableRestoreFocus:c,disableScrollLock:T,hideBackdrop:v,keepMounted:x},{getRootProps:N,getBackdropProps:A,getTransitionProps:h,portalRef:D,isTopModal:R,exited:w,hasTransition:k}=$S({...M,rootRef:o}),I={...M,exited:w},$=B_(I),de={};if(s.props.tabIndex===void 0&&(de.tabIndex="-1"),k){let{onEnter:ee,onExited:ae}=h();de.onEnter=ee,de.onExited=ae}let ne={slots:C,slotProps:P},[Q,ue]=Ae("root",{ref:o,elementType:z_,externalForwardedProps:{...ne,...O,component:u},getSlotProps:N,ownerState:I,className:j(a,$?.root,!I.open&&I.exited&&$?.hidden)}),[Ge,Ne]=Ae("backdrop",{elementType:k_,externalForwardedProps:ne,shouldForwardComponentProp:!0,getSlotProps:ee=>A({...ee,onClick:ae=>{ee?.onClick&&ee.onClick(ae)}}),className:$?.backdrop,ownerState:I});return!x&&!b&&(!k||w)?null:(0,fs.jsx)(fh,{ref:D,container:l,disablePortal:d,children:(0,fs.jsxs)(Q,{...ue,children:[v?null:(0,fs.jsx)(Ge,{...Ne}),(0,fs.jsx)(bh,{disableEnforceFocus:f,disableAutoFocus:p,disableRestoreFocus:c,isEnabled:R,open:b,children:hf.cloneElement(s,de)})]})})}),Th=U_;var KS=S(U(),1);function GS(e){return V("MuiDivider",e)}var L_=H("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),gf=L_;var vh=S(z(),1),I_=e=>{let{absolute:t,children:o,classes:r,flexItem:n,orientation:a,textAlign:i,variant:s}=e;return F({root:["root",t&&"absolute",s,a==="vertical"&&"vertical",n&&"flexItem",o&&"withChildren",i==="right"&&a!=="vertical"&&"textAlignRight",i==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},GS,r)},j_=L("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.absolute&&t.absolute,t[o.variant],o.orientation==="vertical"&&t.vertical,o.flexItem&&t.flexItem,o.children&&t.withChildren,o.textAlign==="right"&&o.orientation!=="vertical"&&t.textAlignRight,o.textAlign==="left"&&o.orientation!=="vertical"&&t.textAlignLeft]}})(X(({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:{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%"}}}]}))),H_=L("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.wrapper,o.orientation==="vertical"&&t.wrapperVertical]}})(X(({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)`}}]}))),V_=KS.forwardRef(function(t,o){let r=q({props:t,name:"MuiDivider"}),{absolute:n=!1,children:a,className:i,orientation:s="horizontal",component:l=a||s==="vertical"?"div":"hr",flexItem:u=!1,role:p=l!=="hr"?"separator":void 0,textAlign:f="center",variant:d="fullWidth",...c}=r,T={...r,absolute:n,component:l,flexItem:u,orientation:s,role:p,textAlign:f,variant:d},v=I_(T);return(0,vh.jsx)(j_,{as:l,className:j(v.root,i),role:p,ref:o,ownerState:T,"aria-orientation":p==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...c,children:a?(0,vh.jsx)(H_,{className:v.wrapper,ownerState:T,children:a}):null})}),cu=V_;var YS=S(U(),1);var XS=S(z(),1),F_=e=>{let{classes:t,disableUnderline:o,startAdornment:r,endAdornment:n,size:a,hiddenLabel:i,multiline:s}=e,l={root:["root",!o&&"underline",r&&"adornedStart",n&&"adornedEnd",a==="small"&&`size${K(a)}`,i&&"hiddenLabel",s&&"multiline"],input:["input"]},u=F(l,gS,t);return{...t,...u}},$_=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[...Ba(e,t),!o.disableUnderline&&t.underline]}})(X(({theme:e})=>{let t=e.palette.mode==="light",o=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",n=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:n,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Rn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Rn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Rn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Rn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):o}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Rn.disabled}, .${Rn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Rn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ot()).map(([i])=>({props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:s})=>i.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),q_=L(Ua,{name:"MuiFilledInput",slot:"Input",overridesResolver:za})(X(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),QS=YS.forwardRef(function(t,o){let r=q({props:t,name:"MuiFilledInput"}),{disableUnderline:n=!1,fullWidth:a=!1,hiddenLabel:i,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:p={},type:f="text",...d}=r,c={...r,disableUnderline:n,fullWidth:a,inputComponent:s,multiline:l,type:f},T=F_(r),v={root:{ownerState:c},input:{ownerState:c}},x=u?xe(v,u):v,m=p.root??$_,y=p.input??q_;return(0,XS.jsx)(jo,{slots:{root:m,input:y},slotProps:x,fullWidth:a,inputComponent:s,multiline:l,ref:o,type:f,...d,classes:T})});QS.muiName="Input";var pu=QS;var Ft=S(U(),1);function WS(e){return V("MuiFormControl",e)}var OW=H("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var xh=S(z(),1),G_=e=>{let{classes:t,margin:o,fullWidth:r}=e,n={root:["root",o!=="none"&&`margin${K(o)}`,r&&"fullWidth"]};return F(n,WS,t)},K_=L("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[`margin${K(o.margin)}`],o.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Y_=Ft.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormControl"}),{children:n,className:a,color:i="primary",component:s="div",disabled:l=!1,error:u=!1,focused:p,fullWidth:f=!1,hiddenLabel:d=!1,margin:c="none",required:T=!1,size:v="medium",variant:x="outlined",...m}=r,y={...r,color:i,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:d,margin:c,required:T,size:v,variant:x},g=G_(y),[b,P]=Ft.useState(()=>{let k=!1;return n&&Ft.Children.forEach(n,I=>{if(!Gp(I,["Input","Select"]))return;let $=Gp(I,["Select"])?I.props.input:I;$&&pS($.props)&&(k=!0)}),k}),[C,E]=Ft.useState(()=>{let k=!1;return n&&Ft.Children.forEach(n,I=>{Gp(I,["Input","Select"])&&(Da(I.props,!0)||Da(I.props.inputProps,!0))&&(k=!0)}),k}),[O,M]=Ft.useState(!1);l&&O&&M(!1);let N=p!==void 0&&!l?p:O,A,h=Ft.useRef(!1),D=Ft.useCallback(()=>{E(!0)},[]),R=Ft.useCallback(()=>{E(!1)},[]),w=Ft.useMemo(()=>({adornedStart:b,setAdornedStart:P,color:i,disabled:l,error:u,filled:C,focused:N,fullWidth:f,hiddenLabel:d,size:v,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:R,onFilled:D,registerEffect:A,required:T,variant:x}),[b,i,l,u,C,N,f,d,A,R,D,T,v,x]);return(0,xh.jsx)(is.Provider,{value:w,children:(0,xh.jsx)(K_,{as:s,ownerState:y,className:j(g.root,a),ref:o,...m,children:n})})}),Sh=Y_;var e1=S(U(),1);function ZS(e){return V("MuiFormHelperText",e)}var X_=H("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Ch=X_;var Eh=S(z(),1),JS,Q_=e=>{let{classes:t,contained:o,size:r,disabled:n,error:a,filled:i,focused:s,required:l}=e,u={root:["root",n&&"disabled",a&&"error",r&&`size${K(r)}`,o&&"contained",s&&"focused",i&&"filled",l&&"required"]};return F(u,ZS,t)},W_=L("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.size&&t[`size${K(o.size)}`],o.contained&&t.contained,o.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Ch.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ch.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Z_=e1.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormHelperText"}),{children:n,className:a,component:i="p",disabled:s,error:l,filled:u,focused:p,margin:f,required:d,variant:c,...T}=r,v=Zt(),x=To({props:r,muiFormControl:v,states:["variant","size","disabled","error","filled","focused","required"]}),m={...r,component:i,contained:x.variant==="filled"||x.variant==="outlined",variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required};delete m.ownerState;let y=Q_(m);return(0,Eh.jsx)(W_,{as:i,className:j(y.root,a),ref:o,...T,ownerState:m,children:n===" "?JS||(JS=(0,Eh.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):n})}),Ph=Z_;var o1=S(U(),1);function t1(e){return V("MuiFormLabel",e)}var J_=H("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),An=J_;var Rh=S(z(),1),eB=e=>{let{classes:t,color:o,focused:r,disabled:n,error:a,filled:i,required:s}=e,l={root:["root",`color${K(o)}`,n&&"disabled",a&&"error",i&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return F(l,t1,t)},tB=L("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.color==="secondary"&&t.colorSecondary,o.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{[`&.${An.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${An.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${An.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),oB=L("span",{name:"MuiFormLabel",slot:"Asterisk"})(X(({theme:e})=>({[`&.${An.error}`]:{color:(e.vars||e).palette.error.main}}))),rB=o1.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormLabel"}),{children:n,className:a,color:i,component:s="label",disabled:l,error:u,filled:p,focused:f,required:d,...c}=r,T=Zt(),v=To({props:r,muiFormControl:T,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:v.color||"primary",component:s,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required},m=eB(x);return(0,Rh.jsxs)(tB,{as:s,ownerState:x,className:j(m.root,a),ref:o,...c,children:[n,v.required&&(0,Rh.jsxs)(oB,{ownerState:x,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]})}),Oh=rB;var La=S(U(),1);var r1=S(z(),1);function fu(e){return`scale(${e}, ${e**2})`}var nB={entering:{opacity:1,transform:fu(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:fu(.75)},exited:{opacity:0,transform:fu(.75)}},aB={opacity:0,transform:fu(.75),visibility:"hidden"},Ah=La.forwardRef(function(t,o){let{addEndListener:r,appear:n=!0,children:a,easing:i,in:s,onEnter:l,onEntered:u,onEntering:p,onExit:f,onExited:d,onExiting:c,style:T,timeout:v="auto",...x}=t,m=os(),y=La.useRef(),g=gn(),b=La.useRef(null),P=Dt(b,Io(a),o),C=oo(b,p),E=oo(b,(D,R)=>{ef(D);let{duration:w,delay:k,easing:I}=rs({style:T,timeout:v,easing:i},{mode:"enter"}),$;v==="auto"?($=g.transitions.getAutoHeightDuration(D.clientHeight),y.current=$):$=w,D.style.transition=[g.transitions.create("opacity",{duration:$,delay:k}),g.transitions.create("transform",{duration:$*.666,delay:k,easing:I})].join(","),l&&l(D,R)}),O=oo(b,u),M=oo(b,c),N=oo(b,D=>{let{duration:R,delay:w,easing:k}=rs({style:T,timeout:v,easing:i},{mode:"exit"}),I;v==="auto"?(I=g.transitions.getAutoHeightDuration(D.clientHeight),y.current=I):I=R,D.style.transition=[g.transitions.create("opacity",{duration:I,delay:w}),g.transitions.create("transform",{duration:I*.666,delay:w||I*.333,easing:k})].join(","),D.style.opacity=0,D.style.transform=fu(.75),f&&f(D)}),A=oo(b,D=>{D.style.transition="",d&&d(D)});return(0,r1.jsx)(Ql,{appear:n,in:s,nodeRef:b,onEnter:E,onEntered:O,onEntering:C,onExit:N,onExited:A,onExiting:M,addEndListener:D=>{v==="auto"&&m.start(y.current||0,D),r&&r(b.current,D)},timeout:v==="auto"?null:v,...x,children:(D,{ownerState:R,...w})=>{let k=tf(D,s,nB,aB,T,a.props.style);return La.cloneElement(a,{style:k,ref:P,...w})}})});Ah&&(Ah.muiSupportAuto=!0);var Mh=Ah;var i1=S(U(),1);function n1(e){return V("MuiInputLabel",e)}var iB=H("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]),a1=iB;var s1=S(z(),1),sB=e=>{let{classes:t,disableUnderline:o}=e,n=F({root:["root",!o&&"underline"],input:["input"]},yS,t);return{...t,...n}},lB=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[...Ba(e,t),!o.disableUnderline&&t.underline]}})(X(({theme:e})=>{let o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(o=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{[`label + &, .${a1.root} + &`]:{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ss.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ss.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${o}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ss.disabled}, .${ss.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${o}`}},[`&.${ss.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ot()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),uB=L(Ua,{name:"MuiInput",slot:"Input",overridesResolver:za})({}),l1=i1.forwardRef(function(t,o){let r=q({props:t,name:"MuiInput"}),{disableUnderline:n=!1,fullWidth:a=!1,inputComponent:i="input",multiline:s=!1,slotProps:l,slots:u={},type:p="text",...f}=r,d=sB(r),T={root:{ownerState:{disableUnderline:n}}},v=l?xe(l,T):T,x=u.root??lB,m=u.input??uB;return(0,s1.jsx)(jo,{slots:{root:x,input:m},slotProps:v,fullWidth:a,inputComponent:i,multiline:s,ref:o,type:p,...f,classes:d})});l1.muiName="Input";var du=l1;var u1=S(U(),1);var c1=S(z(),1),cB=e=>{let{classes:t,formControl:o,size:r,shrink:n,disableAnimation:a,variant:i,required:s}=e,l={root:["root",o&&"formControl",!a&&"animated",n&&"shrink",r&&r!=="medium"&&`size${K(r)}`,i],asterisk:[s&&"asterisk"]},u=F(l,n1,t);return{...t,...u}},pB=L(Oh,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[{[`& .${An.asterisk}`]:t.asterisk},t.root,o.formControl&&t.formControl,o.size==="small"&&t.sizeSmall,o.shrink&&t.shrink,!o.disableAnimation&&t.animated,o.focused&&t.focused,t[o.variant]]}})(X(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:o})=>t==="filled"&&o.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:o,size:r})=>t==="filled"&&o.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:o})=>t==="outlined"&&o.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),fB=u1.forwardRef(function(t,o){let r=q({name:"MuiInputLabel",props:t}),{disableAnimation:n=!1,margin:a,shrink:i,variant:s,className:l,...u}=r,p=Zt(),f=i;typeof f>"u"&&p&&(f=p.filled||p.focused||p.adornedStart);let d=To({props:r,muiFormControl:p,states:["size","variant","required","focused"]}),c={...r,disableAnimation:n,formControl:p,shrink:f,size:d.size,variant:d.variant,required:d.required,focused:d.focused},T=cB(c);return(0,c1.jsx)(pB,{"data-shrink":f,ref:o,className:j(T.root,l),...u,ownerState:c,classes:T})}),wh=fB;var bf=S(U(),1);var p1=S(U(),1),dB=p1.createContext({}),Ia=dB;function f1(e){return V("MuiList",e)}var mJ=H("MuiList",["root","padding","dense","subheader"]);var Tf=S(z(),1),mB=e=>{let{classes:t,disablePadding:o,dense:r,subheader:n}=e;return F({root:["root",!o&&"padding",r&&"dense",n&&"subheader"]},f1,t)},yB=L("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,!o.disablePadding&&t.padding,o.dense&&t.dense,o.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}}]}),hB=bf.forwardRef(function(t,o){let r=q({props:t,name:"MuiList"}),{children:n,className:a,component:i="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...p}=r,f=bf.useMemo(()=>({dense:s}),[s]),d={...r,component:i,dense:s,disablePadding:l},c=mB(d);return(0,Tf.jsx)(Ia.Provider,{value:f,children:(0,Tf.jsxs)(yB,{as:i,className:j(c.root,a),ref:o,ownerState:d,...p,children:[u,n]})})}),Nh=hB;var xf=S(U(),1);function d1(e){return V("MuiListItemIcon",e)}var gB=H("MuiListItemIcon",["root","alignItemsFlexStart"]),vf=gB;var m1=S(z(),1),bB=e=>{let{alignItems:t,classes:o}=e;return F({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},d1,o)},TB=L("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(X(({theme:e})=>({minWidth:e.spacing(4.5),color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),vB=xf.forwardRef(function(t,o){let r=q({props:t,name:"MuiListItemIcon"}),{className:n,...a}=r,i=xf.useContext(Ia),s={...r,alignItems:i.alignItems},l=bB(s);return(0,m1.jsx)(TB,{className:j(l.root,n),ownerState:s,ref:o,...a})}),Sf=vB;var xB=H("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Cf=xB;var zf=S(U(),1);var ro=S(U(),1);var Ef=S(U(),1),Pf=Ef.createContext(void 0);function Dh(){let e=Ef.useContext(Pf);if(e===void 0)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}var Ze=S(U(),1);var SB=Object.is;function Rf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let o=0,r=0;for(let n in e)if(o+=1,!SB(e[n],t[n])||!(n in t))return!1;for(let n in t)r+=1;return o===r}var CB=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function zh(e){let{activeItemId:t,getDefaultActiveItemId:o,orientation:r,isRtl:n=!1,isItemFocusable:a=ds,wrap:i=!0}=e,[s,l]=Ze.useState(t),u=Ze.useRef(t),p=s;t!==u.current&&(u.current=t,t!==void 0&&t!==s&&(p=t,l(t)));let f=Ze.useRef(null),d=Ze.useRef(new Map),[c,T]=Ze.useState(0),v=Ze.useMemo(()=>_h(d.current),[c]),x=y1(p,v,a,o),m=Ze.useRef(x);m.current=x;let y=Ze.useCallback(()=>{let A=_h(d.current),h=y1(m.current,A,a,o);return v1(A,h)},[o,a]),g=Ze.useCallback(()=>d.current,[]),b=Uo(A=>{let h=d.current.get(A.id);Rf(h??null,A)||(d.current.set(A.id,A),T(D=>D+1))}),P=Uo(A=>{d.current.delete(A)&&T(h=>h+1)}),C=Uo(A=>{l(A)}),E=Ze.useCallback(A=>m.current===A,[]),O=Ze.useCallback((A,h,D,R)=>{let w=Of(d.current),k=b1(w,A,h,D,R??a);return k?(k.element?.focus(),l(k.id),k):null},[a]),M=Ze.useCallback(A=>({onFocus:R=>{let w=Of(d.current),k=S1(w,R.target);k!==-1&&l(w[k].id)},onKeyDown:R=>{if(R.altKey||R.shiftKey||R.ctrlKey||R.metaKey||!CB.includes(R.key))return;let w=r==="horizontal"?"ArrowLeft":"ArrowUp",k=r==="horizontal"?"ArrowRight":"ArrowDown";r==="horizontal"&&n&&(w="ArrowRight",k="ArrowLeft");let I=Of(d.current),$=Ea(vt(f.current)),de=$===f.current,ne=h1(I,$,m.current),Q="next";switch(R.key){case w:Q="previous",R.preventDefault(),de&&(ne=I.length);break;case k:R.preventDefault(),de&&(ne=-1);break;case"Home":R.preventDefault(),ne=-1;break;case"End":R.preventDefault(),Q="previous",ne=I.length;break;default:return}O(ne,Q,i)},ref:OB(A,R=>{f.current=R})}),[O,n,r,i]),N=Ze.useCallback(A=>{let h=Of(d.current),D=Ea(vt(f.current)),w=D===f.current?-1:h1(h,D,m.current);return O(w,"next",!0,A)?.id??null},[O]);return Ze.useMemo(()=>({activeItemId:x,focusNext:N,getActiveItem:y,getContainerProps:M,getItemMap:g,isItemActive:E,registerItem:b,setActiveItemId:C,unregisterItem:P}),[x,N,y,M,g,E,b,C,P])}function kh(e){let t=Dh(),{activeItemId:o,registerItem:r,unregisterItem:n}=t,a=Ze.useRef(null),i=Ze.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),s=Ze.useRef(i);s.current=i;let l=Ze.useCallback(p=>{if(a.current=p,p==null){queueMicrotask(()=>{a.current==null&&n(e.id)});return}r({...s.current,element:p})},[e.id,r,n]),u=xt(e.ref,l);return Tt(()=>{a.current&&r({...i,element:a.current})},[i,r]),Tt(()=>{let p=e.id;return()=>{n(p)}},[e.id,n]),{ref:u,tabIndex:o===e.id?0:-1}}function y1(e,t,o,r){return e!=null?EB(e,t,o):PB(t,o,r)}function EB(e,t,o){let r=x1(t,e);return r===-1?T1(t,o):o(t[r])?t[r].id:b1(t,r,"next",!1,o)?.id??null}function PB(e,t,o){let r=o?.(e);if(r!=null){let n=v1(e,r);if(n&&t(n))return n.id}return T1(e,t)}function h1(e,t,o){if(t){let r=S1(e,t);if(r!==-1)return r}return x1(e,o)}function b1(e,t,o,r,n){let a=e.length-1;if(a===-1)return null;let i=!1,s=g1(t,a,o,r),l=s;for(;s!==-1;){if(s===l){if(i)return null;i=!0}let u=e[s];if(!u||!n(u))s=g1(s,a,o,r);else return u}return null}function T1(e,t){return e.find(o=>t(o))?.id??null}function v1(e,t){return t==null?null:e.find(o=>o.id===t)??null}function x1(e,t){return t==null?-1:e.findIndex(o=>o.id===t)}function S1(e,t){return t?e.findIndex(o=>o.element===t||o.element?.contains(t)):-1}function _h(e){let t=Array.from(e.values());if(t.every(n=>n.element==null))return t;let o=t.filter(Bh).sort((n,a)=>RB(n.element,a.element)),r=t.filter(n=>!Bh(n));return[...o,...r]}function Of(e){return _h(e).filter(Bh)}function g1(e,t,o,r=!0){return o==="next"?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function ds(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute("disabled")&&e.element.getAttribute("aria-disabled")!=="true"&&e.element.hasAttribute("tabindex"):!1}function Bh(e){return e.element!=null&&e.element.isConnected}function RB(e,t){if(e===t)return 0;let o=e.compareDocumentPosition(t);return o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS?1:0}function OB(...e){return t=>{e.forEach(o=>{Pa(o??null,t)})}}var C1=cs;function mu(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t==="keyboard"})}catch{e.focus()}}function Af(e){return e?e.type==="mousedown"||e.type==="pointerdown"||e.type==="touchstart"?"pointer":e.type==="keydown"||e.type==="click"&&e.detail===0?"keyboard":null:null}function Mf(e){return e==null||typeof e=="string"&&!e.trim()}function yu(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}var wf=S(U(),1),E1=wf.createContext(null);function hu(){return wf.useContext(E1)}var Uh=E1.Provider;var Nf=S(U(),1),Lh=Nf.createContext(void 0);function P1(){let e=Nf.useContext(Lh);if(e===void 0)throw new Error("MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.");return e}var Df=S(z(),1);function AB(e){let t=e?.element??e;if(!t)return"";if(e?.textValue!==void 0)return e.textValue;let o=t.innerText;return o===void 0&&(o=t.textContent),o??""}function R1(e,t){if(t===void 0)return!0;let o=AB(e);return o=o.trim().toLowerCase(),o.length===0?!1:t.repeating?o[0]===t.keys[0]:o.startsWith(t.keys.join(""))}function MB(e,t){return R1(e,t)?ds(e):!1}function wB(e,t){mu(e,t)}var NB=ro.forwardRef(function(t,o){let{actions:r,autoFocus:n=!1,autoFocusItem:a=!1,children:i,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:p,variant:f="selectedMenu",...d}=t,c=ro.useRef(null),T=ro.useRef(!1),[v,x]=ro.useState(!1),m=hu(),y=ro.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),g=ro.useCallback(w=>f==="selectedMenu"?w.find(k=>k.selected&&ds(k))?.id??w.find(k=>ds(k))?.id??null:w.find(k=>ds(k))?.id??null,[f]),b=zh({activeItemId:void 0,getDefaultActiveItemId:g,orientation:"vertical",wrap:!u}),{activeItemId:P,focusNext:C,getActiveItem:E,getContainerProps:O,getItemMap:M}=b,N=vn((w=!1)=>{if(!c.current||!w&&T.current)return null;if(a){let k=E();if(k?.element){let I=Array.from(M().values()).some(de=>de.selected),$=f==="menu"&&I&&!k.selected&&m==null;return x($),wB(k.element,m),T.current=!0,k.element}return n?(x(!1),c.current.focus(),c.current):null}return n?(x(!1),c.current.focus(),T.current=!0,c.current):(x(!1),null)});Xi(()=>{if(!n&&!a){T.current=!1,x(!1);return}N()},[P,a,n,N]),ro.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:k})=>{let I=!c.current.style.width;if(w.clientHeight<c.current.clientHeight&&I){let $=`${C1($l(w))}px`;c.current.style[k==="rtl"?"paddingLeft":"paddingRight"]=$,c.current.style.width=`calc(100% + ${$})`}return c.current},focusInitialTarget:()=>{if(!c.current)return null;let w=bn(Tn(c.current));return w&&c.current.contains(w)?w:N(!0)}}),[N]);let A=O(),h=Dt(c,A.ref,o),D=ro.useMemo(()=>({itemsFocusableWhenDisabled:l,suppressInitialFocusVisible:v,variant:f}),[l,v,f]),R=vn(w=>{if(v&&x(!1),(w.ctrlKey||w.metaKey||w.altKey)&&p){p(w);return}if(A.onKeyDown(w),w.key.length===1){let I=y.current,$=w.key.toLowerCase(),de=performance.now();I.keys.length>0&&(de-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&$!==I.keys[0]&&(I.repeating=!1)),I.lastTime=de,I.keys.push($);let ne=bn(Tn(c.current)),Q=ne&&!I.repeating&&R1(ne,I);I.previousKeyMatched&&(Q||C(ue=>MB(ue,I))!=null)?w.preventDefault():I.previousKeyMatched=!1}p&&p(w)});return(0,Df.jsx)(Nh,{role:"menu",ref:h,className:s,onKeyDown:R,onFocus:A.onFocus,tabIndex:-1,...d,children:(0,Df.jsx)(Lh.Provider,{value:D,children:(0,Df.jsx)(Pf.Provider,{value:b,children:i})})})}),ms=NB;var zt=S(U(),1);function O1(e){return V("MuiPopover",e)}var Lee=H("MuiPopover",["root","paper"]);var Bf=S(z(),1);function A1(e,t){let o=0;return typeof t=="number"?o=t:t==="center"?o=e.height/2:t==="bottom"&&(o=e.height),o}function M1(e,t){let o=0;return typeof t=="number"?o=t:t==="center"?o=e.width/2:t==="right"&&(o=e.width),o}function w1(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function _f(e){return typeof e=="function"?e():e}var DB=e=>{let{classes:t}=e;return F({root:["root"],paper:["paper"]},O1,t)},_B=L(Th,{name:"MuiPopover",slot:"Root"})({}),Ih=L(Cn,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),BB=zt.forwardRef(function(t,o){let r=q({props:t,name:"MuiPopover"}),{action:n,anchorEl:a,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:p,container:f,disableAutoFocus:d=!1,elevation:c=8,marginThreshold:T=16,open:v,slots:x={},slotProps:m={},transformOrigin:y={vertical:"top",horizontal:"left"},transitionDuration:g="auto",disableScrollLock:b=!1,...P}=r,C=zt.useRef(),E={...r,anchorOrigin:i,anchorReference:l,elevation:c,marginThreshold:T,transformOrigin:y,transitionDuration:g},O=DB(E),M=zt.useCallback(()=>{if(l==="anchorPosition")return s;let te=_f(a),be=(te&&te.nodeType===1?te:Tn(C.current).body).getBoundingClientRect();return{top:be.top+A1(be,i.vertical),left:be.left+M1(be,i.horizontal)}},[a,i.horizontal,i.vertical,s,l]),N=zt.useCallback(te=>({vertical:A1(te,y.vertical),horizontal:M1(te,y.horizontal)}),[y.horizontal,y.vertical]),A=zt.useCallback(te=>{let oe={width:te.offsetWidth,height:te.offsetHeight},be=N(oe);if(l==="none")return{top:null,left:null,transformOrigin:w1(be)};let Pt=M(),ce=Pt.top-be.vertical,Oe=Pt.left-be.horizontal,pt=ce+oe.height,qt=Oe+oe.width,Ke=$l(_f(a)),ft=Ke.innerHeight-T,Rt=Ke.innerWidth-T;if(T!=null&&ce<T){let ye=ce-T;ce-=ye,be.vertical+=ye}else if(T!=null&&pt>ft){let ye=pt-ft;ce-=ye,be.vertical+=ye}if(T!=null&&Oe<T){let ye=Oe-T;Oe-=ye,be.horizontal+=ye}else if(qt>Rt){let ye=qt-Rt;Oe-=ye,be.horizontal+=ye}return{top:`${Math.round(ce)}px`,left:`${Math.round(Oe)}px`,transformOrigin:w1(be)}},[a,l,M,N,T]),[h,D]=zt.useState(v),R=zt.useCallback(()=>{let te=C.current;if(!te)return;let oe=A(te);oe.top!=null&&te.style.setProperty("top",oe.top),oe.left!=null&&(te.style.left=oe.left),te.style.transformOrigin=oe.transformOrigin,D(!0)},[A]);zt.useEffect(()=>(b&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[a,b,R]);let w=()=>{R()},k=()=>{D(!1)};zt.useEffect(()=>{v&&R()}),zt.useImperativeHandle(n,()=>v?{updatePosition:()=>{R()}}:null,[v,R]),zt.useEffect(()=>{if(!v)return;let te=Nx(()=>{R()}),oe=$l(_f(a));return oe.addEventListener("resize",te),()=>{te.clear(),oe.removeEventListener("resize",te)}},[a,v,R]);let I=g,$={slots:x,slotProps:m},[de,ne]=Ae("transition",{elementType:Mh,externalForwardedProps:$,ownerState:E,getSlotProps:te=>({...te,onEntering:(oe,be)=>{te.onEntering?.(oe,be),w()},onExited:oe=>{te.onExited?.(oe),k()}}),additionalProps:{appear:!0,in:v}});g==="auto"&&!de.muiSupportAuto&&(I=void 0);let Q=f||(a?Tn(_f(a)).body:void 0),[ue,{slots:Ge,slotProps:Ne,...ee}]=Ae("root",{ref:o,elementType:_B,externalForwardedProps:{...$,...P},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:Wi(typeof m.backdrop=="function"?m.backdrop(E):m.backdrop,{invisible:!0})},container:Q,open:v},ownerState:E,className:j(O.root,p)}),[ae,W]=Ae("paper",{ref:C,className:O.paper,elementType:Ih,externalForwardedProps:$,shouldForwardComponentProp:!0,additionalProps:{elevation:c,style:h?void 0:{opacity:0}},ownerState:E});return(0,Bf.jsx)(ue,{...ee,...!Sn(ue)&&{slots:Ge,slotProps:Ne,disableAutoFocus:d,disableScrollLock:b},children:(0,Bf.jsx)(de,{...ne,timeout:I,children:(0,Bf.jsx)(ae,{...W,children:u})})})}),jh=BB;function N1(e){return V("MuiMenu",e)}var ste=H("MuiMenu",["root","paper","list"]);var Hh=S(z(),1),zB={vertical:"top",horizontal:"right"},kB={vertical:"top",horizontal:"left"},UB=e=>{let{classes:t}=e;return F({root:["root"],paper:["paper"],list:["list"]},N1,t)},LB=L(jh,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),IB=L(Ih,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),jB=L(ms,{name:"MuiMenu",slot:"List"})({outline:0}),HB=zf.forwardRef(function(t,o){let r=q({props:t,name:"MuiMenu"}),{autoFocus:n=!0,children:a,className:i,disableAutoFocusItem:s=!1,onClose:l,open:u,PopoverClasses:p,transitionDuration:f="auto",variant:d="selectedMenu",slots:c={},slotProps:T={},...v}=r,x=q0(),m={...r,autoFocus:n,disableAutoFocusItem:s,transitionDuration:f,variant:d},y=UB(m),g=n&&u,b=g&&!s,P=zf.useRef(null),C=(w,k)=>{P.current&&(P.current.adjustStyleForScrollbar(w,{direction:x?"rtl":"ltr"}),g&&P.current.focusInitialTarget?.())},E=w=>{w.key==="Tab"&&(w.preventDefault(),l&&l(w,"tabKeyDown"))},O={slots:c,slotProps:T},M=ph({elementType:c.root,externalSlotProps:T.root,ownerState:m,className:[y.root,i]}),[N,A]=Ae("paper",{className:y.paper,elementType:IB,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:m}),[h,D]=Ae("list",{className:y.list,elementType:jB,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:w=>({...w,onKeyDown:k=>{E(k),w.onKeyDown?.(k)}}),ownerState:m}),R=typeof T.transition=="function"?T.transition(m):T.transition;return(0,Hh.jsx)(LB,{disableAutoFocus:n,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?zB:kB,slots:{root:c.root,paper:N,backdrop:c.backdrop,transition:c.transition},slotProps:{root:M,paper:A,backdrop:typeof T.backdrop=="function"?T.backdrop(m):T.backdrop,transition:{...R,onEntering:(...w)=>{C(...w),R?.onEntering?.(...w)}}},open:u,ref:o,transitionDuration:f,ownerState:m,...v,classes:p,children:(0,Hh.jsx)(h,{actions:P,autoFocus:g,autoFocusItem:b,variant:d,...D,children:a})})}),D1=HB;var Mn=S(U(),1);function _1(e){return V("MuiMenuItem",e)}var VB=H("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ys=VB;var Vh=S(z(),1),FB=(e,t)=>{let{ownerState:o}=e;return[t.root,o.dense&&t.dense,o.divider&&t.divider,!o.disableGutters&&t.gutters]},$B=e=>{let{disabled:t,dense:o,divider:r,disableGutters:n,selected:a,classes:i}=e,l=F({root:["root",o&&"dense",t&&"disabled",!n&&"gutters",r&&"divider",a&&"selected"]},_1,i);return{...i,...l}},qB=L(Lr,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:FB})(X(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ys.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ys.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ys.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)}},[`&.${ys.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ys.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${gf.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${gf.inset}`]:{marginLeft:52},[`& .${Cf.root}`]:{marginTop:0,marginBottom:0},[`& .${Cf.inset}`]:{paddingLeft:36},[`& .${vf.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${vf.root} svg`]:{fontSize:"1.25rem"}}}]}))),GB=Mn.forwardRef(function(t,o){let r=q({props:t,name:"MuiMenuItem"}),{autoFocus:n=!1,component:a="li",dense:i=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:p="menuitem",tabIndex:f,className:d,...c}=r,T=hu(),v=Mn.useContext(Ia),x=Mn.useMemo(()=>({dense:i||v.dense||!1,disableGutters:l}),[v.dense,i,l]),m=P1(),y=Ra(),g=m.suppressInitialFocusVisible,b=m.itemsFocusableWhenDisabled,P=Mn.useRef(null);Xi(()=>{n&&P.current&&mu(P.current,T)},[n]);let C={...r,dense:x.dense,divider:s,disableGutters:l},E=$B(r),O=kh({id:y,ref:o,disabled:r.disabled,focusableWhenDisabled:b,selected:r.selected}),M=Dt(P,O.ref),N;return f!==void 0?N=f:m.variant==="selectedMenu"?N=O.tabIndex:(!r.disabled||b)&&(N=-1),(0,Vh.jsx)(Ia.Provider,{value:x,children:(0,Vh.jsx)(qB,{ref:M,role:p,tabIndex:N,component:a,internalNativeButton:!1,focusableWhenDisabled:b,suppressFocusVisible:g,focusVisibleClassName:j(E.focusVisible,u),className:j(E.root,d),...c,ownerState:C,classes:E})})}),wn=GB;var Uf=S(U(),1);function B1(e){return V("MuiNativeSelect",e)}var KB=H("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),kf=KB;var gu=S(z(),1),YB=e=>{let{classes:t,variant:o,disabled:r,multiple:n,open:a,error:i}=e,s={select:["select",o,r&&"disabled",n&&"multiple",i&&"error"],icon:["icon",`icon${K(o)}`,a&&"iconOpen",r&&"disabled"]};return F(s,B1,t)},Fh=L("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${kf.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),XB=L(Fh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Be,overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.select,t[o.variant],o.error&&t.error,{[`&.${kf.multiple}`]:t.multiple}]}})({}),$h=L("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${kf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),QB=L($h,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.icon,o.variant&&t[`icon${K(o.variant)}`],o.open&&t.iconOpen]}})({}),WB=Uf.forwardRef(function(t,o){let{className:r,disabled:n,error:a,IconComponent:i,inputRef:s,variant:l="standard",...u}=t,p={...t,disabled:n,variant:l,error:a},f=YB(p);return(0,gu.jsxs)(Uf.Fragment,{children:[(0,gu.jsx)(XB,{ownerState:p,className:j(f.select,r),disabled:n,ref:s||o,...u}),t.multiple?null:(0,gu.jsx)(QB,{as:i,ownerState:p,className:f.icon})]})}),z1=WB;var Lf=S(U(),1);var bu=S(z(),1),k1,ZB=L("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Be})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),JB=L("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Be})(X(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function qh(e){let{children:t,classes:o,className:r,label:n,notched:a,...i}=e,s=n!=null&&n!=="",l={...e,notched:a,withLabel:s};return(0,bu.jsx)(ZB,{"aria-hidden":!0,className:r,ownerState:l,...i,children:(0,bu.jsx)(JB,{ownerState:l,children:s?(0,bu.jsx)("span",{children:n}):k1||(k1=(0,bu.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"}))})})}var Tu=S(z(),1),e3=e=>{let{classes:t}=e,r=F({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},hS,t);return{...t,...r}},t3=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ba})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ar.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ar.focused} .${ar.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(ot()).map(([o])=>({props:{color:o},style:{[`&.${ar.focused} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette[o].main}}})),{props:{},style:{[`&.${ar.error} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ar.disabled} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:o})=>o.startAdornment,style:{paddingLeft:14}},{props:({ownerState:o})=>o.endAdornment,style:{paddingRight:14}},{props:({ownerState:o})=>o.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:o,size:r})=>o.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),o3=L(qh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),r3=L(Ua,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:za})(X(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),U1=Lf.forwardRef(function(t,o){let r=q({props:t,name:"MuiOutlinedInput"}),{fullWidth:n=!1,inputComponent:a="input",label:i,multiline:s=!1,notched:l,slots:u={},slotProps:p={},type:f="text",...d}=r,c=e3(r),T=Zt(),v=To({props:r,muiFormControl:T,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:T,fullWidth:n,hiddenLabel:v.hiddenLabel,multiline:s,size:v.size,type:f},m=u.root??t3,y=u.input??r3,[g,b]=Ae("notchedOutline",{elementType:o3,className:c.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:u,slotProps:p},additionalProps:{label:i!=null&&i!==""&&v.required?(0,Tu.jsxs)(Lf.Fragment,{children:[i,"\u2009","*"]}):i}});return(0,Tu.jsx)(jo,{slots:{root:m,input:y},slotProps:p,renderSuffix:P=>(0,Tu.jsx)(g,{...b,notched:typeof l<"u"?l:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:n,inputComponent:a,multiline:s,ref:o,type:f,...d,classes:{...c,notchedOutline:null}})});U1.muiName="Input";var vu=U1;var gs=S(U(),1);var ze=S(U(),1);function If(e){return V("MuiSelect",e)}var n3=H("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","nativeInput","error"]),hs=n3;var jr=S(z(),1),L1,a3=L(Fh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[{[`&.${hs.select}`]:t.select},{[`&.${hs.select}`]:t[o.variant]},{[`&.${hs.error}`]:t.error},{[`&.${hs.multiple}`]:t.multiple}]}})({[`&.${hs.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),i3=L($h,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.icon,o.open&&t.iconOpen]}})({}),s3=L("input",{shouldForwardProp:e=>Hp(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"}),l3=e=>{let{classes:t,variant:o,disabled:r,multiple:n,open:a,error:i}=e;return F({select:["select",o,r&&"disabled",n&&"multiple",i&&"error"],icon:["icon",a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},If,t)},u3=ze.forwardRef(function(t,o){let{"aria-describedby":r,"aria-label":n,autoFocus:a,autoWidth:i,children:s,className:l,defaultOpen:u,defaultValue:p,disabled:f,displayEmpty:d,error:c=!1,IconComponent:T,inputRef:v,labelId:x,MenuProps:m={},multiple:y,name:g,onBlur:b,onChange:P,onClose:C,onFocus:E,onKeyDown:O,onMouseDown:M,onOpen:N,open:A,readOnly:h,renderValue:D,required:R,SelectDisplayProps:w={},tabIndex:k,type:I,value:$,variant:de="standard",...ne}=t,[Q,ue]=ql({controlled:$,default:p,name:"Select"}),[Ge,Ne]=ql({controlled:A,default:u,name:"Select"}),ee=ze.useRef(null),ae=ze.useRef(null),[W,te]=ze.useState(null),{current:oe}=ze.useRef(A!=null),[be,Pt]=ze.useState(),[ce,Oe]=ze.useState(null),pt=Dt(o,v),qt=ze.useCallback(G=>{ae.current=G,G&&te(G)},[]),Ke=W?.parentNode;ze.useImperativeHandle(pt,()=>({focus:()=>{ae.current.focus()},node:ee.current,value:Q}),[Q]);let ft=W!==null&&Ge;ze.useEffect(()=>{if(!ft||!Ke||i||typeof ResizeObserver>"u")return;let G=new ResizeObserver(()=>{Pt(Ke.clientWidth)});return G.observe(Ke),()=>{G.disconnect()}},[ft,Ke,i]),ze.useEffect(()=>{u&&Ge&&W&&!oe&&(Pt(i?null:Ke.clientWidth),ae.current.focus())},[W,i]),ze.useEffect(()=>{a&&ae.current.focus()},[a]),ze.useEffect(()=>{if(!x)return;let G=Tn(ae.current).getElementById(x);if(G){let ve=()=>{getSelection().isCollapsed&&ae.current.focus()};return G.addEventListener("click",ve),()=>{G.removeEventListener("click",ve)}}},[x]);let Rt=(G,ve)=>{G?(Oe(Af(ve)),N&&N(ve)):(Oe(null),C&&C(ve)),oe||(Pt(i?null:Ke.clientWidth),Ne(G))},ye=G=>{M?.(G),G.button===0&&(G.preventDefault(),ae.current.focus(),Rt(!0,G))},po=G=>{Rt(!1,G)},No=ze.Children.toArray(s),dt=G=>{let ve=No.find(Ot=>Ot.props.value===G.target.value);ve!==void 0&&(ue(ve.props.value),P&&P(G,ve))},ia=G=>ve=>{let Ot;if(ve.currentTarget.hasAttribute("tabindex")){if(y){Ot=Array.isArray(Q)?Q.slice():[];let di=Q.indexOf(G.props.value);di===-1?Ot.push(G.props.value):Ot.splice(di,1)}else Ot=G.props.value;if(G.props.onClick&&G.props.onClick(ve),Q!==Ot&&(ue(Ot),P)){let di=ve.nativeEvent||ve,GT=new di.constructor(di.type,di);Object.defineProperty(GT,"target",{writable:!0,value:{value:Ot,name:g}}),P(GT,G)}y||Rt(!1,ve)}},pr=G=>{h||([" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),Rt(!0,G)),O?.(G))},Ar=G=>{!ft&&b&&(Object.defineProperty(G,"target",{writable:!0,value:{value:Q,name:g}}),b(G))};delete ne["aria-invalid"];let Le,Te,We=[],re=!1,fo=!1;(Da({value:Q})||d)&&(D?Le=D(Q):re=!0);let cn=No.map(G=>{if(!ze.isValidElement(G))return null;let ve;if(y){if(!Array.isArray(Q))throw new Error(gt(2));ve=Q.some(Ot=>yu(Ot,G.props.value)),ve&&re&&We.push(G.props.children)}else ve=yu(Q,G.props.value),ve&&re&&(Te=G.props.children);return ve&&(fo=!0),ze.cloneElement(G,{"aria-selected":ve?"true":"false",onClick:ia(G),onKeyUp:Ot=>{Ot.key===" "&&Ot.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(Ot)},role:"option",selected:ve,value:void 0,"data-value":G.props.value})});re&&(y?We.length===0?Le=null:Le=We.reduce((G,ve,Ot)=>(G.push(ve),Ot<We.length-1&&G.push(", "),G),[]):Le=Te);let fl=be;!i&&oe&&W&&(fl=Ke.clientWidth);let dl;typeof k<"u"?dl=k:dl=f?null:0;let Ye=w.id||(g?`mui-component-select-${g}`:void 0),fi={...t,variant:de,value:Q,open:ft,error:c},Fm=l3(fi),$T=typeof m.slotProps?.paper=="function"?m.slotProps.paper(fi):m.slotProps?.paper,zA=typeof m.slotProps?.list=="function"?m.slotProps.list(fi):m.slotProps?.list,qT=or(),kA=or();return(0,jr.jsxs)(ze.Fragment,{children:[(0,jr.jsx)(a3,{as:"div",ref:qt,tabIndex:dl,role:"combobox","aria-controls":ft?qT:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ft?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[x,Ye].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":R?"true":void 0,"aria-invalid":c?"true":void 0,onKeyDown:pr,onMouseDown:f||h?null:ye,onBlur:Ar,onFocus:E,...w,ownerState:fi,className:j(w.className,Fm.select,l),id:Ye,children:Mf(Le)?L1||(L1=(0,jr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):Le}),(0,jr.jsx)(s3,{"aria-invalid":c,value:Array.isArray(Q)?Q.join(","):Q,name:g,ref:ee,"aria-hidden":!0,onChange:dt,tabIndex:-1,disabled:f,className:Fm.nativeInput,autoFocus:a,required:R,...ne,id:ne.id??kA,ownerState:fi}),(0,jr.jsx)(i3,{as:T,className:Fm.icon,ownerState:fi}),(0,jr.jsx)(Uh,{value:ce,children:(0,jr.jsx)(D1,{id:`menu-${g||""}`,anchorEl:Ke,open:ft,onClose:po,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...m,slotProps:{...m.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:qT,...zA},paper:{...$T,style:{minWidth:fl,...$T?.style}}},children:cn})})]})}),I1=u3;var xu=S(z(),1),c3=e=>{let{classes:t}=e,r=F({root:["root"]},If,t);return{...t,...r}},Gh={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Be(e)&&e!=="variant"},p3=L(du,Gh)(""),f3=L(vu,Gh)(""),d3=L(pu,Gh)(""),j1=gs.forwardRef(function(t,o){let r=q({name:"MuiSelect",props:t}),{autoWidth:n=!1,children:a,classes:i={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:p=TS,id:f,input:d,inputProps:c,label:T,labelId:v,MenuProps:x,multiple:m=!1,native:y=!1,onClose:g,onOpen:b,open:P,renderValue:C,SelectDisplayProps:E,variant:O="outlined",...M}=r,N=y?z1:I1,A=Zt(),h=To({props:r,muiFormControl:A,states:["variant","error"]}),D=h.variant||O,R={...r,variant:D,classes:i},w=c3(R),{root:k,...I}=w,$=d||{standard:(0,xu.jsx)(p3,{ownerState:R}),outlined:(0,xu.jsx)(f3,{label:T,ownerState:R}),filled:(0,xu.jsx)(d3,{ownerState:R})}[D],de=Dt(o,Io($));return(0,xu.jsx)(gs.Fragment,{children:gs.cloneElement($,{inputComponent:N,inputProps:{children:a,error:h.error,IconComponent:p,variant:D,type:void 0,multiple:m,...y?{id:f}:{autoWidth:n,defaultOpen:l,displayEmpty:u,labelId:v,MenuProps:x,onClose:g,onOpen:b,open:P,renderValue:C,SelectDisplayProps:{id:f,...E}},...c,classes:c?xe(I,c.classes):I,...d?d.props.inputProps:{}},...(m&&y||u)&&D==="outlined"?{notched:!0}:{},ref:de,className:j($.props.className,s,w.root),...!d&&{variant:D},...M})})});j1.muiName="Select";var Kh=j1;var m3=Up({createStyledComponent:L("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>q({props:e,name:"MuiStack"})}),jf=m3;var V1=S(U(),1);function H1(e){return V("MuiTextField",e)}var vre=H("MuiTextField",["root"]);var ja=S(z(),1),y3={standard:du,filled:pu,outlined:vu},h3=e=>{let{classes:t}=e;return F({root:["root"]},H1,t)},g3=L(Sh,{name:"MuiTextField",slot:"Root"})({}),b3=V1.forwardRef(function(t,o){let r=q({props:t,name:"MuiTextField"}),{autoComplete:n,autoFocus:a=!1,children:i,className:s,color:l="primary",defaultValue:u,disabled:p=!1,error:f=!1,fullWidth:d=!1,helperText:c,id:T,inputRef:v,label:x,maxRows:m,minRows:y,multiline:g=!1,name:b,onBlur:P,onChange:C,onFocus:E,placeholder:O,required:M=!1,rows:N,select:A=!1,slots:h={},slotProps:D={},type:R,value:w,variant:k="outlined",...I}=r,$={...r,autoFocus:a,color:l,disabled:p,error:f,fullWidth:d,multiline:g,required:M,select:A,variant:k},de=h3($),ne=or(T),Q=c&&ne?`${ne}-helper-text`:void 0,ue=x&&ne?`${ne}-label`:void 0,Ge=y3[k],Ne={slots:h,slotProps:D},[ee,ae]=Ae("select",{elementType:Kh,externalForwardedProps:Ne,ownerState:$}),W=A&&ae.native,te={},oe=Ne.slotProps.inputLabel;k==="outlined"&&(oe&&typeof oe.shrink<"u"&&(te.notched=oe.shrink),te.label=x),A&&(W||(te.id=void 0),te["aria-describedby"]=void 0);let[be,Pt]=Ae("root",{elementType:g3,shouldForwardComponentProp:!0,externalForwardedProps:{...Ne,...I},ownerState:$,className:j(de.root,s),ref:o,additionalProps:{disabled:p,error:f,fullWidth:d,required:M,color:l,variant:k}}),[ce,Oe]=Ae("input",{elementType:Ge,externalForwardedProps:Ne,additionalProps:te,ownerState:$}),[pt,qt]=Ae("inputLabel",{elementType:wh,externalForwardedProps:Ne,ownerState:$}),[Ke,ft]=Ae("htmlInput",{elementType:"input",externalForwardedProps:Ne,ownerState:$}),[Rt,ye]=Ae("formHelperText",{elementType:Ph,externalForwardedProps:Ne,ownerState:$}),po=(0,ja.jsx)(ce,{"aria-describedby":Q,autoComplete:n,autoFocus:a,defaultValue:u,fullWidth:d,multiline:g,name:b,rows:N,maxRows:m,minRows:y,type:R,value:w,id:ne,inputRef:v,onBlur:P,onChange:C,onFocus:E,placeholder:O,inputProps:ft,slots:{input:h.htmlInput?Ke:void 0},...Oe});return(0,ja.jsxs)(be,{...Pt,children:[x!=null&&x!==""&&(0,ja.jsx)(pt,{htmlFor:A&&!W?void 0:ne,id:ue,...A&&!W&&{component:"div"},...qt,children:x}),A?(0,ja.jsx)(ee,{"aria-describedby":Q,id:ne,labelId:ue,value:w,input:po,...ae,children:i}):po,c&&(0,ja.jsx)(Rt,{id:Q,...ye,children:c})]})}),bs=b3;var X1=S(U(),1);var Hf=[{label:"Checkout",args:["review","--checkout-only"]},{label:"Address Comments",args:["review-pr-comments"]},{label:"Address Comments (auto)",args:["review-pr-comments","--auto"]},{label:"Fix conflicts (merge)",args:["fix-conflict"]},{label:"Fix conflicts (rebase)",args:["fix-conflict","--rebase"]}];var T3=new Set(["Checkout","Address Comments","Address Comments (auto)"]),F1=Hf.filter(({label:e})=>T3.has(e));var Yh=[{key:"force",label:"Force re-run",flag:"--force"},{key:"addressComments",label:"Address comments after",flag:"--address-comments"},{key:"announce",label:"Announce to Slack after",flag:"--announce"}],$1={force:!1,addressComments:!1,announce:!1};function q1(e){return Yh.filter(({key:t})=>e[t]).map(({flag:t})=>t)}function Vf(e){return{border:`1px solid ${e.palette.divider}`,boxShadow:e.tokens.elevation.overlay}}var G1=[{label:"Review",args:["review"]},{label:"Review & refine",args:["review","--refine"]},{label:"Review & apply",args:["review","--apply"]},{label:"Review & post",args:["review","--no-prompt","--submit"]},{label:"High-level review",args:["review","--high-level"]}];var Su=S(z(),1);function K1({value:e,onChange:t}){return Yh.map(({key:o,label:r})=>(0,Su.jsxs)(wn,{role:"menuitemcheckbox","aria-checked":e[o],onClick:()=>t({...e,[o]:!e[o]}),children:[(0,Su.jsx)(Sf,{children:(0,Su.jsx)(df,{size:"small",edge:"start",checked:e[o],tabIndex:-1,disableRipple:!0,sx:{p:0}})}),r]},o))}var Cu=S(z(),1);function Y1(e,t,o){return[...G1.map(({label:r,args:n})=>(0,Cu.jsx)(wn,{onClick:()=>o([...n,...q1(e)]),children:r},r)),(0,Cu.jsx)(cu,{},"modes-divider"),(0,Cu.jsx)(K1,{value:e,onChange:t},"toggles"),(0,Cu.jsx)(cu,{},"toggles-divider")]}var Eu=S(z(),1);function Q1({actionsOnly:e=!1,onPick:t,onClose:o}){let[r,n]=(0,X1.useState)($1);return(0,Eu.jsx)(Cn,{sx:Vf,children:(0,Eu.jsxs)(ms,{autoFocusItem:!0,dense:!0,"aria-label":"Start an assist session for this PR",onKeyDown:s=>{s.key==="Escape"&&(s.preventDefault(),o(!0))},onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||document.hasFocus()&&o(!1)},children:[!e&&Y1(r,n,t),(e?F1:Hf).map(({label:s,args:l})=>(0,Eu.jsx)(wn,{onClick:()=>t(l),children:s},s))]})})}var pC=S(U(),1);var aC=S(U(),1);var Z1=S(z(),1);function W1({value:e,onChange:t,onKeyDown:o,placeholder:r,error:n}){return(0,Z1.jsx)(bs,{autoFocus:!0,fullWidth:!0,multiline:!0,maxRows:6,size:"small",placeholder:r,value:e,onChange:a=>t(a.target.value),onKeyDown:o,error:n,slotProps:{htmlInput:{"aria-label":"Instructions for assist"}}})}var Xh=S(z(),1);function J1({labels:e,disabled:t,onClick:o}){return(0,Xh.jsx)(jf,{direction:"row",spacing:1,sx:{mt:1},children:e.map((r,n)=>(0,Xh.jsx)(us,{size:"small",variant:n===0?"contained":"outlined",disabled:t,onMouseDown:a=>a.preventDefault(),onClick:()=>o(n),children:r},r))})}var Ha=S(z(),1);function eC({error:e,busy:t}){return(0,Ha.jsxs)(Ha.Fragment,{children:[e&&(0,Ha.jsxs)(nu,{role:"alert",variant:"caption",color:"error",sx:{display:"block",mt:.5},children:["Not sent: ",e]}),(0,Ha.jsx)(nu,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:.5},children:t?"Sending\u2026":`Enter to ${e?"retry":"send"} \xB7 Shift+Enter for a new line \xB7 Esc to close`})]})}function tC(e,t){return o=>{o.currentTarget.contains(o.relatedTarget)||document.hasFocus()&&!e&&t(!1)}}function v3(e){return(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()==="c"}function oC(e,t,o){return r=>{if(e&&t&&v3(r)){r.preventDefault(),navigator.clipboard?.writeText(e);return}o(r)}}function rC(e,t){return o=>{o.key==="Escape"?(o.preventDefault(),e(!0)):o.key==="Enter"&&!o.shiftKey&&!o.nativeEvent.isComposing&&(o.preventDefault(),t())}}function nC({instructions:e,onSend:t,onClose:o,busy:r,keepOpen:n,keepDraftOnBlur:a,copyWhenEmpty:i}){let s=f=>{r||t(e,f)},l=oC(i,!e,rC(o,()=>s(0))),u=a&&e.trim()!=="",p=tC(n||r||u,o);return{send:s,onKeyDown:l,onBlur:p}}var Ts=S(z(),1);function iC({onSend:e,onClose:t,placeholder:o="Instructions (optional)",error:r,busy:n=!1,keepDraftOnBlur:a=!1,copyWhenEmpty:i,buttons:s,children:l}){let[u,p]=(0,aC.useState)(""),{send:f,onKeyDown:d,onBlur:c}=nC({instructions:u,onSend:e,onClose:t,busy:n,keepOpen:!!r,keepDraftOnBlur:a,copyWhenEmpty:i});return(0,Ts.jsxs)(Cn,{sx:T=>({...Vf(T),p:1.5}),onBlur:c,children:[(0,Ts.jsx)(W1,{value:u,onChange:p,onKeyDown:d,placeholder:o,error:!!r}),l,s&&(0,Ts.jsx)(J1,{labels:s,disabled:n,onClick:f}),(0,Ts.jsx)(eC,{error:r,busy:n})]})}var Pu=S(U(),1);function Qh(){return globalThis.browser?.storage?.local}var Wh="lastRepo",Zh={async load(){let t=(await Qh()?.get(Wh).catch(()=>{}))?.[Wh];return typeof t=="string"?t:void 0},save(e){Qh()?.set({[Wh]:e}).catch(()=>{})}};async function Ff(e){let t=pn();if(!t)return{ok:!1,message:"assist extension runtime unavailable"};try{return await t.sendMessage(e)??{ok:!1,message:"assist extension did not reply"}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}}function sC(){return Ff({type:"assist-clones"})}var Ru=S(z(),1);function lC({value:e,onChange:t}){let[o,r]=(0,Pu.useState)(),[n,a]=(0,Pu.useState)();return(0,Pu.useEffect)(()=>{let i=!0;return Promise.all([sC(),Zh.load()]).then(([s,l])=>{if(i){if(!s.ok)return a(s.message);r(s.clones),l&&s.clones.includes(l)&&t(l)}}),()=>{i=!1}},[t]),(0,Ru.jsxs)(bs,{select:!0,fullWidth:!0,size:"small",sx:{mt:1},value:e,onChange:i=>{Zh.save(i.target.value),t(i.target.value)},error:!!n,helperText:n,slotProps:{select:{native:!0},htmlInput:{"aria-label":"Repo for assist"}},children:[(0,Ru.jsx)("option",{value:"",children:o?"Pick a repo":"Loading repos\u2026"}),o?.map(i=>(0,Ru.jsx)("option",{value:i,children:i},i))]})}var x3=["position: fixed","right: 16px","bottom: 16px","z-index: 2147483647","max-width: 420px","padding: 8px 12px","border-radius: 6px","font: 14px/20px -apple-system, BlinkMacSystemFont, sans-serif","color: var(--fgColor-onEmphasis, #fff)","box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25)"].join(";"),uC={ok:"var(--bgColor-success-emphasis, #1f883d)",error:"var(--bgColor-danger-emphasis, #cf222e)"};function $f(e,t){let o=document.createElement("div");return o.setAttribute("data-assist-toast",""),o.setAttribute("role","status"),o.style.cssText=`${x3};background: ${t?uC.ok:uC.error}`,o.textContent=e,document.body.append(o),setTimeout(()=>o.remove(),t?4e3:8e3),o}var Jh=S(z(),1),cC=[{label:"Prompt"},{label:"Draft",mode:"draft"},{label:"Bug",mode:"bug"}];function fC({pickRepo:e,send:t,dismiss:o}){let[r,n]=(0,pC.useState)("");return(0,Jh.jsx)(iC,{buttons:cC.map(({label:a})=>a),onSend:(a,i)=>{if(e&&!r){$f("Pick a repo to start the assist session in",!1);return}o(!1);let{mode:s}=cC[i];t({instructions:a||void 0,...s&&{mode:s},...e&&{repo:r}})},onClose:o,children:e&&(0,Jh.jsx)(lC,{value:r,onChange:n})})}var eg=S(z(),1);function dC(e,{send:t,dismiss:o}){return e==="review"||e==="azure-devops-review"?(0,eg.jsx)(Q1,{actionsOnly:e==="azure-devops-review",onPick:r=>{o(!1),t({args:r})},onClose:o}):(0,eg.jsx)(fC,{pickRepo:e==="link",send:t,dismiss:o})}var sr="#0e1116",tg="#141820",qf="#1b202a",Gf="#e3e7ee",og="#8a93a3",Ou="#8b9cff",Kf="#5fd0a0",Yf="#f2b45a",Xf="#f27a7a",mC="#6cc8d8",yC={secondary:"rgba(255, 255, 255, 0.7)",hover:"rgba(255, 255, 255, 0.12)",active:"rgba(255, 255, 255, 0.16)",dot:"#ffb74d",dotRing:"rgba(0, 0, 0, 0.15)"},Va={dark:{color:{background:sr,surface:tg,raised:qf,line:"#262c37",lineSoft:"#1d222b",text:{primary:Gf,secondary:og,disabled:"#5c6473"},selected:"rgba(139, 156, 255, 0.14)",wash:{warning:"rgba(242, 180, 90, 0.09)",error:"rgba(242, 122, 122, 0.09)",accent:"rgba(139, 156, 255, 0.1)",check:"rgba(108, 200, 216, 0.09)"},well:sr,stripe:qf,codeWash:"rgba(255, 255, 255, 0.08)",overlay:{background:qf,text:Gf},scrim:"rgba(0, 0, 0, 0.5)",appBar:{background:tg,text:Gf},onAppBar:{...yC,secondary:og,level:{ok:Kf,warn:Yf,over:Xf}},statusBar:{background:tg,text:og,hoverText:Gf,secondary:"#5c6473",hover:qf,active:"transparent",dot:Ou,dotRing:"rgba(139, 156, 255, 0.14)",readyText:Ou,level:{ok:Kf,warn:Yf,over:Xf}},primary:{main:Ou,contrastText:sr},secondary:{main:"#c99bff",contrastText:sr},success:{main:Kf,contrastText:sr},warning:{main:Yf,contrastText:sr},error:{main:Xf,contrastText:sr},info:{main:"#6cb6ff",contrastText:sr},check:{main:mC,contrastText:sr}},terminal:{background:sr,foreground:"#d6dbe4",cursor:Ou,cursorAccent:sr,selectionBackground:"rgba(139, 156, 255, 0.28)",black:"#1b2029",red:Xf,green:Kf,yellow:Yf,blue:Ou,magenta:"#c99bff",cyan:mC,white:"#c3c9d4",brightBlack:"#5c6473",brightRed:"#ff9a9a",brightGreen:"#82e0b6",brightYellow:"#ffc97a",brightBlue:"#a9b6ff",brightMagenta:"#dcb8ff",brightCyan:"#8fdbe8",brightWhite:"#eef1f6"},elevation:{appBar:0,overlay:"0 14px 34px rgba(0, 0, 0, 0.45)",dialog:"0 30px 60px rgba(0, 0, 0, 0.5)",stuckHeader:"0 8px 8px -9px rgba(0, 0, 0, 0.8)"}},light:{color:{background:"#fff",surface:"#fff",raised:"rgba(0, 0, 0, 0.04)",line:"rgba(0, 0, 0, 0.12)",lineSoft:"rgba(0, 0, 0, 0.12)",text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},selected:"rgba(0, 0, 0, 0.08)",wash:{warning:"rgba(255, 167, 38, 0.09)",error:"rgba(244, 67, 54, 0.09)",accent:"rgba(25, 118, 210, 0.08)",check:"rgba(0, 131, 143, 0.08)"},well:"#f3f4f6",stripe:"rgba(0, 0, 0, 0.1)",codeWash:"rgba(0, 0, 0, 0.06)",overlay:{background:"rgba(97, 97, 97, 0.92)",text:"#fff"},onAppBar:{...yC,level:{ok:"#b9f6ca",warn:"#ffe57f",over:"#ffcdd2"}},primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"#fff"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20",contrastText:"#fff"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100",contrastText:"#fff"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828",contrastText:"#fff"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b",contrastText:"#fff"},check:{main:"#00838f",light:"#4fb3bf",dark:"#005662",contrastText:"#fff"},scrim:"rgba(15, 23, 42, 0.32)",statusBar:{background:"#f3f4f6",text:"rgba(0, 0, 0, 0.6)",hoverText:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.38)",hover:"rgba(0, 0, 0, 0.06)",active:"transparent",dot:"#1976d2",dotRing:"rgba(25, 118, 210, 0.16)",readyText:"#1976d2",level:{ok:"#2e7d32",warn:"#ed6c02",over:"#d32f2f"}}},terminal:{background:"#ffffff",foreground:"#333333",cursor:"#333333",cursorAccent:"#ffffff",selectionBackground:"#add6ff",black:"#000000",red:"#cd3131",green:"#107c10",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"},elevation:{appBar:0,overlay:"0 8px 24px rgba(15, 23, 42, 0.12)",dialog:"0 24px 48px rgba(15, 23, 42, 0.18)",stuckHeader:"0 6px 6px -7px rgba(0, 0, 0, 0.2)"}},font:{ui:'"Geist Variable", "Segoe UI", system-ui, sans-serif',mono:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace',terminal:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace'},type:{fontSize:14,terminalFontSize:13,scale:{caption:12,body2:14,body1:15,subtitle2:14,subtitle1:15,h6:16,h5:18,h4:24,button:14},button:{textTransform:"none",fontWeight:600}},radius:{sm:6,md:8},selection:{ringWidth:2,titleWeight:500},spacing:8,densities:{desktop:{target:30,bar:40,iconButton:{side:30,icon:18,smallSide:26,smallIcon:16},button:{minHeight:30,fontSize:13,paddingX:12},switch:{width:34,height:20,thumb:16},inputFontSize:13,filterSelectMinWidth:160,tabBar:{height:44,icon:20,label:10,badge:16,insetTrim:0}},touch:{target:48,bar:60,iconButton:{side:48,icon:30,smallSide:40,smallIcon:24},button:{minHeight:48,fontSize:17,paddingX:20},switch:{width:51,height:31,thumb:27},inputFontSize:16,filterSelectMinWidth:200,tabBar:{height:49,icon:26,label:11,badge:18,insetTrim:12}}}};function S3(e){let t=e.getAttribute("data-color-mode");return t==="light"||t==="dark"?t:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fa(e){let t=S3(e),o=e.getAttribute(t==="dark"?"data-dark-theme":"data-light-theme");return o?o.startsWith("dark")?"dark":"light":t}var C3=["data-color-mode","data-light-theme","data-dark-theme"];function Qf(e,t){let o=Fa(e),r=()=>{let i=Fa(e);i!==o&&(o=i,t(i))},n=new MutationObserver(r);n.observe(e,{attributeFilter:C3});let a=globalThis.matchMedia?.("(prefers-color-scheme: dark)");return a?.addEventListener?.("change",r),()=>{n.disconnect(),a?.removeEventListener?.("change",r)}}var hC="data-assist-send-style";function gC(e){let{color:t}=Va[e];return`
|
|
191
|
+
`),E=b.selectionStart===P;C&&E&&b.setSelectionRange(P,P),r&&r(g)},ref:f,rows:a,style:i,...l}),(0,au.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:c,tabIndex:-1,style:{...zD.shadow,...i,paddingTop:0,paddingBottom:0}})]})}),dh=UD;function To({props:e,states:t,muiFormControl:o}){return t.reduce((r,n)=>(r[n]=e[n],o&&typeof e[n]>"u"&&(r[n]=o[n]),r),{})}var lS=S(U(),1),LD=lS.createContext(void 0),is=LD;var uS=S(U(),1);function Zt(){return uS.useContext(is)}function cS(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Da(e,t=!1){return e&&(cS(e.value)&&e.value!==""||t&&cS(e.defaultValue)&&e.defaultValue!=="")}function pS(e){return e.startAdornment}function fS(e){return V("MuiInputBase",e)}var ID=H("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputTypeSearch"]),nr=ID;var _a=S(z(),1),dS,Ba=(e,t)=>{let{ownerState:o}=e;return[t.root,o.formControl&&t.formControl,o.startAdornment&&t.adornedStart,o.endAdornment&&t.adornedEnd,o.error&&t.error,o.size==="small"&&t.sizeSmall,o.multiline&&t.multiline,o.color&&t[`color${K(o.color)}`],o.fullWidth&&t.fullWidth,o.hiddenLabel&&t.hiddenLabel]},za=(e,t)=>{let{ownerState:o}=e;return[t.input,o.type==="search"&&t.inputTypeSearch]},jD=e=>{let{classes:t,color:o,disabled:r,error:n,endAdornment:a,focused:i,formControl:s,fullWidth:l,hiddenLabel:u,multiline:p,readOnly:f,size:d,startAdornment:c,type:T}=e,v={root:["root",`color${K(o)}`,r&&"disabled",n&&"error",l&&"fullWidth",i&&"focused",s&&"formControl",d&&d!=="medium"&&`size${K(d)}`,p&&"multiline",c&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",T==="search"&&"inputTypeSearch",f&&"readOnly"]};return F(v,fS,t)},ka=L("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ba})(X(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${nr.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:o})=>t.multiline&&o==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Ua=L("input",{name:"MuiInputBase",slot:"Input",overridesResolver:za})(X(({theme:e})=>{let t=e.palette.mode==="light",o={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},n=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${nr.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":n,"&:focus::-moz-placeholder":n,"&:focus::-ms-input-placeholder":n},[`&.${nr.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),mS=Ox({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),HD=Vt.forwardRef(function(t,o){let r=q({props:t,name:"MuiInputBase"}),{"aria-describedby":n,autoComplete:a,autoFocus:i,className:s,color:l,defaultValue:u,disabled:p,disableInjectingGlobalStyles:f,endAdornment:d,error:c,fullWidth:T=!1,id:v,inputComponent:x="input",inputProps:m={},inputRef:y,margin:g,maxRows:b,minRows:P,multiline:C=!1,name:E,onBlur:O,onChange:M,onClick:N,onFocus:A,onKeyDown:h,onKeyUp:D,placeholder:R,readOnly:w,renderSuffix:k,rows:I,size:$,slotProps:de={},slots:ne={},startAdornment:Q,type:ue="text",value:Ge,...Ne}=r,ee=m.value!=null?m.value:Ge,{current:ae}=Vt.useRef(ee!=null),W=Vt.useRef(),te=Vt.useCallback(re=>{},[]),oe=Dt(W,y,m.ref,te),[be,Pt]=Vt.useState(!1),ce=Zt(),Oe=To({props:r,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Oe.focused=ce?ce.focused:be,Vt.useEffect(()=>{!ce&&p&&be&&(Pt(!1),O&&O())},[ce,p,be,O]);let pt=ce&&ce.onFilled,qt=ce&&ce.onEmpty,Ke=Vt.useCallback(re=>{Da(re)?pt&&pt():qt&&qt()},[pt,qt]);Xi(()=>{ae&&Ke({value:ee})},[ee,Ke,ae]);let ft=re=>{A&&A(re),m.onFocus&&m.onFocus(re),ce&&ce.onFocus?ce.onFocus(re):Pt(!0)},Rt=re=>{O&&O(re),m.onBlur&&m.onBlur(re),ce&&ce.onBlur?ce.onBlur(re):Pt(!1)},ye=(re,...fo)=>{if(!ae){let cn=re.target||W.current;if(cn==null)throw new Error(gt(1));Ke({value:cn.value})}m.onChange&&m.onChange(re,...fo),M&&M(re,...fo)};Vt.useEffect(()=>{Ke(W.current)},[]);let po=re=>{W.current&&re.currentTarget===re.target&&W.current.focus(),N&&N(re)},No=x,dt=m;C&&No==="input"&&(I?dt={type:void 0,minRows:I,maxRows:I,...dt}:dt={type:void 0,maxRows:b,minRows:P,...dt},No=dh);let ia=re=>{Ke(re.animationName==="mui-auto-fill-cancel"?W.current:{value:"x"})};Vt.useEffect(()=>{ce&&ce.setAdornedStart(!!Q)},[ce,Q]);let pr={...r,color:Oe.color||"primary",disabled:Oe.disabled,endAdornment:d,error:Oe.error,focused:Oe.focused,formControl:ce,fullWidth:T,hiddenLabel:Oe.hiddenLabel,multiline:C,size:Oe.size,startAdornment:Q,type:ue},Ar=jD(pr),Le=ne.root||ka,Te=de.root||{},We=ne.input||Ua;return dt={...dt,...de.input},(0,_a.jsxs)(Vt.Fragment,{children:[!f&&typeof mS=="function"&&(dS||(dS=(0,_a.jsx)(mS,{}))),(0,_a.jsxs)(Le,{...Te,ref:o,onClick:po,...Ne,...!Sn(Le)&&{ownerState:{...pr,...Te.ownerState}},className:j(Ar.root,Te.className,s,w&&"MuiInputBase-readOnly"),children:[Q,(0,_a.jsx)(is.Provider,{value:null,children:(0,_a.jsx)(We,{"aria-invalid":Oe.error,"aria-describedby":n,autoComplete:a,autoFocus:i,defaultValue:u,disabled:Oe.disabled,id:v,onAnimationStart:ia,name:E,placeholder:R,readOnly:w,required:Oe.required,rows:I,value:ee,onKeyDown:h,onKeyUp:D,type:ue,...dt,...!Sn(We)&&{as:No,ownerState:{...pr,...dt.ownerState}},ref:oe,className:j(Ar.input,dt.className,w&&"MuiInputBase-readOnly"),onBlur:Rt,onChange:ye,onFocus:ft})}),d,k?k({...Oe,startAdornment:Q}):null]})]})}),jo=HD;function yS(e){return V("MuiInput",e)}var VD={...nr,...H("MuiInput",["root","underline","input"])},ss=VD;function hS(e){return V("MuiOutlinedInput",e)}var FD={...nr,...H("MuiOutlinedInput",["root","notchedOutline","input"])},ar=FD;function gS(e){return V("MuiFilledInput",e)}var $D={...nr,...H("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Rn=$D;var bS=S(z(),1),TS=it((0,bS.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var SS=S(U(),1);var ls=S(U(),1);var vS=S(z(),1),qD={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},GD={opacity:0,visibility:"hidden"},KD=ls.forwardRef(function(t,o){let r=gn(),n={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:i=!0,children:s,easing:l,in:u,onEnter:p,onEntered:f,onEntering:d,onExit:c,onExited:T,onExiting:v,style:x,timeout:m=n,...y}=t,g=ls.useRef(null),b=Dt(g,Io(s),o),P=oo(g,d),C=oo(g,(h,D)=>{ef(h);let R=rs({style:x,timeout:m,easing:l},{mode:"enter"});h.style.transition=r.transitions.create("opacity",R),p&&p(h,D)}),E=oo(g,f),O=oo(g,v),M=oo(g,h=>{let D=rs({style:x,timeout:m,easing:l},{mode:"exit"});h.style.transition=r.transitions.create("opacity",D),c&&c(h)}),N=oo(g,h=>{h.style.transition="",T&&T(h)});return(0,vS.jsx)(Ql,{appear:i,in:u,nodeRef:g,onEnter:C,onEntered:E,onEntering:P,onExit:M,onExited:N,onExiting:O,addEndListener:h=>{a&&a(g.current,h)},timeout:m,...y,children:(h,{ownerState:D,...R})=>{let w=tf(h,u,qD,GD,x,s.props.style);return ls.cloneElement(s,{style:w,ref:b,...R})}})}),mh=KD;function xS(e){return V("MuiBackdrop",e)}var RY=H("MuiBackdrop",["root","invisible"]);var yh=S(z(),1),YD=e=>{let{classes:t,invisible:o}=e;return F({root:["root",o&&"invisible"]},xS,t)},XD=L("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.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"}}]}),QD=SS.forwardRef(function(t,o){let r=q({props:t,name:"MuiBackdrop"}),{children:n,className:a,component:i="div",invisible:s=!1,open:l,slotProps:u={},slots:p={},transitionDuration:f,...d}=r,c={...r,component:i,invisible:s},T=YD(c),v={component:i,slots:p,slotProps:u},[x,m]=Ae("root",{elementType:XD,externalForwardedProps:v,className:j(T.root,a),ownerState:c}),[y,g]=Ae("transition",{elementType:mh,externalForwardedProps:v,ownerState:c});return(0,yh.jsx)(y,{in:l,timeout:f,...d,...g,children:(0,yh.jsx)(x,{...m,ref:o,children:n})})}),hh=QD;var WD=H("MuiBox",["root"]),CS=WD;var ZD=br(),JD=Nl({themeId:At,defaultTheme:ZD,defaultClassName:CS.root,generateClassName:Ii.generate}),_t=JD;var iu=S(U(),1);function ES(e){return V("MuiButton",e)}var e_=H("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),On=e_;var PS=S(U(),1),t_=PS.createContext({}),RS=t_;var OS=S(U(),1),o_=OS.createContext(void 0),AS=o_;var Tr=S(z(),1),r_=e=>{let{color:t,disableElevation:o,fullWidth:r,size:n,variant:a,loading:i,loadingPosition:s,classes:l}=e,u={root:["root",i&&"loading",a,`size${K(n)}`,`color${K(t)}`,o&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${K(s)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},p=F(u,ES,l);return{...l,...p}},wS=[{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}}}],n_=L(Lr,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[o.variant],t[`size${K(o.size)}`],o.color==="inherit"&&t.colorInherit,o.disableElevation&&t.disableElevation,o.fullWidth&&t.fullWidth,o.loading&&t.loading]}})(X(({theme:e})=>{let t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=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"},[`&.${On.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]},[`&.${On.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${On.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)",[`&.${On.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(ot()).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:o,"--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"},[`&.${On.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${On.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}),[`&.${On.loading}`]:{color:"transparent"}}}]}})),a_=L("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.startIcon,o.loading&&t.startIconLoadingStart]}})(({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}},...wS]})),i_=L("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.endIcon,o.loading&&t.endIconLoadingEnd]}})(({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}},...wS]})),s_=L("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}}]})),MS=L("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),l_=iu.forwardRef(function(t,o){let r=iu.useContext(RS),n=iu.useContext(AS),a=hr(r,t),i=q({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:p,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:c=!1,endIcon:T,focusVisibleClassName:v,fullWidth:x=!1,id:m,loading:y=null,loadingIndicator:g,loadingPosition:b="center",size:P="medium",startIcon:C,type:E,variant:O="text",...M}=i,N=Ra(m),A=g??(0,Tr.jsx)(ru,{"aria-labelledby":N,color:"inherit",size:16}),h={...i,color:l,component:u,disabled:f,disableElevation:d,disableFocusRipple:c,fullWidth:x,loading:y,loadingIndicator:A,loadingPosition:b,size:P,type:E,variant:O},D=r_(h),R=(C||y&&b==="start")&&(0,Tr.jsx)(a_,{className:D.startIcon,ownerState:h,children:C||(0,Tr.jsx)(MS,{className:D.loadingIconPlaceholder,ownerState:h})}),w=(T||y&&b==="end")&&(0,Tr.jsx)(i_,{className:D.endIcon,ownerState:h,children:T||(0,Tr.jsx)(MS,{className:D.loadingIconPlaceholder,ownerState:h})}),k=n||"",I=typeof y=="boolean"?(0,Tr.jsx)("span",{className:D.loadingWrapper,style:{display:"contents"},children:y&&(0,Tr.jsx)(s_,{className:D.loadingIndicator,ownerState:h,children:A})}):null;return(0,Tr.jsxs)(n_,{ownerState:h,className:j(r.className,D.root,p,k),component:u,disabled:f||y,focusRipple:!c,focusVisibleClassName:j(D.focusVisible,v),ref:o,internalNativeButton:!0,type:E,id:y?N:m,...M,classes:D,children:[R,b!=="end"&&I,s,b==="end"&&I,w]})}),us=l_;var su=S(U(),1);var DS=S(U(),1);function NS(e){return V("PrivateSwitchBase",e)}var EX=H("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var pf=S(z(),1),u_=e=>{let{classes:t,checked:o,disabled:r,edge:n}=e,a={root:["root",o&&"checked",r&&"disabled",n&&`edge${K(n)}`],input:["input"]};return F(a,NS,t)},c_=L(Lr,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),p_=L("input",{name:"MuiSwitchBase",shouldForwardProp:Be})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),f_=DS.forwardRef(function(t,o){let{autoFocus:r,checked:n,checkedIcon:a,defaultChecked:i,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:p,id:f,name:d,onBlur:c,onChange:T,onFocus:v,readOnly:x,required:m=!1,tabIndex:y,type:g,value:b,slots:P={},slotProps:C={},...E}=t,{nativeButton:O,...M}=E,[N,A]=ql({controlled:n,default:!!i,name:"SwitchBase",state:"checked"}),h=Zt(),D=ee=>{v&&v(ee),h&&h.onFocus&&h.onFocus(ee)},R=ee=>{c&&c(ee),h&&h.onBlur&&h.onBlur(ee)},w=ee=>{if(ee.nativeEvent.defaultPrevented||x)return;let ae=ee.target.checked;A(ae),T&&T(ee,ae)},k=s;h&&typeof k>"u"&&(k=h.disabled);let I=g==="checkbox"||g==="radio",$={...t,checked:N,disabled:k,disableFocusRipple:l,edge:u},de=u_($),ne={slots:P,slotProps:C},[Q,ue]=Ae("root",{ref:o,elementType:c_,className:de.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:"span",...M},getSlotProps:ee=>({...ee,onFocus:ae=>{ee.onFocus?.(ae),D(ae)},onBlur:ae=>{ee.onBlur?.(ae),R(ae)}}),ownerState:$,additionalProps:{centerRipple:!0,focusRipple:!l,role:void 0,tabIndex:null}}),[Ge,Ne]=Ae("input",{elementType:p_,className:de.input,externalForwardedProps:ne,getSlotProps:ee=>({...ee,onChange:ae=>{ee.onChange?.(ae),w(ae)}}),ownerState:$,additionalProps:{autoFocus:r,checked:n,defaultChecked:i,disabled:k,id:I?f:void 0,name:d,readOnly:x,required:m,tabIndex:y,type:g,...g==="checkbox"&&b===void 0?{}:{value:b}}});return(0,pf.jsxs)(Q,{...ue,children:[(0,pf.jsx)(Ge,{...Ne}),N?a:p]})}),_S=f_;var BS=S(z(),1),zS=it((0,BS.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");var kS=S(z(),1),US=it((0,kS.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");var LS=S(z(),1),IS=it((0,LS.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function jS(e){return V("MuiCheckbox",e)}var d_=H("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ff=d_;var lu=S(z(),1),m_=e=>{let{classes:t,indeterminate:o,color:r,size:n}=e,a={root:["root",o&&"indeterminate",`color${K(r)}`,`size${K(n)}`]},i=F(a,jS,t);return{...t,...i}},y_=L(_S,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,t[`size${K(o.size)}`],o.color!=="default"&&t[`color${K(o.color)}`]]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{[`&.${ff.checked}, &.${ff.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${ff.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),h_=(0,lu.jsx)(US,{}),g_=(0,lu.jsx)(zS,{}),b_=(0,lu.jsx)(IS,{}),T_=su.forwardRef(function(t,o){let r=q({props:t,name:"MuiCheckbox"}),{checkedIcon:n=h_,color:a="primary",icon:i=g_,indeterminate:s=!1,indeterminateIcon:l=b_,size:u="medium",disableRipple:p=!1,className:f,slots:d={},slotProps:c={},...T}=r,v=s?l:i,x=s?l:n,m={...r,disableRipple:p,color:a,indeterminate:s,size:u},y=m_(m),g=c.input,[b,P]=Ae("root",{ref:o,elementType:y_,className:j(y.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:c,...T},ownerState:m,additionalProps:{type:"checkbox",icon:su.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:su.cloneElement(x,{fontSize:x.props.fontSize??u}),disableRipple:p,slots:d,slotProps:{input:Wi(typeof g=="function"?g(m):g,{"data-indeterminate":s})}}});return(0,lu.jsx)(b,{...P,classes:y})}),df=T_;function cs(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function v_(e){let t=vt(e);return t.body===e?ko(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ps(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function HS(e){return parseFloat(ko(e).getComputedStyle(e).paddingRight)||0}function x_(e){let o=["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 o||r}function VS(e,t,o,r,n){let a=[t,o,...r];[].forEach.call(e.children,i=>{let s=!a.includes(i),l=!x_(i);s&&l&&ps(i,n)})}function gh(e,t){let o=-1;return e.some((r,n)=>t(r)?(o=n,!0):!1),o}function S_(e,t){let o=[],r=e.container;if(!t.disableScrollLock){if(v_(r)){let i=cs(ko(r));o.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HS(r)+i}px`;let s=vt(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{o.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${HS(l)+i}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=vt(r).body;else{let i=r.parentElement,s=ko(r);a=i?.nodeName==="HTML"&&s.getComputedStyle(i).overflowY==="scroll"?i:r}o.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{o.forEach(({value:a,el:i,property:s})=>{a?i.style.setProperty(s,a):i.style.removeProperty(s)})}}function C_(e){let t=[];return[].forEach.call(e.children,o=>{o.getAttribute("aria-hidden")==="true"&&t.push(o)}),t}var mf=class{constructor(){this.modals=[],this.containers=[]}add(t,o){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ps(t.modalRef,!1);let n=C_(o);VS(o,t.mount,t.modalRef,n,!0);let a=gh(this.containers,i=>i.container===o);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:o,restore:null,hiddenSiblings:n}),r)}mount(t,o){let r=gh(this.containers,a=>a.modals.includes(t)),n=this.containers[r];n.restore||(n.restore=S_(n,o))}remove(t,o=!0){let r=this.modals.indexOf(t);if(r===-1)return r;let n=gh(this.containers,i=>i.modals.includes(t)),a=this.containers[n];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ps(t.modalRef,o),VS(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(n,1);else{let i=a.modals[a.modals.length-1];i.modalRef&&ps(i.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};var hf=S(U(),1);var Bt=S(U(),1);var uu=S(z(),1),E_=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function P_(e){let 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 R_(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;let t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`),o=t(`[name="${e.name}"]:checked`);return o||(o=t(`[name="${e.name}"]`)),o!==e}function O_(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||R_(e))}function A_(e){let t=[],o=[];return Array.from(e.querySelectorAll(E_)).forEach((r,n)=>{let a=P_(r);a===-1||!O_(r)||(a===0?t.push(r):o.push({documentOrder:n,tabIndex:a,node:r}))}),o.sort((r,n)=>r.tabIndex===n.tabIndex?r.documentOrder-n.documentOrder:r.tabIndex-n.tabIndex).map(r=>r.node).concat(t)}function M_(){return!0}function w_(e){let{children:t,disableAutoFocus:o=!1,disableEnforceFocus:r=!1,disableRestoreFocus:n=!1,getTabbable:a=A_,isEnabled:i=M_,open:s}=e,l=Bt.useRef(!1),u=Bt.useRef(null),p=Bt.useRef(null),f=Bt.useRef(null),d=Bt.useRef(null),c=Bt.useRef(!1),T=Bt.useRef(null),v=xt(Io(t),T),x=Bt.useRef(null);Bt.useEffect(()=>{!s||!T.current||(c.current=!o)},[o,s]),Bt.useEffect(()=>{if(!s||!T.current)return;let g=vt(T.current),b=bn(g);return T.current.contains(b)||(T.current.hasAttribute("tabIndex")||T.current.setAttribute("tabIndex","-1"),c.current&&T.current.focus()),()=>{n||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),Bt.useEffect(()=>{if(!s||!T.current)return;let g=vt(T.current),b=E=>{if(x.current=E,r||!i()||E.key!=="Tab")return;bn(g)===T.current&&E.shiftKey&&(l.current=!0,p.current&&p.current.focus())},P=()=>{let E=T.current;if(E===null)return;let O=bn(g);if(!g.hasFocus()||!i()||l.current){l.current=!1;return}if(E.contains(O)||r&&O!==u.current&&O!==p.current)return;if(O!==d.current)d.current=null;else if(d.current!==null)return;if(!c.current)return;let M=[];if((O===u.current||O===p.current)&&(M=a(T.current)),M.length>0){let N=!!(x.current?.shiftKey&&x.current?.key==="Tab"),A=M[0],h=M[M.length-1];typeof A!="string"&&typeof h!="string"&&(N?h.focus():A.focus())}else E.focus()};g.addEventListener("focusin",P),g.addEventListener("keydown",b,!0);let C=setInterval(()=>{let E=bn(g);E&&E.tagName==="BODY"&&P()},50);return()=>{clearInterval(C),g.removeEventListener("focusin",P),g.removeEventListener("keydown",b,!0)}},[o,r,n,i,s,a]);let m=g=>{f.current===null&&(f.current=g.relatedTarget),c.current=!0,d.current=g.target;let b=t.props.onFocus;b&&b(g)},y=g=>{f.current===null&&(f.current=g.relatedTarget),c.current=!0};return(0,uu.jsxs)(Bt.Fragment,{children:[(0,uu.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),Bt.cloneElement(t,{ref:v,onFocus:m}),(0,uu.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:p,"data-testid":"sentinelEnd"})]})}var bh=w_;var ir=S(U(),1);function N_(e){return typeof e=="function"?e():e}function D_(e){return e?e.props.hasOwnProperty("in"):!1}var FS=()=>{},yf=new mf;function __(e){let{container:t,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:n,onTransitionExited:a,children:i,onClose:s,open:l,rootRef:u}=e,p=ir.useRef({}),f=ir.useRef(null),d=ir.useRef(null),c=xt(d,u),[T,v]=ir.useState(!l),x=D_(i),m=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(m=!1);let y=()=>vt(f.current),g=()=>(p.current.modalRef=d.current,p.current.mount=f.current,p.current),b=()=>{yf.mount(g(),{disableScrollLock:o}),d.current&&(d.current.scrollTop=0)},P=Uo(()=>{let R=N_(t)||y().body;yf.add(g(),R),d.current&&b()}),C=()=>yf.isTopModal(g()),E=Uo(R=>{f.current=R,R&&(l&&C()?b():d.current&&ps(d.current,m))}),O=ir.useCallback(()=>{yf.remove(g(),m)},[m]);ir.useEffect(()=>()=>{O()},[O]),ir.useEffect(()=>{l?P():(!x||!r)&&O()},[l,O,x,r,P]);let M=R=>w=>{R.onKeyDown?.(w),!(w.key!=="Escape"||w.which===229||!C())&&(w.stopPropagation(),s&&s(w,"escapeKeyDown"))},N=R=>w=>{R.onClick?.(w),w.target===w.currentTarget&&s&&s(w,"backdropClick")};return{getRootProps:(R={})=>{let w=eu(e);delete w.onTransitionEnter,delete w.onTransitionExited;let k={...w,...R};return{role:"presentation",...k,onKeyDown:M(k),ref:c}},getBackdropProps:(R={})=>{let w=R;return{"aria-hidden":!0,...w,onClick:N(w),open:l}},getTransitionProps:()=>{let R=()=>{v(!1),n&&n()},w=()=>{v(!0),a&&a(),r&&O()};return{onEnter:Fl(R,i?.props.onEnter??FS),onExited:Fl(w,i?.props.onExited??FS)}},rootRef:c,portalRef:E,isTopModal:C,exited:T,hasTransition:x}}var $S=__;function qS(e){return V("MuiModal",e)}var _Q=H("MuiModal",["root","hidden","backdrop"]);var fs=S(z(),1),B_=e=>{let{open:t,exited:o,classes:r}=e;return F({root:["root",!t&&o&&"hidden"],backdrop:["backdrop"]},qS,r)},z_=L("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,!o.open&&o.exited&&t.hidden]}})(X(({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"}}]}))),k_=L(hh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),U_=hf.forwardRef(function(t,o){let r=q({name:"MuiModal",props:t}),{classes:n,className:a,closeAfterTransition:i=!1,children:s,container:l,component:u,disableAutoFocus:p=!1,disableEnforceFocus:f=!1,disablePortal:d=!1,disableRestoreFocus:c=!1,disableScrollLock:T=!1,hideBackdrop:v=!1,keepMounted:x=!1,onClose:m,onTransitionEnter:y,onTransitionExited:g,open:b,slotProps:P={},slots:C={},theme:E,...O}=r,M={...r,closeAfterTransition:i,disableAutoFocus:p,disableEnforceFocus:f,disablePortal:d,disableRestoreFocus:c,disableScrollLock:T,hideBackdrop:v,keepMounted:x},{getRootProps:N,getBackdropProps:A,getTransitionProps:h,portalRef:D,isTopModal:R,exited:w,hasTransition:k}=$S({...M,rootRef:o}),I={...M,exited:w},$=B_(I),de={};if(s.props.tabIndex===void 0&&(de.tabIndex="-1"),k){let{onEnter:ee,onExited:ae}=h();de.onEnter=ee,de.onExited=ae}let ne={slots:C,slotProps:P},[Q,ue]=Ae("root",{ref:o,elementType:z_,externalForwardedProps:{...ne,...O,component:u},getSlotProps:N,ownerState:I,className:j(a,$?.root,!I.open&&I.exited&&$?.hidden)}),[Ge,Ne]=Ae("backdrop",{elementType:k_,externalForwardedProps:ne,shouldForwardComponentProp:!0,getSlotProps:ee=>A({...ee,onClick:ae=>{ee?.onClick&&ee.onClick(ae)}}),className:$?.backdrop,ownerState:I});return!x&&!b&&(!k||w)?null:(0,fs.jsx)(fh,{ref:D,container:l,disablePortal:d,children:(0,fs.jsxs)(Q,{...ue,children:[v?null:(0,fs.jsx)(Ge,{...Ne}),(0,fs.jsx)(bh,{disableEnforceFocus:f,disableAutoFocus:p,disableRestoreFocus:c,isEnabled:R,open:b,children:hf.cloneElement(s,de)})]})})}),Th=U_;var KS=S(U(),1);function GS(e){return V("MuiDivider",e)}var L_=H("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),gf=L_;var vh=S(z(),1),I_=e=>{let{absolute:t,children:o,classes:r,flexItem:n,orientation:a,textAlign:i,variant:s}=e;return F({root:["root",t&&"absolute",s,a==="vertical"&&"vertical",n&&"flexItem",o&&"withChildren",i==="right"&&a!=="vertical"&&"textAlignRight",i==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},GS,r)},j_=L("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.absolute&&t.absolute,t[o.variant],o.orientation==="vertical"&&t.vertical,o.flexItem&&t.flexItem,o.children&&t.withChildren,o.textAlign==="right"&&o.orientation!=="vertical"&&t.textAlignRight,o.textAlign==="left"&&o.orientation!=="vertical"&&t.textAlignLeft]}})(X(({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:{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%"}}}]}))),H_=L("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.wrapper,o.orientation==="vertical"&&t.wrapperVertical]}})(X(({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)`}}]}))),V_=KS.forwardRef(function(t,o){let r=q({props:t,name:"MuiDivider"}),{absolute:n=!1,children:a,className:i,orientation:s="horizontal",component:l=a||s==="vertical"?"div":"hr",flexItem:u=!1,role:p=l!=="hr"?"separator":void 0,textAlign:f="center",variant:d="fullWidth",...c}=r,T={...r,absolute:n,component:l,flexItem:u,orientation:s,role:p,textAlign:f,variant:d},v=I_(T);return(0,vh.jsx)(j_,{as:l,className:j(v.root,i),role:p,ref:o,ownerState:T,"aria-orientation":p==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...c,children:a?(0,vh.jsx)(H_,{className:v.wrapper,ownerState:T,children:a}):null})}),cu=V_;var YS=S(U(),1);var XS=S(z(),1),F_=e=>{let{classes:t,disableUnderline:o,startAdornment:r,endAdornment:n,size:a,hiddenLabel:i,multiline:s}=e,l={root:["root",!o&&"underline",r&&"adornedStart",n&&"adornedEnd",a==="small"&&`size${K(a)}`,i&&"hiddenLabel",s&&"multiline"],input:["input"]},u=F(l,gS,t);return{...t,...u}},$_=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[...Ba(e,t),!o.disableUnderline&&t.underline]}})(X(({theme:e})=>{let t=e.palette.mode==="light",o=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",n=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:n,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Rn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Rn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Rn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Rn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):o}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Rn.disabled}, .${Rn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Rn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ot()).map(([i])=>({props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:s})=>i.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),q_=L(Ua,{name:"MuiFilledInput",slot:"Input",overridesResolver:za})(X(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),QS=YS.forwardRef(function(t,o){let r=q({props:t,name:"MuiFilledInput"}),{disableUnderline:n=!1,fullWidth:a=!1,hiddenLabel:i,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:p={},type:f="text",...d}=r,c={...r,disableUnderline:n,fullWidth:a,inputComponent:s,multiline:l,type:f},T=F_(r),v={root:{ownerState:c},input:{ownerState:c}},x=u?xe(v,u):v,m=p.root??$_,y=p.input??q_;return(0,XS.jsx)(jo,{slots:{root:m,input:y},slotProps:x,fullWidth:a,inputComponent:s,multiline:l,ref:o,type:f,...d,classes:T})});QS.muiName="Input";var pu=QS;var Ft=S(U(),1);function WS(e){return V("MuiFormControl",e)}var OW=H("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var xh=S(z(),1),G_=e=>{let{classes:t,margin:o,fullWidth:r}=e,n={root:["root",o!=="none"&&`margin${K(o)}`,r&&"fullWidth"]};return F(n,WS,t)},K_=L("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[`margin${K(o.margin)}`],o.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Y_=Ft.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormControl"}),{children:n,className:a,color:i="primary",component:s="div",disabled:l=!1,error:u=!1,focused:p,fullWidth:f=!1,hiddenLabel:d=!1,margin:c="none",required:T=!1,size:v="medium",variant:x="outlined",...m}=r,y={...r,color:i,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:d,margin:c,required:T,size:v,variant:x},g=G_(y),[b,P]=Ft.useState(()=>{let k=!1;return n&&Ft.Children.forEach(n,I=>{if(!Gp(I,["Input","Select"]))return;let $=Gp(I,["Select"])?I.props.input:I;$&&pS($.props)&&(k=!0)}),k}),[C,E]=Ft.useState(()=>{let k=!1;return n&&Ft.Children.forEach(n,I=>{Gp(I,["Input","Select"])&&(Da(I.props,!0)||Da(I.props.inputProps,!0))&&(k=!0)}),k}),[O,M]=Ft.useState(!1);l&&O&&M(!1);let N=p!==void 0&&!l?p:O,A,h=Ft.useRef(!1),D=Ft.useCallback(()=>{E(!0)},[]),R=Ft.useCallback(()=>{E(!1)},[]),w=Ft.useMemo(()=>({adornedStart:b,setAdornedStart:P,color:i,disabled:l,error:u,filled:C,focused:N,fullWidth:f,hiddenLabel:d,size:v,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:R,onFilled:D,registerEffect:A,required:T,variant:x}),[b,i,l,u,C,N,f,d,A,R,D,T,v,x]);return(0,xh.jsx)(is.Provider,{value:w,children:(0,xh.jsx)(K_,{as:s,ownerState:y,className:j(g.root,a),ref:o,...m,children:n})})}),Sh=Y_;var e1=S(U(),1);function ZS(e){return V("MuiFormHelperText",e)}var X_=H("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Ch=X_;var Eh=S(z(),1),JS,Q_=e=>{let{classes:t,contained:o,size:r,disabled:n,error:a,filled:i,focused:s,required:l}=e,u={root:["root",n&&"disabled",a&&"error",r&&`size${K(r)}`,o&&"contained",s&&"focused",i&&"filled",l&&"required"]};return F(u,ZS,t)},W_=L("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.size&&t[`size${K(o.size)}`],o.contained&&t.contained,o.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Ch.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ch.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Z_=e1.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormHelperText"}),{children:n,className:a,component:i="p",disabled:s,error:l,filled:u,focused:p,margin:f,required:d,variant:c,...T}=r,v=Zt(),x=To({props:r,muiFormControl:v,states:["variant","size","disabled","error","filled","focused","required"]}),m={...r,component:i,contained:x.variant==="filled"||x.variant==="outlined",variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required};delete m.ownerState;let y=Q_(m);return(0,Eh.jsx)(W_,{as:i,className:j(y.root,a),ref:o,...T,ownerState:m,children:n===" "?JS||(JS=(0,Eh.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):n})}),Ph=Z_;var o1=S(U(),1);function t1(e){return V("MuiFormLabel",e)}var J_=H("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),An=J_;var Rh=S(z(),1),eB=e=>{let{classes:t,color:o,focused:r,disabled:n,error:a,filled:i,required:s}=e,l={root:["root",`color${K(o)}`,n&&"disabled",a&&"error",i&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return F(l,t1,t)},tB=L("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.color==="secondary"&&t.colorSecondary,o.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(ot()).map(([t])=>({props:{color:t},style:{[`&.${An.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${An.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${An.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),oB=L("span",{name:"MuiFormLabel",slot:"Asterisk"})(X(({theme:e})=>({[`&.${An.error}`]:{color:(e.vars||e).palette.error.main}}))),rB=o1.forwardRef(function(t,o){let r=q({props:t,name:"MuiFormLabel"}),{children:n,className:a,color:i,component:s="label",disabled:l,error:u,filled:p,focused:f,required:d,...c}=r,T=Zt(),v=To({props:r,muiFormControl:T,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:v.color||"primary",component:s,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required},m=eB(x);return(0,Rh.jsxs)(tB,{as:s,ownerState:x,className:j(m.root,a),ref:o,...c,children:[n,v.required&&(0,Rh.jsxs)(oB,{ownerState:x,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]})}),Oh=rB;var La=S(U(),1);var r1=S(z(),1);function fu(e){return`scale(${e}, ${e**2})`}var nB={entering:{opacity:1,transform:fu(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:fu(.75)},exited:{opacity:0,transform:fu(.75)}},aB={opacity:0,transform:fu(.75),visibility:"hidden"},Ah=La.forwardRef(function(t,o){let{addEndListener:r,appear:n=!0,children:a,easing:i,in:s,onEnter:l,onEntered:u,onEntering:p,onExit:f,onExited:d,onExiting:c,style:T,timeout:v="auto",...x}=t,m=os(),y=La.useRef(),g=gn(),b=La.useRef(null),P=Dt(b,Io(a),o),C=oo(b,p),E=oo(b,(D,R)=>{ef(D);let{duration:w,delay:k,easing:I}=rs({style:T,timeout:v,easing:i},{mode:"enter"}),$;v==="auto"?($=g.transitions.getAutoHeightDuration(D.clientHeight),y.current=$):$=w,D.style.transition=[g.transitions.create("opacity",{duration:$,delay:k}),g.transitions.create("transform",{duration:$*.666,delay:k,easing:I})].join(","),l&&l(D,R)}),O=oo(b,u),M=oo(b,c),N=oo(b,D=>{let{duration:R,delay:w,easing:k}=rs({style:T,timeout:v,easing:i},{mode:"exit"}),I;v==="auto"?(I=g.transitions.getAutoHeightDuration(D.clientHeight),y.current=I):I=R,D.style.transition=[g.transitions.create("opacity",{duration:I,delay:w}),g.transitions.create("transform",{duration:I*.666,delay:w||I*.333,easing:k})].join(","),D.style.opacity=0,D.style.transform=fu(.75),f&&f(D)}),A=oo(b,D=>{D.style.transition="",d&&d(D)});return(0,r1.jsx)(Ql,{appear:n,in:s,nodeRef:b,onEnter:E,onEntered:O,onEntering:C,onExit:N,onExited:A,onExiting:M,addEndListener:D=>{v==="auto"&&m.start(y.current||0,D),r&&r(b.current,D)},timeout:v==="auto"?null:v,...x,children:(D,{ownerState:R,...w})=>{let k=tf(D,s,nB,aB,T,a.props.style);return La.cloneElement(a,{style:k,ref:P,...w})}})});Ah&&(Ah.muiSupportAuto=!0);var Mh=Ah;var i1=S(U(),1);function n1(e){return V("MuiInputLabel",e)}var iB=H("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]),a1=iB;var s1=S(z(),1),sB=e=>{let{classes:t,disableUnderline:o}=e,n=F({root:["root",!o&&"underline"],input:["input"]},yS,t);return{...t,...n}},lB=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[...Ba(e,t),!o.disableUnderline&&t.underline]}})(X(({theme:e})=>{let o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(o=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{[`label + &, .${a1.root} + &`]:{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ss.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ss.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${o}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ss.disabled}, .${ss.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${o}`}},[`&.${ss.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ot()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),uB=L(Ua,{name:"MuiInput",slot:"Input",overridesResolver:za})({}),l1=i1.forwardRef(function(t,o){let r=q({props:t,name:"MuiInput"}),{disableUnderline:n=!1,fullWidth:a=!1,inputComponent:i="input",multiline:s=!1,slotProps:l,slots:u={},type:p="text",...f}=r,d=sB(r),T={root:{ownerState:{disableUnderline:n}}},v=l?xe(l,T):T,x=u.root??lB,m=u.input??uB;return(0,s1.jsx)(jo,{slots:{root:x,input:m},slotProps:v,fullWidth:a,inputComponent:i,multiline:s,ref:o,type:p,...f,classes:d})});l1.muiName="Input";var du=l1;var u1=S(U(),1);var c1=S(z(),1),cB=e=>{let{classes:t,formControl:o,size:r,shrink:n,disableAnimation:a,variant:i,required:s}=e,l={root:["root",o&&"formControl",!a&&"animated",n&&"shrink",r&&r!=="medium"&&`size${K(r)}`,i],asterisk:[s&&"asterisk"]},u=F(l,n1,t);return{...t,...u}},pB=L(Oh,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[{[`& .${An.asterisk}`]:t.asterisk},t.root,o.formControl&&t.formControl,o.size==="small"&&t.sizeSmall,o.shrink&&t.shrink,!o.disableAnimation&&t.animated,o.focused&&t.focused,t[o.variant]]}})(X(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:o})=>t==="filled"&&o.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:o,size:r})=>t==="filled"&&o.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:o})=>t==="outlined"&&o.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),fB=u1.forwardRef(function(t,o){let r=q({name:"MuiInputLabel",props:t}),{disableAnimation:n=!1,margin:a,shrink:i,variant:s,className:l,...u}=r,p=Zt(),f=i;typeof f>"u"&&p&&(f=p.filled||p.focused||p.adornedStart);let d=To({props:r,muiFormControl:p,states:["size","variant","required","focused"]}),c={...r,disableAnimation:n,formControl:p,shrink:f,size:d.size,variant:d.variant,required:d.required,focused:d.focused},T=cB(c);return(0,c1.jsx)(pB,{"data-shrink":f,ref:o,className:j(T.root,l),...u,ownerState:c,classes:T})}),wh=fB;var bf=S(U(),1);var p1=S(U(),1),dB=p1.createContext({}),Ia=dB;function f1(e){return V("MuiList",e)}var mJ=H("MuiList",["root","padding","dense","subheader"]);var Tf=S(z(),1),mB=e=>{let{classes:t,disablePadding:o,dense:r,subheader:n}=e;return F({root:["root",!o&&"padding",r&&"dense",n&&"subheader"]},f1,t)},yB=L("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,!o.disablePadding&&t.padding,o.dense&&t.dense,o.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}}]}),hB=bf.forwardRef(function(t,o){let r=q({props:t,name:"MuiList"}),{children:n,className:a,component:i="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...p}=r,f=bf.useMemo(()=>({dense:s}),[s]),d={...r,component:i,dense:s,disablePadding:l},c=mB(d);return(0,Tf.jsx)(Ia.Provider,{value:f,children:(0,Tf.jsxs)(yB,{as:i,className:j(c.root,a),ref:o,ownerState:d,...p,children:[u,n]})})}),Nh=hB;var xf=S(U(),1);function d1(e){return V("MuiListItemIcon",e)}var gB=H("MuiListItemIcon",["root","alignItemsFlexStart"]),vf=gB;var m1=S(z(),1),bB=e=>{let{alignItems:t,classes:o}=e;return F({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},d1,o)},TB=L("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(X(({theme:e})=>({minWidth:e.spacing(4.5),color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),vB=xf.forwardRef(function(t,o){let r=q({props:t,name:"MuiListItemIcon"}),{className:n,...a}=r,i=xf.useContext(Ia),s={...r,alignItems:i.alignItems},l=bB(s);return(0,m1.jsx)(TB,{className:j(l.root,n),ownerState:s,ref:o,...a})}),Sf=vB;var xB=H("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Cf=xB;var zf=S(U(),1);var ro=S(U(),1);var Ef=S(U(),1),Pf=Ef.createContext(void 0);function Dh(){let e=Ef.useContext(Pf);if(e===void 0)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}var Ze=S(U(),1);var SB=Object.is;function Rf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let o=0,r=0;for(let n in e)if(o+=1,!SB(e[n],t[n])||!(n in t))return!1;for(let n in t)r+=1;return o===r}var CB=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function zh(e){let{activeItemId:t,getDefaultActiveItemId:o,orientation:r,isRtl:n=!1,isItemFocusable:a=ds,wrap:i=!0}=e,[s,l]=Ze.useState(t),u=Ze.useRef(t),p=s;t!==u.current&&(u.current=t,t!==void 0&&t!==s&&(p=t,l(t)));let f=Ze.useRef(null),d=Ze.useRef(new Map),[c,T]=Ze.useState(0),v=Ze.useMemo(()=>_h(d.current),[c]),x=y1(p,v,a,o),m=Ze.useRef(x);m.current=x;let y=Ze.useCallback(()=>{let A=_h(d.current),h=y1(m.current,A,a,o);return v1(A,h)},[o,a]),g=Ze.useCallback(()=>d.current,[]),b=Uo(A=>{let h=d.current.get(A.id);Rf(h??null,A)||(d.current.set(A.id,A),T(D=>D+1))}),P=Uo(A=>{d.current.delete(A)&&T(h=>h+1)}),C=Uo(A=>{l(A)}),E=Ze.useCallback(A=>m.current===A,[]),O=Ze.useCallback((A,h,D,R)=>{let w=Of(d.current),k=b1(w,A,h,D,R??a);return k?(k.element?.focus(),l(k.id),k):null},[a]),M=Ze.useCallback(A=>({onFocus:R=>{let w=Of(d.current),k=S1(w,R.target);k!==-1&&l(w[k].id)},onKeyDown:R=>{if(R.altKey||R.shiftKey||R.ctrlKey||R.metaKey||!CB.includes(R.key))return;let w=r==="horizontal"?"ArrowLeft":"ArrowUp",k=r==="horizontal"?"ArrowRight":"ArrowDown";r==="horizontal"&&n&&(w="ArrowRight",k="ArrowLeft");let I=Of(d.current),$=Ea(vt(f.current)),de=$===f.current,ne=h1(I,$,m.current),Q="next";switch(R.key){case w:Q="previous",R.preventDefault(),de&&(ne=I.length);break;case k:R.preventDefault(),de&&(ne=-1);break;case"Home":R.preventDefault(),ne=-1;break;case"End":R.preventDefault(),Q="previous",ne=I.length;break;default:return}O(ne,Q,i)},ref:OB(A,R=>{f.current=R})}),[O,n,r,i]),N=Ze.useCallback(A=>{let h=Of(d.current),D=Ea(vt(f.current)),w=D===f.current?-1:h1(h,D,m.current);return O(w,"next",!0,A)?.id??null},[O]);return Ze.useMemo(()=>({activeItemId:x,focusNext:N,getActiveItem:y,getContainerProps:M,getItemMap:g,isItemActive:E,registerItem:b,setActiveItemId:C,unregisterItem:P}),[x,N,y,M,g,E,b,C,P])}function kh(e){let t=Dh(),{activeItemId:o,registerItem:r,unregisterItem:n}=t,a=Ze.useRef(null),i=Ze.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),s=Ze.useRef(i);s.current=i;let l=Ze.useCallback(p=>{if(a.current=p,p==null){queueMicrotask(()=>{a.current==null&&n(e.id)});return}r({...s.current,element:p})},[e.id,r,n]),u=xt(e.ref,l);return Tt(()=>{a.current&&r({...i,element:a.current})},[i,r]),Tt(()=>{let p=e.id;return()=>{n(p)}},[e.id,n]),{ref:u,tabIndex:o===e.id?0:-1}}function y1(e,t,o,r){return e!=null?EB(e,t,o):PB(t,o,r)}function EB(e,t,o){let r=x1(t,e);return r===-1?T1(t,o):o(t[r])?t[r].id:b1(t,r,"next",!1,o)?.id??null}function PB(e,t,o){let r=o?.(e);if(r!=null){let n=v1(e,r);if(n&&t(n))return n.id}return T1(e,t)}function h1(e,t,o){if(t){let r=S1(e,t);if(r!==-1)return r}return x1(e,o)}function b1(e,t,o,r,n){let a=e.length-1;if(a===-1)return null;let i=!1,s=g1(t,a,o,r),l=s;for(;s!==-1;){if(s===l){if(i)return null;i=!0}let u=e[s];if(!u||!n(u))s=g1(s,a,o,r);else return u}return null}function T1(e,t){return e.find(o=>t(o))?.id??null}function v1(e,t){return t==null?null:e.find(o=>o.id===t)??null}function x1(e,t){return t==null?-1:e.findIndex(o=>o.id===t)}function S1(e,t){return t?e.findIndex(o=>o.element===t||o.element?.contains(t)):-1}function _h(e){let t=Array.from(e.values());if(t.every(n=>n.element==null))return t;let o=t.filter(Bh).sort((n,a)=>RB(n.element,a.element)),r=t.filter(n=>!Bh(n));return[...o,...r]}function Of(e){return _h(e).filter(Bh)}function g1(e,t,o,r=!0){return o==="next"?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function ds(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute("disabled")&&e.element.getAttribute("aria-disabled")!=="true"&&e.element.hasAttribute("tabindex"):!1}function Bh(e){return e.element!=null&&e.element.isConnected}function RB(e,t){if(e===t)return 0;let o=e.compareDocumentPosition(t);return o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS?1:0}function OB(...e){return t=>{e.forEach(o=>{Pa(o??null,t)})}}var C1=cs;function mu(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t==="keyboard"})}catch{e.focus()}}function Af(e){return e?e.type==="mousedown"||e.type==="pointerdown"||e.type==="touchstart"?"pointer":e.type==="keydown"||e.type==="click"&&e.detail===0?"keyboard":null:null}function Mf(e){return e==null||typeof e=="string"&&!e.trim()}function yu(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}var wf=S(U(),1),E1=wf.createContext(null);function hu(){return wf.useContext(E1)}var Uh=E1.Provider;var Nf=S(U(),1),Lh=Nf.createContext(void 0);function P1(){let e=Nf.useContext(Lh);if(e===void 0)throw new Error("MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.");return e}var Df=S(z(),1);function AB(e){let t=e?.element??e;if(!t)return"";if(e?.textValue!==void 0)return e.textValue;let o=t.innerText;return o===void 0&&(o=t.textContent),o??""}function R1(e,t){if(t===void 0)return!0;let o=AB(e);return o=o.trim().toLowerCase(),o.length===0?!1:t.repeating?o[0]===t.keys[0]:o.startsWith(t.keys.join(""))}function MB(e,t){return R1(e,t)?ds(e):!1}function wB(e,t){mu(e,t)}var NB=ro.forwardRef(function(t,o){let{actions:r,autoFocus:n=!1,autoFocusItem:a=!1,children:i,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:p,variant:f="selectedMenu",...d}=t,c=ro.useRef(null),T=ro.useRef(!1),[v,x]=ro.useState(!1),m=hu(),y=ro.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),g=ro.useCallback(w=>f==="selectedMenu"?w.find(k=>k.selected&&ds(k))?.id??w.find(k=>ds(k))?.id??null:w.find(k=>ds(k))?.id??null,[f]),b=zh({activeItemId:void 0,getDefaultActiveItemId:g,orientation:"vertical",wrap:!u}),{activeItemId:P,focusNext:C,getActiveItem:E,getContainerProps:O,getItemMap:M}=b,N=vn((w=!1)=>{if(!c.current||!w&&T.current)return null;if(a){let k=E();if(k?.element){let I=Array.from(M().values()).some(de=>de.selected),$=f==="menu"&&I&&!k.selected&&m==null;return x($),wB(k.element,m),T.current=!0,k.element}return n?(x(!1),c.current.focus(),c.current):null}return n?(x(!1),c.current.focus(),T.current=!0,c.current):(x(!1),null)});Xi(()=>{if(!n&&!a){T.current=!1,x(!1);return}N()},[P,a,n,N]),ro.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:k})=>{let I=!c.current.style.width;if(w.clientHeight<c.current.clientHeight&&I){let $=`${C1($l(w))}px`;c.current.style[k==="rtl"?"paddingLeft":"paddingRight"]=$,c.current.style.width=`calc(100% + ${$})`}return c.current},focusInitialTarget:()=>{if(!c.current)return null;let w=bn(Tn(c.current));return w&&c.current.contains(w)?w:N(!0)}}),[N]);let A=O(),h=Dt(c,A.ref,o),D=ro.useMemo(()=>({itemsFocusableWhenDisabled:l,suppressInitialFocusVisible:v,variant:f}),[l,v,f]),R=vn(w=>{if(v&&x(!1),(w.ctrlKey||w.metaKey||w.altKey)&&p){p(w);return}if(A.onKeyDown(w),w.key.length===1){let I=y.current,$=w.key.toLowerCase(),de=performance.now();I.keys.length>0&&(de-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&$!==I.keys[0]&&(I.repeating=!1)),I.lastTime=de,I.keys.push($);let ne=bn(Tn(c.current)),Q=ne&&!I.repeating&&R1(ne,I);I.previousKeyMatched&&(Q||C(ue=>MB(ue,I))!=null)?w.preventDefault():I.previousKeyMatched=!1}p&&p(w)});return(0,Df.jsx)(Nh,{role:"menu",ref:h,className:s,onKeyDown:R,onFocus:A.onFocus,tabIndex:-1,...d,children:(0,Df.jsx)(Lh.Provider,{value:D,children:(0,Df.jsx)(Pf.Provider,{value:b,children:i})})})}),ms=NB;var zt=S(U(),1);function O1(e){return V("MuiPopover",e)}var Lee=H("MuiPopover",["root","paper"]);var Bf=S(z(),1);function A1(e,t){let o=0;return typeof t=="number"?o=t:t==="center"?o=e.height/2:t==="bottom"&&(o=e.height),o}function M1(e,t){let o=0;return typeof t=="number"?o=t:t==="center"?o=e.width/2:t==="right"&&(o=e.width),o}function w1(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function _f(e){return typeof e=="function"?e():e}var DB=e=>{let{classes:t}=e;return F({root:["root"],paper:["paper"]},O1,t)},_B=L(Th,{name:"MuiPopover",slot:"Root"})({}),Ih=L(Cn,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),BB=zt.forwardRef(function(t,o){let r=q({props:t,name:"MuiPopover"}),{action:n,anchorEl:a,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:p,container:f,disableAutoFocus:d=!1,elevation:c=8,marginThreshold:T=16,open:v,slots:x={},slotProps:m={},transformOrigin:y={vertical:"top",horizontal:"left"},transitionDuration:g="auto",disableScrollLock:b=!1,...P}=r,C=zt.useRef(),E={...r,anchorOrigin:i,anchorReference:l,elevation:c,marginThreshold:T,transformOrigin:y,transitionDuration:g},O=DB(E),M=zt.useCallback(()=>{if(l==="anchorPosition")return s;let te=_f(a),be=(te&&te.nodeType===1?te:Tn(C.current).body).getBoundingClientRect();return{top:be.top+A1(be,i.vertical),left:be.left+M1(be,i.horizontal)}},[a,i.horizontal,i.vertical,s,l]),N=zt.useCallback(te=>({vertical:A1(te,y.vertical),horizontal:M1(te,y.horizontal)}),[y.horizontal,y.vertical]),A=zt.useCallback(te=>{let oe={width:te.offsetWidth,height:te.offsetHeight},be=N(oe);if(l==="none")return{top:null,left:null,transformOrigin:w1(be)};let Pt=M(),ce=Pt.top-be.vertical,Oe=Pt.left-be.horizontal,pt=ce+oe.height,qt=Oe+oe.width,Ke=$l(_f(a)),ft=Ke.innerHeight-T,Rt=Ke.innerWidth-T;if(T!=null&&ce<T){let ye=ce-T;ce-=ye,be.vertical+=ye}else if(T!=null&&pt>ft){let ye=pt-ft;ce-=ye,be.vertical+=ye}if(T!=null&&Oe<T){let ye=Oe-T;Oe-=ye,be.horizontal+=ye}else if(qt>Rt){let ye=qt-Rt;Oe-=ye,be.horizontal+=ye}return{top:`${Math.round(ce)}px`,left:`${Math.round(Oe)}px`,transformOrigin:w1(be)}},[a,l,M,N,T]),[h,D]=zt.useState(v),R=zt.useCallback(()=>{let te=C.current;if(!te)return;let oe=A(te);oe.top!=null&&te.style.setProperty("top",oe.top),oe.left!=null&&(te.style.left=oe.left),te.style.transformOrigin=oe.transformOrigin,D(!0)},[A]);zt.useEffect(()=>(b&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[a,b,R]);let w=()=>{R()},k=()=>{D(!1)};zt.useEffect(()=>{v&&R()}),zt.useImperativeHandle(n,()=>v?{updatePosition:()=>{R()}}:null,[v,R]),zt.useEffect(()=>{if(!v)return;let te=Nx(()=>{R()}),oe=$l(_f(a));return oe.addEventListener("resize",te),()=>{te.clear(),oe.removeEventListener("resize",te)}},[a,v,R]);let I=g,$={slots:x,slotProps:m},[de,ne]=Ae("transition",{elementType:Mh,externalForwardedProps:$,ownerState:E,getSlotProps:te=>({...te,onEntering:(oe,be)=>{te.onEntering?.(oe,be),w()},onExited:oe=>{te.onExited?.(oe),k()}}),additionalProps:{appear:!0,in:v}});g==="auto"&&!de.muiSupportAuto&&(I=void 0);let Q=f||(a?Tn(_f(a)).body:void 0),[ue,{slots:Ge,slotProps:Ne,...ee}]=Ae("root",{ref:o,elementType:_B,externalForwardedProps:{...$,...P},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:Wi(typeof m.backdrop=="function"?m.backdrop(E):m.backdrop,{invisible:!0})},container:Q,open:v},ownerState:E,className:j(O.root,p)}),[ae,W]=Ae("paper",{ref:C,className:O.paper,elementType:Ih,externalForwardedProps:$,shouldForwardComponentProp:!0,additionalProps:{elevation:c,style:h?void 0:{opacity:0}},ownerState:E});return(0,Bf.jsx)(ue,{...ee,...!Sn(ue)&&{slots:Ge,slotProps:Ne,disableAutoFocus:d,disableScrollLock:b},children:(0,Bf.jsx)(de,{...ne,timeout:I,children:(0,Bf.jsx)(ae,{...W,children:u})})})}),jh=BB;function N1(e){return V("MuiMenu",e)}var ste=H("MuiMenu",["root","paper","list"]);var Hh=S(z(),1),zB={vertical:"top",horizontal:"right"},kB={vertical:"top",horizontal:"left"},UB=e=>{let{classes:t}=e;return F({root:["root"],paper:["paper"],list:["list"]},N1,t)},LB=L(jh,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),IB=L(Ih,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),jB=L(ms,{name:"MuiMenu",slot:"List"})({outline:0}),HB=zf.forwardRef(function(t,o){let r=q({props:t,name:"MuiMenu"}),{autoFocus:n=!0,children:a,className:i,disableAutoFocusItem:s=!1,onClose:l,open:u,PopoverClasses:p,transitionDuration:f="auto",variant:d="selectedMenu",slots:c={},slotProps:T={},...v}=r,x=q0(),m={...r,autoFocus:n,disableAutoFocusItem:s,transitionDuration:f,variant:d},y=UB(m),g=n&&u,b=g&&!s,P=zf.useRef(null),C=(w,k)=>{P.current&&(P.current.adjustStyleForScrollbar(w,{direction:x?"rtl":"ltr"}),g&&P.current.focusInitialTarget?.())},E=w=>{w.key==="Tab"&&(w.preventDefault(),l&&l(w,"tabKeyDown"))},O={slots:c,slotProps:T},M=ph({elementType:c.root,externalSlotProps:T.root,ownerState:m,className:[y.root,i]}),[N,A]=Ae("paper",{className:y.paper,elementType:IB,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:m}),[h,D]=Ae("list",{className:y.list,elementType:jB,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:w=>({...w,onKeyDown:k=>{E(k),w.onKeyDown?.(k)}}),ownerState:m}),R=typeof T.transition=="function"?T.transition(m):T.transition;return(0,Hh.jsx)(LB,{disableAutoFocus:n,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?zB:kB,slots:{root:c.root,paper:N,backdrop:c.backdrop,transition:c.transition},slotProps:{root:M,paper:A,backdrop:typeof T.backdrop=="function"?T.backdrop(m):T.backdrop,transition:{...R,onEntering:(...w)=>{C(...w),R?.onEntering?.(...w)}}},open:u,ref:o,transitionDuration:f,ownerState:m,...v,classes:p,children:(0,Hh.jsx)(h,{actions:P,autoFocus:g,autoFocusItem:b,variant:d,...D,children:a})})}),D1=HB;var Mn=S(U(),1);function _1(e){return V("MuiMenuItem",e)}var VB=H("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ys=VB;var Vh=S(z(),1),FB=(e,t)=>{let{ownerState:o}=e;return[t.root,o.dense&&t.dense,o.divider&&t.divider,!o.disableGutters&&t.gutters]},$B=e=>{let{disabled:t,dense:o,divider:r,disableGutters:n,selected:a,classes:i}=e,l=F({root:["root",o&&"dense",t&&"disabled",!n&&"gutters",r&&"divider",a&&"selected"]},_1,i);return{...i,...l}},qB=L(Lr,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:FB})(X(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ys.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ys.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ys.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)}},[`&.${ys.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ys.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${gf.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${gf.inset}`]:{marginLeft:52},[`& .${Cf.root}`]:{marginTop:0,marginBottom:0},[`& .${Cf.inset}`]:{paddingLeft:36},[`& .${vf.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${vf.root} svg`]:{fontSize:"1.25rem"}}}]}))),GB=Mn.forwardRef(function(t,o){let r=q({props:t,name:"MuiMenuItem"}),{autoFocus:n=!1,component:a="li",dense:i=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:p="menuitem",tabIndex:f,className:d,...c}=r,T=hu(),v=Mn.useContext(Ia),x=Mn.useMemo(()=>({dense:i||v.dense||!1,disableGutters:l}),[v.dense,i,l]),m=P1(),y=Ra(),g=m.suppressInitialFocusVisible,b=m.itemsFocusableWhenDisabled,P=Mn.useRef(null);Xi(()=>{n&&P.current&&mu(P.current,T)},[n]);let C={...r,dense:x.dense,divider:s,disableGutters:l},E=$B(r),O=kh({id:y,ref:o,disabled:r.disabled,focusableWhenDisabled:b,selected:r.selected}),M=Dt(P,O.ref),N;return f!==void 0?N=f:m.variant==="selectedMenu"?N=O.tabIndex:(!r.disabled||b)&&(N=-1),(0,Vh.jsx)(Ia.Provider,{value:x,children:(0,Vh.jsx)(qB,{ref:M,role:p,tabIndex:N,component:a,internalNativeButton:!1,focusableWhenDisabled:b,suppressFocusVisible:g,focusVisibleClassName:j(E.focusVisible,u),className:j(E.root,d),...c,ownerState:C,classes:E})})}),wn=GB;var Uf=S(U(),1);function B1(e){return V("MuiNativeSelect",e)}var KB=H("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),kf=KB;var gu=S(z(),1),YB=e=>{let{classes:t,variant:o,disabled:r,multiple:n,open:a,error:i}=e,s={select:["select",o,r&&"disabled",n&&"multiple",i&&"error"],icon:["icon",`icon${K(o)}`,a&&"iconOpen",r&&"disabled"]};return F(s,B1,t)},Fh=L("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${kf.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),XB=L(Fh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Be,overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.select,t[o.variant],o.error&&t.error,{[`&.${kf.multiple}`]:t.multiple}]}})({}),$h=L("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${kf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),QB=L($h,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.icon,o.variant&&t[`icon${K(o.variant)}`],o.open&&t.iconOpen]}})({}),WB=Uf.forwardRef(function(t,o){let{className:r,disabled:n,error:a,IconComponent:i,inputRef:s,variant:l="standard",...u}=t,p={...t,disabled:n,variant:l,error:a},f=YB(p);return(0,gu.jsxs)(Uf.Fragment,{children:[(0,gu.jsx)(XB,{ownerState:p,className:j(f.select,r),disabled:n,ref:s||o,...u}),t.multiple?null:(0,gu.jsx)(QB,{as:i,ownerState:p,className:f.icon})]})}),z1=WB;var Lf=S(U(),1);var bu=S(z(),1),k1,ZB=L("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Be})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),JB=L("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Be})(X(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function qh(e){let{children:t,classes:o,className:r,label:n,notched:a,...i}=e,s=n!=null&&n!=="",l={...e,notched:a,withLabel:s};return(0,bu.jsx)(ZB,{"aria-hidden":!0,className:r,ownerState:l,...i,children:(0,bu.jsx)(JB,{ownerState:l,children:s?(0,bu.jsx)("span",{children:n}):k1||(k1=(0,bu.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"}))})})}var Tu=S(z(),1),e3=e=>{let{classes:t}=e,r=F({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},hS,t);return{...t,...r}},t3=L(ka,{shouldForwardProp:e=>Be(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ba})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ar.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ar.focused} .${ar.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(ot()).map(([o])=>({props:{color:o},style:{[`&.${ar.focused} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette[o].main}}})),{props:{},style:{[`&.${ar.error} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ar.disabled} .${ar.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:o})=>o.startAdornment,style:{paddingLeft:14}},{props:({ownerState:o})=>o.endAdornment,style:{paddingRight:14}},{props:({ownerState:o})=>o.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:o,size:r})=>o.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),o3=L(qh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),r3=L(Ua,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:za})(X(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),U1=Lf.forwardRef(function(t,o){let r=q({props:t,name:"MuiOutlinedInput"}),{fullWidth:n=!1,inputComponent:a="input",label:i,multiline:s=!1,notched:l,slots:u={},slotProps:p={},type:f="text",...d}=r,c=e3(r),T=Zt(),v=To({props:r,muiFormControl:T,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:T,fullWidth:n,hiddenLabel:v.hiddenLabel,multiline:s,size:v.size,type:f},m=u.root??t3,y=u.input??r3,[g,b]=Ae("notchedOutline",{elementType:o3,className:c.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:u,slotProps:p},additionalProps:{label:i!=null&&i!==""&&v.required?(0,Tu.jsxs)(Lf.Fragment,{children:[i,"\u2009","*"]}):i}});return(0,Tu.jsx)(jo,{slots:{root:m,input:y},slotProps:p,renderSuffix:P=>(0,Tu.jsx)(g,{...b,notched:typeof l<"u"?l:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:n,inputComponent:a,multiline:s,ref:o,type:f,...d,classes:{...c,notchedOutline:null}})});U1.muiName="Input";var vu=U1;var gs=S(U(),1);var ze=S(U(),1);function If(e){return V("MuiSelect",e)}var n3=H("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","nativeInput","error"]),hs=n3;var jr=S(z(),1),L1,a3=L(Fh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[{[`&.${hs.select}`]:t.select},{[`&.${hs.select}`]:t[o.variant]},{[`&.${hs.error}`]:t.error},{[`&.${hs.multiple}`]:t.multiple}]}})({[`&.${hs.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),i3=L($h,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.icon,o.open&&t.iconOpen]}})({}),s3=L("input",{shouldForwardProp:e=>Hp(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"}),l3=e=>{let{classes:t,variant:o,disabled:r,multiple:n,open:a,error:i}=e;return F({select:["select",o,r&&"disabled",n&&"multiple",i&&"error"],icon:["icon",a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},If,t)},u3=ze.forwardRef(function(t,o){let{"aria-describedby":r,"aria-label":n,autoFocus:a,autoWidth:i,children:s,className:l,defaultOpen:u,defaultValue:p,disabled:f,displayEmpty:d,error:c=!1,IconComponent:T,inputRef:v,labelId:x,MenuProps:m={},multiple:y,name:g,onBlur:b,onChange:P,onClose:C,onFocus:E,onKeyDown:O,onMouseDown:M,onOpen:N,open:A,readOnly:h,renderValue:D,required:R,SelectDisplayProps:w={},tabIndex:k,type:I,value:$,variant:de="standard",...ne}=t,[Q,ue]=ql({controlled:$,default:p,name:"Select"}),[Ge,Ne]=ql({controlled:A,default:u,name:"Select"}),ee=ze.useRef(null),ae=ze.useRef(null),[W,te]=ze.useState(null),{current:oe}=ze.useRef(A!=null),[be,Pt]=ze.useState(),[ce,Oe]=ze.useState(null),pt=Dt(o,v),qt=ze.useCallback(G=>{ae.current=G,G&&te(G)},[]),Ke=W?.parentNode;ze.useImperativeHandle(pt,()=>({focus:()=>{ae.current.focus()},node:ee.current,value:Q}),[Q]);let ft=W!==null&&Ge;ze.useEffect(()=>{if(!ft||!Ke||i||typeof ResizeObserver>"u")return;let G=new ResizeObserver(()=>{Pt(Ke.clientWidth)});return G.observe(Ke),()=>{G.disconnect()}},[ft,Ke,i]),ze.useEffect(()=>{u&&Ge&&W&&!oe&&(Pt(i?null:Ke.clientWidth),ae.current.focus())},[W,i]),ze.useEffect(()=>{a&&ae.current.focus()},[a]),ze.useEffect(()=>{if(!x)return;let G=Tn(ae.current).getElementById(x);if(G){let ve=()=>{getSelection().isCollapsed&&ae.current.focus()};return G.addEventListener("click",ve),()=>{G.removeEventListener("click",ve)}}},[x]);let Rt=(G,ve)=>{G?(Oe(Af(ve)),N&&N(ve)):(Oe(null),C&&C(ve)),oe||(Pt(i?null:Ke.clientWidth),Ne(G))},ye=G=>{M?.(G),G.button===0&&(G.preventDefault(),ae.current.focus(),Rt(!0,G))},po=G=>{Rt(!1,G)},No=ze.Children.toArray(s),dt=G=>{let ve=No.find(Ot=>Ot.props.value===G.target.value);ve!==void 0&&(ue(ve.props.value),P&&P(G,ve))},ia=G=>ve=>{let Ot;if(ve.currentTarget.hasAttribute("tabindex")){if(y){Ot=Array.isArray(Q)?Q.slice():[];let di=Q.indexOf(G.props.value);di===-1?Ot.push(G.props.value):Ot.splice(di,1)}else Ot=G.props.value;if(G.props.onClick&&G.props.onClick(ve),Q!==Ot&&(ue(Ot),P)){let di=ve.nativeEvent||ve,GT=new di.constructor(di.type,di);Object.defineProperty(GT,"target",{writable:!0,value:{value:Ot,name:g}}),P(GT,G)}y||Rt(!1,ve)}},pr=G=>{h||([" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),Rt(!0,G)),O?.(G))},Ar=G=>{!ft&&b&&(Object.defineProperty(G,"target",{writable:!0,value:{value:Q,name:g}}),b(G))};delete ne["aria-invalid"];let Le,Te,We=[],re=!1,fo=!1;(Da({value:Q})||d)&&(D?Le=D(Q):re=!0);let cn=No.map(G=>{if(!ze.isValidElement(G))return null;let ve;if(y){if(!Array.isArray(Q))throw new Error(gt(2));ve=Q.some(Ot=>yu(Ot,G.props.value)),ve&&re&&We.push(G.props.children)}else ve=yu(Q,G.props.value),ve&&re&&(Te=G.props.children);return ve&&(fo=!0),ze.cloneElement(G,{"aria-selected":ve?"true":"false",onClick:ia(G),onKeyUp:Ot=>{Ot.key===" "&&Ot.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(Ot)},role:"option",selected:ve,value:void 0,"data-value":G.props.value})});re&&(y?We.length===0?Le=null:Le=We.reduce((G,ve,Ot)=>(G.push(ve),Ot<We.length-1&&G.push(", "),G),[]):Le=Te);let fl=be;!i&&oe&&W&&(fl=Ke.clientWidth);let dl;typeof k<"u"?dl=k:dl=f?null:0;let Ye=w.id||(g?`mui-component-select-${g}`:void 0),fi={...t,variant:de,value:Q,open:ft,error:c},Fm=l3(fi),$T=typeof m.slotProps?.paper=="function"?m.slotProps.paper(fi):m.slotProps?.paper,zA=typeof m.slotProps?.list=="function"?m.slotProps.list(fi):m.slotProps?.list,qT=or(),kA=or();return(0,jr.jsxs)(ze.Fragment,{children:[(0,jr.jsx)(a3,{as:"div",ref:qt,tabIndex:dl,role:"combobox","aria-controls":ft?qT:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":ft?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[x,Ye].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":R?"true":void 0,"aria-invalid":c?"true":void 0,onKeyDown:pr,onMouseDown:f||h?null:ye,onBlur:Ar,onFocus:E,...w,ownerState:fi,className:j(w.className,Fm.select,l),id:Ye,children:Mf(Le)?L1||(L1=(0,jr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):Le}),(0,jr.jsx)(s3,{"aria-invalid":c,value:Array.isArray(Q)?Q.join(","):Q,name:g,ref:ee,"aria-hidden":!0,onChange:dt,tabIndex:-1,disabled:f,className:Fm.nativeInput,autoFocus:a,required:R,...ne,id:ne.id??kA,ownerState:fi}),(0,jr.jsx)(i3,{as:T,className:Fm.icon,ownerState:fi}),(0,jr.jsx)(Uh,{value:ce,children:(0,jr.jsx)(D1,{id:`menu-${g||""}`,anchorEl:Ke,open:ft,onClose:po,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...m,slotProps:{...m.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:qT,...zA},paper:{...$T,style:{minWidth:fl,...$T?.style}}},children:cn})})]})}),I1=u3;var xu=S(z(),1),c3=e=>{let{classes:t}=e,r=F({root:["root"]},If,t);return{...t,...r}},Gh={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Be(e)&&e!=="variant"},p3=L(du,Gh)(""),f3=L(vu,Gh)(""),d3=L(pu,Gh)(""),j1=gs.forwardRef(function(t,o){let r=q({name:"MuiSelect",props:t}),{autoWidth:n=!1,children:a,classes:i={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:p=TS,id:f,input:d,inputProps:c,label:T,labelId:v,MenuProps:x,multiple:m=!1,native:y=!1,onClose:g,onOpen:b,open:P,renderValue:C,SelectDisplayProps:E,variant:O="outlined",...M}=r,N=y?z1:I1,A=Zt(),h=To({props:r,muiFormControl:A,states:["variant","error"]}),D=h.variant||O,R={...r,variant:D,classes:i},w=c3(R),{root:k,...I}=w,$=d||{standard:(0,xu.jsx)(p3,{ownerState:R}),outlined:(0,xu.jsx)(f3,{label:T,ownerState:R}),filled:(0,xu.jsx)(d3,{ownerState:R})}[D],de=Dt(o,Io($));return(0,xu.jsx)(gs.Fragment,{children:gs.cloneElement($,{inputComponent:N,inputProps:{children:a,error:h.error,IconComponent:p,variant:D,type:void 0,multiple:m,...y?{id:f}:{autoWidth:n,defaultOpen:l,displayEmpty:u,labelId:v,MenuProps:x,onClose:g,onOpen:b,open:P,renderValue:C,SelectDisplayProps:{id:f,...E}},...c,classes:c?xe(I,c.classes):I,...d?d.props.inputProps:{}},...(m&&y||u)&&D==="outlined"?{notched:!0}:{},ref:de,className:j($.props.className,s,w.root),...!d&&{variant:D},...M})})});j1.muiName="Select";var Kh=j1;var m3=Up({createStyledComponent:L("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>q({props:e,name:"MuiStack"})}),jf=m3;var V1=S(U(),1);function H1(e){return V("MuiTextField",e)}var vre=H("MuiTextField",["root"]);var ja=S(z(),1),y3={standard:du,filled:pu,outlined:vu},h3=e=>{let{classes:t}=e;return F({root:["root"]},H1,t)},g3=L(Sh,{name:"MuiTextField",slot:"Root"})({}),b3=V1.forwardRef(function(t,o){let r=q({props:t,name:"MuiTextField"}),{autoComplete:n,autoFocus:a=!1,children:i,className:s,color:l="primary",defaultValue:u,disabled:p=!1,error:f=!1,fullWidth:d=!1,helperText:c,id:T,inputRef:v,label:x,maxRows:m,minRows:y,multiline:g=!1,name:b,onBlur:P,onChange:C,onFocus:E,placeholder:O,required:M=!1,rows:N,select:A=!1,slots:h={},slotProps:D={},type:R,value:w,variant:k="outlined",...I}=r,$={...r,autoFocus:a,color:l,disabled:p,error:f,fullWidth:d,multiline:g,required:M,select:A,variant:k},de=h3($),ne=or(T),Q=c&&ne?`${ne}-helper-text`:void 0,ue=x&&ne?`${ne}-label`:void 0,Ge=y3[k],Ne={slots:h,slotProps:D},[ee,ae]=Ae("select",{elementType:Kh,externalForwardedProps:Ne,ownerState:$}),W=A&&ae.native,te={},oe=Ne.slotProps.inputLabel;k==="outlined"&&(oe&&typeof oe.shrink<"u"&&(te.notched=oe.shrink),te.label=x),A&&(W||(te.id=void 0),te["aria-describedby"]=void 0);let[be,Pt]=Ae("root",{elementType:g3,shouldForwardComponentProp:!0,externalForwardedProps:{...Ne,...I},ownerState:$,className:j(de.root,s),ref:o,additionalProps:{disabled:p,error:f,fullWidth:d,required:M,color:l,variant:k}}),[ce,Oe]=Ae("input",{elementType:Ge,externalForwardedProps:Ne,additionalProps:te,ownerState:$}),[pt,qt]=Ae("inputLabel",{elementType:wh,externalForwardedProps:Ne,ownerState:$}),[Ke,ft]=Ae("htmlInput",{elementType:"input",externalForwardedProps:Ne,ownerState:$}),[Rt,ye]=Ae("formHelperText",{elementType:Ph,externalForwardedProps:Ne,ownerState:$}),po=(0,ja.jsx)(ce,{"aria-describedby":Q,autoComplete:n,autoFocus:a,defaultValue:u,fullWidth:d,multiline:g,name:b,rows:N,maxRows:m,minRows:y,type:R,value:w,id:ne,inputRef:v,onBlur:P,onChange:C,onFocus:E,placeholder:O,inputProps:ft,slots:{input:h.htmlInput?Ke:void 0},...Oe});return(0,ja.jsxs)(be,{...Pt,children:[x!=null&&x!==""&&(0,ja.jsx)(pt,{htmlFor:A&&!W?void 0:ne,id:ue,...A&&!W&&{component:"div"},...qt,children:x}),A?(0,ja.jsx)(ee,{"aria-describedby":Q,id:ne,labelId:ue,value:w,input:po,...ae,children:i}):po,c&&(0,ja.jsx)(Rt,{id:Q,...ye,children:c})]})}),bs=b3;var X1=S(U(),1);var Hf=[{label:"Checkout",args:["review","--checkout-only"]},{label:"Address Comments",args:["review-pr-comments"]},{label:"Address Comments (auto)",args:["review-pr-comments","--auto"]},{label:"Fix conflicts (merge)",args:["fix-conflict"]},{label:"Fix conflicts (rebase)",args:["fix-conflict","--rebase"]}];var T3=new Set(["Checkout","Address Comments","Address Comments (auto)"]),F1=Hf.filter(({label:e})=>T3.has(e));var Yh=[{key:"force",label:"Force re-run",flag:"--force"},{key:"addressComments",label:"Address comments after",flag:"--address-comments"},{key:"announce",label:"Announce to Slack after",flag:"--announce"}],$1={force:!1,addressComments:!1,announce:!1};function q1(e){return Yh.filter(({key:t})=>e[t]).map(({flag:t})=>t)}function Vf(e){return{border:`1px solid ${e.palette.divider}`,boxShadow:e.tokens.elevation.overlay}}var G1=[{label:"Review",args:["review"]},{label:"Review & refine",args:["review","--refine"]},{label:"Review & apply",args:["review","--apply"]},{label:"Review & post",args:["review","--no-prompt","--submit"]},{label:"High-level review",args:["review","--high-level"]}];var Su=S(z(),1);function K1({value:e,onChange:t}){return Yh.map(({key:o,label:r})=>(0,Su.jsxs)(wn,{role:"menuitemcheckbox","aria-checked":e[o],onClick:()=>t({...e,[o]:!e[o]}),children:[(0,Su.jsx)(Sf,{children:(0,Su.jsx)(df,{size:"small",checked:e[o],tabIndex:-1,disableRipple:!0,sx:{p:0}})}),r]},o))}var Cu=S(z(),1);function Y1(e,t,o){return[...G1.map(({label:r,args:n})=>(0,Cu.jsx)(wn,{onClick:()=>o([...n,...q1(e)]),children:r},r)),(0,Cu.jsx)(cu,{},"modes-divider"),(0,Cu.jsx)(K1,{value:e,onChange:t},"toggles"),(0,Cu.jsx)(cu,{},"toggles-divider")]}var Eu=S(z(),1);function Q1({actionsOnly:e=!1,onPick:t,onClose:o}){let[r,n]=(0,X1.useState)($1);return(0,Eu.jsx)(Cn,{sx:Vf,children:(0,Eu.jsxs)(ms,{autoFocusItem:!0,dense:!0,"aria-label":"Start an assist session for this PR",onKeyDown:s=>{s.key==="Escape"&&(s.preventDefault(),o(!0))},onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||document.hasFocus()&&o(!1)},children:[!e&&Y1(r,n,t),(e?F1:Hf).map(({label:s,args:l})=>(0,Eu.jsx)(wn,{onClick:()=>t(l),children:s},s))]})})}var pC=S(U(),1);var aC=S(U(),1);var Z1=S(z(),1);function W1({value:e,onChange:t,onKeyDown:o,placeholder:r,error:n}){return(0,Z1.jsx)(bs,{autoFocus:!0,fullWidth:!0,multiline:!0,maxRows:6,size:"small",placeholder:r,value:e,onChange:a=>t(a.target.value),onKeyDown:o,error:n,slotProps:{htmlInput:{"aria-label":"Instructions for assist"}}})}var Xh=S(z(),1);function J1({labels:e,disabled:t,onClick:o}){return(0,Xh.jsx)(jf,{direction:"row",spacing:1,sx:{mt:1},children:e.map((r,n)=>(0,Xh.jsx)(us,{size:"small",variant:n===0?"contained":"outlined",disabled:t,onMouseDown:a=>a.preventDefault(),onClick:()=>o(n),children:r},r))})}var Ha=S(z(),1);function eC({error:e,busy:t}){return(0,Ha.jsxs)(Ha.Fragment,{children:[e&&(0,Ha.jsxs)(nu,{role:"alert",variant:"caption",color:"error",sx:{display:"block",mt:.5},children:["Not sent: ",e]}),(0,Ha.jsx)(nu,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:.5},children:t?"Sending\u2026":`Enter to ${e?"retry":"send"} \xB7 Shift+Enter for a new line \xB7 Esc to close`})]})}function tC(e,t){return o=>{o.currentTarget.contains(o.relatedTarget)||document.hasFocus()&&!e&&t(!1)}}function v3(e){return(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()==="c"}function oC(e,t,o){return r=>{if(e&&t&&v3(r)){r.preventDefault(),navigator.clipboard?.writeText(e);return}o(r)}}function rC(e,t){return o=>{o.key==="Escape"?(o.preventDefault(),e(!0)):o.key==="Enter"&&!o.shiftKey&&!o.nativeEvent.isComposing&&(o.preventDefault(),t())}}function nC({instructions:e,onSend:t,onClose:o,busy:r,keepOpen:n,keepDraftOnBlur:a,copyWhenEmpty:i}){let s=f=>{r||t(e,f)},l=oC(i,!e,rC(o,()=>s(0))),u=a&&e.trim()!=="",p=tC(n||r||u,o);return{send:s,onKeyDown:l,onBlur:p}}var Ts=S(z(),1);function iC({onSend:e,onClose:t,placeholder:o="Instructions (optional)",error:r,busy:n=!1,keepDraftOnBlur:a=!1,copyWhenEmpty:i,buttons:s,children:l}){let[u,p]=(0,aC.useState)(""),{send:f,onKeyDown:d,onBlur:c}=nC({instructions:u,onSend:e,onClose:t,busy:n,keepOpen:!!r,keepDraftOnBlur:a,copyWhenEmpty:i});return(0,Ts.jsxs)(Cn,{sx:T=>({...Vf(T),p:1.5}),onBlur:c,children:[(0,Ts.jsx)(W1,{value:u,onChange:p,onKeyDown:d,placeholder:o,error:!!r}),l,s&&(0,Ts.jsx)(J1,{labels:s,disabled:n,onClick:f}),(0,Ts.jsx)(eC,{error:r,busy:n})]})}var Pu=S(U(),1);function Qh(){return globalThis.browser?.storage?.local}var Wh="lastRepo",Zh={async load(){let t=(await Qh()?.get(Wh).catch(()=>{}))?.[Wh];return typeof t=="string"?t:void 0},save(e){Qh()?.set({[Wh]:e}).catch(()=>{})}};async function Ff(e){let t=pn();if(!t)return{ok:!1,message:"assist extension runtime unavailable"};try{return await t.sendMessage(e)??{ok:!1,message:"assist extension did not reply"}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}}function sC(){return Ff({type:"assist-clones"})}var Ru=S(z(),1);function lC({value:e,onChange:t}){let[o,r]=(0,Pu.useState)(),[n,a]=(0,Pu.useState)();return(0,Pu.useEffect)(()=>{let i=!0;return Promise.all([sC(),Zh.load()]).then(([s,l])=>{if(i){if(!s.ok)return a(s.message);r(s.clones),l&&s.clones.includes(l)&&t(l)}}),()=>{i=!1}},[t]),(0,Ru.jsxs)(bs,{select:!0,fullWidth:!0,size:"small",sx:{mt:1},value:e,onChange:i=>{Zh.save(i.target.value),t(i.target.value)},error:!!n,helperText:n,slotProps:{select:{native:!0},htmlInput:{"aria-label":"Repo for assist"}},children:[(0,Ru.jsx)("option",{value:"",children:o?"Pick a repo":"Loading repos\u2026"}),o?.map(i=>(0,Ru.jsx)("option",{value:i,children:i},i))]})}var x3=["position: fixed","right: 16px","bottom: 16px","z-index: 2147483647","max-width: 420px","padding: 8px 12px","border-radius: 6px","font: 14px/20px -apple-system, BlinkMacSystemFont, sans-serif","color: var(--fgColor-onEmphasis, #fff)","box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25)"].join(";"),uC={ok:"var(--bgColor-success-emphasis, #1f883d)",error:"var(--bgColor-danger-emphasis, #cf222e)"};function $f(e,t){let o=document.createElement("div");return o.setAttribute("data-assist-toast",""),o.setAttribute("role","status"),o.style.cssText=`${x3};background: ${t?uC.ok:uC.error}`,o.textContent=e,document.body.append(o),setTimeout(()=>o.remove(),t?4e3:8e3),o}var Jh=S(z(),1),cC=[{label:"Prompt"},{label:"Draft",mode:"draft"},{label:"Bug",mode:"bug"}];function fC({pickRepo:e,send:t,dismiss:o}){let[r,n]=(0,pC.useState)("");return(0,Jh.jsx)(iC,{buttons:cC.map(({label:a})=>a),onSend:(a,i)=>{if(e&&!r){$f("Pick a repo to start the assist session in",!1);return}o(!1);let{mode:s}=cC[i];t({instructions:a||void 0,...s&&{mode:s},...e&&{repo:r}})},onClose:o,children:e&&(0,Jh.jsx)(lC,{value:r,onChange:n})})}var eg=S(z(),1);function dC(e,{send:t,dismiss:o}){return e==="review"||e==="azure-devops-review"?(0,eg.jsx)(Q1,{actionsOnly:e==="azure-devops-review",onPick:r=>{o(!1),t({args:r})},onClose:o}):(0,eg.jsx)(fC,{pickRepo:e==="link",send:t,dismiss:o})}var sr="#0e1116",tg="#141820",qf="#1b202a",Gf="#e3e7ee",og="#8a93a3",Ou="#8b9cff",Kf="#5fd0a0",Yf="#f2b45a",Xf="#f27a7a",mC="#6cc8d8",yC={secondary:"rgba(255, 255, 255, 0.7)",hover:"rgba(255, 255, 255, 0.12)",active:"rgba(255, 255, 255, 0.16)",dot:"#ffb74d",dotRing:"rgba(0, 0, 0, 0.15)"},Va={dark:{color:{background:sr,surface:tg,raised:qf,line:"#262c37",lineSoft:"#1d222b",text:{primary:Gf,secondary:og,disabled:"#5c6473"},selected:"rgba(139, 156, 255, 0.14)",wash:{warning:"rgba(242, 180, 90, 0.09)",error:"rgba(242, 122, 122, 0.09)",accent:"rgba(139, 156, 255, 0.1)",check:"rgba(108, 200, 216, 0.09)"},well:sr,stripe:qf,codeWash:"rgba(255, 255, 255, 0.08)",overlay:{background:qf,text:Gf},scrim:"rgba(0, 0, 0, 0.5)",appBar:{background:tg,text:Gf},onAppBar:{...yC,secondary:og,level:{ok:Kf,warn:Yf,over:Xf}},statusBar:{background:tg,text:og,hoverText:Gf,secondary:"#5c6473",hover:qf,active:"transparent",dot:Ou,dotRing:"rgba(139, 156, 255, 0.14)",readyText:Ou,level:{ok:Kf,warn:Yf,over:Xf}},primary:{main:Ou,contrastText:sr},secondary:{main:"#c99bff",contrastText:sr},success:{main:Kf,contrastText:sr},warning:{main:Yf,contrastText:sr},error:{main:Xf,contrastText:sr},info:{main:"#6cb6ff",contrastText:sr},check:{main:mC,contrastText:sr}},terminal:{background:sr,foreground:"#d6dbe4",cursor:Ou,cursorAccent:sr,selectionBackground:"rgba(139, 156, 255, 0.28)",black:"#1b2029",red:Xf,green:Kf,yellow:Yf,blue:Ou,magenta:"#c99bff",cyan:mC,white:"#c3c9d4",brightBlack:"#5c6473",brightRed:"#ff9a9a",brightGreen:"#82e0b6",brightYellow:"#ffc97a",brightBlue:"#a9b6ff",brightMagenta:"#dcb8ff",brightCyan:"#8fdbe8",brightWhite:"#eef1f6"},elevation:{appBar:0,overlay:"0 14px 34px rgba(0, 0, 0, 0.45)",dialog:"0 30px 60px rgba(0, 0, 0, 0.5)",stuckHeader:"0 8px 8px -9px rgba(0, 0, 0, 0.8)"}},light:{color:{background:"#fff",surface:"#fff",raised:"rgba(0, 0, 0, 0.04)",line:"rgba(0, 0, 0, 0.12)",lineSoft:"rgba(0, 0, 0, 0.12)",text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},selected:"rgba(0, 0, 0, 0.08)",wash:{warning:"rgba(255, 167, 38, 0.09)",error:"rgba(244, 67, 54, 0.09)",accent:"rgba(25, 118, 210, 0.08)",check:"rgba(0, 131, 143, 0.08)"},well:"#f3f4f6",stripe:"rgba(0, 0, 0, 0.1)",codeWash:"rgba(0, 0, 0, 0.06)",overlay:{background:"rgba(97, 97, 97, 0.92)",text:"#fff"},onAppBar:{...yC,level:{ok:"#b9f6ca",warn:"#ffe57f",over:"#ffcdd2"}},primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"#fff"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20",contrastText:"#fff"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100",contrastText:"#fff"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828",contrastText:"#fff"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b",contrastText:"#fff"},check:{main:"#00838f",light:"#4fb3bf",dark:"#005662",contrastText:"#fff"},scrim:"rgba(15, 23, 42, 0.32)",statusBar:{background:"#f3f4f6",text:"rgba(0, 0, 0, 0.6)",hoverText:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.38)",hover:"rgba(0, 0, 0, 0.06)",active:"transparent",dot:"#1976d2",dotRing:"rgba(25, 118, 210, 0.16)",readyText:"#1976d2",level:{ok:"#2e7d32",warn:"#ed6c02",over:"#d32f2f"}}},terminal:{background:"#ffffff",foreground:"#333333",cursor:"#333333",cursorAccent:"#ffffff",selectionBackground:"#add6ff",black:"#000000",red:"#cd3131",green:"#107c10",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"},elevation:{appBar:0,overlay:"0 8px 24px rgba(15, 23, 42, 0.12)",dialog:"0 24px 48px rgba(15, 23, 42, 0.18)",stuckHeader:"0 6px 6px -7px rgba(0, 0, 0, 0.2)"}},font:{ui:'"Geist Variable", "Segoe UI", system-ui, sans-serif',mono:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace',terminal:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace'},type:{fontSize:14,terminalFontSize:13,scale:{caption:12,body2:14,body1:15,subtitle2:14,subtitle1:15,h6:16,h5:18,h4:24,button:14},button:{textTransform:"none",fontWeight:600}},radius:{sm:6,md:8},selection:{ringWidth:2,titleWeight:500},spacing:8,densities:{desktop:{target:30,bar:40,iconButton:{side:30,icon:18,smallSide:26,smallIcon:16},button:{minHeight:30,fontSize:13,paddingX:12},switch:{width:34,height:20,thumb:16},inputFontSize:13,filterSelectMinWidth:160,tabBar:{height:44,icon:20,label:10,badge:16,insetTrim:0}},touch:{target:48,bar:60,iconButton:{side:48,icon:30,smallSide:40,smallIcon:24},button:{minHeight:48,fontSize:17,paddingX:20},switch:{width:51,height:31,thumb:27},inputFontSize:16,filterSelectMinWidth:200,tabBar:{height:49,icon:26,label:11,badge:18,insetTrim:12}}}};function S3(e){let t=e.getAttribute("data-color-mode");return t==="light"||t==="dark"?t:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Fa(e){let t=S3(e),o=e.getAttribute(t==="dark"?"data-dark-theme":"data-light-theme");return o?o.startsWith("dark")?"dark":"light":t}var C3=["data-color-mode","data-light-theme","data-dark-theme"];function Qf(e,t){let o=Fa(e),r=()=>{let i=Fa(e);i!==o&&(o=i,t(i))},n=new MutationObserver(r);n.observe(e,{attributeFilter:C3});let a=globalThis.matchMedia?.("(prefers-color-scheme: dark)");return a?.addEventListener?.("change",r),()=>{n.disconnect(),a?.removeEventListener?.("change",r)}}var hC="data-assist-send-style";function gC(e){let{color:t}=Va[e];return`
|
|
192
192
|
.assist-send {
|
|
193
193
|
font-family: ${Va.font.ui};
|
|
194
194
|
font-size: 12px;
|
|
@@ -4058,7 +4058,7 @@ ${d.join(`
|
|
|
4058
4058
|
`,PPo=Bi`
|
|
4059
4059
|
0%, 100% { transform: scale(1); }
|
|
4060
4060
|
50% { transform: scale(1.08); }
|
|
4061
|
-
`,pFr={content:'""',position:"absolute",borderRadius:"inherit",background:"conic-gradient(from calc(var(--rainbow-pill-h) * 1deg) in oklch longer hue, oklch(66% 0.21 0), oklch(66% 0.21 0))",animation:`${RPo} 1.8s linear infinite`},APo={display:"inline-flex",alignItems:"center",px:1.5,py:"3px",borderRadius:999,position:"relative",isolation:"isolate",fontWeight:700,animation:`${PPo} 1.6s ease-in-out infinite`,"&::before":{...pFr,inset:0,zIndex:-1},"&::after":{...pFr,inset:"-5px",zIndex:-2,filter:"blur(9px)",opacity:.85},"& span":{color:Gl.rainbowPill.text,textShadow:Gl.rainbowPill.shadow},"@media (prefers-reduced-motion: reduce)":{animation:"none","&::before, &::after":{animation:"none"}}};function hFr({children:e}){return(0,jI.jsxs)(jI.Fragment,{children:[(0,jI.jsx)(H3,{styles:EPo}),(0,jI.jsx)(G,{component:"span","data-testid":"rainbow-pill",sx:APo,children:e})]})}function mFr({pct:e,timeLabel:t}){return[Math.round(e),...(t.match(/\d+/g)??[]).map(Number)].join(",")}function gFr(e){if(e.length!==2)return!1;let[t,r]=e;return mFr(t)===mFr(r)}var Hw=C(P(),1);function vFr({rateLimits:e}){let t=k0(3e4),r=[{window:e.five_hour,windowSeconds:18e3,fallbackLabel:"5h"},{window:e.seven_day,windowSeconds:604800,fallbackLabel:"7d"}].filter(i=>i.window?.used_percentage!=null),n=gFr(r.map(i=>({pct:i.window?.used_percentage??0,timeLabel:uEe(i.window?.resets_at,i.fallbackLabel,t)}))),o=r.map((i,a)=>(0,Hw.jsxs)(yFr.Fragment,{children:[a>0?(0,Hw.jsx)(G,{component:"span",sx:{color:FG,mr:.5},children:","}):null,(0,Hw.jsx)(fFr,{window:i.window,windowSeconds:i.windowSeconds,fallbackLabel:i.fallbackLabel,now:t})]},i.fallbackLabel));return n?(0,Hw.jsx)(hFr,{children:o}):(0,Hw.jsx)(Hw.Fragment,{children:o})}var G5=C(P(),1);function xFr({groups:e}){return(0,G5.jsx)(G5.Fragment,{children:e.map((t,r)=>(0,G5.jsxs)(bFr.Fragment,{children:[(0,G5.jsx)(G,{component:"span",sx:{color:FG,ml:r>0?1:0,mr:.5},children:$c(t.harness)}),(0,G5.jsx)(vFr,{rateLimits:t.rateLimits})]},t.harness))})}var SFr={root:{fontFamily:"fontFamilyMono",fontSize:12,display:"grid",gap:1},group:{display:"grid",gap:"2px"},heading:{color:e=>e.tokens.color.onAppBar.secondary},foot:{pt:.75,opacity:.6,borderTop:"1px solid color-mix(in srgb, currentColor 18%, transparent)"}};function LPo(e){if(e==="over")return{level:"warn",boundary:100};if(e==="warn")return{level:"ok",boundary:75}}function IPo(e){if(e==="ok")return{level:"warn",boundary:75};if(e==="warn")return{level:"over",boundary:100}}function MPo(e,t,r,n){if(e>=t)return;let o=e/t;return Math.round(r-n*(1-o))}function CFr(e,t,r,n){if(t==null)return{kind:"unprojectable"};let o=mat(t,r,n);if(o==null)return{kind:"unprojectable"};let i=bx(e,t,r,n),a=LPo(i),s=IPo(i);return{kind:"projected",recovery:a&&{level:a.level,pct:a.boundary*o,at:MPo(e,a.boundary,t,r)},worse:s&&{level:s.level,pct:s.boundary*o}}}function fEe(e){return t=>t.tokens.color.onAppBar.level[e]}function kFr(e,t){return e.at==null?"not before reset":`${e.level==="ok"?"green":"under"} in ${hG(e.at,t)}`}var V5=C(P(),1),_Fr={display:"contents"};function Oat({direction:e,threshold:t}){let r=e==="back";if(!t)return(0,V5.jsxs)(G,{component:"span",sx:_Fr,children:[(0,V5.jsx)("span",{}),(0,V5.jsx)("span",{})]});let n=(0,V5.jsx)(G,{component:"span",sx:{opacity:.6},children:r?"\u2190":"\u2192"}),o=(0,V5.jsxs)(G,{component:"span",sx:{color:fEe(t.level),textAlign:"right"},children:[Math.round(t.pct),"%"]});return(0,V5.jsxs)(G,{component:"span",sx:_Fr,children:[r?o:n,r?n:o]})}var EFr={row:{display:"grid",gridTemplateColumns:"2.5ch 4ch 1ch 4ch 1ch 4ch auto",alignItems:"baseline",gap:.75,fontVariantNumeric:"tabular-nums"},pctWeight:500,note:{pl:.75,color:e=>e.tokens.color.onAppBar.secondary}};var q5=C(P(),1);function RFr({label:e,pct:t,resetsAt:r,windowSeconds:n,now:o}){let i=EFr,a=bx(t,r,n,o),s=CFr(t,r,n,o),l=s.kind==="projected"?s:void 0;return(0,q5.jsxs)(G,{sx:i.row,children:[(0,q5.jsx)(G,{component:"span",sx:{minWidth:"2ch"},children:e}),(0,q5.jsx)(Oat,{direction:"back",threshold:l?.recovery}),(0,q5.jsxs)(G,{component:"span",sx:{minWidth:"4ch",textAlign:"right",fontWeight:i.pctWeight,color:fEe(a)},children:[Math.round(t),"%"]}),(0,q5.jsx)(Oat,{direction:"forward",threshold:l?.worse}),(0,q5.jsx)(G,{component:"span",sx:i.note,children:l?l.recovery&&kFr(l.recovery,o):"no projection yet"})]})}function pEe(e){return[{label:"5h",window:e.five_hour,windowSeconds:18e3},{label:"7d",window:e.seven_day,windowSeconds:604800}].flatMap(t=>t.window?.used_percentage==null?[]:[{label:t.label,pct:t.window.used_percentage,resetsAt:t.window.resets_at,windowSeconds:t.windowSeconds}])}var AFr=C(P(),1);function PFr({rateLimits:e,now:t}){return pEe(e).map(r=>(0,AFr.jsx)(RFr,{label:r.label,pct:r.pct,resetsAt:r.resetsAt,windowSeconds:r.windowSeconds,now:t},r.label))}var YI=C(P(),1);function LFr({groups:e}){let t=k0(3e4),r=SFr;return(0,YI.jsxs)(G,{sx:r.root,children:[e.map(n=>(0,YI.jsxs)(G,{sx:r.group,children:[(0,YI.jsx)(G,{sx:r.heading,children:$c(n.harness)}),(0,YI.jsx)(PFr,{rateLimits:n.rateLimits,now:t})]},n.harness)),(0,YI.jsx)(G,{sx:r.foot,children:"Account usage per harness \u2014 view history"})]})}var Bat=C(P(),1),DPo="Claude account usage (5h / 7d windows) \u2014 view history";function IFr(e){return e.length===0?{title:DPo,content:"Usage"}:{title:(0,Bat.jsx)(LFr,{groups:e}),content:(0,Bat.jsx)(xFr,{groups:e})}}var MFr={display:"flex",alignItems:"center",height:22,px:1,borderRadius:1,fontSize:"inherit","&:hover, &:focus-visible":{bgcolor:e=>e.tokens.color.statusBar.hover,color:e=>e.tokens.color.statusBar.hoverText}},DFr={tooltip:{sx:{p:"10px 12px",minWidth:300,maxWidth:"none"}}};var $at=C(P(),1),NPo={};function NFr({rateLimits:e,harnessRateLimits:t=NPo}){let{title:r,content:n}=IFr(cEe(e,t));return(0,$at.jsx)(sr,{title:r,placement:"top-start",slotProps:DFr,children:(0,$at.jsx)(Qr,{component:da,to:"/usage",underline:"none",color:"inherit",sx:MFr,children:n})})}var $Fr=C(ee(),1);var ch="0.1045.0";var hEe=C(ee(),1),Fat=(0,hEe.createContext)(null);function mEe(){return(0,hEe.useContext)(Fat)}var zat=C(P(),1);function OFr(){let e=mEe();return!e||e===ch?null:(0,zat.jsx)(sr,{title:`Daemon is running v${e}, but this page was served by v${ch}. Restart the daemon to match.`,children:(0,zat.jsx)(Z_e,{fontSize:"small",color:"warning","aria-label":"Version mismatch"})})}var BFr=e=>({display:"inline-flex",alignItems:"center",gap:.75,px:1,py:0,height:22,borderRadius:1,fontSize:"inherit",lineHeight:1.5,color:"inherit",opacity:1,bgcolor:t=>e?Mx(t).active:"transparent",transition:"opacity .2s ease, background-color .2s ease, color .2s ease","&:hover, &:focus-visible":{bgcolor:t=>Mx(t).hover,color:t=>Mx(t).hoverText},"& .ready-dot":{width:6,height:6,borderRadius:"50%",bgcolor:t=>Mx(t).dot,boxShadow:t=>`0 0 0 3px ${Mx(t).dotRing}`},"& .ready-count":{fontWeight:500,color:t=>Mx(t).readyText}});var P0=C(P(),1);function FFr(){let{entries:e}=mx(),t=an(),r=(0,$Fr.useCallback)(()=>t("/updates"),[t]),{matches:n,chords:o}=fo("openUpdates");if(Zi(n,r),!ch)return null;let i=e.filter(E5).length;return(0,P0.jsxs)(P0.Fragment,{children:[(0,P0.jsx)(sr,{describeChild:!0,placement:"top-end",title:(0,P0.jsx)(Rd,{label:"Updates",chords:o}),children:(0,P0.jsxs)(nr,{component:da,to:"/updates","aria-label":i?`Updates: ${i} node${i>1?"s have":" has"} an update ready`:"Updates",sx:BFr(i>0),children:[i>0&&(0,P0.jsx)("span",{className:"ready-dot","aria-hidden":!0}),(0,P0.jsxs)("span",{children:["v",ch]}),i>0&&(0,P0.jsxs)("span",{className:"ready-count",children:[i," ready"]})]})}),(0,P0.jsx)(OFr,{})]})}var Ww=C(P(),1);function zFr({socket:e}){return(0,Ww.jsx)(Q$r,{start:(0,Ww.jsx)(NFr,{rateLimits:e.rateLimits,harnessRateLimits:e.harnessRateLimits}),end:(0,Ww.jsxs)(Ww.Fragment,{children:[(0,Ww.jsx)(cFr,{}),(0,Ww.jsx)(FFr,{})]})})}var UFr=C(ee(),1);var Gw=C(P(),1),OPo=2e4;function HFr(){let{entries:e,refresh:t}=mx(),[r,n]=(0,UFr.useState)(),o=e.find(l=>l.local)?.status?.extension,i=o?.behind&&o.updateLink&&o.latest?o:void 0,a=i!==void 0&&r!==i.latest,s=()=>n(i?.latest);return(0,Gw.jsx)(Nu,{open:a,children:(0,Gw.jsxs)(no,{severity:"info",variant:"filled",action:(0,Gw.jsxs)(Gw.Fragment,{children:[(0,Gw.jsx)(ht,{color:"inherit",size:"small",href:i?.updateLink,onClick:()=>setTimeout(t,OPo),children:"Install"}),(0,Gw.jsx)(ht,{color:"inherit",size:"small",onClick:s,children:"Dismiss"})]}),children:["assist extension v",i?.connected," \u2192 v",i?.latest]})})}var xEe=C(ee(),1);var bEe=C(ee(),1);function WFr(e,t,r){if(!e)return"Select a repo to search files.";if(r.error)return"Couldn't search files in this repo.";if(!(r.files.length>0||r.loading))return t?"No matching files.":"No files in this repo."}var j5=C(P(),1),BPo={display:"flex",gap:1,alignItems:"center",minWidth:0},$Po={display:"flex",gap:1,alignItems:"baseline",minWidth:0,overflow:"hidden"},FPo={fontFamily:"fontFamilyMono",fontSize:13,whiteSpace:"nowrap"},zPo={fontFamily:"fontFamilyMono",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function UPo(e){let t=e.lastIndexOf("/");return t===-1?{dir:"",basename:e}:{dir:e.slice(0,t),basename:e.slice(t+1)}}function GFr({files:e,highlight:t,onHighlight:r,onSelect:n}){return(0,j5.jsx)(eg,{dense:!0,sx:{py:0},children:e.map((o,i)=>{let{dir:a,basename:s}=UPo(o);return(0,j5.jsxs)(jr,{selected:i===t,onMouseEnter:()=>r(i),onClick:()=>n(o),sx:BPo,children:[(0,j5.jsx)(F2e,{path:o}),(0,j5.jsxs)(G,{sx:$Po,children:[(0,j5.jsx)(Ce,{component:"span",sx:FPo,children:s}),(0,j5.jsx)(Ce,{component:"span",color:"text.secondary",sx:zPo,children:a})]})]},o)})})}var gEe=C(P(),1),HPo={maxHeight:420,overflowY:"auto"},WPo={px:2,py:2,fontSize:13};function VFr({message:e,files:t,highlight:r,onHighlight:n,onSelect:o}){return(0,gEe.jsx)(G,{sx:HPo,children:e?(0,gEe.jsx)(Ce,{color:"text.secondary",sx:WPo,children:e}):(0,gEe.jsx)(GFr,{files:t,highlight:r,onHighlight:n,onSelect:o})})}var qFr=C(P(),1),GPo={mt:6,alignSelf:"flex-start"};function yEe({onClose:e,onEntered:t,centered:r=!1,children:n}){return(0,qFr.jsx)(vl,{open:!0,onClose:e,maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:r?void 0:GPo},transition:{onEntered:t}},children:n})}var vEe=C(ee(),1);var jFr={files:[],loading:!1,error:!1};function YFr(e,t){let[r,n]=(0,vEe.useState)(jFr),o=yr();return(0,vEe.useEffect)(()=>{if(!e){n(jFr);return}let i=!1;return n(s=>({...s,loading:!0})),(async()=>{try{let s=await Jt(tn(`/api/files?cwd=${encodeURIComponent(e)}&q=${encodeURIComponent(t)}`,o));if(!s.ok)throw new Error(`HTTP ${s.status}`);let l=await s.json();if(i)return;n({files:Array.isArray(l.files)?l.files:[],loading:!1,error:!1})}catch(s){Pr(s,"file search"),i||n({files:[],loading:!1,error:!0})}})(),()=>{i=!0}},[e,t,o]),r}var KI=C(P(),1);function VPo(e,t,r){let n=new URLSearchParams({path:e});return t&&n.set("cwd",t),t&&r&&n.set("node",r),`/file?${n}`}function KFr({onClose:e}){let{worktreeNode:t}=to();return(0,KI.jsx)(ic.Provider,{value:t,children:(0,KI.jsx)(qPo,{onClose:e})})}function qPo({onClose:e}){let{worktreeCwd:t,worktreeNode:r}=to(),[n,o]=(0,bEe.useState)(""),i=YFr(t,n),a=an(),s=(0,bEe.useRef)(null),l=h=>a(VPo(h,t,r)),{highlight:u,setHighlight:d,onKeyDown:f}=N5(i.files,n,l,e),p=h=>{l(h),e()};return(0,KI.jsxs)(yEe,{onClose:e,onEntered:()=>s.current?.focus(),children:[(0,KI.jsx)(bk,{autoFocus:!0,inputRef:s,value:n,onChange:o,onKeyDown:f,placeholder:"Search files by name..."}),(0,KI.jsx)(VFr,{message:WFr(t,n,i),files:i.files,highlight:u,onHighlight:d,onSelect:p})]})}function XFr(e){Zi(fo("quickOpen").matches,e)}var QFr=C(P(),1);function ZFr(){let[e,t]=(0,xEe.useState)(!1);return XFr((0,xEe.useCallback)(()=>t(!0),[])),e?(0,QFr.jsx)(KFr,{onClose:()=>t(!1)}):null}var SEe=C(P(),1);function JFr({notice:e,onClose:t,onView:r}){let n=e?.sessionId??null;return(0,SEe.jsx)(Nu,{open:e!==null,autoHideDuration:6e3,onClose:t,children:(0,SEe.jsx)(no,{severity:"success",variant:"filled",onClose:t,action:n!==null?(0,SEe.jsx)(ht,{color:"inherit",size:"small",onClick:()=>r(n),children:"View"}):void 0,children:e?.message})})}var Ine=C(ee(),1);function zG(e){let t=["claude"];return e.exposeCodexActions&&t.push("codex"),e.exposePiActions&&t.push("pi"),t}var fzr=C(ee(),1);var ezr=C(P(),1),tzr=nt((0,ezr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle");var jPo={connected:"success.main",connecting:"warning.main",disconnected:"error.main","version-blocked":"error.main"};function rzr(e){return e?jPo[e]:"success.main"}function nzr(e){return e.split("-")[0].split(".").map(Number)}function ozr(e,t){if(!e||!t||e===t)return;let r=nzr(e),n=nzr(t);for(let o=0;o<Math.max(r.length,n.length);o++){let i=(r[o]??0)-(n[o]??0);if(Number.isNaN(i))return;if(i!==0)return i<0?"behind":"ahead"}}var XI=C(P(),1),YPo={height:16,fontSize:10},KPo={opacity:.6,fontSize:"0.85em"};function XPo(e,t){if(t===e.local)return"this machine";let r=e.links.find(n=>n.name===t);return r?r.error?`${r.state}: ${r.error}`:r.state:""}function Ane({nodes:e,name:t,showVersion:r=!1}){let n=mEe()??ch,o=e.links.find(a=>a.name===t),i=ozr(o?.peerVersion,n);return(0,XI.jsx)(sr,{title:XPo(e,t),placement:"right",children:(0,XI.jsxs)(G,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75},children:[(0,XI.jsx)(tzr,{sx:{fontSize:8,color:rzr(o?.state)}}),t,r&&o?.peerVersion&&(0,XI.jsxs)(G,{component:"span",sx:KPo,children:["v",o.peerVersion]}),i&&(0,XI.jsx)(Vn,{label:i,size:"small",color:i==="behind"?"warning":"info",sx:YPo})]})})}var ZI=C(P(),1),ZPo={opacity:.6},QPo={display:"inline-flex",alignItems:"center",gap:.5,px:.5,border:1,borderStyle:"dashed",borderRadius:1};function izr({nodes:e,name:t,clone:r}){let n=(0,ZI.jsx)(Ane,{nodes:e,name:t});return r.kind==="cloned"?n:r.kind==="unavailable"?(0,ZI.jsx)(G,{component:"span",sx:ZPo,children:n}):(0,ZI.jsx)(sr,{title:TG(t,r.cloneTarget),children:(0,ZI.jsxs)(G,{component:"span",sx:QPo,children:[(0,ZI.jsx)(SG,{sx:{fontSize:14}}),n]})})}var szr=C(P(),1),JPo={px:1.5,borderRadius:.75,fontSize:12,fontWeight:600,color:"text.secondary","&:hover":{color:"text.primary",bgcolor:"action.hover"},"&[aria-checked='true']":{color:"primary.main",bgcolor:"action.selected"},"&.Mui-focusVisible":{outline:2,outlineColor:"primary.main"}};function azr({value:e,label:t,checked:r,autoFocus:n,onSelect:o}){return(0,szr.jsx)(nr,{role:"radio","aria-checked":r,"data-value":e,tabIndex:r?0:-1,autoFocus:n&&r,onClick:o,sx:JPo,children:t})}var lzr={ArrowRight:1,ArrowLeft:-1};function eAo(e,t,r){if(e.key==="Tab"){let n=t+(e.shiftKey?-1:1);return n>=0&&n<r?n:void 0}return(t+lzr[e.key]+r)%r}function czr(e,t,r,n){return o=>{if(o.key==="ArrowUp"||o.key==="ArrowDown"){if(!n)return;o.preventDefault(),n();return}if(o.key!=="Tab"&&!lzr[o.key]){KT(o);return}let i=eAo(o,e.indexOf(t),e.length);i!==void 0&&(o.preventDefault(),r(e[i]),o.currentTarget.querySelector(`[data-value="${e[i]}"]`)?.focus())}}var uzr=C(ee(),1);function UG(e){return e?.querySelector('[aria-checked="true"]')}function dzr(e,t){(0,uzr.useEffect)(()=>{let r=e.current;if(!r?.contains(document.activeElement))return;let n=UG(r);n&&n!==document.activeElement&&n.focus()},[e,t])}var Uat=C(P(),1),tAo={border:1,borderColor:"divider",borderRadius:1,height:40,p:"2px",flexShrink:0};function TEe({label:e,options:t,value:r,onChange:n,optionLabel:o=u=>u,groupRef:i,autoFocus:a,onTrack:s,onToggleRow:l}){return dzr(i,r),(0,Uat.jsx)(kt,{ref:i,direction:"row",role:"radiogroup","aria-label":e,spacing:"2px",onFocus:s,onKeyDown:czr(t,r,n,l),sx:tAo,children:t.map(u=>(0,Uat.jsx)(azr,{value:u,label:o(u),checked:u===r,autoFocus:a,onSelect:()=>n(u)},u))})}var Hat=C(P(),1);function pzr({value:e,onChange:t,cloneState:r}){let{nodes:n,names:o,visible:i}=Cl(),a=(0,fzr.useRef)(null);return!i||!n||!e?null:(0,Hat.jsx)(TEe,{label:"Machine",options:o,value:e,onChange:t,optionLabel:s=>(0,Hat.jsx)(izr,{nodes:n,name:s,clone:r(s)}),groupRef:a,autoFocus:!1,onTrack:()=>{}})}var wEe=C(P(),1);function hzr({prompt:e,children:t}){return(0,wEe.jsxs)(kt,{children:[e,(0,wEe.jsx)(kt,{spacing:1,sx:{px:1.5,pb:1.5},children:t})]})}var gzr=C(P(),1),rAo=".MuiOutlinedInput-notchedOutline",nAo={"& .MuiOutlinedInput-root":{px:"18px",py:2,minHeight:92,alignItems:"flex-start",bgcolor:"transparent",borderRadius:0,fontSize:15},[`&&& ${rAo}`]:{border:0},"& textarea::placeholder":{color:"text.disabled",opacity:1}};function mzr({value:e,onChange:t,placeholder:r,inputRef:n,autoFocus:o,onTrack:i}){return(0,gzr.jsx)($n,{sx:nAo,value:e,onChange:a=>t(a.target.value),onKeyDown:KT,onFocus:i,onSelect:i,inputRef:n,placeholder:r,autoFocus:o,fullWidth:!0,multiline:!0,minRows:3,maxRows:12,slotProps:{htmlInput:{"aria-label":"Prompt"}}})}var xzr=C(ee(),1);var A0={draft:{placeholder:"Describe the backlog item to draft...",submitLabel:"Start draft",autoStartLabel:"Start draft + auto start",sessionMode:"assist-draft"},bug:{placeholder:"Describe the bug: what happened, what you expected...",submitLabel:"File bug",autoStartLabel:"File bug + auto start",sessionMode:"assist-bug"},prompt:{placeholder:zSe,submitLabel:"Start session"},design:{placeholder:"Describe the design task...",submitLabel:"Start design"}};function CEe(e){let t=A0[e];return"autoStartLabel"in t?t.autoStartLabel:void 0}var yzr=Object.keys(A0);var Wat=C(P(),1);function vzr({anchor:e,harness:t,harnesses:r,onPick:n,onClose:o}){return(0,Wat.jsx)(Rs,{open:e!==null,anchorEl:e,onClose:o,slotProps:{list:{dense:!0,"aria-label":"Harness"}},children:r.map(i=>(0,Wat.jsx)(jr,{role:"menuitemradio","aria-checked":i===t,selected:i===t,onClick:()=>{n(i),o()},sx:{fontSize:13},children:$c(i)},i))})}var QI=C(P(),1);function bzr(e){return t=>t==="prompt"&&e?(0,QI.jsxs)(QI.Fragment,{children:["prompt",(0,QI.jsx)(G,{component:"span",sx:{fontWeight:400,whiteSpace:"pre"},children:` \xB7 ${$c(e)}`}),(0,QI.jsx)(gp,{sx:{fontSize:18,mr:-.75}})]}):t}var JI=C(P(),1);function Szr({draft:e,harness:t,harnesses:r,focus:n}){let[o,i]=(0,xzr.useState)(null),a=e.mode==="prompt"&&r.length>1,s=()=>i(UG(n.modeRef.current)??null),l=u=>{a&&u==="prompt"?s():e.setMode(u)};return(0,JI.jsxs)(JI.Fragment,{children:[(0,JI.jsx)(TEe,{label:"Mode",options:yzr,value:e.mode,onChange:l,optionLabel:bzr(r.length>1?t:void 0),groupRef:n.modeRef,autoFocus:n.autoFocus==="mode",onTrack:n.trackMode,onToggleRow:a?s:void 0}),(0,JI.jsx)(vzr,{anchor:o,harness:t,harnesses:r,onPick:e.setHarness,onClose:()=>i(null)})]})}var Mzr=C(ee(),1);var Gat=C(P(),1),oAo={zIndex:e=>e.zIndex.modal+1};function Tzr({open:e,anchor:t,children:r}){return(0,Gat.jsx)(RD,{open:e,anchorEl:t,placement:"bottom-start",sx:oAo,children:(0,Gat.jsx)(Zr,{sx:{maxHeight:240,overflowY:"auto",width:t?.clientWidth},onMouseDown:n=>n.preventDefault(),children:r})})}var wzr=C(P(),1),Czr=nt((0,wzr.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var Vat=C(P(),1),iAo={fontSize:13,height:36,pr:1,cursor:"pointer","& input":{cursor:"text"}},aAo={fontSize:16,color:"text.disabled"};function kzr(e){return{htmlInput:{role:"combobox","aria-label":"Repo","aria-expanded":e},input:{sx:iAo,endAdornment:(0,Vat.jsx)(fRe,{position:"end",children:(0,Vat.jsx)(Czr,{sx:aAo})})}}}var _zr=C(pD(),1);function Ezr({open:e,highlighted:t,accept:r,close:n,navigate:o,openList:i}){return a=>{if(!e){if(a.key==="ArrowDown"){a.preventDefault(),i();return}KT(a);return}if(a.key!=="Escape"){if(a.key==="Enter"){if(a.preventDefault(),t===void 0)return;(0,_zr.flushSync)(()=>{r(t),n()}),KT(a);return}if(a.key!=="Tab"){o(a);return}t!==void 0&&r(t),n()}}}function kEe(e,t){let r=t.trim().toLowerCase();return r?e.filter(n=>Cx(n).toLowerCase().includes(r)):e}var qat=C(ee(),1);function Rzr(){let[e,t]=(0,qat.useState)(!1),[r,n]=(0,qat.useState)("");return{open:e,query:r,show:()=>t(!0),filterBy:o=>{n(o),t(!0)},close:()=>{t(!1),n("")}}}var Azr=C(ee(),1);var Pzr=e=>e?Cx(e):"";function Lzr(e){let[t,r]=(0,Azr.useState)(()=>Pzr(e));return{text:t,setText:r,showRepo:n=>r(Pzr(n))}}function Izr(e,t,r){let n=Rzr(),o=Lzr(t),i=kEe(e,n.query),a=d=>{r(d),o.showRepo(d)},s=N5(i,n.query,a,n.close),l=()=>s.setHighlight(Math.max(e.indexOf(t),0)),u=()=>{l(),n.show()};return{open:n.open,text:o.text,filtered:i,highlight:s.highlight,setHighlight:s.setHighlight,onKeyDown:Ezr({open:n.open,highlighted:i[s.highlight],accept:a,close:n.close,navigate:s.onKeyDown,openList:u}),onClick:()=>{n.open||u()},onType:d=>{o.setText(d),n.filterBy(d)},onFocus:l,onBlur:()=>{n.close(),o.showRepo(t)},pick:d=>{a(d),n.close()}}}var HG=C(P(),1);function Dzr({repos:e,value:t,onChange:r,inputRef:n,autoFocus:o,onTrack:i}){let a=Izr(e,t,r),s=(0,Mzr.useRef)(null);return(0,HG.jsxs)(G,{ref:s,sx:{flex:1,minWidth:0},children:[(0,HG.jsx)($n,{value:a.text,onChange:l=>a.onType(l.target.value),onFocus:l=>{l.target.select(),a.onFocus(),i()},inputRef:n,autoFocus:o,onClick:a.onClick,onBlur:a.onBlur,onKeyDown:a.onKeyDown,placeholder:"Repo",size:"small",fullWidth:!0,slotProps:kzr(a.open)}),(0,HG.jsx)(Tzr,{open:a.open,anchor:s.current,children:(0,HG.jsx)(V_e,{repos:a.filtered,selected:t,highlight:a.highlight,onHighlight:a.setHighlight,onSelect:a.pick})})]})}var Y5=C(P(),1);function Nzr({cloneState:e,...t}){let{draft:r,focus:n}=t,{repos:o}=to();return(0,Y5.jsxs)(hzr,{prompt:(0,Y5.jsx)(mzr,{value:r.prompt,onChange:r.setPrompt,placeholder:A0[r.mode].placeholder,inputRef:n.promptRef,autoFocus:n.autoFocus==="prompt",onTrack:n.trackPrompt}),children:[(0,Y5.jsxs)(kt,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[(0,Y5.jsx)(Dzr,{repos:o,value:r.cwd,onChange:r.setCwd,inputRef:n.repoRef,autoFocus:n.autoFocus==="repo",onTrack:n.trackRepo}),(0,Y5.jsx)(Szr,{...t})]}),(0,Y5.jsx)(pzr,{value:r.node,onChange:r.setNode,cloneState:e})]})}var $zr=C(P(),1),Ozr=[["Enter","start"],["Shift+Enter","newline"],["Esc","close"]];function Bzr({submitLabel:e,disabled:t=!1,loading:r=!1,onClick:n}){return(0,$zr.jsx)(ht,{type:"submit",onClick:n,variant:"contained",disabled:t,loading:r,children:e})}var eM=C(P(),1),sAo=e=>({alignItems:"center",flexWrap:"wrap",gap:"14px",py:"10px",pl:"18px",pr:1.5,borderTop:1,borderColor:e.tokens.color.lineSoft,bgcolor:"background.default",fontSize:12,color:"text.secondary"}),lAo=e=>({mr:.5,px:"5px",border:1,borderColor:"divider",borderRadius:"4px",fontFamily:e.typography.fontFamilyMono,fontSize:10.5,color:"text.primary"});function Fzr(e){return(0,eM.jsxs)(kt,{direction:"row",sx:sAo,children:[Ozr.map(([t,r])=>(0,eM.jsxs)("span",{children:[(0,eM.jsx)(G,{component:"kbd",sx:lAo,children:t}),r]},t)),(0,eM.jsx)(G,{sx:{flex:1}}),(0,eM.jsx)(Bzr,{...e})]})}var _Ee=C(ee(),1);function zzr(){let[e,t]=(0,_Ee.useState)(!1);return(0,_Ee.useEffect)(()=>{let r=o=>t(o.shiftKey),n=()=>t(!1);return globalThis.addEventListener("keydown",r),globalThis.addEventListener("keyup",r),globalThis.addEventListener("blur",n),()=>{globalThis.removeEventListener("keydown",r),globalThis.removeEventListener("keyup",r),globalThis.removeEventListener("blur",n)}},[]),e}function Uzr(e,t){let r=zzr();return e==="clone"?"Clone":(r?CEe(t):void 0)??A0[t].submitLabel}var Wzr=C(P(),1);function Hzr({draft:e,targetKind:t,onClick:r}){return(0,Wzr.jsx)(Fzr,{submitLabel:Uzr(t,e.mode),onClick:r,disabled:t==="blocked",loading:e.modePending})}var tM=C(ee(),1);function Gzr(e,t){let r=(0,tM.useRef)(e),n=(0,tM.useRef)(null),o=(0,tM.useRef)(null),i=(0,tM.useRef)(null),a=(0,tM.useCallback)(u=>{n.current=u;let{field:d,selectionStart:f,selectionEnd:p}=r.current;u&&d==="prompt"&&u.setSelectionRange(f,p)},[]),s=u=>{let d=u.target;t({field:"prompt",selectionStart:d.selectionStart,selectionEnd:d.selectionEnd})},l=()=>{if(i.current?.closest("form")?.contains(document.activeElement))return;let{field:u}=r.current;({repo:o.current,mode:UG(i.current),prompt:n.current}[u]??n.current)?.focus()};return{autoFocus:e.field,promptRef:a,repoRef:o,modeRef:i,trackPrompt:s,trackRepo:()=>t({...e,field:"repo"}),trackMode:()=>t({...e,field:"mode"}),restore:l}}function cAo(e,t,r){return e?r.kind==="cloned"?{kind:"launch",cwd:r.cwd}:r.kind==="clonable"?{kind:"clone",prompt:j_e(r,t)}:{kind:"blocked"}:{kind:"launch",cwd:e}}function Vzr(e,t){let{names:r,visible:n}=Cl(),o=H_e(t,n?r:[void 0]);return{cloneState:o,target:cAo(t,e,o(e))}}var Yzr=C(ee(),1);function uAo(e,t,r){let n=r===!0&&CEe(e)!==void 0;return!t&&!n?[]:[{...t&&{node:t},...n&&{autoApprove:!0}}]}function EEe({mode:e,harness:t,prompt:r,cwd:n,node:o,autoApprove:i},a){let s=n||void 0,l=o?[o]:[];if(e==="prompt"){t==="claude"?a.onCreate(r,s,...l):a.onCreateHarness(t,r,s,...l);return}if(e==="design"){a.onCreateDesign(r,s,...l);return}let u=uAo(e,o,i);Q_r(A0[e].sessionMode,n,(d,f)=>a.onCreateAssist(d,f,...u),()=>{},r)}function qzr(e,t,r,n,o=!1){return r.kind==="blocked"||e.modePending?!1:r.kind==="clone"?(D_e(r.prompt,n.onCreateAssist),!0):(EEe({mode:e.mode,harness:t,prompt:e.prompt,cwd:r.cwd,node:e.node,autoApprove:o},n),e.clear(),!0)}var REe=C(ee(),1);function jzr(e,t){let[r,n]=(0,REe.useState)(null);return(0,REe.useEffect)(()=>{!r||e.modePending||(n(null),e.modeError||t(r.autoApprove))},[r,e.modePending,e.modeError,t]),o=>{e.modePending?n({autoApprove:o}):t(o)}}function Kzr(e,t,r,n,o){let i=(0,Yzr.useRef)(!1),a=jzr(e,s=>{qzr(e,t,r,n,s)&&o()});return{onSubmit:s=>{s.preventDefault();let l=i.current;i.current=!1,a(l)},onSubmitClick:s=>{i.current=s.shiftKey}}}var Lne=C(ee(),1);function Xzr(e,t){let r=(0,Lne.useRef)(e),n=(0,Lne.useRef)(null);return(0,Lne.useEffect)(()=>{if(r.current&&!e){let o=n.current;o?.isConnected?o.focus():t()}r.current=e},[e,t]),o=>{n.current=o.target}}var Qzr=C(P(),1),dAo={border:0,margin:0,padding:0,minWidth:0};function Zzr({loading:e,restoreFocus:t,children:r}){let n=Xzr(e,t);return(0,Qzr.jsx)("fieldset",{disabled:e,style:dAo,onFocus:n,children:r})}var AEe=C(P(),1);function PEe({error:e,onRetry:t}){return e?(0,AEe.jsxs)(no,{severity:"error",sx:{mx:2,my:1},action:t&&(0,AEe.jsx)(ht,{color:"inherit",size:"small",onClick:t,children:"Retry"}),children:["Couldn't load this repo's default mode (",e,"). Pick a mode or retry."]}):null}var K5=C(P(),1);function Jzr({draft:e,launchers:t,onClose:r}){let n=Gzr(e.focus,e.setFocus),o=zG(_0()),i=o.includes(e.harness)?e.harness:"claude",{target:a,cloneState:s}=Vzr(e.node,e.cwd),{onSubmit:l,onSubmitClick:u}=Kzr(e,i,a,t,r);return(0,K5.jsx)(yEe,{onClose:r,onEntered:n.restore,centered:!0,children:(0,K5.jsx)("form",{onSubmit:l,children:(0,K5.jsxs)(Zzr,{loading:e.modePending,restoreFocus:n.restore,children:[(0,K5.jsx)(Nzr,{draft:e,harness:i,harnesses:o,focus:n,cloneState:s}),(0,K5.jsx)(PEe,{error:e.modeError,onRetry:e.retryMode}),(0,K5.jsx)(Hzr,{draft:e,targetKind:a.kind,onClick:u})]})})})}var rM=C(ee(),1);async function fAo(e){try{let t=e?`?cwd=${encodeURIComponent(e)}`:"",r=await Jt(`/api/new-session-defaults${t}`);if(!r.ok)return{error:`HTTP ${r.status}`};let n=await r.json();if(Object.hasOwn(A0,n?.mode))return{mode:n.mode};throw new Error(`unknown mode ${JSON.stringify(n?.mode)}`)}catch(t){return Pr(t,"new-session defaults"),{error:t instanceof Error?t.message:String(t)}}}function LEe(e,t=0){let[r,n]=(0,rM.useState)(0),[o,i]=(0,rM.useState)(null),a=(0,rM.useCallback)(()=>n(l=>l+1),[]);if((0,rM.useEffect)(()=>{let l=!1;return fAo(e).then(u=>{l||i({cwd:e,opens:t,attempt:r,outcome:u})}),()=>{l=!0}},[e,t,r]),!o)return null;let{outcome:s}=o;return{mode:"mode"in s?s.mode:"prompt",pending:o.cwd!==e||o.opens!==t||o.attempt!==r,error:"error"in s?s.error:void 0,retry:a}}function IEe(e,t){if(!(e!==void 0||!t||t.pending))return t.error}function eUr(e,{visible:t,names:r,selected:n}){if(t)return e&&r.includes(e)?e:n}var X5=C(ee(),1);var tUr={field:"prompt",selectionStart:0,selectionEnd:0};function rUr(){let[e,t]=EH("new-session"),[r,n]=(0,X5.useState)(),[o,i]=(0,X5.useState)(),[a,s]=(0,X5.useState)("claude"),[l,u]=(0,X5.useState)(),[d,f]=(0,X5.useState)(tUr),p=(0,X5.useCallback)(()=>{t(""),n(void 0),i(void 0),u(void 0),f(tUr)},[t]);return{prompt:e,cwd:r,mode:o,harness:a,node:l,focus:d,setPrompt:t,setNode:u,setCwd:n,setMode:i,setHarness:s,setFocus:f,clear:p}}function nUr(e,t=LEe){let{selectedCwd:r}=to(),n=Cl(),o=rUr(),i=o.cwd??r,a=t(i,e);return a?{...o,cwd:i,mode:o.mode??a.mode,modePending:o.mode===void 0&&a.pending,modeError:IEe(o.mode,a),retryMode:a.retry,node:eUr(o.node,n)}:null}function oUr(e){Zi(fo("newSession").matches,e)}var iUr=C(ee(),1);function aUr(e,t){let{selectedCwd:r}=to(),[n,o]=al(),i=n.get("new"),a=n.get("newCwd")??r,{setPrompt:s,setCwd:l,setFocus:u}=e??{};(0,iUr.useEffect)(()=>{i===null||!s||!l||!u||(i&&(s(i),l(a),u({field:"prompt",selectionStart:i.length,selectionEnd:i.length})),t(),o(d=>(d.delete("new"),d.delete("newCwd"),d),{replace:!0}))},[i,a,s,l,u,t,o])}var lUr=C(P(),1);function sUr({launchers:e}){let[t,r]=(0,Ine.useState)(!1),[n,o]=(0,Ine.useState)(0),i=nUr(n),a=(0,Ine.useCallback)(()=>{r(!0),o(s=>s+1)},[]);return oUr(a),aUr(i,a),!t||!i?null:(0,lUr.jsx)(Jzr,{draft:i,launchers:e,onClose:()=>r(!1)})}var MEe=C(P(),1);function cUr({reconnecting:e}){return(0,MEe.jsx)(Nu,{open:e,children:(0,MEe.jsx)(no,{severity:"info",variant:"filled",icon:(0,MEe.jsx)(Ao,{size:16,color:"inherit"}),children:"Reconnecting\u2026"})})}var mv=C(P(),1);function uUr({socket:e,onViewLaunchedSession:t}){return(0,mv.jsxs)(mv.Fragment,{children:[(0,mv.jsx)(ZFr,{}),(0,mv.jsx)(sUr,{launchers:{onCreate:e.createSession,onCreateDesign:e.createDesignSession,onCreateHarness:e.createHarnessSession,onCreateAssist:e.createAssistSession}}),(0,mv.jsx)(cUr,{reconnecting:e.reconnecting}),(0,mv.jsx)(HFr,{}),(0,mv.jsx)(kl,{error:e.error,onClose:e.clearError}),(0,mv.jsx)(JFr,{notice:e.success,onClose:e.clearSuccess,onView:t})]})}var Dx=C(ee(),1);var pAo=6e4;function hAo(e,t,r){return t.map(n=>e.find(o=>o.name===n)??{name:n,local:n===r,loading:!0})}function DEe(e){let t=e.nodes?.local,r=e.names.join(`
|
|
4061
|
+
`,pFr={content:'""',position:"absolute",borderRadius:"inherit",background:"conic-gradient(from calc(var(--rainbow-pill-h) * 1deg) in oklch longer hue, oklch(66% 0.21 0), oklch(66% 0.21 0))",animation:`${RPo} 1.8s linear infinite`},APo={display:"inline-flex",alignItems:"center",px:1.5,py:"3px",borderRadius:999,position:"relative",isolation:"isolate",fontWeight:700,animation:`${PPo} 1.6s ease-in-out infinite`,"&::before":{...pFr,inset:0,zIndex:-1},"&::after":{...pFr,inset:"-5px",zIndex:-2,filter:"blur(9px)",opacity:.85},"& span":{color:Gl.rainbowPill.text,textShadow:Gl.rainbowPill.shadow},"@media (prefers-reduced-motion: reduce)":{animation:"none","&::before, &::after":{animation:"none"}}};function hFr({children:e}){return(0,jI.jsxs)(jI.Fragment,{children:[(0,jI.jsx)(H3,{styles:EPo}),(0,jI.jsx)(G,{component:"span","data-testid":"rainbow-pill",sx:APo,children:e})]})}function mFr({pct:e,timeLabel:t}){return[Math.round(e),...(t.match(/\d+/g)??[]).map(Number)].join(",")}function gFr(e){if(e.length!==2)return!1;let[t,r]=e;return mFr(t)===mFr(r)}var Hw=C(P(),1);function vFr({rateLimits:e}){let t=k0(3e4),r=[{window:e.five_hour,windowSeconds:18e3,fallbackLabel:"5h"},{window:e.seven_day,windowSeconds:604800,fallbackLabel:"7d"}].filter(i=>i.window?.used_percentage!=null),n=gFr(r.map(i=>({pct:i.window?.used_percentage??0,timeLabel:uEe(i.window?.resets_at,i.fallbackLabel,t)}))),o=r.map((i,a)=>(0,Hw.jsxs)(yFr.Fragment,{children:[a>0?(0,Hw.jsx)(G,{component:"span",sx:{color:FG,mr:.5},children:","}):null,(0,Hw.jsx)(fFr,{window:i.window,windowSeconds:i.windowSeconds,fallbackLabel:i.fallbackLabel,now:t})]},i.fallbackLabel));return n?(0,Hw.jsx)(hFr,{children:o}):(0,Hw.jsx)(Hw.Fragment,{children:o})}var G5=C(P(),1);function xFr({groups:e}){return(0,G5.jsx)(G5.Fragment,{children:e.map((t,r)=>(0,G5.jsxs)(bFr.Fragment,{children:[(0,G5.jsx)(G,{component:"span",sx:{color:FG,ml:r>0?1:0,mr:.5},children:$c(t.harness)}),(0,G5.jsx)(vFr,{rateLimits:t.rateLimits})]},t.harness))})}var SFr={root:{fontFamily:"fontFamilyMono",fontSize:12,display:"grid",gap:1},group:{display:"grid",gap:"2px"},heading:{color:e=>e.tokens.color.onAppBar.secondary},foot:{pt:.75,opacity:.6,borderTop:"1px solid color-mix(in srgb, currentColor 18%, transparent)"}};function LPo(e){if(e==="over")return{level:"warn",boundary:100};if(e==="warn")return{level:"ok",boundary:75}}function IPo(e){if(e==="ok")return{level:"warn",boundary:75};if(e==="warn")return{level:"over",boundary:100}}function MPo(e,t,r,n){if(e>=t)return;let o=e/t;return Math.round(r-n*(1-o))}function CFr(e,t,r,n){if(t==null)return{kind:"unprojectable"};let o=mat(t,r,n);if(o==null)return{kind:"unprojectable"};let i=bx(e,t,r,n),a=LPo(i),s=IPo(i);return{kind:"projected",recovery:a&&{level:a.level,pct:a.boundary*o,at:MPo(e,a.boundary,t,r)},worse:s&&{level:s.level,pct:s.boundary*o}}}function fEe(e){return t=>t.tokens.color.onAppBar.level[e]}function kFr(e,t){return e.at==null?"not before reset":`${e.level==="ok"?"green":"under"} in ${hG(e.at,t)}`}var V5=C(P(),1),_Fr={display:"contents"};function Oat({direction:e,threshold:t}){let r=e==="back";if(!t)return(0,V5.jsxs)(G,{component:"span",sx:_Fr,children:[(0,V5.jsx)("span",{}),(0,V5.jsx)("span",{})]});let n=(0,V5.jsx)(G,{component:"span",sx:{opacity:.6},children:r?"\u2190":"\u2192"}),o=(0,V5.jsxs)(G,{component:"span",sx:{color:fEe(t.level),textAlign:"right"},children:[Math.round(t.pct),"%"]});return(0,V5.jsxs)(G,{component:"span",sx:_Fr,children:[r?o:n,r?n:o]})}var EFr={row:{display:"grid",gridTemplateColumns:"2.5ch 4ch 1ch 4ch 1ch 4ch auto",alignItems:"baseline",gap:.75,fontVariantNumeric:"tabular-nums"},pctWeight:500,note:{pl:.75,color:e=>e.tokens.color.onAppBar.secondary}};var q5=C(P(),1);function RFr({label:e,pct:t,resetsAt:r,windowSeconds:n,now:o}){let i=EFr,a=bx(t,r,n,o),s=CFr(t,r,n,o),l=s.kind==="projected"?s:void 0;return(0,q5.jsxs)(G,{sx:i.row,children:[(0,q5.jsx)(G,{component:"span",sx:{minWidth:"2ch"},children:e}),(0,q5.jsx)(Oat,{direction:"back",threshold:l?.recovery}),(0,q5.jsxs)(G,{component:"span",sx:{minWidth:"4ch",textAlign:"right",fontWeight:i.pctWeight,color:fEe(a)},children:[Math.round(t),"%"]}),(0,q5.jsx)(Oat,{direction:"forward",threshold:l?.worse}),(0,q5.jsx)(G,{component:"span",sx:i.note,children:l?l.recovery&&kFr(l.recovery,o):"no projection yet"})]})}function pEe(e){return[{label:"5h",window:e.five_hour,windowSeconds:18e3},{label:"7d",window:e.seven_day,windowSeconds:604800}].flatMap(t=>t.window?.used_percentage==null?[]:[{label:t.label,pct:t.window.used_percentage,resetsAt:t.window.resets_at,windowSeconds:t.windowSeconds}])}var AFr=C(P(),1);function PFr({rateLimits:e,now:t}){return pEe(e).map(r=>(0,AFr.jsx)(RFr,{label:r.label,pct:r.pct,resetsAt:r.resetsAt,windowSeconds:r.windowSeconds,now:t},r.label))}var YI=C(P(),1);function LFr({groups:e}){let t=k0(3e4),r=SFr;return(0,YI.jsxs)(G,{sx:r.root,children:[e.map(n=>(0,YI.jsxs)(G,{sx:r.group,children:[(0,YI.jsx)(G,{sx:r.heading,children:$c(n.harness)}),(0,YI.jsx)(PFr,{rateLimits:n.rateLimits,now:t})]},n.harness)),(0,YI.jsx)(G,{sx:r.foot,children:"Account usage per harness \u2014 view history"})]})}var Bat=C(P(),1),DPo="Claude account usage (5h / 7d windows) \u2014 view history";function IFr(e){return e.length===0?{title:DPo,content:"Usage"}:{title:(0,Bat.jsx)(LFr,{groups:e}),content:(0,Bat.jsx)(xFr,{groups:e})}}var MFr={display:"flex",alignItems:"center",height:22,px:1,borderRadius:1,fontSize:"inherit","&:hover, &:focus-visible":{bgcolor:e=>e.tokens.color.statusBar.hover,color:e=>e.tokens.color.statusBar.hoverText}},DFr={tooltip:{sx:{p:"10px 12px",minWidth:300,maxWidth:"none"}}};var $at=C(P(),1),NPo={};function NFr({rateLimits:e,harnessRateLimits:t=NPo}){let{title:r,content:n}=IFr(cEe(e,t));return(0,$at.jsx)(sr,{title:r,placement:"top-start",slotProps:DFr,children:(0,$at.jsx)(Qr,{component:da,to:"/usage",underline:"none",color:"inherit",sx:MFr,children:n})})}var $Fr=C(ee(),1);var ch="0.1045.1";var hEe=C(ee(),1),Fat=(0,hEe.createContext)(null);function mEe(){return(0,hEe.useContext)(Fat)}var zat=C(P(),1);function OFr(){let e=mEe();return!e||e===ch?null:(0,zat.jsx)(sr,{title:`Daemon is running v${e}, but this page was served by v${ch}. Restart the daemon to match.`,children:(0,zat.jsx)(Z_e,{fontSize:"small",color:"warning","aria-label":"Version mismatch"})})}var BFr=e=>({display:"inline-flex",alignItems:"center",gap:.75,px:1,py:0,height:22,borderRadius:1,fontSize:"inherit",lineHeight:1.5,color:"inherit",opacity:1,bgcolor:t=>e?Mx(t).active:"transparent",transition:"opacity .2s ease, background-color .2s ease, color .2s ease","&:hover, &:focus-visible":{bgcolor:t=>Mx(t).hover,color:t=>Mx(t).hoverText},"& .ready-dot":{width:6,height:6,borderRadius:"50%",bgcolor:t=>Mx(t).dot,boxShadow:t=>`0 0 0 3px ${Mx(t).dotRing}`},"& .ready-count":{fontWeight:500,color:t=>Mx(t).readyText}});var P0=C(P(),1);function FFr(){let{entries:e}=mx(),t=an(),r=(0,$Fr.useCallback)(()=>t("/updates"),[t]),{matches:n,chords:o}=fo("openUpdates");if(Zi(n,r),!ch)return null;let i=e.filter(E5).length;return(0,P0.jsxs)(P0.Fragment,{children:[(0,P0.jsx)(sr,{describeChild:!0,placement:"top-end",title:(0,P0.jsx)(Rd,{label:"Updates",chords:o}),children:(0,P0.jsxs)(nr,{component:da,to:"/updates","aria-label":i?`Updates: ${i} node${i>1?"s have":" has"} an update ready`:"Updates",sx:BFr(i>0),children:[i>0&&(0,P0.jsx)("span",{className:"ready-dot","aria-hidden":!0}),(0,P0.jsxs)("span",{children:["v",ch]}),i>0&&(0,P0.jsxs)("span",{className:"ready-count",children:[i," ready"]})]})}),(0,P0.jsx)(OFr,{})]})}var Ww=C(P(),1);function zFr({socket:e}){return(0,Ww.jsx)(Q$r,{start:(0,Ww.jsx)(NFr,{rateLimits:e.rateLimits,harnessRateLimits:e.harnessRateLimits}),end:(0,Ww.jsxs)(Ww.Fragment,{children:[(0,Ww.jsx)(cFr,{}),(0,Ww.jsx)(FFr,{})]})})}var UFr=C(ee(),1);var Gw=C(P(),1),OPo=2e4;function HFr(){let{entries:e,refresh:t}=mx(),[r,n]=(0,UFr.useState)(),o=e.find(l=>l.local)?.status?.extension,i=o?.behind&&o.updateLink&&o.latest?o:void 0,a=i!==void 0&&r!==i.latest,s=()=>n(i?.latest);return(0,Gw.jsx)(Nu,{open:a,children:(0,Gw.jsxs)(no,{severity:"info",variant:"filled",action:(0,Gw.jsxs)(Gw.Fragment,{children:[(0,Gw.jsx)(ht,{color:"inherit",size:"small",href:i?.updateLink,onClick:()=>setTimeout(t,OPo),children:"Install"}),(0,Gw.jsx)(ht,{color:"inherit",size:"small",onClick:s,children:"Dismiss"})]}),children:["assist extension v",i?.connected," \u2192 v",i?.latest]})})}var xEe=C(ee(),1);var bEe=C(ee(),1);function WFr(e,t,r){if(!e)return"Select a repo to search files.";if(r.error)return"Couldn't search files in this repo.";if(!(r.files.length>0||r.loading))return t?"No matching files.":"No files in this repo."}var j5=C(P(),1),BPo={display:"flex",gap:1,alignItems:"center",minWidth:0},$Po={display:"flex",gap:1,alignItems:"baseline",minWidth:0,overflow:"hidden"},FPo={fontFamily:"fontFamilyMono",fontSize:13,whiteSpace:"nowrap"},zPo={fontFamily:"fontFamilyMono",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function UPo(e){let t=e.lastIndexOf("/");return t===-1?{dir:"",basename:e}:{dir:e.slice(0,t),basename:e.slice(t+1)}}function GFr({files:e,highlight:t,onHighlight:r,onSelect:n}){return(0,j5.jsx)(eg,{dense:!0,sx:{py:0},children:e.map((o,i)=>{let{dir:a,basename:s}=UPo(o);return(0,j5.jsxs)(jr,{selected:i===t,onMouseEnter:()=>r(i),onClick:()=>n(o),sx:BPo,children:[(0,j5.jsx)(F2e,{path:o}),(0,j5.jsxs)(G,{sx:$Po,children:[(0,j5.jsx)(Ce,{component:"span",sx:FPo,children:s}),(0,j5.jsx)(Ce,{component:"span",color:"text.secondary",sx:zPo,children:a})]})]},o)})})}var gEe=C(P(),1),HPo={maxHeight:420,overflowY:"auto"},WPo={px:2,py:2,fontSize:13};function VFr({message:e,files:t,highlight:r,onHighlight:n,onSelect:o}){return(0,gEe.jsx)(G,{sx:HPo,children:e?(0,gEe.jsx)(Ce,{color:"text.secondary",sx:WPo,children:e}):(0,gEe.jsx)(GFr,{files:t,highlight:r,onHighlight:n,onSelect:o})})}var qFr=C(P(),1),GPo={mt:6,alignSelf:"flex-start"};function yEe({onClose:e,onEntered:t,centered:r=!1,children:n}){return(0,qFr.jsx)(vl,{open:!0,onClose:e,maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:r?void 0:GPo},transition:{onEntered:t}},children:n})}var vEe=C(ee(),1);var jFr={files:[],loading:!1,error:!1};function YFr(e,t){let[r,n]=(0,vEe.useState)(jFr),o=yr();return(0,vEe.useEffect)(()=>{if(!e){n(jFr);return}let i=!1;return n(s=>({...s,loading:!0})),(async()=>{try{let s=await Jt(tn(`/api/files?cwd=${encodeURIComponent(e)}&q=${encodeURIComponent(t)}`,o));if(!s.ok)throw new Error(`HTTP ${s.status}`);let l=await s.json();if(i)return;n({files:Array.isArray(l.files)?l.files:[],loading:!1,error:!1})}catch(s){Pr(s,"file search"),i||n({files:[],loading:!1,error:!0})}})(),()=>{i=!0}},[e,t,o]),r}var KI=C(P(),1);function VPo(e,t,r){let n=new URLSearchParams({path:e});return t&&n.set("cwd",t),t&&r&&n.set("node",r),`/file?${n}`}function KFr({onClose:e}){let{worktreeNode:t}=to();return(0,KI.jsx)(ic.Provider,{value:t,children:(0,KI.jsx)(qPo,{onClose:e})})}function qPo({onClose:e}){let{worktreeCwd:t,worktreeNode:r}=to(),[n,o]=(0,bEe.useState)(""),i=YFr(t,n),a=an(),s=(0,bEe.useRef)(null),l=h=>a(VPo(h,t,r)),{highlight:u,setHighlight:d,onKeyDown:f}=N5(i.files,n,l,e),p=h=>{l(h),e()};return(0,KI.jsxs)(yEe,{onClose:e,onEntered:()=>s.current?.focus(),children:[(0,KI.jsx)(bk,{autoFocus:!0,inputRef:s,value:n,onChange:o,onKeyDown:f,placeholder:"Search files by name..."}),(0,KI.jsx)(VFr,{message:WFr(t,n,i),files:i.files,highlight:u,onHighlight:d,onSelect:p})]})}function XFr(e){Zi(fo("quickOpen").matches,e)}var QFr=C(P(),1);function ZFr(){let[e,t]=(0,xEe.useState)(!1);return XFr((0,xEe.useCallback)(()=>t(!0),[])),e?(0,QFr.jsx)(KFr,{onClose:()=>t(!1)}):null}var SEe=C(P(),1);function JFr({notice:e,onClose:t,onView:r}){let n=e?.sessionId??null;return(0,SEe.jsx)(Nu,{open:e!==null,autoHideDuration:6e3,onClose:t,children:(0,SEe.jsx)(no,{severity:"success",variant:"filled",onClose:t,action:n!==null?(0,SEe.jsx)(ht,{color:"inherit",size:"small",onClick:()=>r(n),children:"View"}):void 0,children:e?.message})})}var Ine=C(ee(),1);function zG(e){let t=["claude"];return e.exposeCodexActions&&t.push("codex"),e.exposePiActions&&t.push("pi"),t}var fzr=C(ee(),1);var ezr=C(P(),1),tzr=nt((0,ezr.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle");var jPo={connected:"success.main",connecting:"warning.main",disconnected:"error.main","version-blocked":"error.main"};function rzr(e){return e?jPo[e]:"success.main"}function nzr(e){return e.split("-")[0].split(".").map(Number)}function ozr(e,t){if(!e||!t||e===t)return;let r=nzr(e),n=nzr(t);for(let o=0;o<Math.max(r.length,n.length);o++){let i=(r[o]??0)-(n[o]??0);if(Number.isNaN(i))return;if(i!==0)return i<0?"behind":"ahead"}}var XI=C(P(),1),YPo={height:16,fontSize:10},KPo={opacity:.6,fontSize:"0.85em"};function XPo(e,t){if(t===e.local)return"this machine";let r=e.links.find(n=>n.name===t);return r?r.error?`${r.state}: ${r.error}`:r.state:""}function Ane({nodes:e,name:t,showVersion:r=!1}){let n=mEe()??ch,o=e.links.find(a=>a.name===t),i=ozr(o?.peerVersion,n);return(0,XI.jsx)(sr,{title:XPo(e,t),placement:"right",children:(0,XI.jsxs)(G,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75},children:[(0,XI.jsx)(tzr,{sx:{fontSize:8,color:rzr(o?.state)}}),t,r&&o?.peerVersion&&(0,XI.jsxs)(G,{component:"span",sx:KPo,children:["v",o.peerVersion]}),i&&(0,XI.jsx)(Vn,{label:i,size:"small",color:i==="behind"?"warning":"info",sx:YPo})]})})}var ZI=C(P(),1),ZPo={opacity:.6},QPo={display:"inline-flex",alignItems:"center",gap:.5,px:.5,border:1,borderStyle:"dashed",borderRadius:1};function izr({nodes:e,name:t,clone:r}){let n=(0,ZI.jsx)(Ane,{nodes:e,name:t});return r.kind==="cloned"?n:r.kind==="unavailable"?(0,ZI.jsx)(G,{component:"span",sx:ZPo,children:n}):(0,ZI.jsx)(sr,{title:TG(t,r.cloneTarget),children:(0,ZI.jsxs)(G,{component:"span",sx:QPo,children:[(0,ZI.jsx)(SG,{sx:{fontSize:14}}),n]})})}var szr=C(P(),1),JPo={px:1.5,borderRadius:.75,fontSize:12,fontWeight:600,color:"text.secondary","&:hover":{color:"text.primary",bgcolor:"action.hover"},"&[aria-checked='true']":{color:"primary.main",bgcolor:"action.selected"},"&.Mui-focusVisible":{outline:2,outlineColor:"primary.main"}};function azr({value:e,label:t,checked:r,autoFocus:n,onSelect:o}){return(0,szr.jsx)(nr,{role:"radio","aria-checked":r,"data-value":e,tabIndex:r?0:-1,autoFocus:n&&r,onClick:o,sx:JPo,children:t})}var lzr={ArrowRight:1,ArrowLeft:-1};function eAo(e,t,r){if(e.key==="Tab"){let n=t+(e.shiftKey?-1:1);return n>=0&&n<r?n:void 0}return(t+lzr[e.key]+r)%r}function czr(e,t,r,n){return o=>{if(o.key==="ArrowUp"||o.key==="ArrowDown"){if(!n)return;o.preventDefault(),n();return}if(o.key!=="Tab"&&!lzr[o.key]){KT(o);return}let i=eAo(o,e.indexOf(t),e.length);i!==void 0&&(o.preventDefault(),r(e[i]),o.currentTarget.querySelector(`[data-value="${e[i]}"]`)?.focus())}}var uzr=C(ee(),1);function UG(e){return e?.querySelector('[aria-checked="true"]')}function dzr(e,t){(0,uzr.useEffect)(()=>{let r=e.current;if(!r?.contains(document.activeElement))return;let n=UG(r);n&&n!==document.activeElement&&n.focus()},[e,t])}var Uat=C(P(),1),tAo={border:1,borderColor:"divider",borderRadius:1,height:40,p:"2px",flexShrink:0};function TEe({label:e,options:t,value:r,onChange:n,optionLabel:o=u=>u,groupRef:i,autoFocus:a,onTrack:s,onToggleRow:l}){return dzr(i,r),(0,Uat.jsx)(kt,{ref:i,direction:"row",role:"radiogroup","aria-label":e,spacing:"2px",onFocus:s,onKeyDown:czr(t,r,n,l),sx:tAo,children:t.map(u=>(0,Uat.jsx)(azr,{value:u,label:o(u),checked:u===r,autoFocus:a,onSelect:()=>n(u)},u))})}var Hat=C(P(),1);function pzr({value:e,onChange:t,cloneState:r}){let{nodes:n,names:o,visible:i}=Cl(),a=(0,fzr.useRef)(null);return!i||!n||!e?null:(0,Hat.jsx)(TEe,{label:"Machine",options:o,value:e,onChange:t,optionLabel:s=>(0,Hat.jsx)(izr,{nodes:n,name:s,clone:r(s)}),groupRef:a,autoFocus:!1,onTrack:()=>{}})}var wEe=C(P(),1);function hzr({prompt:e,children:t}){return(0,wEe.jsxs)(kt,{children:[e,(0,wEe.jsx)(kt,{spacing:1,sx:{px:1.5,pb:1.5},children:t})]})}var gzr=C(P(),1),rAo=".MuiOutlinedInput-notchedOutline",nAo={"& .MuiOutlinedInput-root":{px:"18px",py:2,minHeight:92,alignItems:"flex-start",bgcolor:"transparent",borderRadius:0,fontSize:15},[`&&& ${rAo}`]:{border:0},"& textarea::placeholder":{color:"text.disabled",opacity:1}};function mzr({value:e,onChange:t,placeholder:r,inputRef:n,autoFocus:o,onTrack:i}){return(0,gzr.jsx)($n,{sx:nAo,value:e,onChange:a=>t(a.target.value),onKeyDown:KT,onFocus:i,onSelect:i,inputRef:n,placeholder:r,autoFocus:o,fullWidth:!0,multiline:!0,minRows:3,maxRows:12,slotProps:{htmlInput:{"aria-label":"Prompt"}}})}var xzr=C(ee(),1);var A0={draft:{placeholder:"Describe the backlog item to draft...",submitLabel:"Start draft",autoStartLabel:"Start draft + auto start",sessionMode:"assist-draft"},bug:{placeholder:"Describe the bug: what happened, what you expected...",submitLabel:"File bug",autoStartLabel:"File bug + auto start",sessionMode:"assist-bug"},prompt:{placeholder:zSe,submitLabel:"Start session"},design:{placeholder:"Describe the design task...",submitLabel:"Start design"}};function CEe(e){let t=A0[e];return"autoStartLabel"in t?t.autoStartLabel:void 0}var yzr=Object.keys(A0);var Wat=C(P(),1);function vzr({anchor:e,harness:t,harnesses:r,onPick:n,onClose:o}){return(0,Wat.jsx)(Rs,{open:e!==null,anchorEl:e,onClose:o,slotProps:{list:{dense:!0,"aria-label":"Harness"}},children:r.map(i=>(0,Wat.jsx)(jr,{role:"menuitemradio","aria-checked":i===t,selected:i===t,onClick:()=>{n(i),o()},sx:{fontSize:13},children:$c(i)},i))})}var QI=C(P(),1);function bzr(e){return t=>t==="prompt"&&e?(0,QI.jsxs)(QI.Fragment,{children:["prompt",(0,QI.jsx)(G,{component:"span",sx:{fontWeight:400,whiteSpace:"pre"},children:` \xB7 ${$c(e)}`}),(0,QI.jsx)(gp,{sx:{fontSize:18,mr:-.75}})]}):t}var JI=C(P(),1);function Szr({draft:e,harness:t,harnesses:r,focus:n}){let[o,i]=(0,xzr.useState)(null),a=e.mode==="prompt"&&r.length>1,s=()=>i(UG(n.modeRef.current)??null),l=u=>{a&&u==="prompt"?s():e.setMode(u)};return(0,JI.jsxs)(JI.Fragment,{children:[(0,JI.jsx)(TEe,{label:"Mode",options:yzr,value:e.mode,onChange:l,optionLabel:bzr(r.length>1?t:void 0),groupRef:n.modeRef,autoFocus:n.autoFocus==="mode",onTrack:n.trackMode,onToggleRow:a?s:void 0}),(0,JI.jsx)(vzr,{anchor:o,harness:t,harnesses:r,onPick:e.setHarness,onClose:()=>i(null)})]})}var Mzr=C(ee(),1);var Gat=C(P(),1),oAo={zIndex:e=>e.zIndex.modal+1};function Tzr({open:e,anchor:t,children:r}){return(0,Gat.jsx)(RD,{open:e,anchorEl:t,placement:"bottom-start",sx:oAo,children:(0,Gat.jsx)(Zr,{sx:{maxHeight:240,overflowY:"auto",width:t?.clientWidth},onMouseDown:n=>n.preventDefault(),children:r})})}var wzr=C(P(),1),Czr=nt((0,wzr.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var Vat=C(P(),1),iAo={fontSize:13,height:36,pr:1,cursor:"pointer","& input":{cursor:"text"}},aAo={fontSize:16,color:"text.disabled"};function kzr(e){return{htmlInput:{role:"combobox","aria-label":"Repo","aria-expanded":e},input:{sx:iAo,endAdornment:(0,Vat.jsx)(fRe,{position:"end",children:(0,Vat.jsx)(Czr,{sx:aAo})})}}}var _zr=C(pD(),1);function Ezr({open:e,highlighted:t,accept:r,close:n,navigate:o,openList:i}){return a=>{if(!e){if(a.key==="ArrowDown"){a.preventDefault(),i();return}KT(a);return}if(a.key!=="Escape"){if(a.key==="Enter"){if(a.preventDefault(),t===void 0)return;(0,_zr.flushSync)(()=>{r(t),n()}),KT(a);return}if(a.key!=="Tab"){o(a);return}t!==void 0&&r(t),n()}}}function kEe(e,t){let r=t.trim().toLowerCase();return r?e.filter(n=>Cx(n).toLowerCase().includes(r)):e}var qat=C(ee(),1);function Rzr(){let[e,t]=(0,qat.useState)(!1),[r,n]=(0,qat.useState)("");return{open:e,query:r,show:()=>t(!0),filterBy:o=>{n(o),t(!0)},close:()=>{t(!1),n("")}}}var Azr=C(ee(),1);var Pzr=e=>e?Cx(e):"";function Lzr(e){let[t,r]=(0,Azr.useState)(()=>Pzr(e));return{text:t,setText:r,showRepo:n=>r(Pzr(n))}}function Izr(e,t,r){let n=Rzr(),o=Lzr(t),i=kEe(e,n.query),a=d=>{r(d),o.showRepo(d)},s=N5(i,n.query,a,n.close),l=()=>s.setHighlight(Math.max(e.indexOf(t),0)),u=()=>{l(),n.show()};return{open:n.open,text:o.text,filtered:i,highlight:s.highlight,setHighlight:s.setHighlight,onKeyDown:Ezr({open:n.open,highlighted:i[s.highlight],accept:a,close:n.close,navigate:s.onKeyDown,openList:u}),onClick:()=>{n.open||u()},onType:d=>{o.setText(d),n.filterBy(d)},onFocus:l,onBlur:()=>{n.close(),o.showRepo(t)},pick:d=>{a(d),n.close()}}}var HG=C(P(),1);function Dzr({repos:e,value:t,onChange:r,inputRef:n,autoFocus:o,onTrack:i}){let a=Izr(e,t,r),s=(0,Mzr.useRef)(null);return(0,HG.jsxs)(G,{ref:s,sx:{flex:1,minWidth:0},children:[(0,HG.jsx)($n,{value:a.text,onChange:l=>a.onType(l.target.value),onFocus:l=>{l.target.select(),a.onFocus(),i()},inputRef:n,autoFocus:o,onClick:a.onClick,onBlur:a.onBlur,onKeyDown:a.onKeyDown,placeholder:"Repo",size:"small",fullWidth:!0,slotProps:kzr(a.open)}),(0,HG.jsx)(Tzr,{open:a.open,anchor:s.current,children:(0,HG.jsx)(V_e,{repos:a.filtered,selected:t,highlight:a.highlight,onHighlight:a.setHighlight,onSelect:a.pick})})]})}var Y5=C(P(),1);function Nzr({cloneState:e,...t}){let{draft:r,focus:n}=t,{repos:o}=to();return(0,Y5.jsxs)(hzr,{prompt:(0,Y5.jsx)(mzr,{value:r.prompt,onChange:r.setPrompt,placeholder:A0[r.mode].placeholder,inputRef:n.promptRef,autoFocus:n.autoFocus==="prompt",onTrack:n.trackPrompt}),children:[(0,Y5.jsxs)(kt,{direction:"row",spacing:1,sx:{alignItems:"flex-start"},children:[(0,Y5.jsx)(Dzr,{repos:o,value:r.cwd,onChange:r.setCwd,inputRef:n.repoRef,autoFocus:n.autoFocus==="repo",onTrack:n.trackRepo}),(0,Y5.jsx)(Szr,{...t})]}),(0,Y5.jsx)(pzr,{value:r.node,onChange:r.setNode,cloneState:e})]})}var $zr=C(P(),1),Ozr=[["Enter","start"],["Shift+Enter","newline"],["Esc","close"]];function Bzr({submitLabel:e,disabled:t=!1,loading:r=!1,onClick:n}){return(0,$zr.jsx)(ht,{type:"submit",onClick:n,variant:"contained",disabled:t,loading:r,children:e})}var eM=C(P(),1),sAo=e=>({alignItems:"center",flexWrap:"wrap",gap:"14px",py:"10px",pl:"18px",pr:1.5,borderTop:1,borderColor:e.tokens.color.lineSoft,bgcolor:"background.default",fontSize:12,color:"text.secondary"}),lAo=e=>({mr:.5,px:"5px",border:1,borderColor:"divider",borderRadius:"4px",fontFamily:e.typography.fontFamilyMono,fontSize:10.5,color:"text.primary"});function Fzr(e){return(0,eM.jsxs)(kt,{direction:"row",sx:sAo,children:[Ozr.map(([t,r])=>(0,eM.jsxs)("span",{children:[(0,eM.jsx)(G,{component:"kbd",sx:lAo,children:t}),r]},t)),(0,eM.jsx)(G,{sx:{flex:1}}),(0,eM.jsx)(Bzr,{...e})]})}var _Ee=C(ee(),1);function zzr(){let[e,t]=(0,_Ee.useState)(!1);return(0,_Ee.useEffect)(()=>{let r=o=>t(o.shiftKey),n=()=>t(!1);return globalThis.addEventListener("keydown",r),globalThis.addEventListener("keyup",r),globalThis.addEventListener("blur",n),()=>{globalThis.removeEventListener("keydown",r),globalThis.removeEventListener("keyup",r),globalThis.removeEventListener("blur",n)}},[]),e}function Uzr(e,t){let r=zzr();return e==="clone"?"Clone":(r?CEe(t):void 0)??A0[t].submitLabel}var Wzr=C(P(),1);function Hzr({draft:e,targetKind:t,onClick:r}){return(0,Wzr.jsx)(Fzr,{submitLabel:Uzr(t,e.mode),onClick:r,disabled:t==="blocked",loading:e.modePending})}var tM=C(ee(),1);function Gzr(e,t){let r=(0,tM.useRef)(e),n=(0,tM.useRef)(null),o=(0,tM.useRef)(null),i=(0,tM.useRef)(null),a=(0,tM.useCallback)(u=>{n.current=u;let{field:d,selectionStart:f,selectionEnd:p}=r.current;u&&d==="prompt"&&u.setSelectionRange(f,p)},[]),s=u=>{let d=u.target;t({field:"prompt",selectionStart:d.selectionStart,selectionEnd:d.selectionEnd})},l=()=>{if(i.current?.closest("form")?.contains(document.activeElement))return;let{field:u}=r.current;({repo:o.current,mode:UG(i.current),prompt:n.current}[u]??n.current)?.focus()};return{autoFocus:e.field,promptRef:a,repoRef:o,modeRef:i,trackPrompt:s,trackRepo:()=>t({...e,field:"repo"}),trackMode:()=>t({...e,field:"mode"}),restore:l}}function cAo(e,t,r){return e?r.kind==="cloned"?{kind:"launch",cwd:r.cwd}:r.kind==="clonable"?{kind:"clone",prompt:j_e(r,t)}:{kind:"blocked"}:{kind:"launch",cwd:e}}function Vzr(e,t){let{names:r,visible:n}=Cl(),o=H_e(t,n?r:[void 0]);return{cloneState:o,target:cAo(t,e,o(e))}}var Yzr=C(ee(),1);function uAo(e,t,r){let n=r===!0&&CEe(e)!==void 0;return!t&&!n?[]:[{...t&&{node:t},...n&&{autoApprove:!0}}]}function EEe({mode:e,harness:t,prompt:r,cwd:n,node:o,autoApprove:i},a){let s=n||void 0,l=o?[o]:[];if(e==="prompt"){t==="claude"?a.onCreate(r,s,...l):a.onCreateHarness(t,r,s,...l);return}if(e==="design"){a.onCreateDesign(r,s,...l);return}let u=uAo(e,o,i);Q_r(A0[e].sessionMode,n,(d,f)=>a.onCreateAssist(d,f,...u),()=>{},r)}function qzr(e,t,r,n,o=!1){return r.kind==="blocked"||e.modePending?!1:r.kind==="clone"?(D_e(r.prompt,n.onCreateAssist),!0):(EEe({mode:e.mode,harness:t,prompt:e.prompt,cwd:r.cwd,node:e.node,autoApprove:o},n),e.clear(),!0)}var REe=C(ee(),1);function jzr(e,t){let[r,n]=(0,REe.useState)(null);return(0,REe.useEffect)(()=>{!r||e.modePending||(n(null),e.modeError||t(r.autoApprove))},[r,e.modePending,e.modeError,t]),o=>{e.modePending?n({autoApprove:o}):t(o)}}function Kzr(e,t,r,n,o){let i=(0,Yzr.useRef)(!1),a=jzr(e,s=>{qzr(e,t,r,n,s)&&o()});return{onSubmit:s=>{s.preventDefault();let l=i.current;i.current=!1,a(l)},onSubmitClick:s=>{i.current=s.shiftKey}}}var Lne=C(ee(),1);function Xzr(e,t){let r=(0,Lne.useRef)(e),n=(0,Lne.useRef)(null);return(0,Lne.useEffect)(()=>{if(r.current&&!e){let o=n.current;o?.isConnected?o.focus():t()}r.current=e},[e,t]),o=>{n.current=o.target}}var Qzr=C(P(),1),dAo={border:0,margin:0,padding:0,minWidth:0};function Zzr({loading:e,restoreFocus:t,children:r}){let n=Xzr(e,t);return(0,Qzr.jsx)("fieldset",{disabled:e,style:dAo,onFocus:n,children:r})}var AEe=C(P(),1);function PEe({error:e,onRetry:t}){return e?(0,AEe.jsxs)(no,{severity:"error",sx:{mx:2,my:1},action:t&&(0,AEe.jsx)(ht,{color:"inherit",size:"small",onClick:t,children:"Retry"}),children:["Couldn't load this repo's default mode (",e,"). Pick a mode or retry."]}):null}var K5=C(P(),1);function Jzr({draft:e,launchers:t,onClose:r}){let n=Gzr(e.focus,e.setFocus),o=zG(_0()),i=o.includes(e.harness)?e.harness:"claude",{target:a,cloneState:s}=Vzr(e.node,e.cwd),{onSubmit:l,onSubmitClick:u}=Kzr(e,i,a,t,r);return(0,K5.jsx)(yEe,{onClose:r,onEntered:n.restore,centered:!0,children:(0,K5.jsx)("form",{onSubmit:l,children:(0,K5.jsxs)(Zzr,{loading:e.modePending,restoreFocus:n.restore,children:[(0,K5.jsx)(Nzr,{draft:e,harness:i,harnesses:o,focus:n,cloneState:s}),(0,K5.jsx)(PEe,{error:e.modeError,onRetry:e.retryMode}),(0,K5.jsx)(Hzr,{draft:e,targetKind:a.kind,onClick:u})]})})})}var rM=C(ee(),1);async function fAo(e){try{let t=e?`?cwd=${encodeURIComponent(e)}`:"",r=await Jt(`/api/new-session-defaults${t}`);if(!r.ok)return{error:`HTTP ${r.status}`};let n=await r.json();if(Object.hasOwn(A0,n?.mode))return{mode:n.mode};throw new Error(`unknown mode ${JSON.stringify(n?.mode)}`)}catch(t){return Pr(t,"new-session defaults"),{error:t instanceof Error?t.message:String(t)}}}function LEe(e,t=0){let[r,n]=(0,rM.useState)(0),[o,i]=(0,rM.useState)(null),a=(0,rM.useCallback)(()=>n(l=>l+1),[]);if((0,rM.useEffect)(()=>{let l=!1;return fAo(e).then(u=>{l||i({cwd:e,opens:t,attempt:r,outcome:u})}),()=>{l=!0}},[e,t,r]),!o)return null;let{outcome:s}=o;return{mode:"mode"in s?s.mode:"prompt",pending:o.cwd!==e||o.opens!==t||o.attempt!==r,error:"error"in s?s.error:void 0,retry:a}}function IEe(e,t){if(!(e!==void 0||!t||t.pending))return t.error}function eUr(e,{visible:t,names:r,selected:n}){if(t)return e&&r.includes(e)?e:n}var X5=C(ee(),1);var tUr={field:"prompt",selectionStart:0,selectionEnd:0};function rUr(){let[e,t]=EH("new-session"),[r,n]=(0,X5.useState)(),[o,i]=(0,X5.useState)(),[a,s]=(0,X5.useState)("claude"),[l,u]=(0,X5.useState)(),[d,f]=(0,X5.useState)(tUr),p=(0,X5.useCallback)(()=>{t(""),n(void 0),i(void 0),u(void 0),f(tUr)},[t]);return{prompt:e,cwd:r,mode:o,harness:a,node:l,focus:d,setPrompt:t,setNode:u,setCwd:n,setMode:i,setHarness:s,setFocus:f,clear:p}}function nUr(e,t=LEe){let{selectedCwd:r}=to(),n=Cl(),o=rUr(),i=o.cwd??r,a=t(i,e);return a?{...o,cwd:i,mode:o.mode??a.mode,modePending:o.mode===void 0&&a.pending,modeError:IEe(o.mode,a),retryMode:a.retry,node:eUr(o.node,n)}:null}function oUr(e){Zi(fo("newSession").matches,e)}var iUr=C(ee(),1);function aUr(e,t){let{selectedCwd:r}=to(),[n,o]=al(),i=n.get("new"),a=n.get("newCwd")??r,{setPrompt:s,setCwd:l,setFocus:u}=e??{};(0,iUr.useEffect)(()=>{i===null||!s||!l||!u||(i&&(s(i),l(a),u({field:"prompt",selectionStart:i.length,selectionEnd:i.length})),t(),o(d=>(d.delete("new"),d.delete("newCwd"),d),{replace:!0}))},[i,a,s,l,u,t,o])}var lUr=C(P(),1);function sUr({launchers:e}){let[t,r]=(0,Ine.useState)(!1),[n,o]=(0,Ine.useState)(0),i=nUr(n),a=(0,Ine.useCallback)(()=>{r(!0),o(s=>s+1)},[]);return oUr(a),aUr(i,a),!t||!i?null:(0,lUr.jsx)(Jzr,{draft:i,launchers:e,onClose:()=>r(!1)})}var MEe=C(P(),1);function cUr({reconnecting:e}){return(0,MEe.jsx)(Nu,{open:e,children:(0,MEe.jsx)(no,{severity:"info",variant:"filled",icon:(0,MEe.jsx)(Ao,{size:16,color:"inherit"}),children:"Reconnecting\u2026"})})}var mv=C(P(),1);function uUr({socket:e,onViewLaunchedSession:t}){return(0,mv.jsxs)(mv.Fragment,{children:[(0,mv.jsx)(ZFr,{}),(0,mv.jsx)(sUr,{launchers:{onCreate:e.createSession,onCreateDesign:e.createDesignSession,onCreateHarness:e.createHarnessSession,onCreateAssist:e.createAssistSession}}),(0,mv.jsx)(cUr,{reconnecting:e.reconnecting}),(0,mv.jsx)(HFr,{}),(0,mv.jsx)(kl,{error:e.error,onClose:e.clearError}),(0,mv.jsx)(JFr,{notice:e.success,onClose:e.clearSuccess,onView:t})]})}var Dx=C(ee(),1);var pAo=6e4;function hAo(e,t,r){return t.map(n=>e.find(o=>o.name===n)??{name:n,local:n===r,loading:!0})}function DEe(e){let t=e.nodes?.local,r=e.names.join(`
|
|
4062
4062
|
`),[n,o]=(0,Dx.useState)([]),i=(0,Dx.useRef)(0),a=(0,Dx.useCallback)(()=>{let l=r?r.split(`
|
|
4063
4063
|
`):[];if(l.length===0)return;let u=++i.current;o(d=>hAo(d,l,t));for(let d of l)c_e(d,d===t).then(f=>{u===i.current&&o(p=>p.map(h=>h.name===d?f:h))})},[r,t]);(0,Dx.useEffect)(()=>{a();let l=setInterval(a,pAo);return()=>clearInterval(l)},[a]);let s=n.length===0;return(0,Dx.useMemo)(()=>({entries:n,loading:s,refresh:a}),[n,s,a])}var Z5=C(P(),1);function dUr({shell:e,children:t}){let{socket:r,selection:n,launch:o,sidebarCollapse:i}=e,a=DEe(r.nodeSelection);return(0,Z5.jsx)(rat.Provider,{value:a,children:(0,Z5.jsx)(qLe.Provider,{value:i,children:(0,Z5.jsx)(kY.Provider,{value:n,children:(0,Z5.jsx)(CLe.Provider,{value:r.nodeSelection,children:(0,Z5.jsx)(ic.Provider,{value:n.selectedNode,children:(0,Z5.jsx)(UZe.Provider,{value:o,children:(0,Z5.jsx)(Zbt,{children:t})})})})})})})}var fUr=C(P(),1),pUr=nt((0,fUr.jsx)("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"}),"Computer");var hUr=C(ee(),1);var gv=C(P(),1),mAo={ml:1,textTransform:"none",fontSize:12};function mUr(){let{nodes:e,names:t,visible:r,selected:n,select:o}=Cl(),[i,a]=(0,hUr.useState)(null);return!r||!e||!n?null:(0,gv.jsxs)(gv.Fragment,{children:[(0,gv.jsx)(ht,{size:"small",color:"inherit",startIcon:(0,gv.jsx)(pUr,{fontSize:"small"}),"aria-label":"Machine","aria-haspopup":"menu",onClick:s=>a(s.currentTarget),sx:mAo,children:(0,gv.jsx)(Ane,{nodes:e,name:n})}),(0,gv.jsx)(Rs,{anchorEl:i,open:!!i,onClose:()=>a(null),children:t.map(s=>(0,gv.jsx)(jr,{selected:s===n,onClick:()=>{o(s),a(null)},sx:{fontSize:13},children:(0,gv.jsx)(Ane,{nodes:e,name:s,showVersion:!0})},s))})]})}var Mne=C(ee(),1);function gUr(e,t){return[...e[0].slice(0,-1),String(t+1)]}var nM=C(P(),1),gAo=[gi("secondary"),{ml:.75}];function yUr({index:e,label:t,count:r,...n}){let{chords:o}=fo("navTab");return(0,nM.jsx)(sr,{describeChild:!0,title:(0,nM.jsx)(Rd,{label:t,chords:[gUr(o,e)]}),children:(0,nM.jsx)(jv,{label:r?(0,nM.jsxs)("span",{children:[t,(0,nM.jsx)(G,{component:"span",sx:gAo,children:r})]}):t,...n})})}var vUr=C(ee(),1);var yAo=6e4;function bUr(){let e=Z2e();return(0,vUr.useEffect)(()=>{qs.refresh();let t=setInterval(()=>{qs.refresh()},yAo);return()=>clearInterval(t)},[]),e?.length??0}var jat=C(ee(),1);function xUr(e,t){let{bound:r}=fo("navTab"),n=e.length,o=(0,jat.useCallback)(a=>(DY(a,r)??n)<n,[r,n]),i=(0,jat.useCallback)(a=>{let s=e[DY(a,r)??-1];s&&t(s)},[e,t,r]);Zi(o,i)}var NEe=C(ee(),1);function SUr(){let[e,t]=(0,NEe.useState)(!1);return(0,NEe.useEffect)(()=>{let r=!1;return(async()=>{try{let o=await(await Jt("/api/news/nav")).json();r||t(o?.showInNav===!0)}catch(n){Pr(n,"news nav"),r||t(!1)}})(),()=>{r=!0}},[]),e}var OEe=C(ee(),1);async function vAo(e,t){let r=await Jt(tn(`/api/releases/configured?cwd=${encodeURIComponent(e)}`,t));return r.ok?(await r.json())?.configured===!0:void 0}function TUr(e){let[t,r]=(0,OEe.useState)(null),n=yr(),o=`${n??""}\0${e}`;return(0,OEe.useEffect)(()=>{if(!e)return;let i=!1;return vAo(e,n).catch(a=>{Pr(a,"releases configured")}).then(a=>{i||r({key:o,configured:a})}),()=>{i=!0}},[e,n,o]),t?.key===o?t.configured:void 0}var wUr=C(ee(),1);function CUr(e){let{pathname:t}=mi(),r=an(),n=t==="/releases"||t.startsWith("/releases/");(0,wUr.useEffect)(()=>{e===!1&&n&&r("/sessions",{replace:!0})},[e,n,r])}var bAo={path:"/sessions",label:"Sessions"},xAo={path:"/backlog",label:"Backlog"},SAo={path:"/next",label:"Next"},TAo={path:"/releases",label:"Releases"},wAo={path:"/news",label:"News"},CAo={path:"/inbox",label:"Inbox"};function kUr(e,t){return[bAo,xAo,SAo,...e?[TAo]:[],...t?[wAo]:[],CAo]}var Yat=C(P(),1),kAo={mx:"6px"};function _Ur({cwd:e}){let t=mi(),r=an(),n=TUr(e),o=SUr(),i=bUr();CUr(n);let a=n===!0,s=(0,Mne.useMemo)(()=>kUr(a,o),[a,o]),l=(0,Mne.useMemo)(()=>s.map(f=>f.path),[s]),u=s.findIndex(f=>t.pathname.startsWith(f.path)),d=(0,Mne.useCallback)(f=>{t.pathname!==f&&r(f)},[t.pathname,r]);return xUr(l,d),(0,Yat.jsx)(gR,{sx:kAo,value:u===-1?!1:u,textColor:"inherit",indicatorColor:"secondary",children:s.map((f,p)=>(0,Yat.jsx)(yUr,{index:p,label:f.label,count:f.path==="/inbox"?i:void 0,onClick:()=>d(f.path)},f.path))})}var Dne=C(P(),1),EUr=(e,t)=>({bgcolor:e,color:t,"& .MuiSvgIcon-root":{color:t},transition:"filter 0.2s ease, transform 0.2s ease","&:hover":{bgcolor:e,color:t,filter:"brightness(1.08)"},"&:active":{transform:"translateY(1px)"}}),_Ao=e=>({ml:.75,...e.tokens.color.appBar?EUr("primary.main","primary.contrastText"):EUr("primary.contrastText","primary.main")});function RUr(){let[,e]=al(),{label:t,chords:r}=fo("newSession");return(0,Dne.jsx)(sr,{title:(0,Dne.jsx)(Rd,{label:t,chords:r}),children:(0,Dne.jsx)(jt,{sx:_Ao,"aria-label":"New session",onClick:()=>e(o=>(o.set("new",""),o),{replace:!0}),children:(0,Dne.jsx)(mp,{})})})}var BEe=C(ee(),1);var Nne=C(P(),1),EAo={strokeWidth:2};function PUr(e){return(0,Nne.jsxs)(GSe,{viewBox:"0 0 24 24",sx:EAo,...e,children:[(0,Nne.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 3.5c-.3 1.15-.3 2.35 0 3.5A5.4 5.4 0 0 0 4 10.5c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),(0,Nne.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]})}var One=C(P(),1);function AUr({cwd:e}){let[t,r]=(0,BEe.useState)(null),n=yr();return(0,BEe.useEffect)(()=>{if(!e){r(null);return}let o=!1;return(async()=>{try{let a=await(await Jt(tn(`/api/github-url?cwd=${encodeURIComponent(e)}`,n))).json();o||r(a?.url??null)}catch(i){Pr(i,"GitHub URL"),o||r(null)}})(),()=>{o=!0}},[e,n]),t?(0,One.jsx)(sr,{title:"Open in GitHub",children:(0,One.jsx)(G,{component:"span",sx:VSe,children:(0,One.jsx)(jt,{onClick:()=>window.open(t,"_blank"),children:(0,One.jsx)(PUr,{})})})}):null}var yv=C(P(),1),RAo={color:"inherit",mr:1.5};function LUr({reconnecting:e}){let{pending:t,error:r,clearError:n,restart:o}=A5("webserver",e);return(0,yv.jsxs)(yv.Fragment,{children:[(0,yv.jsx)(sr,{title:"Restart web server",children:(0,yv.jsx)("span",{children:(0,yv.jsx)(jt,{sx:RAo,disabled:t,onClick:o,children:t?(0,yv.jsx)(Ao,{size:24}):(0,yv.jsx)(oH,{})})})}),(0,yv.jsx)(kl,{error:r,onClose:n})]})}var DUr=C(ee(),1);var IUr=C(ee(),1);function MUr(e){let t=Pn().palette.primary.main;Zi(fo("focusRepoPicker").matches,(0,IUr.useCallback)(()=>Fc({locate:()=>e.current?.querySelector("button")??null,focus:r=>r.focus()},t),[e,t]))}var Bne=C(P(),1),PAo={width:240,ml:2};function NUr({repos:e,selected:t,onSelect:r}){let n=(0,DUr.useRef)(null);MUr(n);let{chords:o}=fo("focusRepoPicker");return(0,Bne.jsx)(G,{ref:n,sx:PAo,children:(0,Bne.jsx)(USe,{label:t?Cx(t):"Select repo...",tooltip:(0,Bne.jsx)(Rd,{label:"Repo",chords:o}),typeToOpen:!0,children:(i,a)=>(0,Bne.jsx)(OBr,{repos:e,selected:t,onSelect:r,close:i,initialFilter:a})})})}var VUr=C(ee(),1);var $ne=C(ee(),1);function $Ee(e){let[t,r]=(0,$ne.useState)([]),[n,o]=(0,$ne.useState)(!0),i=yr();return(0,$ne.useEffect)(()=>{if(!e){r([]),o(!1);return}let a=!1;return o(!0),Jt(tn(`/api/pr-list?cwd=${encodeURIComponent(e)}`,i)).then(s=>s.json()).then(s=>{a||(r(Array.isArray(s?.prs)?s.prs:[]),o(!1))}).catch(s=>{Pr(s,"open PRs"),!a&&(r([]),o(!1))}),()=>{a=!0}},[e,i]),{prs:t,loading:n}}var Kat=C(P(),1);function Xat({text:e}){return(0,Kat.jsx)(G,{sx:{p:1.5},children:(0,Kat.jsx)(Ce,{sx:{fontSize:13,color:"text.secondary"},children:e})})}var oM=C(P(),1);function OUr({pr:e,highlighted:t,onHover:r,onPick:n}){let o=G_e(t);return(0,oM.jsx)(jr,{ref:o,selected:t,onMouseDown:i=>i.preventDefault(),onMouseEnter:r,onClick:()=>n(e),sx:{alignItems:"flex-start",py:.75,whiteSpace:"normal"},children:(0,oM.jsxs)(kt,{spacing:.25,sx:{minWidth:0},children:[(0,oM.jsxs)(Ce,{sx:{fontSize:13,lineHeight:1.3,fontWeight:500},children:[e.title,e.isDraft&&(0,oM.jsx)(Vn,{label:"Draft",size:"small",variant:"outlined",sx:{ml:.75,height:18,fontSize:10,verticalAlign:"middle"}})]}),(0,oM.jsxs)(Ce,{sx:{fontSize:11,color:"text.secondary"},children:["#",e.number," \xB7 ",e.author," \xB7 ",xo(e.createdAt)]})]})})}var Zat=C(P(),1);function BUr({prs:e,highlight:t,onHighlight:r,onPick:n}){return(0,Zat.jsx)(eg,{dense:!0,disablePadding:!0,sx:{maxHeight:200,overflowY:"auto"},children:e.map((o,i)=>(0,Zat.jsx)(OUr,{pr:o,highlighted:i===t,onHover:()=>r(i),onPick:n},o.number))})}var FUr=C(ee(),1);function $Ur(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=r.replace(/^#/,"");return e.filter(o=>o.title.toLowerCase().includes(r)||o.author.toLowerCase().includes(r)||n!==""&&String(o.number).includes(n))}function zUr(e,t,r){let[n,o]=(0,FUr.useState)(""),i=$Ur(e,n),{highlight:a,setHighlight:s,onKeyDown:l}=N5(i,n,t,r);return{filter:n,setFilter:o,filtered:i,highlight:a,setHighlight:s,onKeyDown:l,select:d=>{t(d),r()}}}var Q5=C(P(),1),UUr={..._H,left:"auto",width:320,maxHeight:"none",overflowY:"visible"};function HUr({cwd:e,onPick:t,close:r}){let{prs:n,loading:o}=$Ee(e),i=zUr(n,t,r);return o||n.length===0?(0,Q5.jsx)(Zr,{elevation:4,sx:UUr,children:(0,Q5.jsx)(Xat,{text:o?"Loading open PRs\u2026":"No open PRs"})}):(0,Q5.jsxs)(Zr,{elevation:4,sx:UUr,children:[(0,Q5.jsx)(bk,{autoFocus:!0,value:i.filter,onChange:i.setFilter,onKeyDown:i.onKeyDown,placeholder:"Filter PRs..."}),i.filtered.length===0?(0,Q5.jsx)(Xat,{text:"No PRs match"}):(0,Q5.jsx)(BUr,{prs:i.filtered,highlight:i.highlight,onHighlight:i.setHighlight,onPick:i.select})]})}var GUr=C(P(),1);function WUr({cwd:e,onPick:t,close:r}){return(0,GUr.jsx)(HUr,{cwd:e,onPick:t,close:r})}var J5=C(P(),1);function qUr({cwd:e,disabled:t,onSelect:r}){let{prs:n,loading:o}=$Ee(e),[i,a]=(0,VUr.useState)(null);return o||n.length===0?null:(0,J5.jsxs)(J5.Fragment,{children:[(0,J5.jsx)(USe,{label:"prs",disabled:t,children:s=>(0,J5.jsx)(WUr,{cwd:e,onPick:a,close:s})}),i&&(0,J5.jsx)(bSe,{pr:i,onSelect:s=>{r(i,s),a(null)},onCancel:()=>a(null)})]})}var YUr=C(P(),1);function jUr({onStartRun:e,cwd:t}){let r=$Se(t);return!t||r.length===0?null:(0,YUr.jsx)(OSe,{runs:r,onSelect:(n,o)=>e(n,t,o)})}var Fne=C(P(),1);function KUr({onCreateAssist:e,onStartRun:t}){let{selectedCwd:r,selectedNode:n}=to();return(0,Fne.jsxs)(kt,{direction:"row",spacing:.5,sx:{alignItems:"center","&:not(:empty)":{ml:1.5}},children:[(0,Fne.jsx)(qUr,{cwd:r,disabled:!r,onSelect:(o,i)=>e([...i,String(o.number)],r,{...S4(o),node:n})}),(0,Fne.jsx)(jUr,{onStartRun:(o,i,a)=>t(o,i,a,void 0,n),cwd:r})]})}var Lm=C(P(),1),AAo={minHeight:48,pl:1,pr:14};function XUr({socket:e,selection:t}){let{collapsed:r,onToggleCollapsed:n}=Ik();return(0,Lm.jsxs)(hR,{variant:"dense",disableGutters:!0,sx:AAo,children:[r&&(0,Lm.jsx)(fue,{collapsed:r,onToggleCollapsed:n}),(0,Lm.jsx)(LUr,{reconnecting:e.reconnecting}),(0,Lm.jsx)(_Ur,{cwd:t.selectedCwd}),(0,Lm.jsx)(mUr,{}),(0,Lm.jsx)(NUr,{repos:t.repos,selected:t.selectedCwd,onSelect:t.setSelectedCwd}),(0,Lm.jsxs)(G,{sx:{display:"flex",alignItems:"center",ml:1},children:[(0,Lm.jsx)(qSe,{cwd:t.selectedCwd}),(0,Lm.jsx)(AUr,{cwd:t.selectedCwd}),(0,Lm.jsx)(RUr,{})]}),(0,Lm.jsx)(KUr,{onCreateAssist:e.createAssistSession,onStartRun:e.startRun})]})}var FEe=C(ee(),1);function ZUr(){let[e,t]=(0,FEe.useState)(null);return(0,FEe.useEffect)(()=>{let r=!1;return(async()=>{try{let o=await(await Jt("/api/health")).json();!r&&typeof o?.nodeName=="string"&&t(o.nodeName)}catch(n){Pr(n,"node name")}})(),()=>{r=!0}},[]),e}var JUr=C(P(),1),LAo={lineHeight:"32px",bgcolor:"transparent"};function QUr(){let e=ZUr();return e?(0,JUr.jsx)(W3e,{sx:LAo,children:e}):null}var eHr=C(P(),1),tHr=nt((0,eHr.jsx)("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-9 3h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-1 2H5v-2h2zm0-3H5V8h2zm9 7H8v-2h8zm0-4h-2v-2h2zm0-3h-2V8h2zm3 3h-2v-2h2zm0-3h-2V8h2z"}),"Keyboard");var rHr=C(P(),1),nHr=nt((0,rHr.jsx)("path",{d:"m12 16.5 4-4h-3v-9h-2v9H8zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2"}),"SystemUpdateAlt");var oHr=C(P(),1),iHr=nt((0,oHr.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4");var aHr=C(P(),1),sHr=nt((0,aHr.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7");var Qat=C(P(),1);function lHr({mode:e}){return e==="dark"?(0,Qat.jsx)(sHr,{fontSize:"small"}):(0,Qat.jsx)(iHr,{fontSize:"small"})}var cHr=C(P(),1),uHr=nt((0,cHr.jsx)("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone");var WG=C(P(),1);function dHr({onClose:e}){let t=an();return(0,WG.jsxs)(jr,{onClick:()=>{e(),t("/connect-mobile")},children:[(0,WG.jsx)(Jm,{children:(0,WG.jsx)(uHr,{fontSize:"small"})}),(0,WG.jsx)(Sd,{children:"Connect mobile"})]})}var fHr=C(P(),1),pHr=nt((0,fHr.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11"}),"Extension");var GG=C(P(),1);function IAo(e){return e?.installLink?`${e.connected?`v${e.connected} installed`:"not connected"} \xB7 v${e.latest} latest`:"unavailable"}function hHr({onClose:e}){let{entries:t}=mx(),r=t.find(o=>o.local)?.status?.extension,n=r?.installLink;return(0,GG.jsxs)(jr,{component:"a",href:n,disabled:!n,onClick:e,children:[(0,GG.jsx)(Jm,{children:(0,GG.jsx)(pHr,{fontSize:"small"})}),(0,GG.jsx)(Sd,{primary:"Firefox extension",secondary:IAo(r)})]})}var mHr=C(P(),1),gHr=nt((0,mHr.jsx)("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"}),"Speed");var VG=C(P(),1);function yHr(){let e=ESe();return(0,VG.jsxs)(jr,{onClick:()=>G3t(!e),children:[(0,VG.jsx)(Jm,{children:(0,VG.jsx)(gHr,{fontSize:"small"})}),(0,VG.jsx)(Sd,{children:e?"Hide render HUD":"Show render HUD"})]})}var Qs=C(P(),1);function vHr({mode:e,restartLabel:t,updateLabel:r,onToggleColorMode:n,onShowShortcuts:o,onConnectMobile:i,onFirefoxExtension:a,onRestart:s,onUpdate:l}){return[(0,Qs.jsxs)(jr,{onClick:n,children:[(0,Qs.jsx)(Jm,{children:(0,Qs.jsx)(lHr,{mode:e})}),(0,Qs.jsx)(Sd,{children:"Toggle dark mode"})]},"color-mode"),(0,Qs.jsx)(yHr,{},"render-hud"),(0,Qs.jsxs)(jr,{onClick:o,children:[(0,Qs.jsx)(Jm,{children:(0,Qs.jsx)(tHr,{fontSize:"small"})}),(0,Qs.jsx)(Sd,{children:"Keyboard shortcuts"})]},"shortcuts"),(0,Qs.jsx)(dHr,{onClose:i},"connect-mobile"),(0,Qs.jsx)(hHr,{onClose:a},"firefox-extension"),(0,Qs.jsx)(eo,{},"restart-divider"),(0,Qs.jsxs)(jr,{onClick:s,children:[(0,Qs.jsx)(Jm,{children:(0,Qs.jsx)(_8,{fontSize:"small"})}),(0,Qs.jsx)(Sd,{children:t})]},"restart"),(0,Qs.jsxs)(jr,{onClick:l,children:[(0,Qs.jsx)(Jm,{children:(0,Qs.jsx)(nHr,{fontSize:"small"})}),(0,Qs.jsx)(Sd,{children:r})]},"update")]}var bHr=C(ee(),1);var SHr=C(P(),1);function xHr({peer:e,onRestart:t,onClose:r}){let[n,o]=(0,bHr.useState)(!1);return(0,SHr.jsx)(Ho,{title:`Restart ${e}?`,message:`Restarts the sessions daemon and web server on ${e}. Its sessions resume when the daemon is back. This page stays open.`,confirmLabel:"Restart",busy:n,autoFocusConfirm:!0,onConfirm:()=>{o(!0),t(e).finally(r)},onCancel:r})}function THr(e){let t=new Map;for(let r of e){let n=t.get(r.group)??[];n.push(r),t.set(r.group,n)}return[...t].map(([r,n])=>({name:r,shortcuts:n}))}var MAo=Object.keys(b8);function wHr(){let e=x8();return THr(MAo.map(t=>Ck(t,e)))}var Im=C(P(),1),DAo={display:"flex",alignItems:"center",justifyContent:"space-between",pr:1},NAo={display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,py:.5};function CHr({onClose:e}){let t=wHr();return(0,Im.jsxs)(vl,{open:!0,onClose:e,maxWidth:"xs",fullWidth:!0,"aria-labelledby":"shortcuts-dialog-title",children:[(0,Im.jsxs)(bd,{id:"shortcuts-dialog-title",sx:DAo,children:["Keyboard shortcuts",(0,Im.jsx)(jt,{size:"small","aria-label":"Close",onClick:e,children:(0,Im.jsx)(Uo,{fontSize:"small"})})]}),(0,Im.jsx)(vd,{dividers:!0,children:t.map(r=>(0,Im.jsxs)(G,{component:"section",sx:{mb:1.5},children:[(0,Im.jsx)(Ce,{variant:"overline",color:"text.secondary",children:r.name}),r.shortcuts.map(n=>(0,Im.jsxs)(G,{sx:NAo,children:[(0,Im.jsx)(Ce,{variant:"body2",children:n.label}),(0,Im.jsx)(kt,{direction:"row",spacing:.5,children:(0,Im.jsx)(Uce,{chords:n.chords})})]},n.label))]},r.name))})]})}var iM=C(P(),1);function kHr({reconnecting:e,onClose:t}){let{pending:r,error:n,clearError:o,restart:i}=A5(iG.target,e);return(0,iM.jsxs)(iM.Fragment,{children:[(0,iM.jsx)(Ho,{title:iG.label,message:iG.message,confirmLabel:"Restart",busy:r,autoFocusConfirm:!0,onConfirm:()=>{i()},onCancel:t}),(0,iM.jsx)(kl,{error:n,onClose:o})]})}var EHr=C(P(),1);function OAo(e){return e?{title:`Update assist on ${e}?`,message:`This runs 'assist update' on ${e} as a new session, then restarts its web server. This page stays open.`}:{title:"Update assist",message:"This starts a new session running 'assist update'. Its output will appear in the terminal."}}function _Hr({peer:e,onConfirm:t,onClose:r}){return(0,EHr.jsx)(Ho,{...OAo(e),confirmLabel:"Update",onConfirm:()=>{t(),r()},onCancel:r})}var vv=C(ee(),1);async function BAo(e){try{let t=await Jt(`/api/node-doctor?link=${encodeURIComponent(e)}`);return t.ok?(await t.json()).hop:null}catch(t){return Pr(t,"node doctor"),null}}async function RHr(e,t){let r=await BAo(e);if(!r)return t;let n=r.remediation?` \u2014 ${r.remediation}`:"";return`${t}: ${r.hop} hop failed: ${r.error}${n}`}var Vw=C(ee(),1);function PHr(e){let{nodes:t}=Cl(),[r,n]=(0,Vw.useState)(null),o=(0,Vw.useRef)(!1),i=r?t?.links.find(l=>l.name===r.peer):void 0;(0,Vw.useEffect)(()=>{if(!(!r||!i)){if(i.state!=="connected"){o.current=!0;return}o.current&&(n(null),e(r.describe(r.peer,i.peerVersion)))}},[r,i,e]);let a=(0,Vw.useCallback)((l,u)=>{o.current=!1,n({peer:l,describe:u})},[]),s=(0,Vw.useCallback)(()=>n(null),[]);return{watch:a,stop:s}}var $Ao=9e4;function zEe(){let[e,t]=(0,vv.useState)(null),[r,n]=(0,vv.useState)(null),o=(0,vv.useRef)(void 0),i=(0,vv.useCallback)(d=>{clearTimeout(o.current),t(d)},[]),{watch:a,stop:s}=PHr(i);(0,vv.useEffect)(()=>()=>clearTimeout(o.current),[]);let l=(0,vv.useCallback)(async(d,f)=>{n(await RHr(d,f))},[]);return{requestThenAwait:(0,vv.useCallback)(async(d,f,p,h)=>{let m;try{m=await p()}catch(g){Pr(g,`${f} ${d}`)}return m?.ok?(a(d,h),clearTimeout(o.current),o.current=setTimeout(()=>{s(),l(d,`${d} did not come back`)},$Ao),!0):(await l(d,`${f} failed (${await R5(m)})`),!1)},[l,a,s]),back:e,clearBack:()=>t(null),error:r,clearError:()=>n(null)}}var FAo=(e,t)=>t?`${e} is back (v${t})`:`${e} is back`;function AHr(){let{requestThenAwait:e,...t}=zEe();return{restart:n=>e(n,`Restart ${n}`,()=>P5("both",n),FAo),...t}}var zne=C(ee(),1);function UEe(e){return Jt(tn("/api/self-update",e),{method:"POST",timeoutMs:66e4})}var bv=C(ee(),1);function LHr(e){return e.commandType==="assist"&&e.assistArgs?.[0]==="update"&&e.status==="done"}function HEe(e,t,r){let[n,o]=(0,bv.useState)(!1),[i,a]=(0,bv.useState)(!1),s=(0,bv.useRef)(!1),l=(0,bv.useRef)(e);l.current=e;let u=(0,bv.useRef)(new Set),d=(0,bv.useCallback)(()=>{s.current=!1,a(!1),u.current=new Set(l.current.filter(LHr).map(f=>f.id)),o(!0)},[]);return(0,bv.useEffect)(()=>{if(!n||i)return;if(t){s.current=!0;return}if(!s.current)return;e.some(p=>LHr(p)&&p.node===r&&!u.current.has(p.id))&&a(!0)},[n,i,t,e,r]),{arm:d,completed:i}}var IHr=(e,t)=>t?`${e} updated to v${t}`:`${e} updated`;function MHr(e){let{nodes:t}=Cl(),{launchAssist:r}=ql(),{requestThenAwait:n,...o}=zEe(),[i,a]=(0,zne.useState)(null),[s,l]=(0,zne.useState)(),u=m=>t?.links.find(g=>g.name===m)?.state,{arm:d,completed:f}=HEe(e,u(s)!=="connected",s);(0,zne.useEffect)(()=>{!f||!s||(l(void 0),n(s,`Restart ${s}'s web server`,()=>P5("webserver",s),IHr))},[f,s,n]);let p=async m=>{a(`Updating assist on ${m}\u2026`),await n(m,`Update ${m}`,()=>UEe(m),IHr),a(null)};return{update:m=>{if(u(m)!=="connected"){p(m);return}l(m),d(),r(["update"],void 0,{node:m})},progress:i,...o}}var xv=C(P(),1);function DHr({dialog:e,peer:t,sessions:r,reconnecting:n,onClose:o}){let{launchAssist:i,armUpdateReload:a}=ql(),s=AHr(),l=MHr(r);return(0,xv.jsxs)(xv.Fragment,{children:[e==="shortcuts"&&(0,xv.jsx)(CHr,{onClose:o}),e==="restart"&&t&&(0,xv.jsx)(xHr,{peer:t,onRestart:s.restart,onClose:o}),e==="restart"&&!t&&(0,xv.jsx)(kHr,{reconnecting:n,onClose:o}),e==="update"&&(0,xv.jsx)(_Hr,{peer:t,onConfirm:()=>{if(t){l.update(t);return}a(),i(["update"])},onClose:o}),(0,xv.jsx)(Kre,{notices:s}),(0,xv.jsx)(Kre,{notices:l})]})}var NHr=C(P(),1),OHr=nt((0,NHr.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");var WEe=C(P(),1),zAo="https://staffordwilliams.com/assist";function BHr(){return(0,WEe.jsx)(sr,{title:"Help",children:(0,WEe.jsx)(jt,{component:"a",href:zAo,target:"_blank",rel:"noopener noreferrer","aria-label":"Help",size:"small",sx:{color:"inherit"},children:(0,WEe.jsx)(OHr,{fontSize:"small"})})})}var $Hr=C(P(),1),FHr=nt((0,$Hr.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var zHr=C(ee(),1);var Une=C(P(),1);function UHr(){let e=an(),t=(0,zHr.useCallback)(()=>e("/config"),[e]),{matches:r,chords:n}=fo("openConfig");return Zi(r,t),(0,Une.jsx)(sr,{describeChild:!0,title:(0,Une.jsx)(Rd,{label:"Config",chords:n}),children:(0,Une.jsx)(jt,{size:"small",sx:{color:"inherit"},"aria-label":"Config",onClick:t,children:(0,Une.jsx)(FHr,{fontSize:"small"})})})}var HHr=C(P(),1),WHr=nt((0,HHr.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var GEe=C(ee(),1);var Hne=C(P(),1);function GHr({open:e,onOpen:t}){let r=(0,GEe.useRef)(null),{matches:n,chords:o}=fo("openMenu");return Zi(n,(0,GEe.useCallback)(()=>{r.current&&t(r.current)},[t])),(0,Hne.jsx)(sr,{describeChild:!0,title:(0,Hne.jsx)(Rd,{label:"Menu",chords:o}),children:(0,Hne.jsx)(jt,{ref:r,onClick:i=>t(i.currentTarget),size:"small",sx:{color:"inherit"},"aria-label":"Open menu","aria-haspopup":"true","aria-expanded":e?"true":void 0,children:(0,Hne.jsx)(WHr,{fontSize:"small"})})})}var qG=C(P(),1);function VHr({open:e,onOpen:t}){return(0,qG.jsxs)(G,{sx:{position:"fixed",top:8,right:16,zIndex:r=>r.zIndex.drawer+2,display:"flex",alignItems:"center",gap:.5,color:r=>r.tokens.color.appBar?.text??r.palette.primary.contrastText},children:[(0,qG.jsx)(BHr,{}),(0,qG.jsx)(UHr,{}),(0,qG.jsx)(GHr,{open:e,onOpen:t})]})}var aM=C(ee(),1);var jHr=C(ee(),1);var qHr=!0,UAo=new Set(["openMenu","cycleCards"]),HAo=Object.keys(b8).filter(e=>!UAo.has(e));function YHr(e,t){let r=x8();(0,jHr.useEffect)(()=>{if(!e)return;let n=o=>{HAo.some(i=>Ck(i,r).matches(o))&&t()};return globalThis.addEventListener("keydown",n,qHr),()=>globalThis.removeEventListener("keydown",n,qHr)},[e,t,r])}function KHr(){let[e,t]=(0,aM.useState)(null),[r,n]=(0,aM.useState)(!0),o=!!e,i=(0,aM.useCallback)(()=>t(null),[]),a=(0,aM.useCallback)(s=>{n(!0),t(s)},[]);return YHr(o,(0,aM.useCallback)(()=>{n(!1),t(null)},[])),{anchorEl:e,open:o,close:i,openAt:a,restoreFocus:r}}var Wne=C(ee(),1);function XHr(e){Zi(fo("shortcutsSheet").matches,e)}function ZHr(){let[e,t]=(0,Wne.useState)(null);XHr((0,Wne.useCallback)(()=>t("shortcuts"),[]));let r=(0,Wne.useCallback)(()=>t(null),[]);return{dialog:e,showDialog:t,closeDialog:r}}function QHr(){let{nodes:e,selected:t}=Cl();return e&&t&&t!==e.local?t:void 0}function JHr(e){return{restartLabel:e?`Restart ${e}`:iG.label,updateLabel:e?`Update assist on ${e}`:"Update assist"}}var qw=C(P(),1);function eWr({mode:e,toggle:t,sessions:r,reconnecting:n}){let{anchorEl:o,open:i,close:a,openAt:s,restoreFocus:l}=KHr(),{dialog:u,showDialog:d,closeDialog:f}=ZHr(),p=QHr(),h=m=>()=>{a(),d(m)};return(0,qw.jsxs)(qw.Fragment,{children:[(0,qw.jsx)(VHr,{open:i,onOpen:s}),(0,qw.jsxs)(Rs,{anchorEl:o,open:i,onClose:a,disableRestoreFocus:!l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[(0,qw.jsx)(QUr,{}),vHr({mode:e,...JHr(p),onToggleColorMode:()=>{t(),a()},onShowShortcuts:h("shortcuts"),onConnectMobile:a,onFirefoxExtension:a,onRestart:h("restart"),onUpdate:h("update")})]}),(0,qw.jsx)(DHr,{dialog:u,peer:p,sessions:r,reconnecting:n,onClose:f})]})}var nWr=C(ee(),1);var rWr=C(P(),1);function tWr({conflict:e,onConfirm:t,onCancel:r}){let{name:n,cwd:o,port:i,group:a}=e.existing,s=Qa(o),l=i?` on port ${i}`:"",u=s?` in ${s}`:"",d=a?`, holding the ${a} server slot`:"";return(0,rWr.jsx)(Ho,{title:a?`Replace the ${a} server?`:"Replace running server?",message:`"${n}" is already serving${l}${u}${d}. Replace it \u2014 stop the running server and start this one? Shift+click skips this dialog next time.`,confirmLabel:"Replace",confirmColor:"error",onConfirm:t,onCancel:r})}var VEe=C(P(),1);function oWr({socket:e,children:t}){let{serverConflict:r,clearServerConflict:n,retrySession:o,stopSession:i,startRun:a,discardSession:s}=e,l=(0,nWr.useMemo)(()=>({onStop:i,onStart:a,onDiscard:s}),[i,a,s]),u=()=>{r&&(r.runName?a(r.runName,r.cwd,!0,r.launchedFrom,r.node):r.sessionId&&o(r.sessionId,!0),n())};return(0,VEe.jsxs)($Le.Provider,{value:l,children:[t,r&&(0,VEe.jsx)(tWr,{conflict:r,onConfirm:u,onCancel:n})]})}var iWr=new Map;function aWr(e,t){if(!efe())return;let r=iWr.get(e);if(iWr.set(e,t),!!r)for(let[n,o]of Object.entries(t))Object.is(o,r[n])||y1(`\u0394 ${e}.${n}`)}var jEe=C(ee(),1);function sWr(e,t,r){if(!t)return null;let n=e[t];if(!n)return null;let o=r.find(i=>i.id===n);return!o||wl(o)!==t?null:n}function Nx(e,t,r){if(e)return t.find(n=>n.id===e)??r.find(n=>n.sessionId===e)}function qEe(){let{pathname:e}=mi();return e.startsWith("/backlog")||e.startsWith("/usage")}function lWr({selectedCwd:e,selectedCardId:t,sessions:r,history:n,activeByRepo:o,onSelect:i}){let a=Nx(t,r,n),s=a&&wl(a),l=!!(s&&s===e),u=sWr(o,e,r),d=(0,jEe.useRef)(t),f=qEe();(0,jEe.useEffect)(()=>{let p=d.current!==t&&!!s;d.current=t,!(f||p||l||!u)&&i(u)},[t,s,l,u,i,f])}var XEe=C(ee(),1);function cWr(e,t,r,n){return Nx(e,t,r)?.cwd||n}function uWr(e,t,r,n){let o=cWr(e,t,r,n.cwd),i=Nx(e,t,r);return{cwd:o,node:i?.cwd?i.node:n.node}}var Jat=C(ee(),1);function dWr(e,t,r){let{cwd:n,node:o,origin:i}=r,a=(0,Jat.useCallback)((l,u)=>{let d=sh(u,t),f=Sne(e,l);return f?f.clones[d]:d===(l===n?o:Qf)?l:void 0},[e,t,n,o]),s=(0,Jat.useCallback)(l=>Sne(e,l)?.origin??(l===n?i:void 0),[e,n,i]);return{cloneOn:a,originOf:s}}var YEe=C(ee(),1);function fWr(e,t,r,n){let o=(0,YEe.useRef)(e);(0,YEe.useEffect)(()=>{if(o.current===e)return;o.current=e;let i=Sne(t,r)?.clones[e];i&&n(i,e)},[e,t,r,n])}var jG=C(ee(),1);function pWr(e,t,r){if(t.node!==void 0)return t.node;let n=new Set(e.flatMap(o=>Object.entries(o.clones).filter(([,i])=>i===t.cwd).map(([i])=>i)));return n.has(r)?r:n.size===0||n.has(Qf)?Qf:[...n][0]}function hWr(e,t,r,n){let[o,i]=(0,jG.useState)({cwd:e}),a=(0,jG.useCallback)((l,u,d)=>i({cwd:l,node:u,origin:d}),[]);(0,jG.useEffect)(()=>{e&&!o.cwd&&i({cwd:e})},[e,o.cwd]);let s=pWr(t,{cwd:o.cwd,node:o.node===void 0?void 0:sh(o.node,n)},r);return{selectedCwd:o.cwd,selectedNode:s||void 0,selectedPick:{cwd:o.cwd,node:s,origin:o.origin},setSelectedCwd:a}}var mWr=C(ee(),1);function KEe(e,t,r){let n=Nx(e,t,r);return n&&wl(n)}function gWr(e,t,r,n){let o=KEe(e,t,r),i=Nx(e,t,r),a=i?.node??Qf,s=i?.repoGroup?.origin;(0,mWr.useEffect)(()=>{o&&n(o,a,s)},[o,a,s,n])}function yWr(e,t,r,n,o){let i=o.nodes?.local,a=sh(o.selected,i),s=(0,XEe.useMemo)(()=>B5(e,t),[e,t]),{selectedCwd:l,selectedNode:u,selectedPick:d,setSelectedCwd:f}=hWr(e,s,a,i);gWr(r,n,t,f),fWr(a,s,l,f);let{cloneOn:p,originOf:h}=dWr(s,i,d),m=(0,XEe.useMemo)(()=>s.map(v=>y9r(v,a)),[s,a]),{cwd:g,node:y}=uWr(r,n,t,{cwd:l,node:u});return(0,XEe.useMemo)(()=>({repos:m,selectedCwd:l,selectedNode:u,worktreeCwd:g,worktreeNode:y,setSelectedCwd:f,cloneOn:p,originOf:h}),[m,l,u,g,y,f,p,h])}var QEe=C(ee(),1);var e3=C(ee(),1);var vWr=C(ee(),1),ZEe="assist:reloaded-after-update";function bWr(e){(0,vWr.useEffect)(()=>{globalThis.sessionStorage?.getItem(ZEe)&&(globalThis.sessionStorage.removeItem(ZEe),e({message:"Reloaded after updating assist",sessionId:null}))},[e])}function xWr(e,t,r,n){let{arm:o,completed:i}=HEe(e,t),a=(0,e3.useRef)(!1),s=(0,e3.useCallback)(()=>{globalThis.sessionStorage?.setItem(ZEe,"1")},[]),{error:l,restart:u}=A5("webserver",t,s);return bWr(r),(0,e3.useEffect)(()=>{l&&n(l)},[l,n]),(0,e3.useEffect)(()=>{!i||a.current||(a.current=!0,u())},[i,u]),{armUpdateReload:(0,e3.useCallback)(()=>{a.current=!1,o()},[o])}}function SWr(e){let{armUpdateReload:t}=xWr(e.sessions,e.reconnecting,e.setSuccess,e.setError),r=c1(e.selectSession),n=(0,QEe.useMemo)(()=>({launchAssist:e.createAssistSession,launchAgentInStream:e.createSessionInStream,resumeSession:e.resumeSession,armUpdateReload:t,activateSession:r,sendInput:e.sendInput}),[e.createAssistSession,e.createSessionInStream,e.resumeSession,t,r,e.sendInput]),o=an(),i=(0,QEe.useCallback)(a=>{e.selectSession(a),o("/sessions"),e.clearSuccess()},[o,e.selectSession,e.clearSuccess]);return{launch:n,viewLaunchedSession:i}}var TWr=C(ee(),1);function wWr(e,t,r,n){let o=KEe(e,t,r);(0,TWr.useEffect)(()=>{e&&o&&n({type:"set-active",cwd:o,sessionId:e})},[e,o,n])}var JEe=C(ee(),1);function CWr(e,t){let r=(0,JEe.useRef)(new Map);(0,JEe.useEffect)(()=>{let n=new Set;for(let{id:o,status:i}of e)n.add(o),r.current.get(o)!==i&&(r.current.set(o,i),console.debug(`[sessions] render session ${o} status=${i}`),t({type:"ui-status",sessionId:o,status:i}));for(let o of r.current.keys())n.has(o)||r.current.delete(o)},[e,t])}var YG=C(ee(),1),kWr="assist.sessions.node";function WAo(){try{return localStorage.getItem(kWr)}catch{return null}}function GAo(e){try{localStorage.setItem(kWr,e)}catch{}}function _Wr(e){let[t,r]=(0,YG.useState)(WAo),n=(0,YG.useCallback)(o=>{r(o),GAo(o)},[]);return(0,YG.useMemo)(()=>{let o=e?[e.local,...e.links.map(i=>i.name)]:[];return{nodes:e,names:o,visible:o.length>1,selected:t&&o.includes(t)?t:e?.local,select:n}},[e,t,n])}var RWr=C(ee(),1);function EWr(e){let t=e;if(t.type==="create")return{cwd:t.cwd,title:t.prompt?.trim()||(t.design?"New design session":"New session"),node:t.node};if(t.type==="create-assist"){let r=t.title?.trim();return{cwd:t.cwd,title:r||"New session",named:!!r,node:t.node}}return null}function PWr(e,t){return(0,RWr.useCallback)(r=>{let n=e.current;n?.readyState===WebSocket.OPEN&&n.send(JSON.stringify(r));let o=EWr(r);o&&t(o)},[e,t])}var L0=C(ee(),1);function e4e(e,t,r,n,o){e({type:"create",prompt:r||void 0,cwd:n,...t,...o?{node:o}:{}})}function AWr(e){return(t,r,n)=>e4e(e,{design:!0},t,r,n)}function LWr(e){return(t,r,n,o)=>e4e(e,{harness:t},r,n,o)}function IWr(e){return(t,r,n)=>e4e(e,{auto:!0},t,r,n)}function MWr(e){return(t,r,n,o,i)=>e({type:"resume",sessionId:t,cwd:r,name:n,harness:o,node:i})}function DWr(e,t){return(r,n)=>{t.delete(r),e({type:"retry",sessionId:r,replace:n})}}function NWr(e,t){return r=>{t.delete(r),e({type:"restart",sessionId:r})}}function OWr(e,t){return(r,n)=>{e({type:"dismiss",sessionId:r,...n}),t.delete(r)}}function BWr(e,t){return r=>{e({type:"discard",sessionId:r}),t.delete(r)}}function $Wr(e){return t=>e({type:"stop",sessionId:t})}function FWr(e){return(t,r,n)=>e({type:"transfer",sessionId:t,target:r,cwd:n})}function zWr(e){return t=>e({type:"cancel-transfer",sessionId:t})}function UWr(e){return(t,r,n,o,i)=>e({type:"create-run",runName:t,cwd:r,replace:n,launchedFrom:o,node:i})}function HWr(e){return(t,r)=>e({type:"set-autoapprove",sessionId:t,enabled:r})}function WWr(e){return(t,r)=>e({type:"set-autoadvance",sessionId:t,enabled:r})}function GWr(e){return(t,r)=>e({type:"set-starred",sessionId:t,starred:r})}function VWr(e){return(t,r)=>e({type:"input",sessionId:t,data:r,viewerId:PI})}function qWr(e){return(t,r,n,o)=>e({type:"resize",sessionId:t,cols:r,rows:n,viewerId:PI,claim:o==="claim",refresh:o==="refresh"})}function jWr(e){return(t,r,n,o)=>e({type:"pr-decision",sessionId:t,requestId:r,decision:n,...o})}var sM=C(ee(),1);function YWr(e){return(t,r,n)=>e({type:"create",prompt:r||void 0,cwd:n,joinSessionId:t,auto:!0})}function KWr(e){return(t,r,n)=>e({type:"create-assist",assistArgs:t,cwd:r,...n})}function XWr(e){return{createSession:(0,sM.useMemo)(()=>IWr(e),[e]),createSessionInStream:(0,sM.useMemo)(()=>YWr(e),[e]),createDesignSession:(0,sM.useMemo)(()=>AWr(e),[e]),createHarnessSession:(0,sM.useMemo)(()=>LWr(e),[e]),createAssistSession:(0,sM.useMemo)(()=>KWr(e),[e]),resumeSession:(0,sM.useMemo)(()=>MWr(e),[e])}}var Gne=C(ee(),1);function ZWr(e,t){let r=(0,Gne.useCallback)((a,s)=>{DWr(e,t.current)(a,s)},[e,t]),n=(0,Gne.useCallback)(a=>{NWr(e,t.current)(a)},[e,t]),o=(0,Gne.useCallback)((a,s)=>{OWr(e,t.current)(a,s)},[e,t]),i=(0,Gne.useCallback)(a=>{BWr(e,t.current)(a)},[e,t]);return{retrySession:r,restartSession:n,dismissSession:o,discardSession:i}}function QWr(e,t,r){return(n,o)=>{let i=t.get(n);return i&&(o(i),e({type:"snapshot",sessionId:n})),r.set(n,o),()=>r.delete(n)}}function JWr(e,t,r){let n={...XWr(e),sendInput:(0,L0.useMemo)(()=>VWr(e),[e]),sendResize:(0,L0.useMemo)(()=>qWr(e),[e]),sendPrDecision:(0,L0.useMemo)(()=>jWr(e),[e]),setAutoApprove:(0,L0.useMemo)(()=>HWr(e),[e]),setAutoAdvance:(0,L0.useMemo)(()=>WWr(e),[e]),setStarred:(0,L0.useMemo)(()=>GWr(e),[e]),stopSession:(0,L0.useMemo)(()=>$Wr(e),[e]),startRun:(0,L0.useMemo)(()=>UWr(e),[e]),transferSession:(0,L0.useMemo)(()=>FWr(e),[e]),cancelTransfer:(0,L0.useMemo)(()=>zWr(e),[e])},o=(0,L0.useMemo)(()=>QWr(e,t.current,r.current),[e,t,r]);return{...n,...ZWr(e,t),onOutput:o}}var Vne=C(ee(),1);function eGr(e,t,r){let n=(0,Vne.useCallback)(s=>{r(s),e({type:"fetch-transcript",sessionId:s})},[e,r]),o=(0,Vne.useCallback)(s=>e({type:"fetch-user-messages",sessionId:s}),[e]),i=(0,Vne.useCallback)(()=>{r(null)},[r]),a=(0,Vne.useCallback)(s=>{r(null),t(s)},[t,r]);return{viewTranscript:n,fetchUserMessages:o,clearTranscript:i,selectSession:a}}var o4e=C(ee(),1);function tGr(e,t){let r=new Set(t.map(o=>o.id)),n=null;for(let o of Object.values(e))r.has(o)&&(n=o);return n}var KG=C(ee(),1);function rGr(){let[e,t]=(0,KG.useState)(null),r=(0,KG.useRef)(e);r.current=e;let n=(0,KG.useCallback)(()=>r.current,[]);return{activeId:e,setActiveId:t,getActiveId:n}}var oGr=C(ee(),1);function nGr(e,t,r=null){return t!==null?e.some(n=>n.id===t)?t:e[0]?.id??null:r&&e.some(n=>n.id===r)?r:e[0]?.id??null}function iGr(e,t,r){let n=qEe();(0,oGr.useEffect)(()=>{if(n){t(null);return}t(o=>nGr(e,o,r))},[e,t,r,n])}var t4e=C(ee(),1);function aGr(){let[e,t]=(0,t4e.useState)({}),[r,n]=(0,t4e.useState)(null),[o,i]=(0,t4e.useState)(null);return{activeByRepo:e,setActiveByRepo:t,daemonVersion:r,setDaemonVersion:n,nodes:o,setNodes:i}}var Sv=C(ee(),1);function sGr(e,t){for(let r of t)clearTimeout(e.get(r)),e.delete(r)}function lGr(e,t){let r=new Set(t.map(n=>n.id));return[...e.keys()].filter(n=>!r.has(n))}function cGr(e,t){if(!t.some(n=>e.has(n)))return e;let r=new Set(e);for(let n of t)r.delete(n);return r}function uGr(e,t){let r=[];for(let n of t){let o=e.get(n.id);o!==void 0&&o!==n.startedAt&&r.push(n.id)}return r}function dGr(e,t){return t.filter(r=>r.commandType==="run"&&e.get(r.id)!==r.startedAt).map(r=>r.id)}var VAo=1500;function fGr(){let[e,t]=(0,Sv.useState)(new Set),r=(0,Sv.useRef)(new Map),n=(0,Sv.useRef)(new Map),o=(0,Sv.useCallback)(s=>{t(l=>l.has(s)?l:new Set(l).add(s))},[]),i=(0,Sv.useCallback)(s=>{let l=n.current;for(let u of s)clearTimeout(l.get(u)),l.set(u,setTimeout(()=>{l.delete(u),o(u)},VAo))},[o]);(0,Sv.useEffect)(()=>{let s=n.current;return()=>{for(let l of s.values())clearTimeout(l)}},[]);let a=(0,Sv.useCallback)(s=>{let l=lGr(r.current,s),u=[...uGr(r.current,s),...l],d=dGr(r.current,s);r.current=new Map(s.map(f=>[f.id,f.startedAt])),sGr(n.current,l),u.length&&t(f=>cGr(f,u)),i(d)},[i]);return{initialized:e,markInitialized:o,syncSessions:a}}var t3=C(ee(),1);function pGr(){let[e,t]=(0,t3.useState)(null),[r,n]=(0,t3.useState)(null),[o,i]=(0,t3.useState)(null),a=(0,t3.useCallback)(()=>t(null),[]),s=(0,t3.useCallback)(()=>n(null),[]),l=(0,t3.useCallback)(()=>i(null),[]);return{error:e,setError:t,clearError:a,success:r,setSuccess:n,clearSuccess:s,serverConflict:o,setServerConflict:i,clearServerConflict:l}}var Ox=C(ee(),1);function hGr(e,t){return[...e,{...t,status:"launching"}]}function r4e(e){return e.find(t=>t.status==="launching")}function mGr(e){let t=r4e(e);return t?e.filter(r=>r.id!==t.id):e}function gGr(e,t){let r=r4e(e);return r?est(e,r.id,t):e}function est(e,t,r){return e.map(n=>n.id===t&&n.status==="launching"?{...n,status:"error",error:r}:n)}function yGr(e,t){return e.filter(r=>r.id!==t)}var vGr=C(ee(),1);var qAo=6e4,jAo="Launch timed out \u2014 the session did not start.";function bGr(e,t){(0,vGr.useEffect)(()=>{let r=e.filter(o=>o.status==="launching");if(r.length===0)return;let n=r.map(o=>setTimeout(()=>t(i=>est(i,o.id,jAo)),Math.max(0,qAo-(Date.now()-o.startedAt))));return()=>n.forEach(clearTimeout)},[e,t])}function xGr(){let[e,t]=(0,Ox.useState)([]),r=(0,Ox.useRef)([]),n=(0,Ox.useCallback)(l=>{r.current=l(r.current),t(r.current)},[]),o=(0,Ox.useCallback)(l=>{n(u=>hGr(u,{id:crypto.randomUUID(),startedAt:Date.now(),...l}))},[n]),i=(0,Ox.useCallback)(()=>{let l=r4e(r.current);return n(mGr),l?.named?l.title:void 0},[n]),a=(0,Ox.useCallback)(l=>n(u=>gGr(u,l)),[n]),s=(0,Ox.useCallback)(l=>n(u=>yGr(u,l)),[n]);return bGr(e,n),{pendingLaunches:e,addPendingLaunch:o,resolvePendingLaunch:i,failPendingLaunch:a,dismissPendingLaunch:s}}var qne=C(ee(),1);function SGr(){let[e,t]=(0,qne.useState)(null),[r,n]=(0,qne.useState)({}),o=(0,qne.useCallback)((i,a)=>{i!=="claude"&&n(s=>({...s,[i]:a}))},[]);return{rateLimits:e,setRateLimits:t,harnessRateLimits:r,setHarnessRateLimits:o}}var TGr=C(ee(),1);function wGr(e,t){return(0,TGr.useCallback)(r=>{e(r),t(r)},[e,t])}var tst=C(ee(),1);function CGr(){let e=(0,tst.useRef)(new Map),t=(0,tst.useRef)(new Map);return{buffers:e,handlers:t}}var n4e=C(ee(),1);function kGr(){let[e,t]=(0,n4e.useState)(null),[r,n]=(0,n4e.useState)(null),[o,i]=(0,n4e.useState)(null);return{transcript:e,setTranscript:t,viewingTranscriptSessionId:r,setViewingTranscriptSessionId:n,userMessages:o,setUserMessages:i}}var r3=C(ee(),1);function _Gr(e,t){let r=e.sessionId;t.buffers.current?.delete(r),t.handlers.current?.get(r)?.("\x1Bc")}function EGr(e,t){let r=e.sessionId,n=t.resolvePendingLaunch();e.isNew&&t.getActiveId()!==null||(t.setViewingTranscriptSessionId(null),t.setActiveId(r)),e.isNew&&t.setSuccess({message:n?`Started ${n}`:"New session started",sessionId:r})}function RGr(e,t){let r=e.message;t.setError(r),t.failPendingLaunch(r)}function PGr(e,t){let r=e.rateLimits,n=e.harness;!n||n==="claude"?t.setRateLimits(r):t.setHarnessRateLimits?.(n,r)}function AGr(e,t){t.setNodes({local:e.local,links:e.links??[]})}function LGr(e,t){t.setSuccess({message:e.message,sessionId:null})}function IGr(e,t){let r=e.sessionId,n=t.buffers.current?.get(r)??"";t.buffers.current?.set(r,n+e.data),t.handlers.current?.get(r)?.(e.data),t.markInitialized(r)}function MGr(e,t){t.setServerConflict({existing:e.existing,runName:e.runName,cwd:e.cwd,sessionId:e.sessionId,launchedFrom:e.launchedFrom,node:e.node})}function DGr(e,t){let r=e.sessions;t.setSessions(r),e.cwd&&t.setCurrentCwd(e.cwd),t.setActiveByRepo(e.active??{})}function NGr(e,t){let r=e.sessionId,n=e.data;t.buffers.current?.set(r,n),t.handlers.current?.get(r)?.(`\x1Bc${n}`)}var YAo={sessions:DGr,created:EGr,history:(e,t)=>t.setHistory(e.sessions),transcript:(e,t)=>t.setTranscript({sessionId:e.sessionId,messages:e.messages}),"user-messages":(e,t)=>t.setUserMessages({sessionId:e.sessionId,messages:e.messages}),hello:(e,t)=>t.setDaemonVersion(e.version),nodes:AGr,error:RGr,notice:LGr,inbox:()=>{qs.refresh(),qs.refreshStatus()},"inbox-activity":()=>{qs.refreshStatus()},"run-conflict":MGr,limits:PGr,clear:_Gr,output:IGr,snapshot:NGr};function OGr(e,t){YAo[e.type]?.(e,t)}function BGr(e,t={}){let r=new WebSocket(vxt("/ws"));return r.onopen=()=>{t.onOpen?.(),r.send(JSON.stringify({type:"hello"})),r.send(JSON.stringify({type:"history"}))},r.onmessage=n=>{OGr(JSON.parse(n.data),e)},r.onclose=()=>t.onClose?.(),r}function $Gr(e,t,r,n){let o=!1,i,a=0,s=!1,l=()=>{o||t(BGr(e,{onOpen:()=>{s&&r(),s=!1,n(!1),a=0},onClose:()=>{if(o)return;s=!0,n(!0);let u=Math.min(300*2**a,2e3);a+=1,i=setTimeout(l,u)}}))};return l(),()=>{o=!0,i&&clearTimeout(i)}}function FGr(e){let t=(0,r3.useRef)(null),[r,n]=(0,r3.useState)(!1),{handleSessions:o,markInitialized:i,buffers:a,handlers:s}=e;(0,r3.useEffect)(()=>{let u=()=>{a.current?.clear();let f=s.current;if(f)for(let p of f.values())p("\x1Bc")},d=$Gr({...e,setSessions:o},f=>{t.current=f},u,n);return()=>{d(),t.current?.close()}},[o,i,a,s]);let l=(0,r3.useCallback)(()=>{let u=t.current;u?.readyState===WebSocket.OPEN&&u.send(JSON.stringify({type:"history"}))},[]);return{wsRef:t,requestHistory:l,reconnecting:r}}function zGr(){let[e,t]=(0,o4e.useState)([]),[r,n]=(0,o4e.useState)([]),{activeId:o,setActiveId:i,getActiveId:a}=rGr(),s=aGr(),l=kGr(),[u,d]=(0,o4e.useState)(""),f=pGr(),p=xGr(),h=SGr(),{initialized:m,markInitialized:g,syncSessions:y}=fGr(),v=CGr(),b=wGr(y,t),{wsRef:x,requestHistory:T,reconnecting:w}=FGr({handleSessions:b,setHistory:n,getActiveId:a,setActiveId:i,...s,...l,setCurrentCwd:d,...f,...p,...h,markInitialized:g,...v});return iGr(e,i,tGr(s.activeByRepo,e)),{sessions:e,history:r,activeId:o,setActiveId:i,...s,...l,currentCwd:u,...f,...p,...h,initialized:m,wsRef:x,...v,requestHistory:T,reconnecting:w}}function i4e(){let e=zGr(),{wsRef:t,buffers:r,handlers:n,addPendingLaunch:o,activeId:i,sessions:a}=e,s=_Wr(e.nodes),l=PWr(t,o),u=JWr(l,r,n);wWr(i,a,e.history,l),CWr(a,l);let d=eGr(l,e.setActiveId,e.setViewingTranscriptSessionId);return{...e,...u,...d,nodeSelection:s}}var XG=C(ee(),1);var UGr="assist:sidebar-collapsed";function HGr(){let[e,t]=(0,XG.useState)(()=>Vl(UGr).length>0),r=(0,XG.useCallback)(()=>{t(n=>{let o=!n;return iu(UGr,o?[!0]:[]),o})},[]);return(0,XG.useMemo)(()=>({collapsed:e,onToggleCollapsed:r}),[e,r])}var WGr=C(ee(),1);function GGr(){(0,WGr.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await Jt("/api/hotkeys");if(!t.ok)return;let r=await t.json();e||YR.set(r)}catch(t){Pr(t,"hotkey bindings")}})(),()=>{e=!0}},[])}function VGr(){let e=i4e(),t=A2e(e),r=yWr(e.currentCwd,e.history,t,e.sessions,e.nodeSelection);lWr({selectedCwd:r.selectedCwd,selectedCardId:t,sessions:e.sessions,history:e.history,activeByRepo:e.activeByRepo,onSelect:e.selectSession});let{launch:n,viewLaunchedSession:o}=SWr(e);GGr();let i=HGr();return aWr("shell",{...e,selection:r,launch:n,sidebarCollapse:i}),{socket:e,selection:r,launch:n,viewLaunchedSession:o,sidebarCollapse:i}}var Mm=C(P(),1),KAo={zIndex:e=>e.zIndex.drawer+1},XAo={minHeight:48};function jGr({mode:e,toggle:t}){let r=VGr(),{socket:n,selection:o,viewLaunchedSession:i}=r,{nodes:a,transferSession:s,cancelTransfer:l}=n,u=(0,qGr.useMemo)(()=>({nodes:a,transfer:s,cancel:l}),[a,s,l]);return(0,Mm.jsx)(dUr,{shell:r,children:(0,Mm.jsxs)(Fat.Provider,{value:n.daemonVersion,children:[(0,Mm.jsx)(eWr,{mode:e,toggle:t,sessions:n.sessions,reconnecting:n.reconnecting}),(0,Mm.jsx)(E3e,{position:"fixed",sx:KAo,"data-testid":"toolbar",children:(0,Mm.jsx)(XUr,{socket:n,selection:o})}),(0,Mm.jsx)(hR,{variant:"dense",sx:XAo}),(0,Mm.jsx)(oLe.Provider,{value:u,children:(0,Mm.jsx)(oWr,{socket:n,children:(0,Mm.jsx)(K$r,{socket:n})})}),(0,Mm.jsx)(zFr,{socket:n}),(0,Mm.jsx)(uUr,{socket:n,onViewLaunchedSession:i})]})})}function XGr(e){return e instanceof Error?e.message:String(e)}function ZAo(e){return e.filename?` (${e.filename}:${e.lineno}:${e.colno})`:""}function YGr(e){SY(e.error)||(HR(e.error),TY("error",`${e.message||XGr(e.error)}${ZAo(e)}`))}function KGr(e){SY(e.reason)||(HR(e.reason),TY("rejection",XGr(e.reason)))}function ZGr(){return globalThis.addEventListener("error",YGr),globalThis.addEventListener("unhandledrejection",KGr),()=>{globalThis.removeEventListener("error",YGr),globalThis.removeEventListener("unhandledrejection",KGr)}}var QGr=C(ee(),1);function JGr(){let[e,t]=(0,QGr.useState)(()=>{try{return localStorage.getItem("theme-mode")??"dark"}catch{return"dark"}});return{mode:e,toggle:()=>t(n=>{let o=n==="dark"?"light":"dark";try{localStorage.setItem("theme-mode",o)}catch{}return o})}}function eVr({color:e,radius:t}){return{MuiMenu:{styleOverrides:{paper:{borderRadius:t.md},list:{padding:4}}},MuiMenuItem:{styleOverrides:{root:{minHeight:30,padding:"5px 10px",borderRadius:4,fontSize:13,"&:hover":{backgroundColor:e.raised},"& .MuiListItemIcon-root":{minWidth:28},"& .MuiSvgIcon-root":{fontSize:16},"& .MuiListItemText-primary":{fontSize:13}}}}}}function tVr(e){let{color:t,radius:r,elevation:n,type:o}=e,i={border:`1px solid ${t.line}`};return{...eVr(e),MuiTooltip:{styleOverrides:{tooltip:{...i,backgroundColor:t.overlay.background,color:t.overlay.text,borderRadius:r.md,boxShadow:n.overlay,fontSize:`${o.scale.caption/16}rem`,padding:"6px 10px"},arrow:{color:t.overlay.background}}},MuiPopover:{styleOverrides:{paper:{...i,boxShadow:n.overlay}}},MuiBackdrop:{styleOverrides:{root:{"&:not(.MuiBackdrop-invisible)":{backgroundColor:t.scrim,backdropFilter:"blur(2px)"}}}},MuiDialog:{styleOverrides:{paper:{...i,backgroundColor:t.surface,borderRadius:r.md+4,boxShadow:n.dialog}}}}}var rVr=({variant:e})=>e==="outlined"||e==="tonal",nVr=[{props:{size:"small"},style:{minHeight:26,padding:"4px 9px",fontSize:12}},{props:rVr,style:{padding:"5px 11px"}},{props:e=>rVr(e)&&e.size==="small",style:{padding:"3px 8px"}}];var a4e=["primary","secondary","success","warning","error","info","check"];function jne(e,t){return{backgroundColor:Vr(e,t),borderColor:Vr(e,.35),color:e}}function oVr({color:e}){return[{props:{variant:"tonal"},style:{backgroundColor:e.raised,border:`1px solid ${e.line}`,color:e.text.primary,"&:hover":{backgroundColor:e.raised,borderColor:e.text.disabled}}},...a4e.filter(t=>t!=="primary").map(t=>({props:{variant:"tonal",color:t},style:{...jne(e[t].main,.16),"&:hover":jne(e[t].main,.24)}}))]}var iVr={"& > *:nth-of-type(1)":{fontSize:16}};function aVr(e){let{color:t,radius:r,density:n}=e,{minHeight:o,fontSize:i,paddingX:a}=n.button;return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{minHeight:o,padding:`6px ${a}px`,borderRadius:r.sm,fontSize:i,fontWeight:600,lineHeight:"18px"},startIcon:{marginLeft:-2,marginRight:6,...iVr},endIcon:{marginLeft:6,marginRight:-2,...iVr}},variants:[...nVr,{props:{variant:"text",color:"primary"},style:{color:t.text.secondary,"&:hover":{backgroundColor:t.raised,color:t.text.primary}}},...oVr(e),{props:{variant:"outlined",color:"error"},style:{borderColor:Vr(t.error.main,.35),"&:hover":{borderColor:t.error.main,backgroundColor:Vr(t.error.main,.1)}}}]}}}function rst({color:e},t){return[{props:{variant:t,color:"default"},style:{backgroundColor:"transparent",border:`1px solid ${e.line}`,color:e.text.secondary,"&.MuiChip-clickable:hover":{backgroundColor:e.raised}}},...a4e.map(r=>({props:{variant:t,color:r},style:{...jne(e[r].main,.14),borderColor:"transparent","& .MuiChip-deleteIcon":{color:Vr(e[r].main,.7),"&:hover, &:active":{color:e[r].main}},"&.MuiChip-clickable:hover":{backgroundColor:Vr(e[r].main,.22)}}}))]}function sVr(e){return{MuiChip:{styleOverrides:{root:{height:20,fontSize:11,fontWeight:600,borderRadius:999},sizeSmall:{height:20,"& .MuiChip-label":{padding:"0 7px"}},label:{padding:"0 8px"},icon:{fontSize:14,marginLeft:6,marginRight:-2},deleteIcon:{fontSize:14,marginLeft:-2,marginRight:4},outlined:{borderColor:e.color.line}},variants:[...rst(e,"tonal"),...rst(e,"filled")]}}}function lVr(e){return{...aVr(e),MuiButtonGroup:{defaultProps:{disableElevation:!0},variants:[{props:{variant:"tonal"},style:{"& .MuiButtonGroup-middleButton, & .MuiButtonGroup-lastButton":{marginLeft:-1}}}]},...sVr(e)}}var nst=e=>`color-mix(in srgb, currentColor ${e}%, transparent)`,QAo={".MuiAppBar-root &":{color:"inherit","&:hover":{backgroundColor:nst(8)},"&.Mui-selected":{color:"inherit",backgroundColor:nst(12),boxShadow:`inset 0 0 0 1px ${nst(18)}`}}};function cVr({color:e,radius:t}){return{MuiTabs:{styleOverrides:{root:{minHeight:40,alignItems:"center"},list:{gap:2},indicator:{display:"none"}}},MuiTab:{styleOverrides:{root:{minHeight:30,padding:"6px 10px",borderRadius:t.sm,textTransform:"none",fontSize:13,fontWeight:500,opacity:1,color:e.text.secondary,"&:hover":{backgroundColor:e.raised,color:e.text.primary},"&.Mui-selected":{color:e.text.primary,backgroundColor:e.raised,boxShadow:`inset 0 0 0 1px ${e.line}`},...!e.appBar&&QAo}}}}}var uVr=(e,t)=>({width:e,height:e,"& .MuiSvgIcon-root":{fontSize:t}});function dVr({color:e,radius:t,density:r}){let{side:n,icon:o,smallSide:i,smallIcon:a}=r.iconButton;return{MuiIconButton:{styleOverrides:{root:{...uVr(n,o),padding:0,borderRadius:t.sm,"&:hover":{backgroundColor:e.raised}}},variants:[{props:{size:"small"},style:uVr(i,a)},{props:{color:"default"},style:{color:e.text.secondary,"&:hover":{color:e.text.primary},...!e.appBar&&{".MuiAppBar-root &, .MuiAppBar-root &:hover":{color:"inherit"}}}}]}}}function fVr({color:e,radius:t}){return{MuiToggleButtonGroup:{styleOverrides:{root:{padding:2,gap:2,border:`1px solid ${e.line}`,borderRadius:t.sm,backgroundColor:e.background},grouped:{margin:0,border:0,borderRadius:4}}},MuiToggleButton:{styleOverrides:{root:{padding:"3px 8px",border:0,borderRadius:4,fontSize:13,fontWeight:500,lineHeight:"18px",textTransform:"none",color:e.text.secondary,"& .MuiSvgIcon-root":{fontSize:16},"&:hover":{backgroundColor:"transparent",color:e.text.primary},"&.Mui-selected, &.Mui-selected:hover":{backgroundColor:e.raised,color:e.text.primary}}}}}}var s4e=".MuiOutlinedInput-notchedOutline";function pVr({color:e,radius:t,density:r}){let n=r.inputFontSize;return{MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.background,borderRadius:t.sm,fontSize:n,color:e.text.primary,[`& ${s4e}`]:{borderColor:e.line},[`&:hover ${s4e}`]:{borderColor:e.text.disabled},[`&.Mui-focused ${s4e}`]:{borderColor:e.primary.main,borderWidth:1},[`&.Mui-error ${s4e}`]:{borderColor:e.error.main}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:n,color:e.text.secondary,"&.Mui-focused":{color:e.primary.main}}}},MuiSelect:{styleOverrides:{icon:{color:e.text.disabled}}}}}function hVr({color:e,density:t}){let{width:r,height:n,thumb:o}=t.switch;return{MuiSwitch:{styleOverrides:{root:{width:r,height:n,padding:0,"& .MuiSwitch-switchBase":{padding:2,color:e.text.secondary,"&.Mui-checked":{transform:`translateX(${r-n}px)`,color:e.primary.contrastText},"&.Mui-checked + .MuiSwitch-track":{backgroundColor:e.primary.main,opacity:1}},"& .MuiSwitch-thumb":{width:o,height:o,boxShadow:"none"},"& .MuiSwitch-track":{borderRadius:n/2,backgroundColor:e.line,opacity:1}}}},MuiFormControlLabel:{styleOverrides:{root:{"&:has(.MuiSwitch-root)":{marginLeft:0,gap:8}}}}}}function mVr(e){let{appBar:t}=e.color;return{...tVr(e),...lVr(e),...dVr(e),...fVr(e),...pVr(e),...hVr(e),...cVr(e),MuiPaper:{styleOverrides:{root:{backgroundImage:"none"},outlined:{borderColor:e.color.line}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar},styleOverrides:{root:t&&{backgroundColor:t.background,color:t.text,borderBottom:`1px solid ${e.color.line}`}}}}}var Tv="#0e1116",ost="#141820",l4e="#1b202a",c4e="#e3e7ee",ist="#8a93a3",Yne="#8b9cff",u4e="#5fd0a0",d4e="#f2b45a",f4e="#f27a7a",gVr="#6cc8d8",yVr={secondary:"rgba(255, 255, 255, 0.7)",hover:"rgba(255, 255, 255, 0.12)",active:"rgba(255, 255, 255, 0.16)",dot:"#ffb74d",dotRing:"rgba(0, 0, 0, 0.15)"},p4e={dark:{color:{background:Tv,surface:ost,raised:l4e,line:"#262c37",lineSoft:"#1d222b",text:{primary:c4e,secondary:ist,disabled:"#5c6473"},selected:"rgba(139, 156, 255, 0.14)",wash:{warning:"rgba(242, 180, 90, 0.09)",error:"rgba(242, 122, 122, 0.09)",accent:"rgba(139, 156, 255, 0.1)",check:"rgba(108, 200, 216, 0.09)"},well:Tv,stripe:l4e,codeWash:"rgba(255, 255, 255, 0.08)",overlay:{background:l4e,text:c4e},scrim:"rgba(0, 0, 0, 0.5)",appBar:{background:ost,text:c4e},onAppBar:{...yVr,secondary:ist,level:{ok:u4e,warn:d4e,over:f4e}},statusBar:{background:ost,text:ist,hoverText:c4e,secondary:"#5c6473",hover:l4e,active:"transparent",dot:Yne,dotRing:"rgba(139, 156, 255, 0.14)",readyText:Yne,level:{ok:u4e,warn:d4e,over:f4e}},primary:{main:Yne,contrastText:Tv},secondary:{main:"#c99bff",contrastText:Tv},success:{main:u4e,contrastText:Tv},warning:{main:d4e,contrastText:Tv},error:{main:f4e,contrastText:Tv},info:{main:"#6cb6ff",contrastText:Tv},check:{main:gVr,contrastText:Tv}},terminal:{background:Tv,foreground:"#d6dbe4",cursor:Yne,cursorAccent:Tv,selectionBackground:"rgba(139, 156, 255, 0.28)",black:"#1b2029",red:f4e,green:u4e,yellow:d4e,blue:Yne,magenta:"#c99bff",cyan:gVr,white:"#c3c9d4",brightBlack:"#5c6473",brightRed:"#ff9a9a",brightGreen:"#82e0b6",brightYellow:"#ffc97a",brightBlue:"#a9b6ff",brightMagenta:"#dcb8ff",brightCyan:"#8fdbe8",brightWhite:"#eef1f6"},elevation:{appBar:0,overlay:"0 14px 34px rgba(0, 0, 0, 0.45)",dialog:"0 30px 60px rgba(0, 0, 0, 0.5)",stuckHeader:"0 8px 8px -9px rgba(0, 0, 0, 0.8)"}},light:{color:{background:"#fff",surface:"#fff",raised:"rgba(0, 0, 0, 0.04)",line:"rgba(0, 0, 0, 0.12)",lineSoft:"rgba(0, 0, 0, 0.12)",text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},selected:"rgba(0, 0, 0, 0.08)",wash:{warning:"rgba(255, 167, 38, 0.09)",error:"rgba(244, 67, 54, 0.09)",accent:"rgba(25, 118, 210, 0.08)",check:"rgba(0, 131, 143, 0.08)"},well:"#f3f4f6",stripe:"rgba(0, 0, 0, 0.1)",codeWash:"rgba(0, 0, 0, 0.06)",overlay:{background:"rgba(97, 97, 97, 0.92)",text:"#fff"},onAppBar:{...yVr,level:{ok:"#b9f6ca",warn:"#ffe57f",over:"#ffcdd2"}},primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"#fff"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20",contrastText:"#fff"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100",contrastText:"#fff"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828",contrastText:"#fff"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b",contrastText:"#fff"},check:{main:"#00838f",light:"#4fb3bf",dark:"#005662",contrastText:"#fff"},scrim:"rgba(15, 23, 42, 0.32)",statusBar:{background:"#f3f4f6",text:"rgba(0, 0, 0, 0.6)",hoverText:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.38)",hover:"rgba(0, 0, 0, 0.06)",active:"transparent",dot:"#1976d2",dotRing:"rgba(25, 118, 210, 0.16)",readyText:"#1976d2",level:{ok:"#2e7d32",warn:"#ed6c02",over:"#d32f2f"}}},terminal:{background:"#ffffff",foreground:"#333333",cursor:"#333333",cursorAccent:"#ffffff",selectionBackground:"#add6ff",black:"#000000",red:"#cd3131",green:"#107c10",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"},elevation:{appBar:0,overlay:"0 8px 24px rgba(15, 23, 42, 0.12)",dialog:"0 24px 48px rgba(15, 23, 42, 0.18)",stuckHeader:"0 6px 6px -7px rgba(0, 0, 0, 0.2)"}},font:{ui:'"Geist Variable", "Segoe UI", system-ui, sans-serif',mono:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace',terminal:'"Geist Mono Variable", ui-monospace, Menlo, Consolas, monospace'},type:{fontSize:14,terminalFontSize:13,scale:{caption:12,body2:14,body1:15,subtitle2:14,subtitle1:15,h6:16,h5:18,h4:24,button:14},button:{textTransform:"none",fontWeight:600}},radius:{sm:6,md:8},selection:{ringWidth:2,titleWeight:500},spacing:8,densities:{desktop:{target:30,bar:40,iconButton:{side:30,icon:18,smallSide:26,smallIcon:16},button:{minHeight:30,fontSize:13,paddingX:12},switch:{width:34,height:20,thumb:16},inputFontSize:13,filterSelectMinWidth:160,tabBar:{height:44,icon:20,label:10,badge:16,insetTrim:0}},touch:{target:48,bar:60,iconButton:{side:48,icon:30,smallSide:40,smallIcon:24},button:{minHeight:48,fontSize:17,paddingX:20},switch:{width:51,height:31,thumb:27},inputFontSize:16,filterSelectMinWidth:200,tabBar:{height:49,icon:26,label:11,badge:18,insetTrim:12}}}};var jw=e=>`${e/16}rem`;function vVr({font:e,type:t}){let{scale:r}=t;return{fontFamily:e.ui,fontFamilyMono:e.mono,fontSize:t.fontSize,button:{...t.button,fontSize:jw(r.button)},caption:{fontSize:jw(r.caption)},body2:{fontSize:jw(r.body2)},body1:{fontSize:jw(r.body1)},subtitle2:{fontSize:jw(r.subtitle2)},subtitle1:{fontSize:jw(r.subtitle1)},h6:{fontSize:jw(r.h6)},h5:{fontSize:jw(r.h5)},h4:{fontSize:jw(r.h4)}}}function bVr(e){return{MuiButtonBase:{styleOverrides:{root:{cursor:"pointer","&.Mui-disabled":{cursor:"default"}}}},MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiAppBar:{defaultProps:{elevation:e.elevation.appBar}}}}function JAo(e,t){let{dark:r,light:n,densities:o,...i}=p4e;return{...i,...e==="dark"?r:n,mode:e,density:o[t]}}function xVr(e,t="desktop"){let r=JAo(e,t),{color:n}=r;return Fv({tokens:r,palette:{mode:e,background:{default:n.background,paper:n.surface},primary:n.primary,secondary:n.secondary,success:n.success,warning:n.warning,error:n.error,info:n.info,check:n.check,text:n.text,divider:n.line,action:{hover:n.raised,selected:n.selected}},typography:vVr(r),shape:{borderRadius:r.radius.sm},spacing:r.spacing,components:{...bVr(r),...mVr(r)}})}function SVr(){if(typeof document>"u"||!document.fonts)return Promise.resolve();let{font:e,type:t}=p4e;return Promise.allSettled([document.fonts.load(`${t.fontSize}px ${e.ui}`),document.fonts.load(`${t.terminalFontSize}px ${e.terminal}`)])}var $qr=C(ee(),1);var n3=C(P(),1);function TVr({status:e,onClose:t}){return(0,n3.jsxs)(n3.Fragment,{children:[(0,n3.jsx)(Nu,{open:e.kind==="probing",children:(0,n3.jsx)(no,{severity:"info",variant:"filled",children:e.kind==="probing"?`Connecting to ${e.name}\u2026`:""})}),(0,n3.jsx)(kl,{error:e.kind==="error"?e.message:null,onClose:t})]})}var m4e=C(ee(),1);var e6o=/^\d+(\.\d+){3}$/;function lM(e){try{let{hostname:t}=new URL(e);return e6o.test(t)?t:t.split(".")[0]}catch{return""}}var t6o=/^[a-z]+:[/]{2}/i;function h4e(e){let t=e.trim(),r=t6o.test(t)?t:`https://${t}`;try{let n=new URL(r);return n.protocol!=="https:"&&n.protocol!=="http:"?void 0:n.origin}catch{return}}function r6o(e){try{return new URL(e)}catch{return}}function n6o(e){return e.protocol==="assist:"&&e.hostname==="add-node"&&(e.pathname===""||e.pathname==="/")}function wVr(e){let t=r6o(e);if(!t||!n6o(t))return{ok:!1,error:`Not an assist add-node link: ${e}`};let r=t.searchParams.get("url"),n=r?h4e(r):void 0;return n?{ok:!0,node:{name:t.searchParams.get("name")?.trim()||lM(n),url:n}}:{ok:!1,error:`The link has no valid node URL: ${r??"(missing)"}`}}var CVr=5e3,kVr="/api/health";async function o6o(e){let t=new AbortController,r=setTimeout(()=>t.abort(),CVr);try{let n=await fetch(`${e}${kVr}`,{signal:t.signal,cache:"no-store"});return n.ok?{ok:!0,health:await n.json()}:{ok:!1,error:`HTTP ${n.status}`,status:n.status}}catch(n){return t.signal.aborted?{ok:!1,error:`timed out after ${CVr/1e3}s`}:{ok:!1,error:n instanceof Error?n.message:String(n)}}finally{clearTimeout(r)}}async function o3(e){let t=Date.now(),r=await o6o(e);return r.ok||c8({at:new Date(t).toISOString(),method:"GET",path:kVr,base:e,status:r.status,error:r.status===void 0?r.error:void 0,durationMs:Date.now()-t}),r}async function _Vr(e,t){let r=wVr(e);if(!r.ok)return r;let{node:n}=r;t(n);let o=await o3(n.url);return o.ok?{ok:!0,node:n,health:o.health}:{ok:!1,error:`Can't reach ${n.name} at ${n.url}: ${o.error}`}}cM();var ust=Kw("App",{web:()=>Promise.resolve().then(()=>(IVr(),LVr)).then(e=>new e.AppWeb)});var QG=C(ee(),1);var f6o=5e3;function MVr(e){let t=(0,QG.useRef)(e),r=(0,QG.useRef)(void 0);(0,QG.useEffect)(()=>{t.current=e},[e]),(0,QG.useEffect)(()=>{let n=i=>{let a=Date.now(),s=r.current?.url===i&&a-r.current.at<f6o;r.current={url:i,at:a},s||t.current(i)},o=ust.addListener("appUrlOpen",({url:i})=>n(i));return ust.getLaunchUrl().then(i=>{i?.url&&n(i.url)}).catch(i=>Pr(i,"launch url")),()=>{o.then(i=>i.remove())}},[])}function DVr(e){let[t,r]=(0,m4e.useState)({kind:"idle"});MVr(async o=>{let i=await _Vr(o,a=>r({kind:"probing",name:a.name}));if(!i.ok){r({kind:"error",message:i.error});return}e(i.node,i.health),r({kind:"idle"})});let n=(0,m4e.useCallback)(()=>r({kind:"idle"}),[]);return{status:t,dismiss:n}}var Zne=C(P(),1);function NVr({name:e}){return(0,Zne.jsxs)(G,{sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,bgcolor:"background.default"},children:[(0,Zne.jsx)(Ao,{size:28}),(0,Zne.jsxs)(Ce,{variant:"body2",color:"text.secondary",children:["Connecting to ",e??"home node","\u2026"]})]})}var g4e=C(ee(),1),dst=(0,g4e.createContext)(null);function i3(){return(0,g4e.useContext)(dst)}var ya={top:"env(safe-area-inset-top, 0px)",bottom:"env(safe-area-inset-bottom, 0px)"};var BVr=C(P(),1);function OVr({value:e,error:t,onChange:r}){return(0,BVr.jsx)($n,{autoFocus:!0,label:"Web server URL",placeholder:"https://mac.tail1234.ts.net:3100",value:e,onChange:n=>r(n.target.value),error:!!t,helperText:t??"The address where you open the sessions page in a browser.",slotProps:{htmlInput:{autoCapitalize:"none",autoCorrect:"off",inputMode:"url"}}})}var Qne=C(ee(),1);function $Vr(e,t){let[r,n]=(0,Qne.useState)(e?.url??""),[o,i]=(0,Qne.useState)(e?.name),[a,s]=(0,Qne.useState)(),[l,u]=(0,Qne.useState)(!1),d=h4e(r),f=o??(d?lM(d):"");return{url:r,changeUrl:m=>{n(m),s(void 0)},name:f,setName:i,error:a,busy:l,submit:async m=>{if(m.preventDefault(),!d){s("Enter an http(s) URL, e.g. https://mac.tail1234.ts.net:3100");return}u(!0);let g=await t({name:f.trim()||lM(d),url:d});u(!1),s(g)}}}var JG=C(P(),1);function y4e({initial:e,submitLabel:t,onSubmit:r,children:n}){let o=$Vr(e,r);return(0,JG.jsxs)(kt,{component:"form",spacing:2,onSubmit:o.submit,children:[(0,JG.jsx)(OVr,{value:o.url,error:o.error,onChange:o.changeUrl}),(0,JG.jsx)($n,{label:"Name",value:o.name,onChange:i=>o.setName(i.target.value),helperText:"Filled in from the host name. Shown on the node chip.",slotProps:{htmlInput:{autoCapitalize:"none",autoCorrect:"off"}}}),(0,JG.jsx)(ht,{type:"submit",variant:"contained",size:"large",disabled:!o.url.trim()||o.busy,children:o.busy?"Checking\u2026":t}),n]})}var Xw=C(P(),1),p6o={height:"100%",boxSizing:"border-box",overflowY:"auto",display:"flex",justifyContent:"center",pt:`calc(${ya.top} + 28px)`,pb:`calc(${ya.bottom} + 24px)`,px:2.5,bgcolor:"background.default"},h6o={width:56,height:56,borderRadius:"14px",bgcolor:"action.hover",border:1,borderColor:"divider",display:"grid",placeItems:"center",fontFamily:"fontFamilyMono",fontSize:22,fontWeight:600,color:"primary.main"};function FVr({onConnect:e}){return(0,Xw.jsx)(G,{sx:p6o,children:(0,Xw.jsxs)(kt,{spacing:2.5,sx:{width:"100%",maxWidth:420},children:[(0,Xw.jsx)(G,{sx:h6o,children:">_"}),(0,Xw.jsx)(Ce,{variant:"h5",sx:{fontWeight:700},children:"Connect to a home node"}),(0,Xw.jsxs)(Ce,{variant:"body2",color:"text.secondary",children:["The phone connects to one assist web server over Tailscale. You'll see its sessions and the sessions of every node it links to. Make sure Tailscale is connected on this phone and"," ",(0,Xw.jsx)("code",{children:"assist sessions web"})," is running on that machine."]}),(0,Xw.jsx)(y4e,{submitLabel:"Connect",onSubmit:async r=>{let n=await o3(r.url);if(!n.ok)return`Can't reach ${r.url}: ${n.error}`;e(r,n.health)}})]})})}var Cqr=C(ee(),1);var wv=C(P(),1),m6o={flex:"none",pt:ya.top,bgcolor:"background.default"},g6o={height:e=>e.tokens.density.bar,display:"grid",gridTemplateColumns:"minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr)",columnGap:1,alignItems:"center",px:1.5},y6o={height:e=>e.tokens.density.bar,display:"flex",alignItems:"center",gap:.5,px:.5},v6o={textAlign:"center",minWidth:0,maxWidth:220,fontSize:15,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},b6o={flex:1,minWidth:0,fontSize:15,fontWeight:600,lineHeight:1.25,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",overflowWrap:"anywhere"};function yu({left:e,title:t,right:r,leadingTitle:n}){return(0,wv.jsx)(G,{component:"header",sx:m6o,children:n?(0,wv.jsxs)(G,{sx:y6o,children:[(0,wv.jsx)(G,{sx:{flex:"none"},children:e}),(0,wv.jsx)(G,{component:"h1",sx:[b6o,{m:0}],children:t}),(0,wv.jsx)(G,{sx:{flex:"none",display:"flex"},children:r})]}):(0,wv.jsxs)(G,{sx:g6o,children:[(0,wv.jsx)(G,{sx:{justifySelf:"start",minWidth:0},children:e}),(0,wv.jsx)(G,{sx:v6o,children:t}),(0,wv.jsx)(G,{sx:{justifySelf:"end",display:"flex",gap:.25},children:r})]})})}var Bx=e=>e.tokens.color.raised;var zVr=C(P(),1),x6o={ok:e=>e.palette.success.main,warn:e=>e.palette.warning.main,error:e=>e.palette.error.main,off:e=>e.palette.text.disabled};function I0({tone:e}){return(0,zVr.jsx)(G,{component:"span",sx:{width:8,height:8,flex:"none",borderRadius:"50%",bgcolor:x6o[e]}})}var ks=e=>e.tokens.density.target;var eV=C(P(),1),S6o={display:"inline-flex",alignItems:"center",gap:.75,height:ks,pl:1.125,pr:.75,borderRadius:"24px",border:1,borderColor:"divider",bgcolor:Bx,color:"text.primary",fontFamily:"fontFamilyMono",fontSize:13,maxWidth:140,justifyContent:"flex-start"},T6o={minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};function v4e({name:e,tone:t,onClick:r}){return(0,eV.jsxs)(nr,{sx:S6o,onClick:r,disabled:!r,"aria-label":"Nodes","data-testid":"phone-node-chip",children:[(0,eV.jsx)(I0,{tone:t}),(0,eV.jsx)(G,{component:"span",sx:T6o,children:e??"\u2026"}),r&&(0,eV.jsx)(ba,{sx:{fontSize:16,flex:"none"}})]})}var vqr=C(ee(),1);var b4e=C(P(),1);function UVr({homeNode:e,node:t,onDone:r}){let n=!!t&&t.url===e.home?.url;return(0,b4e.jsx)(G,{sx:{px:2.5,pt:1},children:(0,b4e.jsx)(y4e,{initial:t,submitLabel:t?"Save":"Add node",onSubmit:async i=>{if(e.nodes.some(s=>s.url===i.url&&s.url!==t?.url))return"That URL is already saved";e.saveNode(t?.url??i.url,i),r()},children:t&&(0,b4e.jsx)(ht,{color:"error",size:"large",disabled:n,onClick:()=>{e.removeNode(t.url),r()},children:n?"Switch home node to delete this one":"Delete node"})})})}var HVr=C(P(),1),w6o={width:36,height:5,borderRadius:"3px",bgcolor:"text.disabled",opacity:.5,mx:"auto",mb:.75};function tV(){return(0,HVr.jsx)(G,{sx:w6o})}var Zw=C(P(),1),C6o={display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,px:2,pt:.75,pb:1.25},k6o={color:"primary.main",fontSize:16,minHeight:ks,px:.5,borderRadius:1};function rV({title:e,actionLabel:t,onAction:r}){return(0,Zw.jsxs)(Zw.Fragment,{children:[(0,Zw.jsx)(tV,{}),(0,Zw.jsxs)(G,{sx:C6o,children:[(0,Zw.jsx)(G,{component:"b",sx:{fontSize:17,fontWeight:600},children:e}),(0,Zw.jsx)(nr,{sx:k6o,onClick:r,children:t})]})]})}var uM=C(P(),1);function WVr({homeNode:e,node:t,onDone:r}){return(0,uM.jsxs)(uM.Fragment,{children:[(0,uM.jsx)(rV,{title:t?"Edit node":"Add node",actionLabel:"Cancel",onAction:r}),(0,uM.jsx)(UVr,{homeNode:e,node:t,onDone:r},t?.url??"add")]})}var Or={group:{flexShrink:0,mx:2,my:.75,borderRadius:"12px",bgcolor:"background.default",border:1,borderColor:"divider",overflow:"hidden","& > *:not(:last-child)":{borderBottom:1,borderColor:e=>e.tokens.color.lineSoft}},item:{width:"100%",minHeight:ks,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1.5,px:1.75,py:1,textAlign:"left",fontSize:16},grow:{flex:1,minWidth:0},detail:{display:"block",fontSize:13,color:"text.secondary",fontFamily:"fontFamilyMono",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},end:{display:"flex",alignItems:"center",gap:.75,color:"text.secondary",fontSize:14},label:{px:4,pt:1.75,pb:.25,fontSize:13,fontWeight:600,textTransform:"uppercase",letterSpacing:".04em",color:"text.secondary"}};function GVr(e,t){return e.replace(/\/+$/,"")===t.replace(/\/+$/,"")}function nV(e,t){let r=e.split(".").map(Number),n=t.split(".").map(Number);for(let o=0;o<Math.max(r.length,n.length);o++){let i=(r[o]||0)-(n[o]||0);if(i!==0)return Math.sign(i)}return 0}function VVr(e,t,r){let n=t.filter(a=>a.node===e.name).length,o=[e.state,`${n} session${n===1?"":"s"}`,e.peerVersion&&`v${e.peerVersion}`,e.state!=="connected"&&e.error],i=e.peerVersion&&r?nV(e.peerVersion,r):0;return{text:o.filter(Boolean).join(" \xB7 "),drift:i<0?"behind":i>0?"ahead":void 0}}var x4e={connected:"ok",connecting:"warn",disconnected:"error","version-blocked":"error"};var fst=C(P(),1);function qVr({name:e,onSave:t}){return(0,fst.jsx)(jt,{"aria-label":`Save ${e} as a home node`,onClick:t,sx:{color:"primary.main",borderRadius:0},children:(0,fst.jsx)(mp,{fontSize:"small"})})}var Qw=C(P(),1),_6o={fontFamily:"fontFamilyMono",fontSize:12,px:.75,border:1,borderColor:"currentColor",borderRadius:"4px",color:"warning.main"};function jVr({links:e,sessions:t,homeVersion:r,isSaved:n,onSave:o}){return(0,Qw.jsx)(G,{sx:Or.group,children:e.map(i=>{let{text:a,drift:s}=VVr(i,t,r);return(0,Qw.jsxs)(G,{sx:[Or.item,{pr:0}],children:[(0,Qw.jsx)(I0,{tone:x4e[i.state]}),(0,Qw.jsxs)(G,{component:"span",sx:Or.grow,children:[i.name,(0,Qw.jsx)(G,{component:"span",sx:Or.detail,children:a})]}),s&&(0,Qw.jsx)(G,{component:"span",sx:_6o,children:s}),!n(i.url)&&(0,Qw.jsx)(qVr,{name:i.name,onSave:()=>o(i)})]},i.name)})})}var $x=C(P(),1);function oV({title:e,rows:t}){return(0,$x.jsxs)($x.Fragment,{children:[(0,$x.jsx)(G,{sx:Or.label,children:e}),(0,$x.jsx)(G,{sx:Or.group,children:t.map(r=>(0,$x.jsxs)(G,{sx:Or.item,children:[(0,$x.jsx)(G,{component:"span",sx:Or.grow,children:r.label}),(0,$x.jsx)(G,{component:"span",sx:[Or.end,{fontFamily:"fontFamilyMono"},r.color?{color:r.color}:{}],children:r.value})]},r.key))})]})}var KVr=C(P(),1);function YVr({rateLimits:e,harnessRateLimits:t}){let r=k0(3e4),n=cEe(e,t).flatMap(o=>pEe(o.rateLimits).map(i=>({key:`${o.harness}-${i.label}`,label:`${$c(o.harness)} \xB7 ${i.label}`,value:i.resetsAt!=null?`${Math.round(i.pct)}% \xB7 ${hG(i.resetsAt,r)}`:`${Math.round(i.pct)}%`,color:S_e(bx(i.pct,i.resetsAt,i.windowSeconds,r))})));return n.length===0?null:(0,KVr.jsx)(oV,{title:"Rate limits",rows:n})}var Fx=C(P(),1);function XVr({status:e,homeVersion:t,homeNode:r}){let n=e.nodes?.links??[];return(0,Fx.jsxs)(Fx.Fragment,{children:[n.length>0&&(0,Fx.jsxs)(Fx.Fragment,{children:[(0,Fx.jsxs)(G,{sx:Or.label,children:["Linked through ",e.nodes?.local]}),(0,Fx.jsx)(jVr,{links:n,sessions:e.sessions,homeVersion:t,isSaved:o=>r.nodes.some(i=>GVr(i.url,o)),onSave:({name:o,url:i})=>r.saveNode("",{name:o,url:i})})]}),(0,Fx.jsx)(YVr,{rateLimits:e.rateLimits,harnessRateLimits:e.harnessRateLimits})]})}var E6o={ok:"ok",ready:"warn",diverged:"warn",retrying:"warn",paused:"off",off:"off",loading:"off",unavailable:"error"};function S4e(e,t){let r=T0(e),{status:n}=e,o=!!n&&!!t&&nV(t,n.built)>0,i=E5(e),a=n&&(n.running===n.built?`v${n.running}`:`v${n.running} \u2192 v${n.built}`),s=o?`v${t} available`:i?"restart pending":r.label.toLowerCase();return{tone:o?"warn":E6o[r.kind],detail:[a,s].filter(Boolean).join(" \xB7 "),updateAvailable:o,restartPending:i}}var Dm=C(P(),1);function ZVr({updates:e,onOpen:t}){let{entries:r,latest:n,notices:o}=e;return r.length===0?null:(0,Dm.jsxs)(Dm.Fragment,{children:[(0,Dm.jsx)(G,{sx:Or.label,children:"Updates"}),(0,Dm.jsx)(G,{sx:Or.group,children:r.map(i=>{let a=S4e(i,n),s=o.busy[i.name];return(0,Dm.jsxs)(nr,{sx:Or.item,onClick:()=>t(i.name),"data-testid":`phone-update-row-${i.name}`,children:[(0,Dm.jsx)(I0,{tone:a.tone}),(0,Dm.jsxs)(G,{component:"span",sx:Or.grow,children:[i.name,(0,Dm.jsx)(G,{component:"span",sx:Or.detail,children:a.detail})]}),(0,Dm.jsxs)(G,{component:"span",sx:Or.end,children:[s&&`${s}\u2026`,(0,Dm.jsx)(Wo,{})]})]},i.name)})})]})}var Jne=C(P(),1);function T4e({onAdd:e}){return(0,Jne.jsxs)(nr,{sx:Or.item,onClick:e,children:[(0,Jne.jsx)(mp,{sx:{color:"primary.main"}}),(0,Jne.jsx)(G,{component:"span",sx:{color:"primary.main"},children:"Add node URL"})]})}function zx(e){try{return new URL(e).host}catch{return e}}function w4e(e){if(!e)return{tone:"off",text:"checking\u2026"};if(!e.ok)return{tone:"error",text:"unreachable"};let t=e.health.version;return{tone:"ok",text:t?`reachable \xB7 v${t}`:"reachable"}}var C4e=C(ee(),1);var R6o=15e3;function k4e(e){let[t,r]=(0,C4e.useState)({}),n=e.join(`
|
|
4064
4064
|
`);return(0,C4e.useEffect)(()=>{if(!n)return;let o=!1,i=()=>{for(let s of n.split(`
|
package/dist/index.js
CHANGED