1var Iu=Object.defineProperty;var ku=(e,t,n)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>ku(e,typeof t!="symbol"?t+"":t,n);import{R as Ou,a as i,r as zc}from"./vendor-i18n-sy9iWhVg.js";import{r as Nt}from"./vendor-react-4Jd9JRpY.js";import{j as he}from"./vendor-motion-Cmjqmfre.js";function er(){return typeof window<"u"}function mt(e){return bs(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zt(e){var t;return(t=(bs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bs(e){return er()?e instanceof Node||e instanceof Ge(e).Node:!1}function je(e){return er()?e instanceof Element||e instanceof Ge(e).Element:!1}function Ze(e){return er()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function An(e){return!er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}function eo(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Au(e){return/^(table|td|th)$/.test(mt(e))}function tr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Du=/transform|translate|scale|rotate|perspective|filter/,Nu=/paint|layout|strict|content/,hn=e=>!!e&&e!=="none";let Ir;function vs(e){const t=je(e)?Rt(e):e;return hn(t.transform)||hn(t.translate)||hn(t.scale)||hn(t.rotate)||hn(t.perspective)||!xs()&&(hn(t.backdropFilter)||hn(t.filter))||Du.test(t.willChange||"")||Nu.test(t.contain||"")}function Fu(e){let t=Ft(e);for(;Ze(t)&&!Dt(t);){if(vs(t))return t;if(tr(t))return null;t=Ft(t)}return null}function xs(){return Ir==null&&(Ir=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ir}function Dt(e){return/^(html|body|#document)$/.test(mt(e))}function Rt(e){return Ge(e).getComputedStyle(e)}function nr(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(mt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||An(e)&&e.host||Zt(e);return An(t)?t.host:t}function Yc(e){const t=Ft(e);return Dt(t)?(e.ownerDocument||e).body:Ze(t)&&eo(t)?t:Yc(t)}function Kn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Yc(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),c=Ge(r);if(s){const a=Kr(c);return t.concat(c,c.visualViewport||[],eo(r)?r:[],a&&n?Kn(a):[])}else return t.concat(r,Kn(r,[],n))}function Kr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Rs={...Ou},xi={};function ut(e,t){const n=i.useRef(xi);return n.current===xi&&(n.current=e(t)),n}const kr=Rs.useInsertionEffect,Lu=kr&&kr!==Rs.useLayoutEffect?kr:e=>e();function te(e){const t=ut(Vu).current;return t.next=e,Lu(t.effect),t.trampoline}function Vu(){const e={next:void 0,callback:_u,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function _u(){}const Hu=()=>{},fe=typeof document<"u"?i.useLayoutEffect:Hu;function Gr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ss={};function bt(e,t,n,o,r){if(!n&&!o&&!r&&!e)return Fo(t);let s=Fo(e);return t&&(s=jn(s,t)),n&&(s=jn(s,n)),o&&(s=jn(s,o)),r&&(s=jn(s,r)),s}function Bu(e){if(e.length===0)return Ss;if(e.length===1)return Fo(e[0]);let t=Fo(e[0]);for(let n=1;n<e.length;n+=1)t=jn(t,e[n]);return t}function Fo(e){return ws(e)?{...Xc(e,Ss)}:$u(e)}function jn(e,t){return ws(t)?Xc(t,e):ju(e,t)}function $u(e){const t={...e};for(const n in t){const o=t[n];qc(n,o)&&(t[n]=Kc(o))}return t}function ju(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=Gr(e.style,o);break}case"className":{e[n]=Gc(e.className,o);break}default:qc(n,o)?e[n]=Uu(e[n],o):e[n]=o}}return e}function qc(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ws(e){return typeof e=="function"}function Xc(e,t){return ws(e)?e(t):e??Ss}function Uu(e,t){return t?e?(...n)=>{const o=n[0];if(Zc(o)){const s=o;Lo(s);const c=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),c}const r=t(...n);return e==null||e(...n),r}:Kc(t):e}function Kc(e){return e&&((...t)=>{const n=t[0];return Zc(n)&&Lo(n),e(...t)})}function Lo(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Gc(e,t){return t?e?t+" "+e:t:e}function Zc(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Wu(e,t){return function(o,...r){const s=new URL(e);
1return s.searchParams.set("code",o.toString()),r.forEach(c=>s.searchParams.append("args[]",c)),`${t} error #${o}; visit ${s} for the full message.`}}const nt=Wu("https://base-ui.com/production-error","Base UI"),Jc=i.createContext(void 0);function or(e=!1){const t=i.useContext(Jc);if(t===void 0&&!e)throw new Error(nt(16));return t}function zu(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:s}=e,c=o&&t!==!1,a=o&&t===!1;return{props:i.useMemo(()=>{const f={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return o||(f.tabIndex=r,!s&&n&&(f.tabIndex=t?r:-1)),(s&&(t||c)||!s&&n)&&(f["aria-disabled"]=n),s&&(!t||a)&&(f.disabled=n),f},[o,n,t,c,a,s,r])}}function $e(e){return(e==null?void 0:e.ownerDocument)||document}function Tn(e,t,{detail:n=0}={}){e.dispatchEvent(new(Ge(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function _t(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0,composite:s}=e,c=i.useRef(null),a=or(!0),l=s??a!==void 0,{props:f}=zu({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:o,isNativeButton:r}),u=i.useCallback(()=>{const g=c.current;Or(g)&&l&&t&&f.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,f.disabled,l]);fe(u,[u]);const p=i.useCallback((g={})=>{const{onClick:d,onMouseDown:y,onKeyUp:v,onKeyDown:m,onPointerDown:b,...R}=g;return bt({onClick(S){if(t){S.preventDefault();return}d==null||d(S)},onMouseDown(S){t||y==null||y(S)},onKeyDown(S){if(t||(Lo(S),m==null||m(S),S.baseUIHandlerPrevented))return;const x=S.target===S.currentTarget,C=S.currentTarget,w=Or(C),E=!r&&Yu(C),I=x&&(r?w:!E),A=S.key==="Enter",T=S.key===" ",M=C.getAttribute("role"),P=(M==null?void 0:M.startsWith("menuitem"))||M==="option"||M==="gridcell";if(x&&l&&T){if(S.defaultPrevented&&P)return;S.preventDefault(),(!r||w)&&(S.preventBaseUIHandler(),Tn(C,S));return}if(!I||r||!T&&!A){x&&E&&T&&S.preventDefault();return}S.defaultPrevented||(S.preventDefault(),A&&(S.preventBaseUIHandler(),Tn(C,S)))},onKeyUp(S){if(!t){if(Lo(S),v==null||v(S),S.target===S.currentTarget&&r&&l&&Or(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!r&&!l&&!S.defaultPrevented&&S.key===" "&&(S.preventBaseUIHandler(),Tn(S.currentTarget,S))}},onPointerDown(S){if(t){S.preventDefault();return}b==null||b(S)}},r?{type:"button"}:{role:"button"},f,R)},[t,f,l,r]),h=te(g=>{c.current=g,u()});return{getButtonProps:p,buttonRef:h}}function Or(e){return Ze(e)&&e.tagName==="BUTTON"}function Yu(e){return Ze(e)&&e.tagName==="A"&&!!e.href}function Tt(e,t,n,o){const r=ut(Qc).current;return Xu(r,e,t,n,o)&&ea(r,[e,t,n,o]),r.callback}function qu(e){const t=ut(Qc).current;return Ku(t,e)&&ea(t,e),t.callback}function Qc(){return{callback:null,cleanup:null,refs:[]}}function Xu(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Ku(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function ea(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const c=s(n);typeof c=="function"&&(o[r]=c);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const c=o[r];typeof c=="function"?c():s(null);break}case"object":{s.current=null;break}}}}}}}const Gu=parseInt(i.version,10);function Cs(e){return Gu>=e}function Ri(e){if(!i.isValidElement(e))return null;const t=e,n=t.props;return(Cs(19)?n==null?void 0:n.ref:t.ref)??null}function ct(){}const Mt=Object.freeze([]),Je=Object.freeze({});function Zu(e,t){const n={};for(const o in e){const r=e[o];if(t!=null&&t.hasOwnProperty(o)){const s=t[o](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Ju(e,t){return typeof e=="function"?e(t):e}function ta(e,t){return typeof e=="function"?e(t):e}function Ne(e,t,n={}){let o=t.render;n.enabled!==!1&&(o=nf(o));const r=Qu(t,n,o);if(n.enabled===!1)return null;const s=n.state??Je;return of(e,o,r,s)}function Qu(e,t,n){const{className:o,style:r}=e,{state:s=Je,ref:c,props:a,stateAttributesMapping:l,enabled:f=!0}=t,u=f?Ju(o,s):void 0,p=f?ta(r,s):void 0,h=f?Zu(s,l):Je,g=f&&a?ef(a):void 0,d=f?Gr(h,g)??{}:Je;return typeof document<"u"&&(f?Array.isArray(c)?d.ref=qu([d.ref,Ri(n),...c]):d.ref=Tt(d.ref,Ri(n),c):Tt(null,null)),f?(u!==void 0&&(d.className=Gc(d.className,u)),p!==void 0&&(d.style=Gr(d.style,p)),d):Je}function ef(e){return Array.isArray(e)?Bu(e):bt(void 0,e)}const tf=Symbol.for("react.lazy");function nf(e){if((e==null?void 0:e.$$typeof)!==tf)return e;const t=i.Children.toArray(e)[0];return i.isValidElement(t)?t:e}function of(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=bt(n,t.props);return r.ref=n.ref,i.cloneElement(t,r)}if(e&&typeof e=="string")return rf(e,n);throw new Error(nt(8))}function rf(e,t){return e==="button"?i.createElement("button",{type:"button",...t,key:t.key}):e==="img"?i.createElement("img",{alt:"",...t,key:t.key}):i.createElement(e,t)}const r0=i.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,focusableWhenDisabled:c=!1,nativeButton:a=!0,style:l,...f}=t,{getButtonProps:u,buttonRef:p}=_t({disabled:s,focusableWhenDisabled:c,native:a});return Ne("button",t,{state:{disabled:s},ref:[n,p],props:[f,u]})});function s0(e){return Ne(e.defaultTagName??"div",e,e)}const na=i.createContext(void 0);function Ct(e){const t=i.useContext(na);if(!e&&t===void 0)throw new Error(nt(27));return t}const Es="data-starting-style",Zr="data-ending-style",sf={[Es]:""},cf={[Zr]:""},Jt={transitionStatus(e){return e==="starting"?sf:e==="ending"?cf:null}},af="data-open",lf="data-closed",uf="data-anchor-hidden",oa="data-popup-open",ff
vendor: 2,350 bytes, line 1
1="data-pressed",df={[oa]:""},pf={[oa]:"",[ff]:""},gf={[af]:""},hf={[lf]:""},mf={[uf]:""},ra={open(e){return e?df:null}},Vo={open(e){return e?pf:null}},to={open(e){return e?gf:hf},anchorHidden(e){return e?mf:null}},no={...to,...Jt},i0=i.forwardRef(function(t,n){const{render:o,className:r,style:s,forceRender:c=!1,...a}=t,l=Ct(),f=l.useState("open"),u=l.useState("nested"),p=l.useState("mounted"),h=l.useState("transitionStatus");return Ne("div",t,{state:{open:f,transitionStatus:h},ref:[l.context.backdropRef,n],stateAttributesMapping:no,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:c||!u})}),vt="none",un="trigger-press",gt="trigger-hover",Mn="trigger-focus",rr="outside-press",zn="item-press",yf="close-press",Si="track-press",bf="input-change",mn="focus-out",sr="escape-key",vf="close-watcher",Jr="list-navigation",xf="keyboard",Rf="drag",Ps="cancel-open",Un="sibling-open",sa="disabled",wi="missing",Ci="initial",Ts="imperative-action",uo="swipe",Sf="window-resize";function Oe(e,t,n,o){let r=!1,s=!1;const c=o??Je;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...c}}function Ms(e,t,n){const o=Je;return{reason:e,event:t??new Event("base-ui"),...o}}const wf=i.forwardRef(function(t,n){const{render:o,className:r,style:s,disabled:c=!1,nativeButton:a=!0,...l}=t,f=Ct(),u=f.useState("open"),{getButtonProps:p,buttonRef:h}=_t({disabled:c,native:a}),g={disabled:c};function d(y){u&&f.setOpen(!1,Oe(yf,y.nativeEvent))}return Ne("button",t,{state:g,ref:[n,h],props:[{onClick:d},l,p]})});let Ei=0;function Cf(e,t="mui"){const[n,o]=i.useState(e),r=e||n;return i.useEffect(()=>{n==null&&(Ei+=1,o(`${t}-${Ei}`))},[n,t]),r}const Pi=Rs.useId;function sn(e,t){if(Pi!==void 0){const n=Pi();return e??(t?`${t}-${n}`:n)}return Cf(e,t)}function dt(e){return sn(e,"base-ui")}const c0=i.forwardRef(function(t,n){const{render:o,className:r,style:s,id:c,...a}=t,l=Ct(),f=dt(c);return l.useSyncedValueWithCleanup("descriptionElementId",f),Ne("p",t,{ref:n,props:[{id:f},a]})});function Is(e){i.useEffect(e,Mt)}const Hn=0;class Lt{constructor(){Qe(this,"currentId",Hn);Qe(this,"clear",()=>{this.currentId!==Hn&&(clearTimeout(this.currentId),this.currentId=Hn)});Qe(this,"disposeEffect",()=>this.clear)}
1static create(){return new Lt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Hn,n()},t)}isStarted(){return this.currentId!==Hn}}function lt(){const e=ut(Lt.create).current;return Is(e.disposeEffect),e}function Ef(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Pf,platform:Tf,maxTouchPoints:Mf}=Ef(),ir=Pf.toLowerCase(),Gn=Tf.toLowerCase(),cr=/^i(os$|p)/.test(Gn)||Gn==="macintel"&&Mf>1,Ti="android",_o=Gn===Ti||ir.includes(Ti),ks=!cr&&Gn.startsWith("mac");Gn.startsWith("win");const If=ks||cr;var Wc;const Qt=typeof CSS<"u"&&!!((Wc=CSS.supports)!=null&&Wc.call(CSS,"-webkit-backdrop-filter:none"));!Qt&&ir.includes("firefox");!Qt&&ir.includes("chrom");const kf=If,Os=/jsdom|happydom/.test(ir);function Ot(e){e.preventDefault(),e.stopPropagation()}function Of(e){return"nativeEvent"in e}function ar(e){return e.pointerType===""&&e.isTrusted?!0:_o&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function As(e){return Os?!1:!_o&&e.width===0&&e.height===0||_o&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function rn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Af(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function pt(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function Te(e,t){var o;if(!e||!t)return!1;const n=(o=t.getRootNode)==null?void 0:o.call(t);if(e.contains(t))return!0;if(n&&An(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function st(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Qr="data-base-ui-focusable",ia="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",lr="ArrowLeft",ur="ArrowRight",ca="ArrowUp",Ds="ArrowDown",es="data-trigger-disabled";function Ho(e,t){if(!je(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute(es);for(const[,o]of t.entries())if(Te(o,n))return!o.hasAttribute(es);return!1}function Ar(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Df(e){return e.matches("html,body")}function fr(e){return Ze(e)&&e.matches(ia)}function Nf(e){return(e==null?void 0:e.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ia}`))!=null}function ts(e){return e?e.getAttribute("role")==="combobox"&&fr(e):!1}function aa(e){if(!e||Os)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Bo(e){return e?e.hasAttribute(Qr)?e:e.querySelector(`[${Qr}]`)||e:null}function Ff(e,t){return t!=null&&!rn(t)?0:typeof e=="function"?e():e}function yn(e,t,n){const o=Ff(e,n);return typeof o=="number"?o:o==null?void 0:o[t]}function Mi(e){return typeof e=="function"?e():e}function la(e,t){return t||e==="click"||e==="mousedown"}function Lf(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const ua=i.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Lt,currentIdRef:{current:null},currentContextRef:{current:null}});function Vf(e,t){e.current=t.current}function _f(e){const{children:t,delay:n,timeoutMs:o=0}=e,r=i.useRef(n),s=i.useRef(n),c=i.useRef(null),a=i.useRef(null),l=lt();return fe(()=>{if(s.current=n,!c.current){r.current=n;return}r.current={open:yn(r.current,"open"),close:yn(n,"close")}},[n,c,r,s]),he.jsx(ua.Provider,{value:i.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:s,currentIdRef:c,timeoutMs:o,currentContextRef:a,timeout:l}),[o,l]),children:t})}function Hf(e,t={open:!1}){const{open:n}=t,o="rootStore"in e?e.rootStore:e,r=o.useState("floatingId"),s=i.useContext(ua),{currentIdRef:c,delayRef:a,timeoutMs:l,initialDelayRef:f,currentContextRef:u,hasProvider:p,timeout:h}=s,[g,d]=i.useState(!1),y=i.useRef(n);return fe(()=>{y.current=n},[n]),fe(()=>{function v(){var m;(m=u.current)==null||m.setIsInstantPhase(!1),c.current=null,u.current=null,a.current=f.current,h.clear()}if(c.current&&!n&&c.current===r){if(d(!1),l){const m=r;return h.start(l,()=>{o.select("open")||c.current&&c.current!==m||v()}),()=>{(y.current||c.current!==m)&&h.clear()}}v()}},[n,r,c,a,l,f,u,h,o]),fe(()=>{if(!n)return;const v=u.current,m=c.current;h.clear(),u.current={onOpenChange:o.setOpen,setIsInstantPhase:d},c.current=r,a.current={open:0,close:yn(f.current,"close")},m!==null&&m!==r?(d(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,Oe(vt))):(d(!1),v==null||v.setIsInstantPhase(!1))},[n,r,o,c,a,f,u,h]),fe(()=>()=>{if(c.current===r){if(u.current=null,!y.current)return;c.current=null,Vf(a,f),h.clear()}},[u,c,a,r,f,h]),i.useMemo(()=>({activeIdRef:c,hasProvider:p,delayRef:a,isInstantPhase:g}),[c,p,a,g])}function We(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function jt(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function at(e){const t=ut(Bf,e).current;return t.next=e,fe(t.effect),t}function Bf(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const fo=null;class $f{constructor(){Qe(this,"callbacks",[]);Qe(this,"callbacksCount",0);Qe(this,"nextId",1);Qe(this,"startId",1);Qe(this,"isScheduled",!1);Qe(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<n.length;s+=1)(r=n[s])==null||r.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||this.callbacks[n]!==null&&(this.callbacks[n]=null,this.callbacksCount-=1)}}let po=new $f;class wt{constructor(){Qe(this,"currentId",fo);Qe(this,"cancel",()=>{this.currentId!==fo&&(po.cancel(this.currentId),this.currentId=fo)});Qe(this,"disposeEffect",()=>this.cancel)}static create(){return new wt}static request(t){return po.request(t)}static cancel(t){return po.cancel(t)}request(t){this.cancel(),this.currentId=po.request(()=>{this.currentId=fo,t()})}}function cn(){const e=ut(wt.create).current;return Is(e.disposeEffect),e}
1const fa={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Dn={...fa,position:"fixed",top:0,left:0},Ns={...fa,position:"absolute"},Nn=i.forwardRef(function(t,n){const[o,r]=i.useState();fe(()=>{kf&&Qt&&r("button")},[]);const s={tabIndex:0,role:o};return he.jsx("span",{...t,ref:n,style:Dn,"aria-hidden":o?void 0:!0,...s,"data-base-ui-focus-guard":""})}),Fn=Math.min,Xt=Math.max,$o=Math.round,go=Math.floor,Kt=e=>({x:e,y:e}),jf={left:"right",right:"left",bottom:"top",top:"bottom"};function da(e,t,n){return Xt(e,Fn(t,n))}function an(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Fs(e){return e==="x"?"y":"x"}function Ls(e){return e==="y"?"height":"width"}function Et(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vs(e){return Fs(Et(e))}function Uf(e,t,n){n===void 0&&(n=!1);const o=Gt(e),r=Vs(e),s=Ls(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=jo(c)),[c,jo(c)]}function Wf(e){const t=jo(e);return[ns(e),t,ns(t)]}function ns(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ii=["left","right"],ki=["right","left"],zf=["top","bottom"],Yf=["bottom","top"];function qf(e,t,n){switch(e){case"top":case"bottom":return n?t?ki:Ii:t?Ii:ki;case"left":case"right":return t?zf:Yf;default:return[]}}function Xf(e,t,n,o){const r=Gt(e);let s=qf(Pt(e),n==="start",o);return r&&(s=s.map(c=>c+"-"+r),t&&(s=s.concat(s.map(ns)))),s}function jo(e){const t=Pt(e);return jf[t]+e.slice(t.length)}function Kf(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function pa(e){return typeof e!="number"?Kf(e):{top:e,right:e,bottom:e,left:e}}function Zn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Yn(e,t){return t<0||t>=e.length}function Mo(e,t){return qt(e.current,{disabledIndices:t})}function os(e,t){return qt(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function qt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:o,amount:r=1}={}){let s=t;do s+=n?-r:r;while(s>=0&&s<=e.length-1&&In(e,s,o));return s}function In(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const r=e[t];return r?!dr(r)||r.matches(":disabled")?!0:!n&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!1}function Gf(e){return e.visibility==="hidden"||e.visibility==="collapse"}function dr(e,t=e?Rt(e):null){return!e||!e.isConnected||!t||Gf(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Zf='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Jf(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return An(n)?n.host:null}function rs(e){for(const t of Array.from(e.children))if(mt(t)==="summary")return t;return null}function Qf(e,t){const n=rs(t);return!!n&&(e===n||Te(n,e))}function ga(e){const t=e?mt(e):"";return e!=null&&e.matches(Zf)&&(t!=="summary"||e.parentElement!=null&&mt(e.parentElement)==="details"&&rs(e.parentElement)===e)&&(t!=="details"||rs(e)==null)&&(t!=="input"||e.type!=="hidden")}function ha(e){if(!ga(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Jf(t)){const n=t!==e,o=mt(t)==="slot";if(t.hasAttribute("inert")||n&&mt(t)==="details"&&!t.open&&!Qf(e,t)||t.hasAttribute("hidden")||!o&&!ed(t,n))return!1}return!0}function ed(e,t){const n=Rt(e);return t?n.display!=="none":dr(e,n)}function ma(e){const t=e.tabIndex;if(t<0){const n=mt(e);if(n==="details"||n==="audio"||n==="video"||Ze(e)&&e.isContentEditable)return 0}return t}function Dr(e){if(mt(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function td(e,t){const n=Dr(e);if(!n)return!0;const o=t.find(r=>{const s=Dr(r);return(s==null?void 0:s.name)===n.name&&s.form===n.form&&s.checked});return o?o===n:t.find(r=>{const s=Dr(r);return(s==null?void 0:s.name)===n.name&&s.form===n.form})===n}function ya(e){if(Ze(e)&&mt(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ze(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ba(e,t){ya(e).forEach(n=>{ga(n)&&t.push(n),ba(n,t)})}function va(e,t,n){ya(e).forEach(o=>{Ze(o)&&o.matches(t)&&n.push(o),va(o,t,n)})}function _s(e){return ha(e)&&ma(e)>=0}function xa(e){const t=[];
1return ba(e,t),t.filter(ha)}function oo(e){const t=xa(e);return t.filter(n=>ma(n)>=0&&td(n,t))}function Ra(e,t){const n=oo(e),o=n.length;if(o===0)return;const r=pt($e(e)),s=n.indexOf(r),c=s===-1?t===1?0:o-1:s+t;return n[c]}function Hs(e){return Ra($e(e).body,1)||e}function Sa(e){return Ra($e(e).body,-1)||e}function wa(e,t){if(!e)return null;const n=oo($e(e).body),o=n.length;if(o===0)return null;const r=n.indexOf(e);if(r===-1)return null;const s=(r+t+o)%o;return n[s]}function nd(e){return wa(e,1)}function od(e){return wa(e,-1)}function kn(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Te(n,o)}function rd(e){oo(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Oi(e){const t=[];va(e,"[data-tabindex]",t),t.forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function ln(e,t,n=!0){return e.filter(r=>r.parentId===t).flatMap(r=>{var s;return[...!n||(s=r.context)!=null&&s.open?[r]:[],...ln(e,r.id,n)]})}function Ai(e,t){var r;let n=[],o=(r=e.find(s=>s.id===t))==null?void 0:r.parentId;for(;o;){const s=e.find(c=>c.id===o);o=s==null?void 0:s.parentId,s&&(n=n.concat(s))}return n}function Jn(e){return`data-base-ui-${e}`}let ho=0;function Io(e,t={}){const{preventScroll:n=!1,sync:o=!1,shouldFocus:r}=t;cancelAnimationFrame(ho);function s(){r&&!r()||e==null||e.focus({preventScroll:n})}if(o)return s(),ct;const c=requestAnimationFrame(s);return ho=c,()=>{ho===c&&(cancelAnimationFrame(c),ho=0)}}const Nr={inert:new WeakMap,"aria-hidden":new WeakMap},Di="data-base-ui-inert",ss={inert:new WeakSet,"aria-hidden":new WeakSet};let Bn=new WeakMap,Fr=0;function sd(e){return ss[e]}function Ca(e){return e?An(e)?e.host:Ca(e.parentNode):null}const Ni=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Ca(n);return e.contains(o)?o:null}).filter(n=>n!=null),Fi=e=>{const t=new Set;return e.forEach(n=>{let o=n;for(;o&&!t.has(o);)t.add(o),o=o.parentNode}),t},Li=(e,t,n)=>{const o=[],r=s=>{!s||n.has(s)||Array.from(s.children).forEach(c=>{mt(c)!=="script"&&(t.has(c)?r(c):o.push(c))})};return r(e),o};function id(e,t,n,o,{mark:r=!0}){let s=null;o?s="inert":n&&(s="aria-hidden");let c=null,a=null;const l=Ni(t,e),f=r?Li(t,Fi(l),new Set(l)):[],u=[],p=[];if(s){const h=Nr[s],g=sd(s);a=g,c=h;const d=Ni(t,Array.from(t.querySelectorAll("[aria-live]"))),y=l.concat(d);Li(t,Fi(y),new Set(y)).forEach(m=>{const b=m.getAttribute(s),R=b!==null&&b!=="false",S=(h.get(m)||0)+1;h.set(m,S),u.push(m),S===1&&R&&g.add(m),R||m.setAttribute(s,s==="inert"?"":"true")})}return r&&f.forEach(h=>{const g=(Bn.get(h)||0)+1;Bn.set(h,g),p.push(h),g===1&&h.setAttribute(Di,"")}),Fr+=1,()=>{c&&u.forEach(h=>{const d=(c.get(h)||0)-1;c.set(h,d),d||(!(a!=null&&a.has(h))&&s&&h.removeAttribute(s),a==null||a.delete(h))}),r&&p.forEach(h=>{const g=(Bn.get(h)||0)-1;Bn.set(h,g),g||h.removeAttribute(Di)}),Fr-=1,Fr||(Nr.inert=new WeakMap,Nr["aria-hidden"]=new WeakMap,ss.inert=new WeakSet,ss["aria-hidden"]=new WeakSet,Bn=new WeakMap)}}function Vi(e,t={}){const{ariaHidden:n=!1,inert:o=!1,mark:r=!0}=t,s=$e(e[0]).body;return id(e,s,n,o,{mark:r})}const cd=500,ad=500,ld={style:{transition:"none"}},ud="data-base-ui-click-trigger",fd="data-base-ui-swipe-ignore",dd=`[${fd}]`,Ea={fallbackAxisSide:"none"},Pa={fallbackAxisSide:"end"},pd={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ta=i.createContext(null),Ma=()=>i.useContext(Ta),gd=Jn("portal");function Ia(e={}){const{ref:t,container:n,componentProps:o=Je,elementProps:r}=e,s=sn(),c=Ma(),a=c==null?void 0:c.portalNode,[l,f]=i.useState(null),[u,p]=i.useState(null),h=te(v=>{v!==null&&p(v)}),g=i.useRef(null);fe(()=>{if(n===null){g.current&&(g.current=null,p(null),f(null));return}const v=(n&&(bs(n)?n:n.current))??a??document.body;if(v==null){g.current&&(g.current=null,p(null),f(null));return}g.current!==v&&(g.current=v,p(null),f(v))},[n,a]);const d=Ne("div",o,{ref:[t,h],props:[{id:s,[gd]:""},r]}),y=l&&d?Nt.createPortal(d,l):null;return{node:u,nodeId:i.isValidElement(d)?d.props.id:void 0,subtree:y}}const Bs=i.forwardRef(function(t,n){const{render:o,className:r,style:s,children:c,container:a,portalOwnerRole:l,...f}=t,{node:u,nodeId:p,subtree:h}=Ia({container:a,ref:n,componentProps:t,elementProps:f}),g=i.useRef(null),d=i.useRef(null),y=i.useRef(null),v=i.useRef(null),[m,b]=i.useState(null),R=i.useRef(!1),S=m==null?void 0:m.modal,x=m==null?void 0:m.open,C=!!m&&!m.modal&&m.open&&!!u;i.useEffect(()=>{if(!u||S)return;function E(I){u&&I.relatedTarget&&kn(I)&&(I.type==="focusin"?R.current&&(Oi(u),R.current=!1):(rd(u),R.current=!0))}return jt(We(u,"focusin",E,!0),We(u,"focusout",E,!0))},[u,S]),fe(()=>{!u||x!==!0||!R.current||(Oi(u),R.current=!1)},[x,u]);const w=i.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:d,beforeInsideRef:y,afterInsideRef:v,portalNode:u,setFocusManagerState:b}),[u]);return he.jsxs(i.Fragment,{children:[h,he.jsxs(Ta.Provider,{value:w,children:[C&&u&&he.jsx(Nn,{"data-type":"outside",ref:g,onFocus:E=>{var I;if(kn(E,u))(I=y.current)==null||I.focus();else{const A=m?m.domReference:null,T=Sa(A);T==null||T.focus()}}}),C&&u&&he.jsx("span",{role:l,"aria-owns":p,style:pd}),u&&Nt.createPortal(c,u),C&&u&&he.jsx(Nn,{"data-type":"outside",ref:d,onFocus:E=>{var I;if(kn(E,u))(I=v.current)==null||I.focus();else{const A=m?m.domReference:null,T=Hs(A);T==null||T.focus(),m!=null&&m.closeOnFocusOut&&(m==null||m.onOpenChange(!1,Oe(mn,E.nativeEvent)))}}})]})]})});function ka(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}class $s{constructor(){Qe(this,"nodesRef",{current:[]}
1);Qe(this,"events",ka())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(o=>o===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Oa=i.createContext(null),Aa=i.createContext(null),fn=()=>{var e;return((e=i.useContext(Oa))==null?void 0:e.id)||null},dn=e=>{const t=i.useContext(Aa);return e??t};function Da(e){const t=sn(),n=dn(e),o=fn();return fe(()=>{if(!t)return;const r={id:t,parentId:o};return n==null||n.addNode(r),()=>{n==null||n.removeNode(r)}},[n,t,o]),t}function hd(e){const{children:t,id:n}=e,o=fn();return he.jsx(Oa.Provider,{value:i.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function md(e){const{children:t,externalTree:n}=e,o=ut(()=>n??new $s).current;return he.jsx(Aa.Provider,{value:o,children:t})}function Yt(e){return e==null?e:"current"in e?e.current:e}function yd(e,t){const n=Ge(st(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const _i=20;let nn=[];function js(){nn=nn.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Hi(e){js(),e&&mt(e)!=="body"&&(nn.push(new WeakRef(e)),nn.length>_i&&(nn=nn.slice(-_i)))}function Bi(){var e;return js(),(e=nn[nn.length-1])==null?void 0:e.deref()}function bd(e){return e?_s(e)?e:oo(e)[0]||e:null}function $i(e){var r;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;const n=xa(e).filter(s=>{const c=s.getAttribute("data-tabindex")||"";return _s(s)||s.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");n.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function pr(e){const{context:t,children:n,disabled:o=!1,initialFocus:r=!0,returnFocus:s=!0,restoreFocus:c=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:f="",nextFocusableElement:u,previousFocusableElement:p,beforeContentFocusGuardRef:h,externalTree:g,getInsideElements:d}=e,y="rootStore"in t?t.rootStore:t,v=y.useState("open"),m=y.useState("domReferenceElement"),b=y.useState("floatingElement"),{events:R,dataRef:S}=y.context,x=te(()=>{var Q;return(Q=S.current.floatingContext)==null?void 0:Q.nodeId}),C=r===!1,w=ts(m)&&C,E=at(r),I=at(s),A=at(f),T=at(v),M=dn(g),P=Ma(),N=i.useRef(!1),O=i.useRef(!1),k=i.useRef(!1),_=i.useRef(null),L=i.useRef(""),D=i.useRef(""),V=i.useRef(null),B=i.useRef(null),H=Tt(V,h,P==null?void 0:P.beforeInsideRef),z=Tt(B,P==null?void 0:P.afterInsideRef),F=lt(),j=lt(),$=cn(),Y=P!=null,U=Bo(b),le=te((Q=U)=>Q?oo(Q):[]),ae=te(()=>(d==null?void 0:d().filter(Q=>Q!=null))??[]);i.useEffect(()=>{if(o||!a)return;function Q(J){J.key==="Tab"&&Te(U,pt($e(U)))&&le().length===0&&!w&&Ot(J)}const G=$e(U);return We(G,"keydown",Q)},[o,U,a,w,le]),i.useEffect(()=>{if(o||!v)return;const Q=$e(U);function G(){k.current=!1}function J(Re){const ue=st(Re),q=ae(),K=Te(b,ue)||Te(m,ue)||Te(P==null?void 0:P.portalNode,ue)||q.some(ce=>ce===ue||Te(ce,ue));k.current=!K,D.current=Re.pointerType||"keyboard",ue!=null&&ue.closest(`[${ud}]`)&&(O.current=!0,j.start(0,()=>{O.current=!1}))}function ie(){D.current="keyboard"}return jt(We(Q,"pointerdown",J,!0),We(Q,"pointerup",G,!0),We(Q,"pointercancel",G,!0),We(Q,"keydown",ie,!0),G)},[o,b,m,U,v,P,j,ae]),i.useEffect(()=>{if(o||!l)return;const Q=$e(U);function G(){O.current=!0,j.start(0,()=>{O.current=!1})}function J(q){const K=st(q);_s(K)&&(_.current=K)}function ie(q){const K=q.relatedTarget,ce=q.currentTarget,ee=st(q);a&&K==null&&ee!=null&&Te(b,ee)&&Hi(ee),queueMicrotask(()=>{const oe=x(),Ie=y.context.triggerElements,ne=ae(),ve=(K==null?void 0:K.hasAttribute(Jn("focus-guard")))&&[V.current,B.current,P==null?void 0:P.beforeInsideRef.current,P==null?void 0:P.afterInsideRef.current,P==null?void 0:P.beforeOutsideRef.current,P==null?void 0:P.afterOutsideRef.current,Yt(p),Yt(u)].includes(K),se=!(Te(m,K)||Te(b,K)||Te(K,b)||Te(P==null?void 0:P.portalNode,K)||ne.some(X=>X===K||Te(X,K))||Ie.hasMatchingElement(X=>Te(X,K))||ve||M&&(ln(M.nodesRef.current,oe).find(X=>{var we,Z;return Te((we=X.context)==null?void 0:we.elements.floating,K)||Te((Z=X.context)==null?void 0:Z.elements.domReference,K)})||Ai(M.nodesRef.current,oe).find(X=>{var we,Z,re;return[(we=X.context)==null?void 0:we.elements.floating,Bo((Z=X.context)==null?void 0:Z.elements.floating)].includes(K)||((re=X.context)==null?void 0:re.elements.domReference)===K})));if(ce===m&&U&&$i(U),c&&ce!==m&&!dr(ee)&&pt(Q)===Q.body){if(Ze(U)&&(U.focus(),c==="popup")){$.request(()=>{U.focus()});return}const X=le(),we=_.current,Z=(we&&X.includes(we)?we:null)||X[X.length-1]||U;Ze(Z)&&Z.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(w||!a)&&K&&se&&!O.current&&(w||K!==Bi())&&(N.current=!0,y.setOpen(!1,Oe(mn,q)))})}function Re(){k.current||(S.current.insideReactTree=!0,F.start(0,()=>{S.current.insideReactTree=!1}))}const ue=Ze(m)?m:null;if(!(!b&&!ue))return jt(ue&&We(ue,"focusout",ie),ue&&We(ue,"pointerdown",G),b&&We(b,"focusin",J),b&&We(b,"focusout",ie),b&&P&&We(b,"focusout",Re,!0))},[o,m,b,U,a,M,P,y,l,c,le,w,x,S,F,j,$,u,p,ae]),i.useEffect(()=>{var ce,ee,oe;if(o||!b||!v)return;const Q=Array.from(((ce=P==null?void 0:P.portalNode)==null?void 0:ce.querySelectorAll(`[${Jn("portal")}]`))||[]),J=(oe=(ee=(M?Ai(M.nodesRef.current,x()):[]).find(Ie=>{var ne;return ts(((ne=Ie.context)==null?void 0:ne.elements.domReference)||null)}))==null?void 0:ee.context)==null?void 0:oe.elements.domReference,Re=[...[b,...Q,V.current,B.current,P==null?void 0:P.beforeOutsideRef.current,P==null?void 0:P.afterOutsideRef.current,...ae()],J,Yt(p),Yt(u),w?m:null].filter(Ie=>Ie!=null),ue=Vi(Re,{ariaHidden:a||w,mark:!1}),q=[b,...Q].filter(Ie=>Ie!=null),K=Vi(q);return()=>{K(),ue()}},[v,o,m,b,a,P,w,M,x,u,p,ae]),fe(()=>{if(!v||o||!Ze(U))return;L.current="",D.current="";const Q=$e(U),G=pt(Q);queueMicrotask(()=>{const J=E.current,ie=typeof J=="function"?J(A.current||""):J;if(ie===void 0||ie===!1||Te(U,G))return;let ue=null;const q=()=>(ue==null&&(ue=le(U)),ue[0]||U);let K;ie===!0||ie===null?K=q():K=Yt(ie),K=K||q();const ce=Te(U,pt(Q));Io(K,{preventScroll:K===U,shouldFocus(){if(!T.current)return!1;if(ce)return!0;const ee=pt(Q);return!(ee!==K&&Te(U,ee))}})})},[o,v,U,le,E,A,T]),fe(()=>{if(o||!U)return;const Q=$e(U),G=pt(Q),J=A.current==null;Hi(G);
1function ie(ue){if(ue.open||(L.current=yd(ue.nativeEvent,D.current)),ue.reason===gt&&ue.nativeEvent.type==="mouseleave"&&(N.current=!0),ue.reason===rr)if(ue.nested)N.current=!1;else if(ar(ue.nativeEvent)||As(ue.nativeEvent))N.current=!1;else{let q=!1;$e(U).createElement("div").focus({get preventScroll(){return q=!0,!1}}),q?N.current=!1:N.current=!0}}R.on("openchange",ie);function Re(ue){const q=I.current;let K=typeof q=="function"?q(ue):q;if(K===void 0||K===!1)return null;K===null&&(K=!0);const ce=m!=null&&m.isConnected?m:null,ee=G!=null&&G.isConnected&&mt(G)!=="body"?G:null;let oe=J?ee||ce:ce||ee;return oe||(oe=Bi()||null),typeof K=="boolean"?oe:Yt(K)||oe||null}return()=>{R.off("openchange",ie);const ue=pt(Q),q=ae(),K=Te(b,ue)||q.some(Ie=>Ie===ue||Te(Ie,ue))||M&&ln(M.nodesRef.current,x(),!1).some(Ie=>{var ne;return Te((ne=Ie.context)==null?void 0:ne.elements.floating,ue)}),ce=I.current,ee=L.current,oe=Re(ee);queueMicrotask(()=>{const Ie=bd(oe),ne=typeof ce!="boolean";if(ce&&!N.current&&Ze(Ie)&&(!(!ne&&Ie!==ue&&ue!==Q.body)||K)){const ve={preventScroll:!0};ee==="keyboard"&&(ve.focusVisible=!0),Ie.focus(ve)}N.current=!1})}},[o,b,U,I,A,R,M,m,x,ae]),fe(()=>{if(!Qt||v||!b)return;const Q=pt($e(b));!Ze(Q)||!fr(Q)||Te(b,Q)&&Q.blur()},[v,b]),fe(()=>{if(!(o||!P))return P.setFocusManagerState({modal:a,closeOnFocusOut:l,open:v,onOpenChange:y.setOpen,domReference:m}),()=>{P.setFocusManagerState(null)}},[o,P,a,v,y,l,m]),fe(()=>{if(!(o||!U))return $i(U),()=>{queueMicrotask(js)}},[o,U]);const me=!o&&(a?!w:!0)&&(Y||a);return he.jsxs(i.Fragment,{children:[me&&he.jsx(Nn,{"data-type":"inside",ref:H,onFocus:Q=>{var G;if(a){const J=le();Io(J[J.length-1])}else if(P!=null&&P.portalNode)if(N.current=!1,kn(Q,P.portalNode)){const J=Hs(m);J==null||J.focus()}else(G=Yt(p??P.beforeOutsideRef))==null||G.focus()}}),n,me&&he.jsx(Nn,{"data-type":"inside",ref:z,onFocus:Q=>{var G;if(a)Io(le()[0]);else if(P!=null&&P.portalNode)if(l&&(N.current=!0),kn(Q,P.portalNode)){const J=Sa(m);J==null||J.focus()}else(G=Yt(u??P.afterOutsideRef))==null||G.focus()}})]})}function Na(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:a=0,reason:l=un}=t,f="rootStore"in e?e.rootStore:e,u=f.context.dataRef,p=i.useRef(void 0),h=cn(),g=lt(),d=i.useMemo(()=>{function y(m,b,R,S){const x=Oe(l,b,R);m&&S==="touch"&&a>0?g.start(a,()=>{f.setOpen(!0,x)}):f.setOpen(m,x)}function v(m,b,R){const S=u.current.openEvent,x=f.select("domReferenceElement")!==b;return m&&x||!m||!r?!0:S&&c?!R(S.type):!1}return{onPointerDown(m){p.current=rn(m.pointerType,!0)&&As(m.nativeEvent)?"virtual":m.pointerType},onMouseDown(m){const b=p.current,R=m.nativeEvent,S=f.select("open");if(m.button!==0||o==="click"||rn(b,!0)&&s)return;const x=v(S,m.currentTarget,E=>E==="click"||E==="mousedown"),C=st(R);if(fr(C)){y(x,R,C,b);return}const w=m.currentTarget;h.request(()=>{y(x,R,w,b)})},onClick(m){if(o==="mousedown-only")return;const b=p.current;if(o==="mousedown"&&b){p.current=void 0;return}if(rn(b,!0)&&s)return;const R=f.select("open"),S=v(R,m.currentTarget,x=>x==="click"||x==="mousedown"||x==="keydown"||x==="keyup");y(S,m.nativeEvent,m.currentTarget,b)},onKeyDown(){p.current=void 0}}},[u,o,s,l,f,c,r,h,g,a]);return i.useMemo(()=>n?{reference:d}:Je,[n,d])}function vd(e,t){let n=null,o=null,r=!1;return{contextElement:e||void 0,getBoundingClientRect(){var g;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((g=t.dataRef.current.openEvent)==null?void 0:g.type)||"")&&t.pointerType!=="touch";let f=s.width,u=s.height,p=s.x,h=s.y;return n==null&&t.x&&c&&(n=s.x-t.x),o==null&&t.y&&a&&(o=s.y-t.y),p-=n||0,h-=o||0,f=0,u=0,!r||l?(f=t.axis==="y"?s.width:0,u=t.axis==="x"?s.height:0,p=c&&t.x!=null?t.x:p,h=a&&t.y!=null?t.y:h):r&&!l&&(u=t.axis==="x"?s.height:u,f=t.axis==="y"?s.width:f),r=!0,{width:f,height:u,x:p,y:h,top:h,right:p+f,bottom:h+u,left:p}}}}function ji(e){return e!=null&&e.clientX!=null}function xd(e,t={}){const{enabled:n=!0,axis:o="both"}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("open"),c=r.useState("floatingElement"),a=r.useState("domReferenceElement"),l=r.context.dataRef,f=i.useRef(!1),u=i.useRef(null),[p,h]=i.useState(),[g,d]=i.useState([]),y=te(S=>{r.set("positionReference",S)}
1),v=te((S,x,C)=>{f.current||l.current.openEvent&&!ji(l.current.openEvent)||r.set("positionReference",vd(C??a,{x:S,y:x,axis:o,dataRef:l,pointerType:p}))}),m=te(S=>{s?u.current||(v(S.clientX,S.clientY,S.currentTarget),d([])):v(S.clientX,S.clientY,S.currentTarget)}),b=rn(p)?c:s;i.useEffect(()=>{if(!n){y(a);return}if(!b)return;function S(){var w;(w=u.current)==null||w.call(u),u.current=null}const x=Ge(c);function C(w){const E=st(w);Te(c,E)?S():v(w.clientX,w.clientY)}return!l.current.openEvent||ji(l.current.openEvent)?u.current=We(x,"mousemove",C):y(a),S},[b,n,c,l,a,r,v,y,g]),i.useEffect(()=>()=>{r.set("positionReference",null)},[r]),i.useEffect(()=>{n&&!c&&(f.current=!1)},[n,c]),i.useEffect(()=>{!n&&s&&(f.current=!0)},[n,s]);const R=i.useMemo(()=>{function S(x){h(x.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:m,onMouseEnter:m}},[m]);return i.useMemo(()=>n?{reference:R,trigger:R}:{},[n,R])}function Rd(){return!1}function Sd(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function gr(e,t={}){const{enabled:n=!0,escapeKey:o=!0,outsidePress:r=!0,outsidePressEvent:s="sloppy",referencePress:c=Rd,bubbles:a,externalTree:l}=t,f="rootStore"in e?e.rootStore:e,u=f.useState("open"),p=f.useState("floatingElement"),{dataRef:h,events:g}=f.context,d=dn(l),y=te(typeof r=="function"?r:()=>!1),v=typeof r=="function"?y:r,m=v!==!1,b=te(()=>s),{escapeKey:R,outsidePress:S}=Sd(a),x=i.useRef(!1),C=i.useRef(!1),w=i.useRef(!1),E=i.useRef(!1),I=i.useRef(!1),A=i.useRef(""),T=i.useRef(null),M=lt(),P=lt(),N=te(()=>{P.clear(),h.current.insideReactTree=!1}),O=te(F=>{var Y;const j=(Y=h.current.floatingContext)==null?void 0:Y.nodeId;return(d?ln(d.nodesRef.current,j):[]).some(U=>{var le;return((le=U.context)==null?void 0:le.open)&&!U.context.dataRef.current[F]})}),k=te(F=>Ar(F,f.select("floatingElement"))||Ar(F,f.select("domReferenceElement"))),_=te(F=>{c()&&f.setOpen(!1,Oe(un,F.nativeEvent))}),L=te(F=>{if(!u||!n||!o||F.key!=="Escape"||I.current||!R&&O("__escapeKeyBubbles"))return;const j=Of(F)?F.nativeEvent:F,$=Oe(sr,j);f.setOpen(!1,$),$.isCanceled||F.preventDefault(),!R&&!$.isPropagationAllowed&&F.stopPropagation()}),D=te(()=>{h.current.insideReactTree=!0,P.start(0,N)}),V=te(F=>{if(!u||!n||F.button!==0)return;const j=st(F.nativeEvent);Te(f.select("floatingElement"),j)&&(x.current||(x.current=!0,C.current=!1))}),B=te(F=>{!u||!n||(F.defaultPrevented||F.nativeEvent.defaultPrevented)&&x.current&&(C.current=!0)});i.useEffect(()=>{function F(j){j.open||(E.current=!1)}return g.on("openchange",F),()=>{g.off("openchange",F)}},[g]),i.useEffect(()=>{if(!u||!n)return u||(E.current=!1),N;h.current.__escapeKeyBubbles=R,h.current.__outsidePressBubbles=S;const F=new Lt,j=new Lt,$=$e(p);function Y(){F.clear(),I.current=!0}function U(){F.start(Qt?5:0,()=>
1{I.current=!1})}function le(){w.current=!0,j.start(0,()=>{w.current=!1})}function ae(){x.current=!1,C.current=!1}function me(){const se=A.current,X=se==="pen"||!se?"mouse":se,we=b(),Z=typeof we=="function"?we():we;return typeof Z=="string"?Z:Z[X]}function Q(se){const X=me();return X==="intentional"&&se.type!=="click"||X==="sloppy"&&se.type==="click"}function G(se){var Z;const X=(Z=h.current.floatingContext)==null?void 0:Z.nodeId,we=d&&ln(d.nodesRef.current,X).some(re=>{var xe;return Ar(se,(xe=re.context)==null?void 0:xe.elements.floating)});return k(se)||we}function J(se){if(Q(se)){se.type!=="click"&&!k(se)&&(j.clear(),w.current=!1),N();return}if(h.current.insideReactTree){N();return}const X=st(se),we=`[${Jn("inert")}]`,Z=je(X)?X.getRootNode():null,re=Array.from((An(Z)?Z:$e(f.select("floatingElement"))).querySelectorAll(we)),xe=f.context.triggerElements;if(X&&(xe.hasElement(X)||xe.hasMatchingElement(pe=>Te(pe,X))))return;let ye=je(X)?X:null;for(;ye&&!Dt(ye);){const pe=Ft(ye);if(Dt(pe)||!je(pe))break;ye=pe}if(!(re.length&&je(X)&&!Df(X)&&!Te(X,f.select("floatingElement"))&&re.every(pe=>!Te(ye,pe)))){if(Ze(X)&&!("touches"in se)){const pe=Dt(X),de=Rt(X),Me=/auto|scroll/,Le=pe||Me.test(de.overflowX),Ae=pe||Me.test(de.overflowY),Se=Le&&X.clientWidth>0&&X.scrollWidth>X.clientWidth,_e=Ae&&X.clientHeight>0&&X.scrollHeight>X.clientHeight,He=de.direction==="rtl",Ye=_e&&(He?se.offsetX<=X.offsetWidth-X.clientWidth:se.offsetX>X.clientWidth),ot=Se&&se.offsetY>X.clientHeight;if(Ye||ot)return}if(!G(se)){if(me()==="intentional"){if(se.detail!==0&&!ar(se)&&!E.current)return;if(w.current){j.clear(),w.current=!1;return}}typeof v=="function"&&!v(se)||O("__outsidePressBubbles")||(f.setOpen(!1,Oe(rr,se)),N())}}}function ie(se){me()!=="sloppy"||se.pointerType==="touch"||!f.select("open")||!n||k(se)||J(se)}function Re(se){if(me()!=="sloppy"||!f.select("open")||!n||k(se))return;const X=se.touches[0];X&&(T.current={startTime:Date.now(),startX:X.clientX,startY:X.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},M.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function ue(se,X){const we=st(se);if(!we)return;const Z=We(we,se.type,()=>{X(se),Z()})}function q(se){A.current="touch",ue(se,Re)}function K(se){M.clear(),se.type==="pointerdown"&&(se.button===0&&(E.current=!0),A.current=se.pointerType),!(se.type==="mousedown"&&T.current&&!T.current.dismissOnMouseDown)&&ue(se,X=>{X.type==="pointerdown"?ie(X):J(X)})}function ce(se){if(se.type==="pointercancel"&&(E.current=!1),!x.current)return;const X=C.current;if(ae(),me()==="intentional"){if(se.type==="pointercancel"){X&&le();return}if(!G(se)){if(X){le();return}typeof v=="function"&&!v(se)||(j.clear(),w.current=!0,N())}}}function ee(se){if(me()!=="sloppy"||!T.current||k(se))return;const X=se.touches[0];if(!X)return;const we=Math.abs(X.clientX-T.current.startX),Z=Math.abs(X.clientY-T.current.startY),re=Math.sqrt(we*we+Z*Z);re>5&&(T.current.dismissOnTouchEnd=!0),re>10&&(J(se),M.clear(),T.current=null)}function oe(se){ue(se,ee)}function Ie(se){me()!=="sloppy"||!T.current||k(se)||(T.current.dismissOnTouchEnd&&J(se),M.clear(),T.current=null)}function ne(se){ue(se,Ie)}const ve=jt(o&&jt(We($,"keydown",L),We($,"compositionstart",Y),We($,"compositionend",U)),m&&jt(We($,"click",K,!0),We($,"pointerdown",K,!0),We($,"pointerup",ce,!0),We($,"pointercancel",ce,!0),We($,"mousedown",K,!0),We($,"mouseup",ce,!0),We($,"touchstart",q,{capture:!0,passive:!0}),We($,"touchmove",oe,{capture:!0,passive:!0}),We($,"touchend",ne,{capture:!0,passive:!0})));return()=>{ve(),F.clear(),j.clear(),ae(),w.current=!1,N()}},[h,p,o,m,v,u,n,R,S,L,N,b,O,k,d,f,M]);const H=i.useMemo(()=>({onKeyDown:L,onPointerDown:_,onClick:_}),[L,_]),z=i.useMemo(()=>({onKeyDown:L,onPointerDown:B,onMouseDown:B,onClickCapture:D,onMouseDownCapture(F){D(),V(F)},onPointerDownCapture(F){D(),V(F)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[L,D,V,B]);return i.useMemo(()=>n?{reference:H,floating:z,trigger:H}:{},[n,H,z])}function Ui(e,t,n){let{reference:o,floating:r}=e;const s=Et(t),c=Vs(t),a=Ls(c),l=Pt(t),f=s==="y",u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[a]/2-r[a]/2;let g;switch(l){case"top":g={x:u,y:o.y-r.height};break;case"bottom":g={x:u,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}const d=Gt(t);return d&&(g[c]+=h*(d==="end"?1:-1)*(n&&f?-1:1)),g}async function wd(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:c,elements:a,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=an(t,e),d=pa(g),v=a[h?p==="floating"?"reference":"floating":p],m=Zn(await s.getClippingRect
vendor: 4,195 bytes, line 1
1({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:f,rootBoundary:u,strategy:l})),b=p==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},x=Zn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:R,strategy:l}):b);return{top:(m.top-x.top+d.top)/S.y,bottom:(x.bottom-m.bottom+d.bottom)/S.y,left:(m.left-x.left+d.left)/S.x,right:(x.right-m.right+d.right)/S.x}}const Cd=50,Ed=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:c}=n,a=c.detectOverflow?c:{...c,detectOverflow:wd},l=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:p}=Ui(f,o,l),h=o,g=0;const d={};for(let y=0;y<s.length;y++){const v=s[y];if(!v)continue;const{name:m,fn:b}=v,{x:R,y:S,data:x,reset:C}=await b({x:u,y:p,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:f,platform:a,elements:{reference:e,floating:t}});u=R??u,p=S??p,d[m]={...d[m],...x},C&&g<Cd&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(f=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:u,y:p}=Ui(f,h,l)),y=-1)}return{x:u,y:p,placement:h,strategy:r,middlewareData:d}},Pd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:c,initialPlacement:a,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:y=!0,...v}=an(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Pt(r),b=Et(a),R=Pt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(f.floating)),x=h||(R||!y?[jo(a)]:Wf(a)),C=d!=="none";!h&&C&&x.push(...Xf(a,y,d,S));const w=[a,...x],E=await l.detectOverflow(t,v),I=[];let A=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&I.push(E[m]),p){const N=Uf(r,c,S);I.push(E[N[0]],E[N[1]])}if(A=[...A,{placement:r,overflows:I}],!I.every(N=>N<=0)){var T,M;const N=(((T=s.flip)==null?void 0:T.index)||0)+1,O=w[N];if(O&&(!(p==="alignment"?b!==Et(O):!1)||A.every(L=>Et(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:O}};let k=(M=A.filter(_=>_.overflows[0]<=0).sort((_,L)=>_.overflows[1]-L.overflows[1])[0])==null?void 0:M.placement;if(!k)switch(g){case"bestFit":{var P;const _=(P=A.filter(L=>{if(C){const D=Et(L.placement);return D===b||D==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(D=>D>0).reduce((D,V)=>D+V,0)]).sort((L,D)=>L[1]-D[1])[0])==null?void 0:P[0];_&&(k=_);break}case"initialPlacement":k=a;break}if(r!==k)return{reset:{placement:k}}}return{}}}},Fa=new Set(["left","top"]);async function Td(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=Pt(n),a=Gt(n),l=Et(n)==="y",f=Fa.has(c)?-1:1,u=s&&l?-1:1,p=an(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:d}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof d=="number"&&(g=a==="end"?d*-1:d),l?{x:g*u,y:h*f}:{x:h*f,y:g*u}}const Md=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:c,middlewareData:a}=t,l=await Td(t,e);return c===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:c}}}}},Id=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:c=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:R,y:S}=b;return{x:R,y:S}}},...f}=an(e,t),u={x:n,y:o},p=await s.detectOverflow(t,f),h=Et(r),g=Fs(h);let d=u[g],y=u[h];const v=(b,R)=>da(R+p[b==="y"?"top":"left"],R,R-p[b==="y"?"bottom":"right"]);c&&(d=v(g,d)),a&&(y=v(h,y));const m=l.fn({...t,[g]:d,[h]:y});
vendor: 5,658 bytes, line 1
1return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[g]:c,[h]:a}}}}}},kd=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:s,placement:c,rects:a,middlewareData:l}=t,{offset:f=0,mainAxis:u=!0,crossAxis:p=!0}=an(e,t),h={x:r,y:s},g=Et(c),d=Fs(g);let y=h[d],v=h[g];const m=an(f,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:(n=m.mainAxis)!=null?n:0,crossAxis:(o=m.crossAxis)!=null?o:0};if(u){const x=d==="y"?"height":"width",C=a.reference[d]-a.floating[x]+b.mainAxis,w=a.reference[d]+a.reference[x]-b.mainAxis;y<C?y=C:y>w&&(y=w)}if(p){var R,S;const x=d==="y"?"width":"height",C=Fa.has(Pt(c)),w=a.reference[g]-a.floating[x]+(C&&((R=l.offset)==null?void 0:R[g])||0)+(C?0:b.crossAxis),E=a.reference[g]+a.reference[x]+(C?0:((S=l.offset)==null?void 0:S[g])||0)-(C?b.crossAxis:0);v<w?v=w:v>E&&(v=E)}return{[d]:y,[g]:v}}}},Od=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:s}=t,{apply:c=()=>{},...a}=an(e,t),l=await r.detectOverflow(t,a),f=Pt(n),u=Gt(n),p=Et(n)==="y",{width:h,height:g}=o.floating;let d,y;f==="top"||f==="bottom"?(d=f,y=u===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,d=u==="end"?"top":"bottom");const v=g-l.top-l.bottom,m=h-l.left-l.right,b=Fn(g-l[d],v),R=Fn(h-l[y],m),S=t.middlewareData.shift,x=!S;let C=b,w=R;S!=null&&S.enabled.x&&(w=m),S!=null&&S.enabled.y&&(C=v),x&&!u&&(p?w=h-2*Xt(l.left,l.right):C=g-2*Xt(l.top,l.bottom)),await c({...t,availableWidth:w,availableHeight:C});const E=await r.getDimensions(s.floating);return h!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function La(e){const t=Rt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ze(e),s=r?e.offsetWidth:n,c=r?e.offsetHeight:o,a=$o(n)!==s||$o(o)!==c;return a&&(n=s,o=c),{width:n,height:o,$:a}}function Us(e){return je(e)?e:e.contextElement}function On(e){const t=Us(e);if(!Ze(t))return Kt(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=La(t);let c=(s?$o(n.width):n.width)/o,a=(s?$o(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!a||!Number.isFinite(a))&&(a=1),{x:c,y:a}}const Ad=Kt(0);function Va(e){const t=Ge(e);return!xs()||!t.visualViewport?Ad:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dd(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ge(e)}function bn(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Us(e);let c=Kt(1);t&&(o?je(o)&&(c=On(o)):c=On(e));const a=Dd(s,n,o)?Va(s):Kt(0);let l=(r.left+a.x)/c.x,f=(r.top+a.y)/c.y,u=r.width/c.x,p=r.height/c.y;if(s&&o){const h=Ge(s),g=je(o)?Ge(o):o;let d=h,y=Kr(d);for(;y&&g!==d;){const v=On(y),m=y.getBoundingClientRect(),b=Rt(y),R=m.left+(y.clientLeft+parseFloat(b.paddingLeft))*v.x,S=m.top+(y.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,f*=v.y,u*=v.x,p*=v.y,l+=R,f+=S,d=Ge(y),y=Kr(d)}}return Zn({width:u,height:p,x:l,y:f})}function hr(e,t){const n=nr(e).scrollLeft;return t?t.left+n:bn(Zt(e)).left+n}function _a(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-hr(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Nd(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",c=Zt(o),a=t?tr(t.floating):!1;if(o===c||a&&s)return n;let l={scrollLeft:0,scrollTop:0},f=Kt(1);const u=Kt(0),p=Ze(o);if((p||!s)&&((mt(o)!=="body"||eo(c))&&(l=nr(o)),p)){const g=bn(o);f=On(o),u.x=g.x+o.clientLeft,u.y=g.y+o.clientTop}const h=c&&!p&&!s?_a(c,l):Kt(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-l.scrollTop*f.y+u.y+h.y}}function Fd(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ld(e){const t=nr(e),n=e.ownerDocument.body,o=Xt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Xt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+hr(e);const c=-t.scrollTop;return Rt(n).direction==="rtl"&&(s+=Xt(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:c}}const Vd=25;function _d(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=Ge(e),s=Zt(e),c=r.visualViewport;let a=s.clientWidth,l=s.clientHeight,f=0,u=0;if(c){const h=!xs()||t==="fixed";o?h||(f=-c.offsetLeft,u=-c.offsetTop):(a=c.width,l=c.height,h&&(f=c.offsetLeft,u=c.offsetTop))}if(hr(s)<=0){const h=s.ownerDocument,g=h.body,d=getComputedStyle(g),y=h.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,v=Math.abs(s.clientWidth-g.clientWidth-y),m=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;m<=Vd&&(a-=m)}return{width:a,height:l,x:f,y:u}}function Hd(e,t){const n=bn(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=On(e),c=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,f=o*s.y;return{width:c,height:a,x:l,y:f}}function Wi(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=_d(e,n,t);else if(t==="document")o=Ld(Zt(e));else if(je(t))o=Hd(t,n);else{const r=Va(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Zn(o)}function Bd(e,t){const n=t.get(e);if(n)return n;let o=Kn(e,[],!1).filter(a=>je(a)&&mt(a)!=="body"),r=null;const s=Rt(e).position==="fixed";let c=s?Ft(e):e;for(;je(c)&&!Dt(c);){const a=Rt(c),l=vs(c),f=r?r.position:s?"fixed":"";!l&&(f==="fixed"||f==="absolute"&&a.position==="static")?o=o.filter(p=>p!==c):r=a,c=Ft(c)}return t.set(e,o),o}function $d(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?tr(t)?[]:Bd(t,this._c):[].concat(n),o],a=Wi(t,c[0],r);let l=a.top,f=a.right,u=a.bottom,p=a.left;for(let h=1;h<c.length;h++){const g=Wi(t,c[h],r);l=Xt(g.top,l),f=Fn(g.right,f),u=Fn(g.bottom,u),p=Xt(g.left,p)}return{width:f-p,height:u-l,x:p,y:l}}
vendor: 10,948 bytes, lines 1-17
1function jd(e){const{width:t,height:n}=La(e);return{width:t,height:n}}function Ud(e,t,n){const o=Ze(t),r=Zt(t),s=n==="fixed",c=bn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Kt(0);if((o||!s)&&((mt(t)!=="body"||eo(r))&&(a=nr(t)),o)){const h=bn(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!o&&r&&(l.x=hr(r));const f=r&&!o&&!s?_a(r,a):Kt(0),u=c.left+a.scrollLeft-l.x-f.x,p=c.top+a.scrollTop-l.y-f.y;return{x:u,y:p,width:c.width,height:c.height}}function Lr(e){return Rt(e).position==="static"}function zi(e,t){if(!Ze(e)||Rt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zt(e)===n&&(n=n.ownerDocument.body),n}function Ha(e,t){const n=Ge(e);if(tr(e))return n;if(!Ze(e)){let r=Ft(e);for(;r&&!Dt(r);){if(je(r)&&!Lr(r))return r;r=Ft(r)}return n}let o=zi(e,t);for(;o&&Au(o)&&Lr(o);)o=zi(o,t);return o&&Dt(o)&&Lr(o)&&!vs(o)?n:o||Fu(e)||n}const Wd=async function(e){const t=this.getOffsetParent||Ha,n=this.getDimensions,o=await n(e.floating);return{reference:Ud(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zd(e){return Rt(e).direction==="rtl"}const Ba={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:Zt,getClippingRect:$d,getOffsetParent:Ha,getElementRects:Wd,getClientRects:Fd,getDimensions:jd,getScale:On,isElement:je,isRTL:zd};function $a(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yd(e,t,n){let o=null,r;const s=Zt(e);function c(){var u;clearTimeout(r),(u=o)==null||u.disconnect(),o=null}function a(u,p){u===void 0&&(u=!1),p===void 0&&(p=1),c();const h=e.getBoundingClientRect(),{left:g,top:d,width:y,height:v}=h;if(u||t(),!y||!v)return;const m=go(d),b=go(s.clientWidth-(g+y)),R=go(s.clientHeight-(d+v)),S=go(g),C={rootMargin:-m+"px "+-b+"px "+-R+"px "+-S+"px",threshold:Xt(0,Fn(1,p))||1};let w=!0;function E(I){const A=I[0].intersectionRatio;if(!$a(h,e.getBoundingClientRect()))return a();if(A!==p){if(!w)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(E,{...C,root:s.ownerDocument})}catch{o=new IntersectionObserver(E,C)}o.observe(e)}const l=Ge(e),f=()=>a(n);return l.addEventListener("resize",f),a(!0),()=>{l.removeEventListener("resize",f),c()}}function Yi(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=Us(e),u=r||s?[...f?Kn(f):[],...t?Kn(t):[]]:[];u.forEach(m=>{r&&m.addEventListener("scroll",n),s&&m.addEventListener("resize",n)});const p=f&&a?Yd(f,n,s):null;let h=-1,g=null;c&&(g=new ResizeObserver(m=>{let[b]=m;b&&b.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),f&&!l&&g.observe(f),t&&g.observe(t));let d,y=l?bn(e):null;l&&v();function v(){const m=bn(e);y&&!$a(y,m)&&n(),y=m,d=requestAnimationFrame(v)}return n(),()=>{var m;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),p==null||p(),(m=g)==null||m.disconnect(),g=null,l&&cancelAnimationFrame(d)}}const qd=Md,Xd=Id,Kd=Pd,Gd=Od,Zd=kd,Jd=(e,t,n)=>{const o=new Map,r=n??{},s={...Ba,...r.platform,_c:o};return Ed(e,t,{...r,platform:s})};var Qd=typeof document<"u",ep=function(){},ko=Qd?i.useLayoutEffect:ep;function Uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Uo(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Uo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ja(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qi(e,t){const n=ja(e);return Math.round(t*n)/n}function Vr(e){const t=i.useRef(e);return ko(()=>{t.current=e}),t}function tp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:c}={},transform:a=!0,whileElementsMounted:l,open:f}=e,[u,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=i.useState(o);Uo(h,o)||g(o);const[d,y]=i.useState(null),[v,m]=i.useState(null),b=i.useCallback(L=>{L!==C.current&&(C.current=L,y(L))},[]),R=i.useCallback(L=>{L!==w.current&&(w.current=L,m(L))},[]),S=s||d,x=c||v,C=i.useRef(null),w=i.useRef(null),E=i.useRef(u),I=l!=null,A=Vr(l),T=Vr(r),M=Vr(f),P=i.useCallback(()=>{if(!C.current||!w.current)return;const L={placement:t,strategy:n,middleware:h};T.current&&(L.platform=T.current),Jd(C.current,w.current,L).then(D=>{const V={...D,isPositioned:M.current!==!1};N.current&&!Uo(E.current,V)&&(E.current=V,Nt.flushSync(()=>{p(V)}))})},[h,t,n,T,M]);ko(()=>{f===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[f]);const N=i.useRef(!1);ko(()=>(N.current=!0,()=>{N.current=!1}),[]),ko(()=>{if(S&&(C.current=S),x&&(w.current=x),S&&x){if(A.current)return A.current(S,x,P);P()}},[S,x,P,A,I]);const O=i.useMemo(()=>({reference:C,floating:w,setReference:b,setFloating:R}),[b,R]),k=i.useMemo(()=>({reference:S,floating:x}),[S,x]),_=i.useMemo(()=>{const L={position:n,left:0,top:0};if(!k.floating)return L;const D=qi(k.floating,u.x),V=qi(k.floating,u.y);return a?{...L,transform:"translate("+D+"px, "+V+"px)",...ja(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:V}},[n,a,k.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:P,refs:O,elements:k,floatingStyles:_}),[u,P,O,k,_])}const np=(e,t)=>{const n=qd(e);return{name:n.name,fn:n.fn,options:[e,t]}},op=(e,t)=>{const n=Xd(e);return{name:n.name,fn:n.fn,options:[e,t]}},rp=(e,t)=>({fn:Zd(e).fn,options:[e,t]}),sp=(e,t)=>{const n=Kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},ip=(e,t)=>{const n=Gd(e);return{name:n.name,fn:n.fn,options:[e,t]}};var _r={exports:{}},Hr={};/** 2 * @license React 3 * use-sync-external-store-shim.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Xi;function cp(){if(Xi)return Hr;Xi=1;var e=zc();function t(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue;function a(p,h){var g=h(),d=o({inst:{value:g,getSnapshot:h}}),y=d[0].inst,v=d[1];return s(function(){y.value=g,y.getSnapshot=h,l(y)&&v({inst:y})},[p,g,h]),r(function(){return l(y)&&v({inst:y}),p(function(){l(y)&&v({inst:y})})},[p]),c(g),g}function l(p){var h=p.getSnapshot;p=p.value;try{var g=h();return!n(p,g)}catch{return!0}}function f(p,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Hr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Hr}var Ki;function Ua(){return Ki||(Ki=1,_r.exports=cp()),_r.exports}var mr=Ua(),Br={exports:{}},$r={};/** 10 * @license React 11 * use-sync-external-store-shim/with-selector.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var Gi;function ap(){if(Gi)return $r;Gi=1;var e=zc(),t=Ua();function n(f,u){return f===u&&(f!==0||1/f===1/u)||f!==f&&u!==u}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,c=e.useEffect,a=e.useMemo,l=e.useDebugValue;return $r.useSyncExternalStoreWithSelector=function(f,u,p,h,g){var d=s(null);if(d.current===null){var y={hasValue:!1,value:null};d.current=y}else y=d.current;d=a(function(){function m(C){if(!b){if(b=!0,R=C,C=h(C),g!==void 0&&y.hasValue){var w=y.value;if(g(w,C))return S=w}return S=C}if(w=S,o(R,C))return w;var E=h(C);return g!==void 0&&g(w,E)?(R=C,w):(R=C,S=E)}var b=!1,R,S,x=p===void 0?null:p;return[function(){return m(u())},x===null?void 0:function(){return m(x())}]},[u,p,h,g]);var v=r(f,d[0],d[1]);return c(function(){y.hasValue=!0,y.value=v},[v]),l(v),v},$r}var Zi;function lp(){return Zi||(Zi=1,Br.exports=ap()),Br.exports}var up=lp();const is=[];let cs;function fp(){return cs}function dp(e){is.push(e)}function yr(e){const t=(n,o)=>{const r=ut(pp).current;let s;try{cs=r;for(const c of is)c.before(r);s=e(n,o);for(const c of is)c.after(r);r.didInitialize=!0}finally{cs=void 0}return s};return t.displayName=e.displayName||e.name,t}function Wa(e){return i.forwardRef(yr(e))}function pp(){return{didInitialize:!1}}const gp=Cs(19),hp=gp?yp:bp;function za(e,t,n,o,r){return hp(e,t,n,o,r)}function mp(e,t,n,o,r){const s=i.useCallback(()=>t(e.getSnapshot(),n,o,r),[e,t,n,o,r]);return mr.useSyncExternalStore(e.subscribe,s,s)}dp({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const o=e.syncHooks[n],r=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,r)||(t=!0,o.value=r)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const r of e.syncHooks)n.add(r.store);const o=[];for(const r of n)o.push(r.subscribe(t));return()=>{for(const r of o)r()}}),mr.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function yp(e,t,n,o,r){const s=fp();if(!s)return mp(e,t,n,o,r);const c=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[c],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,o)||!Object.is(a.a3,r))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=o,a.a3=r,a.value=t(e.getSnapshot(),n,o,r))):(a={store:e,selector:t,a1:n,a2:o,a3:r,value:t(e.getSnapshot(),n,o,r)},s.syncHooks.push(a)),a.value}function bp(e,t,n,o,r){return up.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,o,r))}class vp{constructor(t){Qe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Qe(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const o of this.listeners){if(n!==this.updateTick)return;o(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,o,r){return za(this,t,n,o,r)}}class ro extends vp{constructor(t,n={},o){super(t),this.context=n,this.selectors=o}useSyncedValue(t,n){i.useDebugValue(t);const o=this;
17fe(()=>{o.state[t]!==n&&o.set(t,n)},[o,t,n])}useSyncedValueWithCleanup(t,n){const o=this;fe(()=>(o.state[t]!==n&&o.set(t,n),()=>{o.set(t,void 0)}),[o,t,n])}useSyncedValues(t){const n=this,o=Object.values(t);fe(()=>{n.update(t)},[n,...o])}useControlledProp(t,n){i.useDebugValue(t);const o=this,r=n!==void 0;fe(()=>{r&&!Object.is(o.state[t],n)&&o.setState({...o.state,[t]:n})},[o,t,n,r])}select(t,n,o,r){const s=this.selectors[t];return s(this.state,n,o,r)}useState(t,n,o,r){return i.useDebugValue(t),za(this,this.selectors[t],n,o,r)}useContextCallback(t,n){i.useDebugValue(t);const o=te(n??ct);this.context[t]=o}useStateSetter(t){const n=i.useRef(void 0);return n.current===void 0&&(n.current=o=>{this.set(t,o)}),n.current}observe(t,n){let o;typeof t=="function"?o=t:o=this.selectors[t];let r=o(this.state);return n(r,r,this),this.subscribe(s=>{const c=o(s);if(!Object.is(r,c)){const a=r;r=c,n(c,a,this)}})}}const xp={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class Ws extends ro{constructor(n){const{syncOnly:o,nested:r,onOpenChange:s,triggerElements:c,...a}=n;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:ka(),nested:r,triggerElements:c},xp);Qe(this,"syncOpenEvent",(n,o)=>{(!n||!this.state.open||o!=null&&Af(o))&&(this.context.dataRef.current.openEvent=n?o:void 0)});Qe(this,"dispatchOpenChange",(n,o)=>{this.syncOpenEvent(n,o.event);const r={open:n,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",r)});Qe(this,"setOpen",(n,o)=>{var r,s,c,a;if(this.syncOnly){(s=(r=this.context).onOpenChange)==null||s.call(r,n,o);return}this.dispatchOpenChange(n,o),(a=(c=this.context).onOpenChange)==null||a.call(c,n,o)});this.syncOnly=o}}function Ya(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:o,floatingId:r,nested:s,onOpenChange:c}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,p=c,h=i.useRef(null);o===void 0&&h.current===null&&(h.current=new Ws({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:f,triggerElements:u,onOpenChange:p,floatingId:r,syncOnly:!0,nested:s}));const g=o??h.current;return t.useSyncedValue("floatingId",r),fe(()=>{const d={open:a,floatingId:r,referenceElement:l,floatingElement:f};je(l)&&(d.domReferenceElement=l),g.state.positionReference===g.state.referenceElement&&(d.positionReference=l),g.update(d)},[a,r,l,f,g]),g.context.onOpenChange=p,g.context.nested=s,g}function xn(e,t=!1,n=!1,o=!1){const[r,s]=i.useState(e&&t?"idle":void 0),[c,a]=i.useState(e&&!o);return e&&!c&&(a(!0),s("starting")),!e&&c&&r!=="ending"&&!n&&s("ending"),!e&&!c&&r==="ending"&&s(void 0),fe(()=>{if(!e&&c&&r!=="ending"&&n){const l=wt.request(()=>{s("ending")});return()=>{wt.cancel(l)}}},[e,c,r,n]),fe(()=>{if(!e||t)return;const l=wt.request(()=>{s(void 0)});return()=>{wt.cancel(l)}},[t,e]),fe(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&s("starting");const l=wt.request(()=>{s("idle")});return()=>{wt.cancel(l)}},[t,e,c,r]),{mounted:c,setMounted:a,transitionStatus:r}}let mo=null;function Rp(e){if(!mo){const t=[];mo=t,queueMicrotask(()=>{mo=null,Nt.flushSync(()=>{for(const n of t)n()})})}mo.push(e)}function br(e,t=!1,n=!1){const o=cn();return te((r,s=null)=>{o.cancel();const c=Yt(e);if(c==null)return;const a=c,l=()=>{if(!n){Nt.flushSync(r);return}Rp(()=>{s!=null&&s.aborted||r()})};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function f(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||l()},()=>{if(s!=null&&s.aborted)return;if(a.getAnimations().some(p=>p.pending||p.playState!=="finished")){f();return}l()})}if(t){const u=Es;if(!a.hasAttribute(u)){o.request(f);return}const p=new MutationObserver(()=>{a.hasAttribute(u)||(p.disconnect(),f())});p.observe(a,{attributes:!0,attributeFilter:[u]}),s==null||s.addEventListener("abort",()=>p.disconnect(),{once:!0});return}o.request(f)})}function It(e){const{enabled:t=!0,open:n,ref:o,batch:r=!1,onComplete:s}=e,c=te(s),a=br(o,n,r);i.useEffect(()=>{if(!t)return;const l=new AbortController;return a(c,l.signal),()=>{l.abort()}},[t,n,c,a])}const so={tabIndex:-1,[Qr]:""};function Sp(e){return t=>t==="touch"?e.current:!0}function qa(e,t=!1){const n=sn(),o=fn()!=null,r=ut(()=>e(n,o)).current;return Ya({popupStore:r,treatPopupAsFloatingElement:t,floatingRootContext:r.state.floatingRootContext,floatingId:n,nested:o,onOpenChange:r.setOpen}),r}function zs({handle:e,store:t}){return fe(()=>e.attachStore(t),[e,t]),null}function Ji(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function wp(e,t){const n=i.useRef(null);return te(o=>{const r=n.current;if(r!==null){if(r.element===o&&r.store===t&&r.id===e)return;n.current=null;const s=r.store;s.context.triggerElements.getById(r.id)===r.element&&(s.context.triggerElements.delete(r.id),Ji(s))}o!==null&&e!==void 0&&(n.current={store:t,id:e,element:o},t.context.triggerElements.add(e,o),Ji(t))})}function Ys(e,t,n,o=!1){let r=e.preventUnmountingOnClose;t?r=!1:o&&(r=!0);const s=(n==null?void 0:n.id)??null;
17let c=e.activeTriggerId,a=e.activeTriggerElement;return(s||t)&&(c=s,a=n??null),{open:t,preventUnmountingOnClose:r,activeTriggerId:c,activeTriggerElement:a}}function Xa(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Cp(e,t,n,o={}){var u,p,h;const r=n.reason,s=r===gt,c=t&&r===Mn,a=!t&&(r===un||r===sr),l=Xa(n);if((p=(u=e.context).onOpenChange)==null||p.call(u,t,n),n.isCanceled)return;(h=o.onBeforeDispatch)==null||h.call(o),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const g=Ys(e.state,t,n.trigger,l()),d={...o.extraState,...g};c?d.instantType="focus":a?d.instantType="dismiss":s&&(d.instantType=void 0),e.update(d)};s?Nt.flushSync(f):f()}function Ka(e,t,n,o){const r=n.useState("isMountedByTrigger",e),s=wp(e,n),c=te(l=>{const f=n.select("open"),u=n.select("activeTriggerId");if(u===e){const p={activeTriggerElement:l,...f?o:null};n.update(p);return}if(u==null&&f){const p={activeTriggerId:e??null,activeTriggerElement:l,...o};n.update(p)}}),a=te(l=>{s(l),l&&c(l)});return fe(()=>(a(t.current),()=>a(null)),[a,t,n,e]),fe(()=>{if(r){const l={activeTriggerElement:t.current,...o};n.update(l)}},[r,n,t,...Object.values(o)]),{registerTrigger:a,isMountedByThisTrigger:r}}function qs(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,o=i.useRef(null),r=e.useState("open"),s=e.useState("triggerCount"),c=e.useState("activeTriggerId"),a=e.useState("activeTriggerElement");fe(()=>{if(!r){o.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const l=e.context.triggerElements.size,f={};e.state.triggerCount!==l&&(f.triggerCount=l);const u=e.select("activeTriggerId");let p=null;if(u){const h=e.context.triggerElements.getById(u);if(h)o.current=u,h!==e.state.activeTriggerElement&&(f.activeTriggerElement=h);else{for(const[g,d]of e.context.triggerElements.entries())if(d===e.state.activeTriggerElement){f.activeTriggerId=g,f.activeTriggerElement=d,o.current=g;break}f.activeTriggerId===void 0&&(o.current===u?p=u:o.current=null)}}else o.current=null;if(!p&&!u&&l===1){const h=e.context.triggerElements.entries().next();if(!h.done){const[g,d]=h.value;f.activeTriggerId=g,f.activeTriggerElement=d,o.current=g}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),p&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===p&&!e.context.triggerElements.getById(p)){const h=Oe(vt);e.setOpen(!1,h),h.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,c,a,n])}function Xs(e,t,n,o){const{mounted:r,setMounted:s,transitionStatus:c}=xn(e,!1,!1,o),a=t.useState("preventUnmountingOnClose"),l=e?!1:a;t.useSyncedValues({mounted:r,transitionStatus:c,preventUnmountingOnClose:l});const f=te(()=>{var u,p;s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(p=(u=t.context).onOpenChangeComplete)==null||p.call(u,!1)});return It({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||f()}}),{forceUnmount:f,transitionStatus:c}}function Ks(e,t){e.useSyncedValues(t),fe(()=>()=>{e.update({activeTriggerProps:Je,inactiveTriggerProps:Je,popupProps:Je})},[e])}function Ep(e,t){fe(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),fe(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class vr{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function Gs(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ws({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Je,inactiveTriggerProps:Je,popupProps:Je}}const qn=e=>
17e.triggerIdProp??e.activeTriggerId,Zs=e=>e.openProp??e.open,Qi=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function Ga(e,t){return t!==void 0&&Zs(e)&&qn(e)===t}function Pp(e,t){return Ga(e,t)?!0:t!==void 0&&Zs(e)&&qn(e)==null&&e.triggerCount===1}const Js={open:Zs,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:qn,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Qi,isTriggerActive:(e,t)=>t!==void 0&&qn(e)===t,isOpenedByTrigger:(e,t)=>Ga(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&qn(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Pp(e,t)?Qi(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Za(e){const t=i.useCallback(o=>e===void 0?ct:e.subscribeStore(o),[e]),n=i.useCallback(()=>e===void 0?void 0:e.store,[e]);return mr.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function Tp(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,r=sn(),s=fn()!=null,c=ut(()=>new Ws({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new vr,floatingId:r,syncOnly:!1,nested:s})).current;return fe(()=>{const a={open:t,floatingId:r};o.reference!==void 0&&(a.referenceElement=o.reference,a.domReferenceElement=je(o.reference)?o.reference:null),o.floating!==void 0&&(a.floatingElement=o.floating),c.update(a)},[t,r,o.reference,o.floating,c]),c.context.onOpenChange=n,c.context.nested=s,c}function Mp(e){return Ip(e,e.rootContext)}function Ip(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),s=t.useState("floatingElement"),c=t.useState("domReferenceElement"),a=t.useState("open"),l=t.useState("floatingId"),[f,u]=i.useState(null),[p,h]=i.useState(void 0),[g,d]=i.useState(void 0),y=i.useRef(null),v=dn(o),m=i.useMemo(()=>({reference:r,floating:s,domReference:c}),[r,s,c]),b=tp({...e,elements:{...m,...f&&{reference:f}}}),R=je(p)?p:null,S=g===void 0?t.state.floatingElement:g;t.useSyncedValue("referenceElement",p??null),t.useSyncedValue("domReferenceElement",p===void 0?c:R),t.useSyncedValue("floatingElement",S);const x=i.useCallback(T=>{const M=je(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;u(M),b.refs.setReference(M)},[b.refs]),C=i.useCallback(T=>{(je(T)||T===null)&&(y.current=T,h(T)),(je(b.refs.reference.current)||b.refs.reference.current===null||T!==null&&!je(T))&&b.refs.setReference(T)},[b.refs,h]),w=i.useCallback(T=>{d(T),b.refs.setFloating(T)},[b.refs]),E=i.useMemo(()=>({...b.refs,setReference:C,setFloating:w,setPositionReference:x,domReference:y}),[b.refs,C,w,x]),I=i.useMemo(()=>({...b.elements,domReference:c}),[b.elements,c]),A=i.useMemo(()=>({...b,dataRef:t.context.dataRef,open:a,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:E,elements:I,nodeId:n,rootStore:t}),[b,E,I,n,t,a,l]);return fe(()=>{c&&(y.current=c)},[c]),fe(()=>{t.context.dataRef.current.floatingContext=A;const T=v==null?void 0:v.nodesRef.current.find(M=>M.id===n);T&&(T.context=A)}),i.useMemo(()=>({...b,context:A,refs:E,elements:I,rootStore:t}),[b,E,I,A,t])}const jr=ks&&Qt;function Ja(e,t={}){const{enabled:n=!0,delay:o}=t,r="rootStore"in e?e.rootStore:e,{events:s,dataRef:c}=r.context,a=i.useRef(!1),l=i.useRef(null),f=i.useRef(!0),u=lt();i.useEffect(()=>{const h=r.select("domReferenceElement");if(!n)return;const g=Ge(h);function d(){const m=r.select("domReferenceElement");!r.select("open")&&Ze(m)&&m===pt($e(m))&&(a.current=!0,l.current=m)}function y(){f.current=!0}function v(){f.current=!1}return jt(We(g,"blur",d),jr&&We(g,"keydown",y,!0),jr&&We(g,"pointerdown",v,!0))},[r,n]),i.useEffect(()=>{if(!n)return;function h(g){if(g.reason===un||g.reason===sr){const d=r.select("domReferenceElement");je(d)&&(l.current=d,a.current=!0)}}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,n,r]);const p=i.useMemo(()=>{function h(){a.current=!1,l.current=null}return{onMouseLeave(){h()},onFocus(g){const d=g.currentTarget;if(a.current){if(l.current===d)return;h()}const y=st(g.nativeEvent);
17if(je(y)){if(jr&&!g.relatedTarget){if(!f.current&&!fr(y))return}else if(!aa(y))return}const v=Ho(g.relatedTarget,r.context.triggerElements),{nativeEvent:m,currentTarget:b}=g,R=typeof o=="function"?o():o;if(r.select("open")&&v||R===0||R===void 0){r.setOpen(!0,Oe(Mn,m,b));return}u.start(R,()=>{a.current||r.setOpen(!0,Oe(Mn,m,b))})},onBlur(g){h();const d=g.relatedTarget,y=g.nativeEvent,v=je(d)&&d.hasAttribute(Jn("focus-guard"))&&d.getAttribute("data-type")==="outside";u.start(0,()=>{var S;const m=r.select("domReferenceElement"),b=pt($e(m));!d&&b===m||Te((S=c.current.floatingContext)==null?void 0:S.refs.floating.current,b)||Te(m,b)||v||Ho(d??b,r.context.triggerElements)||r.setOpen(!1,Oe(Mn,y))})}}},[c,o,r,u]);return i.useMemo(()=>n?{reference:p,trigger:p}:{},[n,p])}class Qs{constructor(){Qe(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Qe(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Lt,this.restTimeout=new Lt,this.handleCloseOptions=void 0}static create(){return new Qs}}const Wo=new WeakMap;function zo(e){var n,o,r;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Wo.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(o=e.pointerEventsReferenceElement)==null||o.style.removeProperty("pointer-events"),(r=e.pointerEventsFloatingElement)==null||r.style.removeProperty("pointer-events"),Wo.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Qa(e,t){const{scopeElement:n,referenceElement:o,floatingElement:r}=t,s=Wo.get(n);s&&s!==e&&zo(s),zo(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=r,Wo.set(n,e),n.style.pointerEvents="none",o.style.pointerEvents="auto",r.style.pointerEvents="auto"}function ei(e){const t=e.context.dataRef.current,n=ut(()=>t.hoverInteractionState??Qs.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Is(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function el(e,t={}){const{enabled:n=!0,closeDelay:o=0,nodeId:r}=t,s="rootStore"in e?e.rootStore:e,c=s.useState("open"),a=s.useState("floatingElement"),l=s.useState("domReferenceElement"),{dataRef:f}=s.context,u=dn(),p=fn(),h=ei(s),g=lt(),d=te(()=>{var m;return la((m=f.current.openEvent)==null?void 0:m.type,h.interactedInside)}),y=te(()=>{var m;return Lf((m=f.current.openEvent)==null?void 0:m.type)}),v=te(()=>{zo(h)});fe(()=>{c||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,v())},[c,h,v]),i.useEffect(()=>v,[v]),fe(()=>{var m,b,R,S,x;if(n&&c&&(m=h.handleCloseOptions)!=null&&m.blockPointerEvents&&y()&&je(l)&&a){const C=l,w=a,E=$e(a),I=(R=(b=u==null?void 0:u.nodesRef.current.find(P=>P.id===p))==null?void 0:b.context)==null?void 0:R.elements.floating;I&&(I.style.pointerEvents="");const A=h.pointerEventsScopeElement!==w?h.pointerEventsScopeElement:null,T=I!==w?I:null,M=((x=(S=h.handleCloseOptions)==null?void 0:S.getScope)==null?void 0:x.call(S))??A??T??C.closest("[data-rootownerid]")??E.body;return Qa(h,{scopeElement:M,referenceElement:C,floatingElement:w}),()=>{v()}}},[n,c,l,a,h,y,u,p,v]),i.useEffect(()=>{if(!n)return;function m(){return!!(u&&p&&ln(u.nodesRef.current,p).length>0)}function b(E){const I=yn(o,"close",h.pointerType),A=()=>{s.setOpen(!1,Oe(gt,E)),u==null||u.events.emit("floating.closed",E)};I?h.openChangeTimeout.start(I,A):(h.openChangeTimeout.clear(),A())}function R(E){const I=st(E);if(!Nf(I)){h.interactedInside=!1;return}h.interactedInside=(I==null?void 0:I.closest("[aria-haspopup]"))!=null}function S(){h.openChangeTimeout.clear(),g.clear(),u==null||u.events.off("floating.closed",C),v()}function x(E){var M;if(m()&&u){u.events.on("floating.closed",C);return}if(Ho(E.relatedTarget,s.context.triggerElements))return;const I=((M=f.current.floatingContext)==null?void 0:M.nodeId)??r,A=E.relatedTarget;if(!(u&&I&&je(A)&&ln(u.nodesRef.current,I,!1).some(P=>{var N;return Te((N=P.context)==null?void 0:N.elements.floating,A)}))){if(h.handler){h.handler(E);return}v(),y()&&!d()&&b(E)}}function C(E){!u||!p||m()||g.start(0,()=>{u.events.off("floating.closed",C),s.setOpen(!1,Oe(gt,E)),u.events.emit("floating.closed",E)})}const w=a;return jt(w&&We(w,"mouseenter",S),w&&We(w,"mouseleave",x),w&&We(w,"pointerdown",R,!0),()=>{u==null||u.events.off("floating.closed",C)})},[n,a,s,f,o,r,y,d,v,h,u,p,g])}const kp={current:null};function tl(e,t={}){const{enabled:n=!0,delay:o=0,handleClose:r=null,mouseOnly:s=!1,restMs:c=0,move:a=!0,triggerElementRef:l=kp,externalTree:f,isActiveTrigger:u=!0,getHandleCloseContext:p,isClosing:h,shouldOpen:g,guardStaleOpen:d=!1}=t,y="rootStore"in e?e.rootStore:e,{dataRef:v,events:m}=y.context,b=dn(f),R=ei(y),S=i.useRef(!1),x=at(r),C=at(o),w=at(c),E=at(n),I=at(g),A=at(h),T=te(()=>{var k;return la((k=v.current.openEvent)==null?void 0:k.type,R.interactedInside)}),M=te(()=>{var k;return((k=I.current)==null?void 0:k.call(I))!==!1}),P=te((k,_,L)=>{const D=y.context.triggerElements;if(D.hasElement(_))return!k||!Te(k,_);if(!je(L))return!1;const V=L;return D.hasMatchingElement(B=>
17Te(B,V))&&(!k||!Te(k,V))}),N=te(()=>{if(!R.handler)return;$e(y.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),O=te(()=>{zo(R)});return u&&(R.handleCloseOptions=r==null?void 0:r.__options),i.useEffect(()=>N,[N]),i.useEffect(()=>{if(!n)return;function k(_){_.open?S.current=!1:(S.current=_.reason===gt,N(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return m.on("openchange",k),()=>{m.off("openchange",k)}},[n,m,R,N]),i.useEffect(()=>{if(!n)return;function k(H,z=!0){const F=yn(C.current,"close",R.pointerType);F?R.openChangeTimeout.start(F,()=>{y.setOpen(!1,Oe(gt,H)),b==null||b.events.emit("floating.closed",H)}):z&&(R.openChangeTimeout.clear(),y.setOpen(!1,Oe(gt,H)),b==null||b.events.emit("floating.closed",H))}const _=l.current??(u?y.select("domReferenceElement"):null);if(!je(_))return;function L(H){var ue;if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,s&&!rn(R.pointerType))return;const z=Mi(w.current),F=yn(C.current,"open",R.pointerType),j=st(H),$=H.currentTarget??null,Y=y.select("domReferenceElement");let U=$;if(je(j)&&!y.context.triggerElements.hasElement(j)){for(const q of y.context.triggerElements.elements())if(Te(q,j)){U=q;break}}je($)&&je(Y)&&!y.context.triggerElements.hasElement($)&&Te($,Y)&&(U=Y);const le=U==null?!1:P(Y,U,j),ae=y.select("open"),me=((ue=A.current)==null?void 0:ue.call(A))??y.select("transitionStatus")==="ending",Q=!ae&&me&&S.current,G=!le&&je(U)&&je(Y)&&Te(Y,U)&&Q,J=z>0&&!F,ie=le&&(ae||Q)||G,Re=!ae||le;if(ie){M()&&y.setOpen(!0,Oe(gt,H,U));return}J||(F?R.openChangeTimeout.start(F,()=>{Re&&M()&&y.setOpen(!0,Oe(gt,H,U))}):Re&&M()&&y.setOpen(!0,Oe(gt,H,U)))}function D(H){if(T()){O();return}N();const z=y.select("domReferenceElement"),F=$e(z);R.restTimeout.clear(),R.restTimeoutPending=!1;const j=v.current.floatingContext??(p==null?void 0:p());if(Ho(H.relatedTarget,y.context.triggerElements))return;if(x.current&&j){y.select("open")||R.openChangeTimeout.clear();const Y=l.current;R.handler=x.current({...j,tree:b,x:H.clientX,y:H.clientY,onClose(){O(),N(),E.current&&!T()&&Y===y.select("domReferenceElement")&&k(H,!0)}}),F.addEventListener("mousemove",R.handler),R.handler(H);return}(R.pointerType==="touch"?!Te(y.select("floatingElement"),H.relatedTarget):!0)&&k(H)}function V(H){Te(_,H.relatedTarget)||(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1)}const B=d?We(_,"mouseout",V):void 0;return a?jt(We(_,"mousemove",L,{once:!0}),We(_,"mouseenter",L),We(_,"mouseleave",D),B):jt(We(_,"mouseenter",L),We(_,"mouseleave",D),B)},[N,O,v,C,y,n,x,R,u,P,T,s,a,w,l,b,E,p,A,M,d]),i.useMemo(()=>{if(!n)return;function k(_){R.pointerType=_.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(_){var j,$,Y;const{nativeEvent:L}=_,D=_.currentTarget,V=y.select("domReferenceElement"),B=y.select("open"),H=P(V,D,_.target);if(s&&!rn(R.pointerType))return;if(B&&H&&((j=R.handleCloseOptions)!=null&&j.blockPointerEvents)){const U=y.select("floatingElement");if(U){const le=((Y=($=R.handleCloseOptions)==null?void 0:$.getScope)==null?void 0:Y.call($))??D.ownerDocument.body;Qa(R,{scopeElement:le,referenceElement:D,floatingElement:U})}}const z=Mi(w.current);if(B&&!H||z===0||!H&&R.restTimeoutPending&&_.movementX**2+_.movementY**2<2)return;R.restTimeout.clear();function F(){if(R.restTimeoutPending=!1,T())return;const U=y.select("open");!R.blockMouseMove&&(!U||H)&&M()&&y.setOpen(!0,Oe(gt,L,D))}R.pointerType==="touch"?Nt.flushSync(()=>{F()}):H&&B?F():(R.restTimeoutPending=!0,R.restTimeout.start(z,F))}}},[n,R,T,P,s,y,w,M])}const Op="Escape";function ec(e){return Qt&&e.movementX===0&&e.movementY===0}function xr(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function yo(e,t){return xr(t,e===ca||e===Ds,e===lr||e===ur)}function Ur(e,t,n){return xr(t,e===Ds,n?e===lr:e===ur)||e==="Enter"||e===" "||e===""}function Ap(e,t,n){return xr(t,n?e===lr:e===ur,e===Ds)}function Dp(e,t,n,o){const r=n?e===ur:e===lr,s=e===ca;return t==="both"||t==="horizontal"&&o?e===Op:xr(t,r,s)}function nl(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:s=!0,selectedIndex:c=null,allowEscape:a=!1,loopFocus:l=!1,nested:f=!1,rtl:u=!1,virtual:p=!1,focusItemOnOpen:h="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:d=!0,disabledIndices:y=void 0,orientation:v="vertical",parentOrientation:m,id:b,resetOnPointerLeave:R=!0,externalTree:S,grid:x}=t,C=x!=null,w="rootStore"in e?e.rootStore:e,E=w.useState("open"),I=w.useState("floatingElement"),A=w.useState("domReferenceElement"),T=w.context.dataRef,M=Bo(I),P=ts(A),N=at(M),O=fn(),k=dn(S),_=i.useRef(h),L=i.useRef(c??-1),D=i.useRef(null),V=i.useRef(!0),B=te(ne=>{r(L.current===-1?null:L.current,ne)}),H=i.useRef(!!I),z=i.useRef(E),F=i.useRef(!1),j=i.useRef(!1),$=i.useRef(null),Y=at(y),U=at(E),le=at(c),ae=at(R),me=cn(),Q=cn(),G=te(()=>{function ne(we){p?k==null||k.events.emit("virtualfocus",we):$.current=Io(we,{sync:F.current,preventScroll:!0})}const ve=n.current[L.current],se=j.current;ve&&ne(ve),(F.current?we=>we():we=>me.request(we))(()=>{var re;const we=n.current[L.current]||ve;if(!we)return;ve||ne(we),K&&(se||!V.current)&&((re=we.scrollIntoView)==null||re.call(we,{block:"nearest",inline:"nearest"}))})});fe(()=>{T.current.orientation=v},[T,v]),fe(()=>{s&&(E&&I?(L.current=c??-1,_.current&&c!=null&&(j.current=!0,B())):H.current&&(L.current=-1,B()))},[s,E,I,c,B]),fe(()=>{if(s){if(!E){F.current=!1;return}if(I)if(o==null){if(F.current=!1,le.current!=null)return;if(H.current&&(L.current=-1,G()),(!z.current||!H.current)&&_.current&&(D.current!=null||_.current===!0&&D.current==null)){let ne=0;const ve=()=>{n.current[0]==null?(ne<2&&(ne?X=>Q.request(X):queueMicrotask)(ve),ne+=1):(L.current=D.current==null||Ur(D.current,v,u)||f?Mo(n):os(n),D.current=null,B())};
17ve()}}else Yn(n.current,o)||(L.current=o,G(),j.current=!1)}},[s,E,I,o,le,f,n,v,u,B,G,Q]),fe(()=>{var we,Z;if(!s||I||!k||p||!H.current)return;const ne=k.nodesRef.current,ve=(Z=(we=ne.find(re=>re.id===O))==null?void 0:we.context)==null?void 0:Z.elements.floating,se=pt($e(A??ve??null)),X=ne.some(re=>re.context&&Te(re.context.elements.floating,se));ve&&!X&&V.current&&ve.focus({preventScroll:!0})},[s,I,A,k,O,p]),fe(()=>{z.current=E,H.current=!!I}),fe(()=>{E||(D.current=null,_.current=h)},[E,h]);const J=o!=null,ie=te(ne=>{if(!U.current)return;const ve=n.current.indexOf(ne.currentTarget);ve!==-1&&(L.current!==ve||o!==ve)&&(L.current=ve,B(ne))}),Re=te(()=>{var ne,ve,se;return m??((se=(ve=(ne=k==null?void 0:k.nodesRef.current.find(X=>X.id===O))==null?void 0:ne.context)==null?void 0:ve.dataRef)==null?void 0:se.current.orientation)}),ue=te(()=>Mo(n,Y.current)),q=te(ne=>{if(V.current=!1,F.current=!0,ne.which===229||!U.current&&ne.currentTarget===N.current)return;if(f&&Dp(ne.key,v,u,C)){yo(ne.key,Re())||Ot(ne),w.setOpen(!1,Oe(Jr,ne.nativeEvent)),Ze(A)&&(p?k==null||k.events.emit("virtualfocus",A):A.focus());return}const ve=L.current,se=Mo(n,y),X=os(n,y);if(P||(ne.key==="Home"&&(Ot(ne),L.current=se,B(ne)),ne.key==="End"&&(Ot(ne),L.current=X,B(ne))),x!=null){const we=x(ne,L.current,n,v,l,u,y,se,X);if(we!=null&&(L.current=we,B(ne)),v==="both")return}if(yo(ne.key,v)){if(Ot(ne),E&&!p&&pt(ne.currentTarget.ownerDocument)===ne.currentTarget){L.current=Ur(ne.key,v,u)?se:X,B(ne);return}Ur(ne.key,v,u)?l?ve>=X?a&&ve!==n.current.length?L.current=-1:(F.current=!1,L.current=se):L.current=qt(n.current,{startingIndex:ve,disabledIndices:y}):L.current=Math.min(X,qt(n.current,{startingIndex:ve,disabledIndices:y})):l?ve<=se?a&&ve!==-1?L.current=n.current.length:(F.current=!1,L.current=X):L.current=qt(n.current,{startingIndex:ve,decrement:!0,disabledIndices:y}):L.current=Math.max(se,qt(n.current,{startingIndex:ve,decrement:!0,disabledIndices:y})),Yn(n.current,L.current)&&(L.current=-1),B(ne)}}),K=i.useMemo(()=>({onFocus(ve){F.current=!0,ie(ve)},onClick:({currentTarget:ve})=>ve.focus({preventScroll:!0}),onMouseMove(ve){ec(ve)||(F.current=!0,j.current=!1,g&&ie(ve))},onPointerLeave(ve){var X;if(!U.current||!V.current||ve.pointerType==="touch")return;F.current=!0;const se=ve.relatedTarget;if(!(!g||n.current.includes(se))&&ae.current&&((X=$.current)==null||X.call($),$.current=null,L.current=-1,B(ve),!p)){const we=N.current,Z=pt($e(we));we&&Te(we,Z)&&we.focus({preventScroll:!0})}}}),[ie,U,N,g,n,B,ae,p]),ce=i.useMemo(()=>p&&E&&J&&{"aria-activedescendant":`${b}-${o}`},[p,E,J,b,o]),ee=i.useMemo(()=>({...P?{}
17:ce,onKeyDown(ne){if(ne.key==="Tab"&&ne.shiftKey&&E&&!p){const ve=st(ne.nativeEvent);if(ve&&!Te(N.current,ve))return;Ot(ne),w.setOpen(!1,Oe(mn,ne.nativeEvent)),Ze(A)&&A.focus();return}q(ne)},onPointerMove(ne){ec(ne)||(V.current=!0)}}),[ce,q,N,P,w,E,p,A]),oe=i.useMemo(()=>{function ne(X){w.setOpen(!0,Oe(Jr,X.nativeEvent,X.currentTarget))}function ve(X){h==="auto"&&ar(X.nativeEvent)&&(_.current=!p)}function se(X){_.current=h,h==="auto"&&As(X.nativeEvent)&&(_.current=!0)}return{onKeyDown(X){const we=w.select("open");V.current=!1;const Z=X.key.startsWith("Arrow"),re=Ap(X.key,Re(),u),xe=yo(X.key,v),ye=(f?re:xe)||X.key==="Enter"||X.key.trim()==="";if(p&&we)return q(X);if(!(!we&&!d&&Z)){if(ye){const pe=yo(X.key,Re());D.current=f&&pe?null:X.key}if(f){re&&(Ot(X),we?(L.current=ue(),B(X)):ne(X));return}xe&&(le.current!=null&&(L.current=le.current),Ot(X),!we&&d?ne(X):q(X),we&&B(X))}},onFocus(X){w.select("open")&&!p&&(L.current=-1,B(X))},onPointerDown:se,onPointerEnter:se,onMouseDown:ve,onClick:ve}},[q,h,ue,f,B,w,d,v,Re,u,le,p]),Ie=i.useMemo(()=>({...ce,...oe}),[ce,oe]);return i.useMemo(()=>s?{reference:Ie,floating:ee,item:K,trigger:oe}:{},[s,Ie,ee,oe,K])}function ol(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:s,disabledIndices:c,onTyping:a,enabled:l=!0,resetMs:f=750,selectedIndex:u=null}=t,p="rootStore"in e?e.rootStore:e,h=p.useState("open"),g=lt(),d=i.useRef(""),y=i.useRef(u??r??-1),v=i.useRef(null),m=te(S=>{function x(N){return o==null?void 0:o.current[N]}function C(N){const O=x(N);return O&&!dr(O)||O!=null&&O.matches(":disabled")?!1:c==null||!In(Mt,N,c)}function w(N,O,k=0){if(N.length===0)return-1;const _=(k%N.length+N.length)%N.length,L=O.toLowerCase();for(let D=0;D<N.length;D+=1){const V=(_+D)%N.length,B=N[V];if(!(!(B!=null&&B.toLowerCase().startsWith(L))||!C(V)))return V}return-1}const E=n.current;if(d.current.length>0&&S.key===" "&&(Ot(S),a==null||a(!0)),d.current.length>0&&d.current[0]!==" "&&w(E,d.current)===-1&&S.key!==" "&&(a==null||a(!1)),E==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;h&&S.key!==" "&&(Ot(S),a==null||a(!0));const I=d.current==="";I&&(y.current=u??r??-1),E.every((N,O)=>{var k,_;return N&&C(O)?((k=N[0])==null?void 0:k.toLowerCase())!==((_=N[1])==null?void 0:_.toLowerCase()):!0})&&d.current===S.key&&(d.current="",y.current=v.current),d.current+=S.key,g.start(f,()=>{d.current="",y.current=v.current,a==null||a(!1)});const M=((I?u??r??-1:y.current)??0)+1,P=w(E,d.current,M);P!==-1?(s==null||s(P),v.current=P):S.key!==" "&&(d.current="",a==null||a(!1))}),b=te(S=>{const x=S.relatedTarget,C=p.select("domReferenceElement"),w=p.select("floatingElement");Te(C,x)||Te(w,x)||(g.clear(),d.current="",y.current=v.current,a==null||a(!1))});fe(()=>{!h&&u!==null||(g.clear(),v.current=null,d.current!==""&&(d.current=""))},[h,u,g]);const R=i.useMemo(()=>({onKeyDown:m,onBlur:b}),[m,b]);return i.useMemo(()=>l?{reference:R,floating:R}:{},[l,R])}const tc=.1,Np=tc*tc,tt=.5;function bo(e,t,n,o,r,s){return o>=t!=s>=t&&e<=(r-n)*(t-o)/(s-o)+n}function vo(e,t,n,o,r,s,c,a,l,f){let u=!1;return bo(e,t,n,o,r,s)&&(u=!u),bo(e,t,r,s,c,a)&&(u=!u),bo(e,t,c,a,l,f)&&(u=!u),bo(e,t,l,f,n,o)&&(u=!u),u}function Fp(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function xo(e,t,n,o,r,s){const c=Math.min(n,r),a=Math.max(n,r),l=Math.min(o,s),f=Math.max(o,s);return e>=c&&e<=a&&t>=l&&t<=f}function rl(e={}){const{blockPointerEvents:t=!1}=e,n=new Lt,o=({x:r,y:s,placement:c,elements:a,onClose:l,nodeId:f,tree:u})=>{const p=c==null?void 0:c.split("-")[0];let h=!1,g=null,d=null,y=typeof performance<"u"?performance.now():0;function v(b,R){const S=performance.now(),x=S-y;if(g===null||d===null||x===0)return g=b,d=R,y=S,!1;const C=b-g,w=R-d,E=C*C+w*w,I=x*x*Np;return g=b,d=R,y=S,E<I}function m(){n.clear(),l()}return function(R){n.clear();const S=a.domReference,x=a.floating;if(!S||!x||p==null||r==null||s==null)return;const{clientX:C,clientY:w}=R,E=st(R),I=R.type==="mouseleave",A=Te(x,E),T=Te(S,E);if(A&&(h=!0,!I))return;if(T&&(h=!1,!I)){h=!0;return}if(I&&je(R.relatedTarget)&&Te(x,R.relatedTarget))return;function M(){return!!(u&&ln(u.nodesRef.current,f).length>0)}function P(){M()||m()}if(M())return;const N=S.getBoundingClientRect(),O=x.getBoundingClientRect(),k=r>O.right-O.width/2,_=s>O.bottom-O.height/2,L=O.width>N.width,D=O.height>N.height,V=(L?N:O).left,B=(L?N:O).right,H=(D?N:O).top,z=(D?N:O).bottom;if(p==="top"&&s>=N.bottom-1||p==="bottom"&&s<=N.top+1||p==="left"&&r>=N.right-1||p==="right"&&r<=N.left+1){P();return}let F=!1;switch(p){case"top":F=xo(C,w,V,N.top+1,B,O.bottom-1);break;case"bottom":F=xo(C,w,V,O.top+1,B,N.bottom-1);break;case"left":F=xo(C,w,O.right-1,z,N.left+1,H);break;case"right":F=xo(C,w,N.right-1,z,O.left+1,H);break}if(F)return;if(h&&!Fp(C,w,N)){P();return}if(!I&&v(C,w)){P();return}let j=!1;switch(p){case"top":{const $=L?tt/2:tt*4,Y=L||k?r+$:r-$,U=L?r-$:k?r+$:r-$,le=s+tt+1,ae=k||L?O.bottom-tt:O.top,me=k?L?O.bottom-tt:O.top:O.bottom-tt;j=vo(C,w,Y,le,U,le,O.left,ae,O.right,me);break}case"bottom":{const $=L?tt/2:tt*4,Y=L||k?r+$:r-$,U=L?r-$:k?r+$:r-$,le=s-tt,ae=k||L?O.top+tt:O.bottom,me=k?L?O.top+tt:O.bottom:O.top+tt;j=vo(C,w,Y,le,U,le,O.left,ae,O.right,me);break}case"left":{const $=D?tt/2:tt*4,Y=D||_?s+$:s-$,U=D?s-$:_?s+$:s-$,le=r+tt+1,ae=_||D?O.right-tt:O.left,me=_?D?O.right-tt:O.left:O.right-tt;j=vo(C,w,ae,O.top,me,O.bottom,le,Y,le,U);break}case"right":{const $=D?tt/2:tt*4,Y=D||_?s+$:s-$,U=D?s-$:_?s+$:s-$,le=r-tt,ae=_||D?O.left+tt:O.right,me=_?D?O.left+tt:O.right:O.left+tt;j=vo(C,w,le,Y,le,U,ae,O.top,me,O.bottom);break}}j?h||n.start(40,P):P()}};return o.__options={...e,blockPointerEvents:t},o}const sl=i.createContext(void 0);function ti(){const e=i.useContext(sl);if(e===void 0)throw new Error(nt(26));return e}const Yo="ArrowUp",qo="ArrowDown",Xo="ArrowLeft",Ko="ArrowRight",Go="Home",Zo="End",il="PageUp",cl="PageDown",Rn=new Set([Yo,qo,Xo,Ko,Go,Zo]),Lp="Shift",Vp=[Lp,"Control","Alt","Meta"];function _p(e){return Ze(e)&&e.tagName==="INPUT"}function nc(e){return!!(_p(e)&&e.selectionStart!=null||Ze(e)&&e.tagName==="TEXTAREA")}function oc(e,t,n,o){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,s=e.scrollTop;const c=e.clientWidth<e.scrollWidth,a=e.clientHeight<e.scrollHeight;if(c&&o!=="vertical"){const l=rc(e,t,"left"),f=Ro(e),u=Ro(t);n==="ltr"&&(l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?r=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:l-u.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(r=l-u.scrollMarginLeft-f.
vendor: 4,371 bytes, line 17
17scrollPaddingLeft)),n==="rtl"&&(l-u.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft?r=l-u.scrollMarginLeft-f.scrollPaddingLeft:l+t.offsetWidth+u.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(r=l+t.offsetWidth+u.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(a&&o!=="horizontal"){const l=rc(e,t,"top"),f=Ro(e),u=Ro(t);l-u.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?s=l-u.scrollMarginTop-f.scrollPaddingTop:l+t.offsetHeight+u.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(s=l+t.offsetHeight+u.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:r,top:s,behavior:"auto"})}function rc(e,t,n){const o=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[o],t.offsetParent!==e);)t=t.offsetParent;return r}function Ro(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const Hp="--nested-dialogs",Bp="data-nested-dialog-open",al={...to,...Jt,nestedDialogOpen(e){return e?{[Bp]:""}:null}},a0=i.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:c,initialFocus:a,...l}=t,f=Ct(),u=f.useState("descriptionElementId"),p=f.useState("disablePointerDismissal"),h=f.useState("floatingRootContext"),g=f.useState("popupProps"),d=f.useState("modal"),y=f.useState("mounted"),v=f.useState("nested"),m=f.useState("nestedOpenDialogCount"),b=f.useState("open"),R=f.useState("openMethod"),S=f.useState("titleElementId"),x=f.useState("transitionStatus"),C=f.useState("role"),w=h.useState("floatingId");ti(),It({open:b,ref:f.context.popupRef,onComplete(){var P,N;b&&((N=(P=f.context).onOpenChangeComplete)==null||N.call(P,!0))}});const E=a===void 0?Sp(f.context.popupRef):a,I=m>0,A=f.useStateSetter("popupElement"),M=Ne("div",t,{state:{open:b,nested:v,transitionStatus:x,nestedDialogOpen:I},props:[g,{id:w,"aria-labelledby":S,"aria-describedby":u,role:C,...so,hidden:!y,onKeyDown(P){Rn.has(P.key)&&P.stopPropagation()},style:{[Hp]:m}},l],ref:[n,f.context.popupRef,A],stateAttributesMapping:al});return he.jsx(pr,{context:h,openInteractionType:R,disabled:!y,closeOnFocusOut:!p,initialFocus:E,returnFocus:c,modal:d!==!1,restoreFocus:"popup",children:M})});function ni(e){return Cs(19)?e:e?"true":void 0}const oi=i.forwardRef(function(t,n){const{cutout:o,...r}=t;let s;if(o){const c=o.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return he.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),$p=i.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,s=Ct(),c=s.useState("mounted"),a=s.useState("modal"),l=s.useState("open");return c||o?he.jsx(sl.Provider,{value:o,children:he.jsxs(Bs,{ref:n,...r,children:[c&&a===!0&&he.jsx(oi,{ref:s.context.internalBackdropRef,inert:ni(!l)}),t.children]})}):null});let sc={},ic={},cc="";function Rr(e,t){return eo(e)?e:t}function ac(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Rr(t,n)).overflowY)}function jp(e){if(typeof document>"u")return!1;const t=$e(e);return Ge(t).innerWidth-t.documentElement.clientWidth>0}function Up(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=$e(e),o=n.documentElement,r=n.body,s=Rr(o,r),c=s.style.overflowY,a=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const f=s.offsetWidth;return s.style.overflowY=c,o.style.scrollbarGutter=a,l===f}function Wp(e){const t=$e(e),n=t.documentElement,o=t.body,r=Rr(n,o),s={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,s)}}function zp(e){var g;const t=$e(e),n=t.documentElement,o=t.body,r=Ge(n);let s=0,c=0,a=!1;const l=wt.create();
17if(Qt&&(((g=r.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function f(){const d=r.getComputedStyle(n),y=r.getComputedStyle(o),b=(d.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,c=n.scrollLeft,sc={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},cc=n.style.scrollBehavior,ic={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const R=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,x=d.overflowY==="scroll"||y.overflowY==="scroll",C=d.overflowX==="scroll"||y.overflowX==="scroll",w=Math.max(0,r.innerWidth-o.clientWidth),E=Math.max(0,r.innerHeight-o.clientHeight),I=parseFloat(y.marginTop)+parseFloat(y.marginBottom),A=parseFloat(y.marginLeft)+parseFloat(y.marginRight),T=Rr(n,o);if(a=Up(e),a){n.style.scrollbarGutter=b,T.style.overflowY="hidden",T.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:b,overflowY:"hidden",overflowX:"hidden"}),(R||x)&&(n.style.overflowY="scroll"),(S||C)&&(n.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:I||E?`calc(100dvh - ${I+E}px)`:"100dvh",width:A||w?`calc(100vw - ${A+w}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),o.scrollTop=s,o.scrollLeft=c,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,sc),Object.assign(o.style,ic),a||(n.scrollTop=s,n.scrollLeft=c,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=cc)}function p(){u(),l.request(f)}f();const h=We(r,"resize",p);return()=>{l.cancel(),u(),typeof r.removeEventListener=="function"&&h()}}class Yp{constructor(){Qe(this,"lockCount",0);Qe(this,"restore",null);Qe(this,"timeoutLock",Lt.create());Qe(this,"timeoutUnlock",Lt.create());Qe(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Qe(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=$e(t),o=n.documentElement,r=n.body,s=Ge(o);if(ac(s,o,r)){const a=new s.MutationObserver(()=>{ac(s,o,r)||(a.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};a.observe(o,l),a.observe(r,l),this.restore=()=>a.disconnect();return}const c=cr||!jp(t);this.restore=c?Wp(t):zp(t)}}const qp=new Yp;function ll(e=!0,t=null){fe(()=>{if(e)return qp.acquire(t)},[e,t])}function Xp({store:e,parentContext:t,isDrawer:n}){const o=e.useState("open"),r=e.useState("disablePointerDismissal"),s=e.useState("modal"),c=e.useState("popupElement"),a=e.useState("floatingRootContext"),[l,f]=i.useState(0),[u,p]=i.useState(0),h=l===0,g=gr(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(d){if(!e.context.outsidePressEnabledRef.current||"button"in d&&d.button!==0)return!1;if("touches"in d){if(d.type==="touchend"){if(d.changedTouches.length!==1||d.touches.length!==0)return!1}else if(d.touches.length!==1)return!1}const y=st(d);if(h&&!r){if(s){const v=e.context.internalBackdropRef.current,m=e.context.backdropRef.current;return v||m?v===y||m===y||Te(y,c)&&!(y!=null&&y.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:h});return ll(o&&s===!0,c),e.useContextCallback("onNestedDialogOpen",(d,y)=>{f(d),p(y)}),fe(()=>(t!=null&&t.onNestedDialogOpen&&(o?t.onNestedDialogOpen(l+1,u+(n?1:0)):t.onNestedDialogOpen(0,0)),()=>{t!=null&&t.onNestedDialogOpen&&o&&t.onNestedDialogOpen(0,0)}),[n,o,l,u,t]),Ks(e,{activeTriggerProps:g.reference,inactiveTriggerProps:g.trigger,popupProps:g.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:u}),null}const Kp={...Js,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class Gp extends ro{constructor(n,o,r){const s=new vr,c=Zp(n,s,o,r);super(c,Jp(s),Kp);Qe(this,"setOpen",(n,o)=>{var r,s;o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),(s=(r=this.context).onOpenChange)==null||s.call(r,n,o),!o.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,o),this.update(Ys(this.state,n,o.trigger)))})}}function Zp(e,t,n,o=!1){return{...Gs(t,n,o),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Jp(e){return{popupRef:i.createRef(),backdropRef:i.createRef(),internalBackdropRef:i.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function ri(e,t){const{children:n,open:o,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:c,disablePointerDismissal:a=!1,modal:l=!0,actionsRef:f,handle:u,triggerId:p,defaultTr
17iggerId:h=null}=t,g=e==="drawer",d=e==="alert-dialog",y=d?!0:l,v=d||a,m=d?"alertdialog":"dialog",b=Ct(!0),R=b!=null,S={modal:y,disablePointerDismissal:v,nested:R,role:m},x=qa((T,M)=>new Gp({open:r,openProp:o,activeTriggerId:h,triggerIdProp:p,...S},T,M),!0);x.useControlledProp("openProp",o),x.useControlledProp("triggerIdProp",p),x.useSyncedValues(S),x.useContextCallback("onOpenChange",s),x.useContextCallback("onOpenChangeComplete",c);const C=x.useState("open"),w=x.useState("mounted"),E=x.useState("payload");Ep(x,C),qs(x);const{forceUnmount:I}=Xs(C,x);i.useImperativeHandle(f,()=>({unmount:I,close:()=>x.setOpen(!1,Oe(Ts))}),[I,x]);const A=C||w;return he.jsxs(na.Provider,{value:x,children:[u&&he.jsx(zs,{handle:u,store:x}),A&&he.jsx(Xp,{store:x,parentContext:b==null?void 0:b.context,isDrawer:g}),typeof n=="function"?n({payload:E}):n]})}const l0=yr(function(t){return ri("dialog",t)}),Qp=i.forwardRef(function(t,n){const{render:o,className:r,style:s,children:c,...a}=t,l=ti(),f=Ct(),u=f.useState("open"),p=f.useState("nested"),h=f.useState("transitionStatus"),g=f.useState("nestedOpenDialogCount"),d=f.useState("mounted"),y=f.useStateSetter("viewportElement"),v=g>0;return Ne("div",t,{enabled:l||d,state:{open:u,nested:p,transitionStatus:h,nestedDialogOpen:v},ref:[n,y],stateAttributesMapping:al,props:[{role:"presentation",hidden:!d,style:{pointerEvents:u?void 0:"none"},children:c},a]})}),eg=i.forwardRef(function(t,n){const{render:o,className:r,style:s,id:c,...a}=t,l=Ct(),f=dt(c);return l.useSyncedValueWithCleanup("titleElementId",f),Ne("h2",t,{ref:n,props:[{id:f},a]})});function tg(e){const t=i.useRef(""),n=i.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:i.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function Sn(e,t){const n=i.useRef(e),o=te(t);fe(()=>{n.current!==e&&o(n.current),n.current=e},[e,o])}function ng(e,t){const n=te((s,c)=>{(typeof e=="function"?e():e)||t(c||(cr?"touch":""))}),{onClick:o,onPointerDown:r}=tg(n);return i.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function ul(e){const[t,n]=i.useState(null),o=ng(e,n);return Sn(e,r=>{r&&!e&&n(null)}),i.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}/** 18 * @license lucide-react v0.477.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree. 22 */const og=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fl=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/** 23 * @license lucide-react v0.477.0 - ISC 24 * 25 * This source code is licensed under the ISC license. 26 * See the LICENSE file in the root directory of this source tree. 27 */var rg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 28 * @license lucide-react v0.477.0 - ISC 29 * 30 * This source code is licensed under the ISC license. 31 * See the LICENSE file in the root directory of this source tree. 32 */const sg=i.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:c,...a},l)=>i.createElement("svg",{ref:l,...rg,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:fl("lucide",r),...a},[...c.map(([f,u])=>i.createElement(f,u)),...Array.isArray(s)?s:[s]]));/** 33 * @license lucide-react v0.477.0 - ISC 34 * 35 * This source code is licensed under the ISC license. 36 * See the LICENSE file in the root directory of this source tree. 37 */const Ee=(e,t)=>{const n=i.forwardRef(({className:o,...r},s)=>i.createElement(sg,{ref:s,iconNode:t,className:fl(`lucide-${og(e)}`,o),...r}));return n.displayName=`${e}`,n};/** 38 * @license lucide-react v0.477.0 - ISC 39 * 40 * This source code is licensed under the ISC license. 41 * See the LICENSE file in the root directory of this source tree. 42 */const ig=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],u0=Ee("AlignCenter",ig);/** 43 * @license lucide-react v0.477.0 - ISC 44 * 45 * This source code is licensed under the ISC license. 46 * See the LICENSE file in the root directory of this source tree. 47 */const cg=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],f0=Ee("AlignJustify",cg);/** 48 * @license lucide-react v0.477.0 - ISC 49 * 50 * This source code is licensed under the ISC license. 51 * See the LICENSE file in the root directory of this source tree. 52 */const ag=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],d0=Ee("AlignLeft",ag);
52/** 53 * @license lucide-react v0.477.0 - ISC 54 * 55 * This source code is licensed under the ISC license. 56 * See the LICENSE file in the root directory of this source tree. 57 */const lg=[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]],p0=Ee("AlignStartVertical",lg);/** 58 * @license lucide-react v0.477.0 - ISC 59 * 60 * This source code is licensed under the ISC license. 61 * See the LICENSE file in the root directory of this source tree. 62 */const ug=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],g0=Ee("Archive",ug);/** 63 * @license lucide-react v0.477.0 - ISC 64 * 65 * This source code is licensed under the ISC license. 66 * See the LICENSE file in the root directory of this source tree. 67 */const fg=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],h0=Ee("ArrowLeft",fg);/** 68 * @license lucide-react v0.477.0 - ISC 69 * 70 * This source code is licensed under the ISC license. 71 * See the LICENSE file in the root directory of this source tree. 72 */const dg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],m0=Ee("ArrowRight",dg);/** 73 * @license lucide-react v0.477.0 - ISC 74 * 75 * This source code is licensed under the ISC license. 76 * See the LICENSE file in the root directory of this source tree. 77 */const pg=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],y0=Ee("ArrowUpFromLine",pg);/** 78 * @license lucide-react v0.477.0 - ISC 79 * 80 * This source code is licensed under the ISC license. 81 * See the LICENSE file in the root directory of this source tree. 82 */const gg=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],b0=Ee("ArrowUpRight",gg);/** 83 * @license lucide-react v0.477.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */const hg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],v0=Ee("ArrowUp",hg);/** 88 * @license lucide-react v0.477.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */const mg=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],x0=Ee("CalendarDays",mg);/** 93 * @license lucide-react v0.477.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const yg=[["path",{d:"m8.5 8.5-1 1a4.95 4.95 0 0 0 7 7l1-1",key:"1ff4ui"}],["path",{d:"M11.843 6.187A4.947 4.947 0 0 1 16.5 7.5a4.947 4.947 0 0 1 1.313 4.657",key:"1sbrv4"}],["path",{d:"M14 16.5V14",key:"1maf8j"}],["path",{d:"M14 6.5v1.843",key:"1a6u6t"}],["path",{d:"M10 10v7.5",key:"80pj65"}],["path",{d:"m16 7 1-5 1.367.683A3 3 0 0 0 19.708 3H21v1.292a3 3 0 0 0 .317 1.341L22 7l-5 1",key:"11a9mt"}],["path",{d:"m8 17-1 5-1.367-.683A3 3 0 0 0 4.292 21H3v-1.292a3 3 0 0 0-.317-1.341L2 17l5-1",key:"3mjmon"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],R0=Ee("CandyOff",yg);/** 98 * @license lucide-react v0.477.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const bg=[["path",{d:"m3 15 4-8 4 8",key:"1vwr6u"}],["path",{d:"M4 13h6",key:"1r9ots"}],["circle",{cx:"18",cy:"12",r:"3",key:"1kchzo"}],["path",{d:"M21 9v6",key:"anns31"}]],S0=Ee("CaseSensitive",bg);/** 103 * @license lucide-react v0.477.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree. 107 */const vg=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],w0=Ee("CheckCheck",vg);/** 108 * @license lucide-react v0.477.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const xg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],C0=Ee("Check",xg);
112/** 113 * @license lucide-react v0.477.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const Rg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],E0=Ee("ChevronDown",Rg);/** 118 * @license lucide-react v0.477.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const Sg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],P0=Ee("ChevronRight",Sg);/** 123 * @license lucide-react v0.477.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree. 127 */const wg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],T0=Ee("ChevronUp",wg);/** 128 * @license lucide-react v0.477.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const Cg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],M0=Ee("ChevronsUpDown",Cg);/** 133 * @license lucide-react v0.477.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const Eg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],I0=Ee("CircleCheck",Eg);/** 138 * @license lucide-react v0.477.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const Pg=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],k0=Ee("CircleDashed",Pg);/** 143 * @license lucide-react v0.477.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const Tg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],O0=Ee("CircleDot",Tg);/** 148 * @license lucide-react v0.477.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const Mg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],A0=Ee("CirclePlus",Mg);/** 153 * @license lucide-react v0.477.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const Ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],D0=Ee("CircleUser",Ig);/** 158 * @license lucide-react v0.477.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const kg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],N0=Ee("CircleX",kg);/** 163 * @license lucide-react v0.477.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const Og=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],F0=Ee("Circle",Og);/** 168 * @license lucide-react v0.477.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const Ag=[["path",{d:"M12.338 21.994A10 10 0 1 1 21.925 13.227",key:"1i7shu"}],["path",{d:"M12 6v6l2 1",key:"19cm8n"}],["path",{d:"m14 18 4 4 4-4",key:"1waygx"}],["path",{d:"M18 14v8",key:"irew45"}]],L0=Ee("ClockArrowDown",Ag);/** 173 * @license lucide-react v0.477.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const Dg=[["path",{d:"M13.228 21.925A10 10 0 1 1 21.994 12.338",key:"1fzlyi"}],["path",{d:"M12 6v6l1.562.781",key:"1ujuk9"}],["path",{d:"m14 18 4-4 4 4",key:"ftkppy"}],["path",{d:"M18 22v-8",key:"su0gjh"}]],V0=Ee("ClockArrowUp",Dg);
177/** 178 * @license lucide-react v0.477.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const Ng=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],_0=Ee("Clock",Ng);/** 183 * @license lucide-react v0.477.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const Fg=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],H0=Ee("CloudUpload",Fg);/** 188 * @license lucide-react v0.477.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const Lg=[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]],B0=Ee("Cog",Lg);/** 193 * @license lucide-react v0.477.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const Vg=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],$0=Ee("Copy",Vg);/** 198 * @license lucide-react v0.477.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const _g=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],j0=Ee("Download",_g);/** 203 * @license lucide-react v0.477.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const Hg=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],U0=Ee("EllipsisVertical",Hg);/** 208 * @license lucide-react v0.477.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const Bg=[["path",{d:"m15 18-.722-3.25",key:"1j64jw"}],["path",{d:"M2 8a10.645 10.645 0 0 0 20 0",key:"1e7gxb"}],["path",{d:"m20 15-1.726-2.05",key:"1cnuld"}],["path",{d:"m4 15 1.726-2.05",key:"1dsqqd"}],["path",{d:"m9 18 .722-3.25",key:"ypw2yx"}]],W0=Ee("EyeClosed",Bg);/** 213 * @license lucide-react v0.477.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree. 217 */const $g=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],z0=Ee("Eye",$g);/** 218 * @license lucide-react v0.477.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const jg=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Y0=Ee("FilePen",jg);/** 223 * @license lucide-react v0.477.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const Ug=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],q0=Ee("FileText",Ug);/** 228 * @license lucide-react v0.477.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const Wg=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],X0=Ee("FolderOpen",Wg);/** 233 * @license lucide-react v0.477.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const zg=[["path",{d:"M2 11.5V5a2 2 0 0 1 2-2h3.9c.7 0 1.3.3 1.7.9l.8 1.2c.4.6 1 .9 1.7.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-9.5",key:"a8xqs0"}],["path",{d:"M11.378 13.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1saktj"}]],K0=Ee("FolderPen",zg);/** 238 * @license lucide-react v0.477.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree. 242 */const Yg=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}
242]],G0=Ee("FolderPlus",Yg);/** 243 * @license lucide-react v0.477.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const qg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Z0=Ee("Globe",qg);/** 248 * @license lucide-react v0.477.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const Xg=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],J0=Ee("Heart",Xg);/** 253 * @license lucide-react v0.477.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const Kg=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Q0=Ee("House",Kg);/** 258 * @license lucide-react v0.477.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const Gg=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],ev=Ee("ImageOff",Gg);/** 263 * @license lucide-react v0.477.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const Zg=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],tv=Ee("Inbox",Zg);/** 268 * @license lucide-react v0.477.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const Jg=[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]],nv=Ee("Infinity",Jg);/** 273 * @license lucide-react v0.477.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const Qg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ov=Ee("Info",Qg);/** 278 * @license lucide-react v0.477.0 - ISC 279 * 280 * This source code is licensed under the ISC license. 281 * See the LICENSE file in the root directory of this source tree. 282 */const eh=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],rv=Ee("Keyboard",eh);/** 283 * @license lucide-react v0.477.0 - ISC 284 * 285 * This source code is licensed under the ISC license. 286 * See the LICENSE file in the root directory of this source tree. 287 */const th=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],sv=Ee("LayoutList",th);/** 288 * @license lucide-react v0.477.0 - ISC 289 * 290 * This source code is licensed under the ISC license. 291 * See the LICENSE file in the root directory of this source tree. 292 */const nh=[["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M15 6h6",key:"1jlkvy"}],["path",{d:"m3 13 3.553-7.724a.5.5 0 0 1 .894 0L11 13",key:"blevx4"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M4 11h6",key:"olkgv1"}]],iv=Ee("LetterText",nh);/** 293 * @license lucide-react v0.477.0 - ISC 294 * 295 * This source code is licensed under the ISC license. 296 * See the LICENSE file in the root directory of this source tree. 297 */const oh=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],cv=Ee("ListOrdered",oh);/** 298 * @license lucide-react v0.477.0 - ISC 299 * 300 * This source code is licensed under the ISC license. 301 * See the LICENSE file in the root directory of this source tree. 302 */const rh=[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]],av=Ee("ListTree",rh);/** 303 * @license lucide-react v0.477.0 - ISC 304 * 305 * This source code is licensed under the ISC license. 306 * See the LICENSE file in the root directory of this source tree. 307 */const sh=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lv=Ee("LoaderCircle",sh);/** 308 * @license lucide-react v0.477.0 - ISC 309 * 310 * This source code is licensed under the ISC license. 311 * See the LICENSE file in the root directory of this source tree. 312 */const ih=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],uv=Ee("LogOut",ih);/** 313 * @license lucide-react v0.477.0 - ISC 314 * 315 * This source code is licensed under the ISC license. 316 * See the LICENSE file in the root directory of this source tree. 317 */const ch=[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m15.2 4.9-.9-.4",key:"12wd2u"}],["path",{d:"m15.2 7.1-.9.4",key:"1r2vl7"}],["path",{d:"m16.9 3.2-.4-.9",key:"3zbo91"}],["path",{d:"m16.9 8.8-.4.9",key:"1qr2dn"}],["path",{d:"m19.5 2.3-.4.9",key:"1rjrkq"}],["path",{d:"m19.5 9.7-.4-.9",key:"heryx5"}],["path",{d:"m21.7 4.5-.9.4",key:"17fqt1"}],["path",{d:"m21.7 7.5-.9-.4",key:"14zyni"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]],fv=Ee("MonitorCog",ch);/** 318 * @license lucide-react v0.477.0 - ISC 319 * 320 * This source code is licensed under the ISC license. 321 * See the LICENSE file in the root directory of this source tree. 322 */const ah=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]],dv=Ee("MoonStar",ah);/** 323 * @license lucide-react v0.477.0 - ISC 324 * 325 * This source code is licensed under the ISC license. 326 * See the LICENSE file in the root directory of this source tree. 327 */const lh=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",ke
327y:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],pv=Ee("Paintbrush",lh);/** 328 * @license lucide-react v0.477.0 - ISC 329 * 330 * This source code is licensed under the ISC license. 331 * See the LICENSE file in the root directory of this source tree. 332 */const uh=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],gv=Ee("PanelLeft",uh);/** 333 * @license lucide-react v0.477.0 - ISC 334 * 335 * This source code is licensed under the ISC license. 336 * See the LICENSE file in the root directory of this source tree. 337 */const fh=[["path",{d:"M16.85 18.58a9 9 0 1 0-9.7 0",key:"d71mpg"}],["path",{d:"M8 14a5 5 0 1 1 8 0",key:"fc81rn"}],["circle",{cx:"12",cy:"11",r:"1",key:"1gvufo"}],["path",{d:"M13 17a1 1 0 1 0-2 0l.5 4.5a.5.5 0 1 0 1 0Z",key:"za5kbj"}]],hv=Ee("Podcast",fh);/** 338 * @license lucide-react v0.477.0 - ISC 339 * 340 * This source code is licensed under the ISC license. 341 * See the LICENSE file in the root directory of this source tree. 342 */const dh=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],mv=Ee("RefreshCw",dh);/** 343 * @license lucide-react v0.477.0 - ISC 344 * 345 * This source code is licensed under the ISC license. 346 * See the LICENSE file in the root directory of this source tree. 347 */const ph=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],yv=Ee("RotateCcw",ph);/** 348 * @license lucide-react v0.477.0 - ISC 349 * 350 * This source code is licensed under the ISC license. 351 * See the LICENSE file in the root directory of this source tree. 352 */const gh=[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],bv=Ee("Rss",gh);/** 353 * @license lucide-react v0.477.0 - ISC 354 * 355 * This source code is licensed under the ISC license. 356 * See the LICENSE file in the root directory of this source tree. 357 */const hh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],vv=Ee("Search",hh);/** 358 * @license lucide-react v0.477.0 - ISC 359 * 360 * This source code is licensed under the ISC license. 361 * See the LICENSE file in the root directory of this source tree. 362 */const mh=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]],xv=Ee("Share",mh);/** 363 * @license lucide-react v0.477.0 - ISC 364 * 365 * This source code is licensed under the ISC license. 366 * See the LICENSE file in the root directory of this source tree. 367 */const yh=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Rv=Ee("Sparkles",yh);/** 368 * @license lucide-react v0.477.0 - ISC 369 * 370 * This source code is licensed under the ISC license. 371 * See the LICENSE file in the root directory of this source tree. 372 */const bh=[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Sv=Ee("SquareCode",bh);/** 373 * @license lucide-react v0.477.0 - ISC 374 * 375 * This source code is licensed under the ISC license. 376 * See the LICENSE file in the root directory of this source tree. 377 */const vh=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],wv=Ee("Square",vh);/** 378 * @license lucide-react v0.477.0 - ISC 379 * 380 * This source code is licensed under the ISC license. 381 * See the LICENSE file in the root directory of this source tree. 382 */const xh=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Cv=Ee("Star",xh);/** 383 * @license lucide-react v0.477.0 - ISC 384 * 385 * This source code is licensed under the ISC license. 386 * See the LICENSE file in the root directory of this source tree. 387 */const Rh=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Ev=Ee("Sun",Rh);/** 388 * @license lucide-react v0.477.0 - ISC 389 * 390 * This source code is licensed under the ISC license. 391 * See the LICENSE file in the root directory of this source tree. 392 */const Sh=[["path",{d:"M17 6.1H3",key:"wptmhv"}],["path",{d:"M21 12.1H3",key:"1j38uz"}],["path",{d:"M15.1 18H3",key:"1nb16a"}]],Pv=Ee("Text",Sh);/** 393 * @license lucide-react v0.477.0 - ISC 394 * 395 * This source code is licensed under the ISC license. 396 * See the LICENSE file in the root directory of this source tree. 397 */const wh=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
397],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Tv=Ee("Trash2",wh);/** 398 * @license lucide-react v0.477.0 - ISC 399 * 400 * This source code is licensed under the ISC license. 401 * See the LICENSE file in the root directory of this source tree. 402 */const Ch=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Mv=Ee("TriangleAlert",Ch);/** 403 * @license lucide-react v0.477.0 - ISC 404 * 405 * This source code is licensed under the ISC license. 406 * See the LICENSE file in the root directory of this source tree. 407 */const Eh=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],Iv=Ee("Type",Eh);/** 408 * @license lucide-react v0.477.0 - ISC 409 * 410 * This source code is licensed under the ISC license. 411 * See the LICENSE file in the root directory of this source tree. 412 */const Ph=[["path",{d:"M16 12h6",key:"15xry1"}],["path",{d:"M8 12H2",key:"1jqql6"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 15 3-3-3-3",key:"wjy7rq"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}]],kv=Ee("UnfoldHorizontal",Ph);/** 413 * @license lucide-react v0.477.0 - ISC 414 * 415 * This source code is licensed under the ISC license. 416 * See the LICENSE file in the root directory of this source tree. 417 */const Th=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],Ov=Ee("UnfoldVertical",Th);/** 418 * @license lucide-react v0.477.0 - ISC 419 * 420 * This source code is licensed under the ISC license. 421 * See the LICENSE file in the root directory of this source tree. 422 */const Mh=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Av=Ee("Upload",Mh);/** 423 * @license lucide-react v0.477.0 - ISC 424 * 425 * This source code is licensed under the ISC license. 426 * See the LICENSE file in the root directory of this source tree. 427 */const Ih=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["path",{d:"M3 12h15a3 3 0 1 1 0 6h-4",key:"1cl7v7"}],["polyline",{points:"16 16 14 18 16 20",key:"1jznyi"}],["line",{x1:"3",x2:"10",y1:"18",y2:"18",key:"1h33wv"}]],Dv=Ee("WrapText",Ih);/** 428 * @license lucide-react v0.477.0 - ISC 429 * 430 * This source code is licensed under the ISC license. 431 * See the LICENSE file in the root directory of this source tree. 432 */const kh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Nv=Ee("X",kh),Fv=i.forwardRef(function(t,n){const{className:o,render:r,orientation:s="horizontal",style:c,...a}=t;return Ne("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},a]})}),Oh="data-valid",Ah="data-invalid",Sr={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Dh={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Nh={disabled:!1,...Dh},en={valid(e){return e===null?null:e?{[Oh]:""}:{[Ah]:""}}},Fh={invalid:void 0,name:void 0,validityData:{state:Sr,errors:[],error:"",value:"",initialValue:null},setValidityData:ct,disabled:void 0,setTouched:ct,setDirty:ct,setFilled:ct,setFocused:ct,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:Nh,registerFieldControl:ct,validation:{getValidationProps:(e,t=Je)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:ct,getInputControl:()=>null,commit:async()=>{},change:ct}},dl=i.createContext(Fh);function Ht(e=!0){const t=i.useContext(dl);
432if(t.setValidityData===ct&&!e)throw new Error(nt(28));return t}const Lh=i.createContext(void 0);function Vh(e=!1){const t=i.useContext(Lh);if(!t&&!e)throw new Error(nt(86));return t}const pl=i.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:ct,validationMode:"onSubmit",submitCountRef:{current:0}});function tn(){return i.useContext(pl)}const gl=i.createContext({controlId:void 0,registerControlId:ct,resetControlId:ct,labelId:void 0,setLabelId:ct,messageIds:[],setMessageIds:ct,getDescriptionProps:e=>e});function kt(){return i.useContext(gl)}const _h=function(t){const n=dt(),[o,r]=i.useState(n),[s,c]=i.useState(),[a,l]=i.useState([]),f=o===void 0?n:o,u=ut(()=>new Map),{messageIds:p}=kt(),h=te((v,m)=>{const b=u.current;m===void 0?b.delete(v):b.set(v,m),r(R=>{if(b.size===0)return R;let S;for(const x of b.values()){if(x===R)return R;S===void 0&&(S=x)}return S})}),g=te(()=>{u.current.size===0&&r(n)}),d=i.useCallback(v=>{const m=v["aria-describedby"]?v["aria-describedby"].split(" "):[];return m.push(...p,...a),{...v,"aria-describedby":Array.from(new Set(m)).join(" ")||void 0}},[p,a]),y=i.useMemo(()=>({controlId:f,registerControlId:h,resetControlId:g,labelId:s,setLabelId:c,messageIds:a,setMessageIds:l,getDescriptionProps:d}),[f,h,g,s,c,a,l,d]);return he.jsx(gl.Provider,{value:y,children:t.children})};function hl(e,t,n,o=!0,r){const[s,c]=i.useState(),a=dt(r?`${r}-label`:void 0),l=e??t??s;return fe(()=>{const f=e||t||!o?void 0:Hh(n.current,a);s!==f&&c(f)}),l}function Hh(e,t){const n=Bh(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Bh(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const r=e.nextElementSibling;if(r&&r.htmlFor===n)return r}const o=e.labels;return o&&o[0]}function Ln(e={}){const{id:t,enabled:n=!0}=e,{controlId:o,registerControlId:r,resetControlId:s}=kt(),c=dt(),a=ut(()=>Symbol()),l=i.useRef(!1),f=i.useRef(!1),u=te(()=>{!l.current||r===ct||(l.current=!1,r(a.current,void 0))});return fe(()=>{if(!n||r===ct){u();return}let p;if(t!==void 0)f.current=!0,p=t;else if(f.current)p=c;else{s();return}if(p===void 0){u();return}l.current=!0,r(a.current,p)},[t,n,r,s,c,a,u]),fe(()=>u,[u]),(n?o:void 0)??t??c}function $h(e,t){const n=dt(e);return fe(()=>(t(n),()=>{t(o=>o===n?void 0:o)}),[n,t]),n}function jh(e={}){const{id:t,fallbackControlId:n,native:o=!1,setLabelId:r,focusControl:s}=e,{controlId:c,setLabelId:a}=kt(),l=te(g=>{a(g),r==null||r(g)}),f=$h(t,l),u=c??n;function p(g){if(s){s(g,u);return}if(!u)return;const d=$e(g.currentTarget).getElementById(u);Ze(d)&&Uh(d)}function h(g){const d=st(g.nativeEvent);d!=null&&d.closest("button,input,select,textarea")||(!g.defaultPrevented&&g.detail>1&&g.preventDefault(),!o&&p(g))}return o?{id:f,htmlFor:u,onMouseDown:h}:{id:f,onClick:h,onPointerDown(g){g.preventDefault()}}}function Uh(e){e.focus({focusVisible:!0})}function as(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Wr=Object.keys(Sr);function Wh(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}function lc(e,t){let n=null;for(const o of e.keys())if(Wh(o,t)){if(!o.validity.valid)return o;n??(n=o)}return n}function uc(e){return{...Sr,valid:!e,customError:e}}function zr(e){return e&&e.validationMessage?[e.validationMessage]:[]}function zh(e){const{elementRef:t,formRef:n}=tn(),{setValidityData:o,validate:r,validityData:s,validationDebounceTime:c,invalid:a,markedDirtyRef:l,state:f,shouldValidateOnChange:u,validationMode:p,registeredFieldIdRef:h}=e,{controlId:g,getDescriptionProps:d}=kt(),y=lt(),v=i.useRef(null),m=ut(()=>new Map).current,b=i.useRef(0),R=i.useRef(null),S=i.useCallback((I,A)=>(m.set(I,A),()=>{m.delete(I)}),[m]),x=te(()=>{var A;const I=lc(m,t.current);return I&&((A=m.get(I))==null?void 0:A.controlRef.current)||null}),C=te(async(I,A=!1)=>{b.current+=1;const T=b.current;function M(F,j=a){const $=h.current??g;if($==null)return;const Y=n.current.fields.get($);if(!Y)return;const U=as(F,j);n.current.fields.set($,{...Y,validityData:U})}function P(F,j){const $=F.valid===!1?j:[];return{value:I,state:F,error:$[0]??"",errors:$,initialValue:s.initialValue}}
432function N(F,j){const $=F.validity.customError?F.validationMessage:"",Y=j.replace(/\r\n?/g,` 433`);F.setCustomValidity(Y),R.current=[F,Y,$]}function O(){const F=R.current;R.current=null,F&&(!F[0].willValidate||F[0].validationMessage===F[1])&&F[0].setCustomValidity(F[2])}function k(F,j,$){const Y=P(F,j);M(Y,$),o(Y)}function _(F){const j=Wr.reduce((Y,U)=>(Y[U]=F.validity[U],Y),{});let $=!1;for(const Y of Wr)if(Y!=="valid"){if(Y==="valueMissing"&&j[Y])$=!0;else if(j[Y])return j}return $&&!l.current&&(j.valid=!0,j.valueMissing=!1),j}function L(){return m.size>0?lc(m,t.current):v.current}let D=L();function V(){return D=L(),D!=null&&D.willValidate?_(D):uc(!1)}if(A){if(f.valid!==!1||!D)return;if(!D.validity.valueMissing){O();const F=L(),j=F!=null&&F.validity.customError?zr(F):[];k(uc(j.length>0),j,!1);return}for(const F of Wr)if(F!=="valid"&&F!=="valueMissing"&&F!=="customError"&&D.validity[F])return}y.clear(),O();let B=V(),H=zr(D);const z=u();if(H.length===0||z){const F=Array.from(n.current.fields.values()).reduce((Y,U)=>(U.name&&(Y[U.name]=U.getValue()),Y),{}),j=r(I,F);let $;if(typeof j=="object"&&j!==null&&"then"in j){if(B.valid===!1?k(B,H):(p==="onSubmit"||!s.state.customError)&&(B.valid=null,k(B,H)),$=await j,T!==b.current)return;B=V()}else $=j;H=$?[].concat($).filter(Boolean):[],H.length>0?(B.valid=!1,B.customError=!0,D!=null&&D.willValidate&&N(D,H.join(` 434`))):H=zr(D)}k(B,H)}),w=te((I,A=!1)=>{if(y.clear(),b.current+=1,A)return;const T=u();T&&I!==""&&c?y.start(c,()=>{C(I)}):C(I,!T)}),E=i.useCallback((I,A={})=>bt(d(A),f.valid===!1&&!f.disabled&&!I?{"aria-invalid":!0}:Je),[d,f.disabled,f.valid]);return i.useMemo(()=>({getValidationProps:E,inputRef:v,registeredInputs:m,registerInput:S,getInputControl:x,commit:C,change:w}),[E,m,S,x,C,w])}function Yh(e){const{change:t,commit:n,invalid:o,markedDirtyRef:r,name:s,setRegisteredFieldName:c,registeredFieldIdRef:a,setValidityData:l,validityData:f}=e,{formRef:u}=tn(),p=i.useRef(null),h=i.useRef(null),g=i.useRef(!1),d=te(()=>{const x=h.current;if(x)return x.getValue?x.getValue():x.value});function y(x){return x.value===void 0?d():x.value}const v=te(()=>{const x=h.current;if(r.current=!0,!x){n(f.value);return}n(y(x))});function m(){const x=h.current;!x||!x.id||u.current.fields.set(x.id,{getValue:d,name:s??x.name,controlRef:x.controlRef,validityData:as(f,o),validate:v})}function b(x=(C=>(C=h.current)==null?void 0:C.id)()){x&&u.current.fields.delete(x)}function R(x){if(g.current)return;g.current=!0;const C=y(x);l(w=>w.initialValue===C?w:{...w,initialValue:C})}fe(()=>{const x=h.current;!x||!x.id||(c(s?void 0:x.name),u.current.fields.set(x.id,{getValue:d,name:s??x.name,controlRef:x.controlRef,validityData:as(f,o),validate:v}))},[u,d,o,s,c,v,f]),fe(()=>{const x=u.current.fields;return()=>{var w;const C=(w=h.current)==null?void 0:w.id;C&&x.delete(C)}},[u]);const S=te((x,C)=>{var I;if(!C){p.current===x&&(p.current=null,t(void 0,!0),b(),h.current=null,c(void 0),a.current=void 0);return}const w=(I=h.current)==null?void 0:I.id,E=p.current;E&&E!==x&&t(void 0,!0),p.current=x,h.current=C,s||c(C.name),a.current=C.id,w&&w!==C.id&&b(w),R(C),m()});return[v,S]}const qh=i.forwardRef(function(t,n){var Re;const{errors:o,validationMode:r,submitCountRef:s}=tn(),{render:c,className:a,validate:l,validationDebounceTime:f=0,validationMode:u=r,name:p,disabled:h=!1,invalid:g,dirty:d,touched:y,actionsRef:v,style:m,...b}=t,R=(Re=Vh(!0))==null?void 0:Re.disabled,S=te(l||(()=>null)),x=R||h,[C,w]=i.useState(!1),[E,I]=i.useState(!1),[A,T]=i.useState(!1),[M,P]=i.useState(!1),N=d??E,O=y??C,k=i.useRef(N),_=i.useRef(void 0),[L,D]=i.useState(),V=p??L;fe(()=>{d!==void 0&&(k.current=d)},[d]);const B=te(ue=>{d===void 0&&(ue&&(k.current=!0),I(ue))}),H=te(ue=>{y===void 0&&w(ue)}),z=te(()=>u==="onChange"||u==="onSubmit"&&s.current>0),F=V&&Object.hasOwn(o,V)?o[V]:null,j=!!(Array.isArray(F)?F.length:F),$=g===!0||j,[Y,U]=i.useState({state:Sr,error:"",errors:[],value:null,initialValue:null}),le=!$&&(x?null:Y.state.valid),ae=i.useMemo(()=>({disabled:x,touched:O,dirty:N,valid:le,filled:A,focused:M}),[x,O,N,le,A,M]),me=zh({setValidityData:U,validate:S,validityData:Y,validationDebounceTime:f,invali
434d:$,markedDirtyRef:k,state:ae,shouldValidateOnChange:z,validationMode:u,registeredFieldIdRef:_}),[Q,G]=Yh({change:me.change,commit:me.commit,invalid:$,markedDirtyRef:k,name:p,setRegisteredFieldName:D,registeredFieldIdRef:_,setValidityData:U,validityData:Y});i.useImperativeHandle(v,()=>({validate:Q}),[Q]);const J=i.useMemo(()=>({invalid:$,name:V,validityData:Y,setValidityData:U,disabled:x,setTouched:H,setDirty:B,setFilled:T,setFocused:P,validationMode:u,shouldValidateOnChange:z,state:ae,registerFieldControl:G,validation:me}),[$,V,Y,x,H,B,T,P,u,z,ae,G,me]),ie=Ne("div",t,{ref:n,state:ae,props:b,stateAttributesMapping:en});return he.jsx(dl.Provider,{value:J,children:ie})}),Lv=i.forwardRef(function(t,n){return he.jsx(_h,{children:he.jsx(qh,{...t,ref:n})})}),Xh=i.createContext({disabled:!1});function si(){return i.useContext(Xh)}const Vv=i.forwardRef(function(t,n){const{render:o,className:r,style:s,id:c,nativeLabel:a=!0,...l}=t,f=Ht(!1),u=si(),{labelId:p}=kt(),h={...f.state,disabled:f.disabled||u.disabled},g=i.useRef(null),d=jh({id:p??c,native:a});return Ne("label",t,{ref:[n,g],state:h,props:[d,l],stateAttributesMapping:en})}),Kh={...en,...Jt},_v=i.forwardRef(function(t,n){const{render:o,id:r,className:s,match:c,style:a,...l}=t,f=dt(r),{validityData:u,state:p,name:h}=Ht(!1),{setMessageIds:g}=kt(),{errors:d}=tn(),y=h&&Object.hasOwn(d,h)?d[h]:null,v=!!(Array.isArray(y)?y.length:y),m=typeof c=="string";let b=!1;c===!0?b=!0:p.disabled?b=!1:m?b=!!u.state[c]:b=v||u.state.valid===!1;const{mounted:R,transitionStatus:S,setMounted:x}=xn(b);fe(()=>{if(!(!b||!f))return g(k=>k.concat(f)),()=>{g(k=>k.filter(_=>_!==f))}},[b,f,g]);const C=i.useRef(null),[w,E]=i.useState(null),[I,A]=i.useState(null);let T=u.error;!m&&v?T=y:u.errors.length>1&&(T=u.errors);let M=T;Array.isArray(T)&&(M=T.length>1?he.jsx("ul",{children:T.map(k=>he.jsx("li",{children:k},k))}):T[0]);const P=Array.isArray(T)?JSON.stringify(T):T;b&&P!==I&&(A(P),E(M)),It({open:b,ref:C,onComplete(){b||x(!1)}});const N={...p,transitionStatus:S},O=Ne("div",t,{ref:[n,C],state:N,props:[{id:f,children:b?M:w},l],stateAttributesMapping:Kh,enabled:R});return R?O:null}),Hv=i.forwardRef(function(t,n){const{render:o,id:r,className:s,style:c,...a}=t,l=dt(r),f=Ht(!1),u=si(),{setMessageIds:p}=kt(),h={...f.state,disabled:f.disabled||u.disabled};return fe(()=>{if(l)return p(d=>d.concat(l)),()=>{p(d=>d.filter(y=>y!==l))}},[l,p]),Ne("p",t,{ref:n,state:h,props:[{id:l},a],stateAttributesMapping:en})});function Vt({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=i.useRef(e!==void 0),[s,c]=i.useState(t),a=r&&e!==void 0?e:s,l=i.useCallback(f=>{r||c(f)},[]);return[a,l]}function io(e,t,n,o,r=!0,s){const{registerFieldControl:c}=Ht(),a=ut(()=>Symbol());fe(()=>{const l=a.current;if(!r){c(l,void 0);return}c(l,{controlRef:e,getValue:o,id:t,name:s,value:n})},[e,r,o,t,s,c,a,n]),fe(()=>{const l=a.current;return()=>{c(l,void 0)}},[c,a])}const Gh=i.forwardRef(function(t,n){const{render:o,className:r,id:s,name:c,value:a,disabled:l=!1,onValueChange:f,defaultValue:u,autoFocus:p=!1,style:h,...g}=t,{state:d,name:y,disabled:v,setTouched:m,setDirty:b,validityData:R,setFocused:S,setFilled:x,validationMode:C,validation:w}=Ht(),{clearErrors:E,elementRef:I,submitCountRef:A}=tn(),T=v||l,M=y??c,P={...d,disabled:T},{labelId:N}=kt(),O=Ln({id:s}),[k]=Vt({controlled:a,default:u,name:"FieldControl",state:"value"}),_=a!==void 0,L=_?k:void 0,D=L==null?void 0:String(L),V=te(()=>{var F;return(F=w.inputRef.current)==null?void 0:F.value});io(w.inputRef,O,D,V,!T,c),fe(()=>{var j;const F=D??((j=w.inputRef.current)==null?void 0:j.value);F!==void 0&&x(F!=="")},[D,w.inputRef,x]),Sn(D,()=>{D!==void 0&&(E(M),b(D!==(R.initialValue??"")),w.change(D))});const B=i.useRef(null),H=lt();return fe(()=>{p&&B.current===pt($e(B.current))&&S(!0)},[p,S]),Ne("input",t,{ref:[n,B],state:P,props:[{id:O,disabled:T,name:M,ref:w.inputRef,"aria-labelledby":N,autoFocus:p,..._?{value:L}:{defaultValue:u},onChange(F){const j=F.currentTarget.value,$=Oe(vt,F.nativeEvent);f==null||f(j,$),!_&&(b(j!==(R.initialValue??"")),x(j!==""),!F.nativeEvent.defaultPrevented&&!$.isCanceled&&(E(M),w.change(j)))},onFocus(){S(!0)}
434,onBlur(F){if(m(!0),S(!1),C==="onBlur"){const j=F.currentTarget.value;w.commit(j),_&&queueMicrotask(()=>{var Y;const $=(Y=w.inputRef.current)==null?void 0:Y.value;$!==void 0&&$!==j&&$!==(R.initialValue??"")&&w.commit($)})}},onKeyDown(F){if(F.currentTarget.tagName==="INPUT"&&F.key==="Enter"){m(!0);const j=F.currentTarget.value,$=F.currentTarget.form;if($&&$===I.current&&!F.defaultPrevented){const Y=F.currentTarget,U=A.current;H.start(0,()=>{A.current===U&&w.commit(Y.value)})}else w.commit(j)}}},g,F=>w.getValidationProps(T,F)],stateAttributesMapping:en})}),Bv=i.forwardRef(function(t,n){return he.jsx(Gh,{ref:n,...t})}),ml=i.createContext(void 0);function wr(e=!0){const t=i.useContext(ml);if(t===void 0&&!e)throw new Error(nt(25));return t}const yl=i.createContext(void 0);function bl(e){const t=i.useContext(yl);if(t===void 0&&!e)throw new Error(nt(33));return t}const ii=i.createContext(void 0);function wn(e){const t=i.useContext(ii);if(t===void 0&&!e)throw new Error(nt(36));return t}function Zh(e){const{closeOnClick:t,highlighted:n,id:o,nodeId:r,store:s,typingRef:c,itemRef:a,itemMetadata:l}=e,{events:f}=s.useState("floatingTreeRoot"),u=s.useState("open"),p=wr(!0),h=p!==void 0;return i.useMemo(()=>({id:o,role:"menuitem",tabIndex:u&&n?0:-1,onKeyDown(g){g.key===" "&&(c!=null&&c.current)&&g.preventDefault()},onMouseMove(g){r&&f.emit("itemhover",{nodeId:r,target:g.currentTarget})},onClick(g){t&&f.emit("close",{domEvent:g,reason:zn})},onMouseUp(g){if(p){const d=p.initialCursorPointRef.current;if(p.initialCursorPointRef.current=null,h&&d&&Math.abs(g.clientX-d.x)<=1&&Math.abs(g.clientY-d.y)<=1||h&&!ks&&g.button===2)return}a.current&&s.context.allowMouseUpTriggerRef.current&&(!h||g.button===2)&&l.type==="regular-item"&&Tn(a.current,g,{detail:1})}}),[t,n,o,f,r,u,s,c,a,p,h,l])}const Jh={type:"regular-item"};function Qh(e){const{closeOnClick:t,disabled:n,highlighted:o,id:r,store:s,typingRef:c=s.context.typingRef,nativeButton:a,itemMetadata:l,nodeId:f}=e,u=i.useRef(null),{getButtonProps:p,buttonRef:h}=_t({disabled:n,focusableWhenDisabled:!0,native:a,composite:!0}),g=Zh({closeOnClick:t,highlighted:o,id:r,nodeId:f,store:s,typingRef:c,itemRef:u,itemMetadata:l}),d=i.useCallback(v=>bt(g,{onMouseEnter(){l.type==="submenu-trigger"&&l.setActive()}},v,p),[g,p,l]),y=Tt(u,h);return i.useMemo(()=>({getItemProps:d,itemRef:y}),[d,y])}const vl=i.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function em(){return i.useContext(vl)}function Cr(e={}){const{guess:t,label:n,metadata:o,textRef:r,index:s}=e,{register:c,unregister:a,subscribeMapChange:l,nextIndexRef:f}=em(),u=i.useRef(-1),[p,h]=i.useState(s==null&&t?()=>{if(u.current===-1){const v=f.current;f.current+=1,u.current=v}return u.current}:-1),g=s??p,d=i.useRef(null),y=i.useCallback(v=>{const m=d.current;m&&a(m),d.current=v,v&&c(v,{metadata:o??null,index:s??null,label:n,textRef:r})},[s,c,a,o,n,r]);return fe(()=>{if(s==null)return l(v=>{var b;const m=d.current?(b=v.get(d.current))==null?void 0:b.index:null;m!=null&&h(m)})},[s,l]),{ref:y,index:g}}const tm=i.createContext(void 0),$v=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,[a,l]=i.useState(void 0),f=Ne("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...c}});return he.jsx(tm.Provider,{value:l,children:f})}),jv=i.forwardRef(function(t,n){const{render:o,className:r,id:s,label:c,nativeButton:a=!1,disabled:l=!1,closeOnClick:f=!0,style:u,...p}=t,h=Cr({guess:!0,label:c}),g=bl(!0),d=dt(s),{store:y}=wn(),v=y.useState("disabled"),m=l||v,b=y.useState("isActive",h.index),R=y.useState("itemProps"),{getItemProps:S,itemRef:x}=Qh({closeOnClick:f,disabled:m,highlighted:b,id:d,store:y,nativeButton:a,nodeId:g==null?void 0:g.context.nodeId,itemMetadata:Jh});return Ne("div",t,{state:{disabled:m,highlighted:b},props:[R,p,S],ref:[x,n,h.ref]})}),nm=i.createContext(void 0);function ci(e){return i.useContext(nm)}function Er(e){return e==="starting"?ld:Je}const Uv=i.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:c,...a}=t,{store:l}=wn(),{side:f,align:u}=bl(),p=ci()!=null,h=l.useState("open"),g=l.useState("transitionStatus"),d=l.useState("popupProps"),y=l.useState("mounted"),v=l.useState("instantType"),m=l.useState("activeTriggerElement"),b=l.useState("parent"),R=l.useState("lastOpenChangeReason"),S=l.useState("rootId"),x=l.useState("floatingRootContext"),C=l.useState("floatingTreeRoot"),w=l.useState("closeDelay"),E=l.useState("hoverEnabled"),I=l.useState("disabled"),A=l.useState("openMethod"),T=b.type==="context-menu";It({open:h,ref:l.context.popupRef,onComplete(){var k,_;h&&((_=(k=l.context).onOpenChangeComplete)==null||_.call(k,!0))}}),i.useEffect(()=>{function k(_){l.setOpen(!1,Oe(_.reason,_.domEvent))}return C.events.on("close",k),()=>{C.events.off("close",k)}},[C.events,l]),el(x,{enabled:E&&!I&&!T&&b.type!=="menubar",closeDelay:w});const M=l.useStateSetter("popupElement"),P={transitionStatus:g,side:f,align:u,open:h,nested:b.type==="menu",instant:v},N=Ne("div",t,{state:P,ref:[n,l.context.popupRef,M],stateAttributesMapping:no,props:[d,{onKeyDown(k){p&&Rn.has(k.key)&&k.stopPropagation()}},Er(g),a,{"data-rootownerid":S}]});let O=b.type===void 0||T;return(m||b.type==="menubar"&&R!==rr)&&(O=!0),he.jsx(pr,{context:x,openInteractionType:A,modal:T,disabled:!y,returnFocus:c===void 0?O:c,initialFocus:b.type!=="menu",restoreFocus:!0,externalTree:b.type!=="menubar"?C:void 0,previousFocusableElement:m,nextFocusableElement:b.type===void 0?l.context.triggerFocusTargetRef
434:void 0,beforeContentFocusGuardRef:b.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:N})}),xl=i.createContext(void 0);function om(){const e=i.useContext(xl);if(e===void 0)throw new Error(nt(32));return e}const Wv=i.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,{store:s,parent:c}=wn();if(!(s.useState("mounted")||o))return null;const f=c.type==="menu"||c.type==="menubar"?"group":void 0;return he.jsx(xl.Provider,{value:o,children:he.jsx(Bs,{ref:n,...r,portalOwnerRole:f})})}),rm=i.createContext(void 0);function Vn(){const e=i.useContext(rm);return(e==null?void 0:e.direction)??"ltr"}const sm=e=>({name:"arrow",options:e,async fn(t){var D,V;const{x:n,y:o,placement:r,rects:s,platform:c,elements:a,middlewareData:l}=t,{element:f,padding:u=0,offsetParent:p="real"}=an(e,t)||{};if(f==null)return{};const h=pa(u),g={x:n,y:o},d=Vs(r),y=Ls(d),v=await c.getDimensions(f),m=d==="y",b=m?"top":"left",R=m?"bottom":"right",S=m?"clientHeight":"clientWidth",x=s.reference[y]+s.reference[d]-g[d]-s.floating[y],C=g[d]-s.reference[d],w=p==="real"?await((D=c.getOffsetParent)==null?void 0:D.call(c,f)):a.floating;let E=a.floating[S]||s.floating[y];(!E||!await((V=c.isElement)==null?void 0:V.call(c,w)))&&(E=a.floating[S]||s.floating[y]);const I=x/2-C/2,A=E/2-v[y]/2-1,T=Math.min(h[b],A),M=Math.min(h[R],A),P=T,N=E-v[y]-M,O=E/2-v[y]/2+I,k=da(P,O,N),_=!l.arrow&&Gt(r)!=null&&O!==k&&s.reference[y]/2-(O<P?T:M)-v[y]/2<0,L=_?O<P?O-P:O-N:0;return{[d]:g[d]+L,data:{[d]:k,centerOffset:O-k-L,..._&&{alignmentOffset:L}},reset:_}}}),im=(e,t)=>{const{name:n,fn:o}=sm(e);return{name:n,fn:o,options:[e,t]}},cm={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,s=t===0&&n===0&&o===0&&r===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-n>=0||c.right-t>=0||c.bottom-n>=0||c.left-t>=0||s}}}},am={sideX:"left",sideY:"top"},lm="--available-width",um="--available-height",fm="--anchor-width",dm="--anchor-height",pm="--transform-origin",fc=lm,dc=um;function Rl(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function pc(e,t,n){const{rects:o,placement:r}=e;return{side:Rl(t,Pt(r),n),align:Gt(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function ai(e){return gm(e,Mp)}function gm(e,t){var ot,Xe;const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:f=5,sticky:u=!1,arrowPadding:p=5,disableAnchorTracking:h=!1,inline:g,keepMounted:d=!1,floatingRootContext:y,mounted:v,collisionAvoidance:m,shift:b,nodeId:R,adaptiveOrigin:S,lazyFlip:x=!1,externalTree:C}=e,[w,E]=i.useState(null);!v&&w!==null&&E(null);const I=m.side||"flip",A=m.align||"flip",T=m.fallbackAxisSide||"end",M=(b==null?void 0:b.crossAxis)??!1,P=b==null?void 0:b.rootBoundary,N=typeof n=="function"?n:void 0,O=te(N),k=N?O:n,_=at(n),L=at(v),V=Vn()==="rtl",B=w||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[r],H=c==="center"?B:`${B}-${c}`;let z=f;typeof z=="number"?z={top:z,right:z,bottom:z,left:z}:z&&(z={top:z.top||0,right:z.right||0,bottom:z.bottom||0,left:z.left||0});const F=1,j=r==="bottom"?F:0,$=r==="top"?F:0,Y=r==="right"?F:0,U=r==="left"?F:0,le={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:z},ae=i.useRef(null),me=at(s),Q=at(a),G=typeof s!="function"?s:0,J=typeof a!="function"?a:0,ie=[];g&&ie.push(g),ie.push(np(W=>{const ge=pc(W,r,V),be=typeof me.current=="function"?me.current(ge):me.current,Fe=typeof Q.current=="function"?Q.current(ge):Q.current;return{mainAxis:be,crossAxis:Fe,alignmentAxis:Fe}},[G,J,V,r]));const Re=A==="none"&&I!=="shift",ue=!Re&&(u||M||I==="shift"),q=I==="none"?null:sp({...le,padding:{top:z.top+F+j,right:z.right+F+U,bottom:z.bottom+F+$,left:z.left+F+Y},mainAxis:!M&&I==="flip",crossAxis:A==="flip"?"alignment":!1,fallbackAxisSideDirection:T}),K=Re?null:op({...le,rootBoundary:P,mainAxis:A!=="none",crossAxis:ue,limiter:u||M?void 0:rp(W=>{if(!ae.current)return{};const{width:ge,height:be}=ae.current.getBoundingClientRect(),Fe=Et(Pt(W.placement)),De=Fe==="y"?ge:be,Ve=Fe==="y"?z.left+z.right:z.top+z.bottom;return{offset:De/2+Ve/2}})},[le,u,M,P,z,A]);I==="shift"||A==="shift"||c==="center"?ie.push(K,q):ie.push(q,K),ie.push(ip({...le,apply({elements:{floating:W},availableWidth:ge,availableHeight:be,rects:Fe}){if(!L.current)return;const De=W.style;De.setProperty(fc,`${ge}px`),De.setProperty(dc,`${be}px`);const Ve=Ge(W).devicePixelRatio||1,{x:Pe,y:Be,width:Ce,height:ke}=Fe.reference,ze=(Math.round((Pe+Ce)*Ve)-Math.round(Pe*Ve))/Ve,Ue=(Math.round((Be+ke)*Ve)-Math.round(Be*Ve))/Ve;De.setProperty(fm,`${ze}px`),De.setProperty(dm,`${Ue}px`)}}),im(W=>({element:ae.current||$e(W.elements.floating).createElement("div"),padding:ae.current?p:0,offsetParent:"floating"}),[p]),{name:"transformOrigin",fn(W){var it,rt,ft,ht,Wt,Bt;const{elements:{floating:ge},middlewareData:be,placement:Fe,platform:De,rects:Ve,y:Pe}=W,Be=Pt(Fe),Ce=Gt(Fe),ke=Et(Be)==="y",ze=ae.current,Ue=typeof s=="function"?s(pc(W,r,V)):s;let Ke;if(!ze&&Ce&&Math.abs(ke?((it=be.shift)==null?void 0:it.x)||0:((rt=be.shift)==null?void 0:rt.y)||0)<=1)Ke=Ce==="start"===(ke&&((ft=De.isRTL)==null?void 0:ft.call(De,ge))===!0)?"100%":"
4340%";else{const xt=ke?((ht=be.arrow)==null?void 0:ht.x)||0:((Wt=be.arrow)==null?void 0:Wt.y)||0,yt=ke?(ze==null?void 0:ze.clientWidth)||0:(ze==null?void 0:ze.clientHeight)||0;Ke=`${xt+yt/2}px`}let qe=Be==="top"||Be==="left"?`calc(100% + ${Ue}px)`:`${-Ue}px`;return ue&&ke&&Math.abs(((Bt=be.shift)==null?void 0:Bt.y)||0)>Ue&&(qe=`${Ve.reference.y+Ve.reference.height/2-Pe}px`),ge.style.setProperty(pm,ke?`${Ke} ${qe}`:`${qe} ${Ke}`),{}}},cm,S),fe(()=>{!v&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,y]);const ce=i.useMemo(()=>({ancestorScroll:!h,elementResize:!h&&typeof ResizeObserver<"u",layoutShift:!h&&typeof IntersectionObserver<"u"}),[h]),{refs:ee,elements:oe,x:Ie,y:ne,middlewareData:ve,update:se,placement:X,context:we,isPositioned:Z,floatingStyles:re}=t({rootContext:y,open:d?v:void 0,placement:H,middleware:ie,strategy:o,whileElementsMounted:d?void 0:(...W)=>Yi(...W,ce),nodeId:R,externalTree:C}),{sideX:xe,sideY:ye}=ve.adaptiveOrigin||am,pe=Z?o:"fixed",de=i.useMemo(()=>{let W;return Z?S?W={position:pe,[xe]:Ie,[ye]:ne}:W={...re,position:pe}:W={position:pe,top:0,left:0},W[fc]="100vw",W[dc]="100vh",Z||(W.opacity=0),W},[S,pe,xe,Ie,ye,ne,re,Z]),Me=i.useRef(null);fe(()=>{if(!v)return;const W=_.current,ge=typeof W=="function"?W():W,Fe=(gc(ge)?ge.current:ge)||null||null;Fe!==Me.current&&(ee.setPositionReference(Fe),Me.current=Fe)},[v,ee,k,_]),i.useEffect(()=>{if(!v)return;const W=_.current;typeof W!="function"&&gc(W)&&W.current!==Me.current&&(ee.setPositionReference(W.current),Me.current=W.current)},[v,ee,k,_]),i.useEffect(()=>{if(d&&v&&oe.reference&&oe.floating)return Yi(oe.reference,oe.floating,se,ce)},[d,v,oe,se,ce]);const Le=Pt(X),Ae=Rl(r,Le,V),Se=Gt(X)||"center",_e=!!((ot=ve.hide)!=null&&ot.referenceHidden);fe(()=>{x&&v&&Z&&Le!==B&&E(Le)},[x,v,Z,Le,B]);const He=i.useMemo(()=>{var W,ge;return{position:"absolute",top:(W=ve.arrow)==null?void 0:W.y,left:(ge=ve.arrow)==null?void 0:ge.x}},[ve.arrow]),Ye=((Xe=ve.arrow)==null?void 0:Xe.centerOffset)!==0;return i.useMemo(()=>({positionerStyles:de,arrowStyles:He,arrowRef:ae,arrowUncentered:Ye,side:Ae,align:Se,physicalSide:Le,anchorHidden:_e,refs:ee,context:we,isPositioned:Z,update:se}),[de,He,ae,Ye,Ae,Se,Le,_e,ee,we,Z,se])}function gc(e){return e!=null&&"current"in e}function co(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=te(r),[,c]=i.useState(!1),a=ut(mm).current,l=ut(hm).current,f=i.useRef(0),u=i.useRef(!0),p=i.useRef(null),h=i.useRef(null),g=te(()=>{u.current||(u.current=!0,c(x=>!x))}),d=te((x,C)=>{l.set(x,C),g()}),y=te(x=>{l.delete(x),g()}),v=te(x=>{const C=new Map;return n.current.length=0,o&&(o.current.length=0),x.forEach(w=>{var E,I;C.set(w.element,{...w.registration.metadata??{},index:w.index}),n.current[w.index]=w.element,o&&(o.current[w.index]=w.registration.label!==void 0?w.registration.label:((I=(E=w.registration.textRef)==null?void 0:E.current)==null?void 0:I.textContent)??w.element.textContent)}),f.current=n.current.length,C});function m(x){var E;if((E=h.current)==null||E.disconnect(),h.current=null,typeof MutationObserver!="function"||x.length<2)return;const C=new MutationObserver(I=>{if(!vm(I))return;let A=null;for(const T of x)if(T.isConnected){if(A&&Sl(A,T)>0){C.disconnect(),g();return}A=T}});h.current=C;const w=new Set;for(let I=1;I<x.length;I+=1){const A=bm(x[I-1],x[I]);A&&w.add(A)}w.forEach(I=>C.observe(I,{childList:!0}))}const b=te(()=>{const[x,C]=ym(l),w=v(x),E=p.current,I=!E||E.length!==x.length||x.some((A,T)=>{const M=E[T];return A.index!==M.index||A.element!==M.element||A.registration.index!==M.registration.index||A.registration.metadata!==M.registration.metadata});m(C),p.current=x,u.current=!1,I&&(a.forEach(A=>A(w)),s(w))});fe(()=>(!u.current&&p.current&&v(p.current),()=>{n.current=[],o&&(o.current=[])}),[n,o,v]),fe(()=>{u.current&&b()}),fe(()=>()=>{var x;(x=h.current)==null||x.disconnect(),u.current=!0},[]);const R=te(x=>(a.add(x),()=>{a.delete(x)})),S=i.useMemo(()=>({register:d,unregister:y,subscribeMapChange:R,nextIndexRef:f}),[d,y,R,f]);return he.jsx(vl.Provider,{value:S,children:t})}function hm(){return new Map}function mm(){return new Set}function ym(e){const t=new Set,n=[],o=[];e.forEach((s,c)=>{if(!c.isConnected)return;const a=s.index,l={index:a??-1,element:c,registration:s};a===null?o.push(l):a>=0&&(t.add(a),n.push(l))});let r=0;return o.sort((s,c)=>Sl(s.element,c.element)),o.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,c)=>s.index-c.index),[n,o.map(s=>s.element)]}function bm(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function vm(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function Sl(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function li(e,t,{styles:n,transitionStatus:o,props:r,refs:s,hidden:c,inert:a=!1}){const l={...n};return a&&(l.pointerEvents="none"),Ne("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:c,style:l},Er(o),r],stateAttributesMapping:to})}const xm=20;function wl(e,t,n,o){const[r,s]=i.useState(!1);fe(()=>{if(!e||!t||n==null){s(!1);return}const c=$e(n).documentElement.clientWidth,a=n.offsetWidth;s(c>0&&a>0&&a>=c-xm)},[e,t,n]),ll(e&&(!t||r),o)}const Rm=i.forwardRef(function(t,n){var ce;const{anchor:o,positionMethod:r="absolute",className:s,render:c,side:a,align:l,sideOffset:f=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:h=5,arrowPadding:g=5,sticky:d=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=Ea,style:m,...b}=t,{store:R}
434=wn(),S=om(),x=wr(!0),C=R.useState("parent"),w=R.useState("floatingRootContext"),E=R.useState("floatingTreeRoot"),I=R.useState("mounted"),A=R.useState("open"),T=R.useState("modal"),M=R.useState("openMethod"),P=R.useState("activeTriggerElement"),N=R.useState("transitionStatus"),O=R.useState("positionerElement"),k=R.useState("instantType"),_=R.useState("adaptiveOrigin"),L=R.useState("lastOpenChangeReason"),D=R.useState("floatingNodeId"),V=R.useState("floatingParentNodeId"),B=w.useState("domReferenceElement"),H=i.useRef(null),z=br(O);let F=o,j=f,$=u,Y=l,U=v;C.type==="context-menu"&&(F=o??((ce=C.context)==null?void 0:ce.anchor),Y=Y??"start",!a&&Y!=="center"&&($=t.alignOffset??2,j=t.sideOffset??-5));let le=a,ae=Y;C.type==="menu"?(le=le??"inline-end",ae=ae??"start",U=t.collisionAvoidance??Pa):C.type==="menubar"&&(le=le??(C.context.orientation==="vertical"?"inline-end":"bottom"),ae=ae??"start");const me=C.type==="context-menu",Q=ai({anchor:F,floatingRootContext:w,positionMethod:x?"fixed":r,mounted:I,side:le,sideOffset:j,align:ae,alignOffset:$,arrowPadding:me?0:g,collisionBoundary:p,collisionPadding:h,sticky:d,nodeId:D,keepMounted:S,disableAnchorTracking:y,collisionAvoidance:U,shift:me?{crossAxis:!("side"in U&&U.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:E,adaptiveOrigin:_});i.useEffect(()=>{function ee(oe){oe.open&&(oe.parentNodeId===D&&R.set("hoverEnabled",!1),oe.nodeId!==D&&oe.parentNodeId===R.select("floatingParentNodeId")&&R.setOpen(!1,Oe(Un)))}return E.events.on("menuopenchange",ee),()=>{E.events.off("menuopenchange",ee)}},[R,E.events,D]),i.useEffect(()=>{if(R.select("floatingParentNodeId")==null)return;function ee(oe){if(oe.open||oe.nodeId!==R.select("floatingParentNodeId"))return;const Ie=oe.reason??Un;R.setOpen(!1,Oe(Ie))}return E.events.on("menuopenchange",ee),()=>{E.events.off("menuopenchange",ee)}},[E.events,R]);const G=lt();i.useEffect(()=>{A||G.clear()},[A,G]),i.useEffect(()=>{function ee(oe){if(!(!A||oe.nodeId!==R.select("floatingParentNodeId")))if(oe.target&&P&&P!==oe.target){const Ie=R.select("closeDelay");Ie>0?G.isStarted()||G.start(Ie,()=>{R.setOpen(!1,Oe(Un))}):R.setOpen(!1,Oe(Un))}else G.clear()}return E.events.on("itemhover",ee),()=>{E.events.off("itemhover",ee)}},[E.events,A,P,R,G]),i.useEffect(()=>{const ee={open:A,nodeId:D,parentNodeId:V,reason:R.select("lastOpenChangeReason")};E.events.emit("menuopenchange",ee)},[E.events,A,R,D,V]),fe(()=>{const ee=B,oe=H.current;if(ee&&(H.current=ee),oe&&ee&&ee!==oe){R.set("instantType",void 0);const Ie=new AbortController;return z(()=>{R.set("instantType","trigger-change")},Ie.signal),()=>{Ie.abort()}}},[B,z,R]);const J={open:A,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,nested:C.type==="menu",instant:k},ie=C.type==="menubar"&&C.context.modal;wl(A&&(ie||T&&L!==gt),M==="touch",O,P);const ue=li(t,J,{styles:Q.positionerStyles,transitionStatus:N,props:b,refs:[n,R.useStateSetter("positionerElement")],hidden:!I,inert:!A}),q=I&&C.type!=="menu"&&(C.type!=="menubar"&&T&&L!==gt||C.type==="menubar"&&C.context.modal);let K=null;return C.type==="menubar"?K=C.context.contentElement:C.type===void 0&&(K=P),he.jsxs(yl.Provider,{value:Q,children:[q&&he.jsx(oi,{ref:C.type==="context-menu"||C.type==="nested-context-menu"?C.context.internalBackdropRef:null,inert:ni(!A),cutout:K}),he.jsx(hd,{id:D,children:he.jsx(co,{elementsRef:R.context.itemDomElements,labelsRef:R.context.itemLabels,children:ue})})]})}),Sm=i.createContext(null);function Cl(e){return i.useContext(Sm)}const wm={...Js,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class Cm extends ro{constructor(n,o,r=!1){const s=new vr,c=Pm(s,o,r,n);super(c,Em(s),wm);Qe(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",a=>{var l;if((l=this.unsubscribeParentListener)==null||l.call(this),a.type==="menu"){let f=a.store.select("rootId"),u=a.store.select("floatingTreeRoot"),p=a.store.select("keyboardEventRelay");this.unsubscribeParentListener=a.store.subscribe(()=>{const h=a.store.select("rootId"),g=a.store.select("floatingTreeRoot"),d=a.store.select("keyboardEventRelay");f===h&&u===g&&p===d||(f=h,u=g,p=d,this.notifyAll())}),this.context.allowMouseUpTriggerRef=a.store.context.allowMouseUpTriggerRef;return}a.type!==void 0&&(this.context.allowMouseUpTriggerRef=a.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:o})}}function Em(e){return{positionerRef:i.createRef(),popupRef:i.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1}
434,triggerFocusTargetRef:i.createRef(),beforeContentFocusGuardRef:i.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Pm(e,t,n=!1,o){return{...Gs(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new $s,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Je,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}const Tm=i.createContext(void 0);function Mm(){return i.useContext(Tm)}const Im=yr(function(t){const{children:n,open:o,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:c=!1,disabled:a=!1,modal:l,loopFocus:f=!0,orientation:u="vertical",actionsRef:p,closeParentOnEsc:h=!1,handle:g,triggerId:d,defaultTriggerId:y=null,highlightItemOnHover:v=!0}=t,m=wr(!0),b=wn(!0),R=Cl(!0),S=Mm(),x=i.useMemo(()=>S&&b?{type:"menu",store:b.store}:R?{type:"menubar",context:R}:m&&!b?{type:"context-menu",context:m}:{type:void 0},[m,b,R,S]),C=sn(),w=sn(),E=fn(),I=x.type==="menu"?x.store:void 0,A=(o??c)&&(I==null?void 0:I.state.transitionStatus)==="starting",T=ut(()=>A?I==null?void 0:I.state.instantType:void 0).current,M=km({open:c,openProp:o,activeTriggerId:y,triggerIdProp:d,parent:x,disabled:a,highlightItemOnHover:v,modal:x.type===void 0?l:void 0,rootId:C,instantType:T},w,E!=null);M.useControlledProp("openProp",o),M.useControlledProp("triggerIdProp",d),M.useContextCallback("onOpenChangeComplete",s);const P=M.useState("floatingTreeRoot"),N=Da(P),O=M.useState("open"),k=M.useState("activeTriggerElement"),_=M.useState("positionerElement"),L=M.useState("hoverEnabled"),D=M.useState("disabled"),V=M.useState("lastOpenChangeReason"),B=M.useState("parent"),H=M.useState("activeIndex"),z=M.useState("payload"),F=M.useState("floatingParentNodeId"),j=i.useRef(null),$=i.useRef(B.type!=="context-menu"),Y=lt(),U=i.useRef(!0),le=lt(),ae=F!=null,{openMethod:me,triggerProps:Q}=ul(O);M.useSyncedValues({disabled:a,highlightItemOnHover:v,modal:B.type===void 0?l:void 0,openMethod:me,rootId:C}),qs(M);const{forceUnmount:G,transitionStatus:J}=Xs(O,M,()=>{M.set("allowMouseEnter",!1)},A),ie=br(M.context.popupRef);i.useEffect(()=>{if(T===void 0)return;const pe=()=>{M.state.instantType===T&&M.set("instantType",void 0)};if(!O){pe();return}if(J!==void 0)return;if(M.context.popupRef.current==null){pe();return}const de=new AbortController;return ie(pe,de.signal),()=>{de.abort()}},[T,O,J,ie,M]),fe(()=>{m&&!b?M.update({parent:{type:"context-menu",context:m},floatingNodeId:N,floatingParentNodeId:E}):b&&M.update({floatingNodeId:N,floatingParentNodeId:E})},[m,b,N,E,M]),i.useEffect(()=>{if(O||(j.current=null),B.type==="context-menu"){if(!O){Y.clear(),$.current=!1;return}Y.start(500,()=>{$.current=!0})}},[Y,O,B.type]),fe(()=>{!O&&!L&&M.set("hoverEnabled",!0)},[O,L,M]);const Re=te((pe,de)=>{const Me=de.reason;if(!pe&&!M.select("open")||O===pe&&de.trigger===k&&V===Me)return;const Le=Xa(de);if(!pe&&de.trigger==null&&(de.trigger=k??void 0),r==null||r(pe,de),de.isCanceled)return;M.state.floatingRootContext.dispatchOpenChange(pe,de);const Ae=de.event;if(pe===!1&&(Ae==null?void 0:Ae.type)==="click"&&Ae.pointerType==="touch"&&!U.current)return;pe&&Me===Mn?(U.current=!1,le.start(300,()=>{U.current=!0})):(U.current=!0,le.clear());const Se=(Me===un||Me===zn)&&Ae.detail===0,_e=!pe&&(Me===sr||Me==null);j.current=de.event;const He=Ys(M.state,pe,de.trigger,Le());He.openChangeReason=Me,B.type==="menubar"&&(Me===Mn||Me===mn||Me===gt||Me===Jr||Me===Un)?He.instantType="group":Se||_e?He.instantType=Se?"click":"dismiss":He.instantType=void 0,M.update(He)}),ue=Ya({popupStore:M,floatingRootContext:M.state.floatingRootContext,floatingId:w,nested:E!=null,onOpenChange:Re}),q=ue.context.events;fe(()=>{const pe=({open:de,eventDetails:Me})=>Re(de,Me);return q.on("setOpen",pe),()=>{q==null||q.off("setOpen",pe)}},[q,Re]);const K=i.useCallback(()=>{M.setOpen(!1,Oe(Ts))},[M]);i.useImperativeHandle(p,()=>({unmount:G,close:K}),[G,K]);let ce;B.type==="context-menu"&&(ce=B.context),i.useImperativeHandle(ce==null?void 0:ce.positionerRef,()=>_,[_]),i.useImperativeHandle(ce==null?void 0:ce.actionsRef,()=>({setOpen:Re}),[Re]);const ee=gr(ue,{enabled:!D,bubbles:{escapeKey:h&&B.type==="menu"},outsidePress(){var pe;return B.type!=="context-menu"||((pe=j.current)==null?void 0:pe.type)==="contextmenu"?!0:$.current},externalTree:ae?P:void 0}),oe=Vn(),Ie=i.useCallback(pe=>{M.select("activeIndex")!==pe&&M.set("activeIndex",pe)}
434,[M]),ne=nl(ue,{enabled:!D,listRef:M.context.itemDomElements,activeIndex:H,nested:B.type!==void 0,loopFocus:f,orientation:u,parentOrientation:B.type==="menubar"?B.context.orientation:void 0,rtl:oe==="rtl",disabledIndices:Mt,onNavigate:Ie,openOnArrowKeyDown:B.type!=="context-menu",externalTree:ae?P:void 0,focusItemOnHover:v}),ve=i.useCallback(pe=>{M.context.typingRef.current=pe},[M]),se=ol(ue,{enabled:!D,listRef:M.context.itemLabels,elementsRef:M.context.itemDomElements,activeIndex:H,resetMs:cd,onMatch:pe=>{O&&pe!==H&&M.set("activeIndex",pe)},onTyping:ve}),X=i.useMemo(()=>{const pe=bt(se.reference,ne.reference,ee.reference,{onMouseMove(){M.set("allowMouseEnter",!0)}},Q);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=O,pe},[M,se.reference,ne.reference,ee.reference,Q,O]),we=i.useMemo(()=>{const pe=bt(ne.trigger,ee.trigger,Q);return pe["aria-haspopup"]="menu",pe["aria-expanded"]=!1,pe},[ne.trigger,ee.trigger,Q]);ut(()=>(M.update({inactiveTriggerProps:we}),null));const Z=i.useMemo(()=>bt(so,{id:w,role:"menu","aria-orientation":u==="horizontal"?"horizontal":void 0,"aria-labelledby":k==null?void 0:k.id,onMouseMove(){M.set("allowMouseEnter",!0),B.type==="menu"&&M.set("hoverEnabled",!1)},onClick(){M.select("hoverEnabled")&&M.set("hoverEnabled",!1)},onKeyDown(pe){const de=M.select("keyboardEventRelay");de&&!pe.isPropagationStopped()&&de(pe)}},se.floating,ne.floating,ee.floating),[k,w,u,B.type,M,se.floating,ne.floating,ee.floating]),re=ne.item??Je;Ks(M,{floatingRootContext:ue,activeTriggerProps:X,inactiveTriggerProps:we,popupProps:Z,itemProps:re});const xe=i.useMemo(()=>({store:M,parent:x}),[M,x]),ye=he.jsxs(ii.Provider,{value:xe,children:[g&&he.jsx(zs,{handle:g,store:M}),typeof n=="function"?n({payload:z}):n]});return B.type===void 0||B.type==="context-menu"?he.jsx(md,{externalTree:P,children:ye}):ye});function km(e,t,n){return ut(()=>new Cm(e,t,n)).current}const So=5;function El(e,t){const n=Om(t);return e.clientX>=n.left-So&&e.clientX<=n.right+So&&e.clientY>=n.top-So&&e.clientY<=n.bottom+So}function Om(e){const t=e.getBoundingClientRect(),n=Ge(e);if(Os)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const c=parseFloat(o.width)||0,a=parseFloat(o.height)||0,l=parseFloat(r.width)||0,f=parseFloat(r.height)||0,u=Math.max(t.width,c,l),p=Math.max(t.height,a,f),h=u-t.width,g=p-t.height;return{left:t.left-h/2,right:t.right+h/2,top:t.top-g/2,bottom:t.bottom+g/2}}function Pl(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=or(),{ref:r,index:s}=Cr(e),c=n===s,a=i.useRef(null),l=Tt(r,a);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(s)},onMouseMove(){const u=a.current;if(!t||!u)return;const p=u.hasAttribute("disabled")||u.ariaDisabled==="true";!c&&!p&&u.focus()}},compositeRef:l,index:s}}function Tl(e){const{render:t,className:n,style:o,state:r=Je,props:s=Mt,refs:c=Mt,metadata:a,stateAttributesMapping:l,tag:f="div",...u}=e,{compositeProps:p,compositeRef:h}=Pl({metadata:a});return Ne(f,e,{state:r,ref:[h,...c],props:[p,...s,u],stateAttributesMapping:l})}function ui(e){if(Ze(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Dt(e))return ui(Ft(e))}function Am(e,t){const n=i.useRef(null);function o(s){Nt.flushSync(()=>{e.setOpen(!1,Oe(mn,s.nativeEvent,s.currentTarget))});const c=od(n.current);c==null||c.focus()}function r(s){var a;const c=e.select("positionerElement");if(c&&kn(s,c))(a=e.context.beforeContentFocusGuardRef.current)==null||a.focus();else{Nt.flushSync(()=>{e.setOpen(!1,Oe(mn,s.nativeEvent,s.currentTarget))});let l=nd(e.context.triggerFocusTargetRef.current||t.current);for(;l!==null&&Te(c,l);){const f=l;if(l=Hs(l),l===f)break}l==null||l.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:o,handleFocusTargetFocus:r}}function Dm(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,r=i.useRef(!1);return i.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!o||n==="close"&&o)&&(r.current=!0,$e(s.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:s=>{r.current&&(r.current=!1,s.preventBaseUIHandler())}}:Je,[t,n,o])}const zv=Wa(function(t,n){const{render:o,className:r,style:s,disabled:c=!1,nativeButton:a=!0,id:l,openOnHover:f,delay:u=100,closeDelay:p=0,handle:h,payload:g,...d}=t,y=wn(!0),m=Za(h)??(y==null?void 0:y.store);if(!m)throw new Error(nt(85));const b=dt(l),R=m.useState("isTriggerActive",b),S=m.useState("floatingRootContext"),x=m.useState("isOpenedByTrigger",b),C=m.useState("triggerPopupId",b),w=i.useRef(null),E=Fm(),I=or(!0),A=dn(),T=i.useMemo(()=>A??new $s,[A]),M=Da(T),P=fn(),{registerTrigger:N,isMountedByThisTrigger:O}=Ka(b,w,m,{payload:g,closeDelay:p,parent:E,floatingTreeRoot:T,floatingNodeId:M,floatingParentNodeId:P,keyboardEventRelay:I==null?void 0:I.relayKeyboardEvent}),k=E.type==="menubar",_=m.useState("disabled"),L=c||_||k&&E.context.disabled,{getButtonProps:D,buttonRef:V}=_t({disabled:L,native:a});i.useEffect(()=>{!x&&E.type===void 0&&(m.context.allowMouseUpTriggerRef.current=!1)},[m,x,E.type]);
434const B=i.useRef(null),H=lt(),z=te(ce=>{if(!B.current)return;H.clear(),m.context.allowMouseUpTriggerRef.current=!1;const ee=ce.target;Te(B.current,ee)||Te(m.select("positionerElement"),ee)||ee===B.current||ee!=null&&ui(ee)===m.select("rootId")||El(ce,B.current)||T.events.emit("close",{domEvent:ce,reason:Ps})});i.useEffect(()=>{x&&m.select("lastOpenChangeReason")===gt&&$e(B.current).addEventListener("mouseup",z,{once:!0})},[x,z,m]);const F=k&&E.context.hasSubmenuOpen,$=tl(S,{enabled:(f??F)&&!L&&(!k||F&&!O),handleClose:rl({blockPointerEvents:!k}),mouseOnly:!0,move:!1,restMs:E.type===void 0?u:void 0,delay:{close:p},triggerElementRef:w,externalTree:T,isActiveTrigger:R,isClosing:()=>m.select("transitionStatus")==="ending"}),Y=Nm(x,m.select("lastOpenChangeReason")),U=Na(S,{enabled:!L,event:x&&k?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:E.type===void 0?Y:!1}),le=Ja(S,{enabled:!L&&F}),ae=Dm({open:x,enabled:k,mouseDownAction:"open"}),me=i.useMemo(()=>bt(le.reference,U.reference),[le.reference,U.reference]),Q=m.useState("triggerProps",O),{preFocusGuardRef:G,handlePreFocusGuardFocus:J,handleFocusTargetFocus:ie}=Am(m,w),Re={disabled:L,open:x},ue=[B,n,V,N,w],q=[me,$??Je,Q,{"aria-haspopup":"menu","aria-controls":C,id:b,onMouseDown:ce=>{if(m.select("open"))return;H.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0}),$e(ce.currentTarget).addEventListener("mouseup",z,{once:!0})}},k?{role:"menuitem"}:{},ae,d,D],K=Ne("button",t,{enabled:!k,stateAttributesMapping:Vo,state:Re,ref:ue,props:q});return k?he.jsx(Tl,{tag:"button",render:o,className:r,style:s,state:Re,refs:ue,props:q,stateAttributesMapping:Vo}):x?he.jsxs(i.Fragment,{children:[he.jsx(Nn,{ref:G,onFocus:J},`${b}-pre-focus-guard`),he.jsx(i.Fragment,{children:K},b),he.jsx(Nn,{ref:m.context.triggerFocusTargetRef,onFocus:ie},`${b}-post-focus-guard`)]}):he.jsx(i.Fragment,{children:K},b)});function Nm(e,t){const n=lt(),[o,r]=i.useState(!1);return fe(()=>{e&&t===gt?(r(!0),n.start(ad,()=>{r(!1)})):e||(n.clear(),r(!1))},[e,t,n]),o}function Fm(){const e=Cl();return i.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}function Lm(e){const[t,n]=i.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function Ml(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Yv(e){const[t,n]=i.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),o=i.useRef(null),r=i.useRef(null),s=i.useRef(null),c=i.useRef(null),a=i.useRef(!0),l=i.useRef(null),f=sn(),u=i.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:s,backdropRef:o,internalBackdropRef:r,positionerRef:c,allowMouseUpTriggerRef:a,initialCursorPointRef:l,rootId:f}),[t,f]);return he.jsx(ml.Provider,{value:u,children:he.jsx(ii.Provider,{value:void 0,children:he.jsx(Im,{...e})})})}const hc=500,qv=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,{setAnchor:a,actionsRef:l,internalBackdropRef:f,backdropRef:u,positionerRef:p,allowMouseUpTriggerRef:h,initialCursorPointRef:g,rootId:d}=wr(!1),{store:y}=wn(!1),v=y.useState("open"),m=y.useState("disabled"),b=i.useRef(null),R=i.useRef(null),S=lt(),x=lt(),C=i.useRef(!1),w=i.useRef(null);function E(O,k,_){var D;const L=_.type.startsWith("touch");g.current={x:O,y:k},a({getBoundingClientRect(){return DOMRect.fromRect({width:L?10:0,height:L?10:0,x:O,y:k})}}),C.current=!1,(D=l.current)==null||D.setOpen(!0,Oe(un,_)),x.start(hc,()=>{C.current=!0})}function I(O){var L;if(m)return;h.current=!0,Ot(O),E(O.clientX,O.clientY,O.nativeEvent);const k=$e(b.current);(L=w.current)==null||L.abort();const _=new AbortController;w.current=_,k.addEventListener("mouseup",D=>{var B;if(h.current=!1,!C.current)return;x.clear(),C.current=!1;const V=st(D);Te(p.current,V)||d&&V&&ui(V)===d||(B=l.current)==null||B.setOpen(!1,Oe(Ps,D))},{once:!0,signal:_.signal})}function A(){S.clear(),R.current=null}function T(O){if(m){A();return}if(h.current=!1,O.touches.length!==1){A();return}O.stopPropagation();const k=O.touches[0],_={x:k.clientX,y:k.clientY};R.current=_,S.start(hc,()=>{E(_.x,_.y,O.nativeEvent)})}function M(O){if(O.touches.length!==1){A();return}if(S.isStarted()&&R.current){const k=O.touches[0],_=10,L=Math.abs(k.clientX-R.current.x),D=Math.abs(k.clientY-R.current.y);(L>_||D>_)&&A()}}return i.useEffect(()=>()=>{var O;(O=w.current)==null||O.abort()},[]),i.useEffect(()=>{function O(_){if(m)return;const D=st(_);(Te(b.current,D)||Te(f.current,D)||Te(u.current,D))&&_.preventDefault()}const k=$e(b.current);return We(k,"contextmenu",O)},[u,m,f]),Ne("div",t,{state:{open:v},ref:[b,n],props:[{onContextMenu:I,onTouchStart:T,onTouchMove:M,onTouchEnd:A,onTouchCancel:A,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:Vo})}),Xv=Rm;function Vm(e){const{open:t,defaultOpen:n=!1,onOpenChange:o,disabled:r}=e,[s,c]=Vt({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:a,setMounted:l,transitionStatus:f}=xn(s,!0,!0),u=dt(),[p,h]=i.useState(),g=p===null?void 0:p??u,d=te(y=>{const v=!s,m=Oe(un,y.nativeEvent);o(v,m),!m.isCanceled&&c(v)});return i.useMemo(()=>({defaultPanelId:u,disabled:r,handleTrigger:d,mounted:a,open:s,panelId:g,setMounted:l,setOpen:c,setPanelIdState:h,transitionStatus:f}),[u,r,d,a,s,g,l,c,h,f])}const Il=i.createContext(void 0);function kl(){const e=i.useContext(Il);if(e===void 0)throw new Error(nt(15));return e}const _m="data-open",Hm="data-closed",Bm=Es,$m="data-panel-open",jm={[_m]:""},Um={[Hm]:""},Wm={open(e){return e?{[$m]:""}:null}},zm={open(e){return e?jm:Um}},Ol={...zm,...Jt},Kv=i.forwardRef(function(t,n){const{render:o,className:r,defaultOpen:s=!1,disabled:c=!1,onOpenChange:a,open:l,style:f,...u}
434=t,p=te(a),h=Vm({open:l,defaultOpen:s,onOpenChange:p,disabled:c}),g=i.useMemo(()=>({open:h.open,disabled:h.disabled,transitionStatus:h.transitionStatus}),[h.open,h.disabled,h.transitionStatus]),d=i.useMemo(()=>({...h,onOpenChange:p,state:g}),[h,p,g]),y=Ne("div",t,{state:g,ref:n,props:u,stateAttributesMapping:Ol});return he.jsx(Il.Provider,{value:d,children:y})}),Ym={...Wm,...Jt},Gv=i.forwardRef(function(t,n){const{panelId:o,open:r,handleTrigger:s,state:c,disabled:a}=kl(),{className:l,disabled:f=a,render:u,nativeButton:p=!0,style:h,...g}=t,{getButtonProps:d,buttonRef:y}=_t({disabled:f,focusableWhenDisabled:!0,native:p});return Ne("button",t,{state:c,ref:[n,y],props:[{"aria-controls":r?o:void 0,"aria-expanded":r,onClick:s},g,d],stateAttributesMapping:Ym})}),$n={height:void 0,width:void 0};function qm(e){const{externalRef:t,hiddenUntilFound:n,id:o,keepMounted:r,mounted:s,onOpenChange:c,open:a,setMounted:l,setOpen:f,transitionStatus:u}=e,p=i.useRef(null),h=i.useRef(null),[g,d]=i.useState($n),y=i.useRef($n),v=i.useRef(!1),m=i.useRef(a),b=i.useRef(!1),[R,S]=i.useState(!1),x=i.useRef(null),C=Tt(t,p),w=at(a),E=br(p),I=!a&&!s,A=R?"idle":u,T=a&&(m.current||b.current),M=!a&&s&&h.current==="css-animation"&&g.height===void 0&&g.width===void 0?y.current:g,P=n&&I&&h.current!=="css-animation",N=te((D,V=!0)=>{V&&(y.current=D),d(D)}),O=te(()=>{var D;(D=x.current)==null||D.call(x),x.current=null}),k=te(D=>{O(),x.current=()=>{x.current=null,D()}}),_=te(()=>{a&&s&&h.current==="css-animation"&&(b.current=!0)});fe(()=>{!R||u==="starting"||S(!1)},[R,u]),i.useEffect(()=>()=>{_(),O()},[_,O]),fe(()=>{const D=p.current;if(!D)return;!a&&x.current&&O();const V=Xm(D,T);if(h.current=V,a&&u==="idle"&&m.current&&V==="css-animation"){y.current=Cn(D);return}if(a&&u==="starting"){const z=v.current;if(v.current=!1,V==="none"){N(Cn(D)),S(!0);return}if(V==="css-transition"){const $=Km(D);if(N(Cn(D)),!z)return $;const Y=wo(D,"transition-duration","0s");return k(Y),S(!0),$}N(Cn(D));const F=wo(D,"animation-name","none");if(!z){F();return}const j=wo(D,"animation-duration","0s");F(),k(j),S(!0);return}if(!a&&s&&(u==="idle"||u==="starting")){if(m.current=!1,b.current=!1,V==="none"){N($n,!1),l(!1);return}N(Cn(D));return}if(u!=="ending")return;if(V==="none"){l(!1);return}const B=Cn(D);if(!(B.height>0||B.width>0)){l(!1);return}N(B),V==="css-animation"&&wo(D,"animation-name","none")()},[s,a,O,N,l,k,T,u]),It({enabled:a&&s&&A==="idle",open:!0,ref:p,onComplete(){a&&N($n,!1)}}),i.useEffect(()=>{if(a||!s||A!=="ending"||!p.current)return;const V=new AbortController;let B=-1;function H(){w.current||(l(!1),N($n,!1))}return B=wt.request(()=>{E(H,V.signal)}),()=>{wt.cancel(B),V.abort()}},[w,s,a,A,E,N,l]),fe(()=>{const D=p.current;!D||!n||!I||D.setAttribute("hidden","until-found")},[I,n]),i.useEffect(function(){const V=p.current;if(!V)return;function B(H){const z=Oe(vt,H);c(!0,z),!z.isCanceled&&(v.current=!0,f(!0))}return We(V,"beforematch",B)},[c,f]);const L=r||n||s||a;return{height:M.height,props:{...P?{[Bm]:""}:void 0,hidden:I,id:o},ref:C,shouldPreventOpenAnimation:T,shouldRender:L,transitionStatus:A,width:M.width}}function Cn(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Xm(e,t){const n=Ge(e).getComputedStyle(e),o=(n.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&mc(n.animationDuration),r=mc(n.transitionDuration);return o&&r||r?"css-transition":o?"css-animation":"none"}function mc(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function wo(e,t,n){const o=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(o===""){e.style.removeProperty(t);return}e.style.setProperty(t,o,r)}}function Km(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(r=>{e.style.setProperty(r,"initial","important")});function n(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}const o=wt.request(n);return()=>{wt.cancel(o),n()}}const Gm="--collapsible-panel-height",Zm="--collapsible-panel-width",Zv=i.forwardRef(function(t,n){const{className:o,hiddenUntilFound:r,keepMounted:s,render:c,id:a,style:l,...f}=t,{defaultPanelId:u,mounted:p,onOpenChange:h,open:g,setMounted:d,setPanelIdState:y,setOpen:v,state:m,transitionStatus:b}=kl(),R=r??!1,S=s??!1,x=a||void 0,C=x??u;fe(()=>(y(_=>x??(_===null?void 0:_)),()=>{y(_=>_===x?null:_)}),[x,y]);const{height:w,props:E,ref:I,shouldPreventOpenAnimation:A,shouldRender:T,transitionStatus:M,width:P}=qm({externalRef:n,hiddenUntilFound:R,id:C,keepMounted:S,mounted:p,onOpenChange:h,open:g,setMounted:d,setOpen:v,transitionStatus:b}),N={...m,transitionStatus:M},O=ta(l,N),k=Ne("div",{...t,style:void 0},{state:N,ref:I,props:[E,{style:{[Gm]:w===void 0?"auto":`${w}px`,[Zm]:P===void 0?"auto":`${P}px`}},f,O?{style:O}:void 0,A?{style:{animationName:"none"}}:void 0],stateAttributesMapping:Ol});return T?k:null}),Jm="--nested-drawers",Oo="--drawer-height",Qm="--drawer-frontmost-height",Al="--drawer-swipe-movement-x",Qn="--drawer-swipe-movement-y",Dl="--drawer-snap-point-offset",fi="--drawer-swipe-strength",on="--drawer-swipe-progress",Jv=i.forwardRef(function(t,n){const{render:o,className:r,style:s,forceRender:c=!1,...a}=t,l=Ct(),f=l.useState("open"),u=l.useState("nested"),p=l.useState("mounted"),h=l.useState("transitionStatus");return Ne("div",t,{state:{open:f,transitionStatus:h},ref:[l.context.backdropRef,n],stateAttributesMapping:no,props:[{role:"presentation",hidden:!p,style:{pointerEvents:f?void 0:"none",userSelect:"none",WebkitUserSelect:"none",[on]:"0",[fi]:"1"}},a],enabled:c||!u})}),Qv=wf,Nl="data-drawer-content",e1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t;return Ct(),Ne("div",t,{ref:n,props:[{[Nl]:""},c]})}),ey=i.createContext(void 0);function Fl(){return i.useContext(ey)}const ty="data-expanded",ny="data-nested-drawer-open",oy="data-nested-drawer-swiping",yc="data-swipe-dismiss",ry="data-swipe-direction",Ll="data-swiping",Vl=i.createContext(void 0);function Pr(e){const t=i.useContext(Vl);if(e!==!0&&t===void 0)throw new Error(nt(90));return t}function et(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function _l(e,t){const n=e+t;return n>=0?t:-Math.sqrt(-n)-e}
434function bc(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e=="number")return Number.isFinite(e)?e<=1?et(e,0,1)*t:e:null;const o=e.trim();if(o.endsWith("px")){const r=Number.parseFloat(o);return Number.isFinite(r)?r:null}if(o.endsWith("rem")){const r=Number.parseFloat(o);return Number.isFinite(r)?r*n:null}return null}function Ao(e,t){let n=-1,o=1/0;for(let r=0;r<e.length;r+=1){const s=Math.abs(e[r]-t);s<o&&(o=s,n=r)}return n}function Hl(){const e=Ct(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:o,popupHeight:r}=Pr(),s=e.useState("viewportElement"),[c,a]=i.useState(0),[l,f]=i.useState(16),u=te(()=>{const d=$e(s).documentElement;a(s?s.offsetHeight:d.clientHeight);const y=parseFloat(getComputedStyle(d).fontSize);Number.isFinite(y)&&f(y)});fe(()=>{if(u(),!s||typeof ResizeObserver!="function")return;const g=new ResizeObserver(u);return g.observe(s),()=>{g.disconnect()}},[u,s]);const p=i.useMemo(()=>{if(!t||t.length===0||c<=0||r<=0)return[];const g=Math.min(r,c),d=t.map(m=>{const b=bc(m,c,l);if(b===null)return null;const R=et(b,0,g);return{value:m,height:R,offset:Math.max(0,r-R)}}).filter(m=>!!m);if(d.length<=1)return d;const y=[],v=[];for(let m=d.length-1;m>=0;m-=1){const b=d[m];v.some(S=>Math.abs(S-b.height)<=1)||(v.push(b.height),y.push(b))}return y.reverse(),y},[r,l,t,c]),h=i.useMemo(()=>{if(n===null)return;const g=p.find(m=>Object.is(m.value,n));if(g)return g;const d=Math.min(r,c),y=bc(n,c,l);if(y===null)return;const v=et(y,0,d);return p[Ao(p.map(m=>m.height),v)]},[n,r,p,l,c]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:o,popupHeight:r,viewportHeight:c,resolvedSnapPoints:p,activeSnapPointOffset:(h==null?void 0:h.offset)??null}}const Bl=i.createContext(null);function sy(){return i.useContext(Bl)}let vc=!1;function iy(){vc||(typeof CSS<"u"&&"registerProperty"in CSS&&([Al,Qn,Dl].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),[{name:on,initialValue:"0"},{name:fi,initialValue:"1"}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:"<number>",inherits:!1,initialValue:t})}catch{}})),vc=!0)}const cy={...no,expanded(e){return e?{[ty]:""}:null},nestedDrawerOpen(e){return e?{[ny]:""}:null},nestedDrawerSwiping(e){return e?{[oy]:""}:null},swipeDirection(e){return{[ry]:e}},swiping(e){return e?{[Ll]:""}:null}},t1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:c,initialFocus:a,...l}=t,f=Ct(),u=f.context.popupRef,{swipeDirection:p,frontmostHeight:h,hasNestedDrawer:g,nestedSwiping:d,nestedSwipeProgressStore:y,onPopupHeightChange:v,notifyParentFrontmostHeight:m,notifyParentHasNestedDrawer:b}=Pr(),R=f.useState("descriptionElementId"),S=f.useState("disablePointerDismissal"),x=f.useState("floatingRootContext"),C=f.useState("popupProps"),w=f.useState("modal"),E=f.useState("mounted"),I=f.useState("nested"),A=f.useState("nestedOpenDrawerCount"),T=f.useState("transitionStatus"),M=f.useState("open"),P=f.useState("openMethod"),N=f.useState("titleElementId"),O=f.useState("role"),k=x.useState("floatingId"),_=l.id??k,L=sy();ti();const{snapPoints:D,activeSnapPoint:V,activeSnapPointOffset:B}=Hl(),H=A>0,z=(L==null?void 0:L.swiping)??!1,F=(L==null?void 0:L.swipeStrength)??null,[j,$]=i.useState(0),Y=i.useRef(0),U=te(()=>{const q=u.current;if(!q)return;const K=q.offsetHeight;if(Y.current>0&&h>Y.current&&K>Y.current)return;if(Y.current>0&&g){const oe=Y.current;$(oe),v(oe);return}const ee=K;ee!==Y.current&&(Y.current=ee,$(ee),v(ee))});fe(()=>{if(!E){Y.current=0,$(0),v(0);return}const q=u.current;if(!q||(iy(),U(),typeof ResizeObserver!="function"))return;const K=new ResizeObserver(U);return K.observe(q),()=>{K.disconnect()}},[U,E,H,v,u]),fe(()=>{const q=()=>{const ee=u.current;if(!ee)return;const oe=y.getSnapshot();oe>0?ee.style.setProperty(on,`${oe}`):ee.style.setProperty(on,"0")};q();const K=y.subscribe(q),ce=u.current;return()=>{K(),ce&&ce.style.setProperty(on,"0")}},[y,u]),fe(()=>{if(M)return m==null||m(h),()=>{m==null||m(0)}},[h,M,m]),fe(()=>b?(b(M||T==="ending"),()=>{b(!1)}):void 0,[b,M,T]),It({open:M,ref:u,onComplete(){var q,K;M&&((K=(q=f.context).onOpenChangeComplete)==null||K.call(q,!0))}});const le=a===void 0?u:a,ae=f.useStateSetter("popupElement"),me={open:M,nested:I,transitionStatus:T,expanded:V===1,nestedDrawerOpen:H,nestedDrawerSwiping:d,swipeDirection:p,swiping:z};let Q;j&&!(!g&&T!=="ending")&&(Q=`${j}px`);const J=D&&D.length>0&&(p==="down"||p==="up");let ie=null;J&&B!==null&&(ie=p==="up"?-B:B);let Re=L?L.getDragStyles():Je;if(J&&p==="down"){const q=B??0,K=Number.parseFloat(String(Re[Qn]));z&&Number.isFinite(K)?Re={...Re,transform:void 0,[Qn]:`${_l(q,K)}px`}:Re={...Re,transform:void 0}}const ue=Ne("div",t,{state:me,props:[C,{id:_,"aria-labelledby":N,"aria-describedby":R,role:O,...so,hidden:!E,onKeyDown(q){Rn.has(q.key)&&q.stopPropagation()},style:{...Re,[on]:"0",[Jm]:A,[Oo]:Q,[Dl]:typeof ie=="number"?`${ie}px`:"0px",[Qm]:h?`${h}px`:void 0,[fi]:typeof F=="number"&&Number.isFinite(F)&&F>0?`${F}`:"1"}},l],ref:[n,u,ae],stateAttributesMapping:cy});return he.jsx(pr,{context:x,openInteractionType:P,disabled:!E,closeOnFocusOut:!S,initialFocus:le,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:ue})}),n1=$p;var xc,Rc;function o1(e){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:r,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:
434a=!0,actionsRef:l,handle:f,triggerId:u,defaultTriggerId:p=null,swipeDirection:h="down",snapToSequentialPoints:g=!1,snapPoints:d,snapPoint:y,defaultSnapPoint:v,onSnapPointChange:m}=e,b=Pr(!0),R=b==null?void 0:b.onNestedSwipeProgressChange,S=b==null?void 0:b.onNestedFrontmostHeightChange,x=b==null?void 0:b.onNestedSwipingChange,C=b==null?void 0:b.onNestedDrawerPresenceChange,[w,E]=i.useState(0),[I,A]=i.useState(0),[T,M]=i.useState(!1),[P,N]=i.useState(!1),[O]=i.useState(ay),k=v!==void 0?v:(d==null?void 0:d[0])??null,_=y!==void 0,[L,D]=Vt({controlled:y,default:k,name:"Drawer",state:"snapPoint"}),V=i.useRef(!1),B=i.useRef(!1),H=te((G,J)=>{const ie=J??Oe(vt);m==null||m(G,ie),!ie.isCanceled&&D(G)}),z=i.useMemo(()=>_||!d||d.length===0?L:L===null||!d.some(G=>Object.is(G,L))?k:L,[L,_,k,d]),F=te(G=>{E(G),!V.current&&G>0&&A(G)}),j=te(G=>{if(G>0){V.current=!0,A(G);return}V.current=!1,w>0&&A(w)}),$=te(G=>{M(G)}),Y=te(G=>{O.set(G),R==null||R(G)}),U=te(G=>{N(G),x==null||x(G)}),le=te((G,J)=>{r==null||r(G,J),!J.isCanceled&&!G&&d&&d.length>0&&H(k,Oe(J.reason,J.event,J.trigger))}),ae=i.useMemo(()=>({swipeDirection:h,swipeAreaActiveRef:B,snapToSequentialPoints:g,snapPoints:d,activeSnapPoint:z,setActiveSnapPoint:H,frontmostHeight:I,popupHeight:w,hasNestedDrawer:T,nestedSwiping:P,nestedSwipeProgressStore:O,onNestedDrawerPresenceChange:$,onPopupHeightChange:F,onNestedFrontmostHeightChange:j,onNestedSwipingChange:U,onNestedSwipeProgressChange:Y,notifyParentFrontmostHeight:S,notifyParentSwipingChange:x,notifyParentSwipeProgressChange:R,notifyParentHasNestedDrawer:C}),[z,I,T,P,O,C,R,x,S,$,j,Y,U,F,w,H,d,g,B,h]),me=typeof t=="function"?G=>he.jsxs(i.Fragment,{children:[xc||(xc=he.jsx(Sc,{})),t(G)]}):he.jsxs(i.Fragment,{children:[Rc||(Rc=he.jsx(Sc,{})),t]}),Q=ri("drawer",{open:n,defaultOpen:o,onOpenChange:le,onOpenChangeComplete:s,disablePointerDismissal:c,modal:a,actionsRef:l,handle:f,triggerId:u,defaultTriggerId:p,children:me});return he.jsx(Vl.Provider,{value:ae,children:Q})}function ay(){let e=0;const t=new Set;return{getSnapshot:()=>e,set(n){const o=Number.isFinite(n)?n:0;o!==e&&(e=o,t.forEach(r=>{r()}))},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}function Sc(){const e=Fl(),t=Ct(!1),n=e==null?void 0:e.setDrawerOpen,o=e==null?void 0:e.removeDrawer,r=t.useState("open"),s=t.useState("nestedOpenDialogCount"),c=t.useState("popupElement"),a=s===0;return fe(()=>{if(o)return()=>{o(t)}},[o,t]),fe(()=>{n==null||n(t,r)},[r,n,t]),i.useEffect(()=>{if(!r||!a||!_o)return;const f=Ge(c).CloseWatcher;if(!f)return;function u(g){t.select("open")&&t.setOpen(!1,Oe(vf,g))}const p=new f,h=We(p,"close",u);return()=>{h(),p.destroy()}},[t,a,r,c]),null}function ly(e,t=!1){const{overflowY:n}=Rt(e);return n!=="auto"&&n!=="scroll"?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function uy(e,t=!1){const{overflowX:n}=Rt(e);return n!=="auto"&&n!=="scroll"?!1:t?e.clientWidth>0:e.scrollWidth>e.clientWidth}function ls(e,t,n=!1){return t==="vertical"?ly(e,n):uy(e,n)}function fy(e,t,n){let o=e;for(;Ze(o)&&o!==t&&!Dt(o);){for(const r of n)if(ls(o,r))return!0;o=Ft(o)}return!1}function us(e,t,n="vertical",o=!1){let r=Ze(e)?e:null;for(;Ze(r)&&r!==t&&!Dt(r);){if(ls(r,n,o))return r;r=Ft(r)}return ls(t,n,o)?t:null}function Do(e,t,n){return typeof(e==null?void 0:e.elementFromPoint)=="function"?e.elementFromPoint(t,n):null}function dy(e,t){const n=Ge(e).getComputedStyle(e).transform;let o=0,r=0,s=1;if(n&&n!=="none"){const c=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(c){const a=c[1].split(", ").map(parseFloat);a.length===6?(o=a[4],r=a[5],s=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(o=a[12],r=a[13],s=a[0])}}return{x:o,y:r,scale:s}}const py=40,gy=10,hy=1,my=50,wc=16,yy=80,by='button,a,input,select,textarea,label,[role="button"]';function $t(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Co(e){return Number.isFinite(e)&&e>0?e:null}function Cc(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function vy(e){return e%2===1}function Yr(e,t,n){const o=e[n];if(typeof o=="function")try{o.call(e,t)}catch(r){if(r&&typeof r=="object"&&"name"in r&&r.name==="NotFoundError")return;throw r}}function xy(e){const{enabled:t,directions:n,elementRef:o,movementCssVars:r,canStart:s,ignoreSelectorWhenTouch:c=!0,ignoreScrollableAncestors:a=!1,swipeThreshold:l,onDismiss:f,onProgress:u,onCancel:p,onSwipeStart:h,onRelease:g,onSwipingChange:d,trackDrag:y=!0}=e,v=by,m=n.length===1?n[0]:void 0,b=Math.max(0,typeof l=="number"?l:py),R=n.includes("left"),S=n.includes("right"),x=n.includes("up"),C=n.includes("down"),w=R||S,E=x||C,I=i.useMemo(()=>{const W=[];return E&&W.push("vertical"),w&&W.push("horizontal"),W},[w,E]),[A,T]=i.useState(void 0),[M,P]=i.useState(!1),[N,O]=i.useState(!1),k=i.useRef({x:0,y:0}),_=i.useRef({x:0,y:0}),L=i.useRef(null),D=i.useRef({x:0,y:0,scale:1}),V=i.useRef(void 0),B=i.useRef(0),H=i.useRef(!1),z=i.useRef({x:0,y:0}),F=i.useRef(null),j=i.useRef(!1),$=i.useRef(!1),Y=i.useRef(null),U=i.useRef(!1),le=i.useRef(!1),ae=i.useRef({width:0,height:0}),me=i.useRef(0),Q=i.useRef(b),G=i.useRef(null),J=i.useRef(null),ie=i.useRef(null),Re=i.useRef({x:0,y:0}),ue=i.useRef(null),q=i.useRef(!1),K=i.useRef(null),ce=te(W=>{q.current!==W&&(q.current=W,P(W),d==null||d(W))});function ee(W){if(!W)return;const ge=o.current,be=G.current;if(!ge||!be)return;const Fe=be({element:ge,direction:W});Q.current=Math.max(0,Fe)}const oe=te((W,ge)=>{const be=Number.isFinite(W)?et(W,0,1):0,Fe=be!==me.current;let De=!1;if(ge){const Ve=ue.current;De=!Ve||Ve.deltaX!==ge.deltaX||Ve.deltaY!==ge.deltaY||Ve.direction!==ge.direction}!Fe&&!De||(me.current=be,ge?ue.current=ge:Fe&&(ue.current=null),u==null||u(be,ge))}),Ie=te(W=>{const ge=o.current;if(!y||!ge){W||(K.current=null);return}const be=ge.style,Fe=K.current;W?(Fe||(K.current=[be.transition,be.transform]),be.transition="none"):Fe&&([be.transition,be.transform]=Fe,K.current=null);const De=_.current,Ve=D.current,Pe=De.x-Ve.x,Be=De.y-Ve.y;W&&(be.transform=Cc(De,Ve.scale)),be.setProperty(r.x,`${Pe}px`),be.setProperty(r.y,`${Be}px`)});function ne(W,ge){if(ge===null)return;const be=ie.current;if(be&&ge>
434be.time){const Fe=Math.max(ge-be.time,wc);Re.current={x:(W.x-be.x)/Fe,y:(W.y-be.y)/Fe}}ie.current={x:W.x,y:W.y,time:ge}}const ve=i.useCallback(()=>{T(void 0),ce(!1),O(!1),oe(0),Q.current=b,G.current=null,k.current={x:0,y:0},_.current={x:0,y:0},D.current={x:0,y:0,scale:1},V.current=void 0,B.current=0,H.current=!1,z.current={x:0,y:0},F.current=null,j.current=!1,L.current=null,$.current=!1,Y.current=null,U.current=!1,le.current=!1,ae.current={width:0,height:0},J.current=null,ie.current=null,Re.current={x:0,y:0},ue.current=null,Ie(!1)},[ce,b,Ie,oe]);function se(W){if("touches"in W){const ge=W.touches[0];return ge?{x:ge.clientX,y:ge.clientY}:null}return{x:W.clientX,y:W.clientY}}function X(W){return"touches"in W?!0:W.pointerType==="touch"}function we(W,ge){var Ve;const be=(Ve=o.current)==null?void 0:Ve.getRootNode();return Do(be,W.x,W.y)??st(ge)}function Z(W,ge){const be=Fe=>{const De=us(W,ge,Fe),Ve=$e(De);return De===Ve.body||De===Ve.documentElement?null:De};return w&&!E?be("horizontal"):E&&!w?be("vertical"):be("vertical")??be("horizontal")}function re(W,ge,be){U.current=!1;const Fe=X(W),De=we(ge,W.nativeEvent),Pe=$e(o.current).body,Be=Fe&&Pe?Z(De,Pe):null,Ce=(be==null?void 0:be.ignoreScrollableTarget)??!1;if(Be&&!Ce||(U.current=!!(Be&&Ce),(De?De.closest(v):!1)&&(!Fe||c)))return!1;const ze=o.current;if(a&&ze&&De&&I.length>0&&!((be==null?void 0:be.ignoreScrollableAncestors)??!1)&&fy(De,ze,I))return!1;if(H.current=!1,V.current=void 0,B.current=0,k.current=ge,J.current=Co(W.timeStamp),z.current=ge,L.current=ge,Q.current=b,G.current=typeof l=="function"?l:null,ze){ae.current={width:ze.offsetWidth,height:ze.offsetHeight},ee(m);const Ue=dy(ze);D.current=Ue,_.current={x:Ue.x,y:Ue.y},ne({x:Ue.x,y:Ue.y},J.current),"touches"in W||Yr(ze,W.pointerId,"setPointerCapture")}return h==null||h(W.nativeEvent),ce(!0),F.current=null,j.current=!0,oe(0),Ie(!0),!0}function xe(){ye(),U.current=!1,L.current=null}function ye(){$.current=!1,Y.current=null}function pe(W){if(xe(),!q.current)return;ce(!1),F.current=null;const ge=D.current;_.current={x:ge.x,y:ge.y},T(void 0),le.current=!1,Ie(!1);const be=o.current;be&&Yr(be,W.pointerId,"releasePointerCapture"),oe(0,{deltaX:0,deltaY:0,direction:void 0}),p==null||p(W.nativeEvent)}function de(W,ge){const be=Pe=>Math.sign(Pe)*Math.abs(Pe)**.5,Fe=(Pe,Be,Ce)=>!Be&&Pe<0||!Ce&&Pe>0?be(Pe):Pe,De=w?Fe(W,R,S):be(W),Ve=E?Fe(ge,x,C):be(ge);return{x:De,y:Ve}}function Me(W,ge,be){const Fe=(Pe,Be,Ce,ke,ze)=>Pe>0&&Be<=0&&ke||Pe<0&&Be>=Math.max(0,Ce)&&ze,De=Math.abs(ge),Ve=Math.abs(be);return E&&be!==0&&(!w||Ve>=De)?Fe(be,W.scrollTop,W.scrollHeight-W.clientHeight,C,x):w&&ge!==0&&(!E||De>Ve)?Fe(ge,W.scrollLeft,W.scrollWidth-W.clientWidth,S,R):null}const Le=te(W=>{if(!t||W.defaultPrevented||W.nativeEvent.defaultPrevented||!("touches"in W)&&W.button!==0)return;const ge=se(W);!ge||($.current=!0,Y.current=ge,U.current=!1,le.current=!("touches"in W),!(s?s(ge,{nativeEvent:W.nativeEvent,direction:m}):!0))||re(W,ge)&&ye()});function Ae(W,ge,be){if(!t||!q.current)return;const Fe=st(W.nativeEvent);if(X(W)&&!U.current){const St=W.currentTarget;if(Z(Fe,St))return}if("touches"in W||W.preventDefault(),j.current&&(j.current=!1,y)){k.current=ge;const St=Co(W.timeStamp);St!==null&&(J.current=St)}const De=ge.x,Ve=ge.y,Pe=be.x,Be=be.y;(Be<0&&Ve>z.current.y||Be>0&&Ve<z.current.y)&&(z.current={x:z.current.x,y:Ve}),(Pe<0&&De>z.current.x||Pe>0&&De<z.current.x)&&(z.current={x:De,y:z.current.y});const Ce=De-k.current.x,ke=Ve-k.current.y,ze=Ve-z.current.y,Ue=De-z.current.x;let Ke=F.current;Ke===null&&w&&E&&Math.sqrt(Ce*Ce+ke*ke)>=hy&&(Ke=Math.abs(Ce)>Math.abs(ke)?"horizontal":"vertical",F.current=Ke);let qe;if(!V.current)Ke==="vertical"?ke>0?qe="down":ke<0&&(qe="up"):Ke==="horizontal"?Ce>0?qe="right":Ce<0&&(qe="left"):Math.abs(Ce)>=Math.abs(ke)?qe=Ce>0?"right":"left":qe=ke>0?"down":"up",qe&&(qe==="left"&&R||qe==="right"&&S||qe==="up"&&x||qe==="down"&&C)&&(V.current=qe,B.current=$t(qe,Ce,ke),T(qe),ee(qe));else{const St=V.current,gn=$t(St,Ue,ze);gn>Q.current?(H.current=!1,T(St)):!(R&&S)&&!(x&&C)&&B.current-gn>=gy&&(H.current=!0)}const it=de(Ce,ke);let rt=D.current.x,ft=D.current.y;Ke==="horizontal"?w&&(rt+=it.x):(Ke==="vertical"||w&&(rt+=it.x),E&&(ft+=it.y));const ht=_.current,Wt=rt!==ht.x||ft!==ht.y;_.current={x:rt,y:ft},Wt&&Ie(!0),ne({x:rt,y:ft}
434,Co(W.timeStamp));const Bt=rt-D.current.x,xt=ft-D.current.y,yt={deltaX:Bt,deltaY:xt,direction:V.current};let zt=0;const pn=m??V.current;if(pn){const St=pn==="left"||pn==="right"?ae.current.width:ae.current.height,gn=D.current.scale||1,_n=$t(pn,Bt,xt);St>0&&gn>0&&_n>0&&(zt=_n/(St*gn))}oe(zt,yt)}const Se=te(W=>{if(!t)return;const ge=_.current,be=D.current,Fe=ge.x-be.x,De=ge.y-be.y,Ve={deltaX:Fe,deltaY:De,direction:V.current};if(!q.current){xe(),oe(0,Ve);return}ce(!1),F.current=null,xe(),le.current=!1;const Pe=o.current;Pe&&("touches"in W||Yr(Pe,W.pointerId,"releasePointerCapture"));const Be=Fe,Ce=De,ke=J.current,ze=Co(W.timeStamp),Ue=ke!==null&&ze!==null&&ze>ke?ze-ke:0,Ke=Ue>0?Math.max(Ue,my):0,qe=Ke>0?Be/Ke:0,it=Ke>0?Ce/Ke:0;let rt=Re.current.x,ft=Re.current.y;const ht=ie.current;if(ht&&ze!==null&&ze>=ht.time){const zt=ze-ht.time;if(zt<=yy){const pn=Math.max(zt,wc),St=ge.x-ht.x,gn=ge.y-ht.y,_n=St/pn,vi=gn/pn;_n!==0&&(rt=_n),vi!==0&&(ft=vi)}else rt=0,ft=0}const Wt=g==null?void 0:g({event:W.nativeEvent,direction:V.current,deltaX:Be,deltaY:Ce,velocityX:qe,velocityY:it,releaseVelocityX:rt,releaseVelocityY:ft}),Bt=typeof Wt=="boolean";if(H.current&&!Bt){_.current={x:be.x,y:be.y},T(void 0),Ie(!1),oe(0,Ve);return}let xt=!1,yt;if(Bt)xt=Wt,yt=V.current??m;else for(const zt of n)if($t(zt,Be,Ce)>Q.current){xt=!0,yt=zt;break}xt&&yt?(T(yt),O(!0),Ie(!1),f==null||f(W.nativeEvent,{direction:yt})):(_.current={x:be.x,y:be.y},T(void 0),Ie(!1),oe(0,Ve))}),_e=te(W=>{const ge=se(W);if(!ge)return;let be=!1;if(!("touches"in W)){const Ve=vy(W.buttons);if(Ve&&(le.current=!0),W.buttons!==0&&!Ve){pe(W);return}if(W.buttons===0&&le.current){if(!q.current){Se(W);return}be=!0}}if(!M&&$.current){if(!X(W)&&(W.defaultPrevented||W.nativeEvent.defaultPrevented)){xe();return}if(s?s(ge,{nativeEvent:W.nativeEvent,direction:m}):!0){const Pe=Y.current;let Be=!1;if(X(W)){const ke=o.current;if(Pe&&ke){const ze=we(ge,W.nativeEvent),Ke=$e(ke).body,qe=Ke?Z(ze,Ke):null;if(qe&&(Te(ke,qe)||Te(qe,ke))){const it=ge.x-Pe.x,rt=ge.y-Pe.y,ft=Me(qe,it,rt);if(ft===!1)return;ft===!0&&(Be=!0)}}}re(W,ge,{ignoreScrollableTarget:Be,ignoreScrollableAncestors:Be})&&(Pe&&Be?(ye(),k.current=Pe,z.current=Pe,L.current=Pe,j.current=!1):(ye(),U.current=!1))}}const Fe=L.current,De=Fe===null?{x:0,y:0}:{x:ge.x-Fe.x,y:ge.y-Fe.y};L.current=ge,Ae(W,ge,De),be&&!("touches"in W)&&Se(W)}),He=te((W,ge)=>{_e({touches:W.touches,currentTarget:ge,nativeEvent:W,defaultPrevented:W.defaultPrevented,timeStamp:W.timeStamp})}),Ye=i.useCallback(()=>{const W=q.current,ge=_.current,be=D.current,Fe=ge.x-be.x,De=ge.y-be.y;return!W&&Fe===0&&De===0&&!N?{[r.x]:"0px",[r.y]:"0px"}:{transition:W?"none":void 0,transform:W?Cc(ge,be.scale):void 0,[r.x]:`${Fe}px`,[r.y]:`${De}px`}},[N,r]),ot=i.useCallback(()=>t?{onPointerDown:Le,onPointerMove:_e,onPointerUp:Se,onPointerCancel:Se}:{},[t,Se,_e,Le]),Xe=i.useCallback(()=>t?{onTouchStart:Le,onTouchMove:_e,onTouchEnd:Se,onTouchCancel:Se}:{},[t,Se,_e,Le]);return{swiping:M,swipeDirection:A,dragDismissed:N,getPointerProps:ot,getTouchProps:Xe,moveNative:He,getDragStyles:Ye,reset:ve}}const r1=eg,Ry="data-nested-dialog-open",Sy=i.createContext(void 0);function wy(){return i.useContext(Sy)}const fs=10,Ec=.5,Pc=.5,Cy=300,Tc=4,Mc=.2,Ey=4,qr=80,Ic=360,kc=.1,Py=1,Oc=6,Ty=2,My=`[${Nl}]`,s1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,children:c,...a}=t,l=Ct(),f=l.context.popupRef,u=l.context.backdropRef,{swipeDirection:p,notifyParentSwipingChange:h,notifyParentSwipeProgressChange:g,frontmostHeight:d,snapToSequentialPoints:y,swipeAreaActiveRef:v}=Pr(),m=Fl(),{snapPoints:b,resolvedSnapPoints:R,activeSnapPoint:S,activeSnapPointOffset:x,setActiveSnapPoint:C,popupHeight:w}=Hl(),E=l.useState("open"),I=l.useState("mounted"),A=l.useState("nested"),T=l.useState("nestedOpenDrawerCount"),M=l.useState("viewportElement"),P=l.useState("popupElement"),N=m==null?void 0:m.visualStateStore,O=T>0,k=p==="left"||p==="right"?"horizontal":"vertical",_=k==="vertical",L=_?"horizontal":"vertical",[D,V]=i.useState(null),B=i.useRef(void 0),H=i.useRef(null),z=cn(),F=i.useRef(!1),j=i.useRef(!1),$=i.useRef(""),Y=i.useRef(!1),U=i.useRef(!1),le=i.useRef(null),ae=wy(),me=i.useMemo(()=>
434{if(!b||b.length<2||R.length<2||p!=="down"&&p!=="up")return null;const Z=R.map(pe=>pe.offset).sort((pe,de)=>pe-de),re=Z[0],ye=Z[1]-re;return{minOffset:re,range:ye}},[R,b,p]),Q=i.useMemo(()=>!me||x===null?null:et((x-me.minOffset)/me.range,0,1),[x,me]),G=i.useMemo(()=>b&&b.length>0&&(p==="down"||p==="up")?p==="down"?["down","up"]:["up","down"]:[p],[b,p]),J=te(Z=>{var re,xe;(re=f.current)==null||re.toggleAttribute(yc,Z),(xe=u.current)==null||xe.toggleAttribute(yc,Z)}),ie=te(()=>{var Z;J(!1),(Z=f.current)==null||Z.removeAttribute(Zr),V(null)}),Re=te(()=>{j.current&&(j.current=!1,h==null||h(!1))}),ue=te((Z,re,xe)=>{const ye=E&&!A&&re,pe=ye?Z:0,de=E&&re?Z:0;xe&&g&&(g(de),de<=0&&Re()),N==null||N.set({swipeProgress:pe,frontmostHeight:pe>0?d:0});const Me=u.current;if(!Me)return;const Le=ye&&pe>0;Me.style.setProperty(on,Le?`${pe}`:"0"),Le&&d>0?Me.style.setProperty(Oo,`${d}px`):Me.style.removeProperty(Oo)});function q(Z,re,xe,ye,pe,de,Me,Le){const Ae=$l(Z,re);if(Ae<=0)return null;const _e=((re==="down"||re==="up")&&b&&b.length>0?x??0:0)+$t(re,xe,ye),He=Math.max(0,Ae-_e);if(He<=0)return null;const Ye=$t(re,Me,Le),ot=Math.abs(Ye)>0?Ye:$t(re,pe,de);if(ot<=Mc)return null;const Xe=et(ot,Mc,Ey),ge=(et(He/Xe,qr,Ic)-qr)/(Ic-qr);return kc+ge*(Py-kc)}function K(Z){if(j.current||!Z)return;const re=Z.direction??p,xe=$t(re,Z.deltaX,Z.deltaY);Math.abs(xe)<fs||(j.current=!0,h==null||h(!0))}const ce=xy({enabled:I&&!O,directions:G,elementRef:l.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:Al,y:Qn},onSwipeStart(Z){var Me,Le,Ae;if("touches"in Z||Z.pointerType==="touch")return;const re=f.current,xe=$e(re),ye=(Me=xe.getSelection)==null?void 0:Me.call(xe);if(!ye||ye.isCollapsed)return;const pe=je(ye.anchorNode)?ye.anchorNode:(Le=ye.anchorNode)==null?void 0:Le.parentElement,de=je(ye.focusNode)?ye.focusNode:(Ae=ye.focusNode)==null?void 0:Ae.parentElement;!Te(re,pe)&&!Te(re,de)||ye.removeAllRanges()},onSwipingChange(Z){F.current=Z,Xr(l.context.backdropRef.current,Z),!Z&&!g&&Re()},swipeThreshold({element:Z,direction:re}){return Dc(Z,re)},canStart(Z,re){const xe=l.context.popupRef.current;if(!xe)return!1;const ye=xe.ownerDocument,pe=Do(xe.getRootNode(),Z.x,Z.y);if(!pe||!Te(xe,pe))return!1;const de=re.nativeEvent;return!(("touches"in de||de.pointerType==="touch")&&Nc(ye,xe))},onProgress(Z,re){const xe=F.current;xe&&K(re);const ye=!!(b&&b.length>0);if(xe&&p==="down"&&ye&&re){const de=l.context.popupRef.current;de&&(de.style.removeProperty("transform"),de.style.setProperty(Qn,`${_l(x??0,re.deltaY)}px`))}let pe=Z;if(me&&w>0){const de=x??me.minOffset,Me=Le=>et((Le-me.minOffset)/me.range,0,1);xe&&re&&Number.isFinite(re.deltaY)?pe=Me(et(de+re.deltaY,0,w)):Q!==null&&(pe=Q)}xe||(g==null||g(0),Re()),ue(pe,!0,xe)},onRelease({event:Z,deltaX:re,deltaY:xe,direction:ye,velocityX:pe,velocityY:de,releaseVelocityX:Me,releaseVelocityY:Le}){const Ae=l.context.popupRef.current;if(!Ae){ie();return}const Se=Ae;function _e(Ue){Re(),J(!0),Se.style.removeProperty("transition"),Se.setAttribute(Zr,""),Nt.flushSync(()=>{V(q(Se,Ue,re,xe,pe,de,Me,Le))})}if(!b||b.length===0){if(!ye){ie();return}const Ue=$t(ye,re,xe);if(Ue<=0)return ie(),!1;if($t(ye,pe,de)>=Ec)return _e(ye),!0;const Ke=Ue>Dc(Se,ye);return Ke?_e(ye):ie(),Ke}if(p!=="down"&&p!=="up"){ie();return}if(!w)return ie(),!1;if(R.length===0){ie();return}const He=p==="down"?xe:-xe,Ye=Math.sign(He),ot=p==="down"?Le:-Le,Xe=p==="down"?de:-de;let W=ot;if(Ye!==0&&Math.abs(He)>=fs){const Ue=Math.sign(W);Ue!==0&&Ue!==Ye&&(W=Xe)}const ge=x??0,be=et(ge+He,0,w),Fe=Math.abs(W)>=Pc?et(W,-Tc,Tc)*Cy:0,De=y?be:et(be+Fe,0,w),Ve=Oe(uo,Z),Pe=()=>(ue(0,!0,!0),ie(),!1),Be=Ue=>(C(Ue.value,Ve),Pe()),Ce=Ue=>ye?(C(null,Ve),Ve.isCanceled?Pe():(B.current=S,_e(p),!0)):Be(Ue);if(y){const Ue=[...R].sort((xt,yt)=>xt.offset-yt.offset),Ke=Ue.map(xt=>xt.offset),qe=Ao(Ke,ge);let it=Ue[Ao(Ke,De)];const rt=Math.sign(W),ft=Ye!==0&&rt!==0&&rt===Ye&&Math.abs(W)>=Pc;let ht=De;if(ft){const xt=et(qe+Ye,0,Ue.length-1);if(xt!==qe){const yt=Ue[xt];(Ye>0?De<yt.offset:De>yt.offset)&&(it=yt,ht=yt.offset)}else if(Ye>0)return Ce(it)}const Wt=Math.abs(ht-w),Bt=Math.abs(ht-it.offset);return Wt<Bt?Ce(it):Be(it)}const ke=R[Ao(R.map(Ue=>Ue.offset),De)];return W>=Ec&&He>0||Math.abs(De-w)<Math.abs(De-ke.offset)?Ce(ke):Be(ke)},onDismiss(Z){var ye;N==null||N.set({swipeProgress:0,frontmostHeight:0});const re=l.context.backdropRef.current;re&&(re.style.setProperty(on,"0"),re.style.removeProperty(Oo));const xe=Oe(uo,Z);if(l.setOpen(!1,xe),xe.isCanceled){const pe=B.current;pe!==void 0&&C(pe,Oe(uo,Z)),B.current=void 0,(ye=H.current)==null||ye.call(H),ie();return}if(l.select("open")){const pe=Z;z.request(()=>{var de;if(l.select("open")){const Me=B.current;Me!==void 0&&C(Me,Oe(uo,pe)),B.current=void 0,ie(),(de=H.current)==null||de.call(H)}else B.current=void 0});return}B.current=void 0,J(!0)}}),ee=ce.getPointerProps(),oe=ce.getTouchProps(),{moveNative:Ie,reset:ne}=ce;H.current=ne,i.useEffect(()=>{const Z=M??P;if(!Z)return;const re=Z,xe=$e(re);function ye(de,Me,Le){const Ae=_?Le.clientY-Me.lastY:Le.clientX-Me.lastX;if(de.touches.length===2||Nc(xe,re)||!E||!I||O||Ly(Me,de,Le,_))return;const _e=Me.scrollTarget;if(!_e||_e===xe.documentElement||_e===xe.body){de.cancelable&&de.preventDefault(),de.stopPropagation(),Ie(de,re);return}if(!Vy(_e,k)){de.cancelable&&de.preventDefault(),de.stopPropagation();return}if(Ae!==0){const He=_y(_e,k,p,Ae);Me.allowSwipe?de.cancelable&&de.preventDefault():de.cancelable&&He?(Me.allowSwipe=!0,de.preventDefault()):Me.allowSwipe=!1}Me.allowSwipe===!0&&(de.stopPropagation(),Ie(de,re))}function pe(de){if(ae==null||ae.onTouchMove(de),U.current)return;const Me=le.current,Le=de.touches[0];!Le||!Me||(ye(de,Me,Le),Fy(Me,Le))}return We(xe,"touchmove",pe,{passive:!1,capture:!0})},[I,O,E,P,_,k,p,Ie,M,ae]),fe(()=>{!me||ce.swiping||ue(!E||A?0:Q??0,!0,!1)},[ue,d,A,g,E,Q,me,ce.swiping,l,N]),fe(()=>{if(g)return E||g(0),()=>{g(0)}},[g,E]),fe(()=>{E&&(v.current||ne(),ie())},[ie,E,ne,v]),fe(()=>{const Z=u.current;return()=>{N==null||N.set({swipeProgress:0,frontmostHeight:0}),Xr(Z,!1);const re=u.current;re!==Z&&Xr(re,!1),Re()}},[u,Re,N]);const ve=i.useMemo(()=>({swiping:ce.swiping,getDragStyles:ce.getDragStyles,swipeStrength:D??null,setSwipeDismissed:J}),[J,ce.getDragStyles,ce.swiping,D]);function se(Z){U.current=Z,le.current=null}function X(){se(!1),$.current="",Y.current=!1}function we(Z){return $.current="",Z.pointerType!=="touch"}return he.jsx(Qp,{ref:n,className:r,style:s,render:o,...bt(a,{onPointerDown(Z){var xe;if($.current=Z.pointerType,Y.current=Z.pointerType==="pen",!E||!I||O)return;const re=Do(Z.currentTarget.getRootNode(),Z.clientX,Z.clientY);Ac(re)||Iy(re)||Z.pointerType!=="touch"&&((xe=ee.onPointerDown)==null||xe.call(ee,Z))},onPointerMove(Z){var re;Z.pointerType!=="touch"&&((re=ee.onPointerMove)==null||re.call(ee,Z))},onPointerUp(Z){var re;we(Z)&&((re=ee.onPointerUp)==null||re.call(ee,Z))},onPointerCancel(Z){var re;we(Z)&&((re=ee.onPointerCancel)==null||re.call(ee,Z))},onTouchStart(Z){var _e;if($.current==="pen"&&Y.current){Y.current=!1,se(!1);return}if(!E||!I||O){se(!1);return}const xe=Z.touches[0];if(!xe)return;if(Ny(Z)){se(!1);return}
434const ye=Z.currentTarget,pe=Do(ye.getRootNode(),xe.clientX,xe.clientY),de=st(Z.nativeEvent),Me=je(de)?de:ye;if(!Te(ye,Me)){se(!0);return}if(ae==null||ae.onTouchStart(Z),Ac(pe)){se(!0);return}U.current=!1;const Le=us(Me,ye,k),Ae=us(Me,ye,L)!=null;let Se=null;Le&&(Se=Ul(Le,k,p)?null:!1),le.current={startX:xe.clientX,startY:xe.clientY,lastX:xe.clientX,lastY:xe.clientY,scrollTarget:Le,hasCrossAxisScrollableContent:Ae,allowSwipe:Se,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},(_e=oe.onTouchStart)==null||_e.call(oe,Z)},onTouchEnd(Z){var re;ae==null||ae.onTouchEnd(Z),X(),(re=oe.onTouchEnd)==null||re.call(oe,Z)},onTouchCancel(Z){var re;ae==null||ae.onTouchCancel(),X(),(re=oe.onTouchCancel)==null||re.call(oe,Z)},[Ry]:void 0}),children:he.jsx(Bl.Provider,{value:ve,children:c})})});function Xr(e,t){e==null||e.toggleAttribute(Ll,t)}function Ac(e){return!!(e!=null&&e.closest(dd))}function Iy(e){return!!(e!=null&&e.closest(My))}function $l(e,t){return t==="left"||t==="right"?e.offsetWidth:e.offsetHeight}function Dc(e,t){return Math.max($l(e,t)*.5,fs)}function ky(e,t){return e instanceof t.HTMLInputElement&&e.type==="range"}function Oy(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function Ay(e,t){var r,s;const n=je(e.anchorNode)?e.anchorNode:(r=e.anchorNode)==null?void 0:r.parentElement,o=je(e.focusNode)?e.focusNode:(s=e.focusNode)==null?void 0:s.parentElement;return e.containsNode(t,!0)||Te(t,n)||Te(t,o)}function Nc(e,t){var r;const n=pt(e);if(n&&Te(t,n)&&Oy(n)){const{selectionStart:s,selectionEnd:c}=n;if(s!=null&&c!=null&&s<c)return!0}const o=(r=e.getSelection)==null?void 0:r.call(e);return!o||o.isCollapsed?!1:Ay(o,t)}function Dy(e,t){return e.composedPath().some(n=>ky(n,t))}function Ny(e){return Dy(e.nativeEvent,Ge(e.currentTarget))}function Fy(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function Ly(e,t,n,o){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;const r=o?n.clientY-e.startY:n.clientX-e.startX,s=o?n.clientX-e.startX:n.clientY-e.startY,c=Math.abs(r),a=Math.abs(s);return a>=Oc&&a>c+Ty?(e.preserveNativeCrossAxisScroll=!0,!0):c>=Oc?(e.drawerAxisAttributed=!0,!1):!0}function Vy(e,t){return jl(e,t).max>0}function jl(e,t){if(t==="vertical"){const o=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:o}}const n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function Ul(e,t,n){const o=Wl(n,t),{offset:r,max:s}=jl(e,t);return o?r<=0:r>=s}function _y(e,t,n,o){return(Wl(n,t)?o>0:o<0)?Ul(e,t,n):!1}function Wl(e,t){return t==="vertical"?e==="down":e==="right"}function di(e,t,n=Object.is){const{length:o}=e;if(o!==t.length)return!1;for(let r=0;r<o;r+=1)if(!n(e[r],t[r]))return!1;return!0}function Hy(e){return e==null?void 0:`${e}-label`}function zl(e,t){return e??t}function Yl(e,t){return e-t}function ql(e,t,n,o,r,s){const c=et(e,n,o);if(!r)return c;const a=s.slice();return a[t]=et(c,s[t-1]??-1/0,s[t+1]??1/0),a.sort(Yl)}function Xl(e,t,n){if(!Array.isArray(e))return!0;const o=t*n;for(let r=0;r<e.length-1;r+=1)if(!(Math.abs(e[r]-e[r+1])>=o))return!1;return!0}const En=()=>null,ao={activeThumbIndex:En,max:En,min:En,minStepsBetweenValues:En,step:En,values:En,...en},Kl=i.createContext(void 0);function Tr(){const e=i.useContext(Kl);if(e===void 0)throw new Error(nt(62));return e}function By(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&di(e,t)}const i1=i.forwardRef(function(t,n){const{"aria-labelledby":o,className:r,defaultValue:s,disabled:c=!1,id:a,format:l,largeStep:f=10,locale:u,render:p,max:h=100,min:g=0,minStepsBetweenValues:d=0,form:y,name:v,onValueChange:m,onValueCommitted:b,orientation:R="horizontal",step:S=1,thumbCollisionBehavior:x="push",thumbAlignment:C="center",value:w,style:E,...I}=t,A=dt(a),T=Hy(A),M=te(m),P=te(b),{clearErrors:N}=tn(),{state:O,disabled:k,name:_,setTouched:L,setDirty:D,validityData:V,validation:B}=Ht(),{labelId:H}=kt(),[z,F]=i.useState(),j=o??zl(H,z),$=k||c,Y=_??v,[U,le]=Vt({controlled:w,default:s??g,name:"Slider"}),ae=i.useRef(null),me=i.useRef(null),Q=i.useRef([]),G=i.useRef(null),J=i.useRef(-1),ie=i.useRef(null),Re=i.useRef(vt),[ue,q]=i.useState(-1),[K,ce]=i.useState(-1),[ee,oe]=i.useState(!1),[Ie,ne]=i.useState(()=>new Map),[ve,se]=i.useState([void 0,void 0]),X=te(Ae=>{q(Ae),Ae!==-1&&ce(Ae)}),we=te(Ae=>{Ae&&(me.current=Ae)}),Z=Array.isArray(U),re=i.useMemo(()=>Z?U.map(Ae=>et(Ae,g,h)).sort(Yl):[et(U,g,h)],[h,g,Z,U]),xe=Z?re:re[0];io(B.inputRef,A,xe,void 0,!$,v),Sn(xe,()=>{N(Y),B.change(xe);const Ae=V.initialValue;let Se;Array.isArray(xe)&&Array.isArray(Ae)?Se=!di(xe,Ae):Se=xe!==Ae,D(Se)});const ye=te((Ae,Se)=>{if(Number.isNaN(Ae)||By(Ae,U))return!1;const _e=Se.event,He=_e.constructor,Ye=new He(_e.type,_e);return Object.defineProperty(Ye,"target",{writable:!0,value:{value:Ae,name:Y}}),Se.event=Ye,M(Ae,Se),Se.isCanceled?!1:(Re.current=Se.reason,le(Ae),!0)}),pe=te((Ae,Se,_e)=>{const He=ql(Ae,Se,g,h,Z,re);if(Xl(He,S,d)){const Ye="key"in _e?xf:bf,ot=ye(He,Oe(Ye,_e.nativeEvent,void 0,{activeThumbIndex:Se}));L(!0),ot&&P(He,Ms(Ye,_e.nativeEvent))}});fe(()=>{if(!$)return;const Ae=pt($e(ae.current));Te(ae.current,Ae)&&Ae.blur(),ue!==-1&&X(-1)},[ue,$,X]);const de=i.useMemo(()=>({...O,activeThumbIndex:ue,disabled:$,dragging:ee,orientation:R,max:h,min:g,minStepsBetweenValues:d,step:S,values:re}),[O,ue,$,ee,h,g,d,R,S,re]),Me=i.useMemo(()=>({active:ue,controlRef:me,disabled:$,dragging:ee,validation:B,format:l,handleInputChange:pe,indicatorPosition:ve,inset:C!=="center",labelId:j,rootLabelId:T,largeStep:f,lastUsedThumbIndex:K,lastChangeReasonRef:Re,form:y,locale:u,max:h,min:g,minStepsBetweenValues:d,name:Y,onValueCommitted:P,orientation:R,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:J,pressedValuesRef:ie,registerFieldControlRef:we,renderBeforeHydration:C==="edge",setActive:X,setDragging:oe,setIndicatorPosition:se,setLabelId:F,setValue:ye,state:de,step:S,thumbCollisionBehavior:x,thumbMap:Ie,thumbRef
434s:Q,values:re}),[ue,j,T,$,ee,B,l,pe,ve,f,K,y,u,h,g,d,Y,P,R,we,X,ye,de,S,x,C,Ie,re]),Le=Ne("div",t,{state:de,ref:[n,ae],props:[{"aria-labelledby":j,id:A,role:"group"},I,Ae=>B.getValidationProps($,Ae)],stateAttributesMapping:ao});return he.jsx(Kl.Provider,{value:Me,children:he.jsx(co,{elementsRef:Q,onMapChange:ne,children:Le})})});function Gl(e){return Array.isArray(e)?e.map(t=>Gl(t)).join(","):e==null?"":String(e)}const Fc=new Map;function $y(e,t){const n=JSON.stringify({locale:Gl(e),options:t}),o=Fc.get(n);if(o)return o;const r=new Intl.NumberFormat(e,t);return Fc.set(n,r),r}function ds(e,t,n){return e==null?"":$y(t,n).format(e)}function Zl(e,t){const n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function Xn(e){if(e===0)return 0;if(Math.abs(e)<1){const n=e.toExponential().split("e-"),o=n[0].split(".")[1];return(o?o.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Jl(e,t,n){const o=Math.round((e-n)/t)*t+n;return Number(o.toFixed(Math.max(Xn(t),Xn(n))))}function Lc(e,t,n,o,r,s,c,a){const l=e.slice(),f=s*c,u=l.length-1,p=a??e,h=o+t*f,g=r-(u-t)*f;l[t]=et(n,h,g);for(let d=t+1;d<=u;d+=1){const y=l[d-1]+f,v=r-(u-d)*f,m=p[d];let b=Math.max(l[d],y);m<b&&(b=Math.max(m,y)),l[d]=et(b,y,v)}for(let d=t-1;d>=0;d-=1){const y=l[d+1]-f,v=o+d*f,m=p[d];let b=Math.min(l[d],y);m>b&&(b=Math.min(m,y)),l[d]=et(b,v,y)}for(let d=0;d<=u;d+=1)l[d]=Number(l[d].toFixed(12));return l}function jy(e,t,n,o,r,s,c,a,l,f){const u=n??t,p=o??t;if(!(u.length>1))return{value:s,thumbIndex:0,didSwap:!1};const g=l*f;if(e==="push")return{value:Lc(u,r,s,c,a,l,f),thumbIndex:r,didSwap:!1};const d=u.slice(),y=d[r-1],v=d[r+1],m=y!=null?y+g:c,b=v!=null?v-g:a,R=Number(et(s,m,b).toFixed(12));switch(d[r]=R,e){case"swap":{const S=u[r],x=1e-7,C=s>S,w=s<S,E=C&&v!=null&&s>=v-x,I=w&&y!=null&&s<=y+x;if(!E&&!I)return{value:d,thumbIndex:r,didSwap:!1};const A=E?r+1:r-1,T=d.map((V,B)=>{if(B===r)return R;const H=p[B];return H??u[B]});let M=s;E?M=Math.max(s,d[A]):M=Math.min(s,d[A]);const P=Lc(d,A,M,c,a,l,f,T),N=E?A-1:A+1,O=P[N-1],k=P[N+1];let _=O!=null?O+g:c;_=Math.max(_,c+N*g);let L=k!=null?k-g:a;L=Math.min(L,a-(P.length-1-N)*g);const D=et(R,_,L);return P[N]=Number(D.toFixed(12)),{value:P,thumbIndex:A,didSwap:!0}}case"none":default:return{value:d,thumbIndex:r,didSwap:!1}}}const Uy=2;function Wy(e,t){if(!e)return{start:0,end:0};function n(s){const c=s!=null?parseFloat(s):0;return Number.isNaN(c)?0:c}const o=t?"Top":"InlineStart",r=t?"Bottom":"InlineEnd";return{start:n(e[`border${o}Width`])+n(e[`padding${o}`]),end:n(e[`border${r}Width`])+n(e[`padding${r}`])}}function zy(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let o=0;o<n.changedTouches.length;o+=1){const r=n.changedTouches[o];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}const c1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,{disabled:a,dragging:l,inset:f,lastChangeReasonRef:u,max:p,min:h,minStepsBetweenValues:g,onValueCommitted:d,orientation:y,pressedThumbCenterOffsetRef:v,pressedThumbIndexRef:m,pressedValuesRef:b,registerFieldControlRef:R,renderBeforeHydration:S,setActive:x,setDragging:C,setValue:w,state:E,step:I,thumbCollisionBehavior:A,thumbRefs:T,values:M}=Tr(),P=Vn(),N=M.length>1,O=y==="vertical",k=i.useRef(null),_=i.useRef(null),L=te(q=>{q&&_.current==null&&(_.current=Ge(q).getComputedStyle(q))}),D=i.useRef(null),V=i.useRef(0),B=i.useRef(0),H=i.useRef(null),z=at(M);function F(q){return q==null?void 0:q.querySelector('input[type="range"]')}function j(q){m.current=q,T.current[q]||(v.current=null)}function $(){m.current=-1,v.current=null}function Y(q){return je(q)?T.current.some(K=>{var ce;return!je(K)||!Te(K,q)?!1:((ce=F(K))==null?void 0:ce.disabled)===!0}):!1}function U(q){const K=k.current,ce=m.current;if(!K||ce<0||ce>=M.length)return ce>=M.length&&(H.current=null),null;const{width:ee,height:oe,bottom:Ie,left:ne,right:ve}=K.getBoundingClientRect(),se=Wy(_.current,O),X=B.current,we=(O?oe:ee)-se.start-se.end-X*2,Z=v.current??0,re=q.x-Z,xe=q.y-Z,ye=O?Ie-xe-se.end:(P==="rtl"?ve-re:re-ne)-se.start,pe=et((ye-X)/we,0,1);let de=(p-h)*pe+h;return de=Jl(de,I,h),de=et(de,h,p),N?jy(A,M,z.current,b.current,ce,de,h,p,I,g):{value:de,thumbIndex:ce,didSwap:!1}}function le(q){var ee;b.current=N?M.slice():null,H.current=null,z.current=M;const K=m.current;let ce=K;if(K>-1&&K<M.length){if(M[K]===p){let oe=K;for(;oe>0&&M[oe-1]===p;)oe-=1;ce=oe}}else{const oe=O?"y":"x";let Ie;ce=-1;for(let ne=0;ne<T.current.length;ne+=1){const ve=T.current[ne];if(je(ve)&&!((ee=F(ve))!=null&&ee.disabled)){const se=Zl(ve,O),X=Math.abs(q[oe]-se);(Ie===void 0||X<=Ie)&&(ce=ne,Ie=X)}}}if(ce>-1&&ce!==K&&j(ce),f){const oe=T.current[ce];if(je(oe)){const Ie=oe.getBoundingClientRect(),ne=O?"height":"width";B.current=Ie[ne]/2}}}function ae(q){var ce;const K=F((ce=T.current)==null?void 0:ce[q]);K&&K.focus({preventScroll:!0,focusVisible:!1})}function me(q,K,ce){const ee=w(q.value,Oe(K,ce,void 0,{activeThumbIndex:q.thumbIndex}));return ee&&(H.current=q.value,z.current=Array.isArray(q.value)?q.value:[q.value],q.didSwap&&(j(q.thumbIndex),ae(q.thumbIndex))),ee}const Q=te(q=>{const K=zy(q,D);if(K==null)return;if(V.current+=1,q.type==="pointermove"&&q.buttons===0){G(q);return}const ce=U(K);ce!=null&&Xl(ce.value,I,g)&&(!l&&V.current>Uy&&C(!0),me(ce,Rf,q))}),G=te(q=>{var ce,ee;x(-1),C(!1),v.current=null;const K=H.current;
434if(Array.isArray(K)&&K.length!==M.length&&(H.current=null),H.current!=null){const oe=u.current;d(H.current,Ms(oe,q))}"pointerType"in q&&((ce=k.current)!=null&&ce.hasPointerCapture(q.pointerId))&&((ee=k.current)==null||ee.releasePointerCapture(q.pointerId)),m.current=-1,D.current=null,ie()}),J=te(q=>{if(a)return;if(Y(st(q))){$();return}const K=q.changedTouches[0];if(K==null)return;D.current=K.identifier;const ce={x:K.clientX,y:K.clientY};le(ce);const ee=U(ce);if(ee==null)return;ae(ee.thumbIndex),me(ee,Si,q),V.current=0;const oe=$e(k.current);oe.addEventListener("touchmove",Q,{passive:!0}),oe.addEventListener("touchend",G,{passive:!0})}),ie=te(()=>{const q=$e(k.current);q.removeEventListener("pointermove",Q),q.removeEventListener("pointerup",G),q.removeEventListener("touchmove",Q),q.removeEventListener("touchend",G),b.current=null,H.current=null}),Re=cn();return i.useEffect(()=>{const q=k.current;if(!q)return()=>ie();const K=We(q,"touchstart",J,{passive:!0});return()=>{K(),Re.cancel(),ie()}},[ie,J,k,Re]),i.useEffect(()=>{a&&ie()},[a,ie]),Ne("div",t,{state:E,ref:[n,R,k,L],props:[{"data-base-ui-slider-control":S?"":void 0,onPointerDown(q){const K=k.current,ce=st(q.nativeEvent);if(!K||a||q.defaultPrevented||!je(ce)||q.button!==0)return;if(Y(ce)){$();return}const ee={x:q.clientX,y:q.clientY};le(ee);const oe=U(ee);if(oe==null)return;Te(T.current[oe.thumbIndex],pt($e(K)))?q.preventDefault():Re.request(()=>{ae(oe.thumbIndex)}),C(!0),v.current!=null||me(oe,Si,q.nativeEvent),q.nativeEvent.pointerId&&K.setPointerCapture(q.nativeEvent.pointerId),V.current=0;const ve=$e(K);ve.addEventListener("pointermove",Q,{passive:!0}),ve.addEventListener("pointerup",G,{once:!0})}},c],stateAttributesMapping:ao})}),a1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,{state:a}=Tr();return Ne("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},c],stateAttributesMapping:ao})}),Yy="";function qy(){return ct}function Xy(){return!1}function Ky(){return!0}function pi(){return mr.useSyncExternalStore(qy,Xy,Ky)}function ps(e,t,n){return(e-t)*100/(n-t)}const Gy=i.createContext(void 0),Zy={disableStyleElements:!1};function Ql(){return i.useContext(Gy)??Zy}function Jy(e){const{script:t}=e,{nonce:n}=Ql();return pi()?he.jsx("script",{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}const Qy="data-index";var Vc;const eb=new Set([...Rn,il,cl]);function tb(e,t,n,o){if(!(t<0))return e.length===2?`${ds(e[t],o,n)} ${t===0?"start":"end"} range`:n?ds(e[t],o,n):void 0}function nb(e,t,n,o,r){const s=e+t*n,c=Number(s.toFixed(Math.max(Xn(e),Xn(t),Xn(o))));return et(c,o,r)}const l1=i.forwardRef(function(t,n){const{render:o,children:r,className:s,"aria-describedby":c,"aria-label":a,"aria-labelledby":l,"aria-valuetext":f,disabled:u=!1,getAriaLabel:p,getAriaValueText:h,id:g,index:d,inputRef:y,onBlur:v,onFocus:m,onKeyDown:b,tabIndex:R,style:S,...x}=t,C=dt(g),{active:w,lastUsedThumbIndex:E,controlRef:I,disabled:A,validation:T,format:M,handleInputChange:P,inset:N,labelId:O,largeStep:k,locale:_,max:L,min:D,minStepsBetweenValues:V,form:B,name:H,orientation:z,pressedThumbCenterOffsetRef:F,pressedThumbIndexRef:j,renderBeforeHydration:$,setActive:Y,setIndicatorPosition:U,state:le,step:ae,thumbRefs:me,values:Q}=Tr(),G=Vn(),J=u||A,ie=Q.length>1,Re=z==="vertical",ue=G==="rtl",{setTouched:q,setFocused:K,validationMode:ce}=Ht(),ee=i.useRef(null),oe=i.useRef(null),Ie=i.useRef(!1),ne=te(Pe=>{Ie.current||m==null||m(Pe)}),ve=te(Pe=>{Ie.current||v==null||v(Pe)}),se=dt(),X=Ln(),we=ie?se:X,Z=i.useMemo(()=>({inputId:we}),[we]),{ref:re,index:xe}=Cr({metadata:Z}),ye=ie?d??xe:0,pe=ye===Q.length-1,de=Q[ye],Me=ps(de,D,L),[Le,Ae]=i.useState(),Se=pi(),_e=E>=0&&E<Q.length?E:-1,He=te(()=>{const Pe=I.current,Be=ee.current;if(!Pe||!Be)return;const Ce=Be.getBoundingClientRect(),ke=Pe.getBoundingClientRect(),ze=Re?"height":"width",Ue=ke[ze]-Ce[ze],qe=(Ce[ze]/2+Ue*Me/100)/ke[ze]*100,it=Number.isFinite(qe)?qe:void 0;Ae(it),ye===0?U(rt=>[it,rt[1]]):pe&&U(rt=>[rt[0],it])});fe(()=>{N&&queueMicrotask(He)},[He,N]),fe(()=>{N&&He()},[He,N,Me]),fe(()=>{if(!N)return;const Pe=I.current,Be=ee.current;if(!Pe||!Be)return;const Ce=Ge(Pe).ResizeObserver;if(typeof Ce!="function")return;const ke=new Ce(He);return ke.observe(Pe),ke.observe(Be),()=>{ke.disconnect()}},[I,He,N]);
434const Ye=Re?"bottom":"insetInlineStart",ot=Re?"left":"top";let Xe;ie?w===ye?Xe=2:_e===ye&&(Xe=1):w===ye&&(Xe=1);let W;!N&&!Number.isFinite(Me)?W=Dn:W={position:"absolute",[Ye]:N?"var(--position)":`${Me}%`,[ot]:"50%",translate:`${(Re||!ue?-1:1)*50}% ${(Re?1:-1)*50}%`,zIndex:Xe,...N&&{"--position":`${Le??0}%`,visibility:$&&Se||Le===void 0?"hidden":void 0}};let ge;Re&&(ge=ue?"vertical-rl":"vertical-lr");const be=typeof p=="function"?p(ye):a,Fe=bt({"aria-label":be,"aria-labelledby":l??(be==null?O:void 0),"aria-describedby":c,"aria-orientation":z,"aria-valuenow":de,"aria-valuetext":typeof h=="function"?h(ds(de,_,M),de,ye):f??tb(Q,ye,M,_),disabled:J,form:B,id:we,max:L,min:D,name:H,onChange(Pe){P(Pe.currentTarget.valueAsNumber,ye,Pe)},onFocus(Pe){const Be=Ie.current;Ie.current=!1,Y(ye),K(!0),Be&&Pe.stopPropagation()},onBlur(Pe){if(Ie.current){Pe.stopPropagation();return}Y(-1),!me.current.some(Be=>Te(Be,Pe.relatedTarget))&&(q(!0),K(!1),ce==="onBlur"&&T.commit(ql(de,ye,D,L,ie,Q)))},onKeyDown(Pe){if(Pe.defaultPrevented||!eb.has(Pe.key))return;Rn.has(Pe.key)&&Pe.stopPropagation();let Be=null,Ce=0,ke=Pe.shiftKey?k:ae;const ze=Jl(de,ae,D);switch(Pe.key){case Yo:Ce=1;break;case Ko:Ce=ue?-1:1;break;case qo:Ce=-1;break;case Xo:Ce=ue?1:-1;break;case il:ke=k,Ce=1;break;case cl:ke=k,Ce=-1;break;case Zo:Be=ie&&Number.isFinite(Q[ye+1])?Q[ye+1]-ae*V:L;break;case Go:Be=ie&&Number.isFinite(Q[ye-1])?Q[ye-1]+ae*V:D;break}if(Ce!==0&&(Be=nb(ze,ke,Ce,D,L)),Be!==null){const Ue=Pe.currentTarget;aa(Ue)||(Ie.current=!0,Ue.blur(),Ue.focus({preventScroll:!0,focusVisible:!0})),P(Be,ye,Pe),Pe.preventDefault()}},step:ae,style:{...Dn,width:"100%",height:"100%",writingMode:ge},tabIndex:R,type:"range",value:de??""},Pe=>T.getValidationProps(J,Pe),{onFocus:ne,onBlur:ve,onKeyDown:b}),De=Tt(oe,T.inputRef,y);return Ne("div",t,{state:le,ref:[n,re,ee],props:[{[Qy]:ye,children:he.jsxs(i.Fragment,{children:[r,he.jsx("input",{ref:De,...Fe,suppressHydrationWarning:!0}),N&&pe&&$&&(Vc||(Vc=he.jsx(Jy,{script:Yy})))]}),id:C,onPointerDown(Pe){if(J)return;j.current=ye;const Be=Zl(Pe.currentTarget,Re);F.current=(Re?Pe.clientY:Pe.clientX)-Be},style:W,suppressHydrationWarning:$||void 0},x],stateAttributesMapping:ao})});function ob(e,t,n,o,r,s){const c={visibility:s||n&&(o===void 0||t&&r===void 0)?"hidden":void 0,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};let a=`${o??0}%`,l=`${(r??0)-(o??0)}%`;return n&&(c["--start-position"]=a,a="var(--start-position)",t&&(c["--relative-size"]=l,l="var(--relative-size)")),c[e?"bottom":"insetInlineStart"]=t?a:0,c[e?"height":"width"]=t?l:a,c}const u1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,{indicatorPosition:a,inset:l,max:f,min:u,orientation:p,renderBeforeHydration:h,state:g,values:d}=Tr(),y=pi(),v=p==="vertical",m=d.length>1,b=ob(v,m,l,l?a[0]:ps(d[0],u,f),l?a[1]:ps(d[d.length-1],u,f),l&&h&&y);return Ne("div",t,{state:g,ref:n,props:[{"data-base-ui-slider-indicator":h?"":void 0,style:b,suppressHydrationWarning:h||void 0},c],stateAttributesMapping:ao})}),eu=i.createContext(void 0);function rb(){const e=i.useContext(eu);if(e===void 0)throw new Error(nt(63));return e}const sb="data-checked",ib="data-unchecked",tu={...en,checked(e){return e?{[sb]:""}:{[ib]:""}}},f1=i.forwardRef(function(t,n){const{checked:o,className:r,defaultChecked:s,"aria-labelledby":c,form:a,id:l,inputRef:f,name:u,nativeButton:p=!1,onCheckedChange:h,readOnly:g=!1,required:d=!1,disabled:y=!1,render:v,uncheckedValue:m,value:b,style:R,...S}=t,{clearErrors:x}=tn(),{state:C,setTouched:w,setDirty:E,validityData:I,setFilled:A,setFocused:T,validationMode:M,disabled:P,name:N,validation:O}=Ht(),{labelId:k}=kt(),_=P||y,L=N??u,D=i.useRef(null),V=Tt(D,f,O.inputRef),B=i.useRef(null),H=dt(),z=Ln({id:l}),F=p?void 0:z,[j,$]=Vt({controlled:o,default:!!s,name:"Switch",state:"checked"});io(B,H,j,void 0,!_,u),fe(()=>{A(j)},[j,A]),Sn(j,()=>{x(L),E(j!==I.initialValue),O.change(j)});const{getButtonProps:Y,buttonRef:U}=_t({disabled:_,native:p}),le=hl(c,k,D,!p,F),ae={id:p?z:H,role:"switch","aria-checked":j,"aria-readonly":g||void 0,"aria-required":d||void 0,"aria-labelledby":le,onFocus(){_||T(!0)},onBlur(){const J=D.current;!J||_||(w(!0),T(!1),M==="onBlur"&&O.commit(J.checked))},onClick(J){if(g||_)return;J.preventDefault();const ie=D.current;ie&&Tn(ie,J)}},me={...O.getValidationProps(_),checked:j,disabled:_,form:a,id:F,name:L,required:d,style:L?Ns:Dn,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:V,onChange(J){if(J.nativeEvent.defaultPrevented)return;if(g){J.preventDefault();return}const ie=J.currentTarget.checked,Re=Oe(vt,J.nativeEvent);h==null||h(ie,Re),!Re.isCanceled&&$(ie)},onClick(J){J.stopPropagation()},onFocus(){var J;(J=B.current)==null||J.focus()},...b!==void 0?{value:b}:Je},Q=i.useMemo(()=>({...C,checked:j,disabled:_,readOnly:g,required:d}),[C,j,_,g,d]),G=Ne("span",t,{state:Q,ref:[n,B,U],props:[ae,S,Y,J=>O.getValidationProps(_,J)],stateAttributesMapping:tu});return he.jsxs(eu.Provider,{value:Q,children:[G,!j&&L&&m!==void 0&&he.jsx("input",{type:"hidden",form:a,name:L,value:m,disabled:_}),he.jsx("input",{...me,suppressHydrationWarning:!0})]})}),d1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,a=rb();return Ne("span",t,{state:a,ref:n,stateAttributesMapping:tu,props:c})}),nu=i.createContext(void 0);function cb(){return i.useContext(nu)}const p1=i.forwardRef(function(t,n){const{className:o,defaultPressed:r=!1,disabled:s=!1,form:c,onPressedCh
434ange:a,pressed:l,render:f,type:u,value:p,nativeButton:h=!0,style:g,...d}=t,y=dt(p||void 0),v=cb(),m=(v==null?void 0:v.value)??[],b=(s||(v==null?void 0:v.disabled))??!1,[R,S]=Vt({controlled:v?y!==void 0&&m.indexOf(y)>-1:l,default:r,name:"Toggle",state:"pressed"}),{getButtonProps:x,buttonRef:C}=_t({disabled:b,native:h}),w={disabled:b,pressed:R},E=[C,n],I=[{"aria-pressed":R,onClick(M){var O;const P=!R,N=Oe(vt,M.nativeEvent);a==null||a(P,N),!N.isCanceled&&(y&&((O=v==null?void 0:v.setGroupValue)==null||O.call(v,y,P,N)),!N.isCanceled&&S(P))}},d,x],A=Ne("button",t,{enabled:!v,state:w,ref:E,props:I}),T=i.useMemo(()=>({disabled:b,focusableWhenDisabled:!1}),[b]);return v?he.jsx(Tl,{tag:"button",render:f,className:o,style:g,metadata:T,state:w,refs:E,props:I}):A}),gi="data-composite-item-active";function ab(e){const{loopFocus:t=!0,orientation:n="both",grid:o,onLoop:r,direction:s,highlightedIndex:c,onHighlightedIndexChange:a,rootRef:l,enableHomeAndEndKeys:f=!1,stopEventPropagation:u,disabledIndices:p,modifierKeys:h=Mt}=e,[g,d]=i.useState(0),y=o!=null,v=i.useRef(null),m=Tt(v,l),b=i.useRef([]),R=i.useRef(!1),S=i.useRef(null),x=c??g,C=te((T,M=!1)=>{if(S.current=b.current[T]??null,(a??d)(T),M){const P=b.current[T];oc(v.current,P,s,n)}}),w=te(T=>{var O;if(T.size===0)return;if(R.current){const k=b.current,_=k.indexOf(S.current);if(_===-1){const L=k[x];!L||In(k,x,p)?C(lb(k,p)):S.current=L}else _!==x&&C(_);return}R.current=!0;const M=Array.from(T.keys()),P=M.find(k=>k==null?void 0:k.hasAttribute(gi))??null,N=P?((O=T.get(P))==null?void 0:O.index)??-1:-1;if(N!==-1)C(N);else if(In(M,x,p)){const k=qt(M,{disabledIndices:p});Yn(M,k)||C(k)}oc(v.current,P,s,n)});fe(()=>{if(p==null||c!=null||!R.current)return;const T=b.current;if(In(T,x,p)){const M=qt(T,{disabledIndices:p});Yn(T,M)||C(M)}},[p,c,x,b,C]);const E=te((T,M,P)=>r?r(T,M,P,b):P),I=te(T=>{const M=T.key===Go||T.key===Zo;if(!Rn.has(T.key)||!f&&M||ub(T,h)||!v.current)return;const N=s==="rtl",O=N?Xo:Ko,k=N?Ko:Xo,_=n==="vertical"?qo:O,L=n==="vertical"?Yo:k,D=st(T.nativeEvent);if(D!=null&&nc(D)&&!Ml(D)){const j=D.selectionStart,$=D.selectionEnd,Y=D.value;if(j==null||T.shiftKey||j!==$||T.key!==L&&j<Y.length||T.key!==_&&j>0)return}let V=x;const B=Mo(b,p),H=os(b,p);o!=null&&(V=o({disabledIndices:p,elementsRef:b,event:T,highlightedIndex:x,loopFocus:t,maxIndex:H,minIndex:B,onLoop:E,orientation:n,rtl:N}));const z=n!=="vertical"&&T.key===O||n!=="horizontal"&&T.key===qo,F=n!=="vertical"&&T.key===k||n!=="horizontal"&&T.key===Yo;f&&(T.key===Go?V=B:T.key===Zo&&(V=H)),V===x&&(z||F)&&(t&&V===H&&z?(V=B,r&&(V=r(T,x,V,b))):t&&V===B&&F?(V=H,r&&(V=r(T,x,V,b))):V=qt(b.current,{startingIndex:V,decrement:F,disabledIndices:p})),V!==x&&!Yn(b.current,V)&&(u&&T.stopPropagation(),(y||M||z||F)&&T.preventDefault(),C(V,!0),queueMicrotask(()=>{var j;(j=b.current[V])==null||j.focus()}))});return{props:{ref:m,onFocus(T){const M=v.current,P=st(T.nativeEvent);!M||P==null||!nc(P)||P.setSelectionRange(0,P.value.length)},onKeyDown:I},highlightedIndex:x,onHighlightedIndexChange:C,elementsRef:b,onMapChange:w,relayKeyboardEvent:I}}function lb(e,t){let n=-1;for(let o=0;o<e.length;o+=1){const r=e[o];if(!(!r||In(e,o,t))){if(r.hasAttribute(gi))return o;n===-1&&(n=o)}}return Math.max(n,0)}function ub(e,t){for(const n of Vp)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ou(e){const{render:t,className:n,style:o,refs:r=Mt,props:s=Mt,state:c=Je,stateAttributesMapping:a,highlightedIndex:l,onHighlightedIndexChange:f,orientation:u,grid:p,loopFocus:h,onLoop:g,enableHomeAndEndKeys:d,onMapChange:y,stopEventPropagation:v=!0,rootRef:m,disabledIndices:b,modifierKeys:R,highlightItemOnHover:S=!1,tag:x="div",...C}=e,w=Vn(),{props:E,highlightedIndex:I,onHighlightedIndexChange:A,elementsRef:T,onMapChange:M,relayKeyboardEvent:P}=ab({grid:p,loopFocus:h,onLoop:g,orientation:u,highlightedIndex:l,onHighlightedIndexChange:f,rootRef:m,stopEventPropagation:v,enableHomeAndEndKeys:d,direction:w,disabledIndices:b,modifierKeys:R}),N=Ne(x,e,{state:c,ref:r,props:[E,...s,C],stateAttributesMapping:a}),O=i.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:A,highlightItemOnHover:S,relayKeyboardEvent:P}),[I,A,S,P]);return he.jsx(Jc.Provider,{value:O,children:he.jsx(co,{elementsRef:T,onMapChange:k=>{y==null||y(k),M(k)},children:N})})}const fb=i.createContext(void 0);function db(){return i.useContext(fb)}const g1=i.forwardRef(function(t,n){const{defaultValue:o,disabled:r=!1,loopFocus:s=!0,onValueChange:c,orientation:a="horizontal",multiple:l=!1,value:f,className:u,render:p,style:h,...g}=t,d=ci(),y=db(),v=o??Mt,m=f!==void 0||o!==void 0,b=((d==null?void 0:d.disabled)??!1)||((y==null?void 0:y.disabled)??!1)||r,[R,S]=Vt({controlled:f,default:v,name:"ToggleGroup",state:"value"}),x=te((A,T,M)=>{let P;l?(P=R.slice(),T?P.push(A):P.splice(R.indexOf(A),1)):P=T?[A]:[],c==null||c(P,M),!M.isCanceled&&S(P)}),C={disabled:b,multiple:l,orientation:a},w=i.useMemo(()=>({disabled:b,setGroupValue:x,value:R,isValueInitialized:m}),[b,x,R,m]),E={role:"group"},I=Ne("div",t,{enabled:!!d,state:C,ref:n,props:[E,g]});return he.jsx(nu.Provider,{value:w,children:d?I:he.jsx(ou,{render:p,className:u,style:h,state:C,refs:[n],props:[E,g],loopFocus:s,enableHomeAndEndKeys:!0,orientation:a})})}),ru=i.createContext(void 0);function lo(e){const t=i.useContext(ru);if(t===void 0&&!e)throw new Error(nt(72));return t}const pb={...Js,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class gb extends ro{constructor(n,o,r){const s=new vr;super(hb(n,s,o,r),mb(s),pb);Qe(this,"setOpen",(n,o)=>{Cp(this,n,o,{extraState:{openChangeReason:o.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,Oe(un,n))}}function hb(e,t,n,o=!1){return{...Gs(t,n,o),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function mb(e){return{popupRef:i.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const h1=yr(function(t){const{disabled:n=!1,defaultOpen:o=!1,open:r,disableHoverablePopup:s=!1,trackCursorAxis:c="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:f,handle:u,triggerId:p,defaultTr
434iggerId:h=null,children:g}=t,d=qa((T,M)=>new gb({open:o,openProp:r,activeTriggerId:h,triggerIdProp:p},T,M));d.useControlledProp("openProp",r),d.useControlledProp("triggerIdProp",p),d.useContextCallback("onOpenChange",l),d.useContextCallback("onOpenChangeComplete",f);const y=d.useState("open"),v=!n&&y,m=d.useState("activeTriggerId"),b=d.useState("mounted"),R=d.useState("payload");d.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:s,disabled:n}),qs(d,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S,transitionStatus:x}=Xs(v,d),C=d.useState("isInstantPhase"),w=d.useState("instantType"),E=d.useState("lastOpenChangeReason"),I=i.useRef(null);fe(()=>{y&&n&&d.setOpen(!1,Oe(sa))},[y,n,d]),fe(()=>{x==="ending"&&E===vt||x!=="ending"&&C?(w!=="delay"&&(I.current=w),d.set("instantType","delay")):I.current!==null&&(d.set("instantType",I.current),I.current=null)},[x,C,E,w,d]),fe(()=>{v&&m==null&&d.set("payload",void 0)},[d,m,v]),i.useImperativeHandle(a,()=>({unmount:S,close:()=>d.setOpen(!1,Oe(Ts))}),[S,d]);const A=v||b||!n&&c!=="none";return he.jsxs(ru.Provider,{value:d,children:[u&&he.jsx(zs,{handle:u,store:d}),A&&he.jsx(yb,{store:d,disabled:n,trackCursorAxis:c}),typeof g=="function"?g({payload:R}):g]})});function yb({store:e,disabled:t,trackCursorAxis:n}){const o=e.useState("floatingRootContext"),r=gr(o,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=xd(o,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),c=i.useMemo(()=>bt(s.reference,r.reference),[s.reference,r.reference]);return Ks(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:r.floating??Je}),null}const su=i.createContext(void 0);function bb(){return i.useContext(su)}const vb=600,iu="data-base-ui-tooltip-trigger";function _c(e){if("composedPath"in e){const n=e.composedPath();for(let o=0;o<n.length;o+=1){const r=n[o];if(je(r))return r}}const t=e.target;return je(t)?t:null}function xb(e){let t=e;for(;t;){const n=t.closest(`[${iu}]`);if(n)return n;const o=t.getRootNode();t="host"in o&&je(o.host)?o.host:null}return null}const m1=Wa(function(t,n){const{render:o,className:r,style:s,handle:c,payload:a,disabled:l,delay:f,closeOnClick:u=!0,closeDelay:p,id:h,...g}=t,d=lo(!0),v=Za(c)??d;if(!v)throw new Error(nt(82));const m=dt(h),b=v.useState("isTriggerActive",m),R=v.useState("isOpenedByTrigger",m),S=v.useState("floatingRootContext"),x=i.useRef(null),C=p??0,{registerTrigger:w,isMountedByThisTrigger:E}=Ka(m,x,v,{payload:a,closeOnClick:u,closeDelay:C}),I=bb(),{activeIdRef:A,delayRef:T,isInstantPhase:M,hasProvider:P}=Hf(S,{open:R}),N=ei(S);v.useSyncedValue("isInstantPhase",M);const O=v.useState("disabled"),k=l??O,_=at(k),L=v.useState("trackCursorAxis"),D=v.useState("disableHoverablePopup"),V=i.useRef(!1),B=lt(),H=i.useRef(void 0);function z(){return P&&A.current!=null?0:f??I??vb}function F(G){const J=x.current;if(!J||!G)return!1;const ie=xb(G);return ie!==null&&ie!==J&&Te(J,ie)}function j(G){const J=F(G);return V.current=J,J&&(N.openChangeTimeout.clear(),N.restTimeout.clear(),N.restTimeoutPending=!1,B.clear()),J}const $=tl(S,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!D&&L!=="both"?rl():null,restMs:z,delay(){return p==null&&P?{close:yn(T.current,"close")}:{close:C}},triggerElementRef:x,isActiveTrigger:b,isClosing:()=>v.select("transitionStatus")==="ending",shouldOpen(){return!V.current}}),Y=Ja(S,{enabled:!k}).reference,U=G=>{const J=V.current,ie=_c(G),Re=j(ie),ue=x.current,q=ue&&ie&&Te(ue,ie);if(Re&&v.select("open")&&v.select("lastOpenChangeReason")===gt){v.setOpen(!1,Oe(gt,G));return}if(J&&!Re&&q&&!_.current&&!v.select("open")&&ue&&rn(H.current)){const K=()=>{!V.current&&!_.current&&!v.select("open")&&v.setOpen(!0,Oe(gt,G,ue))},ce=z();ce===0?(B.clear(),K()):B.start(ce,K)}},le=v.useState("triggerProps",E);return Ne("button",t,{state:{open:R},ref:[n,w,x],props:[$,Y,E||L!=="none"?le:void 0,{onMouseOver(G){U(G.nativeEvent)},onFocus(G){F(_c(G.nativeEvent))&&G.preventBaseUIHandler()},onMouseLeave(){V.current=!1,B.clear(),H.current=void 0},onPointerEnter(G){H.current=G.pointerType},onPointerDown(G){H.current=G.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(G.nativeEvent)},onClick(G){u&&!v.select("open")&&v.cancelPendingOpen(G.nativeEvent)},id:m,[es]:k?"":void 0,[iu]:k?void 0:""},g],stateAttributesMapping:ra})}),cu=i.createContext(void 0);function Rb(){const e=i.useContext(cu);if(e===void 0)throw new Error(nt(70));return e}const Sb=i.forwardRef(function(t,n){const{children:o,container:r,className:s,render:c,style:a,...l}=t,{node:f,subtree:u}=Ia({container:r,ref:n,componentProps:t,elementProps:l});return!u&&!f?null:he.jsxs(i.Fragment,{children:[u,f&&Nt.createPortal(o,f)]})}),y1=i.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t;
434return lo().useState("mounted")||o?he.jsx(cu.Provider,{value:o,children:he.jsx(Sb,{ref:n,...r})}):null}),au=i.createContext(void 0);function lu(){const e=i.useContext(au);if(e===void 0)throw new Error(nt(71));return e}const b1=i.forwardRef(function(t,n){const{render:o,className:r,anchor:s,positionMethod:c="absolute",side:a="top",align:l="center",sideOffset:f=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:h=5,arrowPadding:g=5,sticky:d=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=Pa,style:m,...b}=t,R=lo(),S=Rb(),x=R.useState("open"),C=R.useState("mounted"),w=R.useState("trackCursorAxis"),E=R.useState("disableHoverablePopup"),I=R.useState("floatingRootContext"),A=R.useState("instantType"),T=R.useState("transitionStatus"),M=R.useState("adaptiveOrigin"),P=ai({anchor:s,positionMethod:c,floatingRootContext:I,mounted:C,side:a,sideOffset:f,align:l,alignOffset:u,collisionBoundary:p,collisionPadding:h,sticky:d,arrowPadding:g,disableAnchorTracking:y,keepMounted:S,collisionAvoidance:v,adaptiveOrigin:M}),N=i.useMemo(()=>({open:x,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:w!=="none"?"tracking-cursor":A}),[x,P.side,P.align,P.anchorHidden,w,A]),O=li(t,N,{styles:P.positionerStyles,transitionStatus:T,props:b,refs:[n,R.useStateSetter("positionerElement")],hidden:!C,inert:!x||w==="both"||E});return he.jsx(au.Provider,{value:P,children:O})}),v1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,a=lo(),{side:l,align:f}=lu(),u=a.useState("open"),p=a.useState("instantType"),h=a.useState("transitionStatus"),g=a.useState("popupProps"),d=a.useState("floatingRootContext"),y=a.useState("disabled"),v=a.useState("closeDelay");It({open:u,ref:a.context.popupRef,onComplete(){var S,x;u&&((x=(S=a.context).onOpenChangeComplete)==null||x.call(S,!0))}}),el(d,{enabled:!y,closeDelay:v});const m=a.useStateSetter("popupElement");return Ne("div",t,{state:{open:u,side:l,align:f,instant:p,transitionStatus:h},ref:[n,a.context.popupRef,m],props:[so,g,Er(h),c],stateAttributesMapping:no})}),x1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,a=lo(),{arrowRef:l,side:f,align:u,arrowUncentered:p,arrowStyles:h}=lu(),g=a.useState("open"),d=a.useState("instantType");return Ne("div",t,{state:{open:g,side:f,align:u,uncentered:p,instant:d},ref:[n,l],props:[{style:h,"aria-hidden":!0},c],stateAttributesMapping:to})}),R1=function(t){const{delay:n,closeDelay:o,timeout:r=400}=t,s=i.useMemo(()=>({open:n,close:o}),[n,o]);return he.jsx(su.Provider,{value:n,children:he.jsx(_f,{delay:s,timeoutMs:r,children:t.children})})};function wb(e){const t=i.useRef(!0);t.current&&(t.current=!1,e())}const uu=i.createContext(void 0),fu=i.createContext(void 0),du=i.createContext(void 0);function Ut(){const e=i.useContext(uu);if(e===void 0)throw new Error(nt(60));return e}function Mr(){const e=i.useContext(fu);if(e===void 0)throw new Error(nt(101));return e}function pu(){const e=i.useContext(du);if(e===void 0)throw new Error(nt(61));return e}const gu=(e,t)=>Object.is(e,t);
434function vn(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Cb(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!di(e,t,(o,r)=>vn(o,r,n)):e!==t}function gs(e,t,n){return e?e.some(o=>o===void 0?!1:vn(t,o,n)):!1}function No(e,t,n){return e?e.findIndex(o=>o===void 0?!1:vn(o,t,n)):-1}function Eb(e,t){if(t!==gu)return o=>gs(e,o,t);const n=new Set(e);return n.delete(void 0),o=>n.has(o)&&(o!==0||e.some(r=>Object.is(o,r)))}function hu(e,t,n,o){const r=o&&Array.isArray(t)?e.findIndex(Eb(t,n)):No(e,t,n);return r===-1?null:r}function Pb(e,t,n,o,r,s){return gs(o,t,r)?s!=null&&e>s&&gs(o,n[s],r)?s:e:e===s?hu(n,o,r,!0):s}function Tb(e,t,n){return e.filter(o=>!vn(t,o,n))}function hs(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Mb(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function mu(e){return Mb(e==null?void 0:e[0])}function Ib(e){return mu(e)?e.flatMap(t=>t.items):e}function kb(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(mu(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function yu(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return hs(e)}function Pn(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?hs(e.value):hs(e)}function bu(e,t,n){function o(){return yu(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??o();if(Array.isArray(t)){const s=Ib(t);if(e==null||typeof e!="object"){const c=s.find(a=>a.value===e);return c&&c.label!=null?c.label:o()}if("value"in e){const c=s.find(a=>a&&a.value===e.value);if(c&&c.label!=null)return c.label}}return o()}function Ob(e,t,n){return e.reduce((o,r,s)=>(s>0&&o.push(", "),o.push(he.jsx(i.Fragment,{children:bu(r,t,n)},s)),o),[])}const Ab={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Pn(t,o)!==""},hasNullItemLabel:(e,t)=>t?kb(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(r=>vn(t,r,n)):vn(t,o,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},At=1;function hi(e,t){return Math.max(0,e-t)}function Jo(e,t){if(t<=0)return 0;const n=et(e,0,t),o=n,r=t-n,s=o<=At,c=r<=At;return s&&c?o<=r?0:t:s?0:c?t:n}function S1(e){const{id:t,value:n,defaultValue:o=null,onValueChange:r,open:s,defaultOpen:c=!1,onOpenChange:a,name:l,form:f,autoComplete:u,disabled:p=!1,readOnly:h=!1,required:g=!1,modal:d=!0,actionsRef:y,inputRef:v,onOpenChangeComplete:m,items:b,multiple:R=!1,itemToStringLabel:S,itemToStringValue:x,isItemEqualToValue:C=gu,highlightItemOnHover:w=!0,children:E}=e,{clearErrors:I}=tn(),{setDirty:A,setTouched:T,setFocused:M,validityData:P,setFilled:N,name:O,disabled:k,validation:_,validationMode:L}=Ht(),D=Ln({id:t}),V=k||p,B=O??l,[H,z]=Vt({controlled:n,default:R?o??Mt:o,name:"Select",state:"value"}),[F,j]=Vt({controlled:s,default:c,name:"Select",state:"open"}),$=i.useRef([]),Y=i.useRef([]),U=i.useRef(null),le=i.useRef(null),ae=i.useRef(0),me=i.useRef(null),Q=i.useRef([]),G=i.useRef(!1),J=i.useRef(null),ie=i.useRef(null),Re=i.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ue=i.useRef(!1),q=i.useRef(H),{mounted:K,setMounted:ce,transitionStatus:ee}=xn(F),{openMethod:oe,triggerProps:Ie}=ul(F),ne=ut(()=>new ro({id:D,labelId:void 0,modal:d,multiple:R,itemToStringLabel:S,itemToStringValue:x,isItemEqualToValue:C,value:H,open:F,mounted:K,transitionStatus:ee,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Je,triggerProps:Je,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ct,setOpen:ct,handleScrollArrowVisibility:ct,onOpenChangeComplete:ct,listRef:$,popupRef:U,scrollHandlerRef:le,scrollArrowsMountedCountRef:ae,valueRef:me,valuesRef:Q,labelsRef:Y,typingRef:G,selectionRef:Re,firstItemTextRef:J,selectedItemTextRef:ie,alignItemWithTriggerActiveRef:ue,initialValueRef:q},Ab)).current,ve=ne.useState("activeIndex"),se=ne.useState("selectedIndex"),X=ne.useState("triggerElement"),we=ne.useState("positionerElement"),Z=Lm(oe),re=oe??Z,xe=i.useMemo(()=>
434R?"":Pn(H,x),[R,H,x]),ye=i.useMemo(()=>R&&Array.isArray(H)?H.map(Ce=>Pn(Ce,x)):Pn(H,x),[R,H,x]),pe=at(X),de=te(()=>ye);io(pe,D,H,de,!V,l);const Me=R?Array.isArray(H)&&H.length>0:H!=null&&xe!=="";fe(()=>{N(Me)},[Me,N]),fe(function(){const ke=hu(Q.current,H,C,R);ke===null&&(ie.current=null),!F&&ne.set("selectedIndex",ke)},[R,F,H,C,ne]),Sn(H,()=>{I(B),A(Cb(H,P.initialValue,C)),_.change(H)});const Le=te((Ce,ke)=>{a==null||a(Ce,ke),!ke.isCanceled&&(j(Ce),!Ce&&(ke.reason===mn||ke.reason===rr)&&(T(!0),M(!1),L==="onBlur"&&_.commit(H)))}),Ae=te(()=>{ce(!1),ne.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),m==null||m(!1)});It({enabled:!y,open:F,ref:U,onComplete(){F||Ae()}}),i.useImperativeHandle(y,()=>({unmount:Ae}),[Ae]);const Se=te((Ce,ke)=>{r==null||r(Ce,ke),!ke.isCanceled&&z(Ce)}),_e=te(Ce=>{const ke=hi(Ce.scrollHeight,Ce.clientHeight),ze=Jo(Ce.scrollTop,ke),Ue=ze>0,Ke=ze<ke;ne.set("scrollUpArrowVisible",Ue),ne.set("scrollDownArrowVisible",Ke)}),He=Tp({open:F,onOpenChange:Le,elements:{reference:X,floating:we}}),Ye=Na(He,{enabled:!V,event:"mousedown"}),ot=gr(He),Xe=nl(He,{enabled:!V,listRef:$,activeIndex:ve,selectedIndex:se,disabledIndices:Mt,onNavigate(Ce){Ce===null&&!F||ne.set("activeIndex",Ce)},focusItemOnHover:w}),W=ol(He,{enabled:!V&&(F||!h&&!R),listRef:Y,activeIndex:ve,selectedIndex:se,disabledIndices:Ce=>Ml($.current[Ce]),onMatch(Ce){F?ne.set("activeIndex",Ce):Se(Q.current[Ce],Oe(vt))},onTyping(Ce){G.current=Ce}}),ge=i.useMemo(()=>bt(W.reference,Xe.reference,ot.reference,Ye.reference,Ie),[Ye.reference,W.reference,Xe.reference,ot.reference,Ie]),be=i.useMemo(()=>bt(so,W.floating,Xe.floating,ot.floating),[W.floating,Xe.floating,ot.floating]),Fe=Xe.item??Je;ne.useContextCallback("setValue",Se),ne.useContextCallback("setOpen",Le),ne.useContextCallback("handleScrollArrowVisibility",_e),ne.useContextCallback("onOpenChangeComplete",m),wb(()=>{ne.update({popupProps:be,triggerProps:ge})}),ne.useSyncedValues({id:D,modal:d,multiple:R,value:H,open:F,mounted:K,transitionStatus:ee,popupProps:be,triggerProps:ge,items:b,itemToStringLabel:S,itemToStringValue:x,isItemEqualToValue:C,openMethod:re});const De=i.useMemo(()=>({disabled:V,readOnly:h,required:g,multiple:R,highlightItemOnHover:w,itemProps:Fe}),[V,h,g,R,w,Fe]),Ve=Tt(v,_.inputRef),Pe=R?void 0:B,Be=i.useMemo(()=>!R||!Array.isArray(H)||!B?null:H.map(Ce=>{const ke=Pn(Ce,x);return he.jsx("input",{type:"hidden",form:f,name:B,value:ke,disabled:V},ke)}),[R,H,f,B,x,V]);return he.jsxs(uu.Provider,{value:ne,children:[he.jsx(fu.Provider,{value:De,children:he.jsx(du.Provider,{value:He,children:E})}),he.jsx("input",{..._.getValidationProps(V,{onFocus(){var Ce;(Ce=ne.state.triggerElement)==null||Ce.focus({focusVisible:!0})},onChange(Ce){if(Ce.nativeEvent.defaultPrevented||V||h)return;const ke=Ce.currentTarget.value,ze=Oe(vt,Ce.nativeEvent);function Ue(){if(R)return;const Ke=ke.toLowerCase();let qe=Q.current.findIndex(rt=>Pn(rt,x).toLowerCase()===Ke||yu(rt,S).toLowerCase()===Ke);qe===-1&&(qe=Q.current.findIndex((rt,ft)=>{const ht=Y.current[ft];return ht!=null&&ht.toLowerCase()===Ke}));const it=Q.current[qe];it!=null&&Se(it,ze)}ne.set("forceMount",!0),queueMicrotask(Ue)}}),id:D&&Pe==null?`${D}-hidden-input`:void 0,form:f,name:Pe,autoComplete:u,value:xe,disabled:V,required:g&&!(R&&Me),readOnly:h,ref:Ve,style:B?Ns:Dn,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Be]})}const Db="data-popup-side",Nb=400,Fb={...Vo,...en,popupSide:e=>e?{[Db]:e}:null,value:()=>null},w1=i.forwardRef(function(t,n){var ae;const{render:o,className:r,id:s,disabled:c=!1,nativeButton:a=!0,style:l,...f}=t,{setTouched:u,setFocused:p,validationMode:h,validation:g,state:d,disabled:y}=Ht(),{labelId:v}=kt(),m=Ut(),{readOnly:b,required:R,disabled:S}=Mr(),x=y||S||c,C=m.useState("open"),w=m.useState("mounted"),E=m.useState("value"),I=m.useState("triggerProps"),A=m.useState("positionerElement"),T=m.useState("listElement"),M=m.useState("popupSide"),P=m.useState("id"),N=m.useState("labelId"),O=m.useState("hasSelectedValue"),k=w&&A?M:null,_=s??P,L=zl(v,N);Ln({id:s});const D=at(A),V=i.useRef(null),{getButtonProps:B,buttonRef:H}=_t({disabled:x,native:a}),z=m.useStateSetter("triggerElement"),F=lt(),j=lt(),$=lt();i.useEffect(()=>{if(C)return $.start(Nb,()=>{m.context.selectionRef.current.allowUnselectedMouseUp=!0,m.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{$.clear()};m.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},j.clear()},[C,m,j,$]);const Y=bt(I,{id:_,role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-controls":C?(T==null?void 0:T.id)??((ae=Bo(A))==null?void 0:ae.id):void 0,"aria-labelledby":L,"aria-readonly":b||void 0,"aria-required":R||void 0,tabIndex:x?-1:0,onFocus(me){p(!0),C&&m.context.alignItemWithTriggerActiveRef.current&&m.context.setOpen(!1,Oe(vt,me.nativeEvent)),F.start(0,()=>{m.set("forceMount",!0)})},onBlur(me){Te(A,me.relatedTarget)||(u(!0),p(!1),h==="onBlur"&&g.commit(E))},onMouseDown(me){if(C)return;const Q=$e(me.currentTarget);function G(J){if(!V.current)return;const ie=J.target;Te(V.current,ie)||Te(D.current,ie)||El(J,V.current)||m.context.setOpen(!1,Oe(Ps,J))}j.start(0,()=>{Q.addEventListener("mouseup",G,{once:!0})})}},f,B),U=g.getValidationProps(x,Y);U.role="combobox";const le={...d,open:C,disabled:x,value:E,readOnly:b,popupSide:k,placeholder:!O};return Ne("button",t,{ref:[n,V,H,z],state:le,stateAttributesMapping:Fb,props:U})}),Lb={value:()=>null},C1=i.forwardRef(function(t,n){const{className:o,render:r,children:s,placeholder:c,style:a,...l}=t,f=Ut(),u=f.useState("value"),p=f.useState("items"),h=f.useState("itemToStringLabel"),g=f.useState("hasSelectedValue"),d=!g&&c!=null&&s==null,y=f.useState("hasNullItemLabel",d),v={value:u,placeholder:!g};let m=null;return typeof s=="function"?m=s(u):s!=null?m=s:d&&!y?m=c:Array.isArray(u)?m=Ob(u,p,h):m=bu(u,p,h),Ne("span",t,{state:v,ref:[n,f.context.valueRef],props:[{children:m},l],stateAttributesMapping:Lb})}),E1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,f={open:Ut().useState("open")};
434return Ne("span",t,{state:f,ref:n,props:[{"aria-hidden":!0,children:"â¼"},c],stateAttributesMapping:ra})}),P1=i.forwardRef(function(t,n){const o=Ut(),r=o.useState("mounted"),s=o.useState("forceMount");return r||s?he.jsx(Bs,{ref:n,...t}):null}),vu=i.createContext(void 0);function mi(){const e=i.useContext(vu);if(!e)throw new Error(nt(59));return e}function Qo(e,t){e&&Object.assign(e.style,t)}const xu={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Vb={position:"fixed"},T1=i.forwardRef(function(t,n){const{anchor:o,className:r,render:s,positionMethod:c,side:a,align:l,sideOffset:f,alignOffset:u,collisionBoundary:p="clipping-ancestors",collisionPadding:h,arrowPadding:g,sticky:d,disableAnchorTracking:y,alignItemWithTrigger:v=!0,collisionAvoidance:m=Ea,style:b,...R}=t,S=Ut(),x=pu(),C=S.useState("open"),w=S.useState("mounted"),E=S.useState("modal"),I=S.useState("value"),A=S.useState("openMethod"),T=S.useState("positionerElement"),M=S.useState("triggerElement"),P=S.useState("isItemEqualToValue"),N=S.useState("transitionStatus"),O=i.useRef(null),k=i.useRef(null),[_,L]=i.useState(v),D=w&&_&&A!=="touch";!w&&_!==v&&L(v),i.useImperativeHandle(S.context.alignItemWithTriggerActiveRef,()=>D),wl((D||E)&&C,A==="touch",T,M);const V=ai({anchor:o,floatingRootContext:x,positionMethod:c,mounted:w,side:a,sideOffset:f,align:l,alignOffset:u,arrowPadding:g,collisionBoundary:p,collisionPadding:h,sticky:d,disableAnchorTracking:y??D,collisionAvoidance:m,keepMounted:!0}),B=D?"none":V.side,H=D?Vb:V.positionerStyles,z={open:C,side:B,align:V.align,anchorHidden:V.anchorHidden};fe(()=>{S.set("popupSide",V.side)},[S,V.side]);const F=S.useStateSetter("positionerElement"),j=li(t,z,{styles:H,transitionStatus:N,props:R,refs:[n,F],hidden:!w,inert:!C}),$=i.useRef(0),Y=te(le=>{if(S.context.valuesRef.current.length===0)return;const ae=$.current;$.current=le.size;const me=Oe(vt);if(ae!==0&&!S.state.multiple&&I!==null&&No(S.context.valuesRef.current,I,P)===-1){const G=S.context.initialValueRef.current,ie=G!=null&&No(S.context.valuesRef.current,G,P)!==-1?G:null;S.context.setValue(ie,me),ie===null&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null)}if(ae!==0&&S.state.multiple&&Array.isArray(I)){const Q=I.filter(G=>No(S.context.valuesRef.current,G,P)!==-1);Q.length!==I.length&&(S.context.setValue(Q,me),Q.length===0&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null))}if(C&&D){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Q={height:""};Qo(T,Q),Qo(S.context.popupRef.current,Q)}}),U=i.useMemo(()=>({...V,side:B,alignItemWithTriggerActive:D,setControlledAlignItemWithTrigger:L,scrollUpArrowRef:O,scrollDownArrowRef:k}),[V,B,D,L]);return he.jsx(co,{elementsRef:S.context.listRef,labelsRef:S.context.labelsRef,onMapChange:Y,children:he.jsxs(vu.Provider,{value:U,children:[w&&E&&he.jsx(oi,{inert:ni(!C),cutout:M}),j]})})}),Eo="base-ui-disable-scrollbar",ms={className:Eo,getElement(e){return he.jsx("style",{nonce:e,href:Eo,precedence:"base-ui:low",children:`.${Eo}{scrollbar-width:none}.${Eo}::-webkit-scrollbar{display:none}`})}},Hc="--transform-origin",_b={...to,...Jt},M1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,finalFocus:c,...a}=t,l=Ut(),{multiple:f,readOnly:u,highlightItemOnHover:p}=Mr(),h=pu(),{side:g,align:d,alignItemWithTriggerActive:y,isPositioned:v,setControlledAlignItemWithTrigger:m}=mi(),b=ci()!=null,R=Vn(),{nonce:S,disableStyleElements:x}=Ql(),C=l.useState("id"),w=l.useState("open"),E=l.useState("openMethod"),I=l.useState("mounted"),A=l.useState("popupProps"),T=l.useState("transitionStatus"),M=l.useState("triggerElement"),P=l.useState("positionerElement"),N=l.useState("listElement"),O=i.useRef(!1),k=i.useRef(!1),_=i.useRef({}),L=cn(),D=te(z=>{if(!P||!l.context.popupRef.current||!k.current)return;const F=P.style.top==="0px",j=P.style.bottom==="0px";if(O.current||!y||!F&&!j){l.context.handleScrollArrowVisibility(z);return}const $=$c(P),Y=Wn(P.getBoundingClientRect().height,"y",$),U=$e(P),le=Ge(P),ae=le.getComputedStyle(P),me=parseFloat(ae.marginTop),Q=parseFloat(ae.marginBottom),G=Bc(le.getComputedStyle(l.context.popupRef.current)),J=Math.min(U.documentElement.clientHeight-me-Q,G),ie=z.scrollTop,Re=Po(z);let ue=null;const q=oe=>{P.style.height=`${oe}px`},K=F?Re-ie:ie,ce=Math.min(Y+K,J);
434if(K<=At){const oe=et(K,0,J-Y);oe>0&&q(Y+oe),z.scrollTop=F?Re:0,J-(Y+oe)<=At&&(O.current=!0),l.context.handleScrollArrowVisibility(z);return}if(J-ce>At)ue=F?1/0:0;else if(j&&ie<Re){const oe=Y+K-J;ue=ie-(K-oe)}const ee=Math.ceil(ce);if(ee!==0&&q(ee),ue!=null){const oe=et(ue,0,Po(z));Math.abs(z.scrollTop-oe)>At&&(z.scrollTop=oe)}ee>=J-At&&(O.current=!0),l.context.handleScrollArrowVisibility(z)});i.useImperativeHandle(l.context.scrollHandlerRef,()=>D,[D]),It({open:w,ref:l.context.popupRef,onComplete(){w&&l.context.onOpenChangeComplete(!0)}});const V={open:w,transitionStatus:T,side:g,align:d};fe(()=>{!P||!l.context.popupRef.current||Object.keys(_.current).length||(_.current={top:P.style.top||"0",left:P.style.left||"0",right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[l,P]),fe(()=>{w||y||(k.current=!1,O.current=!1,Qo(P,_.current))},[w,y,P]),fe(()=>{var j,$;const z=l.context.popupRef.current;if(!w||!M||!P||!z||y&&!v||l.state.transitionStatus==="ending")return;if(k.current=!0,z.style.removeProperty(Hc),!y){L.request(()=>l.context.handleScrollArrowVisibility(N||z));return}const F=Hb(z);try{let Y=l.context.selectedItemTextRef.current;Y!=null&&Y.isConnected||(Y=!l.select("hasSelectedValue")&&((j=l.context.firstItemTextRef.current)!=null&&j.isConnected)?l.context.firstItemTextRef.current:null);const U=l.context.valueRef.current,le=Ge(P),ae=le.getComputedStyle(P),me=le.getComputedStyle(z),Q=$e(M),G=$c(M),J=To(M.getBoundingClientRect(),G),ie=To(P.getBoundingClientRect(),G),Re=J.height,ue=N||z,q=ue.scrollHeight,K=parseFloat(me.borderBottomWidth),ce=parseFloat(ae.marginTop)||10,ee=parseFloat(ae.marginBottom)||10,oe=parseFloat(ae.minHeight)||100,Ie=Bc(me),ne=5,ve=5,se=20,X=Q.documentElement.clientHeight-ce-ee,we=Q.documentElement.clientWidth,Z=X-J.bottom+Re;let re,xe=R==="rtl"?J.right-ie.width:J.left,ye=0;if(Y&&U){const Xe=To(U.getBoundingClientRect(),G);re=To(Y.getBoundingClientRect(),G),xe=ie.left+(R==="rtl"?Xe.right-re.right:Xe.left-re.left);const W=Xe.top-J.top+Xe.height/2;ye=re.top-ie.top+re.height/2-W}const pe=Z+ye+ee+K;let de=Math.min(X,pe);const Me=X-ce-ee,Le=pe-de,Ae=we-ve;P.style.left=`${et(xe,ne,Ae-ie.width)}px`,P.style.height=`${de}px`,P.style.maxHeight="none",P.style.marginTop=`${ce}px`,P.style.marginBottom=`${ee}px`,z.style.height="100%";const Se=Po(ue),_e=Le>=Se-At;_e&&(de=Math.min(X,ie.height)-(Le-Se));const He=J.top<se||J.bottom>X-se||Math.ceil(de)+At<Math.min(q,oe),Ye=((($=le.visualViewport)==null?void 0:$.scale)??1)!==1&&Qt;if(He||Ye){Qo(P,_.current),m(!1);return}const ot=Math.max(oe,de);if(_e){const Xe=Math.max(0,X-pe);P.style.top=ie.height>=Me?"0":`${Xe}px`,P.style.height=`${de}px`,ue.scrollTop=Po(ue)}else P.style.bottom="0",ue.scrollTop=Le;if(re){const Xe=ie.top,W=ie.height,ge=re.top+re.height/2,be=et(W>0?(ge-Xe)/W*100:50,0,100);z.style.setProperty(Hc,`50% ${be}%`)}(ot===X||de>=Ie)&&(O.current=!0),l.context.handleScrollArrowVisibility(ue),p&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{F()}},[l,w,P,M,y,m,L,N,p,R,v]),i.useEffect(()=>{if(!y||!P||!w)return;const z=Ge(P);function F(j){l.context.setOpen(!1,Oe(Sf,j))}return We(z,"resize",F)},[l,y,P,w]);const B={...N?{role:"presentation"}:{role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":u||void 0,id:`${C}-list`},onKeyDown(z){b&&Rn.has(z.key)&&z.stopPropagation()},onScroll(z){N||D(z.currentTarget)},...y&&{style:N?{height:"100%"}:xu},className:!N&&y?ms.className:void 0},H=Ne("div",t,{ref:[n,l.context.popupRef],state:V,stateAttributesMapping:_b,props:[A,B,Er(T),a]});return he.jsxs(i.Fragment,{children:[!x&&ms.getElement(S),he.jsx(pr,{context:h,modal:!1,disabled:!I,openInteractionType:E,returnFocus:c,restoreFocus:!0,children:H})]})});function Bc(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Po(e){return hi(e.scrollHeight,e.clientHeight)}function $c(e){return Ba.getScale(e)}function Wn(e,t,n){return e/n[t]}function To(e,t){return Zn({x:Wn(e.x,"x",t),y:Wn(e.y,"y",t),width:Wn(e.width,"x",t),height:Wn(e.height,"y",t)})}const jc=[["transform","none"],["scale","1"],["translate","0 0"]];function Hb(e){const{style:t}=e,n={};for(const[o,r]of jc)n[o]=t.getPropertyValue(o),t.setProperty(o,r,"important");return()=>{for(const[o]of jc){const r=n[o];r?t.setProperty(o,r):t.removeProperty(o)}}}const I1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,a=Ut(),{multiple:l,readOnly:f}=Mr(),{alignItemWithTriggerActive:u}=mi(),p=a.useState("hasScrollArrows"),h=a.useState("openMethod"),d={id:`${a.useState("id")}-list`,role:"listbox","aria-multiselectable":l||void 0,"aria-readonly":f||void 0,onScroll(v){var m,b;(b=(m=a.context.scrollHandlerRef).current)==null||b.call(m,v.currentTarget)},...u&&{style:xu},className:p&&h!=="touch"?ms.className:void 0},y=a.useStateSetter("listElement");return Ne("div",t,{ref:[n,y],props:[d,c]})}),Ru=i.createContext(void 0);function yi(){const e=i.useContext(Ru);if(!e)throw new Error(nt(57));return e}const k1=i.memo(i.forwardRef(function(t,n){const{render:o,className:r,style:s,value:c=null,label:a,disabled:l=!1,nativeButton:f=!1,...u}=t,p=i.useRef(null),h=Cr({guess:!0,label:a,textRef:p}),g=Ut(),{itemProps:d,multiple:y,disabled:v,readOnly:m}=Mr(),b=v||l,R=g.useState("isActive",h.index),S=g.useState("open"),x=g.useState("isSelected",c),C=g.useState("isSelectedByFocus",h.index),w=g.useState("isItemEqualToValue"),E=h.index,I=i.useRef(null);fe(()=>{const V=g.context.valuesRef.current;return V[E]=c,()=>{delete V[E]}},[E,c,g]),fe(()=>{const V=g.state.value,B=g.state.selectedIndex;let H=B,z;y&&Array.isArray(V)?(H=Pb(E,c,g.context.valuesRef.current,V,w,B),z=H===E,E===B&&!z&&(g.context.selectedItemTextRef.current=null)):(z=V!==void 0&&vn(c,V,w),z&&(H=E)),g.set("selectedIndex",H),z&&p.current&&(g.context.selectedItemTextRef.current=p.current)},[E,y,w,g,c]);const A=i.useRef("mouse"),T=i.useRef(!1),{getButtonProps:M,buttonRef:P}=_t({disabled:b,focusableWhenDisabled:!0,native:f,composite:!0}),N={disabled:b,selected:x,highlighted:R};function O(V){if(v||m)return;const B=g.state.value;
434if(y){const H=Array.isArray(B)?B:[],z=x?Tb(H,c,w):[...H,c];g.context.setValue(z,Oe(zn,V))}else g.context.setValue(c,Oe(zn,V)),g.context.setOpen(!1,Oe(zn,V))}function k(){g.context.selectionRef.current.dragY=0}const _={role:"option","aria-selected":x,tabIndex:S&&R?0:-1,onKeyDown(V){g.set("activeIndex",E),V.key===" "&&g.context.typingRef.current&&V.preventDefault()},onClick(V){const B=A.current!=="touch",H=V.nativeEvent.pointerType,z=B&&ar(V.nativeEvent)&&(H!==void 0||R),F=B&&!z&&!T.current;T.current=!1,!(b||F)&&O(V.nativeEvent)},onPointerEnter(V){A.current=V.pointerType},onPointerMove(V){if(V.pointerType==="mouse"&&V.buttons===1){const B=g.context.selectionRef.current;B.dragY+=V.movementY,B.dragY**2>=64&&(B.allowUnselectedMouseUp=!0)}},onPointerDown(V){A.current=V.pointerType,T.current=!0,k()},onMouseUp(){var H;if(k(),b||A.current==="touch"||T.current)return;const V=!g.context.selectionRef.current.allowSelectedMouseUp&&x,B=!g.context.selectionRef.current.allowUnselectedMouseUp&&!x;V||B||(T.current=!0,(H=I.current)==null||H.click(),T.current=!1)}},L=Ne("div",t,{ref:[P,n,h.ref,I],state:N,props:[d,_,u,M]}),D=i.useMemo(()=>({selected:x,index:E,textRef:p,selectedByFocus:C}),[x,E,p,C]);return he.jsx(Ru.Provider,{value:D,children:L})})),O1=i.forwardRef(function(t,n){const{selected:o}=yi();return t.keepMounted||o?he.jsx(Bb,{...t,ref:n}):null}),Bb=i.memo(i.forwardRef((e,t)=>{const{render:n,className:o,style:r,keepMounted:s,...c}=e,{selected:a}=yi(),l=i.useRef(null),{transitionStatus:f,setMounted:u}=xn(a),h=Ne("span",e,{ref:[t,l],state:{selected:a,transitionStatus:f},props:[{"aria-hidden":!0,children:"âï¸"},c],stateAttributesMapping:Jt});return It({batch:!0,enabled:!a,open:a,ref:l,onComplete(){a||u(!1)}}),h})),A1=i.memo(i.forwardRef(function(t,n){const{index:o,textRef:r,selectedByFocus:s}=yi(),c=Ut(),{render:a,className:l,style:f,...u}=t,p=i.useCallback(g=>{g&&(o===0&&(c.context.firstItemTextRef.current=g),s&&(c.context.selectedItemTextRef.current=g))},[c,o,s]);return Ne("div",t,{ref:[p,n,r],props:u})})),Su=i.forwardRef(function(t,n){const{render:o,className:r,style:s,direction:c,keepMounted:a,...l}=t,f=c==="up",u=Ut(),{side:p,scrollDownArrowRef:h,scrollUpArrowRef:g}=mi(),d=f?"scrollUpArrowVisible":"scrollDownArrowVisible",y=u.useState(d),v=u.useState("openMethod"),m=y&&v!=="touch",b=lt(),R=f?g:h,{mounted:S,transitionStatus:x,setMounted:C}=xn(m);fe(()=>(u.context.scrollArrowsMountedCountRef.current+=1,u.set("hasScrollArrows",!0),()=>{u.context.scrollArrowsMountedCountRef.current=Math.max(0,u.context.scrollArrowsMountedCountRef.current-1),u.context.scrollArrowsMountedCountRef.current===0&&u.set("hasScrollArrows",!1)}),[u]),It({open:m,ref:R,onComplete(){m||C(!1)}});const I=Ne("div",t,{ref:[n,R],state:{direction:c,visible:m,side:p,transitionStatus:x},props:[{"aria-hidden":!0,children:f?"â²":"â¼",style:{position:"absolute"},onMouseMove(T){if(T.movementX===0&&T.movementY===0||b.isStarted())return;u.set("activeIndex",null);function M(){var L;const P=u.state.listElement??u.context.popupRef.current;if(!P)return;u.set("activeIndex",null),u.context.handleScrollArrowVisibility(P);const N=hi(P.scrollHeight,P.clientHeight),O=Jo(P.scrollTop,N),k=O===(f?0:N),_=u.context.listRef.current;if(O!==P.scrollTop&&(P.scrollTop=O),k){b.clear();return}if(_.length>0){const D=((L=R.current)==null?void 0:L.offsetHeight)||0;P.scrollTop=$b(_,f,O,P.clientHeight,D,N)}b.start(40,M)}b.start(40,M)},onMouseLeave(){b.clear()}},l],stateAttributesMapping:Jt});return S||a?I:null});function $b(e,t,n,o,r,s){if(t){let u=0;const p=n+r-At;for(let d=0;d<e.length;d+=1){const y=e[d];if(y&&y.offsetTop>=p){u=d;break}}const h=Math.max(0,u-1),g=e[h];return h<u&&g?Jo(g.offsetTop-r,s):0}let c=e.length-1;const a=n+o-r+At;for(let u=0;u<e.length;u+=1){const p=e[u];if(p&&p.offsetTop+p.offsetHeight>a){c=Math.max(0,u-1);break}}const l=Math.min(e.length-1,c+1),f=e[l];return l>c&&f?Jo(f.offsetTop+f.offsetHeight-o+r,s):s}const D1=i.forwardRef(function(t,n){return he.jsx(Su,{...t,ref:n,direction:"down"})}),N1=i.forwardRef(function(t,n){return he.jsx(Su,{...t,ref:n,direction:"up"})}),wu=i.createContext(void 0);function jb(){const e=i.useContext(wu);if(e===void 0)throw new Error(nt(56));return e}const F1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,...c}=t,[a,l]=i.useState(),f=i.useMemo(()=>({labelId:a,setLabelId:l}),[a,l]),u=Ne("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},c]});return he.jsx(wu.Provider,{value:f,children:u})}),L1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,id:c,...a}=t,{setLabelId:l}=jb(),f=dt(c);return fe(()=>(l(f),()=>{l(p=>p===f?void 0:p)}),[f,l]),Ne("div",t,{ref:n,props:[{id:f,"aria-hidden":!0},a]})}),Ub=i.forwardRef(function(t,n){const{className:o,render:r,orientation:s="horizontal",style:c,...a}=t;return Ne("div",t,{state:{orientation:s},ref:n,props:[{role:"presentation"},a]})}),V1=Ub,_1=i.forwardRef(function(t,n){const{render:o,className:r,validationMode:s="onSubmit",errors:c,onSubmit:a,onFormSubmit:l,actionsRef:f,style:u,...p}=t,h=i.useRef({fields:new Map}),g=i.useRef(null),d=i.useRef(!1),y=i.useRef(0),v=te(()=>{let C=!1,w=null;for(const E of h.current.fields.values()){if(E.validityData.state.valid!==!1)continue;C=!0;const I=E.controlRef.current;I&&(!w||Wb(I,w))&&(w=I)}return w?(w.focus(),w.tagName==="INPUT"&&w.select(),!0):C}),[m,b]=i.useState(c);Sn(c,()=>{b(c)}),i.useEffect(()=>{d.current&&(d.current=!1,v())},[m,v]),i.useImperativeHandle(f,()=>({validate(C){var w;C?(w=Array.from(h.current.fields.values()).find(E=>E.name===C))==null||w.validate():h.current.fields.forEach(E=>{E.validate()})}}),[]);const R=Ne("form",t,{ref:[n,g],props:[{noValidate:!0,onSubmit(C){if(y.current+=1,h.current.fields.forEach(w=>{w.validate()}),v()){C.preventDefault();return}if(d.current=!0,a==null||a(C),l){C.preventDefault();const w={};h.current.fields.forEach(E=>{E.name&&(w[E.name]=E.getValue())}),l(w,Ms(vt,C.nativeEvent))}}},p]}),S=te(C=>{C&&b(w=>{if(!w||!Object.hasOwn(w,C))return w;const E={...w};return delete E[C],E})}),x=i.useMemo(()=>({elementRef:g,formRef:h,validationMode:s,errors:m??Je,clearErrors:S,submitCountRef:y}),[h,s,m,S]);return he.jsx(pl.Provider,{value:x,children:R})});function Wb(e,t){const n=e.compareDocumentPosition(t);return(n&Node.DOCUMENT_POSITION_DISCONNECTED)===0&&(n&Node.DOCUMENT_POSITION_FOLLOWING)!==0}function H1(e){return ri("alert-dialog",e)}function zb(e){if(!e)return null;for(const t of e.elements){const n=t.tagName;if(n==="BUTTON"||n==="INPUT"){const o=t;if(o.type==="submit")return o}}return null}const Yb="data-checked",qb="data-unchecked";function Cu(e){return{checked(t){return e.indeterminate?{}:t?{[Yb]:""}:{[qb]:""}},...en}}const Xb=i.createContext(void 0);function Kb(){return i.useContext(Xb)}const Eu=i.createContext(void 0);function Gb(){const e=i.useContext(Eu);if(e===void 0)throw new Error(nt(14));return e}const Zb="data-parent",B1=i.forwardRef(function(t,n){const{checked:o,className:r,defaultChecked:s=!1,"aria-labelledby":c,disabled:a=!1,form:l,id:f,indeterminate:u=!1,inputRef:p,name:h,onCheckedChange:g,parent:d=!1,readOnly:y=!1,render:v,required:m=!1,uncheckedValue:b,value:R,nativeButton:S=!1,style:x,...C}=t,{clearErrors:w}=tn(),{disabled:E,name:I,setDirty:A,setFilled:T,setFocused:M,setTouched:P,state:N,validationMode:O,validityData:k,validation:_}=Ht(),L=si(),{labelId:D,registerControlId:V,getDescriptionProps:B}=kt(),H=Kb(),z=(H==null?void 0:H.allValues)===void 0?void 0:H.parent,F=z!==void 0,j=E||L.disabled||(H==null?void 0:H.disabled)||a,$=I??h,Y=R??$,U=dt(),le=(H==null?void 0:H.registerControlId)!==V,ae=Ln({id:f||void 0,enabled:le}),me=S?ae:U;let Q={};
434F&&(d?Q=z.getParentProps():Y!==void 0&&(Q=z.getChildProps(Y)));const{checked:G=o,indeterminate:J=u,onCheckedChange:ie,...Re}=Q,ue=H==null?void 0:H.value,q=i.useRef(null),{getButtonProps:K,buttonRef:ce}=_t({disabled:j,native:S}),ee=(H==null?void 0:H.validation)??_,[oe,Ie]=Vt({controlled:Y!==void 0&&ue!==void 0&&!d?ue.includes(Y):G,default:s,name:"Checkbox",state:"checked"}),ne=F?!!G:oe,ve=F&&J||u;io(q,U,oe,void 0,!H&&!j,h);const se=z==null?void 0:z.registerChildId,X=i.useRef(null),we=ee.registerInput,Z=H?Y:void 0,re=i.useCallback(Se=>we(Se,{controlRef:q,value:Z}),[we,Z]),xe=Tt(p,X,d?void 0:re),ye=hl(c,D,X,!S,ae);fe(()=>{X.current&&(X.current.indeterminate=ve),H||T(oe)},[oe,ve,H,T]),Sn(oe,()=>{H||(w($),A(oe!==k.initialValue),ee.change(oe))});const pe=bt({checked:oe,disabled:j,form:l,name:d?void 0:$,id:S?void 0:ae,required:m,ref:xe,style:$?Ns:Dn,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Se){if(Se.nativeEvent.defaultPrevented)return;if(y){Se.preventDefault();return}const _e=Se.currentTarget.checked,He=Oe(vt,Se.nativeEvent);if(g==null||g(_e,He),!He.isCanceled&&(ie==null||ie(_e,He),!He.isCanceled&&(Ie(_e),Y!==void 0&&H!==void 0&&!d&&!F))){const Ye=_e?[...H.value,Y]:H.value.filter(ot=>ot!==Y);H.setValue(Ye,He)}},onClick(Se){Se.stopPropagation()},onFocus(){var Se;(Se=q.current)==null||Se.focus()}},R!==void 0?{value:(H?oe&&R:R)||""}:Je,B,Se=>ee.getValidationProps(j,Se));i.useEffect(()=>{if(!z||Y===void 0)return;const Se=z.disabledStatesRef.current;return Se.set(Y,j),()=>{Se.delete(Y)}},[z,j,Y]);const de=i.useMemo(()=>({...N,checked:ne,disabled:j,readOnly:y,required:m,indeterminate:ve}),[N,ne,j,y,m,ve]),Me=Cu(de),Le=Ne("span",t,{state:de,ref:[ce,q,n],props:[{id:me,role:"checkbox","aria-checked":ve?"mixed":ne,"aria-readonly":y||void 0,"aria-required":m||void 0,"aria-labelledby":ye,[Zb]:d?"":void 0,onFocus(){j||M(!0)},onBlur(){const Se=X.current;Se&&(P(!0),M(!1),O==="onBlur"&&ee.commit(H?ue:Se.checked))},onKeyDown(Se){var ge;if(Se.key!=="Enter"||(Se.preventBaseUIHandler(),Se.defaultPrevented))return;const _e=((ge=X.current)==null?void 0:ge.form)??null,He=Se.currentTarget,Ye=Se.nativeEvent,ot=Se.preventDefault,Xe=Ye.preventDefault;let W=!1;Se.preventDefault=()=>{W=!0,ot.call(Se)},Ye.preventDefault=()=>{W=!0,Xe.call(Ye)},Xe.call(Ye),Ge(He).queueMicrotask(()=>{var be;Se.preventDefault=ot,Ye.preventDefault=Xe,W||(be=zb(_e))==null||be.click()})},onClick(Se){if(y||j)return;Se.preventDefault();const _e=X.current;_e&&Tn(_e,Se)}},C,Re,K,B,Se=>ee.getValidationProps(j,Se)],stateAttributesMapping:Me}),Ae=Le.props.id;return fe(()=>{if(!(!se||d||Y===void 0||Ae===void 0))return se(Y,Ae)},[se,d,Y,Ae]),he.jsxs(Eu.Provider,{value:de,children:[Le,!oe&&!H&&$&&!d&&b!==void 0&&he.jsx("input",{type:"hidden",form:l,name:$,value:b,disabled:j}),he.jsx("input",{...pe,suppressHydrationWarning:!0})]})}),$1=i.forwardRef(function(t,n){const{render:o,className:r,style:s,keepMounted:c=!1,...a}=t,l=Gb(),f=l.checked||l.indeterminate,{mounted:u,transitionStatus:p,setMounted:h}=xn(f),g=i.useRef(null),d={...l,transitionStatus:p};It({batch:!0,enabled:!f,open:f,ref:g,onComplete(){f||h(!1)}});const v={...Cu(l),...Jt},m=c||u,b=Ne("span",t,{ref:[n,g],state:d,stateAttributesMapping:v,props:a});return m?b:null}),Pu=i.createContext(void 0);function Tu(){const e=i.useContext(Pu);if(e===void 0)throw new Error(nt(64));return e}const Jb="data-activation-direction",bi={tabActivationDirection:e=>({[Jb]:e})},j1=i.forwardRef(function(t,n){const{className:o,defaultValue:r=0,onValueChange:s,orientation:c="horizontal",render:a,value:l,style:f,...u}=t,p=t.defaultValue!==void 0,h=i.useRef([]),[g,d]=i.useState(()=>new Map),[y,v]=Vt({controlled:l,default:r,name:"Tabs",state:"value"}),m=l!==void 0,[b,R]=i.useState(()=>new Map),S=i.useRef(void 0),x=i.useCallback(U=>ys(b,U),[b]),[C,w]=i.useState(()=>({previousValue:y,tabActivationDirection:"none"})),{previousValue:E,tabActivationDirection:I}=C;let A=I,T=!1;E!==y&&(A=Uc(E,y,c,b),T=E!=null&&y!=null&&x(y)==null);const M=T?E:y,P=E!==M||I!==A;fe(()=>{P&&w({previousValue:M,tabActivationDirection:A})},[M,P,A]);const N=te((U,le)=>{const ae=Uc(y,U,c,b);le.activationDirection=ae,s==null||s(U,le),!le.isCanceled&&v(U)}),O=te((U,le)=>{s==null||s(U,Oe(le,void 0,void 0,{activationDirection:"none"}))}),k=te((U,le)=>(d(ae=>{const me=new Map(ae);return me.set(U,le),me}),()=>{d(ae=>{if(ae.get(U)!==le)return ae;const me=new Map(ae);return me.delete(U),me})})),_=i.useCallback(U=>g.get(U),[g]),L=i.useCallback(U=>{for(const le of b.values())if(U===le.value)return le.id},[b]),D=i.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:L,getTabPanelIdByValue:_,onValueChange:N,orientation:c,registerMountedTabPanel:k,setTabMap:R,tabActivationDirection:A,value:y}),[x,L,_,N,c,k,R,A,y]),V=i.useMemo(()=>{for(const U of b.values())if(U.value===y)return U},[b,y]),B=i.useMemo(()=>{for(const U of b.values())if(!U.disabled)return U.value},[b]),H=i.useRef(!p),z=i.useRef(r),F=i.useRef(p),j=i.useRef(!1);fe(()=>{var Q;if(m)return;function U(G,J){v(G),w({previousValue:G,tabActivationDirection:"none"}),O(G,J),H.current=!1}if(b.size===0){j.current&&y!==null&&!((Q=S.current)!=null&&Q.isConnected)&&U(null,wi);return}j.current=!0,S.current=b.keys().next().value;const le=V==null?void 0:V.disabled,ae=V==null&&y!==null;if(!le&&y===z.current&&(F.current=!1),F.current&&le&&y===z.current)return;const me=H.current;if(le||ae){const G=B??null;if(y===G){H.current=!1;return}let J=wi;me?J=Ci:le&&(J=sa),U(G,J);return}me&&V!=null&&(O(y,Ci),H.current=!1)},[B,m,O,V,v,b,y]);const Y=Ne("div",t,{state:{orientation:c,tabActivationDirection:A},ref:n,props:u,stateAttributesMapping:bi});return he.jsx(Pu.Provider,{value:D,children:he.jsx(co,{elementsRef:h,children:Y})})});function ys(e,t){for(const[n,o]of e.entries())if(t===o.value)return n;return null}function Uc(e,t,n,o){if(e==null||t==null)return"none";const[r,s,c]=n==="horizontal"?["left","left","right"]:["top","up","down"],a=ys(o,e),l=ys(o,t);
434if(a==null||l==null)return a!==l&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?c:s:"none";const f=a.getBoundingClientRect()[r],u=l.getBoundingClientRect()[r];return u<f?s:u>f?c:"none"}const Mu=i.createContext(void 0);function Qb(){const e=i.useContext(Mu);if(e===void 0)throw new Error(nt(65));return e}const U1=i.forwardRef(function(t,n){const{className:o,disabled:r=!1,render:s,value:c,id:a,nativeButton:l=!0,style:f,...u}=t,{value:p,getTabPanelIdByValue:h,onValueChange:g,orientation:d,tabActivationDirection:y}=Tu(),{activateOnFocus:v,registerTabResizeObserverElement:m,tabsListElement:b}=Qb(),{highlightedIndex:R,onHighlightedIndexChange:S}=or(),x=dt(a),C=i.useMemo(()=>({disabled:r,id:x,value:c}),[r,x,c]),{compositeProps:w,compositeRef:E,index:I}=Pl({metadata:C}),A=c===p,T=i.useRef(!1),M=i.useRef(null),P=te(j=>{var $;($=M.current)==null||$.call(M),M.current=j?m(j):null});fe(()=>{if(T.current){T.current=!1;return}if(!(A&&I>-1&&R!==I))return;const j=b;if(j!=null){const $=pt($e(j));if($&&Te(j,$))return}r||S(I)},[A,I,R,S,r,b]);const{getButtonProps:N,buttonRef:O}=_t({disabled:r,native:l,focusableWhenDisabled:!0}),k=h(c),_=i.useRef(!1),L=i.useRef(!1);function D(j){g(c,Oe(vt,j.nativeEvent,void 0,{activationDirection:"none"}))}function V(j){A||r||D(j)}function B(j){A||r||v&&(!_.current||L.current)&&D(j)}function H(j){if(A||r)return;_.current=!0,L.current=j.button===0;const $=$e(j.currentTarget);function Y(){_.current=!1,L.current=!1,$.removeEventListener("pointerup",Y),$.removeEventListener("pointercancel",Y)}$.addEventListener("pointerup",Y),$.addEventListener("pointercancel",Y)}return Ne("button",t,{state:{disabled:r,active:A,orientation:d,tabActivationDirection:y},ref:[n,O,E,P],props:[w,{role:"tab","aria-controls":k,"aria-selected":A,id:x,onClick:V,onFocus:B,onPointerDown:H,[gi]:A?"":void 0,onKeyDownCapture(){T.current=!0}},u,N],stateAttributesMapping:bi})}),W1=i.forwardRef(function(t,n){const{activateOnFocus:o=!1,className:r,loopFocus:s=!0,render:c,style:a,...l}=t,{orientation:f,setTabMap:u,tabActivationDirection:p}=Tu(),[h,g]=i.useState(0),[d,y]=i.useState(null),v=i.useRef(new Set),m=i.useRef(new Set),b=i.useRef(null);fe(()=>{if(typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>{v.current.forEach(I=>{I()})});return b.current=E,d&&E.observe(d),m.current.forEach(I=>{E.observe(I)}),()=>{E.disconnect(),b.current=null}},[d]);const R=te(E=>(v.current.add(E),()=>{v.current.delete(E)})),S=te(E=>{var I;return m.current.add(E),(I=b.current)==null||I.observe(E),()=>{var A;m.current.delete(E),(A=b.current)==null||A.unobserve(E)}}),x={orientation:f,tabActivationDirection:p},C={"aria-orientation":f==="vertical"?"vertical":void 0,role:"tablist"},w=i.useMemo(()=>({activateOnFocus:o,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:S,tabsListElement:d}),[o,R,S,d]);return he.jsx(Mu.Provider,{value:w,children:he.jsx(ou,{render:c,className:r,style:a,state:x,refs:[n,y],props:[C,l],stateAttributesMapping:bi,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:s,orientation:f,onHighlightedIndexChange:g,onMapChange:u,disabledIndices:Mt})})});export{Qv as $,b0 as A,r0 as B,C0 as C,l0 as D,zv as E,Y0 as F,Rm as G,D0 as H,ev as I,M0 as J,B0 as K,lv as L,Wv as M,uv as N,A0 as O,gv as P,G0 as Q,bv as R,Fv as S,Mv as T,Av as U,o1 as V,s1 as W,Nv as X,t1 as Y,e1 as Z,r1 as _,$0 as a,Iv as a$,n1 as a0,Jv as a1,i1 as a2,c1 as a3,a1 as a4,u1 as a5,l1 as a6,f1 as a7,d1 as a8,g1 as a9,Lv as aA,Vv as aB,_v as aC,Hv as aD,ov as aE,Z0 as aF,z0 as aG,X0 as aH,L0 as aI,V0 as aJ,x0 as aK,pv as aL,Ev as aM,dv as aN,fv as aO,F0 as aP,wv as aQ,k0 as aR,iv as aS,Dv as aT,sv as aU,_0 as aV,R0 as aW,d0 as aX,u0 as aY,p0 as aZ,S0 as a_,p1 as aa,h1 as ab,m1 as ac,y1 as ad,b1 as ae,v1 as af,x1 as ag,R1 as ah,S1 as ai,w1 as aj,E1 as ak,E0 as al,C1 as am,P1 as an,T1 as ao,M1 as ap,I1 as aq,F1 as ar,k1 as as,A1 as at,O1 as au,N1 as av,T0 as aw,D1 as ax,L1 as ay,V1 as az,a0 as b,f0 as b0,Ov as b1,kv as b2,av as b3,cv as b4,Sv as b5,_1 as b6,Gh as b7,H1 as b8,c0 as b9,Q0 as bA,N0 as bB,j0 as ba,yv as bb,J0 as bc,h0 as bd,q0 as be,Rv as bf,g0 as bg,rv as bh,B1 as bi,$1 as bj,hv as bk,vv as bl,bt as bm,j1 as b
434n,W1 as bo,U1 as bp,tv as bq,U0 as br,y0 as bs,w0 as bt,Pv as bu,m0 as bv,H0 as bw,xv as bx,v0 as by,W0 as bz,wf as c,eg as d,$p as e,i0 as f,Bv as g,nv as h,Cv as i,O0 as j,Yv as k,qv as l,Xv as m,Uv as n,$v as o,jv as p,Zv as q,Kv as r,Gv as s,mv as t,s0 as u,I0 as v,Tv as w,P0 as x,K0 as y,Im as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.