diff --git a/README.md b/README.md index ef7f833..39f9018 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ ### Prerequisites -- You need Python 3.8 and above +- You need Python 3.10 and above - Ability to type or copy paste in your computer's Terminal or Command Line ### 🔰 Casual Users @@ -71,6 +71,8 @@ albibong 2. A window will pop out and you're good to go! +Note: If you can't start the application by typing `albibong`, you can try use `sudo albibong` instead. + ### 👨💻 Devs 1. Clone this repository diff --git a/gui/src/components/Navigation.tsx b/gui/src/components/Navigation.tsx index 78c6ed4..73d7eb0 100644 --- a/gui/src/components/Navigation.tsx +++ b/gui/src/components/Navigation.tsx @@ -186,7 +186,6 @@ const Navigation = () => { })} -
Hello
> ); }; diff --git a/gui/src/pages/DPSMeter.tsx b/gui/src/pages/DPSMeter.tsx index 18c5226..13889cb 100644 --- a/gui/src/pages/DPSMeter.tsx +++ b/gui/src/pages/DPSMeter.tsx @@ -1,6 +1,8 @@ import classNames from "classnames"; import { useContext, useRef, useState } from "react"; import styles from "./DPSMeter.module.css"; +import dungeon from "./DungeonTracker.module.css"; + import app from "../App.module.css"; import Checkbox from "../components/Checkbox"; import { WorldContext } from "../providers/WorldProvider"; @@ -17,9 +19,7 @@ import { theme } from "../theme"; export type DisplayedColumn = { Heal: boolean; - "Heal%": boolean; Damage: boolean; - "Damage%": boolean; }; export const formatter = (num: number) => { @@ -28,10 +28,8 @@ export const formatter = (num: number) => { const DPSMeter = () => { const [displayedCol, setDisplayedCol] = useState0}function te(P,$){let O=x.blockers.get(P)||Ii;return V.get(P)!==$&&V.set(P,$),O}function Le(P){x.blockers.delete(P),V.delete(P)}function Ge(P,$){let O=x.blockers.get(P)||Ii;fe(O.state==="unblocked"&&$.state==="blocked"||O.state==="blocked"&&$.state==="blocked"||O.state==="blocked"&&$.state==="proceeding"||O.state==="blocked"&&$.state==="unblocked"||O.state==="proceeding"&&$.state==="unblocked","Invalid blocker state transition: "+O.state+" -> "+$.state);let H=new Map(x.blockers);H.set(P,$),ie({blockers:H})}function Yn(P){let{currentLocation:$,nextLocation:O,historyAction:H}=P;if(V.size===0)return;V.size>1&&ai(!1,"A router only supports one blocker at a time");let Q=Array.from(V.entries()),[ce,ae]=Q[Q.length-1],oe=x.blockers.get(ce);if(!(oe&&oe.state==="proceeding")&&ae({currentLocation:$,nextLocation:O,historyAction:H}))return ce}function mo(P){let $=[];return ue.forEach((O,H)=>{(!P||P(H))&&(O.cancel(),$.push(H),ue.delete(H))}),$}function x1(P,$,O){if(d=P,g=$,b=O||null,!v&&x.navigation===bc){v=!0;let H=Sp(x.location,x.matches);H!=null&&ie({restoreScrollPosition:H})}return()=>{d=null,g=null,b=null}}function xp(P,$){return b&&b(P,$.map(H=>nk(H,x.loaderData)))||P.key}function S1(P,$){if(d&&g){let O=xp(P,$);d[O]=g()}}function Sp(P,$){if(d){let O=xp(P,$),H=d[O];if(typeof H=="number")return H}return null}function b1(P){i={},l=Nd(P,o,void 0,i)}return R={get basename(){return s},get future(){return u},get state(){return x},get routes(){return a},get window(){return t},initialize:Ae,subscribe:et,enableScrollRestoration:x1,navigate:se,fetch:jt,revalidate:Re,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:Cn,deleteFetcher:Ne,dispose:Pe,getBlocker:te,deleteBlocker:Le,_internalFetchControllers:D,_internalActiveDeferreds:ue,_internalSetRoutes:b1},R}function Tk(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ld(e,t,n,r,o,i,a,l){let s,u;if(a){s=[];for(let f of t)if(s.push(f),f.route.id===a){u=f;break}}else s=t,u=t[t.length-1];let c=_y(o||".",Ry(s,i),Va(e.pathname,n)||e.pathname,l==="path");return o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&u&&u.route.index&&!up(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Nr([n,c.pathname])),Ha(c)}function sm(e,t,n,r){if(!r||!Tk(r))return{path:n};if(r.formMethod&&!jk(r.formMethod))return{path:n,error:dn(405,{method:r.formMethod})};let o=()=>({path:n,error:dn(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=Oy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!_n(a))return o();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((b,g)=>{let[v,S]=g;return""+b+v+"="+S+`
-`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!_n(a))return o();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return o()}}}fe(typeof FormData=="function","FormData is not available in this environment");let s,u;if(r.formData)s=jd(r.formData),u=r.formData;else if(r.body instanceof FormData)s=jd(r.body),u=r.body;else if(r.body instanceof URLSearchParams)s=r.body,u=fm(s);else if(r.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(r.body),u=fm(s)}catch{return o()}let c={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(_n(c.formMethod))return{path:n,submission:c};let f=ur(n);return t&&f.search&&up(f.search)&&s.append("index",""),f.search="?"+s,{path:Ha(f),submission:c}}function $k(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function um(e,t,n,r,o,i,a,l,s,u,c,f,d,b,g,v){let S=v?Object.values(v)[0]:g?Object.values(g)[0]:void 0,p=e.createURL(t.location),h=e.createURL(o),m=v?Object.keys(v)[0]:void 0,R=$k(n,m).filter((k,T)=>{let{route:M}=k;if(M.lazy)return!0;if(M.loader==null)return!1;if(i)return M.loader.hydrate?!0:t.loaderData[M.id]===void 0&&(!t.errors||t.errors[M.id]===void 0);if(Ik(t.loaderData,t.matches[T],k)||l.some(F=>F===k.route.id))return!0;let I=t.matches[T],N=k;return cm(k,Je({currentUrl:p,currentParams:I.params,nextUrl:h,nextParams:N.params},r,{actionResult:S,defaultShouldRevalidate:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||My(I,N)}))}),x=[];return c.forEach((k,T)=>{if(i||!n.some(j=>j.route.id===k.routeId)||u.has(T))return;let M=Bo(d,k.path,b);if(!M){x.push({key:T,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(T),N=Ad(M,k.path),F=!1;f.has(T)?F=!1:s.includes(T)?F=!0:I&&I.state!=="idle"&&I.data===void 0?F=a:F=cm(N,Je({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:n[n.length-1].params},r,{actionResult:S,defaultShouldRevalidate:a})),F&&x.push({key:T,routeId:k.routeId,path:k.path,matches:M,match:N,controller:new AbortController})}),[R,x]}function Ik(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function My(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function cm(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function dm(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];fe(o,"No route found in manifest");let i={};for(let a in r){let s=o[a]!==void 0&&a!=="hasErrorBoundary";ai(!s,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!ek.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,Je({},t(o),{lazy:void 0}))}async function Mi(e,t,n,r,o,i,a,l,s){s===void 0&&(s={});let u,c,f,d=v=>{let S,p=new Promise((h,m)=>S=m);return f=()=>S(),t.signal.addEventListener("abort",f),Promise.race([v({request:t,params:n.params,context:s.requestContext}),p])};try{let v=n.route[e];if(n.route.lazy)if(v){let S,p=await Promise.all([d(v).catch(h=>{S=h}),dm(n.route,i,o)]);if(S)throw S;c=p[0]}else if(await dm(n.route,i,o),v=n.route[e],v)c=await d(v);else if(e==="action"){let S=new URL(t.url),p=S.pathname+S.search;throw dn(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:Ye.data,data:void 0};else if(v)c=await d(v);else{let S=new URL(t.url),p=S.pathname+S.search;throw dn(404,{pathname:p})}fe(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(v){u=Ye.error,c=v}finally{f&&t.signal.removeEventListener("abort",f)}if(Lk(c)){let v=c.status;if(Ek.has(v)){let p=c.headers.get("Location");if(fe(p,"Redirects returned/thrown from loaders/actions must have a Location header"),!$y.test(p))p=Ld(new URL(t.url),r.slice(0,r.indexOf(n)+1),a,!0,p,l);else if(!s.isStaticRequest){let h=new URL(t.url),m=p.startsWith("//")?new URL(h.protocol+p):new URL(p),E=Va(m.pathname,a)!=null;m.origin===h.origin&&E&&(p=m.pathname+m.search+m.hash)}if(s.isStaticRequest)throw c.headers.set("Location",p),c;return{type:Ye.redirect,status:v,location:p,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:u===Ye.error?Ye.error:Ye.data,response:c};let S;try{let p=c.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?c.body==null?S=null:S=await c.json():S=await c.text()}catch(p){return{type:Ye.error,error:p}}return u===Ye.error?{type:u,error:new sp(v,c.statusText,S),headers:c.headers}:{type:Ye.data,data:S,statusCode:c.status,headers:c.headers}}if(u===Ye.error)return{type:u,error:c};if(Nk(c)){var b,g;return{type:Ye.deferred,deferredData:c,statusCode:(b=c.init)==null?void 0:b.status,headers:((g=c.init)==null?void 0:g.headers)&&new Headers(c.init.headers)}}return{type:Ye.data,data:c}}function Oi(e,t,n,r){let o=e.createURL(Oy(t)).toString(),i={signal:n};if(r&&_n(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=jd(r.formData):i.body=r.formData}return new Request(o,i)}function jd(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function fm(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Mk(e,t,n,r,o){let i={},a=null,l,s=!1,u={};return n.forEach((c,f)=>{let d=t[f].route.id;if(fe(!eo(c),"Cannot handle redirect results in processLoaderData"),Uo(c)){let b=oa(e,d),g=c.error;r&&(g=Object.values(r)[0],r=void 0),a=a||{},a[b.route.id]==null&&(a[b.route.id]=g),i[d]=void 0,s||(s=!0,l=Py(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else Zr(c)?(o.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(l=c.statusCode),c.headers&&(u[d]=c.headers)}),r&&(a=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:u}}function pm(e,t,n,r,o,i,a,l){let{loaderData:s,errors:u}=Mk(t,n,r,o,l);for(let c=0;c 0}function te(P,$){let O=x.blockers.get(P)||Mi;return V.get(P)!==$&&V.set(P,$),O}function Le(P){x.blockers.delete(P),V.delete(P)}function Ge(P,$){let O=x.blockers.get(P)||Mi;fe(O.state==="unblocked"&&$.state==="blocked"||O.state==="blocked"&&$.state==="blocked"||O.state==="blocked"&&$.state==="proceeding"||O.state==="blocked"&&$.state==="unblocked"||O.state==="proceeding"&&$.state==="unblocked","Invalid blocker state transition: "+O.state+" -> "+$.state);let H=new Map(x.blockers);H.set(P,$),ie({blockers:H})}function Yn(P){let{currentLocation:$,nextLocation:O,historyAction:H}=P;if(V.size===0)return;V.size>1&&li(!1,"A router only supports one blocker at a time");let Q=Array.from(V.entries()),[ce,ae]=Q[Q.length-1],oe=x.blockers.get(ce);if(!(oe&&oe.state==="proceeding")&&ae({currentLocation:$,nextLocation:O,historyAction:H}))return ce}function vo(P){let $=[];return ue.forEach((O,H)=>{(!P||P(H))&&(O.cancel(),$.push(H),ue.delete(H))}),$}function x1(P,$,O){if(d=P,g=$,b=O||null,!v&&x.navigation===wc){v=!0;let H=bp(x.location,x.matches);H!=null&&ie({restoreScrollPosition:H})}return()=>{d=null,g=null,b=null}}function Sp(P,$){return b&&b(P,$.map(H=>nk(H,x.loaderData)))||P.key}function S1(P,$){if(d&&g){let O=Sp(P,$);d[O]=g()}}function bp(P,$){if(d){let O=Sp(P,$),H=d[O];if(typeof H=="number")return H}return null}function b1(P){i={},l=Ld(P,o,void 0,i)}return R={get basename(){return s},get future(){return u},get state(){return x},get routes(){return a},get window(){return t},initialize:Ae,subscribe:et,enableScrollRestoration:x1,navigate:se,fetch:jt,revalidate:_e,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:En,deleteFetcher:Ne,dispose:Pe,getBlocker:te,deleteBlocker:Le,_internalFetchControllers:D,_internalActiveDeferreds:ue,_internalSetRoutes:b1},R}function Tk(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function jd(e,t,n,r,o,i,a,l){let s,u;if(a){s=[];for(let f of t)if(s.push(f),f.route.id===a){u=f;break}}else s=t,u=t[t.length-1];let c=_y(o||".",Ry(s,i),Ka(e.pathname,n)||e.pathname,l==="path");return o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&u&&u.route.index&&!cp(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Nr([n,c.pathname])),Va(c)}function um(e,t,n,r){if(!r||!Tk(r))return{path:n};if(r.formMethod&&!jk(r.formMethod))return{path:n,error:fn(405,{method:r.formMethod})};let o=()=>({path:n,error:fn(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=Oy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pn(a))return o();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((b,g)=>{let[v,S]=g;return""+b+v+"="+S+`
+`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Pn(a))return o();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return o()}}}fe(typeof FormData=="function","FormData is not available in this environment");let s,u;if(r.formData)s=Ad(r.formData),u=r.formData;else if(r.body instanceof FormData)s=Ad(r.body),u=r.body;else if(r.body instanceof URLSearchParams)s=r.body,u=pm(s);else if(r.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(r.body),u=pm(s)}catch{return o()}let c={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Pn(c.formMethod))return{path:n,submission:c};let f=ur(n);return t&&f.search&&cp(f.search)&&s.append("index",""),f.search="?"+s,{path:Va(f),submission:c}}function $k(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function cm(e,t,n,r,o,i,a,l,s,u,c,f,d,b,g,v){let S=v?Object.values(v)[0]:g?Object.values(g)[0]:void 0,p=e.createURL(t.location),h=e.createURL(o),m=v?Object.keys(v)[0]:void 0,R=$k(n,m).filter((k,T)=>{let{route:M}=k;if(M.lazy)return!0;if(M.loader==null)return!1;if(i)return M.loader.hydrate?!0:t.loaderData[M.id]===void 0&&(!t.errors||t.errors[M.id]===void 0);if(Ik(t.loaderData,t.matches[T],k)||l.some(F=>F===k.route.id))return!0;let I=t.matches[T],N=k;return dm(k,Je({currentUrl:p,currentParams:I.params,nextUrl:h,nextParams:N.params},r,{actionResult:S,defaultShouldRevalidate:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||My(I,N)}))}),x=[];return c.forEach((k,T)=>{if(i||!n.some(j=>j.route.id===k.routeId)||u.has(T))return;let M=Uo(d,k.path,b);if(!M){x.push({key:T,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(T),N=Dd(M,k.path),F=!1;f.has(T)?F=!1:s.includes(T)?F=!0:I&&I.state!=="idle"&&I.data===void 0?F=a:F=dm(N,Je({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:n[n.length-1].params},r,{actionResult:S,defaultShouldRevalidate:a})),F&&x.push({key:T,routeId:k.routeId,path:k.path,matches:M,match:N,controller:new AbortController})}),[R,x]}function Ik(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function My(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function dm(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function fm(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];fe(o,"No route found in manifest");let i={};for(let a in r){let s=o[a]!==void 0&&a!=="hasErrorBoundary";li(!s,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!ek.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,Je({},t(o),{lazy:void 0}))}async function Oi(e,t,n,r,o,i,a,l,s){s===void 0&&(s={});let u,c,f,d=v=>{let S,p=new Promise((h,m)=>S=m);return f=()=>S(),t.signal.addEventListener("abort",f),Promise.race([v({request:t,params:n.params,context:s.requestContext}),p])};try{let v=n.route[e];if(n.route.lazy)if(v){let S,p=await Promise.all([d(v).catch(h=>{S=h}),fm(n.route,i,o)]);if(S)throw S;c=p[0]}else if(await fm(n.route,i,o),v=n.route[e],v)c=await d(v);else if(e==="action"){let S=new URL(t.url),p=S.pathname+S.search;throw fn(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:Ye.data,data:void 0};else if(v)c=await d(v);else{let S=new URL(t.url),p=S.pathname+S.search;throw fn(404,{pathname:p})}fe(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(v){u=Ye.error,c=v}finally{f&&t.signal.removeEventListener("abort",f)}if(Lk(c)){let v=c.status;if(Ek.has(v)){let p=c.headers.get("Location");if(fe(p,"Redirects returned/thrown from loaders/actions must have a Location header"),!$y.test(p))p=jd(new URL(t.url),r.slice(0,r.indexOf(n)+1),a,!0,p,l);else if(!s.isStaticRequest){let h=new URL(t.url),m=p.startsWith("//")?new URL(h.protocol+p):new URL(p),E=Ka(m.pathname,a)!=null;m.origin===h.origin&&E&&(p=m.pathname+m.search+m.hash)}if(s.isStaticRequest)throw c.headers.set("Location",p),c;return{type:Ye.redirect,status:v,location:p,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:u===Ye.error?Ye.error:Ye.data,response:c};let S;try{let p=c.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?c.body==null?S=null:S=await c.json():S=await c.text()}catch(p){return{type:Ye.error,error:p}}return u===Ye.error?{type:u,error:new up(v,c.statusText,S),headers:c.headers}:{type:Ye.data,data:S,statusCode:c.status,headers:c.headers}}if(u===Ye.error)return{type:u,error:c};if(Nk(c)){var b,g;return{type:Ye.deferred,deferredData:c,statusCode:(b=c.init)==null?void 0:b.status,headers:((g=c.init)==null?void 0:g.headers)&&new Headers(c.init.headers)}}return{type:Ye.data,data:c}}function Ni(e,t,n,r){let o=e.createURL(Oy(t)).toString(),i={signal:n};if(r&&Pn(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=Ad(r.formData):i.body=r.formData}return new Request(o,i)}function Ad(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function pm(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Mk(e,t,n,r,o){let i={},a=null,l,s=!1,u={};return n.forEach((c,f)=>{let d=t[f].route.id;if(fe(!eo(c),"Cannot handle redirect results in processLoaderData"),Wo(c)){let b=ia(e,d),g=c.error;r&&(g=Object.values(r)[0],r=void 0),a=a||{},a[b.route.id]==null&&(a[b.route.id]=g),i[d]=void 0,s||(s=!0,l=Py(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else Zr(c)?(o.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(l=c.statusCode),c.headers&&(u[d]=c.headers)}),r&&(a=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:u}}function hm(e,t,n,r,o,i,a,l){let{loaderData:s,errors:u}=Mk(t,n,r,o,l);for(let c=0;csn){const Se=Qt-sn;Lt-=Se,we.vertical+=Se}if(S!==null&&jtdt){const Se=At-dt;jt-=Se,we.horizontal+=Se}return{top:`${Math.round(Lt)}px`,left:`${Math.round(jt)}px`,transformOrigin:qm(we)}},[s,f,D,_,S]),[W,X]=y.useState(p),re=y.useCallback(()=>{const se=j.current;if(!se)return;const Re=L(se);Re.top!==null&&(se.style.top=Re.top),Re.left!==null&&(se.style.left=Re.left),se.style.transformOrigin=Re.transformOrigin,X(!0)},[L]);y.useEffect(()=>(M&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[s,M,re]);const he=(se,Re)=>{T&&T(se,Re),re()},J=()=>{X(!1)};y.useEffect(()=>{p&&re()}),y.useImperativeHandle(l,()=>p?{updatePosition:()=>{re()}}:null,[p,re]),y.useEffect(()=>{if(!p)return;const se=gu(()=>{re()}),Re=Qn(s);return Re.addEventListener("resize",se),()=>{se.clear(),Re.removeEventListener("resize",se)}},[s,p,re]);let ue=k;k==="auto"&&!x.muiSupportAuto&&(ue=void 0);const V=g||(s?Kt(Rc(s)).body:void 0),de=(o=m==null?void 0:m.root)!=null?o:n$,Ae=(i=m==null?void 0:m.paper)!=null?i:s1,Pe=si({elementType:Ae,externalSlotProps:C({},F,{style:W?F.style:C({},F.style,{opacity:0})}),additionalProps:{elevation:v,ref:A},ownerState:B,className:Z(U.paper,F==null?void 0:F.className)}),et=si({elementType:de,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:V,open:p},ownerState:B,className:Z(U.root,b)}),{slotProps:ie}=et,Te=q(et,e$);return w.jsx(de,C({},Te,!li(de)&&{slotProps:ie,disableScrollLock:M},{children:w.jsx(x,C({appear:!0,in:p,onEntering:he,onExited:J,timeout:ue},I,{children:w.jsx(Ae,C({},Pe,{children:d}))}))}))}),o$=r$;function i$(e){return ve("MuiMenu",e)}ge("MuiMenu",["root","paper","list"]);const a$=["onEntering"],l$=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],s$={vertical:"top",horizontal:"right"},u$={vertical:"top",horizontal:"left"},c$=e=>{const{classes:t}=e;return ye({root:["root"],paper:["paper"],list:["list"]},i$,t)},d$=K(o$,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),f$=K(s1,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),p$=K(YT,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),h$=y.forwardRef(function(t,n){var r,o;const i=xe({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:l,className:s,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:f,open:d,PaperProps:b={},PopoverClasses:g,transitionDuration:v="auto",TransitionProps:{onEntering:S}={},variant:p="selectedMenu",slots:h={},slotProps:m={}}=i,E=q(i.TransitionProps,a$),R=q(i,l$),x=dy(),k=C({},i,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:c,onEntering:S,PaperProps:b,transitionDuration:v,TransitionProps:E,variant:p}),T=c$(k),M=a&&!u&&d,I=y.useRef(null),N=(_,L)=>{I.current&&I.current.adjustStyleForScrollbar(_,{direction:x?"rtl":"ltr"}),S&&S(_,L)},F=_=>{_.key==="Tab"&&(_.preventDefault(),f&&f(_,"tabKeyDown"))};let j=-1;y.Children.map(l,(_,L)=>{y.isValidElement(_)&&(_.props.disabled||(p==="selectedMenu"&&_.props.selected||j===-1)&&(j=L))});const A=(r=h.paper)!=null?r:f$,B=(o=m.paper)!=null?o:b,U=si({elementType:h.root,externalSlotProps:m.root,ownerState:k,className:[T.root,s]}),D=si({elementType:A,externalSlotProps:B,ownerState:k,className:T.paper});return w.jsx(d$,C({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?s$:u$,slots:{paper:A,root:h.root},slotProps:{root:U,paper:D},open:d,ref:n,transitionDuration:v,TransitionProps:C({onEntering:N},E),ownerState:k},R,{classes:g,children:w.jsx(p$,C({onKeyDown:F,actions:I,autoFocus:a&&(j===-1||u),autoFocusItem:M,variant:p},c,{className:Z(T.list,c.className),children:l}))}))}),m$=h$;function v$(e){return ve("MuiMenuItem",e)}const g$=ge("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Di=g$,y$=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],x$=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},S$=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=ye({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},v$,a);return C({},a,s)},b$=K(Ka,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:x$})(({theme:e,ownerState:t})=>C({},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"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Di.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Di.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Di.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Di.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Di.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Fm.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Fm.inset}`]:{marginLeft:52},[`& .${gs.root}`]:{marginTop:0,marginBottom:0},[`& .${gs.inset}`]:{paddingLeft:36},[`& .${Hm.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&C({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Hm.root} svg`]:{fontSize:"1.25rem"}}))),w$=y.forwardRef(function(t,n){const r=xe({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:f,className:d}=r,b=q(r,y$),g=y.useContext(In),v=y.useMemo(()=>({dense:a||g.dense||!1,disableGutters:s}),[g.dense,a,s]),S=y.useRef(null);On(()=>{o&&S.current&&S.current.focus()},[o]);const p=C({},r,{dense:v.dense,divider:l,disableGutters:s}),h=S$(r),m=ot(S,n);let E;return r.disabled||(E=f!==void 0?f:-1),w.jsx(In.Provider,{value:v,children:w.jsx(b$,C({ref:m,role:c,tabIndex:E,component:i,focusVisibleClassName:Z(h.focusVisible,u),className:Z(h.root,d)},b,{ownerState:p,classes:h}))})}),C$=w$;function E$(e){return ve("MuiNativeSelect",e)}const k$=ge("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),mp=k$,R$=["className","disabled","error","IconComponent","inputRef","variant"],_$=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ne(n)}`,i&&"iconOpen",r&&"disabled"]};return ye(l,E$,t)},u1=({ownerState:e,theme:t})=>C({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":C({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${mp.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),P$=K("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:qt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${mp.multiple}`]:t.multiple}]}})(u1),c1=({ownerState:e,theme:t})=>C({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${mp.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),T$=K("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ne(n.variant)}`],n.open&&t.iconOpen]}})(c1),$$=y.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:l,variant:s="standard"}=t,u=q(t,R$),c=C({},t,{disabled:o,variant:s,error:i}),f=_$(c);return w.jsxs(y.Fragment,{children:[w.jsx(P$,C({ownerState:c,className:Z(f.select,r),disabled:o,ref:l||n},u)),t.multiple?null:w.jsx(T$,{as:a,ownerState:c,className:f.icon})]})}),I$=$$;var Qm;const M$=["children","classes","className","label","notched"],O$=K("fieldset",{shouldForwardProp:qt})({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%"}),N$=K("legend",{shouldForwardProp:qt})(({ownerState:e,theme:t})=>C({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&C({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function L$(e){const{className:t,label:n,notched:r}=e,o=q(e,M$),i=n!=null&&n!=="",a=C({},e,{notched:r,withLabel:i});return w.jsx(O$,C({"aria-hidden":!0,className:t,ownerState:a},o,{children:w.jsx(N$,{ownerState:a,children:i?w.jsx("span",{children:n}):Qm||(Qm=w.jsx("span",{className:"notranslate",children:""}))})}))}const j$=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],A$=e=>{const{classes:t}=e,r=ye({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},w_,t);return C({},t,r)},D$=K($u,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Pu})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return C({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${mr.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${mr.focused} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${mr.error} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${mr.disabled} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&C({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),z$=K(L$,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),F$=K(Iu,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Tu})(({theme:e,ownerState:t})=>C({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"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),d1=y.forwardRef(function(t,n){var r,o,i,a,l;const s=xe({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:f="input",label:d,multiline:b=!1,notched:g,slots:v={},type:S="text"}=s,p=q(s,j$),h=A$(s),m=gi(),E=vi({props:s,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),R=C({},s,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:m,fullWidth:c,hiddenLabel:E.hiddenLabel,multiline:b,size:E.size,type:S}),x=(r=(o=v.root)!=null?o:u.Root)!=null?r:D$,k=(i=(a=v.input)!=null?a:u.Input)!=null?i:F$;return w.jsx(hp,C({slots:{root:x,input:k},renderSuffix:T=>w.jsx(z$,{ownerState:R,className:h.notchedOutline,label:d!=null&&d!==""&&E.required?l||(l=w.jsxs(y.Fragment,{children:[d," ","*"]})):d,notched:typeof g<"u"?g:!!(T.startAdornment||T.filled||T.focused)}),fullWidth:c,inputComponent:f,multiline:b,ref:n,type:S},p,{classes:C({},h,{notchedOutline:null})}))});d1.muiName="Input";const f1=d1;function B$(e){return ve("MuiSelect",e)}const zi=ge("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Ym;const U$=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],W$=K("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${zi.select}`]:t.select},{[`&.${zi.select}`]:t[n.variant]},{[`&.${zi.error}`]:t.error},{[`&.${zi.multiple}`]:t.multiple}]}})(u1,{[`&.${zi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),H$=K("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ne(n.variant)}`],n.open&&t.iconOpen]}})(c1),V$=K("input",{shouldForwardProp:e=>wy(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Xm(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function K$(e){return e==null||typeof e=="string"&&!e.trim()}const G$=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ne(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return ye(l,B$,t)},q$=y.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:l,children:s,className:u,defaultOpen:c,defaultValue:f,disabled:d,displayEmpty:b,error:g=!1,IconComponent:v,inputRef:S,labelId:p,MenuProps:h={},multiple:m,name:E,onBlur:R,onChange:x,onClose:k,onFocus:T,onOpen:M,open:I,readOnly:N,renderValue:F,SelectDisplayProps:j={},tabIndex:A,value:B,variant:U="standard"}=t,D=q(t,U$),[_,L]=Td({controlled:B,default:f,name:"Select"}),[W,X]=Td({controlled:I,default:c,name:"Select"}),re=y.useRef(null),he=y.useRef(null),[J,ue]=y.useState(null),{current:V}=y.useRef(I!=null),[de,Ae]=y.useState(),Pe=ot(n,S),et=y.useCallback(te=>{he.current=te,te&&ue(te)},[]),ie=J==null?void 0:J.parentNode;y.useImperativeHandle(Pe,()=>({focus:()=>{he.current.focus()},node:re.current,value:_}),[_]),y.useEffect(()=>{c&&W&&J&&!V&&(Ae(l?null:ie.clientWidth),he.current.focus())},[J,l]),y.useEffect(()=>{a&&he.current.focus()},[a]),y.useEffect(()=>{if(!p)return;const te=Kt(he.current).getElementById(p);if(te){const Le=()=>{getSelection().isCollapsed&&he.current.focus()};return te.addEventListener("click",Le),()=>{te.removeEventListener("click",Le)}}},[p]);const Te=(te,Le)=>{te?M&&M(Le):k&&k(Le),V||(Ae(l?null:ie.clientWidth),X(te))},se=te=>{te.button===0&&(te.preventDefault(),he.current.focus(),Te(!0,te))},Re=te=>{Te(!1,te)},we=y.Children.toArray(s),Ln=te=>{const Le=we.find(Ge=>Ge.props.value===te.target.value);Le!==void 0&&(L(Le.props.value),x&&x(te,Le))},Lt=te=>Le=>{let Ge;if(Le.currentTarget.hasAttribute("tabindex")){if(m){Ge=Array.isArray(_)?_.slice():[];const Yn=_.indexOf(te.props.value);Yn===-1?Ge.push(te.props.value):Ge.splice(Yn,1)}else Ge=te.props.value;if(te.props.onClick&&te.props.onClick(Le),_!==Ge&&(L(Ge),x)){const Yn=Le.nativeEvent||Le,mo=new Yn.constructor(Yn.type,Yn);Object.defineProperty(mo,"target",{writable:!0,value:{value:Ge,name:E}}),x(mo,te)}m||Te(!1,Le)}},jt=te=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(te.key)!==-1&&(te.preventDefault(),Te(!0,te))},Qt=J!==null&&W,At=te=>{!Qt&&R&&(Object.defineProperty(te,"target",{writable:!0,value:{value:_,name:E}}),R(te))};delete D["aria-invalid"];let $e,sn;const dt=[];let Se=!1;(vs({value:_})||b)&&(F?$e=F(_):Se=!0);const Ct=we.map(te=>{if(!y.isValidElement(te))return null;let Le;if(m){if(!Array.isArray(_))throw new Error(co(2));Le=_.some(Ge=>Xm(Ge,te.props.value)),Le&&Se&&dt.push(te.props.children)}else Le=Xm(_,te.props.value),Le&&Se&&(sn=te.props.children);return y.cloneElement(te,{"aria-selected":Le?"true":"false",onClick:Lt(te),onKeyUp:Ge=>{Ge.key===" "&&Ge.preventDefault(),te.props.onKeyUp&&te.props.onKeyUp(Ge)},role:"option",selected:Le,value:void 0,"data-value":te.props.value})});Se&&(m?dt.length===0?$e=null:$e=dt.reduce((te,Le,Ge)=>(te.push(Le),Gesn){const be=Qt-sn;Lt-=be,Ce.vertical+=be}if(S!==null&&jtdt){const be=At-dt;jt-=be,Ce.horizontal+=be}return{top:`${Math.round(Lt)}px`,left:`${Math.round(jt)}px`,transformOrigin:Qm(Ce)}},[s,f,D,_,S]),[W,X]=y.useState(p),re=y.useCallback(()=>{const se=j.current;if(!se)return;const _e=L(se);_e.top!==null&&(se.style.top=_e.top),_e.left!==null&&(se.style.left=_e.left),se.style.transformOrigin=_e.transformOrigin,X(!0)},[L]);y.useEffect(()=>(M&&window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[s,M,re]);const he=(se,_e)=>{T&&T(se,_e),re()},J=()=>{X(!1)};y.useEffect(()=>{p&&re()}),y.useImperativeHandle(l,()=>p?{updatePosition:()=>{re()}}:null,[p,re]),y.useEffect(()=>{if(!p)return;const se=yu(()=>{re()}),_e=Qn(s);return _e.addEventListener("resize",se),()=>{se.clear(),_e.removeEventListener("resize",se)}},[s,p,re]);let ue=k;k==="auto"&&!x.muiSupportAuto&&(ue=void 0);const V=g||(s?Kt(_c(s)).body:void 0),de=(o=m==null?void 0:m.root)!=null?o:n$,Ae=(i=m==null?void 0:m.paper)!=null?i:s1,Pe=ui({elementType:Ae,externalSlotProps:C({},F,{style:W?F.style:C({},F.style,{opacity:0})}),additionalProps:{elevation:v,ref:A},ownerState:B,className:Z(U.paper,F==null?void 0:F.className)}),et=ui({elementType:de,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:V,open:p},ownerState:B,className:Z(U.root,b)}),{slotProps:ie}=et,Te=q(et,e$);return w.jsx(de,C({},Te,!si(de)&&{slotProps:ie,disableScrollLock:M},{children:w.jsx(x,C({appear:!0,in:p,onEntering:he,onExited:J,timeout:ue},I,{children:w.jsx(Ae,C({},Pe,{children:d}))}))}))}),o$=r$;function i$(e){return ve("MuiMenu",e)}ge("MuiMenu",["root","paper","list"]);const a$=["onEntering"],l$=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],s$={vertical:"top",horizontal:"right"},u$={vertical:"top",horizontal:"left"},c$=e=>{const{classes:t}=e;return xe({root:["root"],paper:["paper"],list:["list"]},i$,t)},d$=K(o$,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),f$=K(s1,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),p$=K(YT,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),h$=y.forwardRef(function(t,n){var r,o;const i=Se({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:l,className:s,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:f,open:d,PaperProps:b={},PopoverClasses:g,transitionDuration:v="auto",TransitionProps:{onEntering:S}={},variant:p="selectedMenu",slots:h={},slotProps:m={}}=i,E=q(i.TransitionProps,a$),R=q(i,l$),x=dy(),k=C({},i,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:c,onEntering:S,PaperProps:b,transitionDuration:v,TransitionProps:E,variant:p}),T=c$(k),M=a&&!u&&d,I=y.useRef(null),N=(_,L)=>{I.current&&I.current.adjustStyleForScrollbar(_,{direction:x?"rtl":"ltr"}),S&&S(_,L)},F=_=>{_.key==="Tab"&&(_.preventDefault(),f&&f(_,"tabKeyDown"))};let j=-1;y.Children.map(l,(_,L)=>{y.isValidElement(_)&&(_.props.disabled||(p==="selectedMenu"&&_.props.selected||j===-1)&&(j=L))});const A=(r=h.paper)!=null?r:f$,B=(o=m.paper)!=null?o:b,U=ui({elementType:h.root,externalSlotProps:m.root,ownerState:k,className:[T.root,s]}),D=ui({elementType:A,externalSlotProps:B,ownerState:k,className:T.paper});return w.jsx(d$,C({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?s$:u$,slots:{paper:A,root:h.root},slotProps:{root:U,paper:D},open:d,ref:n,transitionDuration:v,TransitionProps:C({onEntering:N},E),ownerState:k},R,{classes:g,children:w.jsx(p$,C({onKeyDown:F,actions:I,autoFocus:a&&(j===-1||u),autoFocusItem:M,variant:p},c,{className:Z(T.list,c.className),children:l}))}))}),m$=h$;function v$(e){return ve("MuiMenuItem",e)}const g$=ge("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),zi=g$,y$=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],x$=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},S$=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=xe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},v$,a);return C({},a,s)},b$=K(Ga,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:x$})(({theme:e,ownerState:t})=>C({},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"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zi.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${zi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${zi.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${zi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${zi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Bm.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Bm.inset}`]:{marginLeft:52},[`& .${gs.root}`]:{marginTop:0,marginBottom:0},[`& .${gs.inset}`]:{paddingLeft:36},[`& .${Vm.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&C({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Vm.root} svg`]:{fontSize:"1.25rem"}}))),w$=y.forwardRef(function(t,n){const r=Se({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:f,className:d}=r,b=q(r,y$),g=y.useContext(Mn),v=y.useMemo(()=>({dense:a||g.dense||!1,disableGutters:s}),[g.dense,a,s]),S=y.useRef(null);Nn(()=>{o&&S.current&&S.current.focus()},[o]);const p=C({},r,{dense:v.dense,divider:l,disableGutters:s}),h=S$(r),m=ot(S,n);let E;return r.disabled||(E=f!==void 0?f:-1),w.jsx(Mn.Provider,{value:v,children:w.jsx(b$,C({ref:m,role:c,tabIndex:E,component:i,focusVisibleClassName:Z(h.focusVisible,u),className:Z(h.root,d)},b,{ownerState:p,classes:h}))})}),C$=w$;function E$(e){return ve("MuiNativeSelect",e)}const k$=ge("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),vp=k$,R$=["className","disabled","error","IconComponent","inputRef","variant"],_$=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ne(n)}`,i&&"iconOpen",r&&"disabled"]};return xe(l,E$,t)},u1=({ownerState:e,theme:t})=>C({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":C({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${vp.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),P$=K("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:qt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${vp.multiple}`]:t.multiple}]}})(u1),c1=({ownerState:e,theme:t})=>C({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${vp.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),T$=K("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ne(n.variant)}`],n.open&&t.iconOpen]}})(c1),$$=y.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:l,variant:s="standard"}=t,u=q(t,R$),c=C({},t,{disabled:o,variant:s,error:i}),f=_$(c);return w.jsxs(y.Fragment,{children:[w.jsx(P$,C({ownerState:c,className:Z(f.select,r),disabled:o,ref:l||n},u)),t.multiple?null:w.jsx(T$,{as:a,ownerState:c,className:f.icon})]})}),I$=$$;var Ym;const M$=["children","classes","className","label","notched"],O$=K("fieldset",{shouldForwardProp:qt})({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%"}),N$=K("legend",{shouldForwardProp:qt})(({ownerState:e,theme:t})=>C({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&C({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function L$(e){const{className:t,label:n,notched:r}=e,o=q(e,M$),i=n!=null&&n!=="",a=C({},e,{notched:r,withLabel:i});return w.jsx(O$,C({"aria-hidden":!0,className:t,ownerState:a},o,{children:w.jsx(N$,{ownerState:a,children:i?w.jsx("span",{children:n}):Ym||(Ym=w.jsx("span",{className:"notranslate",children:""}))})}))}const j$=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],A$=e=>{const{classes:t}=e,r=xe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},w_,t);return C({},t,r)},D$=K(Iu,{shouldForwardProp:e=>qt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Tu})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return C({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${mr.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${mr.focused} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${mr.error} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${mr.disabled} .${mr.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&C({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),z$=K(L$,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),F$=K(Mu,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:$u})(({theme:e,ownerState:t})=>C({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"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),d1=y.forwardRef(function(t,n){var r,o,i,a,l;const s=Se({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:f="input",label:d,multiline:b=!1,notched:g,slots:v={},type:S="text"}=s,p=q(s,j$),h=A$(s),m=yi(),E=gi({props:s,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),R=C({},s,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:m,fullWidth:c,hiddenLabel:E.hiddenLabel,multiline:b,size:E.size,type:S}),x=(r=(o=v.root)!=null?o:u.Root)!=null?r:D$,k=(i=(a=v.input)!=null?a:u.Input)!=null?i:F$;return w.jsx(mp,C({slots:{root:x,input:k},renderSuffix:T=>w.jsx(z$,{ownerState:R,className:h.notchedOutline,label:d!=null&&d!==""&&E.required?l||(l=w.jsxs(y.Fragment,{children:[d," ","*"]})):d,notched:typeof g<"u"?g:!!(T.startAdornment||T.filled||T.focused)}),fullWidth:c,inputComponent:f,multiline:b,ref:n,type:S},p,{classes:C({},h,{notchedOutline:null})}))});d1.muiName="Input";const f1=d1;function B$(e){return ve("MuiSelect",e)}const Fi=ge("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Xm;const U$=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],W$=K("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Fi.select}`]:t.select},{[`&.${Fi.select}`]:t[n.variant]},{[`&.${Fi.error}`]:t.error},{[`&.${Fi.multiple}`]:t.multiple}]}})(u1,{[`&.${Fi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),H$=K("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ne(n.variant)}`],n.open&&t.iconOpen]}})(c1),V$=K("input",{shouldForwardProp:e=>wy(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Jm(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function K$(e){return e==null||typeof e=="string"&&!e.trim()}const G$=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ne(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return xe(l,B$,t)},q$=y.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:l,children:s,className:u,defaultOpen:c,defaultValue:f,disabled:d,displayEmpty:b,error:g=!1,IconComponent:v,inputRef:S,labelId:p,MenuProps:h={},multiple:m,name:E,onBlur:R,onChange:x,onClose:k,onFocus:T,onOpen:M,open:I,readOnly:N,renderValue:F,SelectDisplayProps:j={},tabIndex:A,value:B,variant:U="standard"}=t,D=q(t,U$),[_,L]=$d({controlled:B,default:f,name:"Select"}),[W,X]=$d({controlled:I,default:c,name:"Select"}),re=y.useRef(null),he=y.useRef(null),[J,ue]=y.useState(null),{current:V}=y.useRef(I!=null),[de,Ae]=y.useState(),Pe=ot(n,S),et=y.useCallback(te=>{he.current=te,te&&ue(te)},[]),ie=J==null?void 0:J.parentNode;y.useImperativeHandle(Pe,()=>({focus:()=>{he.current.focus()},node:re.current,value:_}),[_]),y.useEffect(()=>{c&&W&&J&&!V&&(Ae(l?null:ie.clientWidth),he.current.focus())},[J,l]),y.useEffect(()=>{a&&he.current.focus()},[a]),y.useEffect(()=>{if(!p)return;const te=Kt(he.current).getElementById(p);if(te){const Le=()=>{getSelection().isCollapsed&&he.current.focus()};return te.addEventListener("click",Le),()=>{te.removeEventListener("click",Le)}}},[p]);const Te=(te,Le)=>{te?M&&M(Le):k&&k(Le),V||(Ae(l?null:ie.clientWidth),X(te))},se=te=>{te.button===0&&(te.preventDefault(),he.current.focus(),Te(!0,te))},_e=te=>{Te(!1,te)},Ce=y.Children.toArray(s),jn=te=>{const Le=Ce.find(Ge=>Ge.props.value===te.target.value);Le!==void 0&&(L(Le.props.value),x&&x(te,Le))},Lt=te=>Le=>{let Ge;if(Le.currentTarget.hasAttribute("tabindex")){if(m){Ge=Array.isArray(_)?_.slice():[];const Yn=_.indexOf(te.props.value);Yn===-1?Ge.push(te.props.value):Ge.splice(Yn,1)}else Ge=te.props.value;if(te.props.onClick&&te.props.onClick(Le),_!==Ge&&(L(Ge),x)){const Yn=Le.nativeEvent||Le,vo=new Yn.constructor(Yn.type,Yn);Object.defineProperty(vo,"target",{writable:!0,value:{value:Ge,name:E}}),x(vo,te)}m||Te(!1,Le)}},jt=te=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(te.key)!==-1&&(te.preventDefault(),Te(!0,te))},Qt=J!==null&&W,At=te=>{!Qt&&R&&(Object.defineProperty(te,"target",{writable:!0,value:{value:_,name:E}}),R(te))};delete D["aria-invalid"];let $e,sn;const dt=[];let be=!1;(vs({value:_})||b)&&(F?$e=F(_):be=!0);const Ct=Ce.map(te=>{if(!y.isValidElement(te))return null;let Le;if(m){if(!Array.isArray(_))throw new Error(co(2));Le=_.some(Ge=>Jm(Ge,te.props.value)),Le&&be&&dt.push(te.props.children)}else Le=Jm(_,te.props.value),Le&&be&&(sn=te.props.children);return y.cloneElement(te,{"aria-selected":Le?"true":"false",onClick:Lt(te),onKeyUp:Ge=>{Ge.key===" "&&Ge.preventDefault(),te.props.onKeyUp&&te.props.onKeyUp(Ge)},role:"option",selected:Le,value:void 0,"data-value":te.props.value})});be&&(m?dt.length===0?$e=null:$e=dt.reduce((te,Le,Ge)=>(te.push(Le),Ge