@av-pi-studio/web-client 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/web/assets/BinaryFallbackViewer-BVnOJSh_.js +2 -0
  3. package/dist/web/assets/BinaryFallbackViewer-BVnOJSh_.js.map +1 -0
  4. package/dist/web/assets/BinaryFallbackViewer-CLiNWU_S.css +1 -0
  5. package/dist/web/assets/ChatPanel-BOR3MYdN.js +3 -0
  6. package/dist/web/assets/ChatPanel-BOR3MYdN.js.map +1 -0
  7. package/dist/web/assets/ChatPanel-DW5U4HRf.css +1 -0
  8. package/dist/web/assets/CodeView-BJb8T6q4.js +2 -0
  9. package/dist/web/assets/CodeView-BJb8T6q4.js.map +1 -0
  10. package/dist/web/assets/CodeView-CLRODhB8.css +1 -0
  11. package/dist/web/assets/DiffView-B4H-yHuX.js +3 -0
  12. package/dist/web/assets/DiffView-B4H-yHuX.js.map +1 -0
  13. package/dist/web/assets/DiffView-CRbeRztO.css +1 -0
  14. package/dist/web/assets/FilePanel-DIInFr3h.css +1 -0
  15. package/dist/web/assets/FilePanel-lERDJldp.js +3 -0
  16. package/dist/web/assets/FilePanel-lERDJldp.js.map +1 -0
  17. package/dist/web/assets/ImageViewer-Cnr0mhRu.js +2 -0
  18. package/dist/web/assets/ImageViewer-Cnr0mhRu.js.map +1 -0
  19. package/dist/web/assets/ImageViewer-ijzMsq8H.css +1 -0
  20. package/dist/web/assets/MarkdownFileViewer-BD5Ri_Fb.css +1 -0
  21. package/dist/web/assets/MarkdownFileViewer-CDHJBxdH.js +2 -0
  22. package/dist/web/assets/MarkdownFileViewer-CDHJBxdH.js.map +1 -0
  23. package/dist/web/assets/TerminalPanel-BQj62G6N.css +1 -0
  24. package/dist/web/assets/TerminalPanel-cnkK_YF5.js +2 -0
  25. package/dist/web/assets/TerminalPanel-cnkK_YF5.js.map +1 -0
  26. package/dist/web/assets/TextViewer-DWYO-J8z.js +2 -0
  27. package/dist/web/assets/TextViewer-DWYO-J8z.js.map +1 -0
  28. package/dist/web/assets/VideoViewer-BBuZ4wou.css +1 -0
  29. package/dist/web/assets/VideoViewer-D2ZnEQoA.js +2 -0
  30. package/dist/web/assets/VideoViewer-D2ZnEQoA.js.map +1 -0
  31. package/dist/web/assets/index-DnTTpAX5.js +3 -0
  32. package/dist/web/assets/index-DnTTpAX5.js.map +1 -0
  33. package/dist/web/assets/index-DrGTLQo0.css +1 -0
  34. package/dist/web/assets/markdown-BQwXm0MF.css +1 -0
  35. package/dist/web/assets/markdown-Biwdm3dP.js +2 -0
  36. package/dist/web/assets/markdown-Biwdm3dP.js.map +1 -0
  37. package/dist/web/assets/use-file-download-BpyWNVxA.js +2 -0
  38. package/dist/web/assets/use-file-download-BpyWNVxA.js.map +1 -0
  39. package/dist/web/assets/vendor-BFXtRv5b.js +83 -0
  40. package/dist/web/assets/vendor-BFXtRv5b.js.map +1 -0
  41. package/dist/web/assets/vendor-dnd-D9kA7FgH.js +6 -0
  42. package/dist/web/assets/vendor-dnd-D9kA7FgH.js.map +1 -0
  43. package/dist/web/assets/vendor-highlight-DaTzDdJW.js +5 -0
  44. package/dist/web/assets/vendor-highlight-DaTzDdJW.js.map +1 -0
  45. package/dist/web/assets/vendor-icons-DUloQbkI.js +182 -0
  46. package/dist/web/assets/vendor-icons-DUloQbkI.js.map +1 -0
  47. package/dist/web/assets/vendor-markdown-CpaoCv-a.js +36 -0
  48. package/dist/web/assets/vendor-markdown-CpaoCv-a.js.map +1 -0
  49. package/dist/web/assets/vendor-overlays-Bo99M0pM.js +2 -0
  50. package/dist/web/assets/vendor-overlays-Bo99M0pM.js.map +1 -0
  51. package/dist/web/assets/vendor-query-CAh-Aqig.js +2 -0
  52. package/dist/web/assets/vendor-query-CAh-Aqig.js.map +1 -0
  53. package/dist/web/assets/vendor-react-BoIQBqDW.js +50 -0
  54. package/dist/web/assets/vendor-react-BoIQBqDW.js.map +1 -0
  55. package/dist/web/assets/vendor-terminal-BhzX2_ts.js +10 -0
  56. package/dist/web/assets/vendor-terminal-BhzX2_ts.js.map +1 -0
  57. package/dist/web/assets/vendor-terminal-DYP7pi_n.css +32 -0
  58. package/dist/web/index.html +21 -0
  59. package/package.json +56 -0
