diff --git a/src/frontend/dist/assets/chat-Cf4ZGFbl.js b/src/frontend/dist/assets/chat-Cf4ZGFbl.js new file mode 100644 index 0000000..ab5f667 --- /dev/null +++ b/src/frontend/dist/assets/chat-Cf4ZGFbl.js @@ -0,0 +1,16 @@ +import{a as N,g as H,r as b,u as W,j as a,s as T,c as U,b as z,d as E,m as G,h as ze,q as Re,v as Me,w as I,i as te,n as Le,x as je,l as $,S as le,p as ie}from"./index-CPt7BZLW.js";import{i as ee,b as qe,c as de,F as $e,u as oe,f as re,O as Ae,d as Ne,e as He,S as We,D as Ue,g as Ee,C as Be}from"./main-layout-lDcJ7mSn.js";function De(e){return N("MuiFormControl",e)}H("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Oe=e=>{const{classes:t,margin:o,fullWidth:r}=e,s={root:["root",o!=="none"&&`margin${z(o)}`,r&&"fullWidth"]};return E(s,De,t)},_e=T("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`margin${z(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%"}}]}),Ke=b.forwardRef(function(t,o){const r=W({props:t,name:"MuiFormControl"}),{children:s,className:i,color:d="primary",component:p="div",disabled:l=!1,error:m=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:v="none",required:n=!1,size:x="medium",variant:c="outlined",...C}=r,P={...r,color:d,component:p,disabled:l,error:m,fullWidth:f,hiddenLabel:h,margin:v,required:n,size:x,variant:c},J=Oe(P),[F,Q]=b.useState(()=>{let y=!1;return s&&b.Children.forEach(s,g=>{if(!ee(g,["Input","Select"]))return;const j=ee(g,["Select"])?g.props.input:g;j&&qe(j.props)&&(y=!0)}),y}),[B,R]=b.useState(()=>{let y=!1;return s&&b.Children.forEach(s,g=>{ee(g,["Input","Select"])&&(de(g.props,!0)||de(g.props.inputProps,!0))&&(y=!0)}),y}),[D,M]=b.useState(!1);l&&D&&M(!1);const O=u!==void 0&&!l?u:D;let _;b.useRef(!1);const K=b.useCallback(()=>{R(!0)},[]),L=b.useCallback(()=>{R(!1)},[]),X=b.useMemo(()=>({adornedStart:F,setAdornedStart:Q,color:d,disabled:l,error:m,filled:B,focused:O,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:L,onFilled:K,registerEffect:_,required:n,variant:c}),[F,d,l,m,B,O,f,h,_,L,K,n,x,c]);return a.jsx($e.Provider,{value:X,children:a.jsx(_e,{as:p,ownerState:P,className:U(J.root,i),ref:o,...C,children:s})})});function Ve(e){return N("MuiFormHelperText",e)}const ce=H("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var pe;const Ge=e=>{const{classes:t,contained:o,size:r,disabled:s,error:i,filled:d,focused:p,required:l}=e,m={root:["root",s&&"disabled",i&&"error",r&&`size${z(r)}`,o&&"contained",p&&"focused",d&&"filled",l&&"required"]};return E(m,Ve,t)},Je=T("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.size&&t[`size${z(o.size)}`],o.contained&&t.contained,o.filled&&t.filled]}})(G(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ce.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ce.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}}]}))),Qe=b.forwardRef(function(t,o){const r=W({props:t,name:"MuiFormHelperText"}),{children:s,className:i,component:d="p",disabled:p,error:l,filled:m,focused:u,margin:f,required:h,variant:v,...n}=r,x=oe(),c=re({props:r,muiFormControl:x,states:["variant","size","disabled","error","filled","focused","required"]}),C={...r,component:d,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required};delete C.ownerState;const P=Ge(C);return a.jsx(Je,{as:d,className:U(P.root,i),ref:o,...n,ownerState:C,children:s===" "?pe||(pe=a.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):s})});function Xe(e){return N("MuiFormLabel",e)}const A=H("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ye=e=>{const{classes:t,color:o,focused:r,disabled:s,error:i,filled:d,required:p}=e,l={root:["root",`color${z(o)}`,s&&"disabled",i&&"error",d&&"filled",r&&"focused",p&&"required"],asterisk:["asterisk",i&&"error"]};return E(l,Xe,t)},Ze=T("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.color==="secondary"&&t.colorSecondary,o.filled&&t.filled]}})(G(({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(ze()).map(([t])=>({props:{color:t},style:{[`&.${A.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${A.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),et=T("span",{name:"MuiFormLabel",slot:"Asterisk"})(G(({theme:e})=>({[`&.${A.error}`]:{color:(e.vars||e).palette.error.main}}))),tt=b.forwardRef(function(t,o){const r=W({props:t,name:"MuiFormLabel"}),{children:s,className:i,color:d,component:p="label",disabled:l,error:m,filled:u,focused:f,required:h,...v}=r,n=oe(),x=re({props:r,muiFormControl:n,states:["color","required","focused","disabled","error","filled"]}),c={...r,color:x.color||"primary",component:p,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required},C=Ye(c);return a.jsxs(Ze,{as:p,ownerState:c,className:U(C.root,i),ref:o,...v,children:[s,x.required&&a.jsxs(et,{ownerState:c,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]})});function ot(e){return N("MuiInputLabel",e)}H("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const rt=e=>{const{classes:t,formControl:o,size:r,shrink:s,disableAnimation:i,variant:d,required:p}=e,l={root:["root",o&&"formControl",!i&&"animated",s&&"shrink",r&&r!=="medium"&&`size${z(r)}`,d],asterisk:[p&&"asterisk"]},m=E(l,ot,t);return{...t,...m}},st=T(tt,{shouldForwardProp:e=>Re(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${A.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]]}})(G(({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)"}}]}))),nt=b.forwardRef(function(t,o){const r=W({name:"MuiInputLabel",props:t}),{disableAnimation:s=!1,margin:i,shrink:d,variant:p,className:l,...m}=r,u=oe();let f=d;typeof f>"u"&&u&&(f=u.filled||u.focused||u.adornedStart);const h=re({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),v={...r,disableAnimation:s,formControl:u,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},n=rt(v);return a.jsx(st,{"data-shrink":f,ref:o,className:U(n.root,l),...m,ownerState:v,classes:n})});function at(e){return N("MuiTextField",e)}H("MuiTextField",["root"]);const lt={standard:He,filled:Ne,outlined:Ae},it=e=>{const{classes:t}=e;return E({root:["root"]},at,t)},dt=T(Ke,{name:"MuiTextField",slot:"Root"})({}),ct=b.forwardRef(function(t,o){const r=W({props:t,name:"MuiTextField"}),{autoComplete:s,autoFocus:i=!1,children:d,className:p,color:l="primary",defaultValue:m,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:v=!1,helperText:n,id:x,InputLabelProps:c,inputProps:C,InputProps:P,inputRef:J,label:F,maxRows:Q,minRows:B,multiline:R=!1,name:D,onBlur:M,onChange:O,onFocus:_,placeholder:K,required:L=!1,rows:X,select:y=!1,SelectProps:g,slots:j={},slotProps:ue={},type:me,value:se,variant:V="outlined",...fe}=r,S={...r,autoFocus:i,color:l,disabled:u,error:f,fullWidth:v,multiline:R,required:L,select:y,variant:V},xe=it(S),k=Me(x),Y=n&&k?`${k}-helper-text`:void 0,ne=F&&k?`${k}-label`:void 0,be=lt[V],w={slots:j,slotProps:{input:P,inputLabel:c,htmlInput:C,formHelperText:h,select:g,...ue}},q={},Z=w.slotProps.inputLabel;V==="outlined"&&(Z&&typeof Z.shrink<"u"&&(q.notched=Z.shrink),q.label=F),y&&((!g||!g.native)&&(q.id=void 0),q["aria-describedby"]=void 0);const[he,ve]=I("root",{elementType:dt,shouldForwardComponentProp:!0,externalForwardedProps:{...w,...fe},ownerState:S,className:U(xe.root,p),ref:o,additionalProps:{disabled:u,error:f,fullWidth:v,required:L,color:l,variant:V}}),[ge,Ce]=I("input",{elementType:be,externalForwardedProps:w,additionalProps:q,ownerState:S}),[ye,Fe]=I("inputLabel",{elementType:nt,externalForwardedProps:w,ownerState:S}),[Se,ke]=I("htmlInput",{elementType:"input",externalForwardedProps:w,ownerState:S}),[we,Pe]=I("formHelperText",{elementType:Qe,externalForwardedProps:w,ownerState:S}),[Ie,Te]=I("select",{elementType:We,externalForwardedProps:w,ownerState:S}),ae=a.jsx(ge,{"aria-describedby":Y,autoComplete:s,autoFocus:i,defaultValue:m,fullWidth:v,multiline:R,name:D,rows:X,maxRows:Q,minRows:B,type:me,value:se,id:k,inputRef:J,onBlur:M,onChange:O,onFocus:_,placeholder:K,inputProps:ke,slots:{input:j.htmlInput?Se:void 0},...Ce});return a.jsxs(he,{...ve,children:[F!=null&&F!==""&&a.jsx(ye,{htmlFor:k,id:ne,...Fe,children:F}),y?a.jsx(Ie,{"aria-describedby":Y,id:k,labelId:ne,value:se,input:ae,...Te,children:d}):ae,n&&a.jsx(we,{id:Y,...Pe,children:n})]})});/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const pt=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],ut=te("outline","arrow-back-up","ArrowBackUp",pt);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const mt=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],ft=te("outline","arrow-up","ArrowUp",mt);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const xt=[["path",{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",key:"svg-0"}]],bt=te("filled","square-filled","SquareFilled",xt),ht=()=>{const[{modelName:e,clusterInfo:{status:t}}]=Le(),[{input:o,status:r},{setInput:s,generate:i,stop:d,clear:p}]=je(),l=b.useRef(!1),m=$(n=>{l.current=!0}),u=$(n=>{l.current=!1}),f=$(n=>{n.key==="Enter"&&!n.shiftKey&&!l.current&&(n.preventDefault(),i())}),h=$(n=>{r==="opened"||r==="generating"?d():(r==="closed"||r==="error")&&i()}),v=$(n=>{p()});return a.jsx(le,{"data-status":r,children:a.jsx(ct,{value:o,onChange:n=>s(n.target.value),multiline:!0,maxRows:4,placeholder:"Ask anything",fullWidth:!0,onCompositionStart:m,onCompositionEnd:u,onKeyDown:f,slotProps:{input:{sx:{border:"1px solid",borderColor:"grey.300",borderRadius:2,fontSize:"0.95rem",boxShadow:"2px 2px 4px rgba(0,0,0,0.05)",flexDirection:"column","& textarea":{fontSize:"0.875rem",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}}},endAdornment:a.jsxs(le,{direction:"row",sx:{alignSelf:"flex-end",alignItems:"center",gap:2},children:[a.jsx(ie,{variant:"text",sx:{color:"text.secondary"},startIcon:a.jsx(ut,{}),disabled:r==="opened"||r==="generating",onClick:v,children:"Clear"}),a.jsx(ie,{size:"small",color:"primary",disabled:t!=="available"||r==="opened",onClick:h,children:r==="opened"?a.jsx(Ue,{size:"medium"}):r==="generating"?a.jsx(bt,{size:"1.25rem"}):a.jsx(ft,{size:"1.25rem"})})]})}}})})};function Ct(){return a.jsxs(Ee,{children:[a.jsx(Be,{}),a.jsx(ht,{})]})}export{Ct as default}; diff --git a/src/frontend/dist/assets/chat-CpTmCBEN.js b/src/frontend/dist/assets/chat-CpTmCBEN.js deleted file mode 100644 index 5dacaf0..0000000 --- a/src/frontend/dist/assets/chat-CpTmCBEN.js +++ /dev/null @@ -1,16 +0,0 @@ -import{a as A,g as N,r as x,u as H,j as a,s as T,c as W,b as z,d as U,m as V,h as Te,q as ze,v as Le,w as I,i as ee,n as Me,x as Re,l as je,S as ne,p as le}from"./index-DQWvM1i5.js";import{i as Z,b as qe,c as ie,F as $e,u as re,f as te,O as Ae,d as Ne,e as He,S as We,D as Ue,g as Ee,C as De}from"./main-layout-CWejjuhl.js";function Oe(e){return A("MuiFormControl",e)}N("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Be=e=>{const{classes:r,margin:t,fullWidth:o}=e,s={root:["root",t!=="none"&&`margin${z(t)}`,o&&"fullWidth"]};return U(s,Oe,r)},_e=T("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[`margin${z(t.margin)}`],t.fullWidth&&r.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%"}}]}),Ke=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormControl"}),{children:s,className:l,color:i="primary",component:p="div",disabled:n=!1,error:d=!1,focused:m,fullWidth:b=!1,hiddenLabel:h=!1,margin:g="none",required:f=!1,size:u="medium",variant:c="outlined",...y}=o,P={...o,color:i,component:p,disabled:n,error:d,fullWidth:b,hiddenLabel:h,margin:g,required:f,size:u,variant:c},G=Be(P),[F,J]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{if(!Z(v,["Input","Select"]))return;const j=Z(v,["Select"])?v.props.input:v;j&&qe(j.props)&&(C=!0)}),C}),[E,L]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{Z(v,["Input","Select"])&&(ie(v.props,!0)||ie(v.props.inputProps,!0))&&(C=!0)}),C}),[D,M]=x.useState(!1);n&&D&&M(!1);const O=m!==void 0&&!n?m:D;let B;x.useRef(!1);const _=x.useCallback(()=>{L(!0)},[]),R=x.useCallback(()=>{L(!1)},[]),Q=x.useMemo(()=>({adornedStart:F,setAdornedStart:J,color:i,disabled:n,error:d,filled:E,focused:O,fullWidth:b,hiddenLabel:h,size:u,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:R,onFilled:_,registerEffect:B,required:f,variant:c}),[F,i,n,d,E,O,b,h,B,R,_,f,u,c]);return a.jsx($e.Provider,{value:Q,children:a.jsx(_e,{as:p,ownerState:P,className:W(G.root,l),ref:t,...y,children:s})})});function Ve(e){return A("MuiFormHelperText",e)}const de=N("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ce;const Ge=e=>{const{classes:r,contained:t,size:o,disabled:s,error:l,filled:i,focused:p,required:n}=e,d={root:["root",s&&"disabled",l&&"error",o&&`size${z(o)}`,t&&"contained",p&&"focused",i&&"filled",n&&"required"]};return U(d,Ve,r)},Je=T("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.size&&r[`size${z(t.size)}`],t.contained&&r.contained,t.filled&&r.filled]}})(V(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${de.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${de.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:r})=>r.contained,style:{marginLeft:14,marginRight:14}}]}))),Qe=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormHelperText"}),{children:s,className:l,component:i="p",disabled:p,error:n,filled:d,focused:m,margin:b,required:h,variant:g,...f}=o,u=re(),c=te({props:o,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),y={...o,component:i,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required};delete y.ownerState;const P=Ge(y);return a.jsx(Je,{as:i,className:W(P.root,l),ref:t,...f,ownerState:y,children:s===" "?ce||(ce=a.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):s})});function Xe(e){return A("MuiFormLabel",e)}const $=N("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ye=e=>{const{classes:r,color:t,focused:o,disabled:s,error:l,filled:i,required:p}=e,n={root:["root",`color${z(t)}`,s&&"disabled",l&&"error",i&&"filled",o&&"focused",p&&"required"],asterisk:["asterisk",l&&"error"]};return U(n,Xe,r)},Ze=T("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color==="secondary"&&r.colorSecondary,t.filled&&r.filled]}})(V(({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(Te()).map(([r])=>({props:{color:r},style:{[`&.${$.focused}`]:{color:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),er=T("span",{name:"MuiFormLabel",slot:"Asterisk"})(V(({theme:e})=>({[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}))),rr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormLabel"}),{children:s,className:l,color:i,component:p="label",disabled:n,error:d,filled:m,focused:b,required:h,...g}=o,f=re(),u=te({props:o,muiFormControl:f,states:["color","required","focused","disabled","error","filled"]}),c={...o,color:u.color||"primary",component:p,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required},y=Ye(c);return a.jsxs(Ze,{as:p,ownerState:c,className:W(y.root,l),ref:t,...g,children:[s,u.required&&a.jsxs(er,{ownerState:c,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function tr(e){return A("MuiInputLabel",e)}N("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const or=e=>{const{classes:r,formControl:t,size:o,shrink:s,disableAnimation:l,variant:i,required:p}=e,n={root:["root",t&&"formControl",!l&&"animated",s&&"shrink",o&&o!=="medium"&&`size${z(o)}`,i],asterisk:[p&&"asterisk"]},d=U(n,tr,r);return{...r,...d}},sr=T(rr,{shouldForwardProp:e=>ze(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[{[`& .${$.asterisk}`]:r.asterisk},r.root,t.formControl&&r.formControl,t.size==="small"&&r.sizeSmall,t.shrink&&r.shrink,!t.disableAnimation&&r.animated,t.focused&&r.focused,r[t.variant]]}})(V(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:r})=>r.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:r})=>r.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:r})=>!r.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:r,ownerState:t})=>r==="filled"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:r,ownerState:t,size:o})=>r==="filled"&&t.shrink&&o==="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:r,ownerState:t})=>r==="outlined"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),ar=x.forwardRef(function(r,t){const o=H({name:"MuiInputLabel",props:r}),{disableAnimation:s=!1,margin:l,shrink:i,variant:p,className:n,...d}=o,m=re();let b=i;typeof b>"u"&&m&&(b=m.filled||m.focused||m.adornedStart);const h=te({props:o,muiFormControl:m,states:["size","variant","required","focused"]}),g={...o,disableAnimation:s,formControl:m,shrink:b,size:h.size,variant:h.variant,required:h.required,focused:h.focused},f=or(g);return a.jsx(sr,{"data-shrink":b,ref:t,className:W(f.root,n),...d,ownerState:g,classes:f})});function nr(e){return A("MuiTextField",e)}N("MuiTextField",["root"]);const lr={standard:He,filled:Ne,outlined:Ae},ir=e=>{const{classes:r}=e;return U({root:["root"]},nr,r)},dr=T(Ke,{name:"MuiTextField",slot:"Root"})({}),cr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiTextField"}),{autoComplete:s,autoFocus:l=!1,children:i,className:p,color:n="primary",defaultValue:d,disabled:m=!1,error:b=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:f,id:u,InputLabelProps:c,inputProps:y,InputProps:P,inputRef:G,label:F,maxRows:J,minRows:E,multiline:L=!1,name:D,onBlur:M,onChange:O,onFocus:B,placeholder:_,required:R=!1,rows:Q,select:C=!1,SelectProps:v,slots:j={},slotProps:pe={},type:ue,value:oe,variant:K="outlined",...me}=o,S={...o,autoFocus:l,color:n,disabled:m,error:b,fullWidth:g,multiline:L,required:R,select:C,variant:K},fe=ir(S),k=Le(u),X=f&&k?`${k}-helper-text`:void 0,se=F&&k?`${k}-label`:void 0,xe=lr[K],w={slots:j,slotProps:{input:P,inputLabel:c,htmlInput:y,formHelperText:h,select:v,...pe}},q={},Y=w.slotProps.inputLabel;K==="outlined"&&(Y&&typeof Y.shrink<"u"&&(q.notched=Y.shrink),q.label=F),C&&((!v||!v.native)&&(q.id=void 0),q["aria-describedby"]=void 0);const[be,he]=I("root",{elementType:dr,shouldForwardComponentProp:!0,externalForwardedProps:{...w,...me},ownerState:S,className:W(fe.root,p),ref:t,additionalProps:{disabled:m,error:b,fullWidth:g,required:R,color:n,variant:K}}),[ve,ge]=I("input",{elementType:xe,externalForwardedProps:w,additionalProps:q,ownerState:S}),[ye,Ce]=I("inputLabel",{elementType:ar,externalForwardedProps:w,ownerState:S}),[Fe,Se]=I("htmlInput",{elementType:"input",externalForwardedProps:w,ownerState:S}),[ke,we]=I("formHelperText",{elementType:Qe,externalForwardedProps:w,ownerState:S}),[Pe,Ie]=I("select",{elementType:We,externalForwardedProps:w,ownerState:S}),ae=a.jsx(ve,{"aria-describedby":X,autoComplete:s,autoFocus:l,defaultValue:d,fullWidth:g,multiline:L,name:D,rows:Q,maxRows:J,minRows:E,type:ue,value:oe,id:k,inputRef:G,onBlur:M,onChange:O,onFocus:B,placeholder:_,inputProps:Se,slots:{input:j.htmlInput?Fe:void 0},...ge});return a.jsxs(be,{...he,children:[F!=null&&F!==""&&a.jsx(ye,{htmlFor:k,id:se,...Ce,children:F}),C?a.jsx(Pe,{"aria-describedby":X,id:k,labelId:se,value:oe,input:ae,...Ie,children:i}):ae,f&&a.jsx(ke,{id:X,...we,children:f})]})});/** - * @license @tabler/icons-react v3.35.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const pr=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],ur=ee("outline","arrow-back-up","ArrowBackUp",pr);/** - * @license @tabler/icons-react v3.35.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const mr=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],fr=ee("outline","arrow-up","ArrowUp",mr);/** - * @license @tabler/icons-react v3.35.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const xr=[["path",{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",key:"svg-0"}]],br=ee("filled","square-filled","SquareFilled",xr),hr=()=>{const[{modelName:e,clusterInfo:{status:r}}]=Me(),[{input:t,status:o},{setInput:s,generate:l,stop:i,clear:p}]=Re(),n=je(d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),l())});return a.jsx(ne,{"data-status":o,children:a.jsx(cr,{value:t,onChange:d=>s(d.target.value),multiline:!0,maxRows:4,placeholder:"Ask anything",fullWidth:!0,onKeyDown:n,slotProps:{input:{sx:{border:"1px solid",borderColor:"grey.300",borderRadius:2,fontSize:"0.95rem",boxShadow:"2px 2px 4px rgba(0,0,0,0.05)",flexDirection:"column","& textarea":{fontSize:"0.875rem",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}}},endAdornment:a.jsxs(ne,{direction:"row",sx:{alignSelf:"flex-end",alignItems:"center",gap:2},children:[a.jsx(le,{variant:"text",sx:{color:"text.secondary"},startIcon:a.jsx(ur,{}),disabled:o==="opened"||o==="generating",onClick:p,children:"Clear"}),a.jsx(le,{size:"small",color:"primary",disabled:r!=="available"||o==="opened",onClick:()=>{o==="generating"?i():(o==="closed"||o==="error")&&l()},children:o==="opened"?a.jsx(Ue,{size:"medium"}):o==="generating"?a.jsx(br,{size:"1.25rem"}):a.jsx(fr,{size:"1.25rem"})})]})}}})})};function yr(){return a.jsxs(Ee,{children:[a.jsx(De,{}),a.jsx(hr,{})]})}export{yr as default}; diff --git a/src/frontend/dist/assets/index-DQWvM1i5.js b/src/frontend/dist/assets/index-CPt7BZLW.js similarity index 99% rename from src/frontend/dist/assets/index-DQWvM1i5.js rename to src/frontend/dist/assets/index-CPt7BZLW.js index 9f3a80e..6538d8d 100644 --- a/src/frontend/dist/assets/index-DQWvM1i5.js +++ b/src/frontend/dist/assets/index-CPt7BZLW.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/setup-BGrBYndC.js","assets/main-layout-CWejjuhl.js","assets/main-layout-DVneG3Rq.css","assets/join-CnldUErm.js","assets/chat-CpTmCBEN.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/setup-JQfEIF_4.js","assets/main-layout-lDcJ7mSn.js","assets/main-layout-DVneG3Rq.css","assets/join-DSe18kEi.js","assets/chat-Cf4ZGFbl.js"])))=>i.map(i=>d[i]); function _2(n,r){for(var l=0;lo[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(u){if(u.ep)return;u.ep=!0;const c=l(u);fetch(u.href,c)}})();function La(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Of={exports:{}},vl={};/** * @license React * react-jsx-runtime.production.js @@ -317,4 +317,4 @@ export default theme;`}function Xg(n){return typeof n=="number"?`${(n*100).toFix `);G=I.pop()||"",I.forEach(le=>{try{const w=u(JSON.parse(le));M(w)}catch(w){E("Parse Message Error",w)}})}}).catch(async ne=>{Q&&(clearTimeout(Q),Q=void 0),await D(),E("fetch error",ne),T("error"),y?.(ne)}).finally(async()=>{Q&&(clearTimeout(Q),Q=void 0),await D(),C=void 0})};return Object.freeze({send:$,abort:()=>{try{C?.abort(),C=void 0}catch(N){E("abort error",N)}O?.cancel(),O=void 0,T("disconnected")}})},hu="",Mw=async()=>{const r=await(await fetch(`${hu}/model/list`,{method:"GET"})).json();if(r.type!=="model_list")throw new Error(`Invalid message type: ${r.type}.`);return r.data},ww=async n=>{const l=await(await fetch(`${hu}/scheduler/init`,{method:"POST",body:JSON.stringify(n)})).json();if(l.type!=="scheduler_init")throw new Error(`Invalid message type: ${l.type}.`);return l.data},Ow=Tw({url:`${hu}/cluster/status`,method:"GET"}),$y=n=>{const r=x.useRef(void 0);return r.current||(r.current={value:typeof n=="function"?n():n}),r.current.value},Aw=n=>{const r=x.useRef(void 0);return r.current||(r.current={callback:n}),r.current.callback},fr=n=>{const r=x.useRef(void 0);return r.current=n,Aw(((...o)=>r.current?.(...o)))},Rw="/assets/Qwen3-CHUafU1E.png",Dw="data:image/svg+xml,%3csvg%20width='721'%20height='721'%20viewBox='0%200%20721%20721'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1637_2934)'%3e%3cg%20clip-path='url(%23clip1_1637_2934)'%3e%3cpath%20d='M304.246%20294.611V249.028C304.246%20245.189%20305.687%20242.309%20309.044%20240.392L400.692%20187.612C413.167%20180.415%20428.042%20177.058%20443.394%20177.058C500.971%20177.058%20537.44%20221.682%20537.44%20269.182C537.44%20272.54%20537.44%20276.379%20536.959%20280.218L441.954%20224.558C436.197%20221.201%20430.437%20221.201%20424.68%20224.558L304.246%20294.611ZM518.245%20472.145V363.224C518.245%20356.505%20515.364%20351.707%20509.608%20348.349L389.174%20278.296L428.519%20255.743C431.877%20253.826%20434.757%20253.826%20438.115%20255.743L529.762%20308.523C556.154%20323.879%20573.905%20356.505%20573.905%20388.171C573.905%20424.636%20552.315%20458.225%20518.245%20472.141V472.145ZM275.937%20376.182L236.592%20353.152C233.235%20351.235%20231.794%20348.354%20231.794%20344.515V238.956C231.794%20187.617%20271.139%20148.749%20324.4%20148.749C344.555%20148.749%20363.264%20155.468%20379.102%20167.463L284.578%20222.164C278.822%20225.521%20275.942%20230.319%20275.942%20237.039V376.186L275.937%20376.182ZM360.626%20425.122L304.246%20393.455V326.283L360.626%20294.616L417.002%20326.283V393.455L360.626%20425.122ZM396.852%20570.989C376.698%20570.989%20357.989%20564.27%20342.151%20552.276L436.674%20497.574C442.431%20494.217%20445.311%20489.419%20445.311%20482.699V343.552L485.138%20366.582C488.495%20368.499%20489.936%20371.379%20489.936%20375.219V480.778C489.936%20532.117%20450.109%20570.985%20396.852%20570.985V570.989ZM283.134%20463.99L191.486%20411.211C165.094%20395.854%20147.343%20363.229%20147.343%20331.562C147.343%20294.616%20169.415%20261.509%20203.48%20247.593V356.991C203.48%20363.71%20206.361%20368.508%20212.117%20371.866L332.074%20441.437L292.729%20463.99C289.372%20465.907%20286.491%20465.907%20283.134%20463.99ZM277.859%20542.68C223.639%20542.68%20183.813%20501.895%20183.813%20451.514C183.813%20447.675%20184.294%20443.836%20184.771%20439.997L279.295%20494.698C285.051%20498.056%20290.812%20498.056%20296.568%20494.698L417.002%20425.127V470.71C417.002%20474.549%20415.562%20477.429%20412.204%20479.346L320.557%20532.126C308.081%20539.323%20293.206%20542.68%20277.854%20542.68H277.859ZM396.852%20599.776C454.911%20599.776%20503.37%20558.513%20514.41%20503.812C568.149%20489.896%20602.696%20439.515%20602.696%20388.176C602.696%20354.587%20588.303%20321.962%20562.392%20298.45C564.791%20288.373%20566.231%20278.296%20566.231%20268.224C566.231%20199.611%20510.571%20148.267%20446.274%20148.267C433.322%20148.267%20420.846%20150.184%20408.37%20154.505C386.775%20133.392%20357.026%20119.958%20324.4%20119.958C266.342%20119.958%20217.883%20161.22%20206.843%20215.921C153.104%20229.837%20118.557%20280.218%20118.557%20331.557C118.557%20365.146%20132.95%20397.771%20158.861%20421.283C156.462%20431.36%20155.022%20441.437%20155.022%20451.51C155.022%20520.123%20210.682%20571.466%20274.978%20571.466C287.931%20571.466%20300.407%20569.549%20312.883%20565.228C334.473%20586.341%20364.222%20599.776%20396.852%20599.776Z'%20fill='black'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1637_2934'%3e%3crect%20width='720'%20height='720'%20fill='white'%20transform='translate(0.606934%200.0999756)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_1637_2934'%3e%3crect%20width='484.139'%20height='479.818'%20fill='white'%20transform='translate(118.557%20119.958)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",_w=n=>{n=n.toLowerCase();const r=n.split(/[-/]/);return r[0]==="qwen"?Rw:r[0]==="openai"?Dw:""},Ts=(...n)=>{console.log("%c cluster.tsx ","color: white; background: darkcyan;",...n)},Ny={id:"",status:"idle",modelName:"",nodeJoinCommand:{},initNodesNumber:4},m1=x.createContext(void 0),{Provider:kw}=m1,zw=({children:n})=>{const[r,l]=x.useState("local"),[o,u]=x.useState(1),[c,d]=x.useState(""),[h,p]=x.useState([]),m=fr(async()=>{let $=!1;for(;!$;)try{const B=await Mw();p(_=>{const N=B.map(P=>({name:P,displayName:P,logoUrl:_w(P)}));return JSON.stringify(N)!==JSON.stringify(_)?(Ts("setModelInfoList",N),N):_}),$=!0}catch(B){console.error("getModelList error",B),await new Promise(_=>setTimeout(_,2e3))}});x.useEffect(()=>{m()},[]),x.useEffect(()=>{h.length&&d(h[0].name)},[h]);const[y,b]=x.useState(Ny),[C,O]=x.useState([]),E=fr(()=>{Ts("reset"),b(Ny),O([])}),T=x.useMemo(()=>Ow({debugName:"ClusterStatus",autoReconnect:!0,onMessage:_=>{if(_.type==="cluster_status"){const{data:{status:N,init_nodes_num:P,model_name:W,node_join_command:K,node_list:Q}}=_;d(Z=>W||Z),b(Z=>{const S={...Z,status:W&&N||"idle",initNodesNumber:P||0,modelName:W||"",nodeJoinCommand:K||{}};return JSON.stringify(S)!==JSON.stringify(Z)?(Ts("setClusterInfo",S),S):Z}),O(Z=>{let S=Q.map(({node_id:V,status:A,gpu_name:H,gpu_memory:I})=>({id:V,status:A,gpuName:H,gpuMemory:I}));const ne=Z.filter(V=>S.some(A=>A.id===V.id)),G=Z.filter(V=>!S.some(A=>A.id===V.id)).map(V=>({...V,status:"failed"}));return JSON.stringify(S)===JSON.stringify(ne)&&(S=[...S,...G]),JSON.stringify(S)!==JSON.stringify(Z)?(Ts("setNodeInfoList",S),S):Z})}},onError:E}),[]);x.useEffect(()=>{T.send()},[]);const M=fr(async()=>{if(o<1)throw new Error("initNodesNumber must be greater than 0");if(!c)throw new Error("modelName is required");await ww({model_name:c,init_nodes_num:o,is_local_network:r==="local"})}),D=x.useMemo(()=>({setNetworkType:l,setInitNodesNumber:u,setModelName:d,init:M}),[]),k=x.useMemo(()=>[{networkType:r,initNodesNumber:o,modelName:c,modelInfoList:h,clusterInfo:y,nodeInfoList:C},D],[r,o,c,h,y,C,D]);return ee.jsx(kw,{value:k,children:n})},p1=()=>{const n=x.useContext(m1);if(!n)throw new Error("useCluster must be used within a ClusterProvider");return n};function $w(n){n=n.trim();const r={analysis:"",final:""},l=/<\|channel\|>([^<]+)<\|message\|>(.*?)(<\|end\|>|$)/gs;let o;for(;(o=l.exec(n))!==null;)r[o[1]]=o[2]?.trim()||"";return r}const Ms="",Ly="";function Nw(n){n=n.trim();const r={think:"",content:""};for(;n.includes(Ms);){const l=n.indexOf(Ms),o=n.indexOf(Ly),u=n.substring(l+Ms.length,o>l?o:n.length);n=n.replace(Ms+u+(o>l?Ly:""),""),r.think+=` `+u}return r.think=r.think.trim(),r.content=n.trim(),r}const yt=async(...n)=>{},Lw=({children:n})=>{const[{clusterInfo:{status:r,modelName:l}}]=p1(),[o,u]=x.useState(""),[c,d]=x.useState("closed"),h=fr(M=>{d(D=>{const k=typeof M=="function"?M(D):M;return k!==D&&yt("setStatus","status",k),k})}),[p,m]=x.useState([]),y=$y(()=>Bw({onOpen:()=>{yt("SSE OPEN"),h("opened")},onClose:()=>{yt("SSE CLOSE"),m(M=>{const D=M[M.length-1],{id:k,raw:$,thinking:B,content:_}=D;return yt("GENERATING DONE","lastMessage:",D),yt("GENERATING DONE","id:",k),yt("GENERATING DONE","raw:",$),yt("GENERATING DONE","thinking:",B),yt("GENERATING DONE","content:",_),[...M.slice(0,-1),{...D,status:"done"}]}),h("closed")},onError:M=>{yt("SSE ERROR",M),m(D=>{const k=D[D.length-1],{id:$,raw:B,thinking:_,content:N}=k;return yt("GENERATING ERROR","lastMessage:",k),yt("GENERATING ERROR","id:",$),yt("GENERATING ERROR","raw:",B),yt("GENERATING ERROR","thinking:",_),yt("GENERATING ERROR","content:",N),[...D.slice(0,-1),{...k,status:"done"}]}),yt("SSE ERROR",M),h("error")},onMessage:M=>{const{data:{id:D,object:k,model:$,created:B,choices:_,usage:N}}=M;k==="chat.completion.chunk"&&_?.length>0&&(_[0].delta.content&&h("generating"),m(P=>{let W=P;if(_.forEach(({delta:{role:K,content:Q}={}})=>{if(typeof Q!="string"||!Q)return;K=K||"assistant";let Z=W[W.length-1];if(Z&&Z.role===K){const S=Z.raw+Q;Z={...Z,raw:S,content:S},W=[...W.slice(0,-1),Z]}else Z={id:D,role:K,status:"thinking",raw:Q,content:Q,createdAt:B},W=[...W,Z]}),W!==P&&typeof $=="string"){let K=W[W.length-1],Q="",Z="";const S=$.toLowerCase();S.includes("gpt-oss")?{analysis:Q,final:Z}=$w(K.raw||""):S.includes("qwen")?{think:Q,content:Z}=Nw(K.raw||""):Z=K.raw||"",K={...K,status:Z&&"generating"||"thinking",thinking:Q,content:Z},W=[...W.slice(0,-1),K]}return W}))}})),b=fr(M=>{if(r!=="available"||c==="opened"||c==="generating"||!l)return;let D=p;if(M){const k=p.findIndex(B=>B.id===M.id),$=p[k];if(!$)return;D=D.slice(0,k+($.role==="user"?1:0)),yt("generate","regenerate",D)}else{const k=o.trim();if(!k)return;u("");const $=performance.now();D=[...D,{id:$.toString(),role:"user",status:"done",content:k,createdAt:$}],yt("generate","new",D)}m(D),y.connect(l,D.map(({id:k,role:$,content:B})=>({id:k,role:$,content:B})))}),C=fr(()=>{yt("stop","status",c),!(c==="closed"||c==="error")&&y.disconnect()}),O=fr(()=>{yt("clear","status",c),C(),!(c==="opened"||c==="generating")&&m([])}),E=$y({setInput:u,generate:b,stop:C,clear:O}),T=x.useMemo(()=>[{input:o,status:c,messages:p},E],[o,c,p,E]);return ee.jsx(g1.Provider,{value:T,children:n})},g1=x.createContext(void 0),rO=()=>{const n=x.useContext(g1);if(!n)throw new Error("useChat must be used within a ChatProvider");return n},Bw=n=>{const{onOpen:r,onClose:l,onError:o,onMessage:u}=n,c=new TextDecoder;let d,h;return{connect:(y,b)=>{h=new AbortController;const C=`${hu}/v1/chat/completions`;r?.(),fetch(C,{method:"POST",body:JSON.stringify({stream:!0,model:y,messages:b,max_tokens:2048,sampling_params:{top_k:3}}),signal:h.signal}).then(async O=>{const E=O.status,T=O.headers.get("Content-Type");if(E!==200){o?.(new Error(`[SSE] Failed to connect: ${E}`));return}if(!T?.includes("text/event-stream")){o?.(new Error(`[SSE] Invalid content type: ${T}`));return}if(d=O.body?.getReader(),!d){o?.(new Error("[SSE] Failed to get reader"));return}let M="";const D=k=>{const $={event:"message",data:void 0};k.forEach(B=>{const _=B.indexOf(":");if(_<=0)return;const N=B.slice(0,_).trim(),P=B.slice(_+1).trim();if(!P.startsWith(":")){switch(N){case"event":$.event=P;break;case"id":$.id=P;break;case"data":try{const W=JSON.parse(P),K=Q=>{Q&&(Array.isArray(Q)?Q.forEach((Z,S)=>{Z===null?Q[S]=void 0:K(Z)}):typeof Q=="object"&&Object.keys(Q).forEach(Z=>{Q[Z]===null?delete Q[Z]:K(Q[Z])}))};K(W),$.data=W}catch{$.data=P}break}$.data!==void 0&&u?.($)}})};for(;;){const{done:k,value:$}=await d.read();if(k){l?.();return}const B=c.decode($);M+=B;const _=M.split(` -`);M=_.pop()||"",D(_)}}).catch(O=>{if(O instanceof Error&&O.name==="AbortError"){l?.();return}o?.(O)})},disconnect:()=>{d?.cancel(),d=void 0,h?.abort("stop"),h=void 0,l?.()}}},ed="/setup",jw="/join",ws="/chat",Uw=x.lazy(()=>uh(()=>import("./setup-BGrBYndC.js"),__vite__mapDeps([0,1,2]))),Hw=x.lazy(()=>uh(()=>import("./join-CnldUErm.js"),__vite__mapDeps([3,1,2]))),Yw=x.lazy(()=>uh(()=>import("./chat-CpTmCBEN.js"),__vite__mapDeps([4,1,2]))),By=(...n)=>{console.log("%c router.tsx ","color: white; background: purple;",...n)},qw=()=>{const n=Iy(),{pathname:r}=Ba(),[{clusterInfo:{status:l}}]=p1();return x.useEffect(()=>{const u=c=>{const d=setTimeout(()=>{By("navigate to",c),n(c)},300);return()=>clearTimeout(d)};if(r==="/"||(By("pathname",r,"cluster status",l),l==="idle"&&r.startsWith(ws)))return u(ed);if(l==="available"&&!r.startsWith(ws))return u(ws)},[n,r,l]),gS([{path:ed,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Uw,{})})},{path:jw,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Hw,{})})},{path:ws,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Yw,{})})},{path:"*",element:ee.jsx("div",{children:"404 - Page Not Found"})}])},Gw=Me("div")(({theme:n})=>{const{palette:r,typography:l}=n;return{...l.body2,color:r.text.primary,backgroundColor:r.background.default,width:"100%",height:"100%",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center"}}),Vw=()=>ee.jsx(Gw,{children:ee.jsx(zw,{children:ee.jsx(Lw,{children:ee.jsx(qw,{})})})});H2.createRoot(document.getElementById("root")).render(ee.jsx(x.StrictMode,{children:ee.jsx(FS,{children:ee.jsxs(xw,{children:[ee.jsx(v3,{}),ee.jsx(Vw,{})]})})}));export{cE as $,ey as A,Qv as B,Pd as C,Tv as D,Xv as E,Oe as F,Ig as G,sT as H,Wv as I,cT as J,oT as K,tv as L,Xd as M,av as N,_E as O,zs as P,Pv as Q,Pw as R,k3 as S,e3 as T,lT as U,Zw as V,r3 as W,hr as X,Xl as Y,L5 as Z,Z5 as _,rt as a,En as a0,Jd as a1,uT as a2,Iv as a3,Qw as a4,b3 as a5,Kw as a6,Ww as a7,jt as a8,nT as a9,Fw as aa,Xw as ab,_3 as ac,Sd as ad,Iw as ae,rr as af,B5 as ag,Si as ah,ja as ai,nh as aj,Wg as ak,Jw as al,z3 as am,eO as an,iy as ao,aO as ap,nO as aq,L4 as ar,py as as,j4 as at,H4 as au,La as av,ge as b,Ze as c,gn as d,Bl as e,tO as f,it as g,tn as h,Zl as i,ee as j,hd as k,fr as l,Pt as m,p1 as n,Iy as o,h3 as p,Vv as q,x as r,Me as s,$3 as t,nn as u,Qd as v,oi as w,rO as x,oC as y,pr as z}; +`);M=_.pop()||"",D(_)}}).catch(O=>{if(O instanceof Error&&O.name==="AbortError"){l?.();return}o?.(O)})},disconnect:()=>{d?.cancel(),d=void 0,h?.abort("stop"),h=void 0,l?.()}}},ed="/setup",jw="/join",ws="/chat",Uw=x.lazy(()=>uh(()=>import("./setup-JQfEIF_4.js"),__vite__mapDeps([0,1,2]))),Hw=x.lazy(()=>uh(()=>import("./join-DSe18kEi.js"),__vite__mapDeps([3,1,2]))),Yw=x.lazy(()=>uh(()=>import("./chat-Cf4ZGFbl.js"),__vite__mapDeps([4,1,2]))),By=(...n)=>{console.log("%c router.tsx ","color: white; background: purple;",...n)},qw=()=>{const n=Iy(),{pathname:r}=Ba(),[{clusterInfo:{status:l}}]=p1();return x.useEffect(()=>{const u=c=>{const d=setTimeout(()=>{By("navigate to",c),n(c)},300);return()=>clearTimeout(d)};if(r==="/"||(By("pathname",r,"cluster status",l),l==="idle"&&r.startsWith(ws)))return u(ed);if(l==="available"&&!r.startsWith(ws))return u(ws)},[n,r,l]),gS([{path:ed,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Uw,{})})},{path:jw,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Hw,{})})},{path:ws,element:ee.jsx(x.Suspense,{fallback:ee.jsx("div",{children:"Loading..."}),children:ee.jsx(Yw,{})})},{path:"*",element:ee.jsx("div",{children:"404 - Page Not Found"})}])},Gw=Me("div")(({theme:n})=>{const{palette:r,typography:l}=n;return{...l.body2,color:r.text.primary,backgroundColor:r.background.default,width:"100%",height:"100%",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center"}}),Vw=()=>ee.jsx(Gw,{children:ee.jsx(zw,{children:ee.jsx(Lw,{children:ee.jsx(qw,{})})})});H2.createRoot(document.getElementById("root")).render(ee.jsx(x.StrictMode,{children:ee.jsx(FS,{children:ee.jsxs(xw,{children:[ee.jsx(v3,{}),ee.jsx(Vw,{})]})})}));export{cE as $,ey as A,Qv as B,Pd as C,Tv as D,Xv as E,Oe as F,Ig as G,sT as H,Wv as I,cT as J,oT as K,tv as L,Xd as M,av as N,_E as O,zs as P,Pv as Q,Pw as R,k3 as S,e3 as T,lT as U,Zw as V,r3 as W,hr as X,Xl as Y,L5 as Z,Z5 as _,rt as a,En as a0,Jd as a1,uT as a2,Iv as a3,Qw as a4,b3 as a5,Kw as a6,Ww as a7,jt as a8,nT as a9,Fw as aa,Xw as ab,_3 as ac,Sd as ad,Iw as ae,rr as af,B5 as ag,Si as ah,ja as ai,nh as aj,Wg as ak,Jw as al,z3 as am,eO as an,iy as ao,aO as ap,nO as aq,L4 as ar,py as as,j4 as at,H4 as au,La as av,ge as b,Ze as c,gn as d,Bl as e,tO as f,it as g,tn as h,Zl as i,ee as j,hd as k,fr as l,Pt as m,p1 as n,Iy as o,h3 as p,Vv as q,x as r,Me as s,$3 as t,nn as u,Qd as v,oi as w,rO as x,oC as y,pr as z}; diff --git a/src/frontend/dist/assets/join-CnldUErm.js b/src/frontend/dist/assets/join-DSe18kEi.js similarity index 95% rename from src/frontend/dist/assets/join-CnldUErm.js rename to src/frontend/dist/assets/join-DSe18kEi.js index 184d639..b8df417 100644 --- a/src/frontend/dist/assets/join-CnldUErm.js +++ b/src/frontend/dist/assets/join-DSe18kEi.js @@ -1,4 +1,4 @@ -import{i as c,n as l,r as u,j as e,T as r,s as h,A as a,p,L as m,S as y}from"./index-DQWvM1i5.js";import{M as x,J as f,N as j}from"./main-layout-CWejjuhl.js";/** +import{i as c,n as l,r as u,j as e,T as r,s as h,A as a,p,L as m,S as y}from"./index-CPt7BZLW.js";import{M as x,J as f,N as j}from"./main-layout-lDcJ7mSn.js";/** * @license @tabler/icons-react v3.35.0 - MIT * * This source code is licensed under the MIT license. diff --git a/src/frontend/dist/assets/main-layout-CWejjuhl.js b/src/frontend/dist/assets/main-layout-lDcJ7mSn.js similarity index 97% rename from src/frontend/dist/assets/main-layout-CWejjuhl.js rename to src/frontend/dist/assets/main-layout-lDcJ7mSn.js index 1cf627d..22d198c 100644 --- a/src/frontend/dist/assets/main-layout-CWejjuhl.js +++ b/src/frontend/dist/assets/main-layout-lDcJ7mSn.js @@ -1,4 +1,4 @@ -import{y as yg,z as vg,r as L,C as Tg,D as xg,j as k,c as Ve,_ as Eg,R as ls,E as Sg,F as cs,G as H1,H as wg,J as Ag,k as Vt,K as Cg,M as ar,N as kg,a as gt,g as at,d as Ye,O as Gl,u as Xe,s as ue,P as Aa,Q as Ig,U as Ca,b as St,V as Ng,m as ct,W as ka,X as z1,Y as Rg,Z as ja,w as Et,$ as Mg,a0 as Dg,a1 as Pg,a2 as Lg,a3 as mo,v as Xl,a4 as Og,a5 as _g,T as Ke,q as Wn,a6 as Bg,a7 as Fg,a8 as Kl,h as Ql,a9 as ra,aa as Hg,ab as Oc,B as zg,ac as _c,ad as Bc,ae as Ug,af as Ln,ag as Vg,ah as U1,ai as V1,aj as jg,ak as Fc,al as qg,am as $g,an as Wg,ao as Hc,i as mn,ap as Yg,aq as zc,ar as Gg,as as Uc,at as Os,I as Qr,au as j1,p as q1,n as qa,l as Ia,S as Ge,x as Zl,av as $1}from"./index-DQWvM1i5.js";function Xg(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=yg("div",{shouldForwardProp:o=>o!=="theme"&&o!=="sx"&&o!=="as"})(vg);return L.forwardRef(function(u,l){const c=Tg(n),{className:d,component:p="div",...f}=xg(u);return k.jsx(a,{as:p,ref:l,className:Ve(d,i?i(r):r),theme:t&&c[t]||c,...f})})}function Kg(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Qg(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Zg(e){return parseFloat(e)}function Vc(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function W1(e,t=166){let n;function r(...i){const a=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function fn(e){return e&&e.ownerDocument||document}function sr(e){return fn(e).defaultView||window}function jc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function qu(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:a}=L.useRef(t!==void 0),[s,o]=L.useState(n),u=a?t:s,l=L.useCallback(c=>{a||o(c)},[]);return[u,l]}function Jg(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function e6(e,t){if(!e)return t;function n(s,o){const u={};return Object.keys(o).forEach(l=>{Jg(l,o[l])&&typeof s[l]=="function"&&(u[l]=(...c)=>{s[l](...c),o[l](...c)})}),u}if(typeof e=="function"||typeof t=="function")return s=>{const o=typeof t=="function"?t(s):t,u=typeof e=="function"?e({...s,...o}):e,l=Ve(s?.className,o?.className,u?.className),c=n(u,o);return{...o,...u,...c,...!!l&&{className:l},...o?.style&&u?.style&&{style:{...o.style,...u.style}},...o?.sx&&u?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,i=n(e,r),a=Ve(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const qc={disabled:!1};var t6=function(t){return t.scrollTop},ia="unmounted",Ur="exited",Vr="entering",ci="entered",$u="exiting",Yn=(function(e){Eg(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Ur,a.appearStatus=Vr):u=ci:r.unmountOnExit||r.mountOnEnter?u=ia:u=Ur,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===ia?{status:Ur}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Vr&&s!==ci&&(a=Vr):(s===Vr||s===ci)&&(a=$u)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Vr){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ls.findDOMNode(this);s&&t6(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ur&&this.setState({status:ia})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[ls.findDOMNode(this),o],l=u[0],c=u[1],d=this.getTimeouts(),p=o?d.appear:d.enter;if(!i&&!s||qc.disabled){this.safeSetState({status:ci},function(){a.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:Vr},function(){a.props.onEntering(l,c),a.onTransitionEnd(p,function(){a.safeSetState({status:ci},function(){a.props.onEntered(l,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:ls.findDOMNode(this);if(!a||qc.disabled){this.safeSetState({status:Ur},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:$u},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ur},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:ls.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=u[0],c=u[1];this.props.addEndListener(l,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ia)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=Sg(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return cs.createElement(H1.Provider,{value:null},typeof s=="function"?s(i,o):cs.cloneElement(cs.Children.only(s),o))},t})(cs.Component);Yn.contextType=H1;Yn.propTypes={};function si(){}Yn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:si,onEntering:si,onEntered:si,onExit:si,onExiting:si,onExited:si};Yn.UNMOUNTED=ia;Yn.EXITED=Ur;Yn.ENTERING=Vr;Yn.ENTERED=ci;Yn.EXITING=$u;const Y1=e=>e.scrollTop;function Ys(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}var nn="top",An="bottom",Cn="right",rn="left",Jl="auto",$a=[nn,An,Cn,rn],Si="start",Na="end",n6="clippingParents",G1="viewport",$i="popper",r6="reference",$c=$a.reduce(function(e,t){return e.concat([t+"-"+Si,t+"-"+Na])},[]),X1=[].concat($a,[Jl]).reduce(function(e,t){return e.concat([t,t+"-"+Si,t+"-"+Na])},[]),i6="beforeRead",a6="read",s6="afterRead",o6="beforeMain",u6="main",l6="afterMain",c6="beforeWrite",d6="write",h6="afterWrite",f6=[i6,a6,s6,o6,u6,l6,c6,d6,h6];function $n(e){return e?(e.nodeName||"").toLowerCase():null}function pn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zr(e){var t=pn(e).Element;return e instanceof t||e instanceof Element}function En(e){var t=pn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function e0(e){if(typeof ShadowRoot>"u")return!1;var t=pn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function p6(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!En(a)||!$n(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function m6(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),o=s.reduce(function(u,l){return u[l]="",u},{});!En(i)||!$n(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const g6={name:"applyStyles",enabled:!0,phase:"write",fn:p6,effect:m6,requires:["computeStyles"]};function Un(e){return e.split("-")[0]}var Yr=Math.max,Gs=Math.min,wi=Math.round;function Wu(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function K1(){return!/^((?!chrome|android).)*safari/i.test(Wu())}function Ai(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&En(e)&&(i=e.offsetWidth>0&&wi(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&wi(r.height)/e.offsetHeight||1);var s=Zr(e)?pn(e):window,o=s.visualViewport,u=!K1()&&n,l=(r.left+(u&&o?o.offsetLeft:0))/i,c=(r.top+(u&&o?o.offsetTop:0))/a,d=r.width/i,p=r.height/a;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function t0(e){var t=Ai(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Q1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&e0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function or(e){return pn(e).getComputedStyle(e)}function b6(e){return["table","td","th"].indexOf($n(e))>=0}function Mr(e){return((Zr(e)?e.ownerDocument:e.document)||window.document).documentElement}function go(e){return $n(e)==="html"?e:e.assignedSlot||e.parentNode||(e0(e)?e.host:null)||Mr(e)}function Wc(e){return!En(e)||or(e).position==="fixed"?null:e.offsetParent}function y6(e){var t=/firefox/i.test(Wu()),n=/Trident/i.test(Wu());if(n&&En(e)){var r=or(e);if(r.position==="fixed")return null}var i=go(e);for(e0(i)&&(i=i.host);En(i)&&["html","body"].indexOf($n(i))<0;){var a=or(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Wa(e){for(var t=pn(e),n=Wc(e);n&&b6(n)&&or(n).position==="static";)n=Wc(n);return n&&($n(n)==="html"||$n(n)==="body"&&or(n).position==="static")?t:n||y6(e)||t}function n0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ua(e,t,n){return Yr(e,Gs(t,n))}function v6(e,t,n){var r=ua(e,t,n);return r>n?n:r}function Z1(){return{top:0,right:0,bottom:0,left:0}}function J1(e){return Object.assign({},Z1(),e)}function ep(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var T6=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,J1(typeof t!="number"?t:ep(t,$a))};function x6(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=Un(n.placement),u=n0(o),l=[rn,Cn].indexOf(o)>=0,c=l?"height":"width";if(!(!a||!s)){var d=T6(i.padding,n),p=t0(a),f=u==="y"?nn:rn,b=u==="y"?An:Cn,v=n.rects.reference[c]+n.rects.reference[u]-s[u]-n.rects.popper[c],E=s[u]-n.rects.reference[u],y=Wa(a),w=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,x=v/2-E/2,I=d[f],M=w-p[c]-d[b],C=w/2-p[c]/2+x,H=ua(I,C,M),z=u;n.modifiersData[r]=(t={},t[z]=H,t.centerOffset=H-C,t)}}function E6(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Q1(t.elements.popper,i)&&(t.elements.arrow=i))}const S6={name:"arrow",enabled:!0,phase:"main",fn:x6,effect:E6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ci(e){return e.split("-")[1]}var w6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function A6(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:wi(n*i)/i||0,y:wi(r*i)/i||0}}function Yc(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,o=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=s.x,f=p===void 0?0:p,b=s.y,v=b===void 0?0:b,E=typeof c=="function"?c({x:f,y:v}):{x:f,y:v};f=E.x,v=E.y;var y=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),x=rn,I=nn,M=window;if(l){var C=Wa(n),H="clientHeight",z="clientWidth";if(C===pn(n)&&(C=Mr(n),or(C).position!=="static"&&o==="absolute"&&(H="scrollHeight",z="scrollWidth")),C=C,i===nn||(i===rn||i===Cn)&&a===Na){I=An;var V=d&&C===M&&M.visualViewport?M.visualViewport.height:C[H];v-=V-r.height,v*=u?1:-1}if(i===rn||(i===nn||i===An)&&a===Na){x=Cn;var P=d&&C===M&&M.visualViewport?M.visualViewport.width:C[z];f-=P-r.width,f*=u?1:-1}}var $=Object.assign({position:o},l&&w6),W=c===!0?A6({x:f,y:v},pn(n)):{x:f,y:v};if(f=W.x,v=W.y,u){var G;return Object.assign({},$,(G={},G[I]=w?"0":"",G[x]=y?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",G))}return Object.assign({},$,(t={},t[I]=w?v+"px":"",t[x]=y?f+"px":"",t.transform="",t))}function C6(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,s=a===void 0?!0:a,o=n.roundOffsets,u=o===void 0?!0:o,l={placement:Un(t.placement),variation:Ci(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Yc(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yc(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const k6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:C6,data:{}};var ds={passive:!0};function I6(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,s=r.resize,o=s===void 0?!0:s,u=pn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(c){c.addEventListener("scroll",n.update,ds)}),o&&u.addEventListener("resize",n.update,ds),function(){a&&l.forEach(function(c){c.removeEventListener("scroll",n.update,ds)}),o&&u.removeEventListener("resize",n.update,ds)}}const N6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:I6,data:{}};var R6={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(e){return e.replace(/left|right|bottom|top/g,function(t){return R6[t]})}var M6={start:"end",end:"start"};function Gc(e){return e.replace(/start|end/g,function(t){return M6[t]})}function r0(e){var t=pn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function i0(e){return Ai(Mr(e)).left+r0(e).scrollLeft}function D6(e,t){var n=pn(e),r=Mr(e),i=n.visualViewport,a=r.clientWidth,s=r.clientHeight,o=0,u=0;if(i){a=i.width,s=i.height;var l=K1();(l||!l&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:o+i0(e),y:u}}function P6(e){var t,n=Mr(e),r=r0(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Yr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Yr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-r.scrollLeft+i0(e),u=-r.scrollTop;return or(i||n).direction==="rtl"&&(o+=Yr(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:u}}function a0(e){var t=or(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function tp(e){return["html","body","#document"].indexOf($n(e))>=0?e.ownerDocument.body:En(e)&&a0(e)?e:tp(go(e))}function la(e,t){var n;t===void 0&&(t=[]);var r=tp(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=pn(r),s=i?[a].concat(a.visualViewport||[],a0(r)?r:[]):r,o=t.concat(s);return i?o:o.concat(la(go(s)))}function Yu(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L6(e,t){var n=Ai(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Xc(e,t,n){return t===G1?Yu(D6(e,n)):Zr(t)?L6(t,n):Yu(P6(Mr(e)))}function O6(e){var t=la(go(e)),n=["absolute","fixed"].indexOf(or(e).position)>=0,r=n&&En(e)?Wa(e):e;return Zr(r)?t.filter(function(i){return Zr(i)&&Q1(i,r)&&$n(i)!=="body"}):[]}function _6(e,t,n,r){var i=t==="clippingParents"?O6(e):[].concat(t),a=[].concat(i,[n]),s=a[0],o=a.reduce(function(u,l){var c=Xc(e,l,r);return u.top=Yr(c.top,u.top),u.right=Gs(c.right,u.right),u.bottom=Gs(c.bottom,u.bottom),u.left=Yr(c.left,u.left),u},Xc(e,s,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function np(e){var t=e.reference,n=e.element,r=e.placement,i=r?Un(r):null,a=r?Ci(r):null,s=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2,u;switch(i){case nn:u={x:s,y:t.y-n.height};break;case An:u={x:s,y:t.y+t.height};break;case Cn:u={x:t.x+t.width,y:o};break;case rn:u={x:t.x-n.width,y:o};break;default:u={x:t.x,y:t.y}}var l=i?n0(i):null;if(l!=null){var c=l==="y"?"height":"width";switch(a){case Si:u[l]=u[l]-(t[c]/2-n[c]/2);break;case Na:u[l]=u[l]+(t[c]/2-n[c]/2);break}}return u}function Ra(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,o=n.boundary,u=o===void 0?n6:o,l=n.rootBoundary,c=l===void 0?G1:l,d=n.elementContext,p=d===void 0?$i:d,f=n.altBoundary,b=f===void 0?!1:f,v=n.padding,E=v===void 0?0:v,y=J1(typeof E!="number"?E:ep(E,$a)),w=p===$i?r6:$i,x=e.rects.popper,I=e.elements[b?w:p],M=_6(Zr(I)?I:I.contextElement||Mr(e.elements.popper),u,c,s),C=Ai(e.elements.reference),H=np({reference:C,element:x,placement:i}),z=Yu(Object.assign({},x,H)),V=p===$i?z:C,P={top:M.top-V.top+y.top,bottom:V.bottom-M.bottom+y.bottom,left:M.left-V.left+y.left,right:V.right-M.right+y.right},$=e.modifiersData.offset;if(p===$i&&$){var W=$[i];Object.keys(P).forEach(function(G){var q=[Cn,An].indexOf(G)>=0?1:-1,Y=[nn,An].indexOf(G)>=0?"y":"x";P[G]+=W[Y]*q})}return P}function B6(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,o=n.flipVariations,u=n.allowedAutoPlacements,l=u===void 0?X1:u,c=Ci(r),d=c?o?$c:$c.filter(function(b){return Ci(b)===c}):$a,p=d.filter(function(b){return l.indexOf(b)>=0});p.length===0&&(p=d);var f=p.reduce(function(b,v){return b[v]=Ra(e,{placement:v,boundary:i,rootBoundary:a,padding:s})[Un(v)],b},{});return Object.keys(f).sort(function(b,v){return f[b]-f[v]})}function F6(e){if(Un(e)===Jl)return[];var t=_s(e);return[Gc(e),t,Gc(t)]}function H6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!0:s,u=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,b=f===void 0?!0:f,v=n.allowedAutoPlacements,E=t.options.placement,y=Un(E),w=y===E,x=u||(w||!b?[_s(E)]:F6(E)),I=[E].concat(x).reduce(function(xe,Ie){return xe.concat(Un(Ie)===Jl?B6(t,{placement:Ie,boundary:c,rootBoundary:d,padding:l,flipVariations:b,allowedAutoPlacements:v}):Ie)},[]),M=t.rects.reference,C=t.rects.popper,H=new Map,z=!0,V=I[0],P=0;P=0,Y=q?"width":"height",Q=Ra(t,{placement:$,boundary:c,rootBoundary:d,altBoundary:p,padding:l}),ee=q?G?Cn:rn:G?An:nn;M[Y]>C[Y]&&(ee=_s(ee));var de=_s(ee),oe=[];if(a&&oe.push(Q[W]<=0),o&&oe.push(Q[ee]<=0,Q[de]<=0),oe.every(function(xe){return xe})){V=$,z=!1;break}H.set($,oe)}if(z)for(var R=b?3:1,Ce=function(Ie){var Be=I.find(function(je){var _e=H.get(je);if(_e)return _e.slice(0,Ie).every(function(qe){return qe})});if(Be)return V=Be,"break"},ve=R;ve>0;ve--){var B=Ce(ve);if(B==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const z6={name:"flip",enabled:!0,phase:"main",fn:H6,requiresIfExists:["offset"],data:{_skip:!1}};function Kc(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Qc(e){return[nn,Cn,An,rn].some(function(t){return e[t]>=0})}function U6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ra(t,{elementContext:"reference"}),o=Ra(t,{altBoundary:!0}),u=Kc(s,r),l=Kc(o,i,a),c=Qc(u),d=Qc(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const V6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:U6};function j6(e,t,n){var r=Un(e),i=[rn,nn].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[rn,Cn].indexOf(r)>=0?{x:o,y:s}:{x:s,y:o}}function q6(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,s=X1.reduce(function(c,d){return c[d]=j6(d,t.rects,a),c},{}),o=s[t.placement],u=o.x,l=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=s}const $6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:q6};function W6(e){var t=e.state,n=e.name;t.modifiersData[n]=np({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Y6={name:"popperOffsets",enabled:!0,phase:"read",fn:W6,data:{}};function G6(e){return e==="x"?"y":"x"}function X6(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!1:s,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=p===void 0?!0:p,b=n.tetherOffset,v=b===void 0?0:b,E=Ra(t,{boundary:u,rootBoundary:l,padding:d,altBoundary:c}),y=Un(t.placement),w=Ci(t.placement),x=!w,I=n0(y),M=G6(I),C=t.modifiersData.popperOffsets,H=t.rects.reference,z=t.rects.popper,V=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,P=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(C){if(a){var G,q=I==="y"?nn:rn,Y=I==="y"?An:Cn,Q=I==="y"?"height":"width",ee=C[I],de=ee+E[q],oe=ee-E[Y],R=f?-z[Q]/2:0,Ce=w===Si?H[Q]:z[Q],ve=w===Si?-z[Q]:-H[Q],B=t.elements.arrow,xe=f&&B?t0(B):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Z1(),Be=Ie[q],je=Ie[Y],_e=ua(0,H[Q],xe[Q]),qe=x?H[Q]/2-R-_e-Be-P.mainAxis:Ce-_e-Be-P.mainAxis,Te=x?-H[Q]/2+R+_e+je+P.mainAxis:ve+_e+je+P.mainAxis,De=t.elements.arrow&&Wa(t.elements.arrow),Ne=De?I==="y"?De.clientTop||0:De.clientLeft||0:0,Qe=(G=$?.[I])!=null?G:0,Re=ee+qe-Qe-Ne,$e=ee+Te-Qe,wt=ua(f?Gs(de,Re):de,ee,f?Yr(oe,$e):oe);C[I]=wt,W[I]=wt-ee}if(o){var ht,st=I==="x"?nn:rn,Nt=I==="x"?An:Cn,ot=C[M],it=M==="y"?"height":"width",Ht=ot+E[st],Kt=ot-E[Nt],bt=[nn,rn].indexOf(y)!==-1,on=(ht=$?.[M])!=null?ht:0,K=bt?Ht:ot-H[it]-z[it]-on+P.altAxis,ie=bt?ot+H[it]+z[it]-on-P.altAxis:Kt,me=f&&bt?v6(K,ot,ie):ua(f?K:Ht,ot,f?ie:Kt);C[M]=me,W[M]=me-ot}t.modifiersData[r]=W}}const K6={name:"preventOverflow",enabled:!0,phase:"main",fn:X6,requiresIfExists:["offset"]};function Q6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Z6(e){return e===pn(e)||!En(e)?r0(e):Q6(e)}function J6(e){var t=e.getBoundingClientRect(),n=wi(t.width)/e.offsetWidth||1,r=wi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function e5(e,t,n){n===void 0&&(n=!1);var r=En(t),i=En(t)&&J6(t),a=Mr(t),s=Ai(e,i,n),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(($n(t)!=="body"||a0(a))&&(o=Z6(t)),En(t)?(u=Ai(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=i0(a))),{x:s.left+o.scrollLeft-u.x,y:s.top+o.scrollTop-u.y,width:s.width,height:s.height}}function t5(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var u=t.get(o);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function n5(e){var t=t5(e);return f6.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function r5(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function i5(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Zc={placement:"bottom",modifiers:[],strategy:"absolute"};function Jc(){for(var e=arguments.length,t=new Array(e),n=0;n=19?e?.props?.ref||null:e?.ref||null}function u5(e){return typeof e=="function"?e():e}const ip=L.forwardRef(function(t,n){const{children:r,container:i,disablePortal:a=!1}=t,[s,o]=L.useState(null),u=Vt(L.isValidElement(r)?Di(r):null,n);if(ar(()=>{a||o(u5(i)||document.body)},[i,a]),ar(()=>{if(s&&!a)return jc(n,s),()=>{jc(n,null)}},[n,s,a]),a){if(L.isValidElement(r)){const l={ref:u};return L.cloneElement(r,l)}return r}return s&&kg.createPortal(r,s)});function l5(e){return gt("MuiPopper",e)}at("MuiPopper",["root"]);function c5(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Gu(e){return typeof e=="function"?e():e}function d5(e){return e.nodeType!==void 0}const h5=e=>{const{classes:t}=e;return Ye({root:["root"]},l5,t)},f5={},p5=L.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:a,disablePortal:s,modifiers:o,open:u,placement:l,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:b,ownerState:v,...E}=t,y=L.useRef(null),w=Vt(y,n),x=L.useRef(null),I=Vt(x,d),M=L.useRef(I);ar(()=>{M.current=I},[I]),L.useImperativeHandle(d,()=>x.current,[]);const C=c5(l,a),[H,z]=L.useState(C),[V,P]=L.useState(Gu(r));L.useEffect(()=>{x.current&&x.current.forceUpdate()}),L.useEffect(()=>{r&&P(Gu(r))},[r]),ar(()=>{if(!V||!u)return;const Y=de=>{z(de.placement)};let Q=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:de})=>{Y(de)}}];o!=null&&(Q=Q.concat(o)),c&&c.modifiers!=null&&(Q=Q.concat(c.modifiers));const ee=o5(V,y.current,{placement:C,...c,modifiers:Q});return M.current(ee),()=>{ee.destroy(),M.current(null)}},[V,s,o,u,c,C]);const $={placement:H};b!==null&&($.TransitionProps=b);const W=h5(t),G=f.root??"div",q=rp({elementType:G,externalSlotProps:p.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:W.root});return k.jsx(G,{...q,children:typeof i=="function"?i($):i})}),m5=L.forwardRef(function(t,n){const{anchorEl:r,children:i,container:a,direction:s="ltr",disablePortal:o=!1,keepMounted:u=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:p=f5,popperRef:f,style:b,transition:v=!1,slotProps:E={},slots:y={},...w}=t,[x,I]=L.useState(!0),M=()=>{I(!1)},C=()=>{I(!0)};if(!u&&!c&&(!v||x))return null;let H;if(a)H=a;else if(r){const P=Gu(r);H=P&&d5(P)?fn(P).body:fn(null).body}const z=!c&&u&&(!v||x)?"none":void 0,V=v?{in:c,onEnter:M,onExited:C}:void 0;return k.jsx(ip,{disablePortal:o,container:H,children:k.jsx(p5,{anchorEl:r,direction:s,disablePortal:o,modifiers:l,ref:n,open:v?!x:c,placement:d,popperOptions:p,popperRef:f,slotProps:E,slots:y,...w,style:{position:"fixed",top:0,left:0,display:z,...b},TransitionProps:V,children:i})})}),g5=ue(m5,{name:"MuiPopper",slot:"Root"})({}),ap=L.forwardRef(function(t,n){const r=Gl(),i=Xe({props:t,name:"MuiPopper"}),{anchorEl:a,component:s,components:o,componentsProps:u,container:l,disablePortal:c,keepMounted:d,modifiers:p,open:f,placement:b,popperOptions:v,popperRef:E,transition:y,slots:w,slotProps:x,...I}=i,M=w?.root??o?.Root,C={anchorEl:a,container:l,disablePortal:c,keepMounted:d,modifiers:p,open:f,placement:b,popperOptions:v,popperRef:E,transition:y,...I};return k.jsx(g5,{as:s,direction:r?"rtl":"ltr",slots:{root:M},slotProps:x??u,...C,ref:n})});function hs(e){return parseInt(e,10)||0}const b5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function y5(e){for(const t in e)return!1;return!0}function ed(e){return y5(e)||e.outerHeightStyle===0&&!e.overflowing}const v5=L.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:a=1,style:s,value:o,...u}=t,{current:l}=L.useRef(o!=null),c=L.useRef(null),d=Vt(n,c),p=L.useRef(null),f=L.useRef(null),b=L.useCallback(()=>{const x=c.current,I=f.current;if(!x||!I)return;const C=sr(x).getComputedStyle(x);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};I.style.width=C.width,I.value=x.value||t.placeholder||"x",I.value.slice(-1)===` +import{y as yg,z as vg,r as L,C as Tg,D as xg,j as k,c as Ve,_ as Eg,R as ls,E as Sg,F as cs,G as H1,H as wg,J as Ag,k as Vt,K as Cg,M as ar,N as kg,a as gt,g as at,d as Ye,O as Gl,u as Xe,s as ue,P as Aa,Q as Ig,U as Ca,b as St,V as Ng,m as ct,W as ka,X as z1,Y as Rg,Z as ja,w as Et,$ as Mg,a0 as Dg,a1 as Pg,a2 as Lg,a3 as mo,v as Xl,a4 as Og,a5 as _g,T as Ke,q as Wn,a6 as Bg,a7 as Fg,a8 as Kl,h as Ql,a9 as ra,aa as Hg,ab as Oc,B as zg,ac as _c,ad as Bc,ae as Ug,af as Ln,ag as Vg,ah as U1,ai as V1,aj as jg,ak as Fc,al as qg,am as $g,an as Wg,ao as Hc,i as mn,ap as Yg,aq as zc,ar as Gg,as as Uc,at as Os,I as Qr,au as j1,p as q1,n as qa,l as Ia,S as Ge,x as Zl,av as $1}from"./index-CPt7BZLW.js";function Xg(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=yg("div",{shouldForwardProp:o=>o!=="theme"&&o!=="sx"&&o!=="as"})(vg);return L.forwardRef(function(u,l){const c=Tg(n),{className:d,component:p="div",...f}=xg(u);return k.jsx(a,{as:p,ref:l,className:Ve(d,i?i(r):r),theme:t&&c[t]||c,...f})})}function Kg(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Qg(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Zg(e){return parseFloat(e)}function Vc(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function W1(e,t=166){let n;function r(...i){const a=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function fn(e){return e&&e.ownerDocument||document}function sr(e){return fn(e).defaultView||window}function jc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function qu(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:a}=L.useRef(t!==void 0),[s,o]=L.useState(n),u=a?t:s,l=L.useCallback(c=>{a||o(c)},[]);return[u,l]}function Jg(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function e6(e,t){if(!e)return t;function n(s,o){const u={};return Object.keys(o).forEach(l=>{Jg(l,o[l])&&typeof s[l]=="function"&&(u[l]=(...c)=>{s[l](...c),o[l](...c)})}),u}if(typeof e=="function"||typeof t=="function")return s=>{const o=typeof t=="function"?t(s):t,u=typeof e=="function"?e({...s,...o}):e,l=Ve(s?.className,o?.className,u?.className),c=n(u,o);return{...o,...u,...c,...!!l&&{className:l},...o?.style&&u?.style&&{style:{...o.style,...u.style}},...o?.sx&&u?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,i=n(e,r),a=Ve(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const qc={disabled:!1};var t6=function(t){return t.scrollTop},ia="unmounted",Ur="exited",Vr="entering",ci="entered",$u="exiting",Yn=(function(e){Eg(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Ur,a.appearStatus=Vr):u=ci:r.unmountOnExit||r.mountOnEnter?u=ia:u=Ur,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===ia?{status:Ur}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Vr&&s!==ci&&(a=Vr):(s===Vr||s===ci)&&(a=$u)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Vr){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ls.findDOMNode(this);s&&t6(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ur&&this.setState({status:ia})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[ls.findDOMNode(this),o],l=u[0],c=u[1],d=this.getTimeouts(),p=o?d.appear:d.enter;if(!i&&!s||qc.disabled){this.safeSetState({status:ci},function(){a.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:Vr},function(){a.props.onEntering(l,c),a.onTransitionEnd(p,function(){a.safeSetState({status:ci},function(){a.props.onEntered(l,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:ls.findDOMNode(this);if(!a||qc.disabled){this.safeSetState({status:Ur},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:$u},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ur},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:ls.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=u[0],c=u[1];this.props.addEndListener(l,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ia)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=Sg(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return cs.createElement(H1.Provider,{value:null},typeof s=="function"?s(i,o):cs.cloneElement(cs.Children.only(s),o))},t})(cs.Component);Yn.contextType=H1;Yn.propTypes={};function si(){}Yn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:si,onEntering:si,onEntered:si,onExit:si,onExiting:si,onExited:si};Yn.UNMOUNTED=ia;Yn.EXITED=Ur;Yn.ENTERING=Vr;Yn.ENTERED=ci;Yn.EXITING=$u;const Y1=e=>e.scrollTop;function Ys(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}var nn="top",An="bottom",Cn="right",rn="left",Jl="auto",$a=[nn,An,Cn,rn],Si="start",Na="end",n6="clippingParents",G1="viewport",$i="popper",r6="reference",$c=$a.reduce(function(e,t){return e.concat([t+"-"+Si,t+"-"+Na])},[]),X1=[].concat($a,[Jl]).reduce(function(e,t){return e.concat([t,t+"-"+Si,t+"-"+Na])},[]),i6="beforeRead",a6="read",s6="afterRead",o6="beforeMain",u6="main",l6="afterMain",c6="beforeWrite",d6="write",h6="afterWrite",f6=[i6,a6,s6,o6,u6,l6,c6,d6,h6];function $n(e){return e?(e.nodeName||"").toLowerCase():null}function pn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zr(e){var t=pn(e).Element;return e instanceof t||e instanceof Element}function En(e){var t=pn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function e0(e){if(typeof ShadowRoot>"u")return!1;var t=pn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function p6(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!En(a)||!$n(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function m6(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),o=s.reduce(function(u,l){return u[l]="",u},{});!En(i)||!$n(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const g6={name:"applyStyles",enabled:!0,phase:"write",fn:p6,effect:m6,requires:["computeStyles"]};function Un(e){return e.split("-")[0]}var Yr=Math.max,Gs=Math.min,wi=Math.round;function Wu(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function K1(){return!/^((?!chrome|android).)*safari/i.test(Wu())}function Ai(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&En(e)&&(i=e.offsetWidth>0&&wi(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&wi(r.height)/e.offsetHeight||1);var s=Zr(e)?pn(e):window,o=s.visualViewport,u=!K1()&&n,l=(r.left+(u&&o?o.offsetLeft:0))/i,c=(r.top+(u&&o?o.offsetTop:0))/a,d=r.width/i,p=r.height/a;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function t0(e){var t=Ai(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Q1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&e0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function or(e){return pn(e).getComputedStyle(e)}function b6(e){return["table","td","th"].indexOf($n(e))>=0}function Mr(e){return((Zr(e)?e.ownerDocument:e.document)||window.document).documentElement}function go(e){return $n(e)==="html"?e:e.assignedSlot||e.parentNode||(e0(e)?e.host:null)||Mr(e)}function Wc(e){return!En(e)||or(e).position==="fixed"?null:e.offsetParent}function y6(e){var t=/firefox/i.test(Wu()),n=/Trident/i.test(Wu());if(n&&En(e)){var r=or(e);if(r.position==="fixed")return null}var i=go(e);for(e0(i)&&(i=i.host);En(i)&&["html","body"].indexOf($n(i))<0;){var a=or(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Wa(e){for(var t=pn(e),n=Wc(e);n&&b6(n)&&or(n).position==="static";)n=Wc(n);return n&&($n(n)==="html"||$n(n)==="body"&&or(n).position==="static")?t:n||y6(e)||t}function n0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ua(e,t,n){return Yr(e,Gs(t,n))}function v6(e,t,n){var r=ua(e,t,n);return r>n?n:r}function Z1(){return{top:0,right:0,bottom:0,left:0}}function J1(e){return Object.assign({},Z1(),e)}function ep(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var T6=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,J1(typeof t!="number"?t:ep(t,$a))};function x6(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=Un(n.placement),u=n0(o),l=[rn,Cn].indexOf(o)>=0,c=l?"height":"width";if(!(!a||!s)){var d=T6(i.padding,n),p=t0(a),f=u==="y"?nn:rn,b=u==="y"?An:Cn,v=n.rects.reference[c]+n.rects.reference[u]-s[u]-n.rects.popper[c],E=s[u]-n.rects.reference[u],y=Wa(a),w=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,x=v/2-E/2,I=d[f],M=w-p[c]-d[b],C=w/2-p[c]/2+x,H=ua(I,C,M),z=u;n.modifiersData[r]=(t={},t[z]=H,t.centerOffset=H-C,t)}}function E6(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Q1(t.elements.popper,i)&&(t.elements.arrow=i))}const S6={name:"arrow",enabled:!0,phase:"main",fn:x6,effect:E6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ci(e){return e.split("-")[1]}var w6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function A6(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:wi(n*i)/i||0,y:wi(r*i)/i||0}}function Yc(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,o=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=s.x,f=p===void 0?0:p,b=s.y,v=b===void 0?0:b,E=typeof c=="function"?c({x:f,y:v}):{x:f,y:v};f=E.x,v=E.y;var y=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),x=rn,I=nn,M=window;if(l){var C=Wa(n),H="clientHeight",z="clientWidth";if(C===pn(n)&&(C=Mr(n),or(C).position!=="static"&&o==="absolute"&&(H="scrollHeight",z="scrollWidth")),C=C,i===nn||(i===rn||i===Cn)&&a===Na){I=An;var V=d&&C===M&&M.visualViewport?M.visualViewport.height:C[H];v-=V-r.height,v*=u?1:-1}if(i===rn||(i===nn||i===An)&&a===Na){x=Cn;var P=d&&C===M&&M.visualViewport?M.visualViewport.width:C[z];f-=P-r.width,f*=u?1:-1}}var $=Object.assign({position:o},l&&w6),W=c===!0?A6({x:f,y:v},pn(n)):{x:f,y:v};if(f=W.x,v=W.y,u){var G;return Object.assign({},$,(G={},G[I]=w?"0":"",G[x]=y?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",G))}return Object.assign({},$,(t={},t[I]=w?v+"px":"",t[x]=y?f+"px":"",t.transform="",t))}function C6(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,s=a===void 0?!0:a,o=n.roundOffsets,u=o===void 0?!0:o,l={placement:Un(t.placement),variation:Ci(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Yc(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yc(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const k6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:C6,data:{}};var ds={passive:!0};function I6(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,s=r.resize,o=s===void 0?!0:s,u=pn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(c){c.addEventListener("scroll",n.update,ds)}),o&&u.addEventListener("resize",n.update,ds),function(){a&&l.forEach(function(c){c.removeEventListener("scroll",n.update,ds)}),o&&u.removeEventListener("resize",n.update,ds)}}const N6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:I6,data:{}};var R6={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(e){return e.replace(/left|right|bottom|top/g,function(t){return R6[t]})}var M6={start:"end",end:"start"};function Gc(e){return e.replace(/start|end/g,function(t){return M6[t]})}function r0(e){var t=pn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function i0(e){return Ai(Mr(e)).left+r0(e).scrollLeft}function D6(e,t){var n=pn(e),r=Mr(e),i=n.visualViewport,a=r.clientWidth,s=r.clientHeight,o=0,u=0;if(i){a=i.width,s=i.height;var l=K1();(l||!l&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:o+i0(e),y:u}}function P6(e){var t,n=Mr(e),r=r0(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Yr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Yr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-r.scrollLeft+i0(e),u=-r.scrollTop;return or(i||n).direction==="rtl"&&(o+=Yr(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:u}}function a0(e){var t=or(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function tp(e){return["html","body","#document"].indexOf($n(e))>=0?e.ownerDocument.body:En(e)&&a0(e)?e:tp(go(e))}function la(e,t){var n;t===void 0&&(t=[]);var r=tp(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=pn(r),s=i?[a].concat(a.visualViewport||[],a0(r)?r:[]):r,o=t.concat(s);return i?o:o.concat(la(go(s)))}function Yu(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L6(e,t){var n=Ai(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Xc(e,t,n){return t===G1?Yu(D6(e,n)):Zr(t)?L6(t,n):Yu(P6(Mr(e)))}function O6(e){var t=la(go(e)),n=["absolute","fixed"].indexOf(or(e).position)>=0,r=n&&En(e)?Wa(e):e;return Zr(r)?t.filter(function(i){return Zr(i)&&Q1(i,r)&&$n(i)!=="body"}):[]}function _6(e,t,n,r){var i=t==="clippingParents"?O6(e):[].concat(t),a=[].concat(i,[n]),s=a[0],o=a.reduce(function(u,l){var c=Xc(e,l,r);return u.top=Yr(c.top,u.top),u.right=Gs(c.right,u.right),u.bottom=Gs(c.bottom,u.bottom),u.left=Yr(c.left,u.left),u},Xc(e,s,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function np(e){var t=e.reference,n=e.element,r=e.placement,i=r?Un(r):null,a=r?Ci(r):null,s=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2,u;switch(i){case nn:u={x:s,y:t.y-n.height};break;case An:u={x:s,y:t.y+t.height};break;case Cn:u={x:t.x+t.width,y:o};break;case rn:u={x:t.x-n.width,y:o};break;default:u={x:t.x,y:t.y}}var l=i?n0(i):null;if(l!=null){var c=l==="y"?"height":"width";switch(a){case Si:u[l]=u[l]-(t[c]/2-n[c]/2);break;case Na:u[l]=u[l]+(t[c]/2-n[c]/2);break}}return u}function Ra(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,o=n.boundary,u=o===void 0?n6:o,l=n.rootBoundary,c=l===void 0?G1:l,d=n.elementContext,p=d===void 0?$i:d,f=n.altBoundary,b=f===void 0?!1:f,v=n.padding,E=v===void 0?0:v,y=J1(typeof E!="number"?E:ep(E,$a)),w=p===$i?r6:$i,x=e.rects.popper,I=e.elements[b?w:p],M=_6(Zr(I)?I:I.contextElement||Mr(e.elements.popper),u,c,s),C=Ai(e.elements.reference),H=np({reference:C,element:x,placement:i}),z=Yu(Object.assign({},x,H)),V=p===$i?z:C,P={top:M.top-V.top+y.top,bottom:V.bottom-M.bottom+y.bottom,left:M.left-V.left+y.left,right:V.right-M.right+y.right},$=e.modifiersData.offset;if(p===$i&&$){var W=$[i];Object.keys(P).forEach(function(G){var q=[Cn,An].indexOf(G)>=0?1:-1,Y=[nn,An].indexOf(G)>=0?"y":"x";P[G]+=W[Y]*q})}return P}function B6(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,o=n.flipVariations,u=n.allowedAutoPlacements,l=u===void 0?X1:u,c=Ci(r),d=c?o?$c:$c.filter(function(b){return Ci(b)===c}):$a,p=d.filter(function(b){return l.indexOf(b)>=0});p.length===0&&(p=d);var f=p.reduce(function(b,v){return b[v]=Ra(e,{placement:v,boundary:i,rootBoundary:a,padding:s})[Un(v)],b},{});return Object.keys(f).sort(function(b,v){return f[b]-f[v]})}function F6(e){if(Un(e)===Jl)return[];var t=_s(e);return[Gc(e),t,Gc(t)]}function H6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!0:s,u=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,b=f===void 0?!0:f,v=n.allowedAutoPlacements,E=t.options.placement,y=Un(E),w=y===E,x=u||(w||!b?[_s(E)]:F6(E)),I=[E].concat(x).reduce(function(xe,Ie){return xe.concat(Un(Ie)===Jl?B6(t,{placement:Ie,boundary:c,rootBoundary:d,padding:l,flipVariations:b,allowedAutoPlacements:v}):Ie)},[]),M=t.rects.reference,C=t.rects.popper,H=new Map,z=!0,V=I[0],P=0;P=0,Y=q?"width":"height",Q=Ra(t,{placement:$,boundary:c,rootBoundary:d,altBoundary:p,padding:l}),ee=q?G?Cn:rn:G?An:nn;M[Y]>C[Y]&&(ee=_s(ee));var de=_s(ee),oe=[];if(a&&oe.push(Q[W]<=0),o&&oe.push(Q[ee]<=0,Q[de]<=0),oe.every(function(xe){return xe})){V=$,z=!1;break}H.set($,oe)}if(z)for(var R=b?3:1,Ce=function(Ie){var Be=I.find(function(je){var _e=H.get(je);if(_e)return _e.slice(0,Ie).every(function(qe){return qe})});if(Be)return V=Be,"break"},ve=R;ve>0;ve--){var B=Ce(ve);if(B==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const z6={name:"flip",enabled:!0,phase:"main",fn:H6,requiresIfExists:["offset"],data:{_skip:!1}};function Kc(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Qc(e){return[nn,Cn,An,rn].some(function(t){return e[t]>=0})}function U6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ra(t,{elementContext:"reference"}),o=Ra(t,{altBoundary:!0}),u=Kc(s,r),l=Kc(o,i,a),c=Qc(u),d=Qc(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const V6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:U6};function j6(e,t,n){var r=Un(e),i=[rn,nn].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[rn,Cn].indexOf(r)>=0?{x:o,y:s}:{x:s,y:o}}function q6(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,s=X1.reduce(function(c,d){return c[d]=j6(d,t.rects,a),c},{}),o=s[t.placement],u=o.x,l=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=s}const $6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:q6};function W6(e){var t=e.state,n=e.name;t.modifiersData[n]=np({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Y6={name:"popperOffsets",enabled:!0,phase:"read",fn:W6,data:{}};function G6(e){return e==="x"?"y":"x"}function X6(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!1:s,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=p===void 0?!0:p,b=n.tetherOffset,v=b===void 0?0:b,E=Ra(t,{boundary:u,rootBoundary:l,padding:d,altBoundary:c}),y=Un(t.placement),w=Ci(t.placement),x=!w,I=n0(y),M=G6(I),C=t.modifiersData.popperOffsets,H=t.rects.reference,z=t.rects.popper,V=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,P=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(C){if(a){var G,q=I==="y"?nn:rn,Y=I==="y"?An:Cn,Q=I==="y"?"height":"width",ee=C[I],de=ee+E[q],oe=ee-E[Y],R=f?-z[Q]/2:0,Ce=w===Si?H[Q]:z[Q],ve=w===Si?-z[Q]:-H[Q],B=t.elements.arrow,xe=f&&B?t0(B):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Z1(),Be=Ie[q],je=Ie[Y],_e=ua(0,H[Q],xe[Q]),qe=x?H[Q]/2-R-_e-Be-P.mainAxis:Ce-_e-Be-P.mainAxis,Te=x?-H[Q]/2+R+_e+je+P.mainAxis:ve+_e+je+P.mainAxis,De=t.elements.arrow&&Wa(t.elements.arrow),Ne=De?I==="y"?De.clientTop||0:De.clientLeft||0:0,Qe=(G=$?.[I])!=null?G:0,Re=ee+qe-Qe-Ne,$e=ee+Te-Qe,wt=ua(f?Gs(de,Re):de,ee,f?Yr(oe,$e):oe);C[I]=wt,W[I]=wt-ee}if(o){var ht,st=I==="x"?nn:rn,Nt=I==="x"?An:Cn,ot=C[M],it=M==="y"?"height":"width",Ht=ot+E[st],Kt=ot-E[Nt],bt=[nn,rn].indexOf(y)!==-1,on=(ht=$?.[M])!=null?ht:0,K=bt?Ht:ot-H[it]-z[it]-on+P.altAxis,ie=bt?ot+H[it]+z[it]-on-P.altAxis:Kt,me=f&&bt?v6(K,ot,ie):ua(f?K:Ht,ot,f?ie:Kt);C[M]=me,W[M]=me-ot}t.modifiersData[r]=W}}const K6={name:"preventOverflow",enabled:!0,phase:"main",fn:X6,requiresIfExists:["offset"]};function Q6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Z6(e){return e===pn(e)||!En(e)?r0(e):Q6(e)}function J6(e){var t=e.getBoundingClientRect(),n=wi(t.width)/e.offsetWidth||1,r=wi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function e5(e,t,n){n===void 0&&(n=!1);var r=En(t),i=En(t)&&J6(t),a=Mr(t),s=Ai(e,i,n),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(($n(t)!=="body"||a0(a))&&(o=Z6(t)),En(t)?(u=Ai(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=i0(a))),{x:s.left+o.scrollLeft-u.x,y:s.top+o.scrollTop-u.y,width:s.width,height:s.height}}function t5(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var u=t.get(o);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function n5(e){var t=t5(e);return f6.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function r5(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function i5(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Zc={placement:"bottom",modifiers:[],strategy:"absolute"};function Jc(){for(var e=arguments.length,t=new Array(e),n=0;n=19?e?.props?.ref||null:e?.ref||null}function u5(e){return typeof e=="function"?e():e}const ip=L.forwardRef(function(t,n){const{children:r,container:i,disablePortal:a=!1}=t,[s,o]=L.useState(null),u=Vt(L.isValidElement(r)?Di(r):null,n);if(ar(()=>{a||o(u5(i)||document.body)},[i,a]),ar(()=>{if(s&&!a)return jc(n,s),()=>{jc(n,null)}},[n,s,a]),a){if(L.isValidElement(r)){const l={ref:u};return L.cloneElement(r,l)}return r}return s&&kg.createPortal(r,s)});function l5(e){return gt("MuiPopper",e)}at("MuiPopper",["root"]);function c5(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Gu(e){return typeof e=="function"?e():e}function d5(e){return e.nodeType!==void 0}const h5=e=>{const{classes:t}=e;return Ye({root:["root"]},l5,t)},f5={},p5=L.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:a,disablePortal:s,modifiers:o,open:u,placement:l,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:b,ownerState:v,...E}=t,y=L.useRef(null),w=Vt(y,n),x=L.useRef(null),I=Vt(x,d),M=L.useRef(I);ar(()=>{M.current=I},[I]),L.useImperativeHandle(d,()=>x.current,[]);const C=c5(l,a),[H,z]=L.useState(C),[V,P]=L.useState(Gu(r));L.useEffect(()=>{x.current&&x.current.forceUpdate()}),L.useEffect(()=>{r&&P(Gu(r))},[r]),ar(()=>{if(!V||!u)return;const Y=de=>{z(de.placement)};let Q=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:de})=>{Y(de)}}];o!=null&&(Q=Q.concat(o)),c&&c.modifiers!=null&&(Q=Q.concat(c.modifiers));const ee=o5(V,y.current,{placement:C,...c,modifiers:Q});return M.current(ee),()=>{ee.destroy(),M.current(null)}},[V,s,o,u,c,C]);const $={placement:H};b!==null&&($.TransitionProps=b);const W=h5(t),G=f.root??"div",q=rp({elementType:G,externalSlotProps:p.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:W.root});return k.jsx(G,{...q,children:typeof i=="function"?i($):i})}),m5=L.forwardRef(function(t,n){const{anchorEl:r,children:i,container:a,direction:s="ltr",disablePortal:o=!1,keepMounted:u=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:p=f5,popperRef:f,style:b,transition:v=!1,slotProps:E={},slots:y={},...w}=t,[x,I]=L.useState(!0),M=()=>{I(!1)},C=()=>{I(!0)};if(!u&&!c&&(!v||x))return null;let H;if(a)H=a;else if(r){const P=Gu(r);H=P&&d5(P)?fn(P).body:fn(null).body}const z=!c&&u&&(!v||x)?"none":void 0,V=v?{in:c,onEnter:M,onExited:C}:void 0;return k.jsx(ip,{disablePortal:o,container:H,children:k.jsx(p5,{anchorEl:r,direction:s,disablePortal:o,modifiers:l,ref:n,open:v?!x:c,placement:d,popperOptions:p,popperRef:f,slotProps:E,slots:y,...w,style:{position:"fixed",top:0,left:0,display:z,...b},TransitionProps:V,children:i})})}),g5=ue(m5,{name:"MuiPopper",slot:"Root"})({}),ap=L.forwardRef(function(t,n){const r=Gl(),i=Xe({props:t,name:"MuiPopper"}),{anchorEl:a,component:s,components:o,componentsProps:u,container:l,disablePortal:c,keepMounted:d,modifiers:p,open:f,placement:b,popperOptions:v,popperRef:E,transition:y,slots:w,slotProps:x,...I}=i,M=w?.root??o?.Root,C={anchorEl:a,container:l,disablePortal:c,keepMounted:d,modifiers:p,open:f,placement:b,popperOptions:v,popperRef:E,transition:y,...I};return k.jsx(g5,{as:s,direction:r?"rtl":"ltr",slots:{root:M},slotProps:x??u,...C,ref:n})});function hs(e){return parseInt(e,10)||0}const b5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function y5(e){for(const t in e)return!1;return!0}function ed(e){return y5(e)||e.outerHeightStyle===0&&!e.overflowing}const v5=L.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:a=1,style:s,value:o,...u}=t,{current:l}=L.useRef(o!=null),c=L.useRef(null),d=Vt(n,c),p=L.useRef(null),f=L.useRef(null),b=L.useCallback(()=>{const x=c.current,I=f.current;if(!x||!I)return;const C=sr(x).getComputedStyle(x);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};I.style.width=C.width,I.value=x.value||t.placeholder||"x",I.value.slice(-1)===` `&&(I.value+=" ");const H=C.boxSizing,z=hs(C.paddingBottom)+hs(C.paddingTop),V=hs(C.borderBottomWidth)+hs(C.borderTopWidth),P=I.scrollHeight;I.value="x";const $=I.scrollHeight;let W=P;a&&(W=Math.max(Number(a)*$,W)),i&&(W=Math.min(Number(i)*$,W)),W=Math.max(W,$);const G=W+(H==="border-box"?z+V:0),q=Math.abs(W-P)<=1;return{outerHeightStyle:G,overflowing:q}},[i,a,t.placeholder]),v=Aa(()=>{const x=c.current,I=b();if(!x||!I||ed(I))return!1;const M=I.outerHeightStyle;return p.current!=null&&p.current!==M}),E=L.useCallback(()=>{const x=c.current,I=b();if(!x||!I||ed(I))return;const M=I.outerHeightStyle;p.current!==M&&(p.current=M,x.style.height=`${M}px`),x.style.overflow=I.overflowing?"hidden":""},[b]),y=L.useRef(-1);ar(()=>{const x=W1(E),I=c?.current;if(!I)return;const M=sr(I);M.addEventListener("resize",x);let C;return typeof ResizeObserver<"u"&&(C=new ResizeObserver(()=>{v()&&(C.unobserve(I),cancelAnimationFrame(y.current),E(),y.current=requestAnimationFrame(()=>{C.observe(I)}))}),C.observe(I)),()=>{x.clear(),cancelAnimationFrame(y.current),M.removeEventListener("resize",x),C&&C.disconnect()}},[b,E,v]),ar(()=>{E()});const w=x=>{l||E();const I=x.target,M=I.value.length,C=I.value.endsWith(` `),H=I.selectionStart===M;C&&H&&I.setSelectionRange(M,M),r&&r(x)};return k.jsxs(L.Fragment,{children:[k.jsx("textarea",{value:o,onChange:w,ref:d,rows:a,style:s,...u}),k.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:{...b5.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function s0({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const sp=L.createContext(void 0);function o0(){return L.useContext(sp)}function td(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function op(e,t=!1){return e&&(td(e.value)&&e.value!==""||t&&td(e.defaultValue)&&e.defaultValue!=="")}function DL(e){return e.startAdornment}var nd;const bo=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${St(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},yo=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},T5=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:s,formControl:o,fullWidth:u,hiddenLabel:l,multiline:c,readOnly:d,size:p,startAdornment:f,type:b}=e,v={root:["root",`color${St(n)}`,r&&"disabled",i&&"error",u&&"fullWidth",s&&"focused",o&&"formControl",p&&p!=="medium"&&`size${St(p)}`,c&&"multiline",f&&"adornedStart",a&&"adornedEnd",l&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",c&&"inputMultiline",p==="small"&&"inputSizeSmall",l&&"inputHiddenLabel",f&&"inputAdornedStart",a&&"inputAdornedEnd",d&&"readOnly"]};return Ye(v,Ng,t)},vo=ue("div",{name:"MuiInputBase",slot:"Root",overridesResolver:bo})(ct(({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",[`&.${ka.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:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),To=ue("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(ct(({theme:e})=>{const t=e.palette.mode==="light",n={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"},i=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":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ka.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${ka.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"}}]}})),rd=Ig({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),xo=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:o,color:u,components:l={},componentsProps:c={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:b,error:v,fullWidth:E=!1,id:y,inputComponent:w="input",inputProps:x={},inputRef:I,margin:M,maxRows:C,minRows:H,multiline:z=!1,name:V,onBlur:P,onChange:$,onClick:W,onFocus:G,onKeyDown:q,onKeyUp:Y,placeholder:Q,readOnly:ee,renderSuffix:de,rows:oe,size:R,slotProps:Ce={},slots:ve={},startAdornment:B,type:xe="text",value:Ie,...Be}=r,je=x.value!=null?x.value:Ie,{current:_e}=L.useRef(je!=null),qe=L.useRef(),Te=L.useCallback(Se=>{},[]),De=Vt(qe,I,x.ref,Te),[Ne,Qe]=L.useState(!1),Re=o0(),$e=s0({props:r,muiFormControl:Re,states:["color","disabled","error","hiddenLabel","size","required","filled"]});$e.focused=Re?Re.focused:Ne,L.useEffect(()=>{!Re&&p&&Ne&&(Qe(!1),P&&P())},[Re,p,Ne,P]);const wt=Re&&Re.onFilled,ht=Re&&Re.onEmpty,st=L.useCallback(Se=>{op(Se)?wt&&wt():ht&&ht()},[wt,ht]);ar(()=>{_e&&st({value:je})},[je,st,_e]);const Nt=Se=>{G&&G(Se),x.onFocus&&x.onFocus(Se),Re&&Re.onFocus?Re.onFocus(Se):Qe(!0)},ot=Se=>{P&&P(Se),x.onBlur&&x.onBlur(Se),Re&&Re.onBlur?Re.onBlur(Se):Qe(!1)},it=(Se,...Rt)=>{if(!_e){const yt=Se.target||qe.current;if(yt==null)throw new Error(z1(1));st({value:yt.value})}x.onChange&&x.onChange(Se,...Rt),$&&$(Se,...Rt)};L.useEffect(()=>{st(qe.current)},[]);const Ht=Se=>{qe.current&&Se.currentTarget===Se.target&&qe.current.focus(),W&&W(Se)};let Kt=w,bt=x;z&&Kt==="input"&&(oe?bt={type:void 0,minRows:oe,maxRows:oe,...bt}:bt={type:void 0,maxRows:C,minRows:H,...bt},Kt=v5);const on=Se=>{st(Se.animationName==="mui-auto-fill-cancel"?qe.current:{value:"x"})};L.useEffect(()=>{Re&&Re.setAdornedStart(!!B)},[Re,B]);const K={...r,color:$e.color||"primary",disabled:$e.disabled,endAdornment:b,error:$e.error,focused:$e.focused,formControl:Re,fullWidth:E,hiddenLabel:$e.hiddenLabel,multiline:z,size:$e.size,startAdornment:B,type:xe},ie=T5(K),me=ve.root||l.Root||vo,Ee=Ce.root||c.root||{},Pe=ve.input||l.Input||To;return bt={...bt,...Ce.input??c.input},k.jsxs(L.Fragment,{children:[!f&&typeof rd=="function"&&(nd||(nd=k.jsx(rd,{}))),k.jsxs(me,{...Ee,ref:n,onClick:Ht,...Be,...!Ca(me)&&{ownerState:{...K,...Ee.ownerState}},className:Ve(ie.root,Ee.className,o,ee&&"MuiInputBase-readOnly"),children:[B,k.jsx(sp.Provider,{value:null,children:k.jsx(Pe,{"aria-invalid":$e.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:$e.disabled,id:y,onAnimationStart:on,name:V,placeholder:Q,readOnly:ee,required:$e.required,rows:oe,value:je,onKeyDown:q,onKeyUp:Y,type:xe,...bt,...!Ca(Pe)&&{as:Kt,ownerState:{...K,...bt.ownerState}},ref:De,className:Ve(ie.input,bt.className,ee&&"MuiInputBase-readOnly"),onBlur:ot,onChange:it,onFocus:Nt})}),b,de?de({...$e,startAdornment:B}):null]})]})});function x5(e){return gt("MuiInput",e)}const Wi={...ka,...at("MuiInput",["root","underline","input"])};function E5(e){return gt("MuiFilledInput",e)}const Or={...ka,...at("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},S5=Rg(k.jsx("path",{d:"M7 10l5 5 5-5z"})),w5={entering:{opacity:1},entered:{opacity:1}},Xu=L.forwardRef(function(t,n){const r=ja(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:o,easing:u,in:l,onEnter:c,onEntered:d,onEntering:p,onExit:f,onExited:b,onExiting:v,style:E,timeout:y=i,TransitionComponent:w=Yn,...x}=t,I=L.useRef(null),M=Vt(I,Di(o),n),C=q=>Y=>{if(q){const Q=I.current;Y===void 0?q(Q):q(Q,Y)}},H=C(p),z=C((q,Y)=>{Y1(q);const Q=Ys({style:E,timeout:y,easing:u},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",Q),q.style.transition=r.transitions.create("opacity",Q),c&&c(q,Y)}),V=C(d),P=C(v),$=C(q=>{const Y=Ys({style:E,timeout:y,easing:u},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",Y),q.style.transition=r.transitions.create("opacity",Y),f&&f(q)}),W=C(b),G=q=>{a&&a(I.current,q)};return k.jsx(w,{appear:s,in:l,nodeRef:I,onEnter:z,onEntered:V,onEntering:H,onExit:$,onExited:W,onExiting:P,addEndListener:G,timeout:y,...x,children:(q,{ownerState:Y,...Q})=>L.cloneElement(o,{style:{opacity:0,visibility:q==="exited"&&!l?"hidden":void 0,...w5[q],...E,...o.props.style},ref:M,...Q})})});function A5(e){return gt("MuiBackdrop",e)}at("MuiBackdrop",["root","invisible"]);const C5=e=>{const{classes:t,invisible:n}=e;return Ye({root:["root",n&&"invisible"]},A5,t)},k5=ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),up=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiBackdrop"}),{children:i,className:a,component:s="div",invisible:o=!1,open:u,components:l={},componentsProps:c={},slotProps:d={},slots:p={},TransitionComponent:f,transitionDuration:b,...v}=r,E={...r,component:s,invisible:o},y=C5(E),w={transition:f,root:l.Root,...p},x={...c,...d},I={component:s,slots:w,slotProps:x},[M,C]=Et("root",{elementType:k5,externalForwardedProps:I,className:Ve(y.root,a),ownerState:E}),[H,z]=Et("transition",{elementType:Xu,externalForwardedProps:I,ownerState:E});return k.jsx(H,{in:u,timeout:b,...v,...z,children:k.jsx(M,{"aria-hidden":!0,...C,classes:y,ref:n,children:i})})}),I5=at("MuiBox",["root"]),N5=Pg(),Ar=Xg({themeId:Dg,defaultTheme:N5,defaultClassName:I5.root,generateClassName:Mg.generate});function lp(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function R5(e){const t=fn(e);return t.body===e?sr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ca(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function id(e){return parseInt(sr(e).getComputedStyle(e).paddingRight,10)||0}function M5(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function ad(e,t,n,r,i){const a=[t,n,...r];[].forEach.call(e.children,s=>{const o=!a.includes(s),u=!M5(s);o&&u&&ca(s,i)})}function jo(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function D5(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(R5(r)){const s=lp(sr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${id(r)+s}px`;const o=fn(r).querySelectorAll(".mui-fixed");[].forEach.call(o,u=>{n.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${id(u)+s}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=fn(r).body;else{const s=r.parentElement,o=sr(r);a=s?.nodeName==="HTML"&&o.getComputedStyle(s).overflowY==="scroll"?s:r}n.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()=>{n.forEach(({value:a,el:s,property:o})=>{a?s.style.setProperty(o,a):s.style.removeProperty(o)})}}function P5(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class L5{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ca(t.modalRef,!1);const i=P5(n);ad(n,t.mount,t.modalRef,i,!0);const a=jo(this.containers,s=>s.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=jo(this.containers,a=>a.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=D5(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=jo(this.containers,s=>s.modals.includes(t)),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ca(t.modalRef,n),ad(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&ca(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const O5=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function _5(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function B5(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function F5(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||B5(e))}function H5(e){const t=[],n=[];return Array.from(e.querySelectorAll(O5)).forEach((r,i)=>{const a=_5(r);a===-1||!F5(r)||(a===0?t.push(r):n.push({documentOrder:i,tabIndex:a,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function z5(){return!0}function U5(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=H5,isEnabled:s=z5,open:o}=e,u=L.useRef(!1),l=L.useRef(null),c=L.useRef(null),d=L.useRef(null),p=L.useRef(null),f=L.useRef(!1),b=L.useRef(null),v=Vt(Di(t),b),E=L.useRef(null);L.useEffect(()=>{!o||!b.current||(f.current=!n)},[n,o]),L.useEffect(()=>{if(!o||!b.current)return;const x=fn(b.current);return b.current.contains(x.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),f.current&&b.current.focus()),()=>{i||(d.current&&d.current.focus&&(u.current=!0,d.current.focus()),d.current=null)}},[o]),L.useEffect(()=>{if(!o||!b.current)return;const x=fn(b.current),I=H=>{E.current=H,!(r||!s()||H.key!=="Tab")&&x.activeElement===b.current&&H.shiftKey&&(u.current=!0,c.current&&c.current.focus())},M=()=>{const H=b.current;if(H===null)return;if(!x.hasFocus()||!s()||u.current){u.current=!1;return}if(H.contains(x.activeElement)||r&&x.activeElement!==l.current&&x.activeElement!==c.current)return;if(x.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!f.current)return;let z=[];if((x.activeElement===l.current||x.activeElement===c.current)&&(z=a(b.current)),z.length>0){const V=!!(E.current?.shiftKey&&E.current?.key==="Tab"),P=z[0],$=z[z.length-1];typeof P!="string"&&typeof $!="string"&&(V?$.focus():P.focus())}else H.focus()};x.addEventListener("focusin",M),x.addEventListener("keydown",I,!0);const C=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&M()},50);return()=>{clearInterval(C),x.removeEventListener("focusin",M),x.removeEventListener("keydown",I,!0)}},[n,r,i,s,o,a]);const y=x=>{d.current===null&&(d.current=x.relatedTarget),f.current=!0,p.current=x.target;const I=t.props.onFocus;I&&I(x)},w=x=>{d.current===null&&(d.current=x.relatedTarget),f.current=!0};return k.jsxs(L.Fragment,{children:[k.jsx("div",{tabIndex:o?0:-1,onFocus:w,ref:l,"data-testid":"sentinelStart"}),L.cloneElement(t,{ref:v,onFocus:y}),k.jsx("div",{tabIndex:o?0:-1,onFocus:w,ref:c,"data-testid":"sentinelEnd"})]})}function V5(e){return typeof e=="function"?e():e}function j5(e){return e?e.props.hasOwnProperty("in"):!1}const sd=()=>{},fs=new L5;function q5(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:o,onClose:u,open:l,rootRef:c}=e,d=L.useRef({}),p=L.useRef(null),f=L.useRef(null),b=Vt(f,c),[v,E]=L.useState(!l),y=j5(o);let w=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(w=!1);const x=()=>fn(p.current),I=()=>(d.current.modalRef=f.current,d.current.mount=p.current,d.current),M=()=>{fs.mount(I(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},C=Aa(()=>{const Y=V5(t)||x().body;fs.add(I(),Y),f.current&&M()}),H=()=>fs.isTopModal(I()),z=Aa(Y=>{p.current=Y,Y&&(l&&H()?M():f.current&&ca(f.current,w))}),V=L.useCallback(()=>{fs.remove(I(),w)},[w]);L.useEffect(()=>()=>{V()},[V]),L.useEffect(()=>{l?C():(!y||!i)&&V()},[l,V,y,i,C]);const P=Y=>Q=>{Y.onKeyDown?.(Q),!(Q.key!=="Escape"||Q.which===229||!H())&&(n||(Q.stopPropagation(),u&&u(Q,"escapeKeyDown")))},$=Y=>Q=>{Y.onClick?.(Q),Q.target===Q.currentTarget&&u&&u(Q,"backdropClick")};return{getRootProps:(Y={})=>{const Q=Lg(e);delete Q.onTransitionEnter,delete Q.onTransitionExited;const ee={...Q,...Y};return{role:"presentation",...ee,onKeyDown:P(ee),ref:b}},getBackdropProps:(Y={})=>{const Q=Y;return{"aria-hidden":!0,...Q,onClick:$(Q),open:l}},getTransitionProps:()=>{const Y=()=>{E(!1),a&&a()},Q=()=>{E(!0),s&&s(),i&&V()};return{onEnter:Vc(Y,o?.props.onEnter??sd),onExited:Vc(Q,o?.props.onExited??sd)}},rootRef:b,portalRef:z,isTopModal:H,exited:v,hasTransition:y}}function $5(e){return gt("MuiModal",e)}at("MuiModal",["root","hidden","backdrop"]);const W5=e=>{const{open:t,exited:n,classes:r}=e;return Ye({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},$5,r)},Y5=ue("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ct(({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"}}]}))),G5=ue(up,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),cp=L.forwardRef(function(t,n){const r=Xe({name:"MuiModal",props:t}),{BackdropComponent:i=G5,BackdropProps:a,classes:s,className:o,closeAfterTransition:u=!1,children:l,container:c,component:d,components:p={},componentsProps:f={},disableAutoFocus:b=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:E=!1,disablePortal:y=!1,disableRestoreFocus:w=!1,disableScrollLock:x=!1,hideBackdrop:I=!1,keepMounted:M=!1,onClose:C,onTransitionEnter:H,onTransitionExited:z,open:V,slotProps:P={},slots:$={},theme:W,...G}=r,q={...r,closeAfterTransition:u,disableAutoFocus:b,disableEnforceFocus:v,disableEscapeKeyDown:E,disablePortal:y,disableRestoreFocus:w,disableScrollLock:x,hideBackdrop:I,keepMounted:M},{getRootProps:Y,getBackdropProps:Q,getTransitionProps:ee,portalRef:de,isTopModal:oe,exited:R,hasTransition:Ce}=q5({...q,rootRef:n}),ve={...q,exited:R},B=W5(ve),xe={};if(l.props.tabIndex===void 0&&(xe.tabIndex="-1"),Ce){const{onEnter:Te,onExited:De}=ee();xe.onEnter=Te,xe.onExited=De}const Ie={slots:{root:p.Root,backdrop:p.Backdrop,...$},slotProps:{...f,...P}},[Be,je]=Et("root",{ref:n,elementType:Y5,externalForwardedProps:{...Ie,...G,component:d},getSlotProps:Y,ownerState:ve,className:Ve(o,B?.root,!ve.open&&ve.exited&&B?.hidden)}),[_e,qe]=Et("backdrop",{ref:a?.ref,elementType:i,externalForwardedProps:Ie,shouldForwardComponentProp:!0,additionalProps:a,getSlotProps:Te=>Q({...Te,onClick:De=>{Te?.onClick&&Te.onClick(De)}}),className:Ve(a?.className,B?.backdrop),ownerState:ve});return!M&&!V&&(!Ce||R)?null:k.jsx(ip,{ref:de,container:c,disablePortal:y,children:k.jsxs(Be,{...je,children:[!I&&i?k.jsx(_e,{...qe}):null,k.jsx(U5,{disableEnforceFocus:v,disableAutoFocus:b,disableRestoreFocus:w,isEnabled:oe,open:V,children:L.cloneElement(l,xe)})]})})});function X5(e){return gt("MuiDialog",e)}const qo=at("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dp=L.createContext({}),K5=ue(up,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Q5=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e,s={root:["root"],container:["container",`scroll${St(n)}`],paper:["paper",`paperScroll${St(n)}`,`paperWidth${St(String(r))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return Ye(s,X5,t)},Z5=ue(cp,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),J5=ue("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${St(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),eb=ue(mo,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${St(n.scroll)}`],t[`paperWidth${St(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(ct(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${qo.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${qo.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${qo.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),tb=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialog"}),i=ja(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":o,"aria-modal":u=!0,BackdropComponent:l,BackdropProps:c,children:d,className:p,disableEscapeKeyDown:f=!1,fullScreen:b=!1,fullWidth:v=!1,maxWidth:E="sm",onClick:y,onClose:w,open:x,PaperComponent:I=mo,PaperProps:M={},scroll:C="paper",slots:H={},slotProps:z={},TransitionComponent:V=Xu,transitionDuration:P=a,TransitionProps:$,...W}=r,G={...r,disableEscapeKeyDown:f,fullScreen:b,fullWidth:v,maxWidth:E,scroll:C},q=Q5(G),Y=L.useRef(),Q=Qe=>{Y.current=Qe.target===Qe.currentTarget},ee=Qe=>{y&&y(Qe),Y.current&&(Y.current=null,w&&w(Qe,"backdropClick"))},de=Xl(o),oe=L.useMemo(()=>({titleId:de}),[de]),R={transition:V,...H},Ce={transition:$,paper:M,backdrop:c,...z},ve={slots:R,slotProps:Ce},[B,xe]=Et("root",{elementType:Z5,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:G,className:Ve(q.root,p),ref:n}),[Ie,Be]=Et("backdrop",{elementType:K5,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:G}),[je,_e]=Et("paper",{elementType:eb,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:G,className:Ve(q.paper,M.className)}),[qe,Te]=Et("container",{elementType:J5,externalForwardedProps:ve,ownerState:G,className:q.container}),[De,Ne]=Et("transition",{elementType:Xu,externalForwardedProps:ve,ownerState:G,additionalProps:{appear:!0,in:x,timeout:P,role:"presentation"}});return k.jsx(B,{closeAfterTransition:!0,slots:{backdrop:Ie},slotProps:{backdrop:{transitionDuration:P,as:l,...Be}},disableEscapeKeyDown:f,onClose:w,open:x,onClick:ee,...xe,...W,children:k.jsx(De,{...Ne,children:k.jsx(qe,{onMouseDown:Q,...Te,children:k.jsx(je,{as:I,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":de,"aria-modal":u,..._e,children:k.jsx(dp.Provider,{value:oe,children:d})})})})})});function nb(e){return gt("MuiDialogActions",e)}at("MuiDialogActions",["root","spacing"]);const rb=e=>{const{classes:t,disableSpacing:n}=e;return Ye({root:["root",!n&&"spacing"]},nb,t)},ib=ue("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ab=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:a=!1,...s}=r,o={...r,disableSpacing:a},u=rb(o);return k.jsx(ib,{className:Ve(u.root,i),ownerState:o,ref:n,...s})}),sb=e=>{const{classes:t,dividers:n}=e;return Ye({root:["root",n&&"dividers"]},Og,t)},ob=ue("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(ct(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${_g.root} + &`]:{paddingTop:0}}}]}))),ub=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContent"}),{className:i,dividers:a=!1,...s}=r,o={...r,dividers:a},u=sb(o);return k.jsx(ob,{className:Ve(u.root,i),ownerState:o,ref:n,...s})});function lb(e){return gt("MuiDialogContentText",e)}at("MuiDialogContentText",["root"]);const cb=e=>{const{classes:t}=e,r=Ye({root:["root"]},lb,t);return{...t,...r}},db=ue(Ke,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),hb=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContentText"}),{children:i,className:a,...s}=r,o=cb(s);return k.jsx(db,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:s,className:Ve(o.root,a),...r,classes:o})}),fb=e=>{const{classes:t}=e;return Ye({root:["root"]},Bg,t)},pb=ue(Ke,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),mb=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogTitle"}),{className:i,id:a,...s}=r,o=r,u=fb(o),{titleId:l=a}=L.useContext(dp);return k.jsx(pb,{component:"h2",className:Ve(u.root,i),ownerState:o,ref:n,variant:"h6",id:a??l,...s})}),gb=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:a,orientation:s,textAlign:o,variant:u}=e;return Ye({root:["root",t&&"absolute",u,a&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",o==="right"&&s!=="vertical"&&"textAlignRight",o==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Fg,r)},bb=ue("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(ct(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),yb=ue("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(ct(({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)`}}]}))),Ku=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDivider"}),{absolute:i=!1,children:a,className:s,orientation:o="horizontal",component:u=a||o==="vertical"?"div":"hr",flexItem:l=!1,light:c=!1,role:d=u!=="hr"?"separator":void 0,textAlign:p="center",variant:f="fullWidth",...b}=r,v={...r,absolute:i,component:u,flexItem:l,light:c,orientation:o,role:d,textAlign:p,variant:f},E=gb(v);return k.jsx(bb,{as:u,className:Ve(E.root,s),role:d,ref:n,ownerState:v,"aria-orientation":d==="separator"&&(u!=="hr"||o==="vertical")?o:void 0,...b,children:a?k.jsx(yb,{className:E.wrapper,ownerState:v,children:a}):null})});Ku&&(Ku.muiSkipListHighlight=!0);const vb=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:s,multiline:o}=e,u={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",a==="small"&&`size${St(a)}`,s&&"hiddenLabel",o&&"multiline"],input:["input"]},l=Ye(u,E5,t);return{...t,...l}},Tb=ue(vo,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bo(e,t),!n.disableUnderline&&t.underline]}})(ct(({theme:e})=>{const t=e.palette.mode==="light",n=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)",i=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:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Or.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Or.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:s})=>!s.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"},[`&.${Or.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Or.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):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Or.disabled}, .${Or.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Or.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Ql()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:o})=>s.multiline&&o==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),xb=ue(To,{name:"MuiFilledInput",slot:"Input",overridesResolver:yo})(ct(({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}}]}))),hp=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:a={},componentsProps:s,fullWidth:o=!1,hiddenLabel:u,inputComponent:l="input",multiline:c=!1,slotProps:d,slots:p={},type:f="text",...b}=r,v={...r,disableUnderline:i,fullWidth:o,inputComponent:l,multiline:c,type:f},E=vb(r),y={root:{ownerState:v},input:{ownerState:v}},w=d??s?Kl(y,d??s):y,x=p.root??a.Root??Tb,I=p.input??a.Input??xb;return k.jsx(xo,{slots:{root:x,input:I},slotProps:w,fullWidth:o,inputComponent:l,multiline:c,ref:n,type:f,...b,classes:E})});hp.muiName="Input";function Qu(e){return`scale(${e}, ${e**2})`}const Eb={entering:{opacity:1,transform:Qu(1)},entered:{opacity:1,transform:"none"}},$o=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Xs=L.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:a,easing:s,in:o,onEnter:u,onEntered:l,onEntering:c,onExit:d,onExited:p,onExiting:f,style:b,timeout:v="auto",TransitionComponent:E=Yn,...y}=t,w=ra(),x=L.useRef(),I=ja(),M=L.useRef(null),C=Vt(M,Di(a),n),H=Y=>Q=>{if(Y){const ee=M.current;Q===void 0?Y(ee):Y(ee,Q)}},z=H(c),V=H((Y,Q)=>{Y1(Y);const{duration:ee,delay:de,easing:oe}=Ys({style:b,timeout:v,easing:s},{mode:"enter"});let R;v==="auto"?(R=I.transitions.getAutoHeightDuration(Y.clientHeight),x.current=R):R=ee,Y.style.transition=[I.transitions.create("opacity",{duration:R,delay:de}),I.transitions.create("transform",{duration:$o?R:R*.666,delay:de,easing:oe})].join(","),u&&u(Y,Q)}),P=H(l),$=H(f),W=H(Y=>{const{duration:Q,delay:ee,easing:de}=Ys({style:b,timeout:v,easing:s},{mode:"exit"});let oe;v==="auto"?(oe=I.transitions.getAutoHeightDuration(Y.clientHeight),x.current=oe):oe=Q,Y.style.transition=[I.transitions.create("opacity",{duration:oe,delay:ee}),I.transitions.create("transform",{duration:$o?oe:oe*.666,delay:$o?ee:ee||oe*.333,easing:de})].join(","),Y.style.opacity=0,Y.style.transform=Qu(.75),d&&d(Y)}),G=H(p),q=Y=>{v==="auto"&&w.start(x.current||0,Y),r&&r(M.current,Y)};return k.jsx(E,{appear:i,in:o,nodeRef:M,onEnter:V,onEntered:P,onEntering:z,onExit:W,onExited:G,onExiting:$,addEndListener:q,timeout:v==="auto"?null:v,...y,children:(Y,{ownerState:Q,...ee})=>L.cloneElement(a,{style:{opacity:0,transform:Qu(.75),visibility:Y==="exited"&&!o?"hidden":void 0,...Eb[Y],...b,...a.props.style},ref:C,...ee})})});Xs&&(Xs.muiSupportAuto=!0);const Sb=e=>{const{classes:t,disableUnderline:n}=e,i=Ye({root:["root",!n&&"underline"],input:["input"]},x5,t);return{...t,...i}},wb=ue(vo,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...bo(e,t),!n.disableUnderline&&t.underline]}})(ct(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{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"},[`&.${Wi.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Wi.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Wi.disabled}, .${Wi.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Wi.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Ql()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),Ab=ue(To,{name:"MuiInput",slot:"Input",overridesResolver:yo})({}),fp=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:a={},componentsProps:s,fullWidth:o=!1,inputComponent:u="input",multiline:l=!1,slotProps:c,slots:d={},type:p="text",...f}=r,b=Sb(r),E={root:{ownerState:{disableUnderline:i}}},y=c??s?Kl(c??s,E):E,w=d.root??a.Root??wb,x=d.input??a.Input??Ab;return k.jsx(xo,{slots:{root:w,input:x},slotProps:y,fullWidth:o,inputComponent:u,multiline:l,ref:n,type:p,...f,classes:b})});fp.muiName="Input";const nr=L.createContext({});function Cb(e){return gt("MuiList",e)}at("MuiList",["root","padding","dense","subheader"]);const kb=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ye({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Cb,t)},Ib=ue("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),pp=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiList"}),{children:i,className:a,component:s="ul",dense:o=!1,disablePadding:u=!1,subheader:l,...c}=r,d=L.useMemo(()=>({dense:o}),[o]),p={...r,component:s,dense:o,disablePadding:u},f=kb(p);return k.jsx(nr.Provider,{value:d,children:k.jsxs(Ib,{as:s,className:Ve(f.root,a),ref:n,ownerState:p,...c,children:[l,i]})})});function Nb(e){return gt("MuiListItem",e)}at("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const Rb=at("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Mb(e){return gt("MuiListItemSecondaryAction",e)}at("MuiListItemSecondaryAction",["root","disableGutters"]);const Db=e=>{const{disableGutters:t,classes:n}=e;return Ye({root:["root",t&&"disableGutters"]},Mb,n)},Pb=ue("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),mp=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItemSecondaryAction"}),{className:i,...a}=r,s=L.useContext(nr),o={...r,disableGutters:s.disableGutters},u=Db(o);return k.jsx(Pb,{className:Ve(u.root,i),ownerState:o,ref:n,...a})});mp.muiName="ListItemSecondaryAction";const Lb=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},Ob=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:s,hasSecondaryAction:o}=e;return Ye({root:["root",r&&"dense",!i&&"gutters",!a&&"padding",s&&"divider",t==="flex-start"&&"alignItemsFlexStart",o&&"secondaryAction"],container:["container"]},Nb,n)},_b=ue("div",{name:"MuiListItem",slot:"Root",overridesResolver:Lb})(ct(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${Rb.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Bb=ue("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Fb=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItem"}),{alignItems:i="center",children:a,className:s,component:o,components:u={},componentsProps:l={},ContainerComponent:c="li",ContainerProps:{className:d,...p}={},dense:f=!1,disableGutters:b=!1,disablePadding:v=!1,divider:E=!1,secondaryAction:y,slotProps:w={},slots:x={},...I}=r,M=L.useContext(nr),C=L.useMemo(()=>({dense:f||M.dense||!1,alignItems:i,disableGutters:b}),[i,M.dense,f,b]),H=L.useRef(null),z=L.Children.toArray(a),V=z.length&&Kg(z[z.length-1],["ListItemSecondaryAction"]),P={...r,alignItems:i,dense:C.dense,disableGutters:b,disablePadding:v,divider:E,hasSecondaryAction:V},$=Ob(P),W=Vt(H,n),G=x.root||u.Root||_b,q=w.root||l.root||{},Y={className:Ve($.root,q.className,s),...I};let Q=o||"li";return V?(Q=!Y.component&&!o?"div":Q,c==="li"&&(Q==="li"?Q="div":Y.component==="li"&&(Y.component="div")),k.jsx(nr.Provider,{value:C,children:k.jsxs(Bb,{as:c,className:Ve($.container,d),ref:W,ownerState:P,...p,children:[k.jsx(G,{...q,...!Ca(G)&&{as:Q,ownerState:{...P,...q.ownerState}},...Y,children:z}),z.pop()]})})):k.jsx(nr.Provider,{value:C,children:k.jsxs(G,{...q,as:Q,ref:W,...!Ca(G)&&{ownerState:{...P,...q.ownerState}},...Y,children:[z,y&&k.jsx(mp,{children:y})]})})}),Hb=e=>{const{alignItems:t,classes:n}=e;return Ye({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Hg,n)},zb=ue("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(ct(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ub=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItemIcon"}),{className:i,...a}=r,s=L.useContext(nr),o={...r,alignItems:s.alignItems},u=Hb(o);return k.jsx(zb,{className:Ve(u.root,i),ownerState:o,ref:n,...a})});function Vb(e){return gt("MuiListItemText",e)}const hi=at("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),jb=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return Ye({root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},Vb,t)},qb=ue("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${hi.primary}`]:t.primary},{[`& .${hi.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Oc.root}:where(& .${hi.primary})`]:{display:"block"},[`.${Oc.root}:where(& .${hi.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),$b=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItemText"}),{children:i,className:a,disableTypography:s=!1,inset:o=!1,primary:u,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:d,slots:p={},slotProps:f={},...b}=r,{dense:v}=L.useContext(nr);let E=u??i,y=c;const w={...r,disableTypography:s,inset:o,primary:!!E,secondary:!!y,dense:v},x=jb(w),I={slots:p,slotProps:{primary:l,secondary:d,...f}},[M,C]=Et("root",{className:Ve(x.root,a),elementType:qb,externalForwardedProps:{...I,...b},ownerState:w,ref:n}),[H,z]=Et("primary",{className:x.primary,elementType:Ke,externalForwardedProps:I,ownerState:w}),[V,P]=Et("secondary",{className:x.secondary,elementType:Ke,externalForwardedProps:I,ownerState:w});return E!=null&&E.type!==Ke&&!s&&(E=k.jsx(H,{variant:v?"body2":"body1",component:z?.variant?void 0:"span",...z,children:E})),y!=null&&y.type!==Ke&&!s&&(y=k.jsx(V,{variant:"body2",color:"textSecondary",...P,children:y})),k.jsxs(M,{...C,children:[E,y]})});function Wo(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function od(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function gp(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Yi(e,t,n,r,i,a){let s=!1,o=i(e,t,t?n:!1);for(;o;){if(o===e.firstChild){if(s)return!1;s=!0}const u=r?!1:o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||!gp(o,a)||u)o=i(e,o,n);else return o.focus(),!0}return!1}const Wb=L.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:a=!1,children:s,className:o,disabledItemsFocusable:u=!1,disableListWrap:l=!1,onKeyDown:c,variant:d="selectedMenu",...p}=t,f=L.useRef(null),b=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ar(()=>{i&&f.current.focus()},[i]),L.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,{direction:I})=>{const M=!f.current.style.width;if(x.clientHeight{const I=f.current,M=x.key;if(x.ctrlKey||x.metaKey||x.altKey){c&&c(x);return}const H=fn(I).activeElement;if(M==="ArrowDown")x.preventDefault(),Yi(I,H,l,u,Wo);else if(M==="ArrowUp")x.preventDefault(),Yi(I,H,l,u,od);else if(M==="Home")x.preventDefault(),Yi(I,null,l,u,Wo);else if(M==="End")x.preventDefault(),Yi(I,null,l,u,od);else if(M.length===1){const z=b.current,V=M.toLowerCase(),P=performance.now();z.keys.length>0&&(P-z.lastTime>500?(z.keys=[],z.repeating=!0,z.previousKeyMatched=!0):z.repeating&&V!==z.keys[0]&&(z.repeating=!1)),z.lastTime=P,z.keys.push(V);const $=H&&!z.repeating&&gp(H,z);z.previousKeyMatched&&($||Yi(I,H,!1,u,Wo,z))?x.preventDefault():z.previousKeyMatched=!1}c&&c(x)},E=Vt(f,n);let y=-1;L.Children.forEach(s,(x,I)=>{if(!L.isValidElement(x)){y===I&&(y+=1,y>=s.length&&(y=-1));return}x.props.disabled||(d==="selectedMenu"&&x.props.selected||y===-1)&&(y=I),y===I&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(y+=1,y>=s.length&&(y=-1))});const w=L.Children.map(s,(x,I)=>{if(I===y){const M={};return a&&(M.autoFocus=!0),x.props.tabIndex===void 0&&d==="selectedMenu"&&(M.tabIndex=0),L.cloneElement(x,M)}return x});return k.jsx(pp,{role:"menu",ref:E,className:o,onKeyDown:v,tabIndex:i?0:-1,...p,children:w})});function Yb(e){return gt("MuiPopover",e)}at("MuiPopover",["root","paper"]);function ud(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function ld(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function cd(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function ps(e){return typeof e=="function"?e():e}const Gb=e=>{const{classes:t}=e;return Ye({root:["root"],paper:["paper"]},Yb,t)},Xb=ue(cp,{name:"MuiPopover",slot:"Root"})({}),bp=ue(mo,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Kb=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiPopover"}),{action:i,anchorEl:a,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:o,anchorReference:u="anchorEl",children:l,className:c,container:d,elevation:p=8,marginThreshold:f=16,open:b,PaperProps:v={},slots:E={},slotProps:y={},transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:x,transitionDuration:I="auto",TransitionProps:M={},disableScrollLock:C=!1,...H}=r,z=L.useRef(),V={...r,anchorOrigin:s,anchorReference:u,elevation:p,marginThreshold:f,transformOrigin:w,TransitionComponent:x,transitionDuration:I,TransitionProps:M},P=Gb(V),$=L.useCallback(()=>{if(u==="anchorPosition")return o;const Te=ps(a),Ne=(Te&&Te.nodeType===1?Te:fn(z.current).body).getBoundingClientRect();return{top:Ne.top+ud(Ne,s.vertical),left:Ne.left+ld(Ne,s.horizontal)}},[a,s.horizontal,s.vertical,o,u]),W=L.useCallback(Te=>({vertical:ud(Te,w.vertical),horizontal:ld(Te,w.horizontal)}),[w.horizontal,w.vertical]),G=L.useCallback(Te=>{const De={width:Te.offsetWidth,height:Te.offsetHeight},Ne=W(De);if(u==="none")return{top:null,left:null,transformOrigin:cd(Ne)};const Qe=$();let Re=Qe.top-Ne.vertical,$e=Qe.left-Ne.horizontal;const wt=Re+De.height,ht=$e+De.width,st=sr(ps(a)),Nt=st.innerHeight-f,ot=st.innerWidth-f;if(f!==null&&ReNt){const it=wt-Nt;Re-=it,Ne.vertical+=it}if(f!==null&&$eot){const it=ht-ot;$e-=it,Ne.horizontal+=it}return{top:`${Math.round(Re)}px`,left:`${Math.round($e)}px`,transformOrigin:cd(Ne)}},[a,u,$,W,f]),[q,Y]=L.useState(b),Q=L.useCallback(()=>{const Te=z.current;if(!Te)return;const De=G(Te);De.top!==null&&Te.style.setProperty("top",De.top),De.left!==null&&(Te.style.left=De.left),Te.style.transformOrigin=De.transformOrigin,Y(!0)},[G]);L.useEffect(()=>(C&&window.addEventListener("scroll",Q),()=>window.removeEventListener("scroll",Q)),[a,C,Q]);const ee=()=>{Q()},de=()=>{Y(!1)};L.useEffect(()=>{b&&Q()}),L.useImperativeHandle(i,()=>b?{updatePosition:()=>{Q()}}:null,[b,Q]),L.useEffect(()=>{if(!b)return;const Te=W1(()=>{Q()}),De=sr(ps(a));return De.addEventListener("resize",Te),()=>{Te.clear(),De.removeEventListener("resize",Te)}},[a,b,Q]);let oe=I;const R={slots:{transition:x,...E},slotProps:{transition:M,paper:v,...y}},[Ce,ve]=Et("transition",{elementType:Xs,externalForwardedProps:R,ownerState:V,getSlotProps:Te=>({...Te,onEntering:(De,Ne)=>{Te.onEntering?.(De,Ne),ee()},onExited:De=>{Te.onExited?.(De),de()}}),additionalProps:{appear:!0,in:b}});I==="auto"&&!Ce.muiSupportAuto&&(oe=void 0);const B=d||(a?fn(ps(a)).body:void 0),[xe,{slots:Ie,slotProps:Be,...je}]=Et("root",{ref:n,elementType:Xb,externalForwardedProps:{...R,...H},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:E.backdrop},slotProps:{backdrop:e6(typeof y.backdrop=="function"?y.backdrop(V):y.backdrop,{invisible:!0})},container:B,open:b},ownerState:V,className:Ve(P.root,c)}),[_e,qe]=Et("paper",{ref:z,className:P.paper,elementType:bp,externalForwardedProps:R,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:q?void 0:{opacity:0}},ownerState:V});return k.jsx(xe,{...je,...!Ca(xe)&&{slots:Ie,slotProps:Be,disableScrollLock:C},children:k.jsx(Ce,{...ve,timeout:oe,children:k.jsx(_e,{...qe,children:l})})})});function Qb(e){return gt("MuiMenu",e)}at("MuiMenu",["root","paper","list"]);const Zb={vertical:"top",horizontal:"right"},Jb={vertical:"top",horizontal:"left"},e7=e=>{const{classes:t}=e;return Ye({root:["root"],paper:["paper"],list:["list"]},Qb,t)},t7=ue(Kb,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),n7=ue(bp,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),r7=ue(Wb,{name:"MuiMenu",slot:"List"})({outline:0}),i7=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:s,disableAutoFocusItem:o=!1,MenuListProps:u={},onClose:l,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:b,...v}={},variant:E="selectedMenu",slots:y={},slotProps:w={},...x}=r,I=Gl(),M={...r,autoFocus:i,disableAutoFocusItem:o,MenuListProps:u,onEntering:b,PaperProps:d,transitionDuration:f,TransitionProps:v,variant:E},C=e7(M),H=i&&!o&&c,z=L.useRef(null),V=(oe,R)=>{z.current&&z.current.adjustStyleForScrollbar(oe,{direction:I?"rtl":"ltr"}),b&&b(oe,R)},P=oe=>{oe.key==="Tab"&&(oe.preventDefault(),l&&l(oe,"tabKeyDown"))};let $=-1;L.Children.map(a,(oe,R)=>{L.isValidElement(oe)&&(oe.props.disabled||(E==="selectedMenu"&&oe.props.selected||$===-1)&&($=R))});const W={slots:y,slotProps:{list:u,transition:v,paper:d,...w}},G=rp({elementType:y.root,externalSlotProps:w.root,ownerState:M,className:[C.root,s]}),[q,Y]=Et("paper",{className:C.paper,elementType:n7,externalForwardedProps:W,shouldForwardComponentProp:!0,ownerState:M}),[Q,ee]=Et("list",{className:Ve(C.list,u.className),elementType:r7,shouldForwardComponentProp:!0,externalForwardedProps:W,getSlotProps:oe=>({...oe,onKeyDown:R=>{P(R),oe.onKeyDown?.(R)}}),ownerState:M}),de=typeof W.slotProps.transition=="function"?W.slotProps.transition(M):W.slotProps.transition;return k.jsx(t7,{onClose:l,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?Zb:Jb,slots:{root:y.root,paper:q,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:G,paper:Y,backdrop:typeof w.backdrop=="function"?w.backdrop(M):w.backdrop,transition:{...de,onEntering:(...oe)=>{V(...oe),de?.onEntering?.(...oe)}}},open:c,ref:n,transitionDuration:f,ownerState:M,...x,classes:p,children:k.jsx(Q,{actions:z,autoFocus:i&&($===-1||o),autoFocusItem:H,variant:E,...ee,children:a})})});function a7(e){return gt("MuiMenuItem",e)}const Gi=at("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),s7=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},o7=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:s}=e,u=Ye({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",a&&"selected"]},a7,s);return{...s,...u}},u7=ue(zg,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:s7})(ct(({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"}},[`&.${Gi.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Gi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Gi.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)}},[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Bc.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Bc.inset}`]:{marginLeft:52},[`& .${hi.root}`]:{marginTop:0,marginBottom:0},[`& .${hi.inset}`]:{paddingLeft:36},[`& .${_c.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,[`& .${_c.root} svg`]:{fontSize:"1.25rem"}}}]}))),l7=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:a="li",dense:s=!1,divider:o=!1,disableGutters:u=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:d,className:p,...f}=r,b=L.useContext(nr),v=L.useMemo(()=>({dense:s||b.dense||!1,disableGutters:u}),[b.dense,s,u]),E=L.useRef(null);ar(()=>{i&&E.current&&E.current.focus()},[i]);const y={...r,dense:v.dense,divider:o,disableGutters:u},w=o7(r),x=Vt(E,n);let I;return r.disabled||(I=d!==void 0?d:-1),k.jsx(nr.Provider,{value:v,children:k.jsx(u7,{ref:x,role:c,tabIndex:I,component:a,focusVisibleClassName:Ve(w.focusVisible,l),className:Ve(w.root,p),...f,ownerState:y,classes:w})})});function c7(e){return gt("MuiNativeSelect",e)}const u0=at("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),d7=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:a,error:s}=e,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${St(n)}`,a&&"iconOpen",r&&"disabled"]};return Ye(o,c7,t)},yp=ue("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${u0.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}}}]})),h7=ue(yp,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Wn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${u0.multiple}`]:t.multiple}]}})({}),vp=ue("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${u0.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}}]})),f7=ue(vp,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${St(n.variant)}`],n.open&&t.iconOpen]}})({}),p7=L.forwardRef(function(t,n){const{className:r,disabled:i,error:a,IconComponent:s,inputRef:o,variant:u="standard",...l}=t,c={...t,disabled:i,variant:u,error:a},d=d7(c);return k.jsxs(L.Fragment,{children:[k.jsx(h7,{ownerState:c,className:Ve(d.select,r),disabled:i,ref:o||n,...l}),t.multiple?null:k.jsx(f7,{as:s,ownerState:c,className:d.icon})]})});var dd;const m7=ue("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Wn})({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%"}),g7=ue("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Wn})(ct(({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 b7(e){const{children:t,classes:n,className:r,label:i,notched:a,...s}=e,o=i!=null&&i!=="",u={...e,notched:a,withLabel:o};return k.jsx(m7,{"aria-hidden":!0,className:r,ownerState:u,...s,children:k.jsx(g7,{ownerState:u,children:o?k.jsx("span",{children:i}):dd||(dd=k.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const y7=e=>{const{classes:t}=e,r=Ye({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ug,t);return{...t,...r}},v7=ue(vo,{shouldForwardProp:e=>Wn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:bo})(ct(({theme:e})=>{const 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 .${Ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ln.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Ln.focused} .${Ln.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ql()).map(([n])=>({props:{color:n},style:{[`&.${Ln.focused} .${Ln.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Ln.error} .${Ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ln.disabled} .${Ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),T7=ue(b7,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(ct(({theme:e})=>{const 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}})),x7=ue(To,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:yo})(ct(({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}}]}))),l0=L.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:o,multiline:u=!1,notched:l,slots:c={},slotProps:d={},type:p="text",...f}=r,b=y7(r),v=o0(),E=s0({props:r,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),y={...r,color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:v,fullWidth:a,hiddenLabel:E.hiddenLabel,multiline:u,size:E.size,type:p},w=c.root??i.Root??v7,x=c.input??i.Input??x7,[I,M]=Et("notchedOutline",{elementType:T7,className:b.notchedOutline,shouldForwardComponentProp:!0,ownerState:y,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:o!=null&&o!==""&&E.required?k.jsxs(L.Fragment,{children:[o," ","*"]}):o}});return k.jsx(xo,{slots:{root:w,input:x},slotProps:d,renderSuffix:C=>k.jsx(I,{...M,notched:typeof l<"u"?l:!!(C.startAdornment||C.filled||C.focused)}),fullWidth:a,inputComponent:s,multiline:u,ref:n,type:p,...f,classes:{...b,notchedOutline:null}})});l0.muiName="Input";function Tp(e){return gt("MuiSelect",e)}const qr=at("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var hd;const E7=ue(yp,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${qr.select}`]:t.select},{[`&.${qr.select}`]:t[n.variant]},{[`&.${qr.error}`]:t.error},{[`&.${qr.multiple}`]:t.multiple}]}})({[`&.${qr.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),S7=ue(vp,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${St(n.variant)}`],n.open&&t.iconOpen]}})({}),w7=ue("input",{shouldForwardProp:e=>Vg(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function fd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function A7(e){return e==null||typeof e=="string"&&!e.trim()}const C7=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:a,error:s}=e,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${St(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ye(o,Tp,t)},k7=L.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:a,autoWidth:s,children:o,className:u,defaultOpen:l,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:b,inputRef:v,labelId:E,MenuProps:y={},multiple:w,name:x,onBlur:I,onChange:M,onClose:C,onFocus:H,onOpen:z,open:V,readOnly:P,renderValue:$,required:W,SelectDisplayProps:G={},tabIndex:q,type:Y,value:Q,variant:ee="standard",...de}=t,[oe,R]=qu({controlled:Q,default:c,name:"Select"}),[Ce,ve]=qu({controlled:V,default:l,name:"Select"}),B=L.useRef(null),xe=L.useRef(null),[Ie,Be]=L.useState(null),{current:je}=L.useRef(V!=null),[_e,qe]=L.useState(),Te=Vt(n,v),De=L.useCallback(pe=>{xe.current=pe,pe&&Be(pe)},[]),Ne=Ie?.parentNode;L.useImperativeHandle(Te,()=>({focus:()=>{xe.current.focus()},node:B.current,value:oe}),[oe]),L.useEffect(()=>{l&&Ce&&Ie&&!je&&(qe(s?null:Ne.clientWidth),xe.current.focus())},[Ie,s]),L.useEffect(()=>{a&&xe.current.focus()},[a]),L.useEffect(()=>{if(!E)return;const pe=fn(xe.current).getElementById(E);if(pe){const ke=()=>{getSelection().isCollapsed&&xe.current.focus()};return pe.addEventListener("click",ke),()=>{pe.removeEventListener("click",ke)}}},[E]);const Qe=(pe,ke)=>{pe?z&&z(ke):C&&C(ke),je||(qe(s?null:Ne.clientWidth),ve(pe))},Re=pe=>{pe.button===0&&(pe.preventDefault(),xe.current.focus(),Qe(!0,pe))},$e=pe=>{Qe(!1,pe)},wt=L.Children.toArray(o),ht=pe=>{const ke=wt.find(et=>et.props.value===pe.target.value);ke!==void 0&&(R(ke.props.value),M&&M(pe,ke))},st=pe=>ke=>{let et;if(ke.currentTarget.hasAttribute("tabindex")){if(w){et=Array.isArray(oe)?oe.slice():[];const At=oe.indexOf(pe.props.value);At===-1?et.push(pe.props.value):et.splice(At,1)}else et=pe.props.value;if(pe.props.onClick&&pe.props.onClick(ke),oe!==et&&(R(et),M)){const At=ke.nativeEvent||ke,us=new At.constructor(At.type,At);Object.defineProperty(us,"target",{writable:!0,value:{value:et,name:x}}),M(us,pe)}w||Qe(!1,ke)}},Nt=pe=>{P||[" ","ArrowUp","ArrowDown","Enter"].includes(pe.key)&&(pe.preventDefault(),Qe(!0,pe))},ot=Ie!==null&&Ce,it=pe=>{!ot&&I&&(Object.defineProperty(pe,"target",{writable:!0,value:{value:oe,name:x}}),I(pe))};delete de["aria-invalid"];let Ht,Kt;const bt=[];let on=!1;(op({value:oe})||p)&&($?Ht=$(oe):on=!0);const K=wt.map(pe=>{if(!L.isValidElement(pe))return null;let ke;if(w){if(!Array.isArray(oe))throw new Error(z1(2));ke=oe.some(et=>fd(et,pe.props.value)),ke&&on&&bt.push(pe.props.children)}else ke=fd(oe,pe.props.value),ke&&on&&(Kt=pe.props.children);return L.cloneElement(pe,{"aria-selected":ke?"true":"false",onClick:st(pe),onKeyUp:et=>{et.key===" "&&et.preventDefault(),pe.props.onKeyUp&&pe.props.onKeyUp(et)},role:"option",selected:ke,value:void 0,"data-value":pe.props.value})});on&&(w?bt.length===0?Ht=null:Ht=bt.reduce((pe,ke,et)=>(pe.push(ke),et{const{classes:t}=e,r=Ye({root:["root"]},Tp,t);return{...t,...r}},c0={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Wn(e)&&e!=="variant"},N7=ue(fp,c0)(""),R7=ue(l0,c0)(""),M7=ue(hp,c0)(""),xp=L.forwardRef(function(t,n){const r=Xe({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:a,classes:s={},className:o,defaultOpen:u=!1,displayEmpty:l=!1,IconComponent:c=S5,id:d,input:p,inputProps:f,label:b,labelId:v,MenuProps:E,multiple:y=!1,native:w=!1,onClose:x,onOpen:I,open:M,renderValue:C,SelectDisplayProps:H,variant:z="outlined",...V}=r,P=w?p7:k7,$=o0(),W=s0({props:r,muiFormControl:$,states:["variant","error"]}),G=W.variant||z,q={...r,variant:G,classes:s},Y=I7(q),{root:Q,...ee}=Y,de=p||{standard:k.jsx(N7,{ownerState:q}),outlined:k.jsx(R7,{label:b,ownerState:q}),filled:k.jsx(M7,{ownerState:q})}[G],oe=Vt(n,Di(de));return k.jsx(L.Fragment,{children:L.cloneElement(de,{inputComponent:P,inputProps:{children:a,error:W.error,IconComponent:c,variant:G,type:void 0,multiple:y,...w?{id:d}:{autoWidth:i,defaultOpen:u,displayEmpty:l,labelId:v,MenuProps:E,onClose:x,onOpen:I,open:M,renderValue:C,SelectDisplayProps:{id:d,...H}},...f,classes:f?Kl(ee,f.classes):ee,...p?p.props.inputProps:{}},...(y&&w||l)&&G==="outlined"?{notched:!0}:{},ref:oe,className:Ve(de.props.className,o,Y.root),...!p&&{variant:G},...V})})});xp.muiName="Select";function D7(e){return gt("MuiSkeleton",e)}at("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const P7=e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:a,height:s}=e;return Ye({root:["root",n,r,i&&"withChildren",i&&!a&&"fitContent",i&&!s&&"heightAuto"]},D7,t)},Zu=V1` 0% { @@ -102,7 +102,7 @@ import{y as yg,z as vg,r as L,C as Tg,D as xg,j as k,c as Ve,_ as Eg,R as ls,E a * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const O8=[["path",{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",key:"svg-0"}]],_8=mn("filled","circle-filled","CircleFilled",O8),B8={primary:Os,secondary:Os,info:Os,error:Uc,warning:Uc,success:Gg},F8=e=>{const{open:t,onClose:n=()=>{},titleId:r,title:i,contentId:a,content:s,color:o="primary",titleIconColor:u="warning",titleIcon:l=!0,cancelLabel:c,onCancel:d=()=>{},confirmLabel:p,onConfirm:f=()=>{},submitLabel:b,onSubmitValid:v,onSubmitInvalid:E,handleSubmit:y,secondaryAction:w,...x}=e,I=B8[o],[M,C]=L.useState(!1),H=W=>!(W===!1||typeof W=="object"&&W.closeDialog===!1),z=W=>async(...G)=>{if(!M)try{const q=W(...G);if(q instanceof Promise){C(!0);const Y=await q;C(!1),H(Y)&&n()}else H(q)&&n()}catch(q){C(!1),console.error("Error in dialog action:",q)}};let V;const P=[];c&&P.push({key:"cancel",children:c,color:"secondary",onClick:z(d),loading:M}),p&&P.push({key:"confirm",children:p,color:o,onClick:z(f),loading:M}),b&&(P.push({key:"submit",children:b,type:"submit",loading:M}),y&&v&&(V={onSubmit:W=>{W.preventDefault(),W.stopPropagation(),!M&&(C(!0),y(async(...G)=>{try{const q=await v(...G);C(!1),H(q)&&n()}catch(q){C(!1),console.error("Error in form submission:",q)}},async(...G)=>{try{await E?.(...G)}catch(q){console.error("Error in form validation:",q)}finally{C(!1)}})())}}));const $=()=>{M||n()};return k.jsxs(tb,{open:t,onClose:$,"aria-labelledby":r,"aria-describedby":a,...x,component:V&&"form"||void 0,...V,slotProps:{paper:{sx:{p:1.5}}},children:[k.jsxs(mb,{id:!I&&r||void 0,children:[l==="form"&&k.jsx(Yg,{})||l===!0&&k.jsx(zc,{variant:"circle",color:u,children:k.jsx(I,{})})||k.jsx(zc,{variant:"circle",color:u,children:l})||void 0,!l&&i,k.jsx(Qr,{size:"small",onClick:$,children:k.jsx(j1,{size:"1.25rem"})})]}),k.jsxs(ub,{children:[l&&k.jsx(Ke,{variant:"subtitle1",id:r,sx:{fontSize:"1.125rem",fontWeight:600,mr:"auto"},children:i}),k.jsx(hb,{id:a,children:s})]}),P.length>0&&k.jsxs(ab,{children:[w,P.map(W=>L.createElement(q1,{...W,key:W.key,...P.length===1&&{fullWidth:!0}}))]})]})},Bs=(e,t)=>{const[n,r]=L.useState(!1),i=k.jsx(F8,{...e,open:n,onClose:()=>{r(!1),e.onClose?.()}}),a=L.useMemo(()=>({open:()=>r(!0),close:()=>r(!1)}),[]);return[i,a]},H8=()=>k.jsxs("svg",{width:"100",height:"21",viewBox:"0 0 100 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("path",{d:"M25.9027 21C24.2555 21 22.9819 20.6707 22.082 20.012C21.1821 19.3687 20.6482 18.4344 20.4805 17.209H23.7064C23.9352 18.1586 24.6825 18.6335 25.9485 18.6335C26.8789 18.6335 27.5576 18.4037 27.9847 17.9442C28.4118 17.5 28.6253 16.8184 28.6253 15.8993V14.0383C28.3203 14.5897 27.8779 15.0339 27.2984 15.3709C26.7188 15.6926 26.0324 15.8534 25.2393 15.8534C24.2478 15.8534 23.3556 15.6313 22.5624 15.1871C21.7693 14.7276 21.1439 14.0536 20.6864 13.1652C20.2288 12.2768 20 11.2046 20 9.94858C20 8.69256 20.2288 7.62035 20.6864 6.73195C21.1439 5.82823 21.7693 5.15427 22.5624 4.71007C23.3556 4.25055 24.2478 4.02079 25.2393 4.02079C25.9866 4.02079 26.6654 4.18928 27.2755 4.52626C27.8856 4.86324 28.3355 5.29978 28.6253 5.83589V4.36543H31.7826V15.7845C31.7826 17.3928 31.3021 18.6641 30.3412 19.5985C29.3803 20.5328 27.9008 21 25.9027 21ZM25.9256 13.4409C26.7493 13.4409 27.4127 13.1116 27.9161 12.453C28.4194 11.7943 28.6711 10.9519 28.6711 9.9256C28.6711 8.89934 28.4194 8.06455 27.9161 7.42123C27.4127 6.76258 26.7493 6.43326 25.9256 6.43326C25.041 6.43326 24.3699 6.73961 23.9123 7.3523C23.4547 7.96499 23.2259 8.82276 23.2259 9.9256C23.2259 11.0284 23.4547 11.8939 23.9123 12.5219C24.3699 13.1346 25.041 13.4409 25.9256 13.4409Z",fill:"black"}),k.jsx("path",{d:"M33.39 16.1751V4.36543H36.4787V6.91575C36.8905 5.81291 37.4091 5.03939 38.0344 4.59519C38.6598 4.15098 39.5368 3.95952 40.6655 4.02079V6.98468C40.3299 6.95405 40.0783 6.93873 39.9105 6.93873C39.4682 6.93873 39.0487 7 38.6522 7.12254C37.2489 7.59737 36.5473 9.01422 36.5473 11.3731V16.1751H33.39Z",fill:"black"}),k.jsx("path",{d:"M44.1585 16.4967C42.9382 16.4967 41.9316 16.1751 41.1384 15.5317C40.3606 14.8884 39.9716 14 39.9716 12.8665C39.9716 11.9628 40.2157 11.2659 40.7037 10.7757C41.2071 10.2702 41.7714 9.9256 42.3968 9.74179C43.0374 9.55799 43.7619 9.41247 44.5703 9.30525L45.5312 9.19037C46.3396 9.09847 46.9192 8.96061 47.27 8.7768C47.636 8.57768 47.8191 8.20241 47.8191 7.65098C47.8191 7.19147 47.6589 6.83917 47.3386 6.59409C47.0183 6.34902 46.5607 6.22648 45.9659 6.22648C45.3863 6.22648 44.9135 6.34902 44.5474 6.59409C44.1966 6.82385 43.9754 7.14551 43.8839 7.55908H40.4978C40.7266 6.44092 41.3138 5.57549 42.2595 4.9628C43.2204 4.33479 44.4788 4.02079 46.0345 4.02079C49.2986 4.02079 50.9306 5.26149 50.9306 7.74289V13.326C50.9306 14.2451 51.0602 15.1947 51.3195 16.1751H48.208C48.086 15.6083 48.0021 15.1105 47.9563 14.6816C47.6055 15.233 47.1022 15.6772 46.4463 16.0142C45.7905 16.3359 45.0278 16.4967 44.1585 16.4967ZM45.1422 14.1532C45.9354 14.1532 46.576 13.8928 47.0641 13.372C47.5674 12.8512 47.8191 12.1849 47.8191 11.3731V10.2013C47.6055 10.4617 47.3386 10.6608 47.0183 10.7987C46.7133 10.9365 46.2709 11.0514 45.6913 11.1433C44.8372 11.2965 44.2195 11.4803 43.8381 11.6947C43.4568 11.8939 43.2662 12.2538 43.2662 12.7746C43.2662 13.2035 43.4416 13.5405 43.7924 13.7856C44.1432 14.0306 44.5932 14.1532 45.1422 14.1532Z",fill:"black"}),k.jsx("path",{d:"M63.6153 0.0919039V16.1751H60.458V14.7965C60.1682 15.3173 59.7183 15.7385 59.1082 16.0602C58.4981 16.3665 57.7964 16.5197 57.0033 16.5197C56.0119 16.5197 55.112 16.267 54.3036 15.7615C53.5105 15.256 52.8775 14.5361 52.4047 13.6018C51.9471 12.6521 51.7183 11.5416 51.7183 10.2702C51.7183 8.99891 51.9471 7.89606 52.4047 6.96171C52.8775 6.01203 53.5105 5.28446 54.3036 4.77899C55.112 4.27352 56.0119 4.02079 57.0033 4.02079C57.7812 4.02079 58.4752 4.18928 59.0853 4.52626C59.7106 4.84792 60.1682 5.2768 60.458 5.81291V0.0919039H63.6153ZM57.6897 14.0383C58.5438 14.0383 59.2226 13.686 59.7259 12.9814C60.2445 12.2768 60.5038 11.3731 60.5038 10.2702C60.5038 9.1674 60.2445 8.26368 59.7259 7.55908C59.2226 6.85449 58.5438 6.50219 57.6897 6.50219C56.7898 6.50219 56.1034 6.83917 55.6306 7.51313C55.173 8.17177 54.9442 9.09081 54.9442 10.2702C54.9442 11.4497 55.173 12.3764 55.6306 13.0503C56.1034 13.709 56.7898 14.0383 57.6897 14.0383Z",fill:"black"}),k.jsx("path",{d:"M68.4939 3.10175H64.9476V0H68.4939V3.10175ZM68.2879 16.1751H65.1764V4.36543H68.2879V16.1751Z",fill:"black"}),k.jsx("path",{d:"M75.1212 14.0842C76.2194 14.0842 76.9515 13.7396 77.3176 13.0503H80.6121C80.2766 14.1225 79.6207 14.9726 78.6446 15.6007C77.6836 16.2133 76.4939 16.5197 75.0755 16.5197C73.7942 16.5197 72.6808 16.2593 71.7351 15.7385C70.8047 15.2177 70.0879 14.4902 69.5845 13.5558C69.0812 12.6061 68.8295 11.5186 68.8295 10.2932C68.8295 9.09847 69.1041 8.02626 69.6532 7.07659C70.2023 6.1116 70.9344 5.36105 71.8495 4.82495C72.7799 4.28884 73.7942 4.02079 74.8924 4.02079C76.0821 4.02079 77.1269 4.30416 78.0268 4.8709C78.942 5.42232 79.6589 6.24179 80.1774 7.32932C80.696 8.40153 80.9629 9.69584 80.9782 11.2123H72.0555C72.1165 12.0853 72.4291 12.7823 72.9935 13.3031C73.5731 13.8239 74.2823 14.0842 75.1212 14.0842ZM75.0068 6.45624C74.2594 6.45624 73.6112 6.70131 73.0621 7.19147C72.5283 7.68162 72.2003 8.29431 72.0783 9.02954H77.8438C77.7065 8.24836 77.3938 7.62801 76.9058 7.16849C76.4177 6.69365 75.7847 6.45624 75.0068 6.45624Z",fill:"black"}),k.jsx("path",{d:"M81.5786 16.1751V4.36543H84.6444V5.85886C84.9647 5.35339 85.407 4.92451 85.9713 4.57221C86.5357 4.2046 87.2449 4.02079 88.0991 4.02079C89.304 4.02079 90.2421 4.39606 90.9132 5.14661C91.5995 5.89716 91.9427 6.95405 91.9427 8.31729V16.1751H88.7854V8.54705C88.7854 7.21444 88.2135 6.54814 87.0695 6.54814C86.4289 6.54814 85.8798 6.80853 85.4222 7.32932C84.9647 7.83479 84.7359 8.593 84.7359 9.60394V16.1751H81.5786Z",fill:"black"}),k.jsx("path",{d:"M98.1011 16.2899C96.9876 16.2899 96.0801 16.0066 95.3785 15.4398C94.6921 14.8731 94.3489 13.9311 94.3489 12.6138V6.7779H92.3356V4.36543H94.3489V0.873086H97.4147V4.36543H99.7712V6.7779H97.4147V12.0853C97.4147 12.698 97.5291 13.1575 97.7579 13.4639C98.0019 13.7549 98.3985 13.9004 98.9476 13.9004C99.2374 13.9004 99.5882 13.8545 100 13.7626V16.0372C99.5272 16.2057 98.8942 16.2899 98.1011 16.2899Z",fill:"black"}),k.jsx("path",{d:"M3 13H0V16H3V13Z",fill:"black"}),k.jsx("path",{d:"M18 0V2.85011L8.94745 16H6V13.1499L15.0521 0H18Z",fill:"black"})]}),Td=()=>k.jsxs("svg",{width:"26",height:"28",viewBox:"0 0 26 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("path",{d:"M7 19H4V22H7V19Z",fill:"black"}),k.jsx("path",{d:"M22 6V8.85011L12.9475 22H10V19.1499L19.0521 6H22Z",fill:"black"})]}),z8=ue(xp)(({theme:e,ownerState:t})=>{const{spacing:n,typography:r,palette:i}=e,{variant:a="outlined"}=t;return{height:a==="outlined"?"4rem":"1lh",paddingInline:n(.5),borderRadius:12,"&:hover":{backgroundColor:"action.hover"},[`.${qr.select}:hover`]:{backgroundColor:"transparent"},...a==="text"&&{...r.h3,fontWeight:r.fontWeightMedium,[`.${qr.select}`]:{fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit",padding:0},"&:hover":{backgroundColor:"transparent"}}}}),U8=ue(l7)(({theme:e})=>({height:"3.25rem",gap:e.spacing(1),borderRadius:10})),V8=ue(Ge)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:e.spacing(1),padding:e.spacing(1),"&:hover":{backgroundColor:"transparent"},pointerEvents:"none"})),Ap=ue("img")(({theme:e})=>({width:"2.25rem",height:"2.25rem",borderRadius:"0.5rem",border:`1px solid ${e.palette.divider}`,objectFit:"cover"})),Cp=ue("span")(({theme:e})=>({...e.typography.subtitle2,fontSize:"0.875rem",lineHeight:"1.125rem",fontWeight:e.typography.fontWeightLight,color:e.palette.text.primary})),kp=ue("span")(({theme:e})=>({...e.typography.body2,fontSize:"0.75rem",lineHeight:"1rem",fontWeight:e.typography.fontWeightLight,color:e.palette.text.secondary})),j8=e=>k.jsxs(U8,{value:e.name,children:[k.jsx(Ap,{src:e.logoUrl}),k.jsxs(Ge,{gap:.25,children:[k.jsx(Cp,{children:e.displayName}),k.jsx(kp,{children:e.name})]})]},e.name),q8=({variant:e="outlined"})=>{const[{modelName:t,modelInfoList:n,clusterInfo:{status:r}},{setModelName:i}]=qa(),[a,{open:s}]=Bs({titleIcon:k.jsx(L8,{}),title:"Switch model",content:k.jsx(Ke,{variant:"body2",color:"text.secondary",children:"The current version of parallax only supports hosting one model at once. Switching the model will terminate your existing chat service. You can restart the current scheduler in your terminal. We will add node rebalancing and dynamic model allocation soon."}),confirmLabel:"Continue"}),o=Ia(u=>{if(r!=="idle"){s();return}i(String(u.target.value))});return k.jsxs(k.Fragment,{children:[k.jsx(z8,{ownerState:{variant:e},input:e==="outlined"?k.jsx(l0,{}):k.jsx(xo,{}),value:t,onChange:o,renderValue:u=>{const l=n.find(c=>c.name===u);if(l)return e==="outlined"?k.jsxs(V8,{children:[k.jsx(Ap,{src:l.logoUrl}),k.jsxs(Ge,{gap:.25,children:[k.jsx(Cp,{children:l.displayName}),k.jsx(kp,{children:l.name})]})]}):l.name},children:n.map(u=>j8(u))}),a]})},$8={"linux/mac":"Linux/MacOS",windows:"Windows"},W8=ue("div")(({theme:e})=>{const{palette:t,spacing:n}=e;return{display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",alignItems:"center",paddingInline:n(2),paddingBlock:n(1.5),gap:n(1),overflow:"hidden",borderRadius:"0.7rem",backgroundColor:t.background.area}}),xd=()=>{const[{clusterInfo:{nodeJoinCommand:e}}]=qa(),[t,n]=L.useState();L.useEffect(()=>{if(t){const i=setTimeout(()=>{n(void 0)},2e3);return()=>clearTimeout(i)}},[t]);const r=Ia(async i=>{await navigator.clipboard.writeText(e[i]),n(i)});return k.jsx(Ge,{gap:1,children:Object.entries(e).map(([i,a],s,o)=>k.jsxs(Ge,{gap:1,children:[o.length>1&&k.jsxs(Ke,{variant:"subtitle2",children:["For ",$8[i]||i,":"]},"label"),k.jsxs(W8,{children:[k.jsx(Ke,{sx:{flex:1,lineHeight:"1.125rem",whiteSpace:"wrap"},variant:"pre",children:a}),k.jsx(Qr,{sx:{flex:"none",fontSize:"1rem"},size:"em",onClick:()=>r(i),children:t===i&&k.jsx(Sp,{})||k.jsx(wp,{})})]},"command")]},i))})};function d0(e,t){e.indexOf(t)===-1&&e.push(t)}function h0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ur=(e,t,n)=>n>t?t:n{};const lr={},Ip=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Np(e){return typeof e=="object"&&e!==null}const Rp=e=>/^0[^.\s]+$/u.test(e);function p0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Sn=e=>e,Y8=(e,t)=>n=>t(e(n)),Ya=(...e)=>e.reduce(Y8),Ma=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class m0{constructor(){this.subscriptions=[]}add(t){return d0(this.subscriptions,t),()=>h0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;ae*1e3,jn=e=>e/1e3;function Mp(e,t){return t?e*(1e3/t):0}const Dp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,G8=1e-7,X8=12;function K8(e,t,n,r,i){let a,s,o=0;do s=t+(n-t)/2,a=Dp(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>G8&&++oK8(a,0,1,e,n);return a=>a===0||a===1?a:Dp(i(a),t,r)}const Pp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lp=e=>t=>1-e(1-t),Op=Ga(.33,1.53,.69,.99),g0=Lp(Op),_p=Pp(g0),Bp=e=>(e*=2)<1?.5*g0(e):.5*(2-Math.pow(2,-10*(e-1))),b0=e=>1-Math.sin(Math.acos(e)),Fp=Lp(b0),Hp=Pp(b0),Q8=Ga(.42,0,1,1),Z8=Ga(0,0,.58,1),zp=Ga(.42,0,.58,1),J8=e=>Array.isArray(e)&&typeof e[0]!="number",Up=e=>Array.isArray(e)&&typeof e[0]=="number",ey={linear:Sn,easeIn:Q8,easeInOut:zp,easeOut:Z8,circIn:b0,circInOut:Hp,circOut:Fp,backIn:g0,backInOut:_p,backOut:Op,anticipate:Bp},ty=e=>typeof e=="string",Ed=e=>{if(Up(e)){f0(e.length===4);const[t,n,r,i]=e;return Ga(t,n,r,i)}else if(ty(e))return ey[e];return e},Vp=L.createContext({}),jp=L.createContext({strict:!1}),qp=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),So=L.createContext({});function wo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Da(e){return typeof e=="string"||Array.isArray(e)}const y0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],v0=["initial",...y0];function Ao(e){return wo(e.animate)||v0.some(t=>Da(e[t]))}function $p(e){return!!(Ao(e)||e.variants)}function ny(e,t){if(Ao(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Da(n)?n:void 0,animate:Da(r)?r:void 0}}return e.inherit!==!1?t:{}}function ry(e){const{initial:t,animate:n}=ny(e,L.useContext(So));return L.useMemo(()=>({initial:t,animate:n}),[Sd(t),Sd(n)])}function Sd(e){return Array.isArray(e)?e.join(" "):e}const bs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function iy(e,t){let n=new Set,r=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){s.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,d=!1,p=!1)=>{const b=p&&i?n:r;return d&&s.add(c),b.has(c)||b.add(c),c},cancel:c=>{r.delete(c),s.delete(c)},process:c=>{if(o=c,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),n.clear(),i=!1,a&&(a=!1,l.process(c))}};return l}const ay=40;function Wp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=bs.reduce((x,I)=>(x[I]=iy(a),x),{}),{setup:o,read:u,resolveKeyframes:l,preUpdate:c,update:d,preRender:p,render:f,postRender:b}=s,v=()=>{const x=lr.useManualTiming?i.timestamp:performance.now();n=!1,lr.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,ay),1)),i.timestamp=x,i.isProcessing=!0,o.process(i),u.process(i),l.process(i),c.process(i),d.process(i),p.process(i),f.process(i),b.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},E=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:bs.reduce((x,I)=>{const M=s[I];return x[I]=(C,H=!1,z=!1)=>(n||E(),M.schedule(C,H,z)),x},{}),cancel:x=>{for(let I=0;I(Fs===void 0&&tn.set(Ft.isProcessing||lr.useManualTiming?Ft.timestamp:performance.now()),Fs),set:e=>{Fs=e,queueMicrotask(sy)}},Yp=e=>t=>typeof t=="string"&&t.startsWith(e),T0=Yp("--"),oy=Yp("var(--"),x0=e=>oy(e)?uy.test(e.split("/*")[0].trim()):!1,uy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pa={...Pi,transform:e=>ur(0,1,e)},ys={...Pi,default:1},da=e=>Math.round(e*1e5)/1e5,E0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ly(e){return e==null}const cy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,S0=(e,t)=>n=>!!(typeof n=="string"&&cy.test(n)&&n.startsWith(e)||t&&!ly(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,s,o]=r.match(E0);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},dy=e=>ur(0,255,e),Go={...Pi,transform:e=>Math.round(dy(e))},$r={test:S0("rgb","red"),parse:Gp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Go.transform(e)+", "+Go.transform(t)+", "+Go.transform(n)+", "+da(Pa.transform(r))+")"};function hy(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const el={test:S0("#"),parse:hy,transform:$r.transform},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vr=Xa("deg"),qn=Xa("%"),Ae=Xa("px"),fy=Xa("vh"),py=Xa("vw"),wd={...qn,parse:e=>qn.parse(e)/100,transform:e=>qn.transform(e*100)},fi={test:S0("hsl","hue"),parse:Gp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qn.transform(da(t))+", "+qn.transform(da(n))+", "+da(Pa.transform(r))+")"},Pt={test:e=>$r.test(e)||el.test(e)||fi.test(e),parse:e=>$r.test(e)?$r.parse(e):fi.test(e)?fi.parse(e):el.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$r.transform(e):fi.transform(e),getAnimatableNone:e=>{const t=Pt.parse(e);return t.alpha=0,Pt.transform(t)}},my=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gy(e){return isNaN(e)&&typeof e=="string"&&(e.match(E0)?.length||0)+(e.match(my)?.length||0)>0}const Xp="number",Kp="color",by="var",yy="var(",Ad="${}",vy=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function La(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(vy,u=>(Pt.test(u)?(r.color.push(a),i.push(Kp),n.push(Pt.parse(u))):u.startsWith(yy)?(r.var.push(a),i.push(by),n.push(u)):(r.number.push(a),i.push(Xp),n.push(parseFloat(u))),++a,Ad)).split(Ad);return{values:n,split:o,indexes:r,types:i}}function Qp(e){return La(e).values}function Zp(e){const{split:t,types:n}=La(e),r=t.length;return i=>{let a="";for(let s=0;stypeof e=="number"?0:Pt.test(e)?Pt.getAnimatableNone(e):e;function xy(e){const t=Qp(e);return Zp(e)(t.map(Ty))}const kr={test:gy,parse:Qp,createTransformer:Zp,getAnimatableNone:xy};function Xo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ey({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;i=Xo(u,o,e+1/3),a=Xo(u,o,e),s=Xo(u,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function Qs(e,t){return n=>n>0?t:e}const mt=(e,t,n)=>e+(t-e)*n,Ko=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Sy=[el,$r,fi],wy=e=>Sy.find(t=>t.test(e));function Cd(e){const t=wy(e);if(!t)return!1;let n=t.parse(e);return t===fi&&(n=Ey(n)),n}const kd=(e,t)=>{const n=Cd(e),r=Cd(t);if(!n||!r)return Qs(e,t);const i={...n};return a=>(i.red=Ko(n.red,r.red,a),i.green=Ko(n.green,r.green,a),i.blue=Ko(n.blue,r.blue,a),i.alpha=mt(n.alpha,r.alpha,a),$r.transform(i))},tl=new Set(["none","hidden"]);function Ay(e,t){return tl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cy(e,t){return n=>mt(e,t,n)}function w0(e){return typeof e=="number"?Cy:typeof e=="string"?x0(e)?Qs:Pt.test(e)?kd:Ny:Array.isArray(e)?Jp:typeof e=="object"?Pt.test(e)?kd:ky:Qs}function Jp(e,t){const n=[...e],r=n.length,i=e.map((a,s)=>w0(a)(a,t[s]));return a=>{for(let s=0;s{for(const a in r)n[a]=r[a](i);return n}}function Iy(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=kr.createTransformer(t),r=La(e),i=La(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tl.has(e)&&!i.values.length||tl.has(t)&&!r.values.length?Ay(e,t):Ya(Jp(Iy(r,i),i.values),n):Qs(e,t)};function em(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?mt(e,t,n):w0(e)(e,t)}const Ry=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>lt.update(t,n),stop:()=>Cr(t),now:()=>Ft.isProcessing?Ft.timestamp:tn.now()}},tm=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a=Zs?1/0:t}function My(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(A0(r),Zs);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:jn(i)}}const Dy=5;function nm(e,t,n){const r=Math.max(t-Dy,0);return Mp(n-e(r),t-r)}const xt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Qo=.001;function Py({duration:e=xt.duration,bounce:t=xt.bounce,velocity:n=xt.velocity,mass:r=xt.mass}){let i,a,s=1-t;s=ur(xt.minDamping,xt.maxDamping,s),e=ur(xt.minDuration,xt.maxDuration,jn(e)),s<1?(i=l=>{const c=l*s,d=c*e,p=c-n,f=nl(l,s),b=Math.exp(-d);return Qo-p/f*b},a=l=>{const d=l*s*e,p=d*n+n,f=Math.pow(s,2)*Math.pow(l,2)*e,b=Math.exp(-d),v=nl(Math.pow(l,2),s);return(-i(l)+Qo>0?-1:1)*((p-f)*b)/v}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Qo+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const o=5/e,u=Oy(i,a,o);if(e=Vn(e),isNaN(u))return{stiffness:xt.stiffness,damping:xt.damping,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const Ly=12;function Oy(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Fy(e){let t={velocity:xt.velocity,stiffness:xt.stiffness,damping:xt.damping,mass:xt.mass,isResolvedFromDuration:!1,...e};if(!Id(e,By)&&Id(e,_y))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ur(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:xt.mass,stiffness:i,damping:a}}else{const n=Py(e);t={...t,...n,mass:xt.mass},t.isResolvedFromDuration=!0}return t}function Js(e=xt.visualDuration,t=xt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:u,damping:l,mass:c,duration:d,velocity:p,isResolvedFromDuration:f}=Fy({...n,velocity:-jn(n.velocity||0)}),b=p||0,v=l/(2*Math.sqrt(u*c)),E=s-a,y=jn(Math.sqrt(u/c)),w=Math.abs(E)<5;r||(r=w?xt.restSpeed.granular:xt.restSpeed.default),i||(i=w?xt.restDelta.granular:xt.restDelta.default);let x;if(v<1){const M=nl(y,v);x=C=>{const H=Math.exp(-v*y*C);return s-H*((b+v*y*E)/M*Math.sin(M*C)+E*Math.cos(M*C))}}else if(v===1)x=M=>s-Math.exp(-y*M)*(E+(b+y*E)*M);else{const M=y*Math.sqrt(v*v-1);x=C=>{const H=Math.exp(-v*y*C),z=Math.min(M*C,300);return s-H*((b+v*y*E)*Math.sinh(z)+M*E*Math.cosh(z))/M}}const I={calculatedDuration:f&&d||null,next:M=>{const C=x(M);if(f)o.done=M>=d;else{let H=M===0?b:0;v<1&&(H=M===0?Vn(b):nm(x,M,C));const z=Math.abs(H)<=r,V=Math.abs(s-C)<=i;o.done=z&&V}return o.value=o.done?s:C,o},toString:()=>{const M=Math.min(A0(I),Zs),C=tm(H=>I.next(M*H).value,M,30);return M+"ms "+C},toTransition:()=>{}};return I}Js.applyToOptions=e=>{const t=My(e,100,Js);return e.ease=t.ease,e.duration=Vn(t.duration),e.type="keyframes",e};function rl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],p={done:!1,value:d},f=z=>o!==void 0&&zu,b=z=>o===void 0?u:u===void 0||Math.abs(o-z)-v*Math.exp(-z/r),x=z=>y+w(z),I=z=>{const V=w(z),P=x(z);p.done=Math.abs(V)<=l,p.value=p.done?y:P};let M,C;const H=z=>{f(p.value)&&(M=z,C=Js({keyframes:[p.value,b(p.value)],velocity:nm(x,z,p.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return H(0),{calculatedDuration:null,next:z=>{let V=!1;return!C&&M===void 0&&(V=!0,I(z),H(z)),M!==void 0&&z>=M?C.next(z-M):(!V&&I(z),p)}}}function Hy(e,t,n){const r=[],i=n||lr.mix||em,a=e.length-1;for(let s=0;st[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Hy(t,r,i),u=o.length,l=c=>{if(s&&c1)for(;dl(ur(e[0],e[a-1],c)):l}function Uy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ma(0,t,r);e.push(mt(n,1,i))}}function Vy(e){const t=[0];return Uy(t,e.length-1),t}function jy(e,t){return e.map(n=>n*t)}function qy(e,t){return e.map(()=>t||zp).splice(0,e.length-1)}function ha({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=J8(r)?r.map(Ed):Ed(r),a={done:!1,value:t[0]},s=jy(n&&n.length===t.length?n:Vy(t),e),o=zy(s,t,{ease:Array.isArray(i)?i:qy(t,i)});return{calculatedDuration:e,next:u=>(a.value=o(u),a.done=u>=e,a)}}const $y=e=>e!==null;function C0(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter($y),o=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const Wy={decay:rl,inertia:rl,tween:ha,keyframes:ha,spring:Js};function rm(e){typeof e.type=="string"&&(e.type=Wy[e.type])}class k0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Yy=e=>e/100;class I0 extends k0{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tn.now()&&this.tick(tn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rm(t);const{type:n=ha,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:o}=t;const u=n||ha;u!==ha&&typeof o[0]!="number"&&(this.mixKeyframes=Ya(Yy,em(o[0],o[1])),o=[0,100]);const l=u({...t,keyframes:o});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=A0(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:f,type:b,onUpdate:v,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,I=r;if(d){const z=Math.min(this.currentTime,i)/o;let V=Math.floor(z),P=z%1;!P&&z>=1&&(P=1),P===1&&V--,V=Math.min(V,d+1),!!(V%2)&&(p==="reverse"?(P=1-P,f&&(P-=f/o)):p==="mirror"&&(I=s)),x=ur(0,1,P)*o}const M=w?{done:!1,value:c[0]}:I.next(x);a&&(M.value=a(M.value));let{done:C}=M;!w&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return H&&b!==rl&&(M.value=C0(c,this.options,E,this.speed)),v&&v(M.value),H&&this.finish(),M}then(t,n){return this.finished.then(t,n)}get duration(){return jn(this.calculatedDuration)}get time(){return jn(this.currentTime)}set time(t){t=Vn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(tn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=jn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ry,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Gy(e){for(let t=1;te*180/Math.PI,il=e=>{const t=Wr(Math.atan2(e[1],e[0]));return al(t)},Xy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:il,rotateZ:il,skewX:e=>Wr(Math.atan(e[1])),skewY:e=>Wr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},al=e=>(e=e%360,e<0&&(e+=360),e),Nd=il,Rd=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Md=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ky={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rd,scaleY:Md,scale:e=>(Rd(e)+Md(e))/2,rotateX:e=>al(Wr(Math.atan2(e[6],e[5]))),rotateY:e=>al(Wr(Math.atan2(-e[2],e[0]))),rotateZ:Nd,rotate:Nd,skewX:e=>Wr(Math.atan(e[4])),skewY:e=>Wr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sl(e){return e.includes("scale")?1:0}function ol(e,t){if(!e||e==="none")return sl(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Ky,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Xy,i=o}if(!i)return sl(t);const a=r[t],s=i[1].split(",").map(Zy);return typeof a=="function"?a(s):s[a]}const Qy=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ol(n,t)};function Zy(e){return parseFloat(e.trim())}const Li=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oi=new Set(Li),Dd=e=>e===Pi||e===Ae,Jy=new Set(["x","y","z"]),e9=Li.filter(e=>!Jy.has(e));function t9(e){const t=[];return e9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ol(t,"x"),y:(e,{transform:t})=>ol(t,"y")};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const Xr=new Set;let ul=!1,ll=!1,cl=!1;function im(){if(ll){const e=Array.from(Xr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=t9(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,s])=>{r.getValue(a)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ll=!1,ul=!1,Xr.forEach(e=>e.complete(cl)),Xr.clear()}function am(){Xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ll=!0)})}function n9(){cl=!0,am(),im(),cl=!1}class N0{constructor(t,n,r,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xr.add(this),ul||(ul=!0,lt.read(am),lt.resolveKeyframes(im))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i?.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const o=r.readValue(n,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}Gy(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xr.delete(this)}cancel(){this.state==="scheduled"&&(Xr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r9=e=>e.startsWith("--");function i9(e,t,n){r9(t)?e.style.setProperty(t,n):e.style[t]=n}const a9=p0(()=>window.ScrollTimeline!==void 0),s9={};function o9(e,t){const n=p0(e);return()=>s9[t]??n()}const sm=o9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),aa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:aa([0,.65,.55,1]),circOut:aa([.55,0,1,.45]),backIn:aa([.31,.01,.66,-.59]),backOut:aa([.33,1.53,.69,.99])};function om(e,t){if(e)return typeof e=="function"?sm()?tm(e,t):"ease-out":Up(e)?aa(e):Array.isArray(e)?e.map(n=>om(n,t)||Pd.easeOut):Pd[e]}function u9(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:u}={},l=void 0){const c={[t]:n};u&&(c.offset=u);const d=om(o,i);Array.isArray(d)&&(c.easing=d);const p={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(c,p)}function um(e){return typeof e=="function"&&"applyToOptions"in e}function l9({type:e,...t}){return um(e)&&sm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class c9 extends k0{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,f0(typeof t.type!="string");const l=l9(t);this.animation=u9(n,r,i,l,a),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const c=C0(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(c):i9(n,r,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return jn(Number(t))}get time(){return jn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Vn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&a9()?(this.animation.timeline=t,Sn):n(this)}}const lm={anticipate:Bp,backInOut:_p,circInOut:Hp};function d9(e){return e in lm}function h9(e){typeof e.ease=="string"&&d9(e.ease)&&(e.ease=lm[e.ease])}const Ld=10;class f9 extends c9{constructor(t){h9(t),rm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new I0({...s,autoplay:!1}),u=Vn(this.finishedTime??this.time);n.setWithVelocity(o.sample(u-Ld).value,o.sample(u).value,Ld),o.stop()}}const Od=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kr.test(e)||e==="0")&&!e.startsWith("url("));function p9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function y9(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=t.owner.getProps();return b9()&&n&&g9.has(n)&&(n!=="transform"||!l)&&!u&&!r&&i!=="mirror"&&a!==0&&s!=="inertia"}const v9=40;class T9 extends k0{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:u,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tn.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:s,name:u,motionValue:l,element:c,...d},f=c?.KeyframeResolver||N0;this.keyframeResolver=new f(o,(b,v,E)=>this.onKeyframesResolved(b,v,p,!E),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:u,isHandoff:l,onUpdate:c}=r;this.resolvedAt=tn.now(),m9(t,a,s,o)||((lr.instantAnimations||!u)&&c?.(C0(t,r,n)),t[0]=t[t.length-1],dl(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>v9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!l&&y9(p)?new f9({...p,element:p.motionValue.owner.current}):new I0(p);f.finished.then(()=>this.notifyFinished()).catch(Sn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),n9()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const x9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function E9(e){const t=x9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function cm(e,t,n=1){const[r,i]=E9(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return Ip(s)?parseFloat(s):s}return x0(i)?cm(i,t,n+1):i}function R0(e,t){return e?.[t]??e?.default??e}const dm=new Set(["width","height","top","left","right","bottom",...Li]),S9={test:e=>e==="auto",parse:e=>e},hm=e=>t=>t.test(e),fm=[Pi,Ae,qn,vr,py,fy,S9],_d=e=>fm.find(hm(e));function w9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Rp(e):!0}const A9=new Set(["brightness","contrast","saturate","opacity"]);function C9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(E0)||[];if(!r)return e;const i=n.replace(r,"");let a=A9.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const k9=/\b([a-z-]*)\(.*?\)/gu,hl={...kr,getAnimatableNone:e=>{const t=e.match(k9);return t?t.map(C9).join(" "):e}},Bd={...Pi,transform:Math.round},I9={rotate:vr,rotateX:vr,rotateY:vr,rotateZ:vr,scale:ys,scaleX:ys,scaleY:ys,scaleZ:ys,skew:vr,skewX:vr,skewY:vr,distance:Ae,translateX:Ae,translateY:Ae,translateZ:Ae,x:Ae,y:Ae,z:Ae,perspective:Ae,transformPerspective:Ae,opacity:Pa,originX:wd,originY:wd,originZ:Ae},M0={borderWidth:Ae,borderTopWidth:Ae,borderRightWidth:Ae,borderBottomWidth:Ae,borderLeftWidth:Ae,borderRadius:Ae,radius:Ae,borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomRightRadius:Ae,borderBottomLeftRadius:Ae,width:Ae,maxWidth:Ae,height:Ae,maxHeight:Ae,top:Ae,right:Ae,bottom:Ae,left:Ae,padding:Ae,paddingTop:Ae,paddingRight:Ae,paddingBottom:Ae,paddingLeft:Ae,margin:Ae,marginTop:Ae,marginRight:Ae,marginBottom:Ae,marginLeft:Ae,backgroundPositionX:Ae,backgroundPositionY:Ae,...I9,zIndex:Bd,fillOpacity:Pa,strokeOpacity:Pa,numOctaves:Bd},N9={...M0,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:hl,WebkitFilter:hl},pm=e=>N9[e];function mm(e,t){let n=pm(e);return n!==hl&&(n=kr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const R9=new Set(["auto","none","0"]);function M9(e,t,n){let r=0,i;for(;r{t.getValue(o).set(u)}),this.resolveNoneKeyframes()}}function P9(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const gm=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function L9(e){return Np(e)&&"offsetHeight"in e}const Fd=30,O9=e=>!isNaN(parseFloat(e));class _9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=tn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=tn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=O9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new m0);const r=this.events[t].add(n);return t==="change"?()=>{r(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fd);return Mp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ki(e,t){return new _9(e,t)}const{schedule:D0}=Wp(queueMicrotask,!1),Rn={x:!1,y:!1};function bm(){return Rn.x||Rn.y}function B9(e){return e==="x"||e==="y"?Rn[e]?null:(Rn[e]=!0,()=>{Rn[e]=!1}):Rn.x||Rn.y?null:(Rn.x=Rn.y=!0,()=>{Rn.x=Rn.y=!1})}function ym(e,t){const n=P9(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Hd(e){return!(e.pointerType==="touch"||bm())}function F9(e,t,n={}){const[r,i,a]=ym(e,n),s=o=>{if(!Hd(o))return;const{target:u}=o,l=t(u,o);if(typeof l!="function"||!u)return;const c=d=>{Hd(d)&&(l(d),u.removeEventListener("pointerleave",c))};u.addEventListener("pointerleave",c,i)};return r.forEach(o=>{o.addEventListener("pointerenter",s,i)}),a}const vm=(e,t)=>t?e===t?!0:vm(e,t.parentElement):!1,P0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,H9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function z9(e){return H9.has(e.tagName)||e.tabIndex!==-1}const Hs=new WeakSet;function zd(e){return t=>{t.key==="Enter"&&e(t)}}function Zo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const U9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=zd(()=>{if(Hs.has(n))return;Zo(n,"down");const i=zd(()=>{Zo(n,"up")}),a=()=>Zo(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ud(e){return P0(e)&&!bm()}function V9(e,t,n={}){const[r,i,a]=ym(e,n),s=o=>{const u=o.currentTarget;if(!Ud(o))return;Hs.add(u);const l=t(u,o),c=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),Hs.has(u)&&Hs.delete(u),Ud(f)&&typeof l=="function"&&l(f,{success:b})},d=f=>{c(f,u===window||u===document||n.useGlobalTarget||vm(u,f.target))},p=f=>{c(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",p,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,i),L9(o)&&(o.addEventListener("focus",l=>U9(l,i)),!z9(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Tm(e){return Np(e)&&"ownerSVGElement"in e}function j9(e){return Tm(e)&&e.tagName==="svg"}const zt=e=>!!(e&&e.getVelocity),q9=[...fm,Pt,kr],$9=e=>q9.find(hm(e)),Oa={};function W9(e){for(const t in e)Oa[t]=e[t],T0(t)&&(Oa[t].isCSSVariable=!0)}function xm(e,{layout:t,layoutId:n}){return Oi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Oa[e]||e==="opacity")}const Y9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G9=Li.length;function X9(e,t,n){let r="",i=!0;for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function Em(e,t,n){for(const r in t)!zt(t[r])&&!xm(r,n)&&(e[r]=t[r])}function K9({transformTemplate:e},t){return L.useMemo(()=>{const n=O0();return L0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Q9(e,t){const n=e.style||{},r={};return Em(r,n,e),Object.assign(r,K9(e,t)),r}function Z9(e,t){const n={},r=Q9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const J9={offset:"stroke-dashoffset",array:"stroke-dasharray"},ev={offset:"strokeDashoffset",array:"strokeDasharray"};function tv(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?J9:ev;e[a.offset]=Ae.transform(-r);const s=Ae.transform(t),o=Ae.transform(n);e[a.array]=`${s} ${o}`}function Sm(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...o},u,l,c){if(L0(e,o,l),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&tv(d,i,a,s,!1)}const wm=()=>({...O0(),attrs:{}}),Am=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nv(e,t,n,r){const i=L.useMemo(()=>{const a=wm();return Sm(a,t,Am(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Em(a,e.style,e),i.style={...a,...i.style}}return i}const rv=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rv.has(e)}let Cm=e=>!eo(e);function iv(e){typeof e=="function"&&(Cm=t=>t.startsWith("on")?!eo(t):e(t))}try{iv(require("@emotion/is-prop-valid").default)}catch{}function av(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Cm(i)||n===!0&&eo(i)||!t&&!eo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const sv=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _0(e){return typeof e!="string"||e.includes("-")?!1:!!(sv.indexOf(e)>-1||/[A-Z]/u.test(e))}function ov(e,t,n,{latestValues:r},i,a=!1){const o=(_0(e)?nv:Z9)(t,r,i,e),u=av(t,typeof e=="string",a),l=e!==L.Fragment?{...u,...o,ref:n}:{},{children:c}=t,d=L.useMemo(()=>zt(c)?c.get():c,[c]);return L.createElement(e,{...l,children:d})}const B0=L.createContext(null);function Vd(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function F0(e,t,n,r){if(typeof t=="function"){const[i,a]=Vd(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=Vd(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function uv(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}function zs(e){return zt(e)?e.get():e}function lv({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:cv(n,r,i,e),renderState:t()}}function cv(e,t,n,r){const i={},a=r(e,{});for(const p in a)i[p]=zs(a[p]);let{initial:s,animate:o}=e;const u=Ao(e),l=$p(e);t&&l&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?o:s;if(d&&typeof d!="boolean"&&!wo(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f(t,n)=>{const r=L.useContext(So),i=L.useContext(B0),a=()=>lv(e,t,r,i);return n?a():uv(a)};function H0(e,t,n){const{style:r}=e,i={};for(const a in r)(zt(r[a])||t.style&&zt(t.style[a])||xm(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const dv=km({scrapeMotionValuesFromProps:H0,createRenderState:O0});function Im(e,t,n){const r=H0(e,t,n);for(const i in e)if(zt(e[i])||zt(t[i])){const a=Li.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}const hv=km({scrapeMotionValuesFromProps:Im,createRenderState:wm}),z0=typeof window<"u",jd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ii={};for(const e in jd)Ii[e]={isEnabled:t=>jd[e].some(n=>!!t[n])};function fv(e){for(const t in e)Ii[t]={...Ii[t],...e[t]}}const pv=Symbol.for("motionComponentSymbol");function pi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mv(e,t,n){const r=L.useRef(null);return L.useCallback(i=>{const a=r.current;r.current=i,i!==a&&(i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount())),n&&(typeof n=="function"?n(i):pi(n)&&(n.current=i))},[t,n])}const U0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gv="framerAppearId",Nm="data-"+U0(gv),Rm=L.createContext({}),bv=z0?L.useLayoutEffect:L.useEffect;function yv(e,t,n,r,i){const{visualElement:a}=L.useContext(So),s=L.useContext(jp),o=L.useContext(B0),u=L.useContext(qp).reducedMotion,l=L.useRef(null);r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:u}));const c=l.current,d=L.useContext(Rm);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&vv(l.current,n,i,d);const p=L.useRef(!1);L.useInsertionEffect(()=>{c&&p.current&&c.update(n,o)});const f=n[Nm],b=L.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return bv(()=>{c&&(p.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),b.current&&c.animationState&&c.animationState.animateChanges())}),L.useEffect(()=>{c&&(!b.current&&c.animationState&&c.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1),c.enteringChildren=void 0)}),c}function vv(e,t,n,r){const{layoutId:i,layout:a,drag:s,dragConstraints:o,layoutScroll:u,layoutRoot:l,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mm(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||o&&pi(o),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:u,layoutRoot:l})}function Mm(e){if(e)return e.options.allowProjection!==!1?e.projection:Mm(e.parent)}function Tv(e,{forwardMotionProps:t=!1}={},n,r){n&&fv(n);const i=_0(e)?hv:dv;function a(o,u){let l;const c={...L.useContext(qp),...o,layoutId:xv(o)},{isStatic:d}=c,p=ry(o),f=i(o,d);if(!d&&z0){Ev();const b=Sv(c);l=b.MeasureLayout,p.visualElement=yv(e,f,c,r,b.ProjectionNode)}return k.jsxs(So.Provider,{value:p,children:[l&&p.visualElement?k.jsx(l,{visualElement:p.visualElement,...c}):null,ov(e,o,mv(f,p.visualElement,u),f,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=L.forwardRef(a);return s[pv]=e,s}function xv({layoutId:e}){const t=L.useContext(Vp).id;return t&&e!==void 0?t+"-"+e:e}function Ev(e,t){L.useContext(jp).strict}function Sv(e){const{drag:t,layout:n}=Ii;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Dm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wv({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Av(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jo(e){return e===void 0||e===1}function fl({scale:e,scaleX:t,scaleY:n}){return!Jo(e)||!Jo(t)||!Jo(n)}function jr(e){return fl(e)||Pm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pm(e){return qd(e.x)||qd(e.y)}function qd(e){return e&&e!=="0%"}function to(e,t,n){const r=e-n,i=t*r;return n+i}function $d(e,t,n,r,i){return i!==void 0&&(e=to(e,i,r)),to(e,n,r)+t}function pl(e,t=0,n=1,r,i){e.min=$d(e.min,t,n,r,i),e.max=$d(e.max,t,n,r,i)}function Lm(e,{x:t,y:n}){pl(e.x,t.translate,t.scale,t.originPoint),pl(e.y,n.translate,n.scale,n.originPoint)}const Wd=.999999999999,Yd=1.0000000000001;function Cv(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let o=0;oWd&&(t.x=1),t.yWd&&(t.y=1)}function mi(e,t){e.min=e.min+t,e.max=e.max+t}function Gd(e,t,n,r,i=.5){const a=mt(e.min,e.max,i);pl(e,t,n,a,r)}function gi(e,t){Gd(e.x,t.x,t.scaleX,t.scale,t.originX),Gd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Om(e,t){return Dm(Av(e.getBoundingClientRect(),t))}function kv(e,t,n){const r=Om(e,n),{scroll:i}=t;return i&&(mi(r.x,i.offset.x),mi(r.y,i.offset.y)),r}const Xd=()=>({translate:0,scale:1,origin:0,originPoint:0}),bi=()=>({x:Xd(),y:Xd()}),Kd=()=>({min:0,max:0}),Ct=()=>({x:Kd(),y:Kd()}),ml={current:null},_m={current:!1};function Iv(){if(_m.current=!0,!!z0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ml.current=e.matches;e.addEventListener("change",t),t()}else ml.current=!1}const Nv=new WeakMap;function Rv(e,t,n){for(const r in t){const i=t[r],a=n[r];if(zt(i))e.addValue(r,i);else if(zt(a))e.addValue(r,ki(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,ki(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=N0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=tn.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),_m.current||Iv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ml.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Cr(this.notifyUpdate),Cr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Oi.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&<.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ii){const n=Ii[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ki(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ip(r)||Rp(r))?r=parseFloat(r):!$9(r)&&kr.test(n)&&(r=mm(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=F0(this.props,n,this.presenceContext?.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!zt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new m0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){D0.render(this.render)}}class Bm extends Mv{constructor(){super(...arguments),this.KeyframeResolver=D9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Fm(e,{style:t,vars:n},r,i){const a=e.style;let s;for(s in t)a[s]=t[s];i?.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function Dv(e){return window.getComputedStyle(e)}class Pv extends Bm{constructor(){super(...arguments),this.type="html",this.renderInstance=Fm}readValueFromInstance(t,n){if(Oi.has(n))return this.projection?.isProjecting?sl(n):Qy(t,n);{const r=Dv(t),i=(T0(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Om(t,n)}build(t,n,r){L0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return H0(t,n,r)}}const Hm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Lv(e,t,n,r){Fm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Hm.has(i)?i:U0(i),t.attrs[i])}class Ov extends Bm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oi.has(n)){const r=pm(n);return r&&r.default||0}return n=Hm.has(n)?n:U0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Im(t,n,r)}build(t,n,r){Sm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Lv(t,n,r,i)}mount(t){this.isSVGTag=Am(t.tagName),super.mount(t)}}const _v=(e,t)=>_0(e)?new Ov(t):new Pv(t,{allowProjection:e!==L.Fragment});function vi(e,t,n){const r=e.getProps();return F0(r,t,n!==void 0?n:r.custom,e)}const gl=e=>Array.isArray(e);function Bv(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ki(n))}function Fv(e){return gl(e)?e[e.length-1]||0:e}function Hv(e,t){const n=vi(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const s in a){const o=Fv(a[s]);Bv(e,s,o)}}function zv(e){return!!(zt(e)&&e.add)}function bl(e,t){const n=e.getValue("willChange");if(zv(n))return n.add(t);if(!n&&lr.WillChange){const r=new lr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zm(e){return e.props[Nm]}const Uv=e=>e!==null;function Vv(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uv),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[a]}const jv={type:"spring",stiffness:500,damping:25,restSpeed:10},qv=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$v={type:"keyframes",duration:.8},Wv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yv=(e,{keyframes:t})=>t.length>2?$v:Oi.has(e)?e.startsWith("scale")?qv(t[1]):jv:Wv;function Gv({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const V0=(e,t,n,r={},i,a)=>s=>{const o=R0(r,e)||{},u=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Vn(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-l,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:i};Gv(o)||Object.assign(c,Yv(e,c)),c.duration&&(c.duration=Vn(c.duration)),c.repeatDelay&&(c.repeatDelay=Vn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(dl(c),c.delay===0&&(d=!0)),(lr.instantAnimations||lr.skipAnimations)&&(d=!0,dl(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&t.get()!==void 0){const p=Vv(c.keyframes,o);if(p!==void 0){lt.update(()=>{c.onUpdate(p),c.onComplete()});return}}return o.isSync?new I0(c):new T9(c)};function Xv({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Um(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=t;r&&(a=r);const u=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const c in o){const d=e.getValue(c,e.latestValues[c]??null),p=o[c];if(p===void 0||l&&Xv(l,c))continue;const f={delay:n,...R0(a||{},c)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===b&&!f.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=zm(e);if(y){const w=window.MotionHandoffAnimation(y,c,lt);w!==null&&(f.startTime=w,v=!0)}}bl(e,c),d.start(V0(c,d,p,e.shouldReduceMotion&&dm.has(c)?{type:!1}:f,e,v));const E=d.animation;E&&u.push(E)}return s&&Promise.all(u).then(()=>{lt.update(()=>{s&&Hv(e,s)})}),u}function Vm(e,t,n,r=0,i=1){const a=Array.from(e).sort((l,c)=>l.sortNodePosition(c)).indexOf(t),s=e.size,o=(s-1)*r;return typeof n=="function"?n(a,s):i===1?a*r:o-a*r}function yl(e,t,n={}){const r=vi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Um(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:d}=i;return Kv(e,t,u,l,c,d,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,l]=o==="beforeChildren"?[a,s]:[s,a];return u().then(()=>l())}else return Promise.all([a(),s(n.delay)])}function Kv(e,t,n=0,r=0,i=0,a=1,s){const o=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),o.push(yl(u,t,{...s,delay:n+(typeof r=="function"?0:r)+Vm(e.variantChildren,u,r,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(o)}function Qv(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>yl(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=yl(e,t,n);else{const i=typeof t=="function"?vi(e,t,n.custom):t;r=Promise.all(Um(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>Qv(e,n,r)))}function nT(e){let t=tT(e),n=Zd(),r=!0;const i=u=>(l,c)=>{const d=vi(e,c,u==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...b}=d;l={...l,...b,...f}}return l};function a(u){t=u(e)}function s(u){const{props:l}=e,c=qm(e.parent)||{},d=[],p=new Set;let f={},b=1/0;for(let E=0;Eb&&I,V=!1;const P=Array.isArray(x)?x:[x];let $=P.reduce(i(y),{});M===!1&&($={});const{prevResolvedValues:W={}}=w,G={...W,...$},q=ee=>{z=!0,p.has(ee)&&(V=!0,p.delete(ee)),w.needsAnimating[ee]=!0;const de=e.getValue(ee);de&&(de.liveStyle=!1)};for(const ee in G){const de=$[ee],oe=W[ee];if(f.hasOwnProperty(ee))continue;let R=!1;gl(de)&&gl(oe)?R=!jm(de,oe):R=de!==oe,R?de!=null?q(ee):p.add(ee):de!==void 0&&p.has(ee)?q(ee):w.protectedKeys[ee]=!0}w.prevProp=x,w.prevResolvedValues=$,w.isActive&&(f={...f,...$}),r&&e.blockInitialAnimation&&(z=!1);const Y=C&&H;z&&(!Y||V)&&d.push(...P.map(ee=>{const de={type:y};if(typeof ee=="string"&&r&&!Y&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,R=vi(oe,ee);if(oe.enteringChildren&&R){const{delayChildren:Ce}=R.transition||{};de.delay=Vm(oe.enteringChildren,e,Ce)}}return{animation:ee,options:de}}))}if(p.size){const E={};if(typeof l.initial!="boolean"){const y=vi(e,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(E.transition=y.transition)}p.forEach(y=>{const w=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),E[y]=w??null}),d.push({animation:E})}let v=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(u,l){if(n[u].isActive===l)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(u,l)),n[u].isActive=l;const c=s(u);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:s,setActive:o,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Zd(),r=!0}}}function rT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jm(t,e):!1}function _r(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zd(){return{animate:_r(!0),whileInView:_r(),whileHover:_r(),whileTap:_r(),whileDrag:_r(),whileFocus:_r(),exit:_r()}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iT extends Dr{constructor(t){super(t),t.animationState||(t.animationState=nT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aT=0;class sT extends Dr{constructor(){super(...arguments),this.id=aT++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const oT={animation:{Feature:iT},exit:{Feature:sT}};function _a(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ka(e){return{point:{x:e.pageX,y:e.pageY}}}const uT=e=>t=>P0(t)&&e(t,Ka(t));function fa(e,t,n,r){return _a(e,t,uT(n),r)}const $m=1e-4,lT=1-$m,cT=1+$m,Wm=.01,dT=0-Wm,hT=0+Wm;function Yt(e){return e.max-e.min}function fT(e,t,n){return Math.abs(e-t)<=n}function Jd(e,t,n,r=.5){e.origin=r,e.originPoint=mt(t.min,t.max,e.origin),e.scale=Yt(n)/Yt(t),e.translate=mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lT&&e.scale<=cT||isNaN(e.scale))&&(e.scale=1),(e.translate>=dT&&e.translate<=hT||isNaN(e.translate))&&(e.translate=0)}function pa(e,t,n,r){Jd(e.x,t.x,n.x,r?r.originX:void 0),Jd(e.y,t.y,n.y,r?r.originY:void 0)}function eh(e,t,n){e.min=n.min+t.min,e.max=e.min+Yt(t)}function pT(e,t,n){eh(e.x,t.x,n.x),eh(e.y,t.y,n.y)}function th(e,t,n){e.min=t.min-n.min,e.max=e.min+Yt(t)}function ma(e,t,n){th(e.x,t.x,n.x),th(e.y,t.y,n.y)}function yn(e){return[e("x"),e("y")]}const Ym=({current:e})=>e?e.ownerDocument.defaultView:null,nh=(e,t)=>Math.abs(e-t);function mT(e,t){const n=nh(e.x,t.x),r=nh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Gm{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=tu(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,b=mT(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!b)return;const{point:v}=p,{timestamp:E}=Ft;this.history.push({...v,timestamp:E});const{onStart:y,onMove:w}=this.handlers;f||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=eu(f,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:b,onSessionEnd:v,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=tu(p.type==="pointercancel"?this.lastMoveEventInfo:eu(f,this.transformPagePoint),this.history);this.startEvent&&b&&b(p,y),v&&v(p,y)},!P0(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const o=Ka(t),u=eu(o,this.transformPagePoint),{point:l}=u,{timestamp:c}=Ft;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,tu(u,this.history)),this.removeListeners=Ya(fa(this.contextWindow,"pointermove",this.handlePointerMove),fa(this.contextWindow,"pointerup",this.handlePointerUp),fa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}}function eu(e,t){return t?{point:t(e.point)}:e}function rh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tu({point:e},t){return{point:e,delta:rh(e,Xm(t)),offset:rh(e,gT(t)),velocity:bT(t,.1)}}function gT(e){return e[0]}function Xm(e){return e[e.length-1]}function bT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Vn(t)));)n--;if(!r)return{x:0,y:0};const a=jn(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function yT(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?mt(n,e,r.max):Math.min(e,n)),e}function ih(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vT(e,{top:t,left:n,bottom:r,right:i}){return{x:ih(e.x,n,i),y:ih(e.y,t,r)}}function ah(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Ma(t.min,t.max-r,e.min):r>i&&(n=Ma(e.min,e.max-i,t.min)),ur(0,1,n)}function ET(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vl=.35;function ST(e=vl){return e===!1?e=0:e===!0&&(e=vl),{x:sh(e,"left","right"),y:sh(e,"top","bottom")}}function sh(e,t,n){return{min:oh(e,t),max:oh(e,n)}}function oh(e,t){return typeof e=="number"?e:e[t]||0}const wT=new WeakMap;class AT{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ka(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:b,onDragStart:v}=this.getProps();if(f&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=B9(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(y=>{let w=this.getAxisMotionValue(y).get()||0;if(qn.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const I=x.layout.layoutBox[y];I&&(w=Yt(I)*(parseFloat(w)/100))}}this.originPoint[y]=w}),v&<.postRender(()=>v(d,p)),bl(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},o=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:f,dragDirectionLock:b,onDirectionLock:v,onDrag:E}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=p;if(b&&this.currentDirection===null){this.currentDirection=CT(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),E&&E(d,p)},u=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>yn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Gm(t,{onSessionStart:a,onStart:s,onMove:o,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Ym(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&<.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!vs(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=yT(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&pi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=vT(r.layoutBox,t):this.constraints=!1,this.elastic=ST(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=ET(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=kv(r,i.root,this.visualElement.getTransformPagePoint());let s=TT(i.layout.layoutBox,a);if(n){const o=n(wv(s));this.hasMutatedConstraints=!!o,o&&(s=Dm(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),u=this.constraints||{},l=yn(c=>{if(!vs(c,n,this.currentDirection))return;let d=u&&u[c]||{};s&&(d={min:0,max:0});const p=i?200:1e6,f=i?40:1e7,b={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,b)});return Promise.all(l).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bl(this.visualElement,t),r.start(V0(t,r,0,n,this.visualElement,!1))}stopAnimation(){yn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yn(n=>{const{drag:r}=this.getProps();if(!vs(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n];a.set(t[n]-mt(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};yn(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const u=o.get();i[s]=xT({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yn(s=>{if(!vs(s,t,null))return;const o=this.getAxisMotionValue(s),{min:u,max:l}=this.constraints[s];o.set(mt(u,l,i[s]))})}addListeners(){if(!this.visualElement.current)return;wT.set(this.visualElement,this);const t=this.visualElement.current,n=fa(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();pi(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),lt.read(r);const s=_a(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(yn(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())}));return()=>{s(),n(),a(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=vl,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function vs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kT extends Dr{constructor(t){super(t),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new AT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}unmount(){this.removeGroupControls(),this.removeListeners()}}const uh=e=>(t,n)=>{e&<.postRender(()=>e(t,n))};class IT extends Dr{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(t){this.session=new Gm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ym(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:uh(t),onStart:uh(n),onMove:r,onEnd:(a,s)=>{delete this.session,i&<.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=fa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function NT(e=!0){const t=L.useContext(B0);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=L.useId();L.useEffect(()=>{if(e)return i(a)},[e]);const s=L.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const Us={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ki={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ae.test(e))e=parseFloat(e);else return e;const n=lh(e,t.target.x),r=lh(e,t.target.y);return`${n}% ${r}%`}},RT={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=kr.parse(e);if(i.length>5)return r;const a=kr.createTransformer(e),s=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=u;const l=mt(o,u,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),a(i)}};let nu=!1;class MT extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;W9(DT),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),nu&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Us.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,nu=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||lt.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),D0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;nu=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Km(e){const[t,n]=NT(),r=L.useContext(Vp);return k.jsx(MT,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(Rm),isPresent:t,safeToRemove:n})}const DT={borderRadius:{...Ki,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ki,borderTopRightRadius:Ki,borderBottomLeftRadius:Ki,borderBottomRightRadius:Ki,boxShadow:RT};function PT(e,t,n){const r=zt(e)?e:ki(e);return r.start(V0("",r,t,n)),r.animation}const LT=(e,t)=>e.depth-t.depth;class OT{constructor(){this.children=[],this.isDirty=!1}add(t){d0(this.children,t),this.isDirty=!0}remove(t){h0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LT),this.isDirty=!1,this.children.forEach(t)}}function _T(e,t){const n=tn.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Cr(r),e(a-t))};return lt.setup(r,!0),()=>Cr(r)}const Qm=["TopLeft","TopRight","BottomLeft","BottomRight"],BT=Qm.length,ch=e=>typeof e=="string"?parseFloat(e):e,dh=e=>typeof e=="number"||Ae.test(e);function FT(e,t,n,r,i,a){i?(e.opacity=mt(0,n.opacity??1,HT(r)),e.opacityExit=mt(t.opacity??1,0,zT(r))):a&&(e.opacity=mt(t.opacity??1,n.opacity??1,r));for(let s=0;srt?1:n(Ma(e,t,r))}function fh(e,t){e.min=t.min,e.max=t.max}function bn(e,t){fh(e.x,t.x),fh(e.y,t.y)}function ph(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function mh(e,t,n,r,i){return e-=t,e=to(e,1/n,r),i!==void 0&&(e=to(e,1/i,r)),e}function UT(e,t=0,n=1,r=.5,i,a=e,s=e){if(qn.test(t)&&(t=parseFloat(t),t=mt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=mt(a.min,a.max,r);e===a&&(o-=t),e.min=mh(e.min,t,n,o,i),e.max=mh(e.max,t,n,o,i)}function gh(e,t,[n,r,i],a,s){UT(e,t[n],t[r],t[i],t.scale,a,s)}const VT=["x","scaleX","originX"],jT=["y","scaleY","originY"];function bh(e,t,n,r){gh(e.x,t,VT,n?n.x:void 0,r?r.x:void 0),gh(e.y,t,jT,n?n.y:void 0,r?r.y:void 0)}function yh(e){return e.translate===0&&e.scale===1}function Jm(e){return yh(e.x)&&yh(e.y)}function vh(e,t){return e.min===t.min&&e.max===t.max}function qT(e,t){return vh(e.x,t.x)&&vh(e.y,t.y)}function Th(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function e2(e,t){return Th(e.x,t.x)&&Th(e.y,t.y)}function xh(e){return Yt(e.x)/Yt(e.y)}function Eh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $T{constructor(){this.members=[]}add(t){d0(this.members,t),t.scheduleRender()}remove(t){if(h0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function WT(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,s=n?.z||0;if((i||a||s)&&(r=`translate3d(${i}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:p,skewX:f,skewY:b}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(r+=`scale(${o}, ${u})`),r||"none"}const ru=["","X","Y","Z"],YT=1e3;let GT=0;function iu(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function t2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t2(r)}function n2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t?.()){this.id=GT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QT),this.nodes.forEach(tx),this.nodes.forEach(nx),this.nodes.forEach(ZT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;lt.read(()=>{d=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=_T(p,250),Us.hasAnimatedSinceResize&&(Us.hasAnimatedSinceResize=!1,this.nodes.forEach(Ah)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||l.getDefaultTransition()||ox,{onLayoutAnimationStart:v,onLayoutAnimationComplete:E}=l.getProps(),y=!this.targetLayout||!e2(this.targetLayout,f),w=!d&&p;if(this.options.layoutRoot||this.resumeFrom||w||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...R0(b,"layout"),onPlay:v,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else d||Ah(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Cr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rx),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&t2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Yt(this.snapshot.measuredBox.x)&&!Yt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{const M=I/1e3;Ch(d.x,s.x,M),Ch(d.y,s.y,M),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ma(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ax(this.relativeTarget,this.relativeTargetOrigin,p,M),x&&qT(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ct()),bn(x,this.relativeTarget)),v&&(this.animationValues=c,FT(c,l,this.latestValues,M,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Us.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ki(0)),this.currentAnimation=PT(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(YT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:u,layout:l,latestValues:c}=s;if(!(!o||!u||!l)){if(this!==s&&this.layout&&l&&r2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Ct();const d=Yt(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+d;const p=Yt(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}bn(o,u),gi(o,c),pa(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new $T),this.sharedNodes.get(s).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const l={};u.z&&iu("z",s,l,this.animationValues);for(let c=0;cs.currentAnimation?.stop()),this.root.nodes.forEach(Sh),this.root.sharedNodes.clear()}}}function XT(e){e.updateLayout()}function KT(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?yn(c=>{const d=a?t.measuredBox[c]:t.layoutBox[c],p=Yt(d);d.min=n[c].min,d.max=d.min+p}):r2(i,t.layoutBox,n)&&yn(c=>{const d=a?t.measuredBox[c]:t.layoutBox[c],p=Yt(n[c]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const s=bi();pa(s,n,t.layoutBox);const o=bi();a?pa(o,e.applyTransform(r,!0),t.measuredBox):pa(o,n,t.layoutBox);const u=!Jm(s);let l=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:p}=c;if(d&&p){const f=Ct();ma(f,t.layoutBox,d.layoutBox);const b=Ct();ma(b,n,p.layoutBox),e2(f,b)||(l=!0),c.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JT(e){e.clearSnapshot()}function Sh(e){e.clearMeasurements()}function wh(e){e.isLayoutDirty=!1}function ex(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ah(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tx(e){e.resolveTargetDelta()}function nx(e){e.calcProjection()}function rx(e){e.resetSkewAndRotation()}function ix(e){e.removeLeadSnapshot()}function Ch(e,t,n){e.translate=mt(t.translate,0,n),e.scale=mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kh(e,t,n,r){e.min=mt(t.min,n.min,r),e.max=mt(t.max,n.max,r)}function ax(e,t,n,r){kh(e.x,t.x,n.x,r),kh(e.y,t.y,n.y,r)}function sx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ox={duration:.45,ease:[.4,0,.1,1]},Ih=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nh=Ih("applewebkit/")&&!Ih("chrome/")?Math.round:Sn;function Rh(e){e.min=Nh(e.min),e.max=Nh(e.max)}function ux(e){Rh(e.x),Rh(e.y)}function r2(e,t,n){return e==="position"||e==="preserve-aspect"&&!fT(xh(t),xh(n),.2)}function lx(e){return e!==e.root&&e.scroll?.wasRoot}const cx=n2({attachResizeListener:(e,t)=>_a(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),au={current:void 0},i2=n2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!au.current){const e=new cx({});e.mount(window),e.setOptions({layoutScroll:!0}),au.current=e}return au.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dx={pan:{Feature:IT},drag:{Feature:kT,ProjectionNode:i2,MeasureLayout:Km}};function Mh(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&<.postRender(()=>a(t,Ka(t)))}class hx extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=F9(t,(n,r)=>(Mh(this.node,r,"Start"),i=>Mh(this.node,i,"End"))))}unmount(){}}class fx extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ya(_a(this.node.current,"focus",()=>this.onFocus()),_a(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Dh(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&<.postRender(()=>a(t,Ka(t)))}class px extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=V9(t,(n,r)=>(Dh(this.node,r,"Start"),(i,{success:a})=>Dh(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Tl=new WeakMap,su=new WeakMap,mx=e=>{const t=Tl.get(e.target);t&&t(e)},gx=e=>{e.forEach(mx)};function bx({root:e,...t}){const n=e||document;su.has(n)||su.set(n,{});const r=su.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gx,{root:e,...t})),r[i]}function yx(e,t,n){const r=bx(t);return Tl.set(e,n),r.observe(e),()=>{Tl.delete(e),r.unobserve(e)}}const vx={some:0,all:1};class Tx extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:vx[i]},o=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),p=l?c:d;p&&p(u)};return yx(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xx(t,n))&&this.startObserver()}unmount(){}}function xx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ex={inView:{Feature:Tx},tap:{Feature:px},focus:{Feature:fx},hover:{Feature:hx}},Sx={layout:{ProjectionNode:i2,MeasureLayout:Km}},wx={...oT,...Ex,...dx,...Sx};function Ax(e,t){return Tv(e,t,wx,_v)}const j0=Ax("div"),Cx=ue(Ge)(({theme:e})=>{const{spacing:t}=e;return{position:"relative",flex:1,gap:t(1.5),overflowX:"hidden",overflowY:"auto"}}),kx=ue(pp)(({theme:e,variant:t})=>{const{spacing:n}=e;return{gap:n(t==="list"?1.5:0)}}),Ix=ue(Fb)(({theme:e})=>{const{spacing:t}=e;return{flex:"none",gap:t(1),backgroundColor:"transparent",padding:t(2),overflow:"visible"}}),Nx=ue(Ub)(({theme:e})=>({color:"inherit",fontSize:"1.5rem",width:"1em",height:"1em",display:"inline-flex",alignItems:"center",justifyContent:"center"})),Rx=ue($b)(({theme:e})=>({position:"relative",display:"block",height:"100%"})),Mx=ue(j0)(({theme:e,variant:t})=>({fontSize:t==="list"?"1.5rem":"1em",width:"1em",height:"1em",display:"inline-flex",alignItems:"center",justifyContent:"center",transformOrigin:"center"})),Dx={waiting:"info",available:"success",failed:"error"},Px={waiting:I8,available:g8,failed:j1},Lx=ue(Ar)(({theme:e})=>{const{spacing:t}=e;return{position:"relative",width:"1.5rem",height:"3.25rem",overflow:"hidden"}}),Ox=({animate:e})=>k.jsx(Lx,{children:k.jsx("svg",{style:{position:"absolute",top:0,left:"50%",transform:"translateX(-50%)"},width:2,height:256,viewBox:"0 0 2 256",fill:"none",children:k.jsx("line",{x1:"1",y1:"0",x2:"1",y2:256,stroke:"#9B9B9B",strokeWidth:"2",strokeDasharray:"4",children:e&&k.jsx("animate",{attributeName:"stroke-dashoffset",from:256,to:"0",dur:`${256/32}s`,repeatCount:"indefinite"})})})}),Ph=({variant:e,node:t})=>{const{id:n,status:r,gpuName:i,gpuMemory:a}=t||{status:"waiting"},{palette:s}=ja(),{main:o,lighter:u}=r==="waiting"?{main:s.grey[800],lighter:s.grey[250]}:s[Dx[r]],l=r==="failed"?.2:void 0,c=Px[r];return k.jsxs(Ix,{component:e==="list"?mo:Ar,variant:"outlined",sx:{opacity:l,padding:e==="menu"?0:void 0,height:e==="menu"?"2.5rem":void 0},children:[k.jsx(Nx,{children:k.jsx(E8,{})}),k.jsx(Rx,{children:t&&k.jsx(Ge,{sx:e==="menu"?{position:"absolute",top:"50%",left:0,right:0,transform:"translateY(-50%)"}:void 0,children:k.jsxs(Ke,{variant:"body1",sx:{fontWeight:500},children:[i," ",a,"GB"]})})||k.jsx(B7,{width:"8rem",height:"1.25rem"})}),t&&k.jsxs(Mx,{sx:{color:o},...r==="waiting"&&{animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:2}},variant:e,children:[e==="list"&&k.jsx(c,{size:18}),e==="menu"&&k.jsx(_8,{size:10})]})]})},Ts=({variant:e="list",...t})=>{const[{clusterInfo:{initNodesNumber:n},nodeInfoList:r}]=qa(),[{status:i}]=Zl(),{length:a}=r;return k.jsx(Cx,{...t,children:k.jsxs(kx,{variant:e,children:[r.map((s,o)=>[e==="menu"&&o>0&&k.jsx(Ox,{animate:i==="generating"},`${s.id}-dash`),k.jsx(Ph,{variant:e,node:s},s.id)]),n>a&&Array.from({length:n-a}).map((s,o)=>k.jsx(Ph,{variant:e},o))]})})},_x={small:1,medium:1.25,large:2.25},Bx=ue(j0)(({theme:e,size:t})=>{const n=`${_x[t]}rem`;return{position:"relative",width:n,height:n,display:"inline-flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"}}),ou=ue(j0)(({theme:e})=>({flex:1,aspectRatio:1,borderRadius:"50%",backgroundColor:"currentColor"})),uu={pulse:{scale:[0,.6,0,0],keyTimes:[0,.3,.6,1],transition:{duration:2,repeat:1/0,ease:"linear"}}},Fx={staggerChildren:.25,staggerDirection:1},Hx=L.forwardRef(({size:e="medium"},t)=>k.jsxs(Bx,{ref:t,size:e,animate:"pulse",transition:Fx,children:[k.jsx(ou,{variants:uu},1),k.jsx(ou,{variants:uu},2),k.jsx(ou,{variants:uu},3)]}));function Lh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function a2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ux=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vx={};function Oh(e,t){return(Vx.jsx?Ux:zx).test(e)}const jx=/[ \t\n\f\r]/g;function qx(e){return typeof e=="object"?e.type==="text"?_h(e.value):!1:_h(e)}function _h(e){return e.replace(jx,"")===""}let Qa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Qa.prototype.normal={};Qa.prototype.property={};Qa.prototype.space=void 0;function s2(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qa(n,r,t)}function Ba(e){return e.toLowerCase()}let an=class{constructor(t,n){this.attribute=n,this.property=t}};an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let $x=0;const Le=ti(),Mt=ti(),xl=ti(),ae=ti(),tt=ti(),Ti=ti(),un=ti();function ti(){return 2**++$x}const El=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Mt,commaOrSpaceSeparated:un,commaSeparated:Ti,number:ae,overloadedBoolean:xl,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),lu=Object.keys(El);let q0=class extends an{constructor(t,n,r,i){let a=-1;if(super(t,n),Bh(this,"space",i),typeof r=="number")for(;++a4&&n.slice(0,4)==="data"&&Kx.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Fh,Zx);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Fh.test(a)){let s=a.replace(Xx,Qx);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=q0}return new i(r,t)}function Qx(e){return"-"+e.toLowerCase()}function Zx(e){return e.charAt(1).toUpperCase()}const Co=s2([o2,Wx,c2,d2,h2],"html"),Bi=s2([o2,Yx,c2,d2,h2],"svg");function Hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function f2(e){return e.join(" ").trim()}var oi={},cu,zh;function Jx(){if(zh)return cu;zh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=` + */const O8=[["path",{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",key:"svg-0"}]],_8=mn("filled","circle-filled","CircleFilled",O8),B8={primary:Os,secondary:Os,info:Os,error:Uc,warning:Uc,success:Gg},F8=e=>{const{open:t,onClose:n=()=>{},titleId:r,title:i,contentId:a,content:s,color:o="primary",titleIconColor:u="warning",titleIcon:l=!0,cancelLabel:c,onCancel:d=()=>{},confirmLabel:p,onConfirm:f=()=>{},submitLabel:b,onSubmitValid:v,onSubmitInvalid:E,handleSubmit:y,secondaryAction:w,...x}=e,I=B8[o],[M,C]=L.useState(!1),H=W=>!(W===!1||typeof W=="object"&&W.closeDialog===!1),z=W=>async(...G)=>{if(!M)try{const q=W(...G);if(q instanceof Promise){C(!0);const Y=await q;C(!1),H(Y)&&n()}else H(q)&&n()}catch(q){C(!1),console.error("Error in dialog action:",q)}};let V;const P=[];c&&P.push({key:"cancel",children:c,color:"secondary",onClick:z(d),loading:M}),p&&P.push({key:"confirm",children:p,color:o,onClick:z(f),loading:M}),b&&(P.push({key:"submit",children:b,type:"submit",loading:M}),y&&v&&(V={onSubmit:W=>{W.preventDefault(),W.stopPropagation(),!M&&(C(!0),y(async(...G)=>{try{const q=await v(...G);C(!1),H(q)&&n()}catch(q){C(!1),console.error("Error in form submission:",q)}},async(...G)=>{try{await E?.(...G)}catch(q){console.error("Error in form validation:",q)}finally{C(!1)}})())}}));const $=()=>{M||n()};return k.jsxs(tb,{open:t,onClose:$,"aria-labelledby":r,"aria-describedby":a,...x,component:V&&"form"||void 0,...V,slotProps:{paper:{sx:{p:1.5}}},children:[k.jsxs(mb,{id:!I&&r||void 0,children:[l==="form"&&k.jsx(Yg,{})||l===!0&&k.jsx(zc,{variant:"circle",color:u,children:k.jsx(I,{})})||k.jsx(zc,{variant:"circle",color:u,children:l})||void 0,!l&&i,k.jsx(Qr,{size:"small",onClick:$,children:k.jsx(j1,{size:"1.25rem"})})]}),k.jsxs(ub,{children:[l&&k.jsx(Ke,{variant:"subtitle1",id:r,sx:{fontSize:"1.125rem",fontWeight:600,mr:"auto"},children:i}),k.jsx(hb,{id:a,children:s})]}),P.length>0&&k.jsxs(ab,{children:[w,P.map(W=>L.createElement(q1,{...W,key:W.key,...P.length===1&&{fullWidth:!0}}))]})]})},Bs=(e,t)=>{const[n,r]=L.useState(!1),i=k.jsx(F8,{...e,open:n,onClose:()=>{r(!1),e.onClose?.()}}),a=L.useMemo(()=>({open:()=>r(!0),close:()=>r(!1)}),[]);return[i,a]},H8=()=>k.jsxs("svg",{width:"100",height:"21",viewBox:"0 0 100 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("path",{d:"M25.9027 21C24.2555 21 22.9819 20.6707 22.082 20.012C21.1821 19.3687 20.6482 18.4344 20.4805 17.209H23.7064C23.9352 18.1586 24.6825 18.6335 25.9485 18.6335C26.8789 18.6335 27.5576 18.4037 27.9847 17.9442C28.4118 17.5 28.6253 16.8184 28.6253 15.8993V14.0383C28.3203 14.5897 27.8779 15.0339 27.2984 15.3709C26.7188 15.6926 26.0324 15.8534 25.2393 15.8534C24.2478 15.8534 23.3556 15.6313 22.5624 15.1871C21.7693 14.7276 21.1439 14.0536 20.6864 13.1652C20.2288 12.2768 20 11.2046 20 9.94858C20 8.69256 20.2288 7.62035 20.6864 6.73195C21.1439 5.82823 21.7693 5.15427 22.5624 4.71007C23.3556 4.25055 24.2478 4.02079 25.2393 4.02079C25.9866 4.02079 26.6654 4.18928 27.2755 4.52626C27.8856 4.86324 28.3355 5.29978 28.6253 5.83589V4.36543H31.7826V15.7845C31.7826 17.3928 31.3021 18.6641 30.3412 19.5985C29.3803 20.5328 27.9008 21 25.9027 21ZM25.9256 13.4409C26.7493 13.4409 27.4127 13.1116 27.9161 12.453C28.4194 11.7943 28.6711 10.9519 28.6711 9.9256C28.6711 8.89934 28.4194 8.06455 27.9161 7.42123C27.4127 6.76258 26.7493 6.43326 25.9256 6.43326C25.041 6.43326 24.3699 6.73961 23.9123 7.3523C23.4547 7.96499 23.2259 8.82276 23.2259 9.9256C23.2259 11.0284 23.4547 11.8939 23.9123 12.5219C24.3699 13.1346 25.041 13.4409 25.9256 13.4409Z",fill:"black"}),k.jsx("path",{d:"M33.39 16.1751V4.36543H36.4787V6.91575C36.8905 5.81291 37.4091 5.03939 38.0344 4.59519C38.6598 4.15098 39.5368 3.95952 40.6655 4.02079V6.98468C40.3299 6.95405 40.0783 6.93873 39.9105 6.93873C39.4682 6.93873 39.0487 7 38.6522 7.12254C37.2489 7.59737 36.5473 9.01422 36.5473 11.3731V16.1751H33.39Z",fill:"black"}),k.jsx("path",{d:"M44.1585 16.4967C42.9382 16.4967 41.9316 16.1751 41.1384 15.5317C40.3606 14.8884 39.9716 14 39.9716 12.8665C39.9716 11.9628 40.2157 11.2659 40.7037 10.7757C41.2071 10.2702 41.7714 9.9256 42.3968 9.74179C43.0374 9.55799 43.7619 9.41247 44.5703 9.30525L45.5312 9.19037C46.3396 9.09847 46.9192 8.96061 47.27 8.7768C47.636 8.57768 47.8191 8.20241 47.8191 7.65098C47.8191 7.19147 47.6589 6.83917 47.3386 6.59409C47.0183 6.34902 46.5607 6.22648 45.9659 6.22648C45.3863 6.22648 44.9135 6.34902 44.5474 6.59409C44.1966 6.82385 43.9754 7.14551 43.8839 7.55908H40.4978C40.7266 6.44092 41.3138 5.57549 42.2595 4.9628C43.2204 4.33479 44.4788 4.02079 46.0345 4.02079C49.2986 4.02079 50.9306 5.26149 50.9306 7.74289V13.326C50.9306 14.2451 51.0602 15.1947 51.3195 16.1751H48.208C48.086 15.6083 48.0021 15.1105 47.9563 14.6816C47.6055 15.233 47.1022 15.6772 46.4463 16.0142C45.7905 16.3359 45.0278 16.4967 44.1585 16.4967ZM45.1422 14.1532C45.9354 14.1532 46.576 13.8928 47.0641 13.372C47.5674 12.8512 47.8191 12.1849 47.8191 11.3731V10.2013C47.6055 10.4617 47.3386 10.6608 47.0183 10.7987C46.7133 10.9365 46.2709 11.0514 45.6913 11.1433C44.8372 11.2965 44.2195 11.4803 43.8381 11.6947C43.4568 11.8939 43.2662 12.2538 43.2662 12.7746C43.2662 13.2035 43.4416 13.5405 43.7924 13.7856C44.1432 14.0306 44.5932 14.1532 45.1422 14.1532Z",fill:"black"}),k.jsx("path",{d:"M63.6153 0.0919039V16.1751H60.458V14.7965C60.1682 15.3173 59.7183 15.7385 59.1082 16.0602C58.4981 16.3665 57.7964 16.5197 57.0033 16.5197C56.0119 16.5197 55.112 16.267 54.3036 15.7615C53.5105 15.256 52.8775 14.5361 52.4047 13.6018C51.9471 12.6521 51.7183 11.5416 51.7183 10.2702C51.7183 8.99891 51.9471 7.89606 52.4047 6.96171C52.8775 6.01203 53.5105 5.28446 54.3036 4.77899C55.112 4.27352 56.0119 4.02079 57.0033 4.02079C57.7812 4.02079 58.4752 4.18928 59.0853 4.52626C59.7106 4.84792 60.1682 5.2768 60.458 5.81291V0.0919039H63.6153ZM57.6897 14.0383C58.5438 14.0383 59.2226 13.686 59.7259 12.9814C60.2445 12.2768 60.5038 11.3731 60.5038 10.2702C60.5038 9.1674 60.2445 8.26368 59.7259 7.55908C59.2226 6.85449 58.5438 6.50219 57.6897 6.50219C56.7898 6.50219 56.1034 6.83917 55.6306 7.51313C55.173 8.17177 54.9442 9.09081 54.9442 10.2702C54.9442 11.4497 55.173 12.3764 55.6306 13.0503C56.1034 13.709 56.7898 14.0383 57.6897 14.0383Z",fill:"black"}),k.jsx("path",{d:"M68.4939 3.10175H64.9476V0H68.4939V3.10175ZM68.2879 16.1751H65.1764V4.36543H68.2879V16.1751Z",fill:"black"}),k.jsx("path",{d:"M75.1212 14.0842C76.2194 14.0842 76.9515 13.7396 77.3176 13.0503H80.6121C80.2766 14.1225 79.6207 14.9726 78.6446 15.6007C77.6836 16.2133 76.4939 16.5197 75.0755 16.5197C73.7942 16.5197 72.6808 16.2593 71.7351 15.7385C70.8047 15.2177 70.0879 14.4902 69.5845 13.5558C69.0812 12.6061 68.8295 11.5186 68.8295 10.2932C68.8295 9.09847 69.1041 8.02626 69.6532 7.07659C70.2023 6.1116 70.9344 5.36105 71.8495 4.82495C72.7799 4.28884 73.7942 4.02079 74.8924 4.02079C76.0821 4.02079 77.1269 4.30416 78.0268 4.8709C78.942 5.42232 79.6589 6.24179 80.1774 7.32932C80.696 8.40153 80.9629 9.69584 80.9782 11.2123H72.0555C72.1165 12.0853 72.4291 12.7823 72.9935 13.3031C73.5731 13.8239 74.2823 14.0842 75.1212 14.0842ZM75.0068 6.45624C74.2594 6.45624 73.6112 6.70131 73.0621 7.19147C72.5283 7.68162 72.2003 8.29431 72.0783 9.02954H77.8438C77.7065 8.24836 77.3938 7.62801 76.9058 7.16849C76.4177 6.69365 75.7847 6.45624 75.0068 6.45624Z",fill:"black"}),k.jsx("path",{d:"M81.5786 16.1751V4.36543H84.6444V5.85886C84.9647 5.35339 85.407 4.92451 85.9713 4.57221C86.5357 4.2046 87.2449 4.02079 88.0991 4.02079C89.304 4.02079 90.2421 4.39606 90.9132 5.14661C91.5995 5.89716 91.9427 6.95405 91.9427 8.31729V16.1751H88.7854V8.54705C88.7854 7.21444 88.2135 6.54814 87.0695 6.54814C86.4289 6.54814 85.8798 6.80853 85.4222 7.32932C84.9647 7.83479 84.7359 8.593 84.7359 9.60394V16.1751H81.5786Z",fill:"black"}),k.jsx("path",{d:"M98.1011 16.2899C96.9876 16.2899 96.0801 16.0066 95.3785 15.4398C94.6921 14.8731 94.3489 13.9311 94.3489 12.6138V6.7779H92.3356V4.36543H94.3489V0.873086H97.4147V4.36543H99.7712V6.7779H97.4147V12.0853C97.4147 12.698 97.5291 13.1575 97.7579 13.4639C98.0019 13.7549 98.3985 13.9004 98.9476 13.9004C99.2374 13.9004 99.5882 13.8545 100 13.7626V16.0372C99.5272 16.2057 98.8942 16.2899 98.1011 16.2899Z",fill:"black"}),k.jsx("path",{d:"M3 13H0V16H3V13Z",fill:"black"}),k.jsx("path",{d:"M18 0V2.85011L8.94745 16H6V13.1499L15.0521 0H18Z",fill:"black"})]}),Td=()=>k.jsxs("svg",{width:"26",height:"28",viewBox:"0 0 26 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("path",{d:"M7 19H4V22H7V19Z",fill:"black"}),k.jsx("path",{d:"M22 6V8.85011L12.9475 22H10V19.1499L19.0521 6H22Z",fill:"black"})]}),z8=ue(xp)(({theme:e,ownerState:t})=>{const{spacing:n,typography:r,palette:i}=e,{variant:a="outlined"}=t;return{height:a==="outlined"?"4rem":"1lh",paddingInline:n(.5),borderRadius:12,"&:hover":{backgroundColor:"action.hover"},[`.${qr.select}:hover`]:{backgroundColor:"transparent"},...a==="text"&&{...r.h3,fontWeight:r.fontWeightMedium,[`.${qr.select}`]:{fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit",padding:0},"&:hover":{backgroundColor:"transparent"}}}}),U8=ue(l7)(({theme:e})=>({height:"3.25rem",gap:e.spacing(1),borderRadius:10})),V8=ue(Ge)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:e.spacing(1),padding:e.spacing(1),"&:hover":{backgroundColor:"transparent"},pointerEvents:"none"})),Ap=ue("img")(({theme:e})=>({width:"2.25rem",height:"2.25rem",borderRadius:"0.5rem",border:`1px solid ${e.palette.divider}`,objectFit:"cover"})),Cp=ue("span")(({theme:e})=>({...e.typography.subtitle2,fontSize:"0.875rem",lineHeight:"1.125rem",fontWeight:e.typography.fontWeightLight,color:e.palette.text.primary})),kp=ue("span")(({theme:e})=>({...e.typography.body2,fontSize:"0.75rem",lineHeight:"1rem",fontWeight:e.typography.fontWeightLight,color:e.palette.text.secondary})),j8=e=>k.jsxs(U8,{value:e.name,children:[k.jsx(Ap,{src:e.logoUrl}),k.jsxs(Ge,{gap:.25,children:[k.jsx(Cp,{children:e.displayName}),k.jsx(kp,{children:e.name})]})]},e.name),q8=({variant:e="outlined"})=>{const[{modelName:t,modelInfoList:n,clusterInfo:{status:r}},{setModelName:i}]=qa(),[a,{open:s}]=Bs({titleIcon:k.jsx(L8,{}),title:"Switch model",content:k.jsx(Ke,{variant:"body2",color:"text.secondary",children:"The current version of parallax only supports hosting one model at once. Switching the model will terminate your existing chat service. You can restart the current scheduler in your terminal. We will add node rebalancing and dynamic model allocation soon."}),confirmLabel:"Continue"}),o=Ia(u=>{if(r!=="idle"){s();return}i(String(u.target.value))});return k.jsxs(k.Fragment,{children:[k.jsx(z8,{ownerState:{variant:e},input:e==="outlined"?k.jsx(l0,{}):k.jsx(xo,{}),value:t,onChange:o,renderValue:u=>{const l=n.find(c=>c.name===u);if(l)return e==="outlined"?k.jsxs(V8,{children:[k.jsx(Ap,{src:l.logoUrl}),k.jsxs(Ge,{gap:.25,children:[k.jsx(Cp,{children:l.displayName}),k.jsx(kp,{children:l.name})]})]}):l.name},children:n.map(u=>j8(u))}),a]})},$8={"linux/mac":"Linux/MacOS",windows:"Windows"},W8=ue("div")(({theme:e})=>{const{palette:t,spacing:n}=e;return{display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",alignItems:"center",paddingInline:n(2),paddingBlock:n(1.5),gap:n(1),overflow:"hidden",borderRadius:"0.7rem",backgroundColor:t.background.area}}),xd=()=>{const[{clusterInfo:{nodeJoinCommand:e}}]=qa(),[t,n]=L.useState();L.useEffect(()=>{if(t){const i=setTimeout(()=>{n(void 0)},2e3);return()=>clearTimeout(i)}},[t]);const r=Ia(async i=>{await navigator.clipboard.writeText(e[i]),n(i)});return k.jsx(Ge,{gap:1,children:Object.entries(e).map(([i,a],s,o)=>k.jsxs(Ge,{gap:1,children:[o.length>1&&k.jsxs(Ke,{variant:"subtitle2",children:["For ",$8[i]||i,":"]},"label"),k.jsxs(W8,{children:[k.jsx(Ke,{sx:{flex:1,lineHeight:"1.125rem",whiteSpace:"wrap"},variant:"pre",children:a}),k.jsx(Qr,{sx:{flex:"none",fontSize:"1rem"},size:"em",onClick:()=>r(i),children:t===i&&k.jsx(Sp,{})||k.jsx(wp,{})})]},"command")]},i))})};function d0(e,t){e.indexOf(t)===-1&&e.push(t)}function h0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ur=(e,t,n)=>n>t?t:n{};const lr={},Ip=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Np(e){return typeof e=="object"&&e!==null}const Rp=e=>/^0[^.\s]+$/u.test(e);function p0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Sn=e=>e,Y8=(e,t)=>n=>t(e(n)),Ya=(...e)=>e.reduce(Y8),Ma=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class m0{constructor(){this.subscriptions=[]}add(t){return d0(this.subscriptions,t),()=>h0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;ae*1e3,jn=e=>e/1e3;function Mp(e,t){return t?e*(1e3/t):0}const Dp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,G8=1e-7,X8=12;function K8(e,t,n,r,i){let a,s,o=0;do s=t+(n-t)/2,a=Dp(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>G8&&++oK8(a,0,1,e,n);return a=>a===0||a===1?a:Dp(i(a),t,r)}const Pp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lp=e=>t=>1-e(1-t),Op=Ga(.33,1.53,.69,.99),g0=Lp(Op),_p=Pp(g0),Bp=e=>(e*=2)<1?.5*g0(e):.5*(2-Math.pow(2,-10*(e-1))),b0=e=>1-Math.sin(Math.acos(e)),Fp=Lp(b0),Hp=Pp(b0),Q8=Ga(.42,0,1,1),Z8=Ga(0,0,.58,1),zp=Ga(.42,0,.58,1),J8=e=>Array.isArray(e)&&typeof e[0]!="number",Up=e=>Array.isArray(e)&&typeof e[0]=="number",ey={linear:Sn,easeIn:Q8,easeInOut:zp,easeOut:Z8,circIn:b0,circInOut:Hp,circOut:Fp,backIn:g0,backInOut:_p,backOut:Op,anticipate:Bp},ty=e=>typeof e=="string",Ed=e=>{if(Up(e)){f0(e.length===4);const[t,n,r,i]=e;return Ga(t,n,r,i)}else if(ty(e))return ey[e];return e},Vp=L.createContext({}),jp=L.createContext({strict:!1}),qp=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),So=L.createContext({});function wo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Da(e){return typeof e=="string"||Array.isArray(e)}const y0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],v0=["initial",...y0];function Ao(e){return wo(e.animate)||v0.some(t=>Da(e[t]))}function $p(e){return!!(Ao(e)||e.variants)}function ny(e,t){if(Ao(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Da(n)?n:void 0,animate:Da(r)?r:void 0}}return e.inherit!==!1?t:{}}function ry(e){const{initial:t,animate:n}=ny(e,L.useContext(So));return L.useMemo(()=>({initial:t,animate:n}),[Sd(t),Sd(n)])}function Sd(e){return Array.isArray(e)?e.join(" "):e}const bs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function iy(e,t){let n=new Set,r=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){s.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,d=!1,p=!1)=>{const b=p&&i?n:r;return d&&s.add(c),b.has(c)||b.add(c),c},cancel:c=>{r.delete(c),s.delete(c)},process:c=>{if(o=c,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),n.clear(),i=!1,a&&(a=!1,l.process(c))}};return l}const ay=40;function Wp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=bs.reduce((x,I)=>(x[I]=iy(a),x),{}),{setup:o,read:u,resolveKeyframes:l,preUpdate:c,update:d,preRender:p,render:f,postRender:b}=s,v=()=>{const x=lr.useManualTiming?i.timestamp:performance.now();n=!1,lr.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,ay),1)),i.timestamp=x,i.isProcessing=!0,o.process(i),u.process(i),l.process(i),c.process(i),d.process(i),p.process(i),f.process(i),b.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},E=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:bs.reduce((x,I)=>{const M=s[I];return x[I]=(C,H=!1,z=!1)=>(n||E(),M.schedule(C,H,z)),x},{}),cancel:x=>{for(let I=0;I(Fs===void 0&&tn.set(Ft.isProcessing||lr.useManualTiming?Ft.timestamp:performance.now()),Fs),set:e=>{Fs=e,queueMicrotask(sy)}},Yp=e=>t=>typeof t=="string"&&t.startsWith(e),T0=Yp("--"),oy=Yp("var(--"),x0=e=>oy(e)?uy.test(e.split("/*")[0].trim()):!1,uy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pa={...Pi,transform:e=>ur(0,1,e)},ys={...Pi,default:1},da=e=>Math.round(e*1e5)/1e5,E0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ly(e){return e==null}const cy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,S0=(e,t)=>n=>!!(typeof n=="string"&&cy.test(n)&&n.startsWith(e)||t&&!ly(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,s,o]=r.match(E0);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},dy=e=>ur(0,255,e),Go={...Pi,transform:e=>Math.round(dy(e))},$r={test:S0("rgb","red"),parse:Gp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Go.transform(e)+", "+Go.transform(t)+", "+Go.transform(n)+", "+da(Pa.transform(r))+")"};function hy(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const el={test:S0("#"),parse:hy,transform:$r.transform},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vr=Xa("deg"),qn=Xa("%"),Ae=Xa("px"),fy=Xa("vh"),py=Xa("vw"),wd={...qn,parse:e=>qn.parse(e)/100,transform:e=>qn.transform(e*100)},fi={test:S0("hsl","hue"),parse:Gp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qn.transform(da(t))+", "+qn.transform(da(n))+", "+da(Pa.transform(r))+")"},Pt={test:e=>$r.test(e)||el.test(e)||fi.test(e),parse:e=>$r.test(e)?$r.parse(e):fi.test(e)?fi.parse(e):el.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$r.transform(e):fi.transform(e),getAnimatableNone:e=>{const t=Pt.parse(e);return t.alpha=0,Pt.transform(t)}},my=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function gy(e){return isNaN(e)&&typeof e=="string"&&(e.match(E0)?.length||0)+(e.match(my)?.length||0)>0}const Xp="number",Kp="color",by="var",yy="var(",Ad="${}",vy=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function La(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(vy,u=>(Pt.test(u)?(r.color.push(a),i.push(Kp),n.push(Pt.parse(u))):u.startsWith(yy)?(r.var.push(a),i.push(by),n.push(u)):(r.number.push(a),i.push(Xp),n.push(parseFloat(u))),++a,Ad)).split(Ad);return{values:n,split:o,indexes:r,types:i}}function Qp(e){return La(e).values}function Zp(e){const{split:t,types:n}=La(e),r=t.length;return i=>{let a="";for(let s=0;stypeof e=="number"?0:Pt.test(e)?Pt.getAnimatableNone(e):e;function xy(e){const t=Qp(e);return Zp(e)(t.map(Ty))}const kr={test:gy,parse:Qp,createTransformer:Zp,getAnimatableNone:xy};function Xo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ey({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;i=Xo(u,o,e+1/3),a=Xo(u,o,e),s=Xo(u,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function Qs(e,t){return n=>n>0?t:e}const mt=(e,t,n)=>e+(t-e)*n,Ko=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Sy=[el,$r,fi],wy=e=>Sy.find(t=>t.test(e));function Cd(e){const t=wy(e);if(!t)return!1;let n=t.parse(e);return t===fi&&(n=Ey(n)),n}const kd=(e,t)=>{const n=Cd(e),r=Cd(t);if(!n||!r)return Qs(e,t);const i={...n};return a=>(i.red=Ko(n.red,r.red,a),i.green=Ko(n.green,r.green,a),i.blue=Ko(n.blue,r.blue,a),i.alpha=mt(n.alpha,r.alpha,a),$r.transform(i))},tl=new Set(["none","hidden"]);function Ay(e,t){return tl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cy(e,t){return n=>mt(e,t,n)}function w0(e){return typeof e=="number"?Cy:typeof e=="string"?x0(e)?Qs:Pt.test(e)?kd:Ny:Array.isArray(e)?Jp:typeof e=="object"?Pt.test(e)?kd:ky:Qs}function Jp(e,t){const n=[...e],r=n.length,i=e.map((a,s)=>w0(a)(a,t[s]));return a=>{for(let s=0;s{for(const a in r)n[a]=r[a](i);return n}}function Iy(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=kr.createTransformer(t),r=La(e),i=La(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tl.has(e)&&!i.values.length||tl.has(t)&&!r.values.length?Ay(e,t):Ya(Jp(Iy(r,i),i.values),n):Qs(e,t)};function em(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?mt(e,t,n):w0(e)(e,t)}const Ry=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>lt.update(t,n),stop:()=>Cr(t),now:()=>Ft.isProcessing?Ft.timestamp:tn.now()}},tm=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a=Zs?1/0:t}function My(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(A0(r),Zs);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:jn(i)}}const Dy=5;function nm(e,t,n){const r=Math.max(t-Dy,0);return Mp(n-e(r),t-r)}const xt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Qo=.001;function Py({duration:e=xt.duration,bounce:t=xt.bounce,velocity:n=xt.velocity,mass:r=xt.mass}){let i,a,s=1-t;s=ur(xt.minDamping,xt.maxDamping,s),e=ur(xt.minDuration,xt.maxDuration,jn(e)),s<1?(i=l=>{const c=l*s,d=c*e,p=c-n,f=nl(l,s),b=Math.exp(-d);return Qo-p/f*b},a=l=>{const d=l*s*e,p=d*n+n,f=Math.pow(s,2)*Math.pow(l,2)*e,b=Math.exp(-d),v=nl(Math.pow(l,2),s);return(-i(l)+Qo>0?-1:1)*((p-f)*b)/v}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Qo+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const o=5/e,u=Oy(i,a,o);if(e=Vn(e),isNaN(u))return{stiffness:xt.stiffness,damping:xt.damping,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const Ly=12;function Oy(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Fy(e){let t={velocity:xt.velocity,stiffness:xt.stiffness,damping:xt.damping,mass:xt.mass,isResolvedFromDuration:!1,...e};if(!Id(e,By)&&Id(e,_y))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ur(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:xt.mass,stiffness:i,damping:a}}else{const n=Py(e);t={...t,...n,mass:xt.mass},t.isResolvedFromDuration=!0}return t}function Js(e=xt.visualDuration,t=xt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:u,damping:l,mass:c,duration:d,velocity:p,isResolvedFromDuration:f}=Fy({...n,velocity:-jn(n.velocity||0)}),b=p||0,v=l/(2*Math.sqrt(u*c)),E=s-a,y=jn(Math.sqrt(u/c)),w=Math.abs(E)<5;r||(r=w?xt.restSpeed.granular:xt.restSpeed.default),i||(i=w?xt.restDelta.granular:xt.restDelta.default);let x;if(v<1){const M=nl(y,v);x=C=>{const H=Math.exp(-v*y*C);return s-H*((b+v*y*E)/M*Math.sin(M*C)+E*Math.cos(M*C))}}else if(v===1)x=M=>s-Math.exp(-y*M)*(E+(b+y*E)*M);else{const M=y*Math.sqrt(v*v-1);x=C=>{const H=Math.exp(-v*y*C),z=Math.min(M*C,300);return s-H*((b+v*y*E)*Math.sinh(z)+M*E*Math.cosh(z))/M}}const I={calculatedDuration:f&&d||null,next:M=>{const C=x(M);if(f)o.done=M>=d;else{let H=M===0?b:0;v<1&&(H=M===0?Vn(b):nm(x,M,C));const z=Math.abs(H)<=r,V=Math.abs(s-C)<=i;o.done=z&&V}return o.value=o.done?s:C,o},toString:()=>{const M=Math.min(A0(I),Zs),C=tm(H=>I.next(M*H).value,M,30);return M+"ms "+C},toTransition:()=>{}};return I}Js.applyToOptions=e=>{const t=My(e,100,Js);return e.ease=t.ease,e.duration=Vn(t.duration),e.type="keyframes",e};function rl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],p={done:!1,value:d},f=z=>o!==void 0&&zu,b=z=>o===void 0?u:u===void 0||Math.abs(o-z)-v*Math.exp(-z/r),x=z=>y+w(z),I=z=>{const V=w(z),P=x(z);p.done=Math.abs(V)<=l,p.value=p.done?y:P};let M,C;const H=z=>{f(p.value)&&(M=z,C=Js({keyframes:[p.value,b(p.value)],velocity:nm(x,z,p.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return H(0),{calculatedDuration:null,next:z=>{let V=!1;return!C&&M===void 0&&(V=!0,I(z),H(z)),M!==void 0&&z>=M?C.next(z-M):(!V&&I(z),p)}}}function Hy(e,t,n){const r=[],i=n||lr.mix||em,a=e.length-1;for(let s=0;st[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Hy(t,r,i),u=o.length,l=c=>{if(s&&c1)for(;dl(ur(e[0],e[a-1],c)):l}function Uy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ma(0,t,r);e.push(mt(n,1,i))}}function Vy(e){const t=[0];return Uy(t,e.length-1),t}function jy(e,t){return e.map(n=>n*t)}function qy(e,t){return e.map(()=>t||zp).splice(0,e.length-1)}function ha({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=J8(r)?r.map(Ed):Ed(r),a={done:!1,value:t[0]},s=jy(n&&n.length===t.length?n:Vy(t),e),o=zy(s,t,{ease:Array.isArray(i)?i:qy(t,i)});return{calculatedDuration:e,next:u=>(a.value=o(u),a.done=u>=e,a)}}const $y=e=>e!==null;function C0(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter($y),o=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const Wy={decay:rl,inertia:rl,tween:ha,keyframes:ha,spring:Js};function rm(e){typeof e.type=="string"&&(e.type=Wy[e.type])}class k0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Yy=e=>e/100;class I0 extends k0{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tn.now()&&this.tick(tn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rm(t);const{type:n=ha,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:o}=t;const u=n||ha;u!==ha&&typeof o[0]!="number"&&(this.mixKeyframes=Ya(Yy,em(o[0],o[1])),o=[0,100]);const l=u({...t,keyframes:o});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=A0(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:f,type:b,onUpdate:v,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,I=r;if(d){const z=Math.min(this.currentTime,i)/o;let V=Math.floor(z),P=z%1;!P&&z>=1&&(P=1),P===1&&V--,V=Math.min(V,d+1),!!(V%2)&&(p==="reverse"?(P=1-P,f&&(P-=f/o)):p==="mirror"&&(I=s)),x=ur(0,1,P)*o}const M=w?{done:!1,value:c[0]}:I.next(x);a&&(M.value=a(M.value));let{done:C}=M;!w&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return H&&b!==rl&&(M.value=C0(c,this.options,E,this.speed)),v&&v(M.value),H&&this.finish(),M}then(t,n){return this.finished.then(t,n)}get duration(){return jn(this.calculatedDuration)}get time(){return jn(this.currentTime)}set time(t){t=Vn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(tn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=jn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ry,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Gy(e){for(let t=1;te*180/Math.PI,il=e=>{const t=Wr(Math.atan2(e[1],e[0]));return al(t)},Xy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:il,rotateZ:il,skewX:e=>Wr(Math.atan(e[1])),skewY:e=>Wr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},al=e=>(e=e%360,e<0&&(e+=360),e),Nd=il,Rd=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Md=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ky={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rd,scaleY:Md,scale:e=>(Rd(e)+Md(e))/2,rotateX:e=>al(Wr(Math.atan2(e[6],e[5]))),rotateY:e=>al(Wr(Math.atan2(-e[2],e[0]))),rotateZ:Nd,rotate:Nd,skewX:e=>Wr(Math.atan(e[4])),skewY:e=>Wr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sl(e){return e.includes("scale")?1:0}function ol(e,t){if(!e||e==="none")return sl(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Ky,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Xy,i=o}if(!i)return sl(t);const a=r[t],s=i[1].split(",").map(Zy);return typeof a=="function"?a(s):s[a]}const Qy=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ol(n,t)};function Zy(e){return parseFloat(e.trim())}const Li=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oi=new Set(Li),Dd=e=>e===Pi||e===Ae,Jy=new Set(["x","y","z"]),e9=Li.filter(e=>!Jy.has(e));function t9(e){const t=[];return e9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ol(t,"x"),y:(e,{transform:t})=>ol(t,"y")};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const Xr=new Set;let ul=!1,ll=!1,cl=!1;function im(){if(ll){const e=Array.from(Xr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=t9(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,s])=>{r.getValue(a)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ll=!1,ul=!1,Xr.forEach(e=>e.complete(cl)),Xr.clear()}function am(){Xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ll=!0)})}function n9(){cl=!0,am(),im(),cl=!1}class N0{constructor(t,n,r,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xr.add(this),ul||(ul=!0,lt.read(am),lt.resolveKeyframes(im))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i?.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const o=r.readValue(n,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}Gy(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xr.delete(this)}cancel(){this.state==="scheduled"&&(Xr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r9=e=>e.startsWith("--");function i9(e,t,n){r9(t)?e.style.setProperty(t,n):e.style[t]=n}const a9=p0(()=>window.ScrollTimeline!==void 0),s9={};function o9(e,t){const n=p0(e);return()=>s9[t]??n()}const sm=o9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),aa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:aa([0,.65,.55,1]),circOut:aa([.55,0,1,.45]),backIn:aa([.31,.01,.66,-.59]),backOut:aa([.33,1.53,.69,.99])};function om(e,t){if(e)return typeof e=="function"?sm()?tm(e,t):"ease-out":Up(e)?aa(e):Array.isArray(e)?e.map(n=>om(n,t)||Pd.easeOut):Pd[e]}function u9(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:u}={},l=void 0){const c={[t]:n};u&&(c.offset=u);const d=om(o,i);Array.isArray(d)&&(c.easing=d);const p={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(c,p)}function um(e){return typeof e=="function"&&"applyToOptions"in e}function l9({type:e,...t}){return um(e)&&sm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class c9 extends k0{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,f0(typeof t.type!="string");const l=l9(t);this.animation=u9(n,r,i,l,a),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const c=C0(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(c):i9(n,r,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return jn(Number(t))}get time(){return jn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Vn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&a9()?(this.animation.timeline=t,Sn):n(this)}}const lm={anticipate:Bp,backInOut:_p,circInOut:Hp};function d9(e){return e in lm}function h9(e){typeof e.ease=="string"&&d9(e.ease)&&(e.ease=lm[e.ease])}const Ld=10;class f9 extends c9{constructor(t){h9(t),rm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new I0({...s,autoplay:!1}),u=Vn(this.finishedTime??this.time);n.setWithVelocity(o.sample(u-Ld).value,o.sample(u).value,Ld),o.stop()}}const Od=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kr.test(e)||e==="0")&&!e.startsWith("url("));function p9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function y9(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=t.owner.getProps();return b9()&&n&&g9.has(n)&&(n!=="transform"||!l)&&!u&&!r&&i!=="mirror"&&a!==0&&s!=="inertia"}const v9=40;class T9 extends k0{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:u,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tn.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:s,name:u,motionValue:l,element:c,...d},f=c?.KeyframeResolver||N0;this.keyframeResolver=new f(o,(b,v,E)=>this.onKeyframesResolved(b,v,p,!E),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:u,isHandoff:l,onUpdate:c}=r;this.resolvedAt=tn.now(),m9(t,a,s,o)||((lr.instantAnimations||!u)&&c?.(C0(t,r,n)),t[0]=t[t.length-1],dl(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>v9?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!l&&y9(p)?new f9({...p,element:p.motionValue.owner.current}):new I0(p);f.finished.then(()=>this.notifyFinished()).catch(Sn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),n9()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const x9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function E9(e){const t=x9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function cm(e,t,n=1){const[r,i]=E9(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return Ip(s)?parseFloat(s):s}return x0(i)?cm(i,t,n+1):i}function R0(e,t){return e?.[t]??e?.default??e}const dm=new Set(["width","height","top","left","right","bottom",...Li]),S9={test:e=>e==="auto",parse:e=>e},hm=e=>t=>t.test(e),fm=[Pi,Ae,qn,vr,py,fy,S9],_d=e=>fm.find(hm(e));function w9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Rp(e):!0}const A9=new Set(["brightness","contrast","saturate","opacity"]);function C9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(E0)||[];if(!r)return e;const i=n.replace(r,"");let a=A9.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const k9=/\b([a-z-]*)\(.*?\)/gu,hl={...kr,getAnimatableNone:e=>{const t=e.match(k9);return t?t.map(C9).join(" "):e}},Bd={...Pi,transform:Math.round},I9={rotate:vr,rotateX:vr,rotateY:vr,rotateZ:vr,scale:ys,scaleX:ys,scaleY:ys,scaleZ:ys,skew:vr,skewX:vr,skewY:vr,distance:Ae,translateX:Ae,translateY:Ae,translateZ:Ae,x:Ae,y:Ae,z:Ae,perspective:Ae,transformPerspective:Ae,opacity:Pa,originX:wd,originY:wd,originZ:Ae},M0={borderWidth:Ae,borderTopWidth:Ae,borderRightWidth:Ae,borderBottomWidth:Ae,borderLeftWidth:Ae,borderRadius:Ae,radius:Ae,borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomRightRadius:Ae,borderBottomLeftRadius:Ae,width:Ae,maxWidth:Ae,height:Ae,maxHeight:Ae,top:Ae,right:Ae,bottom:Ae,left:Ae,padding:Ae,paddingTop:Ae,paddingRight:Ae,paddingBottom:Ae,paddingLeft:Ae,margin:Ae,marginTop:Ae,marginRight:Ae,marginBottom:Ae,marginLeft:Ae,backgroundPositionX:Ae,backgroundPositionY:Ae,...I9,zIndex:Bd,fillOpacity:Pa,strokeOpacity:Pa,numOctaves:Bd},N9={...M0,color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:hl,WebkitFilter:hl},pm=e=>N9[e];function mm(e,t){let n=pm(e);return n!==hl&&(n=kr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const R9=new Set(["auto","none","0"]);function M9(e,t,n){let r=0,i;for(;r{t.getValue(o).set(u)}),this.resolveNoneKeyframes()}}function P9(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const gm=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function L9(e){return Np(e)&&"offsetHeight"in e}const Fd=30,O9=e=>!isNaN(parseFloat(e));class _9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=tn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=tn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=O9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new m0);const r=this.events[t].add(n);return t==="change"?()=>{r(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fd);return Mp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ki(e,t){return new _9(e,t)}const{schedule:D0}=Wp(queueMicrotask,!1),Rn={x:!1,y:!1};function bm(){return Rn.x||Rn.y}function B9(e){return e==="x"||e==="y"?Rn[e]?null:(Rn[e]=!0,()=>{Rn[e]=!1}):Rn.x||Rn.y?null:(Rn.x=Rn.y=!0,()=>{Rn.x=Rn.y=!1})}function ym(e,t){const n=P9(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Hd(e){return!(e.pointerType==="touch"||bm())}function F9(e,t,n={}){const[r,i,a]=ym(e,n),s=o=>{if(!Hd(o))return;const{target:u}=o,l=t(u,o);if(typeof l!="function"||!u)return;const c=d=>{Hd(d)&&(l(d),u.removeEventListener("pointerleave",c))};u.addEventListener("pointerleave",c,i)};return r.forEach(o=>{o.addEventListener("pointerenter",s,i)}),a}const vm=(e,t)=>t?e===t?!0:vm(e,t.parentElement):!1,P0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,H9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function z9(e){return H9.has(e.tagName)||e.tabIndex!==-1}const Hs=new WeakSet;function zd(e){return t=>{t.key==="Enter"&&e(t)}}function Zo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const U9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=zd(()=>{if(Hs.has(n))return;Zo(n,"down");const i=zd(()=>{Zo(n,"up")}),a=()=>Zo(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ud(e){return P0(e)&&!bm()}function V9(e,t,n={}){const[r,i,a]=ym(e,n),s=o=>{const u=o.currentTarget;if(!Ud(o))return;Hs.add(u);const l=t(u,o),c=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),Hs.has(u)&&Hs.delete(u),Ud(f)&&typeof l=="function"&&l(f,{success:b})},d=f=>{c(f,u===window||u===document||n.useGlobalTarget||vm(u,f.target))},p=f=>{c(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",p,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,i),L9(o)&&(o.addEventListener("focus",l=>U9(l,i)),!z9(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Tm(e){return Np(e)&&"ownerSVGElement"in e}function j9(e){return Tm(e)&&e.tagName==="svg"}const zt=e=>!!(e&&e.getVelocity),q9=[...fm,Pt,kr],$9=e=>q9.find(hm(e)),Oa={};function W9(e){for(const t in e)Oa[t]=e[t],T0(t)&&(Oa[t].isCSSVariable=!0)}function xm(e,{layout:t,layoutId:n}){return Oi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Oa[e]||e==="opacity")}const Y9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G9=Li.length;function X9(e,t,n){let r="",i=!0;for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function Em(e,t,n){for(const r in t)!zt(t[r])&&!xm(r,n)&&(e[r]=t[r])}function K9({transformTemplate:e},t){return L.useMemo(()=>{const n=O0();return L0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Q9(e,t){const n=e.style||{},r={};return Em(r,n,e),Object.assign(r,K9(e,t)),r}function Z9(e,t){const n={},r=Q9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const J9={offset:"stroke-dashoffset",array:"stroke-dasharray"},ev={offset:"strokeDashoffset",array:"strokeDasharray"};function tv(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?J9:ev;e[a.offset]=Ae.transform(-r);const s=Ae.transform(t),o=Ae.transform(n);e[a.array]=`${s} ${o}`}function Sm(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...o},u,l,c){if(L0(e,o,l),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&tv(d,i,a,s,!1)}const wm=()=>({...O0(),attrs:{}}),Am=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nv(e,t,n,r){const i=L.useMemo(()=>{const a=wm();return Sm(a,t,Am(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Em(a,e.style,e),i.style={...a,...i.style}}return i}const rv=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rv.has(e)}let Cm=e=>!eo(e);function iv(e){typeof e=="function"&&(Cm=t=>t.startsWith("on")?!eo(t):e(t))}try{iv(require("@emotion/is-prop-valid").default)}catch{}function av(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Cm(i)||n===!0&&eo(i)||!t&&!eo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const sv=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _0(e){return typeof e!="string"||e.includes("-")?!1:!!(sv.indexOf(e)>-1||/[A-Z]/u.test(e))}function ov(e,t,n,{latestValues:r},i,a=!1){const o=(_0(e)?nv:Z9)(t,r,i,e),u=av(t,typeof e=="string",a),l=e!==L.Fragment?{...u,...o,ref:n}:{},{children:c}=t,d=L.useMemo(()=>zt(c)?c.get():c,[c]);return L.createElement(e,{...l,children:d})}const B0=L.createContext(null);function Vd(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function F0(e,t,n,r){if(typeof t=="function"){const[i,a]=Vd(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=Vd(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function uv(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}function zs(e){return zt(e)?e.get():e}function lv({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:cv(n,r,i,e),renderState:t()}}function cv(e,t,n,r){const i={},a=r(e,{});for(const p in a)i[p]=zs(a[p]);let{initial:s,animate:o}=e;const u=Ao(e),l=$p(e);t&&l&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?o:s;if(d&&typeof d!="boolean"&&!wo(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f(t,n)=>{const r=L.useContext(So),i=L.useContext(B0),a=()=>lv(e,t,r,i);return n?a():uv(a)};function H0(e,t,n){const{style:r}=e,i={};for(const a in r)(zt(r[a])||t.style&&zt(t.style[a])||xm(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const dv=km({scrapeMotionValuesFromProps:H0,createRenderState:O0});function Im(e,t,n){const r=H0(e,t,n);for(const i in e)if(zt(e[i])||zt(t[i])){const a=Li.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}const hv=km({scrapeMotionValuesFromProps:Im,createRenderState:wm}),z0=typeof window<"u",jd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ii={};for(const e in jd)Ii[e]={isEnabled:t=>jd[e].some(n=>!!t[n])};function fv(e){for(const t in e)Ii[t]={...Ii[t],...e[t]}}const pv=Symbol.for("motionComponentSymbol");function pi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mv(e,t,n){const r=L.useRef(null);return L.useCallback(i=>{const a=r.current;r.current=i,i!==a&&(i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount())),n&&(typeof n=="function"?n(i):pi(n)&&(n.current=i))},[t,n])}const U0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gv="framerAppearId",Nm="data-"+U0(gv),Rm=L.createContext({}),bv=z0?L.useLayoutEffect:L.useEffect;function yv(e,t,n,r,i){const{visualElement:a}=L.useContext(So),s=L.useContext(jp),o=L.useContext(B0),u=L.useContext(qp).reducedMotion,l=L.useRef(null);r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:u}));const c=l.current,d=L.useContext(Rm);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&vv(l.current,n,i,d);const p=L.useRef(!1);L.useInsertionEffect(()=>{c&&p.current&&c.update(n,o)});const f=n[Nm],b=L.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return bv(()=>{c&&(p.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),b.current&&c.animationState&&c.animationState.animateChanges())}),L.useEffect(()=>{c&&(!b.current&&c.animationState&&c.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1),c.enteringChildren=void 0)}),c}function vv(e,t,n,r){const{layoutId:i,layout:a,drag:s,dragConstraints:o,layoutScroll:u,layoutRoot:l,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mm(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||o&&pi(o),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:u,layoutRoot:l})}function Mm(e){if(e)return e.options.allowProjection!==!1?e.projection:Mm(e.parent)}function Tv(e,{forwardMotionProps:t=!1}={},n,r){n&&fv(n);const i=_0(e)?hv:dv;function a(o,u){let l;const c={...L.useContext(qp),...o,layoutId:xv(o)},{isStatic:d}=c,p=ry(o),f=i(o,d);if(!d&&z0){Ev();const b=Sv(c);l=b.MeasureLayout,p.visualElement=yv(e,f,c,r,b.ProjectionNode)}return k.jsxs(So.Provider,{value:p,children:[l&&p.visualElement?k.jsx(l,{visualElement:p.visualElement,...c}):null,ov(e,o,mv(f,p.visualElement,u),f,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=L.forwardRef(a);return s[pv]=e,s}function xv({layoutId:e}){const t=L.useContext(Vp).id;return t&&e!==void 0?t+"-"+e:e}function Ev(e,t){L.useContext(jp).strict}function Sv(e){const{drag:t,layout:n}=Ii;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Dm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wv({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Av(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jo(e){return e===void 0||e===1}function fl({scale:e,scaleX:t,scaleY:n}){return!Jo(e)||!Jo(t)||!Jo(n)}function jr(e){return fl(e)||Pm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pm(e){return qd(e.x)||qd(e.y)}function qd(e){return e&&e!=="0%"}function to(e,t,n){const r=e-n,i=t*r;return n+i}function $d(e,t,n,r,i){return i!==void 0&&(e=to(e,i,r)),to(e,n,r)+t}function pl(e,t=0,n=1,r,i){e.min=$d(e.min,t,n,r,i),e.max=$d(e.max,t,n,r,i)}function Lm(e,{x:t,y:n}){pl(e.x,t.translate,t.scale,t.originPoint),pl(e.y,n.translate,n.scale,n.originPoint)}const Wd=.999999999999,Yd=1.0000000000001;function Cv(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let o=0;oWd&&(t.x=1),t.yWd&&(t.y=1)}function mi(e,t){e.min=e.min+t,e.max=e.max+t}function Gd(e,t,n,r,i=.5){const a=mt(e.min,e.max,i);pl(e,t,n,a,r)}function gi(e,t){Gd(e.x,t.x,t.scaleX,t.scale,t.originX),Gd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Om(e,t){return Dm(Av(e.getBoundingClientRect(),t))}function kv(e,t,n){const r=Om(e,n),{scroll:i}=t;return i&&(mi(r.x,i.offset.x),mi(r.y,i.offset.y)),r}const Xd=()=>({translate:0,scale:1,origin:0,originPoint:0}),bi=()=>({x:Xd(),y:Xd()}),Kd=()=>({min:0,max:0}),Ct=()=>({x:Kd(),y:Kd()}),ml={current:null},_m={current:!1};function Iv(){if(_m.current=!0,!!z0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ml.current=e.matches;e.addEventListener("change",t),t()}else ml.current=!1}const Nv=new WeakMap;function Rv(e,t,n){for(const r in t){const i=t[r],a=n[r];if(zt(i))e.addValue(r,i);else if(zt(a))e.addValue(r,ki(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,ki(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=N0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=tn.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),_m.current||Iv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ml.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Cr(this.notifyUpdate),Cr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Oi.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&<.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ii){const n=Ii[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ki(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ip(r)||Rp(r))?r=parseFloat(r):!$9(r)&&kr.test(n)&&(r=mm(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=F0(this.props,n,this.presenceContext?.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!zt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new m0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){D0.render(this.render)}}class Bm extends Mv{constructor(){super(...arguments),this.KeyframeResolver=D9}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Fm(e,{style:t,vars:n},r,i){const a=e.style;let s;for(s in t)a[s]=t[s];i?.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function Dv(e){return window.getComputedStyle(e)}class Pv extends Bm{constructor(){super(...arguments),this.type="html",this.renderInstance=Fm}readValueFromInstance(t,n){if(Oi.has(n))return this.projection?.isProjecting?sl(n):Qy(t,n);{const r=Dv(t),i=(T0(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Om(t,n)}build(t,n,r){L0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return H0(t,n,r)}}const Hm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Lv(e,t,n,r){Fm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Hm.has(i)?i:U0(i),t.attrs[i])}class Ov extends Bm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oi.has(n)){const r=pm(n);return r&&r.default||0}return n=Hm.has(n)?n:U0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Im(t,n,r)}build(t,n,r){Sm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Lv(t,n,r,i)}mount(t){this.isSVGTag=Am(t.tagName),super.mount(t)}}const _v=(e,t)=>_0(e)?new Ov(t):new Pv(t,{allowProjection:e!==L.Fragment});function vi(e,t,n){const r=e.getProps();return F0(r,t,n!==void 0?n:r.custom,e)}const gl=e=>Array.isArray(e);function Bv(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ki(n))}function Fv(e){return gl(e)?e[e.length-1]||0:e}function Hv(e,t){const n=vi(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const s in a){const o=Fv(a[s]);Bv(e,s,o)}}function zv(e){return!!(zt(e)&&e.add)}function bl(e,t){const n=e.getValue("willChange");if(zv(n))return n.add(t);if(!n&&lr.WillChange){const r=new lr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zm(e){return e.props[Nm]}const Uv=e=>e!==null;function Vv(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uv),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[a]}const jv={type:"spring",stiffness:500,damping:25,restSpeed:10},qv=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$v={type:"keyframes",duration:.8},Wv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yv=(e,{keyframes:t})=>t.length>2?$v:Oi.has(e)?e.startsWith("scale")?qv(t[1]):jv:Wv;function Gv({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const V0=(e,t,n,r={},i,a)=>s=>{const o=R0(r,e)||{},u=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Vn(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-l,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:i};Gv(o)||Object.assign(c,Yv(e,c)),c.duration&&(c.duration=Vn(c.duration)),c.repeatDelay&&(c.repeatDelay=Vn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(dl(c),c.delay===0&&(d=!0)),(lr.instantAnimations||lr.skipAnimations)&&(d=!0,dl(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&t.get()!==void 0){const p=Vv(c.keyframes,o);if(p!==void 0){lt.update(()=>{c.onUpdate(p),c.onComplete()});return}}return o.isSync?new I0(c):new T9(c)};function Xv({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Um(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=t;r&&(a=r);const u=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const c in o){const d=e.getValue(c,e.latestValues[c]??null),p=o[c];if(p===void 0||l&&Xv(l,c))continue;const f={delay:n,...R0(a||{},c)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===b&&!f.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=zm(e);if(y){const w=window.MotionHandoffAnimation(y,c,lt);w!==null&&(f.startTime=w,v=!0)}}bl(e,c),d.start(V0(c,d,p,e.shouldReduceMotion&&dm.has(c)?{type:!1}:f,e,v));const E=d.animation;E&&u.push(E)}return s&&Promise.all(u).then(()=>{lt.update(()=>{s&&Hv(e,s)})}),u}function Vm(e,t,n,r=0,i=1){const a=Array.from(e).sort((l,c)=>l.sortNodePosition(c)).indexOf(t),s=e.size,o=(s-1)*r;return typeof n=="function"?n(a,s):i===1?a*r:o-a*r}function yl(e,t,n={}){const r=vi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Um(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:d}=i;return Kv(e,t,u,l,c,d,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,l]=o==="beforeChildren"?[a,s]:[s,a];return u().then(()=>l())}else return Promise.all([a(),s(n.delay)])}function Kv(e,t,n=0,r=0,i=0,a=1,s){const o=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),o.push(yl(u,t,{...s,delay:n+(typeof r=="function"?0:r)+Vm(e.variantChildren,u,r,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(o)}function Qv(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>yl(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=yl(e,t,n);else{const i=typeof t=="function"?vi(e,t,n.custom):t;r=Promise.all(Um(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>Qv(e,n,r)))}function nT(e){let t=tT(e),n=Zd(),r=!0;const i=u=>(l,c)=>{const d=vi(e,c,u==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:p,transitionEnd:f,...b}=d;l={...l,...b,...f}}return l};function a(u){t=u(e)}function s(u){const{props:l}=e,c=qm(e.parent)||{},d=[],p=new Set;let f={},b=1/0;for(let E=0;Eb&&I,V=!1;const P=Array.isArray(x)?x:[x];let $=P.reduce(i(y),{});M===!1&&($={});const{prevResolvedValues:W={}}=w,G={...W,...$},q=ee=>{z=!0,p.has(ee)&&(V=!0,p.delete(ee)),w.needsAnimating[ee]=!0;const de=e.getValue(ee);de&&(de.liveStyle=!1)};for(const ee in G){const de=$[ee],oe=W[ee];if(f.hasOwnProperty(ee))continue;let R=!1;gl(de)&&gl(oe)?R=!jm(de,oe):R=de!==oe,R?de!=null?q(ee):p.add(ee):de!==void 0&&p.has(ee)?q(ee):w.protectedKeys[ee]=!0}w.prevProp=x,w.prevResolvedValues=$,w.isActive&&(f={...f,...$}),r&&e.blockInitialAnimation&&(z=!1);const Y=C&&H;z&&(!Y||V)&&d.push(...P.map(ee=>{const de={type:y};if(typeof ee=="string"&&r&&!Y&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,R=vi(oe,ee);if(oe.enteringChildren&&R){const{delayChildren:Ce}=R.transition||{};de.delay=Vm(oe.enteringChildren,e,Ce)}}return{animation:ee,options:de}}))}if(p.size){const E={};if(typeof l.initial!="boolean"){const y=vi(e,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(E.transition=y.transition)}p.forEach(y=>{const w=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),E[y]=w??null}),d.push({animation:E})}let v=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(u,l){if(n[u].isActive===l)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(u,l)),n[u].isActive=l;const c=s(u);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:s,setActive:o,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Zd(),r=!0}}}function rT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jm(t,e):!1}function _r(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zd(){return{animate:_r(!0),whileInView:_r(),whileHover:_r(),whileTap:_r(),whileDrag:_r(),whileFocus:_r(),exit:_r()}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iT extends Dr{constructor(t){super(t),t.animationState||(t.animationState=nT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aT=0;class sT extends Dr{constructor(){super(...arguments),this.id=aT++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const oT={animation:{Feature:iT},exit:{Feature:sT}};function _a(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ka(e){return{point:{x:e.pageX,y:e.pageY}}}const uT=e=>t=>P0(t)&&e(t,Ka(t));function fa(e,t,n,r){return _a(e,t,uT(n),r)}const $m=1e-4,lT=1-$m,cT=1+$m,Wm=.01,dT=0-Wm,hT=0+Wm;function Yt(e){return e.max-e.min}function fT(e,t,n){return Math.abs(e-t)<=n}function Jd(e,t,n,r=.5){e.origin=r,e.originPoint=mt(t.min,t.max,e.origin),e.scale=Yt(n)/Yt(t),e.translate=mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lT&&e.scale<=cT||isNaN(e.scale))&&(e.scale=1),(e.translate>=dT&&e.translate<=hT||isNaN(e.translate))&&(e.translate=0)}function pa(e,t,n,r){Jd(e.x,t.x,n.x,r?r.originX:void 0),Jd(e.y,t.y,n.y,r?r.originY:void 0)}function eh(e,t,n){e.min=n.min+t.min,e.max=e.min+Yt(t)}function pT(e,t,n){eh(e.x,t.x,n.x),eh(e.y,t.y,n.y)}function th(e,t,n){e.min=t.min-n.min,e.max=e.min+Yt(t)}function ma(e,t,n){th(e.x,t.x,n.x),th(e.y,t.y,n.y)}function yn(e){return[e("x"),e("y")]}const Ym=({current:e})=>e?e.ownerDocument.defaultView:null,nh=(e,t)=>Math.abs(e-t);function mT(e,t){const n=nh(e.x,t.x),r=nh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Gm{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=tu(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,b=mT(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!b)return;const{point:v}=p,{timestamp:E}=Ft;this.history.push({...v,timestamp:E});const{onStart:y,onMove:w}=this.handlers;f||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=eu(f,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:b,onSessionEnd:v,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=tu(p.type==="pointercancel"?this.lastMoveEventInfo:eu(f,this.transformPagePoint),this.history);this.startEvent&&b&&b(p,y),v&&v(p,y)},!P0(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const o=Ka(t),u=eu(o,this.transformPagePoint),{point:l}=u,{timestamp:c}=Ft;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,tu(u,this.history)),this.removeListeners=Ya(fa(this.contextWindow,"pointermove",this.handlePointerMove),fa(this.contextWindow,"pointerup",this.handlePointerUp),fa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}}function eu(e,t){return t?{point:t(e.point)}:e}function rh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tu({point:e},t){return{point:e,delta:rh(e,Xm(t)),offset:rh(e,gT(t)),velocity:bT(t,.1)}}function gT(e){return e[0]}function Xm(e){return e[e.length-1]}function bT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Vn(t)));)n--;if(!r)return{x:0,y:0};const a=jn(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function yT(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?mt(n,e,r.max):Math.min(e,n)),e}function ih(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vT(e,{top:t,left:n,bottom:r,right:i}){return{x:ih(e.x,n,i),y:ih(e.y,t,r)}}function ah(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Ma(t.min,t.max-r,e.min):r>i&&(n=Ma(e.min,e.max-i,t.min)),ur(0,1,n)}function ET(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vl=.35;function ST(e=vl){return e===!1?e=0:e===!0&&(e=vl),{x:sh(e,"left","right"),y:sh(e,"top","bottom")}}function sh(e,t,n){return{min:oh(e,t),max:oh(e,n)}}function oh(e,t){return typeof e=="number"?e:e[t]||0}const wT=new WeakMap;class AT{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ka(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:b,onDragStart:v}=this.getProps();if(f&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=B9(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(y=>{let w=this.getAxisMotionValue(y).get()||0;if(qn.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const I=x.layout.layoutBox[y];I&&(w=Yt(I)*(parseFloat(w)/100))}}this.originPoint[y]=w}),v&<.postRender(()=>v(d,p)),bl(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},o=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:f,dragDirectionLock:b,onDirectionLock:v,onDrag:E}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=p;if(b&&this.currentDirection===null){this.currentDirection=CT(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),E&&E(d,p)},u=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>yn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Gm(t,{onSessionStart:a,onStart:s,onMove:o,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Ym(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&<.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!vs(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=yT(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&pi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=vT(r.layoutBox,t):this.constraints=!1,this.elastic=ST(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=ET(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=kv(r,i.root,this.visualElement.getTransformPagePoint());let s=TT(i.layout.layoutBox,a);if(n){const o=n(wv(s));this.hasMutatedConstraints=!!o,o&&(s=Dm(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),u=this.constraints||{},l=yn(c=>{if(!vs(c,n,this.currentDirection))return;let d=u&&u[c]||{};s&&(d={min:0,max:0});const p=i?200:1e6,f=i?40:1e7,b={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,b)});return Promise.all(l).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bl(this.visualElement,t),r.start(V0(t,r,0,n,this.visualElement,!1))}stopAnimation(){yn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yn(n=>{const{drag:r}=this.getProps();if(!vs(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n];a.set(t[n]-mt(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};yn(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const u=o.get();i[s]=xT({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yn(s=>{if(!vs(s,t,null))return;const o=this.getAxisMotionValue(s),{min:u,max:l}=this.constraints[s];o.set(mt(u,l,i[s]))})}addListeners(){if(!this.visualElement.current)return;wT.set(this.visualElement,this);const t=this.visualElement.current,n=fa(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();pi(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),lt.read(r);const s=_a(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(yn(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())}));return()=>{s(),n(),a(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=vl,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function vs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kT extends Dr{constructor(t){super(t),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new AT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}unmount(){this.removeGroupControls(),this.removeListeners()}}const uh=e=>(t,n)=>{e&<.postRender(()=>e(t,n))};class IT extends Dr{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(t){this.session=new Gm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ym(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:uh(t),onStart:uh(n),onMove:r,onEnd:(a,s)=>{delete this.session,i&<.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=fa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function NT(e=!0){const t=L.useContext(B0);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=L.useId();L.useEffect(()=>{if(e)return i(a)},[e]);const s=L.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const Us={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ki={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ae.test(e))e=parseFloat(e);else return e;const n=lh(e,t.target.x),r=lh(e,t.target.y);return`${n}% ${r}%`}},RT={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=kr.parse(e);if(i.length>5)return r;const a=kr.createTransformer(e),s=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=u;const l=mt(o,u,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),a(i)}};let nu=!1;class MT extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;W9(DT),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),nu&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Us.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,nu=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||lt.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),D0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;nu=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Km(e){const[t,n]=NT(),r=L.useContext(Vp);return k.jsx(MT,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(Rm),isPresent:t,safeToRemove:n})}const DT={borderRadius:{...Ki,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ki,borderTopRightRadius:Ki,borderBottomLeftRadius:Ki,borderBottomRightRadius:Ki,boxShadow:RT};function PT(e,t,n){const r=zt(e)?e:ki(e);return r.start(V0("",r,t,n)),r.animation}const LT=(e,t)=>e.depth-t.depth;class OT{constructor(){this.children=[],this.isDirty=!1}add(t){d0(this.children,t),this.isDirty=!0}remove(t){h0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LT),this.isDirty=!1,this.children.forEach(t)}}function _T(e,t){const n=tn.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Cr(r),e(a-t))};return lt.setup(r,!0),()=>Cr(r)}const Qm=["TopLeft","TopRight","BottomLeft","BottomRight"],BT=Qm.length,ch=e=>typeof e=="string"?parseFloat(e):e,dh=e=>typeof e=="number"||Ae.test(e);function FT(e,t,n,r,i,a){i?(e.opacity=mt(0,n.opacity??1,HT(r)),e.opacityExit=mt(t.opacity??1,0,zT(r))):a&&(e.opacity=mt(t.opacity??1,n.opacity??1,r));for(let s=0;srt?1:n(Ma(e,t,r))}function fh(e,t){e.min=t.min,e.max=t.max}function bn(e,t){fh(e.x,t.x),fh(e.y,t.y)}function ph(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function mh(e,t,n,r,i){return e-=t,e=to(e,1/n,r),i!==void 0&&(e=to(e,1/i,r)),e}function UT(e,t=0,n=1,r=.5,i,a=e,s=e){if(qn.test(t)&&(t=parseFloat(t),t=mt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=mt(a.min,a.max,r);e===a&&(o-=t),e.min=mh(e.min,t,n,o,i),e.max=mh(e.max,t,n,o,i)}function gh(e,t,[n,r,i],a,s){UT(e,t[n],t[r],t[i],t.scale,a,s)}const VT=["x","scaleX","originX"],jT=["y","scaleY","originY"];function bh(e,t,n,r){gh(e.x,t,VT,n?n.x:void 0,r?r.x:void 0),gh(e.y,t,jT,n?n.y:void 0,r?r.y:void 0)}function yh(e){return e.translate===0&&e.scale===1}function Jm(e){return yh(e.x)&&yh(e.y)}function vh(e,t){return e.min===t.min&&e.max===t.max}function qT(e,t){return vh(e.x,t.x)&&vh(e.y,t.y)}function Th(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function e2(e,t){return Th(e.x,t.x)&&Th(e.y,t.y)}function xh(e){return Yt(e.x)/Yt(e.y)}function Eh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $T{constructor(){this.members=[]}add(t){d0(this.members,t),t.scheduleRender()}remove(t){if(h0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function WT(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,s=n?.z||0;if((i||a||s)&&(r=`translate3d(${i}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:p,skewX:f,skewY:b}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(r+=`scale(${o}, ${u})`),r||"none"}const ru=["","X","Y","Z"],YT=1e3;let GT=0;function iu(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function t2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",lt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t2(r)}function n2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t?.()){this.id=GT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QT),this.nodes.forEach(tx),this.nodes.forEach(nx),this.nodes.forEach(ZT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;lt.read(()=>{d=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=_T(p,250),Us.hasAnimatedSinceResize&&(Us.hasAnimatedSinceResize=!1,this.nodes.forEach(Ah)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||l.getDefaultTransition()||ox,{onLayoutAnimationStart:v,onLayoutAnimationComplete:E}=l.getProps(),y=!this.targetLayout||!e2(this.targetLayout,f),w=!d&&p;if(this.options.layoutRoot||this.resumeFrom||w||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...R0(b,"layout"),onPlay:v,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else d||Ah(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Cr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rx),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&t2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Yt(this.snapshot.measuredBox.x)&&!Yt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{const M=I/1e3;Ch(d.x,s.x,M),Ch(d.y,s.y,M),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ma(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ax(this.relativeTarget,this.relativeTargetOrigin,p,M),x&&qT(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ct()),bn(x,this.relativeTarget)),v&&(this.animationValues=c,FT(c,l,this.latestValues,M,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Us.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ki(0)),this.currentAnimation=PT(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(YT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:u,layout:l,latestValues:c}=s;if(!(!o||!u||!l)){if(this!==s&&this.layout&&l&&r2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Ct();const d=Yt(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+d;const p=Yt(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}bn(o,u),gi(o,c),pa(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new $T),this.sharedNodes.get(s).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const l={};u.z&&iu("z",s,l,this.animationValues);for(let c=0;cs.currentAnimation?.stop()),this.root.nodes.forEach(Sh),this.root.sharedNodes.clear()}}}function XT(e){e.updateLayout()}function KT(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?yn(c=>{const d=a?t.measuredBox[c]:t.layoutBox[c],p=Yt(d);d.min=n[c].min,d.max=d.min+p}):r2(i,t.layoutBox,n)&&yn(c=>{const d=a?t.measuredBox[c]:t.layoutBox[c],p=Yt(n[c]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const s=bi();pa(s,n,t.layoutBox);const o=bi();a?pa(o,e.applyTransform(r,!0),t.measuredBox):pa(o,n,t.layoutBox);const u=!Jm(s);let l=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:p}=c;if(d&&p){const f=Ct();ma(f,t.layoutBox,d.layoutBox);const b=Ct();ma(b,n,p.layoutBox),e2(f,b)||(l=!0),c.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JT(e){e.clearSnapshot()}function Sh(e){e.clearMeasurements()}function wh(e){e.isLayoutDirty=!1}function ex(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ah(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tx(e){e.resolveTargetDelta()}function nx(e){e.calcProjection()}function rx(e){e.resetSkewAndRotation()}function ix(e){e.removeLeadSnapshot()}function Ch(e,t,n){e.translate=mt(t.translate,0,n),e.scale=mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kh(e,t,n,r){e.min=mt(t.min,n.min,r),e.max=mt(t.max,n.max,r)}function ax(e,t,n,r){kh(e.x,t.x,n.x,r),kh(e.y,t.y,n.y,r)}function sx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ox={duration:.45,ease:[.4,0,.1,1]},Ih=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nh=Ih("applewebkit/")&&!Ih("chrome/")?Math.round:Sn;function Rh(e){e.min=Nh(e.min),e.max=Nh(e.max)}function ux(e){Rh(e.x),Rh(e.y)}function r2(e,t,n){return e==="position"||e==="preserve-aspect"&&!fT(xh(t),xh(n),.2)}function lx(e){return e!==e.root&&e.scroll?.wasRoot}const cx=n2({attachResizeListener:(e,t)=>_a(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),au={current:void 0},i2=n2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!au.current){const e=new cx({});e.mount(window),e.setOptions({layoutScroll:!0}),au.current=e}return au.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dx={pan:{Feature:IT},drag:{Feature:kT,ProjectionNode:i2,MeasureLayout:Km}};function Mh(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&<.postRender(()=>a(t,Ka(t)))}class hx extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=F9(t,(n,r)=>(Mh(this.node,r,"Start"),i=>Mh(this.node,i,"End"))))}unmount(){}}class fx extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ya(_a(this.node.current,"focus",()=>this.onFocus()),_a(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Dh(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&<.postRender(()=>a(t,Ka(t)))}class px extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=V9(t,(n,r)=>(Dh(this.node,r,"Start"),(i,{success:a})=>Dh(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Tl=new WeakMap,su=new WeakMap,mx=e=>{const t=Tl.get(e.target);t&&t(e)},gx=e=>{e.forEach(mx)};function bx({root:e,...t}){const n=e||document;su.has(n)||su.set(n,{});const r=su.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gx,{root:e,...t})),r[i]}function yx(e,t,n){const r=bx(t);return Tl.set(e,n),r.observe(e),()=>{Tl.delete(e),r.unobserve(e)}}const vx={some:0,all:1};class Tx extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:vx[i]},o=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),p=l?c:d;p&&p(u)};return yx(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xx(t,n))&&this.startObserver()}unmount(){}}function xx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ex={inView:{Feature:Tx},tap:{Feature:px},focus:{Feature:fx},hover:{Feature:hx}},Sx={layout:{ProjectionNode:i2,MeasureLayout:Km}},wx={...oT,...Ex,...dx,...Sx};function Ax(e,t){return Tv(e,t,wx,_v)}const j0=Ax("div"),Cx=ue(Ge)(({theme:e})=>{const{spacing:t}=e;return{position:"relative",flex:1,gap:t(1.5),overflowX:"hidden",overflowY:"auto"}}),kx=ue(pp)(({theme:e,variant:t})=>{const{spacing:n}=e;return{gap:n(t==="list"?1.5:0)}}),Ix=ue(Fb)(({theme:e})=>{const{spacing:t}=e;return{flex:"none",gap:t(1),backgroundColor:"transparent",padding:t(2),overflow:"visible"}}),Nx=ue(Ub)(({theme:e})=>({color:"inherit",fontSize:"1.5rem",width:"1em",height:"1em",display:"inline-flex",alignItems:"center",justifyContent:"center"})),Rx=ue($b)(({theme:e})=>({position:"relative",display:"block",height:"100%"})),Mx=ue(j0)(({theme:e,variant:t})=>({fontSize:t==="list"?"1.5rem":"1em",width:"1em",height:"1em",display:"inline-flex",alignItems:"center",justifyContent:"center",transformOrigin:"center"})),Dx={waiting:"info",available:"success",failed:"error"},Px={waiting:I8,available:g8,failed:j1},Lx=ue(Ar)(({theme:e})=>{const{spacing:t}=e;return{position:"relative",width:"1.5rem",height:"3.25rem",overflow:"hidden"}}),Ox=({animate:e})=>k.jsx(Lx,{children:k.jsx("svg",{style:{position:"absolute",top:0,left:"50%",transform:"translateX(-50%)"},width:2,height:256,viewBox:"0 0 2 256",fill:"none",children:k.jsx("line",{x1:"1",y1:"0",x2:"1",y2:256,stroke:"#9B9B9B",strokeWidth:"2",strokeDasharray:"4",children:e&&k.jsx("animate",{attributeName:"stroke-dashoffset",from:256,to:"0",dur:`${256/32}s`,repeatCount:"indefinite"})})})}),Ph=({variant:e,node:t})=>{const{id:n,status:r,gpuName:i,gpuMemory:a}=t||{status:"waiting"},{palette:s}=ja(),{main:o,lighter:u}=r==="waiting"?{main:s.grey[800],lighter:s.grey[250]}:s[Dx[r]],l=r==="failed"?.2:void 0,c=Px[r];return k.jsxs(Ix,{component:e==="list"?mo:Ar,variant:"outlined",sx:{opacity:l,padding:e==="menu"?0:void 0,height:e==="menu"?"2.5rem":void 0},children:[k.jsx(Nx,{children:k.jsx(E8,{})}),k.jsx(Rx,{children:k.jsx(Ge,{sx:e==="menu"?{position:"absolute",top:"50%",left:0,right:0,transform:"translateY(-50%)"}:void 0,children:t&&k.jsx(k.Fragment,{children:k.jsxs(Ke,{variant:"body1",sx:{fontWeight:500},children:[i," ",a,"GB"]})})||k.jsx(k.Fragment,{children:k.jsx(B7,{height:"1lh"})})})}),t&&k.jsxs(Mx,{sx:{color:o},...r==="waiting"&&{animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:2}},variant:e,children:[e==="list"&&k.jsx(c,{size:18}),e==="menu"&&k.jsx(_8,{size:10})]})]})},Ts=({variant:e="list",...t})=>{const[{clusterInfo:{status:n,initNodesNumber:r},nodeInfoList:i}]=qa(),[{status:a}]=Zl(),{length:s}=i,o=a==="generating";let u=0;const l=e==="menu"?c=>u++>0&&k.jsx(Ox,{animate:o},c):()=>{};return k.jsx(Cx,{...t,children:k.jsxs(kx,{variant:e,children:[i.map((c,d)=>[l(`${c.id}-dash`),k.jsx(Ph,{variant:e,node:c},c.id)]),n!=="idle"&&r>s&&Array.from({length:r-s}).map((c,d)=>[l(`${d}-dash`),k.jsx(Ph,{variant:e},d)])]})})},_x={small:1,medium:1.25,large:2.25},Bx=ue(j0)(({theme:e,size:t})=>{const n=`${_x[t]}rem`;return{position:"relative",width:n,height:n,display:"inline-flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"}}),ou=ue(j0)(({theme:e})=>({flex:1,aspectRatio:1,borderRadius:"50%",backgroundColor:"currentColor"})),uu={pulse:{scale:[0,.6,0,0],keyTimes:[0,.3,.6,1],transition:{duration:2,repeat:1/0,ease:"linear"}}},Fx={staggerChildren:.25,staggerDirection:1},Hx=L.forwardRef(({size:e="medium"},t)=>k.jsxs(Bx,{ref:t,size:e,animate:"pulse",transition:Fx,children:[k.jsx(ou,{variants:uu},1),k.jsx(ou,{variants:uu},2),k.jsx(ou,{variants:uu},3)]}));function Lh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function a2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ux=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vx={};function Oh(e,t){return(Vx.jsx?Ux:zx).test(e)}const jx=/[ \t\n\f\r]/g;function qx(e){return typeof e=="object"?e.type==="text"?_h(e.value):!1:_h(e)}function _h(e){return e.replace(jx,"")===""}let Qa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Qa.prototype.normal={};Qa.prototype.property={};Qa.prototype.space=void 0;function s2(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qa(n,r,t)}function Ba(e){return e.toLowerCase()}let an=class{constructor(t,n){this.attribute=n,this.property=t}};an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let $x=0;const Le=ti(),Mt=ti(),xl=ti(),ae=ti(),tt=ti(),Ti=ti(),un=ti();function ti(){return 2**++$x}const El=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Mt,commaOrSpaceSeparated:un,commaSeparated:Ti,number:ae,overloadedBoolean:xl,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),lu=Object.keys(El);let q0=class extends an{constructor(t,n,r,i){let a=-1;if(super(t,n),Bh(this,"space",i),typeof r=="number")for(;++a4&&n.slice(0,4)==="data"&&Kx.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Fh,Zx);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Fh.test(a)){let s=a.replace(Xx,Qx);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=q0}return new i(r,t)}function Qx(e){return"-"+e.toLowerCase()}function Zx(e){return e.charAt(1).toUpperCase()}const Co=s2([o2,Wx,c2,d2,h2],"html"),Bi=s2([o2,Yx,c2,d2,h2],"svg");function Hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function f2(e){return e.join(" ").trim()}var oi={},cu,zh;function Jx(){if(zh)return cu;zh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=` `,l="/",c="*",d="",p="comment",f="declaration";cu=function(v,E){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];E=E||{};var y=1,w=1;function x(G){var q=G.match(t);q&&(y+=q.length);var Y=G.lastIndexOf(u);w=~Y?G.length-Y:w+G.length}function I(){var G={line:y,column:w};return function(q){return q.position=new M(G),z(),q}}function M(G){this.start=G,this.end={line:y,column:w},this.source=E.source}M.prototype.content=v;function C(G){var q=new Error(E.source+":"+y+":"+w+": "+G);if(q.reason=G,q.filename=E.source,q.line=y,q.column=w,q.source=v,!E.silent)throw q}function H(G){var q=G.exec(v);if(q){var Y=q[0];return x(Y),v=v.slice(Y.length),q}}function z(){H(n)}function V(G){var q;for(G=G||[];q=P();)q!==!1&&G.push(q);return G}function P(){var G=I();if(!(l!=v.charAt(0)||c!=v.charAt(1))){for(var q=2;d!=v.charAt(q)&&(c!=v.charAt(q)||l!=v.charAt(q+1));)++q;if(q+=2,d===v.charAt(q-1))return C("End of comment missing");var Y=v.slice(2,q-2);return w+=2,x(Y),v=v.slice(q),w+=2,G({type:p,comment:Y})}}function $(){var G=I(),q=H(r);if(q){if(P(),!H(i))return C("property missing ':'");var Y=H(a),Q=G({type:f,property:b(q[0].replace(e,d)),value:Y?b(Y[0].replace(e,d)):d});return H(s),Q}}function W(){var G=[];V(G);for(var q;q=$();)q!==!1&&(G.push(q),V(G));return G}return z(),W()};function b(v){return v?v.replace(o,d):d}return cu}var Uh;function eE(){if(Uh)return oi;Uh=1;var e=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=n;var t=e(Jx());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var l=u.property,c=u.value;o?i(l,c,u):c&&(a=a||{},a[l]=c)}}),a}return oi}var Qi={},Vh;function tE(){if(Vh)return Qi;Vh=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||e.test(l)},s=function(l,c){return c.toUpperCase()},o=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),a(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,s))};return Qi.camelCase=u,Qi}var Zi,jh;function nE(){if(jh)return Zi;jh=1;var e=Zi&&Zi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(eE()),n=tE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(s[(0,n.camelCase)(o,a)]=u)}),s}return r.default=r,Zi=r,Zi}var rE=nE();const iE=$1(rE),ko=p2("end"),Gn=p2("start");function p2(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function m2(e){const t=Gn(e),n=ko(e);if(t&&n)return{start:t,end:n}}function ga(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qh(e.position):"start"in e||"end"in e?qh(e):"line"in e||"column"in e?Sl(e):""}function Sl(e){return $h(e&&e.line)+":"+$h(e&&e.column)}function qh(e){return Sl(e&&e.start)+"-"+Sl(e&&e.end)}function $h(e){return e&&typeof e=="number"?e:1}class jt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ga(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}jt.prototype.file="";jt.prototype.name="";jt.prototype.reason="";jt.prototype.message="";jt.prototype.stack="";jt.prototype.column=void 0;jt.prototype.line=void 0;jt.prototype.ancestors=void 0;jt.prototype.cause=void 0;jt.prototype.fatal=void 0;jt.prototype.place=void 0;jt.prototype.ruleId=void 0;jt.prototype.source=void 0;const W0={}.hasOwnProperty,aE=new Map,sE=/[A-Z]/g,oE=new Set(["table","tbody","thead","tfoot","tr"]),uE=new Set(["td","th"]),g2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=gE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bi:Co,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=b2(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function b2(e,t,n){if(t.type==="element")return cE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fE(e,t,n);if(t.type==="mdxjsEsm")return hE(e,t);if(t.type==="root")return pE(e,t,n);if(t.type==="text")return mE(e,t)}function cE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Bi,e.schema=i),e.ancestors.push(t);const a=v2(e,t.tagName,!1),s=yE(e,t);let o=G0(e,t);return oE.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!qx(u):!0})),y2(e,s,a,t),Y0(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function dE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fa(e,t.position)}function hE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fa(e,t.position)}function fE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Bi,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:v2(e,t.name,!0),s=vE(e,t),o=G0(e,t);return y2(e,s,a,t),Y0(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function pE(e,t,n){const r={};return Y0(r,G0(e,t)),e.create(t,e.Fragment,r,n)}function mE(e,t){return t.value}function y2(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Y0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gE(e,t,n){return r;function r(i,a,s,o){const l=Array.isArray(s.children)?n:t;return o?l(a,s,o):l(a,s)}}function bE(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=Gn(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function yE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&W0.call(t.properties,i)){const a=TE(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&uE.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function vE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Fa(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Fa(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function G0(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:aE;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a0?(hn(e,e.length,0,t),e):t}const Gh={}.hasOwnProperty;function x2(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Dn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wt=Pr(/[A-Za-z]/),Ut=Pr(/[\dA-Za-z]/),NE=Pr(/[#-'*+\--9=?A-Z^-~]/);function no(e){return e!==null&&(e<32||e===127)}const wl=Pr(/\d/),RE=Pr(/[\dA-Fa-f]/),ME=Pr(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function Ue(e){return e===-2||e===-1||e===32}const Io=Pr(new RegExp("\\p{P}|\\p{S}","u")),Jr=Pr(/\s/);function Pr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Fi(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ze(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Ue(u)?(e.enter(n),o(u)):t(u)}function o(u){return Ue(u)&&a++s))return;const H=t.events.length;let z=H,V,P;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(V){P=t.events[z][1].end;break}V=!0}for(y(r),C=H;Cx;){const M=n[I];t.containerState=M[1],M[0].exit.call(t,e)}n.length=x}function w(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _E(e,t,n){return ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ni(e){if(e===null||Ze(e)||Jr(e))return 1;if(Io(e))return 2}function No(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Kh(d,-u),Kh(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=vn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=vn(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=vn(l,No(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=vn(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=vn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,hn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n0&&Ue(C)?ze(e,w,"linePrefix",a+1)(C):w(C)}function w(C){return C===null||fe(C)?e.check(Qh,v,I)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||fe(C)?(e.exit("codeFlowValue"),w(C)):(e.consume(C),x)}function I(C){return e.exit("codeFenced"),t(C)}function M(C,H,z){let V=0;return P;function P(Y){return C.enter("lineEnding"),C.consume(Y),C.exit("lineEnding"),$}function $(Y){return C.enter("codeFencedFence"),Ue(Y)?ze(C,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):W(Y)}function W(Y){return Y===o?(C.enter("codeFencedFenceSequence"),G(Y)):z(Y)}function G(Y){return Y===o?(V++,C.consume(Y),G):V>=s?(C.exit("codeFencedFenceSequence"),Ue(Y)?ze(C,q,"whitespace")(Y):q(Y)):z(Y)}function q(Y){return Y===null||fe(Y)?(C.exit("codeFencedFence"),H(Y)):z(Y)}}}function GE(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const hu={name:"codeIndented",tokenize:KE},XE={partial:!0,tokenize:QE};function KE(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),ze(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):fe(l)?e.attempt(XE,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||fe(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function QE(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ze(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):fe(s)?i(s):n(s)}}const ZE={name:"codeText",previous:eS,resolve:JE,tokenize:tS};function JE(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ji(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ji(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ji(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function k2(e,t,n,r,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),p):y===null||y===32||y===41||no(y)?n(y):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),v(y))}function p(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),p(y)):y===null||y===60||fe(y)?n(y):(e.consume(y),y===92?b:f)}function b(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function v(y){return!c&&(y===null||y===41||Ze(y))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):c999||f===null||f===91||f===93&&!u||f===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):fe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||fe(f)||o++>999?(e.exit("chunkString"),c(f)):(e.consume(f),u||(u=!Ue(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function N2(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),u(s)):p===null?n(p):fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ze(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||fe(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:c)}function d(p){return p===s||p===92?(e.consume(p),c):c(p)}}function ba(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ue(i)?ze(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const lS={name:"definition",tokenize:dS},cS={partial:!0,tokenize:hS};function dS(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return I2.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=Dn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return Ze(f)?ba(e,l)(f):l(f)}function l(f){return k2(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(cS,d,d)(f)}function d(f){return Ue(f)?ze(e,p,"whitespace")(f):p(f)}function p(f){return f===null||fe(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function hS(e,t,n){return r;function r(o){return Ze(o)?ba(e,i)(o):n(o)}function i(o){return N2(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Ue(o)?ze(e,s,"whitespace")(o):s(o)}function s(o){return o===null||fe(o)?t(o):n(o)}}const fS={name:"hardBreakEscape",tokenize:pS};function pS(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return fe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const mS={name:"headingAtx",resolve:gS,tokenize:bS};function gS(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},hn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function bS(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Ze(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||fe(c)?(e.exit("atxHeading"),t(c)):Ue(c)?ze(e,o,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function l(c){return c===null||c===35||Ze(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),l)}}const yS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jh=["pre","script","style","textarea"],vS={concrete:!0,name:"htmlFlow",resolveTo:ES,tokenize:SS},TS={partial:!0,tokenize:AS},xS={partial:!0,tokenize:wS};function ES(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function SS(e,t,n){const r=this;let i,a,s,o,u;return l;function l(B){return c(B)}function c(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),d}function d(B){return B===33?(e.consume(B),p):B===47?(e.consume(B),a=!0,v):B===63?(e.consume(B),i=3,r.interrupt?t:R):Wt(B)?(e.consume(B),s=String.fromCharCode(B),E):n(B)}function p(B){return B===45?(e.consume(B),i=2,f):B===91?(e.consume(B),i=5,o=0,b):Wt(B)?(e.consume(B),i=4,r.interrupt?t:R):n(B)}function f(B){return B===45?(e.consume(B),r.interrupt?t:R):n(B)}function b(B){const xe="CDATA[";return B===xe.charCodeAt(o++)?(e.consume(B),o===xe.length?r.interrupt?t:W:b):n(B)}function v(B){return Wt(B)?(e.consume(B),s=String.fromCharCode(B),E):n(B)}function E(B){if(B===null||B===47||B===62||Ze(B)){const xe=B===47,Ie=s.toLowerCase();return!xe&&!a&&Jh.includes(Ie)?(i=1,r.interrupt?t(B):W(B)):yS.includes(s.toLowerCase())?(i=6,xe?(e.consume(B),y):r.interrupt?t(B):W(B)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):a?w(B):x(B))}return B===45||Ut(B)?(e.consume(B),s+=String.fromCharCode(B),E):n(B)}function y(B){return B===62?(e.consume(B),r.interrupt?t:W):n(B)}function w(B){return Ue(B)?(e.consume(B),w):P(B)}function x(B){return B===47?(e.consume(B),P):B===58||B===95||Wt(B)?(e.consume(B),I):Ue(B)?(e.consume(B),x):P(B)}function I(B){return B===45||B===46||B===58||B===95||Ut(B)?(e.consume(B),I):M(B)}function M(B){return B===61?(e.consume(B),C):Ue(B)?(e.consume(B),M):x(B)}function C(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),u=B,H):Ue(B)?(e.consume(B),C):z(B)}function H(B){return B===u?(e.consume(B),u=null,V):B===null||fe(B)?n(B):(e.consume(B),H)}function z(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Ze(B)?M(B):(e.consume(B),z)}function V(B){return B===47||B===62||Ue(B)?x(B):n(B)}function P(B){return B===62?(e.consume(B),$):n(B)}function $(B){return B===null||fe(B)?W(B):Ue(B)?(e.consume(B),$):n(B)}function W(B){return B===45&&i===2?(e.consume(B),Q):B===60&&i===1?(e.consume(B),ee):B===62&&i===4?(e.consume(B),Ce):B===63&&i===3?(e.consume(B),R):B===93&&i===5?(e.consume(B),oe):fe(B)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(TS,ve,G)(B)):B===null||fe(B)?(e.exit("htmlFlowData"),G(B)):(e.consume(B),W)}function G(B){return e.check(xS,q,ve)(B)}function q(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),Y}function Y(B){return B===null||fe(B)?G(B):(e.enter("htmlFlowData"),W(B))}function Q(B){return B===45?(e.consume(B),R):W(B)}function ee(B){return B===47?(e.consume(B),s="",de):W(B)}function de(B){if(B===62){const xe=s.toLowerCase();return Jh.includes(xe)?(e.consume(B),Ce):W(B)}return Wt(B)&&s.length<8?(e.consume(B),s+=String.fromCharCode(B),de):W(B)}function oe(B){return B===93?(e.consume(B),R):W(B)}function R(B){return B===62?(e.consume(B),Ce):B===45&&i===2?(e.consume(B),R):W(B)}function Ce(B){return B===null||fe(B)?(e.exit("htmlFlowData"),ve(B)):(e.consume(B),Ce)}function ve(B){return e.exit("htmlFlow"),t(B)}}function wS(e,t,n){const r=this;return i;function i(s){return fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function AS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Za,t,n)}}const CS={name:"htmlText",tokenize:kS};function kS(e,t,n){const r=this;let i,a,s;return o;function o(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),u}function u(R){return R===33?(e.consume(R),l):R===47?(e.consume(R),M):R===63?(e.consume(R),x):Wt(R)?(e.consume(R),z):n(R)}function l(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,b):Wt(R)?(e.consume(R),w):n(R)}function c(R){return R===45?(e.consume(R),f):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),p):fe(R)?(s=d,ee(R)):(e.consume(R),d)}function p(R){return R===45?(e.consume(R),f):d(R)}function f(R){return R===62?Q(R):R===45?p(R):d(R)}function b(R){const Ce="CDATA[";return R===Ce.charCodeAt(a++)?(e.consume(R),a===Ce.length?v:b):n(R)}function v(R){return R===null?n(R):R===93?(e.consume(R),E):fe(R)?(s=v,ee(R)):(e.consume(R),v)}function E(R){return R===93?(e.consume(R),y):v(R)}function y(R){return R===62?Q(R):R===93?(e.consume(R),y):v(R)}function w(R){return R===null||R===62?Q(R):fe(R)?(s=w,ee(R)):(e.consume(R),w)}function x(R){return R===null?n(R):R===63?(e.consume(R),I):fe(R)?(s=x,ee(R)):(e.consume(R),x)}function I(R){return R===62?Q(R):x(R)}function M(R){return Wt(R)?(e.consume(R),C):n(R)}function C(R){return R===45||Ut(R)?(e.consume(R),C):H(R)}function H(R){return fe(R)?(s=H,ee(R)):Ue(R)?(e.consume(R),H):Q(R)}function z(R){return R===45||Ut(R)?(e.consume(R),z):R===47||R===62||Ze(R)?V(R):n(R)}function V(R){return R===47?(e.consume(R),Q):R===58||R===95||Wt(R)?(e.consume(R),P):fe(R)?(s=V,ee(R)):Ue(R)?(e.consume(R),V):Q(R)}function P(R){return R===45||R===46||R===58||R===95||Ut(R)?(e.consume(R),P):$(R)}function $(R){return R===61?(e.consume(R),W):fe(R)?(s=$,ee(R)):Ue(R)?(e.consume(R),$):V(R)}function W(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,G):fe(R)?(s=W,ee(R)):Ue(R)?(e.consume(R),W):(e.consume(R),q)}function G(R){return R===i?(e.consume(R),i=void 0,Y):R===null?n(R):fe(R)?(s=G,ee(R)):(e.consume(R),G)}function q(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Ze(R)?V(R):(e.consume(R),q)}function Y(R){return R===47||R===62||Ze(R)?V(R):n(R)}function Q(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ee(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),de}function de(R){return Ue(R)?ze(e,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):oe(R)}function oe(R){return e.enter("htmlTextData"),s(R)}}const Q0={name:"labelEnd",resolveAll:MS,resolveTo:DS,tokenize:PS},IS={tokenize:LS},NS={tokenize:OS},RS={tokenize:_S};function MS(e){let t=-1;const n=[];for(;++t=3&&(l===null||fe(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ue(l)?ze(e,o,"whitespace")(l):o(l))}}const Jt={continuation:{tokenize:WS},exit:GS,name:"list",tokenize:$S},jS={partial:!0,tokenize:XS},qS={partial:!0,tokenize:YS};function $S(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(f){const b=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:wl(f)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Vs,n,l)(f):l(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return wl(f)&&++s<10?(e.consume(f),u):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):n(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Za,r.interrupt?n:c,e.attempt(jS,p,d))}function c(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function d(f){return Ue(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function WS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Za,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!Ue(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(qS,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(e,e.attempt(Jt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function YS(e,t,n){const r=this;return ze(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function GS(e){e.exit(this.containerState.type)}function XS(e,t,n){const r=this;return ze(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Ue(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ef={name:"setextUnderline",resolveTo:KS,tokenize:QS};function KS(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function QS(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),Ue(l)?ze(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||fe(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const ZS={tokenize:JS};function JS(e){const t=this,n=e.attempt(Za,r,e.attempt(this.parser.constructs.flowInitial,i,ze(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iS,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ew={resolveAll:M2()},tw=R2("string"),nw=R2("text");function R2(e){return{resolveAll:M2(e==="text"?rw:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(c){return l(c)?a(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let p=-1;if(d)for(;++p-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function gw(e,t){let n=-1;const r=[];let i;for(;++n0){const Se=me.tokenStack[me.tokenStack.length-1];(Se[1]||nf).call(me,void 0,Se[0])}for(ie.position={start:gr(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:gr(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Peg.isValidElement(e))}function ct(t){return H("MuiInputAdornment",t)}const F=V("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var U;const pt=(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${R(r.position)}`],r.disablePointerEvents===!0&&e.disablePointerEvents,e[r.variant]]},gt=t=>{const{classes:e,disablePointerEvents:r,hiddenLabel:u,position:i,size:c,variant:v}=t,d={root:["root",r&&"disablePointerEvents",i&&`position${R(i)}`,v,u&&"hiddenLabel",c&&`size${R(c)}`]};return O(d,ct,e)},ft=A("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:pt})(W(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${F.positionStart}&:not(.${F.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),D=g.forwardRef(function(e,r){const u=z({props:e,name:"MuiInputAdornment"}),{children:i,className:c,component:v="div",disablePointerEvents:d=!1,disableTypography:b=!1,position:x,variant:n,...f}=u,a=rt()||{};let l=n;n&&a.variant,a&&!l&&(l=a.variant);const m={...u,hiddenLabel:a.hiddenLabel,size:a.size,disablePointerEvents:d,position:x,variant:l},C=gt(m);return o.jsx(st.Provider,{value:null,children:o.jsx(ft,{as:v,ownerState:m,className:E(C.root,c),ref:r,...f,children:typeof i=="string"&&!b?o.jsx(B,{color:"textSecondary",children:i}):o.jsxs(g.Fragment,{children:[x==="start"?U||(U=o.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})}),q=g.createContext({}),Y=g.createContext(void 0);function vt(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.includes(t):t===e}const xt=t=>{const{classes:e,fullWidth:r,selected:u,disabled:i,size:c,color:v}=t,d={root:["root",u&&"selected",i&&"disabled",r&&"fullWidth",`size${R(c)}`,v]};return O(d,K,e)},bt=A(Q,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`size${R(r.size)}`]]}})(W(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${j.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${j.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter(X()).map(([e])=>({props:{color:e},style:{[`&.${j.selected}`]:{color:(t.vars||t).palette[e].main,backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),_=g.forwardRef(function(e,r){const{value:u,...i}=g.useContext(q),c=g.useContext(Y),v=J({...i,selected:vt(e.value,u)},e),d=z({props:v,name:"MuiToggleButton"}),{children:b,className:x,color:n="standard",disabled:f=!1,disableFocusRipple:a=!1,fullWidth:l=!1,onChange:m,onClick:C,selected:y,size:N="medium",value:T,...P}=d,w={...d,color:n,disabled:f,disableFocusRipple:a,fullWidth:l,size:N},M=xt(w),L=p=>{C&&(C(p,T),p.defaultPrevented)||m&&m(p,T)},h=c||"";return o.jsx(bt,{className:E(i.className,M.root,x,h),disabled:f,focusRipple:!a,ref:r,onClick:L,onChange:m,value:T,ownerState:w,"aria-pressed":y,...P,children:b})});function ht(t){return H("MuiToggleButtonGroup",t)}const s=V("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),mt=t=>{const{classes:e,orientation:r,fullWidth:u,disabled:i}=t,c={root:["root",r,u&&"fullWidth"],grouped:["grouped",`grouped${R(r)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return O(c,ht,e)},yt=A("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${s.grouped}`]:e.grouped},{[`& .${s.grouped}`]:e[`grouped${R(r.orientation)}`]},{[`& .${s.firstButton}`]:e.firstButton},{[`& .${s.lastButton}`]:e.lastButton},{[`& .${s.middleButton}`]:e.middleButton},e.root,r.orientation==="vertical"&&e.vertical,r.fullWidth&&e.fullWidth]}})(W(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${s.grouped}`]:{[`&.${s.selected} + .${s.grouped}.${s.selected}`]:{borderTop:0,marginTop:0}},[`& .${s.firstButton},& .${s.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${s.lastButton},& .${s.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${s.lastButton}.${j.disabled},& .${s.middleButton}.${j.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${s.grouped}`]:{[`&.${s.selected} + .${s.grouped}.${s.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${s.firstButton},& .${s.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${s.lastButton},& .${s.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${s.lastButton}.${j.disabled},& .${s.middleButton}.${j.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),Bt=g.forwardRef(function(e,r){const u=z({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:c,color:v="standard",disabled:d=!1,exclusive:b=!1,fullWidth:x=!1,onChange:n,orientation:f="horizontal",size:a="medium",value:l,...m}=u,C={...u,disabled:d,fullWidth:x,orientation:f,size:a},y=mt(C),N=g.useCallback((h,p)=>{if(!n)return;const S=l&&l.indexOf(p);let I;l&&S>=0?(I=l.slice(),I.splice(S,1)):I=l?l.concat(p):[p],n(h,I)},[n,l]),T=g.useCallback((h,p)=>{n&&n(h,l===p?null:p)},[n,l]),P=g.useMemo(()=>({className:y.grouped,onChange:b?T:N,value:l,size:a,fullWidth:x,color:v,disabled:d}),[y.grouped,b,T,N,l,a,x,v,d]),w=ut(i),M=w.length,L=h=>{const p=h===0,S=h===M-1;return p&&S?"":p?y.firstButton:S?y.lastButton:y.middleButton};return o.jsx(yt,{role:"group",className:E(y.root,c),ref:r,ownerState:C,...m,children:o.jsx(q.Provider,{value:P,children:w.map((h,p)=>o.jsx(Y.Provider,{value:L(p),children:h},p))})})});/** +import{r as g,g as V,a as H,u as z,j as o,s as A,c as E,T as B,b as R,d as O,m as W,e as J,f as K,B as Q,t as j,h as X,i as Z,k as tt,l as k,I as G,n as et,o as ot,S as $,p as nt}from"./index-CPt7BZLW.js";import{u as rt,F as st,O as at,I as it,M as lt,a as dt}from"./main-layout-lDcJ7mSn.js";function ut(t){return g.Children.toArray(t).filter(e=>g.isValidElement(e))}function ct(t){return H("MuiInputAdornment",t)}const F=V("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var U;const pt=(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${R(r.position)}`],r.disablePointerEvents===!0&&e.disablePointerEvents,e[r.variant]]},gt=t=>{const{classes:e,disablePointerEvents:r,hiddenLabel:u,position:i,size:c,variant:v}=t,d={root:["root",r&&"disablePointerEvents",i&&`position${R(i)}`,v,u&&"hiddenLabel",c&&`size${R(c)}`]};return O(d,ct,e)},ft=A("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:pt})(W(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${F.positionStart}&:not(.${F.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),D=g.forwardRef(function(e,r){const u=z({props:e,name:"MuiInputAdornment"}),{children:i,className:c,component:v="div",disablePointerEvents:d=!1,disableTypography:b=!1,position:x,variant:n,...f}=u,a=rt()||{};let l=n;n&&a.variant,a&&!l&&(l=a.variant);const m={...u,hiddenLabel:a.hiddenLabel,size:a.size,disablePointerEvents:d,position:x,variant:l},C=gt(m);return o.jsx(st.Provider,{value:null,children:o.jsx(ft,{as:v,ownerState:m,className:E(C.root,c),ref:r,...f,children:typeof i=="string"&&!b?o.jsx(B,{color:"textSecondary",children:i}):o.jsxs(g.Fragment,{children:[x==="start"?U||(U=o.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})}),q=g.createContext({}),Y=g.createContext(void 0);function vt(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.includes(t):t===e}const xt=t=>{const{classes:e,fullWidth:r,selected:u,disabled:i,size:c,color:v}=t,d={root:["root",u&&"selected",i&&"disabled",r&&"fullWidth",`size${R(c)}`,v]};return O(d,K,e)},bt=A(Q,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`size${R(r.size)}`]]}})(W(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${j.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${j.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter(X()).map(([e])=>({props:{color:e},style:{[`&.${j.selected}`]:{color:(t.vars||t).palette[e].main,backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[e].main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),_=g.forwardRef(function(e,r){const{value:u,...i}=g.useContext(q),c=g.useContext(Y),v=J({...i,selected:vt(e.value,u)},e),d=z({props:v,name:"MuiToggleButton"}),{children:b,className:x,color:n="standard",disabled:f=!1,disableFocusRipple:a=!1,fullWidth:l=!1,onChange:m,onClick:C,selected:y,size:N="medium",value:T,...P}=d,w={...d,color:n,disabled:f,disableFocusRipple:a,fullWidth:l,size:N},M=xt(w),L=p=>{C&&(C(p,T),p.defaultPrevented)||m&&m(p,T)},h=c||"";return o.jsx(bt,{className:E(i.className,M.root,x,h),disabled:f,focusRipple:!a,ref:r,onClick:L,onChange:m,value:T,ownerState:w,"aria-pressed":y,...P,children:b})});function ht(t){return H("MuiToggleButtonGroup",t)}const s=V("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),mt=t=>{const{classes:e,orientation:r,fullWidth:u,disabled:i}=t,c={root:["root",r,u&&"fullWidth"],grouped:["grouped",`grouped${R(r)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return O(c,ht,e)},yt=A("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${s.grouped}`]:e.grouped},{[`& .${s.grouped}`]:e[`grouped${R(r.orientation)}`]},{[`& .${s.firstButton}`]:e.firstButton},{[`& .${s.lastButton}`]:e.lastButton},{[`& .${s.middleButton}`]:e.middleButton},e.root,r.orientation==="vertical"&&e.vertical,r.fullWidth&&e.fullWidth]}})(W(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${s.grouped}`]:{[`&.${s.selected} + .${s.grouped}.${s.selected}`]:{borderTop:0,marginTop:0}},[`& .${s.firstButton},& .${s.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${s.lastButton},& .${s.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${s.lastButton}.${j.disabled},& .${s.middleButton}.${j.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${s.grouped}`]:{[`&.${s.selected} + .${s.grouped}.${s.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${s.firstButton},& .${s.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${s.lastButton},& .${s.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${s.lastButton}.${j.disabled},& .${s.middleButton}.${j.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),Bt=g.forwardRef(function(e,r){const u=z({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:c,color:v="standard",disabled:d=!1,exclusive:b=!1,fullWidth:x=!1,onChange:n,orientation:f="horizontal",size:a="medium",value:l,...m}=u,C={...u,disabled:d,fullWidth:x,orientation:f,size:a},y=mt(C),N=g.useCallback((h,p)=>{if(!n)return;const S=l&&l.indexOf(p);let I;l&&S>=0?(I=l.slice(),I.splice(S,1)):I=l?l.concat(p):[p],n(h,I)},[n,l]),T=g.useCallback((h,p)=>{n&&n(h,l===p?null:p)},[n,l]),P=g.useMemo(()=>({className:y.grouped,onChange:b?T:N,value:l,size:a,fullWidth:x,color:v,disabled:d}),[y.grouped,b,T,N,l,a,x,v,d]),w=ut(i),M=w.length,L=h=>{const p=h===0,S=h===M-1;return p&&S?"":p?y.firstButton:S?y.lastButton:y.middleButton};return o.jsx(yt,{role:"group",className:E(y.root,c),ref:r,ownerState:C,...m,children:o.jsx(q.Provider,{value:P,children:w.map((h,p)=>o.jsx(Y.Provider,{value:L(p),children:h},p))})})});/** * @license @tabler/icons-react v3.35.0 - MIT * * This source code is licensed under the MIT license. diff --git a/src/frontend/dist/index.html b/src/frontend/dist/index.html index 1f8bc88..fdedec9 100644 --- a/src/frontend/dist/index.html +++ b/src/frontend/dist/index.html @@ -5,7 +5,7 @@ Parallax by Gradient - + diff --git a/src/frontend/src/components/inputs/chat-input.tsx b/src/frontend/src/components/inputs/chat-input.tsx index d91a374..fb8e2f1 100644 --- a/src/frontend/src/components/inputs/chat-input.tsx +++ b/src/frontend/src/components/inputs/chat-input.tsx @@ -1,5 +1,11 @@ import { Button, Stack, TextField } from '@mui/material'; -import type { FC, KeyboardEventHandler } from 'react'; +import { + useRef, + type CompositionEventHandler, + type FC, + type KeyboardEventHandler, + type MouseEventHandler, +} from 'react'; import { useRefCallback } from '../../hooks'; import { useChat, useCluster } from '../../services'; import { IconArrowBackUp, IconArrowUp, IconSquareFilled } from '@tabler/icons-react'; @@ -14,13 +20,35 @@ export const ChatInput: FC = () => { ] = useCluster(); const [{ input, status }, { setInput, generate, stop, clear }] = useChat(); + const compositionRef = useRef(false); + + const onCompositionStart = useRefCallback((e) => { + compositionRef.current = true; + }); + + const onCompositionEnd = useRefCallback((e) => { + compositionRef.current = false; + }); + const onKeyDown = useRefCallback((e) => { - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !compositionRef.current) { e.preventDefault(); generate(); } }); + const onClickMainButton = useRefCallback((e) => { + if (status === 'opened' || status === 'generating') { + stop(); + } else if (status === 'closed' || status === 'error') { + generate(); + } + }); + + const onClickClearButton = useRefCallback((e) => { + clear(); + }); + return ( {/* @@ -33,6 +61,8 @@ export const ChatInput: FC = () => { maxRows={4} placeholder='Ask anything' fullWidth + onCompositionStart={onCompositionStart} + onCompositionEnd={onCompositionEnd} onKeyDown={onKeyDown} slotProps={{ input: { @@ -59,7 +89,7 @@ export const ChatInput: FC = () => { sx={{ color: 'text.secondary' }} startIcon={} disabled={status === 'opened' || status === 'generating'} - onClick={clear} + onClick={onClickClearButton} > Clear @@ -68,13 +98,7 @@ export const ChatInput: FC = () => { color='primary' disabled={clusterStatus !== 'available' || status === 'opened'} // loading={status === 'opened'} - onClick={() => { - if (status === 'generating') { - stop(); - } else if (status === 'closed' || status === 'error') { - generate(); - } - }} + onClick={onClickMainButton} > {status === 'opened' ? diff --git a/src/frontend/src/components/inputs/node-list.tsx b/src/frontend/src/components/inputs/node-list.tsx index c868655..1953d72 100644 --- a/src/frontend/src/components/inputs/node-list.tsx +++ b/src/frontend/src/components/inputs/node-list.tsx @@ -170,39 +170,34 @@ const Node: FC<{ variant: NodeListVariant; node?: NodeInfo }> = ({ variant, node - {(node && ( - - - {gpuName} {gpuMemory}GB - - {/* - Rancho Cordova, United States - */} - - )) || } - {/* {(node && ( - - {id && id.substring(0, 4) + '...' + id.substring(id.length - 4)} - - )) || } */} + + {(node && ( + <> + + {gpuName} {gpuMemory}GB + + {/* + Rancho Cordova, United States + */} + + )) || ( + <> + + + )} + {node && ( @@ -235,7 +230,7 @@ export interface NodeListProps { export const NodeList: FC = ({ variant = 'list', ...rest }) => { const [ { - clusterInfo: { initNodesNumber }, + clusterInfo: { status: clusterStatus, initNodesNumber }, nodeInfoList, }, ] = useCluster(); @@ -244,28 +239,38 @@ export const NodeList: FC = ({ variant = 'list', ... const { length: nodesNumber } = nodeInfoList; // const nodesNumber = 0; + const generating = chatStatus === 'generating'; + let dashIndex = 0; + const renderDash = + variant === 'menu' ? + (key: string) => { + return dashIndex++ > 0 && ; + } + : () => undefined; + return ( {nodeInfoList.map((node, index) => [ - variant === 'menu' && index > 0 && ( - - ), + renderDash(`${node.id}-dash`), , - // , + // renderDash(`${node.id}-dash-mock-0`), // , - // , + // renderDash(`${node.id}-dash-mock-1`), // , - // , + // renderDash(`${node.id}-dash-mock-2`), // , ])} - {initNodesNumber > nodesNumber - && Array.from({ length: initNodesNumber - nodesNumber }).map((_, index) => ( - - ))} + + {clusterStatus !== 'idle' + && initNodesNumber > nodesNumber + && Array.from({ length: initNodesNumber - nodesNumber }).map((_, index) => [ + renderDash(`${index}-dash`), + , + ])} );