innodep-ds 0.0.14 → 0.0.15
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.cjs.js
CHANGED
|
@@ -213,5 +213,5 @@ You can add a description to the \`${mn}\` by passing a \`${gh}\` component as a
|
|
|
213
213
|
|
|
214
214
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${mn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
215
215
|
|
|
216
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},P1=lh,D1=uh,k1=dh,wh=fh,Ch=ph,Sh=yh,Mh=xh,Nh=hh,Rh=vh;const T1=P1,A1=D1,Eh=k1,ci=c.forwardRef(({className:e,...t},n)=>u.jsx(wh,{className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ci.displayName=wh.displayName;const _h=c.forwardRef(({className:e,...t},n)=>u.jsxs(Eh,{children:[u.jsx(ci,{}),u.jsx(Ch,{ref:n,className:T("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));_h.displayName=Ch.displayName;const Ph=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ph.displayName="AlertDialogHeader";const Dh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dh.displayName="AlertDialogFooter";const kh=c.forwardRef(({className:e,...t},n)=>u.jsx(Nh,{ref:n,className:T("text-lg font-semibold",e),...t}));kh.displayName=Nh.displayName;const Th=c.forwardRef(({className:e,...t},n)=>u.jsx(Rh,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Th.displayName=Rh.displayName;const Ah=c.forwardRef(({className:e,...t},n)=>u.jsx(Sh,{ref:n,className:T(tr(),e),...t}));Ah.displayName=Sh.displayName;const Ih=c.forwardRef(({className:e,...t},n)=>u.jsx(Mh,{ref:n,className:T(tr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ih.displayName=Mh.displayName;const jh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("rounded-xl border bg-card text-card-foreground shadow",e),...t}));jh.displayName="Card";const Oh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("flex flex-col space-y-1.5 p-6",e),...t}));Oh.displayName="CardHeader";const $h=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("font-semibold leading-none tracking-tight",e),...t}));$h.displayName="CardTitle";const Lh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Lh.displayName="CardDescription";const Fh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("p-6 pt-0",e),...t}));Fh.displayName="CardContent";const zh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("flex items-center p-6 pt-0",e),...t}));zh.displayName="CardFooter";var zc=1,I1=.9,j1=.8,O1=.17,wa=.1,Ca=.999,$1=.9999,L1=.99,F1=/[\\\/_+.#"@\[\(\{&]/,z1=/[\\\/_+.#"@\[\(\{&]/g,W1=/[\s-]/,Wh=/[\s-]/g;function es(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?zc:L1;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),f=0,p,m,h,y;d>=0;)p=es(e,t,n,r,d+1,a+1,s),p>f&&(d===o?p*=zc:F1.test(e.charAt(d-1))?(p*=j1,h=e.slice(o,d-1).match(z1),h&&o>0&&(p*=Math.pow(Ca,h.length))):W1.test(e.charAt(d-1))?(p*=I1,y=e.slice(o,d-1).match(Wh),y&&o>0&&(p*=Math.pow(Ca,y.length))):(p*=O1,o>0&&(p*=Math.pow(Ca,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=$1)),(p<wa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(m=es(e,t,n,r,d+1,a+2,s),m*wa>p&&(p=m*wa)),p>f&&(f=p),d=n.indexOf(l,d+1);return s[i]=f,f}function Wc(e){return e.toLowerCase().replace(Wh," ")}function B1(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,es(e,t,Wc(e),Wc(t),0,0,{})}var Vn='[cmdk-group=""]',Sa='[cmdk-group-items=""]',V1='[cmdk-group-heading=""]',Bh='[cmdk-item=""]',Bc=`${Bh}:not([aria-disabled="true"])`,ts="cmdk-item-select",un="data-value",Y1=(e,t,n)=>B1(e,t,n),Vh=c.createContext(void 0),xr=()=>c.useContext(Vh),Yh=c.createContext(void 0),li=()=>c.useContext(Yh),Gh=c.createContext(void 0),Hh=c.forwardRef((e,t)=>{let n=dn(()=>{var _,O;return{search:"",value:(O=(_=e.value)!=null?_:e.defaultValue)!=null?O:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=dn(()=>new Set),o=dn(()=>new Map),a=dn(()=>new Map),s=dn(()=>new Set),i=Uh(e),{label:l,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,b=we(),w=we(),S=we(),R=c.useRef(null),E=t_();Xt(()=>{if(f!==void 0){let _=f.trim();n.current.value=_,N.emit()}},[f]),Xt(()=>{E(6,H)},[]);let N=c.useMemo(()=>({subscribe:_=>(s.current.add(_),()=>s.current.delete(_)),snapshot:()=>n.current,setState:(_,O,W)=>{var L,ee,k,Z;if(!Object.is(n.current[_],O)){if(n.current[_]=O,_==="search")J(),X(),E(1,U);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(b))==null||L.focus()}if(E(7,()=>{var K;n.current.selectedItemId=(K=Q())==null?void 0:K.id,N.emit()}),W||E(5,H),((ee=i.current)==null?void 0:ee.value)!==void 0){let K=O??"";(Z=(k=i.current).onValueChange)==null||Z.call(k,K);return}}N.emit()}},emit:()=>{s.current.forEach(_=>_())}}),[]),P=c.useMemo(()=>({value:(_,O,W)=>{var L;O!==((L=a.current.get(_))==null?void 0:L.value)&&(a.current.set(_,{value:O,keywords:W}),n.current.filtered.items.set(_,G(O,W)),E(2,()=>{X(),N.emit()}))},item:(_,O)=>(r.current.add(_),O&&(o.current.has(O)?o.current.get(O).add(_):o.current.set(O,new Set([_]))),E(3,()=>{J(),X(),n.current.value||U(),N.emit()}),()=>{a.current.delete(_),r.current.delete(_),n.current.filtered.items.delete(_);let W=Q();E(4,()=>{J(),(W==null?void 0:W.getAttribute("id"))===_&&U(),N.emit()})}),group:_=>(o.current.has(_)||o.current.set(_,new Set),()=>{a.current.delete(_),o.current.delete(_)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:S,labelId:w,listInnerRef:R}),[]);function G(_,O){var W,L;let ee=(L=(W=i.current)==null?void 0:W.filter)!=null?L:Y1;return _?ee(_,n.current.search,O):0}function X(){if(!n.current.search||i.current.shouldFilter===!1)return;let _=n.current.filtered.items,O=[];n.current.filtered.groups.forEach(L=>{let ee=o.current.get(L),k=0;ee.forEach(Z=>{let K=_.get(Z);k=Math.max(K,k)}),O.push([L,k])});let W=R.current;q().sort((L,ee)=>{var k,Z;let K=L.getAttribute("id"),re=ee.getAttribute("id");return((k=_.get(re))!=null?k:0)-((Z=_.get(K))!=null?Z:0)}).forEach(L=>{let ee=L.closest(Sa);ee?ee.appendChild(L.parentElement===ee?L:L.closest(`${Sa} > *`)):W.appendChild(L.parentElement===W?L:L.closest(`${Sa} > *`))}),O.sort((L,ee)=>ee[1]-L[1]).forEach(L=>{var ee;let k=(ee=R.current)==null?void 0:ee.querySelector(`${Vn}[${un}="${encodeURIComponent(L[0])}"]`);k==null||k.parentElement.appendChild(k)})}function U(){let _=q().find(W=>W.getAttribute("aria-disabled")!=="true"),O=_==null?void 0:_.getAttribute(un);N.setState("value",O||void 0)}function J(){var _,O,W,L;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let k of r.current){let Z=(O=(_=a.current.get(k))==null?void 0:_.value)!=null?O:"",K=(L=(W=a.current.get(k))==null?void 0:W.keywords)!=null?L:[],re=G(Z,K);n.current.filtered.items.set(k,re),re>0&&ee++}for(let[k,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(k);break}n.current.filtered.count=ee}function H(){var _,O,W;let L=Q();L&&(((_=L.parentElement)==null?void 0:_.firstChild)===L&&((W=(O=L.closest(Vn))==null?void 0:O.querySelector(V1))==null||W.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function Q(){var _;return(_=R.current)==null?void 0:_.querySelector(`${Bh}[aria-selected="true"]`)}function q(){var _;return Array.from(((_=R.current)==null?void 0:_.querySelectorAll(Bc))||[])}function F(_){let O=q()[_];O&&N.setState("value",O.getAttribute(un))}function D(_){var O;let W=Q(),L=q(),ee=L.findIndex(Z=>Z===W),k=L[ee+_];(O=i.current)!=null&&O.loop&&(k=ee+_<0?L[L.length-1]:ee+_===L.length?L[0]:L[ee+_]),k&&N.setState("value",k.getAttribute(un))}function M(_){let O=Q(),W=O==null?void 0:O.closest(Vn),L;for(;W&&!L;)W=_>0?J1(W,Vn):e_(W,Vn),L=W==null?void 0:W.querySelector(Bc);L?N.setState("value",L.getAttribute(un)):D(_)}let I=()=>F(q().length-1),ne=_=>{_.preventDefault(),_.metaKey?I():_.altKey?M(1):D(1)},ie=_=>{_.preventDefault(),_.metaKey?F(0):_.altKey?M(-1):D(-1)};return c.createElement($.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:_=>{var O;(O=x.onKeyDown)==null||O.call(x,_);let W=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||W))switch(_.key){case"n":case"j":{v&&_.ctrlKey&&ne(_);break}case"ArrowDown":{ne(_);break}case"p":case"k":{v&&_.ctrlKey&&ie(_);break}case"ArrowUp":{ie(_);break}case"Home":{_.preventDefault(),F(0);break}case"End":{_.preventDefault(),I();break}case"Enter":{_.preventDefault();let L=Q();if(L){let ee=new Event(ts);L.dispatchEvent(ee)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:r_},l),Vo(e,_=>c.createElement(Yh.Provider,{value:N},c.createElement(Vh.Provider,{value:P},_))))}),G1=c.forwardRef((e,t)=>{var n,r;let o=we(),a=c.useRef(null),s=c.useContext(Gh),i=xr(),l=Uh(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Xt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Kh(o,a,[e.value,e.children,a],e.keywords),p=li(),m=Et(E=>E.value&&E.value===f.current),h=Et(E=>d||i.filter()===!1?!0:E.search?E.filtered.items.get(o)>0:!0);c.useEffect(()=>{let E=a.current;if(!(!E||e.disabled))return E.addEventListener(ts,y),()=>E.removeEventListener(ts,y)},[h,e.onSelect,e.disabled]);function y(){var E,N;g(),(N=(E=l.current).onSelect)==null||N.call(E,f.current)}function g(){p.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:x,onSelect:b,forceMount:w,keywords:S,...R}=e;return c.createElement($.div,{ref:Mt(a,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!m,"data-disabled":!!v,"data-selected":!!m,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),H1=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=we(),i=c.useRef(null),l=c.useRef(null),d=we(),f=xr(),p=Et(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);Xt(()=>f.group(s),[]),Kh(s,i,[e.value,e.heading,l]);let m=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement($.div,{ref:Mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&c.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Vo(e,h=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},c.createElement(Gh.Provider,{value:m},h))))}),U1=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=Et(s=>!s.search);return!n&&!a?null:c.createElement($.div,{ref:Mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),K1=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=li(),s=Et(d=>d.search),i=Et(d=>d.selectedItemId),l=xr();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement($.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),q1=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=c.useRef(null),s=c.useRef(null),i=Et(d=>d.selectedItemId),l=xr();return c.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let h=d.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(d),()=>{cancelAnimationFrame(p),m.unobserve(d)}}},[]),c.createElement($.div,{ref:Mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},Vo(e,d=>c.createElement("div",{ref:Mt(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),X1=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return c.createElement(Wo,{open:n,onOpenChange:r},c.createElement(Bo,{container:s},c.createElement(jn,{"cmdk-overlay":"",className:o}),c.createElement(On,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(Hh,{ref:t,...i}))))}),Q1=c.forwardRef((e,t)=>Et(n=>n.filtered.count===0)?c.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Z1=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return c.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Vo(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),ze=Object.assign(Hh,{List:q1,Item:G1,Input:K1,Group:H1,Separator:U1,Dialog:X1,Empty:Q1,Loading:Z1});function J1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function e_(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Uh(e){let t=c.useRef(e);return Xt(()=>{t.current=e}),t}var Xt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function dn(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function Et(e){let t=li(),n=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,n,n)}function Kh(e,t,n,r=[]){let o=c.useRef(),a=xr();return Xt(()=>{var s;let i=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(un,i),o.current=i}),o}var t_=()=>{let[e,t]=c.useState(),n=dn(()=>new Map);return Xt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function n_(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Vo({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(n_(t),{ref:t.ref},n(t.props.children)):n(t)}var r_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qh=Wo,o_=ii,Xh=Bo,a_=$n,ui=c.forwardRef(({className:e,...t},n)=>u.jsx(jn,{ref:n,className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ui.displayName=jn.displayName;const di=c.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Xh,{children:[u.jsx(ui,{}),u.jsxs(On,{ref:r,className:T("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,u.jsxs($n,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(is,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));di.displayName=On.displayName;const Qh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qh.displayName="DialogHeader";const Zh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zh.displayName="DialogFooter";const Jh=c.forwardRef(({className:e,...t},n)=>u.jsx(yr,{ref:n,className:T("text-lg font-semibold leading-none tracking-tight",e),...t}));Jh.displayName=yr.displayName;const eg=c.forwardRef(({className:e,...t},n)=>u.jsx(br,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));eg.displayName=br.displayName;const fi=c.forwardRef(({className:e,...t},n)=>u.jsx(ze,{ref:n,className:T("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));fi.displayName=ze.displayName;const s_=({children:e,...t})=>u.jsx(qh,{...t,children:u.jsx(di,{className:"overflow-hidden p-0",children:u.jsx(fi,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),tg=c.forwardRef(({className:e,...t},n)=>u.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[u.jsx(qy,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),u.jsx(ze.Input,{ref:n,className:T("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));tg.displayName=ze.Input.displayName;const ng=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.List,{ref:n,className:T("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ng.displayName=ze.List.displayName;const rg=c.forwardRef((e,t)=>u.jsx(ze.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));rg.displayName=ze.Empty.displayName;const og=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Group,{ref:n,className:T("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));og.displayName=ze.Group.displayName;const ag=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Separator,{ref:n,className:T("-mx-1 h-px bg-border",e),...t}));ag.displayName=ze.Separator.displayName;const sg=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Item,{ref:n,className:T("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));sg.displayName=ze.Item.displayName;const ig=({className:e,...t})=>u.jsx("span",{className:T("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ig.displayName="CommandShortcut";var pi="ContextMenu",[i_,SP]=Me(pi,[So]),Te=So(),[c_,cg]=i_(pi),lg=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[s,i]=c.useState(!1),l=Te(t),d=He(r),f=c.useCallback(p=>{i(p),d(p)},[d]);return u.jsx(c_,{scope:t,open:s,onOpenChange:f,modal:a,children:u.jsx(Wu,{...l,dir:o,open:s,onOpenChange:f,modal:a,children:n})})};lg.displayName=pi;var ug="ContextMenuTrigger",dg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=cg(ug,n),s=Te(n),i=c.useRef({x:0,y:0}),l=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),d=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(d.current),[]),p=m=>{i.current={x:m.clientX,y:m.clientY},a.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),u.jsxs(u.Fragment,{children:[u.jsx(Bu,{...s,virtualRef:l}),u.jsx($.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,m=>{f(),p(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,Or(m=>{f(),d.current=window.setTimeout(()=>p(m),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,Or(f)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,Or(f)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,Or(f))})]})});dg.displayName=ug;var l_="ContextMenuPortal",fg=e=>{const{__scopeContextMenu:t,...n}=e,r=Te(t);return u.jsx(Vu,{...r,...n})};fg.displayName=l_;var pg="ContextMenuContent",mg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=cg(pg,n),a=Te(n),s=c.useRef(!1);return u.jsx(Yu,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var l;(l=e.onCloseAutoFocus)==null||l.call(e,i),!i.defaultPrevented&&s.current&&i.preventDefault(),s.current=!1},onInteractOutside:i=>{var l;(l=e.onInteractOutside)==null||l.call(e,i),!i.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mg.displayName=pg;var u_="ContextMenuGroup",hg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Gu,{...o,...r,ref:t})});hg.displayName=u_;var d_="ContextMenuLabel",gg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Hu,{...o,...r,ref:t})});gg.displayName=d_;var f_="ContextMenuItem",vg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Uu,{...o,...r,ref:t})});vg.displayName=f_;var p_="ContextMenuCheckboxItem",yg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Ku,{...o,...r,ref:t})});yg.displayName=p_;var m_="ContextMenuRadioGroup",bg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(qu,{...o,...r,ref:t})});bg.displayName=m_;var h_="ContextMenuRadioItem",xg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Xu,{...o,...r,ref:t})});xg.displayName=h_;var g_="ContextMenuItemIndicator",wg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Qu,{...o,...r,ref:t})});wg.displayName=g_;var v_="ContextMenuSeparator",Cg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Zu,{...o,...r,ref:t})});Cg.displayName=v_;var y_="ContextMenuArrow",b_=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Ju,{...o,...r,ref:t})});b_.displayName=y_;var Sg="ContextMenuSub",Mg=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,s=Te(t),[i,l]=_e({prop:o,defaultProp:a??!1,onChange:r,caller:Sg});return u.jsx(ed,{...s,open:i,onOpenChange:l,children:n})};Mg.displayName=Sg;var x_="ContextMenuSubTrigger",Ng=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(td,{...o,...r,ref:t})});Ng.displayName=x_;var w_="ContextMenuSubContent",Rg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(nd,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rg.displayName=w_;function Or(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var C_=lg,S_=dg,Eg=fg,_g=mg,M_=hg,Pg=gg,Dg=vg,kg=yg,N_=bg,Tg=xg,Ag=wg,Ig=Cg,R_=Mg,jg=Ng,Og=Rg;const E_=C_,__=S_,P_=M_,D_=Eg,k_=R_,T_=N_,$g=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>u.jsxs(jg,{ref:o,className:T("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,u.jsx(as,{className:"ml-auto h-4 w-4"})]}));$g.displayName=jg.displayName;const Lg=c.forwardRef(({className:e,...t},n)=>u.jsx(Og,{ref:n,className:T("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));Lg.displayName=Og.displayName;const Fg=c.forwardRef(({className:e,...t},n)=>u.jsx(Eg,{children:u.jsx(_g,{ref:n,className:T("z-50 min-w-[8rem] overflow-hidden rounded-md 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",e),...t})}));Fg.displayName=_g.displayName;const zg=c.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(Dg,{ref:r,className:T("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));zg.displayName=Dg.displayName;const Wg=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>u.jsxs(kg,{ref:o,className:T("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ag,{children:u.jsx(Kn,{className:"h-4 w-4"})})}),t]}));Wg.displayName=kg.displayName;const Bg=c.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Tg,{ref:r,className:T("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ag,{children:u.jsx(ss,{className:"h-4 w-4 fill-current"})})}),t]}));Bg.displayName=Tg.displayName;const Vg=c.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(Pg,{ref:r,className:T("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Vg.displayName=Pg.displayName;const Yg=c.forwardRef(({className:e,...t},n)=>u.jsx(Ig,{ref:n,className:T("-mx-1 my-1 h-px bg-border",e),...t}));Yg.displayName=Ig.displayName;const Gg=({className:e,...t})=>u.jsx("span",{className:T("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Gg.displayName="ContextMenuShortcut";const A_=Wo,I_=ii,j_=$n,Hg=Bo,mi=c.forwardRef(({className:e,...t},n)=>u.jsx(jn,{className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));mi.displayName=jn.displayName;const O_=Qt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ug=c.forwardRef(({side:e="right",className:t,children:n,...r},o)=>u.jsxs(Hg,{children:[u.jsx(mi,{}),u.jsxs(On,{ref:o,className:T(O_({side:e}),t),...r,children:[u.jsxs($n,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(is,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));Ug.displayName=On.displayName;const Kg=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kg.displayName="SheetHeader";const qg=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qg.displayName="SheetFooter";const Xg=c.forwardRef(({className:e,...t},n)=>u.jsx(yr,{ref:n,className:T("text-lg font-semibold text-foreground",e),...t}));Xg.displayName=yr.displayName;const Qg=c.forwardRef(({className:e,...t},n)=>u.jsx(br,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Qg.displayName=br.displayName;var Yo="Tabs",[$_,MP]=Me(Yo,[Dt]),Zg=Dt(),[L_,hi]=$_(Yo),Jg=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,f=Jt(i),[p,m]=_e({prop:r,onChange:o,defaultProp:a??"",caller:Yo});return u.jsx(L_,{scope:n,baseId:we(),value:p,onValueChange:m,orientation:s,dir:f,activationMode:l,children:u.jsx($.div,{dir:f,"data-orientation":s,...d,ref:t})})});Jg.displayName=Yo;var ev="TabsList",tv=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=hi(ev,n),s=Zg(n);return u.jsx(bo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx($.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});tv.displayName=ev;var nv="TabsTrigger",rv=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=hi(nv,n),i=Zg(n),l=sv(s.baseId,r),d=iv(s.baseId,r),f=r===s.value;return u.jsx(xo,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx($.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});rv.displayName=nv;var ov="TabsContent",av=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=hi(ov,n),l=sv(i.baseId,r),d=iv(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const m=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(m)},[]),u.jsx(De,{present:o||f,children:({present:m})=>u.jsx($.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:m&&a})})});av.displayName=ov;function sv(e,t){return`${e}-trigger-${t}`}function iv(e,t){return`${e}-content-${t}`}var F_=Jg,cv=tv,lv=rv,uv=av;const z_=F_,dv=c.forwardRef(({className:e,...t},n)=>u.jsx(cv,{ref:n,className:T("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",e),...t}));dv.displayName=cv.displayName;const fv=c.forwardRef(({className:e,...t},n)=>u.jsx(lv,{ref:n,className:T("inline-flex items-center justify-center border-b-2 border-[#37383C] text-[var(--label-normal)] whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:border-b-2 data-[state=active]:!border-primary data-[state=active]:!text-primary",e),...t}));fv.displayName=lv.displayName;const pv=c.forwardRef(({className:e,...t},n)=>u.jsx(uv,{ref:n,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-[var(--label-normal)]",e),...t}));pv.displayName=uv.displayName;var W_=Symbol("radix.slottable");function B_(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=W_,t}var[Go,NP]=Me("Tooltip",[Pt]),Ho=Pt(),mv="TooltipProvider",V_=700,ns="tooltip.open",[Y_,gi]=Go(mv),hv=e=>{const{__scopeTooltip:t,delayDuration:n=V_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=c.useRef(!0),i=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(Y_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:c.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};hv.displayName=mv;var er="Tooltip",[G_,wr]=Go(er),gv=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=gi(er,e.__scopeTooltip),d=Ho(t),[f,p]=c.useState(null),m=we(),h=c.useRef(0),y=s??l.disableHoverableContent,g=i??l.delayDuration,v=c.useRef(!1),[x,b]=_e({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(ns))):l.onClose(),a==null||a(N)},caller:er}),w=c.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),R=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},g)},[g,b]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(ur,{...d,children:u.jsx(G_,{scope:t,contentId:m,open:x,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:c.useCallback(()=>{y?R():(window.clearTimeout(h.current),h.current=0)},[R,y]),onOpen:S,onClose:R,disableHoverableContent:y,children:n})})};gv.displayName=er;var rs="TooltipTrigger",vv=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wr(rs,n),a=gi(rs,n),s=Ho(n),i=c.useRef(null),l=te(t,i,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(dr,{asChild:!0,...s,children:u.jsx($.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:j(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});vv.displayName=rs;var vi="TooltipPortal",[H_,U_]=Go(vi,{forceMount:void 0}),yv=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=wr(vi,t);return u.jsx(H_,{scope:t,forceMount:n,children:u.jsx(De,{present:n||a.open,children:u.jsx(Dn,{asChild:!0,container:o,children:r})})})};yv.displayName=vi;var Sn="TooltipContent",bv=c.forwardRef((e,t)=>{const n=U_(Sn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=wr(Sn,e.__scopeTooltip);return u.jsx(De,{present:r||s.open,children:s.disableHoverableContent?u.jsx(xv,{side:o,...a,ref:t}):u.jsx(K_,{side:o,...a,ref:t})})}),K_=c.forwardRef((e,t)=>{const n=wr(Sn,e.__scopeTooltip),r=gi(Sn,e.__scopeTooltip),o=c.useRef(null),a=te(t,o),[s,i]=c.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,m=c.useCallback(()=>{i(null),p(!1)},[p]),h=c.useCallback((y,g)=>{const v=y.currentTarget,x={x:y.clientX,y:y.clientY},b=J_(x,v.getBoundingClientRect()),w=eP(x,b),S=tP(g.getBoundingClientRect()),R=rP([...w,...S]);i(R),p(!0)},[p]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&f){const y=v=>h(v,f),g=v=>h(v,l);return l.addEventListener("pointerleave",y),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",g)}}},[l,f,h,m]),c.useEffect(()=>{if(s){const y=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),w=!nP(x,s);b?m():w&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,f,s,d,m]),u.jsx(xv,{...e,ref:a})}),[q_,X_]=Go(er,{isInside:!1}),Q_=B_("TooltipContent"),xv=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=wr(Sn,n),d=Ho(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(ns,f),()=>document.removeEventListener(ns,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),u.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:u.jsxs(vo,{"data-state":l.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Q_,{children:r}),u.jsx(q_,{scope:n,isInside:!0,children:u.jsx(qM,{id:l.contentId,role:"tooltip",children:o||r})})]})})});bv.displayName=Sn;var wv="TooltipArrow",Z_=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ho(n);return X_(wv,n).isInside?null:u.jsx(yo,{...o,...r,ref:t})});Z_.displayName=wv;function J_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function eP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function nP(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,p=l.x,m=l.y;f>r!=m>r&&n<(p-d)*(r-f)/(m-f)+d&&(o=!o)}return o}function rP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),oP(t)}function oP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aP=hv,sP=gv,iP=vv,cP=yv,Cv=bv;const lP=aP,uP=sP,dP=iP,Sv=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(cP,{children:u.jsx(Cv,{ref:r,sideOffset:t,className:T("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...n})}));Sv.displayName=Cv.displayName;exports.Alert=Bm;exports.AlertDescription=Ym;exports.AlertDialog=T1;exports.AlertDialogAction=Ah;exports.AlertDialogCancel=Ih;exports.AlertDialogContent=_h;exports.AlertDialogDescription=Th;exports.AlertDialogFooter=Dh;exports.AlertDialogHeader=Ph;exports.AlertDialogOverlay=ci;exports.AlertDialogPortal=Eh;exports.AlertDialogTitle=kh;exports.AlertDialogTrigger=A1;exports.AlertTitle=Vm;exports.Badge=qN;exports.Button=rl;exports.Calendar=Nl;exports.Card=jh;exports.CardContent=Fh;exports.CardDescription=Lh;exports.CardFooter=zh;exports.CardHeader=Oh;exports.CardTitle=$h;exports.Checkbox=Il;exports.Chip=QN;exports.Collapsible=nR;exports.CollapsibleContent=oR;exports.CollapsibleTrigger=rR;exports.Command=fi;exports.CommandDialog=s_;exports.CommandEmpty=rg;exports.CommandGroup=og;exports.CommandInput=tg;exports.CommandItem=sg;exports.CommandList=ng;exports.CommandSeparator=ag;exports.CommandShortcut=ig;exports.ContextMenu=E_;exports.ContextMenuCheckboxItem=Wg;exports.ContextMenuContent=Fg;exports.ContextMenuGroup=P_;exports.ContextMenuItem=zg;exports.ContextMenuLabel=Vg;exports.ContextMenuPortal=D_;exports.ContextMenuRadioGroup=T_;exports.ContextMenuRadioItem=Bg;exports.ContextMenuSeparator=Yg;exports.ContextMenuShortcut=Gg;exports.ContextMenuSub=k_;exports.ContextMenuSubContent=Lg;exports.ContextMenuSubTrigger=$g;exports.ContextMenuTrigger=__;exports.Dialog=qh;exports.DialogClose=a_;exports.DialogContent=di;exports.DialogDescription=eg;exports.DialogFooter=Zh;exports.DialogHeader=Qh;exports.DialogOverlay=ui;exports.DialogPortal=Xh;exports.DialogTitle=Jh;exports.DialogTrigger=o_;exports.DropdownMenu=RM;exports.DropdownMenuCheckboxItem=Id;exports.DropdownMenuContent=Td;exports.DropdownMenuGroup=_M;exports.DropdownMenuItem=Ad;exports.DropdownMenuLabel=Od;exports.DropdownMenuPortal=PM;exports.DropdownMenuRadioGroup=kM;exports.DropdownMenuRadioItem=jd;exports.DropdownMenuSeparator=$d;exports.DropdownMenuShortcut=Ld;exports.DropdownMenuSub=DM;exports.DropdownMenuSubContent=kd;exports.DropdownMenuSubTrigger=Dd;exports.DropdownMenuTrigger=EM;exports.Input=Fd;exports.Label=Sp;exports.Popover=RR;exports.PopoverAnchor=_R;exports.PopoverClose=PR;exports.PopoverContent=$p;exports.PopoverTrigger=ER;exports.Progress=Vp;exports.RadioGroup=ef;exports.RadioGroupItem=tf;exports.Select=SN;exports.SelectContent=Bf;exports.SelectGroup=MN;exports.SelectItem=Yf;exports.SelectLabel=Vf;exports.SelectScrollDownButton=Bs;exports.SelectScrollUpButton=Ws;exports.SelectSeparator=Gf;exports.SelectTrigger=Wf;exports.SelectValue=NN;exports.Separator=Hp;exports.Sheet=A_;exports.SheetClose=j_;exports.SheetContent=Ug;exports.SheetDescription=Qg;exports.SheetFooter=qg;exports.SheetHeader=Kg;exports.SheetOverlay=mi;exports.SheetPortal=Hg;exports.SheetTitle=Xg;exports.SheetTrigger=I_;exports.Skeleton=zR;exports.Slider=ip;exports.Spinner=KE;exports.Switch=mp;exports.Table=xm;exports.TableBody=Cm;exports.TableCaption=Em;exports.TableCell=Rm;exports.TableFooter=Sm;exports.TableHead=Nm;exports.TableHeader=wm;exports.TableRow=Mm;exports.Tabs=z_;exports.TabsContent=pv;exports.TabsList=dv;exports.TabsTrigger=fv;exports.Textarea=hp;exports.Toggle=Dm;exports.ToggleGroup=zm;exports.ToggleGroupItem=Wm;exports.Tooltip=uP;exports.TooltipContent=Sv;exports.TooltipProvider=lP;exports.TooltipTrigger=dP;exports.badgeVariants=gp;exports.buttonVariants=tr;exports.toggleVariants=ni;
|
|
216
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},P1=lh,D1=uh,k1=dh,wh=fh,Ch=ph,Sh=yh,Mh=xh,Nh=hh,Rh=vh;const T1=P1,A1=D1,Eh=k1,ci=c.forwardRef(({className:e,...t},n)=>u.jsx(wh,{className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ci.displayName=wh.displayName;const _h=c.forwardRef(({className:e,...t},n)=>u.jsxs(Eh,{children:[u.jsx(ci,{}),u.jsx(Ch,{ref:n,className:T("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));_h.displayName=Ch.displayName;const Ph=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ph.displayName="AlertDialogHeader";const Dh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dh.displayName="AlertDialogFooter";const kh=c.forwardRef(({className:e,...t},n)=>u.jsx(Nh,{ref:n,className:T("text-lg font-semibold",e),...t}));kh.displayName=Nh.displayName;const Th=c.forwardRef(({className:e,...t},n)=>u.jsx(Rh,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Th.displayName=Rh.displayName;const Ah=c.forwardRef(({className:e,...t},n)=>u.jsx(Sh,{ref:n,className:T(tr(),e),...t}));Ah.displayName=Sh.displayName;const Ih=c.forwardRef(({className:e,...t},n)=>u.jsx(Mh,{ref:n,className:T(tr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ih.displayName=Mh.displayName;const jh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("rounded-xl border bg-card text-card-foreground shadow",e),...t}));jh.displayName="Card";const Oh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("flex flex-col space-y-1.5 p-6",e),...t}));Oh.displayName="CardHeader";const $h=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("font-semibold leading-none tracking-tight",e),...t}));$h.displayName="CardTitle";const Lh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Lh.displayName="CardDescription";const Fh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("p-6 pt-0",e),...t}));Fh.displayName="CardContent";const zh=c.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:T("flex items-center p-6 pt-0",e),...t}));zh.displayName="CardFooter";var zc=1,I1=.9,j1=.8,O1=.17,wa=.1,Ca=.999,$1=.9999,L1=.99,F1=/[\\\/_+.#"@\[\(\{&]/,z1=/[\\\/_+.#"@\[\(\{&]/g,W1=/[\s-]/,Wh=/[\s-]/g;function es(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?zc:L1;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),f=0,p,m,h,y;d>=0;)p=es(e,t,n,r,d+1,a+1,s),p>f&&(d===o?p*=zc:F1.test(e.charAt(d-1))?(p*=j1,h=e.slice(o,d-1).match(z1),h&&o>0&&(p*=Math.pow(Ca,h.length))):W1.test(e.charAt(d-1))?(p*=I1,y=e.slice(o,d-1).match(Wh),y&&o>0&&(p*=Math.pow(Ca,y.length))):(p*=O1,o>0&&(p*=Math.pow(Ca,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=$1)),(p<wa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(m=es(e,t,n,r,d+1,a+2,s),m*wa>p&&(p=m*wa)),p>f&&(f=p),d=n.indexOf(l,d+1);return s[i]=f,f}function Wc(e){return e.toLowerCase().replace(Wh," ")}function B1(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,es(e,t,Wc(e),Wc(t),0,0,{})}var Vn='[cmdk-group=""]',Sa='[cmdk-group-items=""]',V1='[cmdk-group-heading=""]',Bh='[cmdk-item=""]',Bc=`${Bh}:not([aria-disabled="true"])`,ts="cmdk-item-select",un="data-value",Y1=(e,t,n)=>B1(e,t,n),Vh=c.createContext(void 0),xr=()=>c.useContext(Vh),Yh=c.createContext(void 0),li=()=>c.useContext(Yh),Gh=c.createContext(void 0),Hh=c.forwardRef((e,t)=>{let n=dn(()=>{var _,O;return{search:"",value:(O=(_=e.value)!=null?_:e.defaultValue)!=null?O:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=dn(()=>new Set),o=dn(()=>new Map),a=dn(()=>new Map),s=dn(()=>new Set),i=Uh(e),{label:l,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,b=we(),w=we(),S=we(),R=c.useRef(null),E=t_();Xt(()=>{if(f!==void 0){let _=f.trim();n.current.value=_,N.emit()}},[f]),Xt(()=>{E(6,H)},[]);let N=c.useMemo(()=>({subscribe:_=>(s.current.add(_),()=>s.current.delete(_)),snapshot:()=>n.current,setState:(_,O,W)=>{var L,ee,k,Z;if(!Object.is(n.current[_],O)){if(n.current[_]=O,_==="search")J(),X(),E(1,U);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(b))==null||L.focus()}if(E(7,()=>{var K;n.current.selectedItemId=(K=Q())==null?void 0:K.id,N.emit()}),W||E(5,H),((ee=i.current)==null?void 0:ee.value)!==void 0){let K=O??"";(Z=(k=i.current).onValueChange)==null||Z.call(k,K);return}}N.emit()}},emit:()=>{s.current.forEach(_=>_())}}),[]),P=c.useMemo(()=>({value:(_,O,W)=>{var L;O!==((L=a.current.get(_))==null?void 0:L.value)&&(a.current.set(_,{value:O,keywords:W}),n.current.filtered.items.set(_,G(O,W)),E(2,()=>{X(),N.emit()}))},item:(_,O)=>(r.current.add(_),O&&(o.current.has(O)?o.current.get(O).add(_):o.current.set(O,new Set([_]))),E(3,()=>{J(),X(),n.current.value||U(),N.emit()}),()=>{a.current.delete(_),r.current.delete(_),n.current.filtered.items.delete(_);let W=Q();E(4,()=>{J(),(W==null?void 0:W.getAttribute("id"))===_&&U(),N.emit()})}),group:_=>(o.current.has(_)||o.current.set(_,new Set),()=>{a.current.delete(_),o.current.delete(_)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:S,labelId:w,listInnerRef:R}),[]);function G(_,O){var W,L;let ee=(L=(W=i.current)==null?void 0:W.filter)!=null?L:Y1;return _?ee(_,n.current.search,O):0}function X(){if(!n.current.search||i.current.shouldFilter===!1)return;let _=n.current.filtered.items,O=[];n.current.filtered.groups.forEach(L=>{let ee=o.current.get(L),k=0;ee.forEach(Z=>{let K=_.get(Z);k=Math.max(K,k)}),O.push([L,k])});let W=R.current;q().sort((L,ee)=>{var k,Z;let K=L.getAttribute("id"),re=ee.getAttribute("id");return((k=_.get(re))!=null?k:0)-((Z=_.get(K))!=null?Z:0)}).forEach(L=>{let ee=L.closest(Sa);ee?ee.appendChild(L.parentElement===ee?L:L.closest(`${Sa} > *`)):W.appendChild(L.parentElement===W?L:L.closest(`${Sa} > *`))}),O.sort((L,ee)=>ee[1]-L[1]).forEach(L=>{var ee;let k=(ee=R.current)==null?void 0:ee.querySelector(`${Vn}[${un}="${encodeURIComponent(L[0])}"]`);k==null||k.parentElement.appendChild(k)})}function U(){let _=q().find(W=>W.getAttribute("aria-disabled")!=="true"),O=_==null?void 0:_.getAttribute(un);N.setState("value",O||void 0)}function J(){var _,O,W,L;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let k of r.current){let Z=(O=(_=a.current.get(k))==null?void 0:_.value)!=null?O:"",K=(L=(W=a.current.get(k))==null?void 0:W.keywords)!=null?L:[],re=G(Z,K);n.current.filtered.items.set(k,re),re>0&&ee++}for(let[k,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(k);break}n.current.filtered.count=ee}function H(){var _,O,W;let L=Q();L&&(((_=L.parentElement)==null?void 0:_.firstChild)===L&&((W=(O=L.closest(Vn))==null?void 0:O.querySelector(V1))==null||W.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function Q(){var _;return(_=R.current)==null?void 0:_.querySelector(`${Bh}[aria-selected="true"]`)}function q(){var _;return Array.from(((_=R.current)==null?void 0:_.querySelectorAll(Bc))||[])}function F(_){let O=q()[_];O&&N.setState("value",O.getAttribute(un))}function D(_){var O;let W=Q(),L=q(),ee=L.findIndex(Z=>Z===W),k=L[ee+_];(O=i.current)!=null&&O.loop&&(k=ee+_<0?L[L.length-1]:ee+_===L.length?L[0]:L[ee+_]),k&&N.setState("value",k.getAttribute(un))}function M(_){let O=Q(),W=O==null?void 0:O.closest(Vn),L;for(;W&&!L;)W=_>0?J1(W,Vn):e_(W,Vn),L=W==null?void 0:W.querySelector(Bc);L?N.setState("value",L.getAttribute(un)):D(_)}let I=()=>F(q().length-1),ne=_=>{_.preventDefault(),_.metaKey?I():_.altKey?M(1):D(1)},ie=_=>{_.preventDefault(),_.metaKey?F(0):_.altKey?M(-1):D(-1)};return c.createElement($.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:_=>{var O;(O=x.onKeyDown)==null||O.call(x,_);let W=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||W))switch(_.key){case"n":case"j":{v&&_.ctrlKey&&ne(_);break}case"ArrowDown":{ne(_);break}case"p":case"k":{v&&_.ctrlKey&&ie(_);break}case"ArrowUp":{ie(_);break}case"Home":{_.preventDefault(),F(0);break}case"End":{_.preventDefault(),I();break}case"Enter":{_.preventDefault();let L=Q();if(L){let ee=new Event(ts);L.dispatchEvent(ee)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:r_},l),Vo(e,_=>c.createElement(Yh.Provider,{value:N},c.createElement(Vh.Provider,{value:P},_))))}),G1=c.forwardRef((e,t)=>{var n,r;let o=we(),a=c.useRef(null),s=c.useContext(Gh),i=xr(),l=Uh(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Xt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Kh(o,a,[e.value,e.children,a],e.keywords),p=li(),m=Et(E=>E.value&&E.value===f.current),h=Et(E=>d||i.filter()===!1?!0:E.search?E.filtered.items.get(o)>0:!0);c.useEffect(()=>{let E=a.current;if(!(!E||e.disabled))return E.addEventListener(ts,y),()=>E.removeEventListener(ts,y)},[h,e.onSelect,e.disabled]);function y(){var E,N;g(),(N=(E=l.current).onSelect)==null||N.call(E,f.current)}function g(){p.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:x,onSelect:b,forceMount:w,keywords:S,...R}=e;return c.createElement($.div,{ref:Mt(a,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!m,"data-disabled":!!v,"data-selected":!!m,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),H1=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=we(),i=c.useRef(null),l=c.useRef(null),d=we(),f=xr(),p=Et(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);Xt(()=>f.group(s),[]),Kh(s,i,[e.value,e.heading,l]);let m=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement($.div,{ref:Mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&c.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Vo(e,h=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},c.createElement(Gh.Provider,{value:m},h))))}),U1=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=Et(s=>!s.search);return!n&&!a?null:c.createElement($.div,{ref:Mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),K1=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=li(),s=Et(d=>d.search),i=Et(d=>d.selectedItemId),l=xr();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement($.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),q1=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=c.useRef(null),s=c.useRef(null),i=Et(d=>d.selectedItemId),l=xr();return c.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let h=d.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(d),()=>{cancelAnimationFrame(p),m.unobserve(d)}}},[]),c.createElement($.div,{ref:Mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},Vo(e,d=>c.createElement("div",{ref:Mt(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),X1=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return c.createElement(Wo,{open:n,onOpenChange:r},c.createElement(Bo,{container:s},c.createElement(jn,{"cmdk-overlay":"",className:o}),c.createElement(On,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(Hh,{ref:t,...i}))))}),Q1=c.forwardRef((e,t)=>Et(n=>n.filtered.count===0)?c.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Z1=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return c.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Vo(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),ze=Object.assign(Hh,{List:q1,Item:G1,Input:K1,Group:H1,Separator:U1,Dialog:X1,Empty:Q1,Loading:Z1});function J1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function e_(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Uh(e){let t=c.useRef(e);return Xt(()=>{t.current=e}),t}var Xt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function dn(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function Et(e){let t=li(),n=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,n,n)}function Kh(e,t,n,r=[]){let o=c.useRef(),a=xr();return Xt(()=>{var s;let i=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(un,i),o.current=i}),o}var t_=()=>{let[e,t]=c.useState(),n=dn(()=>new Map);return Xt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function n_(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Vo({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(n_(t),{ref:t.ref},n(t.props.children)):n(t)}var r_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qh=Wo,o_=ii,Xh=Bo,a_=$n,ui=c.forwardRef(({className:e,...t},n)=>u.jsx(jn,{ref:n,className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ui.displayName=jn.displayName;const di=c.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Xh,{children:[u.jsx(ui,{}),u.jsxs(On,{ref:r,className:T("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,u.jsxs($n,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(is,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));di.displayName=On.displayName;const Qh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qh.displayName="DialogHeader";const Zh=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zh.displayName="DialogFooter";const Jh=c.forwardRef(({className:e,...t},n)=>u.jsx(yr,{ref:n,className:T("text-lg font-semibold leading-none tracking-tight",e),...t}));Jh.displayName=yr.displayName;const eg=c.forwardRef(({className:e,...t},n)=>u.jsx(br,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));eg.displayName=br.displayName;const fi=c.forwardRef(({className:e,...t},n)=>u.jsx(ze,{ref:n,className:T("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));fi.displayName=ze.displayName;const s_=({children:e,...t})=>u.jsx(qh,{...t,children:u.jsx(di,{className:"overflow-hidden p-0",children:u.jsx(fi,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),tg=c.forwardRef(({className:e,icon:t=!0,...n},r)=>u.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[t&&u.jsx(qy,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),u.jsx(ze.Input,{ref:r,className:T("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));tg.displayName=ze.Input.displayName;const ng=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.List,{ref:n,className:T("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ng.displayName=ze.List.displayName;const rg=c.forwardRef((e,t)=>u.jsx(ze.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));rg.displayName=ze.Empty.displayName;const og=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Group,{ref:n,className:T("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));og.displayName=ze.Group.displayName;const ag=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Separator,{ref:n,className:T("-mx-1 h-px bg-border",e),...t}));ag.displayName=ze.Separator.displayName;const sg=c.forwardRef(({className:e,...t},n)=>u.jsx(ze.Item,{ref:n,className:T("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));sg.displayName=ze.Item.displayName;const ig=({className:e,...t})=>u.jsx("span",{className:T("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ig.displayName="CommandShortcut";var pi="ContextMenu",[i_,SP]=Me(pi,[So]),Te=So(),[c_,cg]=i_(pi),lg=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[s,i]=c.useState(!1),l=Te(t),d=He(r),f=c.useCallback(p=>{i(p),d(p)},[d]);return u.jsx(c_,{scope:t,open:s,onOpenChange:f,modal:a,children:u.jsx(Wu,{...l,dir:o,open:s,onOpenChange:f,modal:a,children:n})})};lg.displayName=pi;var ug="ContextMenuTrigger",dg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=cg(ug,n),s=Te(n),i=c.useRef({x:0,y:0}),l=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),d=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(d.current),[]),p=m=>{i.current={x:m.clientX,y:m.clientY},a.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),u.jsxs(u.Fragment,{children:[u.jsx(Bu,{...s,virtualRef:l}),u.jsx($.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,m=>{f(),p(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,Or(m=>{f(),d.current=window.setTimeout(()=>p(m),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,Or(f)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,Or(f)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,Or(f))})]})});dg.displayName=ug;var l_="ContextMenuPortal",fg=e=>{const{__scopeContextMenu:t,...n}=e,r=Te(t);return u.jsx(Vu,{...r,...n})};fg.displayName=l_;var pg="ContextMenuContent",mg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=cg(pg,n),a=Te(n),s=c.useRef(!1);return u.jsx(Yu,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var l;(l=e.onCloseAutoFocus)==null||l.call(e,i),!i.defaultPrevented&&s.current&&i.preventDefault(),s.current=!1},onInteractOutside:i=>{var l;(l=e.onInteractOutside)==null||l.call(e,i),!i.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mg.displayName=pg;var u_="ContextMenuGroup",hg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Gu,{...o,...r,ref:t})});hg.displayName=u_;var d_="ContextMenuLabel",gg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Hu,{...o,...r,ref:t})});gg.displayName=d_;var f_="ContextMenuItem",vg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Uu,{...o,...r,ref:t})});vg.displayName=f_;var p_="ContextMenuCheckboxItem",yg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Ku,{...o,...r,ref:t})});yg.displayName=p_;var m_="ContextMenuRadioGroup",bg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(qu,{...o,...r,ref:t})});bg.displayName=m_;var h_="ContextMenuRadioItem",xg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Xu,{...o,...r,ref:t})});xg.displayName=h_;var g_="ContextMenuItemIndicator",wg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Qu,{...o,...r,ref:t})});wg.displayName=g_;var v_="ContextMenuSeparator",Cg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Zu,{...o,...r,ref:t})});Cg.displayName=v_;var y_="ContextMenuArrow",b_=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(Ju,{...o,...r,ref:t})});b_.displayName=y_;var Sg="ContextMenuSub",Mg=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,s=Te(t),[i,l]=_e({prop:o,defaultProp:a??!1,onChange:r,caller:Sg});return u.jsx(ed,{...s,open:i,onOpenChange:l,children:n})};Mg.displayName=Sg;var x_="ContextMenuSubTrigger",Ng=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(td,{...o,...r,ref:t})});Ng.displayName=x_;var w_="ContextMenuSubContent",Rg=c.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Te(n);return u.jsx(nd,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rg.displayName=w_;function Or(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var C_=lg,S_=dg,Eg=fg,_g=mg,M_=hg,Pg=gg,Dg=vg,kg=yg,N_=bg,Tg=xg,Ag=wg,Ig=Cg,R_=Mg,jg=Ng,Og=Rg;const E_=C_,__=S_,P_=M_,D_=Eg,k_=R_,T_=N_,$g=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>u.jsxs(jg,{ref:o,className:T("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,u.jsx(as,{className:"ml-auto h-4 w-4"})]}));$g.displayName=jg.displayName;const Lg=c.forwardRef(({className:e,...t},n)=>u.jsx(Og,{ref:n,className:T("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));Lg.displayName=Og.displayName;const Fg=c.forwardRef(({className:e,...t},n)=>u.jsx(Eg,{children:u.jsx(_g,{ref:n,className:T("z-50 min-w-[8rem] overflow-hidden rounded-md 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",e),...t})}));Fg.displayName=_g.displayName;const zg=c.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(Dg,{ref:r,className:T("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));zg.displayName=Dg.displayName;const Wg=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>u.jsxs(kg,{ref:o,className:T("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ag,{children:u.jsx(Kn,{className:"h-4 w-4"})})}),t]}));Wg.displayName=kg.displayName;const Bg=c.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Tg,{ref:r,className:T("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ag,{children:u.jsx(ss,{className:"h-4 w-4 fill-current"})})}),t]}));Bg.displayName=Tg.displayName;const Vg=c.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(Pg,{ref:r,className:T("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Vg.displayName=Pg.displayName;const Yg=c.forwardRef(({className:e,...t},n)=>u.jsx(Ig,{ref:n,className:T("-mx-1 my-1 h-px bg-border",e),...t}));Yg.displayName=Ig.displayName;const Gg=({className:e,...t})=>u.jsx("span",{className:T("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Gg.displayName="ContextMenuShortcut";const A_=Wo,I_=ii,j_=$n,Hg=Bo,mi=c.forwardRef(({className:e,...t},n)=>u.jsx(jn,{className:T("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));mi.displayName=jn.displayName;const O_=Qt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ug=c.forwardRef(({side:e="right",className:t,children:n,...r},o)=>u.jsxs(Hg,{children:[u.jsx(mi,{}),u.jsxs(On,{ref:o,className:T(O_({side:e}),t),...r,children:[u.jsxs($n,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(is,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));Ug.displayName=On.displayName;const Kg=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kg.displayName="SheetHeader";const qg=({className:e,...t})=>u.jsx("div",{className:T("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qg.displayName="SheetFooter";const Xg=c.forwardRef(({className:e,...t},n)=>u.jsx(yr,{ref:n,className:T("text-lg font-semibold text-foreground",e),...t}));Xg.displayName=yr.displayName;const Qg=c.forwardRef(({className:e,...t},n)=>u.jsx(br,{ref:n,className:T("text-sm text-muted-foreground",e),...t}));Qg.displayName=br.displayName;var Yo="Tabs",[$_,MP]=Me(Yo,[Dt]),Zg=Dt(),[L_,hi]=$_(Yo),Jg=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,f=Jt(i),[p,m]=_e({prop:r,onChange:o,defaultProp:a??"",caller:Yo});return u.jsx(L_,{scope:n,baseId:we(),value:p,onValueChange:m,orientation:s,dir:f,activationMode:l,children:u.jsx($.div,{dir:f,"data-orientation":s,...d,ref:t})})});Jg.displayName=Yo;var ev="TabsList",tv=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=hi(ev,n),s=Zg(n);return u.jsx(bo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx($.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});tv.displayName=ev;var nv="TabsTrigger",rv=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=hi(nv,n),i=Zg(n),l=sv(s.baseId,r),d=iv(s.baseId,r),f=r===s.value;return u.jsx(xo,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx($.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});rv.displayName=nv;var ov="TabsContent",av=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=hi(ov,n),l=sv(i.baseId,r),d=iv(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const m=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(m)},[]),u.jsx(De,{present:o||f,children:({present:m})=>u.jsx($.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:m&&a})})});av.displayName=ov;function sv(e,t){return`${e}-trigger-${t}`}function iv(e,t){return`${e}-content-${t}`}var F_=Jg,cv=tv,lv=rv,uv=av;const z_=F_,dv=c.forwardRef(({className:e,...t},n)=>u.jsx(cv,{ref:n,className:T("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",e),...t}));dv.displayName=cv.displayName;const fv=c.forwardRef(({className:e,...t},n)=>u.jsx(lv,{ref:n,className:T("inline-flex items-center justify-center border-b-2 border-[#37383C] text-[var(--label-normal)] whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:border-b-2 data-[state=active]:!border-primary data-[state=active]:!text-primary",e),...t}));fv.displayName=lv.displayName;const pv=c.forwardRef(({className:e,...t},n)=>u.jsx(uv,{ref:n,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-[var(--label-normal)]",e),...t}));pv.displayName=uv.displayName;var W_=Symbol("radix.slottable");function B_(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=W_,t}var[Go,NP]=Me("Tooltip",[Pt]),Ho=Pt(),mv="TooltipProvider",V_=700,ns="tooltip.open",[Y_,gi]=Go(mv),hv=e=>{const{__scopeTooltip:t,delayDuration:n=V_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=c.useRef(!0),i=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(Y_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:c.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};hv.displayName=mv;var er="Tooltip",[G_,wr]=Go(er),gv=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=gi(er,e.__scopeTooltip),d=Ho(t),[f,p]=c.useState(null),m=we(),h=c.useRef(0),y=s??l.disableHoverableContent,g=i??l.delayDuration,v=c.useRef(!1),[x,b]=_e({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(ns))):l.onClose(),a==null||a(N)},caller:er}),w=c.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),R=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},g)},[g,b]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(ur,{...d,children:u.jsx(G_,{scope:t,contentId:m,open:x,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:c.useCallback(()=>{y?R():(window.clearTimeout(h.current),h.current=0)},[R,y]),onOpen:S,onClose:R,disableHoverableContent:y,children:n})})};gv.displayName=er;var rs="TooltipTrigger",vv=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wr(rs,n),a=gi(rs,n),s=Ho(n),i=c.useRef(null),l=te(t,i,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(dr,{asChild:!0,...s,children:u.jsx($.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:j(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});vv.displayName=rs;var vi="TooltipPortal",[H_,U_]=Go(vi,{forceMount:void 0}),yv=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=wr(vi,t);return u.jsx(H_,{scope:t,forceMount:n,children:u.jsx(De,{present:n||a.open,children:u.jsx(Dn,{asChild:!0,container:o,children:r})})})};yv.displayName=vi;var Sn="TooltipContent",bv=c.forwardRef((e,t)=>{const n=U_(Sn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=wr(Sn,e.__scopeTooltip);return u.jsx(De,{present:r||s.open,children:s.disableHoverableContent?u.jsx(xv,{side:o,...a,ref:t}):u.jsx(K_,{side:o,...a,ref:t})})}),K_=c.forwardRef((e,t)=>{const n=wr(Sn,e.__scopeTooltip),r=gi(Sn,e.__scopeTooltip),o=c.useRef(null),a=te(t,o),[s,i]=c.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,m=c.useCallback(()=>{i(null),p(!1)},[p]),h=c.useCallback((y,g)=>{const v=y.currentTarget,x={x:y.clientX,y:y.clientY},b=J_(x,v.getBoundingClientRect()),w=eP(x,b),S=tP(g.getBoundingClientRect()),R=rP([...w,...S]);i(R),p(!0)},[p]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(l&&f){const y=v=>h(v,f),g=v=>h(v,l);return l.addEventListener("pointerleave",y),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",g)}}},[l,f,h,m]),c.useEffect(()=>{if(s){const y=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),w=!nP(x,s);b?m():w&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,f,s,d,m]),u.jsx(xv,{...e,ref:a})}),[q_,X_]=Go(er,{isInside:!1}),Q_=B_("TooltipContent"),xv=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=wr(Sn,n),d=Ho(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(ns,f),()=>document.removeEventListener(ns,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),u.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:u.jsxs(vo,{"data-state":l.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Q_,{children:r}),u.jsx(q_,{scope:n,isInside:!0,children:u.jsx(qM,{id:l.contentId,role:"tooltip",children:o||r})})]})})});bv.displayName=Sn;var wv="TooltipArrow",Z_=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ho(n);return X_(wv,n).isInside?null:u.jsx(yo,{...o,...r,ref:t})});Z_.displayName=wv;function J_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function eP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function nP(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,p=l.x,m=l.y;f>r!=m>r&&n<(p-d)*(r-f)/(m-f)+d&&(o=!o)}return o}function rP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),oP(t)}function oP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aP=hv,sP=gv,iP=vv,cP=yv,Cv=bv;const lP=aP,uP=sP,dP=iP,Sv=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(cP,{children:u.jsx(Cv,{ref:r,sideOffset:t,className:T("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...n})}));Sv.displayName=Cv.displayName;exports.Alert=Bm;exports.AlertDescription=Ym;exports.AlertDialog=T1;exports.AlertDialogAction=Ah;exports.AlertDialogCancel=Ih;exports.AlertDialogContent=_h;exports.AlertDialogDescription=Th;exports.AlertDialogFooter=Dh;exports.AlertDialogHeader=Ph;exports.AlertDialogOverlay=ci;exports.AlertDialogPortal=Eh;exports.AlertDialogTitle=kh;exports.AlertDialogTrigger=A1;exports.AlertTitle=Vm;exports.Badge=qN;exports.Button=rl;exports.Calendar=Nl;exports.Card=jh;exports.CardContent=Fh;exports.CardDescription=Lh;exports.CardFooter=zh;exports.CardHeader=Oh;exports.CardTitle=$h;exports.Checkbox=Il;exports.Chip=QN;exports.Collapsible=nR;exports.CollapsibleContent=oR;exports.CollapsibleTrigger=rR;exports.Command=fi;exports.CommandDialog=s_;exports.CommandEmpty=rg;exports.CommandGroup=og;exports.CommandInput=tg;exports.CommandItem=sg;exports.CommandList=ng;exports.CommandSeparator=ag;exports.CommandShortcut=ig;exports.ContextMenu=E_;exports.ContextMenuCheckboxItem=Wg;exports.ContextMenuContent=Fg;exports.ContextMenuGroup=P_;exports.ContextMenuItem=zg;exports.ContextMenuLabel=Vg;exports.ContextMenuPortal=D_;exports.ContextMenuRadioGroup=T_;exports.ContextMenuRadioItem=Bg;exports.ContextMenuSeparator=Yg;exports.ContextMenuShortcut=Gg;exports.ContextMenuSub=k_;exports.ContextMenuSubContent=Lg;exports.ContextMenuSubTrigger=$g;exports.ContextMenuTrigger=__;exports.Dialog=qh;exports.DialogClose=a_;exports.DialogContent=di;exports.DialogDescription=eg;exports.DialogFooter=Zh;exports.DialogHeader=Qh;exports.DialogOverlay=ui;exports.DialogPortal=Xh;exports.DialogTitle=Jh;exports.DialogTrigger=o_;exports.DropdownMenu=RM;exports.DropdownMenuCheckboxItem=Id;exports.DropdownMenuContent=Td;exports.DropdownMenuGroup=_M;exports.DropdownMenuItem=Ad;exports.DropdownMenuLabel=Od;exports.DropdownMenuPortal=PM;exports.DropdownMenuRadioGroup=kM;exports.DropdownMenuRadioItem=jd;exports.DropdownMenuSeparator=$d;exports.DropdownMenuShortcut=Ld;exports.DropdownMenuSub=DM;exports.DropdownMenuSubContent=kd;exports.DropdownMenuSubTrigger=Dd;exports.DropdownMenuTrigger=EM;exports.Input=Fd;exports.Label=Sp;exports.Popover=RR;exports.PopoverAnchor=_R;exports.PopoverClose=PR;exports.PopoverContent=$p;exports.PopoverTrigger=ER;exports.Progress=Vp;exports.RadioGroup=ef;exports.RadioGroupItem=tf;exports.Select=SN;exports.SelectContent=Bf;exports.SelectGroup=MN;exports.SelectItem=Yf;exports.SelectLabel=Vf;exports.SelectScrollDownButton=Bs;exports.SelectScrollUpButton=Ws;exports.SelectSeparator=Gf;exports.SelectTrigger=Wf;exports.SelectValue=NN;exports.Separator=Hp;exports.Sheet=A_;exports.SheetClose=j_;exports.SheetContent=Ug;exports.SheetDescription=Qg;exports.SheetFooter=qg;exports.SheetHeader=Kg;exports.SheetOverlay=mi;exports.SheetPortal=Hg;exports.SheetTitle=Xg;exports.SheetTrigger=I_;exports.Skeleton=zR;exports.Slider=ip;exports.Spinner=KE;exports.Switch=mp;exports.Table=xm;exports.TableBody=Cm;exports.TableCaption=Em;exports.TableCell=Rm;exports.TableFooter=Sm;exports.TableHead=Nm;exports.TableHeader=wm;exports.TableRow=Mm;exports.Tabs=z_;exports.TabsContent=pv;exports.TabsList=dv;exports.TabsTrigger=fv;exports.Textarea=hp;exports.Toggle=Dm;exports.ToggleGroup=zm;exports.ToggleGroupItem=Wm;exports.Tooltip=uP;exports.TooltipContent=Sv;exports.TooltipProvider=lP;exports.TooltipTrigger=dP;exports.badgeVariants=gp;exports.buttonVariants=tr;exports.toggleVariants=ni;
|
|
217
217
|
//# sourceMappingURL=index.cjs.js.map
|