@@ -0,0 +1,2 @@
1
+ import{r as a,j as v,c as Te,a as xt}from"./vendor-react-BoIQBqDW.js";import{h as wn,R as xn}from"./vendor-BFXtRv5b.js";function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function zt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ko(...e){return t=>{let n=!1;const o=e.map(r=>{const s=zt(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():zt(e[r],null)}}}}function B(...e){return a.useCallback(Ko(...e),e)}function be(e,t=[]){let n=[];function o(s,i){const c=a.createContext(i);c.displayName=s+"Context";const l=n.length;n=[...n,i];const d=u=>{var x;const{scope:m,children:p,...h}=u,g=((x=m==null?void 0:m[e])==null?void 0:x[l])||c,w=a.useMemo(()=>h,Object.values(h));return v.jsx(g.Provider,{value:w,children:p})};d.displayName=s+"Provider";function f(u,m){var g;const p=((g=m==null?void 0:m[e])==null?void 0:g[l])||c,h=a.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[d,f]}const r=()=>{const s=n.map(i=>a.createContext(i));return function(c){const l=(c==null?void 0:c[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Go(r,...t)]}function Go(...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 i=o.reduce((c,{useScope:l,scopeName:d})=>{const u=l(s)[`__scope${d}`];return{...c,...u}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var ee=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},Yt=Te[" useEffectEvent ".trim().toString()],Xt=Te[" useInsertionEffect ".trim().toString()];function Vo(e){if(typeof Yt=="function")return Yt(e);const t=a.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Xt=="function"?Xt(()=>{t.current=e}):ee(()=>{t.current=e}),a.useMemo(()=>((...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)}),[])}var Ho=Te[" useInsertionEffect ".trim().toString()]||ee;function yt({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=zo({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const u=f.current;u!==c&&console.warn(`${o} is changing from ${u?"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.`),f.current=c},[c,o])}const d=a.useCallback(f=>{var u;if(c){const m=Yo(f)?f(e):f;m!==e&&((u=i.current)==null||u.call(i,m))}else s(f)},[c,e,s,i]);return[l,d]}function zo({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),r=a.useRef(n),s=a.useRef(t);return Ho(()=>{s.current=t},[t]),a.useEffect(()=>{var i;r.current!==n&&((i=s.current)==null||i.call(s,n),r.current=n)},[n,r]),[n,o,s]}function Yo(e){return typeof e=="function"}function Oe(e){const t=a.forwardRef((n,o)=>{let{children:r,...s}=n,i=null,c=!1;const l=[];Zt(r)&&typeof Be=="function"&&(r=Be(r._payload)),a.Children.forEach(r,m=>{var p;if(Qo(m)){c=!0;const h=m;let g="child"in h.props?h.props.child:h.props.children;Zt(g)&&typeof Be=="function"&&(g=Be(g._payload)),i=Zo(h,g),l.push((p=i==null?void 0:i.props)==null?void 0:p.children)}else l.push(m)}),i?i=a.cloneElement(i,void 0,l):!c&&a.Children.count(r)===1&&a.isValidElement(r)&&(i=r);const d=i?Jo(i):void 0,f=B(o,d);if(!i){if(r||r===0)throw new Error(c?or(e):nr(e));return r}const u=qo(s,i.props??{});return i.type!==a.Fragment&&(u.ref=o?f:d),a.cloneElement(i,u)});return t.displayName=`${e}.Slot`,t}var Xo=Symbol.for("radix.slottable"),Zo=(e,t)=>{if("child"in e.props){const n=e.props.child;return a.isValidElement(n)?a.cloneElement(n,void 0,e.props.children(n.props.children)):null}return a.isValidElement(t)?t:null};function qo(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 Jo(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Qo(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xo}var er=Symbol.for("react.lazy");function Zt(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===er&&"_payload"in e&&tr(e._payload)}function tr(e){return typeof e=="object"&&e!==null&&"then"in e}var nr=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,or=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Be=Te[" use ".trim().toString()],rr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=rr.reduce((e,t)=>{const n=Oe(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function yn(e,t){e&&xt.flushSync(()=>e.dispatchEvent(t))}function bn(e){const t=e+"CollectionProvider",[n,o]=be(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:w,children:x}=g,b=a.useRef(null),y=a.useRef(new Map).current;return v.jsx(r,{scope:w,itemMap:y,collectionRef:b,children:x})};i.displayName=t;const c=e+"CollectionSlot",l=Oe(c),d=a.forwardRef((g,w)=>{const{scope:x,children:b}=g,y=s(c,x),E=B(w,y.collectionRef);return v.jsx(l,{ref:E,children:b})});d.displayName=c;const f=e+"CollectionItemSlot",u="data-radix-collection-item",m=Oe(f),p=a.forwardRef((g,w)=>{const{scope:x,children:b,...y}=g,E=a.useRef(null),C=B(w,E),S=s(f,x);return a.useEffect(()=>(S.itemMap.set(E,{ref:E,...y}),()=>void S.itemMap.delete(E))),v.jsx(m,{[u]:"",ref:C,children:b})});p.displayName=f;function h(g){const w=s(e+"CollectionConsumer",g);return a.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((S,O)=>y.indexOf(S.ref.current)-y.indexOf(O.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:d,ItemSlot:p},h,o]}var sr=a.createContext(void 0);function En(e){const t=a.useContext(sr);return e||t||"ltr"}function ae(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>((...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)}),[])}var ir="DismissableLayer",pt="dismissableLayer.update",cr="dismissableLayer.pointerDownOutside",ar="dismissableLayer.focusOutside",qt,bt=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Et=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:c,onDismiss:l,...d}=e,f=a.useContext(bt),[u,m]=a.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=a.useState({}),g=B(t,m),w=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(x),y=u?w.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,C=y>=b,S=a.useRef(!1),O=dr(P=>{const L=P.target;if(!(L instanceof Node))return;const N=[...f.branches].some(I=>I.contains(L));!C||N||(s==null||s(P),c==null||c(P),P.defaultPrevented||l==null||l())},{ownerDocument:p,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:f.dismissableSurfaces}),D=pr(P=>{if(o&&S.current)return;const L=P.target;[...f.branches].some(I=>I.contains(L))||(i==null||i(P),c==null||c(P),P.defaultPrevented||l==null||l())},p),F=u?y===w.length-1:!1,T=Vo(P=>{P.key==="Escape"&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))});return a.useEffect(()=>{if(F)return p.addEventListener("keydown",T,{capture:!0}),()=>p.removeEventListener("keydown",T,{capture:!0})},[p,F]),a.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),Jt(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(u),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=qt))}},[u,p,n,f]),a.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),Jt())},[u,f]),a.useEffect(()=>{const P=()=>h({});return document.addEventListener(pt,P),()=>document.removeEventListener(pt,P)},[]),v.jsx($.div,{...d,ref:g,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,D.onFocusCapture),onBlurCapture:A(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,O.onPointerDownCapture)})});Et.displayName=ir;var ur="DismissableLayerBranch",lr=a.forwardRef((e,t)=>{const n=a.useContext(bt),o=a.useRef(null),r=B(t,o);return a.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),v.jsx($.div,{...e,ref:r})});lr.displayName=ur;function fr(){const e=a.useContext(bt),[t,n]=a.useState(null);return a.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function dr(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s}=t,i=ae(e),c=a.useRef(!1),l=a.useRef(!1),d=a.useRef(new Map),f=a.useRef(()=>{});return a.useEffect(()=>{function u(){l.current=!1,r.current=!1,d.current.clear()}function m(){return Array.from(d.current.values()).some(Boolean)}function p(b){if(!l.current)return;const y=b.target;y instanceof Node&&[...s].some(C=>C.contains(y))||d.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{l.current&&f.current()},0)}function h(b){l.current&&d.current.set(b.type,!1)}const g=b=>{if(b.target&&!c.current){let y=function(){n.removeEventListener("click",f.current);const C=m();u(),C||Rn(cr,i,E,{discrete:!0})};const E={originalEvent:b};l.current=!0,r.current=o&&b.button===0,d.current.clear(),!o||b.button!==0?y():(n.removeEventListener("click",f.current),f.current=y,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),u();c.current=!1},w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of w)n.addEventListener(b,p,!0),n.addEventListener(b,h);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",g),n.removeEventListener("click",f.current);for(const b of w)n.removeEventListener(b,p,!0),n.removeEventListener(b,h)}},[n,i,o,r,s]),{onPointerDownCapture:()=>c.current=!0}}function pr(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=a.useRef(!1);return a.useEffect(()=>{const r=s=>{s.target&&!o.current&&Rn(ar,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 Jt(){const e=new CustomEvent(pt);document.dispatchEvent(e)}function Rn(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?yn(r,s):r.dispatchEvent(s)}var Ue=0,J=null;function Cn(){a.useEffect(()=>{J||(J={start:Qt(),end:Qt()});const{start:e,end:t}=J;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ue++,()=>{Ue===1&&(J==null||J.start.remove(),J==null||J.end.remove(),J=null),Ue=Math.max(0,Ue-1)}},[])}function Qt(){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 ct="focusScope.autoFocusOnMount",at="focusScope.autoFocusOnUnmount",en={bubbles:!1,cancelable:!0},mr="FocusScope",Rt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[c,l]=a.useState(null),d=ae(r),f=ae(s),u=a.useRef(null),m=B(t,l),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(o){let g=function(y){if(p.paused||!c)return;const E=y.target;c.contains(E)?u.current=E:ce(u.current,{select:!0})},w=function(y){if(p.paused||!c)return;const E=y.relatedTarget;E!==null&&(c.contains(E)||ce(u.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const C of y)C.removedNodes.length>0&&ce(c)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const b=new MutationObserver(x);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),b.disconnect()}}},[o,c,p.paused]),a.useEffect(()=>{if(c){nn.add(p);const g=document.activeElement;if(!c.contains(g)){const x=new CustomEvent(ct,en);c.addEventListener(ct,d),c.dispatchEvent(x),x.defaultPrevented||(hr(yr(Sn(c)),{select:!0}),document.activeElement===g&&ce(c))}return()=>{c.removeEventListener(ct,d),setTimeout(()=>{const x=new CustomEvent(at,en);c.addEventListener(at,f),c.dispatchEvent(x),x.defaultPrevented||ce(g??document.body,{select:!0}),c.removeEventListener(at,f),nn.remove(p)},0)}}},[c,d,f,p]);const h=a.useCallback(g=>{if(!n&&!o||p.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(w&&x){const b=g.currentTarget,[y,E]=gr(b);y&&E?!g.shiftKey&&x===E?(g.preventDefault(),n&&ce(y,{select:!0})):g.shiftKey&&x===y&&(g.preventDefault(),n&&ce(E,{select:!0})):x===b&&g.preventDefault()}},[n,o,p.paused]);return v.jsx($.div,{tabIndex:-1,...i,ref:m,onKeyDown:h})});Rt.displayName=mr;function hr(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ce(o,{select:t}),document.activeElement!==n)return}function gr(e){const t=Sn(e),n=tn(t,e),o=tn(t.reverse(),e);return[n,o]}function Sn(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 tn(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(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 wr(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wr(e)&&t&&e.select()}}var nn=xr();function xr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=on(e,t),e.unshift(t)},remove(t){var n;e=on(e,t),(n=e[0])==null||n.resume()}}}function on(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function yr(e){return e.filter(t=>t.tagName!=="A")}var br=Te[" useId ".trim().toString()]||(()=>{}),Er=0;function ve(e){const[t,n]=a.useState(br());return ee(()=>{n(o=>o??String(Er++))},[e]),e||(t?`radix-${t}`:"")}const Rr=["top","right","bottom","left"],ue=Math.min,V=Math.max,Ve=Math.round,We=Math.floor,te=e=>({x:e,y:e}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(e,t,n){return V(e,ue(t,n))}function oe(e,t){return typeof e=="function"?e(t):e}function re(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function Ct(e){return e==="x"?"y":"x"}function St(e){return e==="y"?"height":"width"}function Q(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Mt(e){return Ct(Q(e))}function Sr(e,t,n){n===void 0&&(n=!1);const o=Ee(e),r=Mt(e),s=St(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=He(i)),[i,He(i)]}function Mr(e){const t=He(e);return[ht(e),t,ht(t)]}function ht(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const rn=["left","right"],sn=["right","left"],Pr=["top","bottom"],Ar=["bottom","top"];function Or(e,t,n){switch(e){case"top":case"bottom":return n?t?sn:rn:t?rn:sn;case"left":case"right":return t?Pr:Ar;default:return[]}}function Dr(e,t,n,o){const r=Ee(e);let s=Or(re(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(ht)))),s}function He(e){const t=re(e);return Cr[t]+e.slice(t.length)}function _r(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mn(e){return typeof e!="number"?_r(e):{top:e,right:e,bottom:e,left:e}}function ze(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 cn(e,t,n){let{reference:o,floating:r}=e;const s=Q(t),i=Mt(t),c=St(i),l=re(t),d=s==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let p;switch(l){case"top":p={x:f,y:o.y-r.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-r.width,y:u};break;default:p={x:o.x,y:o.y}}switch(Ee(t)){case"start":p[i]-=m*(n&&d?-1:1);break;case"end":p[i]+=m*(n&&d?-1:1);break}return p}async function Ir(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=oe(t,e),h=Mn(p),w=c[m?u==="floating"?"reference":"floating":u],x=ze(await s.getClippingRect({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:d,rootBoundary:f,strategy:l})),b=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),E=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},C=ze(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:y,strategy:l}):b);return{top:(x.top-C.top+h.top)/E.y,bottom:(C.bottom-x.bottom+h.bottom)/E.y,left:(x.left-C.left+h.left)/E.x,right:(C.right-x.right+h.right)/E.x}}const Tr=50,Nr=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Ir},l=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:u}=cn(d,o,l),m=o,p=0;const h={};for(let g=0;g<s.length;g++){const w=s[g];if(!w)continue;const{name:x,fn:b}=w,{x:y,y:E,data:C,reset:S}=await b({x:f,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:d,platform:c,elements:{reference:e,floating:t}});f=y??f,u=E??u,h[x]={...h[x],...C},S&&p<Tr&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:f,y:u}=cn(d,m,l)),g=-1)}return{x:f,y:u,placement:m,strategy:r,middlewareData:h}},Lr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:d,padding:f=0}=oe(e,t)||{};if(d==null)return{};const u=Mn(f),m={x:n,y:o},p=Mt(r),h=St(p),g=await i.getDimensions(d),w=p==="y",x=w?"top":"left",b=w?"bottom":"right",y=w?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-m[p]-s.floating[h],C=m[p]-s.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let O=S?S[y]:0;(!O||!await(i.isElement==null?void 0:i.isElement(S)))&&(O=c.floating[y]||s.floating[h]);const D=E/2-C/2,F=O/2-g[h]/2-1,T=ue(u[x],F),P=ue(u[b],F),L=T,N=O-g[h]-P,I=O/2-g[h]/2+D,U=mt(L,I,N),_=!l.arrow&&Ee(r)!=null&&I!==U&&s.reference[h]/2-(I<L?T:P)-g[h]/2<0,k=_?I<L?I-L:I-N:0;return{[p]:m[p]+k,data:{[p]:U,centerOffset:I-U-k,..._&&{alignmentOffset:k}},reset:_}}}),Fr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=oe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=re(r),b=Q(c),y=re(c)===c,E=await(l.isRTL==null?void 0:l.isRTL(d.floating)),C=m||(y||!g?[He(c)]:Mr(c)),S=h!=="none";!m&&S&&C.push(...Dr(c,g,h,E));const O=[c,...C],D=await l.detectOverflow(t,w),F=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&F.push(D[x]),u){const I=Sr(r,i,E);F.push(D[I[0]],D[I[1]])}if(T=[...T,{placement:r,overflows:F}],!F.every(I=>I<=0)){var P,L;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,U=O[I];if(U&&(!(u==="alignment"?b!==Q(U):!1)||T.every(M=>Q(M.placement)===b?M.overflows[0]>0:!0)))return{data:{index:I,overflows:T},reset:{placement:U}};let _=(L=T.filter(k=>k.overflows[0]<=0).sort((k,M)=>k.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!_)switch(p){case"bestFit":{var N;const k=(N=T.filter(M=>{if(S){const R=Q(M.placement);return R===b||R==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(R=>R>0).reduce((R,j)=>R+j,0)]).sort((M,R)=>M[1]-R[1])[0])==null?void 0:N[0];k&&(_=k);break}case"initialPlacement":_=c;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function an(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function un(e){return Rr.some(t=>e[t]>=0)}const jr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=oe(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...s,elementContext:"reference"}),c=an(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:un(c)}}}case"escaped":{const i=await o.detectOverflow(t,{...s,altBoundary:!0}),c=an(i,n.floating);return{data:{escapedOffsets:c,escaped:un(c)}}}default:return{}}}}},Pn=new Set(["left","top"]);async function kr(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=re(n),c=Ee(n),l=Q(n)==="y",d=Pn.has(i)?-1:1,f=s&&l?-1:1,u=oe(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof h=="number"&&(p=c==="end"?h*-1:h),l?{x:p*f,y:m*d}:{x:m*d,y:p*f}}const $r=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await kr(t,e);return i===((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:i}}}}},Br=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:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...d}=oe(e,t),f={x:n,y:o},u=await s.detectOverflow(t,d),m=Q(re(r)),p=Ct(m);let h=f[p],g=f[m];if(i){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+u[x],E=h-u[b];h=mt(y,h,E)}if(c){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+u[x],E=g-u[b];g=mt(y,g,E)}const w=l.fn({...t,[p]:h,[m]:g});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[p]:i,[m]:c}}}}}},Ur=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:d=!0}=oe(e,t),f={x:n,y:o},u=Q(r),m=Ct(u);let p=f[m],h=f[u];const g=oe(c,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=m==="y"?"height":"width",E=s.reference[m]-s.floating[y]+w.mainAxis,C=s.reference[m]+s.reference[y]-w.mainAxis;p<E?p=E:p>C&&(p=C)}if(d){var x,b;const y=m==="y"?"width":"height",E=Pn.has(re(r)),C=s.reference[u]-s.floating[y]+(E&&((x=i.offset)==null?void 0:x[u])||0)+(E?0:w.crossAxis),S=s.reference[u]+s.reference[y]+(E?0:((b=i.offset)==null?void 0:b[u])||0)-(E?w.crossAxis:0);h<C?h=C:h>S&&(h=S)}return{[m]:p,[u]:h}}}},Wr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...d}=oe(e,t),f=await i.detectOverflow(t,d),u=re(r),m=Ee(r),p=Q(r)==="y",{width:h,height:g}=s.floating;let w,x;u==="top"||u==="bottom"?(w=u,x=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=u,w=m==="end"?"top":"bottom");const b=g-f.top-f.bottom,y=h-f.left-f.right,E=ue(g-f[w],b),C=ue(h-f[x],y),S=!t.middlewareData.shift;let O=E,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=b),S&&!m){const T=V(f.left,0),P=V(f.right,0),L=V(f.top,0),N=V(f.bottom,0);p?D=h-2*(T!==0||P!==0?T+P:V(f.left,f.right)):O=g-2*(L!==0||N!==0?L+N:V(f.top,f.bottom))}await l({...t,availableWidth:D,availableHeight:O});const F=await i.getDimensions(c.floating);return h!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function Je(){return typeof window<"u"}function Re(e){return An(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ne(e){var t;return(t=(An(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function An(e){return Je()?e instanceof Node||e instanceof H(e).Node:!1}function X(e){return Je()?e instanceof Element||e instanceof H(e).Element:!1}function se(e){return Je()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function ln(e){return!Je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Kr(e){return/^(table|td|th)$/.test(Re(e))}function Qe(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Gr=/transform|translate|scale|rotate|perspective|filter/,Vr=/paint|layout|strict|content/,pe=e=>!!e&&e!=="none";let ut;function Pt(e){const t=X(e)?Z(e):e;return pe(t.transform)||pe(t.translate)||pe(t.scale)||pe(t.rotate)||pe(t.perspective)||!At()&&(pe(t.backdropFilter)||pe(t.filter))||Gr.test(t.willChange||"")||Vr.test(t.contain||"")}function Hr(e){let t=le(e);for(;se(t)&&!xe(t);){if(Pt(t))return t;if(Qe(t))return null;t=le(t)}return null}function At(){return ut==null&&(ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ut}function xe(e){return/^(html|body|#document)$/.test(Re(e))}function Z(e){return H(e).getComputedStyle(e)}function et(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function le(e){if(Re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ln(e)&&e.host||ne(e);return ln(t)?t.host:t}function On(e){const t=le(e);return xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ne(t)?t:On(t)}function De(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=On(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=H(r);if(s){const c=gt(i);return t.concat(i,i.visualViewport||[],Ne(r)?r:[],c&&n?De(c):[])}else return t.concat(r,De(r,[],n))}function gt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dn(e){const t=Z(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Ve(n)!==s||Ve(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function Ot(e){return X(e)?e:e.contextElement}function we(e){const t=Ot(e);if(!se(t))return te(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Dn(t);let i=(s?Ve(n.width):n.width)/o,c=(s?Ve(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const zr=te(0);function _n(e){const t=H(e);return!At()||!t.visualViewport?zr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function me(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Ot(e);let i=te(1);t&&(o?X(o)&&(i=we(o)):i=we(e));const c=Yr(s,n,o)?_n(s):te(0);let l=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,f=r.width/i.x,u=r.height/i.y;if(s){const m=H(s),p=o&&X(o)?H(o):o;let h=m,g=gt(h);for(;g&&o&&p!==h;){const w=we(g),x=g.getBoundingClientRect(),b=Z(g),y=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*w.x,E=x.top+(g.clientTop+parseFloat(b.paddingTop))*w.y;l*=w.x,d*=w.y,f*=w.x,u*=w.y,l+=y,d+=E,h=H(g),g=gt(h)}}return ze({width:f,height:u,x:l,y:d})}function tt(e,t){const n=et(e).scrollLeft;return t?t.left+n:me(ne(e)).left+n}function In(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Xr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=ne(o),c=t?Qe(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},d=te(1);const f=te(0),u=se(o);if((u||!u&&!s)&&((Re(o)!=="body"||Ne(i))&&(l=et(o)),u)){const p=me(o);d=we(o),f.x=p.x+o.clientLeft,f.y=p.y+o.clientTop}const m=i&&!u&&!s?In(i,l):te(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+m.x,y:n.y*d.y-l.scrollTop*d.y+f.y+m.y}}function Zr(e){return Array.from(e.getClientRects())}function qr(e){const t=ne(e),n=et(e),o=e.ownerDocument.body,r=V(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=V(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+tt(e);const c=-n.scrollTop;return Z(o).direction==="rtl"&&(i+=V(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}const fn=25;function Jr(e,t){const n=H(e),o=ne(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const f=At();(!f||f&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const d=tt(o);if(d<=0){const f=o.ownerDocument,u=f.body,m=getComputedStyle(u),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-u.clientWidth-p);h<=fn&&(s-=h)}else d<=fn&&(s+=d);return{width:s,height:i,x:c,y:l}}function Qr(e,t){const n=me(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=se(e)?we(e):te(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,d=o*s.y;return{width:i,height:c,x:l,y:d}}function dn(e,t,n){let o;if(t==="viewport")o=Jr(e,n);else if(t==="document")o=qr(ne(e));else if(X(t))o=Qr(t,n);else{const r=_n(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ze(o)}function Tn(e,t){const n=le(e);return n===t||!X(n)||xe(n)?!1:Z(n).position==="fixed"||Tn(n,t)}function es(e,t){const n=t.get(e);if(n)return n;let o=De(e,[],!1).filter(c=>X(c)&&Re(c)!=="body"),r=null;const s=Z(e).position==="fixed";let i=s?le(e):e;for(;X(i)&&!xe(i);){const c=Z(i),l=Pt(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ne(i)&&!l&&Tn(e,i))?o=o.filter(f=>f!==i):r=c,i=le(i)}return t.set(e,o),o}function ts(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?Qe(t)?[]:es(t,this._c):[].concat(n),o],c=dn(t,i[0],r);let l=c.top,d=c.right,f=c.bottom,u=c.left;for(let m=1;m<i.length;m++){const p=dn(t,i[m],r);l=V(p.top,l),d=ue(p.right,d),f=ue(p.bottom,f),u=V(p.left,u)}return{width:d-u,height:f-l,x:u,y:l}}function ns(e){const{width:t,height:n}=Dn(e);return{width:t,height:n}}function os(e,t,n){const o=se(t),r=ne(t),s=n==="fixed",i=me(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=te(0);function d(){l.x=tt(r)}if(o||!o&&!s)if((Re(t)!=="body"||Ne(r))&&(c=et(t)),o){const p=me(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else r&&d();s&&!o&&r&&d();const f=r&&!o&&!s?In(r,c):te(0),u=i.left+c.scrollLeft-l.x-f.x,m=i.top+c.scrollTop-l.y-f.y;return{x:u,y:m,width:i.width,height:i.height}}function lt(e){return Z(e).position==="static"}function pn(e,t){if(!se(e)||Z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ne(e)===n&&(n=n.ownerDocument.body),n}function Nn(e,t){const n=H(e);if(Qe(e))return n;if(!se(e)){let r=le(e);for(;r&&!xe(r);){if(X(r)&&!lt(r))return r;r=le(r)}return n}let o=pn(e,t);for(;o&&Kr(o)&&lt(o);)o=pn(o,t);return o&&xe(o)&&lt(o)&&!Pt(o)?n:o||Hr(e)||n}const rs=async function(e){const t=this.getOffsetParent||Nn,n=this.getDimensions,o=await n(e.floating);return{reference:os(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ss(e){return Z(e).direction==="rtl"}const is={convertOffsetParentRelativeRectToViewportRelativeRect:Xr,getDocumentElement:ne,getClippingRect:ts,getOffsetParent:Nn,getElementRects:rs,getClientRects:Zr,getDimensions:ns,getScale:we,isElement:X,isRTL:ss};function Ln(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cs(e,t){let n=null,o;const r=ne(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const d=e.getBoundingClientRect(),{left:f,top:u,width:m,height:p}=d;if(c||t(),!m||!p)return;const h=We(u),g=We(r.clientWidth-(f+m)),w=We(r.clientHeight-(u+p)),x=We(f),y={rootMargin:-h+"px "+-g+"px "+-w+"px "+-x+"px",threshold:V(0,ue(1,l))||1};let E=!0;function C(S){const O=S[0].intersectionRatio;if(O!==l){if(!E)return i();O?i(!1,O):o=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!Ln(d,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(C,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return i(!0),s}function as(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,d=Ot(e),f=r||s?[...d?De(d):[],...t?De(t):[]]:[];f.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const u=d&&c?cs(d,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===d&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),d&&!l&&p.observe(d),t&&p.observe(t));let h,g=l?me(e):null;l&&w();function w(){const x=me(e);g&&!Ln(g,x)&&n(),g=x,h=requestAnimationFrame(w)}return n(),()=>{var x;f.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u==null||u(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const us=$r,ls=Br,fs=Fr,ds=Wr,ps=jr,mn=Lr,ms=Ur,hs=(e,t,n)=>{const o=new Map,r={platform:is,...n},s={...r.platform,_c:o};return Nr(e,t,{...r,platform:s})};var gs=typeof document<"u",vs=function(){},Ge=gs?a.useLayoutEffect:vs;function Ye(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Ye(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)&&!Ye(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Fn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hn(e,t){const n=Fn(e);return Math.round(t*n)/n}function ft(e){const t=a.useRef(e);return Ge(()=>{t.current=e}),t}function ws(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[f,u]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=a.useState(o);Ye(m,o)||p(o);const[h,g]=a.useState(null),[w,x]=a.useState(null),b=a.useCallback(M=>{M!==S.current&&(S.current=M,g(M))},[]),y=a.useCallback(M=>{M!==O.current&&(O.current=M,x(M))},[]),E=s||h,C=i||w,S=a.useRef(null),O=a.useRef(null),D=a.useRef(f),F=l!=null,T=ft(l),P=ft(r),L=ft(d),N=a.useCallback(()=>{if(!S.current||!O.current)return;const M={placement:t,strategy:n,middleware:m};P.current&&(M.platform=P.current),hs(S.current,O.current,M).then(R=>{const j={...R,isPositioned:L.current!==!1};I.current&&!Ye(D.current,j)&&(D.current=j,xt.flushSync(()=>{u(j)}))})},[m,t,n,P,L]);Ge(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(M=>({...M,isPositioned:!1})))},[d]);const I=a.useRef(!1);Ge(()=>(I.current=!0,()=>{I.current=!1}),[]),Ge(()=>{if(E&&(S.current=E),C&&(O.current=C),E&&C){if(T.current)return T.current(E,C,N);N()}},[E,C,N,T,F]);const U=a.useMemo(()=>({reference:S,floating:O,setReference:b,setFloating:y}),[b,y]),_=a.useMemo(()=>({reference:E,floating:C}),[E,C]),k=a.useMemo(()=>{const M={position:n,left:0,top:0};if(!_.floating)return M;const R=hn(_.floating,f.x),j=hn(_.floating,f.y);return c?{...M,transform:"translate("+R+"px, "+j+"px)",...Fn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:j}},[n,c,_.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:N,refs:U,elements:_,floatingStyles:k}),[f,N,U,_,k])}const xs=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?mn({element:o.current,padding:r}).fn(n):{}:o?mn({element:o,padding:r}).fn(n):{}}}},ys=(e,t)=>{const n=us(e);return{name:n.name,fn:n.fn,options:[e,t]}},bs=(e,t)=>{const n=ls(e);return{name:n.name,fn:n.fn,options:[e,t]}},Es=(e,t)=>({fn:ms(e).fn,options:[e,t]}),Rs=(e,t)=>{const n=fs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cs=(e,t)=>{const n=ds(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ss=(e,t)=>{const n=ps(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ms=(e,t)=>{const n=xs(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ps="Arrow",jn=a.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return v.jsx($.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});jn.displayName=Ps;var As=jn;function Os(e){const[t,n]=a.useState(void 0);return ee(()=>{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 i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,d=Array.isArray(l)?l[0]:l;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Dt="Popper",[kn,$n]=be(Dt),[Ds,Bn]=kn(Dt),Un=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null),[s,i]=a.useState(void 0);return v.jsx(Ds,{scope:t,anchor:o,onAnchorChange:r,placementState:s,setPlacementState:i,children:n})};Un.displayName=Dt;var Wn="PopperAnchor",Kn=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Bn(Wn,n),i=a.useRef(null),c=s.onAnchorChange,l=a.useCallback(h=>{i.current=h,h&&c(h)},[c]),d=B(t,l),f=a.useRef(null);a.useEffect(()=>{if(!o)return;const h=f.current;f.current=o.current,h!==f.current&&c(f.current)});const u=s.placementState&&It(s.placementState),m=u==null?void 0:u[0],p=u==null?void 0:u[1];return o?null:v.jsx($.div,{"data-radix-popper-side":m,"data-radix-popper-align":p,...r,ref:d})});Kn.displayName=Wn;var _t="PopperContent",[_s,Is]=kn(_t),Gn=a.forwardRef((e,t)=>{var Me,z,Pe,Kt,Gt,Vt;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:h,...g}=e,w=Bn(_t,n),[x,b]=a.useState(null),y=B(t,b),[E,C]=a.useState(null),S=Os(E),O=(S==null?void 0:S.width)??0,D=(S==null?void 0:S.height)??0,F=o+(s!=="center"?"-"+s:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},P=Array.isArray(d)?d:[d],L=P.length>0,N={padding:T,boundary:P.filter(Ns),altBoundary:L},{refs:I,floatingStyles:U,placement:_,isPositioned:k,middlewareData:M}=ws({strategy:"fixed",placement:F,whileElementsMounted:(...it)=>as(...it,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[ys({mainAxis:r+D,alignmentAxis:i}),l&&bs({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Es():void 0,...N}),l&&Rs({...N}),Cs({...N,apply:({elements:it,rects:Ht,availableWidth:$o,availableHeight:Bo})=>{const{width:Uo,height:Wo}=Ht.reference,$e=it.floating.style;$e.setProperty("--radix-popper-available-width",`${$o}px`),$e.setProperty("--radix-popper-available-height",`${Bo}px`),$e.setProperty("--radix-popper-anchor-width",`${Uo}px`),$e.setProperty("--radix-popper-anchor-height",`${Wo}px`)}}),E&&Ms({element:E,padding:c}),Ls({arrowWidth:O,arrowHeight:D}),m&&Ss({strategy:"referenceHidden",...N,boundary:L?N.boundary:void 0})]}),R=w.setPlacementState;ee(()=>(R(_),()=>{R(void 0)}),[_,R]);const[j,K]=It(_),G=ae(h);ee(()=>{k&&(G==null||G())},[k,G]);const Ce=(Me=M.arrow)==null?void 0:Me.x,Se=(z=M.arrow)==null?void 0:z.y,ke=((Pe=M.arrow)==null?void 0:Pe.centerOffset)!==0,[de,ie]=a.useState();return ee(()=>{x&&ie(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:k?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(Kt=M.transformOrigin)==null?void 0:Kt.x,(Gt=M.transformOrigin)==null?void 0:Gt.y].join(" "),...((Vt=M.hide)==null?void 0:Vt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(_s,{scope:n,placedSide:j,placedAlign:K,onArrowChange:C,arrowX:Ce,arrowY:Se,shouldHideArrow:ke,children:v.jsx($.div,{"data-side":j,"data-align":K,...g,ref:y,style:{...g.style,animation:k?void 0:"none"}})})})});Gn.displayName=_t;var Vn="PopperArrow",Ts={top:"bottom",right:"left",bottom:"top",left:"right"},Hn=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Is(Vn,o),i=Ts[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:v.jsx(As,{...r,ref:n,style:{...r.style,display:"block"}})})});Hn.displayName=Vn;function Ns(e){return e!==null}var Ls=e=>({name:"transformOrigin",options:e,fn(t){var w,x,b;const{placement:n,rects:o,middlewareData:r}=t,i=((w=r.arrow)==null?void 0:w.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[d,f]=It(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(((x=r.arrow)==null?void 0:x.x)??0)+c/2,p=(((b=r.arrow)==null?void 0:b.y)??0)+l/2;let h="",g="";return d==="bottom"?(h=i?u:`${m}px`,g=`${-l}px`):d==="top"?(h=i?u:`${m}px`,g=`${o.floating.height+l}px`):d==="right"?(h=`${-l}px`,g=i?u:`${p}px`):d==="left"&&(h=`${o.floating.width+l}px`,g=i?u:`${p}px`),{data:{x:h,y:g}}}});function It(e){const[t,n="center"]=e.split("-");return[t,n]}var Fs=Un,js=Kn,ks=Gn,$s=Hn,Bs="Portal",Tt=a.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,s]=a.useState(!1);ee(()=>s(!0),[]);const i=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?xt.createPortal(v.jsx($.div,{...o,ref:t}),i):null});Tt.displayName=Bs;function Us(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var fe=e=>{const{present:t,children:n}=e,o=Ws(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),s=Ks(o.ref,Gs(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:s}):null};fe.displayName="Presence";function Ws(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[c,l]=Us(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const d=Ke(o.current);s.current=c==="mounted"?d:"none"},[c]),ee(()=>{const d=o.current,f=r.current;if(f!==e){const m=s.current,p=Ke(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ee(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,u=p=>{const g=Ke(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=p=>{p.target===t&&(s.current=Ke(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function gn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ks(...e){const t=a.useRef(e);return t.current=e,a.useCallback(n=>{const o=t.current;let r=!1;const s=o.map(i=>{const c=gn(i,n);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():gn(o[i],null)}}},[])}function Ke(e){return(e==null?void 0:e.animationName)||"none"}function Gs(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dt="rovingFocusGroup.onEntryFocus",Vs={bubbles:!1,cancelable:!0},Le="RovingFocusGroup",[vt,zn,Hs]=bn(Le),[zs,Yn]=be(Le,[Hs]),[Ys,Xs]=zs(Le),Xn=a.forwardRef((e,t)=>v.jsx(vt.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(vt.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Zs,{...e,ref:t})})}));Xn.displayName=Le;var Zs=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...u}=e,m=a.useRef(null),p=B(t,m),h=En(s),[g,w]=yt({prop:i,defaultProp:c??null,onChange:l,caller:Le}),[x,b]=a.useState(!1),y=ae(d),E=zn(n),C=a.useRef(!1),[S,O]=a.useState(0);return a.useEffect(()=>{const D=m.current;if(D)return D.addEventListener(dt,y),()=>D.removeEventListener(dt,y)},[y]),v.jsx(Ys,{scope:n,orientation:o,dir:h,loop:r,currentTabStopId:g,onItemFocus:a.useCallback(D=>w(D),[w]),onItemShiftTab:a.useCallback(()=>b(!0),[]),onFocusableItemAdd:a.useCallback(()=>O(D=>D+1),[]),onFocusableItemRemove:a.useCallback(()=>O(D=>D-1),[]),children:v.jsx($.div,{tabIndex:x||S===0?-1:0,"data-orientation":o,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,D=>{const F=!C.current;if(D.target===D.currentTarget&&F&&!x){const T=new CustomEvent(dt,Vs);if(D.currentTarget.dispatchEvent(T),!T.defaultPrevented){const P=E().filter(_=>_.focusable),L=P.find(_=>_.active),N=P.find(_=>_.id===g),U=[L,N,...P].filter(Boolean).map(_=>_.ref.current);Jn(U,f)}}C.current=!1}),onBlur:A(e.onBlur,()=>b(!1))})})}),Zn="RovingFocusGroupItem",qn=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:i,...c}=e,l=ve(),d=s||l,f=Xs(Zn,n),u=f.currentTabStopId===d,m=zn(n),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:g}=f;return a.useEffect(()=>{if(o)return p(),()=>h()},[o,p,h]),v.jsx(vt.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:v.jsx($.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:A(e.onMouseDown,w=>{o?f.onItemFocus(d):w.preventDefault()}),onFocus:A(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:A(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=Qs(w,f.orientation,f.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let y=m().filter(E=>E.focusable).map(E=>E.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const E=y.indexOf(w.currentTarget);y=f.loop?ei(y,E+1):y.slice(E+1)}setTimeout(()=>Jn(y))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:g!=null}):i})})});qn.displayName=Zn;var qs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Js(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qs(e,t,n){const o=Js(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return qs[o]}function Jn(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function ei(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ti=Xn,ni=qn,wt=["Enter"," "],oi=["ArrowDown","PageUp","Home"],Qn=["ArrowUp","PageDown","End"],ri=[...oi,...Qn],si={ltr:[...wt,"ArrowRight"],rtl:[...wt,"ArrowLeft"]},ii={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Fe="Menu",[_e,ci,ai]=bn(Fe),[he,eo]=be(Fe,[ai,$n,Yn]),nt=$n(),to=Yn(),[ui,ge]=he(Fe),[li,je]=he(Fe),no=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,c=nt(t),[l,d]=a.useState(null),f=a.useRef(!1),u=ae(s),m=En(r);return a.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),a.useEffect(()=>{if(!n)return;const p=()=>u(!1);return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[n,u]),v.jsx(Fs,{...c,children:v.jsx(ui,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:d,children:v.jsx(li,{scope:t,onClose:a.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:m,modal:i,children:o})})})};no.displayName=Fe;var fi="MenuAnchor",Nt=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=nt(n);return v.jsx(js,{...r,...o,ref:t})});Nt.displayName=fi;var Lt="MenuPortal",[di,oo]=he(Lt,{forceMount:void 0}),ro=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=ge(Lt,t);return v.jsx(di,{scope:t,forceMount:n,children:v.jsx(fe,{present:n||s.open,children:v.jsx(Tt,{asChild:!0,container:r,children:o})})})};ro.displayName=Lt;var Y="MenuContent",[pi,Ft]=he(Y),so=a.forwardRef((e,t)=>{const n=oo(Y,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ge(Y,e.__scopeMenu),i=je(Y,e.__scopeMenu);return v.jsx(_e.Provider,{scope:e.__scopeMenu,children:v.jsx(fe,{present:o||s.open,children:v.jsx(_e.Slot,{scope:e.__scopeMenu,children:i.modal?v.jsx(mi,{...r,ref:t}):v.jsx(hi,{...r,ref:t})})})})}),mi=a.forwardRef((e,t)=>{const n=ge(Y,e.__scopeMenu),o=a.useRef(null),r=B(t,o);return a.useEffect(()=>{const s=o.current;if(s)return wn(s)},[]),v.jsx(jt,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hi=a.forwardRef((e,t)=>{const n=ge(Y,e.__scopeMenu);return v.jsx(jt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gi=Oe("MenuContent.ScrollLock"),jt=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:m,onDismiss:p,disableOutsideScroll:h,...g}=e,w=ge(Y,n),x=je(Y,n),b=nt(n),y=to(n),E=ci(n),[C,S]=a.useState(null),O=a.useRef(null),D=B(t,O,w.onContentChange),F=a.useRef(0),T=a.useRef(""),P=a.useRef(0),L=a.useRef(null),N=a.useRef("right"),I=a.useRef(0),U=h?xn:a.Fragment,_=h?{as:gi,allowPinchZoom:!0}:void 0,k=R=>{var ie,Me;const j=T.current+R,K=E().filter(z=>!z.disabled),G=document.activeElement,Ce=(ie=K.find(z=>z.ref.current===G))==null?void 0:ie.textValue,Se=K.map(z=>z.textValue),ke=Ai(Se,j,Ce),de=(Me=K.find(z=>z.textValue===ke))==null?void 0:Me.ref.current;(function z(Pe){T.current=Pe,window.clearTimeout(F.current),Pe!==""&&(F.current=window.setTimeout(()=>z(""),1e3))})(j),de&&setTimeout(()=>de.focus())};a.useEffect(()=>()=>window.clearTimeout(F.current),[]),Cn();const M=a.useCallback(R=>{var K,G;return N.current===((K=L.current)==null?void 0:K.side)&&Di(R,(G=L.current)==null?void 0:G.area)},[]);return v.jsx(pi,{scope:n,searchRef:T,onItemEnter:a.useCallback(R=>{M(R)&&R.preventDefault()},[M]),onItemLeave:a.useCallback(R=>{var j;M(R)||((j=O.current)==null||j.focus(),S(null))},[M]),onTriggerLeave:a.useCallback(R=>{M(R)&&R.preventDefault()},[M]),pointerGraceTimerRef:P,onPointerGraceIntentChange:a.useCallback(R=>{L.current=R},[]),children:v.jsx(U,{..._,children:v.jsx(Rt,{asChild:!0,trapped:r,onMountAutoFocus:A(s,R=>{var j;R.preventDefault(),(j=O.current)==null||j.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:v.jsx(Et,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:m,onDismiss:p,children:v.jsx(ti,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:A(l,R=>{x.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(ks,{role:"menu","aria-orientation":"vertical","data-state":Eo(w.open),"data-radix-menu-content":"",dir:x.dir,...b,...g,ref:D,style:{outline:"none",...g.style},onKeyDown:A(g.onKeyDown,R=>{const K=R.target.closest("[data-radix-menu-content]")===R.currentTarget,G=R.ctrlKey||R.altKey||R.metaKey,Ce=R.key.length===1;K&&(R.key==="Tab"&&R.preventDefault(),!G&&Ce&&k(R.key));const Se=O.current;if(R.target!==Se||!ri.includes(R.key))return;R.preventDefault();const de=E().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Qn.includes(R.key)&&de.reverse(),Mi(de)}),onBlur:A(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(F.current),T.current="")}),onPointerMove:A(e.onPointerMove,Ie(R=>{const j=R.target,K=I.current!==R.clientX;if(R.currentTarget.contains(j)&&K){const G=R.clientX>I.current?"right":"left";N.current=G,I.current=R.clientX}}))})})})})})})});so.displayName=Y;var vi="MenuGroup",kt=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v.jsx($.div,{role:"group",...o,ref:t})});kt.displayName=vi;var wi="MenuLabel",io=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v.jsx($.div,{...o,ref:t})});io.displayName=wi;var Xe="MenuItem",vn="menu.itemSelect",ot=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=a.useRef(null),i=je(Xe,e.__scopeMenu),c=Ft(Xe,e.__scopeMenu),l=B(t,s),d=a.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const m=new CustomEvent(vn,{bubbles:!0,cancelable:!0});u.addEventListener(vn,p=>o==null?void 0:o(p),{once:!0}),yn(u,m),m.defaultPrevented?d.current=!1:i.onClose()}};return v.jsx(co,{...r,ref:l,disabled:n,onClick:A(e.onClick,f),onPointerDown:u=>{var m;(m=e.onPointerDown)==null||m.call(e,u),d.current=!0},onPointerUp:A(e.onPointerUp,u=>{var m;d.current||(m=u.currentTarget)==null||m.click()}),onKeyDown:A(e.onKeyDown,u=>{const m=c.searchRef.current!=="";n||m&&u.key===" "||wt.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});ot.displayName=Xe;var co=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=Ft(Xe,n),c=to(n),l=a.useRef(null),d=B(t,l),[f,u]=a.useState(!1),[m,p]=a.useState("");return a.useEffect(()=>{const h=l.current;h&&p((h.textContent??"").trim())},[s.children]),v.jsx(_e.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:v.jsx(ni,{asChild:!0,...c,focusable:!o,children:v.jsx($.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:A(e.onPointerMove,Ie(h=>{o?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,Ie(h=>i.onItemLeave(h))),onFocus:A(e.onFocus,()=>u(!0)),onBlur:A(e.onBlur,()=>u(!1))})})})}),xi="MenuCheckboxItem",ao=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return v.jsx(mo,{scope:e.__scopeMenu,checked:n,children:v.jsx(ot,{role:"menuitemcheckbox","aria-checked":Ze(n)?"mixed":n,...r,ref:t,"data-state":Bt(n),onSelect:A(r.onSelect,()=>o==null?void 0:o(Ze(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ao.displayName=xi;var uo="MenuRadioGroup",[yi,bi]=he(uo,{value:void 0,onValueChange:()=>{}}),lo=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ae(o);return v.jsx(yi,{scope:e.__scopeMenu,value:n,onValueChange:s,children:v.jsx(kt,{...r,ref:t})})});lo.displayName=uo;var fo="MenuRadioItem",po=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=bi(fo,e.__scopeMenu),s=n===r.value;return v.jsx(mo,{scope:e.__scopeMenu,checked:s,children:v.jsx(ot,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Bt(s),onSelect:A(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,n)},{checkForDefaultPrevented:!1})})})});po.displayName=fo;var $t="MenuItemIndicator",[mo,Ei]=he($t,{checked:!1}),ho=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Ei($t,n);return v.jsx(fe,{present:o||Ze(s.checked)||s.checked===!0,children:v.jsx($.span,{...r,ref:t,"data-state":Bt(s.checked)})})});ho.displayName=$t;var Ri="MenuSeparator",go=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return v.jsx($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});go.displayName=Ri;var Ci="MenuArrow",vo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=nt(n);return v.jsx($s,{...r,...o,ref:t})});vo.displayName=Ci;var Si="MenuSub",[_c,wo]=he(Si),Ae="MenuSubTrigger",xo=a.forwardRef((e,t)=>{const n=ge(Ae,e.__scopeMenu),o=je(Ae,e.__scopeMenu),r=wo(Ae,e.__scopeMenu),s=Ft(Ae,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,d={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);a.useEffect(()=>f,[f]),a.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),l(null)}},[c,l]);const u=B(t,r.onTriggerChange);return v.jsx(Nt,{asChild:!0,...d,children:v.jsx(co,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?r.contentId:void 0,"data-state":Eo(n.open),...e,ref:u,onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Ie(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:A(e.onPointerLeave,Ie(m=>{var h,g;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const w=(g=n.content)==null?void 0:g.dataset.side,x=w==="right",b=x?-5:5,y=p[x?"left":"right"],E=p[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x:y,y:p.top},{x:E,y:p.top},{x:E,y:p.bottom},{x:y,y:p.bottom}],side:w}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,m=>{var h;const p=s.searchRef.current!=="";e.disabled||p&&m.key===" "||si[o.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});xo.displayName=Ae;var yo="MenuSubContent",bo=a.forwardRef((e,t)=>{const n=oo(Y,e.__scopeMenu),{forceMount:o=n.forceMount,align:r="start",...s}=e,i=ge(Y,e.__scopeMenu),c=je(Y,e.__scopeMenu),l=wo(yo,e.__scopeMenu),d=a.useRef(null),f=B(t,d);return v.jsx(_e.Provider,{scope:e.__scopeMenu,children:v.jsx(fe,{present:o||i.open,children:v.jsx(_e.Slot,{scope:e.__scopeMenu,children:v.jsx(jt,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:f,align:r,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var m;c.isUsingKeyboardRef.current&&((m=d.current)==null||m.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:A(e.onFocusOutside,u=>{u.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,u=>{c.onClose(),u.preventDefault()}),onKeyDown:A(e.onKeyDown,u=>{var h;const m=u.currentTarget.contains(u.target),p=ii[c.dir].includes(u.key);m&&p&&(i.onOpenChange(!1),(h=l.trigger)==null||h.focus(),u.preventDefault())})})})})})});bo.displayName=yo;function Eo(e){return e?"open":"closed"}function Ze(e){return e==="indeterminate"}function Bt(e){return Ze(e)?"indeterminate":e?"checked":"unchecked"}function Mi(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Pi(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Ai(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Pi(e,Math.max(s,0));r.length===1&&(i=i.filter(d=>d!==n));const l=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Oi(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],l=t[i],d=c.x,f=c.y,u=l.x,m=l.y;f>o!=m>o&&n<(u-d)*(o-f)/(m-f)+d&&(r=!r)}return r}function Di(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Oi(n,t)}function Ie(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _i=no,Ii=Nt,Ti=ro,Ni=so,Li=kt,Fi=io,ji=ot,ki=ao,$i=lo,Bi=po,Ui=ho,Wi=go,Ki=vo,Gi=xo,Vi=bo,rt="DropdownMenu",[Hi]=be(rt,[eo]),W=eo(),[zi,Ro]=Hi(rt),Co=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,l=W(t),d=a.useRef(null),[f,u]=yt({prop:r,defaultProp:s??!1,onChange:i,caller:rt});return v.jsx(zi,{scope:t,triggerId:ve(),triggerRef:d,contentId:ve(),open:f,onOpenChange:u,onOpenToggle:a.useCallback(()=>u(m=>!m),[u]),modal:c,children:v.jsx(_i,{...l,open:f,onOpenChange:u,dir:o,modal:c,children:n})})};Co.displayName=rt;var So="DropdownMenuTrigger",Mo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Ro(So,n),i=W(n),c=B(t,s.triggerRef);return v.jsx(Ii,{asChild:!0,...i,children:v.jsx($.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:c,onPointerDown:A(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:A(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Mo.displayName=So;var Yi="DropdownMenuPortal",Po=e=>{const{__scopeDropdownMenu:t,...n}=e,o=W(t);return v.jsx(Ti,{...o,...n})};Po.displayName=Yi;var Ao="DropdownMenuContent",Oo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ro(Ao,n),s=W(n),i=a.useRef(!1);return v.jsx(Ni,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,c=>{var l;i.current||(l=r.triggerRef.current)==null||l.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:A(e.onInteractOutside,c=>{const l=c.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0,f=l.button===2||d;(!r.modal||f)&&(i.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)"}})});Oo.displayName=Ao;var Xi="DropdownMenuGroup",Zi=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Li,{...r,...o,ref:t})});Zi.displayName=Xi;var qi="DropdownMenuLabel",Ji=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Fi,{...r,...o,ref:t})});Ji.displayName=qi;var Qi="DropdownMenuItem",Do=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(ji,{...r,...o,ref:t})});Do.displayName=Qi;var ec="DropdownMenuCheckboxItem",tc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(ki,{...r,...o,ref:t})});tc.displayName=ec;var nc="DropdownMenuRadioGroup",oc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx($i,{...r,...o,ref:t})});oc.displayName=nc;var rc="DropdownMenuRadioItem",sc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Bi,{...r,...o,ref:t})});sc.displayName=rc;var ic="DropdownMenuItemIndicator",cc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Ui,{...r,...o,ref:t})});cc.displayName=ic;var ac="DropdownMenuSeparator",_o=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Wi,{...r,...o,ref:t})});_o.displayName=ac;var uc="DropdownMenuArrow",lc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Ki,{...r,...o,ref:t})});lc.displayName=uc;var fc="DropdownMenuSubTrigger",dc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Gi,{...r,...o,ref:t})});dc.displayName=fc;var pc="DropdownMenuSubContent",mc=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=W(n);return v.jsx(Vi,{...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)"}})});mc.displayName=pc;var Ic=Co,Tc=Mo,Nc=Po,Lc=Oo,Fc=Do,jc=_o,st="Dialog",[Io]=be(st),[hc,q]=Io(st),gc=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,c=a.useRef(null),l=a.useRef(null),[d,f]=yt({prop:o,defaultProp:r??!1,onChange:s,caller:st});return v.jsx(hc,{scope:t,triggerRef:c,contentRef:l,contentId:ve(),titleId:ve(),descriptionId:ve(),open:d,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(u=>!u),[f]),modal:i,children:n})};gc.displayName=st;var To="DialogTrigger",vc=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=q(To,n),s=B(t,r.triggerRef);return v.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":Wt(r.open),...o,ref:s,onClick:A(e.onClick,r.onOpenToggle)})});vc.displayName=To;var Ut="DialogPortal",[wc,No]=Io(Ut,{forceMount:void 0}),xc=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=q(Ut,t);return v.jsx(wc,{scope:t,forceMount:n,children:a.Children.map(o,i=>v.jsx(fe,{present:n||s.open,children:v.jsx(Tt,{asChild:!0,container:r,children:i})}))})};xc.displayName=Ut;var qe="DialogOverlay",yc=a.forwardRef((e,t)=>{const n=No(qe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=q(qe,e.__scopeDialog);return s.modal?v.jsx(fe,{present:o||s.open,children:v.jsx(Ec,{...r,ref:t})}):null});yc.displayName=qe;var bc=Oe("DialogOverlay.RemoveScroll"),Ec=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=q(qe,n),s=fr(),i=B(t,s);return v.jsx(xn,{as:bc,allowPinchZoom:!0,shards:[r.contentRef],children:v.jsx($.div,{"data-state":Wt(r.open),...o,ref:i,style:{pointerEvents:"auto",...o.style}})})}),ye="DialogContent",Rc=a.forwardRef((e,t)=>{const n=No(ye,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=q(ye,e.__scopeDialog);return v.jsx(fe,{present:o||s.open,children:s.modal?v.jsx(Cc,{...r,ref:t}):v.jsx(Sc,{...r,ref:t})})});Rc.displayName=ye;var Cc=a.forwardRef((e,t)=>{const n=q(ye,e.__scopeDialog),o=a.useRef(null),r=B(t,n.contentRef,o);return a.useEffect(()=>{const s=o.current;if(s)return wn(s)},[]),v.jsx(Lo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault())})}),Sc=a.forwardRef((e,t)=>{const n=q(ye,e.__scopeDialog),o=a.useRef(!1),r=a.useRef(!1);return v.jsx(Lo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Lo=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,c=q(ye,n);return Cn(),v.jsx(v.Fragment,{children:v.jsx(Rt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:v.jsx(Et,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Wt(c.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),Fo="DialogTitle",Mc=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=q(Fo,n);return v.jsx($.h2,{id:r.titleId,...o,ref:t})});Mc.displayName=Fo;var jo="DialogDescription",Pc=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=q(jo,n);return v.jsx($.p,{id:r.descriptionId,...o,ref:t})});Pc.displayName=jo;var ko="DialogClose",Ac=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=q(ko,n);return v.jsx($.button,{type:"button",...o,ref:t,onClick:A(e.onClick,()=>r.onOpenChange(!1))})});Ac.displayName=ko;function Wt(e){return e?"open":"closed"}export{Lc as C,gc as D,Fc as I,Nc as P,Ic as R,jc as S,Tc as T,xc as a,yc as b,Rc as c,Mc as d,Ac as e};
2
+ //# sourceMappingURL=vendor-overlays-Bo99M0pM.js.map