"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4436],{54436:(e,n,r)=>{r.d(n,{bm:()=>J,UC:()=>H,ZL:()=>K,bL:()=>z,l9:()=>G});var t=r(41987),o=r(16029),i=r(36329),a=r(27645),l=r(96167),u=r(39817),s=r(39123),d=r(77705),c=r(50036),p=r(34510),f=r(77429),v=r(61864),m=r(44995),g=t.forwardRef((e,n)=>{let{children:r,...o}=e,i=t.Children.toArray(r),a=i.find(N);if(a){let e=a.props.children,r=i.map(n=>n!==a?n:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,m.jsx)(h,{...o,ref:n,children:t.isValidElement(e)?t.cloneElement(e,void 0,r):null})}return(0,m.jsx)(h,{...o,ref:n,children:r})});g.displayName="Slot";var h=t.forwardRef((e,n)=>{let{children:r,...o}=e;if(t.isValidElement(r)){let e=function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?e.props.ref:e.props.ref||e.ref}(r);return t.cloneElement(r,{...function(e,n){let r={...n};for(let t in n){let o=e[t],i=n[t];/^on[A-Z]/.test(t)?o&&i?r[t]=(...e)=>{i(...e),o(...e)}:o&&(r[t]=o):"style"===t?r[t]={...o,...i}:"className"===t&&(r[t]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props),ref:n?(0,i.t)(n,e):e})}return t.Children.count(r)>1?t.Children.only(null):null});h.displayName="SlotClone";var C=({children:e})=>(0,m.jsx)(m.Fragment,{children:e});function N(e){return t.isValidElement(e)&&e.type===C}var y=r(24537),O=r(23416),x=r(76614),R="Popover",[w,P]=(0,a.A)(R,[c.Bk]),j=(0,c.Bk)(),[E,A]=w(R),b=e=>{let{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,u=j(n),s=t.useRef(null),[p,f]=t.useState(!1),[v=!1,g]=(0,y.i)({prop:o,defaultProp:i,onChange:a});return(0,m.jsx)(c.bL,{...u,children:(0,m.jsx)(E,{scope:n,contentId:(0,d.B)(),triggerRef:s,open:v,onOpenChange:g,onOpenToggle:t.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:p,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:l,children:r})})};b.displayName=R;var M="PopoverAnchor";t.forwardRef((e,n)=>{let{__scopePopover:r,...o}=e,i=A(M,r),a=j(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=i;return t.useEffect(()=>(l(),()=>u()),[l,u]),(0,m.jsx)(c.Mz,{...a,...o,ref:n})}).displayName=M;var D="PopoverTrigger",T=t.forwardRef((e,n)=>{let{__scopePopover:r,...t}=e,a=A(D,r),l=j(r),u=(0,i.s)(n,a.triggerRef),s=(0,m.jsx)(v.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q(a.open),...t,ref:u,onClick:(0,o.m)(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:(0,m.jsx)(c.Mz,{asChild:!0,...l,children:s})});T.displayName=D;var F="PopoverPortal",[_,k]=w(F,{forceMount:void 0}),I=e=>{let{__scopePopover:n,forceMount:r,children:t,container:o}=e,i=A(F,n);return(0,m.jsx)(_,{scope:n,forceMount:r,children:(0,m.jsx)(f.C,{present:r||i.open,children:(0,m.jsx)(p.Z,{asChild:!0,container:o,children:t})})})};I.displayName=F;var U="PopoverContent",L=t.forwardRef((e,n)=>{let r=k(U,e.__scopePopover),{forceMount:t=r.forceMount,...o}=e,i=A(U,e.__scopePopover);return(0,m.jsx)(f.C,{present:t||i.open,children:i.modal?(0,m.jsx)(W,{...o,ref:n}):(0,m.jsx)(S,{...o,ref:n})})});L.displayName=U;var W=t.forwardRef((e,n)=>{let r=A(U,e.__scopePopover),a=t.useRef(null),l=(0,i.s)(n,a),u=t.useRef(!1);return t.useEffect(()=>{let e=a.current;if(e)return(0,O.Eq)(e)},[]),(0,m.jsx)(x.A,{as:g,allowPinchZoom:!0,children:(0,m.jsx)(V,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.m)(e.onCloseAutoFocus,e=>{var n;e.preventDefault(),u.current||null===(n=r.triggerRef.current)||void 0===n||n.focus()}),onPointerDownOutside:(0,o.m)(e.onPointerDownOutside,e=>{let n=e.detail.originalEvent,r=0===n.button&&!0===n.ctrlKey,t=2===n.button||r;u.current=t},{checkForDefaultPrevented:!1}),onFocusOutside:(0,o.m)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),S=t.forwardRef((e,n)=>{let r=A(U,e.__scopePopover),o=t.useRef(!1),i=t.useRef(!1);return(0,m.jsx)(V,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var t,a;null===(t=e.onCloseAutoFocus)||void 0===t||t.call(e,n),n.defaultPrevented||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),n.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:n=>{var t,a;null===(t=e.onInteractOutside)||void 0===t||t.call(e,n),n.defaultPrevented||(o.current=!0,"pointerdown"!==n.detail.originalEvent.type||(i.current=!0));let l=n.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(l))&&n.preventDefault(),"focusin"===n.detail.originalEvent.type&&i.current&&n.preventDefault()}})}),V=t.forwardRef((e,n)=>{let{__scopePopover:r,trapFocus:t,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:v,...g}=e,h=A(U,r),C=j(r);return(0,u.Oh)(),(0,m.jsx)(s.n,{asChild:!0,loop:!0,trapped:t,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,m.jsx)(l.qW,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onDismiss:()=>h.onOpenChange(!1),children:(0,m.jsx)(c.UC,{"data-state":q(h.open),role:"dialog",id:h.contentId,...C,...g,ref:n,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),B="PopoverClose",Z=t.forwardRef((e,n)=>{let{__scopePopover:r,...t}=e,i=A(B,r);return(0,m.jsx)(v.sG.button,{type:"button",...t,ref:n,onClick:(0,o.m)(e.onClick,()=>i.onOpenChange(!1))})});function q(e){return e?"open":"closed"}Z.displayName=B,t.forwardRef((e,n)=>{let{__scopePopover:r,...t}=e,o=j(r);return(0,m.jsx)(c.i3,{...o,...t,ref:n})}).displayName="PopoverArrow";var z=b,G=T,K=I,H=L,J=Z},77429:(e,n,r)=>{r.d(n,{C:()=>a});var t=r(41987),o=r(36329),i=r(67204),a=e=>{let{present:n,children:r}=e,a=function(e){var n,r;let[o,a]=t.useState(),u=t.useRef({}),s=t.useRef(e),d=t.useRef("none"),[c,p]=(n=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,n)=>{let t=r[e][n];return null!=t?t:e},n));return t.useEffect(()=>{let e=l(u.current);d.current="mounted"===c?e:"none"},[c]),(0,i.N)(()=>{let n=u.current,r=s.current;if(r!==e){let t=d.current,o=l(n);e?p("MOUNT"):"none"===o||(null==n?void 0:n.display)==="none"?p("UNMOUNT"):r&&t!==o?p("ANIMATION_OUT"):p("UNMOUNT"),s.current=e}},[e,p]),(0,i.N)(()=>{if(o){var e;let n;let r=null!==(e=o.ownerDocument.defaultView)&&void 0!==e?e:window,t=e=>{let t=l(u.current).includes(e.animationName);if(e.target===o&&t&&(p("ANIMATION_END"),!s.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",n=r.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",t),o.addEventListener("animationend",t),()=>{r.clearTimeout(n),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",t),o.removeEventListener("animationend",t)}}p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback(e=>{e&&(u.current=getComputedStyle(e)),a(e)},[])}}(n),u="function"==typeof r?r({present:a.isPresent}):t.Children.only(r),s=(0,o.s)(a.ref,function(e){var n,r;let t=null===(n=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===n?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(o=(t=null===(r=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===r?void 0:r.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(u));return"function"==typeof r||a.isPresent?t.cloneElement(u,{ref:s}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"}}]);