1import{r as i,t as gt,R as W}from"./chart-vendor-B-VQbykd.js";import{j as p}from"./motion-vendor-Cz_00NEr.js";import{r as tn,R as zr}from"./map-vendor-BpJlxU9q.js";function dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Il(...e){return t=>{let n=!1;const o=e.map(r=>{const s=dr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():dr(e[r],null)}}}}function Te(e){const t=Al(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Nl);if(l){const f=l.props.children,u=c.map(d=>d===l?i.Children.count(f)>1?i.Children.only(null):i.isValidElement(f)?f.props.children:null:d);return p.jsx(t,{...a,ref:r,children:i.isValidElement(f)?i.cloneElement(f,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var ig=Te("Slot");function Al(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Dl(r),c=Ol(s,r.props);return r.type!==i.Fragment&&(c.ref=o?Il(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _l=Symbol("radix.slottable");function Nl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_l}function Ol(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Dl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function fr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ve(...e){return t=>{let n=!1;const o=e.map(r=>{const s=fr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():fr(e[r],null)}}}}function V(...e){return i.useCallback(ve(...e),e)}function jl(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function J(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const f=d=>{const{scope:m,children:h,...g}=d,v=m?.[e]?.[l]||c,w=i.useMemo(()=>g,Object.values(g));return p.jsx(v.Provider,{value:w,children:h})};f.displayName=s+"Provider";function u(d,m){const h=m?.[e]?.[l]||c,g=i.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,$l(r,...t)]}function $l(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:f})=>{const d=l(s)[`__scope${f}`];return{...c,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Y=globalThis?.document?i.useLayoutEffect:()=>{},kl=gt.useId||(()=>{}),Ll=0;function Z(e){const[t,n]=i.useState(kl());return Y(()=>{n(o=>o??String(Ll++))},[e]),t?`radix-${t}`:""}function z(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Q({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Fl({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:o,c=z(n),l=i.useCallback(f=>{if(s){const d=typeof f=="function"?f(e):f;d!==e&&c(d)}else r(f)},[s,e,r,c]);return[a,l]}function Fl({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=z(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var Yr=i.forwardRef((e,t)=>
1{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(Bl);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(Fn,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(Fn,{...o,ref:t,children:n})});Yr.displayName="Slot";var Fn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=Gl(n),s=Wl(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Fn.displayName="SlotClone";var Vl=({children:e})=>p.jsx(p.Fragment,{children:e});function Bl(e){return i.isValidElement(e)&&e.type===Vl}function Wl(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Gl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Hl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],I=Hl.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...a}=o,c=s?Yr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Gt(e,t){e&&tn.flushSync(()=>e.dispatchEvent(t))}function Kl(e,t=globalThis?.document){const n=z(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Ul="DismissableLayer",Vn="dismissableLayer.update",zl="dismissableLayer.pointerDownOutside",Yl="dismissableLayer.focusOutside",pr,Xr=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ge=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,f=i.useContext(Xr),[u,d]=i.useState(null),m=u?.ownerDocument??globalThis?.document,[,h]=i.useState({}),g=V(t,R=>d(R)),v=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(w),C=u?v.indexOf(u):-1,y=f.layersWithOutsidePointerEventsDisabled.size>0,b=C>=x,S=Zl(R=>{const M=R.target,_=[...f.branches].some(D=>D.contains(M));!b||_||(r?.(R),a?.(R),R.defaultPrevented||c?.())},m),E=Ql(R=>{const M=R.target;[...f.branches].some(D=>D.contains(M))||(s?.(R),a?.(R),R.defaultPrevented||c?.())},m);return Kl(R=>{C===f.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},m),i.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(pr=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),vr(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=pr)}},[u,m,n,f]),i.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),vr())},[u,f]),i.useEffect(()=>{const R=()=>h({});return document.addEventListener(Vn,R),()=>document.removeEventListener(Vn,R)},[]),p.jsx(I.div,{...l,ref:g,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,E.onFocusCapture),onBlurCapture:P(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,S.onPointerDownCapture)})});Ge.displayName=Ul;var Xl="DismissableLayerBranch",ql=i.forwardRef((e,t)=>{const n=i.useContext(Xr),o=i.useRef(null),r=V(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});ql.displayName=Xl;function Zl(e,t=globalThis?.document){const n=z(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){qr(zl,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ql(e,t=globalThis?.document){const n=z(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>
1{s.target&&!o.current&&qr(Yl,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function vr(){const e=new CustomEvent(Vn);document.dispatchEvent(e)}function qr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Gt(r,s):r.dispatchEvent(s)}var Mn="focusScope.autoFocusOnMount",Tn="focusScope.autoFocusOnUnmount",mr={bubbles:!1,cancelable:!0},Jl="FocusScope",wt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),f=z(r),u=z(s),d=i.useRef(null),m=V(t,v=>l(v)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let v=function(y){if(h.paused||!c)return;const b=y.target;c.contains(b)?d.current=b:Pe(d.current,{select:!0})},w=function(y){if(h.paused||!c)return;const b=y.relatedTarget;b!==null&&(c.contains(b)||Pe(d.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const C=new MutationObserver(x);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),C.disconnect()}}},[o,c,h.paused]),i.useEffect(()=>{if(c){gr.add(h);const v=document.activeElement;if(!c.contains(v)){const x=new CustomEvent(Mn,mr);c.addEventListener(Mn,f),c.dispatchEvent(x),x.defaultPrevented||(eu(su(Zr(c)),{select:!0}),document.activeElement===v&&Pe(c))}return()=>{c.removeEventListener(Mn,f),setTimeout(()=>{const x=new CustomEvent(Tn,mr);c.addEventListener(Tn,u),c.dispatchEvent(x),x.defaultPrevented||Pe(v??document.body,{select:!0}),c.removeEventListener(Tn,u),gr.remove(h)},0)}}},[c,f,u,h]);const g=i.useCallback(v=>{if(!n&&!o||h.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(w&&x){const C=v.currentTarget,[y,b]=tu(C);y&&b?!v.shiftKey&&x===b?(v.preventDefault(),n&&Pe(y,{select:!0})):v.shiftKey&&x===y&&(v.preventDefault(),n&&Pe(b,{select:!0})):x===C&&v.preventDefault()}},[n,o,h.paused]);return p.jsx(I.div,{tabIndex:-1,...a,ref:m,onKeyDown:g})});wt.displayName=Jl;function eu(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function tu(e){const t=Zr(e),n=hr(t,e),o=hr(t.reverse(),e);return[n,o]}function Zr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hr(e,t){for(const n of e)if(!nu(n,{upTo:t}))return n}function nu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ou(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ou(e)&&t&&e.select()}}var gr=ru();function ru(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=wr(e,t),e.unshift(t)},remove(t){e=wr(e,t),e[0]?.resume()}}}function wr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function su(e){return e.filter(t=>t.tagName!=="A")}var iu="Portal",tt=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);Y(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?zr.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});tt.displayName=iu;function au(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var q=e=>{const{present:t,children:n}=e,o=cu(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=V(o.ref,lu(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};q.displayName="Presence";function cu(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=au(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const f=Nt(o.current);s.current=c==="mounted"?f:"none"}
1,[c]),Y(()=>{const f=o.current,u=r.current;if(u!==e){const m=s.current,h=Nt(f);e?l("MOUNT"):h==="none"||f?.display==="none"?l("UNMOUNT"):l(u&&m!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Y(()=>{if(t){let f;const u=t.ownerDocument.defaultView??window,d=h=>{const v=Nt(o.current).includes(h.animationName);if(h.target===t&&v&&(l("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=h=>{h.target===t&&(s.current=Nt(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(f=>{f&&(o.current=getComputedStyle(f)),n(f)},[])}}function Nt(e){return e?.animationName||"none"}function lu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var In=0;function nn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xr()),document.body.insertAdjacentElement("beforeend",e[1]??xr()),In++,()=>{In===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),In--}},[])}function xr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var he=function(){return he=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},he.apply(this,arguments)};function Qr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function uu(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Ft="right-scroll-bar-position",Vt="width-before-scroll-bar",du="with-scroll-bars-hidden",fu="--removed-body-scroll-bar-size";function An(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pu(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var vu=typeof window<"u"?i.useLayoutEffect:i.useEffect,yr=new WeakMap;function mu(e,t){var n=pu(null,function(o){return e.forEach(function(r){return An(r,o)})});return vu(function(){var o=yr.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||An(c,null)}),s.forEach(function(c){r.has(c)||An(c,a)})}yr.set(n,e)},[e]),n}function hu(e){return e}function gu(e,t){t===void 0&&(t=hu);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var u=a;a=[],u.forEach(s)},f=function(){return Promise.resolve().then(l)};f(),n={push:function(u){a.push(u),f()},filter:function(u){return a=a.filter(u),n}}}};return r}function wu(e){e===void 0&&(e={});var t=gu(null);return t.options=he({async:!0,ssr:!1},e),t}
vendor: 6,172 bytes, lines 1-41
1var Jr=function(e){var t=e.sideCar,n=Qr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,he({},n))};Jr.isSideCarExport=!0;function xu(e,t){return e.useMedium(t),Jr}var es=wu(),_n=function(){},on=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:_n,onWheelCapture:_n,onTouchMoveCapture:_n}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,f=e.removeScrollBar,u=e.enabled,d=e.shards,m=e.sideCar,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,C=e.gapMode,y=Qr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=m,S=mu([n,t]),E=he(he({},y),r);return i.createElement(i.Fragment,null,u&&i.createElement(b,{sideCar:es,removeScrollBar:f,shards:d,noIsolation:h,inert:g,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:C}),a?i.cloneElement(i.Children.only(c),he(he({},E),{ref:S})):i.createElement(x,he({},E,{className:l,ref:S}),c))});on.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};on.classNames={fullWidth:Vt,zeroRight:Ft};var yu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yu();return t&&e.setAttribute("nonce",t),e}function bu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Su(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ru=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cu())&&(bu(t,n),Su(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Eu=function(){var e=Ru();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ts=function(){var e=Eu(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Pu={left:0,top:0,right:0,gap:0},Nn=function(e){return parseInt(e||"",10)||0},Mu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Nn(n),Nn(o),Nn(r)]},Tu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pu;var t=Mu(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Iu=ts(),Xe="data-scroll-locked",Au=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),` 2 .`.concat(du,` { 3 overflow: hidden `).concat(o,`; 4 padding-right: `).concat(c,"px ").concat(o,`; 5 } 6 body[`).concat(Xe,`] { 7 overflow: hidden `).concat(o,`; 8 overscroll-behavior: contain; 9 `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&` 10 padding-left: `.concat(r,`px; 11 padding-top: `).concat(s,`px; 12 padding-right: `).concat(a,`px; 13 margin-left:0; 14 margin-top:0; 15 margin-right: `).concat(c,"px ").concat(o,`; 16 `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),` 17 } 18 19 .`).concat(Ft,` { 20 right: `).concat(c,"px ").concat(o,`; 21 } 22 23 .`).concat(Vt,` { 24 margin-right: `).concat(c,"px ").concat(o,`; 25 } 26 27 .`).concat(Ft," .").concat(Ft,` { 28 right: 0 `).concat(o,`; 29 } 30 31 .`).concat(Vt," .").concat(Vt,` { 32 margin-right: 0 `).concat(o,`; 33 } 34 35 body[`).concat(Xe,`] { 36 `).concat(fu,": ").concat(c,`px; 37 } 38`)},Cr=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},_u=function(){i.useEffect(function(){return document.body.setAttribute(Xe,(Cr()+1).toString()),function(){var e=Cr()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Nu=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;_u();var s=i.useMemo(function(){return Tu(r)},[r]);return i.createElement(Iu,{styles:Au(s,!t,r,n?"":"!important")})},Bn=!1;if(typeof window<"u")try{var Ot=Object.defineProperty({},"passive",{get:function(){return Bn=!0,!0}});window.addEventListener("test",Ot,Ot),window.removeEventListener("test",Ot,Ot)}catch{Bn=!1}var Ke=Bn?{passive:!1}:!1,Ou=function(e){return e.tagName==="TEXTAREA"},ns=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ou(e)&&n[t]==="visible")},Du=function(e){return ns(e,"overflowY")},ju=function(e){return ns(e,"overflowX")},br=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=os(e,o);if(r){var s=rs(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},$u=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ku=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},os=function(e,t){return e==="v"?Du(t):ju(t)},rs=function(e,t){return e==="v"?$u(t):ku(t)},Lu=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fu=function(e,t,n,o,r){var s=Lu(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),f=!1,u=a>0,d=0,m=0;do{var h=rs(e,c),g=h[0],v=h[1],w=h[2],x=v-w-s*g;(g||x)&&os(e,c)&&(d+=x,m+=g),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(u&&Math.abs(d)<1||!u&&Math.abs(m)<1)&&(f=!0),f},Dt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sr=function(e){return[e.deltaX,e.deltaY]},Rr=function(e){return e&&"current"in e?e.current:e},Vu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bu=function(e){return` 39 .block-interactivity-`.concat(e,` {pointer-events: none;} 40 .allow-interactivity-`).concat(e,` {pointer-events: all;} 41`)},Wu=0,Ue=[];function Gu(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(Wu++)[0],s=i.useState(ts)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));
vendor: 4,150 bytes, line 41
41var v=uu([e.lockRef.current],(e.shards||[]).map(Rr),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(v,w){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var x=Dt(v),C=n.current,y="deltaX"in v?v.deltaX:C[0]-x[0],b="deltaY"in v?v.deltaY:C[1]-x[1],S,E=v.target,R=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in v&&R==="h"&&E.type==="range")return!1;var M=br(R,E);if(!M)return!0;if(M?S=R:(S=R==="v"?"h":"v",M=br(R,E)),!M)return!1;if(!o.current&&"changedTouches"in v&&(y||b)&&(o.current=S),!S)return!0;var _=o.current||S;return Fu(_,w,v,_==="h"?y:b)},[]),l=i.useCallback(function(v){var w=v;if(!(!Ue.length||Ue[Ue.length-1]!==s)){var x="deltaY"in w?Sr(w):Dt(w),C=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&Vu(S.delta,x)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var y=(a.current.shards||[]).map(Rr).filter(Boolean).filter(function(S){return S.contains(w.target)}),b=y.length>0?c(w,y[0]):!a.current.noIsolation;b&&w.cancelable&&w.preventDefault()}}},[]),f=i.useCallback(function(v,w,x,C){var y={name:v,delta:w,target:x,should:C,shadowParent:Hu(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),u=i.useCallback(function(v){n.current=Dt(v),o.current=void 0},[]),d=i.useCallback(function(v){f(v.type,Sr(v),v.target,c(v,e.lockRef.current))},[]),m=i.useCallback(function(v){f(v.type,Dt(v),v.target,c(v,e.lockRef.current))},[]);i.useEffect(function(){return Ue.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ke),document.addEventListener("touchmove",l,Ke),document.addEventListener("touchstart",u,Ke),function(){Ue=Ue.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,Ke),document.removeEventListener("touchmove",l,Ke),document.removeEventListener("touchstart",u,Ke)}},[]);var h=e.removeScrollBar,g=e.inert;return i.createElement(i.Fragment,null,g?i.createElement(s,{styles:Bu(r)}):null,h?i.createElement(Nu,{gapMode:e.gapMode}):null)}function Hu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ku=xu(es,Gu);var xt=i.forwardRef(function(e,t){return i.createElement(on,he({},e,{ref:t,sideCar:Ku}))});xt.classNames=on.classNames;var Uu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ze=new WeakMap,jt=new WeakMap,$t={},On=0,ss=function(e){return e&&(e.host||ss(e.parentNode))},zu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=ss(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Yu=function(e,t,n,o){var r=zu(t,Array.isArray(e)?e:[e]);$t[n]||($t[n]=new WeakMap);var s=$t[n],a=[],c=new Set,l=new Set(r),f=function(d){!d||c.has(d)||(c.add(d),f(d.parentNode))};r.forEach(f);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(c.has(m))u(m);else try{var h=m.getAttribute(o),g=h!==null&&h!=="false",v=(ze.get(m)||0)+1,w=(s.get(m)||0)+1;ze.set(m,v),s.set(m,w),a.push(m),v===1&&g&&jt.set(m,!0),w===1&&m.setAttribute(n,"true"),g||m.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return u(t),c.clear(),On++,function(){a.forEach(function(d){var m=ze.get(d)-1,h=s.get(d)-1;ze.set(d,m),s.set(d,h),m||(jt.has(d)||d.removeAttribute(o),jt.delete(d)),h||d.removeAttribute(n)}),On--,On||(ze=new WeakMap,ze=new WeakMap,jt=new WeakMap,$t={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Uu(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),Yu(o,r,n,"aria-hidden")):function(){return null}},is=i.forwardRef((e,t)=>
41{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(qu);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(Wn,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(Wn,{...o,ref:t,children:n})});is.displayName="Slot";var Wn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=Qu(n),s=Zu(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Wn.displayName="SlotClone";var Xu=({children:e})=>p.jsx(p.Fragment,{children:e});function qu(e){return i.isValidElement(e)&&e.type===Xu}function Zu(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Qu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ho="Dialog",[as,ag]=J(ho),[Ju,me]=as(ho),cs=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[f=!1,u]=Q({prop:o,defaultProp:r,onChange:s});return p.jsx(Ju,{scope:t,triggerRef:c,contentRef:l,contentId:Z(),titleId:Z(),descriptionId:Z(),open:f,onOpenChange:u,onOpenToggle:i.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};cs.displayName=ho;var ls="DialogTrigger",us=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(ls,n),s=V(t,r.triggerRef);return p.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":xo(r.open),...o,ref:s,onClick:P(e.onClick,r.onOpenToggle)})});us.displayName=ls;var go="DialogPortal",[ed,ds]=as(go,{forceMount:void 0}),fs=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=me(go,t);return p.jsx(ed,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(q,{present:n||s.open,children:p.jsx(tt,{asChild:!0,container:r,children:a})}))})};fs.displayName=go;var Ht="DialogOverlay",ps=i.forwardRef((e,t)=>{const n=ds(Ht,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=me(Ht,e.__scopeDialog);return s.modal?p.jsx(q,{present:o||s.open,children:p.jsx(td,{...r,ref:t})}):null});ps.displayName=Ht;var td=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(Ht,n);return p.jsx(xt,{as:is,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(I.div,{"data-state":xo(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Fe="DialogContent",vs=i.forwardRef((e,t)=>{const n=ds(Fe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=me(Fe,e.__scopeDialog);return p.jsx(q,{present:o||s.open,children:s.modal?p.jsx(nd,{...r,ref:t}):p.jsx(od,{...r,ref:t})})});vs.displayName=Fe;var nd=i.forwardRef((e,t)=>{const n=me(Fe,e.__scopeDialog),o=i.useRef(null),r=V(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),p.jsx(ms,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:P(e.onFocusOutside,s=>s.preventDefault())})}),od=i.forwardRef((e,t)=>{const n=me(Fe,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(ms,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),ms=i.forwardRef((e,t)=>
41{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=me(Fe,n),l=i.useRef(null),f=V(t,l);return nn(),p.jsxs(p.Fragment,{children:[p.jsx(wt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ge,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":xo(c.open),...a,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(rd,{titleId:c.titleId}),p.jsx(id,{contentRef:l,descriptionId:c.descriptionId})]})]})}),wo="DialogTitle",hs=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(wo,n);return p.jsx(I.h2,{id:r.titleId,...o,ref:t})});hs.displayName=wo;var gs="DialogDescription",ws=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(gs,n);return p.jsx(I.p,{id:r.descriptionId,...o,ref:t})});ws.displayName=gs;var xs="DialogClose",ys=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(xs,n);return p.jsx(I.button,{type:"button",...o,ref:t,onClick:P(e.onClick,()=>r.onOpenChange(!1))})});ys.displayName=xs;function xo(e){return e?"open":"closed"}var Cs="DialogTitleWarning",[cg,bs]=jl(Cs,{contentName:Fe,titleName:wo,docsSlug:"dialog"}),rd=({titleId:e})=>{const t=bs(Cs),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 42 43If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 44 45For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sd="DialogDescriptionWarning",id=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bs(sd).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},lg=cs,ug=us,dg=fs,fg=ps,pg=vs,vg=hs,mg=ws,hg=ys,ad="Separator",Er="horizontal",cd=["horizontal","vertical"],Ss=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Er,...r}=e,s=ld(o)?o:Er,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(I.div,{"data-orientation":s,...c,...r,ref:t})});Ss.displayName=ad;function ld(e){return cd.includes(e)}var gg=Ss;const ud=["top","right","bottom","left"],Ie=Math.min,re=Math.max,Kt=Math.round,kt=Math.floor,we=e=>({x:e,y:e}),dd={left:"right",right:"left",bottom:"top",top:"bottom"};function Gn(e,t,n){return re(e,Ie(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function nt(e){return e.split("-")[1]}function yo(e){return e==="x"?"y":"x"}function Co(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function bo(e){return yo(ge(e))}function fd(e,t,n){n===void 0&&(n=!1);const o=nt(e),r=bo(e),s=Co(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ut(a)),[a,Ut(a)]}function pd(e){const t=Ut(e);return[Hn(e),t,Hn(t)]}function Hn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pr=["left","right"],Mr=["right","left"],vd=["top","bottom"],md=["bottom","top"];function hd(e,t,n){switch(e){case"top":case"bottom":return n?t?Mr:Pr:t?Pr:Mr;case"left":case"right":return t?vd:md;default:return[]}}function gd(e,t,n,o){const r=nt(e);let s=hd(Re(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Hn)))),s}function Ut(e){const t=Re(e);return dd[t]+e.slice(t.length)}function wd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rs(e){return typeof e!="number"?wd(e):{top:e,right:e,bottom:e,left:e}}function zt(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 Tr(e,t,n){let{reference:o,floating:r}=e;const s=ge(t),a=bo(t),c=Co(a),l=Re(t),f=s==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(nt(t)){case"start":h[a]-=m*(n&&f?-1:1);break;case"end":h[a]+=m*(n&&f?-1:1);break}return h}async function xd(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=Se(t,e),g=Rs(h),w=c[m?d==="floating"?"reference":"floating":d],x=zt(await s.getClippingRect
45({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:l})),C=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=zt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:y,strategy:l}):C);return{top:(x.top-S.top+g.top)/b.y,bottom:(S.bottom-x.bottom+g.bottom)/b.y,left:(x.left-S.left+g.left)/b.x,right:(S.right-x.right+g.right)/b.x}}const yd=50,Cd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:xd},l=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=Tr(f,o,l),m=o,h=0;const g={};for(let v=0;v<s.length;v++){const w=s[v];if(!w)continue;const{name:x,fn:C}=w,{x:y,y:b,data:S,reset:E}=await C({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:g,rects:f,platform:c,elements:{reference:e,floating:t}});u=y??u,d=b??d,g[x]={...g[x],...S},E&&h<yd&&(h++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(f=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:d}=Tr(f,m,l)),v=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:g}},bd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:f,padding:u=0}=Se(e,t)||{};if(f==null)return{};const d=Rs(u),m={x:n,y:o},h=bo(r),g=Co(h),v=await a.getDimensions(f),w=h==="y",x=w?"top":"left",C=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[h]-m[h]-s.floating[g],S=m[h]-s.reference[h],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let R=E?E[y]:0;(!R||!await(a.isElement==null?void 0:a.isElement(E)))&&(R=c.floating[y]||s.floating[g]);const M=b/2-S/2,_=R/2-v[g]/2-1,D=Ie(d[x],_),j=Ie(d[C],_),$=D,L=R-v[g]-j,k=R/2-v[g]/2+M,B=Gn($,k,L),O=!l.arrow&&nt(r)!=null&&k!==B&&s.reference[g]/2-(k<$?D:j)-v[g]/2<0,F=O?k<$?k-$:k-L:0;return{[h]:m[h]+F,data:{[h]:B,centerOffset:k-B-F,...O&&{alignmentOffset:F}},reset:O}}}),Sd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Re(r),C=ge(c),y=Re(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(f.floating)),S=m||(y||!v?[Ut(c)]:pd(c)),E=g!=="none";!m&&E&&S.push(...gd(c,v,g,b));const R=[c,...S],M=await l.detectOverflow(t,w),_=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&_.push(M[x]),d){const k=fd(r,a,b);_.push(M[k[0]],M[k[1]])}if(D=[...D,{placement:r,overflows:_}],!_.every(k=>k<=0)){var j,$;const k=(((j=s.flip)==null?void 0:j.index)||0)+1,B=R[k];if(B&&(!(d==="alignment"?C!==ge(B):!1)||D.every(N=>ge(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:k,overflows:D},reset:{placement:B}};let O=($=D.filter(F=>F.overflows[0]<=0).sort((F,N)=>F.overflows[1]-N.overflows[1])[0])==null?void 0:$.placement;if(!O)switch(h){case"bestFit":{var L;const F=(L=D.filter(N=>{if(E){const T=ge(N.placement);return T===C||T==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(T=>T>0).reduce((T,U)=>T+U,0)]).sort((N,T)=>N[1]-T[1])[0])==null?void 0:L[0];F&&(O=F);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function Ir(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ar(e){return ud.some(t=>e[t]>=0)}const Rd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Se(e,t);
45switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...s,elementContext:"reference"}),c=Ir(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ar(c)}}}case"escaped":{const a=await o.detectOverflow(t,{...s,altBoundary:!0}),c=Ir(a,n.floating);return{data:{escapedOffsets:c,escaped:Ar(c)}}}default:return{}}}}},Es=new Set(["left","top"]);async function Ed(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Re(n),c=nt(n),l=ge(n)==="y",f=Es.has(a)?-1:1,u=s&&l?-1:1,d=Se(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*u,y:m*f}:{x:m*f,y:h*u}}const Pd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Ed(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Md=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:a=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:C,y}=x;return{x:C,y}}},...f}=Se(e,t),u={x:n,y:o},d=await s.detectOverflow(t,f),m=ge(Re(r)),h=yo(m);let g=u[h],v=u[m];if(a){const x=h==="y"?"top":"left",C=h==="y"?"bottom":"right",y=g+d[x],b=g-d[C];g=Gn(y,g,b)}if(c){const x=m==="y"?"top":"left",C=m==="y"?"bottom":"right",y=v+d[x],b=v-d[C];v=Gn(y,v,b)}const w=l.fn({...t,[h]:g,[m]:v});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[h]:a,[m]:c}}}}}},Td=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:f=!0}=Se(e,t),u={x:n,y:o},d=ge(r),m=yo(d);let h=u[m],g=u[d];const v=Se(c,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=m==="y"?"height":"width",b=s.reference[m]-s.floating[y]+w.mainAxis,S=s.reference[m]+s.reference[y]-w.mainAxis;h<b?h=b:h>S&&(h=S)}if(f){var x,C;const y=m==="y"?"width":"height",b=Es.has(Re(r)),S=s.reference[d]-s.floating[y]+(b&&((x=a.offset)==null?void 0:x[d])||0)+(b?0:w.crossAxis),E=s.reference[d]+s.reference[y]+(b?0:((C=a.offset)==null?void 0:C[d])||0)-(b?w.crossAxis:0);g<S?g=S:g>E&&(g=E)}return{[m]:h,[d]:g}}}},Id=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...f}=Se(e,t),u=await a.detectOverflow(t,f),d=Re(r),m=nt(r),h=ge(r)==="y",{width:g,height:v}=s.floating;let w,x;d==="top"||d==="bottom"?(w=d,x=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=d,w=m==="end"?"top":"bottom");const C=v-u.top-u.bottom,y=g-u.left-u.right,b=Ie(v-u[w],C),S=Ie(g-u[x],y),E=!t.middlewareData.shift;let R=b,M=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=C),E&&!m){const D=re(u.left,0),j=re(u.right,0),$=re(u.top,0),L=re(u.bottom,0);h?M=g-2*(D!==0||j!==0?D+j:re(u.left,u.right)):R=v-2*($!==0||L!==0?$+L:re(u.top,u.bottom))}await l({...t,availableWidth:M,availableHeight:R});const _=await a.getDimensions(c.floating);return g!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function sn(){return typeof window<"u"}function ot(e){return Ps(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xe(e){var t;return(t=(Ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ps(e){return sn()?e instanceof Node||e instanceof se(e).Node:!1}function fe(e){return sn()?e instanceof Element||e instanceof se(e).Element:!1}function Ee(e){return sn()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function _r(e){return!sn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function yt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Ad(e){return/^(table|td|th)$/.test(ot(e))}function an(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _d=/transform|translate|scale|rotate|perspective|filter/,Nd=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none";let Dn;function So(e){const t=fe(e)?pe(e):e;
45return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!Ro()&&(Le(t.backdropFilter)||Le(t.filter))||_d.test(t.willChange||"")||Nd.test(t.contain||"")}function Od(e){let t=Ae(e);for(;Ee(t)&&!Ze(t);){if(So(t))return t;if(an(t))return null;t=Ae(t)}return null}function Ro(){return Dn==null&&(Dn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dn}function Ze(e){return/^(html|body|#document)$/.test(ot(e))}function pe(e){return se(e).getComputedStyle(e)}function cn(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(ot(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_r(e)&&e.host||xe(e);return _r(t)?t.host:t}function Ms(e){const t=Ae(e);return Ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&yt(t)?t:Ms(t)}function pt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ms(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=se(r);if(s){const c=Kn(a);return t.concat(a,a.visualViewport||[],yt(r)?r:[],c&&n?pt(c):[])}else return t.concat(r,pt(r,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ts(e){const t=pe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ee(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=Kt(n)!==s||Kt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function Eo(e){return fe(e)?e:e.contextElement}function qe(e){const t=Eo(e);if(!Ee(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Ts(t);let a=(s?Kt(n.width):n.width)/o,c=(s?Kt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Dd=we(0);function Is(e){const t=se(e);return!Ro()||!t.visualViewport?Dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==se(e)?!1:t}function Ve(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Eo(e);let a=we(1);t&&(o?fe(o)&&(a=qe(o)):a=qe(e));const c=jd(s,n,o)?Is(s):we(0);let l=(r.left+c.x)/a.x,f=(r.top+c.y)/a.y,u=r.width/a.x,d=r.height/a.y;if(s){const m=se(s),h=o&&fe(o)?se(o):o;let g=m,v=Kn(g);for(;v&&o&&h!==g;){const w=qe(v),x=v.getBoundingClientRect(),C=pe(v),y=x.left+(v.clientLeft+parseFloat(C.paddingLeft))*w.x,b=x.top+(v.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,f*=w.y,u*=w.x,d*=w.y,l+=y,f+=b,g=se(v),v=Kn(g)}}return zt({width:u,height:d,x:l,y:f})}function ln(e,t){const n=cn(e).scrollLeft;return t?t.left+n:Ve(xe(e)).left+n}function As(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ln(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function $d(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=xe(o),c=t?an(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},f=we(1);const u=we(0),d=Ee(o);if((d||!d&&!s)&&((ot(o)!=="body"||yt(a))&&(l=cn(o)),d)){const h=Ve(o);f=qe(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const m=a&&!d&&!s?As(a,l):we(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+m.x,y:n.y*f.y-l.scrollTop*f.y+u.y+m.y}}function kd(e){return Array.from(e.getClientRects())}function Ld(e){const t=xe(e),n=cn(e),o=e.ownerDocument.body,r=re(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=re(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+ln(e);const c=-n.scrollTop;return pe(o).direction==="rtl"&&(a+=re(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const Nr=25;function Fd(e,t){const n=se(e),o=xe(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const u=Ro();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const f=ln(o);if(f<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-h);g<=Nr&&(s-=g)}else f<=Nr&&(s+=f);return{width:s,height:a,x:c,y:l}}function Vd(e,t){const n=Ve(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Ee(e)?qe(e):we(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,f=o*s.y;return{width:a,height:c,x:l,y:f}}function Or(e,t,n){let o;if(t==="viewport")o=Fd(e,n);else if(t==="document")o=Ld(xe(e));else if(fe(t))o=Vd(t,n);else{const r=Is(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}
45return zt(o)}function _s(e,t){const n=Ae(e);return n===t||!fe(n)||Ze(n)?!1:pe(n).position==="fixed"||_s(n,t)}function Bd(e,t){const n=t.get(e);if(n)return n;let o=pt(e,[],!1).filter(c=>fe(c)&&ot(c)!=="body"),r=null;const s=pe(e).position==="fixed";let a=s?Ae(e):e;for(;fe(a)&&!Ze(a);){const c=pe(a),l=So(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||yt(a)&&!l&&_s(e,a))?o=o.filter(u=>u!==a):r=c,a=Ae(a)}return t.set(e,o),o}function Wd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?an(t)?[]:Bd(t,this._c):[].concat(n),o],c=Or(t,a[0],r);let l=c.top,f=c.right,u=c.bottom,d=c.left;for(let m=1;m<a.length;m++){const h=Or(t,a[m],r);l=re(h.top,l),f=Ie(h.right,f),u=Ie(h.bottom,u),d=re(h.left,d)}return{width:f-d,height:u-l,x:d,y:l}}function Gd(e){const{width:t,height:n}=Ts(e);return{width:t,height:n}}function Hd(e,t,n){const o=Ee(t),r=xe(t),s=n==="fixed",a=Ve(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=we(0);function f(){l.x=ln(r)}if(o||!o&&!s)if((ot(t)!=="body"||yt(r))&&(c=cn(t)),o){const h=Ve(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&f();s&&!o&&r&&f();const u=r&&!o&&!s?As(r,c):we(0),d=a.left+c.scrollLeft-l.x-u.x,m=a.top+c.scrollTop-l.y-u.y;return{x:d,y:m,width:a.width,height:a.height}}function jn(e){return pe(e).position==="static"}function Dr(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function Ns(e,t){const n=se(e);if(an(e))return n;if(!Ee(e)){let r=Ae(e);for(;r&&!Ze(r);){if(fe(r)&&!jn(r))return r;r=Ae(r)}return n}let o=Dr(e,t);for(;o&&Ad(o)&&jn(o);)o=Dr(o,t);return o&&Ze(o)&&jn(o)&&!So(o)?n:o||Od(e)||n}const Kd=async function(e){const t=this.getOffsetParent||Ns,n=this.getDimensions,o=await n(e.floating);return{reference:Hd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ud(e){return pe(e).direction==="rtl"}const zd={convertOffsetParentRelativeRectToViewportRelativeRect:$d,getDocumentElement:xe,getClippingRect:Wd,getOffsetParent:Ns,getElementRects:Kd,getClientRects:kd,getDimensions:Gd,getScale:qe,isElement:fe,isRTL:Ud};function Os(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yd(e,t){let n=null,o;const r=xe(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const f=e.getBoundingClientRect(),{left:u,top:d,width:m,height:h}=f;if(c||t(),!m||!h)return;const g=kt(d),v=kt(r.clientWidth-(u+m)),w=kt(r.clientHeight-(d+h)),x=kt(u),y={rootMargin:-g+"px "+-v+"px "+-w+"px "+-x+"px",threshold:re(0,Ie(1,l))||1};let b=!0;function S(E){const R=E[0].intersectionRatio;if(R!==l){if(!b)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Os(f,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),s}function Xd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=Eo(e),u=r||s?[...f?pt(f):[],...t?pt(t):[]]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=f&&c?Yd(f,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(x=>{let[C]=x;C&&C.target===f&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),f&&!l&&h.observe(f),t&&h.observe(t));let g,v=l?Ve(e):null;l&&w();function w(){const x=Ve(e);v&&!Os(v,x)&&n(),v=x,g=requestAnimationFrame(w)}return n(),()=>{var x;u.forEach(C=>{r&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),d?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const qd=Pd,Zd=Md,Qd=Sd,Jd=Id,ef=Rd,jr=bd,tf=Td,nf=(e,t,n)=>{const o=new Map,r={platform:zd,...n},s={...r.platform,_c:o};return Cd(e,t,{...r,platform:s})};var Bt=typeof document<"u"?i.useLayoutEffect:i.useEffect;function Yt(e,t){if(e===t)return!0;
45if(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(!Yt(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)&&!Yt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ds(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $r(e,t){const n=Ds(e);return Math.round(t*n)/n}function $n(e){const t=i.useRef(e);return Bt(()=>{t.current=e}),t}function of(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[u,d]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=i.useState(o);Yt(m,o)||h(o);const[g,v]=i.useState(null),[w,x]=i.useState(null),C=i.useCallback(N=>{N!==E.current&&(E.current=N,v(N))},[]),y=i.useCallback(N=>{N!==R.current&&(R.current=N,x(N))},[]),b=s||g,S=a||w,E=i.useRef(null),R=i.useRef(null),M=i.useRef(u),_=l!=null,D=$n(l),j=$n(r),$=$n(f),L=i.useCallback(()=>{if(!E.current||!R.current)return;const N={placement:t,strategy:n,middleware:m};j.current&&(N.platform=j.current),nf(E.current,R.current,N).then(T=>{const U={...T,isPositioned:$.current!==!1};k.current&&!Yt(M.current,U)&&(M.current=U,tn.flushSync(()=>{d(U)}))})},[m,t,n,j,$]);Bt(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[f]);const k=i.useRef(!1);Bt(()=>(k.current=!0,()=>{k.current=!1}),[]),Bt(()=>{if(b&&(E.current=b),S&&(R.current=S),b&&S){if(D.current)return D.current(b,S,L);L()}},[b,S,L,D,_]);const B=i.useMemo(()=>({reference:E,floating:R,setReference:C,setFloating:y}),[C,y]),O=i.useMemo(()=>({reference:b,floating:S}),[b,S]),F=i.useMemo(()=>{const N={position:n,left:0,top:0};if(!O.floating)return N;const T=$r(O.floating,u.x),U=$r(O.floating,u.y);return c?{...N,transform:"translate("+T+"px, "+U+"px)",...Ds(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:U}},[n,c,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:L,refs:B,elements:O,floatingStyles:F}),[u,L,B,O,F])}const rf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?jr({element:o.current,padding:r}).fn(n):{}:o?jr({element:o,padding:r}).fn(n):{}}}},sf=(e,t)=>({...qd(e),options:[e,t]}),af=(e,t)=>({...Zd(e),options:[e,t]}),cf=(e,t)=>({...tf(e),options:[e,t]}),lf=(e,t)=>({...Qd(e),options:[e,t]}),uf=(e,t)=>({...Jd(e),options:[e,t]}),df=(e,t)=>({...ef(e),options:[e,t]}),ff=(e,t)=>({...rf(e),options:[e,t]});var pf="Arrow",js=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});js.displayName=pf;var vf=js;function $s(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Po="Popper",[ks,Ne]=J(Po),[mf,Ls]=ks(Po),Fs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(mf,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fs.displayName=Po;var Vs="PopperAnchor",Bs=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Ls(Vs,n),a=i.useRef(null),c=V(t,a);return i.useEffect(()=>{s.onAnchorChange(o?.current||a.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Bs.displayName=Vs;var Mo="PopperContent",[hf,gf]=ks(Mo),Ws=i.forwardRef((e,t)=>
45{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,w=Ls(Mo,n),[x,C]=i.useState(null),y=V(t,A=>C(A)),[b,S]=i.useState(null),E=$s(b),R=E?.width??0,M=E?.height??0,_=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(f)?f:[f],$=j.length>0,L={padding:D,boundary:j.filter(xf),altBoundary:$},{refs:k,floatingStyles:B,placement:O,isPositioned:F,middlewareData:N}=of({strategy:"fixed",placement:_,whileElementsMounted:(...A)=>Xd(...A,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[sf({mainAxis:r+M,alignmentAxis:a}),l&&af({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?cf():void 0,...L}),l&&lf({...L}),uf({...L,apply:({elements:A,rects:G,availableWidth:ne,availableHeight:H})=>{const{width:K,height:X}=G.reference,ae=A.floating.style;ae.setProperty("--radix-popper-available-width",`${ne}px`),ae.setProperty("--radix-popper-available-height",`${H}px`),ae.setProperty("--radix-popper-anchor-width",`${K}px`),ae.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&ff({element:b,padding:c}),yf({arrowWidth:R,arrowHeight:M}),m&&df({strategy:"referenceHidden",...L})]}),[T,U]=Ks(O),te=z(g);Y(()=>{F&&te?.()},[F,te]);const ue=N.arrow?.x,ye=N.arrow?.y,ie=N.arrow?.centerOffset!==0,[Ce,oe]=i.useState();return Y(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:F?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(hf,{scope:n,placedSide:T,onArrowChange:S,arrowX:ue,arrowY:ye,shouldHideArrow:ie,children:p.jsx(I.div,{"data-side":T,"data-align":U,...v,ref:y,style:{...v.style,animation:F?void 0:"none"}})})})});Ws.displayName=Mo;var Gs="PopperArrow",wf={top:"bottom",right:"left",bottom:"top",left:"right"},Hs=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=gf(Gs,o),a=wf[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(vf,{...r,ref:n,style:{...r.style,display:"block"}})})});Hs.displayName=Gs;function xf(e){return e!==null}var yf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[f,u]=Ks(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(r.arrow?.x??0)+c/2,h=(r.arrow?.y??0)+l/2;let g="",v="";return f==="bottom"?(g=a?d:`${m}px`,v=`${-l}px`):f==="top"?(g=a?d:`${m}px`,v=`${o.floating.height+l}px`):f==="right"?(g=`${-l}px`,v=a?d:`${h}px`):f==="left"&&(g=`${o.floating.width+l}px`,v=a?d:`${h}px`),{data:{x:g,y:v}}}});function Ks(e){const[t,n="center"]=e.split("-");return[t,n]}var Ct=Fs,bt=Bs,un=Ws,dn=Hs,Cf=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(bf);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(Un,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(Un,{...o,ref:t,children:n})});Cf.displayName="Slot";var Un=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=Rf(n),s=Sf(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Un.displayName="SlotClone";var Us=({children:e})=>p.jsx(p.Fragment,{children:e});function bf(e){return i.isValidElement(e)&&e.type===Us}function Sf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}
45:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Rf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ef="VisuallyHidden",To=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));To.displayName=Ef;var zs=To,[fn,wg]=J("Tooltip",[Ne]),pn=Ne(),Ys="TooltipProvider",Pf=700,zn="tooltip.open",[Mf,Io]=fn(Ys),Xs=e=>{const{__scopeTooltip:t,delayDuration:n=Pf,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,[a,c]=i.useState(!0),l=i.useRef(!1),f=i.useRef(0);return i.useEffect(()=>{const u=f.current;return()=>window.clearTimeout(u)},[]),p.jsx(Mf,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(f.current),c(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(u=>{l.current=u},[]),disableHoverableContent:r,children:s})};Xs.displayName=Ys;var vn="Tooltip",[Tf,St]=fn(vn),qs=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=Io(vn,e.__scopeTooltip),f=pn(t),[u,d]=i.useState(null),m=Z(),h=i.useRef(0),g=a??l.disableHoverableContent,v=c??l.delayDuration,w=i.useRef(!1),[x=!1,C]=Q({prop:o,defaultProp:r,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(zn))):l.onClose(),s?.(R)}}),y=i.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),b=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w.current=!1,C(!0)},[C]),S=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),E=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,C(!0),h.current=0},v)},[v,C]);return i.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(Ct,{...f,children:p.jsx(Tf,{scope:t,contentId:m,open:x,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?E():b()},[l.isOpenDelayed,E,b]),onTriggerLeave:i.useCallback(()=>{g?S():(window.clearTimeout(h.current),h.current=0)},[S,g]),onOpen:b,onClose:S,disableHoverableContent:g,children:n})})};qs.displayName=vn;var Yn="TooltipTrigger",Zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=St(Yn,n),s=Io(Yn,n),a=pn(n),c=i.useRef(null),l=V(t,c,r.onTriggerChange),f=i.useRef(!1),u=i.useRef(!1),d=i.useCallback(()=>f.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(bt,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:P(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:P(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:P(e.onFocus,()=>{f.current||r.onOpen()}),onBlur:P(e.onBlur,r.onClose),onClick:P(e.onClick,r.onClose)})})});Zs.displayName=Yn;var Ao="TooltipPortal",[If,Af]=fn(Ao,{forceMount:void 0}),Qs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=St(Ao,t);return p.jsx(If,{scope:t,forceMount:n,children:p.jsx(q,{present:n||s.open,children:p.jsx(tt,{asChild:!0,container:r,children:o})})})};Qs.displayName=Ao;var Qe="TooltipContent",Js=i.forwardRef((e,t)=>{const n=Af(Qe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=St(Qe,e.__scopeTooltip);return p.jsx(q,{present:o||a.open,children:a.disableHoverableContent?p.jsx(ei,{side:r,...s,ref:t}):p.jsx(_f,{side:r,...s,ref:t})})}),_f=i.forwardRef((e,t)=>{const n=St(Qe,e.__scopeTooltip),o=Io(Qe,e.__scopeTooltip),r=i.useRef(null),s=V(t,r),[a,c]=i.useState(null),{trigger:l,onClose:f}=n,u=r.current,{onPointerInTransitChange:d}=o,m=i.useCallback(()=>{c(null),d(!1)},[d]),h=i.useCallback((g,v)=>{const w=g.currentTarget,x={x:g.clientX,y:g.clientY},C=Df(x,w.getBoundingClientRect()),y=jf(x,C),b=$f(v.getBoundingClientRect()),S=Lf([...y,...b]);c(S),d(!0)},[d]);return i.useEffect(()=>()=>m(),[m]),i.useEffect(()=>{if(l&&u){const g=w=>h(w,u),v=w=>h(w,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",v)}}},[l,u,h,m]),i.useEffect(()=>{if(a){const g=v=>{const w=v.target,x={x:v.clientX,y:v.clientY},C=l?.contains(w)||u?.contains(w),y=!kf(x,a);C?m():y&&(m(),f())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,a,f,m]),p.jsx(ei,{...e,ref:s})}),[Nf,Of]=fn(vn,{isInside:!1}),ei=i.forwardRef((e,t)=>
45{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=St(Qe,n),f=pn(n),{onClose:u}=l;return i.useEffect(()=>(document.addEventListener(zn,u),()=>document.removeEventListener(zn,u)),[u]),i.useEffect(()=>{if(l.trigger){const d=m=>{m.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(Ge,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(un,{"data-state":l.stateAttribute,...f,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Us,{children:o}),p.jsx(Nf,{scope:n,isInside:!0,children:p.jsx(zs,{id:l.contentId,role:"tooltip",children:r||o})})]})})});Js.displayName=Qe;var ti="TooltipArrow",ni=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=pn(n);return Of(ti,n).isInside?null:p.jsx(dn,{...r,...o,ref:t})});ni.displayName=ti;function Df(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function jf(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function $f(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function kf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s].x,l=t[s].y,f=t[a].x,u=t[a].y;l>o!=u>o&&n<(f-c)*(o-l)/(u-l)+c&&(r=!r)}return r}function Lf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Ff(t)}function Ff(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var xg=Xs,yg=qs,Cg=Zs,bg=Qs,Sg=Js,Rg=ni,Vf="Label",oi=i.forwardRef((e,t)=>p.jsx(I.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));oi.displayName=Vf;var Eg=oi,_o="Avatar",[Bf,Pg]=J(_o),[Wf,ri]=Bf(_o),si=i.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=i.useState("idle");return p.jsx(Wf,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:p.jsx(I.span,{...o,ref:t})})});si.displayName=_o;var ii="AvatarImage",ai=i.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,a=ri(ii,n),c=Gf(o,s.referrerPolicy),l=z(f=>{r(f),a.onImageLoadingStatusChange(f)});return Y(()=>{c!=="idle"&&l(c)},[c,l]),c==="loaded"?p.jsx(I.img,{...s,ref:t,src:o}):null});ai.displayName=ii;var ci="AvatarFallback",li=i.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=ri(ci,n),[a,c]=i.useState(o===void 0);return i.useEffect(()=>{if(o!==void 0){const l=window.setTimeout(()=>c(!0),o);return()=>window.clearTimeout(l)}},[o]),a&&s.imageLoadingStatus!=="loaded"?p.jsx(I.span,{...r,ref:t}):null});li.displayName=ci;function Gf(e,t){const[n,o]=i.useState("idle");return Y(()=>{if(!e){o("error");return}let r=!0;const s=new window.Image,a=c=>()=>{r&&o(c)};return o("loading"),s.onload=a("loaded"),s.onerror=a("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{r=!1}},[e,t]),n}var Mg=si,Tg=ai,Ig=li,Xn=i.forwardRef((e,t)=>
45{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(Kf);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(qn,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(qn,{...o,ref:t,children:n})});Xn.displayName="Slot";var qn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=zf(n),s=Uf(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});qn.displayName="SlotClone";var Hf=({children:e})=>p.jsx(p.Fragment,{children:e});function Kf(e){return i.isValidElement(e)&&e.type===Hf}function Uf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function zf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Rt(e){const t=e+"CollectionProvider",[n,o]=J(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,w=W.useRef(null),x=W.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:x,collectionRef:w,children:v})};a.displayName=t;const c=e+"CollectionSlot",l=W.forwardRef((h,g)=>{const{scope:v,children:w}=h,x=s(c,v),C=V(g,x.collectionRef);return p.jsx(Xn,{ref:C,children:w})});l.displayName=c;const f=e+"CollectionItemSlot",u="data-radix-collection-item",d=W.forwardRef((h,g)=>{const{scope:v,children:w,...x}=h,C=W.useRef(null),y=V(g,C),b=s(f,v);return W.useEffect(()=>(b.itemMap.set(C,{ref:C,...x}),()=>void b.itemMap.delete(C))),p.jsx(Xn,{[u]:"",ref:y,children:w})});d.displayName=f;function m(h){const g=s(e+"CollectionConsumer",h);return W.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((b,S)=>x.indexOf(b.ref.current)-x.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},m,o]}var Yf=i.createContext(void 0);function rt(e){const t=i.useContext(Yf);return e||t||"ltr"}var kn="rovingFocusGroup.onEntryFocus",Xf={bubbles:!1,cancelable:!0},mn="RovingFocusGroup",[Zn,ui,qf]=Rt(mn),[Zf,st]=J(mn,[qf]),[Qf,Jf]=Zf(mn),di=i.forwardRef((e,t)=>p.jsx(Zn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(ep,{...e,ref:t})})}));di.displayName=mn;var ep=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:f,preventScrollOnEntryFocus:u=!1,...d}=e,m=i.useRef(null),h=V(t,m),g=rt(s),[v=null,w]=Q({prop:a,defaultProp:c,onChange:l}),[x,C]=i.useState(!1),y=z(f),b=ui(n),S=i.useRef(!1),[E,R]=i.useState(0);return i.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(kn,y),()=>M.removeEventListener(kn,y)},[y]),p.jsx(Qf,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:v,onItemFocus:i.useCallback(M=>w(M),[w]),onItemShiftTab:i.useCallback(()=>C(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||E===0?-1:0,"data-orientation":o,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{S.current=!0}),onFocus:P(e.onFocus,M=>{const _=!S.current;if(M.target===M.currentTarget&&_&&!x){const D=new CustomEvent(kn,Xf);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const j=b().filter(O=>O.focusable),$=j.find(O=>O.active),L=j.find(O=>O.id===v),B=[$,L,...j].filter(Boolean).map(O=>O.ref.current);vi(B,u)}}S.current=!1}),onBlur:P(e.onBlur,()=>C(!1))})})}),fi="RovingFocusGroupItem",pi=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,...a}=e,c=Z(),l=s||c,f=Jf(fi,n),u=f.currentTabStopId===l,d=ui(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=f;return i.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),p.jsx(Zn.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:P(e.onMouseDown,g=>{o?f.onItemFocus(l):g.preventDefault()}),onFocus:P(e.onFocus,()=>f.onItemFocus(l)),onKeyDown:P(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=op(g,f.orientation,f.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=d().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const C=x.indexOf(g.currentTarget);x=f.loop?rp(x,C+1):x.slice(C+1)}setTimeout(()=>vi(x))}})})})});pi.displayName=fi;var tp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function np(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}
45function op(e,t,n){const o=np(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return tp[o]}function vi(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function rp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var No=di,Oo=pi,mi=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(ip);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(Qn,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(Qn,{...o,ref:t,children:n})});mi.displayName="Slot";var Qn=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=cp(n),s=ap(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Qn.displayName="SlotClone";var sp=({children:e})=>p.jsx(p.Fragment,{children:e});function ip(e){return i.isValidElement(e)&&e.type===sp}function ap(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function cp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jn=["Enter"," "],lp=["ArrowDown","PageUp","Home"],hi=["ArrowUp","PageDown","End"],up=[...lp,...hi],dp={ltr:[...Jn,"ArrowRight"],rtl:[...Jn,"ArrowLeft"]},fp={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Et="Menu",[vt,pp,vp]=Rt(Et),[He,gi]=J(Et,[vp,Ne,st]),Pt=Ne(),wi=st(),[xi,Oe]=He(Et),[mp,Mt]=He(Et),yi=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=Pt(t),[l,f]=i.useState(null),u=i.useRef(!1),d=z(s),m=rt(r);return i.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),p.jsx(Ct,{...c,children:p.jsx(xi,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:f,children:p.jsx(mp,{scope:t,onClose:i.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:m,modal:a,children:o})})})};yi.displayName=Et;var hp="MenuAnchor",Do=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(bt,{...r,...o,ref:t})});Do.displayName=hp;var jo="MenuPortal",[gp,Ci]=He(jo,{forceMount:void 0}),bi=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Oe(jo,t);return p.jsx(gp,{scope:t,forceMount:n,children:p.jsx(q,{present:n||s.open,children:p.jsx(tt,{asChild:!0,container:r,children:o})})})};bi.displayName=jo;var ce="MenuContent",[wp,$o]=He(ce),Si=i.forwardRef((e,t)=>{const n=Ci(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Oe(ce,e.__scopeMenu),a=Mt(ce,e.__scopeMenu);return p.jsx(vt.Provider,{scope:e.__scopeMenu,children:p.jsx(q,{present:o||s.open,children:p.jsx(vt.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(xp,{...r,ref:t}):p.jsx(yp,{...r,ref:t})})})})}),xp=i.forwardRef((e,t)=>{const n=Oe(ce,e.__scopeMenu),o=i.useRef(null),r=V(t,o);return i.useEffect(()=>{const s=o.current;if(s)return rn(s)},[]),p.jsx(ko,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yp=i.forwardRef((e,t)=>{const n=Oe(ce,e.__scopeMenu);return p.jsx(ko,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ko=i.forwardRef((e,t)=>
45{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,...v}=e,w=Oe(ce,n),x=Mt(ce,n),C=Pt(n),y=wi(n),b=pp(n),[S,E]=i.useState(null),R=i.useRef(null),M=V(t,R,w.onContentChange),_=i.useRef(0),D=i.useRef(""),j=i.useRef(0),$=i.useRef(null),L=i.useRef("right"),k=i.useRef(0),B=g?xt:i.Fragment,O=g?{as:mi,allowPinchZoom:!0}:void 0,F=T=>{const U=D.current+T,te=b().filter(A=>!A.disabled),ue=document.activeElement,ye=te.find(A=>A.ref.current===ue)?.textValue,ie=te.map(A=>A.textValue),Ce=Np(ie,U,ye),oe=te.find(A=>A.textValue===Ce)?.ref.current;(function A(G){D.current=G,window.clearTimeout(_.current),G!==""&&(_.current=window.setTimeout(()=>A(""),1e3))})(U),oe&&setTimeout(()=>oe.focus())};i.useEffect(()=>()=>window.clearTimeout(_.current),[]),nn();const N=i.useCallback(T=>L.current===$.current?.side&&Dp(T,$.current?.area),[]);return p.jsx(wp,{scope:n,searchRef:D,onItemEnter:i.useCallback(T=>{N(T)&&T.preventDefault()},[N]),onItemLeave:i.useCallback(T=>{N(T)||(R.current?.focus(),E(null))},[N]),onTriggerLeave:i.useCallback(T=>{N(T)&&T.preventDefault()},[N]),pointerGraceTimerRef:j,onPointerGraceIntentChange:i.useCallback(T=>{$.current=T},[]),children:p.jsx(B,{...O,children:p.jsx(wt,{asChild:!0,trapped:r,onMountAutoFocus:P(s,T=>{T.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ge,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,children:p.jsx(No,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:P(l,T=>{x.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(un,{role:"menu","aria-orientation":"vertical","data-state":Vi(w.open),"data-radix-menu-content":"",dir:x.dir,...C,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:P(v.onKeyDown,T=>{const te=T.target.closest("[data-radix-menu-content]")===T.currentTarget,ue=T.ctrlKey||T.altKey||T.metaKey,ye=T.key.length===1;te&&(T.key==="Tab"&&T.preventDefault(),!ue&&ye&&F(T.key));const ie=R.current;if(T.target!==ie||!up.includes(T.key))return;T.preventDefault();const oe=b().filter(A=>!A.disabled).map(A=>A.ref.current);hi.includes(T.key)&&oe.reverse(),Ap(oe)}),onBlur:P(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(_.current),D.current="")}),onPointerMove:P(e.onPointerMove,mt(T=>{const U=T.target,te=k.current!==T.clientX;if(T.currentTarget.contains(U)&&te){const ue=T.clientX>k.current?"right":"left";L.current=ue,k.current=T.clientX}}))})})})})})})});Si.displayName=ce;var Cp="MenuGroup",Lo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});Lo.displayName=Cp;var bp="MenuLabel",Ri=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Ri.displayName=bp;var Xt="MenuItem",kr="menu.itemSelect",hn=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=Mt(Xt,e.__scopeMenu),c=$o(Xt,e.__scopeMenu),l=V(t,s),f=i.useRef(!1),u=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(kr,{bubbles:!0,cancelable:!0});d.addEventListener(kr,h=>o?.(h),{once:!0}),Gt(d,m),m.defaultPrevented?f.current=!1:a.onClose()}};return p.jsx(Ei,{...r,ref:l,disabled:n,onClick:P(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),f.current=!0},onPointerUp:P(e.onPointerUp,d=>{f.current||d.currentTarget?.click()}),onKeyDown:P(e.onKeyDown,d=>{const m=c.searchRef.current!=="";n||m&&d.key===" "||Jn.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});hn.displayName=Xt;var Ei=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=$o(Xt,n),c=wi(n),l=i.useRef(null),f=V(t,l),[u,d]=i.useState(!1),[m,h]=i.useState("");return i.useEffect(()=>{const g=l.current;g&&h((g.textContent??"").trim())},[s.children]),p.jsx(vt.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:p.jsx(Oo,{asChild:!0,...c,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:f,onPointerMove:P(e.onPointerMove,mt(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focu
45s({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,mt(g=>a.onItemLeave(g))),onFocus:P(e.onFocus,()=>d(!0)),onBlur:P(e.onBlur,()=>d(!1))})})})}),Sp="MenuCheckboxItem",Pi=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(_i,{scope:e.__scopeMenu,checked:n,children:p.jsx(hn,{role:"menuitemcheckbox","aria-checked":qt(n)?"mixed":n,...r,ref:t,"data-state":Bo(n),onSelect:P(r.onSelect,()=>o?.(qt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Pi.displayName=Sp;var Mi="MenuRadioGroup",[Rp,Ep]=He(Mi,{value:void 0,onValueChange:()=>{}}),Ti=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=z(o);return p.jsx(Rp,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Lo,{...r,ref:t})})});Ti.displayName=Mi;var Ii="MenuRadioItem",Ai=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Ep(Ii,e.__scopeMenu),s=n===r.value;return p.jsx(_i,{scope:e.__scopeMenu,checked:s,children:p.jsx(hn,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Bo(s),onSelect:P(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ai.displayName=Ii;var Fo="MenuItemIndicator",[_i,Pp]=He(Fo,{checked:!1}),Ni=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Pp(Fo,n);return p.jsx(q,{present:o||qt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Bo(s.checked)})})});Ni.displayName=Fo;var Mp="MenuSeparator",Oi=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Oi.displayName=Mp;var Tp="MenuArrow",Di=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(dn,{...r,...o,ref:t})});Di.displayName=Tp;var Vo="MenuSub",[Ip,ji]=He(Vo),$i=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=Oe(Vo,t),a=Pt(t),[c,l]=i.useState(null),[f,u]=i.useState(null),d=z(r);return i.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),p.jsx(Ct,{...a,children:p.jsx(xi,{scope:t,open:o,onOpenChange:d,content:f,onContentChange:u,children:p.jsx(Ip,{scope:t,contentId:Z(),triggerId:Z(),trigger:c,onTriggerChange:l,children:n})})})};$i.displayName=Vo;var dt="MenuSubTrigger",ki=i.forwardRef((e,t)=>{const n=Oe(dt,e.__scopeMenu),o=Mt(dt,e.__scopeMenu),r=ji(dt,e.__scopeMenu),s=$o(dt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,f={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),l(null)}},[c,l]),p.jsx(Do,{asChild:!0,...f,children:p.jsx(Ei,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Vi(n.open),...e,ref:ve(t,r.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(e.onPointerMove,mt(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:P(e.onPointerLeave,mt(d=>{u();const m=n.content?.getBoundingClientRect();if(m){const h=n.content?.dataset.side,g=h==="right",v=g?-5:5,w=m[g?"left":"right"],x=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x:w,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:w,y:m.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:P(e.onKeyDown,d=>{const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||dp[o.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});ki.displayName=dt;var Li="MenuSubContent",Fi=i.forwardRef((e,t)=>{const n=Ci(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Oe(ce,e.__scopeMenu),a=Mt(ce,e.__scopeMenu),c=ji(Li,e.__scopeMenu),l=i.useRef(null),f=V(t,l);return p.jsx(vt.Provider,{scope:e.__scopeMenu,children:p.jsx(q,{present:o||s.open,children:p.jsx(vt.Slot,{scope:e.__scopeMenu,children:p.jsx(ko,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:f,align:"start",side:a.dir==="rtl"?"left"
45:"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{a.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:P(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:P(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:P(e.onKeyDown,u=>{const d=u.currentTarget.contains(u.target),m=fp[a.dir].includes(u.key);d&&m&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});Fi.displayName=Li;function Vi(e){return e?"open":"closed"}function qt(e){return e==="indeterminate"}function Bo(e){return qt(e)?"indeterminate":e?"checked":"unchecked"}function Ap(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _p(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Np(e,t,n){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_p(e,Math.max(s,0));r.length===1&&(a=a.filter(f=>f!==n));const l=a.find(f=>f.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Op(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s].x,l=t[s].y,f=t[a].x,u=t[a].y;l>o!=u>o&&n<(f-c)*(o-l)/(u-l)+c&&(r=!r)}return r}function Dp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Op(n,t)}function mt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var jp=yi,$p=Do,kp=bi,Lp=Si,Fp=Lo,Vp=Ri,Bp=hn,Wp=Pi,Gp=Ti,Hp=Ai,Kp=Ni,Up=Oi,zp=Di,Yp=$i,Xp=ki,qp=Fi,Wo="DropdownMenu",[Zp,Ag]=J(Wo,[gi]),ee=gi(),[Qp,Bi]=Zp(Wo),Wi=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=ee(t),f=i.useRef(null),[u=!1,d]=Q({prop:r,defaultProp:s,onChange:a});return p.jsx(Qp,{scope:t,triggerId:Z(),triggerRef:f,contentId:Z(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(m=>!m),[d]),modal:c,children:p.jsx(jp,{...l,open:u,onOpenChange:d,dir:o,modal:c,children:n})})};Wi.displayName=Wo;var Gi="DropdownMenuTrigger",Hi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Bi(Gi,n),a=ee(n);return p.jsx($p,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:ve(t,s.triggerRef),onPointerDown:P(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:P(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Hi.displayName=Gi;var Jp="DropdownMenuPortal",Ki=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ee(t);return p.jsx(kp,{...o,...n})};Ki.displayName=Jp;var Ui="DropdownMenuContent",zi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Bi(Ui,n),s=ee(n),a=i.useRef(!1);return p.jsx(Lp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:P(e.onInteractOutside,c=>{const l=c.detail.originalEvent,f=l.button===0&&l.ctrlKey===!0,u=l.button===2||f;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zi.displayName=Ui;var ev="DropdownMenuGroup",Yi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Fp,{...r,...o,ref:t})});Yi.displayName=ev;var tv="DropdownMenuLabel",Xi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Vp,{...r,...o,ref:t})});Xi.displayName=tv;var nv="DropdownMenuItem",qi=i.forwardRef((e,t)=>
45{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Bp,{...r,...o,ref:t})});qi.displayName=nv;var ov="DropdownMenuCheckboxItem",Zi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Wp,{...r,...o,ref:t})});Zi.displayName=ov;var rv="DropdownMenuRadioGroup",Qi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Gp,{...r,...o,ref:t})});Qi.displayName=rv;var sv="DropdownMenuRadioItem",Ji=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Hp,{...r,...o,ref:t})});Ji.displayName=sv;var iv="DropdownMenuItemIndicator",ea=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Kp,{...r,...o,ref:t})});ea.displayName=iv;var av="DropdownMenuSeparator",ta=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Up,{...r,...o,ref:t})});ta.displayName=av;var cv="DropdownMenuArrow",lv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(zp,{...r,...o,ref:t})});lv.displayName=cv;var uv=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,a=ee(t),[c=!1,l]=Q({prop:o,defaultProp:s,onChange:r});return p.jsx(Yp,{...a,open:c,onOpenChange:l,children:n})},dv="DropdownMenuSubTrigger",na=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(Xp,{...r,...o,ref:t})});na.displayName=dv;var fv="DropdownMenuSubContent",oa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return p.jsx(qp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oa.displayName=fv;var _g=Wi,Ng=Hi,Og=Ki,Dg=zi,jg=Yi,$g=Xi,kg=qi,Lg=Zi,Fg=Qi,Vg=Ji,Bg=ea,Wg=ta,Gg=uv,Hg=na,Kg=oa;function Go(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var it="NavigationMenu",[Ho,ra,pv]=Rt(it),[eo,vv,mv]=Rt(it),[Ko,Ug]=J(it,[pv,mv]),[hv,le]=Ko(it),[gv,wv]=Ko(it),sa=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:r,defaultValue:s,delayDuration:a=200,skipDelayDuration:c=300,orientation:l="horizontal",dir:f,...u}=e,[d,m]=i.useState(null),h=V(t,_=>m(_)),g=rt(f),v=i.useRef(0),w=i.useRef(0),x=i.useRef(0),[C,y]=i.useState(!0),[b="",S]=Q({prop:o,onChange:_=>{const D=_!=="",j=c>0;D?(window.clearTimeout(x.current),j&&y(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>y(!0),c)),r?.(_)},defaultProp:s}),E=i.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>S(""),150)},[S]),R=i.useCallback(_=>{window.clearTimeout(w.current),S(_)},[S]),M=i.useCallback(_=>{b===_?window.clearTimeout(w.current):v.current=window.setTimeout(()=>{window.clearTimeout(w.current),S(_)},a)},[b,S,a]);return i.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(w.current),window.clearTimeout(x.current)},[]),p.jsx(aa,{scope:n,isRootMenu:!0,value:b,dir:g,orientation:l,rootNavigationMenu:d,onTriggerEnter:_=>{window.clearTimeout(v.current),C?M(_):R(_)},onTriggerLeave:()=>{window.clearTimeout(v.current),E()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:E,onItemSelect:_=>{S(D=>D===_?"":_)},onItemDismiss:()=>S(""),children:p.jsx(I.nav,{"aria-label":"Main","data-orientation":l,dir:g,...u,ref:h})})});sa.displayName=it;var ia="NavigationMenuSub",xv=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",...c}=e,l=le(ia,n),[f="",u]=Q({prop:o,onChange:r,defaultProp:s});return p.jsx(aa,{scope:n,isRootMenu:!1,value:f,dir:l.dir,orientation:a,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:p.jsx(I.div,{"data-orientation":a,...c,ref:t})})});xv.displayName=ia;var aa=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:o,dir:r,orientation:s,children:a,value:c,onItemSelect:l,onItemDismiss:f,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:m,onContentLeave:h}=e,[g,v]=i.useState(null),[w,x]=i.useState(new Map),[C,y]=i.useState(null);return p.jsx(hv,{scope:t,isRootMenu:n,rootNavigationMenu:o,value:c,previousValue:Go(c),baseId:Z(),dir:r,orientation:s,viewport:g,onViewportChange:v,indicatorTrack:C,onIndicatorTrackChange:y,onTriggerEnter:z(u),onTriggerLeave:z(d),onContentEnter:z(m),onContentLeave:z(h),onItemSelect:z(l),onItemDismiss:z(f),onViewportContentChange:i.useCallback((b,S)=>{x(E=>(E.set(b,S),new Map(E)))},[]),onViewportContentRemove:i.useCallback(b=>{x(S=>S.has(b)?(S.delete(b),new Map(S)):S)},[]),children:p.jsx(Ho.Provider,{scope:t,children:p.jsx(gv,{scope:t,items:w,children:a})})})},ca="NavigationMenuList",la=i.forwardRef((e,t)=>
45{const{__scopeNavigationMenu:n,...o}=e,r=le(ca,n),s=p.jsx(I.ul,{"data-orientation":r.orientation,...o,ref:t});return p.jsx(I.div,{style:{position:"relative"},ref:r.onIndicatorTrackChange,children:p.jsx(Ho.Slot,{scope:n,children:r.isRootMenu?p.jsx(wa,{asChild:!0,children:s}):s})})});la.displayName=ca;var ua="NavigationMenuItem",[yv,da]=Ko(ua),fa=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,...r}=e,s=Z(),a=o||s||"LEGACY_REACT_AUTO_VALUE",c=i.useRef(null),l=i.useRef(null),f=i.useRef(null),u=i.useRef(()=>{}),d=i.useRef(!1),m=i.useCallback((g="start")=>{if(c.current){u.current();const v=no(c.current);v.length&&Yo(g==="start"?v:v.reverse())}},[]),h=i.useCallback(()=>{if(c.current){const g=no(c.current);g.length&&(u.current=Tv(g))}},[]);return p.jsx(yv,{scope:n,value:a,triggerRef:l,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:d,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:p.jsx(I.li,{...r,ref:t})})});fa.displayName=ua;var to="NavigationMenuTrigger",pa=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:o,...r}=e,s=le(to,e.__scopeNavigationMenu),a=da(to,e.__scopeNavigationMenu),c=i.useRef(null),l=V(c,a.triggerRef,t),f=ya(s.baseId,a.value),u=Ca(s.baseId,a.value),d=i.useRef(!1),m=i.useRef(!1),h=a.value===s.value;return p.jsxs(p.Fragment,{children:[p.jsx(Ho.ItemSlot,{scope:n,value:a.value,children:p.jsx(xa,{asChild:!0,children:p.jsx(I.button,{id:f,disabled:o,"data-disabled":o?"":void 0,"data-state":Xo(h),"aria-expanded":h,"aria-controls":u,...r,ref:l,onPointerEnter:P(e.onPointerEnter,()=>{m.current=!1,a.wasEscapeCloseRef.current=!1}),onPointerMove:P(e.onPointerMove,Zt(()=>{o||m.current||a.wasEscapeCloseRef.current||d.current||(s.onTriggerEnter(a.value),d.current=!0)})),onPointerLeave:P(e.onPointerLeave,Zt(()=>{o||(s.onTriggerLeave(),d.current=!1)})),onClick:P(e.onClick,()=>{s.onItemSelect(a.value),m.current=h}),onKeyDown:P(e.onKeyDown,g=>{const w={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];h&&g.key===w&&(a.onEntryKeyDown(),g.preventDefault())})})})}),h&&p.jsxs(p.Fragment,{children:[p.jsx(zs,{"aria-hidden":!0,tabIndex:0,ref:a.focusProxyRef,onFocus:g=>{const v=a.contentRef.current,w=g.relatedTarget,x=w===c.current,C=v?.contains(w);(x||!C)&&a.onFocusProxyEnter(x?"start":"end")}}),s.viewport&&p.jsx("span",{"aria-owns":u})]})]})});pa.displayName=to;var Cv="NavigationMenuLink",Lr="navigationMenu.linkSelect",va=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:o,onSelect:r,...s}=e;return p.jsx(xa,{asChild:!0,children:p.jsx(I.a,{"data-active":o?"":void 0,"aria-current":o?"page":void 0,...s,ref:t,onClick:P(e.onClick,a=>{const c=a.target,l=new CustomEvent(Lr,{bubbles:!0,cancelable:!0});if(c.addEventListener(Lr,f=>r?.(f),{once:!0}),Gt(c,l),!l.defaultPrevented&&!a.metaKey){const f=new CustomEvent(Wt,{bubbles:!0,cancelable:!0});Gt(c,f)}},{checkForDefaultPrevented:!1})})})});va.displayName=Cv;var Uo="NavigationMenuIndicator",bv=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=le(Uo,e.__scopeNavigationMenu),s=!!r.value;return r.indicatorTrack?zr.createPortal(p.jsx(q,{present:n||s,children:p.jsx(Sv,{...o,ref:t})}),r.indicatorTrack):null});bv.displayName=Uo;var Sv=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=le(Uo,n),s=ra(n),[a,c]=i.useState(null),[l,f]=i.useState(null),u=r.orientation==="horizontal",d=!!r.value;i.useEffect(()=>{const g=s().find(v=>v.value===r.value)?.ref.current;g&&c(g)},[s,r.value]);const m=()=>{a&&f({size:u?a.offsetWidth:a.offsetHeight,offset:u?a.offsetLeft:a.offsetTop})};return oo(a,m),oo(r.indicatorTrack,m),l?p.jsx(I.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":r.orientation,...o,ref:t,style:{position:"absolute",...u?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...o.style}}):null}),Je="NavigationMenuContent",ma=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=le(Je,e.__scopeNavigationMenu),s=da(Je,e.__scopeNavigationMenu),a=V(s.contentRef,t),c=s.value===r.value,l={value:s.value,triggerRef:s.triggerRef,focu
45sProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...o};return r.viewport?p.jsx(Rv,{forceMount:n,...l,ref:a}):p.jsx(q,{present:n||c,children:p.jsx(ha,{"data-state":Xo(c),...l,ref:a,onPointerEnter:P(e.onPointerEnter,r.onContentEnter),onPointerLeave:P(e.onPointerLeave,Zt(r.onContentLeave)),style:{pointerEvents:!c&&r.isRootMenu?"none":void 0,...l.style}})})});ma.displayName=Je;var Rv=i.forwardRef((e,t)=>{const n=le(Je,e.__scopeNavigationMenu),{onViewportContentChange:o,onViewportContentRemove:r}=n;return Y(()=>{o(e.value,{ref:t,...e})},[e,t,o]),Y(()=>()=>r(e.value),[e.value,r]),null}),Wt="navigationMenu.rootContentDismiss",ha=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,triggerRef:r,focusProxyRef:s,wasEscapeCloseRef:a,onRootContentClose:c,onContentFocusOutside:l,...f}=e,u=le(Je,n),d=i.useRef(null),m=V(d,t),h=ya(u.baseId,o),g=Ca(u.baseId,o),v=ra(n),w=i.useRef(null),{onItemDismiss:x}=u;i.useEffect(()=>{const y=d.current;if(u.isRootMenu&&y){const b=()=>{x(),c(),y.contains(document.activeElement)&&r.current?.focus()};return y.addEventListener(Wt,b),()=>y.removeEventListener(Wt,b)}},[u.isRootMenu,e.value,r,x,c]);const C=i.useMemo(()=>{const b=v().map(D=>D.value);u.dir==="rtl"&&b.reverse();const S=b.indexOf(u.value),E=b.indexOf(u.previousValue),R=o===u.value,M=E===b.indexOf(o);if(!R&&!M)return w.current;const _=(()=>{if(S!==E){if(R&&E!==-1)return S>E?"from-end":"from-start";if(M&&S!==-1)return S>E?"to-start":"to-end"}return null})();return w.current=_,_},[u.previousValue,u.value,u.dir,v,o]);return p.jsx(wa,{asChild:!0,children:p.jsx(Ge,{id:g,"aria-labelledby":h,"data-motion":C,"data-orientation":u.orientation,...f,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{const y=new Event(Wt,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(y)},onFocusOutside:P(e.onFocusOutside,y=>{l();const b=y.target;u.rootNavigationMenu?.contains(b)&&y.preventDefault()}),onPointerDownOutside:P(e.onPointerDownOutside,y=>{const b=y.target,S=v().some(R=>R.ref.current?.contains(b)),E=u.isRootMenu&&u.viewport?.contains(b);(S||E||!u.isRootMenu)&&y.preventDefault()}),onKeyDown:P(e.onKeyDown,y=>{const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const E=no(y.currentTarget),R=document.activeElement,M=E.findIndex(j=>j===R),D=y.shiftKey?E.slice(0,M).reverse():E.slice(M+1,E.length);Yo(D)?y.preventDefault():s.current?.focus()}}),onEscapeKeyDown:P(e.onEscapeKeyDown,y=>{a.current=!0})})})}),zo="NavigationMenuViewport",ga=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,s=!!le(zo,e.__scopeNavigationMenu).value;return p.jsx(q,{present:n||s,children:p.jsx(Ev,{...o,ref:t})})});ga.displayName=zo;var Ev=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:o,...r}=e,s=le(zo,n),a=V(t,s.onViewportChange),c=wv(Je,e.__scopeNavigationMenu),[l,f]=i.useState(null),[u,d]=i.useState(null),m=l?l?.width+"px":void 0,h=l?l?.height+"px":void 0,g=!!s.value,v=g?s.value:s.previousValue;return oo(u,()=>{u&&f({width:u.offsetWidth,height:u.offsetHeight})}),p.jsx(I.div,{"data-state":Xo(g),"data-orientation":s.orientation,...r,ref:a,style:{pointerEvents:!g&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":h,...r.style},onPointerEnter:P(e.onPointerEnter,s.onContentEnter),onPointerLeave:P(e.onPointerLeave,Zt(s.onContentLeave)),children:Array.from(c.items).map(([x,{ref:C,forceMount:y,...b}])=>{const S=v===x;return p.jsx(q,{present:y||S,children:p.jsx(ha,{...b,ref:ve(C,E=>{S&&E&&d(E)})})},x)})})}),Pv="FocusGroup",wa=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=le(Pv,n);return p.jsx(eo.Provider,{scope:n,children:p.jsx(eo.Slot,{scope:n,children:p.jsx(I.div,{dir:r.dir,...o,ref:t})})})}),Fr=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Mv="FocusGroupItem",xa=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,r=vv(n),s=le(Mv,n);return p.jsx(eo.ItemSlot,{scope:n,children:p.jsx(I.button,{...o,ref:t,onKeyDown:P(e.onKeyDown,a=>{if(["Home","End",...Fr].includes(a.key)){let l=r().map(d=>d.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(a.key)&&l.reverse(),Fr.includes(a.key)){const d=l.indexOf(a.currentTarget);l=l.slice(d+1)}setTimeout(()=>Yo(l)),a.preventDefault()}})})})});function no(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yo(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Tv(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function oo(e,t){const n=z(t);Y(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}function Xo(e){return e?"open":"closed"}function ya(e,t){return`${e}-trigger-${t}`}function Ca(e,t){return`${e}-content-${t}`}function Zt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zg=sa,Yg=la,Xg=fa,qg=pa,Zg=va,Qg=ma,Jg=ga,ba=i.forwardRef((e,t)=>
45{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(Av);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(ro,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(ro,{...o,ref:t,children:n})});ba.displayName="Slot";var ro=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=Nv(n),s=_v(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});ro.displayName="SlotClone";var Iv=({children:e})=>p.jsx(p.Fragment,{children:e});function Av(e){return i.isValidElement(e)&&e.type===Iv}function _v(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Nv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qo="Popover",[Sa,ew]=J(qo,[Ne]),Tt=Ne(),[Ov,De]=Sa(qo),Ra=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,c=Tt(t),l=i.useRef(null),[f,u]=i.useState(!1),[d=!1,m]=Q({prop:o,defaultProp:r,onChange:s});return p.jsx(Ct,{...c,children:p.jsx(Ov,{scope:t,contentId:Z(),triggerRef:l,open:d,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:f,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:n})})};Ra.displayName=qo;var Ea="PopoverAnchor",Pa=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=De(Ea,n),s=Tt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return i.useEffect(()=>(a(),()=>c()),[a,c]),p.jsx(bt,{...s,...o,ref:t})});Pa.displayName=Ea;var Ma="PopoverTrigger",Ta=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=De(Ma,n),s=Tt(n),a=V(t,r.triggerRef),c=p.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Oa(r.open),...o,ref:a,onClick:P(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(bt,{asChild:!0,...s,children:c})});Ta.displayName=Ma;var Zo="PopoverPortal",[Dv,jv]=Sa(Zo,{forceMount:void 0}),Ia=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=De(Zo,t);return p.jsx(Dv,{scope:t,forceMount:n,children:p.jsx(q,{present:n||s.open,children:p.jsx(tt,{asChild:!0,container:r,children:o})})})};Ia.displayName=Zo;var et="PopoverContent",Aa=i.forwardRef((e,t)=>{const n=jv(et,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=De(et,e.__scopePopover);return p.jsx(q,{present:o||s.open,children:s.modal?p.jsx($v,{...r,ref:t}):p.jsx(kv,{...r,ref:t})})});Aa.displayName=et;var $v=i.forwardRef((e,t)=>{const n=De(et,e.__scopePopover),o=i.useRef(null),r=V(t,o),s=i.useRef(!1);return i.useEffect(()=>{const a=o.current;if(a)return rn(a)},[]),p.jsx(xt,{as:ba,allowPinchZoom:!0,children:p.jsx(_a,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),kv=i.forwardRef((e,t)=>{const n=De(et,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(_a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),_a=i.forwardRef((e,t)=>
45{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:u,...d}=e,m=De(et,n),h=Tt(n);return nn(),p.jsx(wt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ge,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:f,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(un,{"data-state":Oa(m.open),role:"dialog",id:m.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Na="PopoverClose",Lv=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=De(Na,n);return p.jsx(I.button,{type:"button",...o,ref:t,onClick:P(e.onClick,()=>r.onOpenChange(!1))})});Lv.displayName=Na;var Fv="PopoverArrow",Vv=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Tt(n);return p.jsx(dn,{...r,...o,ref:t})});Vv.displayName=Fv;function Oa(e){return e?"open":"closed"}var tw=Ra,nw=Pa,ow=Ta,rw=Ia,sw=Aa;function Vr(e,[t,n]){return Math.min(n,Math.max(t,e))}var Da=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(Wv);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return p.jsx(so,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return p.jsx(so,{...o,ref:t,children:n})});Da.displayName="Slot";var so=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=Hv(n),s=Gv(o,n.props);return n.type!==i.Fragment&&(s.ref=t?ve(t,r):r),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});so.displayName="SlotClone";var Bv=({children:e})=>p.jsx(p.Fragment,{children:e});function Wv(e){return i.isValidElement(e)&&e.type===Bv}function Gv(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Hv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kv=[" ","Enter","ArrowUp","ArrowDown"],Uv=[" ","Enter"],It="Select",[gn,wn,zv]=Rt(It),[at,iw]=J(It,[zv,Ne]),xn=Ne(),[Yv,je]=at(It),[Xv,qv]=at(It),ja=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:f,name:u,autoComplete:d,disabled:m,required:h,form:g}=e,v=xn(t),[w,x]=i.useState(null),[C,y]=i.useState(null),[b,S]=i.useState(!1),E=rt(f),[R=!1,M]=Q({prop:o,defaultProp:r,onChange:s}),[_,D]=Q({prop:a,defaultProp:c,onChange:l}),j=i.useRef(null),$=w?g||!!w.closest("form"):!0,[L,k]=i.useState(new Set),B=Array.from(L).map(O=>O.props.value).join(";");return p.jsx(Ct,{...v,children:p.jsxs(Yv,{required:h,scope:t,trigger:w,onTriggerChange:x,valueNode:C,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:Z(),value:_,onValueChange:D,open:R,onOpenChange:M,dir:E,triggerPointerDownPosRef:j,disabled:m,children:[p.jsx(gn.Provider,{scope:t,children:p.jsx(Xv,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(O=>{k(F=>new Set(F).add(O))},[]),onNativeOptionRemove:i.useCallback(O=>{k(F=>{const N=new Set(F);return N.delete(O),N})},[]),children:n})}),$?p.jsxs(ac,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:_,onChange:O=>D(O.target.value),disabled:m,form:g,children:[_===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};ja.displayName=It;var $a="SelectTrigger",ka=i.forwardRef((e,t)=>
45{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=xn(n),a=je($a,n),c=a.disabled||o,l=V(t,a.onTriggerChange),f=wn(n),u=i.useRef("touch"),[d,m,h]=cc(v=>{const w=f().filter(y=>!y.disabled),x=w.find(y=>y.value===a.value),C=lc(w,v,x);C!==void 0&&a.onValueChange(C.value)}),g=v=>{c||(a.onOpenChange(!0),h()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(bt,{asChild:!0,...s,children:p.jsx(I.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":ic(a.value)?"":void 0,...r,ref:l,onClick:P(r.onClick,v=>{v.currentTarget.focus(),u.current!=="mouse"&&g(v)}),onPointerDown:P(r.onPointerDown,v=>{u.current=v.pointerType;const w=v.target;w.hasPointerCapture(v.pointerId)&&w.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:P(r.onKeyDown,v=>{const w=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(w&&v.key===" ")&&Kv.includes(v.key)&&(g(),v.preventDefault())})})})});ka.displayName=$a;var La="SelectValue",Fa=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=je(La,n),{onValueNodeHasChildrenChange:f}=l,u=s!==void 0,d=V(t,l.onValueNodeChange);return Y(()=>{f(u)},[f,u]),p.jsx(I.span,{...c,ref:d,style:{pointerEvents:"none"},children:ic(l.value)?p.jsx(p.Fragment,{children:a}):s})});Fa.displayName=La;var Zv="SelectIcon",Va=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return p.jsx(I.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Va.displayName=Zv;var Qv="SelectPortal",Ba=e=>p.jsx(tt,{asChild:!0,...e});Ba.displayName=Qv;var Be="SelectContent",Wa=i.forwardRef((e,t)=>{const n=je(Be,e.__scopeSelect),[o,r]=i.useState();if(Y(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?tn.createPortal(p.jsx(Ga,{scope:e.__scopeSelect,children:p.jsx(gn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Ha,{...e,ref:t})});Wa.displayName=Be;var de=10,[Ga,$e]=at(Be),Jv="SelectContentImpl",Ha=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:f,alignOffset:u,arrowPadding:d,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:w,...x}=e,C=je(Be,n),[y,b]=i.useState(null),[S,E]=i.useState(null),R=V(t,A=>b(A)),[M,_]=i.useState(null),[D,j]=i.useState(null),$=wn(n),[L,k]=i.useState(!1),B=i.useRef(!1);i.useEffect(()=>{if(y)return rn(y)},[y]),nn();const O=i.useCallback(A=>{const[G,...ne]=$().map(X=>X.ref.current),[H]=ne.slice(-1),K=document.activeElement;for(const X of A)if(X===K||(X?.scrollIntoView({block:"nearest"}),X===G&&S&&(S.scrollTop=0),X===H&&S&&(S.scrollTop=S.scrollHeight),X?.focus(),document.activeElement!==K))return},[$,S]),F=i.useCallback(()=>O([M,y]),[O,M,y]);i.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:N,triggerPointerDownPosRef:T}=C;i.useEffect(()=>{if(y){let A={x:0,y:0};const G=H=>{A={x:Math.abs(Math.round(H.pageX)-(T.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(T.current?.y??0))}},ne=H=>{A.x<=10&&A.y<=10?H.preventDefault():y.contains(H.target)||N(!1),document.removeEventListener("pointermove",G),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",ne,{capture:!0})}}},[y,N,T]),i.useEffect(()=>{const A=()=>N(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[N]);const[U,te]=cc(A=>{const G=$().filter(K=>!K.disabled),ne=G.find(K=>K.ref.current===document.activeElement),H=lc(G,A,ne);H&&setTimeout(()=>H.ref.current.focus())}),ue=i.useCallback((A,G,ne)=>{const H=!B.current&&!ne;(C.value!==void 0&&C.value===G||H)&&(_(A),H&&(B.current=!0))},[C.value]),ye=i.useCallback(()=>y?.focus(),[y]),ie=i.useCallback((A,G,ne)=>{const H=!B.current&&!ne;(C.value!==void 0&&C.value===G||H)&&j(A)},[C.value]),Ce=o==="popper"?io:Ka,oe=Ce===io?{side:c,sideOffset:l,align:f,alignOffset:u,arrowPadding:d,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:w}:{};return p.jsx(Ga,{scope:n,content:y,viewport:S,onViewportChange:E,itemRefCallback:ue,selectedItem:M,onItemLeave:ye,itemTextRefCallback:ie,focu
45sSelectedItem:F,selectedItemText:D,position:o,isPositioned:L,searchRef:U,children:p.jsx(xt,{as:Da,allowPinchZoom:!0,children:p.jsx(wt,{asChild:!0,trapped:C.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:P(r,A=>{C.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:p.jsx(Ge,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:p.jsx(Ce,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:A=>A.preventDefault(),...x,...oe,onPlaced:()=>k(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:P(x.onKeyDown,A=>{const G=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!G&&A.key.length===1&&te(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let H=$().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(A.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const K=A.target,X=H.indexOf(K);H=H.slice(X+1)}setTimeout(()=>O(H)),A.preventDefault()}})})})})})})});Ha.displayName=Jv;var em="SelectItemAlignedPosition",Ka=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=je(Be,n),a=$e(Be,n),[c,l]=i.useState(null),[f,u]=i.useState(null),d=V(t,R=>u(R)),m=wn(n),h=i.useRef(!1),g=i.useRef(!0),{viewport:v,selectedItem:w,selectedItemText:x,focusSelectedItem:C}=a,y=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&f&&v&&w&&x){const R=s.trigger.getBoundingClientRect(),M=f.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),D=x.getBoundingClientRect();if(s.dir!=="rtl"){const K=D.left-M.left,X=_.left-K,ae=R.left-X,ke=R.width+ae,Rn=Math.max(ke,M.width),En=window.innerWidth-de,Pn=Vr(X,[de,Math.max(de,En-Rn)]);c.style.minWidth=ke+"px",c.style.left=Pn+"px"}else{const K=M.right-D.right,X=window.innerWidth-_.right-K,ae=window.innerWidth-R.right-X,ke=R.width+ae,Rn=Math.max(ke,M.width),En=window.innerWidth-de,Pn=Vr(X,[de,Math.max(de,En-Rn)]);c.style.minWidth=ke+"px",c.style.right=Pn+"px"}const j=m(),$=window.innerHeight-de*2,L=v.scrollHeight,k=window.getComputedStyle(f),B=parseInt(k.borderTopWidth,10),O=parseInt(k.paddingTop,10),F=parseInt(k.borderBottomWidth,10),N=parseInt(k.paddingBottom,10),T=B+O+L+N+F,U=Math.min(w.offsetHeight*5,T),te=window.getComputedStyle(v),ue=parseInt(te.paddingTop,10),ye=parseInt(te.paddingBottom,10),ie=R.top+R.height/2-de,Ce=$-ie,oe=w.offsetHeight/2,A=w.offsetTop+oe,G=B+O+A,ne=T-G;if(G<=ie){const K=j.length>0&&w===j[j.length-1].ref.current;c.style.bottom="0px";const X=f.clientHeight-v.offsetTop-v.offsetHeight,ae=Math.max(Ce,oe+(K?ye:0)+X+F),ke=G+ae;c.style.height=ke+"px"}else{const K=j.length>0&&w===j[0].ref.current;c.style.top="0px";const ae=Math.max(ie,B+v.offsetTop+(K?ue:0)+oe)+ne;c.style.height=ae+"px",v.scrollTop=G-ie+v.offsetTop}c.style.margin=`${de}px 0`,c.style.minHeight=U+"px",c.style.maxHeight=$+"px",o?.(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,c,f,v,w,x,s.dir,o]);Y(()=>y(),[y]);const[b,S]=i.useState();Y(()=>{f&&S(window.getComputedStyle(f).zIndex)},[f]);const E=i.useCallback(R=>{R&&g.current===!0&&(y(),C?.(),g.current=!1)},[y,C]);return p.jsx(nm,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:p.jsx(I.div,{...r,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Ka.displayName=em;var tm="SelectPopperPosition",io=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=de,...s}=e,a=xn(n);return p.jsx(un,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});io.displayName=tm;var[nm,Qo]=at(Be,{}),ao="SelectViewport",Ua=i.forwardRef((e,t)=>
45{const{__scopeSelect:n,nonce:o,...r}=e,s=$e(ao,n),a=Qo(ao,n),c=V(t,s.onViewportChange),l=i.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(gn.Slot,{scope:n,children:p.jsx(I.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,f=>{const u=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=a;if(m?.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const g=window.innerHeight-de*2,v=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),x=Math.max(v,w);if(x<g){const C=x+h,y=Math.min(g,C),b=C-y;d.style.height=y+"px",d.style.bottom==="0px"&&(u.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Ua.displayName=ao;var za="SelectGroup",[om,rm]=at(za),Ya=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Z();return p.jsx(om,{scope:n,id:r,children:p.jsx(I.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Ya.displayName=za;var Xa="SelectLabel",qa=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=rm(Xa,n);return p.jsx(I.div,{id:r.id,...o,ref:t})});qa.displayName=Xa;var Qt="SelectItem",[sm,Za]=at(Qt),Qa=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=je(Qt,n),l=$e(Qt,n),f=c.value===o,[u,d]=i.useState(s??""),[m,h]=i.useState(!1),g=V(t,C=>l.itemRefCallback?.(C,o,r)),v=Z(),w=i.useRef("touch"),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(sm,{scope:n,value:o,disabled:r,textId:v,isSelected:f,onItemTextChange:i.useCallback(C=>{d(y=>y||(C?.textContent??"").trim())},[]),children:p.jsx(gn.ItemSlot,{scope:n,value:o,disabled:r,textValue:u,children:p.jsx(I.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:g,onFocus:P(a.onFocus,()=>h(!0)),onBlur:P(a.onBlur,()=>h(!1)),onClick:P(a.onClick,()=>{w.current!=="mouse"&&x()}),onPointerUp:P(a.onPointerUp,()=>{w.current==="mouse"&&x()}),onPointerDown:P(a.onPointerDown,C=>{w.current=C.pointerType}),onPointerMove:P(a.onPointerMove,C=>{w.current=C.pointerType,r?l.onItemLeave?.():w.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(a.onPointerLeave,C=>{C.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:P(a.onKeyDown,C=>{l.searchRef?.current!==""&&C.key===" "||(Uv.includes(C.key)&&x(),C.key===" "&&C.preventDefault())})})})})});Qa.displayName=Qt;var ft="SelectItemText",Ja=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=je(ft,n),c=$e(ft,n),l=Za(ft,n),f=qv(ft,n),[u,d]=i.useState(null),m=V(t,x=>d(x),l.onItemTextChange,x=>c.itemTextRefCallback?.(x,l.value,l.disabled)),h=u?.textContent,g=i.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:w}=f;return Y(()=>(v(g),()=>w(g)),[v,w,g]),p.jsxs(p.Fragment,{children:[p.jsx(I.span,{id:l.textId,...s,ref:m}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?tn.createPortal(s.children,a.valueNode):null]})});Ja.displayName=ft;var ec="SelectItemIndicator",tc=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Za(ec,n).isSelected?p.jsx(I.span,{"aria-hidden":!0,...o,ref:t}):null});tc.displayName=ec;var co="SelectScrollUpButton",nc=i.forwardRef((e,t)=>{const n=$e(co,e.__scopeSelect),o=Qo(co,e.__scopeSelect),[r,s]=i.useState(!1),a=V(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=l.scrollTop>0;s(f)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(rc,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});nc.displayName=co;var lo="SelectScrollDownButton",oc=i.forwardRef((e,t)=>
45{const n=$e(lo,e.__scopeSelect),o=Qo(lo,e.__scopeSelect),[r,s]=i.useState(!1),a=V(t,o.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<f;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(rc,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});oc.displayName=lo;var rc=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=$e("SelectScrollButton",n),a=i.useRef(null),c=wn(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),Y(()=>{c().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),p.jsx(I.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:P(r.onPointerLeave,()=>{l()})})}),im="SelectSeparator",sc=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return p.jsx(I.div,{"aria-hidden":!0,...o,ref:t})});sc.displayName=im;var uo="SelectArrow",am=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=xn(n),s=je(uo,n),a=$e(uo,n);return s.open&&a.position==="popper"?p.jsx(dn,{...r,...o,ref:t}):null});am.displayName=uo;function ic(e){return e===""||e===void 0}var ac=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),s=V(t,r),a=Go(n);return i.useEffect(()=>{const c=r.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&u){const d=new Event("change",{bubbles:!0});u.call(c,n),c.dispatchEvent(d)}},[a,n]),p.jsx(To,{asChild:!0,children:p.jsx("select",{...o,ref:s,defaultValue:n})})});ac.displayName="BubbleSelect";function cc(e){const t=z(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),function l(f){n.current=f,window.clearTimeout(o.current),f!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function lc(e,t,n){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=cm(e,Math.max(s,0));r.length===1&&(a=a.filter(f=>f!==n));const l=a.find(f=>f.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function cm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var aw=ja,cw=ka,lw=Fa,uw=Va,dw=Ba,fw=Wa,pw=Ua,vw=Ya,mw=qa,hw=Qa,gw=Ja,ww=tc,xw=nc,yw=oc,Cw=sc,Jo="Tabs",[lm,bw]=J(Jo,[st]),uc=st(),[um,er]=lm(Jo),dc=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:l="automatic",...f}=e,u=rt(c),[d,m]=Q({prop:o,onChange:r,defaultProp:s});return p.jsx(um,{scope:n,baseId:Z(),value:d,onValueChange:m,orientation:a,dir:u,activationMode:l,children:p.jsx(I.div,{dir:u,"data-orientation":a,...f,ref:t})})});dc.displayName=Jo;var fc="TabsList",pc=i.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=er(fc,n),a=uc(n);return p.jsx(No,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(I.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});pc.displayName=fc;var vc="TabsTrigger",mc=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,a=er(vc,n),c=uc(n),l=wc(a.baseId,o),f=xc(a.baseId,o),u=o===a.value;return p.jsx(Oo,{asChild:!0,...c,focusable:!r,active:u,children:p.jsx(I.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:P(e.onMouseDown,d=>{!r&&d.button===0&&d.ctrlKey===!1?a.onValueChange(o):d.preventDefault()}),onKeyDown:P(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(o)}),onFocus:P(e.onFocus,()=>{const d=a.activationMode!=="manual";!u&&!r&&d&&a.onValueChange(o)})})})});mc.displayName=vc;var hc="TabsContent",gc=i.forwardRef((e,t)=>
45{const{__scopeTabs:n,value:o,forceMount:r,children:s,...a}=e,c=er(hc,n),l=wc(c.baseId,o),f=xc(c.baseId,o),u=o===c.value,d=i.useRef(u);return i.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(q,{present:r||u,children:({present:m})=>p.jsx(I.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:f,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:m&&s})})});gc.displayName=hc;function wc(e,t){return`${e}-trigger-${t}`}function xc(e,t){return`${e}-content-${t}`}var Sw=dc,Rw=pc,Ew=mc,Pw=gc,tr="Checkbox",[dm,Mw]=J(tr),[fm,pm]=dm(tr),yc=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:f,form:u,...d}=e,[m,h]=i.useState(null),g=V(t,b=>h(b)),v=i.useRef(!1),w=m?u||!!m.closest("form"):!0,[x=!1,C]=Q({prop:r,defaultProp:s,onChange:f}),y=i.useRef(x);return i.useEffect(()=>{const b=m?.form;if(b){const S=()=>C(y.current);return b.addEventListener("reset",S),()=>b.removeEventListener("reset",S)}},[m,C]),p.jsxs(fm,{scope:n,state:x,disabled:c,children:[p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":Me(x)?"mixed":x,"aria-required":a,"data-state":Sc(x),"data-disabled":c?"":void 0,disabled:c,value:l,...d,ref:g,onKeyDown:P(e.onKeyDown,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:P(e.onClick,b=>{C(S=>Me(S)?!0:!S),w&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),w&&p.jsx(vm,{control:m,bubbles:!v.current,name:o,value:l,checked:x,required:a,disabled:c,form:u,style:{transform:"translateX(-100%)"},defaultChecked:Me(s)?!1:s})]})});yc.displayName=tr;var Cc="CheckboxIndicator",bc=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=pm(Cc,n);return p.jsx(q,{present:o||Me(s.state)||s.state===!0,children:p.jsx(I.span,{"data-state":Sc(s.state),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});bc.displayName=Cc;var vm=e=>{const{control:t,checked:n,bubbles:o=!0,defaultChecked:r,...s}=e,a=i.useRef(null),c=Go(n),l=$s(t);i.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const g=new Event("click",{bubbles:o});u.indeterminate=Me(n),h.call(u,Me(n)?!1:n),u.dispatchEvent(g)}},[c,n,o]);const f=i.useRef(Me(n)?!1:n);return p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r??f.current,...s,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Me(e){return e==="indeterminate"}function Sc(e){return Me(e)?"indeterminate":e?"checked":"unchecked"}var Tw=yc,Iw=bc;function Rc(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Br(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mm(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Br(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Br(e[r],null)}}}}function _e(...e){return i.useCallback(mm(...e),e)}function Ec(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const f=d=>{const{scope:m,children:h,...g}=d,v=m?.[e]?.[l]||c,w=i.useMemo(()=>g,Object.values(g));return p.jsx(v.Provider,{value:w,children:h})};f.displayName=s+"Provider";function u(d,m){const h=m?.[e]?.[l]||c,g=i.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,hm(r,...t)]}function hm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:f})=>{const d=l(s)[`__scope${f}`];return{...c,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}
45),[a])}};return n.scopeName=t.scopeName,n}var Pc=globalThis?.document?i.useLayoutEffect:()=>{},gm=gt[" useInsertionEffect ".trim().toString()]||Pc;function wm({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=xm({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const f=i.useCallback(u=>{if(c){const d=ym(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[c,e,s,a]);return[l,f]}function xm({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return gm(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function ym(e){return typeof e=="function"}var Cm=i.createContext(void 0);function bm(e){const t=i.useContext(Cm);return e||t||"ltr"}function Sm(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Rm(e){const[t,n]=i.useState(void 0);return Pc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Em=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=Em.reduce((e,t)=>{const n=Te(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Pm(e){const t=e+"CollectionProvider",[n,o]=Ec(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:w,children:x}=v,C=W.useRef(null),y=W.useRef(new Map).current;return p.jsx(r,{scope:w,itemMap:y,collectionRef:C,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=Te(c),f=W.forwardRef((v,w)=>{const{scope:x,children:C}=v,y=s(c,x),b=_e(w,y.collectionRef);return p.jsx(l,{ref:b,children:C})});f.displayName=c;const u=e+"CollectionItemSlot",d="data-radix-collection-item",m=Te(u),h=W.forwardRef((v,w)=>{const{scope:x,children:C,...y}=v,b=W.useRef(null),S=_e(w,b),E=s(u,x);return W.useEffect(()=>(E.itemMap.set(b,{ref:b,...y}),()=>void E.itemMap.delete(b))),p.jsx(m,{[d]:"",ref:S,children:C})});h.displayName=u;function g(v){const w=s(e+"CollectionConsumer",v);return W.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const y=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,R)=>y.indexOf(E.ref.current)-y.indexOf(R.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:f,ItemSlot:h},g,o]}var Mc=["PageUp","PageDown"],Tc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ic={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ct="Slider",[fo,Mm,Tm]=Pm(ct),[Ac,Aw]=Ec(ct,[Tm]),[Im,yn]=Ac(ct),_c=i.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:s=1,orientation:a="horizontal",disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:f=[o],value:u,onValueChange:d=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,...v}=e,w=i.useRef(new Set),x=i.useRef(0),y=a==="horizontal"?Am:_m,[b=[],S]=wm({prop:u,defaultProp:f,onChange:j=>{[...w.current][x.current]?.focus(),d(j)}}),E=i.useRef(b);function R(j){const $=$m(b,j);D(j,$)}function M(j){D(j,x.current)}function _(){const j=E.current[x.current];b[x.current]!==j&&m(b)}function D(j,$,{commit:L}={commit:!1}){const k=Vm(s),B=Bm(Math.round((j-o)/s)*s+o,k),O=Rc(B,[o,r]);S((F=[])=>{const N=Dm(F,O,$);if(Fm(N,l*s)){x.current=N.indexOf(O);const T=String(N)!==String(F);return T&&L&&m(N),T?N:F}else return F})}return p.jsx(Im,{scope:e.__scopeSlider,name:n,disabled:c,min:o,max:r,valueIndexToChangeRef:x,thumbs:w.current,values:b,orientation:a,form:g,children:p.jsx(fo.Provider,{scope:e.__scopeSlider,children:p.jsx(fo.Slot,{scope:e.__scopeSlider,children:p.jsx(y,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:t,onPointerDown:Ye(v.onPointerDown,()=>{c||(E.current=b)}),min:o,max:r,inverted:h,onSlideStart:c?void 0:R,onSlideMove:c?void 0:M,onSlideEnd:c?void 0:_,onHomeKeyDown:()=>!c&&D(o,0,{commit:!0}),onEndKeyDown:()=>!c&&D(r,b.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:$})=>{if(!c){const B=Mc.includes(j.key)||j.shiftKey&&Tc.includes(j.key)?10:1,O=x.current,F=b[O],N=s*B*$;D(F+N,O,{commit:!0})}}})})})})});_c.displayName=ct;var[Nc,Oc]=Ac(ct,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Am=i.forwardRef((e,t)=>
45{const{min:n,max:o,dir:r,inverted:s,onSlideStart:a,onSlideMove:c,onSlideEnd:l,onStepKeyDown:f,...u}=e,[d,m]=i.useState(null),h=_e(t,y=>m(y)),g=i.useRef(void 0),v=bm(r),w=v==="ltr",x=w&&!s||!w&&s;function C(y){const b=g.current||d.getBoundingClientRect(),S=[0,b.width],R=nr(S,x?[n,o]:[o,n]);return g.current=b,R(y-b.left)}return p.jsx(Nc,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:p.jsx(Dc,{dir:v,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const b=C(y.clientX);a?.(b)},onSlideMove:y=>{const b=C(y.clientX);c?.(b)},onSlideEnd:()=>{g.current=void 0,l?.()},onStepKeyDown:y=>{const S=Ic[x?"from-left":"from-right"].includes(y.key);f?.({event:y,direction:S?-1:1})}})})}),_m=i.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:s,onSlideMove:a,onSlideEnd:c,onStepKeyDown:l,...f}=e,u=i.useRef(null),d=_e(t,u),m=i.useRef(void 0),h=!r;function g(v){const w=m.current||u.current.getBoundingClientRect(),x=[0,w.height],y=nr(x,h?[o,n]:[n,o]);return m.current=w,y(v-w.top)}return p.jsx(Nc,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:p.jsx(Dc,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const w=g(v.clientY);s?.(w)},onSlideMove:v=>{const w=g(v.clientY);a?.(w)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:v=>{const x=Ic[h?"from-bottom":"from-top"].includes(v.key);l?.({event:v,direction:x?-1:1})}})})}),Dc=i.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:s,onHomeKeyDown:a,onEndKeyDown:c,onStepKeyDown:l,...f}=e,u=yn(ct,n);return p.jsx(At.span,{...f,ref:t,onKeyDown:Ye(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(c(d),d.preventDefault()):Mc.concat(Tc).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ye(e.onPointerDown,d=>{const m=d.target;m.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(m)?m.focus():o(d)}),onPointerMove:Ye(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&r(d)}),onPointerUp:Ye(e.onPointerUp,d=>{const m=d.target;m.hasPointerCapture(d.pointerId)&&(m.releasePointerCapture(d.pointerId),s(d))})})}),jc="SliderTrack",$c=i.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=yn(jc,n);return p.jsx(At.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});$c.displayName=jc;var po="SliderRange",kc=i.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=yn(po,n),s=Oc(po,n),a=i.useRef(null),c=_e(t,a),l=r.values.length,f=r.values.map(m=>Vc(m,r.min,r.max)),u=l>1?Math.min(...f):0,d=100-Math.max(...f);return p.jsx(At.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:c,style:{...e.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}})});kc.displayName=po;var vo="SliderThumb",Lc=i.forwardRef((e,t)=>{const n=Mm(e.__scopeSlider),[o,r]=i.useState(null),s=_e(t,c=>r(c)),a=i.useMemo(()=>o?n().findIndex(c=>c.ref.current===o):-1,[n,o]);return p.jsx(Nm,{...e,ref:s,index:a})}),Nm=i.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...s}=e,a=yn(vo,n),c=Oc(vo,n),[l,f]=i.useState(null),u=_e(t,C=>f(C)),d=l?a.form||!!l.closest("form"):!0,m=Rm(l),h=a.values[o],g=h===void 0?0:Vc(h,a.min,a.max),v=jm(o,a.values.length),w=m?.[c.size],x=w?km(w,g,c.direction):0;return i.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${g}% + ${x}px)`},children:[p.jsx(fo.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(At.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...s,ref:u,style:h===void 0?{display:"none"}:e.style,onFocus:Ye(e.onFocus,()=>{a.valueIndexToChangeRef.current=o})})}),d&&p.jsx(Fc,{name:r??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},o)]})});Lc.displayName=vo;var Om="RadioBubbleInput",Fc=i.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=i.useRef(null),s=_e(r,o),a=Sm(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(c,t),c.dispatchEvent(d)}},[a,t]),p.jsx(At.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Fc.displayName=Om;function Dm(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,s)=>r-s)}function Vc(e,t,n){const s=100/(n-t)*(e-t);return Rc(s,[0,100])}function jm(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $m(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}
45function km(e,t,n){const o=e/2,s=nr([0,50],[0,o]);return(o-s(t)*n)*n}function Lm(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Fm(e,t){if(t>0){const n=Lm(e);return Math.min(...n)>=t}return!0}function nr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Vm(e){return(String(e).split(".")[1]||"").length}function Bm(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var _w=_c,Nw=$c,Ow=kc,Dw=Lc,or="Progress",rr=100,[Wm,jw]=J(or),[Gm,Hm]=Wm(or),Bc=i.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:r,getValueLabel:s=Km,...a}=e;(r||r===0)&&!Wr(r)&&console.error(Um(`${r}`,"Progress"));const c=Wr(r)?r:rr;o!==null&&!Gr(o,c)&&console.error(zm(`${o}`,"Progress"));const l=Gr(o,c)?o:null,f=Jt(l)?s(l,c):void 0;return p.jsx(Gm,{scope:n,value:l,max:c,children:p.jsx(I.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":Jt(l)?l:void 0,"aria-valuetext":f,role:"progressbar","data-state":Hc(l,c),"data-value":l??void 0,"data-max":c,...a,ref:t})})});Bc.displayName=or;var Wc="ProgressIndicator",Gc=i.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,r=Hm(Wc,n);return p.jsx(I.div,{"data-state":Hc(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...o,ref:t})});Gc.displayName=Wc;function Km(e,t){return`${Math.round(e/t*100)}%`}function Hc(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Jt(e){return typeof e=="number"}function Wr(e){return Jt(e)&&!isNaN(e)&&e>0}function Gr(e,t){return Jt(e)&&!isNaN(e)&&e<=t&&e>=0}function Um(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${rr}\`.`}function zm(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 46 - a positive number 47 - less than the value passed to \`max\` (or ${rr} if no \`max\` prop is set) 48 - \`null\` or \`undefined\` if the progress is indeterminate. 49 50Defaulting to \`null\`.`}var $w=Bc,kw=Gc,Ym="Toggle",Kc=i.forwardRef((e,t)=>
50{const{pressed:n,defaultPressed:o=!1,onPressedChange:r,...s}=e,[a=!1,c]=Q({prop:n,onChange:r,defaultProp:o});return p.jsx(I.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:P(e.onClick,()=>{e.disabled||c(!a)})})});Kc.displayName=Ym;var lt="ToggleGroup",[Uc,Lw]=J(lt,[st]),zc=st(),sr=W.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return p.jsx(Xm,{...r,ref:t})}if(n==="multiple"){const r=o;return p.jsx(qm,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${lt}\``)});sr.displayName=lt;var[Yc,Xc]=Uc(lt),Xm=W.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[a,c]=Q({prop:n,defaultProp:o,onChange:r});return p.jsx(Yc,{scope:e.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:c,onItemDeactivate:W.useCallback(()=>c(""),[c]),children:p.jsx(qc,{...s,ref:t})})}),qm=W.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[a=[],c]=Q({prop:n,defaultProp:o,onChange:r}),l=W.useCallback(u=>c((d=[])=>[...d,u]),[c]),f=W.useCallback(u=>c((d=[])=>d.filter(m=>m!==u)),[c]);return p.jsx(Yc,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:f,children:p.jsx(qc,{...s,ref:t})})});sr.displayName=lt;var[Zm,Qm]=Uc(lt),qc=W.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:s,dir:a,loop:c=!0,...l}=e,f=zc(n),u=rt(a),d={role:"group",dir:u,...l};return p.jsx(Zm,{scope:n,rovingFocus:r,disabled:o,children:r?p.jsx(No,{asChild:!0,...f,orientation:s,dir:u,loop:c,children:p.jsx(I.div,{...d,ref:t})}):p.jsx(I.div,{...d,ref:t})})}),en="ToggleGroupItem",Zc=W.forwardRef((e,t)=>{const n=Xc(en,e.__scopeToggleGroup),o=Qm(en,e.__scopeToggleGroup),r=zc(e.__scopeToggleGroup),s=n.value.includes(e.value),a=o.disabled||e.disabled,c={...e,pressed:s,disabled:a},l=W.useRef(null);return o.rovingFocus?p.jsx(Oo,{asChild:!0,...r,focusable:!a,active:s,ref:l,children:p.jsx(Hr,{...c,ref:t})}):p.jsx(Hr,{...c,ref:t})});Zc.displayName=en;var Hr=W.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,s=Xc(en,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=s.type==="single"?a:void 0;return p.jsx(Kc,{...c,...r,ref:t,onPressedChange:l=>{l?s.onItemActivate(o):s.onItemDeactivate(o)}})}),Fw=sr,Vw=Zc,ir="Collapsible",[Jm,Bw]=J(ir),[eh,ar]=Jm(ir),Qc=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:a,...c}=e,[l=!1,f]=Q({prop:o,defaultProp:r,onChange:a});return p.jsx(eh,{scope:n,disabled:s,contentId:Z(),open:l,onOpenToggle:i.useCallback(()=>f(u=>!u),[f]),children:p.jsx(I.div,{"data-state":lr(l),"data-disabled":s?"":void 0,...c,ref:t})})});Qc.displayName=ir;var Jc="CollapsibleTrigger",th=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ar(Jc,n);return p.jsx(I.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":lr(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:P(e.onClick,r.onOpenToggle)})});th.displayName=Jc;var cr="CollapsibleContent",nh=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ar(cr,e.__scopeCollapsible);return p.jsx(q,{present:n||r.open,children:({present:s})=>p.jsx(oh,{...o,ref:t,present:s})})});nh.displayName=cr;var oh=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,a=ar(cr,n),[c,l]=i.useState(o),f=i.useRef(null),u=V(t,f),d=i.useRef(0),m=d.current,h=i.useRef(0),g=h.current,v=a.open||c,w=i.useRef(v),x=i.useRef(void 0);return i.useEffect(()=>{const C=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(C)},[]),Y(()=>{const C=f.current;if(C){x.current=x.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const y=C.getBoundingClientRect();d.current=y.height,h.current=y.width,w.current||(C.style.transitionDuration=x.current.transitionDuration,C.style.animationName=x.current.animationName),l(o)}},[a.open,o]),p.jsx(I.div,{"data-state":lr(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&r})});function lr(e){return e?"open":"closed"}var Ww=Qc;function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Kr(e,t){if(typeof e=="function")return e(t);
50e!=null&&(e.current=t)}function rh(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Kr(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Kr(e[r],null)}}}}function We(...e){return i.useCallback(rh(...e),e)}function Cn(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const f=d=>{const{scope:m,children:h,...g}=d,v=m?.[e]?.[l]||c,w=i.useMemo(()=>g,Object.values(g));return p.jsx(v.Provider,{value:w,children:h})};f.displayName=s+"Provider";function u(d,m){const h=m?.[e]?.[l]||c,g=i.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,sh(r,...t)]}function sh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:f})=>{const d=l(s)[`__scope${f}`];return{...c,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ih=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ut=ih.reduce((e,t)=>{const n=Te(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function ah(e){const t=e+"CollectionProvider",[n,o]=Cn(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:w,children:x}=v,C=W.useRef(null),y=W.useRef(new Map).current;return p.jsx(r,{scope:w,itemMap:y,collectionRef:C,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=Te(c),f=W.forwardRef((v,w)=>{const{scope:x,children:C}=v,y=s(c,x),b=We(w,y.collectionRef);return p.jsx(l,{ref:b,children:C})});f.displayName=c;const u=e+"CollectionItemSlot",d="data-radix-collection-item",m=Te(u),h=W.forwardRef((v,w)=>{const{scope:x,children:C,...y}=v,b=W.useRef(null),S=We(w,b),E=s(u,x);return W.useEffect(()=>(E.itemMap.set(b,{ref:b,...y}),()=>void E.itemMap.delete(b))),p.jsx(m,{[d]:"",ref:S,children:C})});h.displayName=u;function g(v){const w=s(e+"CollectionConsumer",v);return W.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const y=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,R)=>y.indexOf(E.ref.current)-y.indexOf(R.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:f,ItemSlot:h},g,o]}var ht=globalThis?.document?i.useLayoutEffect:()=>{},ch=gt[" useId ".trim().toString()]||(()=>{}),lh=0;function uh(e){const[t,n]=i.useState(ch());return ht(()=>{n(o=>o??String(lh++))},[e]),t?`radix-${t}`:""}function dh(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}var fh=gt[" useInsertionEffect ".trim().toString()]||ht;function el({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=ph({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const f=i.useCallback(u=>{if(c){const d=vh(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[c,e,s,a]);return[l,f]}function ph({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return fh(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function vh(e){return typeof e=="function"}var mh=i.createContext(void 0);function tl(e){const t=i.useContext(mh);return e||t||"ltr"}var Ln="rovingFocusGroup.onEntryFocus",hh={bubbles:!1,cancelable:!0},_t="RovingFocusGroup",[mo,nl,gh]=ah(_t),[wh,ol]=Cn(_t,[gh]),[xh,yh]=wh(_t),rl=i.forwardRef((e,t)=>
50p.jsx(mo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(mo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ch,{...e,ref:t})})}));rl.displayName=_t;var Ch=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:f,preventScrollOnEntryFocus:u=!1,...d}=e,m=i.useRef(null),h=We(t,m),g=tl(s),[v,w]=el({prop:a,defaultProp:c??null,onChange:l,caller:_t}),[x,C]=i.useState(!1),y=dh(f),b=nl(n),S=i.useRef(!1),[E,R]=i.useState(0);return i.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(Ln,y),()=>M.removeEventListener(Ln,y)},[y]),p.jsx(xh,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:v,onItemFocus:i.useCallback(M=>w(M),[w]),onItemShiftTab:i.useCallback(()=>C(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(ut.div,{tabIndex:x||E===0?-1:0,"data-orientation":o,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{S.current=!0}),onFocus:be(e.onFocus,M=>{const _=!S.current;if(M.target===M.currentTarget&&_&&!x){const D=new CustomEvent(Ln,hh);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const j=b().filter(O=>O.focusable),$=j.find(O=>O.active),L=j.find(O=>O.id===v),B=[$,L,...j].filter(Boolean).map(O=>O.ref.current);al(B,u)}}S.current=!1}),onBlur:be(e.onBlur,()=>C(!1))})})}),sl="RovingFocusGroupItem",il=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=uh(),f=s||l,u=yh(sl,n),d=u.currentTabStopId===f,m=nl(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=u;return i.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),p.jsx(mo.ItemSlot,{scope:n,id:f,focusable:o,active:r,children:p.jsx(ut.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:be(e.onMouseDown,w=>{o?u.onItemFocus(f):w.preventDefault()}),onFocus:be(e.onFocus,()=>u.onItemFocus(f)),onKeyDown:be(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=Rh(w,u.orientation,u.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let y=m().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const b=y.indexOf(w.currentTarget);y=u.loop?Eh(y,b+1):y.slice(b+1)}setTimeout(()=>al(y))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:v!=null}):a})})});il.displayName=sl;var bh={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sh(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rh(e,t,n){const o=Sh(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return bh[o]}function al(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Eh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Ph=rl,Mh=il;function Th(e){const[t,n]=i.useState(void 0);return ht(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Ih(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ah(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var cl=e=>{const{present:t,children:n}=e,o=_h(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=We(o.ref,Nh(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};cl.displayName="Presence";function _h(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=Ah(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const f=Lt(o.current);s.current=c==="mounted"?f:"none"},[c]),ht(()=>{const f=o.current,u=r.current;if(u!==e){const m=s.current,h=Lt(f);e?l("MOUNT"):h==="none"||f?.display==="none"?l("UNMOUNT"):l(u&&m!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ht(()=>{if(t){let f;const u=t.ownerDocument.defaultView??window,d=h=>{const v=Lt(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(l("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=h=>{h.target===t&&(s.current=Lt(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(f=>{o.current=f?getComputedStyle(f):null,n(f)},[])}}function Lt(e){return e?.animationName||"none"}function Nh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ur="Radio",[Oh,ll]=Cn(ur),[Dh,jh]=Oh(ur),ul=i.forwardRef((e,t)=>
50{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:a,value:c="on",onCheck:l,form:f,...u}=e,[d,m]=i.useState(null),h=We(t,w=>m(w)),g=i.useRef(!1),v=d?f||!!d.closest("form"):!0;return p.jsxs(Dh,{scope:n,checked:r,disabled:a,children:[p.jsx(ut.button,{type:"button",role:"radio","aria-checked":r,"data-state":vl(r),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onClick:be(e.onClick,w=>{r||l?.(),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),v&&p.jsx(pl,{control:d,bubbles:!g.current,name:o,value:c,checked:r,required:s,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});ul.displayName=ur;var dl="RadioIndicator",fl=i.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=jh(dl,n);return p.jsx(cl,{present:o||s.checked,children:p.jsx(ut.span,{"data-state":vl(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});fl.displayName=dl;var $h="RadioBubbleInput",pl=i.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=We(a,s),l=Ih(n),f=Th(t);return i.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:o});h.call(u,n),u.dispatchEvent(g)}},[l,n,o]),p.jsx(ut.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});pl.displayName=$h;function vl(e){return e?"checked":"unchecked"}var kh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bn="RadioGroup",[Lh,Gw]=Cn(bn,[ol,ll]),ml=ol(),hl=ll(),[Fh,Vh]=Lh(bn),gl=i.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:a=!1,disabled:c=!1,orientation:l,dir:f,loop:u=!0,onValueChange:d,...m}=e,h=ml(n),g=tl(f),[v,w]=el({prop:s,defaultProp:r??null,onChange:d,caller:bn});return p.jsx(Fh,{scope:n,name:o,required:a,disabled:c,value:v,onValueChange:w,children:p.jsx(Ph,{asChild:!0,...h,orientation:l,dir:g,loop:u,children:p.jsx(ut.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":c?"":void 0,dir:g,...m,ref:t})})})});gl.displayName=bn;var wl="RadioGroupItem",xl=i.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=Vh(wl,n),a=s.disabled||o,c=ml(n),l=hl(n),f=i.useRef(null),u=We(t,f),d=s.value===r.value,m=i.useRef(!1);return i.useEffect(()=>{const h=v=>{kh.includes(v.key)&&(m.current=!0)},g=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),p.jsx(Mh,{asChild:!0,...c,focusable:!a,active:d,children:p.jsx(ul,{disabled:a,required:s.required,
50checked:d,...l,...r,name:s.name,ref:u,onCheck:()=>s.onValueChange(r.value),onKeyDown:be(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:be(r.onFocus,()=>{m.current&&f.current?.click()})})})});xl.displayName=wl;var Bh="RadioGroupIndicator",yl=i.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=hl(n);return p.jsx(fl,{...r,...o,ref:t})});yl.displayName=Bh;var Hw=gl,Kw=xl,Uw=yl;function Wh(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ur(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gh(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Ur(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Ur(e[r],null)}}}}function Cl(...e){return i.useCallback(Gh(...e),e)}function Hh(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const f=d=>{const{scope:m,children:h,...g}=d,v=m?.[e]?.[l]||c,w=i.useMemo(()=>g,Object.values(g));return p.jsx(v.Provider,{value:w,children:h})};f.displayName=s+"Provider";function u(d,m){const h=m?.[e]?.[l]||c,g=i.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Kh(r,...t)]}function Kh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:f})=>{const d=l(s)[`__scope${f}`];return{...c,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var bl=globalThis?.document?i.useLayoutEffect:()=>{},Uh=gt[" useInsertionEffect ".trim().toString()]||bl;function zh({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Yh({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const f=i.useCallback(u=>{if(c){const d=Xh(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[c,e,s,a]);return[l,f]}function Yh({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Uh(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Xh(e){return typeof e=="function"}function qh(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Zh(e){const[t,n]=i.useState(void 0);return bl(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Qh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sl=Qh.reduce((e,t)=>{const n=Te(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Sn="Switch",[Jh,zw]=Hh(Sn),[eg,tg]=Jh(Sn),Rl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:f,form:u,...d}=e,[m,h]=i.useState(null),g=Cl(t,y=>h(y)),v=i.useRef(!1),w=m?u||!!m.closest("form"):!0,[x,C]=zh({prop:r,defaultProp:s??!1,onChange:f,caller:Sn});
50return p.jsxs(eg,{scope:n,checked:x,disabled:c,children:[p.jsx(Sl.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":Tl(x),"data-disabled":c?"":void 0,disabled:c,value:l,...d,ref:g,onClick:Wh(e.onClick,y=>{C(b=>!b),w&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),w&&p.jsx(Ml,{control:m,bubbles:!v.current,name:o,value:l,checked:x,required:a,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});Rl.displayName=Sn;var El="SwitchThumb",Pl=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=tg(El,n);return p.jsx(Sl.span,{"data-state":Tl(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Pl.displayName=El;var ng="SwitchBubbleInput",Ml=i.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=Cl(a,s),l=qh(n),f=Zh(t);return i.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:o});h.call(u,n),u.dispatchEvent(g)}},[l,n,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ml.displayName=ng;function Tl(e){return e?"checked":"unchecked"}var Yw=Rl,Xw=Pl;export{lw as $,Rg as A,xg as B,pg as C,mg as D,Z as E,Ig as F,jg as G,I as H,Xg as I,ve as J,Eg as K,Yg as L,tw as M,ow as N,fg as O,dg as P,rw as Q,lg as R,ig as S,vg as T,sw as U,Jg as V,nw as W,gg as X,aw as Y,cw as Z,uw as _,hg as a,dw as a0,fw as a1,pw as a2,hw as a3,ww as a4,gw as a5,vw as a6,mw as a7,Cw as a8,xw as a9,nf as aA,Zd as aB,yw as aa,Sw as ab,Rw as ac,Ew as ad,Pw as ae,Tw as af,Iw as ag,$w as ah,kw as ai,_w as aj,Nw as ak,Ow as al,Dw as am,Fw as an,Vw as ao,Ww as ap,th as aq,nh as ar,Hw as as,Kw as at,Uw as au,Yw as av,Xw as aw,qd as ax,Qd as ay,Xd as az,ug as b,zg as c,qg as d,Qg as e,Zg as f,Mg as g,Tg as h,_g as i,Ng as j,Og as k,Dg as l,$g as m,kg as n,Wg as o,Gg as p,Hg as q,Kg as r,Fg as s,Vg as t,Bg as u,Lg as v,yg as w,Cg as x,bg as y,Sg 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.