@yuno-payments/dashboard-design-system 2.0.4-beta.1 → 2.0.4-beta.2
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/index.esm.min.js
CHANGED
|
@@ -17036,6 +17036,10 @@ function AF({
|
|
|
17036
17036
|
initialFocus: !0,
|
|
17037
17037
|
fromDate: s,
|
|
17038
17038
|
toDate: i,
|
|
17039
|
+
disabled: [
|
|
17040
|
+
...s ? [{ before: s }] : [],
|
|
17041
|
+
...i ? [{ after: i }] : []
|
|
17042
|
+
],
|
|
17039
17043
|
captionLayout: M,
|
|
17040
17044
|
fromYear: x,
|
|
17041
17045
|
toYear: E,
|
package/dist/index.umd.min.js
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
`)},o7=function(){var e=parseInt(document.body.getAttribute(sa)||"0",10);return isFinite(e)?e:0},sF=function(){t.useEffect(function(){return document.body.setAttribute(sa,(o7()+1).toString()),function(){var e=o7()-1;e<=0?document.body.removeAttribute(sa):document.body.setAttribute(sa,e.toString())}},[])},iF=function(e){var a=e.noRelative,n=e.noImportant,r=e.gapMode,l=r===void 0?"margin":r;sF();var o=t.useMemo(function(){return rF(l)},[l]);return t.createElement(lF,{styles:oF(o,!a,l,n?"":"!important")})},xo=!1;if(typeof window<"u")try{var Hr=Object.defineProperty({},"passive",{get:function(){return xo=!0,!0}});window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{xo=!1}var ia=xo?{passive:!1}:!1,cF=function(e){return e.tagName==="TEXTAREA"},s7=function(e,a){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[a]!=="hidden"&&!(n.overflowY===n.overflowX&&!cF(e)&&n[a]==="visible")},dF=function(e){return s7(e,"overflowY")},uF=function(e){return s7(e,"overflowX")},i7=function(e,a){var n=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var l=c7(e,r);if(l){var o=d7(e,r),s=o[1],i=o[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mF=function(e){var a=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[a,n,r]},fF=function(e){var a=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[a,n,r]},c7=function(e,a){return e==="v"?dF(a):uF(a)},d7=function(e,a){return e==="v"?mF(a):fF(a)},hF=function(e,a){return e==="h"&&a==="rtl"?-1:1},pF=function(e,a,n,r,l){var o=hF(e,window.getComputedStyle(a).direction),s=o*r,i=n.target,d=a.contains(i),m=!1,f=s>0,u=0,h=0;do{if(!i)break;var p=d7(e,i),g=p[0],v=p[1],A=p[2],M=v-A-o*g;(g||M)&&c7(e,i)&&(u+=M,h+=g);var E=i.parentNode;i=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&i!==document.body||d&&(a.contains(i)||a===i));return(f&&Math.abs(u)<1||!f&&Math.abs(h)<1)&&(m=!0),m},Zr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},u7=function(e){return[e.deltaX,e.deltaY]},m7=function(e){return e&&"current"in e?e.current:e},gF=function(e,a){return e[0]===a[0]&&e[1]===a[1]},vF=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},AF=0,ca=[];function MF(e){var a=t.useRef([]),n=t.useRef([0,0]),r=t.useRef(),l=t.useState(AF++)[0],o=t.useState(l7)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var v=TS([e.lockRef.current],(e.shards||[]).map(m7),!0).filter(Boolean);return v.forEach(function(A){return A.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),v.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var i=t.useCallback(function(v,A){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var M=Zr(v),E=n.current,x="deltaX"in v?v.deltaX:E[0]-M[0],H="deltaY"in v?v.deltaY:E[1]-M[1],y,b=v.target,V=Math.abs(x)>Math.abs(H)?"h":"v";if("touches"in v&&V==="h"&&b.type==="range")return!1;var S=i7(V,b);if(!S)return!0;if(S?y=V:(y=V==="v"?"h":"v",S=i7(V,b)),!S)return!1;if(!r.current&&"changedTouches"in v&&(x||H)&&(r.current=y),!y)return!0;var j=r.current||y;return pF(j,A,v,j==="h"?x:H)},[]),d=t.useCallback(function(v){var A=v;if(!(!ca.length||ca[ca.length-1]!==o)){var M="deltaY"in A?u7(A):Zr(A),E=a.current.filter(function(y){return y.name===A.type&&(y.target===A.target||A.target===y.shadowParent)&&gF(y.delta,M)})[0];if(E&&E.should){A.cancelable&&A.preventDefault();return}if(!E){var x=(s.current.shards||[]).map(m7).filter(Boolean).filter(function(y){return y.contains(A.target)}),H=x.length>0?i(A,x[0]):!s.current.noIsolation;H&&A.cancelable&&A.preventDefault()}}},[]),m=t.useCallback(function(v,A,M,E){var x={name:v,delta:A,target:M,should:E,shadowParent:EF(M)};a.current.push(x),setTimeout(function(){a.current=a.current.filter(function(H){return H!==x})},1)},[]),f=t.useCallback(function(v){n.current=Zr(v),r.current=void 0},[]),u=t.useCallback(function(v){m(v.type,u7(v),v.target,i(v,e.lockRef.current))},[]),h=t.useCallback(function(v){m(v.type,Zr(v),v.target,i(v,e.lockRef.current))},[]);t.useEffect(function(){return ca.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",d,ia),document.addEventListener("touchmove",d,ia),document.addEventListener("touchstart",f,ia),function(){ca=ca.filter(function(v){return v!==o}),document.removeEventListener("wheel",d,ia),document.removeEventListener("touchmove",d,ia),document.removeEventListener("touchstart",f,ia)}},[]);var p=e.removeScrollBar,g=e.inert;return t.createElement(t.Fragment,null,g?t.createElement(o,{styles:vF(l)}):null,p?t.createElement(iF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EF(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const xF=qS(r7,MF);var gn=t.forwardRef(function(e,a){return t.createElement(xr,g1({},e,{ref:a,sideCar:xF}))});gn.classNames=xr.classNames;var yr="Popover",[f7]=Y0(yr,[O1]),vn=O1(),[HF,W1]=f7(yr),h7=e=>{const{__scopePopover:a,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:s=!1}=e,i=vn(a),d=t.useRef(null),[m,f]=t.useState(!1),[u,h]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:yr});return c.jsx(an,{...i,children:c.jsx(HF,{scope:a,contentId:P0(),triggerRef:d,open:u,onOpenChange:h,onOpenToggle:t.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:m,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:s,children:n})})};h7.displayName=yr;var p7="PopoverAnchor",ZF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(p7,n),o=vn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=l;return t.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(nn,{...o,...r,ref:a})});ZF.displayName=p7;var g7="PopoverTrigger",v7=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(g7,n),o=vn(n),s=p0(a,l.triggerRef),i=c.jsx(a0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":H7(l.open),...r,ref:s,onClick:X(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?i:c.jsx(nn,{asChild:!0,...o,children:i})});v7.displayName=g7;var Ho="PopoverPortal",[yF,wF]=f7(Ho,{forceMount:void 0}),A7=e=>{const{__scopePopover:a,forceMount:n,children:r,container:l}=e,o=W1(Ho,a);return c.jsx(yF,{scope:a,forceMount:n,children:c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:r})})})};A7.displayName=Ho;var da="PopoverContent",M7=t.forwardRef((e,a)=>{const n=wF(da,e.__scopePopover),{forceMount:r=n.forceMount,...l}=e,o=W1(da,e.__scopePopover);return c.jsx(ue,{present:r||o.open,children:o.modal?c.jsx(VF,{...l,ref:a}):c.jsx(CF,{...l,ref:a})})});M7.displayName=da;var bF=FS("PopoverContent.RemoveScroll"),VF=t.forwardRef((e,a)=>{const n=W1(da,e.__scopePopover),r=t.useRef(null),l=p0(a,r),o=t.useRef(!1);return t.useEffect(()=>{const s=r.current;if(s)return Ar(s)},[]),c.jsx(gn,{as:bF,allowPinchZoom:!0,children:c.jsx(E7,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{s.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,m=i.button===2||d;o.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),CF=t.forwardRef((e,a)=>{const n=W1(da,e.__scopePopover),r=t.useRef(!1),l=t.useRef(!1);return c.jsx(E7,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,l.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&l.current&&o.preventDefault()}})}),E7=t.forwardRef((e,a)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:l,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:f,...u}=e,h=W1(da,n),p=vn(n);return pr(),c.jsx(pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:l,onUnmountAutoFocus:o,children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:m,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(B2,{"data-state":H7(h.open),role:"dialog",id:h.contentId,...p,...u,ref:a,style:{...u.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)"}})})})}),x7="PopoverClose",LF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(x7,n);return c.jsx(a0.button,{type:"button",...r,ref:a,onClick:X(e.onClick,()=>l.onOpenChange(!1))})});LF.displayName=x7;var SF="PopoverArrow",FF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=vn(n);return c.jsx(W2,{...l,...r,ref:a})});FF.displayName=SF;function H7(e){return e?"open":"closed"}var Z7=h7,y7=v7,w7=A7,wr=M7;const br=Z7,Vr=y7,An=t.forwardRef(({className:e,align:a="center",sideOffset:n=4,...r},l)=>c.jsx(w7,{children:c.jsx(wr,{ref:l,align:a,sideOffset:n,className:w("z-popover w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));An.displayName=wr.displayName;const _F=_0("",{variants:{orientation:{vertical:"flex flex-col gap-2",horizontal:"flex flex-row items-start gap-4",responsive:"flex flex-col gap-2 @container/field-group:flex-row @container/field-group:items-start @container/field-group:gap-4"}},defaultVariants:{orientation:"vertical"}}),NF=t.forwardRef(({className:e,...a},n)=>c.jsx("fieldset",{ref:n,className:w("space-y-6",e),...a}));NF.displayName="FieldSet";const RF=_0("",{variants:{variant:{legend:"text-base font-semibold",label:"text-sm font-medium"}},defaultVariants:{variant:"legend"}}),jF=t.forwardRef(({className:e,variant:a,...n},r)=>c.jsx("legend",{ref:r,className:w(RF({variant:a}),e),...n}));jF.displayName="FieldLegend";const kF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex flex-col gap-6",e),...a}));kF.displayName="FieldGroup";const ht=t.forwardRef(({className:e,orientation:a,"data-invalid":n,...r},l)=>c.jsx("div",{ref:l,role:"group","data-invalid":n?"":void 0,className:w(_F({orientation:a}),e),...r}));ht.displayName="Field";const PF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex flex-col gap-1.5",e),...a}));PF.displayName="FieldContent";const ua=t.forwardRef(({className:e,asChild:a,...n},r)=>a?c.jsx("label",{ref:r,className:w("text-sm font-medium",e),...n}):c.jsx("label",{ref:r,className:w("text-sm font-medium",e),...n}));ua.displayName="FieldLabel";const IF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("text-sm font-medium",e),...a}));IF.displayName="FieldTitle";const ma=t.forwardRef(({className:e,...a},n)=>c.jsx("p",{ref:n,className:w("text-sm text-muted-foreground",e),...a}));ma.displayName="FieldDescription";const DF=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs("div",{ref:r,className:w("flex items-center gap-4",e),...n,children:[c.jsx("div",{className:"flex-1 border-t"}),a&&c.jsx("span",{className:"text-sm text-muted-foreground",children:a}),c.jsx("div",{className:"flex-1 border-t"})]}));DF.displayName="FieldSeparator";const G1=t.forwardRef(({className:e,children:a,errors:n,...r},l)=>{const o=n?.filter(Boolean).map(i=>i?.message)||[];return o.length>0||!!a?c.jsx("div",{ref:l,role:"alert",className:w("text-sm text-destructive",e),...r,children:a||c.jsx("ul",{className:"list-disc list-inside",children:o.map((i,d)=>c.jsx("li",{children:i},d))})}):null});G1.displayName="FieldError";function TF({date:e,onChange:a,placeholder:n="Pick a date",disabled:r=!1,className:l,iconPosition:o="start",minDate:s,maxDate:i,dateFormat:d="MMM d, yyyy",label:m,error:f,description:u,info:h,requiredIndicator:p,required:g=!1,orientation:v="vertical",id:A,captionLayout:M,fromYear:E,toYear:x,fromMonth:H,toMonth:y}){const b=Z.useId(),V=A||b,S=!!f,j=o==="start",D=o==="end",z=c.jsxs(br,{children:[c.jsx(Vr,{asChild:!0,children:c.jsxs(te,{variant:"outline",className:w("w-full text-left font-normal h-9",D?"justify-between":"justify-start",!e&&"text-muted-foreground",S&&"border-destructive focus-visible:border-destructive",l),disabled:r,"aria-invalid":S?!0:void 0,"aria-describedby":u||f?`${V}-description`:void 0,id:V,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[j&&c.jsx(fm,{className:"h-4 w-4"}),e?qe(e,d):c.jsx("span",{children:n})]}),D&&c.jsx(NV,{className:"h-4 w-4 opacity-50"})]})}),c.jsx(An,{className:"w-auto p-0",children:c.jsx(fo,{mode:"single",selected:e,onSelect:a,initialFocus:!0,fromDate:s,toDate:i,captionLayout:M,fromYear:E,toYear:x,fromMonth:H,toMonth:y})})]});return m||f||u||h||p?c.jsxs(ht,{orientation:v,"data-invalid":S,className:w("w-full",l),children:[(m||h||p)&&c.jsx(Me,{htmlFor:V,info:h,requiredIndicator:p,required:g,disabled:r,children:m}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[z,u&&!f&&c.jsx(ma,{id:`${V}-description`,children:u}),f&&c.jsx(G1,{id:`${V}-description`,children:f})]})]}):z}const Cr=TF;function OF({dateRange:e,onChange:a,placeholder:n="Pick a date range",disabled:r=!1,className:l}){return c.jsxs(br,{children:[c.jsx(Vr,{asChild:!0,children:c.jsxs(te,{variant:"outline",className:w("w-full justify-start text-left font-normal h-9",!e&&"text-muted-foreground",l),disabled:r,children:[c.jsx(fm,{className:"mr-2 h-4 w-4"}),e?.from?e.to?c.jsxs(c.Fragment,{children:[qe(e.from,"dd.MM.yyyy")," -"," ",qe(e.to,"dd.MM.yyyy")]}):qe(e.from,"dd.MM.yyyy"):c.jsx("span",{children:n})]})}),c.jsx(An,{className:"w-auto p-0",align:"start",children:c.jsx(fo,{mode:"range",selected:e,onSelect:a,initialFocus:!0,numberOfMonths:1})})]})}const $F=OF,Mn=t.forwardRef(({className:e,type:a,...n},r)=>c.jsx("input",{type:a,ref:r,"data-slot":"input",className:w("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-normal disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n}));Mn.displayName="Input";const b7=t.forwardRef(({className:e,value:a,...n},r)=>c.jsx(Mn,{ref:r,type:"time",step:"1",value:a,className:w("h-9",e),...n}));b7.displayName="TimePicker";const zF=Array.from({length:12},(e,a)=>a+1),BF=Array.from({length:24},(e,a)=>a),WF=["AM","PM"],GF=e=>{if(e===0)return Array.from({length:60},(n,r)=>r);const a=60/e;return Array.from({length:a},(n,r)=>r*e)},U1=e=>e.toString().padStart(2,"0"),UF=e=>{const a=e>=12?"PM":"AM";return{hour:e===0?12:e>12?e-12:e,meridiem:a}},YF=(e,a)=>e===12?a==="AM"?0:12:a==="PM"?e+12:e,Lr=t.forwardRef(({className:e,label:a,error:n,description:r,orientation:l="vertical",id:o,onChange:s,mode:i="native",divisorMinutes:d=0,width:m=140,value:f,disabled:u,use24Hour:h=!1,...p},g)=>{const v=Z.useId(),A=o||v,M=!!n;if(i==="native"){const E=c.jsx(b7,{ref:g,id:A,value:f,disabled:u,className:w(M&&"border-destructive focus-visible:border-destructive",!(a||n||r)&&e),"aria-invalid":M?!0:void 0,"aria-describedby":r||n?`${A}-description`:void 0,...p,onChange:x=>{s?.(x.target.value)}});return a||n||r?c.jsxs(ht,{orientation:l,"data-invalid":M,className:w("w-full",e),children:[a&&c.jsx(ua,{htmlFor:A,children:a}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[E,r&&!n&&c.jsx(ma,{id:`${A}-description`,children:r}),n&&c.jsx(G1,{id:`${A}-description`,children:n})]})]}):E}return c.jsx(qF,{value:f||(h?"00:00":"12:00"),onChange:s,divisorMinutes:d,width:m,label:a,error:n,description:r,disabled:u,className:e,use24Hour:h})});Lr.displayName="TimePicker";const qF=({value:e,onChange:a,divisorMinutes:n,width:r,label:l,error:o,description:s,disabled:i,className:d,use24Hour:m=!1})=>{const[f,u]=Z.useState(!1),h=Z.useRef(null),p=Z.useRef(null),g=R=>{const[_,W]=R.split(":"),Q=parseInt(_,10)||0,t0=parseInt(W,10)||0;if(m)return{hour24:Q,minute:t0,hour:Q,meridiem:"AM"};const{hour:N,meridiem:L}=UF(Q);return{hour24:Q,minute:t0,hour:N,meridiem:L}},{hour:v,hour24:A,minute:M,meridiem:E}=g(e),[x,H]=Z.useState(m?A:v),[y,b]=Z.useState(M),[V,S]=Z.useState(E),j=GF(n),D=(R,_,W)=>{let Q;m?Q=R:Q=YF(R,W);const t0=`${U1(Q)}:${U1(_)}`;a?.(t0)},z=R=>{H(R),D(R,y,V)},P=R=>{b(R),D(x,R,V)},k=R=>{S(R),D(x,y,R)};Z.useEffect(()=>{const R=_=>{p.current&&!p.current.contains(_.target)&&u(!1)};if(f)return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[f]);const G=m?`${U1(x)}:${U1(y)}`:`${U1(x)}:${U1(y)} ${V}`,K=m?BF:zF,F=c.jsxs("div",{ref:p,className:w("relative inline-block",d),style:{width:typeof r=="number"?`${r}px`:r},children:[c.jsxs("button",{type:"button",disabled:i,onClick:()=>!i&&u(!f),className:w("flex items-center justify-between w-full h-9 px-3 py-2","text-sm rounded-md border border-input bg-input","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o&&"border-destructive"),children:[c.jsx("span",{children:G}),c.jsx(r0,{name:f?"CaretUp":"CaretDown",size:"sm",className:"ml-2"})]}),f&&c.jsxs("div",{ref:h,className:w("absolute z-popover mt-1 bg-popover border border-border rounded-md shadow-lg","flex divide-x divide-border"),style:{width:"fit-content",minWidth:m?"140px":"200px"},children:[c.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:K.map(R=>c.jsx("button",{type:"button",onClick:()=>z(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",x===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:U1(R)},R))}),c.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:j.map(R=>c.jsx("button",{type:"button",onClick:()=>P(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",y===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:U1(R)},R))}),!m&&c.jsx("div",{className:"flex flex-col min-w-[60px]",children:WF.map(R=>c.jsx("button",{type:"button",onClick:()=>k(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",V===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:R},R))})]})]});return l||o||s?c.jsxs(ht,{orientation:"vertical",className:w("w-full",d),children:[l&&c.jsx(ua,{children:l}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[F,s&&!o&&c.jsx(ma,{children:s}),o&&c.jsx(G1,{children:o})]})]}):F};var KF="Separator",V7="horizontal",XF=["horizontal","vertical"],C7=t.forwardRef((e,a)=>{const{decorative:n,orientation:r=V7,...l}=e,o=QF(r)?r:V7,i=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(a0.div,{"data-orientation":o,...i,...l,ref:a})});C7.displayName=KF;function QF(e){return XF.includes(e)}var JF=C7;function pt({className:e,orientation:a="horizontal",decorative:n=!0,...r}){return c.jsx(JF,{"data-slot":"separator",decorative:n,orientation:a,className:w("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),...r})}var Zo="rovingFocusGroup.onEntryFocus",e_={bubbles:!1,cancelable:!0},En="RovingFocusGroup",[yo,L7,t_]=X2(En),[a_,fa]=Y0(En,[t_]),[n_,r_]=a_(En),S7=t.forwardRef((e,a)=>c.jsx(yo.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(yo.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(l_,{...e,ref:a})})}));S7.displayName=En;var l_=t.forwardRef((e,a)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:l=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:m,preventScrollOnEntryFocus:f=!1,...u}=e,h=t.useRef(null),p=p0(a,h),g=na(o),[v,A]=Q0({prop:s,defaultProp:i??null,onChange:d,caller:En}),[M,E]=t.useState(!1),x=Re(m),H=L7(n),y=t.useRef(!1),[b,V]=t.useState(0);return t.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Zo,x),()=>S.removeEventListener(Zo,x)},[x]),c.jsx(n_,{scope:n,orientation:r,dir:g,loop:l,currentTabStopId:v,onItemFocus:t.useCallback(S=>A(S),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>V(S=>S+1),[]),onFocusableItemRemove:t.useCallback(()=>V(S=>S-1),[]),children:c.jsx(a0.div,{tabIndex:M||b===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{y.current=!0}),onFocus:X(e.onFocus,S=>{const j=!y.current;if(S.target===S.currentTarget&&j&&!M){const D=new CustomEvent(Zo,e_);if(S.currentTarget.dispatchEvent(D),!D.defaultPrevented){const z=H().filter(F=>F.focusable),P=z.find(F=>F.active),k=z.find(F=>F.id===v),K=[P,k,...z].filter(Boolean).map(F=>F.ref.current);N7(K,f)}}y.current=!1}),onBlur:X(e.onBlur,()=>E(!1))})})}),F7="RovingFocusGroupItem",_7=t.forwardRef((e,a)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:l=!1,tabStopId:o,children:s,...i}=e,d=P0(),m=o||d,f=r_(F7,n),u=f.currentTabStopId===m,h=L7(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:v}=f;return t.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),c.jsx(yo.ItemSlot,{scope:n,id:m,focusable:r,active:l,children:c.jsx(a0.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...i,ref:a,onMouseDown:X(e.onMouseDown,A=>{r?f.onItemFocus(m):A.preventDefault()}),onFocus:X(e.onFocus,()=>f.onItemFocus(m)),onKeyDown:X(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){f.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const M=i_(A,f.orientation,f.dir);if(M!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let x=h().filter(H=>H.focusable).map(H=>H.ref.current);if(M==="last")x.reverse();else if(M==="prev"||M==="next"){M==="prev"&&x.reverse();const H=x.indexOf(A.currentTarget);x=f.loop?c_(x,H+1):x.slice(H+1)}setTimeout(()=>N7(x))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:v!=null}):s})})});_7.displayName=F7;var o_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s_(e,a){return a!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function i_(e,a,n){const r=s_(e.key,n);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return o_[r]}function N7(e,a=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:a}),document.activeElement!==n))return}function c_(e,a){return e.map((n,r)=>e[(a+r)%e.length])}var wo=S7,bo=_7,Vo="Radio",[d_,R7]=Y0(Vo),[u_,m_]=d_(Vo),j7=t.forwardRef((e,a)=>{const{__scopeRadio:n,name:r,checked:l=!1,required:o,disabled:s,value:i="on",onCheck:d,form:m,...f}=e,[u,h]=t.useState(null),p=p0(a,A=>h(A)),g=t.useRef(!1),v=u?m||!!u.closest("form"):!0;return c.jsxs(u_,{scope:n,checked:l,disabled:s,children:[c.jsx(a0.button,{type:"button",role:"radio","aria-checked":l,"data-state":D7(l),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:p,onClick:X(e.onClick,A=>{l||d?.(),v&&(g.current=A.isPropagationStopped(),g.current||A.stopPropagation())})}),v&&c.jsx(I7,{control:u,bubbles:!g.current,name:r,value:i,checked:l,required:o,disabled:s,form:m,style:{transform:"translateX(-100%)"}})]})});j7.displayName=Vo;var k7="RadioIndicator",P7=t.forwardRef((e,a)=>{const{__scopeRadio:n,forceMount:r,...l}=e,o=m_(k7,n);return c.jsx(ue,{present:r||o.checked,children:c.jsx(a0.span,{"data-state":D7(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:a})})});P7.displayName=k7;var f_="RadioBubbleInput",I7=t.forwardRef(({__scopeRadio:e,control:a,checked:n,bubbles:r=!0,...l},o)=>{const s=t.useRef(null),i=p0(s,o),d=ir(n),m=z2(a);return t.useEffect(()=>{const f=s.current;if(!f)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(d!==n&&p){const g=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(g)}},[d,n,r]),c.jsx(a0.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...l,tabIndex:-1,ref:i,style:{...l.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});I7.displayName=f_;function D7(e){return e?"checked":"unchecked"}var h_=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sr="RadioGroup",[p_]=Y0(Sr,[fa,R7]),T7=fa(),O7=R7(),[g_,v_]=p_(Sr),$7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,name:r,defaultValue:l,value:o,required:s=!1,disabled:i=!1,orientation:d,dir:m,loop:f=!0,onValueChange:u,...h}=e,p=T7(n),g=na(m),[v,A]=Q0({prop:o,defaultProp:l??null,onChange:u,caller:Sr});return c.jsx(g_,{scope:n,name:r,required:s,disabled:i,value:v,onValueChange:A,children:c.jsx(wo,{asChild:!0,...p,orientation:d,dir:g,loop:f,children:c.jsx(a0.div,{role:"radiogroup","aria-required":s,"aria-orientation":d,"data-disabled":i?"":void 0,dir:g,...h,ref:a})})})});$7.displayName=Sr;var z7="RadioGroupItem",B7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,disabled:r,...l}=e,o=v_(z7,n),s=o.disabled||r,i=T7(n),d=O7(n),m=t.useRef(null),f=p0(a,m),u=o.value===l.value,h=t.useRef(!1);return t.useEffect(()=>{const p=v=>{h_.includes(v.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),c.jsx(bo,{asChild:!0,...i,focusable:!s,active:u,children:c.jsx(j7,{disabled:s,required:o.required,checked:u,...d,...l,name:o.name,ref:f,onCheck:()=>o.onValueChange(l.value),onKeyDown:X(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:X(l.onFocus,()=>{h.current&&m.current?.click()})})})});B7.displayName=z7;var A_="RadioGroupIndicator",W7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,...r}=e,l=O7(n);return c.jsx(P7,{...l,...r,ref:a})});W7.displayName=A_;var M_=$7,E_=B7,x_=W7;function Fr({className:e,...a}){return c.jsx(M_,{"data-slot":"radio-group",className:w("grid gap-4",e),...a})}function _r({className:e,...a}){return c.jsx(E_,{"data-slot":"radio-group-item",className:w("border-border text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:c.jsx(x_,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:c.jsx(pm,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Co=t.forwardRef(({className:e,...a},n)=>c.jsx("textarea",{ref:n,"data-slot":"textarea",className:w("font-normal placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-[80px] w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","resize-none",e),...a}));Co.displayName="Textarea";const G7=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex min-w-0 w-full rounded-md border border-input bg-background shadow-xs overflow-hidden","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot=input-group-control][aria-invalid='true']]:border-destructive has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/20 dark:has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/40",e),...a}));G7.displayName="InputGroup";const Lo=t.forwardRef(({className:e,align:a="inline-start",...n},r)=>c.jsx("div",{ref:r,className:w("flex items-center gap-1.5 h-9 shrink-0",a==="inline-start"&&"order-first pl-3",a==="inline-end"&&"order-last pr-3",a==="block-start"&&"order-first flex-col w-full pb-1.5 px-0 h-auto",a==="block-end"&&"order-last flex-col w-full pt-1.5 px-0 h-auto",e),...n}));Lo.displayName="InputGroupAddon";const U7=t.forwardRef(({className:e,...a},n)=>c.jsx(Mn,{ref:n,"data-slot":"input-group-control",className:w("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0","aria-invalid:border-0 aria-invalid:ring-0",e),...a}));U7.displayName="InputGroupInput";const H_=t.forwardRef(({className:e,...a},n)=>c.jsx(Co,{ref:n,"data-slot":"input-group-control",className:w("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0",e),...a}));H_.displayName="InputGroupTextarea";const Z_=t.forwardRef(({className:e,...a},n)=>c.jsx("span",{ref:n,className:w("text-sm text-muted-foreground whitespace-nowrap",e),...a}));Z_.displayName="InputGroupText";const y_=_0("shrink-0",{variants:{size:{xs:"h-7 px-2 text-xs",sm:"h-8 px-3 text-sm","icon-xs":"size-7","icon-sm":"size-8"}},defaultVariants:{size:"sm"}}),w_=t.forwardRef(({className:e,size:a,...n},r)=>c.jsx(te,{ref:r,className:w(y_({size:a}),e),...n}));w_.displayName="InputGroupButton";const gt=Z.forwardRef(({className:e,orientation:a="vertical",label:n,description:r,error:l,info:o,requiredIndicator:s,required:i,id:d,button:m,disabled:f,startIcon:u,startIconProps:h,endIcon:p,endIconProps:g,inputProps:v,...A},M)=>{const E=Z.useId(),x=d||v?.id||E,H=!!l;return c.jsxs(ht,{orientation:a,"data-invalid":H,className:w("w-full",e),children:[(n||o||s)&&c.jsx(Me,{htmlFor:x,info:o,requiredIndicator:s,required:i,disabled:f,children:n}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsxs(G7,{className:"flex-1",children:[u&&c.jsx(Lo,{align:"inline-start",children:c.jsx(r0,{name:h?.name||u,size:"sm",...h,className:w("cursor-default text-muted-foreground",h?.className)})}),c.jsx(U7,{ref:M,disabled:f,required:i,className:w(H&&"border-destructive focus-visible:border-destructive",v?.className),"aria-invalid":H?!0:void 0,"aria-describedby":r||l?`${x}-description`:void 0,...A,...v,id:x}),p&&c.jsx(Lo,{align:"inline-end",children:c.jsx(r0,{name:g?.name||p,size:"sm",...g,className:w("cursor-default text-muted-foreground",g?.className)})})]}),m&&c.jsx(me,{disabled:f,...m})]}),r&&!l&&c.jsx(ma,{id:`${x}-description`,children:r}),l&&c.jsx(G1,{id:`${x}-description`,children:l})]})]})});gt.displayName="Field";const So=Z.forwardRef(({label:e,onRemove:a,className:n,...r},l)=>c.jsxs(Il,{ref:l,variant:"secondary",className:w("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[c.jsx("span",{className:"text-xs font-medium leading-none",children:e}),a&&c.jsx("button",{onClick:a,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:c.jsx(r0,{name:"X",className:"size-4"})})]}));So.displayName="FilterTag";const Y7=Z.forwardRef(({appliedFilters:e=[],onRemoveFilter:a,onClearAll:n,maxVisibleTags:r=4,className:l,...o},s)=>{const i=e.length>0,d=e.slice(0,r),m=e.length-r;return c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(te,{ref:s,variant:"outline",size:"sm",className:w("h-8 gap-2 px-3 py-2",l),...o,children:[c.jsx(r0,{name:"FunnelSimple",className:"size-4"}),c.jsx("span",{className:"text-xs font-medium leading-none",children:"Add filter"})]}),i&&c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[d.map(f=>c.jsx(So,{label:f.label,onRemove:()=>a?.(f.id)},f.id)),m>0&&c.jsx(Il,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:c.jsxs("span",{className:"text-xs font-medium leading-none",children:["+",m," more"]})}),n&&c.jsx(te,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:"Clear filters"})})]})]}),!i&&c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"No filters applied"})]})]})});Y7.displayName="FilterButton";const Nr=Z.forwardRef((e,a)=>{const{title:n,items:r,className:l,searchable:o=!1,searchPlaceholder:s="Search",showActions:i=!1,enableSelectAll:d=!0,enableInverse:m=!0,enableNone:f=!0,description:u}=e,h=e.type||"checkbox",p=h==="radio",g=h==="checkbox"||!e.type,[v,A]=Z.useState(""),M=Z.useMemo(()=>v?r.filter(b=>b.label.toLowerCase().includes(v.toLowerCase())):r,[r,v]),E=()=>{if(h==="checkbox"&&"selectedValues"in e){const b=M.map(S=>S.value),V=v?[...new Set([...e.selectedValues,...b])]:b;e.onChange(V)}},x=()=>{if(h==="checkbox"&&"selectedValues"in e)if(v){const b=new Set(M.map(j=>j.value)),V=e.selectedValues.filter(j=>!b.has(j)),S=M.filter(j=>!e.selectedValues.includes(j.value)).map(j=>j.value);e.onChange([...V,...S])}else{const b=r.filter(V=>!e.selectedValues.includes(V.value)).map(V=>V.value);e.onChange(b)}},H=()=>{if(h==="checkbox"&&"selectedValues"in e)if(v){const b=new Set(M.map(S=>S.value)),V=e.selectedValues.filter(S=>!b.has(S));e.onChange(V)}else e.onChange([]);else h==="radio"&&"selectedValue"in e&&e.onChange("")},y=(b,V)=>{if(h==="checkbox"&&"selectedValues"in e){const S=V?[...e.selectedValues,b]:e.selectedValues.filter(j=>j!==b);e.onChange(S)}};return c.jsxs("div",{ref:a,className:w("flex flex-col h-full",l),children:[o&&c.jsx(gt,{placeholder:s,value:v,onChange:b=>A(b.target.value),startIcon:"MagnifyingGlass",className:"mb-4"}),u&&c.jsx("p",{className:"text-xs font-normal text-muted-foreground mb-4",children:u}),c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),i&&h==="checkbox"&&c.jsxs("div",{className:"flex items-center justify-end gap-4",children:[d&&c.jsx(te,{variant:"link",size:"sm",onClick:E,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"Select all"}),m&&c.jsx(te,{variant:"link",size:"sm",onClick:x,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"Inverse"}),f&&c.jsx(te,{variant:"link",size:"sm",onClick:H,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"None"})]})]}),c.jsx(pt,{className:"w-full mb-6"}),p&&"selectedValue"in e?c.jsx(Fr,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:M.map(b=>c.jsx(_o,{label:b.label,value:b.value,description:b.description},b.value))}):g&&"selectedValues"in e?c.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:M.map(b=>c.jsx(Fo,{label:b.label,description:b.description,icon:b.icon,checked:e.selectedValues.includes(b.value),onCheckedChange:V=>y(b.value,V)},b.value))}):null]})});Nr.displayName="FilterSection";const Fo=Z.forwardRef(({label:e,checked:a,onCheckedChange:n,description:r,className:l,icon:o},s)=>c.jsxs("label",{className:w("flex items-start gap-2 cursor-pointer",l),children:[c.jsx(vm,{ref:s,checked:a,onCheckedChange:n}),o&&c.jsx("img",{src:o,alt:"",className:"size-4 object-contain shrink-0",onError:i=>{i.currentTarget.style.display="none"}}),c.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[c.jsx(V1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&c.jsx(V1,{content:r,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));Fo.displayName="FilterCheckboxOption";const _o=Z.forwardRef(({label:e,value:a,description:n,className:r},l)=>c.jsxs("div",{className:w("flex items-start gap-3",r),children:[c.jsx(_r,{ref:l,value:a,id:`radio-${a}`}),c.jsxs("label",{htmlFor:`radio-${a}`,className:"flex flex-col gap-0.5 cursor-pointer flex-1 truncate",children:[c.jsx(V1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&c.jsx(V1,{content:n,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));_o.displayName="FilterRadioOption";const q7=Z.forwardRef(({children:e,showSearch:a=!1,searchPlaceholder:n="Search",searchValue:r,onSearchChange:l,className:o},s)=>c.jsxs("div",{ref:s,className:w("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",o),children:[a&&c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"relative",children:[c.jsx(r0,{name:"MagnifyingGlass",className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),c.jsx(gt,{placeholder:n,value:r,onChange:i=>l?.(i.target.value),className:"pl-9"})]})}),c.jsx("div",{className:"flex flex-col gap-6",children:e})]}));q7.displayName="FilterContent";const je={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},vt=e=>{const a=e.getDate();return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]} ${a}`},b_=e=>{const n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],r=e.getFullYear();return`${n} ${r}`},V_=e=>["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()],C_=()=>{const e=new Date;e.setHours(0,0,0,0);const a=`${V_(e)}, ${vt(e)}`,n=new Date(e);n.setDate(n.getDate()-2);const r=`${vt(n)} - ${vt(e)}`,l=new Date(e);l.setDate(l.getDate()-6);const o=`${vt(l)} - ${vt(e)}`,s=new Date(e);s.setDate(s.getDate()-29);const i=`${vt(s)} - ${vt(e)}`,d=b_(e);return{today:a,last3Days:r,last7Days:o,last30Days:i,thisMonth:d}},L1=Z.forwardRef(({label:e,description:a,value:n,className:r,...l},o)=>{const s=`date-range-${n}`;return c.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[c.jsxs("label",{ref:o,className:w("flex-1 flex items-start gap-3 cursor-pointer",r),...l,children:[c.jsx(_r,{id:s,value:n,className:"mt-px"}),c.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:c.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),a&&c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:a})})]})});L1.displayName="FilterDateRangeOption";const No=Z.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:a,startDate:n,endDate:r,startTime:l="",endTime:o="",onStartDateChange:s,onEndDateChange:i,onStartTimeChange:d,onEndTimeChange:m,mode:f="range",singleDayLabel:u="Select date",showAllTime:h=!1,className:p,value:g,onValueChange:v,announcement:A,...M},E)=>{const x=Z.useMemo(()=>C_(),[]),H=b=>{v?.(b),a?.(b===je.CUSTOM)},y=b=>{if(b){const V=new Date(b);V.setHours(0,0,0,0);const S=new Date(b);S.setHours(23,59,59,999),s?.(V),i?.(S)}else s?.(void 0),i?.(void 0)};return c.jsxs("div",{ref:E,className:w("flex flex-col gap-4 w-full",p),children:[A&&(typeof A=="string"?c.jsx(Vl,{icon:"Info",description:A}):A),c.jsxs(Fr,{value:g,onValueChange:H,className:"gap-2",...M,children:[c.jsx(L1,{label:"Custom",value:je.CUSTOM}),e&&c.jsxs("div",{className:"flex flex-col gap-4 pl-7 mb-2",children:[f==="single"?c.jsx("div",{className:"flex flex-col gap-3",children:c.jsx(Cr,{date:n,onChange:y,placeholder:u,className:"h-9",iconPosition:"none"})}):c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Cr,{date:n,onChange:s,placeholder:"Start date",className:"h-9",iconPosition:"none"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Cr,{date:r,onChange:i,placeholder:"End date",className:"h-9",iconPosition:"none"})})]}),c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Lr,{value:l,onChange:d,mode:"dropdown",use24Hour:!0,width:"100%"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Lr,{value:o,onChange:m,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(L1,{label:"Today",value:je.TODAY,description:x.today}),c.jsx(L1,{label:"Last 3 days",value:je.LAST_3_DAYS,description:x.last3Days}),c.jsx(L1,{label:"Last 7 days",value:je.LAST_7_DAYS,description:x.last7Days}),c.jsx(L1,{label:"Last 30 days",value:je.LAST_30_DAYS,description:x.last30Days}),c.jsx(L1,{label:"This month",value:je.THIS_MONTH,description:x.thisMonth}),h&&c.jsx(L1,{label:"All time",value:je.ALL_TIME})]})]})]})});No.displayName="FilterDateRange";const Ro=Z.forwardRef(({value:e=[],onChange:a,label:n,description:r,error:l,placeholder:o="Type and press Enter...",disabled:s=!1,id:i,name:d,triggerKeys:m=["Enter","Tab","Comma","Space"],addOnBlur:f=!0,allowDuplicates:u=!1,maxItems:h,validate:p,badgeVariant:g="outline",orientation:v="vertical",className:A,deleteAll:M},E)=>{const x=Z.useId(),H=i||x,y=!!l,[b,V]=Z.useState(""),[S,j]=Z.useState(!1),[D,z]=Z.useState(""),P=N=>{const L=N.trim();if(L!==""){if(h&&e.length>=h){z(`Maximum ${h} items allowed`);return}if(!u&&e.includes(L)){z("Duplicate values are not allowed");return}if(p){const O=p(L);if(O!==!0){z(typeof O=="string"?O:"Invalid value");return}}z(""),a([...e,L]),V("")}},k=N=>{a(e.filter(L=>L!==N)),z("")},G=N=>{const L=N.currentTarget.value;N.key==="Enter"&&m.includes("Enter")?(N.preventDefault(),P(L)):N.key==="Tab"&&m.includes("Tab")?L.trim()!==""&&(N.preventDefault(),P(L)):(N.key===","||N.key===",")&&m.includes("Comma")||N.key===" "&&m.includes("Space")?(N.preventDefault(),P(L)):N.key==="Backspace"&&L===""&&e.length>0&&a(e.slice(0,-1))},K=N=>{V(N.target.value),z("")},F=()=>{j(!0)},R=()=>{j(!1),f&&b.trim()!==""&&P(b)},_=N=>{const L=N.clipboardData.getData("text"),O=[];if(m.includes("Comma")&&O.push(","),m.includes("Space")&&O.push(" "),O.length===0)return;const B=new RegExp(`[${O.join("")}]+`);if(!B.test(L))return;N.preventDefault();const I=L.split(B).map(n0=>n0.trim()).filter(n0=>n0!=="");if(I.length===0)return;const Y=[];let s0=[...e];for(const n0 of I){if(h&&s0.length>=h){z(`Maximum ${h} items allowed`);break}!u&&s0.includes(n0)||p&&p(n0)!==!0||(Y.push(n0),s0=[...s0,n0])}Y.length>0&&(z(""),a([...e,...Y]),V(""))},W=(N,L)=>{N.preventDefault(),N.stopPropagation(),k(L)},Q=()=>{s||!M?.onClick||M.onClick()},t0=l||D;return c.jsxs(ht,{orientation:v,"data-invalid":y,className:w("w-full",A),children:[n&&c.jsx(ua,{htmlFor:H,children:n}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[c.jsxs("div",{className:w("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1.5 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","flex-wrap gap-1.5 items-center",S&&"border-ring ring-ring/50 ring-[3px]",(y||D)&&"border-destructive ring-destructive/20 dark:ring-destructive/40",s&&"opacity-50 cursor-not-allowed"),onClick:()=>{s||document.getElementById(H)?.focus()},children:[(()=>{const N=M&&!s&&e.length>=M.length;return c.jsxs(c.Fragment,{children:[N&&c.jsx("div",{onClick:L=>{L.preventDefault(),L.stopPropagation(),Q()},children:c.jsx(m1,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:M.label||"Delete all"})}),e.map((L,O)=>c.jsxs(m1,{variant:g,children:[L,c.jsx("button",{type:"button",onClick:B=>W(B,L),children:c.jsx(r0,{name:"X",className:"h-3 w-3"})})]},`${L}-${O}`))]})})(),c.jsx("input",{ref:E,id:H,name:d,type:"text",value:b,onChange:K,onKeyDown:G,onFocus:F,onBlur:R,onPaste:_,placeholder:e.length===0?o:"",disabled:s,className:w("flex-1 min-w-[120px] outline-none bg-transparent border-none shadow-none p-0 h-6","placeholder:text-muted-foreground","disabled:cursor-not-allowed"),"aria-invalid":y||!!D,"aria-describedby":r||t0?`${H}-description`:void 0})]}),r&&!t0&&c.jsx(ma,{id:`${H}-description`,children:r}),t0&&c.jsx(G1,{id:`${H}-description`,children:t0})]})]})});Ro.displayName="MultiValuesField";const K7=Z.forwardRef(({title:e,value:a,onChange:n,placeholder:r="Type and press Enter...",description:l,error:o,numericOnly:s=!1,maxItems:i,disabled:d=!1,className:m,allowDuplicates:f=!1},u)=>{const h=s?p=>/^\d+$/.test(p)?!0:"Only numeric values are allowed":void 0;return c.jsxs("div",{ref:u,className:w("flex flex-col h-full",m),children:[c.jsx("div",{className:"flex items-center justify-between mb-1",children:c.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),c.jsx(pt,{className:"w-full mb-6"}),c.jsx(Ro,{value:a,onChange:n,placeholder:r,description:l,error:o,disabled:d,maxItems:i,allowDuplicates:f,validate:h,triggerKeys:["Enter","Tab","Comma"],deleteAll:a.length>0?{label:"Clear all",length:1,onClick:()=>n([])}:void 0})]})});K7.displayName="FilterMultiInput";const jo=Z.forwardRef(({icon:e,label:a,isActive:n=!1,showChevron:r=!1,className:l,...o},s)=>c.jsxs("button",{ref:s,className:w("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",l),...o,children:[e&&c.jsx(r0,{name:e,className:w("size-4 shrink-0",n?"text-primary":"text-foreground")}),c.jsx("span",{className:w("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:a}),(n||r)&&c.jsx(r0,{name:"CaretRight",className:w("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));jo.displayName="FilterMenuItem";const ko=Z.forwardRef(({items:e,activeItemId:a,onItemClick:n,className:r},l)=>c.jsx("div",{ref:l,className:w("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(o=>c.jsx(jo,{icon:o.icon,label:o.label,isActive:a===o.id,showChevron:o.showChevron,onClick:()=>n?.(o.id)},o.id))}));ko.displayName="FilterMenu";const X7=Z.forwardRef(({filters:e,buttonText:a="Add filter",appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:l,onOpenChange:o,maxVisibleTags:s=4,className:i,disabled:d=!1,applyOnClose:m=!1},f)=>{const[u,h]=Z.useState(!1),[p,g]=Z.useState({}),v=Z.useRef({}),A=Z.useRef(e),M=Z.useCallback($=>{g(J=>{const q=typeof $=="function"?$(J):$;return v.current=q,q})},[]);Z.useEffect(()=>{A.current=e},[e]);const E=Z.useCallback(()=>{if(!m)return;const $=v.current,J=A.current;Object.entries($).forEach(([q,U])=>{const m0=J.find(M0=>M0.id===q);if(m0)switch(U.type){case"checkbox":U.checkboxValues!==void 0&&m0.onChange?.(U.checkboxValues);break;case"radio":U.radioValue!==void 0&&m0.onValueChange?.(U.radioValue);break;case"date":U.dateValue!==void 0&&m0.onDateValueChange?.(U.dateValue),U.dateInit!==void 0&&m0.onDateInitChange?.(U.dateInit),U.dateEnd!==void 0&&m0.onDateEndChange?.(U.dateEnd),U.startTime!==void 0&&m0.onStartTimeChange?.(U.startTime),U.endTime!==void 0&&m0.onEndTimeChange?.(U.endTime);break;case"custom":U.customValue!==void 0&&m0.onCustomChange?.(U.customValue);break}}),M({})},[m,M]),x=Z.useCallback($=>{if(!$&&u&&m){o?.($),E(),h($);return}$&&!u&&m&&M({}),h($),o?.($)},[o,u,m,E,M]),[H,y]=Z.useState(e.length>0&&e[0]?.id||""),b=Z.useRef(null),V=Z.useCallback($=>{b.current=$,typeof f=="function"?f($):f&&(f.current=$)},[f]);Z.useEffect(()=>{if(!u)return;const $=U=>{const m0=U.target;b.current?.contains(m0)||m0.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||m0.closest?.(".rdp, .rdp-root, [data-calendar]")||x(!1)},J=U=>{U.key==="Escape"&&x(!1)},q=setTimeout(()=>{document.addEventListener("mousedown",$),document.addEventListener("keydown",J)},0);return()=>{clearTimeout(q),document.removeEventListener("mousedown",$),document.removeEventListener("keydown",J)}},[u,x]);const S=n.length>0,j=n.slice(0,s),D=n.length-s,z=$=>{if(e.find(U=>U.id===$))return $;const q=$.split("-");if(q.length>1){const U=q[0];if(e.find(M0=>M0.id===U))return U}return $},P=$=>{const J=z($);return e.find(U=>U.id===J)?.clearable!==!1},k=$=>{const J=z($);y(J),x(!0)},G=n.some($=>P($.id)),K=e.map($=>({id:$.id,icon:$.icon,label:$.label})),F=e.find($=>$.id===H),R=($,J)=>m?p[$]?.checkboxValues??J:J,_=($,J)=>m?p[$]?.radioValue??J:J,W=($,J)=>m?p[$]?.dateValue??J:J,Q=($,J)=>m?p[$]?.dateInit??J:J,t0=($,J)=>m?p[$]?.dateEnd??J:J,N=($,J)=>m?p[$]?.startTime??J:J,L=($,J)=>m?p[$]?.endTime??J:J,O=($,J,q)=>U=>{q!==void 0&&q>0&&U.length<q||(m?M(m0=>({...m0,[$]:{...m0[$],type:"checkbox",checkboxValues:U}})):J?.(U))},B=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"radio",radioValue:q}})):J?.(q)},e0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateValue:q}})):J?.(q)},I=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateInit:q}})):J?.(q)},Y=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateEnd:q}})):J?.(q)},s0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",startTime:q}})):J?.(q)},n0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",endTime:q}})):J?.(q)},u0=()=>{if(!F)return null;switch(F.type){case"checkbox":{const $=R(F.id,F.selectedValues||[]),J=F.description&&(F.descriptionMinSelection===void 0||$.length>=F.descriptionMinSelection);return c.jsx(Nr,{title:F.label,items:F.items||[],selectedValues:$,onChange:O(F.id,F.onChange,F.minSelection),searchable:F.searchable,searchPlaceholder:F.searchPlaceholder,showActions:F.showActions,enableSelectAll:F.enableSelectAll,enableInverse:F.enableInverse,enableNone:F.enableNone,description:J?F.description:void 0})}case"radio":return c.jsx(Nr,{type:"radio",title:F.label,items:F.items||[],selectedValue:_(F.id,F.selectedValue||""),onChange:B(F.id,F.onValueChange),searchable:F.searchable,searchPlaceholder:F.searchPlaceholder,showActions:F.showActions,enableSelectAll:F.enableSelectAll,enableInverse:F.enableInverse,enableNone:F.enableNone,description:F.description});case"date":{const $=W(F.id,F.dateValue||je.LAST_7_DAYS),J=Q(F.id,F.dateInit),q=t0(F.id,F.dateEnd),U=N(F.id,F.startTime||""),m0=L(F.id,F.endTime||""),M0=m&&p[F.id]?.dateInit!==void 0,k0=m&&p[F.id]?.dateEnd!==void 0,v0=e0(F.id,F.onDateValueChange),O0=I(F.id,F.onDateInitChange),$e=Y(F.id,F.onDateEndChange),Z0=s0(F.id,F.onStartTimeChange),z0=n0(F.id,F.onEndTimeChange),Ae=se=>{if(v0(se),se===je.CUSTOM&&!M0&&!k0){const K0=new Date,ie=new Date(K0);ie.setHours(23,59,59,999);const x1=new Date(K0);x1.setHours(0,0,0,0),O0(x1),$e(ie),Z0("00:00:00"),z0("23:59:59")}};return c.jsx(No,{value:$,onValueChange:Ae,showCustomFields:$===je.CUSTOM,startDate:J,endDate:q,startTime:U,endTime:m0,mode:F.dateMode||"range",singleDayLabel:F.singleDayLabel,showAllTime:F.showAllTime,onStartDateChange:O0,onEndDateChange:$e,onStartTimeChange:Z0,onEndTimeChange:z0,announcement:F.description})}case"custom":{const $=m?{bufferedValue:p[F.id]?.customValue,onDeferredChange:J=>{M(q=>({...q,[F.id]:{...q[F.id],type:"custom",customValue:J}}))},isDeferred:!0}:void 0;return F.renderContent?.($)}default:return null}};return c.jsxs("div",{ref:V,className:w("flex flex-col gap-1 relative",i),children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(te,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>x(!u),disabled:d,children:[c.jsx(r0,{name:"FunnelSimple",className:"size-4"}),a]}),S?c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[j.map($=>{const J=P($.id);return c.jsxs(te,{variant:"secondary",onClick:()=>k($.id),className:"display-flex items-center gap-2",size:"sm",children:[$.label,r&&J&&c.jsx("button",{onClick:q=>{q.stopPropagation(),r($.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${$.label} filter`,children:c.jsx(r0,{name:"X",className:"size-4"})})]},$.id)}),D>0&&c.jsxs(te,{children:["+",D," more"]}),l&&G&&c.jsx(te,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:l,children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:"Clear filters"})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"No filters applied"})]})]}),u&&c.jsxs("div",{className:w("z-popover shadow-lg","absolute top-full left-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[c.jsx(ko,{items:K,activeItemId:H,onItemClick:y}),c.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:u0()})]})]})});X7.displayName="FilterDropdown";function L_(e){const a=S_(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(__);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function S_(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=R_(l),i=N_(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var F_=Symbol("radix.slottable");function __(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F_}function N_(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function R_(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Po=["Enter"," "],j_=["ArrowDown","PageUp","Home"],Q7=["ArrowUp","PageDown","End"],k_=[...j_,...Q7],P_={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},I_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xn="Menu",[Hn,D_,T_]=X2(xn),[At,J7]=Y0(xn,[T_,O1,fa]),Zn=O1(),ef=fa(),[tf,Y1]=At(xn),[O_,yn]=At(xn),af=e=>{const{__scopeMenu:a,open:n=!1,children:r,dir:l,onOpenChange:o,modal:s=!0}=e,i=Zn(a),[d,m]=t.useState(null),f=t.useRef(!1),u=Re(o),h=na(l);return t.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(an,{...i,children:c.jsx(tf,{scope:a,open:n,onOpenChange:u,content:d,onContentChange:m,children:c.jsx(O_,{scope:a,onClose:t.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};af.displayName=xn;var $_="MenuAnchor",Io=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e,l=Zn(n);return c.jsx(nn,{...l,...r,ref:a})});Io.displayName=$_;var Do="MenuPortal",[z_,nf]=At(Do,{forceMount:void 0}),rf=e=>{const{__scopeMenu:a,forceMount:n,children:r,container:l}=e,o=Y1(Do,a);return c.jsx(z_,{scope:a,forceMount:n,children:c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:r})})})};rf.displayName=Do;var ke="MenuContent",[B_,To]=At(ke),lf=t.forwardRef((e,a)=>{const n=nf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...l}=e,o=Y1(ke,e.__scopeMenu),s=yn(ke,e.__scopeMenu);return c.jsx(Hn.Provider,{scope:e.__scopeMenu,children:c.jsx(ue,{present:r||o.open,children:c.jsx(Hn.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(W_,{...l,ref:a}):c.jsx(G_,{...l,ref:a})})})})}),W_=t.forwardRef((e,a)=>{const n=Y1(ke,e.__scopeMenu),r=t.useRef(null),l=p0(a,r);return t.useEffect(()=>{const o=r.current;if(o)return Ar(o)},[]),c.jsx(Oo,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),G_=t.forwardRef((e,a)=>{const n=Y1(ke,e.__scopeMenu);return c.jsx(Oo,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),U_=L_("MenuContent.ScrollLock"),Oo=t.forwardRef((e,a)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:p,disableOutsideScroll:g,...v}=e,A=Y1(ke,n),M=yn(ke,n),E=Zn(n),x=ef(n),H=D_(n),[y,b]=t.useState(null),V=t.useRef(null),S=p0(a,V,A.onContentChange),j=t.useRef(0),D=t.useRef(""),z=t.useRef(0),P=t.useRef(null),k=t.useRef("right"),G=t.useRef(0),K=g?gn:t.Fragment,F=g?{as:U_,allowPinchZoom:!0}:void 0,R=W=>{const Q=D.current+W,t0=H().filter(I=>!I.disabled),N=document.activeElement,L=t0.find(I=>I.ref.current===N)?.textValue,O=t0.map(I=>I.textValue),B=lN(O,Q,L),e0=t0.find(I=>I.textValue===B)?.ref.current;(function I(Y){D.current=Y,window.clearTimeout(j.current),Y!==""&&(j.current=window.setTimeout(()=>I(""),1e3))})(Q),e0&&setTimeout(()=>e0.focus())};t.useEffect(()=>()=>window.clearTimeout(j.current),[]),pr();const _=t.useCallback(W=>k.current===P.current?.side&&sN(W,P.current?.area),[]);return c.jsx(B_,{scope:n,searchRef:D,onItemEnter:t.useCallback(W=>{_(W)&&W.preventDefault()},[_]),onItemLeave:t.useCallback(W=>{_(W)||(V.current?.focus(),b(null))},[_]),onTriggerLeave:t.useCallback(W=>{_(W)&&W.preventDefault()},[_]),pointerGraceTimerRef:z,onPointerGraceIntentChange:t.useCallback(W=>{P.current=W},[]),children:c.jsx(K,{...F,children:c.jsx(pn,{asChild:!0,trapped:l,onMountAutoFocus:X(o,W=>{W.preventDefault(),V.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:p,children:c.jsx(wo,{asChild:!0,...x,dir:M.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:X(d,W=>{M.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(B2,{role:"menu","aria-orientation":"vertical","data-state":yf(A.open),"data-radix-menu-content":"",dir:M.dir,...E,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:X(v.onKeyDown,W=>{const t0=W.target.closest("[data-radix-menu-content]")===W.currentTarget,N=W.ctrlKey||W.altKey||W.metaKey,L=W.key.length===1;t0&&(W.key==="Tab"&&W.preventDefault(),!N&&L&&R(W.key));const O=V.current;if(W.target!==O||!k_.includes(W.key))return;W.preventDefault();const e0=H().filter(I=>!I.disabled).map(I=>I.ref.current);Q7.includes(W.key)&&e0.reverse(),nN(e0)}),onBlur:X(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:X(e.onPointerMove,bn(W=>{const Q=W.target,t0=G.current!==W.clientX;if(W.currentTarget.contains(Q)&&t0){const N=W.clientX>G.current?"right":"left";k.current=N,G.current=W.clientX}}))})})})})})})});lf.displayName=ke;var Y_="MenuGroup",$o=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{role:"group",...r,ref:a})});$o.displayName=Y_;var q_="MenuLabel",of=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{...r,ref:a})});of.displayName=q_;var Rr="MenuItem",sf="menu.itemSelect",jr=t.forwardRef((e,a)=>{const{disabled:n=!1,onSelect:r,...l}=e,o=t.useRef(null),s=yn(Rr,e.__scopeMenu),i=To(Rr,e.__scopeMenu),d=p0(a,o),m=t.useRef(!1),f=()=>{const u=o.current;if(!n&&u){const h=new CustomEvent(sf,{bubbles:!0,cancelable:!0});u.addEventListener(sf,p=>r?.(p),{once:!0}),v3(u,h),h.defaultPrevented?m.current=!1:s.onClose()}};return c.jsx(cf,{...l,ref:d,disabled:n,onClick:X(e.onClick,f),onPointerDown:u=>{e.onPointerDown?.(u),m.current=!0},onPointerUp:X(e.onPointerUp,u=>{m.current||u.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,u=>{const h=i.searchRef.current!=="";n||h&&u.key===" "||Po.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});jr.displayName=Rr;var cf=t.forwardRef((e,a)=>{const{__scopeMenu:n,disabled:r=!1,textValue:l,...o}=e,s=To(Rr,n),i=ef(n),d=t.useRef(null),m=p0(a,d),[f,u]=t.useState(!1),[h,p]=t.useState("");return t.useEffect(()=>{const g=d.current;g&&p((g.textContent??"").trim())},[o.children]),c.jsx(Hn.ItemSlot,{scope:n,disabled:r,textValue:l??h,children:c.jsx(bo,{asChild:!0,...i,focusable:!r,children:c.jsx(a0.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:m,onPointerMove:X(e.onPointerMove,bn(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,bn(g=>s.onItemLeave(g))),onFocus:X(e.onFocus,()=>u(!0)),onBlur:X(e.onBlur,()=>u(!1))})})})}),K_="MenuCheckboxItem",df=t.forwardRef((e,a)=>{const{checked:n=!1,onCheckedChange:r,...l}=e;return c.jsx(pf,{scope:e.__scopeMenu,checked:n,children:c.jsx(jr,{role:"menuitemcheckbox","aria-checked":kr(n)?"mixed":n,...l,ref:a,"data-state":Wo(n),onSelect:X(l.onSelect,()=>r?.(kr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});df.displayName=K_;var uf="MenuRadioGroup",[X_,Q_]=At(uf,{value:void 0,onValueChange:()=>{}}),mf=t.forwardRef((e,a)=>{const{value:n,onValueChange:r,...l}=e,o=Re(r);return c.jsx(X_,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx($o,{...l,ref:a})})});mf.displayName=uf;var ff="MenuRadioItem",hf=t.forwardRef((e,a)=>{const{value:n,...r}=e,l=Q_(ff,e.__scopeMenu),o=n===l.value;return c.jsx(pf,{scope:e.__scopeMenu,checked:o,children:c.jsx(jr,{role:"menuitemradio","aria-checked":o,...r,ref:a,"data-state":Wo(o),onSelect:X(r.onSelect,()=>l.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});hf.displayName=ff;var zo="MenuItemIndicator",[pf,J_]=At(zo,{checked:!1}),gf=t.forwardRef((e,a)=>{const{__scopeMenu:n,forceMount:r,...l}=e,o=J_(zo,n);return c.jsx(ue,{present:r||kr(o.checked)||o.checked===!0,children:c.jsx(a0.span,{...l,ref:a,"data-state":Wo(o.checked)})})});gf.displayName=zo;var eN="MenuSeparator",vf=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{role:"separator","aria-orientation":"horizontal",...r,ref:a})});vf.displayName=eN;var tN="MenuArrow",Af=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e,l=Zn(n);return c.jsx(W2,{...l,...r,ref:a})});Af.displayName=tN;var Bo="MenuSub",[aN,Mf]=At(Bo),Ef=e=>{const{__scopeMenu:a,children:n,open:r=!1,onOpenChange:l}=e,o=Y1(Bo,a),s=Zn(a),[i,d]=t.useState(null),[m,f]=t.useState(null),u=Re(l);return t.useEffect(()=>(o.open===!1&&u(!1),()=>u(!1)),[o.open,u]),c.jsx(an,{...s,children:c.jsx(tf,{scope:a,open:r,onOpenChange:u,content:m,onContentChange:f,children:c.jsx(aN,{scope:a,contentId:P0(),triggerId:P0(),trigger:i,onTriggerChange:d,children:n})})})};Ef.displayName=Bo;var wn="MenuSubTrigger",xf=t.forwardRef((e,a)=>{const n=Y1(wn,e.__scopeMenu),r=yn(wn,e.__scopeMenu),l=Mf(wn,e.__scopeMenu),o=To(wn,e.__scopeMenu),s=t.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=o,m={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),d(null)}},[i,d]),c.jsx(Io,{asChild:!0,...m,children:c.jsx(cf,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":yf(n.open),...e,ref:de(a,l.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,bn(u=>{o.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:X(e.onPointerLeave,bn(u=>{f();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,g=p==="right",v=g?-5:5,A=h[g?"left":"right"],M=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:u.clientX+v,y:u.clientY},{x:A,y:h.top},{x:M,y:h.top},{x:M,y:h.bottom},{x:A,y:h.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(u),u.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,u=>{const h=o.searchRef.current!=="";e.disabled||h&&u.key===" "||P_[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});xf.displayName=wn;var Hf="MenuSubContent",Zf=t.forwardRef((e,a)=>{const n=nf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...l}=e,o=Y1(ke,e.__scopeMenu),s=yn(ke,e.__scopeMenu),i=Mf(Hf,e.__scopeMenu),d=t.useRef(null),m=p0(a,d);return c.jsx(Hn.Provider,{scope:e.__scopeMenu,children:c.jsx(ue,{present:r||o.open,children:c.jsx(Hn.Slot,{scope:e.__scopeMenu,children:c.jsx(Oo,{id:i.contentId,"aria-labelledby":i.triggerId,...l,ref:m,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{s.isUsingKeyboardRef.current&&d.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:X(e.onFocusOutside,f=>{f.target!==i.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{const u=f.currentTarget.contains(f.target),h=I_[s.dir].includes(f.key);u&&h&&(o.onOpenChange(!1),i.trigger?.focus(),f.preventDefault())})})})})})});Zf.displayName=Hf;function yf(e){return e?"open":"closed"}function kr(e){return e==="indeterminate"}function Wo(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}function nN(e){const a=document.activeElement;for(const n of e)if(n===a||(n.focus(),document.activeElement!==a))return}function rN(e,a){return e.map((n,r)=>e[(a+r)%e.length])}function lN(e,a,n){const l=a.length>1&&Array.from(a).every(m=>m===a[0])?a[0]:a,o=n?e.indexOf(n):-1;let s=rN(e,Math.max(o,0));l.length===1&&(s=s.filter(m=>m!==n));const d=s.find(m=>m.toLowerCase().startsWith(l.toLowerCase()));return d!==n?d:void 0}function oN(e,a){const{x:n,y:r}=e;let l=!1;for(let o=0,s=a.length-1;o<a.length;s=o++){const i=a[o],d=a[s],m=i.x,f=i.y,u=d.x,h=d.y;f>r!=h>r&&n<(u-m)*(r-f)/(h-f)+m&&(l=!l)}return l}function sN(e,a){if(!a)return!1;const n={x:e.clientX,y:e.clientY};return oN(n,a)}function bn(e){return a=>a.pointerType==="mouse"?e(a):void 0}var iN=af,cN=Io,dN=rf,uN=lf,mN=$o,fN=of,hN=jr,pN=df,gN=mf,vN=hf,AN=gf,MN=vf,EN=Af,xN=Ef,HN=xf,ZN=Zf,Pr="DropdownMenu",[yN]=Y0(Pr,[J7]),ae=J7(),[wN,wf]=yN(Pr),bf=e=>{const{__scopeDropdownMenu:a,children:n,dir:r,open:l,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,d=ae(a),m=t.useRef(null),[f,u]=Q0({prop:l,defaultProp:o??!1,onChange:s,caller:Pr});return c.jsx(wN,{scope:a,triggerId:P0(),triggerRef:m,contentId:P0(),open:f,onOpenChange:u,onOpenToggle:t.useCallback(()=>u(h=>!h),[u]),modal:i,children:c.jsx(iN,{...d,open:f,onOpenChange:u,dir:r,modal:i,children:n})})};bf.displayName=Pr;var Vf="DropdownMenuTrigger",Cf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...l}=e,o=wf(Vf,n),s=ae(n);return c.jsx(cN,{asChild:!0,...s,children:c.jsx(a0.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...l,ref:de(a,o.triggerRef),onPointerDown:X(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(o.onOpenToggle(),o.open||i.preventDefault())}),onKeyDown:X(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&o.onOpenToggle(),i.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Cf.displayName=Vf;var bN="DropdownMenuPortal",Lf=e=>{const{__scopeDropdownMenu:a,...n}=e,r=ae(a);return c.jsx(dN,{...r,...n})};Lf.displayName=bN;var Sf="DropdownMenuContent",Ff=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=wf(Sf,n),o=ae(n),s=t.useRef(!1);return c.jsx(uN,{id:l.contentId,"aria-labelledby":l.triggerId,...o,...r,ref:a,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{s.current||l.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:X(e.onInteractOutside,i=>{const d=i.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0,f=d.button===2||m;(!l.modal||f)&&(s.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)"}})});Ff.displayName=Sf;var VN="DropdownMenuGroup",_f=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(mN,{...l,...r,ref:a})});_f.displayName=VN;var CN="DropdownMenuLabel",Nf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(fN,{...l,...r,ref:a})});Nf.displayName=CN;var LN="DropdownMenuItem",Rf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(hN,{...l,...r,ref:a})});Rf.displayName=LN;var SN="DropdownMenuCheckboxItem",jf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(pN,{...l,...r,ref:a})});jf.displayName=SN;var FN="DropdownMenuRadioGroup",kf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(gN,{...l,...r,ref:a})});kf.displayName=FN;var _N="DropdownMenuRadioItem",Pf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(vN,{...l,...r,ref:a})});Pf.displayName=_N;var NN="DropdownMenuItemIndicator",If=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(AN,{...l,...r,ref:a})});If.displayName=NN;var RN="DropdownMenuSeparator",Df=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(MN,{...l,...r,ref:a})});Df.displayName=RN;var jN="DropdownMenuArrow",kN=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(EN,{...l,...r,ref:a})});kN.displayName=jN;var PN=e=>{const{__scopeDropdownMenu:a,children:n,open:r,onOpenChange:l,defaultOpen:o}=e,s=ae(a),[i,d]=Q0({prop:r,defaultProp:o??!1,onChange:l,caller:"DropdownMenuSub"});return c.jsx(xN,{...s,open:i,onOpenChange:d,children:n})},IN="DropdownMenuSubTrigger",Tf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(HN,{...l,...r,ref:a})});Tf.displayName=IN;var DN="DropdownMenuSubContent",Of=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(ZN,{...l,...r,ref:a,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)"}})});Of.displayName=DN;var TN=bf,ON=Cf,$f=Lf,$N=Ff,zN=_f,BN=Nf,WN=Rf,GN=jf,UN=kf,YN=Pf,zf=If,qN=Df,KN=PN,XN=Tf,QN=Of;function Go(e){return c.jsx(TN,{"data-slot":"dropdown-menu",...e})}function JN(e){return c.jsx($f,{"data-slot":"dropdown-menu-portal",...e})}function Uo(e){return c.jsx(ON,{"data-slot":"dropdown-menu-trigger",...e})}function Yo({className:e,sideOffset:a=4,...n}){return c.jsx($f,{children:c.jsx($N,{"data-slot":"dropdown-menu-content",sideOffset:a,className:w("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-popover max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function eR(e){return c.jsx(zN,{"data-slot":"dropdown-menu-group",...e})}function qo({className:e,inset:a,variant:n="default",...r}){return c.jsx(WN,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:w("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function tR({className:e,children:a,checked:n,...r}){return c.jsxs(GN,{"data-slot":"dropdown-menu-checkbox-item",className:w("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(zf,{children:c.jsx(zl,{className:"size-4"})})}),a]})}function aR(e){return c.jsx(UN,{"data-slot":"dropdown-menu-radio-group",...e})}function nR({className:e,children:a,...n}){return c.jsxs(YN,{"data-slot":"dropdown-menu-radio-item",className:w("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(zf,{children:c.jsx(pm,{className:"size-2 fill-current"})})}),a]})}function rR({className:e,inset:a,...n}){return c.jsx(BN,{"data-slot":"dropdown-menu-label","data-inset":a,className:w("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function lR({className:e,...a}){return c.jsx(qN,{"data-slot":"dropdown-menu-separator",className:w("bg-border -mx-1 my-1 h-px",e),...a})}function oR({className:e,...a}){return c.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:w("text-muted-foreground ml-auto text-xs tracking-widest",e),...a})}function sR(e){return c.jsx(KN,{"data-slot":"dropdown-menu-sub",...e})}function iR({className:e,inset:a,children:n,...r}){return c.jsxs(XN,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:w("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,c.jsx(dr,{className:"ml-auto size-4"})]})}function cR({className:e,...a}){return c.jsx(QN,{"data-slot":"dropdown-menu-sub-content",className:w("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-popover min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...a})}const Ir=({children:e,...a})=>c.jsx(Go,{...a,children:e});Ir.displayName="DropdownMenu";const Bf=({children:e,...a})=>c.jsx(JN,{...a,children:e});Bf.displayName="DropdownMenuPortal";const Dr=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(Uo,{ref:r,className:w(e),...n,children:a}));Dr.displayName="DropdownMenuTrigger";const Tr=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(Yo,{ref:r,className:w(e),...n,children:a}));Tr.displayName="DropdownMenuContent";const Wf=({children:e,...a})=>c.jsx(eR,{...a,children:e});Wf.displayName="DropdownMenuGroup";const Gf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(rR,{ref:r,className:w(e),...n,children:a}));Gf.displayName="DropdownMenuLabel";const Xe=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(qo,{ref:r,className:w(e),...n,children:a}));Xe.displayName="DropdownMenuItem";const Uf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(tR,{ref:r,className:w(e),...n,children:a}));Uf.displayName="DropdownMenuCheckboxItem";const Yf=({children:e,...a})=>c.jsx(aR,{...a,children:e});Yf.displayName="DropdownMenuRadioGroup";const qf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(nR,{ref:r,className:w(e),...n,children:a}));qf.displayName="DropdownMenuRadioItem";const Or=t.forwardRef(({className:e,...a},n)=>c.jsx(lR,{ref:n,className:w(e),...a}));Or.displayName="DropdownMenuSeparator";const Kf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(oR,{ref:r,className:w(e),...n,children:a}));Kf.displayName="DropdownMenuShortcut";const Xf=({children:e,...a})=>c.jsx(sR,{...a,children:e});Xf.displayName="DropdownMenuSub";const Qf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(iR,{ref:r,className:w(e),...n,children:a}));Qf.displayName="DropdownMenuSubTrigger";const Jf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(cR,{ref:r,className:w(e),...n,children:a}));Jf.displayName="DropdownMenuSubContent";const dR=({allowed:e,children:a,message:n="You don't have permission to perform this action"})=>e?c.jsx(c.Fragment,{children:a}):c.jsx(V1,{content:n,show:!e,children:c.jsx("span",{className:"block w-full",children:a})}),eh=({options:e,icon:a=null,className:n,disabled:r=!1,marginBottom:l})=>{const[o,s]=t.useState(!1),i=f=>{s(f)},d=f=>{f.allowed&&f.handleClick&&f.handleClick(e),s(!1)};if(!e.actions||e.actions.length===0)return null;const m={};return l!==void 0&&(m.marginBottom=`${l}px`),c.jsx("div",{className:w("inline-flex relative",n),style:m,children:c.jsxs(Ir,{open:o,onOpenChange:i,children:[c.jsx(Dr,{asChild:!0,disabled:r,children:c.jsx(me,{disabled:r,variant:"ghost",size:"icon",className:"h-8 w-8 p-1","aria-label":"more","aria-controls":o?"dots-menu":void 0,"aria-expanded":o,"aria-haspopup":"true",children:c.jsx(r0,{name:a||"DotsThreeCircleVertical",size:"sm",className:w("transition-colors",o?"text-primary":"text-muted-foreground")})})}),c.jsx(Tr,{id:"dots-menu",align:"end",className:w("max-h-[216px] overflow-y-auto"),children:e.actions.map(f=>c.jsx(dR,{allowed:f.allowed??!0,children:c.jsxs(Xe,{onClick:()=>d(f),disabled:!f.allowed,className:"flex items-center gap-3.5 cursor-pointer",children:[c.jsx(r0,{name:f.icon,size:"sm",className:"shrink-0"}),c.jsx("span",{children:f.name||String(f.key)})]})},f.key))})]})})};eh.displayName="DotsMenu";var th="Toggle",Ko=t.forwardRef((e,a)=>{const{pressed:n,defaultPressed:r,onPressedChange:l,...o}=e,[s,i]=Q0({prop:n,onChange:l,defaultProp:r??!1,caller:th});return c.jsx(a0.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:a,onClick:X(e.onClick,()=>{e.disabled||i(!s)})})});Ko.displayName=th;var ah=Ko,q1="ToggleGroup",[nh]=Y0(q1,[fa]),rh=fa(),Xo=Z.forwardRef((e,a)=>{const{type:n,...r}=e;if(n==="single"){const l=r;return c.jsx(uR,{...l,ref:a})}if(n==="multiple"){const l=r;return c.jsx(mR,{...l,ref:a})}throw new Error(`Missing prop \`type\` expected on \`${q1}\``)});Xo.displayName=q1;var[lh,oh]=nh(q1),uR=Z.forwardRef((e,a)=>{const{value:n,defaultValue:r,onValueChange:l=()=>{},...o}=e,[s,i]=Q0({prop:n,defaultProp:r??"",onChange:l,caller:q1});return c.jsx(lh,{scope:e.__scopeToggleGroup,type:"single",value:Z.useMemo(()=>s?[s]:[],[s]),onItemActivate:i,onItemDeactivate:Z.useCallback(()=>i(""),[i]),children:c.jsx(sh,{...o,ref:a})})}),mR=Z.forwardRef((e,a)=>{const{value:n,defaultValue:r,onValueChange:l=()=>{},...o}=e,[s,i]=Q0({prop:n,defaultProp:r??[],onChange:l,caller:q1}),d=Z.useCallback(f=>i((u=[])=>[...u,f]),[i]),m=Z.useCallback(f=>i((u=[])=>u.filter(h=>h!==f)),[i]);return c.jsx(lh,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:d,onItemDeactivate:m,children:c.jsx(sh,{...o,ref:a})})});Xo.displayName=q1;var[fR,hR]=nh(q1),sh=Z.forwardRef((e,a)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:l=!0,orientation:o,dir:s,loop:i=!0,...d}=e,m=rh(n),f=na(s),u={role:"group",dir:f,...d};return c.jsx(fR,{scope:n,rovingFocus:l,disabled:r,children:l?c.jsx(wo,{asChild:!0,...m,orientation:o,dir:f,loop:i,children:c.jsx(a0.div,{...u,ref:a})}):c.jsx(a0.div,{...u,ref:a})})}),$r="ToggleGroupItem",ih=Z.forwardRef((e,a)=>{const n=oh($r,e.__scopeToggleGroup),r=hR($r,e.__scopeToggleGroup),l=rh(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:o,disabled:s},d=Z.useRef(null);return r.rovingFocus?c.jsx(bo,{asChild:!0,...l,focusable:!s,active:o,ref:d,children:c.jsx(ch,{...i,ref:a})}):c.jsx(ch,{...i,ref:a})});ih.displayName=$r;var ch=Z.forwardRef((e,a)=>{const{__scopeToggleGroup:n,value:r,...l}=e,o=oh($r,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=o.type==="single"?s:void 0;return c.jsx(Ko,{...i,...l,ref:a,onPressedChange:d=>{d?o.onItemActivate(r):o.onItemDeactivate(r)}})}),dh=Xo,uh=ih;const mh=_0("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-border bg-background hover:bg-muted hover:text-accent-foreground data-[state=on]:bg-muted"},size:{default:"h-9 p-1.5",sm:"h-8 p-1.5",lg:"h-10 p-1.5"}},defaultVariants:{variant:"default",size:"default"}}),pR=t.forwardRef(({className:e,variant:a,size:n,...r},l)=>c.jsx(ah,{ref:l,className:w(mh({variant:a,size:n,className:e})),...r}));pR.displayName=ah.displayName;const fh=t.createContext({size:"default",variant:"default"}),hh=t.forwardRef(({className:e,variant:a,size:n,children:r,...l},o)=>c.jsx(dh,{ref:o,className:w("inline-flex items-center justify-center",e),...l,children:c.jsx(fh.Provider,{value:{variant:a,size:n},children:r})}));hh.displayName=dh.displayName;const ph=t.forwardRef(({className:e,children:a,variant:n,size:r,...l},o)=>{const s=t.useContext(fh);return c.jsx(uh,{ref:o,className:w(mh({variant:s.variant||n,size:s.size||r}),"rounded-none first:rounded-l-md last:rounded-r-md",(s.variant==="outline"||n==="outline")&&"-mr-px",e),...l,children:a})});ph.displayName=uh.displayName;const gh=t.forwardRef(({className:e,variant:a,size:n,children:r,onChange:l,...o},s)=>c.jsx(hh,{ref:s,className:w(e),variant:a,size:n,onValueChange:l,...o,children:r}));gh.displayName="ToggleGroup";const vh=t.forwardRef(({className:e,variant:a,size:n,children:r,...l},o)=>c.jsx(ph,{ref:o,className:w(e),variant:a,size:n,...l,children:r}));vh.displayName="ToggleGroupItem";const Qo=t.forwardRef(({children:e,current:a=!1,badge:n,disabled:r=!1,className:l,onClick:o,...s},i)=>{const d=m=>{if(r){m.preventDefault();return}o?.(m)};return c.jsx("a",{ref:i,className:w("box-border flex items-center justify-center gap-2 px-0 py-1.5 h-12",a&&"border-b-2 border-primary",!a&&"border-b-2 border-transparent",r&&"pointer-events-none cursor-not-allowed",l),onClick:d,"aria-current":a?"page":void 0,"aria-disabled":r,...s,children:c.jsxs("div",{className:w("flex items-center justify-center gap-2 px-2.5 py-2 rounded-md",!r&&!a&&"text-muted-foreground",!r&&a&&"text-foreground",r&&"text-muted-foreground opacity-50",!r&&!a&&"hover:bg-accent hover:text-accent-foreground"),children:[c.jsx("span",{className:"text-sm font-normal leading-5 whitespace-nowrap",children:e}),n&&c.jsx(m1,{variant:"default",className:"min-w-5 h-5 px-1 rounded-full",children:n})]})})});Qo.displayName="NavLink";const gR=_0("font-sans",{variants:{variant:{h1:"scroll-m-20 text-4xl tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl tracking-tight",h3:"scroll-m-20 text-2xl tracking-tight",h4:"scroll-m-20 text-xl tracking-tight",p:"",lead:"text-xl text-muted-foreground",lg:"text-lg font-semibold",xl:"text-xl font-semibold",xs:"text-xs font-medium leading-none",sm:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground",blockquote:"mt-6 border-l-2 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2"},weight:{regular:"font-normal",bold:"font-bold",semibold:"font-semibold"}},defaultVariants:{variant:"p"}});function vR(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"blockquote":return"blockquote";case"list":return"ul";case"p":case"lead":case"lg":case"sm":case"muted":default:return"p"}}const G0=Z.forwardRef(({className:e,variant:a="p",weight:n,as:r,...l},o)=>{const s=r||vR(a??"p"),i=n!==void 0?{variant:a,weight:n}:{variant:a};return Z.createElement(s,{className:w(gR(i),e),ref:o,...l})});G0.displayName="Typography";function Ah(e,[a,n]){return Math.min(n,Math.max(a,e))}function AR(e){const a=MR(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(xR);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function MR(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=ZR(l),i=HR(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var ER=Symbol("radix.slottable");function xR(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ER}function HR(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function ZR(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yR=[" ","Enter","ArrowUp","ArrowDown"],wR=[" ","Enter"],Mt="Select",[zr,Br,bR]=X2(Mt),[ha]=Y0(Mt,[bR,O1]),Wr=O1(),[VR,K1]=ha(Mt),[CR,LR]=ha(Mt),Mh=e=>{const{__scopeSelect:a,children:n,open:r,defaultOpen:l,onOpenChange:o,value:s,defaultValue:i,onValueChange:d,dir:m,name:f,autoComplete:u,disabled:h,required:p,form:g}=e,v=Wr(a),[A,M]=t.useState(null),[E,x]=t.useState(null),[H,y]=t.useState(!1),b=na(m),[V,S]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:Mt}),[j,D]=Q0({prop:s,defaultProp:i,onChange:d,caller:Mt}),z=t.useRef(null),P=A?g||!!A.closest("form"):!0,[k,G]=t.useState(new Set),K=Array.from(k).map(F=>F.props.value).join(";");return c.jsx(an,{...v,children:c.jsxs(VR,{required:p,scope:a,trigger:A,onTriggerChange:M,valueNode:E,onValueNodeChange:x,valueNodeHasChildren:H,onValueNodeHasChildrenChange:y,contentId:P0(),value:j,onValueChange:D,open:V,onOpenChange:S,dir:b,triggerPointerDownPosRef:z,disabled:h,children:[c.jsx(zr.Provider,{scope:a,children:c.jsx(CR,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(F=>{G(R=>new Set(R).add(F))},[]),onNativeOptionRemove:t.useCallback(F=>{G(R=>{const _=new Set(R);return _.delete(F),_})},[]),children:n})}),P?c.jsxs(Bh,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:F=>D(F.target.value),disabled:h,form:g,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(k)]},K):null]})})};Mh.displayName=Mt;var Eh="SelectTrigger",xh=t.forwardRef((e,a)=>{const{__scopeSelect:n,disabled:r=!1,...l}=e,o=Wr(n),s=K1(Eh,n),i=s.disabled||r,d=p0(a,s.onTriggerChange),m=Br(n),f=t.useRef("touch"),[u,h,p]=Gh(v=>{const A=m().filter(x=>!x.disabled),M=A.find(x=>x.value===s.value),E=Uh(A,v,M);E!==void 0&&s.onValueChange(E.value)}),g=v=>{i||(s.onOpenChange(!0),p()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return c.jsx(nn,{asChild:!0,...o,children:c.jsx(a0.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Wh(s.value)?"":void 0,...l,ref:d,onClick:X(l.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&g(v)}),onPointerDown:X(l.onPointerDown,v=>{f.current=v.pointerType;const A=v.target;A.hasPointerCapture(v.pointerId)&&A.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:X(l.onKeyDown,v=>{const A=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(A&&v.key===" ")&&yR.includes(v.key)&&(g(),v.preventDefault())})})})});xh.displayName=Eh;var Hh="SelectValue",Zh=t.forwardRef((e,a)=>{const{__scopeSelect:n,className:r,style:l,children:o,placeholder:s="",...i}=e,d=K1(Hh,n),{onValueNodeHasChildrenChange:m}=d,f=o!==void 0,u=p0(a,d.onValueNodeChange);return $0(()=>{m(f)},[m,f]),c.jsx(a0.span,{...i,ref:u,style:{pointerEvents:"none"},children:Wh(d.value)?c.jsx(c.Fragment,{children:s}):o})});Zh.displayName=Hh;var SR="SelectIcon",yh=t.forwardRef((e,a)=>{const{__scopeSelect:n,children:r,...l}=e;return c.jsx(a0.span,{"aria-hidden":!0,...l,ref:a,children:r||"▼"})});yh.displayName=SR;var FR="SelectPortal",wh=e=>c.jsx(ta,{asChild:!0,...e});wh.displayName=FR;var Et="SelectContent",bh=t.forwardRef((e,a)=>{const n=K1(Et,e.__scopeSelect),[r,l]=t.useState();if($0(()=>{l(new DocumentFragment)},[]),!n.open){const o=r;return o?S2.createPortal(c.jsx(Vh,{scope:e.__scopeSelect,children:c.jsx(zr.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(Ch,{...e,ref:a})});bh.displayName=Et;var Qe=10,[Vh,X1]=ha(Et),_R="SelectContentImpl",NR=AR("SelectContent.RemoveScroll"),Ch=t.forwardRef((e,a)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:i,sideOffset:d,align:m,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:v,avoidCollisions:A,...M}=e,E=K1(Et,n),[x,H]=t.useState(null),[y,b]=t.useState(null),V=p0(a,I=>H(I)),[S,j]=t.useState(null),[D,z]=t.useState(null),P=Br(n),[k,G]=t.useState(!1),K=t.useRef(!1);t.useEffect(()=>{if(x)return Ar(x)},[x]),pr();const F=t.useCallback(I=>{const[Y,...s0]=P().map($=>$.ref.current),[n0]=s0.slice(-1),u0=document.activeElement;for(const $ of I)if($===u0||($?.scrollIntoView({block:"nearest"}),$===Y&&y&&(y.scrollTop=0),$===n0&&y&&(y.scrollTop=y.scrollHeight),$?.focus(),document.activeElement!==u0))return},[P,y]),R=t.useCallback(()=>F([S,x]),[F,S,x]);t.useEffect(()=>{k&&R()},[k,R]);const{onOpenChange:_,triggerPointerDownPosRef:W}=E;t.useEffect(()=>{if(x){let I={x:0,y:0};const Y=n0=>{I={x:Math.abs(Math.round(n0.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(n0.pageY)-(W.current?.y??0))}},s0=n0=>{I.x<=10&&I.y<=10?n0.preventDefault():x.contains(n0.target)||_(!1),document.removeEventListener("pointermove",Y),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",s0,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",s0,{capture:!0})}}},[x,_,W]),t.useEffect(()=>{const I=()=>_(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[_]);const[Q,t0]=Gh(I=>{const Y=P().filter(u0=>!u0.disabled),s0=Y.find(u0=>u0.ref.current===document.activeElement),n0=Uh(Y,I,s0);n0&&setTimeout(()=>n0.ref.current.focus())}),N=t.useCallback((I,Y,s0)=>{const n0=!K.current&&!s0;(E.value!==void 0&&E.value===Y||n0)&&(j(I),n0&&(K.current=!0))},[E.value]),L=t.useCallback(()=>x?.focus(),[x]),O=t.useCallback((I,Y,s0)=>{const n0=!K.current&&!s0;(E.value!==void 0&&E.value===Y||n0)&&z(I)},[E.value]),B=r==="popper"?Jo:Lh,e0=B===Jo?{side:i,sideOffset:d,align:m,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:v,avoidCollisions:A}:{};return c.jsx(Vh,{scope:n,content:x,viewport:y,onViewportChange:b,itemRefCallback:N,selectedItem:S,onItemLeave:L,itemTextRefCallback:O,focusSelectedItem:R,selectedItemText:D,position:r,isPositioned:k,searchRef:Q,children:c.jsx(gn,{as:NR,allowPinchZoom:!0,children:c.jsx(pn,{asChild:!0,trapped:E.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:X(l,I=>{E.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:c.jsx(B,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:I=>I.preventDefault(),...M,...e0,onPlaced:()=>G(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:X(M.onKeyDown,I=>{const Y=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Y&&I.key.length===1&&t0(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let n0=P().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);if(["ArrowUp","End"].includes(I.key)&&(n0=n0.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const u0=I.target,$=n0.indexOf(u0);n0=n0.slice($+1)}setTimeout(()=>F(n0)),I.preventDefault()}})})})})})})});Ch.displayName=_R;var RR="SelectItemAlignedPosition",Lh=t.forwardRef((e,a)=>{const{__scopeSelect:n,onPlaced:r,...l}=e,o=K1(Et,n),s=X1(Et,n),[i,d]=t.useState(null),[m,f]=t.useState(null),u=p0(a,V=>f(V)),h=Br(n),p=t.useRef(!1),g=t.useRef(!0),{viewport:v,selectedItem:A,selectedItemText:M,focusSelectedItem:E}=s,x=t.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&m&&v&&A&&M){const V=o.trigger.getBoundingClientRect(),S=m.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),D=M.getBoundingClientRect();if(o.dir!=="rtl"){const u0=D.left-S.left,$=j.left-u0,J=V.left-$,q=V.width+J,U=Math.max(q,S.width),m0=window.innerWidth-Qe,M0=Ah($,[Qe,Math.max(Qe,m0-U)]);i.style.minWidth=q+"px",i.style.left=M0+"px"}else{const u0=S.right-D.right,$=window.innerWidth-j.right-u0,J=window.innerWidth-V.right-$,q=V.width+J,U=Math.max(q,S.width),m0=window.innerWidth-Qe,M0=Ah($,[Qe,Math.max(Qe,m0-U)]);i.style.minWidth=q+"px",i.style.right=M0+"px"}const z=h(),P=window.innerHeight-Qe*2,k=v.scrollHeight,G=window.getComputedStyle(m),K=parseInt(G.borderTopWidth,10),F=parseInt(G.paddingTop,10),R=parseInt(G.borderBottomWidth,10),_=parseInt(G.paddingBottom,10),W=K+F+k+_+R,Q=Math.min(A.offsetHeight*5,W),t0=window.getComputedStyle(v),N=parseInt(t0.paddingTop,10),L=parseInt(t0.paddingBottom,10),O=V.top+V.height/2-Qe,B=P-O,e0=A.offsetHeight/2,I=A.offsetTop+e0,Y=K+F+I,s0=W-Y;if(Y<=O){const u0=z.length>0&&A===z[z.length-1].ref.current;i.style.bottom="0px";const $=m.clientHeight-v.offsetTop-v.offsetHeight,J=Math.max(B,e0+(u0?L:0)+$+R),q=Y+J;i.style.height=q+"px"}else{const u0=z.length>0&&A===z[0].ref.current;i.style.top="0px";const J=Math.max(O,K+v.offsetTop+(u0?N:0)+e0)+s0;i.style.height=J+"px",v.scrollTop=Y-O+v.offsetTop}i.style.margin=`${Qe}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=P+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,i,m,v,A,M,o.dir,r]);$0(()=>x(),[x]);const[H,y]=t.useState();$0(()=>{m&&y(window.getComputedStyle(m).zIndex)},[m]);const b=t.useCallback(V=>{V&&g.current===!0&&(x(),E?.(),g.current=!1)},[x,E]);return c.jsx(kR,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:H},children:c.jsx(a0.div,{...l,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});Lh.displayName=RR;var jR="SelectPopperPosition",Jo=t.forwardRef((e,a)=>{const{__scopeSelect:n,align:r="start",collisionPadding:l=Qe,...o}=e,s=Wr(n);return c.jsx(B2,{...s,...o,ref:a,align:r,collisionPadding:l,style:{boxSizing:"border-box",...o.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)"}})});Jo.displayName=jR;var[kR,e6]=ha(Et,{}),t6="SelectViewport",Sh=t.forwardRef((e,a)=>{const{__scopeSelect:n,nonce:r,...l}=e,o=X1(t6,n),s=e6(t6,n),i=p0(a,o.onViewportChange),d=t.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(zr.Slot,{scope:n,children:c.jsx(a0.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:X(l.onScroll,m=>{const f=m.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=s;if(h?.current&&u){const p=Math.abs(d.current-f.scrollTop);if(p>0){const g=window.innerHeight-Qe*2,v=parseFloat(u.style.minHeight),A=parseFloat(u.style.height),M=Math.max(v,A);if(M<g){const E=M+p,x=Math.min(g,E),H=E-x;u.style.height=x+"px",u.style.bottom==="0px"&&(f.scrollTop=H>0?H:0,u.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Sh.displayName=t6;var Fh="SelectGroup",[PR,IR]=ha(Fh),_h=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=P0();return c.jsx(PR,{scope:n,id:l,children:c.jsx(a0.div,{role:"group","aria-labelledby":l,...r,ref:a})})});_h.displayName=Fh;var Nh="SelectLabel",Rh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=IR(Nh,n);return c.jsx(a0.div,{id:l.id,...r,ref:a})});Rh.displayName=Nh;var Gr="SelectItem",[DR,jh]=ha(Gr),kh=t.forwardRef((e,a)=>{const{__scopeSelect:n,value:r,disabled:l=!1,textValue:o,...s}=e,i=K1(Gr,n),d=X1(Gr,n),m=i.value===r,[f,u]=t.useState(o??""),[h,p]=t.useState(!1),g=p0(a,E=>d.itemRefCallback?.(E,r,l)),v=P0(),A=t.useRef("touch"),M=()=>{l||(i.onValueChange(r),i.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 c.jsx(DR,{scope:n,value:r,disabled:l,textId:v,isSelected:m,onItemTextChange:t.useCallback(E=>{u(x=>x||(E?.textContent??"").trim())},[]),children:c.jsx(zr.ItemSlot,{scope:n,value:r,disabled:l,textValue:f,children:c.jsx(a0.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":m&&h,"data-state":m?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:X(s.onFocus,()=>p(!0)),onBlur:X(s.onBlur,()=>p(!1)),onClick:X(s.onClick,()=>{A.current!=="mouse"&&M()}),onPointerUp:X(s.onPointerUp,()=>{A.current==="mouse"&&M()}),onPointerDown:X(s.onPointerDown,E=>{A.current=E.pointerType}),onPointerMove:X(s.onPointerMove,E=>{A.current=E.pointerType,l?d.onItemLeave?.():A.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:X(s.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(wR.includes(E.key)&&M(),E.key===" "&&E.preventDefault())})})})})});kh.displayName=Gr;var Vn="SelectItemText",Ph=t.forwardRef((e,a)=>{const{__scopeSelect:n,className:r,style:l,...o}=e,s=K1(Vn,n),i=X1(Vn,n),d=jh(Vn,n),m=LR(Vn,n),[f,u]=t.useState(null),h=p0(a,M=>u(M),d.onItemTextChange,M=>i.itemTextRefCallback?.(M,d.value,d.disabled)),p=f?.textContent,g=t.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:A}=m;return $0(()=>(v(g),()=>A(g)),[v,A,g]),c.jsxs(c.Fragment,{children:[c.jsx(a0.span,{id:d.textId,...o,ref:h}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S2.createPortal(o.children,s.valueNode):null]})});Ph.displayName=Vn;var Ih="SelectItemIndicator",Dh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e;return jh(Ih,n).isSelected?c.jsx(a0.span,{"aria-hidden":!0,...r,ref:a}):null});Dh.displayName=Ih;var a6="SelectScrollUpButton",Th=t.forwardRef((e,a)=>{const n=X1(a6,e.__scopeSelect),r=e6(a6,e.__scopeSelect),[l,o]=t.useState(!1),s=p0(a,r.onScrollButtonChange);return $0(()=>{if(n.viewport&&n.isPositioned){let i=function(){const m=d.scrollTop>0;o(m)};const d=n.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?c.jsx($h,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=n;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});Th.displayName=a6;var n6="SelectScrollDownButton",Oh=t.forwardRef((e,a)=>{const n=X1(n6,e.__scopeSelect),r=e6(n6,e.__scopeSelect),[l,o]=t.useState(!1),s=p0(a,r.onScrollButtonChange);return $0(()=>{if(n.viewport&&n.isPositioned){let i=function(){const m=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<m;o(f)};const d=n.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?c.jsx($h,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=n;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});Oh.displayName=n6;var $h=t.forwardRef((e,a)=>{const{__scopeSelect:n,onAutoScroll:r,...l}=e,o=X1("SelectScrollButton",n),s=t.useRef(null),i=Br(n),d=t.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return t.useEffect(()=>()=>d(),[d]),$0(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),c.jsx(a0.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:X(l.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(l.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(l.onPointerLeave,()=>{d()})})}),TR="SelectSeparator",zh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e;return c.jsx(a0.div,{"aria-hidden":!0,...r,ref:a})});zh.displayName=TR;var r6="SelectArrow",OR=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=Wr(n),o=K1(r6,n),s=X1(r6,n);return o.open&&s.position==="popper"?c.jsx(W2,{...l,...r,ref:a}):null});OR.displayName=r6;var $R="SelectBubbleInput",Bh=t.forwardRef(({__scopeSelect:e,value:a,...n},r)=>{const l=t.useRef(null),o=p0(r,l),s=ir(a);return t.useEffect(()=>{const i=l.current;if(!i)return;const d=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(d,"value").set;if(s!==a&&f){const u=new Event("change",{bubbles:!0});f.call(i,a),i.dispatchEvent(u)}},[s,a]),c.jsx(a0.select,{...n,style:{...e5,...n.style},ref:o,defaultValue:a})});Bh.displayName=$R;function Wh(e){return e===""||e===void 0}function Gh(e){const a=Re(e),n=t.useRef(""),r=t.useRef(0),l=t.useCallback(s=>{const i=n.current+s;a(i),(function d(m){n.current=m,window.clearTimeout(r.current),m!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(i)},[a]),o=t.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,l,o]}function Uh(e,a,n){const l=a.length>1&&Array.from(a).every(m=>m===a[0])?a[0]:a,o=n?e.indexOf(n):-1;let s=zR(e,Math.max(o,0));l.length===1&&(s=s.filter(m=>m!==n));const d=s.find(m=>m.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==n?d:void 0}function zR(e,a){return e.map((n,r)=>e[(a+r)%e.length])}var BR=Mh,Yh=xh,WR=Zh,GR=yh,UR=wh,qh=bh,YR=Sh,qR=_h,Kh=Rh,Xh=kh,KR=Ph,XR=Dh,Qh=Th,Jh=Oh,e9=zh;const QR=BR,JR=qR,ej=WR,t9=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs(Yh,{ref:r,className:w("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 shadow-xs [&>span]:min-w-0 [&>span]:truncate",e),...n,children:[a,c.jsx(GR,{asChild:!0,children:c.jsx(r0,{name:"CaretDown",size:"sm",className:"opacity-50 shrink-0"})})]}));t9.displayName=Yh.displayName;const a9=t.forwardRef(({className:e,...a},n)=>c.jsx(Qh,{ref:n,className:w("flex cursor-default items-center justify-center py-1",e),...a,children:c.jsx(r0,{name:"CaretUp",size:"sm"})}));a9.displayName=Qh.displayName;const n9=t.forwardRef(({className:e,...a},n)=>c.jsx(Jh,{ref:n,className:w("flex cursor-default items-center justify-center py-1",e),...a,children:c.jsx(r0,{name:"CaretDown",size:"sm"})}));n9.displayName=Jh.displayName;const r9=t.forwardRef(({className:e,children:a,position:n="popper",...r},l)=>c.jsx(UR,{children:c.jsxs(qh,{ref:l,className:w("relative z-[1100] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(a9,{}),c.jsx(YR,{className:w("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),c.jsx(n9,{})]})}));r9.displayName=qh.displayName;const l9=t.forwardRef(({className:e,...a},n)=>c.jsx(Kh,{ref:n,className:w("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...a}));l9.displayName=Kh.displayName;const l6=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs(Xh,{ref:r,className:w("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex h-4 w-4 items-center justify-center",children:c.jsx(XR,{children:c.jsx(r0,{name:"Check",size:"sm"})})}),c.jsx(KR,{children:a})]}));l6.displayName=Xh.displayName;const tj=t.forwardRef(({className:e,...a},n)=>c.jsx(e9,{ref:n,className:w("-mx-1 my-1 h-px bg-muted",e),...a}));tj.displayName=e9.displayName;const o9=t.forwardRef(({label:e,description:a,error:n,info:r,requiredIndicator:l,required:o=!1,optional:s=!1,placeholder:i="Select an option",value:d,defaultValue:m,onChange:f,disabled:u=!1,options:h=[],groups:p=[],className:g,id:v},A)=>{const M=p.length>0,E=h.length>0;return c.jsxs("div",{className:w("w-full",g),children:[(e||r||l)&&c.jsxs("div",{className:"mb-2",children:[c.jsx(Me,{htmlFor:v,info:r,requiredIndicator:l,required:o,disabled:u,children:e}),s&&!l&&c.jsx(G0,{variant:"sm",className:"text-muted-foreground",children:"(Optional)"})]}),a&&!n&&c.jsx(G0,{variant:"sm",className:w("text-muted-foreground mb-2",u&&"opacity-50"),children:a}),c.jsxs(QR,{value:d,defaultValue:m,onValueChange:f,disabled:u,children:[c.jsx(t9,{ref:A,id:v,className:w(n&&"border-destructive"),children:c.jsx(ej,{placeholder:i})}),c.jsx(r9,{children:M?p.map((x,H)=>c.jsxs(JR,{children:[x.label&&c.jsx(l9,{children:x.label}),x.options.map(y=>c.jsxs(l6,{value:y.value,children:[y.icon&&c.jsx("span",{className:"mr-2 inline-flex items-center",children:y.icon}),y.label]},y.value))]},H)):E?h.map(x=>c.jsx(l6,{value:x.value,children:c.jsxs("span",{className:"flex items-center",children:[x.icon&&c.jsx("span",{className:"mr-2 inline-flex items-center",children:x.icon}),x.label]})},x.value)):null})]}),n&&c.jsx(G0,{variant:"sm",className:"text-destructive mt-2",children:n})]})});o9.displayName="Select";const s9=Z7,i9=y7,o6=t.forwardRef(({className:e,align:a="start",sideOffset:n=4,...r},l)=>c.jsx(w7,{children:c.jsx(wr,{ref:l,align:a,sideOffset:n,className:w("z-popover w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),role:"combobox",...r})}));o6.displayName=wr.displayName;var c9=1,aj=.9,nj=.8,rj=.17,s6=.1,i6=.999,lj=.9999,oj=.99,sj=/[\\\/_+.#"@\[\(\{&]/,ij=/[\\\/_+.#"@\[\(\{&]/g,cj=/[\s-]/,d9=/[\s-]/g;function c6(e,a,n,r,l,o,s){if(o===a.length)return l===e.length?c9:oj;var i=`${l},${o}`;if(s[i]!==void 0)return s[i];for(var d=r.charAt(o),m=n.indexOf(d,l),f=0,u,h,p,g;m>=0;)u=c6(e,a,n,r,m+1,o+1,s),u>f&&(m===l?u*=c9:sj.test(e.charAt(m-1))?(u*=nj,p=e.slice(l,m-1).match(ij),p&&l>0&&(u*=Math.pow(i6,p.length))):cj.test(e.charAt(m-1))?(u*=aj,g=e.slice(l,m-1).match(d9),g&&l>0&&(u*=Math.pow(i6,g.length))):(u*=rj,l>0&&(u*=Math.pow(i6,m-l))),e.charAt(m)!==a.charAt(o)&&(u*=lj)),(u<s6&&n.charAt(m-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(m-1)!==r.charAt(o))&&(h=c6(e,a,n,r,m+1,o+2,s),h*s6>u&&(u=h*s6)),u>f&&(f=u),m=n.indexOf(d,m+1);return s[i]=f,f}function u9(e){return e.toLowerCase().replace(d9," ")}function dj(e,a,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,c6(e,a,u9(e),u9(a),0,0,{})}function uj(e){const a=mj(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(hj);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function mj(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=gj(l),i=pj(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var fj=Symbol("radix.slottable");function hj(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fj}function pj(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function gj(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ur="Dialog",[m9]=Y0(Ur),[vj,Je]=m9(Ur),f9=e=>{const{__scopeDialog:a,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:s=!0}=e,i=t.useRef(null),d=t.useRef(null),[m,f]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:Ur});return c.jsx(vj,{scope:a,triggerRef:i,contentRef:d,contentId:P0(),titleId:P0(),descriptionId:P0(),open:m,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(u=>!u),[f]),modal:s,children:n})};f9.displayName=Ur;var h9="DialogTrigger",Aj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(h9,n),o=p0(a,l.triggerRef);return c.jsx(a0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":m6(l.open),...r,ref:o,onClick:X(e.onClick,l.onOpenToggle)})});Aj.displayName=h9;var d6="DialogPortal",[Mj,p9]=m9(d6,{forceMount:void 0}),g9=e=>{const{__scopeDialog:a,forceMount:n,children:r,container:l}=e,o=Je(d6,a);return c.jsx(Mj,{scope:a,forceMount:n,children:t.Children.map(r,s=>c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:s})}))})};g9.displayName=d6;var Yr="DialogOverlay",v9=t.forwardRef((e,a)=>{const n=p9(Yr,e.__scopeDialog),{forceMount:r=n.forceMount,...l}=e,o=Je(Yr,e.__scopeDialog);return o.modal?c.jsx(ue,{present:r||o.open,children:c.jsx(xj,{...l,ref:a})}):null});v9.displayName=Yr;var Ej=uj("DialogOverlay.RemoveScroll"),xj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(Yr,n);return c.jsx(gn,{as:Ej,allowPinchZoom:!0,shards:[l.contentRef],children:c.jsx(a0.div,{"data-state":m6(l.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})}),xt="DialogContent",A9=t.forwardRef((e,a)=>{const n=p9(xt,e.__scopeDialog),{forceMount:r=n.forceMount,...l}=e,o=Je(xt,e.__scopeDialog);return c.jsx(ue,{present:r||o.open,children:o.modal?c.jsx(Hj,{...l,ref:a}):c.jsx(Zj,{...l,ref:a})})});A9.displayName=xt;var Hj=t.forwardRef((e,a)=>{const n=Je(xt,e.__scopeDialog),r=t.useRef(null),l=p0(a,n.contentRef,r);return t.useEffect(()=>{const o=r.current;if(o)return Ar(o)},[]),c.jsx(M9,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&o.preventDefault()}),onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault())})}),Zj=t.forwardRef((e,a)=>{const n=Je(xt,e.__scopeDialog),r=t.useRef(!1),l=t.useRef(!1);return c.jsx(M9,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,l.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&l.current&&o.preventDefault()}})}),M9=t.forwardRef((e,a)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:l,onCloseAutoFocus:o,...s}=e,i=Je(xt,n),d=t.useRef(null),m=p0(a,d);return pr(),c.jsxs(c.Fragment,{children:[c.jsx(pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:l,onUnmountAutoFocus:o,children:c.jsx(Kt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":m6(i.open),...s,ref:m,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Vj,{titleId:i.titleId}),c.jsx(Lj,{contentRef:d,descriptionId:i.descriptionId})]})]})}),u6="DialogTitle",yj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(u6,n);return c.jsx(a0.h2,{id:l.titleId,...r,ref:a})});yj.displayName=u6;var E9="DialogDescription",wj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(E9,n);return c.jsx(a0.p,{id:l.descriptionId,...r,ref:a})});wj.displayName=E9;var x9="DialogClose",bj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(x9,n);return c.jsx(a0.button,{type:"button",...r,ref:a,onClick:X(e.onClick,()=>l.onOpenChange(!1))})});bj.displayName=x9;function m6(e){return e?"open":"closed"}var H9="DialogTitleWarning",[K$,Z9]=sy(H9,{contentName:xt,titleName:u6,docsSlug:"dialog"}),Vj=({titleId:e})=>{const a=Z9(H9),n=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
|
|
41
|
+
`)},AF=0,ca=[];function MF(e){var a=t.useRef([]),n=t.useRef([0,0]),r=t.useRef(),l=t.useState(AF++)[0],o=t.useState(l7)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var v=TS([e.lockRef.current],(e.shards||[]).map(m7),!0).filter(Boolean);return v.forEach(function(A){return A.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),v.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var i=t.useCallback(function(v,A){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var M=Zr(v),E=n.current,x="deltaX"in v?v.deltaX:E[0]-M[0],H="deltaY"in v?v.deltaY:E[1]-M[1],y,b=v.target,V=Math.abs(x)>Math.abs(H)?"h":"v";if("touches"in v&&V==="h"&&b.type==="range")return!1;var S=i7(V,b);if(!S)return!0;if(S?y=V:(y=V==="v"?"h":"v",S=i7(V,b)),!S)return!1;if(!r.current&&"changedTouches"in v&&(x||H)&&(r.current=y),!y)return!0;var j=r.current||y;return pF(j,A,v,j==="h"?x:H)},[]),d=t.useCallback(function(v){var A=v;if(!(!ca.length||ca[ca.length-1]!==o)){var M="deltaY"in A?u7(A):Zr(A),E=a.current.filter(function(y){return y.name===A.type&&(y.target===A.target||A.target===y.shadowParent)&&gF(y.delta,M)})[0];if(E&&E.should){A.cancelable&&A.preventDefault();return}if(!E){var x=(s.current.shards||[]).map(m7).filter(Boolean).filter(function(y){return y.contains(A.target)}),H=x.length>0?i(A,x[0]):!s.current.noIsolation;H&&A.cancelable&&A.preventDefault()}}},[]),m=t.useCallback(function(v,A,M,E){var x={name:v,delta:A,target:M,should:E,shadowParent:EF(M)};a.current.push(x),setTimeout(function(){a.current=a.current.filter(function(H){return H!==x})},1)},[]),f=t.useCallback(function(v){n.current=Zr(v),r.current=void 0},[]),u=t.useCallback(function(v){m(v.type,u7(v),v.target,i(v,e.lockRef.current))},[]),h=t.useCallback(function(v){m(v.type,Zr(v),v.target,i(v,e.lockRef.current))},[]);t.useEffect(function(){return ca.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",d,ia),document.addEventListener("touchmove",d,ia),document.addEventListener("touchstart",f,ia),function(){ca=ca.filter(function(v){return v!==o}),document.removeEventListener("wheel",d,ia),document.removeEventListener("touchmove",d,ia),document.removeEventListener("touchstart",f,ia)}},[]);var p=e.removeScrollBar,g=e.inert;return t.createElement(t.Fragment,null,g?t.createElement(o,{styles:vF(l)}):null,p?t.createElement(iF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EF(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const xF=qS(r7,MF);var gn=t.forwardRef(function(e,a){return t.createElement(xr,g1({},e,{ref:a,sideCar:xF}))});gn.classNames=xr.classNames;var yr="Popover",[f7]=Y0(yr,[O1]),vn=O1(),[HF,W1]=f7(yr),h7=e=>{const{__scopePopover:a,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:s=!1}=e,i=vn(a),d=t.useRef(null),[m,f]=t.useState(!1),[u,h]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:yr});return c.jsx(an,{...i,children:c.jsx(HF,{scope:a,contentId:P0(),triggerRef:d,open:u,onOpenChange:h,onOpenToggle:t.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:m,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:s,children:n})})};h7.displayName=yr;var p7="PopoverAnchor",ZF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(p7,n),o=vn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=l;return t.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(nn,{...o,...r,ref:a})});ZF.displayName=p7;var g7="PopoverTrigger",v7=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(g7,n),o=vn(n),s=p0(a,l.triggerRef),i=c.jsx(a0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":H7(l.open),...r,ref:s,onClick:X(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?i:c.jsx(nn,{asChild:!0,...o,children:i})});v7.displayName=g7;var Ho="PopoverPortal",[yF,wF]=f7(Ho,{forceMount:void 0}),A7=e=>{const{__scopePopover:a,forceMount:n,children:r,container:l}=e,o=W1(Ho,a);return c.jsx(yF,{scope:a,forceMount:n,children:c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:r})})})};A7.displayName=Ho;var da="PopoverContent",M7=t.forwardRef((e,a)=>{const n=wF(da,e.__scopePopover),{forceMount:r=n.forceMount,...l}=e,o=W1(da,e.__scopePopover);return c.jsx(ue,{present:r||o.open,children:o.modal?c.jsx(VF,{...l,ref:a}):c.jsx(CF,{...l,ref:a})})});M7.displayName=da;var bF=FS("PopoverContent.RemoveScroll"),VF=t.forwardRef((e,a)=>{const n=W1(da,e.__scopePopover),r=t.useRef(null),l=p0(a,r),o=t.useRef(!1);return t.useEffect(()=>{const s=r.current;if(s)return Ar(s)},[]),c.jsx(gn,{as:bF,allowPinchZoom:!0,children:c.jsx(E7,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{s.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,m=i.button===2||d;o.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),CF=t.forwardRef((e,a)=>{const n=W1(da,e.__scopePopover),r=t.useRef(!1),l=t.useRef(!1);return c.jsx(E7,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,l.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&l.current&&o.preventDefault()}})}),E7=t.forwardRef((e,a)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:l,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:f,...u}=e,h=W1(da,n),p=vn(n);return pr(),c.jsx(pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:l,onUnmountAutoFocus:o,children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:m,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(B2,{"data-state":H7(h.open),role:"dialog",id:h.contentId,...p,...u,ref:a,style:{...u.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)"}})})})}),x7="PopoverClose",LF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=W1(x7,n);return c.jsx(a0.button,{type:"button",...r,ref:a,onClick:X(e.onClick,()=>l.onOpenChange(!1))})});LF.displayName=x7;var SF="PopoverArrow",FF=t.forwardRef((e,a)=>{const{__scopePopover:n,...r}=e,l=vn(n);return c.jsx(W2,{...l,...r,ref:a})});FF.displayName=SF;function H7(e){return e?"open":"closed"}var Z7=h7,y7=v7,w7=A7,wr=M7;const br=Z7,Vr=y7,An=t.forwardRef(({className:e,align:a="center",sideOffset:n=4,...r},l)=>c.jsx(w7,{children:c.jsx(wr,{ref:l,align:a,sideOffset:n,className:w("z-popover w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));An.displayName=wr.displayName;const _F=_0("",{variants:{orientation:{vertical:"flex flex-col gap-2",horizontal:"flex flex-row items-start gap-4",responsive:"flex flex-col gap-2 @container/field-group:flex-row @container/field-group:items-start @container/field-group:gap-4"}},defaultVariants:{orientation:"vertical"}}),NF=t.forwardRef(({className:e,...a},n)=>c.jsx("fieldset",{ref:n,className:w("space-y-6",e),...a}));NF.displayName="FieldSet";const RF=_0("",{variants:{variant:{legend:"text-base font-semibold",label:"text-sm font-medium"}},defaultVariants:{variant:"legend"}}),jF=t.forwardRef(({className:e,variant:a,...n},r)=>c.jsx("legend",{ref:r,className:w(RF({variant:a}),e),...n}));jF.displayName="FieldLegend";const kF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex flex-col gap-6",e),...a}));kF.displayName="FieldGroup";const ht=t.forwardRef(({className:e,orientation:a,"data-invalid":n,...r},l)=>c.jsx("div",{ref:l,role:"group","data-invalid":n?"":void 0,className:w(_F({orientation:a}),e),...r}));ht.displayName="Field";const PF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex flex-col gap-1.5",e),...a}));PF.displayName="FieldContent";const ua=t.forwardRef(({className:e,asChild:a,...n},r)=>a?c.jsx("label",{ref:r,className:w("text-sm font-medium",e),...n}):c.jsx("label",{ref:r,className:w("text-sm font-medium",e),...n}));ua.displayName="FieldLabel";const IF=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("text-sm font-medium",e),...a}));IF.displayName="FieldTitle";const ma=t.forwardRef(({className:e,...a},n)=>c.jsx("p",{ref:n,className:w("text-sm text-muted-foreground",e),...a}));ma.displayName="FieldDescription";const DF=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs("div",{ref:r,className:w("flex items-center gap-4",e),...n,children:[c.jsx("div",{className:"flex-1 border-t"}),a&&c.jsx("span",{className:"text-sm text-muted-foreground",children:a}),c.jsx("div",{className:"flex-1 border-t"})]}));DF.displayName="FieldSeparator";const G1=t.forwardRef(({className:e,children:a,errors:n,...r},l)=>{const o=n?.filter(Boolean).map(i=>i?.message)||[];return o.length>0||!!a?c.jsx("div",{ref:l,role:"alert",className:w("text-sm text-destructive",e),...r,children:a||c.jsx("ul",{className:"list-disc list-inside",children:o.map((i,d)=>c.jsx("li",{children:i},d))})}):null});G1.displayName="FieldError";function TF({date:e,onChange:a,placeholder:n="Pick a date",disabled:r=!1,className:l,iconPosition:o="start",minDate:s,maxDate:i,dateFormat:d="MMM d, yyyy",label:m,error:f,description:u,info:h,requiredIndicator:p,required:g=!1,orientation:v="vertical",id:A,captionLayout:M,fromYear:E,toYear:x,fromMonth:H,toMonth:y}){const b=Z.useId(),V=A||b,S=!!f,j=o==="start",D=o==="end",z=c.jsxs(br,{children:[c.jsx(Vr,{asChild:!0,children:c.jsxs(te,{variant:"outline",className:w("w-full text-left font-normal h-9",D?"justify-between":"justify-start",!e&&"text-muted-foreground",S&&"border-destructive focus-visible:border-destructive",l),disabled:r,"aria-invalid":S?!0:void 0,"aria-describedby":u||f?`${V}-description`:void 0,id:V,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[j&&c.jsx(fm,{className:"h-4 w-4"}),e?qe(e,d):c.jsx("span",{children:n})]}),D&&c.jsx(NV,{className:"h-4 w-4 opacity-50"})]})}),c.jsx(An,{className:"w-auto p-0",children:c.jsx(fo,{mode:"single",selected:e,onSelect:a,initialFocus:!0,fromDate:s,toDate:i,disabled:[...s?[{before:s}]:[],...i?[{after:i}]:[]],captionLayout:M,fromYear:E,toYear:x,fromMonth:H,toMonth:y})})]});return m||f||u||h||p?c.jsxs(ht,{orientation:v,"data-invalid":S,className:w("w-full",l),children:[(m||h||p)&&c.jsx(Me,{htmlFor:V,info:h,requiredIndicator:p,required:g,disabled:r,children:m}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[z,u&&!f&&c.jsx(ma,{id:`${V}-description`,children:u}),f&&c.jsx(G1,{id:`${V}-description`,children:f})]})]}):z}const Cr=TF;function OF({dateRange:e,onChange:a,placeholder:n="Pick a date range",disabled:r=!1,className:l}){return c.jsxs(br,{children:[c.jsx(Vr,{asChild:!0,children:c.jsxs(te,{variant:"outline",className:w("w-full justify-start text-left font-normal h-9",!e&&"text-muted-foreground",l),disabled:r,children:[c.jsx(fm,{className:"mr-2 h-4 w-4"}),e?.from?e.to?c.jsxs(c.Fragment,{children:[qe(e.from,"dd.MM.yyyy")," -"," ",qe(e.to,"dd.MM.yyyy")]}):qe(e.from,"dd.MM.yyyy"):c.jsx("span",{children:n})]})}),c.jsx(An,{className:"w-auto p-0",align:"start",children:c.jsx(fo,{mode:"range",selected:e,onSelect:a,initialFocus:!0,numberOfMonths:1})})]})}const $F=OF,Mn=t.forwardRef(({className:e,type:a,...n},r)=>c.jsx("input",{type:a,ref:r,"data-slot":"input",className:w("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-normal disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n}));Mn.displayName="Input";const b7=t.forwardRef(({className:e,value:a,...n},r)=>c.jsx(Mn,{ref:r,type:"time",step:"1",value:a,className:w("h-9",e),...n}));b7.displayName="TimePicker";const zF=Array.from({length:12},(e,a)=>a+1),BF=Array.from({length:24},(e,a)=>a),WF=["AM","PM"],GF=e=>{if(e===0)return Array.from({length:60},(n,r)=>r);const a=60/e;return Array.from({length:a},(n,r)=>r*e)},U1=e=>e.toString().padStart(2,"0"),UF=e=>{const a=e>=12?"PM":"AM";return{hour:e===0?12:e>12?e-12:e,meridiem:a}},YF=(e,a)=>e===12?a==="AM"?0:12:a==="PM"?e+12:e,Lr=t.forwardRef(({className:e,label:a,error:n,description:r,orientation:l="vertical",id:o,onChange:s,mode:i="native",divisorMinutes:d=0,width:m=140,value:f,disabled:u,use24Hour:h=!1,...p},g)=>{const v=Z.useId(),A=o||v,M=!!n;if(i==="native"){const E=c.jsx(b7,{ref:g,id:A,value:f,disabled:u,className:w(M&&"border-destructive focus-visible:border-destructive",!(a||n||r)&&e),"aria-invalid":M?!0:void 0,"aria-describedby":r||n?`${A}-description`:void 0,...p,onChange:x=>{s?.(x.target.value)}});return a||n||r?c.jsxs(ht,{orientation:l,"data-invalid":M,className:w("w-full",e),children:[a&&c.jsx(ua,{htmlFor:A,children:a}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[E,r&&!n&&c.jsx(ma,{id:`${A}-description`,children:r}),n&&c.jsx(G1,{id:`${A}-description`,children:n})]})]}):E}return c.jsx(qF,{value:f||(h?"00:00":"12:00"),onChange:s,divisorMinutes:d,width:m,label:a,error:n,description:r,disabled:u,className:e,use24Hour:h})});Lr.displayName="TimePicker";const qF=({value:e,onChange:a,divisorMinutes:n,width:r,label:l,error:o,description:s,disabled:i,className:d,use24Hour:m=!1})=>{const[f,u]=Z.useState(!1),h=Z.useRef(null),p=Z.useRef(null),g=R=>{const[_,W]=R.split(":"),Q=parseInt(_,10)||0,t0=parseInt(W,10)||0;if(m)return{hour24:Q,minute:t0,hour:Q,meridiem:"AM"};const{hour:N,meridiem:L}=UF(Q);return{hour24:Q,minute:t0,hour:N,meridiem:L}},{hour:v,hour24:A,minute:M,meridiem:E}=g(e),[x,H]=Z.useState(m?A:v),[y,b]=Z.useState(M),[V,S]=Z.useState(E),j=GF(n),D=(R,_,W)=>{let Q;m?Q=R:Q=YF(R,W);const t0=`${U1(Q)}:${U1(_)}`;a?.(t0)},z=R=>{H(R),D(R,y,V)},P=R=>{b(R),D(x,R,V)},k=R=>{S(R),D(x,y,R)};Z.useEffect(()=>{const R=_=>{p.current&&!p.current.contains(_.target)&&u(!1)};if(f)return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[f]);const G=m?`${U1(x)}:${U1(y)}`:`${U1(x)}:${U1(y)} ${V}`,K=m?BF:zF,F=c.jsxs("div",{ref:p,className:w("relative inline-block",d),style:{width:typeof r=="number"?`${r}px`:r},children:[c.jsxs("button",{type:"button",disabled:i,onClick:()=>!i&&u(!f),className:w("flex items-center justify-between w-full h-9 px-3 py-2","text-sm rounded-md border border-input bg-input","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",o&&"border-destructive"),children:[c.jsx("span",{children:G}),c.jsx(r0,{name:f?"CaretUp":"CaretDown",size:"sm",className:"ml-2"})]}),f&&c.jsxs("div",{ref:h,className:w("absolute z-popover mt-1 bg-popover border border-border rounded-md shadow-lg","flex divide-x divide-border"),style:{width:"fit-content",minWidth:m?"140px":"200px"},children:[c.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:K.map(R=>c.jsx("button",{type:"button",onClick:()=>z(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",x===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:U1(R)},R))}),c.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[200px] min-w-[60px]",children:j.map(R=>c.jsx("button",{type:"button",onClick:()=>P(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",y===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:U1(R)},R))}),!m&&c.jsx("div",{className:"flex flex-col min-w-[60px]",children:WF.map(R=>c.jsx("button",{type:"button",onClick:()=>k(R),className:w("px-3 py-2 text-sm text-left hover:bg-accent",V===R&&"bg-primary text-primary-foreground hover:bg-primary"),children:R},R))})]})]});return l||o||s?c.jsxs(ht,{orientation:"vertical",className:w("w-full",d),children:[l&&c.jsx(ua,{children:l}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[F,s&&!o&&c.jsx(ma,{children:s}),o&&c.jsx(G1,{children:o})]})]}):F};var KF="Separator",V7="horizontal",XF=["horizontal","vertical"],C7=t.forwardRef((e,a)=>{const{decorative:n,orientation:r=V7,...l}=e,o=QF(r)?r:V7,i=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(a0.div,{"data-orientation":o,...i,...l,ref:a})});C7.displayName=KF;function QF(e){return XF.includes(e)}var JF=C7;function pt({className:e,orientation:a="horizontal",decorative:n=!0,...r}){return c.jsx(JF,{"data-slot":"separator",decorative:n,orientation:a,className:w("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),...r})}var Zo="rovingFocusGroup.onEntryFocus",e_={bubbles:!1,cancelable:!0},En="RovingFocusGroup",[yo,L7,t_]=X2(En),[a_,fa]=Y0(En,[t_]),[n_,r_]=a_(En),S7=t.forwardRef((e,a)=>c.jsx(yo.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(yo.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(l_,{...e,ref:a})})}));S7.displayName=En;var l_=t.forwardRef((e,a)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:l=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:m,preventScrollOnEntryFocus:f=!1,...u}=e,h=t.useRef(null),p=p0(a,h),g=na(o),[v,A]=Q0({prop:s,defaultProp:i??null,onChange:d,caller:En}),[M,E]=t.useState(!1),x=Re(m),H=L7(n),y=t.useRef(!1),[b,V]=t.useState(0);return t.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Zo,x),()=>S.removeEventListener(Zo,x)},[x]),c.jsx(n_,{scope:n,orientation:r,dir:g,loop:l,currentTabStopId:v,onItemFocus:t.useCallback(S=>A(S),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>V(S=>S+1),[]),onFocusableItemRemove:t.useCallback(()=>V(S=>S-1),[]),children:c.jsx(a0.div,{tabIndex:M||b===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{y.current=!0}),onFocus:X(e.onFocus,S=>{const j=!y.current;if(S.target===S.currentTarget&&j&&!M){const D=new CustomEvent(Zo,e_);if(S.currentTarget.dispatchEvent(D),!D.defaultPrevented){const z=H().filter(F=>F.focusable),P=z.find(F=>F.active),k=z.find(F=>F.id===v),K=[P,k,...z].filter(Boolean).map(F=>F.ref.current);N7(K,f)}}y.current=!1}),onBlur:X(e.onBlur,()=>E(!1))})})}),F7="RovingFocusGroupItem",_7=t.forwardRef((e,a)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:l=!1,tabStopId:o,children:s,...i}=e,d=P0(),m=o||d,f=r_(F7,n),u=f.currentTabStopId===m,h=L7(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:v}=f;return t.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),c.jsx(yo.ItemSlot,{scope:n,id:m,focusable:r,active:l,children:c.jsx(a0.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...i,ref:a,onMouseDown:X(e.onMouseDown,A=>{r?f.onItemFocus(m):A.preventDefault()}),onFocus:X(e.onFocus,()=>f.onItemFocus(m)),onKeyDown:X(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){f.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const M=i_(A,f.orientation,f.dir);if(M!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let x=h().filter(H=>H.focusable).map(H=>H.ref.current);if(M==="last")x.reverse();else if(M==="prev"||M==="next"){M==="prev"&&x.reverse();const H=x.indexOf(A.currentTarget);x=f.loop?c_(x,H+1):x.slice(H+1)}setTimeout(()=>N7(x))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:v!=null}):s})})});_7.displayName=F7;var o_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s_(e,a){return a!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function i_(e,a,n){const r=s_(e.key,n);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return o_[r]}function N7(e,a=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:a}),document.activeElement!==n))return}function c_(e,a){return e.map((n,r)=>e[(a+r)%e.length])}var wo=S7,bo=_7,Vo="Radio",[d_,R7]=Y0(Vo),[u_,m_]=d_(Vo),j7=t.forwardRef((e,a)=>{const{__scopeRadio:n,name:r,checked:l=!1,required:o,disabled:s,value:i="on",onCheck:d,form:m,...f}=e,[u,h]=t.useState(null),p=p0(a,A=>h(A)),g=t.useRef(!1),v=u?m||!!u.closest("form"):!0;return c.jsxs(u_,{scope:n,checked:l,disabled:s,children:[c.jsx(a0.button,{type:"button",role:"radio","aria-checked":l,"data-state":D7(l),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:p,onClick:X(e.onClick,A=>{l||d?.(),v&&(g.current=A.isPropagationStopped(),g.current||A.stopPropagation())})}),v&&c.jsx(I7,{control:u,bubbles:!g.current,name:r,value:i,checked:l,required:o,disabled:s,form:m,style:{transform:"translateX(-100%)"}})]})});j7.displayName=Vo;var k7="RadioIndicator",P7=t.forwardRef((e,a)=>{const{__scopeRadio:n,forceMount:r,...l}=e,o=m_(k7,n);return c.jsx(ue,{present:r||o.checked,children:c.jsx(a0.span,{"data-state":D7(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:a})})});P7.displayName=k7;var f_="RadioBubbleInput",I7=t.forwardRef(({__scopeRadio:e,control:a,checked:n,bubbles:r=!0,...l},o)=>{const s=t.useRef(null),i=p0(s,o),d=ir(n),m=z2(a);return t.useEffect(()=>{const f=s.current;if(!f)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(d!==n&&p){const g=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(g)}},[d,n,r]),c.jsx(a0.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...l,tabIndex:-1,ref:i,style:{...l.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});I7.displayName=f_;function D7(e){return e?"checked":"unchecked"}var h_=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sr="RadioGroup",[p_]=Y0(Sr,[fa,R7]),T7=fa(),O7=R7(),[g_,v_]=p_(Sr),$7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,name:r,defaultValue:l,value:o,required:s=!1,disabled:i=!1,orientation:d,dir:m,loop:f=!0,onValueChange:u,...h}=e,p=T7(n),g=na(m),[v,A]=Q0({prop:o,defaultProp:l??null,onChange:u,caller:Sr});return c.jsx(g_,{scope:n,name:r,required:s,disabled:i,value:v,onValueChange:A,children:c.jsx(wo,{asChild:!0,...p,orientation:d,dir:g,loop:f,children:c.jsx(a0.div,{role:"radiogroup","aria-required":s,"aria-orientation":d,"data-disabled":i?"":void 0,dir:g,...h,ref:a})})})});$7.displayName=Sr;var z7="RadioGroupItem",B7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,disabled:r,...l}=e,o=v_(z7,n),s=o.disabled||r,i=T7(n),d=O7(n),m=t.useRef(null),f=p0(a,m),u=o.value===l.value,h=t.useRef(!1);return t.useEffect(()=>{const p=v=>{h_.includes(v.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),c.jsx(bo,{asChild:!0,...i,focusable:!s,active:u,children:c.jsx(j7,{disabled:s,required:o.required,checked:u,...d,...l,name:o.name,ref:f,onCheck:()=>o.onValueChange(l.value),onKeyDown:X(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:X(l.onFocus,()=>{h.current&&m.current?.click()})})})});B7.displayName=z7;var A_="RadioGroupIndicator",W7=t.forwardRef((e,a)=>{const{__scopeRadioGroup:n,...r}=e,l=O7(n);return c.jsx(P7,{...l,...r,ref:a})});W7.displayName=A_;var M_=$7,E_=B7,x_=W7;function Fr({className:e,...a}){return c.jsx(M_,{"data-slot":"radio-group",className:w("grid gap-4",e),...a})}function _r({className:e,...a}){return c.jsx(E_,{"data-slot":"radio-group-item",className:w("border-border text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:c.jsx(x_,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:c.jsx(pm,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Co=t.forwardRef(({className:e,...a},n)=>c.jsx("textarea",{ref:n,"data-slot":"textarea",className:w("font-normal placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-[80px] w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","resize-none",e),...a}));Co.displayName="Textarea";const G7=t.forwardRef(({className:e,...a},n)=>c.jsx("div",{ref:n,className:w("flex min-w-0 w-full rounded-md border border-input bg-background shadow-xs overflow-hidden","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot=input-group-control][aria-invalid='true']]:border-destructive has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/20 dark:has-[[data-slot=input-group-control][aria-invalid='true']]:ring-destructive/40",e),...a}));G7.displayName="InputGroup";const Lo=t.forwardRef(({className:e,align:a="inline-start",...n},r)=>c.jsx("div",{ref:r,className:w("flex items-center gap-1.5 h-9 shrink-0",a==="inline-start"&&"order-first pl-3",a==="inline-end"&&"order-last pr-3",a==="block-start"&&"order-first flex-col w-full pb-1.5 px-0 h-auto",a==="block-end"&&"order-last flex-col w-full pt-1.5 px-0 h-auto",e),...n}));Lo.displayName="InputGroupAddon";const U7=t.forwardRef(({className:e,...a},n)=>c.jsx(Mn,{ref:n,"data-slot":"input-group-control",className:w("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0","aria-invalid:border-0 aria-invalid:ring-0",e),...a}));U7.displayName="InputGroupInput";const H_=t.forwardRef(({className:e,...a},n)=>c.jsx(Co,{ref:n,"data-slot":"input-group-control",className:w("flex-1 min-w-0 border-0 shadow-none rounded-none bg-transparent","focus-visible:ring-0 focus-visible:border-0",e),...a}));H_.displayName="InputGroupTextarea";const Z_=t.forwardRef(({className:e,...a},n)=>c.jsx("span",{ref:n,className:w("text-sm text-muted-foreground whitespace-nowrap",e),...a}));Z_.displayName="InputGroupText";const y_=_0("shrink-0",{variants:{size:{xs:"h-7 px-2 text-xs",sm:"h-8 px-3 text-sm","icon-xs":"size-7","icon-sm":"size-8"}},defaultVariants:{size:"sm"}}),w_=t.forwardRef(({className:e,size:a,...n},r)=>c.jsx(te,{ref:r,className:w(y_({size:a}),e),...n}));w_.displayName="InputGroupButton";const gt=Z.forwardRef(({className:e,orientation:a="vertical",label:n,description:r,error:l,info:o,requiredIndicator:s,required:i,id:d,button:m,disabled:f,startIcon:u,startIconProps:h,endIcon:p,endIconProps:g,inputProps:v,...A},M)=>{const E=Z.useId(),x=d||v?.id||E,H=!!l;return c.jsxs(ht,{orientation:a,"data-invalid":H,className:w("w-full",e),children:[(n||o||s)&&c.jsx(Me,{htmlFor:x,info:o,requiredIndicator:s,required:i,disabled:f,children:n}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsxs(G7,{className:"flex-1",children:[u&&c.jsx(Lo,{align:"inline-start",children:c.jsx(r0,{name:h?.name||u,size:"sm",...h,className:w("cursor-default text-muted-foreground",h?.className)})}),c.jsx(U7,{ref:M,disabled:f,required:i,className:w(H&&"border-destructive focus-visible:border-destructive",v?.className),"aria-invalid":H?!0:void 0,"aria-describedby":r||l?`${x}-description`:void 0,...A,...v,id:x}),p&&c.jsx(Lo,{align:"inline-end",children:c.jsx(r0,{name:g?.name||p,size:"sm",...g,className:w("cursor-default text-muted-foreground",g?.className)})})]}),m&&c.jsx(me,{disabled:f,...m})]}),r&&!l&&c.jsx(ma,{id:`${x}-description`,children:r}),l&&c.jsx(G1,{id:`${x}-description`,children:l})]})]})});gt.displayName="Field";const So=Z.forwardRef(({label:e,onRemove:a,className:n,...r},l)=>c.jsxs(Il,{ref:l,variant:"secondary",className:w("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[c.jsx("span",{className:"text-xs font-medium leading-none",children:e}),a&&c.jsx("button",{onClick:a,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:c.jsx(r0,{name:"X",className:"size-4"})})]}));So.displayName="FilterTag";const Y7=Z.forwardRef(({appliedFilters:e=[],onRemoveFilter:a,onClearAll:n,maxVisibleTags:r=4,className:l,...o},s)=>{const i=e.length>0,d=e.slice(0,r),m=e.length-r;return c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(te,{ref:s,variant:"outline",size:"sm",className:w("h-8 gap-2 px-3 py-2",l),...o,children:[c.jsx(r0,{name:"FunnelSimple",className:"size-4"}),c.jsx("span",{className:"text-xs font-medium leading-none",children:"Add filter"})]}),i&&c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[d.map(f=>c.jsx(So,{label:f.label,onRemove:()=>a?.(f.id)},f.id)),m>0&&c.jsx(Il,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:c.jsxs("span",{className:"text-xs font-medium leading-none",children:["+",m," more"]})}),n&&c.jsx(te,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:"Clear filters"})})]})]}),!i&&c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"No filters applied"})]})]})});Y7.displayName="FilterButton";const Nr=Z.forwardRef((e,a)=>{const{title:n,items:r,className:l,searchable:o=!1,searchPlaceholder:s="Search",showActions:i=!1,enableSelectAll:d=!0,enableInverse:m=!0,enableNone:f=!0,description:u}=e,h=e.type||"checkbox",p=h==="radio",g=h==="checkbox"||!e.type,[v,A]=Z.useState(""),M=Z.useMemo(()=>v?r.filter(b=>b.label.toLowerCase().includes(v.toLowerCase())):r,[r,v]),E=()=>{if(h==="checkbox"&&"selectedValues"in e){const b=M.map(S=>S.value),V=v?[...new Set([...e.selectedValues,...b])]:b;e.onChange(V)}},x=()=>{if(h==="checkbox"&&"selectedValues"in e)if(v){const b=new Set(M.map(j=>j.value)),V=e.selectedValues.filter(j=>!b.has(j)),S=M.filter(j=>!e.selectedValues.includes(j.value)).map(j=>j.value);e.onChange([...V,...S])}else{const b=r.filter(V=>!e.selectedValues.includes(V.value)).map(V=>V.value);e.onChange(b)}},H=()=>{if(h==="checkbox"&&"selectedValues"in e)if(v){const b=new Set(M.map(S=>S.value)),V=e.selectedValues.filter(S=>!b.has(S));e.onChange(V)}else e.onChange([]);else h==="radio"&&"selectedValue"in e&&e.onChange("")},y=(b,V)=>{if(h==="checkbox"&&"selectedValues"in e){const S=V?[...e.selectedValues,b]:e.selectedValues.filter(j=>j!==b);e.onChange(S)}};return c.jsxs("div",{ref:a,className:w("flex flex-col h-full",l),children:[o&&c.jsx(gt,{placeholder:s,value:v,onChange:b=>A(b.target.value),startIcon:"MagnifyingGlass",className:"mb-4"}),u&&c.jsx("p",{className:"text-xs font-normal text-muted-foreground mb-4",children:u}),c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),i&&h==="checkbox"&&c.jsxs("div",{className:"flex items-center justify-end gap-4",children:[d&&c.jsx(te,{variant:"link",size:"sm",onClick:E,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"Select all"}),m&&c.jsx(te,{variant:"link",size:"sm",onClick:x,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"Inverse"}),f&&c.jsx(te,{variant:"link",size:"sm",onClick:H,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:"None"})]})]}),c.jsx(pt,{className:"w-full mb-6"}),p&&"selectedValue"in e?c.jsx(Fr,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:M.map(b=>c.jsx(_o,{label:b.label,value:b.value,description:b.description},b.value))}):g&&"selectedValues"in e?c.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:M.map(b=>c.jsx(Fo,{label:b.label,description:b.description,icon:b.icon,checked:e.selectedValues.includes(b.value),onCheckedChange:V=>y(b.value,V)},b.value))}):null]})});Nr.displayName="FilterSection";const Fo=Z.forwardRef(({label:e,checked:a,onCheckedChange:n,description:r,className:l,icon:o},s)=>c.jsxs("label",{className:w("flex items-start gap-2 cursor-pointer",l),children:[c.jsx(vm,{ref:s,checked:a,onCheckedChange:n}),o&&c.jsx("img",{src:o,alt:"",className:"size-4 object-contain shrink-0",onError:i=>{i.currentTarget.style.display="none"}}),c.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[c.jsx(V1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&c.jsx(V1,{content:r,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));Fo.displayName="FilterCheckboxOption";const _o=Z.forwardRef(({label:e,value:a,description:n,className:r},l)=>c.jsxs("div",{className:w("flex items-start gap-3",r),children:[c.jsx(_r,{ref:l,value:a,id:`radio-${a}`}),c.jsxs("label",{htmlFor:`radio-${a}`,className:"flex flex-col gap-0.5 cursor-pointer flex-1 truncate",children:[c.jsx(V1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&c.jsx(V1,{content:n,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));_o.displayName="FilterRadioOption";const q7=Z.forwardRef(({children:e,showSearch:a=!1,searchPlaceholder:n="Search",searchValue:r,onSearchChange:l,className:o},s)=>c.jsxs("div",{ref:s,className:w("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",o),children:[a&&c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"relative",children:[c.jsx(r0,{name:"MagnifyingGlass",className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),c.jsx(gt,{placeholder:n,value:r,onChange:i=>l?.(i.target.value),className:"pl-9"})]})}),c.jsx("div",{className:"flex flex-col gap-6",children:e})]}));q7.displayName="FilterContent";const je={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},vt=e=>{const a=e.getDate();return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]} ${a}`},b_=e=>{const n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],r=e.getFullYear();return`${n} ${r}`},V_=e=>["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()],C_=()=>{const e=new Date;e.setHours(0,0,0,0);const a=`${V_(e)}, ${vt(e)}`,n=new Date(e);n.setDate(n.getDate()-2);const r=`${vt(n)} - ${vt(e)}`,l=new Date(e);l.setDate(l.getDate()-6);const o=`${vt(l)} - ${vt(e)}`,s=new Date(e);s.setDate(s.getDate()-29);const i=`${vt(s)} - ${vt(e)}`,d=b_(e);return{today:a,last3Days:r,last7Days:o,last30Days:i,thisMonth:d}},L1=Z.forwardRef(({label:e,description:a,value:n,className:r,...l},o)=>{const s=`date-range-${n}`;return c.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[c.jsxs("label",{ref:o,className:w("flex-1 flex items-start gap-3 cursor-pointer",r),...l,children:[c.jsx(_r,{id:s,value:n,className:"mt-px"}),c.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:c.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),a&&c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:a})})]})});L1.displayName="FilterDateRangeOption";const No=Z.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:a,startDate:n,endDate:r,startTime:l="",endTime:o="",onStartDateChange:s,onEndDateChange:i,onStartTimeChange:d,onEndTimeChange:m,mode:f="range",singleDayLabel:u="Select date",showAllTime:h=!1,className:p,value:g,onValueChange:v,announcement:A,...M},E)=>{const x=Z.useMemo(()=>C_(),[]),H=b=>{v?.(b),a?.(b===je.CUSTOM)},y=b=>{if(b){const V=new Date(b);V.setHours(0,0,0,0);const S=new Date(b);S.setHours(23,59,59,999),s?.(V),i?.(S)}else s?.(void 0),i?.(void 0)};return c.jsxs("div",{ref:E,className:w("flex flex-col gap-4 w-full",p),children:[A&&(typeof A=="string"?c.jsx(Vl,{icon:"Info",description:A}):A),c.jsxs(Fr,{value:g,onValueChange:H,className:"gap-2",...M,children:[c.jsx(L1,{label:"Custom",value:je.CUSTOM}),e&&c.jsxs("div",{className:"flex flex-col gap-4 pl-7 mb-2",children:[f==="single"?c.jsx("div",{className:"flex flex-col gap-3",children:c.jsx(Cr,{date:n,onChange:y,placeholder:u,className:"h-9",iconPosition:"none"})}):c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Cr,{date:n,onChange:s,placeholder:"Start date",className:"h-9",iconPosition:"none"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Cr,{date:r,onChange:i,placeholder:"End date",className:"h-9",iconPosition:"none"})})]}),c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Lr,{value:l,onChange:d,mode:"dropdown",use24Hour:!0,width:"100%"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Lr,{value:o,onChange:m,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(L1,{label:"Today",value:je.TODAY,description:x.today}),c.jsx(L1,{label:"Last 3 days",value:je.LAST_3_DAYS,description:x.last3Days}),c.jsx(L1,{label:"Last 7 days",value:je.LAST_7_DAYS,description:x.last7Days}),c.jsx(L1,{label:"Last 30 days",value:je.LAST_30_DAYS,description:x.last30Days}),c.jsx(L1,{label:"This month",value:je.THIS_MONTH,description:x.thisMonth}),h&&c.jsx(L1,{label:"All time",value:je.ALL_TIME})]})]})]})});No.displayName="FilterDateRange";const Ro=Z.forwardRef(({value:e=[],onChange:a,label:n,description:r,error:l,placeholder:o="Type and press Enter...",disabled:s=!1,id:i,name:d,triggerKeys:m=["Enter","Tab","Comma","Space"],addOnBlur:f=!0,allowDuplicates:u=!1,maxItems:h,validate:p,badgeVariant:g="outline",orientation:v="vertical",className:A,deleteAll:M},E)=>{const x=Z.useId(),H=i||x,y=!!l,[b,V]=Z.useState(""),[S,j]=Z.useState(!1),[D,z]=Z.useState(""),P=N=>{const L=N.trim();if(L!==""){if(h&&e.length>=h){z(`Maximum ${h} items allowed`);return}if(!u&&e.includes(L)){z("Duplicate values are not allowed");return}if(p){const O=p(L);if(O!==!0){z(typeof O=="string"?O:"Invalid value");return}}z(""),a([...e,L]),V("")}},k=N=>{a(e.filter(L=>L!==N)),z("")},G=N=>{const L=N.currentTarget.value;N.key==="Enter"&&m.includes("Enter")?(N.preventDefault(),P(L)):N.key==="Tab"&&m.includes("Tab")?L.trim()!==""&&(N.preventDefault(),P(L)):(N.key===","||N.key===",")&&m.includes("Comma")||N.key===" "&&m.includes("Space")?(N.preventDefault(),P(L)):N.key==="Backspace"&&L===""&&e.length>0&&a(e.slice(0,-1))},K=N=>{V(N.target.value),z("")},F=()=>{j(!0)},R=()=>{j(!1),f&&b.trim()!==""&&P(b)},_=N=>{const L=N.clipboardData.getData("text"),O=[];if(m.includes("Comma")&&O.push(","),m.includes("Space")&&O.push(" "),O.length===0)return;const B=new RegExp(`[${O.join("")}]+`);if(!B.test(L))return;N.preventDefault();const I=L.split(B).map(n0=>n0.trim()).filter(n0=>n0!=="");if(I.length===0)return;const Y=[];let s0=[...e];for(const n0 of I){if(h&&s0.length>=h){z(`Maximum ${h} items allowed`);break}!u&&s0.includes(n0)||p&&p(n0)!==!0||(Y.push(n0),s0=[...s0,n0])}Y.length>0&&(z(""),a([...e,...Y]),V(""))},W=(N,L)=>{N.preventDefault(),N.stopPropagation(),k(L)},Q=()=>{s||!M?.onClick||M.onClick()},t0=l||D;return c.jsxs(ht,{orientation:v,"data-invalid":y,className:w("w-full",A),children:[n&&c.jsx(ua,{htmlFor:H,children:n}),c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[c.jsxs("div",{className:w("font-normal file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1.5 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 text-sm","flex-wrap gap-1.5 items-center",S&&"border-ring ring-ring/50 ring-[3px]",(y||D)&&"border-destructive ring-destructive/20 dark:ring-destructive/40",s&&"opacity-50 cursor-not-allowed"),onClick:()=>{s||document.getElementById(H)?.focus()},children:[(()=>{const N=M&&!s&&e.length>=M.length;return c.jsxs(c.Fragment,{children:[N&&c.jsx("div",{onClick:L=>{L.preventDefault(),L.stopPropagation(),Q()},children:c.jsx(m1,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:M.label||"Delete all"})}),e.map((L,O)=>c.jsxs(m1,{variant:g,children:[L,c.jsx("button",{type:"button",onClick:B=>W(B,L),children:c.jsx(r0,{name:"X",className:"h-3 w-3"})})]},`${L}-${O}`))]})})(),c.jsx("input",{ref:E,id:H,name:d,type:"text",value:b,onChange:K,onKeyDown:G,onFocus:F,onBlur:R,onPaste:_,placeholder:e.length===0?o:"",disabled:s,className:w("flex-1 min-w-[120px] outline-none bg-transparent border-none shadow-none p-0 h-6","placeholder:text-muted-foreground","disabled:cursor-not-allowed"),"aria-invalid":y||!!D,"aria-describedby":r||t0?`${H}-description`:void 0})]}),r&&!t0&&c.jsx(ma,{id:`${H}-description`,children:r}),t0&&c.jsx(G1,{id:`${H}-description`,children:t0})]})]})});Ro.displayName="MultiValuesField";const K7=Z.forwardRef(({title:e,value:a,onChange:n,placeholder:r="Type and press Enter...",description:l,error:o,numericOnly:s=!1,maxItems:i,disabled:d=!1,className:m,allowDuplicates:f=!1},u)=>{const h=s?p=>/^\d+$/.test(p)?!0:"Only numeric values are allowed":void 0;return c.jsxs("div",{ref:u,className:w("flex flex-col h-full",m),children:[c.jsx("div",{className:"flex items-center justify-between mb-1",children:c.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),c.jsx(pt,{className:"w-full mb-6"}),c.jsx(Ro,{value:a,onChange:n,placeholder:r,description:l,error:o,disabled:d,maxItems:i,allowDuplicates:f,validate:h,triggerKeys:["Enter","Tab","Comma"],deleteAll:a.length>0?{label:"Clear all",length:1,onClick:()=>n([])}:void 0})]})});K7.displayName="FilterMultiInput";const jo=Z.forwardRef(({icon:e,label:a,isActive:n=!1,showChevron:r=!1,className:l,...o},s)=>c.jsxs("button",{ref:s,className:w("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",l),...o,children:[e&&c.jsx(r0,{name:e,className:w("size-4 shrink-0",n?"text-primary":"text-foreground")}),c.jsx("span",{className:w("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:a}),(n||r)&&c.jsx(r0,{name:"CaretRight",className:w("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));jo.displayName="FilterMenuItem";const ko=Z.forwardRef(({items:e,activeItemId:a,onItemClick:n,className:r},l)=>c.jsx("div",{ref:l,className:w("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(o=>c.jsx(jo,{icon:o.icon,label:o.label,isActive:a===o.id,showChevron:o.showChevron,onClick:()=>n?.(o.id)},o.id))}));ko.displayName="FilterMenu";const X7=Z.forwardRef(({filters:e,buttonText:a="Add filter",appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:l,onOpenChange:o,maxVisibleTags:s=4,className:i,disabled:d=!1,applyOnClose:m=!1},f)=>{const[u,h]=Z.useState(!1),[p,g]=Z.useState({}),v=Z.useRef({}),A=Z.useRef(e),M=Z.useCallback($=>{g(J=>{const q=typeof $=="function"?$(J):$;return v.current=q,q})},[]);Z.useEffect(()=>{A.current=e},[e]);const E=Z.useCallback(()=>{if(!m)return;const $=v.current,J=A.current;Object.entries($).forEach(([q,U])=>{const m0=J.find(M0=>M0.id===q);if(m0)switch(U.type){case"checkbox":U.checkboxValues!==void 0&&m0.onChange?.(U.checkboxValues);break;case"radio":U.radioValue!==void 0&&m0.onValueChange?.(U.radioValue);break;case"date":U.dateValue!==void 0&&m0.onDateValueChange?.(U.dateValue),U.dateInit!==void 0&&m0.onDateInitChange?.(U.dateInit),U.dateEnd!==void 0&&m0.onDateEndChange?.(U.dateEnd),U.startTime!==void 0&&m0.onStartTimeChange?.(U.startTime),U.endTime!==void 0&&m0.onEndTimeChange?.(U.endTime);break;case"custom":U.customValue!==void 0&&m0.onCustomChange?.(U.customValue);break}}),M({})},[m,M]),x=Z.useCallback($=>{if(!$&&u&&m){o?.($),E(),h($);return}$&&!u&&m&&M({}),h($),o?.($)},[o,u,m,E,M]),[H,y]=Z.useState(e.length>0&&e[0]?.id||""),b=Z.useRef(null),V=Z.useCallback($=>{b.current=$,typeof f=="function"?f($):f&&(f.current=$)},[f]);Z.useEffect(()=>{if(!u)return;const $=U=>{const m0=U.target;b.current?.contains(m0)||m0.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||m0.closest?.(".rdp, .rdp-root, [data-calendar]")||x(!1)},J=U=>{U.key==="Escape"&&x(!1)},q=setTimeout(()=>{document.addEventListener("mousedown",$),document.addEventListener("keydown",J)},0);return()=>{clearTimeout(q),document.removeEventListener("mousedown",$),document.removeEventListener("keydown",J)}},[u,x]);const S=n.length>0,j=n.slice(0,s),D=n.length-s,z=$=>{if(e.find(U=>U.id===$))return $;const q=$.split("-");if(q.length>1){const U=q[0];if(e.find(M0=>M0.id===U))return U}return $},P=$=>{const J=z($);return e.find(U=>U.id===J)?.clearable!==!1},k=$=>{const J=z($);y(J),x(!0)},G=n.some($=>P($.id)),K=e.map($=>({id:$.id,icon:$.icon,label:$.label})),F=e.find($=>$.id===H),R=($,J)=>m?p[$]?.checkboxValues??J:J,_=($,J)=>m?p[$]?.radioValue??J:J,W=($,J)=>m?p[$]?.dateValue??J:J,Q=($,J)=>m?p[$]?.dateInit??J:J,t0=($,J)=>m?p[$]?.dateEnd??J:J,N=($,J)=>m?p[$]?.startTime??J:J,L=($,J)=>m?p[$]?.endTime??J:J,O=($,J,q)=>U=>{q!==void 0&&q>0&&U.length<q||(m?M(m0=>({...m0,[$]:{...m0[$],type:"checkbox",checkboxValues:U}})):J?.(U))},B=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"radio",radioValue:q}})):J?.(q)},e0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateValue:q}})):J?.(q)},I=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateInit:q}})):J?.(q)},Y=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",dateEnd:q}})):J?.(q)},s0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",startTime:q}})):J?.(q)},n0=($,J)=>q=>{m?M(U=>({...U,[$]:{...U[$],type:"date",endTime:q}})):J?.(q)},u0=()=>{if(!F)return null;switch(F.type){case"checkbox":{const $=R(F.id,F.selectedValues||[]),J=F.description&&(F.descriptionMinSelection===void 0||$.length>=F.descriptionMinSelection);return c.jsx(Nr,{title:F.label,items:F.items||[],selectedValues:$,onChange:O(F.id,F.onChange,F.minSelection),searchable:F.searchable,searchPlaceholder:F.searchPlaceholder,showActions:F.showActions,enableSelectAll:F.enableSelectAll,enableInverse:F.enableInverse,enableNone:F.enableNone,description:J?F.description:void 0})}case"radio":return c.jsx(Nr,{type:"radio",title:F.label,items:F.items||[],selectedValue:_(F.id,F.selectedValue||""),onChange:B(F.id,F.onValueChange),searchable:F.searchable,searchPlaceholder:F.searchPlaceholder,showActions:F.showActions,enableSelectAll:F.enableSelectAll,enableInverse:F.enableInverse,enableNone:F.enableNone,description:F.description});case"date":{const $=W(F.id,F.dateValue||je.LAST_7_DAYS),J=Q(F.id,F.dateInit),q=t0(F.id,F.dateEnd),U=N(F.id,F.startTime||""),m0=L(F.id,F.endTime||""),M0=m&&p[F.id]?.dateInit!==void 0,k0=m&&p[F.id]?.dateEnd!==void 0,v0=e0(F.id,F.onDateValueChange),O0=I(F.id,F.onDateInitChange),$e=Y(F.id,F.onDateEndChange),Z0=s0(F.id,F.onStartTimeChange),z0=n0(F.id,F.onEndTimeChange),Ae=se=>{if(v0(se),se===je.CUSTOM&&!M0&&!k0){const K0=new Date,ie=new Date(K0);ie.setHours(23,59,59,999);const x1=new Date(K0);x1.setHours(0,0,0,0),O0(x1),$e(ie),Z0("00:00:00"),z0("23:59:59")}};return c.jsx(No,{value:$,onValueChange:Ae,showCustomFields:$===je.CUSTOM,startDate:J,endDate:q,startTime:U,endTime:m0,mode:F.dateMode||"range",singleDayLabel:F.singleDayLabel,showAllTime:F.showAllTime,onStartDateChange:O0,onEndDateChange:$e,onStartTimeChange:Z0,onEndTimeChange:z0,announcement:F.description})}case"custom":{const $=m?{bufferedValue:p[F.id]?.customValue,onDeferredChange:J=>{M(q=>({...q,[F.id]:{...q[F.id],type:"custom",customValue:J}}))},isDeferred:!0}:void 0;return F.renderContent?.($)}default:return null}};return c.jsxs("div",{ref:V,className:w("flex flex-col gap-1 relative",i),children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(te,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>x(!u),disabled:d,children:[c.jsx(r0,{name:"FunnelSimple",className:"size-4"}),a]}),S?c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[j.map($=>{const J=P($.id);return c.jsxs(te,{variant:"secondary",onClick:()=>k($.id),className:"display-flex items-center gap-2",size:"sm",children:[$.label,r&&J&&c.jsx("button",{onClick:q=>{q.stopPropagation(),r($.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${$.label} filter`,children:c.jsx(r0,{name:"X",className:"size-4"})})]},$.id)}),D>0&&c.jsxs(te,{children:["+",D," more"]}),l&&G&&c.jsx(te,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:l,children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:"Clear filters"})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(pt,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"No filters applied"})]})]}),u&&c.jsxs("div",{className:w("z-popover shadow-lg","absolute top-full left-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[c.jsx(ko,{items:K,activeItemId:H,onItemClick:y}),c.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:u0()})]})]})});X7.displayName="FilterDropdown";function L_(e){const a=S_(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(__);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function S_(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=R_(l),i=N_(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var F_=Symbol("radix.slottable");function __(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F_}function N_(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function R_(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Po=["Enter"," "],j_=["ArrowDown","PageUp","Home"],Q7=["ArrowUp","PageDown","End"],k_=[...j_,...Q7],P_={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},I_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xn="Menu",[Hn,D_,T_]=X2(xn),[At,J7]=Y0(xn,[T_,O1,fa]),Zn=O1(),ef=fa(),[tf,Y1]=At(xn),[O_,yn]=At(xn),af=e=>{const{__scopeMenu:a,open:n=!1,children:r,dir:l,onOpenChange:o,modal:s=!0}=e,i=Zn(a),[d,m]=t.useState(null),f=t.useRef(!1),u=Re(o),h=na(l);return t.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(an,{...i,children:c.jsx(tf,{scope:a,open:n,onOpenChange:u,content:d,onContentChange:m,children:c.jsx(O_,{scope:a,onClose:t.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};af.displayName=xn;var $_="MenuAnchor",Io=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e,l=Zn(n);return c.jsx(nn,{...l,...r,ref:a})});Io.displayName=$_;var Do="MenuPortal",[z_,nf]=At(Do,{forceMount:void 0}),rf=e=>{const{__scopeMenu:a,forceMount:n,children:r,container:l}=e,o=Y1(Do,a);return c.jsx(z_,{scope:a,forceMount:n,children:c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:r})})})};rf.displayName=Do;var ke="MenuContent",[B_,To]=At(ke),lf=t.forwardRef((e,a)=>{const n=nf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...l}=e,o=Y1(ke,e.__scopeMenu),s=yn(ke,e.__scopeMenu);return c.jsx(Hn.Provider,{scope:e.__scopeMenu,children:c.jsx(ue,{present:r||o.open,children:c.jsx(Hn.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(W_,{...l,ref:a}):c.jsx(G_,{...l,ref:a})})})})}),W_=t.forwardRef((e,a)=>{const n=Y1(ke,e.__scopeMenu),r=t.useRef(null),l=p0(a,r);return t.useEffect(()=>{const o=r.current;if(o)return Ar(o)},[]),c.jsx(Oo,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),G_=t.forwardRef((e,a)=>{const n=Y1(ke,e.__scopeMenu);return c.jsx(Oo,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),U_=L_("MenuContent.ScrollLock"),Oo=t.forwardRef((e,a)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:p,disableOutsideScroll:g,...v}=e,A=Y1(ke,n),M=yn(ke,n),E=Zn(n),x=ef(n),H=D_(n),[y,b]=t.useState(null),V=t.useRef(null),S=p0(a,V,A.onContentChange),j=t.useRef(0),D=t.useRef(""),z=t.useRef(0),P=t.useRef(null),k=t.useRef("right"),G=t.useRef(0),K=g?gn:t.Fragment,F=g?{as:U_,allowPinchZoom:!0}:void 0,R=W=>{const Q=D.current+W,t0=H().filter(I=>!I.disabled),N=document.activeElement,L=t0.find(I=>I.ref.current===N)?.textValue,O=t0.map(I=>I.textValue),B=lN(O,Q,L),e0=t0.find(I=>I.textValue===B)?.ref.current;(function I(Y){D.current=Y,window.clearTimeout(j.current),Y!==""&&(j.current=window.setTimeout(()=>I(""),1e3))})(Q),e0&&setTimeout(()=>e0.focus())};t.useEffect(()=>()=>window.clearTimeout(j.current),[]),pr();const _=t.useCallback(W=>k.current===P.current?.side&&sN(W,P.current?.area),[]);return c.jsx(B_,{scope:n,searchRef:D,onItemEnter:t.useCallback(W=>{_(W)&&W.preventDefault()},[_]),onItemLeave:t.useCallback(W=>{_(W)||(V.current?.focus(),b(null))},[_]),onTriggerLeave:t.useCallback(W=>{_(W)&&W.preventDefault()},[_]),pointerGraceTimerRef:z,onPointerGraceIntentChange:t.useCallback(W=>{P.current=W},[]),children:c.jsx(K,{...F,children:c.jsx(pn,{asChild:!0,trapped:l,onMountAutoFocus:X(o,W=>{W.preventDefault(),V.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:p,children:c.jsx(wo,{asChild:!0,...x,dir:M.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:X(d,W=>{M.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(B2,{role:"menu","aria-orientation":"vertical","data-state":yf(A.open),"data-radix-menu-content":"",dir:M.dir,...E,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:X(v.onKeyDown,W=>{const t0=W.target.closest("[data-radix-menu-content]")===W.currentTarget,N=W.ctrlKey||W.altKey||W.metaKey,L=W.key.length===1;t0&&(W.key==="Tab"&&W.preventDefault(),!N&&L&&R(W.key));const O=V.current;if(W.target!==O||!k_.includes(W.key))return;W.preventDefault();const e0=H().filter(I=>!I.disabled).map(I=>I.ref.current);Q7.includes(W.key)&&e0.reverse(),nN(e0)}),onBlur:X(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:X(e.onPointerMove,bn(W=>{const Q=W.target,t0=G.current!==W.clientX;if(W.currentTarget.contains(Q)&&t0){const N=W.clientX>G.current?"right":"left";k.current=N,G.current=W.clientX}}))})})})})})})});lf.displayName=ke;var Y_="MenuGroup",$o=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{role:"group",...r,ref:a})});$o.displayName=Y_;var q_="MenuLabel",of=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{...r,ref:a})});of.displayName=q_;var Rr="MenuItem",sf="menu.itemSelect",jr=t.forwardRef((e,a)=>{const{disabled:n=!1,onSelect:r,...l}=e,o=t.useRef(null),s=yn(Rr,e.__scopeMenu),i=To(Rr,e.__scopeMenu),d=p0(a,o),m=t.useRef(!1),f=()=>{const u=o.current;if(!n&&u){const h=new CustomEvent(sf,{bubbles:!0,cancelable:!0});u.addEventListener(sf,p=>r?.(p),{once:!0}),v3(u,h),h.defaultPrevented?m.current=!1:s.onClose()}};return c.jsx(cf,{...l,ref:d,disabled:n,onClick:X(e.onClick,f),onPointerDown:u=>{e.onPointerDown?.(u),m.current=!0},onPointerUp:X(e.onPointerUp,u=>{m.current||u.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,u=>{const h=i.searchRef.current!=="";n||h&&u.key===" "||Po.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});jr.displayName=Rr;var cf=t.forwardRef((e,a)=>{const{__scopeMenu:n,disabled:r=!1,textValue:l,...o}=e,s=To(Rr,n),i=ef(n),d=t.useRef(null),m=p0(a,d),[f,u]=t.useState(!1),[h,p]=t.useState("");return t.useEffect(()=>{const g=d.current;g&&p((g.textContent??"").trim())},[o.children]),c.jsx(Hn.ItemSlot,{scope:n,disabled:r,textValue:l??h,children:c.jsx(bo,{asChild:!0,...i,focusable:!r,children:c.jsx(a0.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:m,onPointerMove:X(e.onPointerMove,bn(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,bn(g=>s.onItemLeave(g))),onFocus:X(e.onFocus,()=>u(!0)),onBlur:X(e.onBlur,()=>u(!1))})})})}),K_="MenuCheckboxItem",df=t.forwardRef((e,a)=>{const{checked:n=!1,onCheckedChange:r,...l}=e;return c.jsx(pf,{scope:e.__scopeMenu,checked:n,children:c.jsx(jr,{role:"menuitemcheckbox","aria-checked":kr(n)?"mixed":n,...l,ref:a,"data-state":Wo(n),onSelect:X(l.onSelect,()=>r?.(kr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});df.displayName=K_;var uf="MenuRadioGroup",[X_,Q_]=At(uf,{value:void 0,onValueChange:()=>{}}),mf=t.forwardRef((e,a)=>{const{value:n,onValueChange:r,...l}=e,o=Re(r);return c.jsx(X_,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx($o,{...l,ref:a})})});mf.displayName=uf;var ff="MenuRadioItem",hf=t.forwardRef((e,a)=>{const{value:n,...r}=e,l=Q_(ff,e.__scopeMenu),o=n===l.value;return c.jsx(pf,{scope:e.__scopeMenu,checked:o,children:c.jsx(jr,{role:"menuitemradio","aria-checked":o,...r,ref:a,"data-state":Wo(o),onSelect:X(r.onSelect,()=>l.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});hf.displayName=ff;var zo="MenuItemIndicator",[pf,J_]=At(zo,{checked:!1}),gf=t.forwardRef((e,a)=>{const{__scopeMenu:n,forceMount:r,...l}=e,o=J_(zo,n);return c.jsx(ue,{present:r||kr(o.checked)||o.checked===!0,children:c.jsx(a0.span,{...l,ref:a,"data-state":Wo(o.checked)})})});gf.displayName=zo;var eN="MenuSeparator",vf=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e;return c.jsx(a0.div,{role:"separator","aria-orientation":"horizontal",...r,ref:a})});vf.displayName=eN;var tN="MenuArrow",Af=t.forwardRef((e,a)=>{const{__scopeMenu:n,...r}=e,l=Zn(n);return c.jsx(W2,{...l,...r,ref:a})});Af.displayName=tN;var Bo="MenuSub",[aN,Mf]=At(Bo),Ef=e=>{const{__scopeMenu:a,children:n,open:r=!1,onOpenChange:l}=e,o=Y1(Bo,a),s=Zn(a),[i,d]=t.useState(null),[m,f]=t.useState(null),u=Re(l);return t.useEffect(()=>(o.open===!1&&u(!1),()=>u(!1)),[o.open,u]),c.jsx(an,{...s,children:c.jsx(tf,{scope:a,open:r,onOpenChange:u,content:m,onContentChange:f,children:c.jsx(aN,{scope:a,contentId:P0(),triggerId:P0(),trigger:i,onTriggerChange:d,children:n})})})};Ef.displayName=Bo;var wn="MenuSubTrigger",xf=t.forwardRef((e,a)=>{const n=Y1(wn,e.__scopeMenu),r=yn(wn,e.__scopeMenu),l=Mf(wn,e.__scopeMenu),o=To(wn,e.__scopeMenu),s=t.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=o,m={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),d(null)}},[i,d]),c.jsx(Io,{asChild:!0,...m,children:c.jsx(cf,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":yf(n.open),...e,ref:de(a,l.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,bn(u=>{o.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:X(e.onPointerLeave,bn(u=>{f();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,g=p==="right",v=g?-5:5,A=h[g?"left":"right"],M=h[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:u.clientX+v,y:u.clientY},{x:A,y:h.top},{x:M,y:h.top},{x:M,y:h.bottom},{x:A,y:h.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(u),u.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,u=>{const h=o.searchRef.current!=="";e.disabled||h&&u.key===" "||P_[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});xf.displayName=wn;var Hf="MenuSubContent",Zf=t.forwardRef((e,a)=>{const n=nf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...l}=e,o=Y1(ke,e.__scopeMenu),s=yn(ke,e.__scopeMenu),i=Mf(Hf,e.__scopeMenu),d=t.useRef(null),m=p0(a,d);return c.jsx(Hn.Provider,{scope:e.__scopeMenu,children:c.jsx(ue,{present:r||o.open,children:c.jsx(Hn.Slot,{scope:e.__scopeMenu,children:c.jsx(Oo,{id:i.contentId,"aria-labelledby":i.triggerId,...l,ref:m,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{s.isUsingKeyboardRef.current&&d.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:X(e.onFocusOutside,f=>{f.target!==i.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{const u=f.currentTarget.contains(f.target),h=I_[s.dir].includes(f.key);u&&h&&(o.onOpenChange(!1),i.trigger?.focus(),f.preventDefault())})})})})})});Zf.displayName=Hf;function yf(e){return e?"open":"closed"}function kr(e){return e==="indeterminate"}function Wo(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}function nN(e){const a=document.activeElement;for(const n of e)if(n===a||(n.focus(),document.activeElement!==a))return}function rN(e,a){return e.map((n,r)=>e[(a+r)%e.length])}function lN(e,a,n){const l=a.length>1&&Array.from(a).every(m=>m===a[0])?a[0]:a,o=n?e.indexOf(n):-1;let s=rN(e,Math.max(o,0));l.length===1&&(s=s.filter(m=>m!==n));const d=s.find(m=>m.toLowerCase().startsWith(l.toLowerCase()));return d!==n?d:void 0}function oN(e,a){const{x:n,y:r}=e;let l=!1;for(let o=0,s=a.length-1;o<a.length;s=o++){const i=a[o],d=a[s],m=i.x,f=i.y,u=d.x,h=d.y;f>r!=h>r&&n<(u-m)*(r-f)/(h-f)+m&&(l=!l)}return l}function sN(e,a){if(!a)return!1;const n={x:e.clientX,y:e.clientY};return oN(n,a)}function bn(e){return a=>a.pointerType==="mouse"?e(a):void 0}var iN=af,cN=Io,dN=rf,uN=lf,mN=$o,fN=of,hN=jr,pN=df,gN=mf,vN=hf,AN=gf,MN=vf,EN=Af,xN=Ef,HN=xf,ZN=Zf,Pr="DropdownMenu",[yN]=Y0(Pr,[J7]),ae=J7(),[wN,wf]=yN(Pr),bf=e=>{const{__scopeDropdownMenu:a,children:n,dir:r,open:l,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,d=ae(a),m=t.useRef(null),[f,u]=Q0({prop:l,defaultProp:o??!1,onChange:s,caller:Pr});return c.jsx(wN,{scope:a,triggerId:P0(),triggerRef:m,contentId:P0(),open:f,onOpenChange:u,onOpenToggle:t.useCallback(()=>u(h=>!h),[u]),modal:i,children:c.jsx(iN,{...d,open:f,onOpenChange:u,dir:r,modal:i,children:n})})};bf.displayName=Pr;var Vf="DropdownMenuTrigger",Cf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...l}=e,o=wf(Vf,n),s=ae(n);return c.jsx(cN,{asChild:!0,...s,children:c.jsx(a0.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...l,ref:de(a,o.triggerRef),onPointerDown:X(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(o.onOpenToggle(),o.open||i.preventDefault())}),onKeyDown:X(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&o.onOpenToggle(),i.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Cf.displayName=Vf;var bN="DropdownMenuPortal",Lf=e=>{const{__scopeDropdownMenu:a,...n}=e,r=ae(a);return c.jsx(dN,{...r,...n})};Lf.displayName=bN;var Sf="DropdownMenuContent",Ff=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=wf(Sf,n),o=ae(n),s=t.useRef(!1);return c.jsx(uN,{id:l.contentId,"aria-labelledby":l.triggerId,...o,...r,ref:a,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{s.current||l.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:X(e.onInteractOutside,i=>{const d=i.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0,f=d.button===2||m;(!l.modal||f)&&(s.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)"}})});Ff.displayName=Sf;var VN="DropdownMenuGroup",_f=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(mN,{...l,...r,ref:a})});_f.displayName=VN;var CN="DropdownMenuLabel",Nf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(fN,{...l,...r,ref:a})});Nf.displayName=CN;var LN="DropdownMenuItem",Rf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(hN,{...l,...r,ref:a})});Rf.displayName=LN;var SN="DropdownMenuCheckboxItem",jf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(pN,{...l,...r,ref:a})});jf.displayName=SN;var FN="DropdownMenuRadioGroup",kf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(gN,{...l,...r,ref:a})});kf.displayName=FN;var _N="DropdownMenuRadioItem",Pf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(vN,{...l,...r,ref:a})});Pf.displayName=_N;var NN="DropdownMenuItemIndicator",If=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(AN,{...l,...r,ref:a})});If.displayName=NN;var RN="DropdownMenuSeparator",Df=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(MN,{...l,...r,ref:a})});Df.displayName=RN;var jN="DropdownMenuArrow",kN=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(EN,{...l,...r,ref:a})});kN.displayName=jN;var PN=e=>{const{__scopeDropdownMenu:a,children:n,open:r,onOpenChange:l,defaultOpen:o}=e,s=ae(a),[i,d]=Q0({prop:r,defaultProp:o??!1,onChange:l,caller:"DropdownMenuSub"});return c.jsx(xN,{...s,open:i,onOpenChange:d,children:n})},IN="DropdownMenuSubTrigger",Tf=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(HN,{...l,...r,ref:a})});Tf.displayName=IN;var DN="DropdownMenuSubContent",Of=t.forwardRef((e,a)=>{const{__scopeDropdownMenu:n,...r}=e,l=ae(n);return c.jsx(ZN,{...l,...r,ref:a,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)"}})});Of.displayName=DN;var TN=bf,ON=Cf,$f=Lf,$N=Ff,zN=_f,BN=Nf,WN=Rf,GN=jf,UN=kf,YN=Pf,zf=If,qN=Df,KN=PN,XN=Tf,QN=Of;function Go(e){return c.jsx(TN,{"data-slot":"dropdown-menu",...e})}function JN(e){return c.jsx($f,{"data-slot":"dropdown-menu-portal",...e})}function Uo(e){return c.jsx(ON,{"data-slot":"dropdown-menu-trigger",...e})}function Yo({className:e,sideOffset:a=4,...n}){return c.jsx($f,{children:c.jsx($N,{"data-slot":"dropdown-menu-content",sideOffset:a,className:w("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-popover max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function eR(e){return c.jsx(zN,{"data-slot":"dropdown-menu-group",...e})}function qo({className:e,inset:a,variant:n="default",...r}){return c.jsx(WN,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:w("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function tR({className:e,children:a,checked:n,...r}){return c.jsxs(GN,{"data-slot":"dropdown-menu-checkbox-item",className:w("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(zf,{children:c.jsx(zl,{className:"size-4"})})}),a]})}function aR(e){return c.jsx(UN,{"data-slot":"dropdown-menu-radio-group",...e})}function nR({className:e,children:a,...n}){return c.jsxs(YN,{"data-slot":"dropdown-menu-radio-item",className:w("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[c.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(zf,{children:c.jsx(pm,{className:"size-2 fill-current"})})}),a]})}function rR({className:e,inset:a,...n}){return c.jsx(BN,{"data-slot":"dropdown-menu-label","data-inset":a,className:w("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function lR({className:e,...a}){return c.jsx(qN,{"data-slot":"dropdown-menu-separator",className:w("bg-border -mx-1 my-1 h-px",e),...a})}function oR({className:e,...a}){return c.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:w("text-muted-foreground ml-auto text-xs tracking-widest",e),...a})}function sR(e){return c.jsx(KN,{"data-slot":"dropdown-menu-sub",...e})}function iR({className:e,inset:a,children:n,...r}){return c.jsxs(XN,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:w("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,c.jsx(dr,{className:"ml-auto size-4"})]})}function cR({className:e,...a}){return c.jsx(QN,{"data-slot":"dropdown-menu-sub-content",className:w("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-popover min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...a})}const Ir=({children:e,...a})=>c.jsx(Go,{...a,children:e});Ir.displayName="DropdownMenu";const Bf=({children:e,...a})=>c.jsx(JN,{...a,children:e});Bf.displayName="DropdownMenuPortal";const Dr=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(Uo,{ref:r,className:w(e),...n,children:a}));Dr.displayName="DropdownMenuTrigger";const Tr=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(Yo,{ref:r,className:w(e),...n,children:a}));Tr.displayName="DropdownMenuContent";const Wf=({children:e,...a})=>c.jsx(eR,{...a,children:e});Wf.displayName="DropdownMenuGroup";const Gf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(rR,{ref:r,className:w(e),...n,children:a}));Gf.displayName="DropdownMenuLabel";const Xe=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(qo,{ref:r,className:w(e),...n,children:a}));Xe.displayName="DropdownMenuItem";const Uf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(tR,{ref:r,className:w(e),...n,children:a}));Uf.displayName="DropdownMenuCheckboxItem";const Yf=({children:e,...a})=>c.jsx(aR,{...a,children:e});Yf.displayName="DropdownMenuRadioGroup";const qf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(nR,{ref:r,className:w(e),...n,children:a}));qf.displayName="DropdownMenuRadioItem";const Or=t.forwardRef(({className:e,...a},n)=>c.jsx(lR,{ref:n,className:w(e),...a}));Or.displayName="DropdownMenuSeparator";const Kf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(oR,{ref:r,className:w(e),...n,children:a}));Kf.displayName="DropdownMenuShortcut";const Xf=({children:e,...a})=>c.jsx(sR,{...a,children:e});Xf.displayName="DropdownMenuSub";const Qf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(iR,{ref:r,className:w(e),...n,children:a}));Qf.displayName="DropdownMenuSubTrigger";const Jf=t.forwardRef(({className:e,children:a,...n},r)=>c.jsx(cR,{ref:r,className:w(e),...n,children:a}));Jf.displayName="DropdownMenuSubContent";const dR=({allowed:e,children:a,message:n="You don't have permission to perform this action"})=>e?c.jsx(c.Fragment,{children:a}):c.jsx(V1,{content:n,show:!e,children:c.jsx("span",{className:"block w-full",children:a})}),eh=({options:e,icon:a=null,className:n,disabled:r=!1,marginBottom:l})=>{const[o,s]=t.useState(!1),i=f=>{s(f)},d=f=>{f.allowed&&f.handleClick&&f.handleClick(e),s(!1)};if(!e.actions||e.actions.length===0)return null;const m={};return l!==void 0&&(m.marginBottom=`${l}px`),c.jsx("div",{className:w("inline-flex relative",n),style:m,children:c.jsxs(Ir,{open:o,onOpenChange:i,children:[c.jsx(Dr,{asChild:!0,disabled:r,children:c.jsx(me,{disabled:r,variant:"ghost",size:"icon",className:"h-8 w-8 p-1","aria-label":"more","aria-controls":o?"dots-menu":void 0,"aria-expanded":o,"aria-haspopup":"true",children:c.jsx(r0,{name:a||"DotsThreeCircleVertical",size:"sm",className:w("transition-colors",o?"text-primary":"text-muted-foreground")})})}),c.jsx(Tr,{id:"dots-menu",align:"end",className:w("max-h-[216px] overflow-y-auto"),children:e.actions.map(f=>c.jsx(dR,{allowed:f.allowed??!0,children:c.jsxs(Xe,{onClick:()=>d(f),disabled:!f.allowed,className:"flex items-center gap-3.5 cursor-pointer",children:[c.jsx(r0,{name:f.icon,size:"sm",className:"shrink-0"}),c.jsx("span",{children:f.name||String(f.key)})]})},f.key))})]})})};eh.displayName="DotsMenu";var th="Toggle",Ko=t.forwardRef((e,a)=>{const{pressed:n,defaultPressed:r,onPressedChange:l,...o}=e,[s,i]=Q0({prop:n,onChange:l,defaultProp:r??!1,caller:th});return c.jsx(a0.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:a,onClick:X(e.onClick,()=>{e.disabled||i(!s)})})});Ko.displayName=th;var ah=Ko,q1="ToggleGroup",[nh]=Y0(q1,[fa]),rh=fa(),Xo=Z.forwardRef((e,a)=>{const{type:n,...r}=e;if(n==="single"){const l=r;return c.jsx(uR,{...l,ref:a})}if(n==="multiple"){const l=r;return c.jsx(mR,{...l,ref:a})}throw new Error(`Missing prop \`type\` expected on \`${q1}\``)});Xo.displayName=q1;var[lh,oh]=nh(q1),uR=Z.forwardRef((e,a)=>{const{value:n,defaultValue:r,onValueChange:l=()=>{},...o}=e,[s,i]=Q0({prop:n,defaultProp:r??"",onChange:l,caller:q1});return c.jsx(lh,{scope:e.__scopeToggleGroup,type:"single",value:Z.useMemo(()=>s?[s]:[],[s]),onItemActivate:i,onItemDeactivate:Z.useCallback(()=>i(""),[i]),children:c.jsx(sh,{...o,ref:a})})}),mR=Z.forwardRef((e,a)=>{const{value:n,defaultValue:r,onValueChange:l=()=>{},...o}=e,[s,i]=Q0({prop:n,defaultProp:r??[],onChange:l,caller:q1}),d=Z.useCallback(f=>i((u=[])=>[...u,f]),[i]),m=Z.useCallback(f=>i((u=[])=>u.filter(h=>h!==f)),[i]);return c.jsx(lh,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:d,onItemDeactivate:m,children:c.jsx(sh,{...o,ref:a})})});Xo.displayName=q1;var[fR,hR]=nh(q1),sh=Z.forwardRef((e,a)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:l=!0,orientation:o,dir:s,loop:i=!0,...d}=e,m=rh(n),f=na(s),u={role:"group",dir:f,...d};return c.jsx(fR,{scope:n,rovingFocus:l,disabled:r,children:l?c.jsx(wo,{asChild:!0,...m,orientation:o,dir:f,loop:i,children:c.jsx(a0.div,{...u,ref:a})}):c.jsx(a0.div,{...u,ref:a})})}),$r="ToggleGroupItem",ih=Z.forwardRef((e,a)=>{const n=oh($r,e.__scopeToggleGroup),r=hR($r,e.__scopeToggleGroup),l=rh(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:o,disabled:s},d=Z.useRef(null);return r.rovingFocus?c.jsx(bo,{asChild:!0,...l,focusable:!s,active:o,ref:d,children:c.jsx(ch,{...i,ref:a})}):c.jsx(ch,{...i,ref:a})});ih.displayName=$r;var ch=Z.forwardRef((e,a)=>{const{__scopeToggleGroup:n,value:r,...l}=e,o=oh($r,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=o.type==="single"?s:void 0;return c.jsx(Ko,{...i,...l,ref:a,onPressedChange:d=>{d?o.onItemActivate(r):o.onItemDeactivate(r)}})}),dh=Xo,uh=ih;const mh=_0("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-border bg-background hover:bg-muted hover:text-accent-foreground data-[state=on]:bg-muted"},size:{default:"h-9 p-1.5",sm:"h-8 p-1.5",lg:"h-10 p-1.5"}},defaultVariants:{variant:"default",size:"default"}}),pR=t.forwardRef(({className:e,variant:a,size:n,...r},l)=>c.jsx(ah,{ref:l,className:w(mh({variant:a,size:n,className:e})),...r}));pR.displayName=ah.displayName;const fh=t.createContext({size:"default",variant:"default"}),hh=t.forwardRef(({className:e,variant:a,size:n,children:r,...l},o)=>c.jsx(dh,{ref:o,className:w("inline-flex items-center justify-center",e),...l,children:c.jsx(fh.Provider,{value:{variant:a,size:n},children:r})}));hh.displayName=dh.displayName;const ph=t.forwardRef(({className:e,children:a,variant:n,size:r,...l},o)=>{const s=t.useContext(fh);return c.jsx(uh,{ref:o,className:w(mh({variant:s.variant||n,size:s.size||r}),"rounded-none first:rounded-l-md last:rounded-r-md",(s.variant==="outline"||n==="outline")&&"-mr-px",e),...l,children:a})});ph.displayName=uh.displayName;const gh=t.forwardRef(({className:e,variant:a,size:n,children:r,onChange:l,...o},s)=>c.jsx(hh,{ref:s,className:w(e),variant:a,size:n,onValueChange:l,...o,children:r}));gh.displayName="ToggleGroup";const vh=t.forwardRef(({className:e,variant:a,size:n,children:r,...l},o)=>c.jsx(ph,{ref:o,className:w(e),variant:a,size:n,...l,children:r}));vh.displayName="ToggleGroupItem";const Qo=t.forwardRef(({children:e,current:a=!1,badge:n,disabled:r=!1,className:l,onClick:o,...s},i)=>{const d=m=>{if(r){m.preventDefault();return}o?.(m)};return c.jsx("a",{ref:i,className:w("box-border flex items-center justify-center gap-2 px-0 py-1.5 h-12",a&&"border-b-2 border-primary",!a&&"border-b-2 border-transparent",r&&"pointer-events-none cursor-not-allowed",l),onClick:d,"aria-current":a?"page":void 0,"aria-disabled":r,...s,children:c.jsxs("div",{className:w("flex items-center justify-center gap-2 px-2.5 py-2 rounded-md",!r&&!a&&"text-muted-foreground",!r&&a&&"text-foreground",r&&"text-muted-foreground opacity-50",!r&&!a&&"hover:bg-accent hover:text-accent-foreground"),children:[c.jsx("span",{className:"text-sm font-normal leading-5 whitespace-nowrap",children:e}),n&&c.jsx(m1,{variant:"default",className:"min-w-5 h-5 px-1 rounded-full",children:n})]})})});Qo.displayName="NavLink";const gR=_0("font-sans",{variants:{variant:{h1:"scroll-m-20 text-4xl tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl tracking-tight",h3:"scroll-m-20 text-2xl tracking-tight",h4:"scroll-m-20 text-xl tracking-tight",p:"",lead:"text-xl text-muted-foreground",lg:"text-lg font-semibold",xl:"text-xl font-semibold",xs:"text-xs font-medium leading-none",sm:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground",blockquote:"mt-6 border-l-2 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2"},weight:{regular:"font-normal",bold:"font-bold",semibold:"font-semibold"}},defaultVariants:{variant:"p"}});function vR(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"blockquote":return"blockquote";case"list":return"ul";case"p":case"lead":case"lg":case"sm":case"muted":default:return"p"}}const G0=Z.forwardRef(({className:e,variant:a="p",weight:n,as:r,...l},o)=>{const s=r||vR(a??"p"),i=n!==void 0?{variant:a,weight:n}:{variant:a};return Z.createElement(s,{className:w(gR(i),e),ref:o,...l})});G0.displayName="Typography";function Ah(e,[a,n]){return Math.min(n,Math.max(a,e))}function AR(e){const a=MR(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(xR);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function MR(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=ZR(l),i=HR(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var ER=Symbol("radix.slottable");function xR(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ER}function HR(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function ZR(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yR=[" ","Enter","ArrowUp","ArrowDown"],wR=[" ","Enter"],Mt="Select",[zr,Br,bR]=X2(Mt),[ha]=Y0(Mt,[bR,O1]),Wr=O1(),[VR,K1]=ha(Mt),[CR,LR]=ha(Mt),Mh=e=>{const{__scopeSelect:a,children:n,open:r,defaultOpen:l,onOpenChange:o,value:s,defaultValue:i,onValueChange:d,dir:m,name:f,autoComplete:u,disabled:h,required:p,form:g}=e,v=Wr(a),[A,M]=t.useState(null),[E,x]=t.useState(null),[H,y]=t.useState(!1),b=na(m),[V,S]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:Mt}),[j,D]=Q0({prop:s,defaultProp:i,onChange:d,caller:Mt}),z=t.useRef(null),P=A?g||!!A.closest("form"):!0,[k,G]=t.useState(new Set),K=Array.from(k).map(F=>F.props.value).join(";");return c.jsx(an,{...v,children:c.jsxs(VR,{required:p,scope:a,trigger:A,onTriggerChange:M,valueNode:E,onValueNodeChange:x,valueNodeHasChildren:H,onValueNodeHasChildrenChange:y,contentId:P0(),value:j,onValueChange:D,open:V,onOpenChange:S,dir:b,triggerPointerDownPosRef:z,disabled:h,children:[c.jsx(zr.Provider,{scope:a,children:c.jsx(CR,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(F=>{G(R=>new Set(R).add(F))},[]),onNativeOptionRemove:t.useCallback(F=>{G(R=>{const _=new Set(R);return _.delete(F),_})},[]),children:n})}),P?c.jsxs(Bh,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:F=>D(F.target.value),disabled:h,form:g,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(k)]},K):null]})})};Mh.displayName=Mt;var Eh="SelectTrigger",xh=t.forwardRef((e,a)=>{const{__scopeSelect:n,disabled:r=!1,...l}=e,o=Wr(n),s=K1(Eh,n),i=s.disabled||r,d=p0(a,s.onTriggerChange),m=Br(n),f=t.useRef("touch"),[u,h,p]=Gh(v=>{const A=m().filter(x=>!x.disabled),M=A.find(x=>x.value===s.value),E=Uh(A,v,M);E!==void 0&&s.onValueChange(E.value)}),g=v=>{i||(s.onOpenChange(!0),p()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return c.jsx(nn,{asChild:!0,...o,children:c.jsx(a0.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Wh(s.value)?"":void 0,...l,ref:d,onClick:X(l.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&g(v)}),onPointerDown:X(l.onPointerDown,v=>{f.current=v.pointerType;const A=v.target;A.hasPointerCapture(v.pointerId)&&A.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:X(l.onKeyDown,v=>{const A=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(A&&v.key===" ")&&yR.includes(v.key)&&(g(),v.preventDefault())})})})});xh.displayName=Eh;var Hh="SelectValue",Zh=t.forwardRef((e,a)=>{const{__scopeSelect:n,className:r,style:l,children:o,placeholder:s="",...i}=e,d=K1(Hh,n),{onValueNodeHasChildrenChange:m}=d,f=o!==void 0,u=p0(a,d.onValueNodeChange);return $0(()=>{m(f)},[m,f]),c.jsx(a0.span,{...i,ref:u,style:{pointerEvents:"none"},children:Wh(d.value)?c.jsx(c.Fragment,{children:s}):o})});Zh.displayName=Hh;var SR="SelectIcon",yh=t.forwardRef((e,a)=>{const{__scopeSelect:n,children:r,...l}=e;return c.jsx(a0.span,{"aria-hidden":!0,...l,ref:a,children:r||"▼"})});yh.displayName=SR;var FR="SelectPortal",wh=e=>c.jsx(ta,{asChild:!0,...e});wh.displayName=FR;var Et="SelectContent",bh=t.forwardRef((e,a)=>{const n=K1(Et,e.__scopeSelect),[r,l]=t.useState();if($0(()=>{l(new DocumentFragment)},[]),!n.open){const o=r;return o?S2.createPortal(c.jsx(Vh,{scope:e.__scopeSelect,children:c.jsx(zr.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(Ch,{...e,ref:a})});bh.displayName=Et;var Qe=10,[Vh,X1]=ha(Et),_R="SelectContentImpl",NR=AR("SelectContent.RemoveScroll"),Ch=t.forwardRef((e,a)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:i,sideOffset:d,align:m,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:v,avoidCollisions:A,...M}=e,E=K1(Et,n),[x,H]=t.useState(null),[y,b]=t.useState(null),V=p0(a,I=>H(I)),[S,j]=t.useState(null),[D,z]=t.useState(null),P=Br(n),[k,G]=t.useState(!1),K=t.useRef(!1);t.useEffect(()=>{if(x)return Ar(x)},[x]),pr();const F=t.useCallback(I=>{const[Y,...s0]=P().map($=>$.ref.current),[n0]=s0.slice(-1),u0=document.activeElement;for(const $ of I)if($===u0||($?.scrollIntoView({block:"nearest"}),$===Y&&y&&(y.scrollTop=0),$===n0&&y&&(y.scrollTop=y.scrollHeight),$?.focus(),document.activeElement!==u0))return},[P,y]),R=t.useCallback(()=>F([S,x]),[F,S,x]);t.useEffect(()=>{k&&R()},[k,R]);const{onOpenChange:_,triggerPointerDownPosRef:W}=E;t.useEffect(()=>{if(x){let I={x:0,y:0};const Y=n0=>{I={x:Math.abs(Math.round(n0.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(n0.pageY)-(W.current?.y??0))}},s0=n0=>{I.x<=10&&I.y<=10?n0.preventDefault():x.contains(n0.target)||_(!1),document.removeEventListener("pointermove",Y),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",s0,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",s0,{capture:!0})}}},[x,_,W]),t.useEffect(()=>{const I=()=>_(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[_]);const[Q,t0]=Gh(I=>{const Y=P().filter(u0=>!u0.disabled),s0=Y.find(u0=>u0.ref.current===document.activeElement),n0=Uh(Y,I,s0);n0&&setTimeout(()=>n0.ref.current.focus())}),N=t.useCallback((I,Y,s0)=>{const n0=!K.current&&!s0;(E.value!==void 0&&E.value===Y||n0)&&(j(I),n0&&(K.current=!0))},[E.value]),L=t.useCallback(()=>x?.focus(),[x]),O=t.useCallback((I,Y,s0)=>{const n0=!K.current&&!s0;(E.value!==void 0&&E.value===Y||n0)&&z(I)},[E.value]),B=r==="popper"?Jo:Lh,e0=B===Jo?{side:i,sideOffset:d,align:m,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:v,avoidCollisions:A}:{};return c.jsx(Vh,{scope:n,content:x,viewport:y,onViewportChange:b,itemRefCallback:N,selectedItem:S,onItemLeave:L,itemTextRefCallback:O,focusSelectedItem:R,selectedItemText:D,position:r,isPositioned:k,searchRef:Q,children:c.jsx(gn,{as:NR,allowPinchZoom:!0,children:c.jsx(pn,{asChild:!0,trapped:E.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:X(l,I=>{E.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:c.jsx(Kt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:c.jsx(B,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:I=>I.preventDefault(),...M,...e0,onPlaced:()=>G(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:X(M.onKeyDown,I=>{const Y=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Y&&I.key.length===1&&t0(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let n0=P().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);if(["ArrowUp","End"].includes(I.key)&&(n0=n0.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const u0=I.target,$=n0.indexOf(u0);n0=n0.slice($+1)}setTimeout(()=>F(n0)),I.preventDefault()}})})})})})})});Ch.displayName=_R;var RR="SelectItemAlignedPosition",Lh=t.forwardRef((e,a)=>{const{__scopeSelect:n,onPlaced:r,...l}=e,o=K1(Et,n),s=X1(Et,n),[i,d]=t.useState(null),[m,f]=t.useState(null),u=p0(a,V=>f(V)),h=Br(n),p=t.useRef(!1),g=t.useRef(!0),{viewport:v,selectedItem:A,selectedItemText:M,focusSelectedItem:E}=s,x=t.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&m&&v&&A&&M){const V=o.trigger.getBoundingClientRect(),S=m.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),D=M.getBoundingClientRect();if(o.dir!=="rtl"){const u0=D.left-S.left,$=j.left-u0,J=V.left-$,q=V.width+J,U=Math.max(q,S.width),m0=window.innerWidth-Qe,M0=Ah($,[Qe,Math.max(Qe,m0-U)]);i.style.minWidth=q+"px",i.style.left=M0+"px"}else{const u0=S.right-D.right,$=window.innerWidth-j.right-u0,J=window.innerWidth-V.right-$,q=V.width+J,U=Math.max(q,S.width),m0=window.innerWidth-Qe,M0=Ah($,[Qe,Math.max(Qe,m0-U)]);i.style.minWidth=q+"px",i.style.right=M0+"px"}const z=h(),P=window.innerHeight-Qe*2,k=v.scrollHeight,G=window.getComputedStyle(m),K=parseInt(G.borderTopWidth,10),F=parseInt(G.paddingTop,10),R=parseInt(G.borderBottomWidth,10),_=parseInt(G.paddingBottom,10),W=K+F+k+_+R,Q=Math.min(A.offsetHeight*5,W),t0=window.getComputedStyle(v),N=parseInt(t0.paddingTop,10),L=parseInt(t0.paddingBottom,10),O=V.top+V.height/2-Qe,B=P-O,e0=A.offsetHeight/2,I=A.offsetTop+e0,Y=K+F+I,s0=W-Y;if(Y<=O){const u0=z.length>0&&A===z[z.length-1].ref.current;i.style.bottom="0px";const $=m.clientHeight-v.offsetTop-v.offsetHeight,J=Math.max(B,e0+(u0?L:0)+$+R),q=Y+J;i.style.height=q+"px"}else{const u0=z.length>0&&A===z[0].ref.current;i.style.top="0px";const J=Math.max(O,K+v.offsetTop+(u0?N:0)+e0)+s0;i.style.height=J+"px",v.scrollTop=Y-O+v.offsetTop}i.style.margin=`${Qe}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=P+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,i,m,v,A,M,o.dir,r]);$0(()=>x(),[x]);const[H,y]=t.useState();$0(()=>{m&&y(window.getComputedStyle(m).zIndex)},[m]);const b=t.useCallback(V=>{V&&g.current===!0&&(x(),E?.(),g.current=!1)},[x,E]);return c.jsx(kR,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:H},children:c.jsx(a0.div,{...l,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});Lh.displayName=RR;var jR="SelectPopperPosition",Jo=t.forwardRef((e,a)=>{const{__scopeSelect:n,align:r="start",collisionPadding:l=Qe,...o}=e,s=Wr(n);return c.jsx(B2,{...s,...o,ref:a,align:r,collisionPadding:l,style:{boxSizing:"border-box",...o.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)"}})});Jo.displayName=jR;var[kR,e6]=ha(Et,{}),t6="SelectViewport",Sh=t.forwardRef((e,a)=>{const{__scopeSelect:n,nonce:r,...l}=e,o=X1(t6,n),s=e6(t6,n),i=p0(a,o.onViewportChange),d=t.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(zr.Slot,{scope:n,children:c.jsx(a0.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:X(l.onScroll,m=>{const f=m.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=s;if(h?.current&&u){const p=Math.abs(d.current-f.scrollTop);if(p>0){const g=window.innerHeight-Qe*2,v=parseFloat(u.style.minHeight),A=parseFloat(u.style.height),M=Math.max(v,A);if(M<g){const E=M+p,x=Math.min(g,E),H=E-x;u.style.height=x+"px",u.style.bottom==="0px"&&(f.scrollTop=H>0?H:0,u.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Sh.displayName=t6;var Fh="SelectGroup",[PR,IR]=ha(Fh),_h=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=P0();return c.jsx(PR,{scope:n,id:l,children:c.jsx(a0.div,{role:"group","aria-labelledby":l,...r,ref:a})})});_h.displayName=Fh;var Nh="SelectLabel",Rh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=IR(Nh,n);return c.jsx(a0.div,{id:l.id,...r,ref:a})});Rh.displayName=Nh;var Gr="SelectItem",[DR,jh]=ha(Gr),kh=t.forwardRef((e,a)=>{const{__scopeSelect:n,value:r,disabled:l=!1,textValue:o,...s}=e,i=K1(Gr,n),d=X1(Gr,n),m=i.value===r,[f,u]=t.useState(o??""),[h,p]=t.useState(!1),g=p0(a,E=>d.itemRefCallback?.(E,r,l)),v=P0(),A=t.useRef("touch"),M=()=>{l||(i.onValueChange(r),i.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 c.jsx(DR,{scope:n,value:r,disabled:l,textId:v,isSelected:m,onItemTextChange:t.useCallback(E=>{u(x=>x||(E?.textContent??"").trim())},[]),children:c.jsx(zr.ItemSlot,{scope:n,value:r,disabled:l,textValue:f,children:c.jsx(a0.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":m&&h,"data-state":m?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:X(s.onFocus,()=>p(!0)),onBlur:X(s.onBlur,()=>p(!1)),onClick:X(s.onClick,()=>{A.current!=="mouse"&&M()}),onPointerUp:X(s.onPointerUp,()=>{A.current==="mouse"&&M()}),onPointerDown:X(s.onPointerDown,E=>{A.current=E.pointerType}),onPointerMove:X(s.onPointerMove,E=>{A.current=E.pointerType,l?d.onItemLeave?.():A.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:X(s.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(wR.includes(E.key)&&M(),E.key===" "&&E.preventDefault())})})})})});kh.displayName=Gr;var Vn="SelectItemText",Ph=t.forwardRef((e,a)=>{const{__scopeSelect:n,className:r,style:l,...o}=e,s=K1(Vn,n),i=X1(Vn,n),d=jh(Vn,n),m=LR(Vn,n),[f,u]=t.useState(null),h=p0(a,M=>u(M),d.onItemTextChange,M=>i.itemTextRefCallback?.(M,d.value,d.disabled)),p=f?.textContent,g=t.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:A}=m;return $0(()=>(v(g),()=>A(g)),[v,A,g]),c.jsxs(c.Fragment,{children:[c.jsx(a0.span,{id:d.textId,...o,ref:h}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S2.createPortal(o.children,s.valueNode):null]})});Ph.displayName=Vn;var Ih="SelectItemIndicator",Dh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e;return jh(Ih,n).isSelected?c.jsx(a0.span,{"aria-hidden":!0,...r,ref:a}):null});Dh.displayName=Ih;var a6="SelectScrollUpButton",Th=t.forwardRef((e,a)=>{const n=X1(a6,e.__scopeSelect),r=e6(a6,e.__scopeSelect),[l,o]=t.useState(!1),s=p0(a,r.onScrollButtonChange);return $0(()=>{if(n.viewport&&n.isPositioned){let i=function(){const m=d.scrollTop>0;o(m)};const d=n.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?c.jsx($h,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=n;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});Th.displayName=a6;var n6="SelectScrollDownButton",Oh=t.forwardRef((e,a)=>{const n=X1(n6,e.__scopeSelect),r=e6(n6,e.__scopeSelect),[l,o]=t.useState(!1),s=p0(a,r.onScrollButtonChange);return $0(()=>{if(n.viewport&&n.isPositioned){let i=function(){const m=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<m;o(f)};const d=n.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?c.jsx($h,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=n;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});Oh.displayName=n6;var $h=t.forwardRef((e,a)=>{const{__scopeSelect:n,onAutoScroll:r,...l}=e,o=X1("SelectScrollButton",n),s=t.useRef(null),i=Br(n),d=t.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return t.useEffect(()=>()=>d(),[d]),$0(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),c.jsx(a0.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:X(l.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(l.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(l.onPointerLeave,()=>{d()})})}),TR="SelectSeparator",zh=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e;return c.jsx(a0.div,{"aria-hidden":!0,...r,ref:a})});zh.displayName=TR;var r6="SelectArrow",OR=t.forwardRef((e,a)=>{const{__scopeSelect:n,...r}=e,l=Wr(n),o=K1(r6,n),s=X1(r6,n);return o.open&&s.position==="popper"?c.jsx(W2,{...l,...r,ref:a}):null});OR.displayName=r6;var $R="SelectBubbleInput",Bh=t.forwardRef(({__scopeSelect:e,value:a,...n},r)=>{const l=t.useRef(null),o=p0(r,l),s=ir(a);return t.useEffect(()=>{const i=l.current;if(!i)return;const d=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(d,"value").set;if(s!==a&&f){const u=new Event("change",{bubbles:!0});f.call(i,a),i.dispatchEvent(u)}},[s,a]),c.jsx(a0.select,{...n,style:{...e5,...n.style},ref:o,defaultValue:a})});Bh.displayName=$R;function Wh(e){return e===""||e===void 0}function Gh(e){const a=Re(e),n=t.useRef(""),r=t.useRef(0),l=t.useCallback(s=>{const i=n.current+s;a(i),(function d(m){n.current=m,window.clearTimeout(r.current),m!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(i)},[a]),o=t.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,l,o]}function Uh(e,a,n){const l=a.length>1&&Array.from(a).every(m=>m===a[0])?a[0]:a,o=n?e.indexOf(n):-1;let s=zR(e,Math.max(o,0));l.length===1&&(s=s.filter(m=>m!==n));const d=s.find(m=>m.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==n?d:void 0}function zR(e,a){return e.map((n,r)=>e[(a+r)%e.length])}var BR=Mh,Yh=xh,WR=Zh,GR=yh,UR=wh,qh=bh,YR=Sh,qR=_h,Kh=Rh,Xh=kh,KR=Ph,XR=Dh,Qh=Th,Jh=Oh,e9=zh;const QR=BR,JR=qR,ej=WR,t9=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs(Yh,{ref:r,className:w("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 shadow-xs [&>span]:min-w-0 [&>span]:truncate",e),...n,children:[a,c.jsx(GR,{asChild:!0,children:c.jsx(r0,{name:"CaretDown",size:"sm",className:"opacity-50 shrink-0"})})]}));t9.displayName=Yh.displayName;const a9=t.forwardRef(({className:e,...a},n)=>c.jsx(Qh,{ref:n,className:w("flex cursor-default items-center justify-center py-1",e),...a,children:c.jsx(r0,{name:"CaretUp",size:"sm"})}));a9.displayName=Qh.displayName;const n9=t.forwardRef(({className:e,...a},n)=>c.jsx(Jh,{ref:n,className:w("flex cursor-default items-center justify-center py-1",e),...a,children:c.jsx(r0,{name:"CaretDown",size:"sm"})}));n9.displayName=Jh.displayName;const r9=t.forwardRef(({className:e,children:a,position:n="popper",...r},l)=>c.jsx(UR,{children:c.jsxs(qh,{ref:l,className:w("relative z-[1100] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(a9,{}),c.jsx(YR,{className:w("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),c.jsx(n9,{})]})}));r9.displayName=qh.displayName;const l9=t.forwardRef(({className:e,...a},n)=>c.jsx(Kh,{ref:n,className:w("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...a}));l9.displayName=Kh.displayName;const l6=t.forwardRef(({className:e,children:a,...n},r)=>c.jsxs(Xh,{ref:r,className:w("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex h-4 w-4 items-center justify-center",children:c.jsx(XR,{children:c.jsx(r0,{name:"Check",size:"sm"})})}),c.jsx(KR,{children:a})]}));l6.displayName=Xh.displayName;const tj=t.forwardRef(({className:e,...a},n)=>c.jsx(e9,{ref:n,className:w("-mx-1 my-1 h-px bg-muted",e),...a}));tj.displayName=e9.displayName;const o9=t.forwardRef(({label:e,description:a,error:n,info:r,requiredIndicator:l,required:o=!1,optional:s=!1,placeholder:i="Select an option",value:d,defaultValue:m,onChange:f,disabled:u=!1,options:h=[],groups:p=[],className:g,id:v},A)=>{const M=p.length>0,E=h.length>0;return c.jsxs("div",{className:w("w-full",g),children:[(e||r||l)&&c.jsxs("div",{className:"mb-2",children:[c.jsx(Me,{htmlFor:v,info:r,requiredIndicator:l,required:o,disabled:u,children:e}),s&&!l&&c.jsx(G0,{variant:"sm",className:"text-muted-foreground",children:"(Optional)"})]}),a&&!n&&c.jsx(G0,{variant:"sm",className:w("text-muted-foreground mb-2",u&&"opacity-50"),children:a}),c.jsxs(QR,{value:d,defaultValue:m,onValueChange:f,disabled:u,children:[c.jsx(t9,{ref:A,id:v,className:w(n&&"border-destructive"),children:c.jsx(ej,{placeholder:i})}),c.jsx(r9,{children:M?p.map((x,H)=>c.jsxs(JR,{children:[x.label&&c.jsx(l9,{children:x.label}),x.options.map(y=>c.jsxs(l6,{value:y.value,children:[y.icon&&c.jsx("span",{className:"mr-2 inline-flex items-center",children:y.icon}),y.label]},y.value))]},H)):E?h.map(x=>c.jsx(l6,{value:x.value,children:c.jsxs("span",{className:"flex items-center",children:[x.icon&&c.jsx("span",{className:"mr-2 inline-flex items-center",children:x.icon}),x.label]})},x.value)):null})]}),n&&c.jsx(G0,{variant:"sm",className:"text-destructive mt-2",children:n})]})});o9.displayName="Select";const s9=Z7,i9=y7,o6=t.forwardRef(({className:e,align:a="start",sideOffset:n=4,...r},l)=>c.jsx(w7,{children:c.jsx(wr,{ref:l,align:a,sideOffset:n,className:w("z-popover w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),role:"combobox",...r})}));o6.displayName=wr.displayName;var c9=1,aj=.9,nj=.8,rj=.17,s6=.1,i6=.999,lj=.9999,oj=.99,sj=/[\\\/_+.#"@\[\(\{&]/,ij=/[\\\/_+.#"@\[\(\{&]/g,cj=/[\s-]/,d9=/[\s-]/g;function c6(e,a,n,r,l,o,s){if(o===a.length)return l===e.length?c9:oj;var i=`${l},${o}`;if(s[i]!==void 0)return s[i];for(var d=r.charAt(o),m=n.indexOf(d,l),f=0,u,h,p,g;m>=0;)u=c6(e,a,n,r,m+1,o+1,s),u>f&&(m===l?u*=c9:sj.test(e.charAt(m-1))?(u*=nj,p=e.slice(l,m-1).match(ij),p&&l>0&&(u*=Math.pow(i6,p.length))):cj.test(e.charAt(m-1))?(u*=aj,g=e.slice(l,m-1).match(d9),g&&l>0&&(u*=Math.pow(i6,g.length))):(u*=rj,l>0&&(u*=Math.pow(i6,m-l))),e.charAt(m)!==a.charAt(o)&&(u*=lj)),(u<s6&&n.charAt(m-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(m-1)!==r.charAt(o))&&(h=c6(e,a,n,r,m+1,o+2,s),h*s6>u&&(u=h*s6)),u>f&&(f=u),m=n.indexOf(d,m+1);return s[i]=f,f}function u9(e){return e.toLowerCase().replace(d9," ")}function dj(e,a,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,c6(e,a,u9(e),u9(a),0,0,{})}function uj(e){const a=mj(e),n=t.forwardRef((r,l)=>{const{children:o,...s}=r,i=t.Children.toArray(o),d=i.find(hj);if(d){const m=d.props.children,f=i.map(u=>u===d?t.Children.count(m)>1?t.Children.only(null):t.isValidElement(m)?m.props.children:null:u);return c.jsx(a,{...s,ref:l,children:t.isValidElement(m)?t.cloneElement(m,void 0,f):null})}return c.jsx(a,{...s,ref:l,children:o})});return n.displayName=`${e}.Slot`,n}function mj(e){const a=t.forwardRef((n,r)=>{const{children:l,...o}=n;if(t.isValidElement(l)){const s=gj(l),i=pj(o,l.props);return l.type!==t.Fragment&&(i.ref=r?de(r,s):s),t.cloneElement(l,i)}return t.Children.count(l)>1?t.Children.only(null):null});return a.displayName=`${e}.SlotClone`,a}var fj=Symbol("radix.slottable");function hj(e){return t.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fj}function pj(e,a){const n={...a};for(const r in a){const l=e[r],o=a[r];/^on[A-Z]/.test(r)?l&&o?n[r]=(...i)=>{const d=o(...i);return l(...i),d}:l&&(n[r]=l):r==="style"?n[r]={...l,...o}:r==="className"&&(n[r]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}function gj(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ur="Dialog",[m9]=Y0(Ur),[vj,Je]=m9(Ur),f9=e=>{const{__scopeDialog:a,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:s=!0}=e,i=t.useRef(null),d=t.useRef(null),[m,f]=Q0({prop:r,defaultProp:l??!1,onChange:o,caller:Ur});return c.jsx(vj,{scope:a,triggerRef:i,contentRef:d,contentId:P0(),titleId:P0(),descriptionId:P0(),open:m,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(u=>!u),[f]),modal:s,children:n})};f9.displayName=Ur;var h9="DialogTrigger",Aj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(h9,n),o=p0(a,l.triggerRef);return c.jsx(a0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":m6(l.open),...r,ref:o,onClick:X(e.onClick,l.onOpenToggle)})});Aj.displayName=h9;var d6="DialogPortal",[Mj,p9]=m9(d6,{forceMount:void 0}),g9=e=>{const{__scopeDialog:a,forceMount:n,children:r,container:l}=e,o=Je(d6,a);return c.jsx(Mj,{scope:a,forceMount:n,children:t.Children.map(r,s=>c.jsx(ue,{present:n||o.open,children:c.jsx(ta,{asChild:!0,container:l,children:s})}))})};g9.displayName=d6;var Yr="DialogOverlay",v9=t.forwardRef((e,a)=>{const n=p9(Yr,e.__scopeDialog),{forceMount:r=n.forceMount,...l}=e,o=Je(Yr,e.__scopeDialog);return o.modal?c.jsx(ue,{present:r||o.open,children:c.jsx(xj,{...l,ref:a})}):null});v9.displayName=Yr;var Ej=uj("DialogOverlay.RemoveScroll"),xj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(Yr,n);return c.jsx(gn,{as:Ej,allowPinchZoom:!0,shards:[l.contentRef],children:c.jsx(a0.div,{"data-state":m6(l.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})}),xt="DialogContent",A9=t.forwardRef((e,a)=>{const n=p9(xt,e.__scopeDialog),{forceMount:r=n.forceMount,...l}=e,o=Je(xt,e.__scopeDialog);return c.jsx(ue,{present:r||o.open,children:o.modal?c.jsx(Hj,{...l,ref:a}):c.jsx(Zj,{...l,ref:a})})});A9.displayName=xt;var Hj=t.forwardRef((e,a)=>{const n=Je(xt,e.__scopeDialog),r=t.useRef(null),l=p0(a,n.contentRef,r);return t.useEffect(()=>{const o=r.current;if(o)return Ar(o)},[]),c.jsx(M9,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&o.preventDefault()}),onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault())})}),Zj=t.forwardRef((e,a)=>{const n=Je(xt,e.__scopeDialog),r=t.useRef(!1),l=t.useRef(!1);return c.jsx(M9,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,l.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&l.current&&o.preventDefault()}})}),M9=t.forwardRef((e,a)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:l,onCloseAutoFocus:o,...s}=e,i=Je(xt,n),d=t.useRef(null),m=p0(a,d);return pr(),c.jsxs(c.Fragment,{children:[c.jsx(pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:l,onUnmountAutoFocus:o,children:c.jsx(Kt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":m6(i.open),...s,ref:m,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Vj,{titleId:i.titleId}),c.jsx(Lj,{contentRef:d,descriptionId:i.descriptionId})]})]})}),u6="DialogTitle",yj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(u6,n);return c.jsx(a0.h2,{id:l.titleId,...r,ref:a})});yj.displayName=u6;var E9="DialogDescription",wj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(E9,n);return c.jsx(a0.p,{id:l.descriptionId,...r,ref:a})});wj.displayName=E9;var x9="DialogClose",bj=t.forwardRef((e,a)=>{const{__scopeDialog:n,...r}=e,l=Je(x9,n);return c.jsx(a0.button,{type:"button",...r,ref:a,onClick:X(e.onClick,()=>l.onOpenChange(!1))})});bj.displayName=x9;function m6(e){return e?"open":"closed"}var H9="DialogTitleWarning",[K$,Z9]=sy(H9,{contentName:xt,titleName:u6,docsSlug:"dialog"}),Vj=({titleId:e})=>{const a=Z9(H9),n=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useId as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Calendar as
|
|
6
|
-
import { Popover as
|
|
2
|
+
import { useId as I } from "react";
|
|
3
|
+
import { cn as u } from "../../lib/utils.js";
|
|
4
|
+
import { Button as M } from "./button.js";
|
|
5
|
+
import { Calendar as B } from "./calendar.js";
|
|
6
|
+
import { Popover as S, PopoverTrigger as D, PopoverContent as L } from "./popover.js";
|
|
7
7
|
import { Field as R, FieldDescription as T, FieldError as z } from "./field.js";
|
|
8
8
|
import A from "../../node_modules/lucide-react/dist/esm/icons/calendar.js";
|
|
9
9
|
import G from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
@@ -11,96 +11,100 @@ import { Label as H } from "../../components/atoms/label/label.js";
|
|
|
11
11
|
import { format as J } from "../../node_modules/date-fns/format.js";
|
|
12
12
|
function ee({
|
|
13
13
|
date: s,
|
|
14
|
-
onChange:
|
|
15
|
-
placeholder:
|
|
16
|
-
disabled:
|
|
17
|
-
className:
|
|
18
|
-
iconPosition:
|
|
19
|
-
minDate:
|
|
20
|
-
maxDate:
|
|
14
|
+
onChange: j,
|
|
15
|
+
placeholder: v = "Pick a date",
|
|
16
|
+
disabled: m = !1,
|
|
17
|
+
className: f,
|
|
18
|
+
iconPosition: p = "start",
|
|
19
|
+
minDate: i,
|
|
20
|
+
maxDate: a,
|
|
21
21
|
dateFormat: w = "MMM d, yyyy",
|
|
22
|
-
label:
|
|
22
|
+
label: l,
|
|
23
23
|
error: t,
|
|
24
24
|
description: o,
|
|
25
|
-
info:
|
|
26
|
-
requiredIndicator:
|
|
25
|
+
info: n,
|
|
26
|
+
requiredIndicator: d,
|
|
27
27
|
required: y = !1,
|
|
28
28
|
orientation: g = "vertical",
|
|
29
29
|
id: C,
|
|
30
|
-
captionLayout:
|
|
31
|
-
fromYear:
|
|
32
|
-
toYear:
|
|
30
|
+
captionLayout: b,
|
|
31
|
+
fromYear: N,
|
|
32
|
+
toYear: P,
|
|
33
33
|
fromMonth: F,
|
|
34
|
-
toMonth:
|
|
34
|
+
toMonth: k
|
|
35
35
|
}) {
|
|
36
|
-
const
|
|
37
|
-
/* @__PURE__ */ e.jsx(
|
|
38
|
-
|
|
36
|
+
const E = I(), r = C || E, c = !!t, $ = p === "start", x = p === "end", h = /* @__PURE__ */ e.jsxs(S, { children: [
|
|
37
|
+
/* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
38
|
+
M,
|
|
39
39
|
{
|
|
40
40
|
variant: "outline",
|
|
41
|
-
className:
|
|
41
|
+
className: u(
|
|
42
42
|
"w-full text-left font-normal h-9",
|
|
43
|
-
|
|
43
|
+
x ? "justify-between" : "justify-start",
|
|
44
44
|
!s && "text-muted-foreground",
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
c && "border-destructive focus-visible:border-destructive",
|
|
46
|
+
f
|
|
47
47
|
),
|
|
48
|
-
disabled:
|
|
49
|
-
"aria-invalid":
|
|
48
|
+
disabled: m,
|
|
49
|
+
"aria-invalid": c ? !0 : void 0,
|
|
50
50
|
"aria-describedby": o || t ? `${r}-description` : void 0,
|
|
51
51
|
id: r,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
54
|
-
|
|
55
|
-
s ? J(s, w) : /* @__PURE__ */ e.jsx("span", { children:
|
|
54
|
+
$ && /* @__PURE__ */ e.jsx(A, { className: "h-4 w-4" }),
|
|
55
|
+
s ? J(s, w) : /* @__PURE__ */ e.jsx("span", { children: v })
|
|
56
56
|
] }),
|
|
57
|
-
|
|
57
|
+
x && /* @__PURE__ */ e.jsx(G, { className: "h-4 w-4 opacity-50" })
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
60
|
) }),
|
|
61
61
|
/* @__PURE__ */ e.jsx(L, { className: "w-auto p-0", children: /* @__PURE__ */ e.jsx(
|
|
62
|
-
|
|
62
|
+
B,
|
|
63
63
|
{
|
|
64
64
|
mode: "single",
|
|
65
65
|
selected: s,
|
|
66
|
-
onSelect:
|
|
66
|
+
onSelect: j,
|
|
67
67
|
initialFocus: !0,
|
|
68
|
-
fromDate:
|
|
69
|
-
toDate:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
fromDate: i,
|
|
69
|
+
toDate: a,
|
|
70
|
+
disabled: [
|
|
71
|
+
...i ? [{ before: i }] : [],
|
|
72
|
+
...a ? [{ after: a }] : []
|
|
73
|
+
],
|
|
74
|
+
captionLayout: b,
|
|
75
|
+
fromYear: N,
|
|
76
|
+
toYear: P,
|
|
73
77
|
fromMonth: F,
|
|
74
|
-
toMonth:
|
|
78
|
+
toMonth: k
|
|
75
79
|
}
|
|
76
80
|
) })
|
|
77
81
|
] });
|
|
78
|
-
return
|
|
82
|
+
return l || t || o || n || d ? /* @__PURE__ */ e.jsxs(
|
|
79
83
|
R,
|
|
80
84
|
{
|
|
81
85
|
orientation: g,
|
|
82
|
-
"data-invalid":
|
|
83
|
-
className:
|
|
86
|
+
"data-invalid": c,
|
|
87
|
+
className: u("w-full", f),
|
|
84
88
|
children: [
|
|
85
|
-
(
|
|
89
|
+
(l || n || d) && /* @__PURE__ */ e.jsx(
|
|
86
90
|
H,
|
|
87
91
|
{
|
|
88
92
|
htmlFor: r,
|
|
89
|
-
info:
|
|
90
|
-
requiredIndicator:
|
|
93
|
+
info: n,
|
|
94
|
+
requiredIndicator: d,
|
|
91
95
|
required: y,
|
|
92
|
-
disabled:
|
|
93
|
-
children:
|
|
96
|
+
disabled: m,
|
|
97
|
+
children: l
|
|
94
98
|
}
|
|
95
99
|
),
|
|
96
100
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
97
|
-
|
|
101
|
+
h,
|
|
98
102
|
o && !t && /* @__PURE__ */ e.jsx(T, { id: `${r}-description`, children: o }),
|
|
99
103
|
t && /* @__PURE__ */ e.jsx(z, { id: `${r}-description`, children: t })
|
|
100
104
|
] })
|
|
101
105
|
]
|
|
102
106
|
}
|
|
103
|
-
) :
|
|
107
|
+
) : h;
|
|
104
108
|
}
|
|
105
109
|
export {
|
|
106
110
|
ee as DatePicker
|
package/package.json
CHANGED