"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[491],{14491:function(e,n,t){t.d(n,{Dx:function(){return et},VY:function(){return en},aV:function(){return ee},dk:function(){return er},fC:function(){return J},h_:function(){return $},jm:function(){return K},p8:function(){return O},x8:function(){return eo},xz:function(){return Q}});var r=t(64149),o=t(64433),i=t(83954),a=t(74873),l=t(89105),u=t(45306),s=t(72832),d=t(96616),c=t(97498),f=t(45485),p=t(79442),m=t(57117),g=t(3748),v=t(32286),N=t(54098),y=t(20881),D="Dialog",[h,O]=(0,a.b)(D),[R,M]=h(D),b=e=>{let{__scopeDialog:n,children:t,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,d=r.useRef(null),c=r.useRef(null),[f=!1,p]=(0,u.T)({prop:o,defaultProp:i,onChange:a});return(0,y.jsx)(R,{scope:n,triggerRef:d,contentRef:c,contentId:(0,l.M)(),titleId:(0,l.M)(),descriptionId:(0,l.M)(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:s,children:t})};b.displayName=D;var w="DialogTrigger",x=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,a=M(w,t),l=(0,i.e)(n,a.triggerRef);return(0,y.jsx)(p.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q(a.open),...r,ref:l,onClick:(0,o.M)(e.onClick,a.onOpenToggle)})});x.displayName=w;var I="DialogPortal",[j,E]=h(I,{forceMount:void 0}),C=e=>{let{__scopeDialog:n,forceMount:t,children:o,container:i}=e,a=M(I,n);return(0,y.jsx)(j,{scope:n,forceMount:t,children:r.Children.map(o,e=>(0,y.jsx)(f.z,{present:t||a.open,children:(0,y.jsx)(c.h,{asChild:!0,container:i,children:e})}))})};C.displayName=I;var _="DialogOverlay",T=r.forwardRef((e,n)=>{let t=E(_,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=M(_,e.__scopeDialog);return i.modal?(0,y.jsx)(f.z,{present:r||i.open,children:(0,y.jsx)(A,{...o,ref:n})}):null});T.displayName=_;var A=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(_,t);return(0,y.jsx)(g.Z,{as:N.g7,allowPinchZoom:!0,shards:[o.contentRef],children:(0,y.jsx)(p.WV.div,{"data-state":q(o.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),F="DialogContent",P=r.forwardRef((e,n)=>{let t=E(F,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,i=M(F,e.__scopeDialog);return(0,y.jsx)(f.z,{present:r||i.open,children:i.modal?(0,y.jsx)(W,{...o,ref:n}):(0,y.jsx)(k,{...o,ref:n})})});P.displayName=F;var W=r.forwardRef((e,n)=>{let t=M(F,e.__scopeDialog),a=r.useRef(null),l=(0,i.e)(n,t.contentRef,a);return r.useEffect(()=>{let e=a.current;if(e)return(0,v.Ry)(e)},[]),(0,y.jsx)(U,{...e,ref:l,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{var n;e.preventDefault(),null===(n=t.triggerRef.current)||void 0===n||n.focus()}),onPointerDownOutside:(0,o.M)(e.onPointerDownOutside,e=>{let n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey;(2===n.button||t)&&e.preventDefault()}),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault())})}),k=r.forwardRef((e,n)=>{let t=M(F,e.__scopeDialog),o=r.useRef(!1),i=r.useRef(!1);return(0,y.jsx)(U,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var r,a;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,n),n.defaultPrevented||(o.current||null===(a=t.triggerRef.current)||void 0===a||a.focus(),n.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:n=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,n),n.defaultPrevented||(o.current=!0,"pointerdown"!==n.detail.originalEvent.type||(i.current=!0));let l=n.target;(null===(a=t.triggerRef.current)||void 0===a?void 0:a.contains(l))&&n.preventDefault(),"focusin"===n.detail.originalEvent.type&&i.current&&n.preventDefault()}})}),U=r.forwardRef((e,n)=>{let{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:l,...u}=e,c=M(F,t),f=r.useRef(null),p=(0,i.e)(n,f);return(0,m.EW)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d.M,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:l,children:(0,y.jsx)(s.XB,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...u,ref:p,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Y,{titleId:c.titleId}),(0,y.jsx)(G,{contentRef:f,descriptionId:c.descriptionId})]})]})}),V="DialogTitle",S=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(V,t);return(0,y.jsx)(p.WV.h2,{id:o.titleId,...r,ref:n})});S.displayName=V;var L="DialogDescription",z=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,o=M(L,t);return(0,y.jsx)(p.WV.p,{id:o.descriptionId,...r,ref:n})});z.displayName=L;var B="DialogClose",Z=r.forwardRef((e,n)=>{let{__scopeDialog:t,...r}=e,i=M(B,t);return(0,y.jsx)(p.WV.button,{type:"button",...r,ref:n,onClick:(0,o.M)(e.onClick,()=>i.onOpenChange(!1))})});function q(e){return e?"open":"closed"}Z.displayName=B;var H="DialogTitleWarning",[K,X]=(0,a.k)(H,{contentName:F,titleName:V,docsSlug:"dialog"}),Y=e=>{let{titleId:n}=e,t=X(H),o="`".concat(t.contentName,"` requires a `").concat(t.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(t.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(t.docsSlug);return r.useEffect(()=>{n&&!document.getElementById(n)&&console.error(o)},[o,n]),null},G=e=>{let{contentRef:n,descriptionId:t}=e,o=X("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(o.contentName,"}.");return r.useEffect(()=>{var e;let r=null===(e=n.current)||void 0===e?void 0:e.getAttribute("aria-describedby");t&&r&&!document.getElementById(t)&&console.warn(i)},[i,n,t]),null},J=b,Q=x,$=C,ee=T,en=P,et=S,er=z,eo=Z},45485:function(e,n,t){t.d(n,{z:function(){return a}});var r=t(64149),o=t(83954),i=t(61013),a=e=>{var n,t;let a,u;let{present:s,children:d}=e,c=function(e){var n,t;let[o,a]=r.useState(),u=r.useRef({}),s=r.useRef(e),d=r.useRef("none"),[c,f]=(n=e?"mounted":"unmounted",t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,n)=>{let r=t[e][n];return null!=r?r:e},n));return r.useEffect(()=>{let e=l(u.current);d.current="mounted"===c?e:"none"},[c]),(0,i.b)(()=>{let n=u.current,t=s.current;if(t!==e){let r=d.current,o=l(n);e?f("MOUNT"):"none"===o||(null==n?void 0:n.display)==="none"?f("UNMOUNT"):t&&r!==o?f("ANIMATION_OUT"):f("UNMOUNT"),s.current=e}},[e,f]),(0,i.b)(()=>{if(o){var e;let n;let t=null!==(e=o.ownerDocument.defaultView)&&void 0!==e?e:window,r=e=>{let r=l(u.current).includes(e.animationName);if(e.target===o&&r&&(f("ANIMATION_END"),!s.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",n=t.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},i=e=>{e.target===o&&(d.current=l(u.current))};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{t.clearTimeout(n),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:r.useCallback(e=>{e&&(u.current=getComputedStyle(e)),a(e)},[])}}(s),f="function"==typeof d?d({present:c.isPresent}):r.Children.only(d),p=(0,o.e)(c.ref,(a=null===(n=Object.getOwnPropertyDescriptor(f.props,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in a&&a.isReactWarning?f.ref:(a=null===(t=Object.getOwnPropertyDescriptor(f,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in a&&a.isReactWarning?f.props.ref:f.props.ref||f.ref);return"function"==typeof d||c.isPresent?r.cloneElement(f,{ref:p}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"}}]);