@meridianjs/admin-dashboard 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{HealthReportDetailPage-B_axMvJD.js → HealthReportDetailPage-DNOCBj2U.js} +1 -1
- package/dist/assets/{ProjectHealthPage-BkcsSMV8.js → ProjectHealthPage-3V_xKn6W.js} +1 -1
- package/dist/assets/{ProjectTimelinePage-BUNItutR.js → ProjectTimelinePage-TWQPJXGx.js} +1 -1
- package/dist/assets/WorkspaceReportingPage-EtA8B4LZ.js +1 -0
- package/dist/assets/index-N1f83ywp.css +1 -0
- package/dist/assets/index-WcKp7086.js +642 -0
- package/dist/assets/{parseISO-DVwr6wnl.js → parseISO-BdsFsZH4.js} +1 -1
- package/dist/assets/{vendor-editor-AZ54pP77.js → vendor-editor-Cvk1s7Hk.js} +1 -1
- package/dist/assets/vendor-radix-Bt8AkWnj.js +53 -0
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/WorkspaceReportingPage-DdnHTwRP.js +0 -1
- package/dist/assets/index-C90R1HkN.css +0 -1
- package/dist/assets/index-D9ruAqVw.js +0 -635
- package/dist/assets/vendor-radix-BO9o-Y4t.js +0 -53
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import{r as i,a as at,R as Wn,b as nc,c as Me}from"./vendor-react-Lycsri1F.js";import{j as m}from"./vendor-query-CaIGp3JB.js";function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function mr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Z(...e){return t=>{let n=!1;const r=e.map(o=>{const s=mr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():mr(e[o],null)}}}}function $(...e){return i.useCallback(Z(...e),e)}function rc(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,oc(o,...t)]}function oc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function sc(e){const t=ic(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(ac);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ic(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=uc(o),c=lc(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cc=Symbol("radix.slottable");function ac(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cc}function lc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hr=fc.reduce((e,t)=>{const n=sc(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dc(e,t){e&&at.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function pc(e,t=globalThis==null?void 0:globalThis.document){const n=X(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var mc="DismissableLayer",Pn="dismissableLayer.update",hc="dismissableLayer.pointerDownOutside",vc="dismissableLayer.focusOutside",hr,Ur=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xe=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(Ur),[d,f]=i.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=i.useState({}),g=$(t,b=>f(b)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(y),w=d?h.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,E=xc(b=>{const A=b.target,T=[...u.branches].some(O=>O.contains(A));!C||T||(o==null||o(b),a==null||a(b),b.defaultPrevented||c==null||c())},p),R=wc(b=>{const A=b.target;[...u.branches].some(O=>O.contains(A))||(s==null||s(b),a==null||a(b),b.defaultPrevented||c==null||c())},p);return pc(b=>{w===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&c&&(b.preventDefault(),c()))},p),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hr=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),vr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=hr)}},[d,p,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),vr())},[d,u]),i.useEffect(()=>{const b=()=>v({});return document.addEventListener(Pn,b),()=>document.removeEventListener(Pn,b)},[]),m.jsx(Hr.div,{...l,ref:g,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,R.onFocusCapture),onBlurCapture:P(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,E.onPointerDownCapture)})});Xe.displayName=mc;var gc="DismissableLayerBranch",yc=i.forwardRef((e,t)=>{const n=i.useContext(Ur),r=i.useRef(null),o=$(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(Hr.div,{...e,ref:o})});yc.displayName=gc;function xc(e,t=globalThis==null?void 0:globalThis.document){const n=X(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let l=function(){Kr(hc,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function wc(e,t=globalThis==null?void 0:globalThis.document){const n=X(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Kr(vc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vr(){const e=new CustomEvent(Pn);document.dispatchEvent(e)}function Kr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dc(o,s):o.dispatchEvent(s)}var Y=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Sc=Wn[" useId ".trim().toString()]||(()=>{}),Cc=0;function re(e){const[t,n]=i.useState(Sc());return Y(()=>{n(r=>r??String(Cc++))},[e]),t?`radix-${t}`:""}const bc=["top","right","bottom","left"],Pe=Math.min,ne=Math.max,Dt=Math.round,Pt=Math.floor,ve=e=>({x:e,y:e}),Ec={left:"right",right:"left",bottom:"top",top:"bottom"},Pc={start:"end",end:"start"};function Rn(e,t,n){return ne(e,Pe(t,n))}function Ce(e,t){return typeof e=="function"?e(t):e}function be(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Vn(e){return e==="x"?"y":"x"}function Bn(e){return e==="y"?"height":"width"}const Rc=new Set(["top","bottom"]);function he(e){return Rc.has(be(e))?"y":"x"}function Hn(e){return Vn(he(e))}function _c(e,t,n){n===void 0&&(n=!1);const r=Ze(e),o=Hn(e),s=Bn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=$t(a)),[a,$t(a)]}function Ac(e){const t=$t(e);return[_n(e),t,_n(t)]}function _n(e){return e.replace(/start|end/g,t=>Pc[t])}const gr=["left","right"],yr=["right","left"],Tc=["top","bottom"],Oc=["bottom","top"];function Nc(e,t,n){switch(e){case"top":case"bottom":return n?t?yr:gr:t?gr:yr;case"left":case"right":return t?Tc:Oc;default:return[]}}function Ic(e,t,n,r){const o=Ze(e);let s=Nc(be(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(_n)))),s}function $t(e){return e.replace(/left|right|bottom|top/g,t=>Ec[t])}function Mc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gr(e){return typeof e!="number"?Mc(e):{top:e,right:e,bottom:e,left:e}}function jt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function xr(e,t,n){let{reference:r,floating:o}=e;const s=he(t),a=Hn(t),c=Bn(a),l=be(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let v;switch(l){case"top":v={x:d,y:r.y-o.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(Ze(t)){case"start":v[a]-=p*(n&&u?-1:1);break;case"end":v[a]+=p*(n&&u?-1:1);break}return v}async function Dc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:v=0}=Ce(t,e),g=Gr(v),y=c[p?f==="floating"?"reference":"floating":f],x=jt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:S,strategy:l}):w);return{top:(x.top-E.top+g.top)/C.y,bottom:(E.bottom-x.bottom+g.bottom)/C.y,left:(x.left-E.left+g.left)/C.x,right:(E.right-x.right+g.right)/C.x}}const $c=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=xr(u,r,l),p=r,v={},g=0;for(let y=0;y<c.length;y++){var h;const{name:x,fn:w}=c[y],{x:S,y:C,data:E,reset:R}=await w({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:u,platform:{...a,detectOverflow:(h=a.detectOverflow)!=null?h:Dc},elements:{reference:e,floating:t}});d=S??d,f=C??f,v={...v,[x]:{...v[x],...E}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(u=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=xr(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:v}},jc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ce(e,t)||{};if(u==null)return{};const f=Gr(d),p={x:n,y:r},v=Hn(o),g=Bn(v),h=await a.getDimensions(u),y=v==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[v]-p[v]-s.floating[g],E=p[v]-s.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let b=R?R[S]:0;(!b||!await(a.isElement==null?void 0:a.isElement(R)))&&(b=c.floating[S]||s.floating[g]);const A=C/2-E/2,T=b/2-h[g]/2-1,O=Pe(f[x],T),D=Pe(f[w],T),L=O,F=b-h[g]-D,j=b/2-h[g]/2+A,U=Rn(L,j,F),M=!l.arrow&&Ze(o)!=null&&j!==U&&s.reference[g]/2-(j<L?O:D)-h[g]/2<0,k=M?j<L?j-L:j-F:0;return{[v]:p[v]+k,data:{[v]:U,centerOffset:j-U-k,...M&&{alignmentOffset:k}},reset:M}}}),Lc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=Ce(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=be(o),w=he(c),S=be(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(S||!h?[$t(c)]:Ac(c)),R=g!=="none";!p&&R&&E.push(...Ic(c,h,g,C));const b=[c,...E],A=await l.detectOverflow(t,y),T=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&T.push(A[x]),f){const j=_c(o,a,C);T.push(A[j[0]],A[j[1]])}if(O=[...O,{placement:o,overflows:T}],!T.every(j=>j<=0)){var D,L;const j=(((D=s.flip)==null?void 0:D.index)||0)+1,U=b[j];if(U&&(!(f==="alignment"?w!==he(U):!1)||O.every(N=>he(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:U}};let M=(L=O.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(v){case"bestFit":{var F;const k=(F=O.filter(N=>{if(R){const _=he(N.placement);return _===w||_==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(_=>_>0).reduce((_,K)=>_+K,0)]).sort((N,_)=>N[1]-_[1])[0])==null?void 0:F[0];k&&(M=k);break}case"initialPlacement":M=c;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function wr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sr(e){return bc.some(t=>e[t]>=0)}const Fc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ce(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=wr(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Sr(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),c=wr(a,n.floating);return{data:{escapedOffsets:c,escaped:Sr(c)}}}default:return{}}}}},zr=new Set(["left","top"]);async function kc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=be(n),c=Ze(n),l=he(n)==="y",u=zr.has(a)?-1:1,d=s&&l?-1:1,f=Ce(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(v=c==="end"?g*-1:g),l?{x:v*d,y:p*u}:{x:p*u,y:v*d}}const Wc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:c}=t,l=await kc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:a}}}}},Vc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:w,y:S}=x;return{x:w,y:S}}},...u}=Ce(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),p=he(be(o)),v=Vn(p);let g=d[v],h=d[p];if(a){const x=v==="y"?"top":"left",w=v==="y"?"bottom":"right",S=g+f[x],C=g-f[w];g=Rn(S,g,C)}if(c){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",S=h+f[x],C=h-f[w];h=Rn(S,h,C)}const y=l.fn({...t,[v]:g,[p]:h});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[v]:a,[p]:c}}}}}},Bc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ce(e,t),d={x:n,y:r},f=he(o),p=Vn(f);let v=d[p],g=d[f];const h=Ce(c,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const S=p==="y"?"height":"width",C=s.reference[p]-s.floating[S]+y.mainAxis,E=s.reference[p]+s.reference[S]-y.mainAxis;v<C?v=C:v>E&&(v=E)}if(u){var x,w;const S=p==="y"?"width":"height",C=zr.has(be(o)),E=s.reference[f]-s.floating[S]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:y.crossAxis),R=s.reference[f]+s.reference[S]+(C?0:((w=a.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<E?g=E:g>R&&(g=R)}return{[p]:v,[f]:g}}}},Hc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Ce(e,t),d=await a.detectOverflow(t,u),f=be(o),p=Ze(o),v=he(o)==="y",{width:g,height:h}=s.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=p===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,y=p==="end"?"top":"bottom");const w=h-d.top-d.bottom,S=g-d.left-d.right,C=Pe(h-d[y],w),E=Pe(g-d[x],S),R=!t.middlewareData.shift;let b=C,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=w),R&&!p){const O=ne(d.left,0),D=ne(d.right,0),L=ne(d.top,0),F=ne(d.bottom,0);v?A=g-2*(O!==0||D!==0?O+D:ne(d.left,d.right)):b=h-2*(L!==0||F!==0?L+F:ne(d.top,d.bottom))}await l({...t,availableWidth:A,availableHeight:b});const T=await a.getDimensions(c.floating);return g!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function qe(e){return Yr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(Yr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yr(e){return Kt()?e instanceof Node||e instanceof oe(e).Node:!1}function ue(e){return Kt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Kt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function Cr(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const Uc=new Set(["inline","contents"]);function lt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Uc.has(o)}const Kc=new Set(["table","td","th"]);function Gc(e){return Kc.has(qe(e))}const zc=[":popover-open",":modal"];function Gt(e){return zc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Yc=["transform","translate","scale","rotate","perspective"],Xc=["transform","translate","scale","rotate","perspective","filter"],Zc=["paint","layout","strict","content"];function Un(e){const t=Kn(),n=ue(e)?fe(e):e;return Yc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Xc.some(r=>(n.willChange||"").includes(r))||Zc.some(r=>(n.contain||"").includes(r))}function qc(e){let t=Re(e);for(;ge(t)&&!Ue(t);){if(Un(t))return t;if(Gt(t))return null;t=Re(t)}return null}function Kn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qc=new Set(["html","body","#document"]);function Ue(e){return Qc.has(qe(e))}function fe(e){return oe(e).getComputedStyle(e)}function zt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cr(e)&&e.host||ye(e);return Cr(t)?t.host:t}function Xr(e){const t=Re(e);return Ue(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&<(t)?t:Xr(t)}function ot(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=oe(o);if(s){const c=An(a);return t.concat(a,a.visualViewport||[],lt(o)?o:[],c&&n?ot(c):[])}return t.concat(o,ot(o,[],n))}function An(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zr(e){const t=fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Dt(n)!==s||Dt(r)!==a;return c&&(n=s,r=a),{width:n,height:r,$:c}}function Gn(e){return ue(e)?e:e.contextElement}function Be(e){const t=Gn(e);if(!ge(t))return ve(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Zr(t);let a=(s?Dt(n.width):n.width)/r,c=(s?Dt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Jc=ve(0);function qr(e){const t=oe(e);return!Kn()||!t.visualViewport?Jc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ea(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function De(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Gn(e);let a=ve(1);t&&(r?ue(r)&&(a=Be(r)):a=Be(e));const c=ea(s,n,r)?qr(s):ve(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(s){const p=oe(s),v=r&&ue(r)?oe(r):r;let g=p,h=An(g);for(;h&&r&&v!==g;){const y=Be(h),x=h.getBoundingClientRect(),w=fe(h),S=x.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,C=x.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,f*=y.y,l+=S,u+=C,g=oe(h),h=An(g)}}return jt({width:d,height:f,x:l,y:u})}function Yt(e,t){const n=zt(e).scrollLeft;return t?t.left+n:De(ye(e)).left+n}function Qr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ta(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ye(r),c=t?Gt(t.floating):!1;if(r===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const d=ve(0),f=ge(r);if((f||!f&&!s)&&((qe(r)!=="body"||lt(a))&&(l=zt(r)),ge(r))){const v=De(r);u=Be(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}const p=a&&!f&&!s?Qr(a,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function na(e){return Array.from(e.getClientRects())}function ra(e){const t=ye(e),n=zt(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yt(e);const c=-n.scrollTop;return fe(r).direction==="rtl"&&(a+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:c}}const br=25;function oa(e,t){const n=oe(e),r=ye(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,c=0,l=0;if(o){s=o.width,a=o.height;const d=Kn();(!d||d&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const u=Yt(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-v);g<=br&&(s-=g)}else u<=br&&(s+=u);return{width:s,height:a,x:c,y:l}}const sa=new Set(["absolute","fixed"]);function ia(e,t){const n=De(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ge(e)?Be(e):ve(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:a,height:c,x:l,y:u}}function Er(e,t,n){let r;if(t==="viewport")r=oa(e,n);else if(t==="document")r=ra(ye(e));else if(ue(t))r=ia(t,n);else{const o=qr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jt(r)}function Jr(e,t){const n=Re(e);return n===t||!ue(n)||Ue(n)?!1:fe(n).position==="fixed"||Jr(n,t)}function ca(e,t){const n=t.get(e);if(n)return n;let r=ot(e,[],!1).filter(c=>ue(c)&&qe(c)!=="body"),o=null;const s=fe(e).position==="fixed";let a=s?Re(e):e;for(;ue(a)&&!Ue(a);){const c=fe(a),l=Un(a);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&sa.has(o.position)||lt(a)&&!l&&Jr(e,a))?r=r.filter(d=>d!==a):o=c,a=Re(a)}return t.set(e,r),r}function aa(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Gt(t)?[]:ca(t,this._c):[].concat(n),r],c=a[0],l=a.reduce((u,d)=>{const f=Er(t,d,o);return u.top=ne(f.top,u.top),u.right=Pe(f.right,u.right),u.bottom=Pe(f.bottom,u.bottom),u.left=ne(f.left,u.left),u},Er(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function la(e){const{width:t,height:n}=Zr(e);return{width:t,height:n}}function ua(e,t,n){const r=ge(t),o=ye(t),s=n==="fixed",a=De(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=Yt(o)}if(r||!r&&!s)if((qe(t)!=="body"||lt(o))&&(c=zt(t)),r){const v=De(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Qr(o,c):ve(0),f=a.left+c.scrollLeft-l.x-d.x,p=a.top+c.scrollTop-l.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function mn(e){return fe(e).position==="static"}function Pr(e,t){if(!ge(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function eo(e,t){const n=oe(e);if(Gt(e))return n;if(!ge(e)){let o=Re(e);for(;o&&!Ue(o);){if(ue(o)&&!mn(o))return o;o=Re(o)}return n}let r=Pr(e,t);for(;r&&Gc(r)&&mn(r);)r=Pr(r,t);return r&&Ue(r)&&mn(r)&&!Un(r)?n:r||qc(e)||n}const fa=async function(e){const t=this.getOffsetParent||eo,n=this.getDimensions,r=await n(e.floating);return{reference:ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function da(e){return fe(e).direction==="rtl"}const pa={convertOffsetParentRelativeRectToViewportRelativeRect:ta,getDocumentElement:ye,getClippingRect:aa,getOffsetParent:eo,getElementRects:fa,getClientRects:na,getDimensions:la,getScale:Be,isElement:ue,isRTL:da};function to(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ma(e,t){let n=null,r;const o=ye(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:v}=u;if(c||t(),!p||!v)return;const g=Pt(f),h=Pt(o.clientWidth-(d+p)),y=Pt(o.clientHeight-(f+v)),x=Pt(d),S={rootMargin:-g+"px "+-h+"px "+-y+"px "+-x+"px",threshold:ne(0,Pe(1,l))||1};let C=!0;function E(R){const b=R[0].intersectionRatio;if(b!==l){if(!C)return a();b?a(!1,b):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b===1&&!to(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return a(!0),s}function ha(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Gn(e),d=o||s?[...u?ot(u):[],...ot(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&c?ma(u,n):null;let p=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let g,h=l?De(e):null;l&&y();function y(){const x=De(e);h&&!to(h,x)&&n(),h=x,g=requestAnimationFrame(y)}return n(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const va=Wc,ga=Vc,ya=Lc,xa=Hc,wa=Fc,Rr=jc,Sa=Bc,Ca=(e,t,n)=>{const r=new Map,o={platform:pa,...n},s={...o.platform,_c:r};return $c(e,t,{...o,platform:s})};var ba=typeof document<"u",Ea=function(){},Nt=ba?i.useLayoutEffect:Ea;function Lt(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Lt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function no(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _r(e,t){const n=no(e);return Math.round(t*n)/n}function hn(e){const t=i.useRef(e);return Nt(()=>{t.current=e}),t}function Pa(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=i.useState(r);Lt(p,r)||v(r);const[g,h]=i.useState(null),[y,x]=i.useState(null),w=i.useCallback(N=>{N!==R.current&&(R.current=N,h(N))},[]),S=i.useCallback(N=>{N!==b.current&&(b.current=N,x(N))},[]),C=s||g,E=a||y,R=i.useRef(null),b=i.useRef(null),A=i.useRef(d),T=l!=null,O=hn(l),D=hn(o),L=hn(u),F=i.useCallback(()=>{if(!R.current||!b.current)return;const N={placement:t,strategy:n,middleware:p};D.current&&(N.platform=D.current),Ca(R.current,b.current,N).then(_=>{const K={..._,isPositioned:L.current!==!1};j.current&&!Lt(A.current,K)&&(A.current=K,at.flushSync(()=>{f(K)}))})},[p,t,n,D,L]);Nt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const j=i.useRef(!1);Nt(()=>(j.current=!0,()=>{j.current=!1}),[]),Nt(()=>{if(C&&(R.current=C),E&&(b.current=E),C&&E){if(O.current)return O.current(C,E,F);F()}},[C,E,F,O,T]);const U=i.useMemo(()=>({reference:R,floating:b,setReference:w,setFloating:S}),[w,S]),M=i.useMemo(()=>({reference:C,floating:E}),[C,E]),k=i.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const _=_r(M.floating,d.x),K=_r(M.floating,d.y);return c?{...N,transform:"translate("+_+"px, "+K+"px)",...no(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:K}},[n,c,M.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:U,elements:M,floatingStyles:k}),[d,F,U,M,k])}const Ra=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rr({element:r.current,padding:o}).fn(n):{}:r?Rr({element:r,padding:o}).fn(n):{}}}},_a=(e,t)=>({...va(e),options:[e,t]}),Aa=(e,t)=>({...ga(e),options:[e,t]}),Ta=(e,t)=>({...Sa(e),options:[e,t]}),Oa=(e,t)=>({...ya(e),options:[e,t]}),Na=(e,t)=>({...xa(e),options:[e,t]}),Ia=(e,t)=>({...wa(e),options:[e,t]}),Ma=(e,t)=>({...Ra(e),options:[e,t]});function Da(e){const t=$a(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(La);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function $a(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=ka(o),c=Fa(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ja=Symbol("radix.slottable");function La(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ja}function Fa(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ka(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Va=Wa.reduce((e,t)=>{const n=Da(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ba="Arrow",ro=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(Va.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});ro.displayName=Ba;var Ha=ro;function Ua(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Ka(o,...t)]}function Ka(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ga(e){const t=za(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Xa);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function za(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=qa(o),c=Za(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ya=Symbol("radix.slottable");function Xa(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ya}function Za(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function qa(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qa=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oo=Qa.reduce((e,t)=>{const n=Ga(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ja(e){const[t,n]=i.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zn="Popper",[so,Ae]=Ua(zn),[el,io]=so(zn),co=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return m.jsx(el,{scope:t,anchor:r,onAnchorChange:o,children:n})};co.displayName=zn;var ao="PopperAnchor",lo=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=io(ao,n),a=i.useRef(null),c=$(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:m.jsx(oo.div,{...o,ref:c})});lo.displayName=ao;var Yn="PopperContent",[tl,nl]=so(Yn),uo=i.forwardRef((e,t)=>{var I,V,G,W,B,H;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:g,...h}=e,y=io(Yn,n),[x,w]=i.useState(null),S=$(t,te=>w(te)),[C,E]=i.useState(null),R=Ja(C),b=(R==null?void 0:R.width)??0,A=(R==null?void 0:R.height)??0,T=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],L=D.length>0,F={padding:O,boundary:D.filter(ol),altBoundary:L},{refs:j,floatingStyles:U,placement:M,isPositioned:k,middlewareData:N}=Pa({strategy:"fixed",placement:T,whileElementsMounted:(...te)=>ha(...te,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[_a({mainAxis:o+A,alignmentAxis:a}),l&&Aa({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ta():void 0,...F}),l&&Oa({...F}),Na({...F,apply:({elements:te,rects:pe,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:tc}=pe.reference,Et=te.floating.style;Et.setProperty("--radix-popper-available-width",`${Je}px`),Et.setProperty("--radix-popper-available-height",`${et}px`),Et.setProperty("--radix-popper-anchor-width",`${tt}px`),Et.setProperty("--radix-popper-anchor-height",`${tc}px`)}}),C&&Ma({element:C,padding:c}),sl({arrowWidth:b,arrowHeight:A}),p&&Ia({strategy:"referenceHidden",...F})]}),[_,K]=mo(M),z=X(g);Y(()=>{k&&(z==null||z())},[k,z]);const J=(I=N.arrow)==null?void 0:I.x,we=(V=N.arrow)==null?void 0:V.y,ie=((G=N.arrow)==null?void 0:G.centerOffset)!==0,[Se,ee]=i.useState();return Y(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:k?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(W=N.transformOrigin)==null?void 0:W.x,(B=N.transformOrigin)==null?void 0:B.y].join(" "),...((H=N.hide)==null?void 0:H.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(tl,{scope:n,placedSide:_,onArrowChange:E,arrowX:J,arrowY:we,shouldHideArrow:ie,children:m.jsx(oo.div,{"data-side":_,"data-align":K,...h,ref:S,style:{...h.style,animation:k?void 0:"none"}})})})});uo.displayName=Yn;var fo="PopperArrow",rl={top:"bottom",right:"left",bottom:"top",left:"right"},po=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=nl(fo,r),a=rl[s.placedSide];return m.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:m.jsx(Ha,{...o,ref:n,style:{...o.style,display:"block"}})})});po.displayName=fo;function ol(e){return e!==null}var sl=e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=mo(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",h="";return u==="bottom"?(g=a?f:`${p}px`,h=`${-l}px`):u==="top"?(g=a?f:`${p}px`,h=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=a?f:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,h=a?f:`${v}px`),{data:{x:g,y:h}}}});function mo(e){const[t,n="center"]=e.split("-");return[t,n]}var ut=co,ft=lo,Xt=uo,Zt=po;function il(e){const t=cl(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(ll);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function cl(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=fl(o),c=ul(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var al=Symbol("radix.slottable");function ll(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===al}function ul(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pl=dl.reduce((e,t)=>{const n=il(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ml="Portal",dt=i.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=i.useState(!1);Y(()=>s(!0),[]);const a=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?nc.createPortal(m.jsx(pl.div,{...r,ref:t}),a):null});dt.displayName=ml;function hl(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var Q=e=>{const{present:t,children:n}=e,r=vl(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=$(r.ref,gl(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};Q.displayName="Presence";function vl(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=hl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Rt(r.current);s.current=c==="mounted"?u:"none"},[c]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const p=s.current,v=Rt(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=v=>{const h=Rt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&h&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=v=>{v.target===t&&(s.current=Rt(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Rt(e){return(e==null?void 0:e.animationName)||"none"}function gl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yl(e){const t=xl(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Sl);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function xl(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=bl(o),c=Cl(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ho=Symbol("radix.slottable");function wl(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ho,t}function Sl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ho}function Cl(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var El=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pl=El.reduce((e,t)=>{const n=yl(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Rl=Wn[" useInsertionEffect ".trim().toString()]||Y;function _e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=_l({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${r} is changing from ${f?"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.`),d.current=c},[c,r])}const u=i.useCallback(d=>{var f;if(c){const p=Al(d)?d(e):d;p!==e&&((f=a.current)==null||f.call(a,p))}else s(d)},[c,e,s,a]);return[l,u]}function _l({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return Rl(()=>{s.current=t},[t]),i.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Al(e){return typeof e=="function"}function Tl(e){const t=Ol(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Il);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ol(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=Dl(o),c=Ml(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nl=Symbol("radix.slottable");function Il(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nl}function Ml(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Dl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jl=$l.reduce((e,t)=>{const n=Tl(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ll="VisuallyHidden",go=i.forwardRef((e,t)=>m.jsx(jl.span,{...e,ref:t,style:{...vo,...e.style}}));go.displayName=Ll;var Fl=go,[qt]=rc("Tooltip",[Ae]),Qt=Ae(),yo="TooltipProvider",kl=700,Tn="tooltip.open",[Wl,Xn]=qt(yo),xo=e=>{const{__scopeTooltip:t,delayDuration:n=kl,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(Wl,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:s})};xo.displayName=yo;var st="Tooltip",[Vl,Jt]=qt(st),wo=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=Xn(st,e.__scopeTooltip),u=Qt(t),[d,f]=i.useState(null),p=re(),v=i.useRef(0),g=a??l.disableHoverableContent,h=c??l.delayDuration,y=i.useRef(!1),[x,w]=_e({prop:r,defaultProp:o??!1,onChange:b=>{b?(l.onOpen(),document.dispatchEvent(new CustomEvent(Tn))):l.onClose(),s==null||s(b)},caller:st}),S=i.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y.current=!1,w(!0)},[w]),E=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),R=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,w(!0),v.current=0},h)},[h,w]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(ut,{...u,children:m.jsx(Vl,{scope:t,contentId:p,open:x,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?R():C()},[l.isOpenDelayedRef,R,C]),onTriggerLeave:i.useCallback(()=>{g?E():(window.clearTimeout(v.current),v.current=0)},[E,g]),onOpen:C,onClose:E,disableHoverableContent:g,children:n})})};wo.displayName=st;var On="TooltipTrigger",So=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jt(On,n),s=Xn(On,n),a=Qt(n),c=i.useRef(null),l=$(t,c,o.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(ft,{asChild:!0,...a,children:m.jsx(Pl.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:P(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:P(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:P(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:P(e.onBlur,o.onClose),onClick:P(e.onClick,o.onClose)})})});So.displayName=On;var Bl="TooltipPortal",[mh,Hl]=qt(Bl,{forceMount:void 0}),Ke="TooltipContent",Co=i.forwardRef((e,t)=>{const n=Hl(Ke,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Jt(Ke,e.__scopeTooltip);return m.jsx(Q,{present:r||a.open,children:a.disableHoverableContent?m.jsx(bo,{side:o,...s,ref:t}):m.jsx(Ul,{side:o,...s,ref:t})})}),Ul=i.forwardRef((e,t)=>{const n=Jt(Ke,e.__scopeTooltip),r=Xn(Ke,e.__scopeTooltip),o=i.useRef(null),s=$(t,o),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((g,h)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},w=Xl(x,y.getBoundingClientRect()),S=Zl(x,w),C=ql(h.getBoundingClientRect()),E=Jl([...S,...C]);c(E),f(!0)},[f]);return i.useEffect(()=>()=>p(),[p]),i.useEffect(()=>{if(l&&d){const g=y=>v(y,d),h=y=>v(y,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[l,d,v,p]),i.useEffect(()=>{if(a){const g=h=>{const y=h.target,x={x:h.clientX,y:h.clientY},w=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),S=!Ql(x,a);w?p():S&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,a,u,p]),m.jsx(bo,{...e,ref:s})}),[Kl,Gl]=qt(st,{isInside:!1}),zl=wl("TooltipContent"),bo=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=Jt(Ke,n),u=Qt(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(Tn,d),()=>document.removeEventListener(Tn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=p=>{const v=p.target;v!=null&&v.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(Xt,{"data-state":l.stateAttribute,...u,...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:[m.jsx(zl,{children:r}),m.jsx(Kl,{scope:n,isInside:!0,children:m.jsx(Fl,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Co.displayName=Ke;var Eo="TooltipArrow",Yl=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qt(n);return Gl(Eo,n).isInside?null:m.jsx(Zt,{...o,...r,ref:t})});Yl.displayName=Eo;function Xl(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Zl(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ql(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ql(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Jl(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),eu(t)}function eu(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}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 hh=xo,vh=wo,gh=So,yh=Co,tu=Symbol.for("react.lazy"),Ft=Wn[" use ".trim().toString()];function nu(e){return typeof e=="object"&&e!==null&&"then"in e}function Po(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tu&&"_payload"in e&&nu(e._payload)}function Ro(e){const t=ru(e),n=i.forwardRef((r,o)=>{let{children:s,...a}=r;Po(s)&&typeof Ft=="function"&&(s=Ft(s._payload));const c=i.Children.toArray(s),l=c.find(su);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var xh=Ro("Slot");function ru(e){const t=i.forwardRef((n,r)=>{let{children:o,...s}=n;if(Po(o)&&typeof Ft=="function"&&(o=Ft(o._payload)),i.isValidElement(o)){const a=cu(o),c=iu(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ou=Symbol("radix.slottable");function su(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ou}function iu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function cu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var au=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=au.reduce((e,t)=>{const n=Ro(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lu="Separator",Ar="horizontal",uu=["horizontal","vertical"],_o=i.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ar,...o}=e,s=fu(r)?r:Ar,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return m.jsx(pt.div,{"data-orientation":s,...c,...o,ref:t})});_o.displayName=lu;function fu(e){return uu.includes(e)}var wh=_o;function du(e,t){const n=i.createContext(t),r=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return m.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(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[r,o]}function pu(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,mu(o,...t)]}function mu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function hu(e){const t=vu(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(yu);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vu(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=wu(o),c=xu(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gu=Symbol("radix.slottable");function yu(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gu}function xu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Su=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cu=Su.reduce((e,t)=>{const n=hu(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vn="focusScope.autoFocusOnMount",gn="focusScope.autoFocusOnUnmount",Tr={bubbles:!1,cancelable:!0},bu="FocusScope",mt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(o),d=X(s),f=i.useRef(null),p=$(t,h=>l(h)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let h=function(S){if(v.paused||!c)return;const C=S.target;c.contains(C)?f.current=C:Ee(f.current,{select:!0})},y=function(S){if(v.paused||!c)return;const C=S.relatedTarget;C!==null&&(c.contains(C)||Ee(f.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Ee(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[r,c,v.paused]),i.useEffect(()=>{if(c){Nr.add(v);const h=document.activeElement;if(!c.contains(h)){const x=new CustomEvent(vn,Tr);c.addEventListener(vn,u),c.dispatchEvent(x),x.defaultPrevented||(Eu(Tu(Ao(c)),{select:!0}),document.activeElement===h&&Ee(c))}return()=>{c.removeEventListener(vn,u),setTimeout(()=>{const x=new CustomEvent(gn,Tr);c.addEventListener(gn,d),c.dispatchEvent(x),x.defaultPrevented||Ee(h??document.body,{select:!0}),c.removeEventListener(gn,d),Nr.remove(v)},0)}}},[c,u,d,v]);const g=i.useCallback(h=>{if(!n&&!r||v.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(y&&x){const w=h.currentTarget,[S,C]=Pu(w);S&&C?!h.shiftKey&&x===C?(h.preventDefault(),n&&Ee(S,{select:!0})):h.shiftKey&&x===S&&(h.preventDefault(),n&&Ee(C,{select:!0})):x===w&&h.preventDefault()}},[n,r,v.paused]);return m.jsx(Cu.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});mt.displayName=bu;function Eu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ee(r,{select:t}),document.activeElement!==n)return}function Pu(e){const t=Ao(e),n=Or(t,e),r=Or(t.reverse(),e);return[n,r]}function Ao(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Or(e,t){for(const n of e)if(!Ru(n,{upTo:t}))return n}function Ru(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 _u(e){return e instanceof HTMLInputElement&&"select"in e}function Ee(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_u(e)&&t&&e.select()}}var Nr=Au();function Au(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ir(e,t),e.unshift(t)},remove(t){var n;e=Ir(e,t),(n=e[0])==null||n.resume()}}}function Ir(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Tu(e){return e.filter(t=>t.tagName!=="A")}function To(e){const t=Ou(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Iu);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ou(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=Du(o),c=Mu(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nu=Symbol("radix.slottable");function Iu(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nu}function Mu(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Du(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=$u.reduce((e,t)=>{const n=To(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),yn=0;function en(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mr()),document.body.insertAdjacentElement("beforeend",e[1]??Mr()),yn++,()=>{yn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yn--}},[])}function Mr(){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 me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},me.apply(this,arguments)};function Oo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ju(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var It="right-scroll-bar-position",Mt="width-before-scroll-bar",Lu="with-scroll-bars-hidden",Fu="--removed-body-scroll-bar-size";function xn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ku(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Wu=typeof window<"u"?i.useLayoutEffect:i.useEffect,Dr=new WeakMap;function Vu(e,t){var n=ku(null,function(r){return e.forEach(function(o){return xn(o,r)})});return Wu(function(){var r=Dr.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(c){s.has(c)||xn(c,null)}),s.forEach(function(c){o.has(c)||xn(c,a)})}Dr.set(n,e)},[e]),n}function Bu(e){return e}function Hu(e,t){t===void 0&&(t=Bu);var n=[],r=!1,o={read:function(){if(r)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,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function Uu(e){e===void 0&&(e={});var t=Hu(null);return t.options=me({async:!0,ssr:!1},e),t}var No=function(e){var t=e.sideCar,n=Oo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,me({},n))};No.isSideCarExport=!0;function Ku(e,t){return e.useMedium(t),No}var Io=Uu(),wn=function(){},tn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),o=r[0],s=r[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,v=e.noRelative,g=e.noIsolation,h=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,S=e.gapMode,C=Oo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=Vu([n,t]),b=me(me({},C),o);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:Io,removeScrollBar:u,shards:f,noRelative:v,noIsolation:g,inert:h,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:S}),a?i.cloneElement(i.Children.only(c),me(me({},b),{ref:R})):i.createElement(w,me({},b,{className:l,ref:R}),c))});tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tn.classNames={fullWidth:Mt,zeroRight:It};var Gu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gu();return t&&e.setAttribute("nonce",t),e}function Yu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zu())&&(Yu(t,n),Xu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qu=function(){var e=Zu();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mo=function(){var e=qu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Qu={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Ju=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(r),Sn(o)]},ef=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qu;var t=Ju(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tf=Mo(),He="data-scroll-locked",nf=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Lu,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(He,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`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(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(It,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Mt,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(It," .").concat(It,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Mt," .").concat(Mt,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(He,`] {
|
|
36
|
+
`).concat(Fu,": ").concat(c,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},$r=function(){var e=parseInt(document.body.getAttribute(He)||"0",10);return isFinite(e)?e:0},rf=function(){i.useEffect(function(){return document.body.setAttribute(He,($r()+1).toString()),function(){var e=$r()-1;e<=0?document.body.removeAttribute(He):document.body.setAttribute(He,e.toString())}},[])},of=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;rf();var s=i.useMemo(function(){return ef(o)},[o]);return i.createElement(tf,{styles:nf(s,!t,o,n?"":"!important")})},Nn=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return Nn=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{Nn=!1}var ke=Nn?{passive:!1}:!1,sf=function(e){return e.tagName==="TEXTAREA"},Do=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sf(e)&&n[t]==="visible")},cf=function(e){return Do(e,"overflowY")},af=function(e){return Do(e,"overflowX")},jr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$o(e,r);if(o){var s=jo(e,r),a=s[1],c=s[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uf=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$o=function(e,t){return e==="v"?cf(t):af(t)},jo=function(e,t){return e==="v"?lf(t):uf(t)},ff=function(e,t){return e==="h"&&t==="rtl"?-1:1},df=function(e,t,n,r,o){var s=ff(e,window.getComputedStyle(t).direction),a=s*r,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,p=0;do{if(!c)break;var v=jo(e,c),g=v[0],h=v[1],y=v[2],x=h-y-s*g;(g||x)&&$o(e,c)&&(f+=x,p+=g);var w=c.parentNode;c=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(u=!0),u},At=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lr=function(e){return[e.deltaX,e.deltaY]},Fr=function(e){return e&&"current"in e?e.current:e},pf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mf=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},hf=0,We=[];function vf(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(hf++)[0],s=i.useState(Mo)[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(o));var h=ju([e.lockRef.current],(e.shards||[]).map(Fr),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var x=At(h),w=n.current,S="deltaX"in h?h.deltaX:w[0]-x[0],C="deltaY"in h?h.deltaY:w[1]-x[1],E,R=h.target,b=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in h&&b==="h"&&R.type==="range")return!1;var A=window.getSelection(),T=A&&A.anchorNode,O=T?T===R||T.contains(R):!1;if(O)return!1;var D=jr(b,R);if(!D)return!0;if(D?E=b:(E=b==="v"?"h":"v",D=jr(b,R)),!D)return!1;if(!r.current&&"changedTouches"in h&&(S||C)&&(r.current=E),!E)return!0;var L=r.current||E;return df(L,y,h,L==="h"?S:C)},[]),l=i.useCallback(function(h){var y=h;if(!(!We.length||We[We.length-1]!==s)){var x="deltaY"in y?Lr(y):At(y),w=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&pf(E.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var S=(a.current.shards||[]).map(Fr).filter(Boolean).filter(function(E){return E.contains(y.target)}),C=S.length>0?c(y,S[0]):!a.current.noIsolation;C&&y.cancelable&&y.preventDefault()}}},[]),u=i.useCallback(function(h,y,x,w){var S={name:h,delta:y,target:x,should:w,shadowParent:gf(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),d=i.useCallback(function(h){n.current=At(h),r.current=void 0},[]),f=i.useCallback(function(h){u(h.type,Lr(h),h.target,c(h,e.lockRef.current))},[]),p=i.useCallback(function(h){u(h.type,At(h),h.target,c(h,e.lockRef.current))},[]);i.useEffect(function(){return We.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ke),document.addEventListener("touchmove",l,ke),document.addEventListener("touchstart",d,ke),function(){We=We.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,ke),document.removeEventListener("touchmove",l,ke),document.removeEventListener("touchstart",d,ke)}},[]);var v=e.removeScrollBar,g=e.inert;return i.createElement(i.Fragment,null,g?i.createElement(s,{styles:mf(o)}):null,v?i.createElement(of,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yf=Ku(Io,vf);var vt=i.forwardRef(function(e,t){return i.createElement(tn,me({},e,{ref:t,sideCar:yf}))});vt.classNames=tn.classNames;var xf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ve=new WeakMap,Tt=new WeakMap,Ot={},Cn=0,Lo=function(e){return e&&(e.host||Lo(e.parentNode))},wf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Lo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Sf=function(e,t,n,r){var o=wf(t,Array.isArray(e)?e:[e]);Ot[n]||(Ot[n]=new WeakMap);var s=Ot[n],a=[],c=new Set,l=new Set(o),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(c.has(p))d(p);else try{var v=p.getAttribute(r),g=v!==null&&v!=="false",h=(Ve.get(p)||0)+1,y=(s.get(p)||0)+1;Ve.set(p,h),s.set(p,y),a.push(p),h===1&&g&&Tt.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return d(t),c.clear(),Cn++,function(){a.forEach(function(f){var p=Ve.get(f)-1,v=s.get(f)-1;Ve.set(f,p),s.set(f,v),p||(Tt.has(f)||f.removeAttribute(r),Tt.delete(f)),v||f.removeAttribute(n)}),Cn--,Cn||(Ve=new WeakMap,Ve=new WeakMap,Tt=new WeakMap,Ot={})}},nn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Sf(r,o,n,"aria-hidden")):function(){return null}},rn="Dialog",[Fo,Sh]=pu(rn),[Cf,de]=Fo(rn),ko=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:rn});return m.jsx(Cf,{scope:t,triggerRef:c,contentRef:l,contentId:re(),titleId:re(),descriptionId:re(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};ko.displayName=rn;var Wo="DialogTrigger",Vo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(Wo,n),s=$(t,o.triggerRef);return m.jsx(ht.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qn(o.open),...r,ref:s,onClick:P(e.onClick,o.onOpenToggle)})});Vo.displayName=Wo;var Zn="DialogPortal",[bf,Bo]=Fo(Zn,{forceMount:void 0}),Ho=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=de(Zn,t);return m.jsx(bf,{scope:t,forceMount:n,children:i.Children.map(r,a=>m.jsx(Q,{present:n||s.open,children:m.jsx(dt,{asChild:!0,container:o,children:a})}))})};Ho.displayName=Zn;var kt="DialogOverlay",Uo=i.forwardRef((e,t)=>{const n=Bo(kt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=de(kt,e.__scopeDialog);return s.modal?m.jsx(Q,{present:r||s.open,children:m.jsx(Pf,{...o,ref:t})}):null});Uo.displayName=kt;var Ef=To("DialogOverlay.RemoveScroll"),Pf=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(kt,n);return m.jsx(vt,{as:Ef,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(ht.div,{"data-state":Qn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$e="DialogContent",Ko=i.forwardRef((e,t)=>{const n=Bo($e,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=de($e,e.__scopeDialog);return m.jsx(Q,{present:r||s.open,children:s.modal?m.jsx(Rf,{...o,ref:t}):m.jsx(_f,{...o,ref:t})})});Ko.displayName=$e;var Rf=i.forwardRef((e,t)=>{const n=de($e,e.__scopeDialog),r=i.useRef(null),o=$(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return nn(s)},[]),m.jsx(Go,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.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())})}),_f=i.forwardRef((e,t)=>{const n=de($e,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return m.jsx(Go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Go=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,c=de($e,n),l=i.useRef(null),u=$(t,l);return en(),m.jsxs(m.Fragment,{children:[m.jsx(mt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(Xe,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Qn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Af,{titleId:c.titleId}),m.jsx(Of,{contentRef:l,descriptionId:c.descriptionId})]})]})}),qn="DialogTitle",zo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(qn,n);return m.jsx(ht.h2,{id:o.titleId,...r,ref:t})});zo.displayName=qn;var Yo="DialogDescription",Xo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(Yo,n);return m.jsx(ht.p,{id:o.descriptionId,...r,ref:t})});Xo.displayName=Yo;var Zo="DialogClose",qo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=de(Zo,n);return m.jsx(ht.button,{type:"button",...r,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});qo.displayName=Zo;function Qn(e){return e?"open":"closed"}var Qo="DialogTitleWarning",[Ch,Jo]=du(Qo,{contentName:$e,titleName:qn,docsSlug:"dialog"}),Af=({titleId:e})=>{const t=Jo(Qo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For 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},Tf="DialogDescriptionWarning",Of=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jo(Tf).contentName}}.`;return i.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bh=ko,Eh=Vo,Ph=Ho,Rh=Uo,_h=Ko,Ah=zo,Th=Xo,Oh=qo;function Nf(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,If(o,...t)]}function If(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Mf(e){const t=Df(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(jf);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Df(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=Ff(o),c=Lf(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $f=Symbol("radix.slottable");function jf(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$f}function Lf(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Ff(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wf=kf.reduce((e,t)=>{const n=Mf(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vf(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Bf(o,...t)]}function Bf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function kr(e){const t=Hf(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Kf);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Hf(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=zf(o),c=Gf(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Uf=Symbol("radix.slottable");function Kf(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Uf}function Gf(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function zf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Jn(e){const t=e+"CollectionProvider",[n,r]=Vf(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:y,children:x}=h,w=Me.useRef(null),S=Me.useRef(new Map).current;return m.jsx(o,{scope:y,itemMap:S,collectionRef:w,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=kr(c),u=Me.forwardRef((h,y)=>{const{scope:x,children:w}=h,S=s(c,x),C=$(y,S.collectionRef);return m.jsx(l,{ref:C,children:w})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=kr(d),v=Me.forwardRef((h,y)=>{const{scope:x,children:w,...S}=h,C=Me.useRef(null),E=$(y,C),R=s(d,x);return Me.useEffect(()=>(R.itemMap.set(C,{ref:C,...S}),()=>void R.itemMap.delete(C))),m.jsx(p,{[f]:"",ref:E,children:w})});v.displayName=d;function g(h){const y=s(e+"CollectionConsumer",h);return Me.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const S=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((R,b)=>S.indexOf(R.ref.current)-S.indexOf(b.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},g,r]}function Yf(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Xf(o,...t)]}function Xf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Zf=i.createContext(void 0);function on(e){const t=i.useContext(Zf);return e||t||"ltr"}function es(e){const t=qf(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(Jf);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function qf(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=td(o),c=ed(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qf=Symbol("radix.slottable");function Jf(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qf}function ed(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function td(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],gt=nd.reduce((e,t)=>{const n=es(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rd(e,t){e&&at.flushSync(()=>e.dispatchEvent(t))}function od(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,sd(o,...t)]}function sd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function id(e){const t=cd(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(ld);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function cd(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=fd(o),c=ud(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ad=Symbol("radix.slottable");function ld(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ad}function ud(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ts=dd.reduce((e,t)=>{const n=id(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),bn="rovingFocusGroup.onEntryFocus",pd={bubbles:!1,cancelable:!0},yt="RovingFocusGroup",[In,ns,md]=Jn(yt),[hd,rs]=od(yt,[md]),[vd,gd]=hd(yt),os=i.forwardRef((e,t)=>m.jsx(In.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(In.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(yd,{...e,ref:t})})}));os.displayName=yt;var yd=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=i.useRef(null),v=$(t,p),g=on(s),[h,y]=_e({prop:a,defaultProp:c??null,onChange:l,caller:yt}),[x,w]=i.useState(!1),S=X(u),C=ns(n),E=i.useRef(!1),[R,b]=i.useState(0);return i.useEffect(()=>{const A=p.current;if(A)return A.addEventListener(bn,S),()=>A.removeEventListener(bn,S)},[S]),m.jsx(vd,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:i.useCallback(A=>y(A),[y]),onItemShiftTab:i.useCallback(()=>w(!0),[]),onFocusableItemAdd:i.useCallback(()=>b(A=>A+1),[]),onFocusableItemRemove:i.useCallback(()=>b(A=>A-1),[]),children:m.jsx(ts.div,{tabIndex:x||R===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{E.current=!0}),onFocus:P(e.onFocus,A=>{const T=!E.current;if(A.target===A.currentTarget&&T&&!x){const O=new CustomEvent(bn,pd);if(A.currentTarget.dispatchEvent(O),!O.defaultPrevented){const D=C().filter(M=>M.focusable),L=D.find(M=>M.active),F=D.find(M=>M.id===h),U=[L,F,...D].filter(Boolean).map(M=>M.ref.current);cs(U,d)}}E.current=!1}),onBlur:P(e.onBlur,()=>w(!1))})})}),ss="RovingFocusGroupItem",is=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...c}=e,l=re(),u=s||l,d=gd(ss,n),f=d.currentTabStopId===u,p=ns(n),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:h}=d;return i.useEffect(()=>{if(r)return v(),()=>g()},[r,v,g]),m.jsx(In.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(ts.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:P(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:P(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:P(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=Sd(y,d.orientation,d.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let S=p().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")S.reverse();else if(x==="prev"||x==="next"){x==="prev"&&S.reverse();const C=S.indexOf(y.currentTarget);S=d.loop?Cd(S,C+1):S.slice(C+1)}setTimeout(()=>cs(S))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:h!=null}):a})})});is.displayName=ss;var xd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sd(e,t,n){const r=wd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xd[r]}function cs(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bd=os,Ed=is,Mn=["Enter"," "],Pd=["ArrowDown","PageUp","Home"],as=["ArrowUp","PageDown","End"],Rd=[...Pd,...as],_d={ltr:[...Mn,"ArrowRight"],rtl:[...Mn,"ArrowLeft"]},Ad={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xt="Menu",[it,Td,Od]=Jn(xt),[Fe,ls]=Yf(xt,[Od,Ae,rs]),wt=Ae(),us=rs(),[fs,Te]=Fe(xt),[Nd,St]=Fe(xt),ds=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,c=wt(t),[l,u]=i.useState(null),d=i.useRef(!1),f=X(s),p=on(o);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.jsx(ut,{...c,children:m.jsx(fs,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:m.jsx(Nd,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};ds.displayName=xt;var Id="MenuAnchor",er=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wt(n);return m.jsx(ft,{...o,...r,ref:t})});er.displayName=Id;var tr="MenuPortal",[Md,ps]=Fe(tr,{forceMount:void 0}),ms=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Te(tr,t);return m.jsx(Md,{scope:t,forceMount:n,children:m.jsx(Q,{present:n||s.open,children:m.jsx(dt,{asChild:!0,container:o,children:r})})})};ms.displayName=tr;var ce="MenuContent",[Dd,nr]=Fe(ce),hs=i.forwardRef((e,t)=>{const n=ps(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Te(ce,e.__scopeMenu),a=St(ce,e.__scopeMenu);return m.jsx(it.Provider,{scope:e.__scopeMenu,children:m.jsx(Q,{present:r||s.open,children:m.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?m.jsx($d,{...o,ref:t}):m.jsx(jd,{...o,ref:t})})})})}),$d=i.forwardRef((e,t)=>{const n=Te(ce,e.__scopeMenu),r=i.useRef(null),o=$(t,r);return i.useEffect(()=>{const s=r.current;if(s)return nn(s)},[]),m.jsx(rr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jd=i.forwardRef((e,t)=>{const n=Te(ce,e.__scopeMenu);return m.jsx(rr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ld=es("MenuContent.ScrollLock"),rr=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:v,disableOutsideScroll:g,...h}=e,y=Te(ce,n),x=St(ce,n),w=wt(n),S=us(n),C=Td(n),[E,R]=i.useState(null),b=i.useRef(null),A=$(t,b,y.onContentChange),T=i.useRef(0),O=i.useRef(""),D=i.useRef(0),L=i.useRef(null),F=i.useRef("right"),j=i.useRef(0),U=g?vt:i.Fragment,M=g?{as:Ld,allowPinchZoom:!0}:void 0,k=_=>{var I,V;const K=O.current+_,z=C().filter(G=>!G.disabled),J=document.activeElement,we=(I=z.find(G=>G.ref.current===J))==null?void 0:I.textValue,ie=z.map(G=>G.textValue),Se=Xd(ie,K,we),ee=(V=z.find(G=>G.textValue===Se))==null?void 0:V.ref.current;(function G(W){O.current=W,window.clearTimeout(T.current),W!==""&&(T.current=window.setTimeout(()=>G(""),1e3))})(K),ee&&setTimeout(()=>ee.focus())};i.useEffect(()=>()=>window.clearTimeout(T.current),[]),en();const N=i.useCallback(_=>{var z,J;return F.current===((z=L.current)==null?void 0:z.side)&&qd(_,(J=L.current)==null?void 0:J.area)},[]);return m.jsx(Dd,{scope:n,searchRef:O,onItemEnter:i.useCallback(_=>{N(_)&&_.preventDefault()},[N]),onItemLeave:i.useCallback(_=>{var K;N(_)||((K=b.current)==null||K.focus(),R(null))},[N]),onTriggerLeave:i.useCallback(_=>{N(_)&&_.preventDefault()},[N]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(_=>{L.current=_},[]),children:m.jsx(U,{...M,children:m.jsx(mt,{asChild:!0,trapped:o,onMountAutoFocus:P(s,_=>{var K;_.preventDefault(),(K=b.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:v,children:m.jsx(bd,{asChild:!0,...S,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:R,onEntryFocus:P(l,_=>{x.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(Xt,{role:"menu","aria-orientation":"vertical","data-state":Is(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:P(h.onKeyDown,_=>{const z=_.target.closest("[data-radix-menu-content]")===_.currentTarget,J=_.ctrlKey||_.altKey||_.metaKey,we=_.key.length===1;z&&(_.key==="Tab"&&_.preventDefault(),!J&&we&&k(_.key));const ie=b.current;if(_.target!==ie||!Rd.includes(_.key))return;_.preventDefault();const ee=C().filter(I=>!I.disabled).map(I=>I.ref.current);as.includes(_.key)&&ee.reverse(),zd(ee)}),onBlur:P(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(T.current),O.current="")}),onPointerMove:P(e.onPointerMove,ct(_=>{const K=_.target,z=j.current!==_.clientX;if(_.currentTarget.contains(K)&&z){const J=_.clientX>j.current?"right":"left";F.current=J,j.current=_.clientX}}))})})})})})})});hs.displayName=ce;var Fd="MenuGroup",or=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(gt.div,{role:"group",...r,ref:t})});or.displayName=Fd;var kd="MenuLabel",vs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(gt.div,{...r,ref:t})});vs.displayName=kd;var Wt="MenuItem",Wr="menu.itemSelect",sn=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=i.useRef(null),a=St(Wt,e.__scopeMenu),c=nr(Wt,e.__scopeMenu),l=$(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const p=new CustomEvent(Wr,{bubbles:!0,cancelable:!0});f.addEventListener(Wr,v=>r==null?void 0:r(v),{once:!0}),rd(f,p),p.defaultPrevented?u.current=!1:a.onClose()}};return m.jsx(gs,{...o,ref:l,disabled:n,onClick:P(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),u.current=!0},onPointerUp:P(e.onPointerUp,f=>{var p;u.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:P(e.onKeyDown,f=>{const p=c.searchRef.current!=="";n||p&&f.key===" "||Mn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});sn.displayName=Wt;var gs=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=nr(Wt,n),c=us(n),l=i.useRef(null),u=$(t,l),[d,f]=i.useState(!1),[p,v]=i.useState("");return i.useEffect(()=>{const g=l.current;g&&v((g.textContent??"").trim())},[s.children]),m.jsx(it.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:m.jsx(Ed,{asChild:!0,...c,focusable:!r,children:m.jsx(gt.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:P(e.onPointerMove,ct(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,ct(g=>a.onItemLeave(g))),onFocus:P(e.onFocus,()=>f(!0)),onBlur:P(e.onBlur,()=>f(!1))})})})}),Wd="MenuCheckboxItem",ys=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(bs,{scope:e.__scopeMenu,checked:n,children:m.jsx(sn,{role:"menuitemcheckbox","aria-checked":Vt(n)?"mixed":n,...o,ref:t,"data-state":cr(n),onSelect:P(o.onSelect,()=>r==null?void 0:r(Vt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ys.displayName=Wd;var xs="MenuRadioGroup",[Vd,Bd]=Fe(xs,{value:void 0,onValueChange:()=>{}}),ws=i.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=X(r);return m.jsx(Vd,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(or,{...o,ref:t})})});ws.displayName=xs;var Ss="MenuRadioItem",Cs=i.forwardRef((e,t)=>{const{value:n,...r}=e,o=Bd(Ss,e.__scopeMenu),s=n===o.value;return m.jsx(bs,{scope:e.__scopeMenu,checked:s,children:m.jsx(sn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":cr(s),onSelect:P(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});Cs.displayName=Ss;var sr="MenuItemIndicator",[bs,Hd]=Fe(sr,{checked:!1}),Es=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Hd(sr,n);return m.jsx(Q,{present:r||Vt(s.checked)||s.checked===!0,children:m.jsx(gt.span,{...o,ref:t,"data-state":cr(s.checked)})})});Es.displayName=sr;var Ud="MenuSeparator",Ps=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(gt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ps.displayName=Ud;var Kd="MenuArrow",Rs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wt(n);return m.jsx(Zt,{...o,...r,ref:t})});Rs.displayName=Kd;var ir="MenuSub",[Gd,_s]=Fe(ir),As=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Te(ir,t),a=wt(t),[c,l]=i.useState(null),[u,d]=i.useState(null),f=X(o);return i.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),m.jsx(ut,{...a,children:m.jsx(fs,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:m.jsx(Gd,{scope:t,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:l,children:n})})})};As.displayName=ir;var nt="MenuSubTrigger",Ts=i.forwardRef((e,t)=>{const n=Te(nt,e.__scopeMenu),r=St(nt,e.__scopeMenu),o=_s(nt,e.__scopeMenu),s=nr(nt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),m.jsx(er,{asChild:!0,...u,children:m.jsx(gs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Is(n.open),...e,ref:Z(t,o.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(e.onPointerMove,ct(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:P(e.onPointerLeave,ct(f=>{var v,g;d();const p=(v=n.content)==null?void 0:v.getBoundingClientRect();if(p){const h=(g=n.content)==null?void 0:g.dataset.side,y=h==="right",x=y?-5:5,w=p[y?"left":"right"],S=p[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:w,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x:w,y:p.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:P(e.onKeyDown,f=>{var v;const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||_d[r.dir].includes(f.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),f.preventDefault())})})})});Ts.displayName=nt;var Os="MenuSubContent",Ns=i.forwardRef((e,t)=>{const n=ps(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Te(ce,e.__scopeMenu),a=St(ce,e.__scopeMenu),c=_s(Os,e.__scopeMenu),l=i.useRef(null),u=$(t,l);return m.jsx(it.Provider,{scope:e.__scopeMenu,children:m.jsx(Q,{present:r||s.open,children:m.jsx(it.Slot,{scope:e.__scopeMenu,children:m.jsx(rr,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:P(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:P(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:P(e.onKeyDown,d=>{var v;const f=d.currentTarget.contains(d.target),p=Ad[a.dir].includes(d.key);f&&p&&(s.onOpenChange(!1),(v=c.trigger)==null||v.focus(),d.preventDefault())})})})})})});Ns.displayName=Os;function Is(e){return e?"open":"closed"}function Vt(e){return e==="indeterminate"}function cr(e){return Vt(e)?"indeterminate":e?"checked":"unchecked"}function zd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Yd(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Zd(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function qd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zd(n,t)}function ct(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Qd=ds,Jd=er,ep=ms,tp=hs,np=or,rp=vs,op=sn,sp=ys,ip=ws,cp=Cs,ap=Es,lp=Ps,up=Rs,fp=As,dp=Ts,pp=Ns,cn="DropdownMenu",[mp]=Nf(cn,[ls]),q=ls(),[hp,Ms]=mp(cn),Ds=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=q(t),u=i.useRef(null),[d,f]=_e({prop:o,defaultProp:s??!1,onChange:a,caller:cn});return m.jsx(hp,{scope:t,triggerId:re(),triggerRef:u,contentId:re(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(p=>!p),[f]),modal:c,children:m.jsx(Qd,{...l,open:d,onOpenChange:f,dir:r,modal:c,children:n})})};Ds.displayName=cn;var $s="DropdownMenuTrigger",js=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Ms($s,n),a=q(n);return m.jsx(Jd,{asChild:!0,...a,children:m.jsx(Wf.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":r?"":void 0,disabled:r,...o,ref:Z(t,s.triggerRef),onPointerDown:P(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:P(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});js.displayName=$s;var vp="DropdownMenuPortal",Ls=e=>{const{__scopeDropdownMenu:t,...n}=e,r=q(t);return m.jsx(ep,{...r,...n})};Ls.displayName=vp;var Fs="DropdownMenuContent",ks=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ms(Fs,n),s=q(n),a=i.useRef(!1);return m.jsx(tp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,c=>{var l;a.current||(l=o.triggerRef.current)==null||l.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:P(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(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)"}})});ks.displayName=Fs;var gp="DropdownMenuGroup",yp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(np,{...o,...r,ref:t})});yp.displayName=gp;var xp="DropdownMenuLabel",Ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(rp,{...o,...r,ref:t})});Ws.displayName=xp;var wp="DropdownMenuItem",Vs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(op,{...o,...r,ref:t})});Vs.displayName=wp;var Sp="DropdownMenuCheckboxItem",Bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(sp,{...o,...r,ref:t})});Bs.displayName=Sp;var Cp="DropdownMenuRadioGroup",bp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(ip,{...o,...r,ref:t})});bp.displayName=Cp;var Ep="DropdownMenuRadioItem",Hs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(cp,{...o,...r,ref:t})});Hs.displayName=Ep;var Pp="DropdownMenuItemIndicator",Us=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(ap,{...o,...r,ref:t})});Us.displayName=Pp;var Rp="DropdownMenuSeparator",Ks=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(lp,{...o,...r,ref:t})});Ks.displayName=Rp;var _p="DropdownMenuArrow",Ap=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(up,{...o,...r,ref:t})});Ap.displayName=_p;var Tp=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=q(t),[c,l]=_e({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(fp,{...a,open:c,onOpenChange:l,children:n})},Op="DropdownMenuSubTrigger",Gs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(dp,{...o,...r,ref:t})});Gs.displayName=Op;var Np="DropdownMenuSubContent",zs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(pp,{...o,...r,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)"}})});zs.displayName=Np;var Nh=Ds,Ih=js,Mh=Ls,Dh=ks,$h=Ws,jh=Vs,Lh=Bs,Fh=Hs,kh=Us,Wh=Ks,Vh=Tp,Bh=Gs,Hh=zs;function Ip(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a);c.displayName=s+"Context";const l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Mp(o,...t)]}function Mp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ys={exports:{}},Xs={};/**
|
|
46
|
+
* @license React
|
|
47
|
+
* use-sync-external-store-shim.production.js
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/var Ge=i;function Dp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $p=typeof Object.is=="function"?Object.is:Dp,jp=Ge.useState,Lp=Ge.useEffect,Fp=Ge.useLayoutEffect,kp=Ge.useDebugValue;function Wp(e,t){var n=t(),r=jp({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return Fp(function(){o.value=n,o.getSnapshot=t,En(o)&&s({inst:o})},[e,n,t]),Lp(function(){return En(o)&&s({inst:o}),e(function(){En(o)&&s({inst:o})})},[e]),kp(n),n}function En(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$p(e,n)}catch{return!0}}function Vp(e,t){return t()}var Bp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Vp:Wp;Xs.useSyncExternalStore=Ge.useSyncExternalStore!==void 0?Ge.useSyncExternalStore:Bp;Ys.exports=Xs;var Hp=Ys.exports;function Up(){return Hp.useSyncExternalStore(Kp,()=>!0,()=>!1)}function Kp(){return()=>{}}var ar="Avatar",[Gp]=Ip(ar),[zp,Zs]=Gp(ar),qs=i.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=i.useState("idle");return m.jsx(zp,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:m.jsx(pt.span,{...r,ref:t})})});qs.displayName=ar;var Qs="AvatarImage",Js=i.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Zs(Qs,n),c=Yp(r,s),l=X(u=>{o(u),a.onImageLoadingStatusChange(u)});return Y(()=>{c!=="idle"&&l(c)},[c,l]),c==="loaded"?m.jsx(pt.img,{...s,ref:t,src:r}):null});Js.displayName=Qs;var ei="AvatarFallback",ti=i.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Zs(ei,n),[a,c]=i.useState(r===void 0);return i.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&s.imageLoadingStatus!=="loaded"?m.jsx(pt.span,{...o,ref:t}):null});ti.displayName=ei;function Vr(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Yp(e,{referrerPolicy:t,crossOrigin:n}){const r=Up(),o=i.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[a,c]=i.useState(()=>Vr(s,e));return Y(()=>{c(Vr(s,e))},[s,e]),Y(()=>{const l=f=>()=>{c(f)};if(!s)return;const u=l("loaded"),d=l("error");return s.addEventListener("load",u),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,n,t]),a}var Uh=qs,Kh=Js,Gh=ti,Xp="Label",ni=i.forwardRef((e,t)=>m.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ni.displayName=Xp;var zh=ni;function Zp(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,qp(o,...t)]}function qp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ri(e){const t=Qp(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(em);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Qp(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=nm(o),c=tm(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jp=Symbol("radix.slottable");function em(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jp}function tm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function nm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oi=rm.reduce((e,t)=>{const n=ri(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),an="Popover",[si]=Zp(an,[Ae]),Ct=Ae(),[om,Oe]=si(an),ii=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,c=Ct(t),l=i.useRef(null),[u,d]=i.useState(!1),[f,p]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:an});return m.jsx(ut,{...c,children:m.jsx(om,{scope:t,contentId:re(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(v=>!v),[p]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:a,children:n})})};ii.displayName=an;var ci="PopoverAnchor",sm=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(ci,n),s=Ct(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=o;return i.useEffect(()=>(a(),()=>c()),[a,c]),m.jsx(ft,{...s,...r,ref:t})});sm.displayName=ci;var ai="PopoverTrigger",li=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(ai,n),s=Ct(n),a=$(t,o.triggerRef),c=m.jsx(oi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mi(o.open),...r,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:m.jsx(ft,{asChild:!0,...s,children:c})});li.displayName=ai;var lr="PopoverPortal",[im,cm]=si(lr,{forceMount:void 0}),ui=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Oe(lr,t);return m.jsx(im,{scope:t,forceMount:n,children:m.jsx(Q,{present:n||s.open,children:m.jsx(dt,{asChild:!0,container:o,children:r})})})};ui.displayName=lr;var ze="PopoverContent",fi=i.forwardRef((e,t)=>{const n=cm(ze,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Oe(ze,e.__scopePopover);return m.jsx(Q,{present:r||s.open,children:s.modal?m.jsx(lm,{...o,ref:t}):m.jsx(um,{...o,ref:t})})});fi.displayName=ze;var am=ri("PopoverContent.RemoveScroll"),lm=i.forwardRef((e,t)=>{const n=Oe(ze,e.__scopePopover),r=i.useRef(null),o=$(t,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return nn(a)},[]),m.jsx(vt,{as:am,allowPinchZoom:!0,children:m.jsx(di,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),s.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),um=i.forwardRef((e,t)=>{const n=Oe(ze,e.__scopePopover),r=i.useRef(!1),o=i.useRef(!1);return m.jsx(di,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),di=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Oe(ze,n),v=Ct(n);return en(),m.jsx(mt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(Xt,{"data-state":mi(p.open),role:"dialog",id:p.contentId,...v,...f,ref:t,style:{...f.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)"}})})})}),pi="PopoverClose",fm=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(pi,n);return m.jsx(oi.button,{type:"button",...r,ref:t,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});fm.displayName=pi;var dm="PopoverArrow",pm=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ct(n);return m.jsx(Zt,{...o,...r,ref:t})});pm.displayName=dm;function mi(e){return e?"open":"closed"}var Yh=ii,Xh=li,Zh=ui,qh=fi;function Dn(e,[t,n]){return Math.min(n,Math.max(t,e))}function mm(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,hm(o,...t)]}function hm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function hi(e){const t=vm(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(ym);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vm(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=wm(o),c=xm(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gm=Symbol("radix.slottable");function ym(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gm}function xm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],se=Sm.reduce((e,t)=>{const n=hi(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Cm(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 bm=[" ","Enter","ArrowUp","ArrowDown"],Em=[" ","Enter"],je="Select",[ln,un,Pm]=Jn(je),[Qe]=mm(je,[Pm,Ae]),fn=Ae(),[Rm,Ne]=Qe(je),[_m,Am]=Qe(je),vi=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:v,form:g}=e,h=fn(t),[y,x]=i.useState(null),[w,S]=i.useState(null),[C,E]=i.useState(!1),R=on(u),[b,A]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:je}),[T,O]=_e({prop:a,defaultProp:c,onChange:l,caller:je}),D=i.useRef(null),L=y?g||!!y.closest("form"):!0,[F,j]=i.useState(new Set),U=Array.from(F).map(M=>M.props.value).join(";");return m.jsx(ut,{...h,children:m.jsxs(Rm,{required:v,scope:t,trigger:y,onTriggerChange:x,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:E,contentId:re(),value:T,onValueChange:O,open:b,onOpenChange:A,dir:R,triggerPointerDownPosRef:D,disabled:p,children:[m.jsx(ln.Provider,{scope:t,children:m.jsx(_m,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(M=>{j(k=>new Set(k).add(M))},[]),onNativeOptionRemove:i.useCallback(M=>{j(k=>{const N=new Set(k);return N.delete(M),N})},[]),children:n})}),L?m.jsxs(Wi,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:T,onChange:M=>O(M.target.value),disabled:p,form:g,children:[T===void 0?m.jsx("option",{value:""}):null,Array.from(F)]},U):null]})})};vi.displayName=je;var gi="SelectTrigger",yi=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=fn(n),a=Ne(gi,n),c=a.disabled||r,l=$(t,a.onTriggerChange),u=un(n),d=i.useRef("touch"),[f,p,v]=Bi(h=>{const y=u().filter(S=>!S.disabled),x=y.find(S=>S.value===a.value),w=Hi(y,h,x);w!==void 0&&a.onValueChange(w.value)}),g=h=>{c||(a.onOpenChange(!0),v()),h&&(a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return m.jsx(ft,{asChild:!0,...s,children:m.jsx(se.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":Vi(a.value)?"":void 0,...o,ref:l,onClick:P(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&g(h)}),onPointerDown:P(o.onPointerDown,h=>{d.current=h.pointerType;const y=h.target;y.hasPointerCapture(h.pointerId)&&y.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(g(h),h.preventDefault())}),onKeyDown:P(o.onKeyDown,h=>{const y=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(y&&h.key===" ")&&bm.includes(h.key)&&(g(),h.preventDefault())})})})});yi.displayName=gi;var xi="SelectValue",wi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...c}=e,l=Ne(xi,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=$(t,l.onValueNodeChange);return Y(()=>{u(d)},[u,d]),m.jsx(se.span,{...c,ref:f,style:{pointerEvents:"none"},children:Vi(l.value)?m.jsx(m.Fragment,{children:a}):s})});wi.displayName=xi;var Tm="SelectIcon",Si=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Si.displayName=Tm;var Om="SelectPortal",Ci=e=>m.jsx(dt,{asChild:!0,...e});Ci.displayName=Om;var Le="SelectContent",bi=i.forwardRef((e,t)=>{const n=Ne(Le,e.__scopeSelect),[r,o]=i.useState();if(Y(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?at.createPortal(m.jsx(Ei,{scope:e.__scopeSelect,children:m.jsx(ln.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(Pi,{...e,ref:t})});bi.displayName=Le;var le=10,[Ei,Ie]=Qe(Le),Nm="SelectContentImpl",Im=hi("SelectContent.RemoveScroll"),Pi=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:h,avoidCollisions:y,...x}=e,w=Ne(Le,n),[S,C]=i.useState(null),[E,R]=i.useState(null),b=$(t,I=>C(I)),[A,T]=i.useState(null),[O,D]=i.useState(null),L=un(n),[F,j]=i.useState(!1),U=i.useRef(!1);i.useEffect(()=>{if(S)return nn(S)},[S]),en();const M=i.useCallback(I=>{const[V,...G]=L().map(H=>H.ref.current),[W]=G.slice(-1),B=document.activeElement;for(const H of I)if(H===B||(H==null||H.scrollIntoView({block:"nearest"}),H===V&&E&&(E.scrollTop=0),H===W&&E&&(E.scrollTop=E.scrollHeight),H==null||H.focus(),document.activeElement!==B))return},[L,E]),k=i.useCallback(()=>M([A,S]),[M,A,S]);i.useEffect(()=>{F&&k()},[F,k]);const{onOpenChange:N,triggerPointerDownPosRef:_}=w;i.useEffect(()=>{if(S){let I={x:0,y:0};const V=W=>{var B,H;I={x:Math.abs(Math.round(W.pageX)-(((B=_.current)==null?void 0:B.x)??0)),y:Math.abs(Math.round(W.pageY)-(((H=_.current)==null?void 0:H.y)??0))}},G=W=>{I.x<=10&&I.y<=10?W.preventDefault():S.contains(W.target)||N(!1),document.removeEventListener("pointermove",V),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",G,{capture:!0})}}},[S,N,_]),i.useEffect(()=>{const I=()=>N(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[N]);const[K,z]=Bi(I=>{const V=L().filter(B=>!B.disabled),G=V.find(B=>B.ref.current===document.activeElement),W=Hi(V,I,G);W&&setTimeout(()=>W.ref.current.focus())}),J=i.useCallback((I,V,G)=>{const W=!U.current&&!G;(w.value!==void 0&&w.value===V||W)&&(T(I),W&&(U.current=!0))},[w.value]),we=i.useCallback(()=>S==null?void 0:S.focus(),[S]),ie=i.useCallback((I,V,G)=>{const W=!U.current&&!G;(w.value!==void 0&&w.value===V||W)&&D(I)},[w.value]),Se=r==="popper"?$n:Ri,ee=Se===$n?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:h,avoidCollisions:y}:{};return m.jsx(Ei,{scope:n,content:S,viewport:E,onViewportChange:R,itemRefCallback:J,selectedItem:A,onItemLeave:we,itemTextRefCallback:ie,focusSelectedItem:k,selectedItemText:O,position:r,isPositioned:F,searchRef:K,children:m.jsx(vt,{as:Im,allowPinchZoom:!0,children:m.jsx(mt,{asChild:!0,trapped:w.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:P(o,I=>{var V;(V=w.trigger)==null||V.focus({preventScroll:!0}),I.preventDefault()}),children:m.jsx(Xe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:m.jsx(Se,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:I=>I.preventDefault(),...x,...ee,onPlaced:()=>j(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:P(x.onKeyDown,I=>{const V=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!V&&I.key.length===1&&z(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let W=L().filter(B=>!B.disabled).map(B=>B.ref.current);if(["ArrowUp","End"].includes(I.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const B=I.target,H=W.indexOf(B);W=W.slice(H+1)}setTimeout(()=>M(W)),I.preventDefault()}})})})})})})});Pi.displayName=Nm;var Mm="SelectItemAlignedPosition",Ri=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ne(Le,n),a=Ie(Le,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=$(t,b=>d(b)),p=un(n),v=i.useRef(!1),g=i.useRef(!0),{viewport:h,selectedItem:y,selectedItemText:x,focusSelectedItem:w}=a,S=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&h&&y&&x){const b=s.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(s.dir!=="rtl"){const B=O.left-A.left,H=T.left-B,te=b.left-H,pe=b.width+te,Je=Math.max(pe,A.width),et=window.innerWidth-le,tt=Dn(H,[le,Math.max(le,et-Je)]);c.style.minWidth=pe+"px",c.style.left=tt+"px"}else{const B=A.right-O.right,H=window.innerWidth-T.right-B,te=window.innerWidth-b.right-H,pe=b.width+te,Je=Math.max(pe,A.width),et=window.innerWidth-le,tt=Dn(H,[le,Math.max(le,et-Je)]);c.style.minWidth=pe+"px",c.style.right=tt+"px"}const D=p(),L=window.innerHeight-le*2,F=h.scrollHeight,j=window.getComputedStyle(u),U=parseInt(j.borderTopWidth,10),M=parseInt(j.paddingTop,10),k=parseInt(j.borderBottomWidth,10),N=parseInt(j.paddingBottom,10),_=U+M+F+N+k,K=Math.min(y.offsetHeight*5,_),z=window.getComputedStyle(h),J=parseInt(z.paddingTop,10),we=parseInt(z.paddingBottom,10),ie=b.top+b.height/2-le,Se=L-ie,ee=y.offsetHeight/2,I=y.offsetTop+ee,V=U+M+I,G=_-V;if(V<=ie){const B=D.length>0&&y===D[D.length-1].ref.current;c.style.bottom="0px";const H=u.clientHeight-h.offsetTop-h.offsetHeight,te=Math.max(Se,ee+(B?we:0)+H+k),pe=V+te;c.style.height=pe+"px"}else{const B=D.length>0&&y===D[0].ref.current;c.style.top="0px";const te=Math.max(ie,U+h.offsetTop+(B?J:0)+ee)+G;c.style.height=te+"px",h.scrollTop=V-ie+h.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[p,s.trigger,s.valueNode,c,u,h,y,x,s.dir,r]);Y(()=>S(),[S]);const[C,E]=i.useState();Y(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const R=i.useCallback(b=>{b&&g.current===!0&&(S(),w==null||w(),g.current=!1)},[S,w]);return m.jsx($m,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:m.jsx(se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ri.displayName=Mm;var Dm="SelectPopperPosition",$n=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=le,...s}=e,a=fn(n);return m.jsx(Xt,{...a,...s,ref:t,align:r,collisionPadding:o,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)"}})});$n.displayName=Dm;var[$m,ur]=Qe(Le,{}),jn="SelectViewport",_i=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ie(jn,n),a=ur(jn,n),c=$(t,s.onViewportChange),l=i.useRef(0);return m.jsxs(m.Fragment,{children:[m.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:r}),m.jsx(ln.Slot,{scope:n,children:m.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:P(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const g=window.innerHeight-le*2,h=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),x=Math.max(h,y);if(x<g){const w=x+v,S=Math.min(g,w),C=w-S;f.style.height=S+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});_i.displayName=jn;var Ai="SelectGroup",[jm,Lm]=Qe(Ai),Fm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=re();return m.jsx(jm,{scope:n,id:o,children:m.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Fm.displayName=Ai;var Ti="SelectLabel",Oi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lm(Ti,n);return m.jsx(se.div,{id:o.id,...r,ref:t})});Oi.displayName=Ti;var Bt="SelectItem",[km,Ni]=Qe(Bt),Ii=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,c=Ne(Bt,n),l=Ie(Bt,n),u=c.value===r,[d,f]=i.useState(s??""),[p,v]=i.useState(!1),g=$(t,w=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,w,r,o)}),h=re(),y=i.useRef("touch"),x=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")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 m.jsx(km,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:i.useCallback(w=>{f(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:m.jsx(ln.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:m.jsx(se.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:g,onFocus:P(a.onFocus,()=>v(!0)),onBlur:P(a.onBlur,()=>v(!1)),onClick:P(a.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:P(a.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:P(a.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:P(a.onPointerMove,w=>{var S;y.current=w.pointerType,o?(S=l.onItemLeave)==null||S.call(l):y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(a.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:P(a.onKeyDown,w=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&w.key===" "||(Em.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});Ii.displayName=Bt;var rt="SelectItemText",Mi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=Ne(rt,n),c=Ie(rt,n),l=Ni(rt,n),u=Am(rt,n),[d,f]=i.useState(null),p=$(t,x=>f(x),l.onItemTextChange,x=>{var w;return(w=c.itemTextRefCallback)==null?void 0:w.call(c,x,l.value,l.disabled)}),v=d==null?void 0:d.textContent,g=i.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=u;return Y(()=>(h(g),()=>y(g)),[h,y,g]),m.jsxs(m.Fragment,{children:[m.jsx(se.span,{id:l.textId,...s,ref:p}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?at.createPortal(s.children,a.valueNode):null]})});Mi.displayName=rt;var Di="SelectItemIndicator",$i=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ni(Di,n).isSelected?m.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});$i.displayName=Di;var Ln="SelectScrollUpButton",ji=i.forwardRef((e,t)=>{const n=Ie(Ln,e.__scopeSelect),r=ur(Ln,e.__scopeSelect),[o,s]=i.useState(!1),a=$(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?m.jsx(Fi,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});ji.displayName=Ln;var Fn="SelectScrollDownButton",Li=i.forwardRef((e,t)=>{const n=Ie(Fn,e.__scopeSelect),r=ur(Fn,e.__scopeSelect),[o,s]=i.useState(!1),a=$(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?m.jsx(Fi,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Li.displayName=Fn;var Fi=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ie("SelectScrollButton",n),a=i.useRef(null),c=un(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),Y(()=>{var d;const u=c().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[c]),m.jsx(se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:P(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:P(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:P(o.onPointerLeave,()=>{l()})})}),Wm="SelectSeparator",ki=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});ki.displayName=Wm;var kn="SelectArrow",Vm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fn(n),s=Ne(kn,n),a=Ie(kn,n);return s.open&&a.position==="popper"?m.jsx(Zt,{...o,...r,ref:t}):null});Vm.displayName=kn;var Bm="SelectBubbleInput",Wi=i.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=i.useRef(null),s=$(r,o),a=Cm(t);return i.useEffect(()=>{const c=o.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),m.jsx(se.select,{...n,style:{...vo,...n.style},ref:s,defaultValue:t})});Wi.displayName=Bm;function Vi(e){return e===""||e===void 0}function Bi(e){const t=X(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback(a=>{const c=n.current+a;t(c),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Hi(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Hm(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Hm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qh=vi,Jh=yi,ev=wi,tv=Si,nv=Ci,rv=bi,ov=_i,sv=Oi,iv=Ii,cv=Mi,av=$i,lv=ji,uv=Li,fv=ki;function Um(e){const t=Km(e),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),l=c.find(zm);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Km(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const a=Xm(o),c=Ym(s,o.props);return o.type!==i.Fragment&&(c.ref=r?Z(r,a):a),i.cloneElement(o,c)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gm=Symbol("radix.slottable");function zm(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gm}function Ym(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const l=s(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Xm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bt=Zm.reduce((e,t)=>{const n=Um(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qm(e,t=[]){let n=[];function r(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{var x;const{scope:p,children:v,...g}=f,h=((x=p==null?void 0:p[e])==null?void 0:x[l])||c,y=i.useMemo(()=>g,Object.values(g));return m.jsx(h.Provider,{value:y,children:v})};u.displayName=s+"Provider";function d(f,p){var h;const v=((h=p==null?void 0:p[e])==null?void 0:h[l])||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Qm(o,...t)]}function Qm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Jm(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var fr="ScrollArea",[Ui]=qm(fr),[eh,ae]=Ui(fr),Ki=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...a}=e,[c,l]=i.useState(null),[u,d]=i.useState(null),[f,p]=i.useState(null),[v,g]=i.useState(null),[h,y]=i.useState(null),[x,w]=i.useState(0),[S,C]=i.useState(0),[E,R]=i.useState(!1),[b,A]=i.useState(!1),T=$(t,D=>l(D)),O=on(o);return m.jsx(eh,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:y,scrollbarYEnabled:b,onScrollbarYEnabledChange:A,onCornerWidthChange:w,onCornerHeightChange:C,children:m.jsx(bt.div,{dir:O,...a,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});Ki.displayName=fr;var Gi="ScrollAreaViewport",zi=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,a=ae(Gi,n),c=i.useRef(null),l=$(t,c,a.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(bt.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});zi.displayName=Gi;var xe="ScrollAreaScrollbar",th=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ae(xe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=o,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):a(!0),()=>{c?s(!1):a(!1)}),[c,s,a]),o.type==="hover"?m.jsx(nh,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(rh,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(Yi,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(dr,{...r,ref:t}):null});th.displayName=xe;var nh=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ae(xe,e.__scopeScrollArea),[s,a]=i.useState(!1);return i.useEffect(()=>{const c=o.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(Q,{present:n||s,children:m.jsx(Yi,{"data-state":s?"visible":"hidden",...r,ref:t})})}),rh=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ae(xe,e.__scopeScrollArea),s=e.orientation==="horizontal",a=pn(()=>l("SCROLL_END"),100),[c,l]=Jm("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,o.scrollHideDelay,l]),i.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const p=()=>{const v=u[d];f!==v&&(l("SCROLL"),a()),f=v};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,s,l,a]),m.jsx(Q,{present:n||c!=="hidden",children:m.jsx(dr,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:P(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:P(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Yi=i.forwardRef((e,t)=>{const n=ae(xe,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,a]=i.useState(!1),c=e.orientation==="horizontal",l=pn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:d)}},10);return Ye(n.viewport,l),Ye(n.content,l),m.jsx(Q,{present:r||s,children:m.jsx(dr,{"data-state":s?"visible":"hidden",...o,ref:t})})}),dr=i.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ae(xe,e.__scopeScrollArea),s=i.useRef(null),a=i.useRef(0),[c,l]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Qi(c.viewport,c.content),d={...r,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function f(p,v){return uh(p,a.current,c,v)}return n==="horizontal"?m.jsx(oh,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,v=Br(p,c,o.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):n==="vertical"?m.jsx(sh,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,v=Br(p,c);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),oh=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=$(t,l,s.onScrollbarXChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),m.jsx(Zi,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":dn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),ec(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ut(a.paddingLeft),paddingEnd:Ut(a.paddingRight)}})}})}),sh=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=$(t,l,s.onScrollbarYChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),m.jsx(Zi,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":dn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),ec(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ut(a.paddingTop),paddingEnd:Ut(a.paddingBottom)}})}})}),[ih,Xi]=Ui(xe),Zi=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,v=ae(xe,n),[g,h]=i.useState(null),y=$(t,T=>h(T)),x=i.useRef(null),w=i.useRef(""),S=v.viewport,C=r.content-r.viewport,E=X(d),R=X(l),b=pn(f,10);function A(T){if(x.current){const O=T.clientX-x.current.left,D=T.clientY-x.current.top;u({x:O,y:D})}}return i.useEffect(()=>{const T=O=>{const D=O.target;(g==null?void 0:g.contains(D))&&E(O,C)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[S,g,C,E]),i.useEffect(R,[r,R]),Ye(g,b),Ye(v.content,b),m.jsx(ih,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:X(s),onThumbPointerUp:X(a),onThumbPositionChange:R,onThumbPointerDown:X(c),children:m.jsx(bt.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:P(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),x.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(T))}),onPointerMove:P(e.onPointerMove,A),onPointerUp:P(e.onPointerUp,T=>{const O=T.target;O.hasPointerCapture(T.pointerId)&&O.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=w.current,v.viewport&&(v.viewport.style.scrollBehavior=""),x.current=null})})})}),Ht="ScrollAreaThumb",ch=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Xi(Ht,e.__scopeScrollArea);return m.jsx(Q,{present:n||o.hasThumb,children:m.jsx(ah,{ref:t,...r})})}),ah=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=ae(Ht,n),a=Xi(Ht,n),{onThumbPositionChange:c}=a,l=$(t,f=>a.onThumbChange(f)),u=i.useRef(void 0),d=pn(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const p=()=>{if(d(),!u.current){const v=fh(f,c);u.current=v,c()}};return c(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[s.viewport,d,c]),m.jsx(bt.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:P(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),g=f.clientX-v.left,h=f.clientY-v.top;a.onThumbPointerDown({x:g,y:h})}),onPointerUp:P(e.onPointerUp,a.onThumbPointerUp)})});ch.displayName=Ht;var pr="ScrollAreaCorner",qi=i.forwardRef((e,t)=>{const n=ae(pr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(lh,{...e,ref:t}):null});qi.displayName=pr;var lh=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ae(pr,n),[s,a]=i.useState(0),[c,l]=i.useState(0),u=!!(s&&c);return Ye(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),Ye(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?m.jsx(bt.div,{...r,ref:t,style:{width:s,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ut(e){return e?parseInt(e,10):0}function Qi(e,t){const n=e/t;return isNaN(n)?0:n}function dn(e){const t=Qi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function uh(e,t,n,r="ltr"){const o=dn(n),s=o/2,a=t||s,c=o-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Ji([l,u],f)(e)}function Br(e,t,n="ltr"){const r=dn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,a=t.content-t.viewport,c=s-r,l=n==="ltr"?[0,a]:[a*-1,0],u=Dn(e,l);return Ji([0,a],[0,c])(u)}function Ji(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ec(e,t){return e>0&&e<t}var fh=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,c=n.top!==s.top;(a||c)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function pn(e,t){const n=X(e),r=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),i.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ye(e,t){const n=X(t);Y(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var dv=Ki,pv=zi,mv=qi;export{_e as $,Xh as A,Jh as B,yh as C,Th as D,tv as E,Gh as F,lv as G,uv as H,jh as I,nv as J,rv as K,$h as L,sv as M,iv as N,Rh as O,hh as P,av as Q,vh as R,xh as S,gh as T,cv as U,ov as V,fv as W,Qh as X,ev as Y,Z,Q as _,wh as a,$ as a0,P as a1,Cm as a2,Ja as a3,Ch as a4,Sh as a5,Eh as a6,dv as a7,pv as a8,mv as a9,th as aa,ch as ab,dp as ac,pp as ad,ep as ae,tp as af,op as ag,sp as ah,ap as ai,cp as aj,rp as ak,lp as al,ls as am,X as an,Qd as ao,Jd as ap,np as aq,ip as ar,up as as,Ph as b,_h as c,Oh as d,Ah as e,bh as f,Bh as g,Hh as h,Mh as i,Dh as j,Lh as k,kh as l,Fh as m,Wh as n,Nh as o,Ih as p,Vh as q,Uh as r,Hp as s,Kh as t,re as u,pt as v,zh as w,Zh as x,qh as y,Yh as z};
|
package/dist/index.html
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
/>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-WcKp7086.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Lycsri1F.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/vendor-query-CaIGp3JB.js">
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-radix-
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-radix-Bt8AkWnj.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/vendor-dnd-DuI-3XLF.js">
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-editor-
|
|
20
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-editor-Cvk1s7Hk.js">
|
|
20
|
+
<link rel="stylesheet" crossorigin href="/assets/index-N1f83ywp.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
23
23
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./vendor-query-CaIGp3JB.js";import{b8 as t,b9 as i}from"./index-D9ruAqVw.js";import"./vendor-react-Lycsri1F.js";import"./vendor-radix-BO9o-Y4t.js";import"./vendor-dnd-DuI-3XLF.js";import"./vendor-editor-AZ54pP77.js";function u(){const{workspace:o}=t();return r.jsx(i,{workspaceId:o==null?void 0:o.id})}export{u as WorkspaceReportingPage};
|