vendor: 3,721 bytes, line 1
1import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./utils-B6KiDbIe.js";import{n as i,r as a}from"./dist-D11jfPcz.js";import{t as o}from"./dist-Duk-Fvlu.js";import{a as s,n as c,o as l,r as u,t as d}from"./createLucideIcon-CQTjW3XA.js";import{a as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./es2015-CLe0FVIp.js";import{f as b}from"./index-CBPDP9z5.js";var x=e(t(),1),S=n(),C=`Dialog`,[w,ee]=l(C),[T,E]=w(C),D=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),c=x.useRef(null),[l,d]=u({prop:r,defaultProp:i??!1,onChange:a,caller:C});return(0,S.jsx)(T,{scope:t,triggerRef:s,contentRef:c,contentId:m(),titleId:m(),descriptionId:m(),open:l,onOpenChange:d,onOpenToggle:x.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};D.displayName=C;var O=`DialogTrigger`,k=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=E(O,n),c=a(t,i.triggerRef);return(0,S.jsx)(o.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Y(i.open),...r,ref:c,onClick:s(e.onClick,i.onOpenToggle)})});k.displayName=O;var A=`DialogPortal`,[j,M]=w(A,{forceMount:void 0}),N=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=E(A,t);return(0,S.jsx)(j,{scope:t,forceMount:n,children:x.Children.map(r,e=>(0,S.jsx)(c,{present:n||a.open,children:(0,S.jsx)(p,{asChild:!0,container:i,children:e})}))})};N.displayName=A;var P=`DialogOverlay`,F=x.forwardRef((e,t)=>{let n=M(P,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=E(P,e.__scopeDialog);return a.modal?(0,S.jsx)(c,{present:r||a.open,children:(0,S.jsx)(L,{...i,ref:t})}):null});F.displayName=P;var I=i(`DialogOverlay.RemoveScroll`),L=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=E(P,n),s=a(t,v());return(0,S.jsx)(h,{as:I,allowPinchZoom:!0,shards:[i.contentRef],children:(0,S.jsx)(o.div,{"data-state":Y(i.open),...r,ref:s,style:{pointerEvents:`auto`,...r.style}})})}),R=`DialogContent`,z=x.forwardRef((e,t)=>{let n=M(R,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=E(R,e.__scopeDialog);return(0,S.jsx)(c,{present:r||a.open,children:a.modal?(0,S.jsx)(B,{...i,ref:t}):(0,S.jsx)(V,{...i,ref:t})})});z.displayName=R;var B=x.forwardRef((e,t)=>{let n=E(R,e.__scopeDialog),r=x.useRef(null),i=a(t,n.contentRef,r);return x.useEffect(()=>{let e=r.current;if(e)return y(e)},[]),(0,S.jsx)(H,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:s(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:s(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault())})}),V=x.forwardRef((e,t)=>{let n=E(R,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return(0,S.jsx)(H,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),H=x.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=E(R,n);return _(),(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(f,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,S.jsx)(g,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Y(s.open
1),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),U=`DialogTitle`,W=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=E(U,n);return(0,S.jsx)(o.h2,{id:i.titleId,...r,ref:t})});W.displayName=U;var G=`DialogDescription`,K=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=E(G,n);return(0,S.jsx)(o.p,{id:i.descriptionId,...r,ref:t})});K.displayName=G;var q=`DialogClose`,J=x.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=E(q,n);return(0,S.jsx)(o.button,{type:`button`,...r,ref:t,onClick:s(e.onClick,()=>i.onOpenChange(!1))})});J.displayName=q;function Y(e){return e?`open`:`closed`}var X=d(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Z({...e}){return(0,S.jsx)(D,{"data-slot":`dialog`,...e})}function Q({...e}){return(0,S.jsx)(N,{"data-slot":`dialog-portal`,...e})}function $({className:e,...t}){return(0,S.jsx)(F,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function te({className:e,children:t,showCloseButton:n=!0,...i}){return(0,S.jsxs)(Q,{"data-slot":`dialog-portal`,children:[(0,S.jsx)($,{}),(0,S.jsxs)(z,{"data-slot":`dialog-content`,className:r(`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 bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...i,children:[t,n&&(0,S.jsxs)(J,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,S.jsx)(X,{}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function ne({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function re({className:e,showCloseButton:t=!1,children:n,...i}){return(0,S.jsxs)(`div`,{"data-slot":`dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...i,children:[n,t&&(0,S.jsx)(J,{asChild:!0,children:(0,S.jsx)(b,{variant:`outline`,children:`Close`})})]})}function ie({className:e,...t}){return(0,S.jsx)(W,{"data-slot":`dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function ae({className:e,...t}){return(0,S.jsx)(K,{"data-slot":`dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}export{ne as a,re as i,te as n,ie as o,ae as r,Z as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.