vendor: 6,506 bytes, lines 1-5
1import{r as s,j as i,cU as $,a3 as B,a5 as R,a9 as y,a4 as v,a6 as D,a7 as E,cV as H,a8 as U,cW as Z,cX as q}from"./index-n5OsugKY.js";import{h as K,R as X,u as Y,F as z}from"./Combination-3HFVl8Y1.js";function J(e){const t=Q(e),n=s.forwardRef((r,o)=>{const{children:a,...c}=r,l=s.Children.toArray(a),u=l.find(te);if(u){const f=u.props.children,g=l.map(m=>m===u?s.Children.count(f)>1?s.Children.only(null):s.isValidElement(f)?f.props.children:null:m);return i.jsx(t,{...c,ref:o,children:s.isValidElement(f)?s.cloneElement(f,void 0,g):null})}return i.jsx(t,{...c,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Q(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const c=ne(o),l=oe(a,o.props);return o.type!==s.Fragment&&(l.ref=r?$(r,c):c),s.cloneElement(o,l)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function te(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function oe(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function ne(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x="Dialog",[P,De]=U(x),[re,d]=P(x),N=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,l=s.useRef(null),u=s.useRef(null),[f,g]=B({prop:r,defaultProp:o??!1,onChange:a,caller:x});return i.jsx(re,{scope:t,triggerRef:l,contentRef:u,contentId:R(),titleId:R(),descriptionId:R(),open:f,onOpenChange:g,onOpenToggle:s.useCallback(()=>g(m=>!m),[g]),modal:c,children:n})};N.displayName=x;var I="DialogTrigger",b=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(I,n),a=y(t,o.triggerRef);return i.jsx(v.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":O(o.open),...r,ref:a,onClick:D(e.onClick,o.onOpenToggle)})});b.displayName=I;var h="DialogPortal",[ae,j]=P(h,{forceMount:void 0}),A=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=d(h,t);return i.jsx(ae,{scope:t,forceMount:n,children:s.Children.map(r,c=>i.jsx(E,{present:n||a.open,children:i.jsx(H,{asChild:!0,container:o,children:c})}))})};A.displayName=h;var C="DialogOverlay",T=s.forwardRef((e,t)=>{const n=j(C,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=d(C,e.__scopeDialog);return a.modal?i.jsx(E,{present:r||a.open,children:i.jsx(ie,{...o,ref:t})}):null});T.displayName=C;var se=J("DialogOverlay.RemoveScroll"),ie=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(C,n);return i.jsx(X,{as:se,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(v.div,{"data-state":O(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),p="DialogContent",S=s.forwardRef((e,t)=>{const n=j(p,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=d(p,e.__scopeDialog);return i.jsx(E,{present:r||a.open,children:a.modal?i.jsx(le,{...o,ref:t}):i.jsx(ce,{...o,ref:t})})});S.displayName=p;var le=s.forwardRef((e,t)=>{const n=d(p,e.__scopeDialog),r=s.useRef(null),o=y(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),i.jsx(M,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&a.preventDefault()}),onFocusOutside:D(e.onFocusOutside,a=>a.preventDefault())})}),ce=s.forwardRef((e,t)=>{const n=d(p,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return i.jsx(M,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),M=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,l=d(p,n),u=s.useRef(null),f=y(t,u);return Y(),i.jsxs(i.Fragment,{children:[i.jsx(z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Z,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":O(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(ue,{titleId:l.titleId}),i.jsx(fe,{contentRef:u,descriptionId:l.descriptionId})]})]})}),_="DialogTitle",w=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(_,n);return i.jsx(v.h2,{id:o.titleId,...r,ref:t})});w.displayName=_;var F="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(F,n);return i.jsx(v.p,{id:o.descriptionId,...r,ref:t})});W.displayName=F;var L="DialogClose",V=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=d(L,n);return i.jsx(v.button,{type:"button",...r,ref:t,onClick:D(e.onClick,()=>o.onOpenChange(!1))})});V.displayName=L;function O(e){return e?"open":"closed"}var k="DialogTitleWarning",[ve,G]=q(k,{contentName:p,titleName:_,docsSlug:"dialog"}),ue=({titleId:e})=>{const t=G(k),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 2 3If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 4 5For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},de="DialogDescriptionWarning",fe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(de).contentName}}.`;return s.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},me=N,Ce=b,xe=A,Re=T,ye=S,Ee=w,he=W,_e=V;export{ye as C,he as D,Re as O,xe as P,me as R,Ce as T,ve as W,_e as a,Ee as b,De as c};
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.