1import{r as i,j as d,R as K,a as an}from"./react-BoPr1yjH.js";import{r as qe,R as cn}from"./react-dom-oPhaD6rJ.js";import{u as un,a as ln,o as dn,s as fn,f as pn,b as vn,c as mn,h as hn,l as xn}from"./@floating-ui-B3T_IbQx.js";import{R as gn}from"./react-remove-scroll-DUOJNfth.js";import{h as En}from"./aria-hidden-DQ5UC2Eg.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function yn(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ze(...e){return t=>e.forEach(n=>yn(n,t))}function O(...e){return i.useCallback(Ze(...e),e)}function wn(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];function u(v){const{scope:h,children:g,...x}=v,p=(h==null?void 0:h[e][l])||c,m=i.useMemo(()=>x,Object.values(x));return d.jsx(p.Provider,{value:m,children:g})}function f(v,h){const g=(h==null?void 0:h[e][l])||c,x=i.useContext(g);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${v}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,f]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Cn(r,...t)]}function Cn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const v=l(s)[`__scope${u}`];return{...c,...v}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Q=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),s=r.find(Tn);if(s){const a=s.props.children,c=r.map(l=>l===s?i.Children.count(a)>1?i.Children.only(null):i.isValidElement(a)?a.props.children:null:l);return d.jsx(xe,{...o,ref:t,children:i.isValidElement(a)?i.cloneElement(a,void 0,c):null})}return d.jsx(xe,{...o,ref:t,children:n})});Q.displayName="Slot";var xe=i.forwardRef((e,t)=>{const{children:n,...o}=e;if(i.isValidElement(n)){const r=bn(n);return i.cloneElement(n,{...Pn(o,n.props),ref:t?Ze(t,r):r})}return i.Children.count(n)>1?i.Children.only(null):null});xe.displayName="SlotClone";var Je=({children:e})=>d.jsx(d.Fragment,{children:e});function Tn(e){return i.isValidElement(e)&&e.type===Je}function Pn(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{s(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function bn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Rn(e){const t=e+"CollectionProvider",[n,o]=wn(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:x,children:p}=g,m=K.useRef(null),E=K.useRef(new Map).current;return d.jsx(r,{scope:x,itemMap:E,collectionRef:m,children:p})};a.displayName=t;const c=e+"CollectionSlot",l=K.forwardRef((g,x)=>{const{scope:p,children:m}=g,E=s(c,p),y=O(x,E.collectionRef);return d.jsx(Q,{ref:y,children:m})});l.displayName=c;const u=e+"CollectionItemSlot",f="data-radix-collection-item",v=K.forwardRef((g,x)=>{const{scope:p,children:m,...E}=g,y=K.useRef(null),C=O(x,y),w=s(u,p);return K.useEffect(()=>(w.itemMap.set(y,{ref:y,...E}),()=>void w.itemMap.delete(y))),d.jsx(Q,{[f]:"",ref:C,children:m})});v.displayName=u;function h(g){const x=s(e+"CollectionConsumer",g);return K.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const E=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((w,b)=>E.indexOf(w.ref.current)-E.indexOf(b.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},h,o]}function An(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return d.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;
vendor: 4,257 bytes, line 1
1if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Te(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=v=>{var E;const{scope:h,children:g,...x}=v,p=((E=h==null?void 0:h[e])==null?void 0:E[l])||c,m=i.useMemo(()=>x,Object.values(x));return d.jsx(p.Provider,{value:m,children:g})};u.displayName=s+"Provider";function f(v,h){var p;const g=((p=h==null?void 0:h[e])==null?void 0:p[l])||c,x=i.useContext(g);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${v}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Sn(r,...t)]}function Sn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const v=l(s)[`__scope${u}`];return{...c,...v}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Nn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],S=Nn.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:s,...a}=o,c=s?Q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...a,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qe(e,t){e&&qe.flushSync(()=>e.dispatchEvent(t))}function I(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function On(e,t=globalThis==null?void 0:globalThis.document){const n=I(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Dn="DismissableLayer",ge="dismissableLayer.update",_n="dismissableLayer.pointerDownOutside",In="dismissableLayer.focusOutside",Ue,et=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),se=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(et),[f,v]=i.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=i.useState({}),x=O(t,P=>v(P)),p=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=p.indexOf(m),y=f?p.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=E,b=Ln(P=>{const D=P.target,M=[...u.branches].some($=>$.contains(D));!w||M||(r==null||r(P),a==null||a(P),P.defaultPrevented||c==null||c())},h),A=Fn(P=>{const D=P.target;[...u.branches].some($=>$.contains(D))||(s==null||s(P),a==null||a(P),P.defaultPrevented||c==null||c())},h);return On(P=>{y===u.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},h),i.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ue=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),He(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ue)}},[f,h,n,u]),i.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),He())},[f,u]),i.useEffect(()=>{const P=()=>g({});return document.addEventListener(ge,P),()=>document.removeEventListener(ge,P)},[]),d.jsx(S.div,{...l,ref:x,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,b.onPointerDownCapture)})});se.displayName=Dn;var Mn="DismissableLayerBranch",tt=i.forwardRef((e,t)=>{const n=i.useContext(et),o=i.useRef(null),r=O(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(S.div,{...e,ref:r})});tt.displayName=Mn;function Ln(e,t=globalThis==null?void 0:globalThis.document){const n=I(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>
1{if(c.target&&!o.current){let l=function(){nt(_n,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Fn(e,t=globalThis==null?void 0:globalThis.document){const n=I(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nt(In,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function He(){const e=new CustomEvent(ge);document.dispatchEvent(e)}function nt(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Qe(r,s):r.dispatchEvent(s)}var jn=se,$n=tt,V=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},kn="Portal",Pe=i.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,s]=i.useState(!1);V(()=>s(!0),[]);const a=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?cn.createPortal(d.jsx(S.div,{...o,ref:t}),a):null});Pe.displayName=kn;function Wn(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var q=e=>{const{present:t,children:n}=e,o=Un(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=O(o.ref,Hn(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};q.displayName="Presence";function Un(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=Wn(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=ne(o.current);s.current=c==="mounted"?u:"none"},[c]),V(()=>{const u=o.current,f=r.current;if(f!==e){const h=s.current,g=ne(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),V(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,v=g=>{const p=ne(o.current).includes(g.animationName);if(g.target===t&&p&&(l("ANIMATION_END"),!r.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(s.current=ne(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function ne(e){return(e==null?void 0:e.animationName)||"none"}function Hn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ot({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Vn({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:o,c=I(n),l=i.useCallback(u=>{if(s){const v=typeof u=="function"?u(e):u;v!==e&&c(v)}else r(u)},[s,e,r,c]);return[a,l]}function Vn({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),s=I(t);return i.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var Bn="VisuallyHidden",ie=i.forwardRef((e,t)=>d.jsx(S.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));
1ie.displayName=Bn;var Kn=ie,be="ToastProvider",[Re,Gn,zn]=Rn("Toast"),[rt,cr]=Te("Toast",[zn]),[Yn,ae]=rt(be),st=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[c,l]=i.useState(null),[u,f]=i.useState(0),v=i.useRef(!1),h=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${be}\`. Expected non-empty \`string\`.`),d.jsx(Re.Provider,{scope:t,children:d.jsx(Yn,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:u,viewport:c,onViewportChange:l,onToastAdd:i.useCallback(()=>f(g=>g+1),[]),onToastRemove:i.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:h,children:a})})};st.displayName=be;var it="ToastViewport",Xn=["F8"],Ee="toast.viewportPause",ye="toast.viewportResume",at=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Xn,label:r="Notifications ({hotkey})",...s}=e,a=ae(it,n),c=Gn(n),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),v=i.useRef(null),h=O(t,v,a.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;i.useEffect(()=>{const m=E=>{var C;o.length!==0&&o.every(w=>E[w]||E.code===w)&&((C=v.current)==null||C.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[o]),i.useEffect(()=>{const m=l.current,E=v.current;if(x&&m&&E){const y=()=>{if(!a.isClosePausedRef.current){const A=new CustomEvent(Ee);E.dispatchEvent(A),a.isClosePausedRef.current=!0}},C=()=>{if(a.isClosePausedRef.current){const A=new CustomEvent(ye);E.dispatchEvent(A),a.isClosePausedRef.current=!1}},w=A=>{!m.contains(A.relatedTarget)&&C()},b=()=>{m.contains(document.activeElement)||C()};return m.addEventListener("focusin",y),m.addEventListener("focusout",w),m.addEventListener("pointermove",y),m.addEventListener("pointerleave",b),window.addEventListener("blur",y),window.addEventListener("focus",C),()=>{m.removeEventListener("focusin",y),m.removeEventListener("focusout",w),m.removeEventListener("pointermove",y),m.removeEventListener("pointerleave",b),window.removeEventListener("blur",y),window.removeEventListener("focus",C)}}},[x,a.isClosePausedRef]);const p=i.useCallback(({tabbingDirection:m})=>{const y=c().map(C=>{const w=C.ref.current,b=[w,...co(w)];return m==="forwards"?b:b.reverse()});return(m==="forwards"?y.reverse():y).flat()},[c]);return i.useEffect(()=>{const m=v.current;if(m){const E=y=>{var b,A,P;const C=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!C){const D=document.activeElement,M=y.shiftKey;if(y.target===m&&M){(b=u.current)==null||b.focus();return}const W=p({tabbingDirection:M?"backwards":"forwards"}),U=W.findIndex(T=>T===D);fe(W.slice(U+1))?y.preventDefault():M?(A=u.current)==null||A.focus():(P=f.current)==null||P.focus()}};return m.addEventListener("keydown",E),()=>m.removeEventListener("keydown",E)}},[c,p]),d.jsxs($n,{ref:l,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&d.jsx(we,{ref:u,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"forwards"});fe(m)}}),d.jsx(Re.Slot,{scope:n,children:d.jsx(S.ol,{tabIndex:-1,...s,ref:h})}),x&&d.jsx(we,{ref:f,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"backwards"});fe(m)}})]})});at.displayName=it;var ct="ToastFocusProxy",we=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=ae(ct,n);return d.jsx(ie,{"aria-hidden":!0,tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const c=a.relatedTarget;!((u=s.viewport)!=null&&u.contains(c))&&o()}})});we.displayName=ct;var ce="Toast",qn="toast.swipeStart",Zn="toast.swipeMove",Jn="toast.swipeCancel",Qn="toast.swipeEnd",ut=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[c=!0,l]=ot({prop:o,defaultProp:r,onChange:s});return d.jsx(q,{present:n||c,children:d.jsx(no,{open:c,...a,ref:t,onClose:()=>l(!1),onPause:I(e.onPause),onResume:I(e.onResume),onSwipeStart:R(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:R(e.onSwipeMove,u=>{const{x:f,y:v}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:R(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:R(e.onSwipeEnd,u=>{const{x:f,y:v}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),l(!1)})})})});ut.displayName=ce;var[eo,to]=rt(ce,{onClose(){}}),no=i.forwardRef((e,t)=>
1{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:c,onPause:l,onResume:u,onSwipeStart:f,onSwipeMove:v,onSwipeCancel:h,onSwipeEnd:g,...x}=e,p=ae(ce,n),[m,E]=i.useState(null),y=O(t,T=>E(T)),C=i.useRef(null),w=i.useRef(null),b=r||p.duration,A=i.useRef(0),P=i.useRef(b),D=i.useRef(0),{onToastAdd:M,onToastRemove:$}=p,k=I(()=>{var N;(m==null?void 0:m.contains(document.activeElement))&&((N=p.viewport)==null||N.focus()),a()}),W=i.useCallback(T=>{!T||T===1/0||(window.clearTimeout(D.current),A.current=new Date().getTime(),D.current=window.setTimeout(k,T))},[k]);i.useEffect(()=>{const T=p.viewport;if(T){const N=()=>{W(P.current),u==null||u()},F=()=>{const j=new Date().getTime()-A.current;P.current=P.current-j,window.clearTimeout(D.current),l==null||l()};return T.addEventListener(Ee,F),T.addEventListener(ye,N),()=>{T.removeEventListener(Ee,F),T.removeEventListener(ye,N)}}},[p.viewport,b,l,u,W]),i.useEffect(()=>{s&&!p.isClosePausedRef.current&&W(b)},[s,b,p.isClosePausedRef,W]),i.useEffect(()=>(M(),()=>$()),[M,$]);const U=i.useMemo(()=>m?ht(m):null,[m]);return p.viewport?d.jsxs(d.Fragment,{children:[U&&d.jsx(oo,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),d.jsx(eo,{scope:n,onClose:k,children:qe.createPortal(d.jsx(Re.ItemSlot,{scope:n,children:d.jsx(jn,{asChild:!0,onEscapeKeyDown:R(c,()=>{p.isFocusedToastEscapeKeyDownRef.current||k(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(S.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...x,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:R(e.onKeyDown,T=>{T.key==="Escape"&&(c==null||c(T.nativeEvent),T.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:R(e.onPointerDown,T=>{T.button===0&&(C.current={x:T.clientX,y:T.clientY})}),onPointerMove:R(e.onPointerMove,T=>{if(!C.current)return;const N=T.clientX-C.current.x,F=T.clientY-C.current.y,j=!!w.current,_=["left","right"].includes(p.swipeDirection),B=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,de=_?B(0,N):0,z=_?0:B(0,F),Z=T.pointerType==="touch"?10:2,Y={x:de,y:z},ee={originalEvent:T,delta:Y};j?(w.current=Y,oe(Zn,v,ee,{discrete:!1})):Ve(Y,p.swipeDirection,Z)?(w.current=Y,oe(qn,f,ee,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(N)>Z||Math.abs(F)>Z)&&(C.current=null)}),onPointerUp:R(e.onPointerUp,T=>{const N=w.current,F=T.target;if(F.hasPointerCapture(T.pointerId)&&F.releasePointerCapture(T.pointerId),w.current=null,C.current=null,N){const j=T.currentTarget,_={originalEvent:T,delta:N};Ve(N,p.swipeDirection,p.swipeThreshold)?oe(Qn,g,_,{discrete:!0}):oe(Jn,h,_,{discrete:!0}),j.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),oo=e=>{const{__scopeToast:t,children:n,...o}=e,r=ae(ce,t),[s,a]=i.useState(!1),[c,l]=i.useState(!1);return io(()=>a(!0)),i.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),c?null:d.jsx(Pe,{asChild:!0,children:d.jsx(ie,{...o,children:s&&d.jsxs(d.Fragment,{children:[r.label," ",n]})})})},ro="ToastTitle",lt=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return d.jsx(S.div,{...o,ref:t})});lt.displayName=ro;var so="ToastDescription",dt=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return d.jsx(S.div,{...o,ref:t})});dt.displayName=so;var ft="ToastAction",pt=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?d.jsx(mt,{altText:n,asChild:!0,children:d.jsx(Ae,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ft}\`. Expected non-empty \`string\`.`),null)});pt.displayName=ft;var vt="ToastClose",Ae=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=to(vt,n);return d.jsx(mt,{asChild:!0,children:d.jsx(S.button,{type:"button",...o,ref:t,onClick:R(e.onClick,r.onClose)})})});Ae.displayName=vt;var mt=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return d.jsx(S.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function ht(e){const t=[];
1return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),ao(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...ht(o))}}),t}function oe(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Qe(r,s):r.dispatchEvent(s)}var Ve=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function io(e=()=>{}){const t=I(e);V(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function ao(e){return e.nodeType===e.ELEMENT_NODE}function co(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fe(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ur=st,lr=at,dr=ut,fr=lt,pr=dt,vr=pt,mr=Ae,uo=an.useId||(()=>{}),lo=0;function pe(e){const[t,n]=i.useState(uo());return V(()=>{e||n(o=>o??String(lo++))},[e]),e||(t?`radix-${t}`:"")}var fo="Arrow",xt=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return d.jsx(S.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});xt.displayName=fo;var po=xt;function vo(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];function u(v){const{scope:h,children:g,...x}=v,p=(h==null?void 0:h[e][l])||c,m=i.useMemo(()=>x,Object.values(x));return d.jsx(p.Provider,{value:m,children:g})}function f(v,h){const g=(h==null?void 0:h[e][l])||c,x=i.useContext(g);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${v}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,f]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=(c==null?void 0:c[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,mo(r,...t)]}function mo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const v=l(s)[`__scope${u}`];return{...c,...v}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ho(e){const[t,n]=i.useState(void 0);return V(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var gt="Popper",[Et,yt]=vo(gt),[hr,wt]=Et(gt),Ct="PopperAnchor",Tt=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=wt(Ct,n),a=i.useRef(null),c=O(t,a);return i.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:d.jsx(S.div,{...r,ref:c})});Tt.displayName=Ct;var Se="PopperContent",[xo,go]=Et(Se),Pt=i.forwardRef((e,t)=>{var Me,Le,Fe,je,$e,ke;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:v="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:x,...p}=e,m=wt(Se,n),[E,y]=i.useState(null),C=O(t,J=>y(J)),[w,b]=i.useState(null),A=ho(w),P=(A==null?void 0:A.width)??0,D=(A==null?void 0:A.height)??0,M=o+(s!=="center"?"-"+s:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],W=k.length>0,U={padding:$,boundary:k.filter(yo),altBoundary:W},{refs:T,floatingStyles:N,placement:F,isPositioned:j,middlewareData:_}=un({strategy:"fixed",placement:M,whileElementsMounted:(...J)=>ln(...J,{animationFrame:g==="always"}),elements:{reference:m.anchor},middleware:[dn({mainAxis:r+D,alignmentAxis:a}),l&&fn({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?xn():void 0,...U}),l&&pn({...U}),vn({...U,apply:({elements:J,rects:We,availableWidth:nn,availableHeight:on})=>{const{width:rn,height:sn}=We.reference,te=J.floating.style;te.setProperty("--radix-popper-available-width",`${nn}px`),te.setProperty("--radix-popper-available-height",`${on}px`),te.setProperty("--radix-popper-anchor-width",`${rn}px`),te.setProperty("--radix-popper-anchor-height",`${sn}px`)}}),w&&mn({element:w,padding:c}),wo({arrowWidth:P,arrowHeight:D}),h&&hn({strategy:"referenceHidden",...U})]}),[B,de]=At(F),z=I(x);V(()=>{j&&(z==null||z())},[j,z]);const Z=(Me=_.arrow)==null?void 0:Me.x,Y=(Le=_.arrow)==null?void 0:Le.y,ee=((Fe=_.arrow)==null?void 0:Fe.centerOffset)!==0,[en,tn]=i.useState();return V(()=>{E&&tn(window.getComputedStyle(E).zIndex)},[E]),d.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:j?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[(je=_.transformOrigin)==null?void 0:je.x,($e=_.transformOrigin)==null?void 0:$e.y].join(" "),...((ke=_.hide)==null?void 0:ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(xo,{scope:n,placedSide:B,onArrowChange:b,arrowX:Z,arrowY:Y,shouldHideArrow:ee,children:d.jsx(S.div,{"data-side":B,"data-align":de,...p,ref:C,style:{...p.style,animation:j?void 0:"none"}})})})});Pt.displayName=Se;var bt="PopperArrow",Eo={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},Rt=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=go(bt,o),a=Eo[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(po,{...r,ref:n,style:{...r.style,display:"block"}})})});Rt.displayName=bt;function yo(e){return e!==null}var wo=e=>({name:"transformOrigin",options:e,fn(t){var m,E,y;const{placement:n,rects:o,middlewareData:r}=t,a=((m=r.arrow)==null?void 0:m.centerOffset)!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,f]=At(n),v={start:"0%",center:"50%",end:"100%"}[f],h=(((E=r.arrow)==null?void 0:E.x)??0)+c/2,g=(((y=r.arrow)==null?void 0:y.y)??0)+l/2;let x="",p="";return u==="bottom"?(x=a?v:`${h}px`,p=`${-l}px`):u==="top"?(x=a?v:`${h}px`,p=`${o.floating.height+l}px`):u==="right"?(x=`${-l}px`,p=a?v:`${g}px`):u==="left"&&(x=`${o.floating.width+l}px`,p=a?v:`${g}px`),{data:{x,y:p}}}});function At(e){const[t,n="center"]=e.split("-");return[t,n]}var Co=Tt,To=Pt,Po=Rt,[ue,xr]=Te("Tooltip",[yt]),Ne=yt(),St="TooltipProvider",bo=700,Be="tooltip.open",[Ro,Nt]=ue(St),Ot=e=>{const{__scopeTooltip:t,delayDuration:n=bo,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,[a,c]=i.useState(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),d.jsx(Ro,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(f=>{l.current=f},[]),disableHoverableContent:r,children:s})};Ot.displayName=St;var Dt="Tooltip",[gr,le]=ue(Dt),Ce="TooltipTrigger",Ao=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=le(Ce,n),s=Nt(Ce,n),a=Ne(n),c=i.useRef(null),l=O(t,c,r.onTriggerChange),u=i.useRef(!1),f=i.useRef(!1),v=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),d.jsx(Co,{asChild:!0,...a,children:d.jsx(S.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:R(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});Ao.displayName=Ce;var So="TooltipPortal",[Er,No]=ue(So,{forceMount:void 0}),X="TooltipContent",_t=i.forwardRef((e,t)=>{const n=No(X,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=le(X,e.__scopeTooltip);return d.jsx(q,{present:o||a.open,children:a.disableHoverableContent?d.jsx(It,{side:r,...s,ref:t}):d.jsx(Oo,{side:r,...s,ref:t})})}),Oo=i.forwardRef((e,t)=>{const n=le(X,e.__scopeTooltip),o=Nt(X,e.__scopeTooltip),r=i.useRef(null),s=O(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,f=r.current,{onPointerInTransitChange:v}=o,h=i.useCallback(()=>{c(null),v(!1)},[v]),g=i.useCallback((x,p)=>{const m=x.currentTarget,E={x:x.clientX,y:x.clientY},y=Mo(E,m.getBoundingClientRect()),C=Lo(E,y),w=Fo(p.getBoundingClientRect()),b=$o([...C,...w]);c(b),v(!0)},[v]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&f){const x=m=>g(m,f),p=m=>g(m,l);return l.addEventListener("pointerleave",x),f.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",p)}}},[l,f,g,h]),i.useEffect(()=>{if(a){const x=p=>{const m=p.target,E={x:p.clientX,y:p.clientY},y=(l==null?void 0:l.contains(m))||(f==null?void 0:f.contains(m)),C=!jo(E,a);y?h():C&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,f,a,u,h]),d.jsx(It,{...e,ref:s})}),[Do,_o]=ue(Dt,{isInside:!1}),It=i.forwardRef((e,t)=>
vendor: 4,578 bytes, line 1
1{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=le(X,n),u=Ne(n),{onClose:f}=l;return i.useEffect(()=>(document.addEventListener(Be,f),()=>document.removeEventListener(Be,f)),[f]),i.useEffect(()=>{if(l.trigger){const v=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,f]),d.jsx(se,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:v=>v.preventDefault(),onDismiss:f,children:d.jsxs(To,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Je,{children:o}),d.jsx(Do,{scope:n,isInside:!0,children:d.jsx(Kn,{id:l.contentId,role:"tooltip",children:r||o})})]})})});_t.displayName=X;var Mt="TooltipArrow",Io=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ne(n);return _o(Mt,n).isInside?null:d.jsx(Po,{...r,...o,ref:t})});Io.displayName=Mt;function Mo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Lo(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Fo(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function jo(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s].x,l=t[s].y,u=t[a].x,f=t[a].y;l>o!=f>o&&n<(u-c)*(o-l)/(f-l)+c&&(r=!r)}return r}function $o(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),ko(t)}function ko(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var yr=Ot,wr=_t,ve="focusScope.autoFocusOnMount",me="focusScope.autoFocusOnUnmount",Ke={bubbles:!1,cancelable:!0},Wo="FocusScope",Lt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=I(r),f=I(s),v=i.useRef(null),h=O(t,p=>l(p)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let p=function(C){if(g.paused||!c)return;const w=C.target;c.contains(w)?v.current=w:H(v.current,{select:!0})},m=function(C){if(g.paused||!c)return;const w=C.relatedTarget;w!==null&&(c.contains(w)||H(v.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const b of C)b.removedNodes.length>0&&H(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",m);const y=new MutationObserver(E);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",m),y.disconnect()}}},[o,c,g.paused]),i.useEffect(()=>{if(c){ze.add(g);const p=document.activeElement;if(!c.contains(p)){const E=new CustomEvent(ve,Ke);c.addEventListener(ve,u),c.dispatchEvent(E),E.defaultPrevented||(Uo(Go(Ft(c)),{select:!0}),document.activeElement===p&&H(c))}return()=>{c.removeEventListener(ve,u),setTimeout(()=>{const E=new CustomEvent(me,Ke);c.addEventListener(me,f),c.dispatchEvent(E),E.defaultPrevented||H(p??document.body,{select:!0}),c.removeEventListener(me,f),ze.remove(g)},0)}}},[c,u,f,g]);const x=i.useCallback(p=>{if(!n&&!o||g.paused)return;const m=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,E=document.activeElement;if(m&&E){const y=p.currentTarget,[C,w]=Ho(y);C&&w?!p.shiftKey&&E===w?(p.preventDefault(),n&&H(C,{select:!0}
vendor: 7,433 bytes, lines 1-5
1)):p.shiftKey&&E===C&&(p.preventDefault(),n&&H(w,{select:!0})):E===y&&p.preventDefault()}},[n,o,g.paused]);return d.jsx(S.div,{tabIndex:-1,...a,ref:h,onKeyDown:x})});Lt.displayName=Wo;function Uo(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(H(o,{select:t}),document.activeElement!==n)return}function Ho(e){const t=Ft(e),n=Ge(t,e),o=Ge(t.reverse(),e);return[n,o]}function Ft(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ge(e,t){for(const n of e)if(!Vo(n,{upTo:t}))return n}function Vo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Bo(e){return e instanceof HTMLInputElement&&"select"in e}function H(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bo(e)&&t&&e.select()}}var ze=Ko();function Ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ye(e,t),e.unshift(t)},remove(t){var n;e=Ye(e,t),(n=e[0])==null||n.resume()}}}function Ye(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Go(e){return e.filter(t=>t.tagName!=="A")}var he=0;function zo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xe()),document.body.insertAdjacentElement("beforeend",e[1]??Xe()),he++,()=>{he===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),he--}},[])}function Xe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe="Dialog",[jt,Cr]=Te(Oe),[Yo,L]=jt(Oe),$t=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u=!1,f]=ot({prop:o,defaultProp:r,onChange:s});return d.jsx(Yo,{scope:t,triggerRef:c,contentRef:l,contentId:pe(),titleId:pe(),descriptionId:pe(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(v=>!v),[f]),modal:a,children:n})};$t.displayName=Oe;var kt="DialogTrigger",Wt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=L(kt,n),s=O(t,r.triggerRef);return d.jsx(S.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ie(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});Wt.displayName=kt;var De="DialogPortal",[Xo,Ut]=jt(De,{forceMount:void 0}),Ht=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=L(De,t);return d.jsx(Xo,{scope:t,forceMount:n,children:i.Children.map(o,a=>d.jsx(q,{present:n||s.open,children:d.jsx(Pe,{asChild:!0,container:r,children:a})}))})};Ht.displayName=De;var re="DialogOverlay",Vt=i.forwardRef((e,t)=>{const n=Ut(re,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=L(re,e.__scopeDialog);return s.modal?d.jsx(q,{present:o||s.open,children:d.jsx(qo,{...r,ref:t})}):null});Vt.displayName=re;var qo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=L(re,n);return d.jsx(gn,{as:Q,allowPinchZoom:!0,shards:[r.contentRef],children:d.jsx(S.div,{"data-state":Ie(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),G="DialogContent",Bt=i.forwardRef((e,t)=>{const n=Ut(G,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=L(G,e.__scopeDialog);return d.jsx(q,{present:o||s.open,children:s.modal?d.jsx(Zo,{...r,ref:t}):d.jsx(Jo,{...r,ref:t})})});Bt.displayName=G;var Zo=i.forwardRef((e,t)=>{const n=L(G,e.__scopeDialog),o=i.useRef(null),r=O(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return En(s)},[]),d.jsx(Kt,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),Jo=i.forwardRef((e,t)=>{const n=L(G,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return d.jsx(Kt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Kt=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=L(G,n),l=i.useRef(null),u=O(t,l);return zo(),d.jsxs(d.Fragment,{children:[d.jsx(Lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:d.jsx(se,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Ie(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Qo,{titleId:c.titleId}),d.jsx(tr,{contentRef:l,descriptionId:c.descriptionId})]})]})}),_e="DialogTitle",Gt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=L(_e,n);return d.jsx(S.h2,{id:r.titleId,...o,ref:t})});Gt.displayName=_e;var zt="DialogDescription",Yt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=L(zt,n);return d.jsx(S.p,{id:r.descriptionId,...o,ref:t})});Yt.displayName=zt;var Xt="DialogClose",qt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=L(Xt,n);return d.jsx(S.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});qt.displayName=Xt;function Ie(e){return e?"open":"closed"}var Zt="DialogTitleWarning",[Tr,Jt]=An(Zt,{contentName:G,titleName:_e,docsSlug:"dialog"}),Qo=({titleId:e})=>{const t=Jt(Zt),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 i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},er="DialogDescriptionWarning",tr=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jt(er).contentName}}.`;return i.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Pr=$t,br=Wt,Rr=Ht,Ar=Vt,Sr=Bt,Nr=Gt,Or=Yt,Dr=qt,nr="Label",Qt=i.forwardRef((e,t)=>d.jsx(S.label,{...e,ref:t,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Qt.displayName=nr;var _r=Qt;export{vr as A,mr as C,pr as D,Ar as O,ur as P,dr as R,Q as S,fr as T,lr as V,wr as a,yr as b,Sr as c,Dr as d,Nr as e,Or as f,Rr as g,Pr as h,br as i,_r as j};
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.