import{c as E,r as i,j as a}from"./index-qMrAuFFG.js";import{E as B,g as X,G as h,l as C,r as x,o as p,m as V,n as _,p as q,v as K,w as U,t as Y,F as Z,D as J,X as Q}from"./loading-PETOxw4W.js";import{c as m}from"./queries-B0q6a4VE.js";/**
 * @license lucide-react v0.476.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ee=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],je=E("HardDrive",ee);/**
 * @license lucide-react v0.476.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oe=E("X",te);var D="Dialog",[b]=X(D),[ae,d]=b(D),O=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[f,y]=B({prop:r,defaultProp:s??!1,onChange:o,caller:D});return a.jsx(ae,{scope:t,triggerRef:c,contentRef:u,contentId:h(),titleId:h(),descriptionId:h(),open:f,onOpenChange:y,onOpenToggle:i.useCallback(()=>y(H=>!H),[y]),modal:l,children:n})};O.displayName=D;var P="DialogTrigger",I=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=d(P,n),o=_(t,s.triggerRef);return a.jsx(x.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":j(s.open),...r,ref:o,onClick:p(e.onClick,s.onOpenToggle)})});I.displayName=P;var R="DialogPortal",[ne,A]=b(R,{forceMount:void 0}),T=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=d(R,t);return a.jsx(ne,{scope:t,forceMount:n,children:i.Children.map(r,l=>a.jsx(C,{present:n||o.open,children:a.jsx(V,{asChild:!0,container:s,children:l})}))})};T.displayName=R;var v="DialogOverlay",M=i.forwardRef((e,t)=>{const n=A(v,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=d(v,e.__scopeDialog);return o.modal?a.jsx(C,{present:r||o.open,children:a.jsx(se,{...s,ref:t})}):null});M.displayName=v;var re=U("DialogOverlay.RemoveScroll"),se=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=d(v,n);return a.jsx(K,{as:re,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(x.div,{"data-state":j(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),g="DialogContent",w=i.forwardRef((e,t)=>{const n=A(g,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=d(g,e.__scopeDialog);return a.jsx(C,{present:r||o.open,children:o.modal?a.jsx(ie,{...s,ref:t}):a.jsx(le,{...s,ref:t})})});w.displayName=g;var ie=i.forwardRef((e,t)=>{const n=d(g,e.__scopeDialog),r=i.useRef(null),s=_(t,n.contentRef,r);return i.useEffect(()=>{const o=r.current;if(o)return q(o)},[]),a.jsx(k,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:p(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:p(e.onFocusOutside,o=>o.preventDefault())})}),le=i.forwardRef((e,t)=>{const n=d(g,e.__scopeDialog),r=i.useRef(!1),s=i.useRef(!1);return a.jsx(k,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),k=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,c=d(g,n),u=i.useRef(null),f=_(t,u);return Y(),a.jsxs(a.Fragment,{children:[a.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(J,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(ce,{titleId:c.titleId}),a.jsx(ue,{contentRef:u,descriptionId:c.descriptionId})]})]})}),N="DialogTitle",F=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=d(N,n);return a.jsx(x.h2,{id:s.titleId,...r,ref:t})});F.displayName=N;var S="DialogDescription",$=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=d(S,n);return a.jsx(x.p,{id:s.descriptionId,...r,ref:t})});$.displayName=S;var W="DialogClose",G=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=d(W,n);return a.jsx(x.button,{type:"button",...r,ref:t,onClick:p(e.onClick,()=>s.onOpenChange(!1))})});G.displayName=W;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ee,z]=Q(L,{contentName:g,titleName:N,docsSlug:"dialog"}),ce=({titleId:e})=>{const t=z(L),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},de="DialogDescriptionWarning",ue=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${z(de).contentName}}.`;return i.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ge=O,fe=I,pe=T,xe=M,me=w,ve=F,De=$,ye=G;function be({...e}){return a.jsx(ge,{"data-slot":"dialog",...e})}function Oe({...e}){return a.jsx(fe,{"data-slot":"dialog-trigger",...e})}function he({...e}){return a.jsx(pe,{"data-slot":"dialog-portal",...e})}function Ce({className:e,...t}){return a.jsx(xe,{"data-slot":"dialog-overlay",className:m("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Pe({className:e,children:t,showCloseButton:n=!0,...r}){return a.jsxs(he,{"data-slot":"dialog-portal",children:[a.jsx(Ce,{}),a.jsxs(me,{"data-slot":"dialog-content",className:m("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&a.jsxs(ye,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer",children:[a.jsx(oe,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ie({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:m("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Ae({className:e,...t}){return a.jsx(ve,{"data-slot":"dialog-title",className:m("text-lg leading-none font-semibold",e),...t})}function Te({className:e,...t}){return a.jsx(De,{"data-slot":"dialog-description",className:m("text-muted-foreground text-sm",e),...t})}export{be as D,je as H,Pe as a,Ie as b,Ae as c,Te as d,Oe as e};
