@blakesteve/roster 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Table-B3KkU-Bc.cjs"),f=require("react"),N=require("./utils-C7BfXGiM.cjs"),xt=require("react-dom");function Bn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const w=Bn(f),ge=Bn(xt);function Qr(t,e,r){let[s,n]=f.useState(r),a=t!==void 0,i=f.useRef(a),l=f.useRef(!1),c=f.useRef(!1);return a&&!i.current&&!l.current?(l.current=!0,i.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&i.current&&!c.current&&(c.current=!0,i.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?t:s,o.o(u=>(a||xt.flushSync(()=>n(u)),e?.(u)))]}function Zr(t){let[e]=f.useState(t);return e}function Hn(t={},e=null,r=[]){for(let[s,n]of Object.entries(t))Wn(r,zn(e,s),n);return r}function zn(t,e){return t?t+"["+e+"]":e}function Wn(t,e,r){if(Array.isArray(r))for(let[s,n]of r.entries())Wn(t,zn(e,s.toString()),n);else r instanceof Date?t.push([e,r.toISOString()]):typeof r=="boolean"?t.push([e,r?"1":"0"]):typeof r=="string"?t.push([e,r]):typeof r=="number"?t.push([e,`${r}`]):r==null?t.push([e,""]):Ii(r)&&!f.isValidElement(r)&&Hn(r,e,t)}function Jr(t){var e,r;let s=(e=t?.form)!=null?e:t.closest("form");if(s){for(let n of s.elements)if(n!==t&&(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image")){n.click();return}(r=s.requestSubmit)==null||r.call(s)}}function Ii(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}let Ai="span";var wt=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(wt||{});function Di(t,e){var r;let{features:s=1,...n}=t,a={ref:e,"aria-hidden":(s&2)===2?!0:(r=n["aria-hidden"])!=null?r:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return o.K()({ourProps:a,theirProps:n,slot:{},defaultTag:Ai,name:"Hidden"})}let Ct=o.Y(Di),Yn=f.createContext(null);function Fi(t){let[e,r]=f.useState(null);return f.createElement(Yn.Provider,{value:{target:e}},t.children,f.createElement(Ct,{features:wt.Hidden,ref:r}))}function Mi({children:t}){let e=f.useContext(Yn);if(!e)return f.createElement(f.Fragment,null,t);let{target:r}=e;return r?xt.createPortal(f.createElement(f.Fragment,null,t),r):null}function ts({data:t,form:e,disabled:r,onReset:s,overrides:n}){let[a,i]=f.useState(null),l=o.p();return f.useEffect(()=>{if(s&&a)return l.addEventListener(a,"reset",s)},[a,e,s]),f.createElement(Mi,null,f.createElement(Li,{setForm:i,formId:e}),Hn(t).map(([c,u])=>f.createElement(Ct,{features:wt.Hidden,...o.m({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:r,name:c,value:u,...n})})))}function Li({setForm:t,formId:e}){return f.useEffect(()=>{if(e){let r=document.getElementById(e);r&&t(r)}},[t,e]),e?null:f.createElement(Ct,{features:wt.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let s=r.closest("form");s&&t(s)}})}let Un=f.createContext(void 0);function re(){return f.useContext(Un)}function _i({id:t,children:e}){return f.createElement(Un.Provider,{value:t},e)}function Kn(t){return typeof t!="object"||t===null?!1:"nodeType"in t}function St(t){return Kn(t)&&"tagName"in t}function nt(t){return St(t)&&"accessKey"in t}function mt(t){return St(t)&&"tabIndex"in t}function Vi(t){return St(t)&&"style"in t}function Bi(t){return nt(t)&&t.nodeName==="IFRAME"}function Gn(t){return nt(t)&&t.nodeName==="INPUT"}function Dr(t){return nt(t)&&t.nodeName==="LABEL"}function Hi(t){return nt(t)&&t.nodeName==="FIELDSET"}function qn(t){return nt(t)&&t.nodeName==="LEGEND"}function zi(t){return St(t)?t.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Xt(t){let e=t.parentElement,r=null;for(;e&&!Hi(e);)qn(e)&&(r=e),e=e.parentElement;let s=e?.getAttribute("disabled")==="";return s&&Wi(r)?!1:s}function Wi(t){if(!t)return!1;let e=t.previousElementSibling;for(;e!==null;){if(qn(e))return!1;e=e.previousElementSibling}return!0}let Xn=Symbol();function Qn(t,e=!0){return Object.assign(t,{[Xn]:e})}function Z(...t){let e=f.useRef(t);f.useEffect(()=>{e.current=t},[t]);let r=o.o(s=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(s):n.current=s)});return t.every(s=>s==null||s?.[Xn])?void 0:r}let Ze=f.createContext(null);Ze.displayName="DescriptionContext";function Zn(){let t=f.useContext(Ze);if(t===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Zn),e}return t}function ke(){var t,e;return(e=(t=f.useContext(Ze))==null?void 0:t.value)!=null?e:void 0}function Je(){let[t,e]=f.useState([]);return[t.length>0?t.join(" "):void 0,f.useMemo(()=>function(r){let s=o.o(a=>(e(i=>[...i,a]),()=>e(i=>{let l=i.slice(),c=l.indexOf(a);return c!==-1&&l.splice(c,1),l}))),n=f.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props,value:r.value}),[s,r.slot,r.name,r.props,r.value]);return f.createElement(Ze.Provider,{value:n},r.children)},[e])]}let Yi="p";function Ui(t,e){let r=f.useId(),s=o.a(),{id:n=`headlessui-description-${r}`,...a}=t,i=Zn(),l=Z(e);o.n(()=>i.register(n),[n,i.register]);let c=o.n$1({...i.slot,disabled:s||!1}),u={ref:l,...i.props,id:n};return o.K()({ourProps:u,theirProps:a,slot:c,defaultTag:Yi,name:i.name||"Description"})}let Ki=o.Y(Ui),Re=Object.assign(Ki,{});var W=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(W||{});let tr=f.createContext(null);tr.displayName="LabelContext";function es(){let t=f.useContext(tr);if(t===null){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,es),e}return t}function se(t){var e,r,s;let n=(r=(e=f.useContext(tr))==null?void 0:e.value)!=null?r:void 0;return((s=t?.length)!=null?s:0)>0?[n,...t].filter(Boolean).join(" "):n}function je({inherit:t=!1}={}){let e=se(),[r,s]=f.useState([]),n=t?[e,...r].filter(Boolean):r;return[n.length>0?n.join(" "):void 0,f.useMemo(()=>function(a){let i=o.o(c=>(s(u=>[...u,c]),()=>s(u=>{let d=u.slice(),m=d.indexOf(c);return m!==-1&&d.splice(m,1),d}))),l=f.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return f.createElement(tr.Provider,{value:l},a.children)},[s])]}let Gi="label";function qi(t,e){var r;let s=f.useId(),n=es(),a=re(),i=o.a(),{id:l=`headlessui-label-${s}`,htmlFor:c=a??((r=n.props)==null?void 0:r.htmlFor),passive:u=!1,...d}=t,m=Z(e);o.n(()=>n.register(l),[l,n.register]);let x=o.o(h=>{let b=h.currentTarget;if(!(h.target!==h.currentTarget&&zi(h.target))&&(Dr(b)&&h.preventDefault(),n.props&&"onClick"in n.props&&typeof n.props.onClick=="function"&&n.props.onClick(h),Dr(b))){let v=document.getElementById(b.htmlFor);if(v){let E=v.getAttribute("disabled");if(E==="true"||E==="")return;let y=v.getAttribute("aria-disabled");if(y==="true"||y==="")return;(Gn(v)&&(v.type==="file"||v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),p=o.n$1({...n.slot,disabled:i||!1}),g={ref:m,...n.props,id:l,htmlFor:c,onClick:x};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),o.K()({ourProps:g,theirProps:d,slot:p,defaultTag:c?Gi:"div",name:n.name||"Label"})}let Xi=o.Y(qi),ne=Object.assign(Xi,{}),Qi="span";function Zi(t,e){let r=f.useId(),s=re(),n=o.a(),{id:a=s||`headlessui-checkbox-${r}`,disabled:i=n||!1,autoFocus:l=!1,checked:c,defaultChecked:u,onChange:d,name:m,value:x,form:p,indeterminate:g=!1,tabIndex:h=0,...b}=t,v=Zr(u),[E,y]=Qr(c,d,v??!1),k=se(),R=ke(),O=o.p(),[S,F]=f.useState(!1),B=o.o(()=>{F(!0),y?.(!E),O.nextFrame(()=>{F(!1)})}),j=o.o(I=>{if(Xt(I.currentTarget))return I.preventDefault();I.preventDefault(),B()}),T=o.o(I=>{I.key===W.Space?(I.preventDefault(),B()):I.key===W.Enter&&Jr(I.currentTarget)}),M=o.o(I=>I.preventDefault()),{isFocusVisible:L,focusProps:$}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:l}),{isHovered:A,hoverProps:D}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),{pressed:z,pressProps:C}=o.w({disabled:i}),P=o.V({ref:e,id:a,role:"checkbox","aria-checked":g?"mixed":E?"true":"false","aria-labelledby":k,"aria-describedby":R,"aria-disabled":i?!0:void 0,indeterminate:g?"true":void 0,tabIndex:i?void 0:h,onKeyUp:i?void 0:T,onKeyPress:i?void 0:M,onClick:i?void 0:j},$,D,C),V=o.n$1({checked:E,disabled:i,hover:A,focus:L,active:z,indeterminate:g,changing:S,autofocus:l}),X=f.useCallback(()=>{if(v!==void 0)return y?.(v)},[y,v]),G=o.K();return f.createElement(f.Fragment,null,m!=null&&f.createElement(ts,{disabled:i,data:{[m]:x||"on"},overrides:{type:"checkbox",checked:E},form:p,onReset:X}),G({ourProps:P,theirProps:b,slot:V,defaultTag:Qi,name:"Checkbox"}))}let Ji=o.Y(Zi),tl=f.createContext(()=>{});function rs({value:t,children:e}){return f.createElement(tl.Provider,{value:t},e)}function el(t,e){return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&"id"in t&&"id"in e?t.id===e.id:t===e}function rl(t=el){return f.useCallback((e,r)=>{if(typeof t=="string"){let s=t;return e?.[s]===r?.[s]}return t(e,r)},[t])}function Vs(t){if(t===null)return{width:0,height:0};let{width:e,height:r}=t.getBoundingClientRect();return{width:e,height:r}}function ss(t,e,r=!1){let[s,n]=f.useState(()=>Vs(e));return o.n(()=>{if(!e||!t)return;let a=o.o$1();return a.requestAnimationFrame(function i(){a.requestAnimationFrame(i),n(l=>{let c=Vs(e);return c.width===l.width&&c.height===l.height?l:c})}),()=>{a.dispose()}},[e,t]),r?{width:`${s.width}px`,height:`${s.height}px`}:s}var Jn=(t=>(t[t.Left=0]="Left",t[t.Right=2]="Right",t))(Jn||{});function to(t){let e=f.useRef(null),r=o.o(n=>{e.current=n.pointerType,!Xt(n.currentTarget)&&n.pointerType==="mouse"&&n.button===Jn.Left&&(n.preventDefault(),t(n))}),s=o.o(n=>{e.current!=="mouse"&&(Xt(n.currentTarget)||t(n))});return{onPointerDown:r,onClick:s}}let eo=class extends Map{constructor(e){super(),this.factory=e}get(e){let r=super.get(e);return r===void 0&&(r=this.factory(e),this.set(e,r)),r}};var sl=Object.defineProperty,nl=(t,e,r)=>e in t?sl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ol=(t,e,r)=>(nl(t,e+"",r),r),ro=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},pt=(t,e,r)=>(ro(t,e,"read from private field"),r?r.call(t):e.get(t)),Sr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Bs=(t,e,r,s)=>(ro(t,e,"write to private field"),e.set(t,r),r),ht,ue,de;let er=class{constructor(e){Sr(this,ht,{}),Sr(this,ue,new eo(()=>new Set)),Sr(this,de,new Set),ol(this,"disposables",o.o$1()),Bs(this,ht,e),o.s.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return pt(this,ht)}subscribe(e,r){if(o.s.isServer)return()=>{};let s={selector:e,callback:r,current:e(pt(this,ht))};return pt(this,de).add(s),this.disposables.add(()=>{pt(this,de).delete(s)})}on(e,r){return o.s.isServer?()=>{}:(pt(this,ue).get(e).add(r),this.disposables.add(()=>{pt(this,ue).get(e).delete(r)}))}send(e){let r=this.reduce(pt(this,ht),e);if(r!==pt(this,ht)){Bs(this,ht,r);for(let s of pt(this,de)){let n=s.selector(pt(this,ht));so(s.current,n)||(s.current=n,s.callback(n))}for(let s of pt(this,ue).get(e.type))s(pt(this,ht),e)}}};ht=new WeakMap,ue=new WeakMap,de=new WeakMap;function so(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:Cr(t[Symbol.iterator](),e[Symbol.iterator]()):t instanceof Map&&e instanceof Map||t instanceof Set&&e instanceof Set?t.size!==e.size?!1:Cr(t.entries(),e.entries()):Hs(t)&&Hs(e)?Cr(Object.entries(t)[Symbol.iterator](),Object.entries(e)[Symbol.iterator]()):!1}function Cr(t,e){do{let r=t.next(),s=e.next();if(r.done&&s.done)return!0;if(r.done||s.done||!Object.is(r.value,s.value))return!1}while(!0)}function Hs(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}function pe(t){let[e,r]=t(),s=o.o$1();return(...n)=>{e(...n),s.dispose(),s.microTask(r)}}var al=Object.defineProperty,il=(t,e,r)=>e in t?al(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zs=(t,e,r)=>(il(t,typeof e!="symbol"?e+"":e,r),r),ns=(t=>(t[t.Push=0]="Push",t[t.Pop=1]="Pop",t))(ns||{});let ll={0(t,e){let r=e.id,s=t.stack,n=t.stack.indexOf(r);if(n!==-1){let a=t.stack.slice();return a.splice(n,1),a.push(r),s=a,{...t,stack:s}}return{...t,stack:[...t.stack,r]}},1(t,e){let r=e.id,s=t.stack.indexOf(r);if(s===-1)return t;let n=t.stack.slice();return n.splice(s,1),{...t,stack:n}}},cl=class no extends er{constructor(){super(...arguments),zs(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),zs(this,"selectors",{isTop:(e,r)=>e.stack[e.stack.length-1]===r,inStack:(e,r)=>e.stack.includes(r)})}static new(){return new no({stack:[]})}reduce(e,r){return o.u(r.type,ll,e,r)}};const Yt=new eo(()=>cl.new());var Le={exports:{}},Nr={};var Ws;function ul(){if(Ws)return Nr;Ws=1;var t=f;function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:e,s=t.useSyncExternalStore,n=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;return Nr.useSyncExternalStoreWithSelector=function(c,u,d,m,x){var p=n(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=i(function(){function b(R){if(!v){if(v=!0,E=R,R=m(R),x!==void 0&&g.hasValue){var O=g.value;if(x(O,R))return y=O}return y=R}if(O=y,r(E,R))return O;var S=m(R);return x!==void 0&&x(O,S)?(E=R,O):(E=R,y=S)}var v=!1,E,y,k=d===void 0?null:d;return[function(){return b(u())},k===null?void 0:function(){return b(k())}]},[u,d,m,x]);var h=s(c,p[0],p[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Nr}var Or={};var Ys;function dl(){return Ys||(Ys=1,process.env.NODE_ENV!=="production"&&(function(){function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=f,r=typeof Object.is=="function"?Object.is:t,s=e.useSyncExternalStore,n=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;Or.useSyncExternalStoreWithSelector=function(c,u,d,m,x){var p=n(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=i(function(){function b(R){if(!v){if(v=!0,E=R,R=m(R),x!==void 0&&g.hasValue){var O=g.value;if(x(O,R))return y=O}return y=R}if(O=y,r(E,R))return O;var S=m(R);return x!==void 0&&x(O,S)?(E=R,O):(E=R,y=S)}var v=!1,E,y,k=d===void 0?null:d;return[function(){return b(u())},k===null?void 0:function(){return b(k())}]},[u,d,m,x]);var h=s(c,p[0],p[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Or}var Us;function fl(){return Us||(Us=1,process.env.NODE_ENV==="production"?Le.exports=ul():Le.exports=dl()),Le.exports}var pl=fl();function q(t,e,r=so){return pl.useSyncExternalStoreWithSelector(o.o(s=>t.subscribe(ml,s)),o.o(()=>t.state),o.o(()=>t.state),o.o(e),r)}function ml(t){return t}function Se(t,e){let r=f.useId(),s=Yt.get(e),[n,a]=q(s,f.useCallback(i=>[s.selectors.isTop(i,r),s.selectors.inStack(i,r)],[s,r]));return o.n(()=>{if(t)return s.actions.push(r),()=>s.actions.pop(r)},[s,t,r]),t?a?n:!0:!1}let Fr=new Map,me=new Map;function Ks(t){var e;let r=(e=me.get(t))!=null?e:0;return me.set(t,r+1),r!==0?()=>Gs(t):(Fr.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0,()=>Gs(t))}function Gs(t){var e;let r=(e=me.get(t))!=null?e:1;if(r===1?me.delete(t):me.set(t,r-1),r!==1)return;let s=Fr.get(t);s&&(s["aria-hidden"]===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",s["aria-hidden"]),t.inert=s.inert,Fr.delete(t))}function os(t,{allowed:e,disallowed:r}={}){let s=Se(t,"inert-others");o.n(()=>{var n,a;if(!s)return;let i=o.o$1();for(let c of(n=r?.())!=null?n:[])c&&i.add(Ks(c));let l=(a=e?.())!=null?a:[];for(let c of l){if(!c)continue;let u=o.l(c);if(!u)continue;let d=c.parentElement;for(;d&&d!==u.body;){for(let m of d.children)l.some(x=>m.contains(x))||i.add(Ks(m));d=d.parentElement}}return i.dispose},[s,e,r])}function rr(t,e,r){let s=o.s$1(n=>{let a=n.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&r()});f.useEffect(()=>{if(!t)return;let n=e===null?null:nt(e)?e:e.current;if(!n)return;let a=o.o$1();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>s.current(n));i.observe(n),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>s.current(n));i.observe(n),a.add(()=>i.disconnect())}return()=>a.dispose()},[e,s,t])}let We=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(","),xl=["[data-autofocus]"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var tt=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t))(tt||{}),Qt=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(Qt||{}),gl=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(gl||{});function Ce(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(We)).sort((e,r)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function hl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(xl)).sort((e,r)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ne=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(Ne||{});function Oe(t,e=0){var r;return t===((r=o.l(t))==null?void 0:r.body)?!1:o.u(e,{0(){return t.matches(We)},1(){let s=t;for(;s!==null;){if(s.matches(We))return!0;s=s.parentElement}return!1}})}function oo(t){o.o$1().nextFrame(()=>{let e=o.e(t);e&&mt(e)&&!Oe(e,0)&&vt(t)})}var bl=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(bl||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function vt(t){t?.focus({preventScroll:!0})}let vl=["textarea","input"].join(",");function yl(t){var e,r;return(r=(e=t?.matches)==null?void 0:e.call(t,vl))!=null?r:!1}function as(t,e=r=>r){return t.slice().sort((r,s)=>{let n=e(r),a=e(s);if(n===null||a===null)return 0;let i=n.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ao(t,e,r=t===null?document.body:o.r(t)){return ut(Ce(r),e,{relativeTo:t})}function ut(t,e,{sorted:r=!0,relativeTo:s=null,skipElements:n=[]}={}){let a=Array.isArray(t)?t.length>0?o.r(t[0]):document:o.r(t),i=Array.isArray(t)?r?as(t):t:e&64?hl(t):Ce(t);n.length>0&&i.length>1&&(i=i.filter(p=>!n.some(g=>g!=null&&"current"in g?g?.current===p:g===p))),s=s??a?.activeElement;let l=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,i.indexOf(s))-1;if(e&4)return Math.max(0,i.indexOf(s))+1;if(e&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=e&32?{preventScroll:!0}:{},d=0,m=i.length,x;do{if(d>=m||d+m<=0)return 0;let p=c+d;if(e&16)p=(p+m)%m;else{if(p<0)return 3;if(p>=m)return 1}x=i[p],x?.focus(u),d+=l}while(x!==o.e(x));return e&6&&yl(x)&&x.select(),2}function io(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function wl(){return/Android/gi.test(window.navigator.userAgent)}function qs(){return io()||wl()}function Gt(t,e,r,s){let n=o.s$1(r);f.useEffect(()=>{if(!t)return;function a(i){n.current(i)}return document.addEventListener(e,a,s),()=>document.removeEventListener(e,a,s)},[t,e,s])}function lo(t,e,r,s){let n=o.s$1(r);f.useEffect(()=>{if(!t)return;function a(i){n.current(i)}return window.addEventListener(e,a,s),()=>window.removeEventListener(e,a,s)},[t,e,s])}const Xs=30;function sr(t,e,r){let s=o.s$1(r),n=f.useCallback(function(l,c){if(l.defaultPrevented)return;let u=c(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=(function m(x){return typeof x=="function"?m(x()):Array.isArray(x)||x instanceof Set?x:[x]})(e);for(let m of d)if(m!==null&&(m.contains(u)||l.composed&&l.composedPath().includes(m)))return;return!Oe(u,Ne.Loose)&&u.tabIndex!==-1&&l.preventDefault(),s.current(l,u)},[s,e]),a=f.useRef(null);Gt(t,"pointerdown",l=>{var c,u;qs()||(a.current=((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])||l.target)},!0),Gt(t,"pointerup",l=>{if(qs()||!a.current)return;let c=a.current;return a.current=null,n(l,()=>c)},!0);let i=f.useRef({x:0,y:0});Gt(t,"touchstart",l=>{i.current.x=l.touches[0].clientX,i.current.y=l.touches[0].clientY},!0),Gt(t,"touchend",l=>{let c={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(c.x-i.current.x)>=Xs||Math.abs(c.y-i.current.y)>=Xs))return n(l,()=>mt(l.target)?l.target:null)},!0),lo(t,"blur",l=>n(l,()=>Bi(window.document.activeElement)?window.document.activeElement:null),!0)}function Nt(...t){return f.useMemo(()=>o.l(...t),[...t])}function El(...t){return f.useMemo(()=>o.r(...t),[...t])}var kl=(t=>(t[t.Ignore=0]="Ignore",t[t.Select=1]="Select",t[t.Close=2]="Close",t))(kl||{});const Tt={Ignore:{kind:0},Select:t=>({kind:1,target:t}),Close:{kind:2}},Rl=200,Qs=5;function co(t,{trigger:e,action:r,close:s,select:n}){let a=f.useRef(null),i=f.useRef(null),l=f.useRef(null);Gt(t&&e!==null,"pointerdown",c=>{Kn(c?.target)&&e!=null&&e.contains(c.target)&&(i.current=c.x,l.current=c.y,a.current=c.timeStamp)}),Gt(t&&e!==null,"pointerup",c=>{var u,d;let m=a.current;if(m===null||(a.current=null,!mt(c.target))||Math.abs(c.x-((u=i.current)!=null?u:c.x))<Qs&&Math.abs(c.y-((d=l.current)!=null?d:c.y))<Qs)return;let x=r(c);switch(x.kind){case 0:return;case 1:{c.timeStamp-m>Rl&&(n(x.target),s());break}case 2:{s();break}}},{capture:!0})}function is(t,e,r,s){let n=o.s$1(r);f.useEffect(()=>{t=t??window;function a(i){n.current(i)}return t.addEventListener(e,a,s),()=>t.removeEventListener(e,a,s)},[t,e,s])}function nr(t,e){return f.useMemo(()=>{var r;if(t.type)return t.type;let s=(r=t.as)!=null?r:"button";if(typeof s=="string"&&s.toLowerCase()==="button"||e?.tagName==="BUTTON"&&!e.hasAttribute("type"))return"button"},[t.type,t.as,e])}function jl(t){return f.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}function Sl(t,e){let r=t(),s=new Set;return{getSnapshot(){return r},subscribe(n){return s.add(n),()=>s.delete(n)},dispatch(n,...a){let i=e[n].call(r,...a);i&&(r=i,s.forEach(l=>l()))}}}function Cl(){let t;return{before({doc:e}){var r;let s=e.documentElement,n=(r=e.defaultView)!=null?r:window;t=Math.max(0,n.innerWidth-s.clientWidth)},after({doc:e,d:r}){let s=e.documentElement,n=Math.max(0,s.clientWidth-s.offsetWidth),a=Math.max(0,t-n);r.style(s,"paddingRight",`${a}px`)}}}function Nl(){return io()?{before({doc:t,d:e,meta:r}){function s(n){for(let a of r().containers)for(let i of a())if(i.contains(n))return!0;return!1}e.microTask(()=>{var n;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=o.o$1();l.style(t.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>l.dispose()))}let a=(n=window.scrollY)!=null?n:window.pageYOffset,i=null;e.addEventListener(t,"click",l=>{if(mt(l.target))try{let c=l.target.closest("a");if(!c)return;let{hash:u}=new URL(c.href),d=t.querySelector(u);mt(d)&&!s(d)&&(i=d)}catch{}},!0),e.group(l=>{e.addEventListener(t,"touchstart",c=>{if(l.dispose(),mt(c.target)&&Vi(c.target))if(s(c.target)){let u=c.target;for(;u.parentElement&&s(u.parentElement);)u=u.parentElement;l.style(u,"overscrollBehavior","contain")}else l.style(c.target,"touchAction","none")})}),e.addEventListener(t,"touchmove",l=>{if(mt(l.target)){if(Gn(l.target))return;if(s(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),e.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;a!==c&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Ol(){return{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}}function Zs(t){let e={};for(let r of t)Object.assign(e,r(e));return e}let zt=Sl(()=>new Map,{PUSH(t,e){var r;let s=(r=this.get(t))!=null?r:{doc:t,count:0,d:o.o$1(),meta:new Set,computedMeta:{}};return s.count++,s.meta.add(e),s.computedMeta=Zs(s.meta),this.set(t,s),this},POP(t,e){let r=this.get(t);return r&&(r.count--,r.meta.delete(e),r.computedMeta=Zs(r.meta)),this},SCROLL_PREVENT(t){let e={doc:t.doc,d:t.d,meta(){return t.computedMeta}},r=[Nl(),Cl(),Ol()];r.forEach(({before:s})=>s?.(e)),r.forEach(({after:s})=>s?.(e))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});zt.subscribe(()=>{let t=zt.getSnapshot(),e=new Map;for(let[r]of t)e.set(r,r.documentElement.style.overflow);for(let r of t.values()){let s=e.get(r.doc)==="hidden",n=r.count!==0;(n&&!s||!n&&s)&&zt.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&zt.dispatch("TEARDOWN",r)}});function Pl(t,e,r=()=>({containers:[]})){let s=jl(zt),n=e?s.get(e):void 0,a=n?n.count>0:!1;return o.n(()=>{if(!(!e||!t))return zt.dispatch("PUSH",e,r),()=>zt.dispatch("POP",e,r)},[t,e]),a}function or(t,e,r=()=>[document.body]){let s=Se(t,"scroll-lock");Pl(s,e,n=>{var a;return{containers:[...(a=n.containers)!=null?a:[],r]}})}function Js(t){return[t.screenX,t.screenY]}function uo(){let t=f.useRef([-1,-1]);return{wasMoved(e){let r=Js(e);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(e){t.current=Js(e)}}}function $l(t=0){let[e,r]=f.useState(t),s=f.useCallback(c=>r(c),[]),n=f.useCallback(c=>r(u=>u|c),[]),a=f.useCallback(c=>(e&c)===c,[e]),i=f.useCallback(c=>r(u=>u&~c),[]),l=f.useCallback(c=>r(u=>u^c),[]);return{flags:e,setFlag:s,addFlag:n,hasFlag:a,removeFlag:i,toggleFlag:l}}var tn,en;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((tn=process==null?void 0:process.env)==null?void 0:tn.NODE_ENV)==="test"&&typeof((en=Element?.prototype)==null?void 0:en.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
2
- `)),[]});var Tl=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(Tl||{});function Pe(t){let e={};for(let r in t)t[r]===!0&&(e[`data-${r}`]="");return e}function $e(t,e,r,s){let[n,a]=f.useState(r),{hasFlag:i,addFlag:l,removeFlag:c}=$l(t&&n?3:0),u=f.useRef(!1),d=f.useRef(!1),m=o.p();return o.n(()=>{var x;if(t){if(r&&a(!0),!e){r&&l(3);return}return(x=s?.start)==null||x.call(s,r),Il(e,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(r?(l(3),c(4)):(l(4),c(2)))},run(){d.current?r?(c(3),l(4)):(c(4),l(3)):r?c(1):l(1)},done(){var p;d.current&&Fl(e)||(u.current=!1,c(7),r||a(!1),(p=s?.end)==null||p.call(s,r))}})}},[t,r,e,m]),t?[n,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Il(t,{prepare:e,run:r,done:s,inFlight:n}){let a=o.o$1();return Dl(t,{prepare:e,inFlight:n}),a.nextFrame(()=>{r(),a.requestAnimationFrame(()=>{a.add(Al(t,s))})}),a.dispose}function Al(t,e){var r,s;let n=o.o$1();if(!t)return n.dispose;let a=!1;n.add(()=>{a=!0});let i=(s=(r=t.getAnimations)==null?void 0:r.call(t).filter(l=>l instanceof CSSTransition))!=null?s:[];return i.length===0?(e(),n.dispose):(Promise.allSettled(i.map(l=>l.finished)).then(()=>{a||e()}),n.dispose)}function Dl(t,{inFlight:e,prepare:r}){if(e!=null&&e.current){r();return}let s=t.style.transition;t.style.transition="none",r(),t.offsetHeight,t.style.transition=s}function Fl(t){var e,r;return((r=(e=t.getAnimations)==null?void 0:e.call(t))!=null?r:[]).some(s=>s instanceof CSSTransition&&s.playState!=="finished")}function Ml(t,{container:e,accept:r,walk:s}){let n=f.useRef(r),a=f.useRef(s);f.useEffect(()=>{n.current=r,a.current=s},[r,s]),o.n(()=>{if(!e||!t)return;let i=o.l(e);if(!i)return;let l=n.current,c=a.current,u=Object.assign(m=>l(m),{acceptNode:l}),d=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,u,!1);for(;d.nextNode();)c(d.currentNode)},[e,t,n,a])}function ls(t,e){let r=f.useRef([]),s=o.o(t);f.useEffect(()=>{let n=[...r.current];for(let[a,i]of e.entries())if(r.current[a]!==i){let l=s(e,n);return r.current=e,l}},[s,...e])}function ar(){return typeof window<"u"}function oe(t){return fo(t)?(t.nodeName||"").toLowerCase():"#document"}function ft(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(t){var e;return(e=(fo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function fo(t){return ar()?t instanceof Node||t instanceof ft(t).Node:!1}function lt(t){return ar()?t instanceof Element||t instanceof ft(t).Element:!1}function Et(t){return ar()?t instanceof HTMLElement||t instanceof ft(t).HTMLElement:!1}function rn(t){return!ar()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ft(t).ShadowRoot}const Ll=new Set(["inline","contents"]);function Te(t){const{overflow:e,overflowX:r,overflowY:s,display:n}=gt(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+r)&&!Ll.has(n)}const _l=new Set(["table","td","th"]);function Vl(t){return _l.has(oe(t))}const Bl=[":popover-open",":modal"];function ir(t){return Bl.some(e=>{try{return t.matches(e)}catch{return!1}})}const Hl=["transform","translate","scale","rotate","perspective"],zl=["transform","translate","scale","rotate","perspective","filter"],Wl=["paint","layout","strict","content"];function cs(t){const e=us(),r=lt(t)?gt(t):t;return Hl.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||zl.some(s=>(r.willChange||"").includes(s))||Wl.some(s=>(r.contain||"").includes(s))}function Yl(t){let e=Ft(t);for(;Et(e)&&!Zt(e);){if(cs(e))return e;if(ir(e))return null;e=Ft(e)}return null}function us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ul=new Set(["html","body","#document"]);function Zt(t){return Ul.has(oe(t))}function gt(t){return ft(t).getComputedStyle(t)}function lr(t){return lt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ft(t){if(oe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||rn(t)&&t.host||Rt(t);return rn(e)?e.host:e}function po(t){const e=Ft(t);return Zt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Et(e)&&Te(e)?e:po(e)}function he(t,e,r){var s;e===void 0&&(e=[]),r===void 0&&(r=!0);const n=po(t),a=n===((s=t.ownerDocument)==null?void 0:s.body),i=ft(n);if(a){const l=Mr(i);return e.concat(i,i.visualViewport||[],Te(n)?n:[],l&&r?he(l):[])}return e.concat(n,he(n,[],r))}function Mr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kl(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:s}=e;return r+"/"+s}).join(" "):navigator.userAgent}const Gl=["top","right","bottom","left"],Ot=Math.min,at=Math.max,be=Math.round,_e=Math.floor,yt=t=>({x:t,y:t}),ql={left:"right",right:"left",bottom:"top",top:"bottom"},Xl={start:"end",end:"start"};function Lr(t,e,r){return at(t,Ot(e,r))}function kt(t,e){return typeof t=="function"?t(e):t}function Pt(t){return t.split("-")[0]}function ae(t){return t.split("-")[1]}function ds(t){return t==="x"?"y":"x"}function fs(t){return t==="y"?"height":"width"}const Ql=new Set(["top","bottom"]);function bt(t){return Ql.has(Pt(t))?"y":"x"}function ps(t){return ds(bt(t))}function Zl(t,e,r){r===void 0&&(r=!1);const s=ae(t),n=ps(t),a=fs(n);let i=n==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Ye(i)),[i,Ye(i)]}function Jl(t){const e=Ye(t);return[_r(t),e,_r(e)]}function _r(t){return t.replace(/start|end/g,e=>Xl[e])}const sn=["left","right"],nn=["right","left"],tc=["top","bottom"],ec=["bottom","top"];function rc(t,e,r){switch(t){case"top":case"bottom":return r?e?nn:sn:e?sn:nn;case"left":case"right":return e?tc:ec;default:return[]}}function sc(t,e,r,s){const n=ae(t);let a=rc(Pt(t),r==="start",s);return n&&(a=a.map(i=>i+"-"+n),e&&(a=a.concat(a.map(_r)))),a}function Ye(t){return t.replace(/left|right|bottom|top/g,e=>ql[e])}function nc(t){return{top:0,right:0,bottom:0,left:0,...t}}function mo(t){return typeof t!="number"?nc(t):{top:t,right:t,bottom:t,left:t}}function Ue(t){const{x:e,y:r,width:s,height:n}=t;return{width:s,height:n,top:r,left:e,right:e+s,bottom:r+n,x:e,y:r}}function on(t,e,r){let{reference:s,floating:n}=t;const a=bt(e),i=ps(e),l=fs(i),c=Pt(e),u=a==="y",d=s.x+s.width/2-n.width/2,m=s.y+s.height/2-n.height/2,x=s[l]/2-n[l]/2;let p;switch(c){case"top":p={x:d,y:s.y-n.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:m};break;case"left":p={x:s.x-n.width,y:m};break;default:p={x:s.x,y:s.y}}switch(ae(e)){case"start":p[i]-=x*(r&&u?-1:1);break;case"end":p[i]+=x*(r&&u?-1:1);break}return p}async function xo(t,e){var r;e===void 0&&(e={});const{x:s,y:n,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:x=!1,padding:p=0}=kt(e,t),g=mo(p),b=l[x?m==="floating"?"reference":"floating":m],v=Ue(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),E=m==="floating"?{x:s,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),k=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},R=Ue(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:y,strategy:c}):E);return{top:(v.top-R.top+g.top)/k.y,bottom:(R.bottom-v.bottom+g.bottom)/k.y,left:(v.left-R.left+g.left)/k.x,right:(R.right-v.right+g.right)/k.x}}const oc=async(t,e,r)=>{const{placement:s="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:n}),{x:d,y:m}=on(u,s,c),x=s,p={},g=0;for(let b=0;b<l.length;b++){var h;const{name:v,fn:E}=l[b],{x:y,y:k,data:R,reset:O}=await E({x:d,y:m,initialPlacement:s,placement:x,strategy:n,middlewareData:p,rects:u,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:xo},elements:{reference:t,floating:e}});d=y??d,m=k??m,p={...p,[v]:{...p[v],...R}},O&&g<=50&&(g++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(u=O.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:n}):O.rects),{x:d,y:m}=on(u,x,c)),b=-1)}return{x:d,y:m,placement:x,strategy:n,middlewareData:p}},ac=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:s,placement:n,rects:a,platform:i,elements:l,middlewareData:c}=e,{element:u,padding:d=0}=kt(t,e)||{};if(u==null)return{};const m=mo(d),x={x:r,y:s},p=ps(n),g=fs(p),h=await i.getDimensions(u),b=p==="y",v=b?"top":"left",E=b?"bottom":"right",y=b?"clientHeight":"clientWidth",k=a.reference[g]+a.reference[p]-x[p]-a.floating[g],R=x[p]-a.reference[p],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=O?O[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(O)))&&(S=l.floating[y]||a.floating[g]);const F=k/2-R/2,B=S/2-h[g]/2-1,j=Ot(m[v],B),T=Ot(m[E],B),M=j,L=S-h[g]-T,$=S/2-h[g]/2+F,A=Lr(M,$,L),D=!c.arrow&&ae(n)!=null&&$!==A&&a.reference[g]/2-($<M?j:T)-h[g]/2<0,z=D?$<M?$-M:$-L:0;return{[p]:x[p]+z,data:{[p]:A,centerOffset:$-A-z,...D&&{alignmentOffset:z}},reset:D}}}),ic=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,s;const{placement:n,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...b}=kt(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const v=Pt(n),E=bt(l),y=Pt(l)===l,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=x||(y||!h?[Ye(l)]:Jl(l)),O=g!=="none";!x&&O&&R.push(...sc(l,h,g,k));const S=[l,...R],F=await c.detectOverflow(e,b),B=[];let j=((s=a.flip)==null?void 0:s.overflows)||[];if(d&&B.push(F[v]),m){const $=Zl(n,i,k);B.push(F[$[0]],F[$[1]])}if(j=[...j,{placement:n,overflows:B}],!B.every($=>$<=0)){var T,M;const $=(((T=a.flip)==null?void 0:T.index)||0)+1,A=S[$];if(A&&(!(m==="alignment"?E!==bt(A):!1)||j.every(C=>bt(C.placement)===E?C.overflows[0]>0:!0)))return{data:{index:$,overflows:j},reset:{placement:A}};let D=(M=j.filter(z=>z.overflows[0]<=0).sort((z,C)=>z.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(p){case"bestFit":{var L;const z=(L=j.filter(C=>{if(O){const P=bt(C.placement);return P===E||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,V)=>P+V,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:L[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function an(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ln(t){return Gl.some(e=>t[e]>=0)}const lc=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:s}=e,{strategy:n="referenceHidden",...a}=kt(t,e);switch(n){case"referenceHidden":{const i=await s.detectOverflow(e,{...a,elementContext:"reference"}),l=an(i,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ln(l)}}}case"escaped":{const i=await s.detectOverflow(e,{...a,altBoundary:!0}),l=an(i,r.floating);return{data:{escapedOffsets:l,escaped:ln(l)}}}default:return{}}}}},go=new Set(["left","top"]);async function cc(t,e){const{placement:r,platform:s,elements:n}=t,a=await(s.isRTL==null?void 0:s.isRTL(n.floating)),i=Pt(r),l=ae(r),c=bt(r)==="y",u=go.has(i)?-1:1,d=a&&c?-1:1,m=kt(e,t);let{mainAxis:x,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:x*u}:{x:x*u,y:p*d}}const uc=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,s;const{x:n,y:a,placement:i,middlewareData:l}=e,c=await cc(e,t);return i===((r=l.offset)==null?void 0:r.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:n+c.x,y:a+c.y,data:{...c,placement:i}}}}},dc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:s,placement:n,platform:a}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:v=>{let{x:E,y}=v;return{x:E,y}}},...u}=kt(t,e),d={x:r,y:s},m=await a.detectOverflow(e,u),x=bt(Pt(n)),p=ds(x);let g=d[p],h=d[x];if(i){const v=p==="y"?"top":"left",E=p==="y"?"bottom":"right",y=g+m[v],k=g-m[E];g=Lr(y,g,k)}if(l){const v=x==="y"?"top":"left",E=x==="y"?"bottom":"right",y=h+m[v],k=h-m[E];h=Lr(y,h,k)}const b=c.fn({...e,[p]:g,[x]:h});return{...b,data:{x:b.x-r,y:b.y-s,enabled:{[p]:i,[x]:l}}}}}},fc=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:s,placement:n,rects:a,middlewareData:i}=e,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=kt(t,e),d={x:r,y:s},m=bt(n),x=ds(m);let p=d[x],g=d[m];const h=kt(l,e),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const y=x==="y"?"height":"width",k=a.reference[x]-a.floating[y]+b.mainAxis,R=a.reference[x]+a.reference[y]-b.mainAxis;p<k?p=k:p>R&&(p=R)}if(u){var v,E;const y=x==="y"?"width":"height",k=go.has(Pt(n)),R=a.reference[m]-a.floating[y]+(k&&((v=i.offset)==null?void 0:v[m])||0)+(k?0:b.crossAxis),O=a.reference[m]+a.reference[y]+(k?0:((E=i.offset)==null?void 0:E[m])||0)-(k?b.crossAxis:0);g<R?g=R:g>O&&(g=O)}return{[x]:p,[m]:g}}}},pc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,s;const{placement:n,rects:a,platform:i,elements:l}=e,{apply:c=()=>{},...u}=kt(t,e),d=await i.detectOverflow(e,u),m=Pt(n),x=ae(n),p=bt(n)==="y",{width:g,height:h}=a.floating;let b,v;m==="top"||m==="bottom"?(b=m,v=x===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=m,b=x==="end"?"top":"bottom");const E=h-d.top-d.bottom,y=g-d.left-d.right,k=Ot(h-d[b],E),R=Ot(g-d[v],y),O=!e.middlewareData.shift;let S=k,F=R;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(F=y),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(S=E),O&&!x){const j=at(d.left,0),T=at(d.right,0),M=at(d.top,0),L=at(d.bottom,0);p?F=g-2*(j!==0||T!==0?j+T:at(d.left,d.right)):S=h-2*(M!==0||L!==0?M+L:at(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:S});const B=await i.getDimensions(l.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function ho(t){const e=gt(t);let r=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const n=Et(t),a=n?t.offsetWidth:r,i=n?t.offsetHeight:s,l=be(r)!==a||be(s)!==i;return l&&(r=a,s=i),{width:r,height:s,$:l}}function ms(t){return lt(t)?t:t.contextElement}function qt(t){const e=ms(t);if(!Et(e))return yt(1);const r=e.getBoundingClientRect(),{width:s,height:n,$:a}=ho(e);let i=(a?be(r.width):r.width)/s,l=(a?be(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const mc=yt(0);function bo(t){const e=ft(t);return!us()||!e.visualViewport?mc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xc(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ft(t)?!1:e}function Wt(t,e,r,s){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=t.getBoundingClientRect(),a=ms(t);let i=yt(1);e&&(s?lt(s)&&(i=qt(s)):i=qt(t));const l=xc(a,r,s)?bo(a):yt(0);let c=(n.left+l.x)/i.x,u=(n.top+l.y)/i.y,d=n.width/i.x,m=n.height/i.y;if(a){const x=ft(a),p=s&&lt(s)?ft(s):s;let g=x,h=Mr(g);for(;h&&s&&p!==g;){const b=qt(h),v=h.getBoundingClientRect(),E=gt(h),y=v.left+(h.clientLeft+parseFloat(E.paddingLeft))*b.x,k=v.top+(h.clientTop+parseFloat(E.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,m*=b.y,c+=y,u+=k,g=ft(h),h=Mr(g)}}return Ue({width:d,height:m,x:c,y:u})}function cr(t,e){const r=lr(t).scrollLeft;return e?e.left+r:Wt(Rt(t)).left+r}function vo(t,e){const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-cr(t,r),n=r.top+e.scrollTop;return{x:s,y:n}}function gc(t){let{elements:e,rect:r,offsetParent:s,strategy:n}=t;const a=n==="fixed",i=Rt(s),l=e?ir(e.floating):!1;if(s===i||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=yt(1);const d=yt(0),m=Et(s);if((m||!m&&!a)&&((oe(s)!=="body"||Te(i))&&(c=lr(s)),Et(s))){const p=Wt(s);u=qt(s),d.x=p.x+s.clientLeft,d.y=p.y+s.clientTop}const x=i&&!m&&!a?vo(i,c):yt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+x.x,y:r.y*u.y-c.scrollTop*u.y+d.y+x.y}}function hc(t){return Array.from(t.getClientRects())}function bc(t){const e=Rt(t),r=lr(t),s=t.ownerDocument.body,n=at(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),a=at(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let i=-r.scrollLeft+cr(t);const l=-r.scrollTop;return gt(s).direction==="rtl"&&(i+=at(e.clientWidth,s.clientWidth)-n),{width:n,height:a,x:i,y:l}}const cn=25;function vc(t,e){const r=ft(t),s=Rt(t),n=r.visualViewport;let a=s.clientWidth,i=s.clientHeight,l=0,c=0;if(n){a=n.width,i=n.height;const d=us();(!d||d&&e==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}const u=cr(s);if(u<=0){const d=s.ownerDocument,m=d.body,x=getComputedStyle(m),p=d.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,g=Math.abs(s.clientWidth-m.clientWidth-p);g<=cn&&(a-=g)}else u<=cn&&(a+=u);return{width:a,height:i,x:l,y:c}}const yc=new Set(["absolute","fixed"]);function wc(t,e){const r=Wt(t,!0,e==="fixed"),s=r.top+t.clientTop,n=r.left+t.clientLeft,a=Et(t)?qt(t):yt(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=n*a.x,u=s*a.y;return{width:i,height:l,x:c,y:u}}function un(t,e,r){let s;if(e==="viewport")s=vc(t,r);else if(e==="document")s=bc(Rt(t));else if(lt(e))s=wc(e,r);else{const n=bo(t);s={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Ue(s)}function yo(t,e){const r=Ft(t);return r===e||!lt(r)||Zt(r)?!1:gt(r).position==="fixed"||yo(r,e)}function Ec(t,e){const r=e.get(t);if(r)return r;let s=he(t,[],!1).filter(l=>lt(l)&&oe(l)!=="body"),n=null;const a=gt(t).position==="fixed";let i=a?Ft(t):t;for(;lt(i)&&!Zt(i);){const l=gt(i),c=cs(i);!c&&l.position==="fixed"&&(n=null),(a?!c&&!n:!c&&l.position==="static"&&!!n&&yc.has(n.position)||Te(i)&&!c&&yo(t,i))?s=s.filter(d=>d!==i):n=l,i=Ft(i)}return e.set(t,s),s}function kc(t){let{element:e,boundary:r,rootBoundary:s,strategy:n}=t;const i=[...r==="clippingAncestors"?ir(e)?[]:Ec(e,this._c):[].concat(r),s],l=i[0],c=i.reduce((u,d)=>{const m=un(e,d,n);return u.top=at(m.top,u.top),u.right=Ot(m.right,u.right),u.bottom=Ot(m.bottom,u.bottom),u.left=at(m.left,u.left),u},un(e,l,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Rc(t){const{width:e,height:r}=ho(t);return{width:e,height:r}}function jc(t,e,r){const s=Et(e),n=Rt(e),a=r==="fixed",i=Wt(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const c=yt(0);function u(){c.x=cr(n)}if(s||!s&&!a)if((oe(e)!=="body"||Te(n))&&(l=lr(e)),s){const p=Wt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else n&&u();a&&!s&&n&&u();const d=n&&!s&&!a?vo(n,l):yt(0),m=i.left+l.scrollLeft-c.x-d.x,x=i.top+l.scrollTop-c.y-d.y;return{x:m,y:x,width:i.width,height:i.height}}function Pr(t){return gt(t).position==="static"}function dn(t,e){if(!Et(t)||gt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Rt(t)===r&&(r=r.ownerDocument.body),r}function wo(t,e){const r=ft(t);if(ir(t))return r;if(!Et(t)){let n=Ft(t);for(;n&&!Zt(n);){if(lt(n)&&!Pr(n))return n;n=Ft(n)}return r}let s=dn(t,e);for(;s&&Vl(s)&&Pr(s);)s=dn(s,e);return s&&Zt(s)&&Pr(s)&&!cs(s)?r:s||Yl(t)||r}const Sc=async function(t){const e=this.getOffsetParent||wo,r=this.getDimensions,s=await r(t.floating);return{reference:jc(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Cc(t){return gt(t).direction==="rtl"}const Nc={convertOffsetParentRelativeRectToViewportRelativeRect:gc,getDocumentElement:Rt,getClippingRect:kc,getOffsetParent:wo,getElementRects:Sc,getClientRects:hc,getDimensions:Rc,getScale:qt,isElement:lt,isRTL:Cc};function Eo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Oc(t,e){let r=null,s;const n=Rt(t);function a(){var l;clearTimeout(s),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:d,top:m,width:x,height:p}=u;if(l||e(),!x||!p)return;const g=_e(m),h=_e(n.clientWidth-(d+x)),b=_e(n.clientHeight-(m+p)),v=_e(d),y={rootMargin:-g+"px "+-h+"px "+-b+"px "+-v+"px",threshold:at(0,Ot(1,c))||1};let k=!0;function R(O){const S=O[0].intersectionRatio;if(S!==c){if(!k)return i();S?i(!1,S):s=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Eo(u,t.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(R,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(R,y)}r.observe(t)}return i(!0),a}function ko(t,e,r,s){s===void 0&&(s={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,u=ms(t),d=n||a?[...u?he(u):[],...he(e)]:[];d.forEach(v=>{n&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const m=u&&l?Oc(u,r):null;let x=-1,p=null;i&&(p=new ResizeObserver(v=>{let[E]=v;E&&E.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(e)})),r()}),u&&!c&&p.observe(u),p.observe(e));let g,h=c?Wt(t):null;c&&b();function b(){const v=Wt(t);h&&!Eo(h,v)&&r(),h=v,g=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(E=>{n&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),m?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const $r=xo,Pc=uc,$c=dc,Tc=ic,Ic=pc,Ac=lc,fn=ac,Dc=fc,Fc=(t,e,r)=>{const s=new Map,n={platform:Nc,...r},a={...n.platform,_c:s};return oc(t,e,{...n,platform:a})};var Mc=typeof document<"u",Lc=function(){},He=Mc?f.useLayoutEffect:Lc;function Ke(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,s,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(s=r;s--!==0;)if(!Ke(t[s],e[s]))return!1;return!0}if(n=Object.keys(t),r=n.length,r!==Object.keys(e).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(e,n[s]))return!1;for(s=r;s--!==0;){const a=n[s];if(!(a==="_owner"&&t.$$typeof)&&!Ke(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Ro(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pn(t,e){const r=Ro(t);return Math.round(e*r)/r}function Tr(t){const e=w.useRef(t);return He(()=>{e.current=t}),e}function jo(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:s=[],platform:n,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,m]=w.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[x,p]=w.useState(s);Ke(x,s)||p(s);const[g,h]=w.useState(null),[b,v]=w.useState(null),E=w.useCallback(C=>{C!==O.current&&(O.current=C,h(C))},[]),y=w.useCallback(C=>{C!==S.current&&(S.current=C,v(C))},[]),k=a||g,R=i||b,O=w.useRef(null),S=w.useRef(null),F=w.useRef(d),B=c!=null,j=Tr(c),T=Tr(n),M=Tr(u),L=w.useCallback(()=>{if(!O.current||!S.current)return;const C={placement:e,strategy:r,middleware:x};T.current&&(C.platform=T.current),Fc(O.current,S.current,C).then(P=>{const V={...P,isPositioned:M.current!==!1};$.current&&!Ke(F.current,V)&&(F.current=V,ge.flushSync(()=>{m(V)}))})},[x,e,r,T,M]);He(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,m(C=>({...C,isPositioned:!1})))},[u]);const $=w.useRef(!1);He(()=>($.current=!0,()=>{$.current=!1}),[]),He(()=>{if(k&&(O.current=k),R&&(S.current=R),k&&R){if(j.current)return j.current(k,R,L);L()}},[k,R,L,j,B]);const A=w.useMemo(()=>({reference:O,floating:S,setReference:E,setFloating:y}),[E,y]),D=w.useMemo(()=>({reference:k,floating:R}),[k,R]),z=w.useMemo(()=>{const C={position:r,left:0,top:0};if(!D.floating)return C;const P=pn(D.floating,d.x),V=pn(D.floating,d.y);return l?{...C,transform:"translate("+P+"px, "+V+"px)",...Ro(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:V}},[r,l,D.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:L,refs:A,elements:D,floatingStyles:z}),[d,L,A,D,z])}const _c=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:s,padding:n}=typeof t=="function"?t(r):t;return s&&e(s)?s.current!=null?fn({element:s.current,padding:n}).fn(r):{}:s?fn({element:s,padding:n}).fn(r):{}}}},xs=(t,e)=>({...Pc(t),options:[t,e]}),So=(t,e)=>({...$c(t),options:[t,e]}),Vc=(t,e)=>({...Dc(t),options:[t,e]}),Co=(t,e)=>({...Tc(t),options:[t,e]}),No=(t,e)=>({...Ic(t),options:[t,e]}),Bc=(t,e)=>({...Ac(t),options:[t,e]}),Hc=(t,e)=>({..._c(t),options:[t,e]}),Oo={...w},zc=Oo.useInsertionEffect,Wc=zc||(t=>t());function Po(t){const e=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Wc(()=>{e.current=t}),w.useCallback(function(){for(var r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];return e.current==null?void 0:e.current(...s)},[])}var Vr=typeof document<"u"?f.useLayoutEffect:f.useEffect;let mn=!1,Yc=0;const xn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yc++;function Uc(){const[t,e]=w.useState(()=>mn?xn():void 0);return Vr(()=>{t==null&&e(xn())},[]),w.useEffect(()=>{mn=!0},[]),t}const Kc=Oo.useId,Gc=Kc||Uc;let ve;process.env.NODE_ENV!=="production"&&(ve=new Set);function qc(){for(var t,e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];const n="Floating UI: "+r.join(" ");if(!((t=ve)!=null&&t.has(n))){var a;(a=ve)==null||a.add(n),console.warn(n)}}function Xc(){for(var t,e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];const n="Floating UI: "+r.join(" ");if(!((t=ve)!=null&&t.has(n))){var a;(a=ve)==null||a.add(n),console.error(n)}}function Qc(){const t=new Map;return{emit(e,r){var s;(s=t.get(e))==null||s.forEach(n=>n(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var s;t.set(e,((s=t.get(e))==null?void 0:s.filter(n=>n!==r))||[])}}}const Zc=w.createContext(null),Jc=w.createContext(null),tu=()=>{var t;return((t=w.useContext(Zc))==null?void 0:t.id)||null},eu=()=>w.useContext(Jc),ru="data-floating-ui-focusable";function su(t){const{open:e=!1,onOpenChange:r,elements:s}=t,n=Gc(),a=w.useRef({}),[i]=w.useState(()=>Qc()),l=tu()!=null;if(process.env.NODE_ENV!=="production"){const p=s.reference;p&&!lt(p)&&Xc("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=w.useState(s.reference),d=Po((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),r?.(p,g,h)}),m=w.useMemo(()=>({setPositionReference:u}),[]),x=w.useMemo(()=>({reference:c||s.reference||null,floating:s.floating||null,domReference:s.reference}),[c,s.reference,s.floating]);return w.useMemo(()=>({dataRef:a,open:e,onOpenChange:d,elements:x,events:i,floatingId:n,refs:m}),[e,d,x,i,n,m])}function nu(t){t===void 0&&(t={});const{nodeId:e}=t,r=su({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||r,n=s.elements,[a,i]=w.useState(null),[l,c]=w.useState(null),d=n?.domReference||a,m=w.useRef(null),x=eu();Vr(()=>{d&&(m.current=d)},[d]);const p=jo({...t,elements:{...n,...l&&{reference:l}}}),g=w.useCallback(y=>{const k=lt(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;c(k),p.refs.setReference(k)},[p.refs]),h=w.useCallback(y=>{(lt(y)||y===null)&&(m.current=y,i(y)),(lt(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!lt(y))&&p.refs.setReference(y)},[p.refs]),b=w.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:m}),[p.refs,h,g]),v=w.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),E=w.useMemo(()=>({...p,...s,refs:b,elements:v,nodeId:e}),[p,b,v,e,s]);return Vr(()=>{s.dataRef.current.floatingContext=E;const y=x?.nodesRef.current.find(k=>k.id===e);y&&(y.context=E)}),w.useMemo(()=>({...p,context:E,refs:b,elements:v}),[p,b,v,E])}const gn="active",hn="selected";function Ir(t,e,r){const s=new Map,n=r==="item";let a=t;if(n&&t){const{[gn]:i,[hn]:l,...c}=t;a=c}return{...r==="floating"&&{tabIndex:-1,[ru]:""},...a,...e.map(i=>{const l=i?i[r]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((i,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(n&&[gn,hn].includes(u)))if(u.indexOf("on")===0){if(s.has(u)||s.set(u,[]),typeof d=="function"){var m;(m=s.get(u))==null||m.push(d),i[u]=function(){for(var x,p=arguments.length,g=new Array(p),h=0;h<p;h++)g[h]=arguments[h];return(x=s.get(u))==null?void 0:x.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[u]=d}),i),{})}}function ou(t){t===void 0&&(t=[]);const e=t.map(l=>l?.reference),r=t.map(l=>l?.floating),s=t.map(l=>l?.item),n=w.useCallback(l=>Ir(l,t,"reference"),e),a=w.useCallback(l=>Ir(l,t,"floating"),r),i=w.useCallback(l=>Ir(l,t,"item"),s);return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:a,getItemProps:i}),[n,a,i])}function bn(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const au=t=>({name:"inner",options:t,async fn(e){const{listRef:r,overflowRef:s,onFallbackChange:n,offset:a=0,index:i=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:u,...d}=kt(t,e),{rects:m,elements:{floating:x}}=e,p=r.current[i],g=u?.current||x,h=x.clientTop||g.clientTop,b=x.clientTop!==0,v=g.clientTop!==0,E=x===g;if(process.env.NODE_ENV!=="production"&&(e.placement.startsWith("bottom")||qc('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const y={...e,...await xs(-p.offsetTop-x.clientTop-m.reference.height/2-p.offsetHeight/2-a).fn(e)},k=await $r(bn(y,g.scrollHeight+h+x.clientTop),d),R=await $r(y,{...d,elementContext:"reference"}),O=at(0,k.top),S=y.y+O,j=(g.scrollHeight>g.clientHeight?T=>T:be)(at(0,g.scrollHeight+(b&&E||v?h*2:0)-O-at(0,k.bottom)));if(g.style.maxHeight=j+"px",g.scrollTop=O,n){const T=g.offsetHeight<p.offsetHeight*Ot(l,r.current.length)-1||R.top>=-c||R.bottom>=-c;ge.flushSync(()=>n(T))}return s&&(s.current=await $r(bn({...y,y:S},g.offsetHeight+h+x.clientTop),d)),{y:S}}});function iu(t,e){const{open:r,elements:s}=t,{enabled:n=!0,overflowRef:a,scrollRef:i,onChange:l}=e,c=Po(l),u=w.useRef(!1),d=w.useRef(null),m=w.useRef(null);w.useEffect(()=>{if(!n)return;function p(h){if(h.ctrlKey||!g||a.current==null)return;const b=h.deltaY,v=a.current.top>=-.5,E=a.current.bottom>=-.5,y=g.scrollHeight-g.clientHeight,k=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!v&&b>0||!E&&b<0?(h.preventDefault(),ge.flushSync(()=>{c(O=>O+Math[R](b,y*k))})):/firefox/i.test(Kl())&&(g.scrollTop+=b))}const g=i?.current||s.floating;if(r&&g)return g.addEventListener("wheel",p),requestAnimationFrame(()=>{d.current=g.scrollTop,a.current!=null&&(m.current={...a.current})}),()=>{d.current=null,m.current=null,g.removeEventListener("wheel",p)}},[n,r,s.floating,a,i,c]);const x=w.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=i?.current||s.floating;if(!(!a.current||!p||!u.current)){if(d.current!==null){const g=p.scrollTop-d.current;(a.current.bottom<-.5&&g<-1||a.current.top<-.5&&g>1)&&ge.flushSync(()=>c(h=>h+g))}requestAnimationFrame(()=>{d.current=p.scrollTop})}}}),[s.floating,c,a,i]);return w.useMemo(()=>n?{floating:x}:{},[n,x])}let ie=f.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ie.displayName="FloatingContext";let gs=f.createContext(null);gs.displayName="PlacementContext";function hs(t){return f.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function bs(){return f.useContext(ie).setReference}function $o(){return f.useContext(ie).getReferenceProps}function vs(){let{getFloatingProps:t,slot:e}=f.useContext(ie);return f.useCallback((...r)=>Object.assign({},t(...r),{"data-anchor":e.anchor}),[t,e])}function ys(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let e=f.useContext(gs),r=f.useMemo(()=>t,[JSON.stringify(t,(n,a)=>{var i;return(i=a?.outerHTML)!=null?i:a})]);o.n(()=>{e?.(r??null)},[e,r]);let s=f.useContext(ie);return f.useMemo(()=>[s.setFloating,t?s.styles:{}],[s.setFloating,t,s.styles])}let vn=4;function ws({children:t,enabled:e=!0}){let[r,s]=f.useState(null),[n,a]=f.useState(0),i=f.useRef(null),[l,c]=f.useState(null);lu(l);let u=e&&r!==null&&l!==null,{to:d="bottom",gap:m=0,offset:x=0,padding:p=0,inner:g}=cu(r,l),[h,b="center"]=d.split(" ");o.n(()=>{u&&a(0)},[u]);let{refs:v,floatingStyles:E,context:y}=nu({open:u,placement:h==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${h}`:`${h}-${b}`,strategy:"absolute",transform:!1,middleware:[xs({mainAxis:h==="selection"?0:m,crossAxis:x}),So({padding:p}),h!=="selection"&&Co({padding:p}),h==="selection"&&g?au({...g,padding:p,overflowRef:i,offset:n,minItemsVisible:vn,referenceOverflowThreshold:p,onFallbackChange(T){var M,L;if(!T)return;let $=y.elements.floating;if(!$)return;let A=parseFloat(getComputedStyle($).scrollPaddingBottom)||0,D=Math.min(vn,$.childElementCount),z=0,C=0;for(let P of(L=(M=y.elements.floating)==null?void 0:M.childNodes)!=null?L:[])if(nt(P)){let V=P.offsetTop,X=V+P.clientHeight+A,G=$.scrollTop,I=G+$.clientHeight;if(V>=G&&X<=I)D--;else{C=Math.max(0,Math.min(X,I)-Math.max(V,G)),z=P.clientHeight;break}}D>=1&&a(P=>{let V=z*D-C+A;return P>=V?P:V})}}):null,No({padding:p,apply({availableWidth:T,availableHeight:M,elements:L}){Object.assign(L.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${M}px)`})}})].filter(Boolean),whileElementsMounted:ko}),[k=h,R=b]=y.placement.split("-");h==="selection"&&(k="selection");let O=f.useMemo(()=>({anchor:[k,R].filter(Boolean).join(" ")}),[k,R]),S=iu(y,{overflowRef:i,onChange:a}),{getReferenceProps:F,getFloatingProps:B}=ou([S]),j=o.o(T=>{c(T),v.setFloating(T)});return w.createElement(gs.Provider,{value:s},w.createElement(ie.Provider,{value:{setFloating:j,setReference:v.setReference,styles:E,getReferenceProps:F,getFloatingProps:B,slot:O}},t))}function lu(t){o.n(()=>{if(!t)return;let e=new MutationObserver(()=>{let r=window.getComputedStyle(t).maxHeight,s=parseFloat(r);if(isNaN(s))return;let n=parseInt(r);isNaN(n)||s!==n&&(t.style.maxHeight=`${Math.ceil(s)}px`)});return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[t])}function cu(t,e){var r,s,n;let a=Ar((r=t?.gap)!=null?r:"var(--anchor-gap, 0)",e),i=Ar((s=t?.offset)!=null?s:"var(--anchor-offset, 0)",e),l=Ar((n=t?.padding)!=null?n:"var(--anchor-padding, 0)",e);return{...t,gap:a,offset:i,padding:l}}function Ar(t,e,r=void 0){let s=o.p(),n=o.o((c,u)=>{if(c==null)return[r,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!u)return[r,null];let d=yn(c,u);return[d,m=>{let x=To(c);{let p=x.map(g=>window.getComputedStyle(u).getPropertyValue(g));s.requestAnimationFrame(function g(){s.nextFrame(g);let h=!1;for(let[v,E]of x.entries()){let y=window.getComputedStyle(u).getPropertyValue(E);if(p[v]!==y){p[v]=y,h=!0;break}}if(!h)return;let b=yn(c,u);d!==b&&(m(b),d=b)})}return s.dispose}]}return[r,null]}),a=f.useMemo(()=>n(t,e)[0],[t,e]),[i=a,l]=f.useState();return o.n(()=>{let[c,u]=n(t,e);if(l(c),!!u)return u(l)},[t,e]),i}function To(t){let e=/var\((.*)\)/.exec(t);if(e){let r=e[1].indexOf(",");if(r===-1)return[e[1]];let s=e[1].slice(0,r).trim(),n=e[1].slice(r+1).trim();return n?[s,...To(n)]:[s]}return[]}function yn(t,e){let r=document.createElement("div");e.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",t,"important");let s=parseFloat(window.getComputedStyle(r).marginTop)||0;return e.removeChild(r),s}function uu({children:t,freeze:e},r){let s=Io(e,t);return f.isValidElement(s)?f.cloneElement(s,{ref:r}):f.createElement(f.Fragment,null,s)}f.forwardRef(uu);function Io(t,e){let[r,s]=f.useState(e);return!t&&r!==e&&s(e),t?r:e}let ur=f.createContext(null);ur.displayName="OpenClosedContext";var J=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(J||{});function Lt(){return f.useContext(ur)}function dr({value:t,children:e}){return f.createElement(ur.Provider,{value:t},e)}function Ao({children:t}){return f.createElement(ur.Provider,{value:null},t)}function du(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let $t=[];du(()=>{function t(e){if(!mt(e.target)||e.target===document.body||$t[0]===e.target)return;let r=e.target;r=r.closest(We),$t.unshift(r??e.target),$t=$t.filter(s=>s!=null&&s.isConnected),$t.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function fu(t){throw new Error("Unexpected object: "+t)}var U=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(U||{});function It(t,e){let r=e.resolveItems();if(r.length<=0)return null;let s=e.resolveActiveIndex(),n=s??-1;switch(t.focus){case 0:{for(let a=0;a<r.length;++a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 1:{n===-1&&(n=r.length);for(let a=n-1;a>=0;--a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 2:{for(let a=n+1;a<r.length;++a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 3:{for(let a=r.length-1;a>=0;--a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 4:{for(let a=0;a<r.length;++a)if(e.resolveId(r[a],a,r)===t.id)return a;return s}case 5:return null;default:fu(t)}}function Ie(t){let e=o.o(t),r=f.useRef(!1);f.useEffect(()=>(r.current=!1,()=>{r.current=!0,o.t(()=>{r.current&&e()})}),[e])}let Do=f.createContext(!1);function pu(){return f.useContext(Do)}function wn(t){return f.createElement(Do.Provider,{value:t.force},t.children)}function mu(t){let e=pu(),r=f.useContext(Mo),[s,n]=f.useState(()=>{var a;if(!e&&r!==null)return(a=r.current)!=null?a:null;if(o.s.isServer)return null;let i=t?.getElementById("headlessui-portal-root");if(i)return i;if(t===null)return null;let l=t.createElement("div");return l.setAttribute("id","headlessui-portal-root"),t.body.appendChild(l)});return f.useEffect(()=>{s!==null&&(t!=null&&t.body.contains(s)||t==null||t.body.appendChild(s))},[s,t]),f.useEffect(()=>{e||r!==null&&n(r.current)},[r,n,e]),s}let Fo=f.Fragment,xu=o.Y(function(t,e){let{ownerDocument:r=null,...s}=t,n=f.useRef(null),a=Z(Qn(x=>{n.current=x}),e),i=Nt(n.current),l=r??i,c=mu(l),u=f.useContext(Br),d=o.p(),m=o.K();return Ie(()=>{var x;c&&c.childNodes.length<=0&&((x=c.parentElement)==null||x.removeChild(c))}),c?xt.createPortal(f.createElement("div",{"data-headlessui-portal":"",ref:x=>{d.dispose(),u&&x&&d.add(u.register(x))}},m({ourProps:{ref:a},theirProps:s,slot:{},defaultTag:Fo,name:"Portal"})),c):null});function gu(t,e){let r=Z(e),{enabled:s=!0,ownerDocument:n,...a}=t,i=o.K();return s?f.createElement(xu,{...a,ownerDocument:n,ref:r}):i({ourProps:{ref:r},theirProps:a,slot:{},defaultTag:Fo,name:"Portal"})}let hu=f.Fragment,Mo=f.createContext(null);function bu(t,e){let{target:r,...s}=t,n={ref:Z(e)},a=o.K();return f.createElement(Mo.Provider,{value:r},a({ourProps:n,theirProps:s,defaultTag:hu,name:"Popover.Group"}))}let Br=f.createContext(null);function Lo(){let t=f.useContext(Br),e=f.useRef([]),r=o.o(a=>(e.current.push(a),t&&t.register(a),()=>s(a))),s=o.o(a=>{let i=e.current.indexOf(a);i!==-1&&e.current.splice(i,1),t&&t.unregister(a)}),n=f.useMemo(()=>({register:r,unregister:s,portals:e}),[r,s,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Br.Provider,{value:n},a)},[n])]}let vu=o.Y(gu),_o=o.Y(bu),fr=Object.assign(vu,{Group:_o});const Dt={Idle:{kind:"Idle"},Tracked:t=>({kind:"Tracked",position:t}),Moved:{kind:"Moved"}};function Es(t){let e=t.getBoundingClientRect();return`${e.x},${e.y}`}function Vo(t,e,r){let s=o.o$1();if(e.kind==="Tracked"){let n=function(){a!==Es(t)&&(s.dispose(),r())},{position:a}=e,i=new ResizeObserver(n);i.observe(t),s.add(()=>i.disconnect()),s.addEventListener(window,"scroll",n,{passive:!0}),s.addEventListener(window,"resize",n)}return()=>s.dispose()}function yu(t,e=typeof document<"u"?document.defaultView:null,r){let s=Se(t,"escape");is(e,"keydown",n=>{s&&(n.defaultPrevented||n.key===W.Escape&&r(n))})}function wu(){var t;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,s]=f.useState((t=e?.matches)!=null?t:!1);return o.n(()=>{if(!e)return;function n(a){s(a.matches)}return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[e]),r}function Bo({defaultContainers:t=[],portals:e,mainTreeNode:r}={}){let s=o.o(()=>{var n,a;let i=o.l(r),l=[];for(let c of t)c!==null&&(St(c)?l.push(c):"current"in c&&St(c.current)&&l.push(c.current));if(e!=null&&e.current)for(let c of e.current)l.push(c);for(let c of(n=i?.querySelectorAll("html > *, body > *"))!=null?n:[])c!==document.body&&c!==document.head&&St(c)&&c.id!=="headlessui-portal-root"&&(r&&(c.contains(r)||c.contains((a=r?.getRootNode())==null?void 0:a.host))||l.some(u=>c.contains(u))||l.push(c));return l});return{resolveContainers:s,contains:o.o(n=>s().some(a=>a.contains(n)))}}let Ho=f.createContext(null);function Ge({children:t,node:e}){let[r,s]=f.useState(null),n=ks(e??r);return f.createElement(Ho.Provider,{value:n},t,n===null&&f.createElement(Ct,{features:wt.Hidden,ref:a=>{var i,l;if(a){for(let c of(l=(i=o.l(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?l:[])if(c!==document.body&&c!==document.head&&St(c)&&c!=null&&c.contains(a)){s(c);break}}}}))}function ks(t=null){var e;return(e=f.useContext(Ho))!=null?e:t}function Eu(){let t=typeof document>"u";return"useSyncExternalStore"in w?(e=>e.useSyncExternalStore)(w)(()=>()=>{},()=>!1,()=>!t):!1}function pr(){let t=Eu(),[e,r]=w.useState(o.s.isHandoffComplete);return e&&o.s.isHandoffComplete===!1&&r(!1),w.useEffect(()=>{e!==!0&&r(!0)},[e]),w.useEffect(()=>o.s.handoff(),[]),t?!1:e}function Rs(){let t=f.useRef(!1);return o.n(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var dt=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(dt||{});function js(){let t=f.useRef(0);return lo(!0,"keydown",e=>{e.key==="Tab"&&(t.current=e.shiftKey?1:0)},!0),t}function zo(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let e=new Set;for(let r of t.current)St(r.current)&&e.add(r.current);return e}let ku="div";var Bt=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(Bt||{});function Ru(t,e){let r=f.useRef(null),s=Z(r,e),{initialFocus:n,initialFocusFallback:a,containers:i,features:l=15,...c}=t;pr()||(l=0);let u=Nt(r.current);Nu(l,{ownerDocument:u});let d=Ou(l,{ownerDocument:u,container:r,initialFocus:n,initialFocusFallback:a});Pu(l,{ownerDocument:u,container:r,containers:i,previousActiveElement:d});let m=js(),x=o.o(E=>{if(!nt(r.current))return;let y=r.current;(k=>k())(()=>{o.u(m.current,{[dt.Forwards]:()=>{ut(y,tt.First,{skipElements:[E.relatedTarget,a]})},[dt.Backwards]:()=>{ut(y,tt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=Se(!!(l&2),"focus-trap#tab-lock"),g=o.p(),h=f.useRef(!1),b={ref:s,onKeyDown(E){E.key=="Tab"&&(h.current=!0,g.requestAnimationFrame(()=>{h.current=!1}))},onBlur(E){if(!(l&4))return;let y=zo(i);nt(r.current)&&y.add(r.current);let k=E.relatedTarget;mt(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(Wo(y,k)||(h.current?ut(r.current,o.u(m.current,{[dt.Forwards]:()=>tt.Next,[dt.Backwards]:()=>tt.Previous})|tt.WrapAround,{relativeTo:E.target}):mt(E.target)&&vt(E.target)))}},v=o.K();return f.createElement(f.Fragment,null,p&&f.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:x,features:wt.Focusable}),v({ourProps:b,theirProps:c,defaultTag:ku,name:"FocusTrap"}),p&&f.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:x,features:wt.Focusable}))}let ju=o.Y(Ru),Su=Object.assign(ju,{features:Bt});function Cu(t=!0){let e=f.useRef($t.slice());return ls(([r],[s])=>{s===!0&&r===!1&&o.t(()=>{e.current.splice(0)}),s===!1&&r===!0&&(e.current=$t.slice())},[t,$t,e]),o.o(()=>{var r;return(r=e.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function Nu(t,{ownerDocument:e}){let r=!!(t&8),s=Cu(r);ls(()=>{r||o.d(e?.body)&&vt(s())},[r]),Ie(()=>{r&&vt(s())})}function Ou(t,{ownerDocument:e,container:r,initialFocus:s,initialFocusFallback:n}){let a=f.useRef(null),i=Se(!!(t&1),"focus-trap#initial-focus"),l=Rs();return ls(()=>{if(t===0)return;if(!i){n!=null&&n.current&&vt(n.current);return}let c=r.current;c&&o.t(()=>{if(!l.current)return;let u=e?.activeElement;if(s!=null&&s.current){if(s?.current===u){a.current=u;return}}else if(c.contains(u)){a.current=u;return}if(s!=null&&s.current)vt(s.current);else{if(t&16){if(ut(c,tt.First|tt.AutoFocus)!==Qt.Error)return}else if(ut(c,tt.First)!==Qt.Error)return;if(n!=null&&n.current&&(vt(n.current),e?.activeElement===n.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=e?.activeElement})},[n,i,t]),a}function Pu(t,{ownerDocument:e,container:r,containers:s,previousActiveElement:n}){let a=Rs(),i=!!(t&4);is(e?.defaultView,"focus",l=>{if(!i||!a.current)return;let c=zo(s);nt(r.current)&&c.add(r.current);let u=n.current;if(!u)return;let d=l.target;nt(d)?Wo(c,d)?(n.current=d,vt(d)):(l.preventDefault(),l.stopPropagation(),vt(u)):vt(n.current)},!0)}function Wo(t,e){for(let r of t)if(r.contains(e))return!0;return!1}function Yo(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||!o.b((e=t.as)!=null?e:Ko)||f.Children.count(t.children)===1}let mr=f.createContext(null);mr.displayName="TransitionContext";var $u=(t=>(t.Visible="visible",t.Hidden="hidden",t))($u||{});function Tu(){let t=f.useContext(mr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function Iu(){let t=f.useContext(xr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let xr=f.createContext(null);xr.displayName="NestingContext";function gr(t){return"children"in t?gr(t.children):t.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Uo(t,e){let r=o.s$1(t),s=f.useRef([]),n=Rs(),a=o.p(),i=o.o((p,g=o.C.Hidden)=>{let h=s.current.findIndex(({el:b})=>b===p);h!==-1&&(o.u(g,{[o.C.Unmount](){s.current.splice(h,1)},[o.C.Hidden](){s.current[h].state="hidden"}}),a.microTask(()=>{var b;!gr(s)&&n.current&&((b=r.current)==null||b.call(r))}))}),l=o.o(p=>{let g=s.current.find(({el:h})=>h===p);return g?g.state!=="visible"&&(g.state="visible"):s.current.push({el:p,state:"visible"}),()=>i(p,o.C.Unmount)}),c=f.useRef([]),u=f.useRef(Promise.resolve()),d=f.useRef({enter:[],leave:[]}),m=o.o((p,g,h)=>{c.current.splice(0),e&&(e.chains.current[g]=e.chains.current[g].filter(([b])=>b!==p)),e?.chains.current[g].push([p,new Promise(b=>{c.current.push(b)})]),e?.chains.current[g].push([p,new Promise(b=>{Promise.all(d.current[g].map(([v,E])=>E)).then(()=>b())})]),g==="enter"?u.current=u.current.then(()=>e?.wait.current).then(()=>h(g)):h(g)}),x=o.o((p,g,h)=>{Promise.all(d.current[g].splice(0).map(([b,v])=>v)).then(()=>{var b;(b=c.current.shift())==null||b()}).then(()=>h(g))});return f.useMemo(()=>({children:s,register:l,unregister:i,onStart:m,onStop:x,wait:u,chains:d}),[l,i,s,m,x,d,u])}let Ko=f.Fragment,Go=o.A.RenderStrategy;function Au(t,e){var r,s;let{transition:n=!0,beforeEnter:a,afterEnter:i,beforeLeave:l,afterLeave:c,enter:u,enterFrom:d,enterTo:m,entered:x,leave:p,leaveFrom:g,leaveTo:h,...b}=t,[v,E]=f.useState(null),y=f.useRef(null),k=Yo(t),R=Z(...k?[y,e,E]:e===null?[]:[e]),O=(r=b.unmount)==null||r?o.C.Unmount:o.C.Hidden,{show:S,appear:F,initial:B}=Tu(),[j,T]=f.useState(S?"visible":"hidden"),M=Iu(),{register:L,unregister:$}=M;o.n(()=>L(y),[L,y]),o.n(()=>{if(O===o.C.Hidden&&y.current){if(S&&j!=="visible"){T("visible");return}return o.u(j,{hidden:()=>$(y),visible:()=>L(y)})}},[j,y,L,$,S,O]);let A=pr();o.n(()=>{if(k&&A&&j==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,j,A,k]);let D=B&&!F,z=F&&S&&B,C=f.useRef(!1),P=Uo(()=>{C.current||(T("hidden"),$(y))},M),V=o.o(K=>{C.current=!0;let et=K?"enter":"leave";P.onStart(y,et,st=>{st==="enter"?a?.():st==="leave"&&l?.()})}),X=o.o(K=>{let et=K?"enter":"leave";C.current=!1,P.onStop(y,et,st=>{st==="enter"?i?.():st==="leave"&&c?.()}),et==="leave"&&!gr(P)&&(T("hidden"),$(y))});f.useEffect(()=>{k&&n||(V(S),X(S))},[S,k,n]);let G=!(!n||!k||!A||D),[,I]=$e(G,v,S,{start:V,end:X}),H=o.m({ref:R,className:((s=o.t$1(b.className,z&&u,z&&d,I.enter&&u,I.enter&&I.closed&&d,I.enter&&!I.closed&&m,I.leave&&p,I.leave&&!I.closed&&g,I.leave&&I.closed&&h,!I.transition&&S&&x))==null?void 0:s.trim())||void 0,...Pe(I)}),Y=0;j==="visible"&&(Y|=J.Open),j==="hidden"&&(Y|=J.Closed),S&&j==="hidden"&&(Y|=J.Opening),!S&&j==="visible"&&(Y|=J.Closing);let _=o.K();return f.createElement(xr.Provider,{value:P},f.createElement(dr,{value:Y},_({ourProps:H,theirProps:b,defaultTag:Ko,features:Go,visible:j==="visible",name:"Transition.Child"})))}function Du(t,e){let{show:r,appear:s=!1,unmount:n=!0,...a}=t,i=f.useRef(null),l=Yo(t),c=Z(...l?[i,e]:e===null?[]:[e]);pr();let u=Lt();if(r===void 0&&u!==null&&(r=(u&J.Open)===J.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,m]=f.useState(r?"visible":"hidden"),x=Uo(()=>{r||m("hidden")}),[p,g]=f.useState(!0),h=f.useRef([r]);o.n(()=>{p!==!1&&h.current[h.current.length-1]!==r&&(h.current.push(r),g(!1))},[h,r]);let b=f.useMemo(()=>({show:r,appear:s,initial:p}),[r,s,p]);o.n(()=>{r?m("visible"):!gr(x)&&i.current!==null&&m("hidden")},[r,x]);let v={unmount:n},E=o.o(()=>{var R;p&&g(!1),(R=t.beforeEnter)==null||R.call(t)}),y=o.o(()=>{var R;p&&g(!1),(R=t.beforeLeave)==null||R.call(t)}),k=o.K();return f.createElement(xr.Provider,{value:x},f.createElement(mr.Provider,{value:b},k({ourProps:{...v,as:f.Fragment,children:f.createElement(qo,{ref:c,...v,...a,beforeEnter:E,beforeLeave:y})},theirProps:{},defaultTag:f.Fragment,features:Go,visible:d==="visible",name:"Transition"})))}function Fu(t,e){let r=f.useContext(mr)!==null,s=Lt()!==null;return f.createElement(f.Fragment,null,!r&&s?f.createElement(Hr,{ref:e,...t}):f.createElement(qo,{ref:e,...t}))}let Hr=o.Y(Du),qo=o.Y(Au),ye=o.Y(Fu),Jt=Object.assign(Hr,{Child:ye,Root:Hr});var Mu=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Mu||{}),Lu=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Lu||{});let _u={0(t,e){return t.titleId===e.id?t:{...t,titleId:e.id}}},Ss=f.createContext(null);Ss.displayName="DialogContext";function hr(t){let e=f.useContext(Ss);if(e===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hr),r}return e}function Vu(t,e){return o.u(e.type,_u,t,e)}let En=o.Y(function(t,e){let r=f.useId(),{id:s=`headlessui-dialog-${r}`,open:n,onClose:a,initialFocus:i,role:l="dialog",autoFocus:c=!0,__demoMode:u=!1,unmount:d=!1,...m}=t,x=f.useRef(!1);l=(function(){return l==="dialog"||l==="alertdialog"?l:(x.current||(x.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let p=Lt();n===void 0&&p!==null&&(n=(p&J.Open)===J.Open);let g=f.useRef(null),h=Z(g,e),b=Nt(g.current),v=n?0:1,[E,y]=f.useReducer(Vu,{titleId:null,descriptionId:null,panelRef:f.createRef()}),k=o.o(()=>a(!1)),R=o.o(I=>y({type:0,id:I})),O=pr()?v===0:!1,[S,F]=Lo(),B={get current(){var I;return(I=E.panelRef.current)!=null?I:g.current}},j=ks(),{resolveContainers:T}=Bo({mainTreeNode:j,portals:S,defaultContainers:[B]}),M=p!==null?(p&J.Closing)===J.Closing:!1;os(u||M?!1:O,{allowed:o.o(()=>{var I,H;return[(H=(I=g.current)==null?void 0:I.closest("[data-headlessui-portal]"))!=null?H:null]}),disallowed:o.o(()=>{var I;return[(I=j?.closest("body > *:not(#headlessui-portal-root)"))!=null?I:null]})});let L=Yt.get(null);o.n(()=>{if(O)return L.actions.push(s),()=>L.actions.pop(s)},[L,s,O]);let $=q(L,f.useCallback(I=>L.selectors.isTop(I,s),[L,s]));sr($,T,I=>{I.preventDefault(),k()}),yu($,b?.defaultView,I=>{I.preventDefault(),I.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),or(u||M?!1:O,b,T),rr(O,g,k);let[A,D]=Je(),z=f.useMemo(()=>[{dialogState:v,close:k,setTitleId:R,unmount:d},E],[v,k,R,d,E]),C=o.n$1({open:v===0}),P={ref:h,id:s,role:l,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":A,unmount:d},V=!wu(),X=Bt.None;O&&!u&&(X|=Bt.RestoreFocus,X|=Bt.TabLock,c&&(X|=Bt.AutoFocus),V&&(X|=Bt.InitialFocus));let G=o.K();return f.createElement(Ao,null,f.createElement(wn,{force:!0},f.createElement(fr,null,f.createElement(Ss.Provider,{value:z},f.createElement(_o,{target:g},f.createElement(wn,{force:!1},f.createElement(D,{slot:C},f.createElement(F,null,f.createElement(Su,{initialFocus:i,initialFocusFallback:g,containers:T,features:X},f.createElement(rs,{value:k},G({ourProps:P,theirProps:m,slot:C,defaultTag:Bu,features:Hu,visible:v===0,name:"Dialog"})))))))))))}),Bu="div",Hu=o.A.RenderStrategy|o.A.Static;function zu(t,e){let{transition:r=!1,open:s,...n}=t,a=Lt(),i=t.hasOwnProperty("open")||a!==null,l=t.hasOwnProperty("onClose");if(!i&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(s!==void 0||r)&&!n.static?f.createElement(Ge,null,f.createElement(Jt,{show:s,transition:r,unmount:n.unmount},f.createElement(En,{ref:e,...n}))):f.createElement(Ge,null,f.createElement(En,{ref:e,open:s,...n}))}let Wu="div";function Yu(t,e){let r=f.useId(),{id:s=`headlessui-dialog-panel-${r}`,transition:n=!1,...a}=t,[{dialogState:i,unmount:l},c]=hr("Dialog.Panel"),u=Z(e,c.panelRef),d=o.n$1({open:i===0}),m=o.o(b=>{b.stopPropagation()}),x={ref:u,id:s,onClick:m},p=n?ye:f.Fragment,g=n?{unmount:l}:{},h=o.K();return f.createElement(p,{...g},h({ourProps:x,theirProps:a,slot:d,defaultTag:Wu,name:"Dialog.Panel"}))}let Uu="div";function Ku(t,e){let{transition:r=!1,...s}=t,[{dialogState:n,unmount:a}]=hr("Dialog.Backdrop"),i=o.n$1({open:n===0}),l={ref:e,"aria-hidden":!0},c=r?ye:f.Fragment,u=r?{unmount:a}:{},d=o.K();return f.createElement(c,{...u},d({ourProps:l,theirProps:s,slot:i,defaultTag:Uu,name:"Dialog.Backdrop"}))}let Gu="h2";function qu(t,e){let r=f.useId(),{id:s=`headlessui-dialog-title-${r}`,...n}=t,[{dialogState:a,setTitleId:i}]=hr("Dialog.Title"),l=Z(e);f.useEffect(()=>(i(s),()=>i(null)),[s,i]);let c=o.n$1({open:a===0}),u={ref:l,id:s};return o.K()({ourProps:u,theirProps:n,slot:c,defaultTag:Gu,name:"Dialog.Title"})}let Xu=o.Y(zu),Xo=o.Y(Yu),Qu=o.Y(Ku),Qo=o.Y(qu),Zu=Object.assign(Xu,{Panel:Xo,Title:Qo,Description:Re}),Ju="div";function td(t,e){let r=`headlessui-control-${f.useId()}`,[s,n]=je(),[a,i]=Je(),l=o.a(),{disabled:c=l||!1,...u}=t,d=o.n$1({disabled:c}),m={ref:e,disabled:c||void 0,"aria-disabled":c||void 0},x=o.K();return f.createElement(o.l$1,{value:c},f.createElement(n,{value:s},f.createElement(i,{value:a},f.createElement(_i,{id:r},x({ourProps:m,theirProps:{...u,children:f.createElement(Fi,null,typeof u.children=="function"?u.children(d):u.children)},slot:d,defaultTag:Ju,name:"Field"})))))}let br=o.Y(td),ed="input";function rd(t,e){let r=f.useId(),s=re(),n=o.a(),{id:a=s||`headlessui-input-${r}`,disabled:i=n||!1,autoFocus:l=!1,invalid:c=!1,...u}=t,d=se(),m=ke(),{isFocused:x,focusProps:p}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:l}),{isHovered:g,hoverProps:h}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),b=o.V({ref:e,id:a,"aria-labelledby":d,"aria-describedby":m,"aria-invalid":c?"true":void 0,disabled:i||void 0,autoFocus:l},p,h),v=o.n$1({disabled:i,invalid:c,hover:g,focus:x,autofocus:l});return o.K()({ourProps:b,theirProps:u,slot:v,defaultTag:ed,name:"Input"})}let sd=o.Y(rd),kn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Rn(t){var e,r;let s=(e=t.innerText)!=null?e:"",n=t.cloneNode(!0);if(!nt(n))return s;let a=!1;for(let l of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),a=!0;let i=a?(r=n.innerText)!=null?r:"":s;return kn.test(i)&&(i=i.replace(kn,"")),i}function nd(t){let e=t.getAttribute("aria-label");if(typeof e=="string")return e.trim();let r=t.getAttribute("aria-labelledby");if(r){let s=r.split(" ").map(n=>{let a=document.getElementById(n);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():Rn(a).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Rn(t).trim()}function Zo(t){let e=f.useRef(""),r=f.useRef("");return o.o(()=>{let s=t.current;if(!s)return"";let n=s.innerText;if(e.current===n)return r.current;let a=nd(s).trim().toLowerCase();return e.current=n,r.current=a,a})}var od=Object.defineProperty,ad=(t,e,r)=>e in t?od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jn=(t,e,r)=>(ad(t,typeof e!="symbol"?e+"":e,r),r),it=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(it||{}),At=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(At||{}),ze=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(ze||{}),Jo=(t=>(t[t.OpenListbox=0]="OpenListbox",t[t.CloseListbox=1]="CloseListbox",t[t.GoToOption=2]="GoToOption",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.SelectOption=5]="SelectOption",t[t.RegisterOptions=6]="RegisterOptions",t[t.UnregisterOptions=7]="UnregisterOptions",t[t.SetButtonElement=8]="SetButtonElement",t[t.SetOptionsElement=9]="SetOptionsElement",t[t.SortOptions=10]="SortOptions",t[t.MarkButtonAsMoved=11]="MarkButtonAsMoved",t))(Jo||{});function Sn(t,e=r=>r){let r=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,s=as(e(t.options.slice()),a=>a.dataRef.current.domRef.current),n=r?s.indexOf(r):null;return n===-1&&(n=null),{options:s,activeOptionIndex:n}}let id={1(t){if(t.dataRef.current.disabled||t.listboxState===1)return t;let e=t.buttonElement?Dt.Tracked(Es(t.buttonElement)):t.buttonPositionState;return{...t,activeOptionIndex:null,pendingFocus:{focus:U.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:e}},0(t,e){if(t.dataRef.current.disabled||t.listboxState===0)return t;let r=t.activeOptionIndex,{isSelected:s}=t.dataRef.current,n=t.options.findIndex(a=>s(a.dataRef.current.value));return n!==-1&&(r=n),{...t,frozenValue:!1,pendingFocus:e.focus,listboxState:0,activeOptionIndex:r,__demoMode:!1,buttonPositionState:Dt.Idle}},2(t,e){var r,s,n,a,i;if(t.dataRef.current.disabled||t.listboxState===1)return t;let l={...t,searchQuery:"",activationTrigger:(r=e.trigger)!=null?r:1,__demoMode:!1};if(e.focus===U.Nothing)return{...l,activeOptionIndex:null};if(e.focus===U.Specific)return{...l,activeOptionIndex:t.options.findIndex(d=>d.id===e.id)};if(e.focus===U.Previous){let d=t.activeOptionIndex;if(d!==null){let m=t.options[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.options[x].dataRef.current.domRef;if(((s=m.current)==null?void 0:s.previousElementSibling)===p.current||((n=p.current)==null?void 0:n.previousElementSibling)===null)return{...l,activeOptionIndex:x}}}}else if(e.focus===U.Next){let d=t.activeOptionIndex;if(d!==null){let m=t.options[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.options[x].dataRef.current.domRef;if(((a=m.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...l,activeOptionIndex:x}}}}let c=Sn(t),u=It(e,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...l,...c,activeOptionIndex:u}},3:(t,e)=>{if(t.dataRef.current.disabled||t.listboxState===1)return t;let r=t.searchQuery!==""?0:1,s=t.searchQuery+e.value.toLowerCase(),n=(t.activeOptionIndex!==null?t.options.slice(t.activeOptionIndex+r).concat(t.options.slice(0,t.activeOptionIndex+r)):t.options).find(i=>{var l;return!i.dataRef.current.disabled&&((l=i.dataRef.current.textValue)==null?void 0:l.startsWith(s))}),a=n?t.options.indexOf(n):-1;return a===-1||a===t.activeOptionIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeOptionIndex:a,activationTrigger:1}},4(t){return t.dataRef.current.disabled||t.listboxState===1||t.searchQuery===""?t:{...t,searchQuery:""}},5(t){return t.dataRef.current.mode===0?{...t,frozenValue:!0}:{...t}},6:(t,e)=>{let r=t.options.concat(e.options),s=t.activeOptionIndex;if(t.pendingFocus.focus!==U.Nothing&&(s=It(t.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled})),t.activeOptionIndex===null){let{isSelected:n}=t.dataRef.current;if(n){let a=r.findIndex(i=>n?.(i.dataRef.current.value));a!==-1&&(s=a)}}return{...t,options:r,activeOptionIndex:s,pendingFocus:{focus:U.Nothing},pendingShouldSort:!0}},7:(t,e)=>{let r=t.options,s=[],n=new Set(e.options);for(let[a,i]of r.entries())if(n.has(i.id)&&(s.push(a),n.delete(i.id),n.size===0))break;if(s.length>0){r=r.slice();for(let a of s.reverse())r.splice(a,1)}return{...t,options:r,activationTrigger:1}},8:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},9:(t,e)=>t.optionsElement===e.element?t:{...t,optionsElement:e.element},10:t=>t.pendingShouldSort?{...t,...Sn(t),pendingShouldSort:!1}:t,11(t){return t.buttonPositionState.kind!=="Tracked"?t:{...t,buttonPositionState:Dt.Moved}}},ld=class ta extends er{constructor(e){super(e),jn(this,"actions",{onChange:r=>{let{onChange:s,compare:n,mode:a,value:i}=this.state.dataRef.current;return o.u(a,{0:()=>s?.(r),1:()=>{let l=i.slice(),c=l.findIndex(u=>n(u,r));return c===-1?l.push(r):l.splice(c,1),s?.(l)}})},registerOption:pe(()=>{let r=[],s=new Set;return[(n,a)=>{s.has(a)||(s.add(a),r.push({id:n,dataRef:a}))},()=>(s.clear(),this.send({type:6,options:r.splice(0)}))]}),unregisterOption:pe(()=>{let r=[];return[s=>r.push(s),()=>{this.send({type:7,options:r.splice(0)})}]}),goToOption:pe(()=>{let r=null;return[(s,n)=>{r={type:2,...s,trigger:n}},()=>r&&this.send(r)]}),closeListbox:()=>{this.send({type:1})},openListbox:r=>{this.send({type:0,focus:r})},selectActiveOption:()=>{var r;if(this.state.activeOptionIndex!==null){let{dataRef:s}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(s.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(r=this.state.buttonElement)==null||r.focus({preventScroll:!0}))},selectOption:r=>{this.send({type:5,value:r})},search:r=>{this.send({type:3,value:r})},clearSearch:()=>{this.send({type:4})},setButtonElement:r=>{this.send({type:8,element:r})},setOptionsElement:r=>{this.send({type:9,element:r})}}),jn(this,"selectors",{activeDescendantId(r){var s;let n=r.activeOptionIndex,a=r.options;return n===null||(s=a[n])==null?void 0:s.id},isActive(r,s){var n;let a=r.activeOptionIndex,i=r.options;return a!==null?((n=i[a])==null?void 0:n.id)===s:!1},hasFrozenValue(r){return r.frozenValue},shouldScrollIntoView(r,s){return r.__demoMode||r.listboxState!==0||r.activationTrigger===0?!1:this.isActive(r,s)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let r=this.state.id,s=Yt.get(null);this.disposables.add(s.on(ns.Push,n=>{!s.selectors.isTop(n,r)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}this.disposables.group(r=>{this.on(1,s=>{s.buttonElement&&(r.dispose(),r.add(Vo(s.buttonElement,s.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(r,s)=>{var n;this.actions.onChange(s.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:r=!1}){return new ta({id:e,dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:U.Nothing},frozenValue:!1,__demoMode:r,buttonPositionState:Dt.Idle})}reduce(e,r){return o.u(r.type,id,e,r)}};const ea=f.createContext(null);function Cs(t){let e=f.useContext(ea);if(e===null){let r=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ra),r}return e}function ra({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>ld.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let vr=f.createContext(null);vr.displayName="ListboxDataContext";function Ae(t){let e=f.useContext(vr);if(e===null){let r=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ae),r}return e}let cd=f.Fragment;function ud(t,e){let r=f.useId(),s=o.a(),{value:n,defaultValue:a,form:i,name:l,onChange:c,by:u,invalid:d=!1,disabled:m=s||!1,horizontal:x=!1,multiple:p=!1,__demoMode:g=!1,...h}=t;const b=x?"horizontal":"vertical";let v=Z(e),E=Zr(a),[y=p?[]:void 0,k]=Qr(n,c,E),R=ra({id:r,__demoMode:g}),O=f.useRef({static:!1,hold:!1}),S=f.useRef(new Map),F=rl(u),B=f.useCallback(G=>o.u(j.mode,{[At.Multi]:()=>y.some(I=>F(I,G)),[At.Single]:()=>F(y,G)}),[y]),j=o.n$1({value:y,disabled:m,invalid:d,mode:p?At.Multi:At.Single,orientation:b,onChange:k,compare:F,isSelected:B,optionsPropsRef:O,listRef:S});o.n(()=>{R.state.dataRef.current=j},[j]);let T=q(R,G=>G.listboxState),M=Yt.get(null),L=q(M,f.useCallback(G=>M.selectors.isTop(G,r),[M,r])),[$,A]=q(R,G=>[G.buttonElement,G.optionsElement]);sr(L,[$,A],(G,I)=>{R.send({type:Jo.CloseListbox}),Oe(I,Ne.Loose)||(G.preventDefault(),$?.focus())});let D=o.n$1({open:T===it.Open,disabled:m,invalid:d,value:y}),[z,C]=je({inherit:!0}),P={ref:v},V=f.useCallback(()=>{if(E!==void 0)return k?.(E)},[k,E]),X=o.K();return f.createElement(C,{value:z,props:{htmlFor:$?.id},slot:{open:T===it.Open,disabled:m}},f.createElement(ws,null,f.createElement(ea.Provider,{value:R},f.createElement(vr.Provider,{value:j},f.createElement(dr,{value:o.u(T,{[it.Open]:J.Open,[it.Closed]:J.Closed})},l!=null&&y!=null&&f.createElement(ts,{disabled:m,data:{[l]:y},form:i,onReset:V}),X({ourProps:P,theirProps:h,slot:D,defaultTag:cd,name:"Listbox"}))))))}let dd="button";function fd(t,e){let r=f.useId(),s=re(),n=Ae("Listbox.Button"),a=Cs("Listbox.Button"),{id:i=s||`headlessui-listbox-button-${r}`,disabled:l=n.disabled||!1,autoFocus:c=!1,...u}=t,d=Z(e,bs(),a.actions.setButtonElement),m=$o(),[x,p,g]=q(a,A=>[A.listboxState,A.buttonElement,A.optionsElement]),h=x===it.Open;co(h,{trigger:p,action:f.useCallback(A=>{if(p!=null&&p.contains(A.target))return Tt.Ignore;let D=A.target.closest('[role="option"]:not([data-disabled])');return nt(D)?Tt.Select(D):g!=null&&g.contains(A.target)?Tt.Ignore:Tt.Close},[p,g]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let b=o.o(A=>{switch(A.key){case W.Enter:Jr(A.currentTarget);break;case W.Space:case W.ArrowDown:A.preventDefault(),a.actions.openListbox({focus:n.value?U.Nothing:U.First});break;case W.ArrowUp:A.preventDefault(),a.actions.openListbox({focus:n.value?U.Nothing:U.Last});break}}),v=o.o(A=>{A.key===W.Space&&A.preventDefault()}),E=to(A=>{var D;a.state.listboxState===it.Open?(xt.flushSync(()=>a.actions.closeListbox()),(D=a.state.buttonElement)==null||D.focus({preventScroll:!0})):(A.preventDefault(),a.actions.openListbox({focus:U.Nothing}))}),y=o.o(A=>A.preventDefault()),k=se([i]),R=ke(),{isFocusVisible:O,focusProps:S}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:c}),{isHovered:F,hoverProps:B}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:l}),{pressed:j,pressProps:T}=o.w({disabled:l}),M=o.n$1({open:x===it.Open,active:j||x===it.Open,disabled:l,invalid:n.invalid,value:n.value,hover:F,focus:O,autofocus:c}),L=q(a,A=>A.listboxState===it.Open),$=o.V(m(),{ref:d,id:i,type:nr(t,p),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":L,"aria-labelledby":k,"aria-describedby":R,disabled:l||void 0,autoFocus:c,onKeyDown:b,onKeyUp:v,onKeyPress:y},E,S,B,T);return o.K()({ourProps:$,theirProps:u,slot:M,defaultTag:dd,name:"Listbox.Button"})}let sa=f.createContext(!1),pd="div",md=o.A.RenderStrategy|o.A.Static;function xd(t,e){let r=f.useId(),{id:s=`headlessui-listbox-options-${r}`,anchor:n,portal:a=!1,modal:i=!0,transition:l=!1,...c}=t,u=hs(n),[d,m]=f.useState(null);u&&(a=!0);let x=Ae("Listbox.Options"),p=Cs("Listbox.Options"),[g,h,b,v]=q(p,_=>[_.listboxState,_.buttonElement,_.optionsElement,_.__demoMode]),E=Nt(h),y=Nt(b),k=Lt(),[R,O]=$e(l,d,k!==null?(k&J.Open)===J.Open:g===it.Open);rr(R,h,p.actions.closeListbox);let S=v?!1:i&&g===it.Open;or(S,y);let F=v?!1:i&&g===it.Open;os(F,{allowed:f.useCallback(()=>[h,b],[h,b])});let B=q(p,p.selectors.didButtonMove)?!1:R,j=q(p,p.selectors.hasFrozenValue)&&!t.static,T=Io(j,x.value),M=f.useCallback(_=>x.compare(T,_),[x.compare,T]),L=q(p,_=>{var K;if(u==null||!((K=u?.to)!=null&&K.includes("selection")))return null;let et=_.options.findIndex(st=>M(st.dataRef.current.value));return et===-1&&(et=0),et}),$=(()=>{if(u==null)return;if(L===null)return{...u,inner:void 0};let _=Array.from(x.listRef.current.values());return{...u,inner:{listRef:{current:_},index:L}}})(),[A,D]=ys($),z=vs(),C=Z(e,u?A:null,p.actions.setOptionsElement,m),P=o.p();f.useEffect(()=>{let _=b;_&&g===it.Open&&(o.d(_)||_==null||_.focus({preventScroll:!0}))},[g,b]);let V=o.o(_=>{var K;switch(P.dispose(),_.key){case W.Space:if(p.state.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),p.actions.search(_.key);case W.Enter:_.preventDefault(),_.stopPropagation(),p.actions.selectActiveOption();break;case o.u(x.orientation,{vertical:W.ArrowDown,horizontal:W.ArrowRight}):return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Next});case o.u(x.orientation,{vertical:W.ArrowUp,horizontal:W.ArrowLeft}):return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Previous});case W.Home:case W.PageUp:return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.First});case W.End:case W.PageDown:return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Last});case W.Escape:_.preventDefault(),_.stopPropagation(),xt.flushSync(()=>p.actions.closeListbox()),(K=p.state.buttonElement)==null||K.focus({preventScroll:!0});return;case W.Tab:_.preventDefault(),_.stopPropagation(),xt.flushSync(()=>p.actions.closeListbox()),ao(p.state.buttonElement,_.shiftKey?tt.Previous:tt.Next);break;default:_.key.length===1&&(p.actions.search(_.key),P.setTimeout(()=>p.actions.clearSearch(),350));break}}),X=q(p,_=>{var K;return(K=_.buttonElement)==null?void 0:K.id}),G=o.n$1({open:g===it.Open}),I=o.V(u?z():{},{id:s,ref:C,"aria-activedescendant":q(p,p.selectors.activeDescendantId),"aria-multiselectable":x.mode===At.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":x.orientation,onKeyDown:V,role:"listbox",tabIndex:g===it.Open?0:void 0,style:{...c.style,...D,"--button-width":ss(R,h,!0).width},...Pe(O)}),H=o.K(),Y=f.useMemo(()=>x.mode===At.Multi?x:{...x,isSelected:M},[x,M]);return f.createElement(fr,{enabled:a?t.static||R:!1,ownerDocument:E},f.createElement(vr.Provider,{value:Y},H({ourProps:I,theirProps:c,slot:G,defaultTag:pd,features:md,visible:B,name:"Listbox.Options"})))}let gd="div";function hd(t,e){let r=f.useId(),{id:s=`headlessui-listbox-option-${r}`,disabled:n=!1,value:a,...i}=t,l=f.useContext(sa)===!0,c=Ae("Listbox.Option"),u=Cs("Listbox.Option"),d=q(u,j=>u.selectors.isActive(j,s)),m=c.isSelected(a),x=f.useRef(null),p=Zo(x),g=o.s$1({disabled:n,value:a,domRef:x,get textValue(){return p()}}),h=Z(e,x,j=>{j?c.listRef.current.set(s,j):c.listRef.current.delete(s)}),b=q(u,j=>u.selectors.shouldScrollIntoView(j,s));o.n(()=>{if(b)return o.o$1().requestAnimationFrame(()=>{var j,T;(T=(j=x.current)==null?void 0:j.scrollIntoView)==null||T.call(j,{block:"nearest"})})},[b,x]),o.n(()=>{if(!l)return u.actions.registerOption(s,g),()=>u.actions.unregisterOption(s)},[g,s,l]);let v=o.o(j=>{if(n)return j.preventDefault();u.actions.selectOption(a)}),E=o.o(()=>{if(n)return u.actions.goToOption({focus:U.Nothing});u.actions.goToOption({focus:U.Specific,id:s})}),y=uo(),k=o.o(j=>y.update(j)),R=o.o(j=>{y.wasMoved(j)&&(n||d&&u.state.activationTrigger===ze.Pointer||u.actions.goToOption({focus:U.Specific,id:s},ze.Pointer))}),O=o.o(j=>{y.wasMoved(j)&&(n||d&&u.state.activationTrigger===ze.Pointer&&u.actions.goToOption({focus:U.Nothing}))}),S=o.n$1({active:d,focus:d,selected:m,disabled:n,selectedOption:m&&l}),F=l?{}:{id:s,ref:h,role:"option",tabIndex:n===!0?void 0:-1,"aria-disabled":n===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:v,onFocus:E,onPointerEnter:k,onMouseEnter:k,onPointerMove:R,onMouseMove:R,onPointerLeave:O,onMouseLeave:O},B=o.K();return!m&&l?null:B({ourProps:F,theirProps:i,slot:S,defaultTag:gd,name:"Listbox.Option"})}let bd=f.Fragment;function vd(t,e){let{options:r,placeholder:s,...n}=t,a={ref:Z(e)},i=Ae("ListboxSelectedOption"),l=o.n$1({}),c=i.value===void 0||i.value===null||i.mode===At.Multi&&Array.isArray(i.value)&&i.value.length===0,u=o.K();return f.createElement(sa.Provider,{value:!0},u({ourProps:a,theirProps:{...n,children:f.createElement(f.Fragment,null,s&&c?s:r)},slot:l,defaultTag:bd,name:"ListboxSelectedOption"}))}let yd=o.Y(ud),na=o.Y(fd),wd=ne,oa=o.Y(xd),aa=o.Y(hd),Ed=o.Y(vd),kd=Object.assign(yd,{Button:na,Label:wd,Options:oa,Option:aa,SelectedOption:Ed});var Rd=Object.defineProperty,jd=(t,e,r)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cn=(t,e,r)=>(jd(t,typeof e!="symbol"?e+"":e,r),r),ot=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(ot||{}),qe=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(qe||{}),Q=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItems=5]="RegisterItems",t[t.UnregisterItems=6]="UnregisterItems",t[t.SetButtonElement=7]="SetButtonElement",t[t.SetItemsElement=8]="SetItemsElement",t[t.SortItems=9]="SortItems",t[t.MarkButtonAsMoved=10]="MarkButtonAsMoved",t))(Q||{});function Nn(t,e=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,s=as(e(t.items.slice()),a=>a.dataRef.current.domRef.current),n=r?s.indexOf(r):null;return n===-1&&(n=null),{items:s,activeItemIndex:n}}let Sd={1(t){if(t.menuState===1)return t;let e=t.buttonElement?Dt.Tracked(Es(t.buttonElement)):t.buttonPositionState;return{...t,activeItemIndex:null,pendingFocus:{focus:U.Nothing},menuState:1,buttonPositionState:e}},0(t,e){return t.menuState===0?t:{...t,__demoMode:!1,pendingFocus:e.focus,menuState:0,buttonPositionState:Dt.Idle}},2:(t,e)=>{var r,s,n,a,i;if(t.menuState===1)return t;let l={...t,searchQuery:"",activationTrigger:(r=e.trigger)!=null?r:1,__demoMode:!1};if(e.focus===U.Nothing)return{...l,activeItemIndex:null};if(e.focus===U.Specific)return{...l,activeItemIndex:t.items.findIndex(d=>d.id===e.id)};if(e.focus===U.Previous){let d=t.activeItemIndex;if(d!==null){let m=t.items[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.items[x].dataRef.current.domRef;if(((s=m.current)==null?void 0:s.previousElementSibling)===p.current||((n=p.current)==null?void 0:n.previousElementSibling)===null)return{...l,activeItemIndex:x}}}}else if(e.focus===U.Next){let d=t.activeItemIndex;if(d!==null){let m=t.items[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.items[x].dataRef.current.domRef;if(((a=m.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...l,activeItemIndex:x}}}}let c=Nn(t),u=It(e,{resolveItems:()=>c.items,resolveActiveIndex:()=>c.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...l,...c,activeItemIndex:u}},3:(t,e)=>{let r=t.searchQuery!==""?0:1,s=t.searchQuery+e.value.toLowerCase(),n=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+r).concat(t.items.slice(0,t.activeItemIndex+r)):t.items).find(i=>{var l;return((l=i.dataRef.current.textValue)==null?void 0:l.startsWith(s))&&!i.dataRef.current.disabled}),a=n?t.items.indexOf(n):-1;return a===-1||a===t.activeItemIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeItemIndex:a,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,e)=>{let r=t.items.concat(e.items.map(n=>n)),s=t.activeItemIndex;return t.pendingFocus.focus!==U.Nothing&&(s=It(t.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>t.activeItemIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled})),{...t,items:r,activeItemIndex:s,pendingFocus:{focus:U.Nothing},pendingShouldSort:!0}},6:(t,e)=>{let r=t.items,s=[],n=new Set(e.items);for(let[a,i]of r.entries())if(n.has(i.id)&&(s.push(a),n.delete(i.id),n.size===0))break;if(s.length>0){r=r.slice();for(let a of s.reverse())r.splice(a,1)}return{...t,items:r,activationTrigger:1}},7:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},8:(t,e)=>t.itemsElement===e.element?t:{...t,itemsElement:e.element},9:t=>t.pendingShouldSort?{...t,...Nn(t),pendingShouldSort:!1}:t,10(t){return t.buttonPositionState.kind!=="Tracked"?t:{...t,buttonPositionState:Dt.Moved}}},Cd=class ia extends er{constructor(e){super(e),Cn(this,"actions",{registerItem:pe(()=>{let r=[],s=new Set;return[(n,a)=>{s.has(a)||(s.add(a),r.push({id:n,dataRef:a}))},()=>(s.clear(),this.send({type:5,items:r.splice(0)}))]}),unregisterItem:pe(()=>{let r=[];return[s=>r.push(s),()=>this.send({type:6,items:r.splice(0)})]})}),Cn(this,"selectors",{activeDescendantId(r){var s;let n=r.activeItemIndex,a=r.items;return n===null||(s=a[n])==null?void 0:s.id},isActive(r,s){var n;let a=r.activeItemIndex,i=r.items;return a!==null?((n=i[a])==null?void 0:n.id)===s:!1},shouldScrollIntoView(r,s){return r.__demoMode||r.menuState!==0||r.activationTrigger===0?!1:this.isActive(r,s)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let r=this.state.id,s=Yt.get(null);this.disposables.add(s.on(ns.Push,n=>{!s.selectors.isTop(n,r)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}this.disposables.group(r=>{this.on(1,s=>{s.buttonElement&&(r.dispose(),r.add(Vo(s.buttonElement,s.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:e,__demoMode:r=!1}){return new ia({id:e,__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:U.Nothing},buttonPositionState:Dt.Idle})}reduce(e,r){return o.u(r.type,Sd,e,r)}};const la=f.createContext(null);function Ns(t){let e=f.useContext(la);if(e===null){let r=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ca),r}return e}function ca({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>Cd.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let Nd=f.Fragment;function Od(t,e){let r=f.useId(),{__demoMode:s=!1,...n}=t,a=ca({id:r,__demoMode:s}),[i,l,c]=q(a,b=>[b.menuState,b.itemsElement,b.buttonElement]),u=Z(e),d=Yt.get(null),m=q(d,f.useCallback(b=>d.selectors.isTop(b,r),[d,r]));sr(m,[c,l],(b,v)=>{var E;a.send({type:Q.CloseMenu}),Oe(v,Ne.Loose)||(b.preventDefault(),(E=a.state.buttonElement)==null||E.focus())});let x=o.o(()=>{a.send({type:Q.CloseMenu})}),p=o.n$1({open:i===ot.Open,close:x}),g={ref:u},h=o.K();return f.createElement(ws,null,f.createElement(la.Provider,{value:a},f.createElement(dr,{value:o.u(i,{[ot.Open]:J.Open,[ot.Closed]:J.Closed})},h({ourProps:g,theirProps:n,slot:p,defaultTag:Nd,name:"Menu"}))))}let Pd="button";function $d(t,e){let r=Ns("Menu.Button"),s=f.useId(),{id:n=`headlessui-menu-button-${s}`,disabled:a=!1,autoFocus:i=!1,...l}=t,c=f.useRef(null),u=$o(),d=Z(e,c,bs(),o.o(j=>r.send({type:Q.SetButtonElement,element:j}))),m=o.o(j=>{switch(j.key){case W.Space:case W.Enter:case W.ArrowDown:j.preventDefault(),j.stopPropagation(),r.send({type:Q.OpenMenu,focus:{focus:U.First}});break;case W.ArrowUp:j.preventDefault(),j.stopPropagation(),r.send({type:Q.OpenMenu,focus:{focus:U.Last}});break}}),x=o.o(j=>{j.key===W.Space&&j.preventDefault()}),[p,g,h]=q(r,j=>[j.menuState,j.buttonElement,j.itemsElement]),b=p===ot.Open;co(b,{trigger:g,action:f.useCallback(j=>{if(g!=null&&g.contains(j.target))return Tt.Ignore;let T=j.target.closest('[role="menuitem"]:not([data-disabled])');return nt(T)?Tt.Select(T):h!=null&&h.contains(j.target)?Tt.Ignore:Tt.Close},[g,h]),close:f.useCallback(()=>r.send({type:Q.CloseMenu}),[]),select:f.useCallback(j=>j.click(),[])});let v=to(j=>{var T;a||(p===ot.Open?(xt.flushSync(()=>r.send({type:Q.CloseMenu})),(T=c.current)==null||T.focus({preventScroll:!0})):(j.preventDefault(),r.send({type:Q.OpenMenu,focus:{focus:U.Nothing},trigger:qe.Pointer})))}),{isFocusVisible:E,focusProps:y}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:i}),{isHovered:k,hoverProps:R}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:a}),{pressed:O,pressProps:S}=o.w({disabled:a}),F=o.n$1({open:p===ot.Open,active:O||p===ot.Open,disabled:a,hover:k,focus:E,autofocus:i}),B=o.V(u(),{ref:d,id:n,type:nr(t,c.current),"aria-haspopup":"menu","aria-controls":h?.id,"aria-expanded":p===ot.Open,disabled:a||void 0,autoFocus:i,onKeyDown:m,onKeyUp:x},v,y,R,S);return o.K()({ourProps:B,theirProps:l,slot:F,defaultTag:Pd,name:"Menu.Button"})}let Td="div",Id=o.A.RenderStrategy|o.A.Static;function Ad(t,e){let r=f.useId(),{id:s=`headlessui-menu-items-${r}`,anchor:n,portal:a=!1,modal:i=!0,transition:l=!1,...c}=t,u=hs(n),d=Ns("Menu.Items"),[m,x]=ys(u),p=vs(),[g,h]=f.useState(null),b=Z(e,u?m:null,o.o(C=>d.send({type:Q.SetItemsElement,element:C})),h),[v,E]=q(d,C=>[C.menuState,C.buttonElement]),y=Nt(E),k=Nt(g);u&&(a=!0);let R=Lt(),[O,S]=$e(l,g,R!==null?(R&J.Open)===J.Open:v===ot.Open);rr(O,E,()=>{d.send({type:Q.CloseMenu})});let F=q(d,C=>C.__demoMode),B=F?!1:i&&v===ot.Open;or(B,k);let j=F?!1:i&&v===ot.Open;os(j,{allowed:f.useCallback(()=>[E,g],[E,g])});let T=q(d,d.selectors.didButtonMove)?!1:O;f.useEffect(()=>{let C=g;C&&v===ot.Open&&(o.d(C)||C.focus({preventScroll:!0}))},[v,g]),Ml(v===ot.Open,{container:g,accept(C){return C.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let M=o.p(),L=o.o(C=>{var P,V,X;switch(M.dispose(),C.key){case W.Space:if(d.state.searchQuery!=="")return C.preventDefault(),C.stopPropagation(),d.send({type:Q.Search,value:C.key});case W.Enter:if(C.preventDefault(),C.stopPropagation(),d.state.activeItemIndex!==null){let{dataRef:G}=d.state.items[d.state.activeItemIndex];(V=(P=G.current)==null?void 0:P.domRef.current)==null||V.click()}d.send({type:Q.CloseMenu}),oo(d.state.buttonElement);break;case W.ArrowDown:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Next});case W.ArrowUp:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Previous});case W.Home:case W.PageUp:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.First});case W.End:case W.PageDown:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Last});case W.Escape:C.preventDefault(),C.stopPropagation(),xt.flushSync(()=>d.send({type:Q.CloseMenu})),(X=d.state.buttonElement)==null||X.focus({preventScroll:!0});break;case W.Tab:C.preventDefault(),C.stopPropagation(),xt.flushSync(()=>d.send({type:Q.CloseMenu})),ao(d.state.buttonElement,C.shiftKey?tt.Previous:tt.Next);break;default:C.key.length===1&&(d.send({type:Q.Search,value:C.key}),M.setTimeout(()=>d.send({type:Q.ClearSearch}),350));break}}),$=o.o(C=>{C.key===W.Space&&C.preventDefault()}),A=o.n$1({open:v===ot.Open}),D=o.V(u?p():{},{"aria-activedescendant":q(d,d.selectors.activeDescendantId),"aria-labelledby":q(d,C=>{var P;return(P=C.buttonElement)==null?void 0:P.id}),id:s,onKeyDown:L,onKeyUp:$,role:"menu",tabIndex:v===ot.Open?0:void 0,ref:b,style:{...c.style,...x,"--button-width":ss(O,E,!0).width},...Pe(S)}),z=o.K();return f.createElement(fr,{enabled:a?t.static||O:!1,ownerDocument:y},z({ourProps:D,theirProps:c,slot:A,defaultTag:Td,features:Id,visible:T,name:"Menu.Items"}))}let Dd=f.Fragment;function Fd(t,e){let r=f.useId(),{id:s=`headlessui-menu-item-${r}`,disabled:n=!1,...a}=t,i=Ns("Menu.Item"),l=q(i,T=>i.selectors.isActive(T,s)),c=f.useRef(null),u=Z(e,c),d=q(i,T=>i.selectors.shouldScrollIntoView(T,s));o.n(()=>{if(d)return o.o$1().requestAnimationFrame(()=>{var T,M;(M=(T=c.current)==null?void 0:T.scrollIntoView)==null||M.call(T,{block:"nearest"})})},[d,c]);let m=Zo(c),x=f.useRef({disabled:n,domRef:c,get textValue(){return m()}});o.n(()=>{x.current.disabled=n},[x,n]),o.n(()=>(i.actions.registerItem(s,x),()=>i.actions.unregisterItem(s)),[x,s]);let p=o.o(()=>{i.send({type:Q.CloseMenu})}),g=o.o(T=>{if(n)return T.preventDefault();i.send({type:Q.CloseMenu}),oo(i.state.buttonElement)}),h=o.o(()=>{if(n)return i.send({type:Q.GoToItem,focus:U.Nothing});i.send({type:Q.GoToItem,focus:U.Specific,id:s})}),b=uo(),v=o.o(T=>b.update(T)),E=o.o(T=>{b.wasMoved(T)&&(n||l||i.send({type:Q.GoToItem,focus:U.Specific,id:s,trigger:qe.Pointer}))}),y=o.o(T=>{b.wasMoved(T)&&(n||l&&i.state.activationTrigger===qe.Pointer&&i.send({type:Q.GoToItem,focus:U.Nothing}))}),[k,R]=je(),[O,S]=Je(),F=o.n$1({active:l,focus:l,disabled:n,close:p}),B={id:s,ref:u,role:"menuitem",tabIndex:n===!0?void 0:-1,"aria-disabled":n===!0?!0:void 0,"aria-labelledby":k,"aria-describedby":O,disabled:void 0,onClick:g,onFocus:h,onPointerEnter:v,onMouseEnter:v,onPointerMove:E,onMouseMove:E,onPointerLeave:y,onMouseLeave:y},j=o.K();return f.createElement(R,null,f.createElement(S,null,j({ourProps:B,theirProps:a,slot:F,defaultTag:Dd,name:"Menu.Item"})))}let Md="div";function Ld(t,e){let[r,s]=je(),n=t,a={ref:e,"aria-labelledby":r,role:"group"},i=o.K();return f.createElement(s,null,i({ourProps:a,theirProps:n,slot:{},defaultTag:Md,name:"Menu.Section"}))}let _d="header";function Vd(t,e){let r=f.useId(),{id:s=`headlessui-menu-heading-${r}`,...n}=t,a=es();o.n(()=>a.register(s),[s,a.register]);let i={id:s,ref:e,role:"presentation",...a.props};return o.K()({ourProps:i,theirProps:n,slot:{},defaultTag:_d,name:"Menu.Heading"})}let Bd="div";function Hd(t,e){let r=t,s={ref:e,role:"separator"};return o.K()({ourProps:s,theirProps:r,slot:{},defaultTag:Bd,name:"Menu.Separator"})}let zd=o.Y(Od),ua=o.Y($d),da=o.Y(Ad),fe=o.Y(Fd),Wd=o.Y(Ld),Yd=o.Y(Vd),Ud=o.Y(Hd),Kd=Object.assign(zd,{Button:ua,Items:da,Item:fe,Section:Wd,Heading:Yd,Separator:Ud});var Gd=Object.defineProperty,qd=(t,e,r)=>e in t?Gd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,On=(t,e,r)=>(qd(t,typeof e!="symbol"?e+"":e,r),r),rt=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(rt||{}),Xd=(t=>(t[t.OpenPopover=0]="OpenPopover",t[t.ClosePopover=1]="ClosePopover",t[t.SetButton=2]="SetButton",t[t.SetButtonId=3]="SetButtonId",t[t.SetPanel=4]="SetPanel",t[t.SetPanelId=5]="SetPanelId",t))(Xd||{});let Qd={0:t=>t.popoverState===0?t:{...t,popoverState:0,__demoMode:!1},1(t){return t.popoverState===1?t:{...t,popoverState:1,__demoMode:!1}},2(t,e){return t.button===e.button?t:{...t,button:e.button}},3(t,e){return t.buttonId===e.buttonId?t:{...t,buttonId:e.buttonId}},4(t,e){return t.panel===e.panel?t:{...t,panel:e.panel}},5(t,e){return t.panelId===e.panelId?t:{...t,panelId:e.panelId}}};class Os extends er{constructor(e){super(e),On(this,"actions",{close:()=>this.send({type:1}),refocusableClose:r=>{this.actions.close();let s=r?nt(r)?r:"current"in r&&nt(r.current)?r.current:this.state.button:this.state.button;s?.focus()},open:()=>this.send({type:0}),setButtonId:r=>this.send({type:3,buttonId:r}),setButton:r=>this.send({type:2,button:r}),setPanelId:r=>this.send({type:5,panelId:r}),setPanel:r=>this.send({type:4,panel:r})}),On(this,"selectors",{isPortalled:r=>{var s;if(!r.button||!r.panel)return!1;let n=(s=o.l(r.button))!=null?s:document;for(let m of n.querySelectorAll("body > *"))if(Number(m?.contains(r.button))^Number(m?.contains(r.panel)))return!0;let a=Ce(n),i=a.indexOf(r.button),l=(i+a.length-1)%a.length,c=(i+1)%a.length,u=a[l],d=a[c];return!r.panel.contains(u)&&!r.panel.contains(d)}});{let r=this.state.id,s=Yt.get(null);this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}}static new({id:e,__demoMode:r=!1}){return new Os({id:e,__demoMode:r,popoverState:r?0:1,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,r){return o.u(r.type,Qd,e,r)}}const fa=f.createContext(null);function yr(t){let e=f.useContext(fa);if(e===null){let r=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,yr),r}return e}function Zd({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>Os.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let Ps=f.createContext(null);Ps.displayName="PopoverGroupContext";function pa(){return f.useContext(Ps)}let wr=f.createContext(null);wr.displayName="PopoverPanelContext";function Jd(){return f.useContext(wr)}let tf="div";function ef(t,e){var r;let s=f.useId(),{__demoMode:n=!1,...a}=t,i=Zd({id:s,__demoMode:n}),l=f.useRef(null),c=Z(e,Qn($=>{l.current=$})),[u,d,m,x,p]=q(i,f.useCallback($=>[$.popoverState,$.button,$.panel,$.buttonId,$.panelId],[])),g=El((r=l.current)!=null?r:d),h=o.s$1(x),b=o.s$1(p),v=f.useMemo(()=>({buttonId:h,panelId:b,close:i.actions.close}),[h,b,i]),E=pa(),y=E?.registerPopover,k=o.o(()=>{var $,A;let D=o.e(($=l.current)!=null?$:d);return(A=E?.isFocusWithinPopoverGroup())!=null?A:D&&(d?.contains(D)||m?.contains(D))});f.useEffect(()=>y?.(v),[y,v]);let[R,O]=Lo(),S=ks(d),F=Bo({mainTreeNode:S,portals:R,defaultContainers:[{get current(){return i.state.button}},{get current(){return i.state.panel}}]});is(g,"focus",$=>{var A,D,z,C,P,V;$.target!==window&&mt($.target)&&i.state.popoverState===rt.Open&&(k()||i.state.button&&i.state.panel&&(F.contains($.target)||(D=(A=i.state.beforePanelSentinel.current)==null?void 0:A.contains)!=null&&D.call(A,$.target)||(C=(z=i.state.afterPanelSentinel.current)==null?void 0:z.contains)!=null&&C.call(z,$.target)||(V=(P=i.state.afterButtonSentinel.current)==null?void 0:P.contains)!=null&&V.call(P,$.target)||i.actions.close()))},!0);let B=u===rt.Open;sr(B,F.resolveContainers,($,A)=>{i.actions.close(),Oe(A,Ne.Loose)||($.preventDefault(),d?.focus())});let j=o.n$1({open:u===rt.Open,close:i.actions.refocusableClose}),T=q(i,f.useCallback($=>o.u($.popoverState,{[rt.Open]:J.Open,[rt.Closed]:J.Closed}),[])),M={ref:c},L=o.K();return f.createElement(Ge,{node:S},f.createElement(ws,null,f.createElement(wr.Provider,{value:null},f.createElement(fa.Provider,{value:i},f.createElement(rs,{value:i.actions.refocusableClose},f.createElement(dr,{value:T},f.createElement(O,null,L({ourProps:M,theirProps:a,slot:j,defaultTag:tf,name:"Popover"}))))))))}let rf="button";function sf(t,e){let r=f.useId(),{id:s=`headlessui-popover-button-${r}`,disabled:n=!1,autoFocus:a=!1,...i}=t,l=yr("Popover.Button"),[c,u,d,m,x,p,g]=q(l,f.useCallback(H=>[H.popoverState,l.selectors.isPortalled(H),H.button,H.buttonId,H.panel,H.panelId,H.afterButtonSentinel],[])),h=f.useRef(null),b=`headlessui-focus-sentinel-${f.useId()}`,v=pa(),E=v?.closeOthers,y=Jd()!==null;f.useEffect(()=>{if(!y)return l.actions.setButtonId(s),()=>l.actions.setButtonId(null)},[y,s,l]);let[k]=f.useState(()=>Symbol()),R=Z(h,e,bs(),o.o(H=>{if(!y){if(H)l.state.buttons.current.push(k);else{let Y=l.state.buttons.current.indexOf(k);Y!==-1&&l.state.buttons.current.splice(Y,1)}l.state.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),H&&l.actions.setButton(H)}})),O=Z(h,e),S=o.o(H=>{var Y,_,K;if(y){if(l.state.popoverState===rt.Closed)return;switch(H.key){case W.Space:case W.Enter:H.preventDefault(),(_=(Y=H.target).click)==null||_.call(Y),l.actions.close(),(K=l.state.button)==null||K.focus();break}}else switch(H.key){case W.Space:case W.Enter:H.preventDefault(),H.stopPropagation(),l.state.popoverState===rt.Closed?(E?.(l.state.buttonId),l.actions.open()):l.actions.close();break;case W.Escape:if(l.state.popoverState!==rt.Open)return E?.(l.state.buttonId);if(!h.current)return;let et=o.e(h.current);if(et&&!h.current.contains(et))return;H.preventDefault(),H.stopPropagation(),l.actions.close();break}}),F=o.o(H=>{y||H.key===W.Space&&H.preventDefault()}),B=o.o(H=>{var Y,_;Xt(H.currentTarget)||n||(y?(l.actions.close(),(Y=l.state.button)==null||Y.focus()):(H.preventDefault(),H.stopPropagation(),l.state.popoverState===rt.Closed?(E?.(l.state.buttonId),l.actions.open()):l.actions.close(),(_=l.state.button)==null||_.focus()))}),j=o.o(H=>{H.preventDefault(),H.stopPropagation()}),{isFocusVisible:T,focusProps:M}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:a}),{isHovered:L,hoverProps:$}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:n}),{pressed:A,pressProps:D}=o.w({disabled:n}),z=c===rt.Open,C=o.n$1({open:z,active:A||z,disabled:n,hover:L,focus:T,autofocus:a}),P=nr(t,d),V=y?o.V({ref:O,type:P,onKeyDown:S,onClick:B,disabled:n||void 0,autoFocus:a},M,$,D):o.V({ref:R,id:m,type:P,"aria-expanded":c===rt.Open,"aria-controls":x?p:void 0,disabled:n||void 0,autoFocus:a,onKeyDown:S,onKeyUp:F,onClick:B,onMouseDown:j},M,$,D),X=js(),G=o.o(()=>{if(!nt(l.state.panel))return;let H=l.state.panel;function Y(){o.u(X.current,{[dt.Forwards]:()=>ut(H,tt.First),[dt.Backwards]:()=>ut(H,tt.Last)})===Qt.Error&&ut(Ce(o.r(l.state.button)).filter(_=>_.dataset.headlessuiFocusGuard!=="true"),o.u(X.current,{[dt.Forwards]:tt.Next,[dt.Backwards]:tt.Previous}),{relativeTo:l.state.button})}Y()}),I=o.K();return f.createElement(f.Fragment,null,I({ourProps:V,theirProps:i,slot:C,defaultTag:rf,name:"Popover.Button"}),z&&!y&&u&&f.createElement(Ct,{id:b,ref:g,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:G}))}let nf="div",of=o.A.RenderStrategy|o.A.Static;function ma(t,e){let r=f.useId(),{id:s=`headlessui-popover-backdrop-${r}`,transition:n=!1,...a}=t,i=yr("Popover.Backdrop"),l=q(i,f.useCallback(v=>v.popoverState,[])),[c,u]=f.useState(null),d=Z(e,u),m=Lt(),[x,p]=$e(n,c,m!==null?(m&J.Open)===J.Open:l===rt.Open),g=o.o(v=>{if(Xt(v.currentTarget))return v.preventDefault();i.actions.close()}),h=o.n$1({open:l===rt.Open}),b={ref:d,id:s,"aria-hidden":!0,onClick:g,...Pe(p)};return o.K()({ourProps:b,theirProps:a,slot:h,defaultTag:nf,features:of,visible:x,name:"Popover.Backdrop"})}let af="div",lf=o.A.RenderStrategy|o.A.Static;function cf(t,e){let r=f.useId(),{id:s=`headlessui-popover-panel-${r}`,focus:n=!1,anchor:a,portal:i=!1,modal:l=!1,transition:c=!1,...u}=t,d=yr("Popover.Panel"),m=q(d,d.selectors.isPortalled),[x,p,g,h,b]=q(d,f.useCallback(I=>[I.popoverState,I.button,I.__demoMode,I.beforePanelSentinel,I.afterPanelSentinel],[])),v=`headlessui-focus-sentinel-before-${r}`,E=`headlessui-focus-sentinel-after-${r}`,y=f.useRef(null),k=hs(a),[R,O]=ys(k),S=vs();k&&(i=!0);let[F,B]=f.useState(null),j=Z(y,e,k?R:null,d.actions.setPanel,B),T=Nt(p),M=Nt(y.current);o.n(()=>(d.actions.setPanelId(s),()=>d.actions.setPanelId(null)),[s,d]);let L=Lt(),[$,A]=$e(c,F,L!==null?(L&J.Open)===J.Open:x===rt.Open);rr($,p,d.actions.close),or(g?!1:l&&$,M);let D=o.o(I=>{var H;switch(I.key){case W.Escape:if(d.state.popoverState!==rt.Open||!y.current)return;let Y=o.e(y.current);if(Y&&!y.current.contains(Y))return;I.preventDefault(),I.stopPropagation(),d.actions.close(),(H=d.state.button)==null||H.focus();break}});f.useEffect(()=>{var I;t.static||x===rt.Closed&&((I=t.unmount)==null||I)&&d.actions.setPanel(null)},[x,t.unmount,t.static,d]),f.useEffect(()=>{if(g||!n||x!==rt.Open||!y.current)return;let I=o.e(y.current);y.current.contains(I)||ut(y.current,tt.First)},[g,n,y.current,x]);let z=o.n$1({open:x===rt.Open,close:d.actions.refocusableClose}),C=o.V(k?S():{},{ref:j,id:s,onKeyDown:D,onBlur:n&&x===rt.Open?I=>{var H,Y,_,K,et;let st=I.relatedTarget;st&&y.current&&((H=y.current)!=null&&H.contains(st)||(d.actions.close(),((_=(Y=h.current)==null?void 0:Y.contains)!=null&&_.call(Y,st)||(et=(K=b.current)==null?void 0:K.contains)!=null&&et.call(K,st))&&st.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...u.style,...O,"--button-width":ss($,p,!0).width},...Pe(A)}),P=js(),V=o.o(()=>{let I=y.current;if(!I)return;function H(){o.u(P.current,{[dt.Forwards]:()=>{var Y;ut(I,tt.First)===Qt.Error&&((Y=d.state.afterPanelSentinel.current)==null||Y.focus())},[dt.Backwards]:()=>{var Y;(Y=d.state.button)==null||Y.focus({preventScroll:!0})}})}H()}),X=o.o(()=>{let I=y.current;if(!I)return;function H(){o.u(P.current,{[dt.Forwards]:()=>{var Y;if(!d.state.button)return;let _=(Y=o.r(d.state.button))!=null?Y:document.body,K=Ce(_),et=K.indexOf(d.state.button),st=K.slice(0,et+1),Kt=[...K.slice(et+1),...st];for(let le of Kt.slice())if(le.dataset.headlessuiFocusGuard==="true"||F!=null&&F.contains(le)){let Fe=Kt.indexOf(le);Fe!==-1&&Kt.splice(Fe,1)}ut(Kt,tt.First,{sorted:!1})},[dt.Backwards]:()=>{var Y;ut(I,tt.Previous)===Qt.Error&&((Y=d.state.button)==null||Y.focus())}})}H()}),G=o.K();return f.createElement(Ao,null,f.createElement(wr.Provider,{value:s},f.createElement(rs,{value:d.actions.refocusableClose},f.createElement(fr,{enabled:i?t.static||$:!1,ownerDocument:T},$&&m&&f.createElement(Ct,{id:v,ref:h,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:V}),G({ourProps:C,theirProps:u,slot:z,defaultTag:af,features:lf,visible:$,name:"Popover.Panel"}),$&&m&&f.createElement(Ct,{id:E,ref:b,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:X})))))}let uf="div";function df(t,e){let r=f.useRef(null),s=Z(r,e),[n,a]=f.useState([]),i=o.o(h=>{a(b=>{let v=b.indexOf(h);if(v!==-1){let E=b.slice();return E.splice(v,1),E}return b})}),l=o.o(h=>(a(b=>[...b,h]),()=>i(h))),c=o.o(()=>{var h;let b=o.r(r.current);if(!b)return!1;let v=o.e(r.current);return(h=r.current)!=null&&h.contains(v)?!0:n.some(E=>{var y,k;return((y=b.getElementById(E.buttonId.current))==null?void 0:y.contains(v))||((k=b.getElementById(E.panelId.current))==null?void 0:k.contains(v))})}),u=o.o(h=>{for(let b of n)b.buttonId.current!==h&&b.close()}),d=f.useMemo(()=>({registerPopover:l,unregisterPopover:i,isFocusWithinPopoverGroup:c,closeOthers:u}),[l,i,c,u]),m=o.n$1({}),x=t,p={ref:s},g=o.K();return f.createElement(Ge,null,f.createElement(Ps.Provider,{value:d},g({ourProps:p,theirProps:x,slot:m,defaultTag:uf,name:"Popover.Group"})))}let ff=o.Y(ef),Xe=o.Y(sf),pf=o.Y(ma),mf=o.Y(ma),$s=o.Y(cf),xf=o.Y(df),xa=Object.assign(ff,{Button:Xe,Backdrop:mf,Overlay:pf,Panel:$s,Group:xf}),Ts=f.createContext(null);Ts.displayName="GroupContext";let gf=f.Fragment;function hf(t){var e;let[r,s]=f.useState(null),[n,a]=je(),[i,l]=Je(),c=f.useMemo(()=>({switch:r,setSwitch:s}),[r,s]),u={},d=t,m=o.K();return f.createElement(l,{name:"Switch.Description",value:i},f.createElement(a,{name:"Switch.Label",value:n,props:{htmlFor:(e=c.switch)==null?void 0:e.id,onClick(x){r&&(Dr(x.currentTarget)&&x.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},f.createElement(Ts.Provider,{value:c},m({ourProps:u,theirProps:d,slot:{},defaultTag:gf,name:"Switch.Group"}))))}let bf="button";function vf(t,e){var r;let s=f.useId(),n=re(),a=o.a(),{id:i=n||`headlessui-switch-${s}`,disabled:l=a||!1,checked:c,defaultChecked:u,onChange:d,name:m,value:x,form:p,autoFocus:g=!1,...h}=t,b=f.useContext(Ts),[v,E]=f.useState(null),y=f.useRef(null),k=Z(y,e,b===null?null:b.setSwitch,E),R=Zr(u),[O,S]=Qr(c,d,R??!1),F=o.p(),[B,j]=f.useState(!1),T=o.o(()=>{j(!0),S?.(!O),F.nextFrame(()=>{j(!1)})}),M=o.o(K=>{if(Xt(K.currentTarget))return K.preventDefault();K.preventDefault(),T()}),L=o.o(K=>{K.key===W.Space?(K.preventDefault(),T()):K.key===W.Enter&&Jr(K.currentTarget)}),$=o.o(K=>K.preventDefault()),A=se(),D=ke(),{isFocusVisible:z,focusProps:C}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:g}),{isHovered:P,hoverProps:V}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:l}),{pressed:X,pressProps:G}=o.w({disabled:l}),I=o.n$1({checked:O,disabled:l,hover:P,focus:z,active:X,autofocus:g,changing:B}),H=o.V({id:i,ref:k,role:"switch",type:nr(t,v),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":O,"aria-labelledby":A,"aria-describedby":D,disabled:l||void 0,autoFocus:g,onClick:M,onKeyUp:L,onKeyPress:$},C,V,G),Y=f.useCallback(()=>{if(R!==void 0)return S?.(R)},[S,R]),_=o.K();return f.createElement(f.Fragment,null,m!=null&&f.createElement(ts,{disabled:l,data:{[m]:x||"on"},overrides:{type:"checkbox",checked:O},form:p,onReset:Y}),_({ourProps:H,theirProps:h,slot:I,defaultTag:bf,name:"Switch"}))}let yf=o.Y(vf),wf=hf,Ef=ne,kf=Re,Rf=Object.assign(yf,{Group:wf,Label:Ef,Description:kf}),jf="textarea";function Sf(t,e){let r=f.useId(),s=re(),n=o.a(),{id:a=s||`headlessui-textarea-${r}`,disabled:i=n||!1,autoFocus:l=!1,invalid:c=!1,...u}=t,d=se(),m=ke(),{isFocused:x,focusProps:p}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:l}),{isHovered:g,hoverProps:h}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),b=o.V({ref:e,id:a,"aria-labelledby":d,"aria-describedby":m,"aria-invalid":c?"true":void 0,disabled:i||void 0,autoFocus:l},p,h),v=o.n$1({disabled:i,invalid:c,hover:g,focus:x,autofocus:l});return o.K()({ourProps:b,theirProps:u,slot:v,defaultTag:jf,name:"Textarea"})}let Cf=o.Y(Sf);const ga=o.cva("rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-none rst:select-none rst:shrink-0 rst:shadow-sm",{variants:{size:{xs:"rst:h-6 rst:w-6 rst:text-[10px]",sm:"rst:h-8 rst:w-8 rst:text-xs",md:"rst:h-10 rst:w-10 rst:text-sm",lg:"rst:h-12 rst:w-12 rst:text-base",xl:"rst:h-16 rst:w-16 rst:text-xl"},colorScheme:{primary:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/30 rst:dark:border-primary-800/50 rst:dark:text-primary-300",orange:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300",teal:"rst:bg-teal-50 rst:border-teal-200 rst:text-teal-700 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300",purple:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300",amber:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300",success:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300",error:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300",neutral:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"},shape:{circle:"rst:rounded-full",square:"rst:rounded-md"}},defaultVariants:{size:"md",colorScheme:"primary",shape:"circle"}}),Er=f.forwardRef(({className:t,size:e,colorScheme:r,shape:s,initials:n,src:a,alt:i,title:l,...c},u)=>{const[d,m]=f.useState(!1),x=a&&!d,p=o.jsxRuntimeExports.jsx("div",{ref:u,className:N.cn(ga({size:e,colorScheme:r,shape:s}),t),...c,children:x?o.jsxRuntimeExports.jsx("img",{src:a,alt:i||"Avatar",className:"rst:h-full rst:w-full rst:object-cover",onError:()=>m(!0)}):o.jsxRuntimeExports.jsx("span",{className:"rst:leading-none rst:uppercase",children:n?.slice(0,2)})});return l?o.jsxRuntimeExports.jsxs(xa,{className:"rst:relative rst:inline-flex",children:[o.jsxRuntimeExports.jsx(Xe,{as:"div",className:"rst:outline-none rst:cursor-pointer rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:focus-visible:ring-offset-2 rst:rounded-full",children:p}),o.jsxRuntimeExports.jsx($s,{anchor:"bottom",className:N.cn("rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:shadow-xl rst:backdrop-blur-md rst:ring-1","rst:bg-gray-900/95 rst:text-white rst:ring-black/5 rst:dark:bg-gray-100/95 rst:dark:text-gray-900 rst:dark:ring-white/20","rst:transition rst:duration-200 rst:ease-in-out rst:data-closed:opacity-0 rst:data-closed:translate-y-1"),children:l})]}):p});Er.displayName="Avatar";const ha=o.cva("rst:inline-flex rst:max-w-full rst:items-center rst:justify-center rst:font-medium rst:transition-colors rst:focus:outline-hidden rst:focus:ring-2 rst:focus:ring-ring rst:focus:ring-offset-2 rst:border",{variants:{variant:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""},fill:{soft:"",light:"",solid:"",outline:"rst:bg-transparent"},statusBadge:{true:"rst:rounded-full rst:justify-center",false:"rst:rounded-md"},size:{xs:"rst:text-[10px] rst:px-1.5 rst:py-0.5 rst:h-5 rst:gap-x-1",sm:"rst:text-xs rst:px-2.5 rst:py-0.5 rst:h-6 rst:gap-x-1.5",md:"rst:text-sm rst:px-3 rst:py-1 rst:h-7 rst:gap-x-2"}},compoundVariants:[{fill:"soft",variant:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/30 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{fill:"soft",variant:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{fill:"soft",variant:"teal",className:"rst:bg-teal-50 rst:border-teal-200 rst:text-teal-700 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{fill:"soft",variant:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{fill:"soft",variant:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{fill:"soft",variant:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{fill:"soft",variant:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{fill:"soft",variant:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"},{fill:"light",variant:"primary",className:"rst:bg-primary-100 rst:border-primary-300 rst:text-primary-800 rst:dark:bg-primary-800/40 rst:dark:border-primary-700/50 rst:dark:text-primary-200"},{fill:"light",variant:"orange",className:"rst:bg-orange-100 rst:border-orange-300 rst:text-orange-800 rst:dark:bg-orange-800/40 rst:dark:border-orange-700/50 rst:dark:text-orange-200"},{fill:"light",variant:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-800/40 rst:dark:border-teal-700/50 rst:dark:text-teal-200"},{fill:"light",variant:"purple",className:"rst:bg-purple-100 rst:border-purple-300 rst:text-purple-800 rst:dark:bg-purple-800/40 rst:dark:border-purple-700/50 rst:dark:text-purple-200"},{fill:"light",variant:"amber",className:"rst:bg-amber-100 rst:border-amber-300 rst:text-amber-900 rst:dark:bg-amber-800/40 rst:dark:border-amber-700/50 rst:dark:text-amber-200"},{fill:"light",variant:"success",className:"rst:bg-success-100 rst:border-success-300 rst:text-success-800 rst:dark:bg-success-800/40 rst:dark:border-success-700/50 rst:dark:text-success-200"},{fill:"light",variant:"error",className:"rst:bg-error-100 rst:border-error-300 rst:text-error-800 rst:dark:bg-error-800/40 rst:dark:border-error-700/50 rst:dark:text-error-200"},{fill:"light",variant:"neutral",className:"rst:bg-gray-200 rst:border-gray-300 rst:text-gray-800 rst:dark:bg-gray-700/50 rst:dark:border-gray-600/50 rst:dark:text-gray-200"},{fill:"outline",variant:"primary",className:"rst:border-primary-600 rst:text-primary-600 rst:dark:border-primary-500 rst:dark:text-primary-400"},{fill:"outline",variant:"orange",className:"rst:border-orange-600 rst:text-orange-600 rst:dark:border-orange-500 rst:dark:text-orange-400"},{fill:"outline",variant:"teal",className:"rst:border-teal-600 rst:text-teal-600 rst:dark:border-teal-500 rst:dark:text-teal-400"},{fill:"outline",variant:"purple",className:"rst:border-purple-600 rst:text-purple-600 rst:dark:border-purple-500 rst:dark:text-purple-400"},{fill:"outline",variant:"amber",className:"rst:border-amber-600 rst:text-amber-600 rst:dark:border-amber-500 rst:dark:text-amber-400"},{fill:"outline",variant:"success",className:"rst:border-success-600 rst:text-success-600 rst:dark:border-success-500 rst:dark:text-success-400"},{fill:"outline",variant:"error",className:"rst:border-error-600 rst:text-error-600 rst:dark:border-error-500 rst:dark:text-error-400"},{fill:"outline",variant:"neutral",className:"rst:border-gray-500 rst:text-gray-600 rst:dark:border-gray-500 rst:dark:text-gray-400"},{fill:"solid",variant:"primary",className:"rst:border-transparent rst:bg-primary-500 rst:hover:bg-primary-600 rst:text-white rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500"},{fill:"solid",variant:"orange",className:"rst:border-transparent rst:bg-orange-500 rst:hover:bg-orange-600 rst:text-white rst:dark:bg-orange-600 rst:dark:hover:bg-orange-500"},{fill:"solid",variant:"teal",className:"rst:border-transparent rst:bg-teal-500 rst:hover:bg-teal-600 rst:text-white rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500"},{fill:"solid",variant:"purple",className:"rst:border-transparent rst:bg-purple-500 rst:hover:bg-purple-600 rst:text-white rst:dark:bg-purple-600 rst:dark:hover:bg-purple-500"},{fill:"solid",variant:"amber",className:"rst:border-transparent rst:bg-amber-400 rst:hover:bg-amber-500 rst:text-black rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400 rst:dark:text-gray-900"},{fill:"solid",variant:"success",className:"rst:border-transparent rst:bg-success-500 rst:hover:bg-success-600 rst:text-white rst:dark:bg-success-600 rst:dark:hover:bg-success-500"},{fill:"solid",variant:"error",className:"rst:border-transparent rst:bg-error-500 rst:hover:bg-error-600 rst:text-white rst:dark:bg-error-600 rst:dark:hover:bg-error-500"},{fill:"solid",variant:"neutral",className:"rst:border-transparent rst:bg-gray-500 rst:hover:bg-gray-600 rst:text-white rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500"},{statusBadge:!0,size:"xs",className:"rst:min-w-[1.25rem] rst:h-5 rst:px-1"},{statusBadge:!0,size:"sm",className:"rst:min-w-[1.5rem] rst:h-6 rst:px-1.5"},{statusBadge:!0,size:"md",className:"rst:min-w-[1.75rem] rst:h-7 rst:px-2"}],defaultVariants:{variant:"primary",fill:"solid",size:"sm",statusBadge:!1}}),Qe=w.forwardRef(({className:t,variant:e,statusBadge:r,size:s,fill:n,leftIcon:a,rightIcon:i,children:l,...c},u)=>o.jsxRuntimeExports.jsxs("span",{ref:u,className:N.cn(ha({variant:e,statusBadge:r,size:s,fill:n}),t),...c,children:[a&&o.jsxRuntimeExports.jsx("span",{className:"rst:flex rst:shrink-0 rst:items-center rst:justify-center rst:opacity-70",children:a}),o.jsxRuntimeExports.jsx("span",{className:"rst:truncate rst:min-w-0",children:l}),i&&o.jsxRuntimeExports.jsx("span",{className:"rst:flex rst:shrink-0 rst:items-center rst:justify-center rst:opacity-70",children:i})]}));Qe.displayName="Badge";const ba=o.cva("rst:relative rst:isolate rst:w-full rst:overflow-hidden rst:rounded-xl rst:transition-all",{variants:{variant:{white:"rst:bg-[var(--roster-card-bg)] rst:border rst:border-[var(--roster-card-border)] rst:text-[var(--roster-card-text)] rst:shadow-sm",soft:"rst:bg-gray-50 rst:border rst:border-gray-100 rst:text-gray-900 rst:dark:bg-gray-900/40 rst:dark:border-gray-800/50 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border rst:border-gray-600 rst:text-gray-100 rst:shadow-sm rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",primary:"rst:bg-primary-600 rst:border rst:border-primary-700 rst:text-white rst:shadow-sm rst:dark:bg-primary-900 rst:dark:border-primary-800 rst:dark:text-primary-50",outline:"rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:dark:border-gray-800 rst:dark:text-gray-100",ghost:"rst:bg-transparent rst:border rst:border-transparent rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",glass:"rst:bg-white/50 rst:border rst:border-white/20 rst:backdrop-blur-md rst:text-gray-900 rst:shadow-sm rst:dark:bg-gray-950/50 rst:dark:border-white/10 rst:dark:text-gray-100 rst:dark:shadow-black/50"},padding:{none:"rst:p-0",sm:"rst:p-4",md:"rst:p-6",lg:"rst:p-8"}},defaultVariants:{variant:"white",padding:"md"}}),va=f.forwardRef(({className:t,variant:e,padding:r,branded:s=!1,brandColorTop:n,brandColorBottom:a,children:i,...l},c)=>o.jsxRuntimeExports.jsxs("div",{ref:c,className:N.cn(ba({variant:e,padding:r}),t),...l,children:[s&&o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:absolute rst:top-0 rst:inset-x-0 rst:h-1 rst:z-10",!n&&"rst:bg-orange-500"),style:n?{backgroundColor:n}:void 0}),i,s&&o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:absolute rst:bottom-0 rst:inset-x-0 rst:h-1 rst:z-10",!a&&"rst:bg-primary-500"),style:a?{backgroundColor:a}:void 0})]}));va.displayName="Card";const ya=o.cva("rst:flex rst:items-center rst:justify-center rst:shrink-0 rst:transition-colors rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2",{variants:{size:{sm:"rst:h-4 rst:w-4 rst:rounded-sm rst:border",md:"rst:h-5 rst:w-5 rst:rounded rst:border",lg:"rst:h-6 rst:w-6 rst:rounded-md rst:border"},variant:{solid:"",soft:""},checked:{true:"",false:"rst:bg-white rst:border-gray-300 rst:dark:bg-gray-900 rst:dark:border-gray-700 rst:text-transparent"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""}},compoundVariants:[{checked:!0,variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:border-primary-600 rst:text-white rst:dark:bg-primary-600 rst:dark:border-primary-500"},{checked:!0,variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:border-orange-600 rst:text-white rst:dark:bg-orange-600 rst:dark:border-orange-500"},{checked:!0,variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:border-teal-600 rst:text-white rst:dark:bg-teal-600 rst:dark:border-teal-500"},{checked:!0,variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:border-purple-600 rst:text-white rst:dark:bg-purple-600 rst:dark:border-purple-500"},{checked:!0,variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:border-amber-400 rst:text-black rst:dark:bg-amber-500 rst:dark:border-amber-500 rst:dark:text-gray-900"},{checked:!0,variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:border-success-600 rst:text-white rst:dark:bg-success-600 rst:dark:border-success-500"},{checked:!0,variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:border-error-600 rst:text-white rst:dark:bg-error-600 rst:dark:border-error-500"},{checked:!0,variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:border-gray-600 rst:text-white rst:dark:bg-gray-600 rst:dark:border-gray-500"},{checked:!0,variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/40 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{checked:!0,variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{checked:!0,variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{checked:!0,variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{checked:!0,variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{checked:!0,variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{checked:!0,variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{checked:!0,variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"md",checked:!1}}),wa=f.forwardRef(({className:t,colorScheme:e="primary",variant:r="solid",size:s="md",indeterminate:n=!1,...a},i)=>{const l={sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-4 h-4"},c=f.useRef(null),u=d=>{c.current=d,typeof i=="function"?i(d):i&&(i.current=d)};return f.useEffect(()=>{n&&c.current&&c.current.setAttribute("aria-checked","mixed")},[n,a.checked]),o.jsxRuntimeExports.jsx(Ji,{ref:u,...a,className:({checked:d,disabled:m})=>N.cn(ya({colorScheme:e,variant:r,size:s,checked:d||n}),m||a.disabled?"rst:opacity-50":"rst:cursor-pointer",t),children:({checked:d})=>o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:n?o.faMinus:o.faCheck,className:N.cn("rst:pointer-events-none rst:transition-opacity rst:duration-200",d||n?"rst:opacity-100":"rst:opacity-0",l[s])})})});wa.displayName="Checkbox";const Ea=o.cva("rst:group rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-3 rst:text-left rst:text-sm rst:font-medium rst:transition-all rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500/75 rst:cursor-pointer rst:z-10 rst:relative",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:border-gray-700 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",ghost:"rst:bg-transparent rst:text-gray-700 rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"}},defaultVariants:{variant:"soft"}}),ka=o.cva("rst:px-4 rst:pb-4 rst:pt-2 rst:text-sm rst:transition-colors",{variants:{variant:{white:"rst:bg-white rst:text-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-300",soft:"rst:bg-gray-100 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:text-gray-300",slate:"rst:bg-gray-700 rst:text-gray-200 rst:dark:bg-gray-900 rst:dark:text-gray-300",outline:"rst:bg-transparent rst:border-x rst:border-b rst:border-gray-200 rst:text-gray-600 rst:dark:border-gray-700 rst:dark:text-gray-400",ghost:"rst:bg-transparent rst:text-gray-600 rst:dark:text-gray-400"}},defaultVariants:{variant:"soft"}}),Ra=({title:t,children:e,variant:r,className:s,defaultOpen:n=!1,isOpen:a,onToggle:i,icon:l,...c})=>{const[u,d]=f.useState(n),m=a!==void 0?a:u,x=()=>{const p=!m;a===void 0&&d(p),i?.(p)};return o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:w-full rst:flex rst:flex-col",s),...c,children:[o.jsxRuntimeExports.jsxs("button",{type:"button",onClick:x,"aria-expanded":m,className:N.cn(Ea({variant:r}),m?"rst:rounded-t-md rst:rounded-b-none":"rst:rounded-md",m&&r==="outline"&&"rst:border-b-transparent rst:dark:border-b-transparent"),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:flex-1 rst:text-left rst:text-inherit",children:t}),o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:ml-2 rst:flex rst:items-center rst:transition-transform rst:duration-200 rst:text-inherit",m?"rst:rotate-180":""),children:l||o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:opacity-60"})})]}),o.jsxRuntimeExports.jsx(Jt,{show:m,enter:"rst:transition rst:duration-100 rst:ease-out",enterFrom:"rst:transform rst:scale-95 rst:opacity-0",enterTo:"rst:transform rst:scale-100 rst:opacity-100",leave:"rst:transition rst:duration-75 rst:ease-out",leaveFrom:"rst:transform rst:scale-100 rst:opacity-100",leaveTo:"rst:transform rst:scale-95 rst:opacity-0",children:o.jsxRuntimeExports.jsx("div",{className:N.cn(ka({variant:r}),"rst:rounded-b-md"),children:e})})]})},ja=o.cva("rst:flex rst:w-full rst:rounded-md rst:border rst:py-2.5 rst:px-4 rst:text-sm rst:ring-offset-background rst:file:border-0 rst:file:bg-transparent rst:file:text-sm rst:file:font-medium rst:focus-visible:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-all",{variants:{variant:{white:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500",soft:"rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-900",slate:"rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-400 rst:focus-visible:bg-gray-600 rst:dark:bg-gray-900 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-800",outline:"rst:border-gray-300 rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500",ghost:"rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-400 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800"},error:{true:"rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-600 rst:placeholder:text-error-300 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:placeholder:text-error-800 rst:dark:focus-visible:ring-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),zr=o.cva("rst:absolute rst:top-1/2 rst:-translate-y-1/2 rst:transition-colors",{variants:{variant:{white:"rst:text-gray-400 rst:dark:text-gray-500",soft:"rst:text-gray-500 rst:dark:text-gray-400",slate:"rst:text-gray-300 rst:dark:text-gray-500",outline:"rst:text-gray-400 rst:dark:text-gray-500",ghost:"rst:text-gray-500 rst:dark:text-gray-400"},error:{true:"rst:text-error-500 rst:dark:text-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),Is=f.forwardRef(({className:t,type:e,label:r,helperText:s,errorMessage:n,variant:a,error:i,startIcon:l,endIcon:c,disabled:u,...d},m)=>{const x=!!n||i;return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:w-full rst:space-y-1.5",t),children:[r&&o.jsxRuntimeExports.jsx(ne,{className:N.cn("rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-left rst:mb-1.5 rst:transition-colors","rst:text-gray-900 rst:dark:text-gray-100","rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70"),children:r}),o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[l&&o.jsxRuntimeExports.jsx("div",{className:N.cn(zr({variant:a,error:x}),"rst:left-3"),children:l}),o.jsxRuntimeExports.jsx(sd,{ref:m,type:e,disabled:u,className:N.cn(ja({variant:a,error:x}),l&&"rst:pl-10",c&&"rst:pr-10"),...d}),c&&o.jsxRuntimeExports.jsx("div",{className:N.cn(zr({variant:a,error:x}),"rst:right-3"),children:c})]}),(s||n)&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-left rst:mt-1",x?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:n||s})]})});Is.displayName="Input";const Sa=o.cva("rst:inline-flex rst:items-center rst:gap-1.5 rst:font-semibold rst:transition-colors rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:rounded-sm rst:cursor-pointer",{variants:{variant:{primary:"rst:text-primary-600 rst:hover:text-primary-700 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",neutral:"rst:text-gray-600 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100",danger:"rst:text-error-600 rst:hover:text-error-700 rst:dark:text-error-500 rst:dark:hover:text-error-400",white:"rst:text-gray-200 rst:hover:text-white rst:dark:text-gray-300 rst:dark:hover:text-white"},underline:{always:"rst:underline rst:underline-offset-4",hover:"rst:no-underline rst:hover:underline rst:underline-offset-4",none:"rst:no-underline"},size:{sm:"rst:text-xs",md:"rst:text-sm",lg:"rst:text-base"}},defaultVariants:{variant:"primary",underline:"hover",size:"md"}}),Ht=({as:t,className:e,variant:r,underline:s,size:n,external:a,showExternalIcon:i,children:l,href:c,...u})=>{const d=t||"a",m=a||typeof c=="string"&&c.startsWith("http"),x=i??m,p=N.cn(Sa({variant:r,underline:s,size:n}),e);return m?o.jsxRuntimeExports.jsxs("a",{href:c,className:p,target:"_blank",rel:"noopener noreferrer",...u,children:[l,x&&o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faExternalLinkAlt,className:"rst:ml-0.5 rst:h-3 rst:w-3","data-testid":"external-icon"})]}):o.jsxRuntimeExports.jsxs(d,{className:p,...c!==void 0?{href:c}:{},...u,children:[l,x&&o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faExternalLinkAlt,className:"rst:ml-1 rst:h-3 rst:w-3 rst:opacity-70","data-testid":"external-icon"})]})},Ca=f.forwardRef(({revealable:t=!0,defaultRevealed:e=!1,revealed:r,onRevealChange:s,showLabel:n="Show password",hideLabel:a="Hide password",disabled:i,variant:l,error:c,errorMessage:u,...d},m)=>{const[x,p]=f.useState(e),g=r!==void 0,h=g?r:x,b=()=>{const v=!h;g||p(v),s?.(v)};return o.jsxRuntimeExports.jsx(Is,{ref:m,type:h?"text":"password",disabled:i,variant:l,error:c,errorMessage:u,className:N.cn("rst:[&_input::-ms-reveal]:hidden",d.className),endIcon:t?o.jsxRuntimeExports.jsx("button",{type:"button",onClick:b,disabled:i,"aria-label":h?a:n,"aria-pressed":h,className:N.cn("rst:-m-1 rst:flex rst:items-center rst:rounded rst:p-1 rst:transition-opacity","rst:opacity-70 rst:hover:opacity-100","rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400",i&&"rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"),children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:h?o.faEyeSlash:o.faEye,className:"rst:h-4 rst:w-4","aria-hidden":"true"})}):void 0,...d})});Ca.displayName="PasswordInput";const Na=o.cva("rst:inline-flex rst:items-center rst:rounded-full rst:font-medium rst:whitespace-nowrap rst:align-middle",{variants:{colorScheme:{primary:"",success:"",error:"",amber:"",info:"",neutral:""},variant:{soft:"",outline:"rst:bg-transparent rst:border",solid:""},size:{sm:"rst:text-xs rst:px-2.5 rst:py-0.5 rst:gap-1.5",md:"rst:text-sm rst:px-3 rst:py-1 rst:gap-2"}},compoundVariants:[{variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:text-primary-700 rst:dark:bg-primary-500/15 rst:dark:text-primary-300"},{variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:text-success-700 rst:dark:bg-success-500/15 rst:dark:text-success-300"},{variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:text-error-700 rst:dark:bg-error-500/15 rst:dark:text-error-300"},{variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:text-amber-800 rst:dark:bg-amber-500/15 rst:dark:text-amber-300"},{variant:"soft",colorScheme:"info",className:"rst:bg-info-50 rst:text-info-700 rst:dark:bg-info-500/15 rst:dark:text-info-300"},{variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:text-gray-700 rst:dark:bg-gray-500/15 rst:dark:text-gray-300"},{variant:"outline",colorScheme:"primary",className:"rst:border-primary-300 rst:text-primary-700 rst:dark:border-primary-700 rst:dark:text-primary-300"},{variant:"outline",colorScheme:"success",className:"rst:border-success-300 rst:text-success-700 rst:dark:border-success-700 rst:dark:text-success-300"},{variant:"outline",colorScheme:"error",className:"rst:border-error-300 rst:text-error-700 rst:dark:border-error-700 rst:dark:text-error-300"},{variant:"outline",colorScheme:"amber",className:"rst:border-amber-300 rst:text-amber-800 rst:dark:border-amber-700 rst:dark:text-amber-300"},{variant:"outline",colorScheme:"info",className:"rst:border-info-300 rst:text-info-700 rst:dark:border-info-700 rst:dark:text-info-300"},{variant:"outline",colorScheme:"neutral",className:"rst:border-gray-300 rst:text-gray-700 rst:dark:border-gray-600 rst:dark:text-gray-300"},{variant:"solid",colorScheme:"primary",className:"rst:bg-primary-500 rst:text-white"},{variant:"solid",colorScheme:"success",className:"rst:bg-success-500 rst:text-white"},{variant:"solid",colorScheme:"error",className:"rst:bg-error-500 rst:text-white"},{variant:"solid",colorScheme:"amber",className:"rst:bg-amber-500 rst:text-amber-950"},{variant:"solid",colorScheme:"info",className:"rst:bg-info-500 rst:text-white"},{variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:text-white rst:dark:bg-gray-500"}],defaultVariants:{colorScheme:"neutral",variant:"soft",size:"sm"}}),Wr=o.cva("rst:shrink-0 rst:rounded-full",{variants:{colorScheme:{primary:"rst:bg-primary-500 rst:dark:bg-primary-400",success:"rst:bg-success-500 rst:dark:bg-success-400",error:"rst:bg-error-500 rst:dark:bg-error-400",amber:"rst:bg-amber-500 rst:dark:bg-amber-400",info:"rst:bg-info-500 rst:dark:bg-info-400",neutral:"rst:bg-gray-500 rst:dark:bg-gray-400"},variant:{soft:"",outline:"",solid:"rst:bg-current rst:dark:bg-current"},size:{sm:"rst:size-1.5",md:"rst:size-2"}},defaultVariants:{colorScheme:"neutral",variant:"soft",size:"sm"}}),Oa=f.forwardRef(({className:t,colorScheme:e="neutral",variant:r="soft",size:s="sm",dot:n=!1,pulse:a=!1,leadingIcon:i,children:l,...c},u)=>o.jsxRuntimeExports.jsxs("span",{ref:u,className:N.cn(Na({colorScheme:e,variant:r,size:s}),t),...c,children:[n?o.jsxRuntimeExports.jsxs("span",{className:"rst:relative rst:inline-flex rst:shrink-0","aria-hidden":"true",children:[a&&o.jsxRuntimeExports.jsx("span",{className:N.cn(Wr({colorScheme:e,variant:r,size:s}),"rst:absolute rst:inset-0 rst:motion-safe:animate-ping rst:opacity-75")}),o.jsxRuntimeExports.jsx("span",{className:N.cn(Wr({colorScheme:e,variant:r,size:s}),"rst:relative")})]}):i&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex rst:shrink-0 rst:items-center","aria-hidden":"true",children:i}),l]}));Oa.displayName="Pill";const Pa=o.cva("rst:font-mono rst:uppercase rst:leading-none",{variants:{size:{xs:"rst:text-[0.625rem] rst:tracking-[0.16em]",sm:"rst:text-[0.6875rem] rst:tracking-[0.14em]",md:"rst:text-xs rst:tracking-[0.12em]"},tone:{faint:"rst:text-gray-500 rst:dark:text-gray-400",default:"rst:text-gray-700 rst:dark:text-gray-300",strong:"rst:text-gray-900 rst:dark:text-gray-100",primary:"rst:text-primary-600 rst:dark:text-primary-400"},weight:{normal:"rst:font-normal",medium:"rst:font-medium",semibold:"rst:font-semibold"}},defaultVariants:{size:"xs",tone:"faint",weight:"normal"}});function we({as:t,className:e,size:r,tone:s,weight:n,children:a,...i}){const l=t??"span";return o.jsxRuntimeExports.jsx(l,{className:N.cn(Pa({size:r,tone:s,weight:n}),e),...i,children:a})}we.displayName="Eyebrow";const $a=o.cva("rst:font-mono rst:text-[0.8125rem]",{variants:{colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-800 rst:dark:text-gray-200",current:"rst:text-current"},surface:{none:"",soft:"rst:rounded rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"}},defaultVariants:{colorScheme:"primary",surface:"none"}}),Ta=f.forwardRef(({className:t,colorScheme:e,surface:r,children:s,...n},a)=>o.jsxRuntimeExports.jsx("code",{ref:a,className:N.cn($a({colorScheme:e,surface:r}),t),...n,children:s}));Ta.displayName="InlineCode";const Ia=f.forwardRef(({label:t,trailing:e,align:r="start",className:s,...n},a)=>o.jsxRuntimeExports.jsxs("div",{ref:a,className:N.cn("rst:flex rst:items-center rst:gap-3",s),...n,children:[r==="end"&&o.jsxRuntimeExports.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),o.jsxRuntimeExports.jsx(we,{children:t}),r==="start"&&o.jsxRuntimeExports.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),e&&o.jsxRuntimeExports.jsx(we,{children:e})]}));Ia.displayName="LabeledDivider";const Aa=o.cva("rst:block rst:font-bold rst:leading-none rst:tracking-[-0.04em] rst:tabular-nums",{variants:{size:{sm:"rst:text-xl",md:"rst:text-[clamp(1.5rem,3.6vw,2.25rem)]",lg:"rst:text-[clamp(2rem,5vw,3rem)]"},colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",success:"rst:text-success-600 rst:dark:text-success-400",error:"rst:text-error-600 rst:dark:text-error-400",amber:"rst:text-amber-600 rst:dark:text-amber-400",neutral:"rst:text-gray-900 rst:dark:text-gray-100",current:"rst:text-current"}},defaultVariants:{size:"md",colorScheme:"neutral"}}),Da=f.forwardRef(({value:t,label:e,source:r,size:s,colorScheme:n,className:a,...i},l)=>o.jsxRuntimeExports.jsxs("div",{ref:l,className:N.cn("rst:flex rst:flex-col rst:gap-[3px]",a),...i,children:[o.jsxRuntimeExports.jsx("dd",{className:N.cn("rst:m-0",Aa({size:s,colorScheme:n})),children:t}),o.jsxRuntimeExports.jsx("dt",{children:o.jsxRuntimeExports.jsx(we,{size:"xs",children:e})}),r&&o.jsxRuntimeExports.jsx("span",{className:"rst:font-mono rst:text-[0.53125rem] rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400",children:r})]}));Da.displayName="Stat";const Nf="roster-theme",Yr=new Set;function Of(t){Yr.add(t);const e=new MutationObserver(t);return e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{Yr.delete(t),e.disconnect()}}function Pf(){return document.documentElement.classList.contains("dark")}function $f(){return!1}const Fa=f.forwardRef(({storageKey:t=Nf,onThemeChange:e,showLabel:r=!1,lightLabel:s="Light",darkLabel:n="Dark",lightIcon:a,darkIcon:i,toDarkLabel:l="Switch to dark mode",toLightLabel:c="Switch to light mode",variant:u="ghost",colorScheme:d="neutral",size:m="sm",...x},p)=>{const g=f.useSyncExternalStore(Of,Pf,$f),h=f.useCallback(()=>{const b=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",b);try{localStorage.setItem(t,b?"dark":"light")}catch{}Yr.forEach(v=>v()),e?.(b?"dark":"light")},[t,e]);return o.jsxRuntimeExports.jsx(o.Button,{ref:p,variant:u,colorScheme:d,size:m,onClick:h,"aria-pressed":g,"aria-label":g?c:l,startIcon:(g?i:a)??o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:g?o.faSun:o.faMoon,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"}),...x,children:r?g?n:s:null})});Fa.displayName="ThemeToggle";const Ma=o.cva("rst:relative rst:w-full rst:cursor-pointer rst:rounded-md rst:py-2.5 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:shadow-sm rst:ring-1 rst:ring-inset rst:transition-all rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:dark:focus:ring-primary-400 rst:sm:leading-6",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:ring-gray-700 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:ring-transparent rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:ring-transparent rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-transparent rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:ring-gray-700 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",ghost:"rst:bg-transparent rst:text-gray-700 rst:ring-transparent rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"},error:{true:"rst:ring-error-500 rst:text-error-600 rst:focus:ring-error-500 rst:dark:ring-error-500 rst:dark:text-error-400 rst:dark:focus:ring-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),Tf=({options:t,value:e,onChange:r,placeholder:s="Select an option",disabled:n=!1,variant:a,error:i,className:l,label:c})=>{const u=t.find(d=>d.value===e);return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:flex rst:flex-col rst:gap-1.5",l),children:[c&&o.jsxRuntimeExports.jsx(ne,{className:"rst:block rst:text-sm rst:font-medium rst:text-inherit rst:text-left",children:c}),o.jsxRuntimeExports.jsx(kd,{value:e??void 0,onChange:r,disabled:n,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[o.jsxRuntimeExports.jsxs(na,{className:N.cn(Ma({variant:a,error:i})),children:[o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:block rst:truncate",!u&&"rst:text-gray-500 rst:dark:text-gray-400"),children:u?u.label:s}),o.jsxRuntimeExports.jsx("span",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center rst:pr-3",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:o.jsxRuntimeExports.jsx(oa,{anchor:"bottom start",className:N.cn("rst:w-(--button-width) rst:z-50 rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:text-base rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-gray-700 rst:focus:outline-none rst:sm:text-sm","rst:[--anchor-gap:4px]"),children:t.map(d=>o.jsxRuntimeExports.jsxs(aa,{value:d.value,disabled:d.disabled,className:N.cn("rst:group rst:relative rst:cursor-default rst:select-none rst:py-2.5 rst:pl-4 rst:pr-9 rst:transition-colors","rst:text-gray-900 rst:dark:text-gray-100","rst:data-focus:bg-primary-100 rst:data-focus:text-primary-900","rst:dark:data-focus:bg-primary-900/30 rst:dark:data-focus:text-primary-100","rst:data-selected:bg-gray-50 rst:dark:data-selected:bg-gray-700/50","rst:data-disabled:opacity-50 rst:data-disabled:cursor-not-allowed"),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:block rst:truncate rst:font-normal rst:group-data-selected:font-semibold",children:d.label}),o.jsxRuntimeExports.jsx("span",{className:"rst:absolute rst:inset-y-0 rst:right-0 rst:hidden rst:items-center rst:pr-4 rst:text-primary-600 rst:dark:text-primary-400 rst:group-data-selected:flex",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faCheck,className:"rst:h-3.5 rst:w-3.5"})})]},d.value))})})]})})]})},La=o.cva("rst:group rst:relative rst:inline-flex rst:shrink-0 rst:cursor-pointer rst:rounded-full rst:border-2 rst:border-transparent rst:transition-colors rst:duration-200 rst:ease-in-out rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:disabled:cursor-not-allowed rst:disabled:opacity-50",{variants:{variant:{primary:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-primary-500 rst:focus-visible:ring-primary-500",success:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-green-500 rst:focus-visible:ring-green-500",danger:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-error-500 rst:focus-visible:ring-error-500",neutral:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-gray-600 rst:dark:data-[checked]:bg-gray-500 rst:focus-visible:ring-gray-600"},size:{xs:"rst:h-4 rst:w-7",sm:"rst:h-5 rst:w-9",md:"rst:h-6 rst:w-11",lg:"rst:h-7 rst:w-14"}},defaultVariants:{variant:"primary",size:"md"}}),_a=o.cva("rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:shadow rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",{variants:{size:{xs:"rst:h-3 rst:w-3 rst:translate-x-0 rst:group-data-[checked]:translate-x-3",sm:"rst:h-4 rst:w-4 rst:translate-x-0 rst:group-data-[checked]:translate-x-4",md:"rst:h-5 rst:w-5 rst:translate-x-0 rst:group-data-[checked]:translate-x-5",lg:"rst:h-6 rst:w-6 rst:translate-x-0 rst:group-data-[checked]:translate-x-7"}},defaultVariants:{size:"md"}}),Ur=({checked:t,onChange:e,label:r,description:s,disabled:n=!1,size:a,variant:i,className:l,ariaLabel:c})=>{const u=r?void 0:c||"Toggle setting";return o.jsxRuntimeExports.jsxs(br,{as:"div",className:N.cn("rst:flex rst:items-center rst:justify-between rst:gap-4",l),children:[(r||s)&&o.jsxRuntimeExports.jsxs("span",{className:"rst:flex rst:flex-col",children:[r&&o.jsxRuntimeExports.jsx(ne,{passive:!0,className:N.cn("rst:text-sm rst:font-medium rst:text-gray-900 rst:dark:text-gray-100",n&&"rst:opacity-50"),children:r}),s&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400",n&&"rst:opacity-50"),children:s})]}),o.jsxRuntimeExports.jsx(Rf,{checked:t,onChange:e,disabled:n,"aria-label":u,className:N.cn(La({variant:i,size:a})),children:o.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:N.cn(_a({size:a}))})})]})},Va=o.cva("rst:flex rst:w-full rst:min-h-[80px] rst:rounded-md rst:border rst:py-2.5 rst:px-4 rst:text-sm rst:ring-offset-white rst:dark:ring-offset-gray-950 rst:placeholder:text-gray-400 rst:focus-visible:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-colors rst:custom-scrollbar",{variants:{variant:{outline:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-950 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400",soft:"rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800/50 rst:dark:text-gray-100 rst:dark:focus-visible:bg-gray-900 rst:dark:focus-visible:border-primary-400",ghost:"rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800",white:"rst:border-gray-200 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-800 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400"},error:{true:"rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-900 rst:placeholder:text-error-300 rst:dark:border-error-500 rst:dark:focus-visible:ring-error-500 rst:dark:text-error-100 rst:dark:placeholder:text-error-400/50",false:""},resize:{none:"rst:resize-none",vertical:"rst:resize-y",horizontal:"rst:resize-x",both:"rst:resize"}},defaultVariants:{variant:"outline",error:!1,resize:"vertical"}}),Ba=f.forwardRef(({className:t,label:e,helperText:r,errorMessage:s,variant:n,error:a,resize:i,disabled:l,...c},u)=>{const d=!!s||a;return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:w-full rst:space-y-1.5",t),children:[e&&o.jsxRuntimeExports.jsx(ne,{className:"rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-gray-900 rst:dark:text-gray-100 rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left",children:e}),o.jsxRuntimeExports.jsx(Cf,{ref:u,disabled:l,className:N.cn(Va({variant:n,resize:i,error:d})),...c}),(r||s)&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-left",d?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:s||r})]})});Ba.displayName="Textarea";function If({items:t,maxDisplay:e=5,totalCount:r,excludeKey:s,onDismiss:n,trailingSlot:a,label:i,ringClass:l="rst:ring-white rst:dark:ring-gray-900",className:c}){const u=t.filter(m=>m.key!==s).slice(0,e),d=r!==void 0?Math.max(0,r-u.length):Math.max(0,t.filter(m=>m.key!==s).length-e);return u.length===0&&!a?null:o.jsxRuntimeExports.jsxs("div",{"data-testid":"avatar-strip",className:N.cn("rst:flex rst:items-center rst:gap-3",c),children:[n&&o.jsxRuntimeExports.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss","data-testid":"avatar-strip-dismiss",className:"rst:shrink-0 rst:text-gray-400/50 rst:dark:text-gray-500/50 rst:hover:text-gray-400 rst:dark:hover:text-gray-500 rst:transition-colors rst:cursor-pointer",children:"✕"}),o.jsxRuntimeExports.jsxs("div",{"data-testid":"avatar-strip-stack",className:"rst:flex rst:items-center rst:-space-x-2",children:[u.map(m=>{const x=o.jsxRuntimeExports.jsx(Er,{initials:m.label[0].toUpperCase(),src:m.src,colorScheme:m.colorScheme??"neutral",size:"xs"}),p=N.cn("rst:relative rst:inline-flex rst:h-6 rst:w-6 rst:rounded-full rst:ring-2 rst:transition-transform rst:hover:z-10 rst:hover:scale-110",l);return m.href?o.jsxRuntimeExports.jsx("a",{href:m.href,title:m.label,"data-testid":`avatar-strip-item-${m.key}`,className:p,children:x},m.key):o.jsxRuntimeExports.jsx("span",{title:m.label,"data-testid":`avatar-strip-item-${m.key}`,className:p,children:x},m.key)}),d>0&&o.jsxRuntimeExports.jsx("div",{title:`${d} more`,"data-testid":"avatar-strip-overflow",className:N.cn("rst:relative rst:flex rst:h-6 rst:w-6 rst:items-center rst:justify-center rst:rounded-full rst:bg-gray-500/10 rst:ring-2",l),children:o.jsxRuntimeExports.jsxs("span",{className:"rst:text-[9px] rst:font-bold rst:text-gray-500 rst:dark:text-gray-400 rst:select-none",children:["+",d]})}),a]}),i&&o.jsxRuntimeExports.jsx("div",{"data-testid":"avatar-strip-label",children:i})]})}function Af({tabs:t,activeTab:e,onChange:r,variant:s="pill",fullWidth:n=!1,className:a}){const i=f.useRef(null),l=f.useRef(null),c=f.useRef(null),u=f.useRef(null),d=f.useRef(!1),m=s==="filled",x=f.useCallback(h=>{const b=i.current;if(!b)return null;const v=b.querySelector(`[data-tab-id="${h}"]`);if(!v)return null;const E=b.getBoundingClientRect(),y=v.getBoundingClientRect();return{left:y.left-E.left,width:y.width}},[]),p=f.useCallback((h,b,v)=>{const E=l.current;E&&(E.style.transition=b,E.style.left=`${h.left}px`,E.style.width=`${h.width}px`,E.style.transform=`scaleY(${v})`)},[]);f.useEffect(()=>{const h=x(e);h&&(c.current=h,p(h,"none",1),l.current&&(l.current.style.opacity="1"),d.current=!0)},[]),f.useEffect(()=>{if(!d.current||u.current!==null)return;const h=x(e);h&&(c.current=h,p(h,"none",1))},[e,x,p]);const g=f.useCallback(h=>{if(h===e||(r(h),!d.current))return;u.current&&clearTimeout(u.current);const b=c.current??x(e),v=x(h);if(!b||!v)return;const E=Math.min(b.left,v.left),y=Math.max(b.left+b.width,v.left+v.width)-E;p({left:E,width:y},"left 130ms ease-out, width 130ms ease-out, transform 130ms ease-out",.55),u.current=setTimeout(()=>{const k=x(h)??v;c.current=k,p(k,"left 160ms ease-in, width 160ms ease-in, transform 160ms ease-in",1),u.current=null},130)},[e,x,r,p]);return f.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),o.jsxRuntimeExports.jsxs("div",{ref:i,role:"tablist","data-testid":"liquid-tabs",style:{background:"var(--roster-lt-bg)",borderColor:"var(--roster-lt-border)"},className:N.cn("rst:relative rst:flex rst:border",m?"rst:w-full rst:overflow-hidden rst:rounded-lg":N.cn("rst:gap-1 rst:rounded-xl rst:p-1",n?"rst:w-full":"rst:w-fit"),a),children:[o.jsxRuntimeExports.jsx("div",{ref:l,"aria-hidden":!0,"data-testid":"liquid-tabs-pill",className:N.cn("rst:absolute rst:rounded-lg",m?"rst:top-0 rst:bottom-0":"rst:top-1 rst:bottom-1"),style:{opacity:0,left:0,width:0,background:"var(--roster-lt-pill)"}}),t.map(h=>{const b=h.id===e;return o.jsxRuntimeExports.jsx("button",{role:"tab","aria-selected":b,"data-tab-id":h.id,"data-testid":`liquid-tab-${h.id}`,onClick:()=>g(h.id),className:N.cn("rst:relative rst:z-10 rst:text-sm rst:font-medium rst:transition-colors rst:cursor-pointer",m?N.cn("rst:flex-1 rst:py-2",b?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)"):N.cn("rst:rounded-lg rst:py-1.5",n?"rst:flex-1":"rst:px-4",b?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)")),children:typeof h.label=="function"?h.label(b):h.label},h.id)})]})}function jt(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t?.(n),r===!1||!n.defaultPrevented)return e?.(n)}}function Pn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const s=t.map(n=>{const a=Pn(n,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<s.length;n++){const a=s[n];typeof a=="function"?a():Pn(t[n],null)}}}}function Ut(...t){return w.useCallback(Ha(...t),t)}function za(t,e=[]){let r=[];function s(a,i){const l=w.createContext(i),c=r.length;r=[...r,i];const u=m=>{const{scope:x,children:p,...g}=m,h=x?.[t]?.[c]||l,b=w.useMemo(()=>g,Object.values(g));return o.jsxRuntimeExports.jsx(h.Provider,{value:b,children:p})};u.displayName=a+"Provider";function d(m,x){const p=x?.[t]?.[c]||l,g=w.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,d]}const n=()=>{const a=r.map(i=>w.createContext(i));return function(l){const c=l?.[t]||a;return w.useMemo(()=>({[`__scope${t}`]:{...l,[t]:c}}),[l,c])}};return n.scopeName=t,[s,Df(n,...e)]}function Df(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const s=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const i=s.reduce((l,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...l,...m}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function Ff(t){const e=Mf(t),r=w.forwardRef((s,n)=>{const{children:a,...i}=s,l=w.Children.toArray(a),c=l.find(_f);if(c){const u=c.props.children,d=l.map(m=>m===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return o.jsxRuntimeExports.jsx(e,{...i,ref:n,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsxRuntimeExports.jsx(e,{...i,ref:n,children:a})});return r.displayName=`${t}.Slot`,r}function Mf(t){const e=w.forwardRef((r,s)=>{const{children:n,...a}=r;if(w.isValidElement(n)){const i=Bf(n),l=Vf(a,n.props);return n.type!==w.Fragment&&(l.ref=s?Ha(s,i):i),w.cloneElement(n,l)}return w.Children.count(n)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Wa=Symbol("radix.slottable");function Lf(t){const e=({children:r})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Wa,e}function _f(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Wa}function Vf(t,e){const r={...e};for(const s in e){const n=t[s],a=e[s];/^on[A-Z]/.test(s)?n&&a?r[s]=(...l)=>{const c=a(...l);return n(...l),c}:n&&(r[s]=n):s==="style"?r[s]={...n,...a}:s==="className"&&(r[s]=[n,a].filter(Boolean).join(" "))}return{...t,...r}}function Bf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Hf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=Hf.reduce((t,e)=>{const r=Ff(`Primitive.${e}`),s=w.forwardRef((n,a)=>{const{asChild:i,...l}=n,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsxRuntimeExports.jsx(c,{...l,ref:a})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function zf(t,e){t&&ge.flushSync(()=>t.dispatchEvent(e))}function kr(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>e.current?.(...r),[])}function Wf(t,e=globalThis?.document){const r=kr(t);w.useEffect(()=>{const s=n=>{n.key==="Escape"&&r(n)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[r,e])}var Yf="DismissableLayer",Kr="dismissableLayer.update",Uf="dismissableLayer.pointerDownOutside",Kf="dismissableLayer.focusOutside",$n,Ya=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ua=w.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...c}=t,u=w.useContext(Ya),[d,m]=w.useState(null),x=d?.ownerDocument??globalThis?.document,[,p]=w.useState({}),g=Ut(e,S=>m(S)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(b),E=d?h.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,k=E>=v,R=Xf(S=>{const F=S.target,B=[...u.branches].some(j=>j.contains(F));!k||B||(n?.(S),i?.(S),S.defaultPrevented||l?.())},x),O=Qf(S=>{const F=S.target;[...u.branches].some(j=>j.contains(F))||(a?.(S),i?.(S),S.defaultPrevented||l?.())},x);return Wf(S=>{E===u.layers.size-1&&(s?.(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},x),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($n=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Tn(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=$n)}},[d,x,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Tn())},[d,u]),w.useEffect(()=>{const S=()=>p({});return document.addEventListener(Kr,S),()=>document.removeEventListener(Kr,S)},[]),o.jsxRuntimeExports.jsx(_t.div,{...c,ref:g,style:{pointerEvents:y?k?"auto":"none":void 0,...t.style},onFocusCapture:jt(t.onFocusCapture,O.onFocusCapture),onBlurCapture:jt(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:jt(t.onPointerDownCapture,R.onPointerDownCapture)})});Ua.displayName=Yf;var Gf="DismissableLayerBranch",qf=w.forwardRef((t,e)=>{const r=w.useContext(Ya),s=w.useRef(null),n=Ut(e,s);return w.useEffect(()=>{const a=s.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),o.jsxRuntimeExports.jsx(_t.div,{...t,ref:n})});qf.displayName=Gf;function Xf(t,e=globalThis?.document){const r=kr(t),s=w.useRef(!1),n=w.useRef(()=>{});return w.useEffect(()=>{const a=l=>{if(l.target&&!s.current){let c=function(){Ka(Uf,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=c,e.addEventListener("click",n.current,{once:!0})):c()}else e.removeEventListener("click",n.current);s.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",n.current)}},[e,r]),{onPointerDownCapture:()=>s.current=!0}}function Qf(t,e=globalThis?.document){const r=kr(t),s=w.useRef(!1);return w.useEffect(()=>{const n=a=>{a.target&&!s.current&&Ka(Kf,r,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Tn(){const t=new CustomEvent(Kr);document.dispatchEvent(t)}function Ka(t,e,r,{discrete:s}){const n=r.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),s?zf(n,a):n.dispatchEvent(a)}var Mt=globalThis?.document?w.useLayoutEffect:()=>{},Zf=w[" useId ".trim().toString()]||(()=>{}),Jf=0;function tp(t){const[e,r]=w.useState(Zf());return Mt(()=>{r(s=>s??String(Jf++))},[t]),e?`radix-${e}`:""}var ep="Arrow",Ga=w.forwardRef((t,e)=>{const{children:r,width:s=10,height:n=5,...a}=t;return o.jsxRuntimeExports.jsx(_t.svg,{...a,ref:e,width:s,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:o.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ga.displayName=ep;var rp=Ga;function sp(t){const[e,r]=w.useState(void 0);return Mt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let i,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=t.offsetWidth,l=t.offsetHeight;r({width:i,height:l})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),e}var As="Popper",[qa,Xa]=za(As),[np,Qa]=qa(As),Za=t=>{const{__scopePopper:e,children:r}=t,[s,n]=w.useState(null);return o.jsxRuntimeExports.jsx(np,{scope:e,anchor:s,onAnchorChange:n,children:r})};Za.displayName=As;var Ja="PopperAnchor",ti=w.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:s,...n}=t,a=Qa(Ja,r),i=w.useRef(null),l=Ut(e,i),c=w.useRef(null);return w.useEffect(()=>{const u=c.current;c.current=s?.current||i.current,u!==c.current&&a.onAnchorChange(c.current)}),s?null:o.jsxRuntimeExports.jsx(_t.div,{...n,ref:l})});ti.displayName=Ja;var Ds="PopperContent",[op,ap]=qa(Ds),ei=w.forwardRef((t,e)=>{const{__scopePopper:r,side:s="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:p="optimized",onPlaced:g,...h}=t,b=Qa(Ds,r),[v,E]=w.useState(null),y=Ut(e,K=>E(K)),[k,R]=w.useState(null),O=sp(k),S=O?.width??0,F=O?.height??0,B=s+(a!=="center"?"-"+a:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],M=T.length>0,L={padding:j,boundary:T.filter(lp),altBoundary:M},{refs:$,floatingStyles:A,placement:D,isPositioned:z,middlewareData:C}=jo({strategy:"fixed",placement:B,whileElementsMounted:(...K)=>ko(...K,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[xs({mainAxis:n+F,alignmentAxis:i}),c&&So({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Vc():void 0,...L}),c&&Co({...L}),No({...L,apply:({elements:K,rects:et,availableWidth:st,availableHeight:Kt})=>{const{width:le,height:Fe}=et.reference,Me=K.floating.style;Me.setProperty("--radix-popper-available-width",`${st}px`),Me.setProperty("--radix-popper-available-height",`${Kt}px`),Me.setProperty("--radix-popper-anchor-width",`${le}px`),Me.setProperty("--radix-popper-anchor-height",`${Fe}px`)}}),k&&Hc({element:k,padding:l}),cp({arrowWidth:S,arrowHeight:F}),x&&Bc({strategy:"referenceHidden",...L})]}),[P,V]=ni(D),X=kr(g);Mt(()=>{z&&X?.()},[z,X]);const G=C.arrow?.x,I=C.arrow?.y,H=C.arrow?.centerOffset!==0,[Y,_]=w.useState();return Mt(()=>{v&&_(window.getComputedStyle(v).zIndex)},[v]),o.jsxRuntimeExports.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:z?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[C.transformOrigin?.x,C.transformOrigin?.y].join(" "),...C.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsxRuntimeExports.jsx(op,{scope:r,placedSide:P,onArrowChange:R,arrowX:G,arrowY:I,shouldHideArrow:H,children:o.jsxRuntimeExports.jsx(_t.div,{"data-side":P,"data-align":V,...h,ref:y,style:{...h.style,animation:z?void 0:"none"}})})})});ei.displayName=Ds;var ri="PopperArrow",ip={top:"bottom",right:"left",bottom:"top",left:"right"},si=w.forwardRef(function(e,r){const{__scopePopper:s,...n}=e,a=ap(ri,s),i=ip[a.placedSide];return o.jsxRuntimeExports.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:o.jsxRuntimeExports.jsx(rp,{...n,ref:r,style:{...n.style,display:"block"}})})});si.displayName=ri;function lp(t){return t!==null}var cp=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:s,middlewareData:n}=e,i=n.arrow?.centerOffset!==0,l=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,d]=ni(r),m={start:"0%",center:"50%",end:"100%"}[d],x=(n.arrow?.x??0)+l/2,p=(n.arrow?.y??0)+c/2;let g="",h="";return u==="bottom"?(g=i?m:`${x}px`,h=`${-c}px`):u==="top"?(g=i?m:`${x}px`,h=`${s.floating.height+c}px`):u==="right"?(g=`${-c}px`,h=i?m:`${p}px`):u==="left"&&(g=`${s.floating.width+c}px`,h=i?m:`${p}px`),{data:{x:g,y:h}}}});function ni(t){const[e,r="center"]=t.split("-");return[e,r]}var up=Za,dp=ti,fp=ei,pp=si,mp="Portal",oi=w.forwardRef((t,e)=>{const{container:r,...s}=t,[n,a]=w.useState(!1);Mt(()=>a(!0),[]);const i=r||n&&globalThis?.document?.body;return i?xt.createPortal(o.jsxRuntimeExports.jsx(_t.div,{...s,ref:e}),i):null});oi.displayName=mp;function xp(t,e){return w.useReducer((r,s)=>e[r][s]??r,t)}var Fs=t=>{const{present:e,children:r}=t,s=gp(e),n=typeof r=="function"?r({present:s.isPresent}):w.Children.only(r),a=Ut(s.ref,hp(n));return typeof r=="function"||s.isPresent?w.cloneElement(n,{ref:a}):null};Fs.displayName="Presence";function gp(t){const[e,r]=w.useState(),s=w.useRef(null),n=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[l,c]=xp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Ve(s.current);a.current=l==="mounted"?u:"none"},[l]),Mt(()=>{const u=s.current,d=n.current;if(d!==t){const x=a.current,p=Ve(u);t?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&x!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,c]),Mt(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,m=p=>{const h=Ve(s.current).includes(CSS.escape(p.animationName));if(p.target===e&&h&&(c("ANIMATION_END"),!n.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},x=p=>{p.target===e&&(a.current=Ve(s.current))};return e.addEventListener("animationstart",x),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",x),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:w.useCallback(u=>{s.current=u?getComputedStyle(u):null,r(u)},[])}}function Ve(t){return t?.animationName||"none"}function hp(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var bp=w[" useInsertionEffect ".trim().toString()]||Mt;function vp({prop:t,defaultProp:e,onChange:r=()=>{},caller:s}){const[n,a,i]=yp({defaultProp:e,onChange:r}),l=t!==void 0,c=l?t:n;{const d=w.useRef(t!==void 0);w.useEffect(()=>{const m=d.current;m!==l&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,s])}const u=w.useCallback(d=>{if(l){const m=wp(d)?d(t):d;m!==t&&i.current?.(m)}else a(d)},[l,t,a,i]);return[c,u]}function yp({defaultProp:t,onChange:e}){const[r,s]=w.useState(t),n=w.useRef(r),a=w.useRef(e);return bp(()=>{a.current=e},[e]),w.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,s,a]}function wp(t){return typeof t=="function"}var Ep=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kp="VisuallyHidden",ai=w.forwardRef((t,e)=>o.jsxRuntimeExports.jsx(_t.span,{...t,ref:e,style:{...Ep,...t.style}}));ai.displayName=kp;var Rp=ai,[Rr]=za("Tooltip",[Xa]),jr=Xa(),ii="TooltipProvider",jp=700,Gr="tooltip.open",[Sp,Ms]=Rr(ii),li=t=>{const{__scopeTooltip:e,delayDuration:r=jp,skipDelayDuration:s=300,disableHoverableContent:n=!1,children:a}=t,i=w.useRef(!0),l=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsxRuntimeExports.jsx(Sp,{scope:e,isOpenDelayedRef:i,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,s)},[s]),isPointerInTransitRef:l,onPointerInTransitChange:w.useCallback(u=>{l.current=u},[]),disableHoverableContent:n,children:a})};li.displayName=ii;var Ee="Tooltip",[Cp,De]=Rr(Ee),ci=t=>{const{__scopeTooltip:e,children:r,open:s,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=t,c=Ms(Ee,t.__scopeTooltip),u=jr(e),[d,m]=w.useState(null),x=tp(),p=w.useRef(0),g=i??c.disableHoverableContent,h=l??c.delayDuration,b=w.useRef(!1),[v,E]=vp({prop:s,defaultProp:n??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Gr))):c.onClose(),a?.(S)},caller:Ee}),y=w.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),k=w.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,E(!0)},[E]),R=w.useCallback(()=>{window.clearTimeout(p.current),p.current=0,E(!1)},[E]),O=w.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,E(!0),p.current=0},h)},[h,E]);return w.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),o.jsxRuntimeExports.jsx(up,{...u,children:o.jsxRuntimeExports.jsx(Cp,{scope:e,contentId:x,open:v,stateAttribute:y,trigger:d,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?O():k()},[c.isOpenDelayedRef,O,k]),onTriggerLeave:w.useCallback(()=>{g?R():(window.clearTimeout(p.current),p.current=0)},[R,g]),onOpen:k,onClose:R,disableHoverableContent:g,children:r})})};ci.displayName=Ee;var qr="TooltipTrigger",ui=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...s}=t,n=De(qr,r),a=Ms(qr,r),i=jr(r),l=w.useRef(null),c=Ut(e,l,n.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),m=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),o.jsxRuntimeExports.jsx(dp,{asChild:!0,...i,children:o.jsxRuntimeExports.jsx(_t.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...s,ref:c,onPointerMove:jt(t.onPointerMove,x=>{x.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),d.current=!0)}),onPointerLeave:jt(t.onPointerLeave,()=>{n.onTriggerLeave(),d.current=!1}),onPointerDown:jt(t.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:jt(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:jt(t.onBlur,n.onClose),onClick:jt(t.onClick,n.onClose)})})});ui.displayName=qr;var Ls="TooltipPortal",[Np,Op]=Rr(Ls,{forceMount:void 0}),di=t=>{const{__scopeTooltip:e,forceMount:r,children:s,container:n}=t,a=De(Ls,e);return o.jsxRuntimeExports.jsx(Np,{scope:e,forceMount:r,children:o.jsxRuntimeExports.jsx(Fs,{present:r||a.open,children:o.jsxRuntimeExports.jsx(oi,{asChild:!0,container:n,children:s})})})};di.displayName=Ls;var te="TooltipContent",fi=w.forwardRef((t,e)=>{const r=Op(te,t.__scopeTooltip),{forceMount:s=r.forceMount,side:n="top",...a}=t,i=De(te,t.__scopeTooltip);return o.jsxRuntimeExports.jsx(Fs,{present:s||i.open,children:i.disableHoverableContent?o.jsxRuntimeExports.jsx(pi,{side:n,...a,ref:e}):o.jsxRuntimeExports.jsx(Pp,{side:n,...a,ref:e})})}),Pp=w.forwardRef((t,e)=>{const r=De(te,t.__scopeTooltip),s=Ms(te,t.__scopeTooltip),n=w.useRef(null),a=Ut(e,n),[i,l]=w.useState(null),{trigger:c,onClose:u}=r,d=n.current,{onPointerInTransitChange:m}=s,x=w.useCallback(()=>{l(null),m(!1)},[m]),p=w.useCallback((g,h)=>{const b=g.currentTarget,v={x:g.clientX,y:g.clientY},E=Ap(v,b.getBoundingClientRect()),y=Dp(v,E),k=Fp(h.getBoundingClientRect()),R=Lp([...y,...k]);l(R),m(!0)},[m]);return w.useEffect(()=>()=>x(),[x]),w.useEffect(()=>{if(c&&d){const g=b=>p(b,d),h=b=>p(b,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[c,d,p,x]),w.useEffect(()=>{if(i){const g=h=>{const b=h.target,v={x:h.clientX,y:h.clientY},E=c?.contains(b)||d?.contains(b),y=!Mp(v,i);E?x():y&&(x(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,i,u,x]),o.jsxRuntimeExports.jsx(pi,{...t,ref:a})}),[$p,Tp]=Rr(Ee,{isInside:!1}),Ip=Lf("TooltipContent"),pi=w.forwardRef((t,e)=>{const{__scopeTooltip:r,children:s,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=t,c=De(te,r),u=jr(r),{onClose:d}=c;return w.useEffect(()=>(document.addEventListener(Gr,d),()=>document.removeEventListener(Gr,d)),[d]),w.useEffect(()=>{if(c.trigger){const m=x=>{x.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),o.jsxRuntimeExports.jsx(Ua,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:o.jsxRuntimeExports.jsxs(fp,{"data-state":c.stateAttribute,...u,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsxRuntimeExports.jsx(Ip,{children:s}),o.jsxRuntimeExports.jsx($p,{scope:r,isInside:!0,children:o.jsxRuntimeExports.jsx(Rp,{id:c.contentId,role:"tooltip",children:n||s})})]})})});fi.displayName=te;var mi="TooltipArrow",xi=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...s}=t,n=jr(r);return Tp(mi,r).isInside?null:o.jsxRuntimeExports.jsx(pp,{...n,...s,ref:e})});xi.displayName=mi;function Ap(t,e){const r=Math.abs(e.top-t.y),s=Math.abs(e.bottom-t.y),n=Math.abs(e.right-t.x),a=Math.abs(e.left-t.x);switch(Math.min(r,s,n,a)){case a:return"left";case n:return"right";case r:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Dp(t,e,r=5){const s=[];switch(e){case"top":s.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":s.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":s.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":s.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return s}function Fp(t){const{top:e,right:r,bottom:s,left:n}=t;return[{x:n,y:e},{x:r,y:e},{x:r,y:s},{x:n,y:s}]}function Mp(t,e){const{x:r,y:s}=t;let n=!1;for(let a=0,i=e.length-1;a<e.length;i=a++){const l=e[a],c=e[i],u=l.x,d=l.y,m=c.x,x=c.y;d>s!=x>s&&r<(m-u)*(s-d)/(x-d)+u&&(n=!n)}return n}function Lp(t){const e=t.slice();return e.sort((r,s)=>r.x<s.x?-1:r.x>s.x?1:r.y<s.y?-1:r.y>s.y?1:0),_p(e)}function _p(t){if(t.length<=1)return t.slice();const e=[];for(let s=0;s<t.length;s++){const n=t[s];for(;e.length>=2;){const a=e[e.length-1],i=e[e.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const r=[];for(let s=t.length-1;s>=0;s--){const n=t[s];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var Vp=li,Bp=ci,Hp=ui,zp=di,Wp=fi,Yp=xi;function Up({content:t,children:e,placement:r="top",variant:s="dark",delayDuration:n=300,defaultOpen:a=!1,className:i}){const[l,c]=f.useState(a),u=f.useCallback(()=>c(d=>!d),[]);return o.jsxRuntimeExports.jsx(Vp,{delayDuration:n,children:o.jsxRuntimeExports.jsxs(Bp,{open:l,onOpenChange:c,children:[o.jsxRuntimeExports.jsx(Hp,{asChild:!0,onClick:u,children:o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex rst:items-center rst:cursor-default",tabIndex:0,"data-testid":"tooltip-trigger",children:e})}),o.jsxRuntimeExports.jsx(zp,{children:o.jsxRuntimeExports.jsxs(Wp,{side:r,sideOffset:8,collisionPadding:8,"data-testid":"tooltip-content",className:N.cn("rst:z-50 rst:max-w-60 rst:rounded-lg rst:px-3 rst:py-2 rst:text-xs rst:leading-snug rst:shadow-xl","rst:animate-in rst:fade-in-0 rst:zoom-in-95","rst:data-[side=bottom]:slide-in-from-top-2","rst:data-[side=top]:slide-in-from-bottom-2","rst:data-[side=left]:slide-in-from-right-2","rst:data-[side=right]:slide-in-from-left-2",s==="dark"?"rst:bg-zinc-900 rst:text-zinc-100 rst:ring-1 rst:ring-white/10":"rst:bg-white rst:text-zinc-900 rst:ring-1 rst:ring-zinc-200",i),children:[t,o.jsxRuntimeExports.jsx(Yp,{className:s==="dark"?"rst:fill-zinc-900":"rst:fill-white",width:12,height:6})]})})]})})}const Kp={xs:"rst:max-h-8",sm:"rst:max-h-16",md:"rst:max-h-24",lg:"rst:max-h-36"};function Gp({children:t,size:e="md",expandLabel:r="Show more",collapseLabel:s="Show less",className:n}){const[a,i]=f.useState(!1),[l,c]=f.useState(!1),u=f.useRef(null);return f.useEffect(()=>{const d=u.current;d&&c(d.scrollHeight>d.clientHeight)},[t,e]),o.jsxRuntimeExports.jsxs("div",{className:n,children:[o.jsxRuntimeExports.jsx("div",{ref:u,"data-testid":"collapsible-content",className:N.cn(!a&&Kp[e],!a&&"rst:overflow-hidden"),style:!a&&l?{maskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 50%, transparent 100%)"}:void 0,children:t}),l&&o.jsxRuntimeExports.jsx("button",{type:"button","data-testid":"collapsible-toggle",onClick:()=>i(d=>!d),className:"rst:mt-2 rst:text-xs rst:font-medium rst:text-primary-500 rst:dark:text-primary-400 rst:hover:opacity-80 rst:transition-opacity rst:cursor-pointer",children:a?s:r})]})}function qp({segments:t,size:e="md",showLegend:r=!0,className:s}){const n=t.reduce((i,l)=>i+l.value,0);if(n===0)return null;const a=t.filter(i=>i.value>0);return o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:flex-col rst:gap-1.5",s),children:[o.jsxRuntimeExports.jsx("div",{"data-testid":"segment-bar-track",className:N.cn("rst:flex rst:w-full rst:overflow-hidden rst:rounded-full",e==="sm"?"rst:h-1.5":"rst:h-2"),children:a.map(i=>{const l=i.value/n*100;return o.jsxRuntimeExports.jsx("div",{"data-testid":`segment-${i.key}`,className:"rst:transition-[width]",style:{width:`${l}%`,backgroundColor:i.color},title:`${i.label}: ${Math.round(l)}%`},i.key)})}),r&&o.jsxRuntimeExports.jsx("div",{"data-testid":"segment-bar-legend",className:"rst:flex rst:flex-wrap rst:gap-x-3 rst:gap-y-0.5",children:a.map(i=>{const l=Math.round(i.value/n*100);return o.jsxRuntimeExports.jsxs("span",{className:"rst:flex rst:items-center rst:gap-1.5 rst:text-xs rst:text-gray-600 rst:dark:text-gray-400",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:h-2 rst:w-2 rst:flex-none rst:rounded-full",style:{backgroundColor:i.color},"aria-hidden":"true"}),i.label,o.jsxRuntimeExports.jsxs("span",{className:"rst:opacity-60",children:[l,"%"]})]},i.key)})})]})}const gi=o.cva("rst:flex rst:items-start rst:gap-2.5 rst:rounded-lg rst:border-l-4 rst:px-4 rst:py-3 rst:text-sm",{variants:{colorScheme:{error:"rst:border-error-500 rst:bg-error-50 rst:text-error-800 rst:dark:border-error-400 rst:dark:bg-error-500/10 rst:dark:text-error-200",success:"rst:border-success-500 rst:bg-success-50 rst:text-success-800 rst:dark:border-success-400 rst:dark:bg-success-500/10 rst:dark:text-success-200",amber:"rst:border-amber-500 rst:bg-amber-50 rst:text-amber-900 rst:dark:border-amber-400 rst:dark:bg-amber-500/10 rst:dark:text-amber-200",info:"rst:border-info-500 rst:bg-info-50 rst:text-info-800 rst:dark:border-info-400 rst:dark:bg-info-500/10 rst:dark:text-info-200",primary:"rst:border-primary-500 rst:bg-primary-50 rst:text-primary-800 rst:dark:border-primary-400 rst:dark:bg-primary-500/10 rst:dark:text-primary-200",neutral:"rst:border-gray-400 rst:bg-gray-50 rst:text-gray-800 rst:dark:border-gray-500 rst:dark:bg-gray-500/10 rst:dark:text-gray-200"}},defaultVariants:{colorScheme:"error"}}),Xp={error:o.faCircleExclamation,success:o.faCircleCheck,amber:o.faTriangleExclamation,info:o.faCircleInfo,primary:o.faCircleInfo,neutral:o.faCircleInfo},hi=f.forwardRef(({colorScheme:t="error",title:e,children:r,icon:s,onDismiss:n,dismissLabel:a="Dismiss",className:i,...l},c)=>{const u=t==="error";return o.jsxRuntimeExports.jsxs("div",{ref:c,role:u?"alert":"status","aria-live":u?"assertive":"polite",className:N.cn(gi({colorScheme:t}),i),...l,children:[s===void 0?o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:Xp[t??"error"],className:"rst:mt-0.5 rst:h-4 rst:w-4 rst:shrink-0","aria-hidden":"true"}):s,o.jsxRuntimeExports.jsxs("div",{className:"rst:min-w-0 rst:flex-1",children:[e&&o.jsxRuntimeExports.jsx("p",{className:"rst:font-semibold",children:e}),o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:min-w-0",e&&"rst:mt-0.5 rst:opacity-90"),children:r})]}),n&&o.jsxRuntimeExports.jsx("button",{type:"button",onClick:n,"aria-label":a,className:"rst:-m-1 rst:shrink-0 rst:rounded rst:p-1 rst:opacity-60 rst:transition-opacity rst:hover:opacity-100 rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-current",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]})});hi.displayName="Alert";const Qp=({items:t,allowMultiple:e=!1,variant:r="soft",className:s,showDividers:n=!1,defaultOpenIds:a=[]})=>{const[i,l]=f.useState(new Set(a)),c=u=>{l(d=>{const m=new Set(d),x=m.has(u);return e?x?m.delete(u):m.add(u):(m.clear(),x||m.add(u)),m})};return o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:w-full rst:space-y-1",s),children:t.map((u,d)=>o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[n&&d>0&&o.jsxRuntimeExports.jsx("div",{className:"rst:mx-4 rst:h-px rst:bg-gray-200/50 rst:dark:bg-gray-700/50 rst:transition-colors rst:mb-1"}),o.jsxRuntimeExports.jsx(Ra,{title:u.title,variant:r,isOpen:i.has(u.id),onToggle:()=>c(u.id),children:u.content})]},u.id))})},bi=o.cva("rst:m-0",{variants:{layout:{inline:"rst:grid rst:grid-cols-[auto_1fr] rst:gap-x-3",stacked:"rst:flex rst:flex-col",split:"rst:flex rst:flex-col"},size:{sm:"rst:text-[0.65625rem] rst:gap-y-[5px]",md:"rst:text-xs rst:gap-y-1.5"}},defaultVariants:{layout:"inline",size:"sm"}}),vi=f.forwardRef(({items:t,layout:e,size:r,dividers:s=!1,className:n,...a},i)=>o.jsxRuntimeExports.jsx("dl",{ref:i,className:N.cn(bi({layout:e,size:r}),n),...a,children:t.map((l,c)=>{const u=c===t.length-1,d=s&&!u?"rst:border-b rst:border-gray-200 rst:pb-1.5 rst:dark:border-gray-800":"";return e==="stacked"?o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:flex-col rst:gap-0.5",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c):e==="split"?o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:items-baseline rst:justify-between rst:gap-4",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-right rst:tabular-nums rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c):o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:contents",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:whitespace-nowrap rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c)})}));vi.displayName="DescriptionList";const yi=o.cva("rst:my-1",{variants:{variant:{rule:"rst:border-l-2 rst:pl-4 rst:py-[2px]",plain:"",centered:"rst:text-center rst:py-4 rst:[&>blockquote]:mx-auto"},colorScheme:{primary:"rst:border-primary-500 rst:dark:border-primary-400",success:"rst:border-success-500 rst:dark:border-success-400",error:"rst:border-error-500 rst:dark:border-error-400",amber:"rst:border-amber-500 rst:dark:border-amber-400",neutral:"rst:border-gray-300 rst:dark:border-gray-700",current:"rst:border-current"}},defaultVariants:{variant:"rule",colorScheme:"primary"}}),wi=f.forwardRef(({children:t,cite:e,citeUrl:r,variant:s,colorScheme:n,className:a,...i},l)=>o.jsxRuntimeExports.jsxs("figure",{ref:l,className:N.cn(yi({variant:s,colorScheme:n}),a),...i,children:[o.jsxRuntimeExports.jsx("blockquote",{cite:r,className:"rst:m-0 rst:max-w-[48ch] rst:text-[1.03125rem] rst:leading-[1.5] rst:text-gray-900 rst:dark:text-gray-100",children:t}),e&&o.jsxRuntimeExports.jsx("figcaption",{className:"rst:mt-[7px] rst:font-mono rst:text-[0.625rem] rst:uppercase rst:leading-none rst:tracking-[0.14em] rst:text-gray-500 rst:dark:text-gray-400",children:e})]}));wi.displayName="Pullquote";const Xr=o.cva("rst:flex rst:items-center rst:text-sm rst:font-medium rst:transition-colors",{variants:{variant:{default:"rst:text-gray-500 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100",primary:"rst:text-primary-600 rst:hover:text-primary-800 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",inverse:"rst:text-gray-300 rst:hover:text-white rst:dark:text-gray-400 rst:dark:hover:text-white"}},defaultVariants:{variant:"default"}}),Zp=({items:t,separator:e,showHomeIcon:r,homeHref:s="/",linkComponent:n,currentClassName:a,variant:i,className:l,...c})=>{const u=n??Ht,d=e??o.jsxRuntimeExports.jsx("span",{className:"rst:text-gray-300 rst:dark:text-gray-600 rst:text-sm rst:transition-colors",children:"/"});return o.jsxRuntimeExports.jsx("nav",{"aria-label":"Breadcrumb",className:N.cn("rst:flex",l),...c,children:o.jsxRuntimeExports.jsxs("ol",{className:"rst:flex rst:items-center rst:space-x-2",children:[r&&o.jsxRuntimeExports.jsxs("li",{className:"rst:flex rst:items-center",children:[o.jsxRuntimeExports.jsx(u,{href:s,className:N.cn(Xr({variant:i}),"rst:hover:underline-none"),"aria-label":"Home",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faHome,className:"rst:h-4 rst:w-4"})}),o.jsxRuntimeExports.jsx("span",{className:"rst:ml-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:d})]}),t.map((m,x)=>{const p=x===t.length-1;return o.jsxRuntimeExports.jsxs("li",{className:"rst:flex rst:items-center",children:[x>0&&o.jsxRuntimeExports.jsx("span",{className:"rst:mr-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:d}),p||!m.href?o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:font-semibold rst:text-sm rst:cursor-default rst:transition-colors",i==="inverse"?"rst:text-white":"rst:text-gray-900 rst:dark:text-gray-100",p&&a,m.className),"aria-current":p?"page":void 0,children:m.label}):o.jsxRuntimeExports.jsx(u,{href:m.href,className:N.cn(Xr({variant:i}),"rst:hover:underline",m.className),children:m.label})]},x)})]})})},Ei=o.cva("rst:relative rst:flex rst:flex-col rst:gap-4 rst:overflow-hidden rst:rounded-lg rst:border rst:p-6 rst:shadow-sm rst:transition-all rst:md:flex-row rst:md:items-center rst:md:justify-between",{variants:{variant:{primary:"rst:border-primary-200 rst:bg-primary-50 rst:text-primary-900 rst:dark:border-primary-800 rst:dark:bg-primary-900/30 rst:dark:text-primary-200",neutral:"rst:border-gray-200 rst:bg-white rst:text-gray-900 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100",warning:"rst:border-amber-200 rst:bg-amber-50 rst:text-amber-900 rst:dark:border-amber-800 rst:dark:bg-amber-900/30 rst:dark:text-amber-200",error:"rst:border-error-200 rst:bg-error-50 rst:text-error-900 rst:dark:border-error-800 rst:dark:bg-error-900/30 rst:dark:text-error-200",success:"rst:border-success-200 rst:bg-success-50 rst:text-success-900 rst:dark:border-success-800 rst:dark:bg-success-900/30 rst:dark:text-success-200",info:"rst:border-blue-200 rst:bg-blue-50 rst:text-blue-900 rst:dark:border-blue-800 rst:dark:bg-blue-900/30 rst:dark:text-blue-200"}},defaultVariants:{variant:"primary"}}),Jp=({title:t,description:e,action:r,icon:s,variant:n,onDismiss:a,className:i,...l})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(Ei({variant:n}),i),...l,children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-start rst:gap-4",children:[s&&o.jsxRuntimeExports.jsx("div",{className:"rst:mt-1 rst:shrink-0 rst:text-current",children:s}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:gap-1.5 rst:w-full",children:[o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-bold rst:leading-tight rst:tracking-tight rst:text-current",children:t}),e&&o.jsxRuntimeExports.jsx("div",{className:"rst:max-w-prose rst:text-sm rst:leading-relaxed rst:text-current rst:opacity-90 rst:dark:opacity-80",children:e})]})]}),r&&o.jsxRuntimeExports.jsx("div",{className:"rst:shrink-0 rst:pt-2 rst:md:pt-0",children:r}),a&&o.jsxRuntimeExports.jsx("div",{className:"rst:absolute rst:right-2 rst:top-2",children:o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",size:"sm",className:"rst:h-8 rst:w-8 rst:rounded-full rst:p-0 rst:opacity-60 rst:hover:opacity-100 rst:dark:hover:bg-black/20",onClick:a,"aria-label":"Dismiss",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-4 rst:w-4"})})})]}),ki=o.cva("rst:flex rst:flex-col rst:items-center rst:justify-center rst:text-center rst:p-8 rst:rounded-lg rst:transition-colors",{variants:{variant:{dashed:"rst:border-2 rst:border-dashed rst:border-gray-300 rst:bg-gray-50 rst:hover:bg-gray-100/50 rst:dark:border-gray-700 rst:dark:bg-gray-500/10 rst:dark:hover:bg-gray-500/15",simple:"rst:border-transparent rst:bg-transparent rst:p-0"}},defaultVariants:{variant:"dashed"}}),tm=({title:t,description:e,icon:r,action:s,variant:n,className:a,...i})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(ki({variant:n}),a),...i,children:[r&&o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4 rst:flex rst:h-12 rst:w-12 rst:items-center rst:justify-center rst:rounded-full rst:bg-gray-100 rst:text-gray-400 rst:dark:bg-gray-800 rst:dark:text-gray-500",children:o.jsxRuntimeExports.jsx("div",{className:"rst:h-6 rst:w-6 rst:[&>svg]:h-full rst:[&>svg]:w-full",children:r})}),o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-semibold rst:text-gray-900 rst:dark:text-gray-100",children:t}),e&&o.jsxRuntimeExports.jsx("p",{className:"rst:mt-1 rst:max-w-sm rst:text-sm rst:text-gray-500 rst:dark:text-gray-400",children:e}),s&&o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:s})]}),Ri=o.cva("rst:flex rst:flex-col rst:items-center rst:justify-center rst:text-center rst:p-8 rst:rounded-lg rst:transition-colors",{variants:{variant:{card:"rst:border rst:border-error-200 rst:bg-error-50 rst:text-error-900 rst:dark:border-error-800 rst:dark:bg-error-500/10 rst:dark:text-error-100",page:"rst:bg-transparent rst:text-gray-900 rst:max-w-lg rst:mx-auto rst:py-16 rst:dark:text-gray-100"}},defaultVariants:{variant:"card"}}),em=({title:t="An Error Occurred",description:e,onRetry:r,action:s,icon:n,variant:a,className:i,...l})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(Ri({variant:a}),i),...l,children:[o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4 rst:flex rst:h-12 rst:w-12 rst:items-center rst:justify-center rst:rounded-full rst:bg-error-100 rst:text-error-600 rst:dark:bg-error-500/15 rst:dark:text-error-400",children:o.jsxRuntimeExports.jsx("div",{className:"rst:h-6 rst:w-6 rst:flex rst:items-center rst:justify-center",children:n||o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"rst:h-full rst:w-full"})})}),o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-bold rst:tracking-tight",children:t}),o.jsxRuntimeExports.jsx("p",{className:N.cn("rst:mt-2 rst:text-sm rst:leading-relaxed",a==="card"?"rst:text-error-800/80 rst:dark:text-error-200/80":"rst:text-gray-500 rst:dark:text-gray-400"),children:e}),o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:s||(r?o.jsxRuntimeExports.jsx(o.Button,{onClick:r,colorScheme:"error",variant:a==="card"?"outline":"solid",children:"Try Again"}):null)})]}),In=o.cva("rst:flex rst:items-center rst:gap-2 rst:transition-all",{variants:{state:{default:"",winner:"",loser:"rst:opacity-50 rst:grayscale",tie:""}},defaultVariants:{state:"default"}}),An=o.cva("rst:h-8 rst:w-8 rst:object-contain rst:transition-all rst:rounded-full",{variants:{state:{default:"",winner:"rst:ring-2 rst:ring-success-500 rst:bg-success-200/25",loser:"",tie:"rst:ring-2 rst:ring-gray-400"}},defaultVariants:{state:"default"}}),ji=f.forwardRef(({awayTeam:t,homeTeam:e,isCompleted:r=!1,isTie:s=!1,className:n,...a},i)=>{const l=d=>r?s?"tie":d.isWinner?"winner":"loser":"default",c=l(t),u=l(e);return o.jsxRuntimeExports.jsxs("button",{ref:i,type:"button",className:N.cn("rst:flex rst:items-center rst:gap-3 rst:rounded-lg rst:p-2 rst:text-left rst:transition rst:hover:bg-gray-100 rst:dark:hover:bg-slate-800",n),...a,children:[o.jsxRuntimeExports.jsxs("div",{className:In({state:c}),children:[o.jsxRuntimeExports.jsx("div",{className:"rst:relative",children:o.jsxRuntimeExports.jsx("img",{src:t.logoSrc,alt:t.name||`Team ${t.id}`,className:An({state:c})})}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-end",children:[t.accessory&&o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:text-sm rst:text-gray-800 rst:dark:text-gray-300",t.isWinner&&"rst:font-bold"),children:t.accessory}),r&&t.score!==void 0&&o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-mono rst:font-semibold rst:text-gray-900 rst:dark:text-white",children:t.score})]})]}),o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-medium rst:text-gray-500 rst:self-center rst:px-1",children:r?"-":"@"}),o.jsxRuntimeExports.jsxs("div",{className:In({state:u}),children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-start",children:[e.accessory&&o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:text-sm rst:text-gray-800 rst:dark:text-gray-300",e.isWinner&&"rst:font-bold"),children:e.accessory}),r&&e.score!==void 0&&o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-mono rst:font-semibold rst:text-gray-900 rst:dark:text-white",children:e.score})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:relative",children:o.jsxRuntimeExports.jsx("img",{src:e.logoSrc,alt:e.name||`Team ${e.id}`,className:An({state:u})})})]})]})});ji.displayName="MatchupCard";const Si=o.cva("rst:w-full rst:z-40 rst:shadow-lg rst:backdrop-blur-md rst:transition-all",{variants:{variant:{default:"rst:bg-white/50 rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-950/50 rst:dark:border-gray-800 rst:dark:text-gray-100",soft:"rst:bg-gray-50/50 rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-900/50 rst:dark:border-gray-800 rst:dark:text-gray-100",primary:"rst:bg-primary-700/50 rst:border-primary-800 rst:text-white rst:dark:bg-primary-950/50 rst:dark:border-primary-900 rst:dark:text-primary-50",transparent:"rst:bg-transparent rst:border-transparent rst:text-gray-900 rst:dark:text-gray-100 rst:shadow-none"},position:{top:"rst:sticky rst:top-0 rst:border-b",bottom:"rst:sticky rst:bottom-0 rst:border-t",static:"rst:relative rst:border-y"}},defaultVariants:{variant:"default",position:"top"}}),Ci=f.forwardRef(({title:t,subtitle:e,badge:r,actions:s,children:n,position:a,variant:i,className:l,...c},u)=>o.jsxRuntimeExports.jsx("div",{ref:u,className:N.cn(Si({variant:i,position:a}),l),...c,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:p-4",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:justify-between rst:items-center",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:sm:flex-row rst:sm:items-center rst:gap-x-4 rst:gap-y-2",children:[t&&o.jsxRuntimeExports.jsx("span",{className:"rst:font-semibold rst:text-lg",children:t}),r&&o.jsxRuntimeExports.jsx("div",{className:"rst:max-w-44 rst:sm:max-w-max rst:mr-2",children:r})]}),s&&o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:gap-2",children:s})]}),e&&o.jsxRuntimeExports.jsx("div",{className:"rst:text-sm rst:opacity-80 rst:mt-1 rst:font-medium",children:e}),n&&o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:flex-wrap rst:items-center rst:mt-4 rst:pt-4 rst:border-t rst:border-black/10 rst:dark:border-white/10 rst:gap-y-2",children:n})]})}));Ci.displayName="ActionBar";const rm=864e5,sm=6e4,nm=36e5,Dn=Symbol.for("constructDateFrom");function ee(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Dn in t?t[Dn](e):t instanceof Date?new t.constructor(e):new Date(e)}function ct(t,e){return ee(t,t)}function om(t,e,r){const s=ct(t);return isNaN(e)?ee(t,NaN):(e&&s.setDate(s.getDate()+e),s)}function am(t,e,r){const s=ct(t);if(isNaN(e))return ee(t,NaN);if(!e)return s;const n=s.getDate(),a=ee(t,s.getTime());a.setMonth(s.getMonth()+e+1,0);const i=a.getDate();return n>=i?a:(s.setFullYear(a.getFullYear(),a.getMonth(),n),s)}function ce(t,e,r){const{years:s=0,months:n=0,weeks:a=0,days:i=0,hours:l=0,minutes:c=0,seconds:u=0}=e,d=ct(t),m=n||s?am(d,n+s*12):d,x=i||a?om(m,i+a*7):m,p=c+l*60,h=(u+p*60)*1e3;return ee(t,+x+h)}function Fn(t){const e=ct(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function Vt(t,...e){const r=ee.bind(null,e.find(s=>typeof s=="object"));return e.map(r)}function Mn(t,e){const r=ct(t);return r.setHours(0,0,0,0),r}function im(t,e,r){const[s,n]=Vt(r?.in,t,e),a=Mn(s),i=Mn(n),l=+a-Fn(a),c=+i-Fn(i);return Math.round((l-c)/rm)}function xe(t,e){const r=+ct(t)-+ct(e);return r<0?-1:r>0?1:r}function lm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=s.getFullYear()-n.getFullYear(),i=s.getMonth()-n.getMonth();return a*12+i}function cm(t,e,r){const[s,n]=Vt(r?.in,t,e);return s.getFullYear()-n.getFullYear()}function um(t,e,r){const[s,n]=Vt(r?.in,t,e),a=Ln(s,n),i=Math.abs(im(s,n));s.setDate(s.getDate()-a*i);const l=+(Ln(s,n)===-a),c=a*(i-l);return c===0?0:c}function Ln(t,e){const r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function _s(t){return e=>{const s=(t?Math[t]:Math.trunc)(e);return s===0?0:s}}function dm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=(+s-+n)/nm;return _s(r?.roundingMethod)(a)}function Ni(t,e){return+ct(t)-+ct(e)}function fm(t,e,r){const s=Ni(t,e)/sm;return _s(r?.roundingMethod)(s)}function pm(t,e){const r=ct(t);return r.setHours(23,59,59,999),r}function mm(t,e){const r=ct(t),s=r.getMonth();return r.setFullYear(r.getFullYear(),s+1,0),r.setHours(23,59,59,999),r}function xm(t,e){const r=ct(t);return+pm(r)==+mm(r)}function gm(t,e,r){const[s,n,a]=Vt(r?.in,t,t,e),i=xe(n,a),l=Math.abs(lm(n,a));if(l<1)return 0;n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*l);let c=xe(n,a)===-i;xm(s)&&l===1&&xe(s,a)===1&&(c=!1);const u=i*(l-+c);return u===0?0:u}function hm(t,e,r){const s=Ni(t,e)/1e3;return _s(r?.roundingMethod)(s)}function bm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=xe(s,n),i=Math.abs(cm(s,n));s.setFullYear(1584),n.setFullYear(1584);const l=xe(s,n)===-a,c=a*(i-+l);return c===0?0:c}function vm(t,e){const[r,s]=Vt(t,e.start,e.end);return{start:r,end:s}}function ym(t,e){const{start:r,end:s}=vm(e?.in,t),n={},a=bm(s,r);a&&(n.years=a);const i=ce(r,{years:n.years}),l=gm(s,i);l&&(n.months=l);const c=ce(i,{months:n.months}),u=um(s,c);u&&(n.days=u);const d=ce(c,{days:n.days}),m=dm(s,d);m&&(n.hours=m);const x=ce(d,{hours:n.hours}),p=fm(s,x);p&&(n.minutes=p);const g=ce(x,{minutes:n.minutes}),h=hm(s,g);return h&&(n.seconds=h),n}function wm(t,e){return+ct(t)>+ct(e)}const Oi=t=>{const e=t.getTime(),r=f.useCallback(()=>{const l=new Date,c=new Date(e);if(wm(l,c))return{days:0,hours:0,minutes:0,seconds:0,isFinished:!0};const u=ym({start:l,end:c});return{days:u.days??0,hours:u.hours??0,minutes:u.minutes??0,seconds:u.seconds??0,isFinished:!1}},[e]),[s,n]=f.useState(r),[a,i]=f.useState(e);return Object.is(a,e)||(i(e),n(r())),f.useEffect(()=>{if(Number.isNaN(e))return;const l=setInterval(()=>{const c=r();n(c),c.isFinished&&clearInterval(l)},1e3);return()=>clearInterval(l)},[e,r]),s},_n=o.cva("rst:font-semibold rst:uppercase rst:tracking-wider rst:mb-4 rst:transition-colors",{variants:{size:{xs:"rst:text-sm",sm:"rst:text-base",md:"rst:text-lg",lg:"rst:text-xl",xl:"rst:text-2xl"}},defaultVariants:{size:"md"}}),Em=o.cva("rst:font-mono rst:bg-clip-text rst:transition-all",{variants:{variant:{gradient:"rst:text-transparent rst:animate-pulse rst:bg-gradient-to-br rst:from-primary-700 rst:via-accent-600 rst:to-primary-700 rst:dark:from-primary-400 rst:dark:via-accent-300 rst:dark:to-primary-400 rst:drop-shadow-sm rst:dark:drop-shadow-md",primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-900 rst:dark:text-gray-100"},size:{xs:"rst:text-2xl",sm:"rst:text-3xl",md:"rst:text-4xl",lg:"rst:text-5xl",xl:"rst:text-6xl"}},defaultVariants:{variant:"gradient",size:"md"}}),km=o.cva("rst:uppercase rst:tracking-widest rst:mt-1 rst:transition-colors rst:text-gray-500 rst:dark:text-gray-400",{variants:{size:{xs:"rst:text-[10px]",sm:"rst:text-xs",md:"rst:text-xs",lg:"rst:text-sm",xl:"rst:text-sm"}},defaultVariants:{size:"md"}}),Be=({value:t,label:e,size:r,variant:s})=>o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-center",children:[o.jsxRuntimeExports.jsx("span",{className:N.cn(Em({size:r,variant:s})),children:String(t).padStart(2,"0")}),o.jsxRuntimeExports.jsx("span",{className:N.cn(km({size:r})),children:e})]}),Pi=f.forwardRef(({targetDate:t,title:e,size:r,variant:s="gradient",className:n,completionText:a,...i},l)=>{const{days:c,hours:u,minutes:d,seconds:m,isFinished:x}=Oi(t);return x?a?o.jsxRuntimeExports.jsx("div",{ref:l,className:N.cn("rst:font-bold rst:w-full rst:text-center rst:text-gray-900 rst:dark:text-gray-100",n),...i,children:o.jsxRuntimeExports.jsx("h3",{className:N.cn(_n({size:r}),"rst:mb-0"),children:a})}):null:o.jsxRuntimeExports.jsxs("div",{ref:l,className:N.cn("rst:font-bold rst:w-full rst:text-center rst:text-gray-900 rst:dark:text-gray-100",n),...i,children:[e&&o.jsxRuntimeExports.jsx("h3",{className:N.cn(_n({size:r})),children:e}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:justify-center rst:gap-4 rst:sm:gap-6 rst:md:gap-8",children:[o.jsxRuntimeExports.jsx(Be,{value:c,label:"Days",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:u,label:"Hours",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:d,label:"Minutes",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:m,label:"Seconds",size:r,variant:s})]})]})});Pi.displayName="Countdown";const Rm=o.cva("rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:shadow-xl rst:transition-all rst:border",{variants:{size:{xs:"rst:max-w-xs",sm:"rst:max-w-sm",md:"rst:max-w-md",lg:"rst:max-w-lg",xl:"rst:max-w-xl","2xl":"rst:max-w-2xl","3xl":"rst:max-w-3xl",full:"rst:max-w-[95vw] rst:m-4"},variant:{white:"rst:bg-white rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900",glass:"rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white rst:shadow-2xl rst:dark:shadow-black/50"},status:{default:"",destructive:"rst:border-t-4 rst:border-t-error-500",success:"rst:border-t-4 rst:border-t-success-500"}},defaultVariants:{size:"md",variant:"white",status:"default"}}),jm=o.cva("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"),Sm=o.cva("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"),Cm=o.cva("rst:inline-flex rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-50 rst:hover:opacity-100 rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:focus:ring-offset-2 rst:transition-opacity"),Nm=({isOpen:t,onClose:e,title:r,description:s,size:n,variant:a,status:i,children:l,className:c})=>o.jsxRuntimeExports.jsx(Jt,{appear:!0,show:t,as:f.Fragment,children:o.jsxRuntimeExports.jsxs(Zu,{as:"div",className:"rst:relative rst:z-50",onClose:e,children:[o.jsxRuntimeExports.jsx(ye,{as:f.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0",enterTo:"rst:opacity-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:o.jsxRuntimeExports.jsx(Qu,{className:N.cn("rst:fixed rst:inset-0 rst:transition-opacity",a==="glass"?"rst:bg-slate-900/40 rst:dark:bg-black/60":"rst:bg-slate-900/60 rst:dark:bg-black/80 rst:backdrop-blur-sm")})}),o.jsxRuntimeExports.jsx("div",{className:"rst:fixed rst:inset-0 rst:overflow-y-auto",children:o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:min-h-full rst:items-center rst:justify-center rst:p-4 rst:text-center",children:o.jsxRuntimeExports.jsx(ye,{as:f.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsxs(Xo,{className:N.cn(Rm({size:n,variant:a,status:i}),c),children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-start rst:justify-between",children:[o.jsxRuntimeExports.jsxs("div",{children:[o.jsxRuntimeExports.jsx(Qo,{as:"h2",className:N.cn(jm()),children:r}),s&&o.jsxRuntimeExports.jsx("p",{className:N.cn(Sm()),children:s})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:ml-4 rst:flex rst:shrink-0",children:o.jsxRuntimeExports.jsx("button",{type:"button",onClick:e,className:N.cn(Cm()),"aria-label":"Close dialog",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-5 rst:w-5"})})})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:l})]})})})})]})}),Om=o.cva("rst:w-full rst:py-6 rst:mt-auto rst:transition-colors rst:duration-200",{variants:{variant:{default:"rst:bg-[var(--roster-footer-bg)] rst:text-[var(--roster-footer-text)] rst:border-t rst:border-[var(--roster-footer-border)]",primary:"rst:bg-primary-900 rst:text-primary-200 rst:dark:bg-primary-950 rst:dark:text-primary-400",transparent:"rst:bg-transparent rst:text-gray-500 rst:dark:text-gray-400"}},defaultVariants:{variant:"default"}}),$i=f.forwardRef(({className:t,variant:e,companyName:r="Ball Collaborative",links:s,routerElement:n,...a},i)=>{const l=new Date().getFullYear(),c=n??"a";return o.jsxRuntimeExports.jsx("footer",{ref:i,className:N.cn(Om({variant:e}),t),...a,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:px-4 rst:flex rst:flex-col rst:items-center rst:gap-2",children:[s&&s.length>0&&o.jsxRuntimeExports.jsx("nav",{"aria-label":"Footer navigation",className:"rst:flex rst:flex-wrap rst:justify-center rst:gap-x-5 rst:gap-y-1",children:s.map(u=>o.jsxRuntimeExports.jsx(c,{href:u.href,to:u.href,className:"rst:text-sm rst:text-inherit rst:opacity-70 rst:hover:opacity-100 rst:transition-opacity",children:u.label},u.href))}),o.jsxRuntimeExports.jsxs("p",{className:"rst:text-center rst:text-sm rst:font-medium rst:text-inherit",children:["© ",l," ",r,", All rights reserved."]})]})})});$i.displayName="Footer";const Ti=o.cva("rst:w-full rst:z-30 rst:border-b rst:transition-colors rst:duration-200",{variants:{variant:{default:"rst:bg-[var(--roster-nav-bg)] rst:border-[var(--roster-nav-border)] rst:text-[var(--roster-nav-text)]",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900",white:"rst:bg-white rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-600 rst:dark:border-gray-700 rst:dark:text-gray-100",transparent:"rst:bg-transparent rst:border-transparent rst:text-gray-900 rst:dark:text-white"},position:{fixed:"rst:fixed rst:top-0 rst:left-0 rst:right-0",sticky:"rst:sticky rst:top-0",static:"rst:static"}},defaultVariants:{variant:"default",position:"sticky"}}),Vn=(t,e)=>typeof t=="function"?t({close:e}):t;function Pm(t){return f.useSyncExternalStore(e=>{if(!t||typeof document>"u")return()=>{};const r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},()=>t&&document.documentElement.classList.contains("dark"),()=>!1)}function $m({close:t}){return f.useEffect(()=>{const e=r=>{const s=document.querySelector("[data-roster-mobile-panel]"),n=document.querySelector("[data-roster-hamburger]"),a=r.target;!s?.contains(a)&&!n?.contains(a)&&t()};return document.addEventListener("pointerdown",e,{capture:!0}),()=>document.removeEventListener("pointerdown",e,{capture:!0})},[t]),null}function Tm({activePath:t,close:e}){const r=f.useRef(t);return f.useEffect(()=>{r.current!==t&&(r.current=t,e())},[t,e]),null}const Im=({logoSrc:t,logoSize:e="2rem",logoClassName:r,brandName:s,items:n,activePath:a,routerElement:i,user:l,onLogin:c,onLogout:u,onInboxClick:d,onThemeToggle:m,actions:x,brandElement:p,navActions:g,userMenuItems:h=[],className:b,variant:v="default",position:E="sticky",themeMode:y,notificationVariant:k="error",notificationFill:R="solid",...O})=>{const S=(l?.notificationCount||0)>0,F=typeof e=="number"?`${e}px`:e,B={width:F,height:F},j=Pm(y==="auto"),M=(y==="auto"?j?"dark":"light":y??(v==="white"||v==="default"?"light":"dark"))==="dark",L=v==="slate"||v==="primary"||v==="default"&&M||v==="white"&&M||v==="transparent"&&M,$={brand:L?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:L?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:L?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:L?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"};return o.jsxRuntimeExports.jsx(xa,{as:"nav",className:N.cn("rst:z-50",Ti({variant:v,position:E}),b),...O,children:({open:A,close:D})=>{const z=Vn(x,D),C=Vn(g,D);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[o.jsxRuntimeExports.jsxs(Ht,{as:i,href:"/",to:"/",variant:"neutral",underline:"none",className:N.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",$.brand),children:[o.jsxRuntimeExports.jsx("img",{src:t,alt:`${s} Logo`,style:B,className:N.cn("rst:shrink-0",r??"rst:rounded-md")}),p??o.jsxRuntimeExports.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:s})]}),o.jsxRuntimeExports.jsxs("div",{className:"rst:hidden rst:md:flex rst:items-center rst:gap-8",children:[o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:items-center rst:gap-6",children:n.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,variant:"neutral",underline:"none",className:N.cn("rst:inline-flex rst:items-center rst:gap-1.5 rst:text-sm rst:transition-colors rst:duration-200",V?$.linkActive:$.linkBase),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]},P.path)})}),C,z??(l?o.jsxRuntimeExports.jsxs(Kd,{as:"div",className:"rst:relative rst:ml-2",children:[o.jsxRuntimeExports.jsxs(ua,{className:"rst:relative rst:flex rst:rounded-full rst:text-sm rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:focus:ring-offset-2 rst:ring-offset-transparent",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Open user menu"}),o.jsxRuntimeExports.jsx(Er,{initials:l.initials,src:l.avatarSrc,size:"sm",shape:"circle",colorScheme:l.avatarColor??"primary"}),S&&o.jsxRuntimeExports.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:o.jsxRuntimeExports.jsx(Qe,{fill:R,size:"xs",statusBadge:!0,variant:k,children:l.notificationCount})})]}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,enter:"rst:transition rst:ease-out rst:duration-100",enterFrom:"rst:transform rst:opacity-0 rst:scale-95",enterTo:"rst:transform rst:opacity-100 rst:scale-100",leave:"rst:transition rst:ease-in rst:duration-75",leaveFrom:"rst:transform rst:opacity-100 rst:scale-100",leaveTo:"rst:transform rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsxs(da,{className:"rst:absolute rst:right-0 rst:z-50 rst:mt-2 rst:w-48 rst:origin-top-right rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-white/10 rst:focus:outline-none rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:py-1",children:[S&&d&&o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsxs(o.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:d,className:N.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:["Inbox (",l.notificationCount,")"]})}),m&&o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsxs("div",{onClick:V=>{V.preventDefault(),m()},role:"button",tabIndex:0,className:N.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:cursor-pointer rst:transition-colors",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),onKeyDown:V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),m())},children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-2",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faMoon,className:N.cn("rst:w-4 rst:transition-colors",M?"rst:text-amber-500":"rst:text-gray-400")}),o.jsxRuntimeExports.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),o.jsxRuntimeExports.jsx(Ur,{checked:M,onChange:()=>{},size:"xs",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]})})]}),h.length>0&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-1",children:h.map(P=>o.jsxRuntimeExports.jsx(fe,{children:({focus:V})=>o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,variant:"neutral",underline:"none",className:N.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:gap-2 rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:transition-colors",V&&"rst:bg-gray-50 rst:dark:bg-gray-700"),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]})},P.path))}),u&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-1",children:o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:u,className:N.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:"Log Out"})})})]})})]}):o.jsxRuntimeExports.jsx(o.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:c,children:"Log In"}))]}),o.jsxRuntimeExports.jsx("div",{"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:o.jsxRuntimeExports.jsxs(Xe,{className:N.cn("rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-inset rst:focus:ring-primary-500",$.hamburger),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Open main menu"}),A?o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}):o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),S&&o.jsxRuntimeExports.jsx("span",{className:"rst:absolute rst:top-0 rst:right-0 rst:block rst:h-2.5 rst:w-2.5 rst:rounded-full rst:bg-error-500 rst:ring-2 rst:ring-transparent rst:transform rst:translate-x-1/4 rst:-translate-y-1/4"})]})]})})]}),A&&o.jsxRuntimeExports.jsx($m,{close:D}),A&&o.jsxRuntimeExports.jsx(Tm,{activePath:a,close:D}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,enter:"rst:duration-200 rst:ease-out",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:duration-100 rst:ease-in",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsx($s,{focus:!0,className:"rst:absolute rst:top-0 rst:inset-x-0 rst:z-50 rst:origin-top-right rst:transform rst:p-2 rst:transition rst:md:hidden",children:o.jsxRuntimeExports.jsxs("div",{"data-roster-mobile-panel":!0,className:"rst:rounded-lg rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-white/10 rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700 rst:bg-white rst:dark:bg-gray-800",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:px-5 rst:pt-5 rst:pb-6",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:justify-between",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3",children:[o.jsxRuntimeExports.jsx("img",{src:t,alt:s,style:B,className:N.cn("rst:shrink-0",r??"rst:rounded-md")}),p??o.jsxRuntimeExports.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:s})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:-mr-2",children:o.jsxRuntimeExports.jsxs(Xe,{className:"rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:text-gray-400 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-700 rst:hover:text-gray-500 rst:dark:hover:text-white rst:focus:outline-none",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Close menu"}),o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),o.jsxRuntimeExports.jsxs("div",{className:"rst:mt-6",children:[C&&o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4",children:C}),o.jsxRuntimeExports.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[n.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsx(Ht,{as:i,href:P.path,to:P.path,onClick:()=>D(),variant:"neutral",underline:"none",className:N.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",V?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:o.jsxRuntimeExports.jsxs("span",{className:N.cn("rst:ml-3 rst:inline-flex rst:items-center rst:gap-1.5 rst:text-base rst:font-medium",V?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]})},P.path)}),l&&h.length>0&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),h.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,onClick:()=>D(),variant:"neutral",underline:"none",className:N.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",V?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:[o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:ml-3 rst:text-base rst:font-medium",V?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:P.label}),P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:P.badge})]},P.path)})]})]})]})]}),(l||z||c)&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:z||(!l&&c?o.jsxRuntimeExports.jsx(o.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{c(),D()},children:"Log In"}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[S&&d&&o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{d?.(),D()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:o.jsxRuntimeExports.jsx(Qe,{fill:R,size:"xs",statusBadge:!0,variant:k,children:l?.notificationCount}),children:"Pending Invitations"}),m&&o.jsxRuntimeExports.jsxs("div",{onClick:P=>{P.preventDefault(),m()},role:"button",tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),m())},className:"rst:flex rst:w-full rst:items-center rst:justify-between rst:rounded-md rst:px-4 rst:py-2 rst:text-base rst:transition-colors rst:cursor-pointer rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3 rst:font-medium",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faMoon,className:N.cn("rst:w-5 rst:transition-colors",M?"rst:text-amber-500":"rst:text-gray-400")}),o.jsxRuntimeExports.jsx("span",{children:"Dark Mode"})]}),o.jsxRuntimeExports.jsx(Ur,{checked:M,onChange:()=>{},size:"sm",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]}),u&&o.jsxRuntimeExports.jsx(o.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{u?.(),D()},children:"Log Out"})]}))})]})})})]})}})},Am={timeout:1500,ignoreCase:!0,preventDefault:!1,enabled:!0,ignoreWhenTyping:!0},Dm=["ArrowUp","ArrowUp","ArrowDown","ArrowDown","ArrowLeft","ArrowRight","ArrowLeft","ArrowRight","b","a","Enter"];function Fm(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.getAttribute("contenteditable");return e!==null&&e!=="false"?!0:["INPUT","TEXTAREA","SELECT"].includes(t.tagName)}function Mm(t,e,r={}){const{timeout:s,ignoreCase:n,preventDefault:a,enabled:i,ignoreWhenTyping:l}={...Am,...r},c=f.useRef(0),u=f.useRef(0),d=f.useRef(e);f.useEffect(()=>{d.current=e},[e]),f.useEffect(()=>{if(!i||t.length===0)return;const m=g=>n?g.toLowerCase():g,x=t.map(m);function p(g){if(l&&Fm(g.target))return;const h=Date.now();s>0&&c.current>0&&h-u.current>s&&(c.current=0),u.current=h;const b=m(g.key);if(b===x[c.current]){a&&g.preventDefault(),c.current+=1,c.current===x.length&&(c.current=0,d.current());return}c.current=b===x[0]?1:0}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[t,s,n,a,i,l])}exports.Button=o.Button;exports.Spinner=o.Spinner;exports.Table=o.Table;exports.TableBody=o.TableBody;exports.TableCaption=o.TableCaption;exports.TableCell=o.TableCell;exports.TableFooter=o.TableFooter;exports.TableHead=o.TableHead;exports.TableHeader=o.TableHeader;exports.TableRow=o.TableRow;exports.buttonVariants=o.buttonVariants;exports.tableCellVariants=o.tableCellVariants;exports.tableHeadVariants=o.tableHeadVariants;exports.tableHeaderVariants=o.tableHeaderVariants;exports.tableRowVariants=o.tableRowVariants;exports.tableVariants=o.tableVariants;exports.tableWrapperVariants=o.tableWrapperVariants;exports.cn=N.cn;exports.Accordion=Qp;exports.ActionBar=Ci;exports.Alert=hi;exports.Avatar=Er;exports.AvatarStrip=If;exports.Badge=Qe;exports.Breadcrumbs=Zp;exports.CallToAction=Jp;exports.Card=va;exports.Checkbox=wa;exports.CollapsibleSection=Gp;exports.Countdown=Pi;exports.DescriptionList=vi;exports.Dialog=Nm;exports.Disclosure=Ra;exports.EmptyState=tm;exports.ErrorState=em;exports.Eyebrow=we;exports.Footer=$i;exports.InlineCode=Ta;exports.Input=Is;exports.KONAMI_CODE=Dm;exports.LabeledDivider=Ia;exports.Link=Ht;exports.LiquidTabs=Af;exports.MatchupCard=ji;exports.Navbar=Im;exports.PasswordInput=Ca;exports.Pill=Oa;exports.Pullquote=wi;exports.SegmentBar=qp;exports.Select=Tf;exports.Stat=Da;exports.Switch=Ur;exports.Textarea=Ba;exports.ThemeToggle=Fa;exports.Tooltip=Up;exports.actionBarVariants=Si;exports.alertVariants=gi;exports.avatarVariants=ga;exports.badgeVariants=ha;exports.breadcrumbVariants=Xr;exports.cardVariants=ba;exports.checkboxVariants=ya;exports.ctaVariants=Ei;exports.descriptionListVariants=bi;exports.disclosureContentVariants=ka;exports.disclosureTriggerVariants=Ea;exports.emptyStateVariants=ki;exports.errorStateVariants=Ri;exports.eyebrowVariants=Pa;exports.iconVariants=zr;exports.inlineCodeVariants=$a;exports.inputVariants=ja;exports.linkVariants=Sa;exports.navbarVariants=Ti;exports.pillDotVariants=Wr;exports.pillVariants=Na;exports.pullquoteVariants=yi;exports.selectTriggerVariants=Ma;exports.statValueVariants=Aa;exports.switchThumbVariants=_a;exports.switchTrackVariants=La;exports.textareaVariants=Va;exports.useCountdown=Oi;exports.useKeySequence=Mm;
2
+ `)),[]});var Tl=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(Tl||{});function Pe(t){let e={};for(let r in t)t[r]===!0&&(e[`data-${r}`]="");return e}function $e(t,e,r,s){let[n,a]=f.useState(r),{hasFlag:i,addFlag:l,removeFlag:c}=$l(t&&n?3:0),u=f.useRef(!1),d=f.useRef(!1),m=o.p();return o.n(()=>{var x;if(t){if(r&&a(!0),!e){r&&l(3);return}return(x=s?.start)==null||x.call(s,r),Il(e,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(r?(l(3),c(4)):(l(4),c(2)))},run(){d.current?r?(c(3),l(4)):(c(4),l(3)):r?c(1):l(1)},done(){var p;d.current&&Fl(e)||(u.current=!1,c(7),r||a(!1),(p=s?.end)==null||p.call(s,r))}})}},[t,r,e,m]),t?[n,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Il(t,{prepare:e,run:r,done:s,inFlight:n}){let a=o.o$1();return Dl(t,{prepare:e,inFlight:n}),a.nextFrame(()=>{r(),a.requestAnimationFrame(()=>{a.add(Al(t,s))})}),a.dispose}function Al(t,e){var r,s;let n=o.o$1();if(!t)return n.dispose;let a=!1;n.add(()=>{a=!0});let i=(s=(r=t.getAnimations)==null?void 0:r.call(t).filter(l=>l instanceof CSSTransition))!=null?s:[];return i.length===0?(e(),n.dispose):(Promise.allSettled(i.map(l=>l.finished)).then(()=>{a||e()}),n.dispose)}function Dl(t,{inFlight:e,prepare:r}){if(e!=null&&e.current){r();return}let s=t.style.transition;t.style.transition="none",r(),t.offsetHeight,t.style.transition=s}function Fl(t){var e,r;return((r=(e=t.getAnimations)==null?void 0:e.call(t))!=null?r:[]).some(s=>s instanceof CSSTransition&&s.playState!=="finished")}function Ml(t,{container:e,accept:r,walk:s}){let n=f.useRef(r),a=f.useRef(s);f.useEffect(()=>{n.current=r,a.current=s},[r,s]),o.n(()=>{if(!e||!t)return;let i=o.l(e);if(!i)return;let l=n.current,c=a.current,u=Object.assign(m=>l(m),{acceptNode:l}),d=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,u,!1);for(;d.nextNode();)c(d.currentNode)},[e,t,n,a])}function ls(t,e){let r=f.useRef([]),s=o.o(t);f.useEffect(()=>{let n=[...r.current];for(let[a,i]of e.entries())if(r.current[a]!==i){let l=s(e,n);return r.current=e,l}},[s,...e])}function ar(){return typeof window<"u"}function oe(t){return fo(t)?(t.nodeName||"").toLowerCase():"#document"}function ft(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(t){var e;return(e=(fo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function fo(t){return ar()?t instanceof Node||t instanceof ft(t).Node:!1}function lt(t){return ar()?t instanceof Element||t instanceof ft(t).Element:!1}function Et(t){return ar()?t instanceof HTMLElement||t instanceof ft(t).HTMLElement:!1}function rn(t){return!ar()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ft(t).ShadowRoot}const Ll=new Set(["inline","contents"]);function Te(t){const{overflow:e,overflowX:r,overflowY:s,display:n}=gt(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+r)&&!Ll.has(n)}const _l=new Set(["table","td","th"]);function Vl(t){return _l.has(oe(t))}const Bl=[":popover-open",":modal"];function ir(t){return Bl.some(e=>{try{return t.matches(e)}catch{return!1}})}const Hl=["transform","translate","scale","rotate","perspective"],zl=["transform","translate","scale","rotate","perspective","filter"],Wl=["paint","layout","strict","content"];function cs(t){const e=us(),r=lt(t)?gt(t):t;return Hl.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||zl.some(s=>(r.willChange||"").includes(s))||Wl.some(s=>(r.contain||"").includes(s))}function Yl(t){let e=Ft(t);for(;Et(e)&&!Zt(e);){if(cs(e))return e;if(ir(e))return null;e=Ft(e)}return null}function us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ul=new Set(["html","body","#document"]);function Zt(t){return Ul.has(oe(t))}function gt(t){return ft(t).getComputedStyle(t)}function lr(t){return lt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ft(t){if(oe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||rn(t)&&t.host||Rt(t);return rn(e)?e.host:e}function po(t){const e=Ft(t);return Zt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Et(e)&&Te(e)?e:po(e)}function he(t,e,r){var s;e===void 0&&(e=[]),r===void 0&&(r=!0);const n=po(t),a=n===((s=t.ownerDocument)==null?void 0:s.body),i=ft(n);if(a){const l=Mr(i);return e.concat(i,i.visualViewport||[],Te(n)?n:[],l&&r?he(l):[])}return e.concat(n,he(n,[],r))}function Mr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kl(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:s}=e;return r+"/"+s}).join(" "):navigator.userAgent}const Gl=["top","right","bottom","left"],Ot=Math.min,at=Math.max,be=Math.round,_e=Math.floor,yt=t=>({x:t,y:t}),ql={left:"right",right:"left",bottom:"top",top:"bottom"},Xl={start:"end",end:"start"};function Lr(t,e,r){return at(t,Ot(e,r))}function kt(t,e){return typeof t=="function"?t(e):t}function Pt(t){return t.split("-")[0]}function ae(t){return t.split("-")[1]}function ds(t){return t==="x"?"y":"x"}function fs(t){return t==="y"?"height":"width"}const Ql=new Set(["top","bottom"]);function bt(t){return Ql.has(Pt(t))?"y":"x"}function ps(t){return ds(bt(t))}function Zl(t,e,r){r===void 0&&(r=!1);const s=ae(t),n=ps(t),a=fs(n);let i=n==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Ye(i)),[i,Ye(i)]}function Jl(t){const e=Ye(t);return[_r(t),e,_r(e)]}function _r(t){return t.replace(/start|end/g,e=>Xl[e])}const sn=["left","right"],nn=["right","left"],tc=["top","bottom"],ec=["bottom","top"];function rc(t,e,r){switch(t){case"top":case"bottom":return r?e?nn:sn:e?sn:nn;case"left":case"right":return e?tc:ec;default:return[]}}function sc(t,e,r,s){const n=ae(t);let a=rc(Pt(t),r==="start",s);return n&&(a=a.map(i=>i+"-"+n),e&&(a=a.concat(a.map(_r)))),a}function Ye(t){return t.replace(/left|right|bottom|top/g,e=>ql[e])}function nc(t){return{top:0,right:0,bottom:0,left:0,...t}}function mo(t){return typeof t!="number"?nc(t):{top:t,right:t,bottom:t,left:t}}function Ue(t){const{x:e,y:r,width:s,height:n}=t;return{width:s,height:n,top:r,left:e,right:e+s,bottom:r+n,x:e,y:r}}function on(t,e,r){let{reference:s,floating:n}=t;const a=bt(e),i=ps(e),l=fs(i),c=Pt(e),u=a==="y",d=s.x+s.width/2-n.width/2,m=s.y+s.height/2-n.height/2,x=s[l]/2-n[l]/2;let p;switch(c){case"top":p={x:d,y:s.y-n.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:m};break;case"left":p={x:s.x-n.width,y:m};break;default:p={x:s.x,y:s.y}}switch(ae(e)){case"start":p[i]-=x*(r&&u?-1:1);break;case"end":p[i]+=x*(r&&u?-1:1);break}return p}async function xo(t,e){var r;e===void 0&&(e={});const{x:s,y:n,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:x=!1,padding:p=0}=kt(e,t),g=mo(p),b=l[x?m==="floating"?"reference":"floating":m],v=Ue(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),E=m==="floating"?{x:s,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),k=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},R=Ue(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:y,strategy:c}):E);return{top:(v.top-R.top+g.top)/k.y,bottom:(R.bottom-v.bottom+g.bottom)/k.y,left:(v.left-R.left+g.left)/k.x,right:(R.right-v.right+g.right)/k.x}}const oc=async(t,e,r)=>{const{placement:s="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:n}),{x:d,y:m}=on(u,s,c),x=s,p={},g=0;for(let b=0;b<l.length;b++){var h;const{name:v,fn:E}=l[b],{x:y,y:k,data:R,reset:O}=await E({x:d,y:m,initialPlacement:s,placement:x,strategy:n,middlewareData:p,rects:u,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:xo},elements:{reference:t,floating:e}});d=y??d,m=k??m,p={...p,[v]:{...p[v],...R}},O&&g<=50&&(g++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(u=O.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:n}):O.rects),{x:d,y:m}=on(u,x,c)),b=-1)}return{x:d,y:m,placement:x,strategy:n,middlewareData:p}},ac=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:s,placement:n,rects:a,platform:i,elements:l,middlewareData:c}=e,{element:u,padding:d=0}=kt(t,e)||{};if(u==null)return{};const m=mo(d),x={x:r,y:s},p=ps(n),g=fs(p),h=await i.getDimensions(u),b=p==="y",v=b?"top":"left",E=b?"bottom":"right",y=b?"clientHeight":"clientWidth",k=a.reference[g]+a.reference[p]-x[p]-a.floating[g],R=x[p]-a.reference[p],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=O?O[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(O)))&&(S=l.floating[y]||a.floating[g]);const F=k/2-R/2,B=S/2-h[g]/2-1,j=Ot(m[v],B),T=Ot(m[E],B),M=j,L=S-h[g]-T,$=S/2-h[g]/2+F,A=Lr(M,$,L),D=!c.arrow&&ae(n)!=null&&$!==A&&a.reference[g]/2-($<M?j:T)-h[g]/2<0,z=D?$<M?$-M:$-L:0;return{[p]:x[p]+z,data:{[p]:A,centerOffset:$-A-z,...D&&{alignmentOffset:z}},reset:D}}}),ic=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,s;const{placement:n,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...b}=kt(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const v=Pt(n),E=bt(l),y=Pt(l)===l,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=x||(y||!h?[Ye(l)]:Jl(l)),O=g!=="none";!x&&O&&R.push(...sc(l,h,g,k));const S=[l,...R],F=await c.detectOverflow(e,b),B=[];let j=((s=a.flip)==null?void 0:s.overflows)||[];if(d&&B.push(F[v]),m){const $=Zl(n,i,k);B.push(F[$[0]],F[$[1]])}if(j=[...j,{placement:n,overflows:B}],!B.every($=>$<=0)){var T,M;const $=(((T=a.flip)==null?void 0:T.index)||0)+1,A=S[$];if(A&&(!(m==="alignment"?E!==bt(A):!1)||j.every(C=>bt(C.placement)===E?C.overflows[0]>0:!0)))return{data:{index:$,overflows:j},reset:{placement:A}};let D=(M=j.filter(z=>z.overflows[0]<=0).sort((z,C)=>z.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(p){case"bestFit":{var L;const z=(L=j.filter(C=>{if(O){const P=bt(C.placement);return P===E||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,V)=>P+V,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:L[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function an(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ln(t){return Gl.some(e=>t[e]>=0)}const lc=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:s}=e,{strategy:n="referenceHidden",...a}=kt(t,e);switch(n){case"referenceHidden":{const i=await s.detectOverflow(e,{...a,elementContext:"reference"}),l=an(i,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ln(l)}}}case"escaped":{const i=await s.detectOverflow(e,{...a,altBoundary:!0}),l=an(i,r.floating);return{data:{escapedOffsets:l,escaped:ln(l)}}}default:return{}}}}},go=new Set(["left","top"]);async function cc(t,e){const{placement:r,platform:s,elements:n}=t,a=await(s.isRTL==null?void 0:s.isRTL(n.floating)),i=Pt(r),l=ae(r),c=bt(r)==="y",u=go.has(i)?-1:1,d=a&&c?-1:1,m=kt(e,t);let{mainAxis:x,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:x*u}:{x:x*u,y:p*d}}const uc=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,s;const{x:n,y:a,placement:i,middlewareData:l}=e,c=await cc(e,t);return i===((r=l.offset)==null?void 0:r.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:n+c.x,y:a+c.y,data:{...c,placement:i}}}}},dc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:s,placement:n,platform:a}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:v=>{let{x:E,y}=v;return{x:E,y}}},...u}=kt(t,e),d={x:r,y:s},m=await a.detectOverflow(e,u),x=bt(Pt(n)),p=ds(x);let g=d[p],h=d[x];if(i){const v=p==="y"?"top":"left",E=p==="y"?"bottom":"right",y=g+m[v],k=g-m[E];g=Lr(y,g,k)}if(l){const v=x==="y"?"top":"left",E=x==="y"?"bottom":"right",y=h+m[v],k=h-m[E];h=Lr(y,h,k)}const b=c.fn({...e,[p]:g,[x]:h});return{...b,data:{x:b.x-r,y:b.y-s,enabled:{[p]:i,[x]:l}}}}}},fc=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:s,placement:n,rects:a,middlewareData:i}=e,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=kt(t,e),d={x:r,y:s},m=bt(n),x=ds(m);let p=d[x],g=d[m];const h=kt(l,e),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const y=x==="y"?"height":"width",k=a.reference[x]-a.floating[y]+b.mainAxis,R=a.reference[x]+a.reference[y]-b.mainAxis;p<k?p=k:p>R&&(p=R)}if(u){var v,E;const y=x==="y"?"width":"height",k=go.has(Pt(n)),R=a.reference[m]-a.floating[y]+(k&&((v=i.offset)==null?void 0:v[m])||0)+(k?0:b.crossAxis),O=a.reference[m]+a.reference[y]+(k?0:((E=i.offset)==null?void 0:E[m])||0)-(k?b.crossAxis:0);g<R?g=R:g>O&&(g=O)}return{[x]:p,[m]:g}}}},pc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,s;const{placement:n,rects:a,platform:i,elements:l}=e,{apply:c=()=>{},...u}=kt(t,e),d=await i.detectOverflow(e,u),m=Pt(n),x=ae(n),p=bt(n)==="y",{width:g,height:h}=a.floating;let b,v;m==="top"||m==="bottom"?(b=m,v=x===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=m,b=x==="end"?"top":"bottom");const E=h-d.top-d.bottom,y=g-d.left-d.right,k=Ot(h-d[b],E),R=Ot(g-d[v],y),O=!e.middlewareData.shift;let S=k,F=R;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(F=y),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(S=E),O&&!x){const j=at(d.left,0),T=at(d.right,0),M=at(d.top,0),L=at(d.bottom,0);p?F=g-2*(j!==0||T!==0?j+T:at(d.left,d.right)):S=h-2*(M!==0||L!==0?M+L:at(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:S});const B=await i.getDimensions(l.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function ho(t){const e=gt(t);let r=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const n=Et(t),a=n?t.offsetWidth:r,i=n?t.offsetHeight:s,l=be(r)!==a||be(s)!==i;return l&&(r=a,s=i),{width:r,height:s,$:l}}function ms(t){return lt(t)?t:t.contextElement}function qt(t){const e=ms(t);if(!Et(e))return yt(1);const r=e.getBoundingClientRect(),{width:s,height:n,$:a}=ho(e);let i=(a?be(r.width):r.width)/s,l=(a?be(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const mc=yt(0);function bo(t){const e=ft(t);return!us()||!e.visualViewport?mc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xc(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ft(t)?!1:e}function Wt(t,e,r,s){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=t.getBoundingClientRect(),a=ms(t);let i=yt(1);e&&(s?lt(s)&&(i=qt(s)):i=qt(t));const l=xc(a,r,s)?bo(a):yt(0);let c=(n.left+l.x)/i.x,u=(n.top+l.y)/i.y,d=n.width/i.x,m=n.height/i.y;if(a){const x=ft(a),p=s&&lt(s)?ft(s):s;let g=x,h=Mr(g);for(;h&&s&&p!==g;){const b=qt(h),v=h.getBoundingClientRect(),E=gt(h),y=v.left+(h.clientLeft+parseFloat(E.paddingLeft))*b.x,k=v.top+(h.clientTop+parseFloat(E.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,m*=b.y,c+=y,u+=k,g=ft(h),h=Mr(g)}}return Ue({width:d,height:m,x:c,y:u})}function cr(t,e){const r=lr(t).scrollLeft;return e?e.left+r:Wt(Rt(t)).left+r}function vo(t,e){const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-cr(t,r),n=r.top+e.scrollTop;return{x:s,y:n}}function gc(t){let{elements:e,rect:r,offsetParent:s,strategy:n}=t;const a=n==="fixed",i=Rt(s),l=e?ir(e.floating):!1;if(s===i||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=yt(1);const d=yt(0),m=Et(s);if((m||!m&&!a)&&((oe(s)!=="body"||Te(i))&&(c=lr(s)),Et(s))){const p=Wt(s);u=qt(s),d.x=p.x+s.clientLeft,d.y=p.y+s.clientTop}const x=i&&!m&&!a?vo(i,c):yt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+x.x,y:r.y*u.y-c.scrollTop*u.y+d.y+x.y}}function hc(t){return Array.from(t.getClientRects())}function bc(t){const e=Rt(t),r=lr(t),s=t.ownerDocument.body,n=at(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),a=at(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let i=-r.scrollLeft+cr(t);const l=-r.scrollTop;return gt(s).direction==="rtl"&&(i+=at(e.clientWidth,s.clientWidth)-n),{width:n,height:a,x:i,y:l}}const cn=25;function vc(t,e){const r=ft(t),s=Rt(t),n=r.visualViewport;let a=s.clientWidth,i=s.clientHeight,l=0,c=0;if(n){a=n.width,i=n.height;const d=us();(!d||d&&e==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}const u=cr(s);if(u<=0){const d=s.ownerDocument,m=d.body,x=getComputedStyle(m),p=d.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,g=Math.abs(s.clientWidth-m.clientWidth-p);g<=cn&&(a-=g)}else u<=cn&&(a+=u);return{width:a,height:i,x:l,y:c}}const yc=new Set(["absolute","fixed"]);function wc(t,e){const r=Wt(t,!0,e==="fixed"),s=r.top+t.clientTop,n=r.left+t.clientLeft,a=Et(t)?qt(t):yt(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=n*a.x,u=s*a.y;return{width:i,height:l,x:c,y:u}}function un(t,e,r){let s;if(e==="viewport")s=vc(t,r);else if(e==="document")s=bc(Rt(t));else if(lt(e))s=wc(e,r);else{const n=bo(t);s={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Ue(s)}function yo(t,e){const r=Ft(t);return r===e||!lt(r)||Zt(r)?!1:gt(r).position==="fixed"||yo(r,e)}function Ec(t,e){const r=e.get(t);if(r)return r;let s=he(t,[],!1).filter(l=>lt(l)&&oe(l)!=="body"),n=null;const a=gt(t).position==="fixed";let i=a?Ft(t):t;for(;lt(i)&&!Zt(i);){const l=gt(i),c=cs(i);!c&&l.position==="fixed"&&(n=null),(a?!c&&!n:!c&&l.position==="static"&&!!n&&yc.has(n.position)||Te(i)&&!c&&yo(t,i))?s=s.filter(d=>d!==i):n=l,i=Ft(i)}return e.set(t,s),s}function kc(t){let{element:e,boundary:r,rootBoundary:s,strategy:n}=t;const i=[...r==="clippingAncestors"?ir(e)?[]:Ec(e,this._c):[].concat(r),s],l=i[0],c=i.reduce((u,d)=>{const m=un(e,d,n);return u.top=at(m.top,u.top),u.right=Ot(m.right,u.right),u.bottom=Ot(m.bottom,u.bottom),u.left=at(m.left,u.left),u},un(e,l,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Rc(t){const{width:e,height:r}=ho(t);return{width:e,height:r}}function jc(t,e,r){const s=Et(e),n=Rt(e),a=r==="fixed",i=Wt(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const c=yt(0);function u(){c.x=cr(n)}if(s||!s&&!a)if((oe(e)!=="body"||Te(n))&&(l=lr(e)),s){const p=Wt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else n&&u();a&&!s&&n&&u();const d=n&&!s&&!a?vo(n,l):yt(0),m=i.left+l.scrollLeft-c.x-d.x,x=i.top+l.scrollTop-c.y-d.y;return{x:m,y:x,width:i.width,height:i.height}}function Pr(t){return gt(t).position==="static"}function dn(t,e){if(!Et(t)||gt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Rt(t)===r&&(r=r.ownerDocument.body),r}function wo(t,e){const r=ft(t);if(ir(t))return r;if(!Et(t)){let n=Ft(t);for(;n&&!Zt(n);){if(lt(n)&&!Pr(n))return n;n=Ft(n)}return r}let s=dn(t,e);for(;s&&Vl(s)&&Pr(s);)s=dn(s,e);return s&&Zt(s)&&Pr(s)&&!cs(s)?r:s||Yl(t)||r}const Sc=async function(t){const e=this.getOffsetParent||wo,r=this.getDimensions,s=await r(t.floating);return{reference:jc(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Cc(t){return gt(t).direction==="rtl"}const Nc={convertOffsetParentRelativeRectToViewportRelativeRect:gc,getDocumentElement:Rt,getClippingRect:kc,getOffsetParent:wo,getElementRects:Sc,getClientRects:hc,getDimensions:Rc,getScale:qt,isElement:lt,isRTL:Cc};function Eo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Oc(t,e){let r=null,s;const n=Rt(t);function a(){var l;clearTimeout(s),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:d,top:m,width:x,height:p}=u;if(l||e(),!x||!p)return;const g=_e(m),h=_e(n.clientWidth-(d+x)),b=_e(n.clientHeight-(m+p)),v=_e(d),y={rootMargin:-g+"px "+-h+"px "+-b+"px "+-v+"px",threshold:at(0,Ot(1,c))||1};let k=!0;function R(O){const S=O[0].intersectionRatio;if(S!==c){if(!k)return i();S?i(!1,S):s=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Eo(u,t.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(R,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(R,y)}r.observe(t)}return i(!0),a}function ko(t,e,r,s){s===void 0&&(s={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,u=ms(t),d=n||a?[...u?he(u):[],...he(e)]:[];d.forEach(v=>{n&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const m=u&&l?Oc(u,r):null;let x=-1,p=null;i&&(p=new ResizeObserver(v=>{let[E]=v;E&&E.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(e)})),r()}),u&&!c&&p.observe(u),p.observe(e));let g,h=c?Wt(t):null;c&&b();function b(){const v=Wt(t);h&&!Eo(h,v)&&r(),h=v,g=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(E=>{n&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),m?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const $r=xo,Pc=uc,$c=dc,Tc=ic,Ic=pc,Ac=lc,fn=ac,Dc=fc,Fc=(t,e,r)=>{const s=new Map,n={platform:Nc,...r},a={...n.platform,_c:s};return oc(t,e,{...n,platform:a})};var Mc=typeof document<"u",Lc=function(){},He=Mc?f.useLayoutEffect:Lc;function Ke(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,s,n;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(s=r;s--!==0;)if(!Ke(t[s],e[s]))return!1;return!0}if(n=Object.keys(t),r=n.length,r!==Object.keys(e).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(e,n[s]))return!1;for(s=r;s--!==0;){const a=n[s];if(!(a==="_owner"&&t.$$typeof)&&!Ke(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Ro(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pn(t,e){const r=Ro(t);return Math.round(e*r)/r}function Tr(t){const e=w.useRef(t);return He(()=>{e.current=t}),e}function jo(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:s=[],platform:n,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,m]=w.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[x,p]=w.useState(s);Ke(x,s)||p(s);const[g,h]=w.useState(null),[b,v]=w.useState(null),E=w.useCallback(C=>{C!==O.current&&(O.current=C,h(C))},[]),y=w.useCallback(C=>{C!==S.current&&(S.current=C,v(C))},[]),k=a||g,R=i||b,O=w.useRef(null),S=w.useRef(null),F=w.useRef(d),B=c!=null,j=Tr(c),T=Tr(n),M=Tr(u),L=w.useCallback(()=>{if(!O.current||!S.current)return;const C={placement:e,strategy:r,middleware:x};T.current&&(C.platform=T.current),Fc(O.current,S.current,C).then(P=>{const V={...P,isPositioned:M.current!==!1};$.current&&!Ke(F.current,V)&&(F.current=V,ge.flushSync(()=>{m(V)}))})},[x,e,r,T,M]);He(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,m(C=>({...C,isPositioned:!1})))},[u]);const $=w.useRef(!1);He(()=>($.current=!0,()=>{$.current=!1}),[]),He(()=>{if(k&&(O.current=k),R&&(S.current=R),k&&R){if(j.current)return j.current(k,R,L);L()}},[k,R,L,j,B]);const A=w.useMemo(()=>({reference:O,floating:S,setReference:E,setFloating:y}),[E,y]),D=w.useMemo(()=>({reference:k,floating:R}),[k,R]),z=w.useMemo(()=>{const C={position:r,left:0,top:0};if(!D.floating)return C;const P=pn(D.floating,d.x),V=pn(D.floating,d.y);return l?{...C,transform:"translate("+P+"px, "+V+"px)",...Ro(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:V}},[r,l,D.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:L,refs:A,elements:D,floatingStyles:z}),[d,L,A,D,z])}const _c=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:s,padding:n}=typeof t=="function"?t(r):t;return s&&e(s)?s.current!=null?fn({element:s.current,padding:n}).fn(r):{}:s?fn({element:s,padding:n}).fn(r):{}}}},xs=(t,e)=>({...Pc(t),options:[t,e]}),So=(t,e)=>({...$c(t),options:[t,e]}),Vc=(t,e)=>({...Dc(t),options:[t,e]}),Co=(t,e)=>({...Tc(t),options:[t,e]}),No=(t,e)=>({...Ic(t),options:[t,e]}),Bc=(t,e)=>({...Ac(t),options:[t,e]}),Hc=(t,e)=>({..._c(t),options:[t,e]}),Oo={...w},zc=Oo.useInsertionEffect,Wc=zc||(t=>t());function Po(t){const e=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Wc(()=>{e.current=t}),w.useCallback(function(){for(var r=arguments.length,s=new Array(r),n=0;n<r;n++)s[n]=arguments[n];return e.current==null?void 0:e.current(...s)},[])}var Vr=typeof document<"u"?f.useLayoutEffect:f.useEffect;let mn=!1,Yc=0;const xn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yc++;function Uc(){const[t,e]=w.useState(()=>mn?xn():void 0);return Vr(()=>{t==null&&e(xn())},[]),w.useEffect(()=>{mn=!0},[]),t}const Kc=Oo.useId,Gc=Kc||Uc;let ve;process.env.NODE_ENV!=="production"&&(ve=new Set);function qc(){for(var t,e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];const n="Floating UI: "+r.join(" ");if(!((t=ve)!=null&&t.has(n))){var a;(a=ve)==null||a.add(n),console.warn(n)}}function Xc(){for(var t,e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];const n="Floating UI: "+r.join(" ");if(!((t=ve)!=null&&t.has(n))){var a;(a=ve)==null||a.add(n),console.error(n)}}function Qc(){const t=new Map;return{emit(e,r){var s;(s=t.get(e))==null||s.forEach(n=>n(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var s;t.set(e,((s=t.get(e))==null?void 0:s.filter(n=>n!==r))||[])}}}const Zc=w.createContext(null),Jc=w.createContext(null),tu=()=>{var t;return((t=w.useContext(Zc))==null?void 0:t.id)||null},eu=()=>w.useContext(Jc),ru="data-floating-ui-focusable";function su(t){const{open:e=!1,onOpenChange:r,elements:s}=t,n=Gc(),a=w.useRef({}),[i]=w.useState(()=>Qc()),l=tu()!=null;if(process.env.NODE_ENV!=="production"){const p=s.reference;p&&!lt(p)&&Xc("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=w.useState(s.reference),d=Po((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),r?.(p,g,h)}),m=w.useMemo(()=>({setPositionReference:u}),[]),x=w.useMemo(()=>({reference:c||s.reference||null,floating:s.floating||null,domReference:s.reference}),[c,s.reference,s.floating]);return w.useMemo(()=>({dataRef:a,open:e,onOpenChange:d,elements:x,events:i,floatingId:n,refs:m}),[e,d,x,i,n,m])}function nu(t){t===void 0&&(t={});const{nodeId:e}=t,r=su({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||r,n=s.elements,[a,i]=w.useState(null),[l,c]=w.useState(null),d=n?.domReference||a,m=w.useRef(null),x=eu();Vr(()=>{d&&(m.current=d)},[d]);const p=jo({...t,elements:{...n,...l&&{reference:l}}}),g=w.useCallback(y=>{const k=lt(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;c(k),p.refs.setReference(k)},[p.refs]),h=w.useCallback(y=>{(lt(y)||y===null)&&(m.current=y,i(y)),(lt(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!lt(y))&&p.refs.setReference(y)},[p.refs]),b=w.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:m}),[p.refs,h,g]),v=w.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),E=w.useMemo(()=>({...p,...s,refs:b,elements:v,nodeId:e}),[p,b,v,e,s]);return Vr(()=>{s.dataRef.current.floatingContext=E;const y=x?.nodesRef.current.find(k=>k.id===e);y&&(y.context=E)}),w.useMemo(()=>({...p,context:E,refs:b,elements:v}),[p,b,v,E])}const gn="active",hn="selected";function Ir(t,e,r){const s=new Map,n=r==="item";let a=t;if(n&&t){const{[gn]:i,[hn]:l,...c}=t;a=c}return{...r==="floating"&&{tabIndex:-1,[ru]:""},...a,...e.map(i=>{const l=i?i[r]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((i,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(n&&[gn,hn].includes(u)))if(u.indexOf("on")===0){if(s.has(u)||s.set(u,[]),typeof d=="function"){var m;(m=s.get(u))==null||m.push(d),i[u]=function(){for(var x,p=arguments.length,g=new Array(p),h=0;h<p;h++)g[h]=arguments[h];return(x=s.get(u))==null?void 0:x.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[u]=d}),i),{})}}function ou(t){t===void 0&&(t=[]);const e=t.map(l=>l?.reference),r=t.map(l=>l?.floating),s=t.map(l=>l?.item),n=w.useCallback(l=>Ir(l,t,"reference"),e),a=w.useCallback(l=>Ir(l,t,"floating"),r),i=w.useCallback(l=>Ir(l,t,"item"),s);return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:a,getItemProps:i}),[n,a,i])}function bn(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const au=t=>({name:"inner",options:t,async fn(e){const{listRef:r,overflowRef:s,onFallbackChange:n,offset:a=0,index:i=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:u,...d}=kt(t,e),{rects:m,elements:{floating:x}}=e,p=r.current[i],g=u?.current||x,h=x.clientTop||g.clientTop,b=x.clientTop!==0,v=g.clientTop!==0,E=x===g;if(process.env.NODE_ENV!=="production"&&(e.placement.startsWith("bottom")||qc('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const y={...e,...await xs(-p.offsetTop-x.clientTop-m.reference.height/2-p.offsetHeight/2-a).fn(e)},k=await $r(bn(y,g.scrollHeight+h+x.clientTop),d),R=await $r(y,{...d,elementContext:"reference"}),O=at(0,k.top),S=y.y+O,j=(g.scrollHeight>g.clientHeight?T=>T:be)(at(0,g.scrollHeight+(b&&E||v?h*2:0)-O-at(0,k.bottom)));if(g.style.maxHeight=j+"px",g.scrollTop=O,n){const T=g.offsetHeight<p.offsetHeight*Ot(l,r.current.length)-1||R.top>=-c||R.bottom>=-c;ge.flushSync(()=>n(T))}return s&&(s.current=await $r(bn({...y,y:S},g.offsetHeight+h+x.clientTop),d)),{y:S}}});function iu(t,e){const{open:r,elements:s}=t,{enabled:n=!0,overflowRef:a,scrollRef:i,onChange:l}=e,c=Po(l),u=w.useRef(!1),d=w.useRef(null),m=w.useRef(null);w.useEffect(()=>{if(!n)return;function p(h){if(h.ctrlKey||!g||a.current==null)return;const b=h.deltaY,v=a.current.top>=-.5,E=a.current.bottom>=-.5,y=g.scrollHeight-g.clientHeight,k=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!v&&b>0||!E&&b<0?(h.preventDefault(),ge.flushSync(()=>{c(O=>O+Math[R](b,y*k))})):/firefox/i.test(Kl())&&(g.scrollTop+=b))}const g=i?.current||s.floating;if(r&&g)return g.addEventListener("wheel",p),requestAnimationFrame(()=>{d.current=g.scrollTop,a.current!=null&&(m.current={...a.current})}),()=>{d.current=null,m.current=null,g.removeEventListener("wheel",p)}},[n,r,s.floating,a,i,c]);const x=w.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=i?.current||s.floating;if(!(!a.current||!p||!u.current)){if(d.current!==null){const g=p.scrollTop-d.current;(a.current.bottom<-.5&&g<-1||a.current.top<-.5&&g>1)&&ge.flushSync(()=>c(h=>h+g))}requestAnimationFrame(()=>{d.current=p.scrollTop})}}}),[s.floating,c,a,i]);return w.useMemo(()=>n?{floating:x}:{},[n,x])}let ie=f.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ie.displayName="FloatingContext";let gs=f.createContext(null);gs.displayName="PlacementContext";function hs(t){return f.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function bs(){return f.useContext(ie).setReference}function $o(){return f.useContext(ie).getReferenceProps}function vs(){let{getFloatingProps:t,slot:e}=f.useContext(ie);return f.useCallback((...r)=>Object.assign({},t(...r),{"data-anchor":e.anchor}),[t,e])}function ys(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let e=f.useContext(gs),r=f.useMemo(()=>t,[JSON.stringify(t,(n,a)=>{var i;return(i=a?.outerHTML)!=null?i:a})]);o.n(()=>{e?.(r??null)},[e,r]);let s=f.useContext(ie);return f.useMemo(()=>[s.setFloating,t?s.styles:{}],[s.setFloating,t,s.styles])}let vn=4;function ws({children:t,enabled:e=!0}){let[r,s]=f.useState(null),[n,a]=f.useState(0),i=f.useRef(null),[l,c]=f.useState(null);lu(l);let u=e&&r!==null&&l!==null,{to:d="bottom",gap:m=0,offset:x=0,padding:p=0,inner:g}=cu(r,l),[h,b="center"]=d.split(" ");o.n(()=>{u&&a(0)},[u]);let{refs:v,floatingStyles:E,context:y}=nu({open:u,placement:h==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${h}`:`${h}-${b}`,strategy:"absolute",transform:!1,middleware:[xs({mainAxis:h==="selection"?0:m,crossAxis:x}),So({padding:p}),h!=="selection"&&Co({padding:p}),h==="selection"&&g?au({...g,padding:p,overflowRef:i,offset:n,minItemsVisible:vn,referenceOverflowThreshold:p,onFallbackChange(T){var M,L;if(!T)return;let $=y.elements.floating;if(!$)return;let A=parseFloat(getComputedStyle($).scrollPaddingBottom)||0,D=Math.min(vn,$.childElementCount),z=0,C=0;for(let P of(L=(M=y.elements.floating)==null?void 0:M.childNodes)!=null?L:[])if(nt(P)){let V=P.offsetTop,X=V+P.clientHeight+A,G=$.scrollTop,I=G+$.clientHeight;if(V>=G&&X<=I)D--;else{C=Math.max(0,Math.min(X,I)-Math.max(V,G)),z=P.clientHeight;break}}D>=1&&a(P=>{let V=z*D-C+A;return P>=V?P:V})}}):null,No({padding:p,apply({availableWidth:T,availableHeight:M,elements:L}){Object.assign(L.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${M}px)`})}})].filter(Boolean),whileElementsMounted:ko}),[k=h,R=b]=y.placement.split("-");h==="selection"&&(k="selection");let O=f.useMemo(()=>({anchor:[k,R].filter(Boolean).join(" ")}),[k,R]),S=iu(y,{overflowRef:i,onChange:a}),{getReferenceProps:F,getFloatingProps:B}=ou([S]),j=o.o(T=>{c(T),v.setFloating(T)});return w.createElement(gs.Provider,{value:s},w.createElement(ie.Provider,{value:{setFloating:j,setReference:v.setReference,styles:E,getReferenceProps:F,getFloatingProps:B,slot:O}},t))}function lu(t){o.n(()=>{if(!t)return;let e=new MutationObserver(()=>{let r=window.getComputedStyle(t).maxHeight,s=parseFloat(r);if(isNaN(s))return;let n=parseInt(r);isNaN(n)||s!==n&&(t.style.maxHeight=`${Math.ceil(s)}px`)});return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[t])}function cu(t,e){var r,s,n;let a=Ar((r=t?.gap)!=null?r:"var(--anchor-gap, 0)",e),i=Ar((s=t?.offset)!=null?s:"var(--anchor-offset, 0)",e),l=Ar((n=t?.padding)!=null?n:"var(--anchor-padding, 0)",e);return{...t,gap:a,offset:i,padding:l}}function Ar(t,e,r=void 0){let s=o.p(),n=o.o((c,u)=>{if(c==null)return[r,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!u)return[r,null];let d=yn(c,u);return[d,m=>{let x=To(c);{let p=x.map(g=>window.getComputedStyle(u).getPropertyValue(g));s.requestAnimationFrame(function g(){s.nextFrame(g);let h=!1;for(let[v,E]of x.entries()){let y=window.getComputedStyle(u).getPropertyValue(E);if(p[v]!==y){p[v]=y,h=!0;break}}if(!h)return;let b=yn(c,u);d!==b&&(m(b),d=b)})}return s.dispose}]}return[r,null]}),a=f.useMemo(()=>n(t,e)[0],[t,e]),[i=a,l]=f.useState();return o.n(()=>{let[c,u]=n(t,e);if(l(c),!!u)return u(l)},[t,e]),i}function To(t){let e=/var\((.*)\)/.exec(t);if(e){let r=e[1].indexOf(",");if(r===-1)return[e[1]];let s=e[1].slice(0,r).trim(),n=e[1].slice(r+1).trim();return n?[s,...To(n)]:[s]}return[]}function yn(t,e){let r=document.createElement("div");e.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",t,"important");let s=parseFloat(window.getComputedStyle(r).marginTop)||0;return e.removeChild(r),s}function uu({children:t,freeze:e},r){let s=Io(e,t);return f.isValidElement(s)?f.cloneElement(s,{ref:r}):f.createElement(f.Fragment,null,s)}f.forwardRef(uu);function Io(t,e){let[r,s]=f.useState(e);return!t&&r!==e&&s(e),t?r:e}let ur=f.createContext(null);ur.displayName="OpenClosedContext";var J=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(J||{});function Lt(){return f.useContext(ur)}function dr({value:t,children:e}){return f.createElement(ur.Provider,{value:t},e)}function Ao({children:t}){return f.createElement(ur.Provider,{value:null},t)}function du(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let $t=[];du(()=>{function t(e){if(!mt(e.target)||e.target===document.body||$t[0]===e.target)return;let r=e.target;r=r.closest(We),$t.unshift(r??e.target),$t=$t.filter(s=>s!=null&&s.isConnected),$t.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function fu(t){throw new Error("Unexpected object: "+t)}var U=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(U||{});function It(t,e){let r=e.resolveItems();if(r.length<=0)return null;let s=e.resolveActiveIndex(),n=s??-1;switch(t.focus){case 0:{for(let a=0;a<r.length;++a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 1:{n===-1&&(n=r.length);for(let a=n-1;a>=0;--a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 2:{for(let a=n+1;a<r.length;++a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 3:{for(let a=r.length-1;a>=0;--a)if(!e.resolveDisabled(r[a],a,r))return a;return s}case 4:{for(let a=0;a<r.length;++a)if(e.resolveId(r[a],a,r)===t.id)return a;return s}case 5:return null;default:fu(t)}}function Ie(t){let e=o.o(t),r=f.useRef(!1);f.useEffect(()=>(r.current=!1,()=>{r.current=!0,o.t(()=>{r.current&&e()})}),[e])}let Do=f.createContext(!1);function pu(){return f.useContext(Do)}function wn(t){return f.createElement(Do.Provider,{value:t.force},t.children)}function mu(t){let e=pu(),r=f.useContext(Mo),[s,n]=f.useState(()=>{var a;if(!e&&r!==null)return(a=r.current)!=null?a:null;if(o.s.isServer)return null;let i=t?.getElementById("headlessui-portal-root");if(i)return i;if(t===null)return null;let l=t.createElement("div");return l.setAttribute("id","headlessui-portal-root"),t.body.appendChild(l)});return f.useEffect(()=>{s!==null&&(t!=null&&t.body.contains(s)||t==null||t.body.appendChild(s))},[s,t]),f.useEffect(()=>{e||r!==null&&n(r.current)},[r,n,e]),s}let Fo=f.Fragment,xu=o.Y(function(t,e){let{ownerDocument:r=null,...s}=t,n=f.useRef(null),a=Z(Qn(x=>{n.current=x}),e),i=Nt(n.current),l=r??i,c=mu(l),u=f.useContext(Br),d=o.p(),m=o.K();return Ie(()=>{var x;c&&c.childNodes.length<=0&&((x=c.parentElement)==null||x.removeChild(c))}),c?xt.createPortal(f.createElement("div",{"data-headlessui-portal":"",ref:x=>{d.dispose(),u&&x&&d.add(u.register(x))}},m({ourProps:{ref:a},theirProps:s,slot:{},defaultTag:Fo,name:"Portal"})),c):null});function gu(t,e){let r=Z(e),{enabled:s=!0,ownerDocument:n,...a}=t,i=o.K();return s?f.createElement(xu,{...a,ownerDocument:n,ref:r}):i({ourProps:{ref:r},theirProps:a,slot:{},defaultTag:Fo,name:"Portal"})}let hu=f.Fragment,Mo=f.createContext(null);function bu(t,e){let{target:r,...s}=t,n={ref:Z(e)},a=o.K();return f.createElement(Mo.Provider,{value:r},a({ourProps:n,theirProps:s,defaultTag:hu,name:"Popover.Group"}))}let Br=f.createContext(null);function Lo(){let t=f.useContext(Br),e=f.useRef([]),r=o.o(a=>(e.current.push(a),t&&t.register(a),()=>s(a))),s=o.o(a=>{let i=e.current.indexOf(a);i!==-1&&e.current.splice(i,1),t&&t.unregister(a)}),n=f.useMemo(()=>({register:r,unregister:s,portals:e}),[r,s,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Br.Provider,{value:n},a)},[n])]}let vu=o.Y(gu),_o=o.Y(bu),fr=Object.assign(vu,{Group:_o});const Dt={Idle:{kind:"Idle"},Tracked:t=>({kind:"Tracked",position:t}),Moved:{kind:"Moved"}};function Es(t){let e=t.getBoundingClientRect();return`${e.x},${e.y}`}function Vo(t,e,r){let s=o.o$1();if(e.kind==="Tracked"){let n=function(){a!==Es(t)&&(s.dispose(),r())},{position:a}=e,i=new ResizeObserver(n);i.observe(t),s.add(()=>i.disconnect()),s.addEventListener(window,"scroll",n,{passive:!0}),s.addEventListener(window,"resize",n)}return()=>s.dispose()}function yu(t,e=typeof document<"u"?document.defaultView:null,r){let s=Se(t,"escape");is(e,"keydown",n=>{s&&(n.defaultPrevented||n.key===W.Escape&&r(n))})}function wu(){var t;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,s]=f.useState((t=e?.matches)!=null?t:!1);return o.n(()=>{if(!e)return;function n(a){s(a.matches)}return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[e]),r}function Bo({defaultContainers:t=[],portals:e,mainTreeNode:r}={}){let s=o.o(()=>{var n,a;let i=o.l(r),l=[];for(let c of t)c!==null&&(St(c)?l.push(c):"current"in c&&St(c.current)&&l.push(c.current));if(e!=null&&e.current)for(let c of e.current)l.push(c);for(let c of(n=i?.querySelectorAll("html > *, body > *"))!=null?n:[])c!==document.body&&c!==document.head&&St(c)&&c.id!=="headlessui-portal-root"&&(r&&(c.contains(r)||c.contains((a=r?.getRootNode())==null?void 0:a.host))||l.some(u=>c.contains(u))||l.push(c));return l});return{resolveContainers:s,contains:o.o(n=>s().some(a=>a.contains(n)))}}let Ho=f.createContext(null);function Ge({children:t,node:e}){let[r,s]=f.useState(null),n=ks(e??r);return f.createElement(Ho.Provider,{value:n},t,n===null&&f.createElement(Ct,{features:wt.Hidden,ref:a=>{var i,l;if(a){for(let c of(l=(i=o.l(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?l:[])if(c!==document.body&&c!==document.head&&St(c)&&c!=null&&c.contains(a)){s(c);break}}}}))}function ks(t=null){var e;return(e=f.useContext(Ho))!=null?e:t}function Eu(){let t=typeof document>"u";return"useSyncExternalStore"in w?(e=>e.useSyncExternalStore)(w)(()=>()=>{},()=>!1,()=>!t):!1}function pr(){let t=Eu(),[e,r]=w.useState(o.s.isHandoffComplete);return e&&o.s.isHandoffComplete===!1&&r(!1),w.useEffect(()=>{e!==!0&&r(!0)},[e]),w.useEffect(()=>o.s.handoff(),[]),t?!1:e}function Rs(){let t=f.useRef(!1);return o.n(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var dt=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(dt||{});function js(){let t=f.useRef(0);return lo(!0,"keydown",e=>{e.key==="Tab"&&(t.current=e.shiftKey?1:0)},!0),t}function zo(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let e=new Set;for(let r of t.current)St(r.current)&&e.add(r.current);return e}let ku="div";var Bt=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(Bt||{});function Ru(t,e){let r=f.useRef(null),s=Z(r,e),{initialFocus:n,initialFocusFallback:a,containers:i,features:l=15,...c}=t;pr()||(l=0);let u=Nt(r.current);Nu(l,{ownerDocument:u});let d=Ou(l,{ownerDocument:u,container:r,initialFocus:n,initialFocusFallback:a});Pu(l,{ownerDocument:u,container:r,containers:i,previousActiveElement:d});let m=js(),x=o.o(E=>{if(!nt(r.current))return;let y=r.current;(k=>k())(()=>{o.u(m.current,{[dt.Forwards]:()=>{ut(y,tt.First,{skipElements:[E.relatedTarget,a]})},[dt.Backwards]:()=>{ut(y,tt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=Se(!!(l&2),"focus-trap#tab-lock"),g=o.p(),h=f.useRef(!1),b={ref:s,onKeyDown(E){E.key=="Tab"&&(h.current=!0,g.requestAnimationFrame(()=>{h.current=!1}))},onBlur(E){if(!(l&4))return;let y=zo(i);nt(r.current)&&y.add(r.current);let k=E.relatedTarget;mt(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(Wo(y,k)||(h.current?ut(r.current,o.u(m.current,{[dt.Forwards]:()=>tt.Next,[dt.Backwards]:()=>tt.Previous})|tt.WrapAround,{relativeTo:E.target}):mt(E.target)&&vt(E.target)))}},v=o.K();return f.createElement(f.Fragment,null,p&&f.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:x,features:wt.Focusable}),v({ourProps:b,theirProps:c,defaultTag:ku,name:"FocusTrap"}),p&&f.createElement(Ct,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:x,features:wt.Focusable}))}let ju=o.Y(Ru),Su=Object.assign(ju,{features:Bt});function Cu(t=!0){let e=f.useRef($t.slice());return ls(([r],[s])=>{s===!0&&r===!1&&o.t(()=>{e.current.splice(0)}),s===!1&&r===!0&&(e.current=$t.slice())},[t,$t,e]),o.o(()=>{var r;return(r=e.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function Nu(t,{ownerDocument:e}){let r=!!(t&8),s=Cu(r);ls(()=>{r||o.d(e?.body)&&vt(s())},[r]),Ie(()=>{r&&vt(s())})}function Ou(t,{ownerDocument:e,container:r,initialFocus:s,initialFocusFallback:n}){let a=f.useRef(null),i=Se(!!(t&1),"focus-trap#initial-focus"),l=Rs();return ls(()=>{if(t===0)return;if(!i){n!=null&&n.current&&vt(n.current);return}let c=r.current;c&&o.t(()=>{if(!l.current)return;let u=e?.activeElement;if(s!=null&&s.current){if(s?.current===u){a.current=u;return}}else if(c.contains(u)){a.current=u;return}if(s!=null&&s.current)vt(s.current);else{if(t&16){if(ut(c,tt.First|tt.AutoFocus)!==Qt.Error)return}else if(ut(c,tt.First)!==Qt.Error)return;if(n!=null&&n.current&&(vt(n.current),e?.activeElement===n.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=e?.activeElement})},[n,i,t]),a}function Pu(t,{ownerDocument:e,container:r,containers:s,previousActiveElement:n}){let a=Rs(),i=!!(t&4);is(e?.defaultView,"focus",l=>{if(!i||!a.current)return;let c=zo(s);nt(r.current)&&c.add(r.current);let u=n.current;if(!u)return;let d=l.target;nt(d)?Wo(c,d)?(n.current=d,vt(d)):(l.preventDefault(),l.stopPropagation(),vt(u)):vt(n.current)},!0)}function Wo(t,e){for(let r of t)if(r.contains(e))return!0;return!1}function Yo(t){var e;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||!o.b((e=t.as)!=null?e:Ko)||f.Children.count(t.children)===1}let mr=f.createContext(null);mr.displayName="TransitionContext";var $u=(t=>(t.Visible="visible",t.Hidden="hidden",t))($u||{});function Tu(){let t=f.useContext(mr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function Iu(){let t=f.useContext(xr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let xr=f.createContext(null);xr.displayName="NestingContext";function gr(t){return"children"in t?gr(t.children):t.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Uo(t,e){let r=o.s$1(t),s=f.useRef([]),n=Rs(),a=o.p(),i=o.o((p,g=o.C.Hidden)=>{let h=s.current.findIndex(({el:b})=>b===p);h!==-1&&(o.u(g,{[o.C.Unmount](){s.current.splice(h,1)},[o.C.Hidden](){s.current[h].state="hidden"}}),a.microTask(()=>{var b;!gr(s)&&n.current&&((b=r.current)==null||b.call(r))}))}),l=o.o(p=>{let g=s.current.find(({el:h})=>h===p);return g?g.state!=="visible"&&(g.state="visible"):s.current.push({el:p,state:"visible"}),()=>i(p,o.C.Unmount)}),c=f.useRef([]),u=f.useRef(Promise.resolve()),d=f.useRef({enter:[],leave:[]}),m=o.o((p,g,h)=>{c.current.splice(0),e&&(e.chains.current[g]=e.chains.current[g].filter(([b])=>b!==p)),e?.chains.current[g].push([p,new Promise(b=>{c.current.push(b)})]),e?.chains.current[g].push([p,new Promise(b=>{Promise.all(d.current[g].map(([v,E])=>E)).then(()=>b())})]),g==="enter"?u.current=u.current.then(()=>e?.wait.current).then(()=>h(g)):h(g)}),x=o.o((p,g,h)=>{Promise.all(d.current[g].splice(0).map(([b,v])=>v)).then(()=>{var b;(b=c.current.shift())==null||b()}).then(()=>h(g))});return f.useMemo(()=>({children:s,register:l,unregister:i,onStart:m,onStop:x,wait:u,chains:d}),[l,i,s,m,x,d,u])}let Ko=f.Fragment,Go=o.A.RenderStrategy;function Au(t,e){var r,s;let{transition:n=!0,beforeEnter:a,afterEnter:i,beforeLeave:l,afterLeave:c,enter:u,enterFrom:d,enterTo:m,entered:x,leave:p,leaveFrom:g,leaveTo:h,...b}=t,[v,E]=f.useState(null),y=f.useRef(null),k=Yo(t),R=Z(...k?[y,e,E]:e===null?[]:[e]),O=(r=b.unmount)==null||r?o.C.Unmount:o.C.Hidden,{show:S,appear:F,initial:B}=Tu(),[j,T]=f.useState(S?"visible":"hidden"),M=Iu(),{register:L,unregister:$}=M;o.n(()=>L(y),[L,y]),o.n(()=>{if(O===o.C.Hidden&&y.current){if(S&&j!=="visible"){T("visible");return}return o.u(j,{hidden:()=>$(y),visible:()=>L(y)})}},[j,y,L,$,S,O]);let A=pr();o.n(()=>{if(k&&A&&j==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,j,A,k]);let D=B&&!F,z=F&&S&&B,C=f.useRef(!1),P=Uo(()=>{C.current||(T("hidden"),$(y))},M),V=o.o(K=>{C.current=!0;let et=K?"enter":"leave";P.onStart(y,et,st=>{st==="enter"?a?.():st==="leave"&&l?.()})}),X=o.o(K=>{let et=K?"enter":"leave";C.current=!1,P.onStop(y,et,st=>{st==="enter"?i?.():st==="leave"&&c?.()}),et==="leave"&&!gr(P)&&(T("hidden"),$(y))});f.useEffect(()=>{k&&n||(V(S),X(S))},[S,k,n]);let G=!(!n||!k||!A||D),[,I]=$e(G,v,S,{start:V,end:X}),H=o.m({ref:R,className:((s=o.t$1(b.className,z&&u,z&&d,I.enter&&u,I.enter&&I.closed&&d,I.enter&&!I.closed&&m,I.leave&&p,I.leave&&!I.closed&&g,I.leave&&I.closed&&h,!I.transition&&S&&x))==null?void 0:s.trim())||void 0,...Pe(I)}),Y=0;j==="visible"&&(Y|=J.Open),j==="hidden"&&(Y|=J.Closed),S&&j==="hidden"&&(Y|=J.Opening),!S&&j==="visible"&&(Y|=J.Closing);let _=o.K();return f.createElement(xr.Provider,{value:P},f.createElement(dr,{value:Y},_({ourProps:H,theirProps:b,defaultTag:Ko,features:Go,visible:j==="visible",name:"Transition.Child"})))}function Du(t,e){let{show:r,appear:s=!1,unmount:n=!0,...a}=t,i=f.useRef(null),l=Yo(t),c=Z(...l?[i,e]:e===null?[]:[e]);pr();let u=Lt();if(r===void 0&&u!==null&&(r=(u&J.Open)===J.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,m]=f.useState(r?"visible":"hidden"),x=Uo(()=>{r||m("hidden")}),[p,g]=f.useState(!0),h=f.useRef([r]);o.n(()=>{p!==!1&&h.current[h.current.length-1]!==r&&(h.current.push(r),g(!1))},[h,r]);let b=f.useMemo(()=>({show:r,appear:s,initial:p}),[r,s,p]);o.n(()=>{r?m("visible"):!gr(x)&&i.current!==null&&m("hidden")},[r,x]);let v={unmount:n},E=o.o(()=>{var R;p&&g(!1),(R=t.beforeEnter)==null||R.call(t)}),y=o.o(()=>{var R;p&&g(!1),(R=t.beforeLeave)==null||R.call(t)}),k=o.K();return f.createElement(xr.Provider,{value:x},f.createElement(mr.Provider,{value:b},k({ourProps:{...v,as:f.Fragment,children:f.createElement(qo,{ref:c,...v,...a,beforeEnter:E,beforeLeave:y})},theirProps:{},defaultTag:f.Fragment,features:Go,visible:d==="visible",name:"Transition"})))}function Fu(t,e){let r=f.useContext(mr)!==null,s=Lt()!==null;return f.createElement(f.Fragment,null,!r&&s?f.createElement(Hr,{ref:e,...t}):f.createElement(qo,{ref:e,...t}))}let Hr=o.Y(Du),qo=o.Y(Au),ye=o.Y(Fu),Jt=Object.assign(Hr,{Child:ye,Root:Hr});var Mu=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Mu||{}),Lu=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Lu||{});let _u={0(t,e){return t.titleId===e.id?t:{...t,titleId:e.id}}},Ss=f.createContext(null);Ss.displayName="DialogContext";function hr(t){let e=f.useContext(Ss);if(e===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hr),r}return e}function Vu(t,e){return o.u(e.type,_u,t,e)}let En=o.Y(function(t,e){let r=f.useId(),{id:s=`headlessui-dialog-${r}`,open:n,onClose:a,initialFocus:i,role:l="dialog",autoFocus:c=!0,__demoMode:u=!1,unmount:d=!1,...m}=t,x=f.useRef(!1);l=(function(){return l==="dialog"||l==="alertdialog"?l:(x.current||(x.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let p=Lt();n===void 0&&p!==null&&(n=(p&J.Open)===J.Open);let g=f.useRef(null),h=Z(g,e),b=Nt(g.current),v=n?0:1,[E,y]=f.useReducer(Vu,{titleId:null,descriptionId:null,panelRef:f.createRef()}),k=o.o(()=>a(!1)),R=o.o(I=>y({type:0,id:I})),O=pr()?v===0:!1,[S,F]=Lo(),B={get current(){var I;return(I=E.panelRef.current)!=null?I:g.current}},j=ks(),{resolveContainers:T}=Bo({mainTreeNode:j,portals:S,defaultContainers:[B]}),M=p!==null?(p&J.Closing)===J.Closing:!1;os(u||M?!1:O,{allowed:o.o(()=>{var I,H;return[(H=(I=g.current)==null?void 0:I.closest("[data-headlessui-portal]"))!=null?H:null]}),disallowed:o.o(()=>{var I;return[(I=j?.closest("body > *:not(#headlessui-portal-root)"))!=null?I:null]})});let L=Yt.get(null);o.n(()=>{if(O)return L.actions.push(s),()=>L.actions.pop(s)},[L,s,O]);let $=q(L,f.useCallback(I=>L.selectors.isTop(I,s),[L,s]));sr($,T,I=>{I.preventDefault(),k()}),yu($,b?.defaultView,I=>{I.preventDefault(),I.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),or(u||M?!1:O,b,T),rr(O,g,k);let[A,D]=Je(),z=f.useMemo(()=>[{dialogState:v,close:k,setTitleId:R,unmount:d},E],[v,k,R,d,E]),C=o.n$1({open:v===0}),P={ref:h,id:s,role:l,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":A,unmount:d},V=!wu(),X=Bt.None;O&&!u&&(X|=Bt.RestoreFocus,X|=Bt.TabLock,c&&(X|=Bt.AutoFocus),V&&(X|=Bt.InitialFocus));let G=o.K();return f.createElement(Ao,null,f.createElement(wn,{force:!0},f.createElement(fr,null,f.createElement(Ss.Provider,{value:z},f.createElement(_o,{target:g},f.createElement(wn,{force:!1},f.createElement(D,{slot:C},f.createElement(F,null,f.createElement(Su,{initialFocus:i,initialFocusFallback:g,containers:T,features:X},f.createElement(rs,{value:k},G({ourProps:P,theirProps:m,slot:C,defaultTag:Bu,features:Hu,visible:v===0,name:"Dialog"})))))))))))}),Bu="div",Hu=o.A.RenderStrategy|o.A.Static;function zu(t,e){let{transition:r=!1,open:s,...n}=t,a=Lt(),i=t.hasOwnProperty("open")||a!==null,l=t.hasOwnProperty("onClose");if(!i&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(s!==void 0||r)&&!n.static?f.createElement(Ge,null,f.createElement(Jt,{show:s,transition:r,unmount:n.unmount},f.createElement(En,{ref:e,...n}))):f.createElement(Ge,null,f.createElement(En,{ref:e,open:s,...n}))}let Wu="div";function Yu(t,e){let r=f.useId(),{id:s=`headlessui-dialog-panel-${r}`,transition:n=!1,...a}=t,[{dialogState:i,unmount:l},c]=hr("Dialog.Panel"),u=Z(e,c.panelRef),d=o.n$1({open:i===0}),m=o.o(b=>{b.stopPropagation()}),x={ref:u,id:s,onClick:m},p=n?ye:f.Fragment,g=n?{unmount:l}:{},h=o.K();return f.createElement(p,{...g},h({ourProps:x,theirProps:a,slot:d,defaultTag:Wu,name:"Dialog.Panel"}))}let Uu="div";function Ku(t,e){let{transition:r=!1,...s}=t,[{dialogState:n,unmount:a}]=hr("Dialog.Backdrop"),i=o.n$1({open:n===0}),l={ref:e,"aria-hidden":!0},c=r?ye:f.Fragment,u=r?{unmount:a}:{},d=o.K();return f.createElement(c,{...u},d({ourProps:l,theirProps:s,slot:i,defaultTag:Uu,name:"Dialog.Backdrop"}))}let Gu="h2";function qu(t,e){let r=f.useId(),{id:s=`headlessui-dialog-title-${r}`,...n}=t,[{dialogState:a,setTitleId:i}]=hr("Dialog.Title"),l=Z(e);f.useEffect(()=>(i(s),()=>i(null)),[s,i]);let c=o.n$1({open:a===0}),u={ref:l,id:s};return o.K()({ourProps:u,theirProps:n,slot:c,defaultTag:Gu,name:"Dialog.Title"})}let Xu=o.Y(zu),Xo=o.Y(Yu),Qu=o.Y(Ku),Qo=o.Y(qu),Zu=Object.assign(Xu,{Panel:Xo,Title:Qo,Description:Re}),Ju="div";function td(t,e){let r=`headlessui-control-${f.useId()}`,[s,n]=je(),[a,i]=Je(),l=o.a(),{disabled:c=l||!1,...u}=t,d=o.n$1({disabled:c}),m={ref:e,disabled:c||void 0,"aria-disabled":c||void 0},x=o.K();return f.createElement(o.l$1,{value:c},f.createElement(n,{value:s},f.createElement(i,{value:a},f.createElement(_i,{id:r},x({ourProps:m,theirProps:{...u,children:f.createElement(Fi,null,typeof u.children=="function"?u.children(d):u.children)},slot:d,defaultTag:Ju,name:"Field"})))))}let br=o.Y(td),ed="input";function rd(t,e){let r=f.useId(),s=re(),n=o.a(),{id:a=s||`headlessui-input-${r}`,disabled:i=n||!1,autoFocus:l=!1,invalid:c=!1,...u}=t,d=se(),m=ke(),{isFocused:x,focusProps:p}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:l}),{isHovered:g,hoverProps:h}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),b=o.V({ref:e,id:a,"aria-labelledby":d,"aria-describedby":m,"aria-invalid":c?"true":void 0,disabled:i||void 0,autoFocus:l},p,h),v=o.n$1({disabled:i,invalid:c,hover:g,focus:x,autofocus:l});return o.K()({ourProps:b,theirProps:u,slot:v,defaultTag:ed,name:"Input"})}let sd=o.Y(rd),kn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Rn(t){var e,r;let s=(e=t.innerText)!=null?e:"",n=t.cloneNode(!0);if(!nt(n))return s;let a=!1;for(let l of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),a=!0;let i=a?(r=n.innerText)!=null?r:"":s;return kn.test(i)&&(i=i.replace(kn,"")),i}function nd(t){let e=t.getAttribute("aria-label");if(typeof e=="string")return e.trim();let r=t.getAttribute("aria-labelledby");if(r){let s=r.split(" ").map(n=>{let a=document.getElementById(n);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():Rn(a).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Rn(t).trim()}function Zo(t){let e=f.useRef(""),r=f.useRef("");return o.o(()=>{let s=t.current;if(!s)return"";let n=s.innerText;if(e.current===n)return r.current;let a=nd(s).trim().toLowerCase();return e.current=n,r.current=a,a})}var od=Object.defineProperty,ad=(t,e,r)=>e in t?od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jn=(t,e,r)=>(ad(t,typeof e!="symbol"?e+"":e,r),r),it=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(it||{}),At=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(At||{}),ze=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(ze||{}),Jo=(t=>(t[t.OpenListbox=0]="OpenListbox",t[t.CloseListbox=1]="CloseListbox",t[t.GoToOption=2]="GoToOption",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.SelectOption=5]="SelectOption",t[t.RegisterOptions=6]="RegisterOptions",t[t.UnregisterOptions=7]="UnregisterOptions",t[t.SetButtonElement=8]="SetButtonElement",t[t.SetOptionsElement=9]="SetOptionsElement",t[t.SortOptions=10]="SortOptions",t[t.MarkButtonAsMoved=11]="MarkButtonAsMoved",t))(Jo||{});function Sn(t,e=r=>r){let r=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,s=as(e(t.options.slice()),a=>a.dataRef.current.domRef.current),n=r?s.indexOf(r):null;return n===-1&&(n=null),{options:s,activeOptionIndex:n}}let id={1(t){if(t.dataRef.current.disabled||t.listboxState===1)return t;let e=t.buttonElement?Dt.Tracked(Es(t.buttonElement)):t.buttonPositionState;return{...t,activeOptionIndex:null,pendingFocus:{focus:U.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:e}},0(t,e){if(t.dataRef.current.disabled||t.listboxState===0)return t;let r=t.activeOptionIndex,{isSelected:s}=t.dataRef.current,n=t.options.findIndex(a=>s(a.dataRef.current.value));return n!==-1&&(r=n),{...t,frozenValue:!1,pendingFocus:e.focus,listboxState:0,activeOptionIndex:r,__demoMode:!1,buttonPositionState:Dt.Idle}},2(t,e){var r,s,n,a,i;if(t.dataRef.current.disabled||t.listboxState===1)return t;let l={...t,searchQuery:"",activationTrigger:(r=e.trigger)!=null?r:1,__demoMode:!1};if(e.focus===U.Nothing)return{...l,activeOptionIndex:null};if(e.focus===U.Specific)return{...l,activeOptionIndex:t.options.findIndex(d=>d.id===e.id)};if(e.focus===U.Previous){let d=t.activeOptionIndex;if(d!==null){let m=t.options[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.options[x].dataRef.current.domRef;if(((s=m.current)==null?void 0:s.previousElementSibling)===p.current||((n=p.current)==null?void 0:n.previousElementSibling)===null)return{...l,activeOptionIndex:x}}}}else if(e.focus===U.Next){let d=t.activeOptionIndex;if(d!==null){let m=t.options[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.options,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.options[x].dataRef.current.domRef;if(((a=m.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...l,activeOptionIndex:x}}}}let c=Sn(t),u=It(e,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...l,...c,activeOptionIndex:u}},3:(t,e)=>{if(t.dataRef.current.disabled||t.listboxState===1)return t;let r=t.searchQuery!==""?0:1,s=t.searchQuery+e.value.toLowerCase(),n=(t.activeOptionIndex!==null?t.options.slice(t.activeOptionIndex+r).concat(t.options.slice(0,t.activeOptionIndex+r)):t.options).find(i=>{var l;return!i.dataRef.current.disabled&&((l=i.dataRef.current.textValue)==null?void 0:l.startsWith(s))}),a=n?t.options.indexOf(n):-1;return a===-1||a===t.activeOptionIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeOptionIndex:a,activationTrigger:1}},4(t){return t.dataRef.current.disabled||t.listboxState===1||t.searchQuery===""?t:{...t,searchQuery:""}},5(t){return t.dataRef.current.mode===0?{...t,frozenValue:!0}:{...t}},6:(t,e)=>{let r=t.options.concat(e.options),s=t.activeOptionIndex;if(t.pendingFocus.focus!==U.Nothing&&(s=It(t.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>t.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled})),t.activeOptionIndex===null){let{isSelected:n}=t.dataRef.current;if(n){let a=r.findIndex(i=>n?.(i.dataRef.current.value));a!==-1&&(s=a)}}return{...t,options:r,activeOptionIndex:s,pendingFocus:{focus:U.Nothing},pendingShouldSort:!0}},7:(t,e)=>{let r=t.options,s=[],n=new Set(e.options);for(let[a,i]of r.entries())if(n.has(i.id)&&(s.push(a),n.delete(i.id),n.size===0))break;if(s.length>0){r=r.slice();for(let a of s.reverse())r.splice(a,1)}return{...t,options:r,activationTrigger:1}},8:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},9:(t,e)=>t.optionsElement===e.element?t:{...t,optionsElement:e.element},10:t=>t.pendingShouldSort?{...t,...Sn(t),pendingShouldSort:!1}:t,11(t){return t.buttonPositionState.kind!=="Tracked"?t:{...t,buttonPositionState:Dt.Moved}}},ld=class ta extends er{constructor(e){super(e),jn(this,"actions",{onChange:r=>{let{onChange:s,compare:n,mode:a,value:i}=this.state.dataRef.current;return o.u(a,{0:()=>s?.(r),1:()=>{let l=i.slice(),c=l.findIndex(u=>n(u,r));return c===-1?l.push(r):l.splice(c,1),s?.(l)}})},registerOption:pe(()=>{let r=[],s=new Set;return[(n,a)=>{s.has(a)||(s.add(a),r.push({id:n,dataRef:a}))},()=>(s.clear(),this.send({type:6,options:r.splice(0)}))]}),unregisterOption:pe(()=>{let r=[];return[s=>r.push(s),()=>{this.send({type:7,options:r.splice(0)})}]}),goToOption:pe(()=>{let r=null;return[(s,n)=>{r={type:2,...s,trigger:n}},()=>r&&this.send(r)]}),closeListbox:()=>{this.send({type:1})},openListbox:r=>{this.send({type:0,focus:r})},selectActiveOption:()=>{var r;if(this.state.activeOptionIndex!==null){let{dataRef:s}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(s.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(r=this.state.buttonElement)==null||r.focus({preventScroll:!0}))},selectOption:r=>{this.send({type:5,value:r})},search:r=>{this.send({type:3,value:r})},clearSearch:()=>{this.send({type:4})},setButtonElement:r=>{this.send({type:8,element:r})},setOptionsElement:r=>{this.send({type:9,element:r})}}),jn(this,"selectors",{activeDescendantId(r){var s;let n=r.activeOptionIndex,a=r.options;return n===null||(s=a[n])==null?void 0:s.id},isActive(r,s){var n;let a=r.activeOptionIndex,i=r.options;return a!==null?((n=i[a])==null?void 0:n.id)===s:!1},hasFrozenValue(r){return r.frozenValue},shouldScrollIntoView(r,s){return r.__demoMode||r.listboxState!==0||r.activationTrigger===0?!1:this.isActive(r,s)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let r=this.state.id,s=Yt.get(null);this.disposables.add(s.on(ns.Push,n=>{!s.selectors.isTop(n,r)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}this.disposables.group(r=>{this.on(1,s=>{s.buttonElement&&(r.dispose(),r.add(Vo(s.buttonElement,s.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(r,s)=>{var n;this.actions.onChange(s.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:r=!1}){return new ta({id:e,dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:U.Nothing},frozenValue:!1,__demoMode:r,buttonPositionState:Dt.Idle})}reduce(e,r){return o.u(r.type,id,e,r)}};const ea=f.createContext(null);function Cs(t){let e=f.useContext(ea);if(e===null){let r=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ra),r}return e}function ra({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>ld.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let vr=f.createContext(null);vr.displayName="ListboxDataContext";function Ae(t){let e=f.useContext(vr);if(e===null){let r=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ae),r}return e}let cd=f.Fragment;function ud(t,e){let r=f.useId(),s=o.a(),{value:n,defaultValue:a,form:i,name:l,onChange:c,by:u,invalid:d=!1,disabled:m=s||!1,horizontal:x=!1,multiple:p=!1,__demoMode:g=!1,...h}=t;const b=x?"horizontal":"vertical";let v=Z(e),E=Zr(a),[y=p?[]:void 0,k]=Qr(n,c,E),R=ra({id:r,__demoMode:g}),O=f.useRef({static:!1,hold:!1}),S=f.useRef(new Map),F=rl(u),B=f.useCallback(G=>o.u(j.mode,{[At.Multi]:()=>y.some(I=>F(I,G)),[At.Single]:()=>F(y,G)}),[y]),j=o.n$1({value:y,disabled:m,invalid:d,mode:p?At.Multi:At.Single,orientation:b,onChange:k,compare:F,isSelected:B,optionsPropsRef:O,listRef:S});o.n(()=>{R.state.dataRef.current=j},[j]);let T=q(R,G=>G.listboxState),M=Yt.get(null),L=q(M,f.useCallback(G=>M.selectors.isTop(G,r),[M,r])),[$,A]=q(R,G=>[G.buttonElement,G.optionsElement]);sr(L,[$,A],(G,I)=>{R.send({type:Jo.CloseListbox}),Oe(I,Ne.Loose)||(G.preventDefault(),$?.focus())});let D=o.n$1({open:T===it.Open,disabled:m,invalid:d,value:y}),[z,C]=je({inherit:!0}),P={ref:v},V=f.useCallback(()=>{if(E!==void 0)return k?.(E)},[k,E]),X=o.K();return f.createElement(C,{value:z,props:{htmlFor:$?.id},slot:{open:T===it.Open,disabled:m}},f.createElement(ws,null,f.createElement(ea.Provider,{value:R},f.createElement(vr.Provider,{value:j},f.createElement(dr,{value:o.u(T,{[it.Open]:J.Open,[it.Closed]:J.Closed})},l!=null&&y!=null&&f.createElement(ts,{disabled:m,data:{[l]:y},form:i,onReset:V}),X({ourProps:P,theirProps:h,slot:D,defaultTag:cd,name:"Listbox"}))))))}let dd="button";function fd(t,e){let r=f.useId(),s=re(),n=Ae("Listbox.Button"),a=Cs("Listbox.Button"),{id:i=s||`headlessui-listbox-button-${r}`,disabled:l=n.disabled||!1,autoFocus:c=!1,...u}=t,d=Z(e,bs(),a.actions.setButtonElement),m=$o(),[x,p,g]=q(a,A=>[A.listboxState,A.buttonElement,A.optionsElement]),h=x===it.Open;co(h,{trigger:p,action:f.useCallback(A=>{if(p!=null&&p.contains(A.target))return Tt.Ignore;let D=A.target.closest('[role="option"]:not([data-disabled])');return nt(D)?Tt.Select(D):g!=null&&g.contains(A.target)?Tt.Ignore:Tt.Close},[p,g]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let b=o.o(A=>{switch(A.key){case W.Enter:Jr(A.currentTarget);break;case W.Space:case W.ArrowDown:A.preventDefault(),a.actions.openListbox({focus:n.value?U.Nothing:U.First});break;case W.ArrowUp:A.preventDefault(),a.actions.openListbox({focus:n.value?U.Nothing:U.Last});break}}),v=o.o(A=>{A.key===W.Space&&A.preventDefault()}),E=to(A=>{var D;a.state.listboxState===it.Open?(xt.flushSync(()=>a.actions.closeListbox()),(D=a.state.buttonElement)==null||D.focus({preventScroll:!0})):(A.preventDefault(),a.actions.openListbox({focus:U.Nothing}))}),y=o.o(A=>A.preventDefault()),k=se([i]),R=ke(),{isFocusVisible:O,focusProps:S}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:c}),{isHovered:F,hoverProps:B}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:l}),{pressed:j,pressProps:T}=o.w({disabled:l}),M=o.n$1({open:x===it.Open,active:j||x===it.Open,disabled:l,invalid:n.invalid,value:n.value,hover:F,focus:O,autofocus:c}),L=q(a,A=>A.listboxState===it.Open),$=o.V(m(),{ref:d,id:i,type:nr(t,p),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":L,"aria-labelledby":k,"aria-describedby":R,disabled:l||void 0,autoFocus:c,onKeyDown:b,onKeyUp:v,onKeyPress:y},E,S,B,T);return o.K()({ourProps:$,theirProps:u,slot:M,defaultTag:dd,name:"Listbox.Button"})}let sa=f.createContext(!1),pd="div",md=o.A.RenderStrategy|o.A.Static;function xd(t,e){let r=f.useId(),{id:s=`headlessui-listbox-options-${r}`,anchor:n,portal:a=!1,modal:i=!0,transition:l=!1,...c}=t,u=hs(n),[d,m]=f.useState(null);u&&(a=!0);let x=Ae("Listbox.Options"),p=Cs("Listbox.Options"),[g,h,b,v]=q(p,_=>[_.listboxState,_.buttonElement,_.optionsElement,_.__demoMode]),E=Nt(h),y=Nt(b),k=Lt(),[R,O]=$e(l,d,k!==null?(k&J.Open)===J.Open:g===it.Open);rr(R,h,p.actions.closeListbox);let S=v?!1:i&&g===it.Open;or(S,y);let F=v?!1:i&&g===it.Open;os(F,{allowed:f.useCallback(()=>[h,b],[h,b])});let B=q(p,p.selectors.didButtonMove)?!1:R,j=q(p,p.selectors.hasFrozenValue)&&!t.static,T=Io(j,x.value),M=f.useCallback(_=>x.compare(T,_),[x.compare,T]),L=q(p,_=>{var K;if(u==null||!((K=u?.to)!=null&&K.includes("selection")))return null;let et=_.options.findIndex(st=>M(st.dataRef.current.value));return et===-1&&(et=0),et}),$=(()=>{if(u==null)return;if(L===null)return{...u,inner:void 0};let _=Array.from(x.listRef.current.values());return{...u,inner:{listRef:{current:_},index:L}}})(),[A,D]=ys($),z=vs(),C=Z(e,u?A:null,p.actions.setOptionsElement,m),P=o.p();f.useEffect(()=>{let _=b;_&&g===it.Open&&(o.d(_)||_==null||_.focus({preventScroll:!0}))},[g,b]);let V=o.o(_=>{var K;switch(P.dispose(),_.key){case W.Space:if(p.state.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),p.actions.search(_.key);case W.Enter:_.preventDefault(),_.stopPropagation(),p.actions.selectActiveOption();break;case o.u(x.orientation,{vertical:W.ArrowDown,horizontal:W.ArrowRight}):return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Next});case o.u(x.orientation,{vertical:W.ArrowUp,horizontal:W.ArrowLeft}):return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Previous});case W.Home:case W.PageUp:return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.First});case W.End:case W.PageDown:return _.preventDefault(),_.stopPropagation(),p.actions.goToOption({focus:U.Last});case W.Escape:_.preventDefault(),_.stopPropagation(),xt.flushSync(()=>p.actions.closeListbox()),(K=p.state.buttonElement)==null||K.focus({preventScroll:!0});return;case W.Tab:_.preventDefault(),_.stopPropagation(),xt.flushSync(()=>p.actions.closeListbox()),ao(p.state.buttonElement,_.shiftKey?tt.Previous:tt.Next);break;default:_.key.length===1&&(p.actions.search(_.key),P.setTimeout(()=>p.actions.clearSearch(),350));break}}),X=q(p,_=>{var K;return(K=_.buttonElement)==null?void 0:K.id}),G=o.n$1({open:g===it.Open}),I=o.V(u?z():{},{id:s,ref:C,"aria-activedescendant":q(p,p.selectors.activeDescendantId),"aria-multiselectable":x.mode===At.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":x.orientation,onKeyDown:V,role:"listbox",tabIndex:g===it.Open?0:void 0,style:{...c.style,...D,"--button-width":ss(R,h,!0).width},...Pe(O)}),H=o.K(),Y=f.useMemo(()=>x.mode===At.Multi?x:{...x,isSelected:M},[x,M]);return f.createElement(fr,{enabled:a?t.static||R:!1,ownerDocument:E},f.createElement(vr.Provider,{value:Y},H({ourProps:I,theirProps:c,slot:G,defaultTag:pd,features:md,visible:B,name:"Listbox.Options"})))}let gd="div";function hd(t,e){let r=f.useId(),{id:s=`headlessui-listbox-option-${r}`,disabled:n=!1,value:a,...i}=t,l=f.useContext(sa)===!0,c=Ae("Listbox.Option"),u=Cs("Listbox.Option"),d=q(u,j=>u.selectors.isActive(j,s)),m=c.isSelected(a),x=f.useRef(null),p=Zo(x),g=o.s$1({disabled:n,value:a,domRef:x,get textValue(){return p()}}),h=Z(e,x,j=>{j?c.listRef.current.set(s,j):c.listRef.current.delete(s)}),b=q(u,j=>u.selectors.shouldScrollIntoView(j,s));o.n(()=>{if(b)return o.o$1().requestAnimationFrame(()=>{var j,T;(T=(j=x.current)==null?void 0:j.scrollIntoView)==null||T.call(j,{block:"nearest"})})},[b,x]),o.n(()=>{if(!l)return u.actions.registerOption(s,g),()=>u.actions.unregisterOption(s)},[g,s,l]);let v=o.o(j=>{if(n)return j.preventDefault();u.actions.selectOption(a)}),E=o.o(()=>{if(n)return u.actions.goToOption({focus:U.Nothing});u.actions.goToOption({focus:U.Specific,id:s})}),y=uo(),k=o.o(j=>y.update(j)),R=o.o(j=>{y.wasMoved(j)&&(n||d&&u.state.activationTrigger===ze.Pointer||u.actions.goToOption({focus:U.Specific,id:s},ze.Pointer))}),O=o.o(j=>{y.wasMoved(j)&&(n||d&&u.state.activationTrigger===ze.Pointer&&u.actions.goToOption({focus:U.Nothing}))}),S=o.n$1({active:d,focus:d,selected:m,disabled:n,selectedOption:m&&l}),F=l?{}:{id:s,ref:h,role:"option",tabIndex:n===!0?void 0:-1,"aria-disabled":n===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:v,onFocus:E,onPointerEnter:k,onMouseEnter:k,onPointerMove:R,onMouseMove:R,onPointerLeave:O,onMouseLeave:O},B=o.K();return!m&&l?null:B({ourProps:F,theirProps:i,slot:S,defaultTag:gd,name:"Listbox.Option"})}let bd=f.Fragment;function vd(t,e){let{options:r,placeholder:s,...n}=t,a={ref:Z(e)},i=Ae("ListboxSelectedOption"),l=o.n$1({}),c=i.value===void 0||i.value===null||i.mode===At.Multi&&Array.isArray(i.value)&&i.value.length===0,u=o.K();return f.createElement(sa.Provider,{value:!0},u({ourProps:a,theirProps:{...n,children:f.createElement(f.Fragment,null,s&&c?s:r)},slot:l,defaultTag:bd,name:"ListboxSelectedOption"}))}let yd=o.Y(ud),na=o.Y(fd),wd=ne,oa=o.Y(xd),aa=o.Y(hd),Ed=o.Y(vd),kd=Object.assign(yd,{Button:na,Label:wd,Options:oa,Option:aa,SelectedOption:Ed});var Rd=Object.defineProperty,jd=(t,e,r)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cn=(t,e,r)=>(jd(t,typeof e!="symbol"?e+"":e,r),r),ot=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(ot||{}),qe=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(qe||{}),Q=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItems=5]="RegisterItems",t[t.UnregisterItems=6]="UnregisterItems",t[t.SetButtonElement=7]="SetButtonElement",t[t.SetItemsElement=8]="SetItemsElement",t[t.SortItems=9]="SortItems",t[t.MarkButtonAsMoved=10]="MarkButtonAsMoved",t))(Q||{});function Nn(t,e=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,s=as(e(t.items.slice()),a=>a.dataRef.current.domRef.current),n=r?s.indexOf(r):null;return n===-1&&(n=null),{items:s,activeItemIndex:n}}let Sd={1(t){if(t.menuState===1)return t;let e=t.buttonElement?Dt.Tracked(Es(t.buttonElement)):t.buttonPositionState;return{...t,activeItemIndex:null,pendingFocus:{focus:U.Nothing},menuState:1,buttonPositionState:e}},0(t,e){return t.menuState===0?t:{...t,__demoMode:!1,pendingFocus:e.focus,menuState:0,buttonPositionState:Dt.Idle}},2:(t,e)=>{var r,s,n,a,i;if(t.menuState===1)return t;let l={...t,searchQuery:"",activationTrigger:(r=e.trigger)!=null?r:1,__demoMode:!1};if(e.focus===U.Nothing)return{...l,activeItemIndex:null};if(e.focus===U.Specific)return{...l,activeItemIndex:t.items.findIndex(d=>d.id===e.id)};if(e.focus===U.Previous){let d=t.activeItemIndex;if(d!==null){let m=t.items[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.items[x].dataRef.current.domRef;if(((s=m.current)==null?void 0:s.previousElementSibling)===p.current||((n=p.current)==null?void 0:n.previousElementSibling)===null)return{...l,activeItemIndex:x}}}}else if(e.focus===U.Next){let d=t.activeItemIndex;if(d!==null){let m=t.items[d].dataRef.current.domRef,x=It(e,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(x!==null){let p=t.items[x].dataRef.current.domRef;if(((a=m.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...l,activeItemIndex:x}}}}let c=Nn(t),u=It(e,{resolveItems:()=>c.items,resolveActiveIndex:()=>c.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...l,...c,activeItemIndex:u}},3:(t,e)=>{let r=t.searchQuery!==""?0:1,s=t.searchQuery+e.value.toLowerCase(),n=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+r).concat(t.items.slice(0,t.activeItemIndex+r)):t.items).find(i=>{var l;return((l=i.dataRef.current.textValue)==null?void 0:l.startsWith(s))&&!i.dataRef.current.disabled}),a=n?t.items.indexOf(n):-1;return a===-1||a===t.activeItemIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeItemIndex:a,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,e)=>{let r=t.items.concat(e.items.map(n=>n)),s=t.activeItemIndex;return t.pendingFocus.focus!==U.Nothing&&(s=It(t.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>t.activeItemIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled})),{...t,items:r,activeItemIndex:s,pendingFocus:{focus:U.Nothing},pendingShouldSort:!0}},6:(t,e)=>{let r=t.items,s=[],n=new Set(e.items);for(let[a,i]of r.entries())if(n.has(i.id)&&(s.push(a),n.delete(i.id),n.size===0))break;if(s.length>0){r=r.slice();for(let a of s.reverse())r.splice(a,1)}return{...t,items:r,activationTrigger:1}},7:(t,e)=>t.buttonElement===e.element?t:{...t,buttonElement:e.element},8:(t,e)=>t.itemsElement===e.element?t:{...t,itemsElement:e.element},9:t=>t.pendingShouldSort?{...t,...Nn(t),pendingShouldSort:!1}:t,10(t){return t.buttonPositionState.kind!=="Tracked"?t:{...t,buttonPositionState:Dt.Moved}}},Cd=class ia extends er{constructor(e){super(e),Cn(this,"actions",{registerItem:pe(()=>{let r=[],s=new Set;return[(n,a)=>{s.has(a)||(s.add(a),r.push({id:n,dataRef:a}))},()=>(s.clear(),this.send({type:5,items:r.splice(0)}))]}),unregisterItem:pe(()=>{let r=[];return[s=>r.push(s),()=>this.send({type:6,items:r.splice(0)})]})}),Cn(this,"selectors",{activeDescendantId(r){var s;let n=r.activeItemIndex,a=r.items;return n===null||(s=a[n])==null?void 0:s.id},isActive(r,s){var n;let a=r.activeItemIndex,i=r.items;return a!==null?((n=i[a])==null?void 0:n.id)===s:!1},shouldScrollIntoView(r,s){return r.__demoMode||r.menuState!==0||r.activationTrigger===0?!1:this.isActive(r,s)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let r=this.state.id,s=Yt.get(null);this.disposables.add(s.on(ns.Push,n=>{!s.selectors.isTop(n,r)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}this.disposables.group(r=>{this.on(1,s=>{s.buttonElement&&(r.dispose(),r.add(Vo(s.buttonElement,s.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:e,__demoMode:r=!1}){return new ia({id:e,__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:U.Nothing},buttonPositionState:Dt.Idle})}reduce(e,r){return o.u(r.type,Sd,e,r)}};const la=f.createContext(null);function Ns(t){let e=f.useContext(la);if(e===null){let r=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ca),r}return e}function ca({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>Cd.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let Nd=f.Fragment;function Od(t,e){let r=f.useId(),{__demoMode:s=!1,...n}=t,a=ca({id:r,__demoMode:s}),[i,l,c]=q(a,b=>[b.menuState,b.itemsElement,b.buttonElement]),u=Z(e),d=Yt.get(null),m=q(d,f.useCallback(b=>d.selectors.isTop(b,r),[d,r]));sr(m,[c,l],(b,v)=>{var E;a.send({type:Q.CloseMenu}),Oe(v,Ne.Loose)||(b.preventDefault(),(E=a.state.buttonElement)==null||E.focus())});let x=o.o(()=>{a.send({type:Q.CloseMenu})}),p=o.n$1({open:i===ot.Open,close:x}),g={ref:u},h=o.K();return f.createElement(ws,null,f.createElement(la.Provider,{value:a},f.createElement(dr,{value:o.u(i,{[ot.Open]:J.Open,[ot.Closed]:J.Closed})},h({ourProps:g,theirProps:n,slot:p,defaultTag:Nd,name:"Menu"}))))}let Pd="button";function $d(t,e){let r=Ns("Menu.Button"),s=f.useId(),{id:n=`headlessui-menu-button-${s}`,disabled:a=!1,autoFocus:i=!1,...l}=t,c=f.useRef(null),u=$o(),d=Z(e,c,bs(),o.o(j=>r.send({type:Q.SetButtonElement,element:j}))),m=o.o(j=>{switch(j.key){case W.Space:case W.Enter:case W.ArrowDown:j.preventDefault(),j.stopPropagation(),r.send({type:Q.OpenMenu,focus:{focus:U.First}});break;case W.ArrowUp:j.preventDefault(),j.stopPropagation(),r.send({type:Q.OpenMenu,focus:{focus:U.Last}});break}}),x=o.o(j=>{j.key===W.Space&&j.preventDefault()}),[p,g,h]=q(r,j=>[j.menuState,j.buttonElement,j.itemsElement]),b=p===ot.Open;co(b,{trigger:g,action:f.useCallback(j=>{if(g!=null&&g.contains(j.target))return Tt.Ignore;let T=j.target.closest('[role="menuitem"]:not([data-disabled])');return nt(T)?Tt.Select(T):h!=null&&h.contains(j.target)?Tt.Ignore:Tt.Close},[g,h]),close:f.useCallback(()=>r.send({type:Q.CloseMenu}),[]),select:f.useCallback(j=>j.click(),[])});let v=to(j=>{var T;a||(p===ot.Open?(xt.flushSync(()=>r.send({type:Q.CloseMenu})),(T=c.current)==null||T.focus({preventScroll:!0})):(j.preventDefault(),r.send({type:Q.OpenMenu,focus:{focus:U.Nothing},trigger:qe.Pointer})))}),{isFocusVisible:E,focusProps:y}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:i}),{isHovered:k,hoverProps:R}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:a}),{pressed:O,pressProps:S}=o.w({disabled:a}),F=o.n$1({open:p===ot.Open,active:O||p===ot.Open,disabled:a,hover:k,focus:E,autofocus:i}),B=o.V(u(),{ref:d,id:n,type:nr(t,c.current),"aria-haspopup":"menu","aria-controls":h?.id,"aria-expanded":p===ot.Open,disabled:a||void 0,autoFocus:i,onKeyDown:m,onKeyUp:x},v,y,R,S);return o.K()({ourProps:B,theirProps:l,slot:F,defaultTag:Pd,name:"Menu.Button"})}let Td="div",Id=o.A.RenderStrategy|o.A.Static;function Ad(t,e){let r=f.useId(),{id:s=`headlessui-menu-items-${r}`,anchor:n,portal:a=!1,modal:i=!0,transition:l=!1,...c}=t,u=hs(n),d=Ns("Menu.Items"),[m,x]=ys(u),p=vs(),[g,h]=f.useState(null),b=Z(e,u?m:null,o.o(C=>d.send({type:Q.SetItemsElement,element:C})),h),[v,E]=q(d,C=>[C.menuState,C.buttonElement]),y=Nt(E),k=Nt(g);u&&(a=!0);let R=Lt(),[O,S]=$e(l,g,R!==null?(R&J.Open)===J.Open:v===ot.Open);rr(O,E,()=>{d.send({type:Q.CloseMenu})});let F=q(d,C=>C.__demoMode),B=F?!1:i&&v===ot.Open;or(B,k);let j=F?!1:i&&v===ot.Open;os(j,{allowed:f.useCallback(()=>[E,g],[E,g])});let T=q(d,d.selectors.didButtonMove)?!1:O;f.useEffect(()=>{let C=g;C&&v===ot.Open&&(o.d(C)||C.focus({preventScroll:!0}))},[v,g]),Ml(v===ot.Open,{container:g,accept(C){return C.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let M=o.p(),L=o.o(C=>{var P,V,X;switch(M.dispose(),C.key){case W.Space:if(d.state.searchQuery!=="")return C.preventDefault(),C.stopPropagation(),d.send({type:Q.Search,value:C.key});case W.Enter:if(C.preventDefault(),C.stopPropagation(),d.state.activeItemIndex!==null){let{dataRef:G}=d.state.items[d.state.activeItemIndex];(V=(P=G.current)==null?void 0:P.domRef.current)==null||V.click()}d.send({type:Q.CloseMenu}),oo(d.state.buttonElement);break;case W.ArrowDown:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Next});case W.ArrowUp:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Previous});case W.Home:case W.PageUp:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.First});case W.End:case W.PageDown:return C.preventDefault(),C.stopPropagation(),d.send({type:Q.GoToItem,focus:U.Last});case W.Escape:C.preventDefault(),C.stopPropagation(),xt.flushSync(()=>d.send({type:Q.CloseMenu})),(X=d.state.buttonElement)==null||X.focus({preventScroll:!0});break;case W.Tab:C.preventDefault(),C.stopPropagation(),xt.flushSync(()=>d.send({type:Q.CloseMenu})),ao(d.state.buttonElement,C.shiftKey?tt.Previous:tt.Next);break;default:C.key.length===1&&(d.send({type:Q.Search,value:C.key}),M.setTimeout(()=>d.send({type:Q.ClearSearch}),350));break}}),$=o.o(C=>{C.key===W.Space&&C.preventDefault()}),A=o.n$1({open:v===ot.Open}),D=o.V(u?p():{},{"aria-activedescendant":q(d,d.selectors.activeDescendantId),"aria-labelledby":q(d,C=>{var P;return(P=C.buttonElement)==null?void 0:P.id}),id:s,onKeyDown:L,onKeyUp:$,role:"menu",tabIndex:v===ot.Open?0:void 0,ref:b,style:{...c.style,...x,"--button-width":ss(O,E,!0).width},...Pe(S)}),z=o.K();return f.createElement(fr,{enabled:a?t.static||O:!1,ownerDocument:y},z({ourProps:D,theirProps:c,slot:A,defaultTag:Td,features:Id,visible:T,name:"Menu.Items"}))}let Dd=f.Fragment;function Fd(t,e){let r=f.useId(),{id:s=`headlessui-menu-item-${r}`,disabled:n=!1,...a}=t,i=Ns("Menu.Item"),l=q(i,T=>i.selectors.isActive(T,s)),c=f.useRef(null),u=Z(e,c),d=q(i,T=>i.selectors.shouldScrollIntoView(T,s));o.n(()=>{if(d)return o.o$1().requestAnimationFrame(()=>{var T,M;(M=(T=c.current)==null?void 0:T.scrollIntoView)==null||M.call(T,{block:"nearest"})})},[d,c]);let m=Zo(c),x=f.useRef({disabled:n,domRef:c,get textValue(){return m()}});o.n(()=>{x.current.disabled=n},[x,n]),o.n(()=>(i.actions.registerItem(s,x),()=>i.actions.unregisterItem(s)),[x,s]);let p=o.o(()=>{i.send({type:Q.CloseMenu})}),g=o.o(T=>{if(n)return T.preventDefault();i.send({type:Q.CloseMenu}),oo(i.state.buttonElement)}),h=o.o(()=>{if(n)return i.send({type:Q.GoToItem,focus:U.Nothing});i.send({type:Q.GoToItem,focus:U.Specific,id:s})}),b=uo(),v=o.o(T=>b.update(T)),E=o.o(T=>{b.wasMoved(T)&&(n||l||i.send({type:Q.GoToItem,focus:U.Specific,id:s,trigger:qe.Pointer}))}),y=o.o(T=>{b.wasMoved(T)&&(n||l&&i.state.activationTrigger===qe.Pointer&&i.send({type:Q.GoToItem,focus:U.Nothing}))}),[k,R]=je(),[O,S]=Je(),F=o.n$1({active:l,focus:l,disabled:n,close:p}),B={id:s,ref:u,role:"menuitem",tabIndex:n===!0?void 0:-1,"aria-disabled":n===!0?!0:void 0,"aria-labelledby":k,"aria-describedby":O,disabled:void 0,onClick:g,onFocus:h,onPointerEnter:v,onMouseEnter:v,onPointerMove:E,onMouseMove:E,onPointerLeave:y,onMouseLeave:y},j=o.K();return f.createElement(R,null,f.createElement(S,null,j({ourProps:B,theirProps:a,slot:F,defaultTag:Dd,name:"Menu.Item"})))}let Md="div";function Ld(t,e){let[r,s]=je(),n=t,a={ref:e,"aria-labelledby":r,role:"group"},i=o.K();return f.createElement(s,null,i({ourProps:a,theirProps:n,slot:{},defaultTag:Md,name:"Menu.Section"}))}let _d="header";function Vd(t,e){let r=f.useId(),{id:s=`headlessui-menu-heading-${r}`,...n}=t,a=es();o.n(()=>a.register(s),[s,a.register]);let i={id:s,ref:e,role:"presentation",...a.props};return o.K()({ourProps:i,theirProps:n,slot:{},defaultTag:_d,name:"Menu.Heading"})}let Bd="div";function Hd(t,e){let r=t,s={ref:e,role:"separator"};return o.K()({ourProps:s,theirProps:r,slot:{},defaultTag:Bd,name:"Menu.Separator"})}let zd=o.Y(Od),ua=o.Y($d),da=o.Y(Ad),fe=o.Y(Fd),Wd=o.Y(Ld),Yd=o.Y(Vd),Ud=o.Y(Hd),Kd=Object.assign(zd,{Button:ua,Items:da,Item:fe,Section:Wd,Heading:Yd,Separator:Ud});var Gd=Object.defineProperty,qd=(t,e,r)=>e in t?Gd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,On=(t,e,r)=>(qd(t,typeof e!="symbol"?e+"":e,r),r),rt=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(rt||{}),Xd=(t=>(t[t.OpenPopover=0]="OpenPopover",t[t.ClosePopover=1]="ClosePopover",t[t.SetButton=2]="SetButton",t[t.SetButtonId=3]="SetButtonId",t[t.SetPanel=4]="SetPanel",t[t.SetPanelId=5]="SetPanelId",t))(Xd||{});let Qd={0:t=>t.popoverState===0?t:{...t,popoverState:0,__demoMode:!1},1(t){return t.popoverState===1?t:{...t,popoverState:1,__demoMode:!1}},2(t,e){return t.button===e.button?t:{...t,button:e.button}},3(t,e){return t.buttonId===e.buttonId?t:{...t,buttonId:e.buttonId}},4(t,e){return t.panel===e.panel?t:{...t,panel:e.panel}},5(t,e){return t.panelId===e.panelId?t:{...t,panelId:e.panelId}}};class Os extends er{constructor(e){super(e),On(this,"actions",{close:()=>this.send({type:1}),refocusableClose:r=>{this.actions.close();let s=r?nt(r)?r:"current"in r&&nt(r.current)?r.current:this.state.button:this.state.button;s?.focus()},open:()=>this.send({type:0}),setButtonId:r=>this.send({type:3,buttonId:r}),setButton:r=>this.send({type:2,button:r}),setPanelId:r=>this.send({type:5,panelId:r}),setPanel:r=>this.send({type:4,panel:r})}),On(this,"selectors",{isPortalled:r=>{var s;if(!r.button||!r.panel)return!1;let n=(s=o.l(r.button))!=null?s:document;for(let m of n.querySelectorAll("body > *"))if(Number(m?.contains(r.button))^Number(m?.contains(r.panel)))return!0;let a=Ce(n),i=a.indexOf(r.button),l=(i+a.length-1)%a.length,c=(i+1)%a.length,u=a[l],d=a[c];return!r.panel.contains(u)&&!r.panel.contains(d)}});{let r=this.state.id,s=Yt.get(null);this.on(0,()=>s.actions.push(r)),this.on(1,()=>s.actions.pop(r))}}static new({id:e,__demoMode:r=!1}){return new Os({id:e,__demoMode:r,popoverState:r?0:1,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,r){return o.u(r.type,Qd,e,r)}}const fa=f.createContext(null);function yr(t){let e=f.useContext(fa);if(e===null){let r=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,yr),r}return e}function Zd({id:t,__demoMode:e=!1}){let r=f.useMemo(()=>Os.new({id:t,__demoMode:e}),[]);return Ie(()=>r.dispose()),r}let Ps=f.createContext(null);Ps.displayName="PopoverGroupContext";function pa(){return f.useContext(Ps)}let wr=f.createContext(null);wr.displayName="PopoverPanelContext";function Jd(){return f.useContext(wr)}let tf="div";function ef(t,e){var r;let s=f.useId(),{__demoMode:n=!1,...a}=t,i=Zd({id:s,__demoMode:n}),l=f.useRef(null),c=Z(e,Qn($=>{l.current=$})),[u,d,m,x,p]=q(i,f.useCallback($=>[$.popoverState,$.button,$.panel,$.buttonId,$.panelId],[])),g=El((r=l.current)!=null?r:d),h=o.s$1(x),b=o.s$1(p),v=f.useMemo(()=>({buttonId:h,panelId:b,close:i.actions.close}),[h,b,i]),E=pa(),y=E?.registerPopover,k=o.o(()=>{var $,A;let D=o.e(($=l.current)!=null?$:d);return(A=E?.isFocusWithinPopoverGroup())!=null?A:D&&(d?.contains(D)||m?.contains(D))});f.useEffect(()=>y?.(v),[y,v]);let[R,O]=Lo(),S=ks(d),F=Bo({mainTreeNode:S,portals:R,defaultContainers:[{get current(){return i.state.button}},{get current(){return i.state.panel}}]});is(g,"focus",$=>{var A,D,z,C,P,V;$.target!==window&&mt($.target)&&i.state.popoverState===rt.Open&&(k()||i.state.button&&i.state.panel&&(F.contains($.target)||(D=(A=i.state.beforePanelSentinel.current)==null?void 0:A.contains)!=null&&D.call(A,$.target)||(C=(z=i.state.afterPanelSentinel.current)==null?void 0:z.contains)!=null&&C.call(z,$.target)||(V=(P=i.state.afterButtonSentinel.current)==null?void 0:P.contains)!=null&&V.call(P,$.target)||i.actions.close()))},!0);let B=u===rt.Open;sr(B,F.resolveContainers,($,A)=>{i.actions.close(),Oe(A,Ne.Loose)||($.preventDefault(),d?.focus())});let j=o.n$1({open:u===rt.Open,close:i.actions.refocusableClose}),T=q(i,f.useCallback($=>o.u($.popoverState,{[rt.Open]:J.Open,[rt.Closed]:J.Closed}),[])),M={ref:c},L=o.K();return f.createElement(Ge,{node:S},f.createElement(ws,null,f.createElement(wr.Provider,{value:null},f.createElement(fa.Provider,{value:i},f.createElement(rs,{value:i.actions.refocusableClose},f.createElement(dr,{value:T},f.createElement(O,null,L({ourProps:M,theirProps:a,slot:j,defaultTag:tf,name:"Popover"}))))))))}let rf="button";function sf(t,e){let r=f.useId(),{id:s=`headlessui-popover-button-${r}`,disabled:n=!1,autoFocus:a=!1,...i}=t,l=yr("Popover.Button"),[c,u,d,m,x,p,g]=q(l,f.useCallback(H=>[H.popoverState,l.selectors.isPortalled(H),H.button,H.buttonId,H.panel,H.panelId,H.afterButtonSentinel],[])),h=f.useRef(null),b=`headlessui-focus-sentinel-${f.useId()}`,v=pa(),E=v?.closeOthers,y=Jd()!==null;f.useEffect(()=>{if(!y)return l.actions.setButtonId(s),()=>l.actions.setButtonId(null)},[y,s,l]);let[k]=f.useState(()=>Symbol()),R=Z(h,e,bs(),o.o(H=>{if(!y){if(H)l.state.buttons.current.push(k);else{let Y=l.state.buttons.current.indexOf(k);Y!==-1&&l.state.buttons.current.splice(Y,1)}l.state.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),H&&l.actions.setButton(H)}})),O=Z(h,e),S=o.o(H=>{var Y,_,K;if(y){if(l.state.popoverState===rt.Closed)return;switch(H.key){case W.Space:case W.Enter:H.preventDefault(),(_=(Y=H.target).click)==null||_.call(Y),l.actions.close(),(K=l.state.button)==null||K.focus();break}}else switch(H.key){case W.Space:case W.Enter:H.preventDefault(),H.stopPropagation(),l.state.popoverState===rt.Closed?(E?.(l.state.buttonId),l.actions.open()):l.actions.close();break;case W.Escape:if(l.state.popoverState!==rt.Open)return E?.(l.state.buttonId);if(!h.current)return;let et=o.e(h.current);if(et&&!h.current.contains(et))return;H.preventDefault(),H.stopPropagation(),l.actions.close();break}}),F=o.o(H=>{y||H.key===W.Space&&H.preventDefault()}),B=o.o(H=>{var Y,_;Xt(H.currentTarget)||n||(y?(l.actions.close(),(Y=l.state.button)==null||Y.focus()):(H.preventDefault(),H.stopPropagation(),l.state.popoverState===rt.Closed?(E?.(l.state.buttonId),l.actions.open()):l.actions.close(),(_=l.state.button)==null||_.focus()))}),j=o.o(H=>{H.preventDefault(),H.stopPropagation()}),{isFocusVisible:T,focusProps:M}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:a}),{isHovered:L,hoverProps:$}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:n}),{pressed:A,pressProps:D}=o.w({disabled:n}),z=c===rt.Open,C=o.n$1({open:z,active:A||z,disabled:n,hover:L,focus:T,autofocus:a}),P=nr(t,d),V=y?o.V({ref:O,type:P,onKeyDown:S,onClick:B,disabled:n||void 0,autoFocus:a},M,$,D):o.V({ref:R,id:m,type:P,"aria-expanded":c===rt.Open,"aria-controls":x?p:void 0,disabled:n||void 0,autoFocus:a,onKeyDown:S,onKeyUp:F,onClick:B,onMouseDown:j},M,$,D),X=js(),G=o.o(()=>{if(!nt(l.state.panel))return;let H=l.state.panel;function Y(){o.u(X.current,{[dt.Forwards]:()=>ut(H,tt.First),[dt.Backwards]:()=>ut(H,tt.Last)})===Qt.Error&&ut(Ce(o.r(l.state.button)).filter(_=>_.dataset.headlessuiFocusGuard!=="true"),o.u(X.current,{[dt.Forwards]:tt.Next,[dt.Backwards]:tt.Previous}),{relativeTo:l.state.button})}Y()}),I=o.K();return f.createElement(f.Fragment,null,I({ourProps:V,theirProps:i,slot:C,defaultTag:rf,name:"Popover.Button"}),z&&!y&&u&&f.createElement(Ct,{id:b,ref:g,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:G}))}let nf="div",of=o.A.RenderStrategy|o.A.Static;function ma(t,e){let r=f.useId(),{id:s=`headlessui-popover-backdrop-${r}`,transition:n=!1,...a}=t,i=yr("Popover.Backdrop"),l=q(i,f.useCallback(v=>v.popoverState,[])),[c,u]=f.useState(null),d=Z(e,u),m=Lt(),[x,p]=$e(n,c,m!==null?(m&J.Open)===J.Open:l===rt.Open),g=o.o(v=>{if(Xt(v.currentTarget))return v.preventDefault();i.actions.close()}),h=o.n$1({open:l===rt.Open}),b={ref:d,id:s,"aria-hidden":!0,onClick:g,...Pe(p)};return o.K()({ourProps:b,theirProps:a,slot:h,defaultTag:nf,features:of,visible:x,name:"Popover.Backdrop"})}let af="div",lf=o.A.RenderStrategy|o.A.Static;function cf(t,e){let r=f.useId(),{id:s=`headlessui-popover-panel-${r}`,focus:n=!1,anchor:a,portal:i=!1,modal:l=!1,transition:c=!1,...u}=t,d=yr("Popover.Panel"),m=q(d,d.selectors.isPortalled),[x,p,g,h,b]=q(d,f.useCallback(I=>[I.popoverState,I.button,I.__demoMode,I.beforePanelSentinel,I.afterPanelSentinel],[])),v=`headlessui-focus-sentinel-before-${r}`,E=`headlessui-focus-sentinel-after-${r}`,y=f.useRef(null),k=hs(a),[R,O]=ys(k),S=vs();k&&(i=!0);let[F,B]=f.useState(null),j=Z(y,e,k?R:null,d.actions.setPanel,B),T=Nt(p),M=Nt(y.current);o.n(()=>(d.actions.setPanelId(s),()=>d.actions.setPanelId(null)),[s,d]);let L=Lt(),[$,A]=$e(c,F,L!==null?(L&J.Open)===J.Open:x===rt.Open);rr($,p,d.actions.close),or(g?!1:l&&$,M);let D=o.o(I=>{var H;switch(I.key){case W.Escape:if(d.state.popoverState!==rt.Open||!y.current)return;let Y=o.e(y.current);if(Y&&!y.current.contains(Y))return;I.preventDefault(),I.stopPropagation(),d.actions.close(),(H=d.state.button)==null||H.focus();break}});f.useEffect(()=>{var I;t.static||x===rt.Closed&&((I=t.unmount)==null||I)&&d.actions.setPanel(null)},[x,t.unmount,t.static,d]),f.useEffect(()=>{if(g||!n||x!==rt.Open||!y.current)return;let I=o.e(y.current);y.current.contains(I)||ut(y.current,tt.First)},[g,n,y.current,x]);let z=o.n$1({open:x===rt.Open,close:d.actions.refocusableClose}),C=o.V(k?S():{},{ref:j,id:s,onKeyDown:D,onBlur:n&&x===rt.Open?I=>{var H,Y,_,K,et;let st=I.relatedTarget;st&&y.current&&((H=y.current)!=null&&H.contains(st)||(d.actions.close(),((_=(Y=h.current)==null?void 0:Y.contains)!=null&&_.call(Y,st)||(et=(K=b.current)==null?void 0:K.contains)!=null&&et.call(K,st))&&st.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...u.style,...O,"--button-width":ss($,p,!0).width},...Pe(A)}),P=js(),V=o.o(()=>{let I=y.current;if(!I)return;function H(){o.u(P.current,{[dt.Forwards]:()=>{var Y;ut(I,tt.First)===Qt.Error&&((Y=d.state.afterPanelSentinel.current)==null||Y.focus())},[dt.Backwards]:()=>{var Y;(Y=d.state.button)==null||Y.focus({preventScroll:!0})}})}H()}),X=o.o(()=>{let I=y.current;if(!I)return;function H(){o.u(P.current,{[dt.Forwards]:()=>{var Y;if(!d.state.button)return;let _=(Y=o.r(d.state.button))!=null?Y:document.body,K=Ce(_),et=K.indexOf(d.state.button),st=K.slice(0,et+1),Kt=[...K.slice(et+1),...st];for(let le of Kt.slice())if(le.dataset.headlessuiFocusGuard==="true"||F!=null&&F.contains(le)){let Fe=Kt.indexOf(le);Fe!==-1&&Kt.splice(Fe,1)}ut(Kt,tt.First,{sorted:!1})},[dt.Backwards]:()=>{var Y;ut(I,tt.Previous)===Qt.Error&&((Y=d.state.button)==null||Y.focus())}})}H()}),G=o.K();return f.createElement(Ao,null,f.createElement(wr.Provider,{value:s},f.createElement(rs,{value:d.actions.refocusableClose},f.createElement(fr,{enabled:i?t.static||$:!1,ownerDocument:T},$&&m&&f.createElement(Ct,{id:v,ref:h,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:V}),G({ourProps:C,theirProps:u,slot:z,defaultTag:af,features:lf,visible:$,name:"Popover.Panel"}),$&&m&&f.createElement(Ct,{id:E,ref:b,features:wt.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:X})))))}let uf="div";function df(t,e){let r=f.useRef(null),s=Z(r,e),[n,a]=f.useState([]),i=o.o(h=>{a(b=>{let v=b.indexOf(h);if(v!==-1){let E=b.slice();return E.splice(v,1),E}return b})}),l=o.o(h=>(a(b=>[...b,h]),()=>i(h))),c=o.o(()=>{var h;let b=o.r(r.current);if(!b)return!1;let v=o.e(r.current);return(h=r.current)!=null&&h.contains(v)?!0:n.some(E=>{var y,k;return((y=b.getElementById(E.buttonId.current))==null?void 0:y.contains(v))||((k=b.getElementById(E.panelId.current))==null?void 0:k.contains(v))})}),u=o.o(h=>{for(let b of n)b.buttonId.current!==h&&b.close()}),d=f.useMemo(()=>({registerPopover:l,unregisterPopover:i,isFocusWithinPopoverGroup:c,closeOthers:u}),[l,i,c,u]),m=o.n$1({}),x=t,p={ref:s},g=o.K();return f.createElement(Ge,null,f.createElement(Ps.Provider,{value:d},g({ourProps:p,theirProps:x,slot:m,defaultTag:uf,name:"Popover.Group"})))}let ff=o.Y(ef),Xe=o.Y(sf),pf=o.Y(ma),mf=o.Y(ma),$s=o.Y(cf),xf=o.Y(df),xa=Object.assign(ff,{Button:Xe,Backdrop:mf,Overlay:pf,Panel:$s,Group:xf}),Ts=f.createContext(null);Ts.displayName="GroupContext";let gf=f.Fragment;function hf(t){var e;let[r,s]=f.useState(null),[n,a]=je(),[i,l]=Je(),c=f.useMemo(()=>({switch:r,setSwitch:s}),[r,s]),u={},d=t,m=o.K();return f.createElement(l,{name:"Switch.Description",value:i},f.createElement(a,{name:"Switch.Label",value:n,props:{htmlFor:(e=c.switch)==null?void 0:e.id,onClick(x){r&&(Dr(x.currentTarget)&&x.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},f.createElement(Ts.Provider,{value:c},m({ourProps:u,theirProps:d,slot:{},defaultTag:gf,name:"Switch.Group"}))))}let bf="button";function vf(t,e){var r;let s=f.useId(),n=re(),a=o.a(),{id:i=n||`headlessui-switch-${s}`,disabled:l=a||!1,checked:c,defaultChecked:u,onChange:d,name:m,value:x,form:p,autoFocus:g=!1,...h}=t,b=f.useContext(Ts),[v,E]=f.useState(null),y=f.useRef(null),k=Z(y,e,b===null?null:b.setSwitch,E),R=Zr(u),[O,S]=Qr(c,d,R??!1),F=o.p(),[B,j]=f.useState(!1),T=o.o(()=>{j(!0),S?.(!O),F.nextFrame(()=>{j(!1)})}),M=o.o(K=>{if(Xt(K.currentTarget))return K.preventDefault();K.preventDefault(),T()}),L=o.o(K=>{K.key===W.Space?(K.preventDefault(),T()):K.key===W.Enter&&Jr(K.currentTarget)}),$=o.o(K=>K.preventDefault()),A=se(),D=ke(),{isFocusVisible:z,focusProps:C}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:g}),{isHovered:P,hoverProps:V}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:l}),{pressed:X,pressProps:G}=o.w({disabled:l}),I=o.n$1({checked:O,disabled:l,hover:P,focus:z,active:X,autofocus:g,changing:B}),H=o.V({id:i,ref:k,role:"switch",type:nr(t,v),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":O,"aria-labelledby":A,"aria-describedby":D,disabled:l||void 0,autoFocus:g,onClick:M,onKeyUp:L,onKeyPress:$},C,V,G),Y=f.useCallback(()=>{if(R!==void 0)return S?.(R)},[S,R]),_=o.K();return f.createElement(f.Fragment,null,m!=null&&f.createElement(ts,{disabled:l,data:{[m]:x||"on"},overrides:{type:"checkbox",checked:O},form:p,onReset:Y}),_({ourProps:H,theirProps:h,slot:I,defaultTag:bf,name:"Switch"}))}let yf=o.Y(vf),wf=hf,Ef=ne,kf=Re,Rf=Object.assign(yf,{Group:wf,Label:Ef,Description:kf}),jf="textarea";function Sf(t,e){let r=f.useId(),s=re(),n=o.a(),{id:a=s||`headlessui-textarea-${r}`,disabled:i=n||!1,autoFocus:l=!1,invalid:c=!1,...u}=t,d=se(),m=ke(),{isFocused:x,focusProps:p}=o.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:l}),{isHovered:g,hoverProps:h}=o.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),b=o.V({ref:e,id:a,"aria-labelledby":d,"aria-describedby":m,"aria-invalid":c?"true":void 0,disabled:i||void 0,autoFocus:l},p,h),v=o.n$1({disabled:i,invalid:c,hover:g,focus:x,autofocus:l});return o.K()({ourProps:b,theirProps:u,slot:v,defaultTag:jf,name:"Textarea"})}let Cf=o.Y(Sf);const ga=o.cva("rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-none rst:select-none rst:shrink-0 rst:shadow-sm",{variants:{size:{xs:"rst:h-6 rst:w-6 rst:text-[10px]",sm:"rst:h-8 rst:w-8 rst:text-xs",md:"rst:h-10 rst:w-10 rst:text-sm",lg:"rst:h-12 rst:w-12 rst:text-base",xl:"rst:h-16 rst:w-16 rst:text-xl"},colorScheme:{primary:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/30 rst:dark:border-primary-800/50 rst:dark:text-primary-300",orange:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300",teal:"rst:bg-teal-50 rst:border-teal-200 rst:text-teal-700 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300",purple:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300",amber:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300",success:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300",error:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300",neutral:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"},shape:{circle:"rst:rounded-full",square:"rst:rounded-md"}},defaultVariants:{size:"md",colorScheme:"primary",shape:"circle"}}),Er=f.forwardRef(({className:t,size:e,colorScheme:r,shape:s,initials:n,src:a,alt:i,title:l,...c},u)=>{const[d,m]=f.useState(!1),x=a&&!d,p=o.jsxRuntimeExports.jsx("div",{ref:u,className:N.cn(ga({size:e,colorScheme:r,shape:s}),t),...c,children:x?o.jsxRuntimeExports.jsx("img",{src:a,alt:i||"Avatar",className:"rst:h-full rst:w-full rst:object-cover",onError:()=>m(!0)}):o.jsxRuntimeExports.jsx("span",{className:"rst:leading-none rst:uppercase",children:n?.slice(0,2)})});return l?o.jsxRuntimeExports.jsxs(xa,{className:"rst:relative rst:inline-flex",children:[o.jsxRuntimeExports.jsx(Xe,{as:"div",className:"rst:outline-none rst:cursor-pointer rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:focus-visible:ring-offset-2 rst:rounded-full",children:p}),o.jsxRuntimeExports.jsx($s,{anchor:"bottom",className:N.cn("rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:shadow-xl rst:backdrop-blur-md rst:ring-1","rst:bg-gray-900/95 rst:text-white rst:ring-black/5 rst:dark:bg-gray-100/95 rst:dark:text-gray-900 rst:dark:ring-white/20","rst:transition rst:duration-200 rst:ease-in-out rst:data-closed:opacity-0 rst:data-closed:translate-y-1"),children:l})]}):p});Er.displayName="Avatar";const ha=o.cva("rst:inline-flex rst:max-w-full rst:items-center rst:justify-center rst:font-medium rst:transition-colors rst:focus:outline-hidden rst:focus:ring-2 rst:focus:ring-ring rst:focus:ring-offset-2 rst:border",{variants:{variant:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""},fill:{soft:"",light:"",solid:"",outline:"rst:bg-transparent"},statusBadge:{true:"rst:rounded-full rst:justify-center",false:"rst:rounded-md"},size:{xs:"rst:text-[10px] rst:px-1.5 rst:py-0.5 rst:h-5 rst:gap-x-1",sm:"rst:text-xs rst:px-2.5 rst:py-0.5 rst:h-6 rst:gap-x-1.5",md:"rst:text-sm rst:px-3 rst:py-1 rst:h-7 rst:gap-x-2"}},compoundVariants:[{fill:"soft",variant:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/30 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{fill:"soft",variant:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{fill:"soft",variant:"teal",className:"rst:bg-teal-50 rst:border-teal-200 rst:text-teal-700 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{fill:"soft",variant:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{fill:"soft",variant:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{fill:"soft",variant:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{fill:"soft",variant:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{fill:"soft",variant:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"},{fill:"light",variant:"primary",className:"rst:bg-primary-100 rst:border-primary-300 rst:text-primary-800 rst:dark:bg-primary-800/40 rst:dark:border-primary-700/50 rst:dark:text-primary-200"},{fill:"light",variant:"orange",className:"rst:bg-orange-100 rst:border-orange-300 rst:text-orange-800 rst:dark:bg-orange-800/40 rst:dark:border-orange-700/50 rst:dark:text-orange-200"},{fill:"light",variant:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-800/40 rst:dark:border-teal-700/50 rst:dark:text-teal-200"},{fill:"light",variant:"purple",className:"rst:bg-purple-100 rst:border-purple-300 rst:text-purple-800 rst:dark:bg-purple-800/40 rst:dark:border-purple-700/50 rst:dark:text-purple-200"},{fill:"light",variant:"amber",className:"rst:bg-amber-100 rst:border-amber-300 rst:text-amber-900 rst:dark:bg-amber-800/40 rst:dark:border-amber-700/50 rst:dark:text-amber-200"},{fill:"light",variant:"success",className:"rst:bg-success-100 rst:border-success-300 rst:text-success-800 rst:dark:bg-success-800/40 rst:dark:border-success-700/50 rst:dark:text-success-200"},{fill:"light",variant:"error",className:"rst:bg-error-100 rst:border-error-300 rst:text-error-800 rst:dark:bg-error-800/40 rst:dark:border-error-700/50 rst:dark:text-error-200"},{fill:"light",variant:"neutral",className:"rst:bg-gray-200 rst:border-gray-300 rst:text-gray-800 rst:dark:bg-gray-700/50 rst:dark:border-gray-600/50 rst:dark:text-gray-200"},{fill:"outline",variant:"primary",className:"rst:border-primary-600 rst:text-primary-600 rst:dark:border-primary-500 rst:dark:text-primary-400"},{fill:"outline",variant:"orange",className:"rst:border-orange-600 rst:text-orange-600 rst:dark:border-orange-500 rst:dark:text-orange-400"},{fill:"outline",variant:"teal",className:"rst:border-teal-600 rst:text-teal-600 rst:dark:border-teal-500 rst:dark:text-teal-400"},{fill:"outline",variant:"purple",className:"rst:border-purple-600 rst:text-purple-600 rst:dark:border-purple-500 rst:dark:text-purple-400"},{fill:"outline",variant:"amber",className:"rst:border-amber-600 rst:text-amber-600 rst:dark:border-amber-500 rst:dark:text-amber-400"},{fill:"outline",variant:"success",className:"rst:border-success-600 rst:text-success-600 rst:dark:border-success-500 rst:dark:text-success-400"},{fill:"outline",variant:"error",className:"rst:border-error-600 rst:text-error-600 rst:dark:border-error-500 rst:dark:text-error-400"},{fill:"outline",variant:"neutral",className:"rst:border-gray-500 rst:text-gray-600 rst:dark:border-gray-500 rst:dark:text-gray-400"},{fill:"solid",variant:"primary",className:"rst:border-transparent rst:bg-primary-500 rst:hover:bg-primary-600 rst:text-white rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500"},{fill:"solid",variant:"orange",className:"rst:border-transparent rst:bg-orange-500 rst:hover:bg-orange-600 rst:text-white rst:dark:bg-orange-600 rst:dark:hover:bg-orange-500"},{fill:"solid",variant:"teal",className:"rst:border-transparent rst:bg-teal-500 rst:hover:bg-teal-600 rst:text-white rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500"},{fill:"solid",variant:"purple",className:"rst:border-transparent rst:bg-purple-500 rst:hover:bg-purple-600 rst:text-white rst:dark:bg-purple-600 rst:dark:hover:bg-purple-500"},{fill:"solid",variant:"amber",className:"rst:border-transparent rst:bg-amber-400 rst:hover:bg-amber-500 rst:text-black rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400 rst:dark:text-gray-900"},{fill:"solid",variant:"success",className:"rst:border-transparent rst:bg-success-500 rst:hover:bg-success-600 rst:text-white rst:dark:bg-success-600 rst:dark:hover:bg-success-500"},{fill:"solid",variant:"error",className:"rst:border-transparent rst:bg-error-500 rst:hover:bg-error-600 rst:text-white rst:dark:bg-error-600 rst:dark:hover:bg-error-500"},{fill:"solid",variant:"neutral",className:"rst:border-transparent rst:bg-gray-500 rst:hover:bg-gray-600 rst:text-white rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500"},{statusBadge:!0,size:"xs",className:"rst:min-w-[1.25rem] rst:h-5 rst:px-1"},{statusBadge:!0,size:"sm",className:"rst:min-w-[1.5rem] rst:h-6 rst:px-1.5"},{statusBadge:!0,size:"md",className:"rst:min-w-[1.75rem] rst:h-7 rst:px-2"}],defaultVariants:{variant:"primary",fill:"solid",size:"sm",statusBadge:!1}}),Qe=w.forwardRef(({className:t,variant:e,statusBadge:r,size:s,fill:n,leftIcon:a,rightIcon:i,children:l,...c},u)=>o.jsxRuntimeExports.jsxs("span",{ref:u,className:N.cn(ha({variant:e,statusBadge:r,size:s,fill:n}),t),...c,children:[a&&o.jsxRuntimeExports.jsx("span",{className:"rst:flex rst:shrink-0 rst:items-center rst:justify-center rst:opacity-70",children:a}),o.jsxRuntimeExports.jsx("span",{className:"rst:truncate rst:min-w-0",children:l}),i&&o.jsxRuntimeExports.jsx("span",{className:"rst:flex rst:shrink-0 rst:items-center rst:justify-center rst:opacity-70",children:i})]}));Qe.displayName="Badge";const ba=o.cva("rst:relative rst:isolate rst:w-full rst:overflow-hidden rst:rounded-xl rst:transition-all",{variants:{variant:{white:"rst:bg-[var(--roster-card-bg)] rst:border rst:border-[var(--roster-card-border)] rst:text-[var(--roster-card-text)] rst:shadow-sm",soft:"rst:bg-gray-50 rst:border rst:border-gray-100 rst:text-gray-900 rst:dark:bg-gray-900/40 rst:dark:border-gray-800/50 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border rst:border-gray-600 rst:text-gray-100 rst:shadow-sm rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",primary:"rst:bg-primary-600 rst:border rst:border-primary-700 rst:text-white rst:shadow-sm rst:dark:bg-primary-900 rst:dark:border-primary-800 rst:dark:text-primary-50",outline:"rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:dark:border-gray-800 rst:dark:text-gray-100",ghost:"rst:bg-transparent rst:border rst:border-transparent rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",glass:"rst:bg-white/50 rst:border rst:border-white/20 rst:backdrop-blur-md rst:text-gray-900 rst:shadow-sm rst:dark:bg-gray-950/50 rst:dark:border-white/10 rst:dark:text-gray-100 rst:dark:shadow-black/50"},padding:{none:"rst:p-0",sm:"rst:p-4",md:"rst:p-6",lg:"rst:p-8"}},defaultVariants:{variant:"white",padding:"md"}}),va=f.forwardRef(({className:t,variant:e,padding:r,branded:s=!1,brandColorTop:n,brandColorBottom:a,children:i,...l},c)=>o.jsxRuntimeExports.jsxs("div",{ref:c,className:N.cn(ba({variant:e,padding:r}),t),...l,children:[s&&o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:absolute rst:top-0 rst:inset-x-0 rst:h-1 rst:z-10",!n&&"rst:bg-orange-500"),style:n?{backgroundColor:n}:void 0}),i,s&&o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:absolute rst:bottom-0 rst:inset-x-0 rst:h-1 rst:z-10",!a&&"rst:bg-primary-500"),style:a?{backgroundColor:a}:void 0})]}));va.displayName="Card";const ya=o.cva("rst:flex rst:items-center rst:justify-center rst:shrink-0 rst:transition-colors rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2",{variants:{size:{sm:"rst:h-4 rst:w-4 rst:rounded-sm rst:border",md:"rst:h-5 rst:w-5 rst:rounded rst:border",lg:"rst:h-6 rst:w-6 rst:rounded-md rst:border"},variant:{solid:"",soft:""},checked:{true:"",false:"rst:bg-white rst:border-gray-300 rst:dark:bg-gray-900 rst:dark:border-gray-700 rst:text-transparent"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""}},compoundVariants:[{checked:!0,variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:border-primary-600 rst:text-white rst:dark:bg-primary-600 rst:dark:border-primary-500"},{checked:!0,variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:border-orange-600 rst:text-white rst:dark:bg-orange-600 rst:dark:border-orange-500"},{checked:!0,variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:border-teal-600 rst:text-white rst:dark:bg-teal-600 rst:dark:border-teal-500"},{checked:!0,variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:border-purple-600 rst:text-white rst:dark:bg-purple-600 rst:dark:border-purple-500"},{checked:!0,variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:border-amber-400 rst:text-black rst:dark:bg-amber-500 rst:dark:border-amber-500 rst:dark:text-gray-900"},{checked:!0,variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:border-success-600 rst:text-white rst:dark:bg-success-600 rst:dark:border-success-500"},{checked:!0,variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:border-error-600 rst:text-white rst:dark:bg-error-600 rst:dark:border-error-500"},{checked:!0,variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:border-gray-600 rst:text-white rst:dark:bg-gray-600 rst:dark:border-gray-500"},{checked:!0,variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/40 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{checked:!0,variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{checked:!0,variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{checked:!0,variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{checked:!0,variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{checked:!0,variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{checked:!0,variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{checked:!0,variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"md",checked:!1}}),wa=f.forwardRef(({className:t,colorScheme:e="primary",variant:r="solid",size:s="md",indeterminate:n=!1,...a},i)=>{const l={sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-4 h-4"},c=f.useRef(null),u=d=>{c.current=d,typeof i=="function"?i(d):i&&(i.current=d)};return f.useEffect(()=>{n&&c.current&&c.current.setAttribute("aria-checked","mixed")},[n,a.checked]),o.jsxRuntimeExports.jsx(Ji,{ref:u,...a,className:({checked:d,disabled:m})=>N.cn(ya({colorScheme:e,variant:r,size:s,checked:d||n}),m||a.disabled?"rst:opacity-50":"rst:cursor-pointer",t),children:({checked:d})=>o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:n?o.faMinus:o.faCheck,className:N.cn("rst:pointer-events-none rst:transition-opacity rst:duration-200",d||n?"rst:opacity-100":"rst:opacity-0",l[s])})})});wa.displayName="Checkbox";const Ea=o.cva("rst:group rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-3 rst:text-left rst:text-sm rst:font-medium rst:transition-all rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500/75 rst:cursor-pointer rst:z-10 rst:relative",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:border-gray-700 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",ghost:"rst:bg-transparent rst:text-gray-700 rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"}},defaultVariants:{variant:"soft"}}),ka=o.cva("rst:px-4 rst:pb-4 rst:pt-2 rst:text-sm rst:transition-colors",{variants:{variant:{white:"rst:bg-white rst:text-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-300",soft:"rst:bg-gray-100 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:text-gray-300",slate:"rst:bg-gray-700 rst:text-gray-200 rst:dark:bg-gray-900 rst:dark:text-gray-300",outline:"rst:bg-transparent rst:border-x rst:border-b rst:border-gray-200 rst:text-gray-600 rst:dark:border-gray-700 rst:dark:text-gray-400",ghost:"rst:bg-transparent rst:text-gray-600 rst:dark:text-gray-400"}},defaultVariants:{variant:"soft"}}),Ra=({title:t,children:e,variant:r,className:s,defaultOpen:n=!1,isOpen:a,onToggle:i,icon:l,...c})=>{const[u,d]=f.useState(n),m=a!==void 0?a:u,x=()=>{const p=!m;a===void 0&&d(p),i?.(p)};return o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:w-full rst:flex rst:flex-col",s),...c,children:[o.jsxRuntimeExports.jsxs("button",{type:"button",onClick:x,"aria-expanded":m,className:N.cn(Ea({variant:r}),m?"rst:rounded-t-md rst:rounded-b-none":"rst:rounded-md",m&&r==="outline"&&"rst:border-b-transparent rst:dark:border-b-transparent"),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:flex-1 rst:text-left rst:text-inherit",children:t}),o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:ml-2 rst:flex rst:items-center rst:transition-transform rst:duration-200 rst:text-inherit",m?"rst:rotate-180":""),children:l||o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:opacity-60"})})]}),o.jsxRuntimeExports.jsx(Jt,{show:m,enter:"rst:transition rst:duration-100 rst:ease-out",enterFrom:"rst:transform rst:scale-95 rst:opacity-0",enterTo:"rst:transform rst:scale-100 rst:opacity-100",leave:"rst:transition rst:duration-75 rst:ease-out",leaveFrom:"rst:transform rst:scale-100 rst:opacity-100",leaveTo:"rst:transform rst:scale-95 rst:opacity-0",children:o.jsxRuntimeExports.jsx("div",{className:N.cn(ka({variant:r}),"rst:rounded-b-md"),children:e})})]})},ja=o.cva("rst:flex rst:w-full rst:rounded-md rst:border rst:py-2.5 rst:px-4 rst:text-sm rst:ring-offset-background rst:file:border-0 rst:file:bg-transparent rst:file:text-sm rst:file:font-medium rst:focus-visible:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-all",{variants:{variant:{white:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500",soft:"rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-900",slate:"rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-400 rst:focus-visible:bg-gray-600 rst:dark:bg-gray-900 rst:dark:placeholder:text-gray-500 rst:dark:focus-visible:bg-gray-800",outline:"rst:border-gray-300 rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-400 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500",ghost:"rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-400 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-500 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800"},error:{true:"rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-600 rst:placeholder:text-error-300 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:placeholder:text-error-800 rst:dark:focus-visible:ring-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),zr=o.cva("rst:absolute rst:top-1/2 rst:-translate-y-1/2 rst:transition-colors",{variants:{variant:{white:"rst:text-gray-400 rst:dark:text-gray-500",soft:"rst:text-gray-500 rst:dark:text-gray-400",slate:"rst:text-gray-300 rst:dark:text-gray-500",outline:"rst:text-gray-400 rst:dark:text-gray-500",ghost:"rst:text-gray-500 rst:dark:text-gray-400"},error:{true:"rst:text-error-500 rst:dark:text-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),Is=f.forwardRef(({className:t,type:e,label:r,helperText:s,errorMessage:n,variant:a,error:i,startIcon:l,endIcon:c,disabled:u,...d},m)=>{const x=!!n||i;return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:w-full rst:space-y-1.5",t),children:[r&&o.jsxRuntimeExports.jsx(ne,{className:N.cn("rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-left rst:mb-1.5 rst:transition-colors","rst:text-gray-900 rst:dark:text-gray-100","rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70"),children:r}),o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[l&&o.jsxRuntimeExports.jsx("div",{className:N.cn(zr({variant:a,error:x}),"rst:left-3"),children:l}),o.jsxRuntimeExports.jsx(sd,{ref:m,type:e,disabled:u,className:N.cn(ja({variant:a,error:x}),l&&"rst:pl-10",c&&"rst:pr-10"),...d}),c&&o.jsxRuntimeExports.jsx("div",{className:N.cn(zr({variant:a,error:x}),"rst:right-3"),children:c})]}),(s||n)&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-left rst:mt-1",x?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:n||s})]})});Is.displayName="Input";const Sa=o.cva("rst:inline-flex rst:items-center rst:gap-1.5 rst:font-semibold rst:transition-colors rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:rounded-sm rst:cursor-pointer",{variants:{variant:{primary:"rst:text-primary-600 rst:hover:text-primary-700 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",neutral:"rst:text-gray-600 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100",danger:"rst:text-error-600 rst:hover:text-error-700 rst:dark:text-error-500 rst:dark:hover:text-error-400",white:"rst:text-gray-200 rst:hover:text-white rst:dark:text-gray-300 rst:dark:hover:text-white"},underline:{always:"rst:underline rst:underline-offset-4",hover:"rst:no-underline rst:hover:underline rst:underline-offset-4",none:"rst:no-underline"},size:{sm:"rst:text-xs",md:"rst:text-sm",lg:"rst:text-base"}},defaultVariants:{variant:"primary",underline:"hover",size:"md"}}),Ht=({as:t,className:e,variant:r,underline:s,size:n,external:a,showExternalIcon:i,children:l,href:c,...u})=>{const d=t||"a",m=a||typeof c=="string"&&c.startsWith("http"),x=i??m,p=N.cn(Sa({variant:r,underline:s,size:n}),e);return m?o.jsxRuntimeExports.jsxs("a",{href:c,className:p,target:"_blank",rel:"noopener noreferrer",...u,children:[l,x&&o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faExternalLinkAlt,className:"rst:ml-0.5 rst:h-3 rst:w-3","data-testid":"external-icon"})]}):o.jsxRuntimeExports.jsxs(d,{className:p,...c!==void 0?{href:c}:{},...u,children:[l,x&&o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faExternalLinkAlt,className:"rst:ml-1 rst:h-3 rst:w-3 rst:opacity-70","data-testid":"external-icon"})]})},Ca=f.forwardRef(({revealable:t=!0,defaultRevealed:e=!1,revealed:r,onRevealChange:s,showLabel:n="Show password",hideLabel:a="Hide password",disabled:i,variant:l,error:c,errorMessage:u,...d},m)=>{const[x,p]=f.useState(e),g=r!==void 0,h=g?r:x,b=()=>{const v=!h;g||p(v),s?.(v)};return o.jsxRuntimeExports.jsx(Is,{ref:m,type:h?"text":"password",disabled:i,variant:l,error:c,errorMessage:u,className:N.cn("rst:[&_input::-ms-reveal]:hidden",d.className),endIcon:t?o.jsxRuntimeExports.jsx("button",{type:"button",onClick:b,disabled:i,"aria-label":h?a:n,"aria-pressed":h,className:N.cn("rst:-m-1 rst:flex rst:items-center rst:rounded rst:p-1 rst:transition-opacity","rst:opacity-70 rst:hover:opacity-100","rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400",i&&"rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"),children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:h?o.faEyeSlash:o.faEye,className:"rst:h-4 rst:w-4","aria-hidden":"true"})}):void 0,...d})});Ca.displayName="PasswordInput";const Na=o.cva("rst:inline-flex rst:items-center rst:rounded-full rst:font-medium rst:whitespace-nowrap rst:align-middle",{variants:{colorScheme:{primary:"",success:"",error:"",amber:"",info:"",neutral:""},variant:{soft:"",outline:"rst:bg-transparent rst:border",solid:""},size:{sm:"rst:text-xs rst:px-2.5 rst:py-0.5 rst:gap-1.5",md:"rst:text-sm rst:px-3 rst:py-1 rst:gap-2"}},compoundVariants:[{variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:text-primary-700 rst:dark:bg-primary-500/15 rst:dark:text-primary-300"},{variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:text-success-700 rst:dark:bg-success-500/15 rst:dark:text-success-300"},{variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:text-error-700 rst:dark:bg-error-500/15 rst:dark:text-error-300"},{variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:text-amber-800 rst:dark:bg-amber-500/15 rst:dark:text-amber-300"},{variant:"soft",colorScheme:"info",className:"rst:bg-info-50 rst:text-info-700 rst:dark:bg-info-500/15 rst:dark:text-info-300"},{variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:text-gray-700 rst:dark:bg-gray-500/15 rst:dark:text-gray-300"},{variant:"outline",colorScheme:"primary",className:"rst:border-primary-300 rst:text-primary-700 rst:dark:border-primary-700 rst:dark:text-primary-300"},{variant:"outline",colorScheme:"success",className:"rst:border-success-300 rst:text-success-700 rst:dark:border-success-700 rst:dark:text-success-300"},{variant:"outline",colorScheme:"error",className:"rst:border-error-300 rst:text-error-700 rst:dark:border-error-700 rst:dark:text-error-300"},{variant:"outline",colorScheme:"amber",className:"rst:border-amber-300 rst:text-amber-800 rst:dark:border-amber-700 rst:dark:text-amber-300"},{variant:"outline",colorScheme:"info",className:"rst:border-info-300 rst:text-info-700 rst:dark:border-info-700 rst:dark:text-info-300"},{variant:"outline",colorScheme:"neutral",className:"rst:border-gray-300 rst:text-gray-700 rst:dark:border-gray-600 rst:dark:text-gray-300"},{variant:"solid",colorScheme:"primary",className:"rst:bg-primary-500 rst:text-white"},{variant:"solid",colorScheme:"success",className:"rst:bg-success-500 rst:text-white"},{variant:"solid",colorScheme:"error",className:"rst:bg-error-500 rst:text-white"},{variant:"solid",colorScheme:"amber",className:"rst:bg-amber-500 rst:text-amber-950"},{variant:"solid",colorScheme:"info",className:"rst:bg-info-500 rst:text-white"},{variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:text-white rst:dark:bg-gray-500"}],defaultVariants:{colorScheme:"neutral",variant:"soft",size:"sm"}}),Wr=o.cva("rst:shrink-0 rst:rounded-full",{variants:{colorScheme:{primary:"rst:bg-primary-500 rst:dark:bg-primary-400",success:"rst:bg-success-500 rst:dark:bg-success-400",error:"rst:bg-error-500 rst:dark:bg-error-400",amber:"rst:bg-amber-500 rst:dark:bg-amber-400",info:"rst:bg-info-500 rst:dark:bg-info-400",neutral:"rst:bg-gray-500 rst:dark:bg-gray-400"},variant:{soft:"",outline:"",solid:"rst:bg-current rst:dark:bg-current"},size:{sm:"rst:size-1.5",md:"rst:size-2"}},defaultVariants:{colorScheme:"neutral",variant:"soft",size:"sm"}}),Oa=f.forwardRef(({className:t,colorScheme:e="neutral",variant:r="soft",size:s="sm",dot:n=!1,pulse:a=!1,leadingIcon:i,children:l,...c},u)=>o.jsxRuntimeExports.jsxs("span",{ref:u,className:N.cn(Na({colorScheme:e,variant:r,size:s}),t),...c,children:[n?o.jsxRuntimeExports.jsxs("span",{className:"rst:relative rst:inline-flex rst:shrink-0","aria-hidden":"true",children:[a&&o.jsxRuntimeExports.jsx("span",{className:N.cn(Wr({colorScheme:e,variant:r,size:s}),"rst:absolute rst:inset-0 rst:motion-safe:animate-ping rst:opacity-75")}),o.jsxRuntimeExports.jsx("span",{className:N.cn(Wr({colorScheme:e,variant:r,size:s}),"rst:relative")})]}):i&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex rst:shrink-0 rst:items-center","aria-hidden":"true",children:i}),l]}));Oa.displayName="Pill";const Pa=o.cva("rst:font-mono rst:uppercase rst:leading-none",{variants:{size:{xs:"rst:text-[0.625rem] rst:tracking-[0.16em]",sm:"rst:text-[0.6875rem] rst:tracking-[0.14em]",md:"rst:text-xs rst:tracking-[0.12em]"},tone:{faint:"rst:text-gray-500 rst:dark:text-gray-400",default:"rst:text-gray-700 rst:dark:text-gray-300",strong:"rst:text-gray-900 rst:dark:text-gray-100",primary:"rst:text-primary-600 rst:dark:text-primary-400"},weight:{normal:"rst:font-normal",medium:"rst:font-medium",semibold:"rst:font-semibold"}},defaultVariants:{size:"xs",tone:"faint",weight:"normal"}});function we({as:t,className:e,size:r,tone:s,weight:n,children:a,...i}){const l=t??"span";return o.jsxRuntimeExports.jsx(l,{className:N.cn(Pa({size:r,tone:s,weight:n}),e),...i,children:a})}we.displayName="Eyebrow";const $a=o.cva("rst:font-mono rst:text-[0.8125rem]",{variants:{colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-800 rst:dark:text-gray-200",current:"rst:text-current"},surface:{none:"",soft:"rst:rounded rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"}},defaultVariants:{colorScheme:"primary",surface:"none"}}),Ta=f.forwardRef(({className:t,colorScheme:e,surface:r,children:s,...n},a)=>o.jsxRuntimeExports.jsx("code",{ref:a,className:N.cn($a({colorScheme:e,surface:r}),t),...n,children:s}));Ta.displayName="InlineCode";const Ia=f.forwardRef(({label:t,trailing:e,align:r="start",className:s,...n},a)=>o.jsxRuntimeExports.jsxs("div",{ref:a,className:N.cn("rst:flex rst:items-center rst:gap-3",s),...n,children:[r==="end"&&o.jsxRuntimeExports.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),o.jsxRuntimeExports.jsx(we,{children:t}),r==="start"&&o.jsxRuntimeExports.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),e&&o.jsxRuntimeExports.jsx(we,{children:e})]}));Ia.displayName="LabeledDivider";const Aa=o.cva("rst:block rst:font-bold rst:leading-none rst:tracking-[-0.04em] rst:tabular-nums",{variants:{size:{sm:"rst:text-xl",md:"rst:text-[clamp(1.5rem,3.6vw,2.25rem)]",lg:"rst:text-[clamp(2rem,5vw,3rem)]"},colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",success:"rst:text-success-600 rst:dark:text-success-400",error:"rst:text-error-600 rst:dark:text-error-400",amber:"rst:text-amber-600 rst:dark:text-amber-400",neutral:"rst:text-gray-900 rst:dark:text-gray-100",current:"rst:text-current"}},defaultVariants:{size:"md",colorScheme:"neutral"}}),Da=f.forwardRef(({value:t,label:e,source:r,size:s,colorScheme:n,className:a,...i},l)=>o.jsxRuntimeExports.jsxs("div",{ref:l,className:N.cn("rst:flex rst:flex-col rst:gap-[3px]",a),...i,children:[o.jsxRuntimeExports.jsx("dd",{className:N.cn("rst:m-0",Aa({size:s,colorScheme:n})),children:t}),o.jsxRuntimeExports.jsx("dt",{children:o.jsxRuntimeExports.jsx(we,{size:"xs",children:e})}),r&&o.jsxRuntimeExports.jsx("span",{className:"rst:font-mono rst:text-[0.53125rem] rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400",children:r})]}));Da.displayName="Stat";const Nf="roster-theme",Yr=new Set;function Of(t){Yr.add(t);const e=new MutationObserver(t);return e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{Yr.delete(t),e.disconnect()}}function Pf(){return document.documentElement.classList.contains("dark")}function $f(){return!1}const Fa=f.forwardRef(({storageKey:t=Nf,onThemeChange:e,showLabel:r=!1,lightLabel:s="Light",darkLabel:n="Dark",lightIcon:a,darkIcon:i,toDarkLabel:l="Switch to dark mode",toLightLabel:c="Switch to light mode",variant:u="ghost",colorScheme:d="neutral",size:m="sm",...x},p)=>{const g=f.useSyncExternalStore(Of,Pf,$f),h=f.useCallback(()=>{const b=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",b);try{localStorage.setItem(t,b?"dark":"light")}catch{}Yr.forEach(v=>v()),e?.(b?"dark":"light")},[t,e]);return o.jsxRuntimeExports.jsx(o.Button,{ref:p,variant:u,colorScheme:d,size:m,onClick:h,"aria-pressed":g,"aria-label":g?c:l,startIcon:(g?i:a)??o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:g?o.faSun:o.faMoon,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"}),...x,children:r?g?n:s:null})});Fa.displayName="ThemeToggle";const Ma=o.cva("rst:relative rst:w-full rst:cursor-pointer rst:rounded-md rst:py-2.5 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:shadow-sm rst:ring-1 rst:ring-inset rst:transition-all rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:dark:focus:ring-primary-400 rst:sm:leading-6",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:ring-gray-700 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:ring-transparent rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:ring-transparent rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-transparent rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:ring-gray-700 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",ghost:"rst:bg-transparent rst:text-gray-700 rst:ring-transparent rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"},error:{true:"rst:ring-error-500 rst:text-error-600 rst:focus:ring-error-500 rst:dark:ring-error-500 rst:dark:text-error-400 rst:dark:focus:ring-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}}),Tf=({options:t,value:e,onChange:r,placeholder:s="Select an option",disabled:n=!1,variant:a,error:i,className:l,label:c})=>{const u=t.find(d=>d.value===e);return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:flex rst:flex-col rst:gap-1.5",l),children:[c&&o.jsxRuntimeExports.jsx(ne,{className:"rst:block rst:text-sm rst:font-medium rst:text-inherit rst:text-left",children:c}),o.jsxRuntimeExports.jsx(kd,{value:e??void 0,onChange:r,disabled:n,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[o.jsxRuntimeExports.jsxs(na,{className:N.cn(Ma({variant:a,error:i})),children:[o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:block rst:truncate",!u&&"rst:text-gray-500 rst:dark:text-gray-400"),children:u?u.label:s}),o.jsxRuntimeExports.jsx("span",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center rst:pr-3",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:o.jsxRuntimeExports.jsx(oa,{anchor:"bottom start",className:N.cn("rst:w-(--button-width) rst:z-50 rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:text-base rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-gray-700 rst:focus:outline-none rst:sm:text-sm","rst:[--anchor-gap:4px]"),children:t.map(d=>o.jsxRuntimeExports.jsxs(aa,{value:d.value,disabled:d.disabled,className:N.cn("rst:group rst:relative rst:cursor-default rst:select-none rst:py-2.5 rst:pl-4 rst:pr-9 rst:transition-colors","rst:text-gray-900 rst:dark:text-gray-100","rst:data-focus:bg-primary-100 rst:data-focus:text-primary-900","rst:dark:data-focus:bg-primary-900/30 rst:dark:data-focus:text-primary-100","rst:data-selected:bg-gray-50 rst:dark:data-selected:bg-gray-700/50","rst:data-disabled:opacity-50 rst:data-disabled:cursor-not-allowed"),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:block rst:truncate rst:font-normal rst:group-data-selected:font-semibold",children:d.label}),o.jsxRuntimeExports.jsx("span",{className:"rst:absolute rst:inset-y-0 rst:right-0 rst:hidden rst:items-center rst:pr-4 rst:text-primary-600 rst:dark:text-primary-400 rst:group-data-selected:flex",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faCheck,className:"rst:h-3.5 rst:w-3.5"})})]},d.value))})})]})})]})},La=o.cva("rst:group rst:relative rst:inline-flex rst:shrink-0 rst:cursor-pointer rst:rounded-full rst:border-2 rst:border-transparent rst:transition-colors rst:duration-200 rst:ease-in-out rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:disabled:cursor-not-allowed rst:disabled:opacity-50",{variants:{variant:{primary:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-primary-500 rst:focus-visible:ring-primary-500",success:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-green-500 rst:focus-visible:ring-green-500",danger:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-error-500 rst:focus-visible:ring-error-500",neutral:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-gray-600 rst:dark:data-[checked]:bg-gray-500 rst:focus-visible:ring-gray-600"},size:{xs:"rst:h-4 rst:w-7",sm:"rst:h-5 rst:w-9",md:"rst:h-6 rst:w-11",lg:"rst:h-7 rst:w-14"}},defaultVariants:{variant:"primary",size:"md"}}),_a=o.cva("rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:shadow rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",{variants:{size:{xs:"rst:h-3 rst:w-3 rst:translate-x-0 rst:group-data-[checked]:translate-x-3",sm:"rst:h-4 rst:w-4 rst:translate-x-0 rst:group-data-[checked]:translate-x-4",md:"rst:h-5 rst:w-5 rst:translate-x-0 rst:group-data-[checked]:translate-x-5",lg:"rst:h-6 rst:w-6 rst:translate-x-0 rst:group-data-[checked]:translate-x-7"}},defaultVariants:{size:"md"}}),Ur=({checked:t,onChange:e,label:r,description:s,disabled:n=!1,size:a,variant:i,className:l,ariaLabel:c})=>{const u=r?void 0:c||"Toggle setting";return o.jsxRuntimeExports.jsxs(br,{as:"div",className:N.cn("rst:flex rst:items-center rst:justify-between rst:gap-4",l),children:[(r||s)&&o.jsxRuntimeExports.jsxs("span",{className:"rst:flex rst:flex-col",children:[r&&o.jsxRuntimeExports.jsx(ne,{passive:!0,className:N.cn("rst:text-sm rst:font-medium rst:text-gray-900 rst:dark:text-gray-100",n&&"rst:opacity-50"),children:r}),s&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400",n&&"rst:opacity-50"),children:s})]}),o.jsxRuntimeExports.jsx(Rf,{checked:t,onChange:e,disabled:n,"aria-label":u,className:N.cn(La({variant:i,size:a})),children:o.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:N.cn(_a({size:a}))})})]})},Va=o.cva("rst:flex rst:w-full rst:min-h-[80px] rst:rounded-md rst:border rst:py-2.5 rst:px-4 rst:text-sm rst:ring-offset-white rst:dark:ring-offset-gray-950 rst:placeholder:text-gray-400 rst:focus-visible:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-primary-500 rst:dark:focus-visible:ring-primary-400 rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-colors rst:custom-scrollbar",{variants:{variant:{outline:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-950 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400",soft:"rst:border-transparent rst:bg-gray-100 rst:text-gray-900 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:bg-gray-800/50 rst:dark:text-gray-100 rst:dark:focus-visible:bg-gray-900 rst:dark:focus-visible:border-primary-400",ghost:"rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800",white:"rst:border-gray-200 rst:bg-white rst:text-gray-900 rst:focus-visible:border-primary-500 rst:dark:border-gray-800 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:focus-visible:border-primary-400"},error:{true:"rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-900 rst:placeholder:text-error-300 rst:dark:border-error-500 rst:dark:focus-visible:ring-error-500 rst:dark:text-error-100 rst:dark:placeholder:text-error-400/50",false:""},resize:{none:"rst:resize-none",vertical:"rst:resize-y",horizontal:"rst:resize-x",both:"rst:resize"}},defaultVariants:{variant:"outline",error:!1,resize:"vertical"}}),Ba=f.forwardRef(({className:t,label:e,helperText:r,errorMessage:s,variant:n,error:a,resize:i,disabled:l,...c},u)=>{const d=!!s||a;return o.jsxRuntimeExports.jsxs(br,{className:N.cn("rst:w-full rst:space-y-1.5",t),children:[e&&o.jsxRuntimeExports.jsx(ne,{className:"rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-gray-900 rst:dark:text-gray-100 rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left",children:e}),o.jsxRuntimeExports.jsx(Cf,{ref:u,disabled:l,className:N.cn(Va({variant:n,resize:i,error:d})),...c}),(r||s)&&o.jsxRuntimeExports.jsx(Re,{className:N.cn("rst:text-xs rst:text-left",d?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:s||r})]})});Ba.displayName="Textarea";function If({items:t,maxDisplay:e=5,totalCount:r,excludeKey:s,onDismiss:n,trailingSlot:a,label:i,ringClass:l="rst:ring-white rst:dark:ring-gray-900",className:c}){const u=t.filter(m=>m.key!==s).slice(0,e),d=r!==void 0?Math.max(0,r-u.length):Math.max(0,t.filter(m=>m.key!==s).length-e);return u.length===0&&!a?null:o.jsxRuntimeExports.jsxs("div",{"data-testid":"avatar-strip",className:N.cn("rst:flex rst:items-center rst:gap-3",c),children:[n&&o.jsxRuntimeExports.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss","data-testid":"avatar-strip-dismiss",className:"rst:shrink-0 rst:text-gray-400/50 rst:dark:text-gray-500/50 rst:hover:text-gray-400 rst:dark:hover:text-gray-500 rst:transition-colors rst:cursor-pointer",children:"✕"}),o.jsxRuntimeExports.jsxs("div",{"data-testid":"avatar-strip-stack",className:"rst:flex rst:items-center rst:-space-x-2",children:[u.map(m=>{const x=o.jsxRuntimeExports.jsx(Er,{initials:m.label[0].toUpperCase(),src:m.src,colorScheme:m.colorScheme??"neutral",size:"xs"}),p=N.cn("rst:relative rst:inline-flex rst:h-6 rst:w-6 rst:rounded-full rst:ring-2 rst:transition-transform rst:hover:z-10 rst:hover:scale-110",l);return m.href?o.jsxRuntimeExports.jsx("a",{href:m.href,title:m.label,"data-testid":`avatar-strip-item-${m.key}`,className:p,children:x},m.key):o.jsxRuntimeExports.jsx("span",{title:m.label,"data-testid":`avatar-strip-item-${m.key}`,className:p,children:x},m.key)}),d>0&&o.jsxRuntimeExports.jsx("div",{title:`${d} more`,"data-testid":"avatar-strip-overflow",className:N.cn("rst:relative rst:flex rst:h-6 rst:w-6 rst:items-center rst:justify-center rst:rounded-full rst:bg-gray-500/10 rst:ring-2",l),children:o.jsxRuntimeExports.jsxs("span",{className:"rst:text-[9px] rst:font-bold rst:text-gray-500 rst:dark:text-gray-400 rst:select-none",children:["+",d]})}),a]}),i&&o.jsxRuntimeExports.jsx("div",{"data-testid":"avatar-strip-label",children:i})]})}function Af({tabs:t,activeTab:e,onChange:r,variant:s="pill",fullWidth:n=!1,className:a}){const i=f.useRef(null),l=f.useRef(null),c=f.useRef(null),u=f.useRef(null),d=f.useRef(!1),m=s==="filled",x=f.useCallback(h=>{const b=i.current;if(!b)return null;const v=b.querySelector(`[data-tab-id="${h}"]`);if(!v)return null;const E=b.getBoundingClientRect(),y=v.getBoundingClientRect();return{left:y.left-E.left,width:y.width}},[]),p=f.useCallback((h,b,v)=>{const E=l.current;E&&(E.style.transition=b,E.style.left=`${h.left}px`,E.style.width=`${h.width}px`,E.style.transform=`scaleY(${v})`)},[]);f.useEffect(()=>{const h=x(e);h&&(c.current=h,p(h,"none",1),l.current&&(l.current.style.opacity="1"),d.current=!0)},[]),f.useEffect(()=>{if(!d.current||u.current!==null)return;const h=x(e);h&&(c.current=h,p(h,"none",1))},[e,x,p]);const g=f.useCallback(h=>{if(h===e||(r(h),!d.current))return;u.current&&clearTimeout(u.current);const b=c.current??x(e),v=x(h);if(!b||!v)return;const E=Math.min(b.left,v.left),y=Math.max(b.left+b.width,v.left+v.width)-E;p({left:E,width:y},"left 130ms ease-out, width 130ms ease-out, transform 130ms ease-out",.55),u.current=setTimeout(()=>{const k=x(h)??v;c.current=k,p(k,"left 160ms ease-in, width 160ms ease-in, transform 160ms ease-in",1),u.current=null},130)},[e,x,r,p]);return f.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),o.jsxRuntimeExports.jsxs("div",{ref:i,role:"tablist","data-testid":"liquid-tabs",style:{background:"var(--roster-lt-bg)",borderColor:"var(--roster-lt-border)"},className:N.cn("rst:relative rst:flex rst:border",m?"rst:w-full rst:overflow-hidden rst:rounded-lg":N.cn("rst:gap-1 rst:rounded-xl rst:p-1",n?"rst:w-full":"rst:w-fit"),a),children:[o.jsxRuntimeExports.jsx("div",{ref:l,"aria-hidden":!0,"data-testid":"liquid-tabs-pill",className:N.cn("rst:absolute rst:rounded-lg",m?"rst:top-0 rst:bottom-0":"rst:top-1 rst:bottom-1"),style:{opacity:0,left:0,width:0,background:"var(--roster-lt-pill)"}}),t.map(h=>{const b=h.id===e;return o.jsxRuntimeExports.jsx("button",{role:"tab","aria-selected":b,"data-tab-id":h.id,"data-testid":`liquid-tab-${h.id}`,onClick:()=>g(h.id),className:N.cn("rst:relative rst:z-10 rst:text-sm rst:font-medium rst:transition-colors rst:cursor-pointer",m?N.cn("rst:flex-1 rst:py-2",b?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)"):N.cn("rst:rounded-lg rst:py-1.5",n?"rst:flex-1":"rst:px-4",b?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)")),children:typeof h.label=="function"?h.label(b):h.label},h.id)})]})}function jt(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t?.(n),r===!1||!n.defaultPrevented)return e?.(n)}}function Pn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const s=t.map(n=>{const a=Pn(n,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<s.length;n++){const a=s[n];typeof a=="function"?a():Pn(t[n],null)}}}}function Ut(...t){return w.useCallback(Ha(...t),t)}function za(t,e=[]){let r=[];function s(a,i){const l=w.createContext(i),c=r.length;r=[...r,i];const u=m=>{const{scope:x,children:p,...g}=m,h=x?.[t]?.[c]||l,b=w.useMemo(()=>g,Object.values(g));return o.jsxRuntimeExports.jsx(h.Provider,{value:b,children:p})};u.displayName=a+"Provider";function d(m,x){const p=x?.[t]?.[c]||l,g=w.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,d]}const n=()=>{const a=r.map(i=>w.createContext(i));return function(l){const c=l?.[t]||a;return w.useMemo(()=>({[`__scope${t}`]:{...l,[t]:c}}),[l,c])}};return n.scopeName=t,[s,Df(n,...e)]}function Df(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const s=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const i=s.reduce((l,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...l,...m}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function Ff(t){const e=Mf(t),r=w.forwardRef((s,n)=>{const{children:a,...i}=s,l=w.Children.toArray(a),c=l.find(_f);if(c){const u=c.props.children,d=l.map(m=>m===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return o.jsxRuntimeExports.jsx(e,{...i,ref:n,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsxRuntimeExports.jsx(e,{...i,ref:n,children:a})});return r.displayName=`${t}.Slot`,r}function Mf(t){const e=w.forwardRef((r,s)=>{const{children:n,...a}=r;if(w.isValidElement(n)){const i=Bf(n),l=Vf(a,n.props);return n.type!==w.Fragment&&(l.ref=s?Ha(s,i):i),w.cloneElement(n,l)}return w.Children.count(n)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Wa=Symbol("radix.slottable");function Lf(t){const e=({children:r})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Wa,e}function _f(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Wa}function Vf(t,e){const r={...e};for(const s in e){const n=t[s],a=e[s];/^on[A-Z]/.test(s)?n&&a?r[s]=(...l)=>{const c=a(...l);return n(...l),c}:n&&(r[s]=n):s==="style"?r[s]={...n,...a}:s==="className"&&(r[s]=[n,a].filter(Boolean).join(" "))}return{...t,...r}}function Bf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Hf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=Hf.reduce((t,e)=>{const r=Ff(`Primitive.${e}`),s=w.forwardRef((n,a)=>{const{asChild:i,...l}=n,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsxRuntimeExports.jsx(c,{...l,ref:a})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function zf(t,e){t&&ge.flushSync(()=>t.dispatchEvent(e))}function kr(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>e.current?.(...r),[])}function Wf(t,e=globalThis?.document){const r=kr(t);w.useEffect(()=>{const s=n=>{n.key==="Escape"&&r(n)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[r,e])}var Yf="DismissableLayer",Kr="dismissableLayer.update",Uf="dismissableLayer.pointerDownOutside",Kf="dismissableLayer.focusOutside",$n,Ya=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ua=w.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...c}=t,u=w.useContext(Ya),[d,m]=w.useState(null),x=d?.ownerDocument??globalThis?.document,[,p]=w.useState({}),g=Ut(e,S=>m(S)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(b),E=d?h.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,k=E>=v,R=Xf(S=>{const F=S.target,B=[...u.branches].some(j=>j.contains(F));!k||B||(n?.(S),i?.(S),S.defaultPrevented||l?.())},x),O=Qf(S=>{const F=S.target;[...u.branches].some(j=>j.contains(F))||(a?.(S),i?.(S),S.defaultPrevented||l?.())},x);return Wf(S=>{E===u.layers.size-1&&(s?.(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},x),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($n=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Tn(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=$n)}},[d,x,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Tn())},[d,u]),w.useEffect(()=>{const S=()=>p({});return document.addEventListener(Kr,S),()=>document.removeEventListener(Kr,S)},[]),o.jsxRuntimeExports.jsx(_t.div,{...c,ref:g,style:{pointerEvents:y?k?"auto":"none":void 0,...t.style},onFocusCapture:jt(t.onFocusCapture,O.onFocusCapture),onBlurCapture:jt(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:jt(t.onPointerDownCapture,R.onPointerDownCapture)})});Ua.displayName=Yf;var Gf="DismissableLayerBranch",qf=w.forwardRef((t,e)=>{const r=w.useContext(Ya),s=w.useRef(null),n=Ut(e,s);return w.useEffect(()=>{const a=s.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),o.jsxRuntimeExports.jsx(_t.div,{...t,ref:n})});qf.displayName=Gf;function Xf(t,e=globalThis?.document){const r=kr(t),s=w.useRef(!1),n=w.useRef(()=>{});return w.useEffect(()=>{const a=l=>{if(l.target&&!s.current){let c=function(){Ka(Uf,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=c,e.addEventListener("click",n.current,{once:!0})):c()}else e.removeEventListener("click",n.current);s.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",n.current)}},[e,r]),{onPointerDownCapture:()=>s.current=!0}}function Qf(t,e=globalThis?.document){const r=kr(t),s=w.useRef(!1);return w.useEffect(()=>{const n=a=>{a.target&&!s.current&&Ka(Kf,r,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Tn(){const t=new CustomEvent(Kr);document.dispatchEvent(t)}function Ka(t,e,r,{discrete:s}){const n=r.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),s?zf(n,a):n.dispatchEvent(a)}var Mt=globalThis?.document?w.useLayoutEffect:()=>{},Zf=w[" useId ".trim().toString()]||(()=>{}),Jf=0;function tp(t){const[e,r]=w.useState(Zf());return Mt(()=>{r(s=>s??String(Jf++))},[t]),e?`radix-${e}`:""}var ep="Arrow",Ga=w.forwardRef((t,e)=>{const{children:r,width:s=10,height:n=5,...a}=t;return o.jsxRuntimeExports.jsx(_t.svg,{...a,ref:e,width:s,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:o.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ga.displayName=ep;var rp=Ga;function sp(t){const[e,r]=w.useState(void 0);return Mt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let i,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=t.offsetWidth,l=t.offsetHeight;r({width:i,height:l})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),e}var As="Popper",[qa,Xa]=za(As),[np,Qa]=qa(As),Za=t=>{const{__scopePopper:e,children:r}=t,[s,n]=w.useState(null);return o.jsxRuntimeExports.jsx(np,{scope:e,anchor:s,onAnchorChange:n,children:r})};Za.displayName=As;var Ja="PopperAnchor",ti=w.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:s,...n}=t,a=Qa(Ja,r),i=w.useRef(null),l=Ut(e,i),c=w.useRef(null);return w.useEffect(()=>{const u=c.current;c.current=s?.current||i.current,u!==c.current&&a.onAnchorChange(c.current)}),s?null:o.jsxRuntimeExports.jsx(_t.div,{...n,ref:l})});ti.displayName=Ja;var Ds="PopperContent",[op,ap]=qa(Ds),ei=w.forwardRef((t,e)=>{const{__scopePopper:r,side:s="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:p="optimized",onPlaced:g,...h}=t,b=Qa(Ds,r),[v,E]=w.useState(null),y=Ut(e,K=>E(K)),[k,R]=w.useState(null),O=sp(k),S=O?.width??0,F=O?.height??0,B=s+(a!=="center"?"-"+a:""),j=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],M=T.length>0,L={padding:j,boundary:T.filter(lp),altBoundary:M},{refs:$,floatingStyles:A,placement:D,isPositioned:z,middlewareData:C}=jo({strategy:"fixed",placement:B,whileElementsMounted:(...K)=>ko(...K,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[xs({mainAxis:n+F,alignmentAxis:i}),c&&So({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Vc():void 0,...L}),c&&Co({...L}),No({...L,apply:({elements:K,rects:et,availableWidth:st,availableHeight:Kt})=>{const{width:le,height:Fe}=et.reference,Me=K.floating.style;Me.setProperty("--radix-popper-available-width",`${st}px`),Me.setProperty("--radix-popper-available-height",`${Kt}px`),Me.setProperty("--radix-popper-anchor-width",`${le}px`),Me.setProperty("--radix-popper-anchor-height",`${Fe}px`)}}),k&&Hc({element:k,padding:l}),cp({arrowWidth:S,arrowHeight:F}),x&&Bc({strategy:"referenceHidden",...L})]}),[P,V]=ni(D),X=kr(g);Mt(()=>{z&&X?.()},[z,X]);const G=C.arrow?.x,I=C.arrow?.y,H=C.arrow?.centerOffset!==0,[Y,_]=w.useState();return Mt(()=>{v&&_(window.getComputedStyle(v).zIndex)},[v]),o.jsxRuntimeExports.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:z?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[C.transformOrigin?.x,C.transformOrigin?.y].join(" "),...C.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsxRuntimeExports.jsx(op,{scope:r,placedSide:P,onArrowChange:R,arrowX:G,arrowY:I,shouldHideArrow:H,children:o.jsxRuntimeExports.jsx(_t.div,{"data-side":P,"data-align":V,...h,ref:y,style:{...h.style,animation:z?void 0:"none"}})})})});ei.displayName=Ds;var ri="PopperArrow",ip={top:"bottom",right:"left",bottom:"top",left:"right"},si=w.forwardRef(function(e,r){const{__scopePopper:s,...n}=e,a=ap(ri,s),i=ip[a.placedSide];return o.jsxRuntimeExports.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:o.jsxRuntimeExports.jsx(rp,{...n,ref:r,style:{...n.style,display:"block"}})})});si.displayName=ri;function lp(t){return t!==null}var cp=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:s,middlewareData:n}=e,i=n.arrow?.centerOffset!==0,l=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,d]=ni(r),m={start:"0%",center:"50%",end:"100%"}[d],x=(n.arrow?.x??0)+l/2,p=(n.arrow?.y??0)+c/2;let g="",h="";return u==="bottom"?(g=i?m:`${x}px`,h=`${-c}px`):u==="top"?(g=i?m:`${x}px`,h=`${s.floating.height+c}px`):u==="right"?(g=`${-c}px`,h=i?m:`${p}px`):u==="left"&&(g=`${s.floating.width+c}px`,h=i?m:`${p}px`),{data:{x:g,y:h}}}});function ni(t){const[e,r="center"]=t.split("-");return[e,r]}var up=Za,dp=ti,fp=ei,pp=si,mp="Portal",oi=w.forwardRef((t,e)=>{const{container:r,...s}=t,[n,a]=w.useState(!1);Mt(()=>a(!0),[]);const i=r||n&&globalThis?.document?.body;return i?xt.createPortal(o.jsxRuntimeExports.jsx(_t.div,{...s,ref:e}),i):null});oi.displayName=mp;function xp(t,e){return w.useReducer((r,s)=>e[r][s]??r,t)}var Fs=t=>{const{present:e,children:r}=t,s=gp(e),n=typeof r=="function"?r({present:s.isPresent}):w.Children.only(r),a=Ut(s.ref,hp(n));return typeof r=="function"||s.isPresent?w.cloneElement(n,{ref:a}):null};Fs.displayName="Presence";function gp(t){const[e,r]=w.useState(),s=w.useRef(null),n=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[l,c]=xp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Ve(s.current);a.current=l==="mounted"?u:"none"},[l]),Mt(()=>{const u=s.current,d=n.current;if(d!==t){const x=a.current,p=Ve(u);t?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&x!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,c]),Mt(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,m=p=>{const h=Ve(s.current).includes(CSS.escape(p.animationName));if(p.target===e&&h&&(c("ANIMATION_END"),!n.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},x=p=>{p.target===e&&(a.current=Ve(s.current))};return e.addEventListener("animationstart",x),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",x),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:w.useCallback(u=>{s.current=u?getComputedStyle(u):null,r(u)},[])}}function Ve(t){return t?.animationName||"none"}function hp(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var bp=w[" useInsertionEffect ".trim().toString()]||Mt;function vp({prop:t,defaultProp:e,onChange:r=()=>{},caller:s}){const[n,a,i]=yp({defaultProp:e,onChange:r}),l=t!==void 0,c=l?t:n;{const d=w.useRef(t!==void 0);w.useEffect(()=>{const m=d.current;m!==l&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,s])}const u=w.useCallback(d=>{if(l){const m=wp(d)?d(t):d;m!==t&&i.current?.(m)}else a(d)},[l,t,a,i]);return[c,u]}function yp({defaultProp:t,onChange:e}){const[r,s]=w.useState(t),n=w.useRef(r),a=w.useRef(e);return bp(()=>{a.current=e},[e]),w.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,s,a]}function wp(t){return typeof t=="function"}var Ep=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kp="VisuallyHidden",ai=w.forwardRef((t,e)=>o.jsxRuntimeExports.jsx(_t.span,{...t,ref:e,style:{...Ep,...t.style}}));ai.displayName=kp;var Rp=ai,[Rr]=za("Tooltip",[Xa]),jr=Xa(),ii="TooltipProvider",jp=700,Gr="tooltip.open",[Sp,Ms]=Rr(ii),li=t=>{const{__scopeTooltip:e,delayDuration:r=jp,skipDelayDuration:s=300,disableHoverableContent:n=!1,children:a}=t,i=w.useRef(!0),l=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsxRuntimeExports.jsx(Sp,{scope:e,isOpenDelayedRef:i,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,s)},[s]),isPointerInTransitRef:l,onPointerInTransitChange:w.useCallback(u=>{l.current=u},[]),disableHoverableContent:n,children:a})};li.displayName=ii;var Ee="Tooltip",[Cp,De]=Rr(Ee),ci=t=>{const{__scopeTooltip:e,children:r,open:s,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=t,c=Ms(Ee,t.__scopeTooltip),u=jr(e),[d,m]=w.useState(null),x=tp(),p=w.useRef(0),g=i??c.disableHoverableContent,h=l??c.delayDuration,b=w.useRef(!1),[v,E]=vp({prop:s,defaultProp:n??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Gr))):c.onClose(),a?.(S)},caller:Ee}),y=w.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),k=w.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,E(!0)},[E]),R=w.useCallback(()=>{window.clearTimeout(p.current),p.current=0,E(!1)},[E]),O=w.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,E(!0),p.current=0},h)},[h,E]);return w.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),o.jsxRuntimeExports.jsx(up,{...u,children:o.jsxRuntimeExports.jsx(Cp,{scope:e,contentId:x,open:v,stateAttribute:y,trigger:d,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?O():k()},[c.isOpenDelayedRef,O,k]),onTriggerLeave:w.useCallback(()=>{g?R():(window.clearTimeout(p.current),p.current=0)},[R,g]),onOpen:k,onClose:R,disableHoverableContent:g,children:r})})};ci.displayName=Ee;var qr="TooltipTrigger",ui=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...s}=t,n=De(qr,r),a=Ms(qr,r),i=jr(r),l=w.useRef(null),c=Ut(e,l,n.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),m=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),o.jsxRuntimeExports.jsx(dp,{asChild:!0,...i,children:o.jsxRuntimeExports.jsx(_t.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...s,ref:c,onPointerMove:jt(t.onPointerMove,x=>{x.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),d.current=!0)}),onPointerLeave:jt(t.onPointerLeave,()=>{n.onTriggerLeave(),d.current=!1}),onPointerDown:jt(t.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:jt(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:jt(t.onBlur,n.onClose),onClick:jt(t.onClick,n.onClose)})})});ui.displayName=qr;var Ls="TooltipPortal",[Np,Op]=Rr(Ls,{forceMount:void 0}),di=t=>{const{__scopeTooltip:e,forceMount:r,children:s,container:n}=t,a=De(Ls,e);return o.jsxRuntimeExports.jsx(Np,{scope:e,forceMount:r,children:o.jsxRuntimeExports.jsx(Fs,{present:r||a.open,children:o.jsxRuntimeExports.jsx(oi,{asChild:!0,container:n,children:s})})})};di.displayName=Ls;var te="TooltipContent",fi=w.forwardRef((t,e)=>{const r=Op(te,t.__scopeTooltip),{forceMount:s=r.forceMount,side:n="top",...a}=t,i=De(te,t.__scopeTooltip);return o.jsxRuntimeExports.jsx(Fs,{present:s||i.open,children:i.disableHoverableContent?o.jsxRuntimeExports.jsx(pi,{side:n,...a,ref:e}):o.jsxRuntimeExports.jsx(Pp,{side:n,...a,ref:e})})}),Pp=w.forwardRef((t,e)=>{const r=De(te,t.__scopeTooltip),s=Ms(te,t.__scopeTooltip),n=w.useRef(null),a=Ut(e,n),[i,l]=w.useState(null),{trigger:c,onClose:u}=r,d=n.current,{onPointerInTransitChange:m}=s,x=w.useCallback(()=>{l(null),m(!1)},[m]),p=w.useCallback((g,h)=>{const b=g.currentTarget,v={x:g.clientX,y:g.clientY},E=Ap(v,b.getBoundingClientRect()),y=Dp(v,E),k=Fp(h.getBoundingClientRect()),R=Lp([...y,...k]);l(R),m(!0)},[m]);return w.useEffect(()=>()=>x(),[x]),w.useEffect(()=>{if(c&&d){const g=b=>p(b,d),h=b=>p(b,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[c,d,p,x]),w.useEffect(()=>{if(i){const g=h=>{const b=h.target,v={x:h.clientX,y:h.clientY},E=c?.contains(b)||d?.contains(b),y=!Mp(v,i);E?x():y&&(x(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,i,u,x]),o.jsxRuntimeExports.jsx(pi,{...t,ref:a})}),[$p,Tp]=Rr(Ee,{isInside:!1}),Ip=Lf("TooltipContent"),pi=w.forwardRef((t,e)=>{const{__scopeTooltip:r,children:s,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=t,c=De(te,r),u=jr(r),{onClose:d}=c;return w.useEffect(()=>(document.addEventListener(Gr,d),()=>document.removeEventListener(Gr,d)),[d]),w.useEffect(()=>{if(c.trigger){const m=x=>{x.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),o.jsxRuntimeExports.jsx(Ua,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:o.jsxRuntimeExports.jsxs(fp,{"data-state":c.stateAttribute,...u,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsxRuntimeExports.jsx(Ip,{children:s}),o.jsxRuntimeExports.jsx($p,{scope:r,isInside:!0,children:o.jsxRuntimeExports.jsx(Rp,{id:c.contentId,role:"tooltip",children:n||s})})]})})});fi.displayName=te;var mi="TooltipArrow",xi=w.forwardRef((t,e)=>{const{__scopeTooltip:r,...s}=t,n=jr(r);return Tp(mi,r).isInside?null:o.jsxRuntimeExports.jsx(pp,{...n,...s,ref:e})});xi.displayName=mi;function Ap(t,e){const r=Math.abs(e.top-t.y),s=Math.abs(e.bottom-t.y),n=Math.abs(e.right-t.x),a=Math.abs(e.left-t.x);switch(Math.min(r,s,n,a)){case a:return"left";case n:return"right";case r:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Dp(t,e,r=5){const s=[];switch(e){case"top":s.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":s.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":s.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":s.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return s}function Fp(t){const{top:e,right:r,bottom:s,left:n}=t;return[{x:n,y:e},{x:r,y:e},{x:r,y:s},{x:n,y:s}]}function Mp(t,e){const{x:r,y:s}=t;let n=!1;for(let a=0,i=e.length-1;a<e.length;i=a++){const l=e[a],c=e[i],u=l.x,d=l.y,m=c.x,x=c.y;d>s!=x>s&&r<(m-u)*(s-d)/(x-d)+u&&(n=!n)}return n}function Lp(t){const e=t.slice();return e.sort((r,s)=>r.x<s.x?-1:r.x>s.x?1:r.y<s.y?-1:r.y>s.y?1:0),_p(e)}function _p(t){if(t.length<=1)return t.slice();const e=[];for(let s=0;s<t.length;s++){const n=t[s];for(;e.length>=2;){const a=e[e.length-1],i=e[e.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const r=[];for(let s=t.length-1;s>=0;s--){const n=t[s];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var Vp=li,Bp=ci,Hp=ui,zp=di,Wp=fi,Yp=xi;function Up({content:t,children:e,placement:r="top",variant:s="dark",delayDuration:n=300,defaultOpen:a=!1,className:i}){const[l,c]=f.useState(a),u=f.useCallback(()=>c(d=>!d),[]);return o.jsxRuntimeExports.jsx(Vp,{delayDuration:n,children:o.jsxRuntimeExports.jsxs(Bp,{open:l,onOpenChange:c,children:[o.jsxRuntimeExports.jsx(Hp,{asChild:!0,onClick:u,children:o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex rst:items-center rst:cursor-default",tabIndex:0,"data-testid":"tooltip-trigger",children:e})}),o.jsxRuntimeExports.jsx(zp,{children:o.jsxRuntimeExports.jsxs(Wp,{side:r,sideOffset:8,collisionPadding:8,"data-testid":"tooltip-content",className:N.cn("rst:z-50 rst:max-w-60 rst:rounded-lg rst:px-3 rst:py-2 rst:text-xs rst:leading-snug rst:shadow-xl","rst:animate-in rst:fade-in-0 rst:zoom-in-95","rst:data-[side=bottom]:slide-in-from-top-2","rst:data-[side=top]:slide-in-from-bottom-2","rst:data-[side=left]:slide-in-from-right-2","rst:data-[side=right]:slide-in-from-left-2",s==="dark"?"rst:bg-zinc-900 rst:text-zinc-100 rst:ring-1 rst:ring-white/10":"rst:bg-white rst:text-zinc-900 rst:ring-1 rst:ring-zinc-200",i),children:[t,o.jsxRuntimeExports.jsx(Yp,{className:s==="dark"?"rst:fill-zinc-900":"rst:fill-white",width:12,height:6})]})})]})})}const Kp={xs:"rst:max-h-8",sm:"rst:max-h-16",md:"rst:max-h-24",lg:"rst:max-h-36"};function Gp({children:t,size:e="md",expandLabel:r="Show more",collapseLabel:s="Show less",className:n}){const[a,i]=f.useState(!1),[l,c]=f.useState(!1),u=f.useRef(null);return f.useEffect(()=>{const d=u.current;d&&c(d.scrollHeight>d.clientHeight)},[t,e]),o.jsxRuntimeExports.jsxs("div",{className:n,children:[o.jsxRuntimeExports.jsx("div",{ref:u,"data-testid":"collapsible-content",className:N.cn(!a&&Kp[e],!a&&"rst:overflow-hidden"),style:!a&&l?{maskImage:"linear-gradient(to bottom, black 50%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 50%, transparent 100%)"}:void 0,children:t}),l&&o.jsxRuntimeExports.jsx("button",{type:"button","data-testid":"collapsible-toggle",onClick:()=>i(d=>!d),className:"rst:mt-2 rst:text-xs rst:font-medium rst:text-primary-500 rst:dark:text-primary-400 rst:hover:opacity-80 rst:transition-opacity rst:cursor-pointer",children:a?s:r})]})}function qp({segments:t,size:e="md",showLegend:r=!0,className:s}){const n=t.reduce((i,l)=>i+l.value,0);if(n===0)return null;const a=t.filter(i=>i.value>0);return o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:flex-col rst:gap-1.5",s),children:[o.jsxRuntimeExports.jsx("div",{"data-testid":"segment-bar-track",className:N.cn("rst:flex rst:w-full rst:overflow-hidden rst:rounded-full",e==="sm"?"rst:h-1.5":"rst:h-2"),children:a.map(i=>{const l=i.value/n*100;return o.jsxRuntimeExports.jsx("div",{"data-testid":`segment-${i.key}`,className:"rst:transition-[width]",style:{width:`${l}%`,backgroundColor:i.color},title:`${i.label}: ${Math.round(l)}%`},i.key)})}),r&&o.jsxRuntimeExports.jsx("div",{"data-testid":"segment-bar-legend",className:"rst:flex rst:flex-wrap rst:gap-x-3 rst:gap-y-0.5",children:a.map(i=>{const l=Math.round(i.value/n*100);return o.jsxRuntimeExports.jsxs("span",{className:"rst:flex rst:items-center rst:gap-1.5 rst:text-xs rst:text-gray-600 rst:dark:text-gray-400",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:h-2 rst:w-2 rst:flex-none rst:rounded-full",style:{backgroundColor:i.color},"aria-hidden":"true"}),i.label,o.jsxRuntimeExports.jsxs("span",{className:"rst:opacity-60",children:[l,"%"]})]},i.key)})})]})}const gi=o.cva("rst:flex rst:items-start rst:gap-2.5 rst:rounded-lg rst:border-l-4 rst:px-4 rst:py-3 rst:text-sm",{variants:{colorScheme:{error:"rst:border-error-500 rst:bg-error-50 rst:text-error-800 rst:dark:border-error-400 rst:dark:bg-error-500/10 rst:dark:text-error-200",success:"rst:border-success-500 rst:bg-success-50 rst:text-success-800 rst:dark:border-success-400 rst:dark:bg-success-500/10 rst:dark:text-success-200",amber:"rst:border-amber-500 rst:bg-amber-50 rst:text-amber-900 rst:dark:border-amber-400 rst:dark:bg-amber-500/10 rst:dark:text-amber-200",info:"rst:border-info-500 rst:bg-info-50 rst:text-info-800 rst:dark:border-info-400 rst:dark:bg-info-500/10 rst:dark:text-info-200",primary:"rst:border-primary-500 rst:bg-primary-50 rst:text-primary-800 rst:dark:border-primary-400 rst:dark:bg-primary-500/10 rst:dark:text-primary-200",neutral:"rst:border-gray-400 rst:bg-gray-50 rst:text-gray-800 rst:dark:border-gray-500 rst:dark:bg-gray-500/10 rst:dark:text-gray-200",current:"rst:border-current rst:text-current rst:bg-current/10"},surface:{tint:"",gradient:""}},compoundVariants:[{surface:"gradient",colorScheme:"error",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-error-500/10 rst:to-transparent rst:dark:from-error-500/15"},{surface:"gradient",colorScheme:"success",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-success-500/10 rst:to-transparent rst:dark:from-success-500/15"},{surface:"gradient",colorScheme:"amber",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-amber-500/10 rst:to-transparent rst:dark:from-amber-500/15"},{surface:"gradient",colorScheme:"info",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-info-500/10 rst:to-transparent rst:dark:from-info-500/15"},{surface:"gradient",colorScheme:"primary",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-primary-500/10 rst:to-transparent rst:dark:from-primary-500/15"},{surface:"gradient",colorScheme:"neutral",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-gray-500/10 rst:to-transparent rst:dark:from-gray-500/15"},{surface:"gradient",colorScheme:"current",class:"rst:bg-transparent rst:dark:bg-transparent rst:bg-gradient-to-r rst:from-current/15 rst:to-transparent"}],defaultVariants:{colorScheme:"error",surface:"tint"}}),Xp={error:o.faCircleExclamation,success:o.faCircleCheck,amber:o.faTriangleExclamation,info:o.faCircleInfo,primary:o.faCircleInfo,neutral:o.faCircleInfo,current:o.faCircleInfo},hi=f.forwardRef(({colorScheme:t="error",surface:e,title:r,children:s,icon:n,onDismiss:a,dismissLabel:i="Dismiss",className:l,...c},u)=>{const d=t==="error";return o.jsxRuntimeExports.jsxs("div",{ref:u,role:d?"alert":"status","aria-live":d?"assertive":"polite",className:N.cn(gi({colorScheme:t,surface:e}),l),...c,children:[n===void 0?o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:Xp[t??"error"],className:"rst:mt-0.5 rst:h-4 rst:w-4 rst:shrink-0","aria-hidden":"true"}):n,o.jsxRuntimeExports.jsxs("div",{className:"rst:min-w-0 rst:flex-1",children:[r&&o.jsxRuntimeExports.jsx("p",{className:"rst:font-semibold",children:r}),o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:min-w-0",r&&"rst:mt-0.5 rst:opacity-90"),children:s})]}),a&&o.jsxRuntimeExports.jsx("button",{type:"button",onClick:a,"aria-label":i,className:"rst:-m-1 rst:shrink-0 rst:rounded rst:p-1 rst:opacity-60 rst:transition-opacity rst:hover:opacity-100 rst:focus:outline-none rst:focus-visible:ring-2 rst:focus-visible:ring-current",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]})});hi.displayName="Alert";const Qp=({items:t,allowMultiple:e=!1,variant:r="soft",className:s,showDividers:n=!1,defaultOpenIds:a=[]})=>{const[i,l]=f.useState(new Set(a)),c=u=>{l(d=>{const m=new Set(d),x=m.has(u);return e?x?m.delete(u):m.add(u):(m.clear(),x||m.add(u)),m})};return o.jsxRuntimeExports.jsx("div",{className:N.cn("rst:w-full rst:space-y-1",s),children:t.map((u,d)=>o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[n&&d>0&&o.jsxRuntimeExports.jsx("div",{className:"rst:mx-4 rst:h-px rst:bg-gray-200/50 rst:dark:bg-gray-700/50 rst:transition-colors rst:mb-1"}),o.jsxRuntimeExports.jsx(Ra,{title:u.title,variant:r,isOpen:i.has(u.id),onToggle:()=>c(u.id),children:u.content})]},u.id))})},bi=o.cva("rst:m-0",{variants:{layout:{inline:"rst:grid rst:grid-cols-[auto_1fr] rst:gap-x-3",stacked:"rst:flex rst:flex-col",split:"rst:flex rst:flex-col"},size:{sm:"rst:text-[0.65625rem] rst:gap-y-[5px]",md:"rst:text-xs rst:gap-y-1.5"}},defaultVariants:{layout:"inline",size:"sm"}}),vi=f.forwardRef(({items:t,layout:e,size:r,dividers:s=!1,className:n,...a},i)=>o.jsxRuntimeExports.jsx("dl",{ref:i,className:N.cn(bi({layout:e,size:r}),n),...a,children:t.map((l,c)=>{const u=c===t.length-1,d=s&&!u?"rst:border-b rst:border-gray-200 rst:pb-1.5 rst:dark:border-gray-800":"";return e==="stacked"?o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:flex-col rst:gap-0.5",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c):e==="split"?o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:flex rst:items-baseline rst:justify-between rst:gap-4",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-right rst:tabular-nums rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c):o.jsxRuntimeExports.jsxs("div",{className:N.cn("rst:contents",d),children:[o.jsxRuntimeExports.jsx("dt",{className:"rst:whitespace-nowrap rst:font-mono rst:uppercase rst:tracking-[0.08em] rst:text-gray-500 rst:dark:text-gray-400",children:l.term}),o.jsxRuntimeExports.jsx("dd",{className:"rst:m-0 rst:text-gray-900 rst:dark:text-gray-100",children:l.description})]},c)})}));vi.displayName="DescriptionList";const yi=o.cva("rst:my-1",{variants:{variant:{rule:"rst:border-l-2 rst:pl-4 rst:py-[2px]",plain:"",centered:"rst:text-center rst:py-4 rst:[&>blockquote]:mx-auto"},colorScheme:{primary:"rst:border-primary-500 rst:dark:border-primary-400",success:"rst:border-success-500 rst:dark:border-success-400",error:"rst:border-error-500 rst:dark:border-error-400",amber:"rst:border-amber-500 rst:dark:border-amber-400",neutral:"rst:border-gray-300 rst:dark:border-gray-700",current:"rst:border-current"}},defaultVariants:{variant:"rule",colorScheme:"primary"}}),wi=f.forwardRef(({children:t,cite:e,citeUrl:r,variant:s,colorScheme:n,className:a,...i},l)=>o.jsxRuntimeExports.jsxs("figure",{ref:l,className:N.cn(yi({variant:s,colorScheme:n}),a),...i,children:[o.jsxRuntimeExports.jsx("blockquote",{cite:r,className:"rst:m-0 rst:max-w-[48ch] rst:text-[1.03125rem] rst:leading-[1.5] rst:text-gray-900 rst:dark:text-gray-100",children:t}),e&&o.jsxRuntimeExports.jsx("figcaption",{className:"rst:mt-[7px] rst:font-mono rst:text-[0.625rem] rst:uppercase rst:leading-none rst:tracking-[0.14em] rst:text-gray-500 rst:dark:text-gray-400",children:e})]}));wi.displayName="Pullquote";const Xr=o.cva("rst:flex rst:items-center rst:text-sm rst:font-medium rst:transition-colors",{variants:{variant:{default:"rst:text-gray-500 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100",primary:"rst:text-primary-600 rst:hover:text-primary-800 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",inverse:"rst:text-gray-300 rst:hover:text-white rst:dark:text-gray-400 rst:dark:hover:text-white"}},defaultVariants:{variant:"default"}}),Zp=({items:t,separator:e,showHomeIcon:r,homeHref:s="/",linkComponent:n,currentClassName:a,variant:i,className:l,...c})=>{const u=n??Ht,d=e??o.jsxRuntimeExports.jsx("span",{className:"rst:text-gray-300 rst:dark:text-gray-600 rst:text-sm rst:transition-colors",children:"/"});return o.jsxRuntimeExports.jsx("nav",{"aria-label":"Breadcrumb",className:N.cn("rst:flex",l),...c,children:o.jsxRuntimeExports.jsxs("ol",{className:"rst:flex rst:items-center rst:space-x-2",children:[r&&o.jsxRuntimeExports.jsxs("li",{className:"rst:flex rst:items-center",children:[o.jsxRuntimeExports.jsx(u,{href:s,className:N.cn(Xr({variant:i}),"rst:hover:underline-none"),"aria-label":"Home",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faHome,className:"rst:h-4 rst:w-4"})}),o.jsxRuntimeExports.jsx("span",{className:"rst:ml-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:d})]}),t.map((m,x)=>{const p=x===t.length-1;return o.jsxRuntimeExports.jsxs("li",{className:"rst:flex rst:items-center",children:[x>0&&o.jsxRuntimeExports.jsx("span",{className:"rst:mr-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:d}),p||!m.href?o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:font-semibold rst:text-sm rst:cursor-default rst:transition-colors",i==="inverse"?"rst:text-white":"rst:text-gray-900 rst:dark:text-gray-100",p&&a,m.className),"aria-current":p?"page":void 0,children:m.label}):o.jsxRuntimeExports.jsx(u,{href:m.href,className:N.cn(Xr({variant:i}),"rst:hover:underline",m.className),children:m.label})]},x)})]})})},Ei=o.cva("rst:relative rst:flex rst:flex-col rst:gap-4 rst:overflow-hidden rst:rounded-lg rst:border rst:p-6 rst:shadow-sm rst:transition-all rst:md:flex-row rst:md:items-center rst:md:justify-between",{variants:{variant:{primary:"rst:border-primary-200 rst:bg-primary-50 rst:text-primary-900 rst:dark:border-primary-800 rst:dark:bg-primary-900/30 rst:dark:text-primary-200",neutral:"rst:border-gray-200 rst:bg-white rst:text-gray-900 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100",warning:"rst:border-amber-200 rst:bg-amber-50 rst:text-amber-900 rst:dark:border-amber-800 rst:dark:bg-amber-900/30 rst:dark:text-amber-200",error:"rst:border-error-200 rst:bg-error-50 rst:text-error-900 rst:dark:border-error-800 rst:dark:bg-error-900/30 rst:dark:text-error-200",success:"rst:border-success-200 rst:bg-success-50 rst:text-success-900 rst:dark:border-success-800 rst:dark:bg-success-900/30 rst:dark:text-success-200",info:"rst:border-blue-200 rst:bg-blue-50 rst:text-blue-900 rst:dark:border-blue-800 rst:dark:bg-blue-900/30 rst:dark:text-blue-200"}},defaultVariants:{variant:"primary"}}),Jp=({title:t,description:e,action:r,icon:s,variant:n,onDismiss:a,className:i,...l})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(Ei({variant:n}),i),...l,children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-start rst:gap-4",children:[s&&o.jsxRuntimeExports.jsx("div",{className:"rst:mt-1 rst:shrink-0 rst:text-current",children:s}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:gap-1.5 rst:w-full",children:[o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-bold rst:leading-tight rst:tracking-tight rst:text-current",children:t}),e&&o.jsxRuntimeExports.jsx("div",{className:"rst:max-w-prose rst:text-sm rst:leading-relaxed rst:text-current rst:opacity-90 rst:dark:opacity-80",children:e})]})]}),r&&o.jsxRuntimeExports.jsx("div",{className:"rst:shrink-0 rst:pt-2 rst:md:pt-0",children:r}),a&&o.jsxRuntimeExports.jsx("div",{className:"rst:absolute rst:right-2 rst:top-2",children:o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",size:"sm",className:"rst:h-8 rst:w-8 rst:rounded-full rst:p-0 rst:opacity-60 rst:hover:opacity-100 rst:dark:hover:bg-black/20",onClick:a,"aria-label":"Dismiss",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-4 rst:w-4"})})})]}),ki=o.cva("rst:flex rst:flex-col rst:items-center rst:justify-center rst:text-center rst:p-8 rst:rounded-lg rst:transition-colors",{variants:{variant:{dashed:"rst:border-2 rst:border-dashed rst:border-gray-300 rst:bg-gray-50 rst:hover:bg-gray-100/50 rst:dark:border-gray-700 rst:dark:bg-gray-500/10 rst:dark:hover:bg-gray-500/15",simple:"rst:border-transparent rst:bg-transparent rst:p-0"}},defaultVariants:{variant:"dashed"}}),tm=({title:t,description:e,icon:r,action:s,variant:n,className:a,...i})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(ki({variant:n}),a),...i,children:[r&&o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4 rst:flex rst:h-12 rst:w-12 rst:items-center rst:justify-center rst:rounded-full rst:bg-gray-100 rst:text-gray-400 rst:dark:bg-gray-800 rst:dark:text-gray-500",children:o.jsxRuntimeExports.jsx("div",{className:"rst:h-6 rst:w-6 rst:[&>svg]:h-full rst:[&>svg]:w-full",children:r})}),o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-semibold rst:text-gray-900 rst:dark:text-gray-100",children:t}),e&&o.jsxRuntimeExports.jsx("p",{className:"rst:mt-1 rst:max-w-sm rst:text-sm rst:text-gray-500 rst:dark:text-gray-400",children:e}),s&&o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:s})]}),Ri=o.cva("rst:flex rst:flex-col rst:items-center rst:justify-center rst:text-center rst:p-8 rst:rounded-lg rst:transition-colors",{variants:{variant:{card:"rst:border rst:border-error-200 rst:bg-error-50 rst:text-error-900 rst:dark:border-error-800 rst:dark:bg-error-500/10 rst:dark:text-error-100",page:"rst:bg-transparent rst:text-gray-900 rst:max-w-lg rst:mx-auto rst:py-16 rst:dark:text-gray-100"}},defaultVariants:{variant:"card"}}),em=({title:t="An Error Occurred",description:e,onRetry:r,action:s,icon:n,variant:a,className:i,...l})=>o.jsxRuntimeExports.jsxs("div",{className:N.cn(Ri({variant:a}),i),...l,children:[o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4 rst:flex rst:h-12 rst:w-12 rst:items-center rst:justify-center rst:rounded-full rst:bg-error-100 rst:text-error-600 rst:dark:bg-error-500/15 rst:dark:text-error-400",children:o.jsxRuntimeExports.jsx("div",{className:"rst:h-6 rst:w-6 rst:flex rst:items-center rst:justify-center",children:n||o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"rst:h-full rst:w-full"})})}),o.jsxRuntimeExports.jsx("h3",{className:"rst:text-lg rst:font-bold rst:tracking-tight",children:t}),o.jsxRuntimeExports.jsx("p",{className:N.cn("rst:mt-2 rst:text-sm rst:leading-relaxed",a==="card"?"rst:text-error-800/80 rst:dark:text-error-200/80":"rst:text-gray-500 rst:dark:text-gray-400"),children:e}),o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:s||(r?o.jsxRuntimeExports.jsx(o.Button,{onClick:r,colorScheme:"error",variant:a==="card"?"outline":"solid",children:"Try Again"}):null)})]}),In=o.cva("rst:flex rst:items-center rst:gap-2 rst:transition-all",{variants:{state:{default:"",winner:"",loser:"rst:opacity-50 rst:grayscale",tie:""}},defaultVariants:{state:"default"}}),An=o.cva("rst:h-8 rst:w-8 rst:object-contain rst:transition-all rst:rounded-full",{variants:{state:{default:"",winner:"rst:ring-2 rst:ring-success-500 rst:bg-success-200/25",loser:"",tie:"rst:ring-2 rst:ring-gray-400"}},defaultVariants:{state:"default"}}),ji=f.forwardRef(({awayTeam:t,homeTeam:e,isCompleted:r=!1,isTie:s=!1,className:n,...a},i)=>{const l=d=>r?s?"tie":d.isWinner?"winner":"loser":"default",c=l(t),u=l(e);return o.jsxRuntimeExports.jsxs("button",{ref:i,type:"button",className:N.cn("rst:flex rst:items-center rst:gap-3 rst:rounded-lg rst:p-2 rst:text-left rst:transition rst:hover:bg-gray-100 rst:dark:hover:bg-slate-800",n),...a,children:[o.jsxRuntimeExports.jsxs("div",{className:In({state:c}),children:[o.jsxRuntimeExports.jsx("div",{className:"rst:relative",children:o.jsxRuntimeExports.jsx("img",{src:t.logoSrc,alt:t.name||`Team ${t.id}`,className:An({state:c})})}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-end",children:[t.accessory&&o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:text-sm rst:text-gray-800 rst:dark:text-gray-300",t.isWinner&&"rst:font-bold"),children:t.accessory}),r&&t.score!==void 0&&o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-mono rst:font-semibold rst:text-gray-900 rst:dark:text-white",children:t.score})]})]}),o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-medium rst:text-gray-500 rst:self-center rst:px-1",children:r?"-":"@"}),o.jsxRuntimeExports.jsxs("div",{className:In({state:u}),children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-start",children:[e.accessory&&o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:text-sm rst:text-gray-800 rst:dark:text-gray-300",e.isWinner&&"rst:font-bold"),children:e.accessory}),r&&e.score!==void 0&&o.jsxRuntimeExports.jsx("span",{className:"rst:text-xs rst:font-mono rst:font-semibold rst:text-gray-900 rst:dark:text-white",children:e.score})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:relative",children:o.jsxRuntimeExports.jsx("img",{src:e.logoSrc,alt:e.name||`Team ${e.id}`,className:An({state:u})})})]})]})});ji.displayName="MatchupCard";const Si=o.cva("rst:w-full rst:z-40 rst:shadow-lg rst:backdrop-blur-md rst:transition-all",{variants:{variant:{default:"rst:bg-white/50 rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-950/50 rst:dark:border-gray-800 rst:dark:text-gray-100",soft:"rst:bg-gray-50/50 rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-900/50 rst:dark:border-gray-800 rst:dark:text-gray-100",primary:"rst:bg-primary-700/50 rst:border-primary-800 rst:text-white rst:dark:bg-primary-950/50 rst:dark:border-primary-900 rst:dark:text-primary-50",transparent:"rst:bg-transparent rst:border-transparent rst:text-gray-900 rst:dark:text-gray-100 rst:shadow-none"},position:{top:"rst:sticky rst:top-0 rst:border-b",bottom:"rst:sticky rst:bottom-0 rst:border-t",static:"rst:relative rst:border-y"}},defaultVariants:{variant:"default",position:"top"}}),Ci=f.forwardRef(({title:t,subtitle:e,badge:r,actions:s,children:n,position:a,variant:i,className:l,...c},u)=>o.jsxRuntimeExports.jsx("div",{ref:u,className:N.cn(Si({variant:i,position:a}),l),...c,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:p-4",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:justify-between rst:items-center",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:sm:flex-row rst:sm:items-center rst:gap-x-4 rst:gap-y-2",children:[t&&o.jsxRuntimeExports.jsx("span",{className:"rst:font-semibold rst:text-lg",children:t}),r&&o.jsxRuntimeExports.jsx("div",{className:"rst:max-w-44 rst:sm:max-w-max rst:mr-2",children:r})]}),s&&o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:gap-2",children:s})]}),e&&o.jsxRuntimeExports.jsx("div",{className:"rst:text-sm rst:opacity-80 rst:mt-1 rst:font-medium",children:e}),n&&o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:flex-wrap rst:items-center rst:mt-4 rst:pt-4 rst:border-t rst:border-black/10 rst:dark:border-white/10 rst:gap-y-2",children:n})]})}));Ci.displayName="ActionBar";const rm=864e5,sm=6e4,nm=36e5,Dn=Symbol.for("constructDateFrom");function ee(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Dn in t?t[Dn](e):t instanceof Date?new t.constructor(e):new Date(e)}function ct(t,e){return ee(t,t)}function om(t,e,r){const s=ct(t);return isNaN(e)?ee(t,NaN):(e&&s.setDate(s.getDate()+e),s)}function am(t,e,r){const s=ct(t);if(isNaN(e))return ee(t,NaN);if(!e)return s;const n=s.getDate(),a=ee(t,s.getTime());a.setMonth(s.getMonth()+e+1,0);const i=a.getDate();return n>=i?a:(s.setFullYear(a.getFullYear(),a.getMonth(),n),s)}function ce(t,e,r){const{years:s=0,months:n=0,weeks:a=0,days:i=0,hours:l=0,minutes:c=0,seconds:u=0}=e,d=ct(t),m=n||s?am(d,n+s*12):d,x=i||a?om(m,i+a*7):m,p=c+l*60,h=(u+p*60)*1e3;return ee(t,+x+h)}function Fn(t){const e=ct(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function Vt(t,...e){const r=ee.bind(null,e.find(s=>typeof s=="object"));return e.map(r)}function Mn(t,e){const r=ct(t);return r.setHours(0,0,0,0),r}function im(t,e,r){const[s,n]=Vt(r?.in,t,e),a=Mn(s),i=Mn(n),l=+a-Fn(a),c=+i-Fn(i);return Math.round((l-c)/rm)}function xe(t,e){const r=+ct(t)-+ct(e);return r<0?-1:r>0?1:r}function lm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=s.getFullYear()-n.getFullYear(),i=s.getMonth()-n.getMonth();return a*12+i}function cm(t,e,r){const[s,n]=Vt(r?.in,t,e);return s.getFullYear()-n.getFullYear()}function um(t,e,r){const[s,n]=Vt(r?.in,t,e),a=Ln(s,n),i=Math.abs(im(s,n));s.setDate(s.getDate()-a*i);const l=+(Ln(s,n)===-a),c=a*(i-l);return c===0?0:c}function Ln(t,e){const r=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return r<0?-1:r>0?1:r}function _s(t){return e=>{const s=(t?Math[t]:Math.trunc)(e);return s===0?0:s}}function dm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=(+s-+n)/nm;return _s(r?.roundingMethod)(a)}function Ni(t,e){return+ct(t)-+ct(e)}function fm(t,e,r){const s=Ni(t,e)/sm;return _s(r?.roundingMethod)(s)}function pm(t,e){const r=ct(t);return r.setHours(23,59,59,999),r}function mm(t,e){const r=ct(t),s=r.getMonth();return r.setFullYear(r.getFullYear(),s+1,0),r.setHours(23,59,59,999),r}function xm(t,e){const r=ct(t);return+pm(r)==+mm(r)}function gm(t,e,r){const[s,n,a]=Vt(r?.in,t,t,e),i=xe(n,a),l=Math.abs(lm(n,a));if(l<1)return 0;n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*l);let c=xe(n,a)===-i;xm(s)&&l===1&&xe(s,a)===1&&(c=!1);const u=i*(l-+c);return u===0?0:u}function hm(t,e,r){const s=Ni(t,e)/1e3;return _s(r?.roundingMethod)(s)}function bm(t,e,r){const[s,n]=Vt(r?.in,t,e),a=xe(s,n),i=Math.abs(cm(s,n));s.setFullYear(1584),n.setFullYear(1584);const l=xe(s,n)===-a,c=a*(i-+l);return c===0?0:c}function vm(t,e){const[r,s]=Vt(t,e.start,e.end);return{start:r,end:s}}function ym(t,e){const{start:r,end:s}=vm(e?.in,t),n={},a=bm(s,r);a&&(n.years=a);const i=ce(r,{years:n.years}),l=gm(s,i);l&&(n.months=l);const c=ce(i,{months:n.months}),u=um(s,c);u&&(n.days=u);const d=ce(c,{days:n.days}),m=dm(s,d);m&&(n.hours=m);const x=ce(d,{hours:n.hours}),p=fm(s,x);p&&(n.minutes=p);const g=ce(x,{minutes:n.minutes}),h=hm(s,g);return h&&(n.seconds=h),n}function wm(t,e){return+ct(t)>+ct(e)}const Oi=t=>{const e=t.getTime(),r=f.useCallback(()=>{const l=new Date,c=new Date(e);if(wm(l,c))return{days:0,hours:0,minutes:0,seconds:0,isFinished:!0};const u=ym({start:l,end:c});return{days:u.days??0,hours:u.hours??0,minutes:u.minutes??0,seconds:u.seconds??0,isFinished:!1}},[e]),[s,n]=f.useState(r),[a,i]=f.useState(e);return Object.is(a,e)||(i(e),n(r())),f.useEffect(()=>{if(Number.isNaN(e))return;const l=setInterval(()=>{const c=r();n(c),c.isFinished&&clearInterval(l)},1e3);return()=>clearInterval(l)},[e,r]),s},_n=o.cva("rst:font-semibold rst:uppercase rst:tracking-wider rst:mb-4 rst:transition-colors",{variants:{size:{xs:"rst:text-sm",sm:"rst:text-base",md:"rst:text-lg",lg:"rst:text-xl",xl:"rst:text-2xl"}},defaultVariants:{size:"md"}}),Em=o.cva("rst:font-mono rst:bg-clip-text rst:transition-all",{variants:{variant:{gradient:"rst:text-transparent rst:animate-pulse rst:bg-gradient-to-br rst:from-primary-700 rst:via-accent-600 rst:to-primary-700 rst:dark:from-primary-400 rst:dark:via-accent-300 rst:dark:to-primary-400 rst:drop-shadow-sm rst:dark:drop-shadow-md",primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-900 rst:dark:text-gray-100"},size:{xs:"rst:text-2xl",sm:"rst:text-3xl",md:"rst:text-4xl",lg:"rst:text-5xl",xl:"rst:text-6xl"}},defaultVariants:{variant:"gradient",size:"md"}}),km=o.cva("rst:uppercase rst:tracking-widest rst:mt-1 rst:transition-colors rst:text-gray-500 rst:dark:text-gray-400",{variants:{size:{xs:"rst:text-[10px]",sm:"rst:text-xs",md:"rst:text-xs",lg:"rst:text-sm",xl:"rst:text-sm"}},defaultVariants:{size:"md"}}),Be=({value:t,label:e,size:r,variant:s})=>o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:flex-col rst:items-center",children:[o.jsxRuntimeExports.jsx("span",{className:N.cn(Em({size:r,variant:s})),children:String(t).padStart(2,"0")}),o.jsxRuntimeExports.jsx("span",{className:N.cn(km({size:r})),children:e})]}),Pi=f.forwardRef(({targetDate:t,title:e,size:r,variant:s="gradient",className:n,completionText:a,...i},l)=>{const{days:c,hours:u,minutes:d,seconds:m,isFinished:x}=Oi(t);return x?a?o.jsxRuntimeExports.jsx("div",{ref:l,className:N.cn("rst:font-bold rst:w-full rst:text-center rst:text-gray-900 rst:dark:text-gray-100",n),...i,children:o.jsxRuntimeExports.jsx("h3",{className:N.cn(_n({size:r}),"rst:mb-0"),children:a})}):null:o.jsxRuntimeExports.jsxs("div",{ref:l,className:N.cn("rst:font-bold rst:w-full rst:text-center rst:text-gray-900 rst:dark:text-gray-100",n),...i,children:[e&&o.jsxRuntimeExports.jsx("h3",{className:N.cn(_n({size:r})),children:e}),o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:justify-center rst:gap-4 rst:sm:gap-6 rst:md:gap-8",children:[o.jsxRuntimeExports.jsx(Be,{value:c,label:"Days",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:u,label:"Hours",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:d,label:"Minutes",size:r,variant:s}),o.jsxRuntimeExports.jsx(Be,{value:m,label:"Seconds",size:r,variant:s})]})]})});Pi.displayName="Countdown";const Rm=o.cva("rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:shadow-xl rst:transition-all rst:border",{variants:{size:{xs:"rst:max-w-xs",sm:"rst:max-w-sm",md:"rst:max-w-md",lg:"rst:max-w-lg",xl:"rst:max-w-xl","2xl":"rst:max-w-2xl","3xl":"rst:max-w-3xl",full:"rst:max-w-[95vw] rst:m-4"},variant:{white:"rst:bg-white rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900",glass:"rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white rst:shadow-2xl rst:dark:shadow-black/50"},status:{default:"",destructive:"rst:border-t-4 rst:border-t-error-500",success:"rst:border-t-4 rst:border-t-success-500"}},defaultVariants:{size:"md",variant:"white",status:"default"}}),jm=o.cva("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"),Sm=o.cva("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"),Cm=o.cva("rst:inline-flex rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-50 rst:hover:opacity-100 rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:focus:ring-offset-2 rst:transition-opacity"),Nm=({isOpen:t,onClose:e,title:r,description:s,size:n,variant:a,status:i,children:l,className:c})=>o.jsxRuntimeExports.jsx(Jt,{appear:!0,show:t,as:f.Fragment,children:o.jsxRuntimeExports.jsxs(Zu,{as:"div",className:"rst:relative rst:z-50",onClose:e,children:[o.jsxRuntimeExports.jsx(ye,{as:f.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0",enterTo:"rst:opacity-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:o.jsxRuntimeExports.jsx(Qu,{className:N.cn("rst:fixed rst:inset-0 rst:transition-opacity",a==="glass"?"rst:bg-slate-900/40 rst:dark:bg-black/60":"rst:bg-slate-900/60 rst:dark:bg-black/80 rst:backdrop-blur-sm")})}),o.jsxRuntimeExports.jsx("div",{className:"rst:fixed rst:inset-0 rst:overflow-y-auto",children:o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:min-h-full rst:items-center rst:justify-center rst:p-4 rst:text-center",children:o.jsxRuntimeExports.jsx(ye,{as:f.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsxs(Xo,{className:N.cn(Rm({size:n,variant:a,status:i}),c),children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-start rst:justify-between",children:[o.jsxRuntimeExports.jsxs("div",{children:[o.jsxRuntimeExports.jsx(Qo,{as:"h2",className:N.cn(jm()),children:r}),s&&o.jsxRuntimeExports.jsx("p",{className:N.cn(Sm()),children:s})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:ml-4 rst:flex rst:shrink-0",children:o.jsxRuntimeExports.jsx("button",{type:"button",onClick:e,className:N.cn(Cm()),"aria-label":"Close dialog",children:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-5 rst:w-5"})})})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:mt-6",children:l})]})})})})]})}),Om=o.cva("rst:w-full rst:py-6 rst:mt-auto rst:transition-colors rst:duration-200",{variants:{variant:{default:"rst:bg-[var(--roster-footer-bg)] rst:text-[var(--roster-footer-text)] rst:border-t rst:border-[var(--roster-footer-border)]",primary:"rst:bg-primary-900 rst:text-primary-200 rst:dark:bg-primary-950 rst:dark:text-primary-400",transparent:"rst:bg-transparent rst:text-gray-500 rst:dark:text-gray-400"}},defaultVariants:{variant:"default"}}),$i=f.forwardRef(({className:t,variant:e,companyName:r="Ball Collaborative",links:s,routerElement:n,...a},i)=>{const l=new Date().getFullYear(),c=n??"a";return o.jsxRuntimeExports.jsx("footer",{ref:i,className:N.cn(Om({variant:e}),t),...a,children:o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:px-4 rst:flex rst:flex-col rst:items-center rst:gap-2",children:[s&&s.length>0&&o.jsxRuntimeExports.jsx("nav",{"aria-label":"Footer navigation",className:"rst:flex rst:flex-wrap rst:justify-center rst:gap-x-5 rst:gap-y-1",children:s.map(u=>o.jsxRuntimeExports.jsx(c,{href:u.href,to:u.href,className:"rst:text-sm rst:text-inherit rst:opacity-70 rst:hover:opacity-100 rst:transition-opacity",children:u.label},u.href))}),o.jsxRuntimeExports.jsxs("p",{className:"rst:text-center rst:text-sm rst:font-medium rst:text-inherit",children:["© ",l," ",r,", All rights reserved."]})]})})});$i.displayName="Footer";const Ti=o.cva("rst:w-full rst:z-30 rst:border-b rst:transition-colors rst:duration-200",{variants:{variant:{default:"rst:bg-[var(--roster-nav-bg)] rst:border-[var(--roster-nav-border)] rst:text-[var(--roster-nav-text)]",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900",white:"rst:bg-white rst:border-gray-200 rst:text-gray-900 rst:dark:bg-gray-600 rst:dark:border-gray-700 rst:dark:text-gray-100",transparent:"rst:bg-transparent rst:border-transparent rst:text-gray-900 rst:dark:text-white"},position:{fixed:"rst:fixed rst:top-0 rst:left-0 rst:right-0",sticky:"rst:sticky rst:top-0",static:"rst:static"}},defaultVariants:{variant:"default",position:"sticky"}}),Vn=(t,e)=>typeof t=="function"?t({close:e}):t;function Pm(t){return f.useSyncExternalStore(e=>{if(!t||typeof document>"u")return()=>{};const r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},()=>t&&document.documentElement.classList.contains("dark"),()=>!1)}function $m({close:t}){return f.useEffect(()=>{const e=r=>{const s=document.querySelector("[data-roster-mobile-panel]"),n=document.querySelector("[data-roster-hamburger]"),a=r.target;!s?.contains(a)&&!n?.contains(a)&&t()};return document.addEventListener("pointerdown",e,{capture:!0}),()=>document.removeEventListener("pointerdown",e,{capture:!0})},[t]),null}function Tm({activePath:t,close:e}){const r=f.useRef(t);return f.useEffect(()=>{r.current!==t&&(r.current=t,e())},[t,e]),null}const Im=({logoSrc:t,logoSize:e="2rem",logoClassName:r,brandName:s,items:n,activePath:a,routerElement:i,user:l,onLogin:c,onLogout:u,onInboxClick:d,onThemeToggle:m,actions:x,brandElement:p,navActions:g,userMenuItems:h=[],className:b,variant:v="default",position:E="sticky",themeMode:y,notificationVariant:k="error",notificationFill:R="solid",...O})=>{const S=(l?.notificationCount||0)>0,F=typeof e=="number"?`${e}px`:e,B={width:F,height:F},j=Pm(y==="auto"),M=(y==="auto"?j?"dark":"light":y??(v==="white"||v==="default"?"light":"dark"))==="dark",L=v==="slate"||v==="primary"||v==="default"&&M||v==="white"&&M||v==="transparent"&&M,$={brand:L?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:L?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:L?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:L?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"};return o.jsxRuntimeExports.jsx(xa,{as:"nav",className:N.cn("rst:z-50",Ti({variant:v,position:E}),b),...O,children:({open:A,close:D})=>{const z=Vn(x,D),C=Vn(g,D);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[o.jsxRuntimeExports.jsxs(Ht,{as:i,href:"/",to:"/",variant:"neutral",underline:"none",className:N.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",$.brand),children:[o.jsxRuntimeExports.jsx("img",{src:t,alt:`${s} Logo`,style:B,className:N.cn("rst:shrink-0",r??"rst:rounded-md")}),p??o.jsxRuntimeExports.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:s})]}),o.jsxRuntimeExports.jsxs("div",{className:"rst:hidden rst:md:flex rst:items-center rst:gap-8",children:[o.jsxRuntimeExports.jsx("div",{className:"rst:flex rst:items-center rst:gap-6",children:n.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,variant:"neutral",underline:"none",className:N.cn("rst:inline-flex rst:items-center rst:gap-1.5 rst:text-sm rst:transition-colors rst:duration-200",V?$.linkActive:$.linkBase),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]},P.path)})}),C,z??(l?o.jsxRuntimeExports.jsxs(Kd,{as:"div",className:"rst:relative rst:ml-2",children:[o.jsxRuntimeExports.jsxs(ua,{className:"rst:relative rst:flex rst:rounded-full rst:text-sm rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-primary-500 rst:focus:ring-offset-2 rst:ring-offset-transparent",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Open user menu"}),o.jsxRuntimeExports.jsx(Er,{initials:l.initials,src:l.avatarSrc,size:"sm",shape:"circle",colorScheme:l.avatarColor??"primary"}),S&&o.jsxRuntimeExports.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:o.jsxRuntimeExports.jsx(Qe,{fill:R,size:"xs",statusBadge:!0,variant:k,children:l.notificationCount})})]}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,enter:"rst:transition rst:ease-out rst:duration-100",enterFrom:"rst:transform rst:opacity-0 rst:scale-95",enterTo:"rst:transform rst:opacity-100 rst:scale-100",leave:"rst:transition rst:ease-in rst:duration-75",leaveFrom:"rst:transform rst:opacity-100 rst:scale-100",leaveTo:"rst:transform rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsxs(da,{className:"rst:absolute rst:right-0 rst:z-50 rst:mt-2 rst:w-48 rst:origin-top-right rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-white/10 rst:focus:outline-none rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:py-1",children:[S&&d&&o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsxs(o.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:d,className:N.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:["Inbox (",l.notificationCount,")"]})}),m&&o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsxs("div",{onClick:V=>{V.preventDefault(),m()},role:"button",tabIndex:0,className:N.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:cursor-pointer rst:transition-colors",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),onKeyDown:V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),m())},children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-2",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faMoon,className:N.cn("rst:w-4 rst:transition-colors",M?"rst:text-amber-500":"rst:text-gray-400")}),o.jsxRuntimeExports.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),o.jsxRuntimeExports.jsx(Ur,{checked:M,onChange:()=>{},size:"xs",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]})})]}),h.length>0&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-1",children:h.map(P=>o.jsxRuntimeExports.jsx(fe,{children:({focus:V})=>o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,variant:"neutral",underline:"none",className:N.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:gap-2 rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:transition-colors",V&&"rst:bg-gray-50 rst:dark:bg-gray-700"),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]})},P.path))}),u&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-1",children:o.jsxRuntimeExports.jsx(fe,{children:({focus:P})=>o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:u,className:N.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",P&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:"Log Out"})})})]})})]}):o.jsxRuntimeExports.jsx(o.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:c,children:"Log In"}))]}),o.jsxRuntimeExports.jsx("div",{"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:o.jsxRuntimeExports.jsxs(Xe,{className:N.cn("rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:focus:outline-none rst:focus:ring-2 rst:focus:ring-inset rst:focus:ring-primary-500",$.hamburger),children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Open main menu"}),A?o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}):o.jsxRuntimeExports.jsxs("div",{className:"rst:relative",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),S&&o.jsxRuntimeExports.jsx("span",{className:"rst:absolute rst:top-0 rst:right-0 rst:block rst:h-2.5 rst:w-2.5 rst:rounded-full rst:bg-error-500 rst:ring-2 rst:ring-transparent rst:transform rst:translate-x-1/4 rst:-translate-y-1/4"})]})]})})]}),A&&o.jsxRuntimeExports.jsx($m,{close:D}),A&&o.jsxRuntimeExports.jsx(Tm,{activePath:a,close:D}),o.jsxRuntimeExports.jsx(Jt,{as:f.Fragment,enter:"rst:duration-200 rst:ease-out",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:duration-100 rst:ease-in",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:o.jsxRuntimeExports.jsx($s,{focus:!0,className:"rst:absolute rst:top-0 rst:inset-x-0 rst:z-50 rst:origin-top-right rst:transform rst:p-2 rst:transition rst:md:hidden",children:o.jsxRuntimeExports.jsxs("div",{"data-roster-mobile-panel":!0,className:"rst:rounded-lg rst:shadow-lg rst:ring-1 rst:ring-black/5 rst:dark:ring-white/10 rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700 rst:bg-white rst:dark:bg-gray-800",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:px-5 rst:pt-5 rst:pb-6",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:justify-between",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3",children:[o.jsxRuntimeExports.jsx("img",{src:t,alt:s,style:B,className:N.cn("rst:shrink-0",r??"rst:rounded-md")}),p??o.jsxRuntimeExports.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:s})]}),o.jsxRuntimeExports.jsx("div",{className:"rst:-mr-2",children:o.jsxRuntimeExports.jsxs(Xe,{className:"rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:text-gray-400 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-700 rst:hover:text-gray-500 rst:dark:hover:text-white rst:focus:outline-none",children:[o.jsxRuntimeExports.jsx("span",{className:"rst:sr-only",children:"Close menu"}),o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),o.jsxRuntimeExports.jsxs("div",{className:"rst:mt-6",children:[C&&o.jsxRuntimeExports.jsx("div",{className:"rst:mb-4",children:C}),o.jsxRuntimeExports.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[n.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsx(Ht,{as:i,href:P.path,to:P.path,onClick:()=>D(),variant:"neutral",underline:"none",className:N.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",V?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:o.jsxRuntimeExports.jsxs("span",{className:N.cn("rst:ml-3 rst:inline-flex rst:items-center rst:gap-1.5 rst:text-base rst:font-medium",V?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[P.label,P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:inline-flex",children:P.badge})]})},P.path)}),l&&h.length>0&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),h.map(P=>{const V=a===P.path;return o.jsxRuntimeExports.jsxs(Ht,{as:i,href:P.path,to:P.path,onClick:()=>D(),variant:"neutral",underline:"none",className:N.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",V?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:[o.jsxRuntimeExports.jsx("span",{className:N.cn("rst:ml-3 rst:text-base rst:font-medium",V?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:P.label}),P.badge&&o.jsxRuntimeExports.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:P.badge})]},P.path)})]})]})]})]}),(l||z||c)&&o.jsxRuntimeExports.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:z||(!l&&c?o.jsxRuntimeExports.jsx(o.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{c(),D()},children:"Log In"}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[S&&d&&o.jsxRuntimeExports.jsx(o.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{d?.(),D()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:o.jsxRuntimeExports.jsx(Qe,{fill:R,size:"xs",statusBadge:!0,variant:k,children:l?.notificationCount}),children:"Pending Invitations"}),m&&o.jsxRuntimeExports.jsxs("div",{onClick:P=>{P.preventDefault(),m()},role:"button",tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),m())},className:"rst:flex rst:w-full rst:items-center rst:justify-between rst:rounded-md rst:px-4 rst:py-2 rst:text-base rst:transition-colors rst:cursor-pointer rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",children:[o.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3 rst:font-medium",children:[o.jsxRuntimeExports.jsx(o.FontAwesomeIcon,{icon:o.faMoon,className:N.cn("rst:w-5 rst:transition-colors",M?"rst:text-amber-500":"rst:text-gray-400")}),o.jsxRuntimeExports.jsx("span",{children:"Dark Mode"})]}),o.jsxRuntimeExports.jsx(Ur,{checked:M,onChange:()=>{},size:"sm",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]}),u&&o.jsxRuntimeExports.jsx(o.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{u?.(),D()},children:"Log Out"})]}))})]})})})]})}})},Am={timeout:1500,ignoreCase:!0,preventDefault:!1,enabled:!0,ignoreWhenTyping:!0},Dm=["ArrowUp","ArrowUp","ArrowDown","ArrowDown","ArrowLeft","ArrowRight","ArrowLeft","ArrowRight","b","a","Enter"];function Fm(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.getAttribute("contenteditable");return e!==null&&e!=="false"?!0:["INPUT","TEXTAREA","SELECT"].includes(t.tagName)}function Mm(t,e,r={}){const{timeout:s,ignoreCase:n,preventDefault:a,enabled:i,ignoreWhenTyping:l}={...Am,...r},c=f.useRef(0),u=f.useRef(0),d=f.useRef(e);f.useEffect(()=>{d.current=e},[e]),f.useEffect(()=>{if(!i||t.length===0)return;const m=g=>n?g.toLowerCase():g,x=t.map(m);function p(g){if(l&&Fm(g.target))return;const h=Date.now();s>0&&c.current>0&&h-u.current>s&&(c.current=0),u.current=h;const b=m(g.key);if(b===x[c.current]){a&&g.preventDefault(),c.current+=1,c.current===x.length&&(c.current=0,d.current());return}c.current=b===x[0]?1:0}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[t,s,n,a,i,l])}exports.Button=o.Button;exports.Spinner=o.Spinner;exports.Table=o.Table;exports.TableBody=o.TableBody;exports.TableCaption=o.TableCaption;exports.TableCell=o.TableCell;exports.TableFooter=o.TableFooter;exports.TableHead=o.TableHead;exports.TableHeader=o.TableHeader;exports.TableRow=o.TableRow;exports.buttonVariants=o.buttonVariants;exports.tableCellVariants=o.tableCellVariants;exports.tableHeadVariants=o.tableHeadVariants;exports.tableHeaderVariants=o.tableHeaderVariants;exports.tableRowVariants=o.tableRowVariants;exports.tableVariants=o.tableVariants;exports.tableWrapperVariants=o.tableWrapperVariants;exports.cn=N.cn;exports.Accordion=Qp;exports.ActionBar=Ci;exports.Alert=hi;exports.Avatar=Er;exports.AvatarStrip=If;exports.Badge=Qe;exports.Breadcrumbs=Zp;exports.CallToAction=Jp;exports.Card=va;exports.Checkbox=wa;exports.CollapsibleSection=Gp;exports.Countdown=Pi;exports.DescriptionList=vi;exports.Dialog=Nm;exports.Disclosure=Ra;exports.EmptyState=tm;exports.ErrorState=em;exports.Eyebrow=we;exports.Footer=$i;exports.InlineCode=Ta;exports.Input=Is;exports.KONAMI_CODE=Dm;exports.LabeledDivider=Ia;exports.Link=Ht;exports.LiquidTabs=Af;exports.MatchupCard=ji;exports.Navbar=Im;exports.PasswordInput=Ca;exports.Pill=Oa;exports.Pullquote=wi;exports.SegmentBar=qp;exports.Select=Tf;exports.Stat=Da;exports.Switch=Ur;exports.Textarea=Ba;exports.ThemeToggle=Fa;exports.Tooltip=Up;exports.actionBarVariants=Si;exports.alertVariants=gi;exports.avatarVariants=ga;exports.badgeVariants=ha;exports.breadcrumbVariants=Xr;exports.cardVariants=ba;exports.checkboxVariants=ya;exports.ctaVariants=Ei;exports.descriptionListVariants=bi;exports.disclosureContentVariants=ka;exports.disclosureTriggerVariants=Ea;exports.emptyStateVariants=ki;exports.errorStateVariants=Ri;exports.eyebrowVariants=Pa;exports.iconVariants=zr;exports.inlineCodeVariants=$a;exports.inputVariants=ja;exports.linkVariants=Sa;exports.navbarVariants=Ti;exports.pillDotVariants=Wr;exports.pillVariants=Na;exports.pullquoteVariants=yi;exports.selectTriggerVariants=Ma;exports.statValueVariants=Aa;exports.switchThumbVariants=_a;exports.switchTrackVariants=La;exports.textareaVariants=Va;exports.useCountdown=Oi;exports.useKeySequence=Mm;