rechtspilot-ui 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +53 -61
- package/dist/index.es.js +1826 -1829
- package/dist/index.native.cjs +34 -42
- package/dist/index.native.es.js +91 -94
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -133,19 +133,19 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
133
133
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
134
134
|
|
|
135
135
|
For 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},Un=`DialogDescriptionWarning`,Wn=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(Un).contentName}}.`;return i.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Gn=gn,Kn=Sn,qn=wn,Jn=On,Yn=Nn,Xn=Fn,Zn=Ln,Qn=Gn,$n=Kn,er=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(qn,{ref:i,className:e.R(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,t),...r}));er.displayName=qn.displayName;var tr=i.forwardRef(({className:t,children:r,...i},a)=>(0,n.jsxs)($n,{children:[(0,n.jsx)(er,{}),(0,n.jsxs)(Jn,{ref:a,translate:`no`,className:e.R(`fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950`,t),...i,children:[r,(0,n.jsxs)(Zn,{className:`absolute right-4 top-4 rounded-xs opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400`,children:[(0,n.jsx)(e.I,{className:`h-4 w-4`}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));tr.displayName=Jn.displayName;var nr=({className:t,...r})=>(0,n.jsx)(`div`,{className:e.R(`flex flex-col space-y-1.5 text-center sm:text-left`,t),...r});nr.displayName=`DialogHeader`;var rr=({className:t,...r})=>(0,n.jsx)(`div`,{className:e.R(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,t),...r});rr.displayName=`DialogFooter`;var ir=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(Yn,{ref:i,className:e.R(`text-lg font-semibold leading-none tracking-tight hidden`,t),...r}));ir.displayName=Yn.displayName;var ar=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(Xn,{ref:i,className:e.R(`text-sm text-neutral-500 dark:text-neutral-400`,t),...r}));ar.displayName=Xn.displayName;function or({open:e,toggleDialog:t,children:r,...i}){return(0,n.jsx)(Qn,{open:e,onOpenChange:t,...i,children:r})}var sr=(0,i.forwardRef)(({className:t,...r},i)=>(0,n.jsx)(qn,{ref:i,className:e.R(`fixed inset-0 z-50 bg-black/30 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,t),...r}));sr.displayName=qn.displayName;var cr=(0,t.styled)(Jn)`
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
height:
|
|
136
|
+
width: ${({$width:e,$fullScreen:t})=>t?`100vw`:e||`36.25rem`};
|
|
137
|
+
height: ${({$height:e,$fullScreen:t})=>t?`100dvh`:e||`48.75rem`};
|
|
138
|
+
max-height: 100dvh;
|
|
139
139
|
border-radius: ${({$fullScreen:e})=>e?`0`:`1.25rem`};
|
|
140
140
|
background: ${({$background:e})=>e};
|
|
141
141
|
overflow: hidden;
|
|
142
142
|
`,lr=t.styled.div`
|
|
143
143
|
width: ${({$width:e,$fullScreen:t})=>t?`100vw`:e||`36.25rem`};
|
|
144
144
|
height: ${({$height:e,$fullScreen:t})=>t?`100dvh`:e||`48.75rem`};
|
|
145
|
-
|
|
146
|
-
transform-origin: top left;
|
|
145
|
+
max-height: 100dvh;
|
|
147
146
|
display: flex;
|
|
148
147
|
flex-direction: column;
|
|
148
|
+
overflow-y: auto;
|
|
149
149
|
`,ur=(0,i.forwardRef)(({width:t,height:r,background:i,fullScreen:a,children:o,...s},l)=>{let u=c(),d=i||e.B.white;return(0,n.jsxs)(Sn,{children:[(0,n.jsx)(sr,{}),(0,n.jsx)(cr,{$width:t,$height:r,$fullScreen:a===void 0?u:a,$background:d,ref:l,className:e.R(`fixed left-1/2 top-1/2 z-50 transform -translate-x-1/2 -translate-y-1/2`),"aria-describedby":void 0,...s,children:(0,n.jsxs)(lr,{$width:t,$height:r,$fullScreen:a===void 0?u:a,children:[(0,n.jsx)(ir,{}),(0,n.jsx)(ar,{}),o]})})]})});ur.displayName=On.displayName;var dr=t.styled.div`
|
|
150
150
|
width: 100%;
|
|
151
151
|
height: 100%;
|
|
@@ -621,77 +621,69 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
621
621
|
&::-webkit-inner-spin-button {
|
|
622
622
|
-webkit-appearance: none;
|
|
623
623
|
}
|
|
624
|
-
`;function Jc({label:e,value:t,type:r,currency:a,onChange:o,onBlur:s,tooltipText:c,error:l,helperText:u,...d}){let f=a?`number`:r||`text`,m=(0,i.useId)();return(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(Wc,{$error:!!l,children:[a&&(0,n.jsx)(zc,{value:`€`,children:(0,n.jsx)(Nc,{value:`€`,children:`EUR (€)`})}),(0,n.jsxs)(Gc,{children:[(0,n.jsx)(qc,{type:f,id:`${m}-${e}`,onChange:e=>o(e.target.value),onBlur:s,value:t,...d}),(0,n.jsx)(Kc,{htmlFor:`${m}-${e}`,$hasValue:!!t,children:e})]}),c&&(0,n.jsx)(Hc,{children:c})]}),(l||u)&&(0,n.jsx)(p,{error:!!l,children:l||u})]})}var Yc=t.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
624
|
+
`;function Jc({label:e,value:t,type:r,currency:a,onChange:o,onBlur:s,tooltipText:c,error:l,helperText:u,...d}){let f=a?`number`:r||`text`,m=(0,i.useId)();return(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(Wc,{$error:!!l,children:[a&&(0,n.jsx)(zc,{value:`€`,children:(0,n.jsx)(Nc,{value:`€`,children:`EUR (€)`})}),(0,n.jsxs)(Gc,{children:[(0,n.jsx)(qc,{type:f,id:`${m}-${e}`,onChange:e=>o(e.target.value),onBlur:s,value:t,...d}),(0,n.jsx)(Kc,{htmlFor:`${m}-${e}`,$hasValue:!!t,children:e})]}),c&&(0,n.jsx)(Hc,{children:c})]}),(l||u)&&(0,n.jsx)(p,{error:!!l,children:l||u})]})}var Yc=t.keyframes`
|
|
625
|
+
0% {
|
|
626
|
+
transform: translateY(-150%);
|
|
627
|
+
opacity: 0;
|
|
628
|
+
}
|
|
629
|
+
25%,
|
|
630
|
+
50%,
|
|
631
|
+
75% {
|
|
632
|
+
transform: translateY(0);
|
|
633
|
+
opacity: 1;
|
|
634
|
+
}
|
|
635
|
+
100% {
|
|
636
|
+
transform: translateY(150%);
|
|
637
|
+
opacity: 0;
|
|
638
|
+
}
|
|
639
|
+
`,Xc=t.styled.div`
|
|
640
|
+
display: inline-flex;
|
|
641
|
+
align-items: center;
|
|
642
|
+
justify-content: space-between;
|
|
628
643
|
width: ${({$size:e})=>e};
|
|
629
|
-
height: ${({$size:e})=>e};
|
|
630
|
-
animation: rotate-anim 2s infinite linear;
|
|
644
|
+
height: calc(${({$size:e})=>e} / 4);
|
|
631
645
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
position: absolute;
|
|
636
|
-
top: 50%;
|
|
637
|
-
left: 50%;
|
|
638
|
-
background: ${({$color:e})=>e};
|
|
646
|
+
span {
|
|
647
|
+
width: calc(${({$size:e})=>e} / 4);
|
|
648
|
+
height: calc(${({$size:e})=>e} / 4);
|
|
639
649
|
border-radius: 50%;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
&:before {
|
|
644
|
-
height: 75%;
|
|
645
|
-
width: 75%;
|
|
646
|
-
transform-origin: -40% -80%;
|
|
650
|
+
background-color: ${({$color:e})=>e};
|
|
651
|
+
animation: ${Yc} 1s infinite linear;
|
|
647
652
|
}
|
|
648
653
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
width: 50%;
|
|
652
|
-
transform-origin: 40% 80%;
|
|
654
|
+
span:nth-child(1) {
|
|
655
|
+
animation-delay: 0s;
|
|
653
656
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
to {
|
|
657
|
-
transform: rotate(360deg);
|
|
658
|
-
}
|
|
657
|
+
span:nth-child(2) {
|
|
658
|
+
animation-delay: 0.1s;
|
|
659
659
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
0%,
|
|
663
|
-
100% {
|
|
664
|
-
transform: translate(-50%, -50%) scale(1);
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
50% {
|
|
668
|
-
transform: translate(-50%, -50%) scale(0);
|
|
669
|
-
}
|
|
660
|
+
span:nth-child(3) {
|
|
661
|
+
animation-delay: 0.2s;
|
|
670
662
|
}
|
|
671
|
-
`;function Xc({size:t=`4rem`,color:r=e.B.fg.primary}){return(0,n.jsx)(Yc,{$size:t,$color:r})}var Zc=1,Qc=1e6,$c=0;function el(){return $c=($c+1)%(2**53-1),$c.toString()}var tl=new Map,nl=e=>{if(tl.has(e))return;let t=setTimeout(()=>{tl.delete(e),ol({type:`REMOVE_TOAST`,toastId:e})},Qc);tl.set(e,t)},rl=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zc)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?nl(n):e.toasts.forEach(e=>{nl(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},il=[],al={toasts:[]};function ol(e){al=rl(al,e),il.forEach(e=>{e(al)})}function sl({...e}){let t=el(),n=e=>ol({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>ol({type:`DISMISS_TOAST`,toastId:t});return ol({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function cl(){let[e,t]=i.useState(al);return i.useEffect(()=>(il.push(t),()=>{let e=il.indexOf(t);e>-1&&il.splice(e,1)}),[e]),{...e,toast:sl,dismiss:e=>ol({type:`DISMISS_TOAST`,toastId:e})}}function ll(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9 7.58579L7.58579 9L10.5858 12L7.58579 15L9 16.4142L12 13.4142L15 16.4142L16.4142 15L13.4142 12L16.4142 9L15 7.58579L12 10.5858L9 7.58579Z`,fill:`#FE4C00`})})}function ul(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM10 10H13V17H11V12H10V10ZM11 9V7H13V9H11Z`,fill:`#9DA7A2`})})}function dl(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 21.9996C17.5228 21.9996 22 17.5225 22 11.9996C22 6.47679 17.5228 1.99963 12 1.99963C6.47715 1.99963 2 6.47679 2 11.9996C2 17.5225 6.47715 21.9996 12 21.9996ZM10.5744 16.4881L16.4073 9.35888L14.8594 8.09241L10.4259 13.5112L8.50015 11.5854L7.08594 12.9996L10.5744 16.4881Z`,fill:`#3B872C`})})}function fl(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.7367 4.53861C12.9689 3.19498 11.0315 3.19498 10.2637 4.53861L1.71007 19.5075C0.948179 20.8408 1.91091 22.4998 3.44656 22.4998H20.5538C22.0895 22.4998 23.0522 20.8408 22.2903 19.5075L13.7367 4.53861ZM11 9.49997H13V15.5H11V9.49997ZM11 17.5H13V19.5H11V17.5Z`,fill:`#FEA900`})})}var pl=`ToastProvider`,[ml,hl,gl]=ui(`Toast`),[_l,vl]=w(`Toast`,[gl]),[yl,bl]=_l(pl),xl=e=>{let{__scopeToast:t,label:r=`Notification`,duration:a=5e3,swipeDirection:o=`right`,swipeThreshold:s=50,children:c}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),p=i.useRef(!1),m=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${pl}\`. Expected non-empty \`string\`.`),(0,n.jsx)(ml.Provider,{scope:t,children:(0,n.jsx)(yl,{scope:t,label:r,duration:a,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(e=>e+1),[]),onToastRemove:i.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:c})})};xl.displayName=pl;var Sl=`ToastViewport`,Cl=[`F8`],wl=`toast.viewportPause`,Tl=`toast.viewportResume`,El=i.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:a=Cl,label:o=`Notifications ({hotkey})`,...s}=e,c=bl(Sl,r),l=hl(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),p=i.useRef(null),m=S(t,p,c.onViewportChange),h=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),g=c.toastCount>0;i.useEffect(()=>{let e=e=>{a.length!==0&&a.every(t=>e[t]||e.code===t)&&p.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),i.useEffect(()=>{let e=u.current,t=p.current;if(g&&e&&t){let n=()=>{if(!c.isClosePausedRef.current){let e=new CustomEvent(wl);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){let e=new CustomEvent(Tl);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[g,c.isClosePausedRef]);let _=i.useCallback(({tabbingDirection:e})=>{let t=l().map(t=>{let n=t.ref.current,r=[n,...$l(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[l]);return i.useEffect(()=>{let e=p.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){d.current?.focus();return}let i=_({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);eu(i.slice(a+1))?t.preventDefault():r?d.current?.focus():f.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[l,_]),(0,n.jsxs)(ye,{ref:u,role:`region`,"aria-label":o.replace(`{hotkey}`,h),tabIndex:-1,style:{pointerEvents:g?void 0:`none`},children:[g&&(0,n.jsx)(Ol,{ref:d,onFocusFromOutsideViewport:()=>{eu(_({tabbingDirection:`forwards`}))}}),(0,n.jsx)(ml.Slot,{scope:r,children:(0,n.jsx)(R.ol,{tabIndex:-1,...s,ref:m})}),g&&(0,n.jsx)(Ol,{ref:f,onFocusFromOutsideViewport:()=>{eu(_({tabbingDirection:`backwards`}))}})]})});El.displayName=Sl;var Dl=`ToastFocusProxy`,Ol=i.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:i,...a}=e,o=bl(Dl,r);return(0,n.jsx)(Ko,{tabIndex:0,...a,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;o.viewport?.contains(t)||i()}})});Ol.displayName=Dl;var kl=`Toast`,Al=`toast.swipeStart`,jl=`toast.swipeMove`,Ml=`toast.swipeCancel`,Nl=`toast.swipeEnd`,Pl=i.forwardRef((e,t)=>{let{forceMount:r,open:i,defaultOpen:a,onOpenChange:o,...s}=e,[c,l]=j({prop:i,defaultProp:a??!0,onChange:o,caller:kl});return(0,n.jsx)(B,{present:r||c,children:(0,n.jsx)(Ll,{open:c,...s,ref:t,onClose:()=>l(!1),onPause:z(e.onPause),onResume:z(e.onResume),onSwipeStart:y(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:y(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:y(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:y(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),l(!1)})})})});Pl.displayName=kl;var[Fl,Il]=_l(kl,{onClose(){}}),Ll=i.forwardRef((e,t)=>{let{__scopeToast:r,type:o=`foreground`,duration:s,open:c,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:h,onSwipeEnd:g,..._}=e,v=bl(kl,r),[b,x]=i.useState(null),C=S(t,e=>x(e)),w=i.useRef(null),T=i.useRef(null),E=s||v.duration,D=i.useRef(0),O=i.useRef(E),k=i.useRef(0),{onToastAdd:A,onToastRemove:j}=v,M=z(()=>{b?.contains(document.activeElement)&&v.viewport?.focus(),l()}),N=i.useCallback(e=>{!e||e===1/0||(window.clearTimeout(k.current),D.current=new Date().getTime(),k.current=window.setTimeout(M,e))},[M]);i.useEffect(()=>{let e=v.viewport;if(e){let t=()=>{N(O.current),f?.()},n=()=>{let e=new Date().getTime()-D.current;O.current-=e,window.clearTimeout(k.current),d?.()};return e.addEventListener(wl,n),e.addEventListener(Tl,t),()=>{e.removeEventListener(wl,n),e.removeEventListener(Tl,t)}}},[v.viewport,E,d,f,N]),i.useEffect(()=>{c&&!v.isClosePausedRef.current&&N(E)},[c,E,v.isClosePausedRef,N]),i.useEffect(()=>(A(),()=>j()),[A,j]);let P=i.useMemo(()=>b?Jl(b):null,[b]);return v.viewport?(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)(Rl,{__scopeToast:r,role:`status`,"aria-live":o===`foreground`?`assertive`:`polite`,children:P}),(0,n.jsx)(Fl,{scope:r,onClose:M,children:a.createPortal((0,n.jsx)(ml.ItemSlot,{scope:r,children:(0,n.jsx)(ve,{asChild:!0,onEscapeKeyDown:y(u,()=>{v.isFocusedToastEscapeKeyDownRef.current||M(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,n.jsx)(R.li,{tabIndex:0,"data-state":c?`open`:`closed`,"data-swipe-direction":v.swipeDirection,..._,ref:C,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:y(e.onKeyDown,e=>{e.key===`Escape`&&(u?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:y(e.onPointerDown,e=>{e.button===0&&(w.current={x:e.clientX,y:e.clientY})}),onPointerMove:y(e.onPointerMove,e=>{if(!w.current)return;let t=e.clientX-w.current.x,n=e.clientY-w.current.y,r=!!T.current,i=[`left`,`right`].includes(v.swipeDirection),a=[`left`,`up`].includes(v.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(T.current=l,Yl(jl,m,u,{discrete:!1})):Xl(l,v.swipeDirection,c)?(T.current=l,Yl(Al,p,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(w.current=null)}),onPointerUp:y(e.onPointerUp,e=>{let t=T.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),T.current=null,w.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Xl(t,v.swipeDirection,v.swipeThreshold)?Yl(Nl,g,r,{discrete:!0}):Yl(Ml,h,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),Rl=e=>{let{__scopeToast:t,children:r,...a}=e,o=bl(kl,t),[s,c]=i.useState(!1),[l,u]=i.useState(!1);return Zl(()=>c(!0)),i.useEffect(()=>{let e=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(e)},[]),l?null:(0,n.jsx)(Le,{asChild:!0,children:(0,n.jsx)(Ko,{...a,children:s&&(0,n.jsxs)(n.Fragment,{children:[o.label,` `,r]})})})},zl=`ToastTitle`,Bl=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e;return(0,n.jsx)(R.div,{...i,ref:t})});Bl.displayName=zl;var Vl=`ToastDescription`,Hl=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e;return(0,n.jsx)(R.div,{...i,ref:t})});Hl.displayName=Vl;var Ul=`ToastAction`,Wl=i.forwardRef((e,t)=>{let{altText:r,...i}=e;return r.trim()?(0,n.jsx)(ql,{altText:r,asChild:!0,children:(0,n.jsx)(Kl,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ul}\`. Expected non-empty \`string\`.`),null)});Wl.displayName=Ul;var Gl=`ToastClose`,Kl=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e,a=Il(Gl,r);return(0,n.jsx)(ql,{asChild:!0,children:(0,n.jsx)(R.button,{type:`button`,...i,ref:t,onClick:y(e.onClick,a.onClose)})})});Kl.displayName=Gl;var ql=i.forwardRef((e,t)=>{let{__scopeToast:r,altText:i,...a}=e;return(0,n.jsx)(R.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":i||void 0,...a,ref:t})});function Jl(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Ql(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Jl(e))}}),t}function Yl(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?re(i,a):i.dispatchEvent(a)}var Xl=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Zl(e=()=>{}){let t=z(e);E(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Ql(e){return e.nodeType===e.ELEMENT_NODE}function $l(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eu(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var tu=xl,nu=El,ru=Pl,iu=Bl,au=Hl,ou=Wl,su=Kl,cu=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,lu=e.z,uu=(e,t)=>n=>{if(t?.variants==null)return lu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=cu(t)||cu(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return lu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},du=tu,fu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(nu,{ref:i,className:e.R(`fixed bottom-0 right-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:w-fit sm:min-w-[300px] sm:max-w-[420px]`,t),...r}));fu.displayName=nu.displayName;var pu=uu(`group pointer-events-auto relative flex w-full items-center overflow-hidden pr-8 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full`),mu=i.forwardRef(({className:t,testId:r,...i},a)=>(0,n.jsx)(ru,{"data-testid":r,ref:a,className:e.R(pu(),t),...i}));mu.displayName=ru.displayName;var hu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(ou,{ref:i,className:e.R(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-hidden focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 hover:group-[.destructive]:border-red-500/30 hover:group-[.destructive]:bg-red-500 hover:group-[.destructive]:text-neutral-50 focus:group-[.destructive]:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:hover:group-[.destructive]:border-red-900/30 dark:hover:group-[.destructive]:bg-red-900 dark:hover:group-[.destructive]:text-neutral-50 dark:focus:group-[.destructive]:ring-red-900`,t),...r}));hu.displayName=ou.displayName;var gu=i.forwardRef(({color:t,...r},i)=>(0,n.jsx)(su,{ref:i,"toast-close":``,...r,children:(0,n.jsx)(e.I,{color:t,className:`h-4 w-4`})}));gu.displayName=su.displayName;var _u=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(iu,{ref:i,className:e.R(`text-sm font-semibold`,t),...r}));_u.displayName=iu.displayName;var vu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(au,{ref:i,className:e.R(`text-sm opacity-90`,t),...r}));vu.displayName=au.displayName;var yu={success:{background:e.B.sf.light.action,color:e.B.fg.accent.action},error:{background:e.B.sf.light.error,color:e.B.fg.accent.error},info:{background:e.B.sf.light.tertiary,color:e.B.fg.base},warning:{background:e.B.sf.light.warning,color:e.B.fg.accent.warning}},bu=(0,t.styled)(mu)`
|
|
663
|
+
`;function Zc({size:t=`4rem`,color:r=e.B.fg.primary}){return(0,n.jsxs)(Xc,{$size:t,$color:r,children:[(0,n.jsx)(`span`,{}),(0,n.jsx)(`span`,{}),(0,n.jsx)(`span`,{})]})}var Qc=1,$c=1e6,el=0;function tl(){return el=(el+1)%(2**53-1),el.toString()}var nl=new Map,rl=e=>{if(nl.has(e))return;let t=setTimeout(()=>{nl.delete(e),sl({type:`REMOVE_TOAST`,toastId:e})},$c);nl.set(e,t)},il=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,Qc)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?rl(n):e.toasts.forEach(e=>{rl(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},al=[],ol={toasts:[]};function sl(e){ol=il(ol,e),al.forEach(e=>{e(ol)})}function cl({...e}){let t=tl(),n=e=>sl({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>sl({type:`DISMISS_TOAST`,toastId:t});return sl({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function ll(){let[e,t]=i.useState(ol);return i.useEffect(()=>(al.push(t),()=>{let e=al.indexOf(t);e>-1&&al.splice(e,1)}),[e]),{...e,toast:cl,dismiss:e=>sl({type:`DISMISS_TOAST`,toastId:e})}}function ul(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9 7.58579L7.58579 9L10.5858 12L7.58579 15L9 16.4142L12 13.4142L15 16.4142L16.4142 15L13.4142 12L16.4142 9L15 7.58579L12 10.5858L9 7.58579Z`,fill:`#FE4C00`})})}function dl(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM10 10H13V17H11V12H10V10ZM11 9V7H13V9H11Z`,fill:`#9DA7A2`})})}function fl(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 21.9996C17.5228 21.9996 22 17.5225 22 11.9996C22 6.47679 17.5228 1.99963 12 1.99963C6.47715 1.99963 2 6.47679 2 11.9996C2 17.5225 6.47715 21.9996 12 21.9996ZM10.5744 16.4881L16.4073 9.35888L14.8594 8.09241L10.4259 13.5112L8.50015 11.5854L7.08594 12.9996L10.5744 16.4881Z`,fill:`#3B872C`})})}function pl(){return(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.7367 4.53861C12.9689 3.19498 11.0315 3.19498 10.2637 4.53861L1.71007 19.5075C0.948179 20.8408 1.91091 22.4998 3.44656 22.4998H20.5538C22.0895 22.4998 23.0522 20.8408 22.2903 19.5075L13.7367 4.53861ZM11 9.49997H13V15.5H11V9.49997ZM11 17.5H13V19.5H11V17.5Z`,fill:`#FEA900`})})}var ml=`ToastProvider`,[hl,gl,_l]=ui(`Toast`),[vl,yl]=w(`Toast`,[_l]),[bl,xl]=vl(ml),Sl=e=>{let{__scopeToast:t,label:r=`Notification`,duration:a=5e3,swipeDirection:o=`right`,swipeThreshold:s=50,children:c}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),p=i.useRef(!1),m=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ml}\`. Expected non-empty \`string\`.`),(0,n.jsx)(hl.Provider,{scope:t,children:(0,n.jsx)(bl,{scope:t,label:r,duration:a,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(e=>e+1),[]),onToastRemove:i.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:c})})};Sl.displayName=ml;var Cl=`ToastViewport`,wl=[`F8`],Tl=`toast.viewportPause`,El=`toast.viewportResume`,Dl=i.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:a=wl,label:o=`Notifications ({hotkey})`,...s}=e,c=xl(Cl,r),l=gl(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),p=i.useRef(null),m=S(t,p,c.onViewportChange),h=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),g=c.toastCount>0;i.useEffect(()=>{let e=e=>{a.length!==0&&a.every(t=>e[t]||e.code===t)&&p.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),i.useEffect(()=>{let e=u.current,t=p.current;if(g&&e&&t){let n=()=>{if(!c.isClosePausedRef.current){let e=new CustomEvent(Tl);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){let e=new CustomEvent(El);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[g,c.isClosePausedRef]);let _=i.useCallback(({tabbingDirection:e})=>{let t=l().map(t=>{let n=t.ref.current,r=[n,...eu(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[l]);return i.useEffect(()=>{let e=p.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){d.current?.focus();return}let i=_({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);tu(i.slice(a+1))?t.preventDefault():r?d.current?.focus():f.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[l,_]),(0,n.jsxs)(ye,{ref:u,role:`region`,"aria-label":o.replace(`{hotkey}`,h),tabIndex:-1,style:{pointerEvents:g?void 0:`none`},children:[g&&(0,n.jsx)(kl,{ref:d,onFocusFromOutsideViewport:()=>{tu(_({tabbingDirection:`forwards`}))}}),(0,n.jsx)(hl.Slot,{scope:r,children:(0,n.jsx)(R.ol,{tabIndex:-1,...s,ref:m})}),g&&(0,n.jsx)(kl,{ref:f,onFocusFromOutsideViewport:()=>{tu(_({tabbingDirection:`backwards`}))}})]})});Dl.displayName=Cl;var Ol=`ToastFocusProxy`,kl=i.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:i,...a}=e,o=xl(Ol,r);return(0,n.jsx)(Ko,{tabIndex:0,...a,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;o.viewport?.contains(t)||i()}})});kl.displayName=Ol;var Al=`Toast`,jl=`toast.swipeStart`,Ml=`toast.swipeMove`,Nl=`toast.swipeCancel`,Pl=`toast.swipeEnd`,Fl=i.forwardRef((e,t)=>{let{forceMount:r,open:i,defaultOpen:a,onOpenChange:o,...s}=e,[c,l]=j({prop:i,defaultProp:a??!0,onChange:o,caller:Al});return(0,n.jsx)(B,{present:r||c,children:(0,n.jsx)(Rl,{open:c,...s,ref:t,onClose:()=>l(!1),onPause:z(e.onPause),onResume:z(e.onResume),onSwipeStart:y(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:y(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:y(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:y(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),l(!1)})})})});Fl.displayName=Al;var[Il,Ll]=vl(Al,{onClose(){}}),Rl=i.forwardRef((e,t)=>{let{__scopeToast:r,type:o=`foreground`,duration:s,open:c,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:h,onSwipeEnd:g,..._}=e,v=xl(Al,r),[b,x]=i.useState(null),C=S(t,e=>x(e)),w=i.useRef(null),T=i.useRef(null),E=s||v.duration,D=i.useRef(0),O=i.useRef(E),k=i.useRef(0),{onToastAdd:A,onToastRemove:j}=v,M=z(()=>{b?.contains(document.activeElement)&&v.viewport?.focus(),l()}),N=i.useCallback(e=>{!e||e===1/0||(window.clearTimeout(k.current),D.current=new Date().getTime(),k.current=window.setTimeout(M,e))},[M]);i.useEffect(()=>{let e=v.viewport;if(e){let t=()=>{N(O.current),f?.()},n=()=>{let e=new Date().getTime()-D.current;O.current-=e,window.clearTimeout(k.current),d?.()};return e.addEventListener(Tl,n),e.addEventListener(El,t),()=>{e.removeEventListener(Tl,n),e.removeEventListener(El,t)}}},[v.viewport,E,d,f,N]),i.useEffect(()=>{c&&!v.isClosePausedRef.current&&N(E)},[c,E,v.isClosePausedRef,N]),i.useEffect(()=>(A(),()=>j()),[A,j]);let P=i.useMemo(()=>b?Yl(b):null,[b]);return v.viewport?(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)(zl,{__scopeToast:r,role:`status`,"aria-live":o===`foreground`?`assertive`:`polite`,children:P}),(0,n.jsx)(Il,{scope:r,onClose:M,children:a.createPortal((0,n.jsx)(hl.ItemSlot,{scope:r,children:(0,n.jsx)(ve,{asChild:!0,onEscapeKeyDown:y(u,()=>{v.isFocusedToastEscapeKeyDownRef.current||M(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,n.jsx)(R.li,{tabIndex:0,"data-state":c?`open`:`closed`,"data-swipe-direction":v.swipeDirection,..._,ref:C,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:y(e.onKeyDown,e=>{e.key===`Escape`&&(u?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:y(e.onPointerDown,e=>{e.button===0&&(w.current={x:e.clientX,y:e.clientY})}),onPointerMove:y(e.onPointerMove,e=>{if(!w.current)return;let t=e.clientX-w.current.x,n=e.clientY-w.current.y,r=!!T.current,i=[`left`,`right`].includes(v.swipeDirection),a=[`left`,`up`].includes(v.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(T.current=l,Xl(Ml,m,u,{discrete:!1})):Zl(l,v.swipeDirection,c)?(T.current=l,Xl(jl,p,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(w.current=null)}),onPointerUp:y(e.onPointerUp,e=>{let t=T.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),T.current=null,w.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Zl(t,v.swipeDirection,v.swipeThreshold)?Xl(Pl,g,r,{discrete:!0}):Xl(Nl,h,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),zl=e=>{let{__scopeToast:t,children:r,...a}=e,o=xl(Al,t),[s,c]=i.useState(!1),[l,u]=i.useState(!1);return Ql(()=>c(!0)),i.useEffect(()=>{let e=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(e)},[]),l?null:(0,n.jsx)(Le,{asChild:!0,children:(0,n.jsx)(Ko,{...a,children:s&&(0,n.jsxs)(n.Fragment,{children:[o.label,` `,r]})})})},Bl=`ToastTitle`,Vl=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e;return(0,n.jsx)(R.div,{...i,ref:t})});Vl.displayName=Bl;var Hl=`ToastDescription`,Ul=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e;return(0,n.jsx)(R.div,{...i,ref:t})});Ul.displayName=Hl;var Wl=`ToastAction`,Gl=i.forwardRef((e,t)=>{let{altText:r,...i}=e;return r.trim()?(0,n.jsx)(Jl,{altText:r,asChild:!0,children:(0,n.jsx)(ql,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Wl}\`. Expected non-empty \`string\`.`),null)});Gl.displayName=Wl;var Kl=`ToastClose`,ql=i.forwardRef((e,t)=>{let{__scopeToast:r,...i}=e,a=Ll(Kl,r);return(0,n.jsx)(Jl,{asChild:!0,children:(0,n.jsx)(R.button,{type:`button`,...i,ref:t,onClick:y(e.onClick,a.onClose)})})});ql.displayName=Kl;var Jl=i.forwardRef((e,t)=>{let{__scopeToast:r,altText:i,...a}=e;return(0,n.jsx)(R.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":i||void 0,...a,ref:t})});function Yl(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),$l(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Yl(e))}}),t}function Xl(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?re(i,a):i.dispatchEvent(a)}var Zl=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Ql(e=()=>{}){let t=z(e);E(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function $l(e){return e.nodeType===e.ELEMENT_NODE}function eu(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tu(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var nu=Sl,ru=Dl,iu=Fl,au=Vl,ou=Ul,su=Gl,cu=ql,lu=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,uu=e.z,du=(e,t)=>n=>{if(t?.variants==null)return uu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=lu(t)||lu(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return uu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},fu=nu,pu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(ru,{ref:i,className:e.R(`fixed bottom-0 right-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:w-fit sm:min-w-[300px] sm:max-w-[420px]`,t),...r}));pu.displayName=ru.displayName;var mu=du(`group pointer-events-auto relative flex w-full items-center overflow-hidden pr-8 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full`),hu=i.forwardRef(({className:t,testId:r,...i},a)=>(0,n.jsx)(iu,{"data-testid":r,ref:a,className:e.R(mu(),t),...i}));hu.displayName=iu.displayName;var gu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(su,{ref:i,className:e.R(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-hidden focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 hover:group-[.destructive]:border-red-500/30 hover:group-[.destructive]:bg-red-500 hover:group-[.destructive]:text-neutral-50 focus:group-[.destructive]:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:hover:group-[.destructive]:border-red-900/30 dark:hover:group-[.destructive]:bg-red-900 dark:hover:group-[.destructive]:text-neutral-50 dark:focus:group-[.destructive]:ring-red-900`,t),...r}));gu.displayName=su.displayName;var _u=i.forwardRef(({color:t,...r},i)=>(0,n.jsx)(cu,{ref:i,"toast-close":``,...r,children:(0,n.jsx)(e.I,{color:t,className:`h-4 w-4`})}));_u.displayName=cu.displayName;var vu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(au,{ref:i,className:e.R(`text-sm font-semibold`,t),...r}));vu.displayName=au.displayName;var yu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(ou,{ref:i,className:e.R(`text-sm opacity-90`,t),...r}));yu.displayName=ou.displayName;var bu={success:{background:e.B.sf.light.action,color:e.B.fg.accent.action},error:{background:e.B.sf.light.error,color:e.B.fg.accent.error},info:{background:e.B.sf.light.tertiary,color:e.B.fg.base},warning:{background:e.B.sf.light.warning,color:e.B.fg.accent.warning}},xu=(0,t.styled)(hu)`
|
|
672
664
|
border-radius: 1rem;
|
|
673
665
|
padding: 0.75rem;
|
|
674
666
|
border: none;
|
|
675
667
|
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.04);
|
|
676
668
|
font-size: 0.813rem;
|
|
677
|
-
background: ${({$variant:e})=>
|
|
678
|
-
color: ${({$variant:e})=>
|
|
669
|
+
background: ${({$variant:e})=>bu[e].background};
|
|
670
|
+
color: ${({$variant:e})=>bu[e].color};
|
|
679
671
|
gap: 0.5rem;
|
|
680
|
-
`,
|
|
672
|
+
`,Su=t.styled.div`
|
|
681
673
|
display: flex;
|
|
682
674
|
flex-direction: column;
|
|
683
675
|
width: 100%;
|
|
684
|
-
`,
|
|
676
|
+
`,Cu=t.styled.div`
|
|
685
677
|
width: 1.5rem;
|
|
686
678
|
height: 1.5rem;
|
|
687
|
-
`,Cu=(0,t.styled)(_u)`
|
|
688
|
-
${e.V.label}
|
|
689
679
|
`,wu=(0,t.styled)(vu)`
|
|
680
|
+
${e.V.label}
|
|
681
|
+
`,Tu=(0,t.styled)(yu)`
|
|
690
682
|
${e.V.body}
|
|
691
|
-
`,Tu=({variant:e})=>{switch(e){case`success`:return(0,n.jsx)(dl,{});case`error`:return(0,n.jsx)(ll,{});case`warning`:return(0,n.jsx)(fl,{});default:return(0,n.jsx)(ul,{})}};function Eu(){let{toasts:e}=cl();return(0,n.jsxs)(du,{children:[e.map(function({id:e,title:t,description:r,testId:i,variant:a=`info`,...o}){return(0,n.jsxs)(bu,{$variant:a,testId:i,...o,children:[(0,n.jsx)(Su,{children:(0,n.jsx)(Tu,{variant:a})}),(0,n.jsxs)(xu,{children:[t&&(0,n.jsx)(Cu,{children:t}),r&&(0,n.jsx)(wu,{children:r})]}),(0,n.jsx)(gu,{color:yu[a].color})]},e)}),(0,n.jsx)(fu,{})]})}var Du=Symbol.for(`react.lazy`),Ou=i.use;function ku(e){return typeof e==`object`&&!!e&&`then`in e}function Au(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Du&&`_payload`in e&&ku(e._payload)}function ju(e){let t=Nu(e),r=i.forwardRef((e,r)=>{let{children:a,...o}=e;Au(a)&&typeof Ou==`function`&&(a=Ou(a._payload));let s=i.Children.toArray(a),c=s.find(Fu);if(c){let e=c.props.children,a=s.map(t=>t===c?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,n.jsx)(t,{...o,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,a):null})}return(0,n.jsx)(t,{...o,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}var Mu=ju(`Slot`);function Nu(e){let t=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(Au(n)&&typeof Ou==`function`&&(n=Ou(n._payload)),i.isValidElement(n)){let e=Lu(n),a=Iu(r,n.props);return n.type!==i.Fragment&&(a.ref=t?x(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pu=Symbol(`radix.slottable`);function Fu(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Pu}function Iu(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Lu(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 Ru=i.forwardRef(({...e},t)=>(0,n.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));Ru.displayName=`Breadcrumb`;var zu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`ol`,{ref:i,className:e.R(`flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400`,t),...r}));zu.displayName=`BreadcrumbList`;var Bu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`li`,{ref:i,className:e.R(`inline-flex items-center gap-1.5`,t),...r}));Bu.displayName=`BreadcrumbItem`;var Vu=i.forwardRef(({asChild:t,className:r,...i},a)=>(0,n.jsx)(t?Mu:`a`,{ref:a,className:e.R(`transition-colors hover:text-neutral-950 dark:hover:text-neutral-50`,r),...i}));Vu.displayName=`BreadcrumbLink`;var Hu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`span`,{ref:i,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:e.R(`font-normal text-neutral-950 dark:text-neutral-50`,t),...r}));Hu.displayName=`BreadcrumbPage`;var Uu=({children:t,className:r,...i})=>(0,n.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:e.R(`flex items-center`,r),...i,children:t??(0,n.jsx)(`div`,{className:`w-3.5 h-3.5 border-r-2 border-t-2 border-neutral-400 transform rotate-45`})});Uu.displayName=`BreadcrumbSeparator`;var Wu=({className:t,...r})=>(0,n.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:e.R(`flex h-9 w-9 items-center justify-center`,t),...r,children:[(0,n.jsxs)(`div`,{className:`flex gap-1`,children:[(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`}),(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`}),(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`})]}),(0,n.jsx)(`span`,{className:`sr-only`,children:`More`})]});Wu.displayName=`BreadcrumbElipssis`;var Gu={...e.V.label,fontSize:`0.8125rem`,letterSpacing:`-0.26px`},Ku={color:e.B.white,...Gu},qu={backgroundColor:e.B.neutral[`800-A08`],color:e.B.neutral[300],...Gu},Ju=({children:t,isActive:r,isCompleted:i,isCompletedAndActive:a,className:o,onClick:s,isHovered:c,hoverIcon:l})=>a?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700`,`cursor-pointer hover:opacity-80`,o),style:Ku,onClick:s,children:t}):i?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors`,s&&`cursor-pointer hover:opacity-80`,o),style:{backgroundColor:e.B.primary[`600-A08`]},onClick:s,children:c&&l?l:(0,n.jsx)(e.M,{color:e.B.primary[700],size:16})}):r?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700`,o),style:Ku,children:t}):(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors`,o),style:qu,children:t}),Yu=()=>(0,n.jsx)(Uu,{children:(0,n.jsx)(`div`,{className:`w-2 h-2 border-r-2 border-t-2 border-neutral-300 transform rotate-45`})}),Xu=t=>{if(!t)return null;let r=e.t[t];return r?(0,n.jsx)(r,{color:e.B.primary[700],size:16}):null};function Zu({steps:t,currentStep:r=1,onStepClick:a,hoverIcons:o,completedStep:s}){let[c,l]=(0,i.useState)(null),u=r>t.length,d=s??r,f=e=>({isActive:!u&&e===r,isCompleted:u||e<=d&&e!==r,isCompletedAndActive:e===r&&e<d});return(0,n.jsx)(`div`,{className:`flex items-center py-4`,children:(0,n.jsx)(Ru,{children:(0,n.jsx)(zu,{className:`gap-2.5`,children:t.map((s,d)=>{let p=d+1,{isActive:m,isCompleted:h,isCompletedAndActive:g}=f(p),_=d===t.length-1,v=!m,y=p===r+1&&!u,b=(h||g)&&a,x=o?.[d],S=x?Xu(x):void 0;return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)(Bu,{className:e.R(`gap-0`,v&&`md:gap-1.5`,y&&`gap-1.5`),onMouseEnter:()=>b&&l(p),onMouseLeave:()=>l(null),children:[(0,n.jsx)(Ju,{isActive:m,isCompleted:h,isCompletedAndActive:g,onClick:b?()=>a(p):void 0,isHovered:c===p,hoverIcon:S,children:p}),v&&(0,n.jsx)(`span`,{className:e.R(`whitespace-nowrap transition-colors`,y?`inline`:`hidden md:inline`,h?`text-primary-700`:`text-neutral-300`,b&&`cursor-pointer hover:opacity-80`),style:{...e.V.label,fontSize:`0.8125rem`,letterSpacing:`-0.26px`},onClick:b?()=>a(p):void 0,children:s})]}),!_&&(0,n.jsx)(Yu,{})]},p)})})})})}var[Qu,$u]=w(`Tooltip`,[Co]),ed=Co(),td=`TooltipProvider`,nd=700,rd=`tooltip.open`,[id,ad]=Qu(td),od=e=>{let{__scopeTooltip:t,delayDuration:r=nd,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,c=i.useRef(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,n.jsx)(id,{scope:t,isOpenDelayedRef:c,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:s})};od.displayName=td;var sd=`Tooltip`,[cd,ld]=Qu(sd),ud=e=>{let{__scopeTooltip:t,children:r,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=ad(sd,e.__scopeTooltip),d=ed(t),[f,p]=i.useState(null),m=k(),h=i.useRef(0),g=c??u.disableHoverableContent,_=l??u.delayDuration,v=i.useRef(!1),[y,b]=j({prop:a,defaultProp:o??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(rd))):u.onClose(),s?.(e)},caller:sd}),x=i.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return i.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,n.jsx)(zo,{...d,children:(0,n.jsx)(cd,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayedRef.current?w():S()},[u.isOpenDelayedRef,w,S]),onTriggerLeave:i.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:r})})};ud.displayName=sd;var dd=`TooltipTrigger`,fd=i.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,o=ld(dd,r),s=ad(dd,r),c=ed(r),l=S(t,i.useRef(null),o.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,n.jsx)(Bo,{asChild:!0,...c,children:(0,n.jsx)(R.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:y(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:y(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:y(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:y(e.onBlur,o.onClose),onClick:y(e.onClick,o.onClose)})})});fd.displayName=dd;var pd=`TooltipPortal`,[md,hd]=Qu(pd,{forceMount:void 0}),gd=e=>{let{__scopeTooltip:t,forceMount:r,children:i,container:a}=e,o=ld(pd,t);return(0,n.jsx)(md,{scope:t,forceMount:r,children:(0,n.jsx)(B,{present:r||o.open,children:(0,n.jsx)(Le,{asChild:!0,container:a,children:i})})})};gd.displayName=pd;var _d=`TooltipContent`,vd=i.forwardRef((e,t)=>{let r=hd(_d,e.__scopeTooltip),{forceMount:i=r.forceMount,side:a=`top`,...o}=e,s=ld(_d,e.__scopeTooltip);return(0,n.jsx)(B,{present:i||s.open,children:s.disableHoverableContent?(0,n.jsx)(Cd,{side:a,...o,ref:t}):(0,n.jsx)(yd,{side:a,...o,ref:t})})}),yd=i.forwardRef((e,t)=>{let r=ld(_d,e.__scopeTooltip),a=ad(_d,e.__scopeTooltip),o=i.useRef(null),s=S(t,o),[c,l]=i.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=a,m=i.useCallback(()=>{l(null),p(!1)},[p]),h=i.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Dd(r,Ed(r,n.getBoundingClientRect())),a=Od(t.getBoundingClientRect());l(Ad([...i,...a])),p(!0)},[p]);return i.useEffect(()=>()=>m(),[m]),i.useEffect(()=>{if(u&&f){let e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener(`pointerleave`,e),f.addEventListener(`pointerleave`,t),()=>{u.removeEventListener(`pointerleave`,e),f.removeEventListener(`pointerleave`,t)}}},[u,f,h,m]),i.useEffect(()=>{if(c){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),i=!kd(n,c);r?m():i&&(m(),d())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[u,f,c,d,m]),(0,n.jsx)(Cd,{...e,ref:s})}),[bd,xd]=Qu(sd,{isInside:!1}),Sd=I(`TooltipContent`),Cd=i.forwardRef((e,t)=>{let{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=ld(_d,r),d=ed(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(rd,f),()=>document.removeEventListener(rd,f)),[f]),i.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,n.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,n.jsxs)(Vo,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.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:[(0,n.jsx)(Sd,{children:a}),(0,n.jsx)(bd,{scope:r,isInside:!0,children:(0,n.jsx)(qo,{id:u.contentId,role:`tooltip`,children:o||a})})]})})});vd.displayName=_d;var wd=`TooltipArrow`,Td=i.forwardRef((e,t)=>{let{__scopeTooltip:r,...i}=e,a=ed(r);return xd(wd,r).isInside?null:(0,n.jsx)(Ho,{...a,...i,ref:t})});Td.displayName=wd;function Ed(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Dd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Od(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function kd(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ad(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),jd(t)}function jd(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.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 Md=od,Nd=ud,Pd=fd,Fd=vd,Id=Md,Ld=Nd,Rd=Pd,zd=i.forwardRef(({className:t,sideOffset:r=4,...i},a)=>{let o={...e.V.body,background:e.B.primary[900],borderRadius:`.5rem`,color:e.B.white,fontSize:`.8125rem`,padding:`.5rem .75rem`,whiteSpace:`normal`,width:`19.375rem`};return(0,n.jsx)(Fd,{ref:a,sideOffset:r,className:e.R(`z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50`,t),style:o,...i})});zd.displayName=Fd.displayName;var Bd=st(),Vd=function(){},Hd=r.forwardRef(function(e,t){var n=r.useRef(null),i=r.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=rt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=nt([n,t]),w=V(V({},x),a);return r.createElement(r.Fragment,null,d&&r.createElement(S,{sideCar:Bd,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?r.cloneElement(r.Children.only(c),V(V({},w),{ref:C})):r.createElement(y,V({},w,{className:l,ref:C}),c))});Hd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Hd.classNames={fullWidth:Ye,zeroRight:Je};var Ud=!1;if(typeof window<`u`)try{var Wd=Object.defineProperty({},`passive`,{get:function(){return Ud=!0,!0}});window.addEventListener(`test`,Wd,Wd),window.removeEventListener(`test`,Wd,Wd)}catch{Ud=!1}var Gd=Ud?{passive:!1}:!1,Kd=function(e){return e.tagName===`TEXTAREA`},qd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Kd(e)&&n[t]===`visible`)},Jd=function(e){return qd(e,`overflowY`)},Yd=function(e){return qd(e,`overflowX`)},Xd=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),$d(e,r)){var i=ef(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zd=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Qd=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},$d=function(e,t){return e===`v`?Jd(t):Yd(t)},ef=function(e,t){return e===`v`?Zd(t):Qd(t)},tf=function(e,t){return e===`h`&&t===`rtl`?-1:1},nf=function(e,t,n,r,i){var a=tf(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ef(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&$d(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},rf=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},af=function(e){return[e.deltaX,e.deltaY]},of=function(e){return e&&`current`in e?e.current:e},sf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cf=function(e){return`
|
|
683
|
+
`,Eu=({variant:e})=>{switch(e){case`success`:return(0,n.jsx)(fl,{});case`error`:return(0,n.jsx)(ul,{});case`warning`:return(0,n.jsx)(pl,{});default:return(0,n.jsx)(dl,{})}};function Du(){let{toasts:e}=ll();return(0,n.jsxs)(fu,{children:[e.map(function({id:e,title:t,description:r,testId:i,variant:a=`info`,...o}){return(0,n.jsxs)(xu,{$variant:a,testId:i,...o,children:[(0,n.jsx)(Cu,{children:(0,n.jsx)(Eu,{variant:a})}),(0,n.jsxs)(Su,{children:[t&&(0,n.jsx)(wu,{children:t}),r&&(0,n.jsx)(Tu,{children:r})]}),(0,n.jsx)(_u,{color:bu[a].color})]},e)}),(0,n.jsx)(pu,{})]})}var Ou=Symbol.for(`react.lazy`),ku=i.use;function Au(e){return typeof e==`object`&&!!e&&`then`in e}function ju(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ou&&`_payload`in e&&Au(e._payload)}function Mu(e){let t=Pu(e),r=i.forwardRef((e,r)=>{let{children:a,...o}=e;ju(a)&&typeof ku==`function`&&(a=ku(a._payload));let s=i.Children.toArray(a),c=s.find(Iu);if(c){let e=c.props.children,a=s.map(t=>t===c?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,n.jsx)(t,{...o,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,a):null})}return(0,n.jsx)(t,{...o,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}var Nu=Mu(`Slot`);function Pu(e){let t=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(ju(n)&&typeof ku==`function`&&(n=ku(n._payload)),i.isValidElement(n)){let e=Ru(n),a=Lu(r,n.props);return n.type!==i.Fragment&&(a.ref=t?x(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fu=Symbol(`radix.slottable`);function Iu(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Fu}function Lu(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Ru(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 zu=i.forwardRef(({...e},t)=>(0,n.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));zu.displayName=`Breadcrumb`;var Bu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`ol`,{ref:i,className:e.R(`flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400`,t),...r}));Bu.displayName=`BreadcrumbList`;var Vu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`li`,{ref:i,className:e.R(`inline-flex items-center gap-1.5`,t),...r}));Vu.displayName=`BreadcrumbItem`;var Hu=i.forwardRef(({asChild:t,className:r,...i},a)=>(0,n.jsx)(t?Nu:`a`,{ref:a,className:e.R(`transition-colors hover:text-neutral-950 dark:hover:text-neutral-50`,r),...i}));Hu.displayName=`BreadcrumbLink`;var Uu=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`span`,{ref:i,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:e.R(`font-normal text-neutral-950 dark:text-neutral-50`,t),...r}));Uu.displayName=`BreadcrumbPage`;var Wu=({children:t,className:r,...i})=>(0,n.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:e.R(`flex items-center`,r),...i,children:t??(0,n.jsx)(`div`,{className:`w-3.5 h-3.5 border-r-2 border-t-2 border-neutral-400 transform rotate-45`})});Wu.displayName=`BreadcrumbSeparator`;var Gu=({className:t,...r})=>(0,n.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:e.R(`flex h-9 w-9 items-center justify-center`,t),...r,children:[(0,n.jsxs)(`div`,{className:`flex gap-1`,children:[(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`}),(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`}),(0,n.jsx)(`div`,{className:`w-1 h-1 bg-neutral-400 rounded-full`})]}),(0,n.jsx)(`span`,{className:`sr-only`,children:`More`})]});Gu.displayName=`BreadcrumbElipssis`;var Ku={...e.V.label,fontSize:`0.8125rem`,letterSpacing:`-0.26px`},qu={color:e.B.white,...Ku},Ju={backgroundColor:e.B.neutral[`800-A08`],color:e.B.neutral[300],...Ku},Yu=({children:t,isActive:r,isCompleted:i,isCompletedAndActive:a,className:o,onClick:s,isHovered:c,hoverIcon:l})=>a?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700`,`cursor-pointer hover:opacity-80`,o),style:qu,onClick:s,children:t}):i?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors`,s&&`cursor-pointer hover:opacity-80`,o),style:{backgroundColor:e.B.primary[`600-A08`]},onClick:s,children:c&&l?l:(0,n.jsx)(e.M,{color:e.B.primary[700],size:16})}):r?(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700`,o),style:qu,children:t}):(0,n.jsx)(`div`,{className:e.R(`w-5 h-5 rounded-full flex items-center justify-center transition-colors`,o),style:Ju,children:t}),Xu=()=>(0,n.jsx)(Wu,{children:(0,n.jsx)(`div`,{className:`w-2 h-2 border-r-2 border-t-2 border-neutral-300 transform rotate-45`})}),Zu=t=>{if(!t)return null;let r=e.t[t];return r?(0,n.jsx)(r,{color:e.B.primary[700],size:16}):null};function Qu({steps:t,currentStep:r=1,onStepClick:a,hoverIcons:o,completedStep:s}){let[c,l]=(0,i.useState)(null),u=r>t.length,d=s??r,f=e=>({isActive:!u&&e===r,isCompleted:u||e<=d&&e!==r,isCompletedAndActive:e===r&&e<d});return(0,n.jsx)(`div`,{className:`flex items-center py-4`,children:(0,n.jsx)(zu,{children:(0,n.jsx)(Bu,{className:`gap-2.5`,children:t.map((s,d)=>{let p=d+1,{isActive:m,isCompleted:h,isCompletedAndActive:g}=f(p),_=d===t.length-1,v=!m,y=p===r+1&&!u,b=(h||g)&&a,x=o?.[d],S=x?Zu(x):void 0;return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)(Vu,{className:e.R(`gap-0`,v&&`md:gap-1.5`,y&&`gap-1.5`),onMouseEnter:()=>b&&l(p),onMouseLeave:()=>l(null),children:[(0,n.jsx)(Yu,{isActive:m,isCompleted:h,isCompletedAndActive:g,onClick:b?()=>a(p):void 0,isHovered:c===p,hoverIcon:S,children:p}),v&&(0,n.jsx)(`span`,{className:e.R(`whitespace-nowrap transition-colors`,y?`inline`:`hidden md:inline`,h?`text-primary-700`:`text-neutral-300`,b&&`cursor-pointer hover:opacity-80`),style:{...e.V.label,fontSize:`0.8125rem`,letterSpacing:`-0.26px`},onClick:b?()=>a(p):void 0,children:s})]}),!_&&(0,n.jsx)(Xu,{})]},p)})})})})}var[$u,ed]=w(`Tooltip`,[Co]),td=Co(),nd=`TooltipProvider`,rd=700,id=`tooltip.open`,[ad,od]=$u(nd),sd=e=>{let{__scopeTooltip:t,delayDuration:r=rd,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,c=i.useRef(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,n.jsx)(ad,{scope:t,isOpenDelayedRef:c,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:s})};sd.displayName=nd;var cd=`Tooltip`,[ld,ud]=$u(cd),dd=e=>{let{__scopeTooltip:t,children:r,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=od(cd,e.__scopeTooltip),d=td(t),[f,p]=i.useState(null),m=k(),h=i.useRef(0),g=c??u.disableHoverableContent,_=l??u.delayDuration,v=i.useRef(!1),[y,b]=j({prop:a,defaultProp:o??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(id))):u.onClose(),s?.(e)},caller:cd}),x=i.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return i.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,n.jsx)(zo,{...d,children:(0,n.jsx)(ld,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayedRef.current?w():S()},[u.isOpenDelayedRef,w,S]),onTriggerLeave:i.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:r})})};dd.displayName=cd;var fd=`TooltipTrigger`,pd=i.forwardRef((e,t)=>{let{__scopeTooltip:r,...a}=e,o=ud(fd,r),s=od(fd,r),c=td(r),l=S(t,i.useRef(null),o.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,n.jsx)(Bo,{asChild:!0,...c,children:(0,n.jsx)(R.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:y(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:y(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:y(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:y(e.onBlur,o.onClose),onClick:y(e.onClick,o.onClose)})})});pd.displayName=fd;var md=`TooltipPortal`,[hd,gd]=$u(md,{forceMount:void 0}),_d=e=>{let{__scopeTooltip:t,forceMount:r,children:i,container:a}=e,o=ud(md,t);return(0,n.jsx)(hd,{scope:t,forceMount:r,children:(0,n.jsx)(B,{present:r||o.open,children:(0,n.jsx)(Le,{asChild:!0,container:a,children:i})})})};_d.displayName=md;var vd=`TooltipContent`,yd=i.forwardRef((e,t)=>{let r=gd(vd,e.__scopeTooltip),{forceMount:i=r.forceMount,side:a=`top`,...o}=e,s=ud(vd,e.__scopeTooltip);return(0,n.jsx)(B,{present:i||s.open,children:s.disableHoverableContent?(0,n.jsx)(wd,{side:a,...o,ref:t}):(0,n.jsx)(bd,{side:a,...o,ref:t})})}),bd=i.forwardRef((e,t)=>{let r=ud(vd,e.__scopeTooltip),a=od(vd,e.__scopeTooltip),o=i.useRef(null),s=S(t,o),[c,l]=i.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=a,m=i.useCallback(()=>{l(null),p(!1)},[p]),h=i.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Od(r,Dd(r,n.getBoundingClientRect())),a=kd(t.getBoundingClientRect());l(jd([...i,...a])),p(!0)},[p]);return i.useEffect(()=>()=>m(),[m]),i.useEffect(()=>{if(u&&f){let e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener(`pointerleave`,e),f.addEventListener(`pointerleave`,t),()=>{u.removeEventListener(`pointerleave`,e),f.removeEventListener(`pointerleave`,t)}}},[u,f,h,m]),i.useEffect(()=>{if(c){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),i=!Ad(n,c);r?m():i&&(m(),d())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[u,f,c,d,m]),(0,n.jsx)(wd,{...e,ref:s})}),[xd,Sd]=$u(cd,{isInside:!1}),Cd=I(`TooltipContent`),wd=i.forwardRef((e,t)=>{let{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=ud(vd,r),d=td(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(id,f),()=>document.removeEventListener(id,f)),[f]),i.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,n.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,n.jsxs)(Vo,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.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:[(0,n.jsx)(Cd,{children:a}),(0,n.jsx)(xd,{scope:r,isInside:!0,children:(0,n.jsx)(qo,{id:u.contentId,role:`tooltip`,children:o||a})})]})})});yd.displayName=vd;var Td=`TooltipArrow`,Ed=i.forwardRef((e,t)=>{let{__scopeTooltip:r,...i}=e,a=td(r);return Sd(Td,r).isInside?null:(0,n.jsx)(Ho,{...a,...i,ref:t})});Ed.displayName=Td;function Dd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Od(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function kd(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ad(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function jd(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Md(t)}function Md(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.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 Nd=sd,Pd=dd,Fd=pd,Id=yd,Ld=Nd,Rd=Pd,zd=Fd,Bd=i.forwardRef(({className:t,sideOffset:r=4,...i},a)=>{let o={...e.V.body,background:e.B.primary[900],borderRadius:`.5rem`,color:e.B.white,fontSize:`.8125rem`,padding:`.5rem .75rem`,whiteSpace:`normal`,width:`19.375rem`};return(0,n.jsx)(Id,{ref:a,sideOffset:r,className:e.R(`z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50`,t),style:o,...i})});Bd.displayName=Id.displayName;var Vd=st(),Hd=function(){},Ud=r.forwardRef(function(e,t){var n=r.useRef(null),i=r.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=rt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=nt([n,t]),w=V(V({},x),a);return r.createElement(r.Fragment,null,d&&r.createElement(S,{sideCar:Vd,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?r.cloneElement(r.Children.only(c),V(V({},w),{ref:C})):r.createElement(y,V({},w,{className:l,ref:C}),c))});Ud.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ud.classNames={fullWidth:Ye,zeroRight:Je};var Wd=!1;if(typeof window<`u`)try{var Gd=Object.defineProperty({},`passive`,{get:function(){return Wd=!0,!0}});window.addEventListener(`test`,Gd,Gd),window.removeEventListener(`test`,Gd,Gd)}catch{Wd=!1}var Kd=Wd?{passive:!1}:!1,qd=function(e){return e.tagName===`TEXTAREA`},Jd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!qd(e)&&n[t]===`visible`)},Yd=function(e){return Jd(e,`overflowY`)},Xd=function(e){return Jd(e,`overflowX`)},Zd=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),ef(e,r)){var i=tf(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qd=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},$d=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},ef=function(e,t){return e===`v`?Yd(t):Xd(t)},tf=function(e,t){return e===`v`?Qd(t):$d(t)},nf=function(e,t){return e===`h`&&t===`rtl`?-1:1},rf=function(e,t,n,r,i){var a=nf(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=tf(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&ef(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},af=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},of=function(e){return[e.deltaX,e.deltaY]},sf=function(e){return e&&`current`in e?e.current:e},cf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lf=function(e){return`
|
|
692
684
|
.block-interactivity-${e} {pointer-events: none;}
|
|
693
685
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
694
|
-
`},lf=0,uf=[];function df(e){var t=r.useRef([]),n=r.useRef([0,0]),i=r.useRef(),a=r.useState(lf++)[0],o=r.useState(bt)[0],s=r.useRef(e);r.useEffect(function(){s.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=it([e.lockRef.current],(e.shards||[]).map(of),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=r.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var r=rf(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-r[0],c=`deltaY`in e?e.deltaY:a[1]-r[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=Xd(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=Xd(d,u)),!f)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var p=i.current||l;return nf(p,t,e,p===`h`?o:c,!0)},[]),l=r.useCallback(function(e){var n=e;if(!(!uf.length||uf[uf.length-1]!==o)){var r=`deltaY`in n?af(n):rf(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&sf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(of).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=r.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ff(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=r.useCallback(function(e){n.current=rf(e),i.current=void 0},[]),f=r.useCallback(function(t){u(t.type,af(t),t.target,c(t,e.lockRef.current))},[]),p=r.useCallback(function(t){u(t.type,rf(t),t.target,c(t,e.lockRef.current))},[]);r.useEffect(function(){return uf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Gd),document.addEventListener(`touchmove`,l,Gd),document.addEventListener(`touchstart`,d,Gd),function(){uf=uf.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Gd),document.removeEventListener(`touchmove`,l,Gd),document.removeEventListener(`touchstart`,d,Gd)}},[]);var m=e.removeScrollBar,h=e.inert;return r.createElement(r.Fragment,null,h?r.createElement(o,{styles:cf(a)}):null,m?r.createElement(At,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ff(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pf=lt(Bd,df),mf=r.forwardRef(function(e,t){return r.createElement(Hd,V({},e,{ref:t,sideCar:pf}))});mf.classNames=Hd.classNames;var hf=`Popover`,[gf,_f]=w(hf,[Co]),vf=Co(),[yf,bf]=gf(hf),xf=e=>{let{__scopePopover:t,children:r,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=vf(t),u=i.useRef(null),[d,f]=i.useState(!1),[p,m]=j({prop:a,defaultProp:o??!1,onChange:s,caller:hf});return(0,n.jsx)(zo,{...l,children:(0,n.jsx)(yf,{scope:t,contentId:k(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:c,children:r})})};xf.displayName=hf;var Sf=`PopoverAnchor`,Cf=i.forwardRef((e,t)=>{let{__scopePopover:r,...a}=e,o=bf(Sf,r),s=vf(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return i.useEffect(()=>(c(),()=>l()),[c,l]),(0,n.jsx)(Bo,{...s,...a,ref:t})});Cf.displayName=Sf;var wf=`PopoverTrigger`,Tf=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=bf(wf,r),o=vf(r),s=S(t,a.triggerRef),c=(0,n.jsx)(R.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Bf(a.open),...i,ref:s,onClick:y(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(Bo,{asChild:!0,...o,children:c})});Tf.displayName=wf;var Ef=`PopoverPortal`,[Df,Of]=gf(Ef,{forceMount:void 0}),kf=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=bf(Ef,t);return(0,n.jsx)(Df,{scope:t,forceMount:r,children:(0,n.jsx)(B,{present:r||o.open,children:(0,n.jsx)(Le,{asChild:!0,container:a,children:i})})})};kf.displayName=Ef;var Af=`PopoverContent`,jf=i.forwardRef((e,t)=>{let r=Of(Af,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=bf(Af,e.__scopePopover);return(0,n.jsx)(B,{present:i||o.open,children:o.modal?(0,n.jsx)(Nf,{...a,ref:t}):(0,n.jsx)(Pf,{...a,ref:t})})});jf.displayName=Af;var Mf=P(`PopoverContent.RemoveScroll`),Nf=i.forwardRef((e,t)=>{let r=bf(Af,e.__scopePopover),a=i.useRef(null),o=S(t,a),s=i.useRef(!1);return i.useEffect(()=>{let e=a.current;if(e)return dn(e)},[]),(0,n.jsx)(mf,{as:Mf,allowPinchZoom:!0,children:(0,n.jsx)(Ff,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:y(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pf=i.forwardRef((e,t)=>{let r=bf(Af,e.__scopePopover),a=i.useRef(!1),o=i.useRef(!1);return(0,n.jsx)(Ff,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;r.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),Ff=i.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=bf(Af,r),m=vf(r);return Ue(),(0,n.jsx)(we,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(de,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,n.jsx)(Vo,{"data-state":Bf(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.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)`}})})})}),If=`PopoverClose`,Lf=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=bf(If,r);return(0,n.jsx)(R.button,{type:`button`,...i,ref:t,onClick:y(e.onClick,()=>a.onOpenChange(!1))})});Lf.displayName=If;var Rf=`PopoverArrow`,zf=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=vf(r);return(0,n.jsx)(Ho,{...a,...i,ref:t})});zf.displayName=Rf;function Bf(e){return e?`open`:`closed`}var Vf=xf,Hf=kf,Uf=jf,Wf=1,Gf=.9,Kf=.8,qf=.17,Jf=.1,Yf=.999,Xf=.9999,Zf=.99,Qf=/[\\\/_+.#"@\[\(\{&]/,$f=/[\\\/_+.#"@\[\(\{&]/g,ep=/[\s-]/,tp=/[\s-]/g;function np(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Wf:Zf;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=np(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Wf:Qf.test(e.charAt(l-1))?(d*=Kf,p=e.slice(i,l-1).match($f),p&&i>0&&(d*=Yf**+p.length)):ep.test(e.charAt(l-1))?(d*=Gf,m=e.slice(i,l-1).match(tp),m&&i>0&&(d*=Yf**+m.length)):(d*=qf,i>0&&(d*=Yf**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Xf)),(d<Jf&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=np(e,t,n,r,l+1,a+2,o),f*Jf>d&&(d=f*Jf)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function rp(e){return e.toLowerCase().replace(tp,` `)}function ip(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,np(e,t,rp(e),rp(t),0,0,{})}function ap(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function op(...e){return t=>{let n=!1,r=e.map(e=>{let r=ap(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ap(e[t],null)}}}}var sp=i.forwardRef((e,t)=>{let{children:r,...a}=e,o=i.Children.toArray(r),s=o.find(up);if(s){let e=s.props.children,r=o.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,n.jsx)(cp,{...a,ref:t,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return(0,n.jsx)(cp,{...a,ref:t,children:r})});sp.displayName=`Slot`;var cp=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(i.isValidElement(n)){let e=fp(n),a=dp(r,n.props);return n.type!==i.Fragment&&(a.ref=t?op(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});cp.displayName=`SlotClone`;var lp=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});function up(e){return i.isValidElement(e)&&e.type===lp}function dp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function fp(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 pp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?sp:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),mp=globalThis?.document?i.useLayoutEffect:()=>{},hp=i.useId||(()=>void 0),gp=0;function _p(e){let[t,n]=i.useState(hp());return mp(()=>{e||n(e=>e??String(gp++))},[e]),e||(t?`radix-${t}`:``)}var vp=`[cmdk-group=""]`,yp=`[cmdk-group-items=""]`,bp=`[cmdk-group-heading=""]`,xp=`[cmdk-item=""]`,Sp=`${xp}:not([aria-disabled="true"])`,Cp=`cmdk-item-select`,wp=`data-value`,Tp=(e,t,n)=>ip(e,t,n),Ep=i.createContext(void 0),Dp=()=>i.useContext(Ep),Op=i.createContext(void 0),kp=()=>i.useContext(Op),Ap=i.createContext(void 0),jp=i.forwardRef((e,t)=>{let n=Wp(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Wp(()=>new Set),a=Wp(()=>new Map),o=Wp(()=>new Map),s=Wp(()=>new Set),c=Hp(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=_p(),b=_p(),x=_p(),S=i.useRef(null),C=qp();Up(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Up(()=>{C(6,A)},[]);let w=i.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),T=i.useMemo(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=c.current?.filter??Tp;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(yp);t?t.appendChild(e.parentElement===t?e:e.closest(`${yp} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${yp} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${vp}[${wp}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(wp);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(vp)?.querySelector(bp))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${xp}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(Sp)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(wp))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(wp))}function F(e){let t=j()?.closest(vp),n;for(;t&&!n;)t=e>0?Bp(t,vp):Vp(t,vp),n=t?.querySelector(Sp);n?w.setState(`value`,n.getAttribute(wp)):P(e)}let ee=()=>N(M().length-1),I=e=>{e.preventDefault(),e.metaKey?ee():e.altKey?F(1):P(1)},L=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return i.createElement(pp.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:_&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),ee();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(Cp);t.dispatchEvent(e)}}}}},i.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Xp},l),Yp(e,e=>i.createElement(Op.Provider,{value:w},i.createElement(Ep.Provider,{value:T},e))))}),Mp=i.forwardRef((e,t)=>{let n=_p(),r=i.useRef(null),a=i.useContext(Ap),o=Dp(),s=Hp(e),c=s.current?.forceMount??a?.forceMount;Up(()=>{if(!c)return o.item(n,a?.id)},[c]);let l=Kp(n,r,[e.value,e.children,r],e.keywords),u=kp(),d=Gp(e=>e.value&&e.value===l.current),f=Gp(e=>c||o.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);i.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Cp,p),()=>t.removeEventListener(Cp,p)},[f,e.onSelect,e.disabled]);function p(){var e,t;m(),(t=(e=s.current).onSelect)==null||t.call(e,l.current)}function m(){u.setState(`value`,l.current,!0)}if(!f)return null;let{disabled:h,value:g,onSelect:_,forceMount:v,keywords:y,...b}=e;return i.createElement(pp.div,{ref:op(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||o.getDisablePointerSelection()?void 0:m,onClick:h?void 0:p},e.children)}),Np=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=_p(),c=i.useRef(null),l=i.useRef(null),u=_p(),d=Dp(),f=Gp(e=>a||d.filter()===!1?!0:e.search?e.filtered.groups.has(s):!0);Up(()=>d.group(s),[]),Kp(s,c,[e.value,e.heading,l]);let p=i.useMemo(()=>({id:s,forceMount:a}),[a]);return i.createElement(pp.div,{ref:op(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&i.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Yp(e,e=>i.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},i.createElement(Ap.Provider,{value:p},e))))}),Pp=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=i.useRef(null),o=Gp(e=>!e.search);return!n&&!o?null:i.createElement(pp.div,{ref:op(a,t),...r,"cmdk-separator":``,role:`separator`})}),Fp=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=kp(),s=Gp(e=>e.search),c=Gp(e=>e.selectedItemId),l=Dp();return i.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),i.createElement(pp.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:a?e.value:s,onChange:e=>{a||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),Ip=i.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...a}=e,o=i.useRef(null),s=i.useRef(null),c=Gp(e=>e.selectedItemId),l=Dp();return i.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),i.createElement(pp.div,{ref:op(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},Yp(e,e=>i.createElement(`div`,{ref:op(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),Lp=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:s,...c}=e;return i.createElement(Gn,{open:n,onOpenChange:r},i.createElement(Kn,{container:s},i.createElement(qn,{"cmdk-overlay":``,className:a}),i.createElement(Jn,{"aria-label":e.label,"cmdk-dialog":``,className:o},i.createElement(jp,{ref:t,...c}))))}),Rp=i.forwardRef((e,t)=>Gp(e=>e.filtered.count===0)?i.createElement(pp.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),zp=i.forwardRef((e,t)=>{let{progress:n,children:r,label:a=`Loading...`,...o}=e;return i.createElement(pp.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Yp(e,e=>i.createElement(`div`,{"aria-hidden":!0},e)))}),$=Object.assign(jp,{List:Ip,Item:Mp,Input:Fp,Group:Np,Separator:Pp,Dialog:Lp,Empty:Rp,Loading:zp});function Bp(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Vp(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Hp(e){let t=i.useRef(e);return Up(()=>{t.current=e}),t}var Up=typeof window>`u`?i.useEffect:i.useLayoutEffect;function Wp(e){let t=i.useRef();return t.current===void 0&&(t.current=e()),t}function Gp(e){let t=kp(),n=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,n,n)}function Kp(e,t,n,r=[]){let a=i.useRef(),o=Dp();return Up(()=>{var i;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():a.current}})(),c=r.map(e=>e.trim());o.value(e,s,c),(i=t.current)==null||i.setAttribute(wp,s),a.current=s}),a}var qp=()=>{let[e,t]=i.useState(),n=Wp(()=>new Map);return Up(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Jp(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Yp({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.cloneElement(Jp(t),{ref:t.ref},n(t.props.children)):n(t)}var Xp={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Zp=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($,{ref:i,className:e.R(`flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50`,t),...r}));Zp.displayName=$.displayName;var Qp=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:(0,n.jsx)($.Input,{ref:i,className:e.R(`flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400`,t),...r})}));Qp.displayName=$.Input.displayName;var $p=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.List,{ref:i,className:e.R(`max-h-75 overflow-y-auto overflow-x-hidden`,t),...r}));$p.displayName=$.List.displayName;var em=i.forwardRef((e,t)=>(0,n.jsx)($.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));em.displayName=$.Empty.displayName;var tm=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Group,{ref:i,className:e.R(`overflow-hidden p-1 text-neutral-950 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:**:[[cmdk-group-heading]]:text-neutral-400`,t),...r}));tm.displayName=$.Group.displayName;var nm=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Separator,{ref:i,className:e.R(`-mx-1 h-px bg-neutral-200 dark:bg-neutral-800`,t),...r}));nm.displayName=$.Separator.displayName;var rm=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Item,{ref:i,className:e.R(`relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50`,t),...r}));rm.displayName=$.Item.displayName;var im=({className:t,...r})=>(0,n.jsx)(`span`,{className:e.R(`ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400`,t),...r});im.displayName=`CommandShortcut`;var am=Vf,om=i.forwardRef(({className:t,align:r=`center`,sideOffset:i=4,...a},o)=>(0,n.jsx)(Hf,{children:(0,n.jsx)(Uf,{ref:o,align:r,sideOffset:i,className:e.R(`z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50`,t),...a})}));om.displayName=Uf.displayName;var sm=(0,t.styled)(om)`
|
|
686
|
+
`},uf=0,df=[];function ff(e){var t=r.useRef([]),n=r.useRef([0,0]),i=r.useRef(),a=r.useState(uf++)[0],o=r.useState(bt)[0],s=r.useRef(e);r.useEffect(function(){s.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=it([e.lockRef.current],(e.shards||[]).map(sf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=r.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var r=af(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-r[0],c=`deltaY`in e?e.deltaY:a[1]-r[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=Zd(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=Zd(d,u)),!f)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var p=i.current||l;return rf(p,t,e,p===`h`?o:c,!0)},[]),l=r.useCallback(function(e){var n=e;if(!(!df.length||df[df.length-1]!==o)){var r=`deltaY`in n?of(n):af(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&cf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(sf).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=r.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:pf(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=r.useCallback(function(e){n.current=af(e),i.current=void 0},[]),f=r.useCallback(function(t){u(t.type,of(t),t.target,c(t,e.lockRef.current))},[]),p=r.useCallback(function(t){u(t.type,af(t),t.target,c(t,e.lockRef.current))},[]);r.useEffect(function(){return df.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Kd),document.addEventListener(`touchmove`,l,Kd),document.addEventListener(`touchstart`,d,Kd),function(){df=df.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Kd),document.removeEventListener(`touchmove`,l,Kd),document.removeEventListener(`touchstart`,d,Kd)}},[]);var m=e.removeScrollBar,h=e.inert;return r.createElement(r.Fragment,null,h?r.createElement(o,{styles:lf(a)}):null,m?r.createElement(At,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var mf=lt(Vd,ff),hf=r.forwardRef(function(e,t){return r.createElement(Ud,V({},e,{ref:t,sideCar:mf}))});hf.classNames=Ud.classNames;var gf=`Popover`,[_f,vf]=w(gf,[Co]),yf=Co(),[bf,xf]=_f(gf),Sf=e=>{let{__scopePopover:t,children:r,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=yf(t),u=i.useRef(null),[d,f]=i.useState(!1),[p,m]=j({prop:a,defaultProp:o??!1,onChange:s,caller:gf});return(0,n.jsx)(zo,{...l,children:(0,n.jsx)(bf,{scope:t,contentId:k(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:c,children:r})})};Sf.displayName=gf;var Cf=`PopoverAnchor`,wf=i.forwardRef((e,t)=>{let{__scopePopover:r,...a}=e,o=xf(Cf,r),s=yf(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return i.useEffect(()=>(c(),()=>l()),[c,l]),(0,n.jsx)(Bo,{...s,...a,ref:t})});wf.displayName=Cf;var Tf=`PopoverTrigger`,Ef=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=xf(Tf,r),o=yf(r),s=S(t,a.triggerRef),c=(0,n.jsx)(R.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Vf(a.open),...i,ref:s,onClick:y(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(Bo,{asChild:!0,...o,children:c})});Ef.displayName=Tf;var Df=`PopoverPortal`,[Of,kf]=_f(Df,{forceMount:void 0}),Af=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=xf(Df,t);return(0,n.jsx)(Of,{scope:t,forceMount:r,children:(0,n.jsx)(B,{present:r||o.open,children:(0,n.jsx)(Le,{asChild:!0,container:a,children:i})})})};Af.displayName=Df;var jf=`PopoverContent`,Mf=i.forwardRef((e,t)=>{let r=kf(jf,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=xf(jf,e.__scopePopover);return(0,n.jsx)(B,{present:i||o.open,children:o.modal?(0,n.jsx)(Pf,{...a,ref:t}):(0,n.jsx)(Ff,{...a,ref:t})})});Mf.displayName=jf;var Nf=P(`PopoverContent.RemoveScroll`),Pf=i.forwardRef((e,t)=>{let r=xf(jf,e.__scopePopover),a=i.useRef(null),o=S(t,a),s=i.useRef(!1);return i.useEffect(()=>{let e=a.current;if(e)return dn(e)},[]),(0,n.jsx)(hf,{as:Nf,allowPinchZoom:!0,children:(0,n.jsx)(If,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:y(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ff=i.forwardRef((e,t)=>{let r=xf(jf,e.__scopePopover),a=i.useRef(!1),o=i.useRef(!1);return(0,n.jsx)(If,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;r.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),If=i.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=xf(jf,r),m=yf(r);return Ue(),(0,n.jsx)(we,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(de,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,n.jsx)(Vo,{"data-state":Vf(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.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)`}})})})}),Lf=`PopoverClose`,Rf=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=xf(Lf,r);return(0,n.jsx)(R.button,{type:`button`,...i,ref:t,onClick:y(e.onClick,()=>a.onOpenChange(!1))})});Rf.displayName=Lf;var zf=`PopoverArrow`,Bf=i.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=yf(r);return(0,n.jsx)(Ho,{...a,...i,ref:t})});Bf.displayName=zf;function Vf(e){return e?`open`:`closed`}var Hf=Sf,Uf=Af,Wf=Mf,Gf=1,Kf=.9,qf=.8,Jf=.17,Yf=.1,Xf=.999,Zf=.9999,Qf=.99,$f=/[\\\/_+.#"@\[\(\{&]/,ep=/[\\\/_+.#"@\[\(\{&]/g,tp=/[\s-]/,np=/[\s-]/g;function rp(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Gf:Qf;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=rp(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Gf:$f.test(e.charAt(l-1))?(d*=qf,p=e.slice(i,l-1).match(ep),p&&i>0&&(d*=Xf**+p.length)):tp.test(e.charAt(l-1))?(d*=Kf,m=e.slice(i,l-1).match(np),m&&i>0&&(d*=Xf**+m.length)):(d*=Jf,i>0&&(d*=Xf**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Zf)),(d<Yf&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=rp(e,t,n,r,l+1,a+2,o),f*Yf>d&&(d=f*Yf)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ip(e){return e.toLowerCase().replace(np,` `)}function ap(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,rp(e,t,ip(e),ip(t),0,0,{})}function op(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sp(...e){return t=>{let n=!1,r=e.map(e=>{let r=op(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():op(e[t],null)}}}}var cp=i.forwardRef((e,t)=>{let{children:r,...a}=e,o=i.Children.toArray(r),s=o.find(dp);if(s){let e=s.props.children,r=o.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,n.jsx)(lp,{...a,ref:t,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return(0,n.jsx)(lp,{...a,ref:t,children:r})});cp.displayName=`Slot`;var lp=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(i.isValidElement(n)){let e=pp(n),a=fp(r,n.props);return n.type!==i.Fragment&&(a.ref=t?sp(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});lp.displayName=`SlotClone`;var up=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});function dp(e){return i.isValidElement(e)&&e.type===up}function fp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function pp(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 mp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?cp:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hp=globalThis?.document?i.useLayoutEffect:()=>{},gp=i.useId||(()=>void 0),_p=0;function vp(e){let[t,n]=i.useState(gp());return hp(()=>{e||n(e=>e??String(_p++))},[e]),e||(t?`radix-${t}`:``)}var yp=`[cmdk-group=""]`,bp=`[cmdk-group-items=""]`,xp=`[cmdk-group-heading=""]`,Sp=`[cmdk-item=""]`,Cp=`${Sp}:not([aria-disabled="true"])`,wp=`cmdk-item-select`,Tp=`data-value`,Ep=(e,t,n)=>ap(e,t,n),Dp=i.createContext(void 0),Op=()=>i.useContext(Dp),kp=i.createContext(void 0),Ap=()=>i.useContext(kp),jp=i.createContext(void 0),Mp=i.forwardRef((e,t)=>{let n=Gp(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Gp(()=>new Set),a=Gp(()=>new Map),o=Gp(()=>new Map),s=Gp(()=>new Set),c=Up(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=vp(),b=vp(),x=vp(),S=i.useRef(null),C=Jp();Wp(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Wp(()=>{C(6,A)},[]);let w=i.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),T=i.useMemo(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=c.current?.filter??Ep;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(bp);t?t.appendChild(e.parentElement===t?e:e.closest(`${bp} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${bp} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${yp}[${Tp}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Tp);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(yp)?.querySelector(xp))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${Sp}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(Cp)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(Tp))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(Tp))}function F(e){let t=j()?.closest(yp),n;for(;t&&!n;)t=e>0?Vp(t,yp):Hp(t,yp),n=t?.querySelector(Cp);n?w.setState(`value`,n.getAttribute(Tp)):P(e)}let ee=()=>N(M().length-1),I=e=>{e.preventDefault(),e.metaKey?ee():e.altKey?F(1):P(1)},L=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return i.createElement(mp.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:_&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),ee();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(wp);t.dispatchEvent(e)}}}}},i.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Zp},l),Xp(e,e=>i.createElement(kp.Provider,{value:w},i.createElement(Dp.Provider,{value:T},e))))}),Np=i.forwardRef((e,t)=>{let n=vp(),r=i.useRef(null),a=i.useContext(jp),o=Op(),s=Up(e),c=s.current?.forceMount??a?.forceMount;Wp(()=>{if(!c)return o.item(n,a?.id)},[c]);let l=qp(n,r,[e.value,e.children,r],e.keywords),u=Ap(),d=Kp(e=>e.value&&e.value===l.current),f=Kp(e=>c||o.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);i.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(wp,p),()=>t.removeEventListener(wp,p)},[f,e.onSelect,e.disabled]);function p(){var e,t;m(),(t=(e=s.current).onSelect)==null||t.call(e,l.current)}function m(){u.setState(`value`,l.current,!0)}if(!f)return null;let{disabled:h,value:g,onSelect:_,forceMount:v,keywords:y,...b}=e;return i.createElement(mp.div,{ref:sp(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||o.getDisablePointerSelection()?void 0:m,onClick:h?void 0:p},e.children)}),Pp=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=vp(),c=i.useRef(null),l=i.useRef(null),u=vp(),d=Op(),f=Kp(e=>a||d.filter()===!1?!0:e.search?e.filtered.groups.has(s):!0);Wp(()=>d.group(s),[]),qp(s,c,[e.value,e.heading,l]);let p=i.useMemo(()=>({id:s,forceMount:a}),[a]);return i.createElement(mp.div,{ref:sp(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&i.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Xp(e,e=>i.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},i.createElement(jp.Provider,{value:p},e))))}),Fp=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=i.useRef(null),o=Kp(e=>!e.search);return!n&&!o?null:i.createElement(mp.div,{ref:sp(a,t),...r,"cmdk-separator":``,role:`separator`})}),Ip=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=Ap(),s=Kp(e=>e.search),c=Kp(e=>e.selectedItemId),l=Op();return i.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),i.createElement(mp.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:a?e.value:s,onChange:e=>{a||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),Lp=i.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...a}=e,o=i.useRef(null),s=i.useRef(null),c=Kp(e=>e.selectedItemId),l=Op();return i.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),i.createElement(mp.div,{ref:sp(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},Xp(e,e=>i.createElement(`div`,{ref:sp(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),Rp=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:s,...c}=e;return i.createElement(Gn,{open:n,onOpenChange:r},i.createElement(Kn,{container:s},i.createElement(qn,{"cmdk-overlay":``,className:a}),i.createElement(Jn,{"aria-label":e.label,"cmdk-dialog":``,className:o},i.createElement(Mp,{ref:t,...c}))))}),zp=i.forwardRef((e,t)=>Kp(e=>e.filtered.count===0)?i.createElement(mp.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Bp=i.forwardRef((e,t)=>{let{progress:n,children:r,label:a=`Loading...`,...o}=e;return i.createElement(mp.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Xp(e,e=>i.createElement(`div`,{"aria-hidden":!0},e)))}),$=Object.assign(Mp,{List:Lp,Item:Np,Input:Ip,Group:Pp,Separator:Fp,Dialog:Rp,Empty:zp,Loading:Bp});function Vp(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Hp(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Up(e){let t=i.useRef(e);return Wp(()=>{t.current=e}),t}var Wp=typeof window>`u`?i.useEffect:i.useLayoutEffect;function Gp(e){let t=i.useRef();return t.current===void 0&&(t.current=e()),t}function Kp(e){let t=Ap(),n=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,n,n)}function qp(e,t,n,r=[]){let a=i.useRef(),o=Op();return Wp(()=>{var i;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():a.current}})(),c=r.map(e=>e.trim());o.value(e,s,c),(i=t.current)==null||i.setAttribute(Tp,s),a.current=s}),a}var Jp=()=>{let[e,t]=i.useState(),n=Gp(()=>new Map);return Wp(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Yp(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Xp({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.cloneElement(Yp(t),{ref:t.ref},n(t.props.children)):n(t)}var Zp={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Qp=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($,{ref:i,className:e.R(`flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50`,t),...r}));Qp.displayName=$.displayName;var $p=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:(0,n.jsx)($.Input,{ref:i,className:e.R(`flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400`,t),...r})}));$p.displayName=$.Input.displayName;var em=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.List,{ref:i,className:e.R(`max-h-75 overflow-y-auto overflow-x-hidden`,t),...r}));em.displayName=$.List.displayName;var tm=i.forwardRef((e,t)=>(0,n.jsx)($.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));tm.displayName=$.Empty.displayName;var nm=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Group,{ref:i,className:e.R(`overflow-hidden p-1 text-neutral-950 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:**:[[cmdk-group-heading]]:text-neutral-400`,t),...r}));nm.displayName=$.Group.displayName;var rm=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Separator,{ref:i,className:e.R(`-mx-1 h-px bg-neutral-200 dark:bg-neutral-800`,t),...r}));rm.displayName=$.Separator.displayName;var im=i.forwardRef(({className:t,...r},i)=>(0,n.jsx)($.Item,{ref:i,className:e.R(`relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50`,t),...r}));im.displayName=$.Item.displayName;var am=({className:t,...r})=>(0,n.jsx)(`span`,{className:e.R(`ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400`,t),...r});am.displayName=`CommandShortcut`;var om=Hf,sm=i.forwardRef(({className:t,align:r=`center`,sideOffset:i=4,...a},o)=>(0,n.jsx)(Uf,{children:(0,n.jsx)(Wf,{ref:o,align:r,sideOffset:i,className:e.R(`z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50`,t),...a})}));sm.displayName=Wf.displayName;var cm=(0,t.styled)(sm)`
|
|
695
687
|
width: var(--radix-popover-trigger-width);
|
|
696
688
|
padding: 0.5rem;
|
|
697
689
|
border-radius: 0.75rem;
|
|
@@ -699,14 +691,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
699
691
|
background: rgba(255, 255, 255, 0.6);
|
|
700
692
|
box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.08);
|
|
701
693
|
backdrop-filter: blur(16px);
|
|
702
|
-
`,
|
|
694
|
+
`,lm=(0,t.styled)(Qp)`
|
|
703
695
|
border-radius: 0.75rem;
|
|
704
|
-
`,
|
|
696
|
+
`,um=(0,t.styled)(nm)`
|
|
705
697
|
> div {
|
|
706
698
|
display: flex;
|
|
707
699
|
flex-direction: ${({$reverse:e})=>e?`column-reverse`:`column`};
|
|
708
700
|
}
|
|
709
|
-
`,
|
|
701
|
+
`,dm=(0,t.styled)($.Input)`
|
|
710
702
|
width: 100%;
|
|
711
703
|
padding-top: 0.25rem;
|
|
712
704
|
background: transparent;
|
|
@@ -726,7 +718,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
726
718
|
&::-webkit-inner-spin-button {
|
|
727
719
|
-webkit-appearance: none;
|
|
728
720
|
}
|
|
729
|
-
`,
|
|
721
|
+
`,fm=(0,t.styled)(im)`
|
|
730
722
|
height: 3.125rem;
|
|
731
723
|
border-radius: 0.75rem;
|
|
732
724
|
${e.V.label}
|
|
@@ -737,19 +729,19 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
737
729
|
background: ${e.B.primary[25]};
|
|
738
730
|
color: ${e.B.fg.accent.action};
|
|
739
731
|
}
|
|
740
|
-
`,
|
|
732
|
+
`,pm=t.styled.div`
|
|
741
733
|
display: flex;
|
|
742
734
|
justify-content: space-between;
|
|
743
735
|
align-items: center;
|
|
744
736
|
width: 100%;
|
|
745
|
-
`,
|
|
737
|
+
`,mm=(0,t.styled)(tm)`
|
|
746
738
|
${e.V.body}
|
|
747
739
|
color: ${e.B.fg.tertiary};
|
|
748
740
|
padding: 1rem;
|
|
749
741
|
text-align: center;
|
|
750
|
-
`,
|
|
742
|
+
`,hm=t.styled.div`
|
|
751
743
|
padding: 1rem 0;
|
|
752
744
|
display: flex;
|
|
753
745
|
justify-content: center;
|
|
754
746
|
align-items: center;
|
|
755
|
-
`;function
|
|
747
|
+
`;function gm({selectedValue:t,setSelectedValue:r,value:a,onChange:o,options:s,isLoading:c,isError:l,label:u,errorText:d=`Es ist ein Fehler aufgetreten`,emptyText:f=`Keine Ergebnisse gefunden`,allowCustomValue:m=!0,...h}){let g=(0,i.useId)(),[_,v]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null),[x,S]=(0,i.useState)(``),C=(0,i.useRef)(null),w=e=>{r(e),o(s?.find(t=>t.value===e)?.value??``),v(!1),setTimeout(()=>C.current?.focus(),0)},T=()=>{r(a),o(a),v(!1),setTimeout(()=>C.current?.focus(),0)},E=s?.some(e=>e.value.toLowerCase()===a.toLowerCase()||e.label.toLowerCase()===a.toLowerCase()),D=m&&a&&!E&&!c;return(0,n.jsxs)(om,{open:_,onOpenChange:v,modal:!0,children:[(0,n.jsxs)(lm,{value:x,onValueChange:S,onKeyDown:e=>{if(y===`top`&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault();let t=[...D?[a]:[],...s?.map(e=>e.value)||[]],n=t.indexOf(x);e.key===`ArrowDown`?S(t[n>0?n-1:t.length-1]||``):e.key===`ArrowUp`&&S(t[n<t.length-1?n+1:0]||``)}},children:[(0,n.jsx)(Ef,{asChild:!0,children:(0,n.jsx)(Wc,{$error:l,onClick:()=>{C.current?.focus(),v(!0)},children:(0,n.jsxs)(Gc,{children:[(0,n.jsx)(dm,{...h,ref:C,id:`${g}-${u}`,value:a,onKeyDown:e=>{e.key===`Backspace`&&r(``),e.key===`Enter`||e.key===`Escape`?v(!1):!_&&e.key!==`Tab`&&v(!0)},onValueChange:o,autoComplete:`new-password`}),(0,n.jsx)(Kc,{htmlFor:`${g}-${u}`,$hasValue:!!a,children:u})]})})}),!_&&(0,n.jsx)(em,{"aria-hidden":`true`,className:`hidden`}),(0,n.jsx)(cm,{ref:e=>{if(e){let t=e.getAttribute(`data-side`);t!==y&&b(t)}},asChild:!0,onOpenAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{e.target instanceof Element&&e.target.hasAttribute(`cmdk-input`)&&e.preventDefault()},children:(0,n.jsxs)(em,{children:[!c&&(0,n.jsx)(mm,{children:f}),(0,n.jsxs)(um,{$reverse:y===`top`,children:[D&&(0,n.jsx)(fm,{$isSelected:!1,value:a,onSelect:T,children:(0,n.jsx)(pm,{children:(0,n.jsxs)(`b`,{children:[`"`,a,`"`]})})}),c&&(0,n.jsx)(hm,{children:(0,n.jsx)(Zc,{})}),s&&s.map(r=>(0,n.jsx)(fm,{$isSelected:r.value===t,value:r.value,onSelect:w,children:(0,n.jsxs)(pm,{children:[r.label,r.value===t&&(0,n.jsx)(e.M,{color:e.B.fg.accent.action})]})},r.value))]})]})})]}),l&&(0,n.jsx)(p,{error:l,children:d})]})}exports.Autocomplete=gm,exports.Button=d,exports.DatePicker=v,exports.Dialog=or,exports.DialogAlert=Cr,exports.DialogContent=ur,exports.DialogDetails=fr,exports.DialogHeader=vr,exports.DialogSuccess=kr,exports.Divider=jr,exports.Helper=p,exports.IconButton=hr,exports.Input=Jc,exports.Letter=ci,exports.Loading=Zc,exports.Message=Rr,exports.MessageOption=Br,exports.Select=Pc,exports.Skeleton=Ic,exports.Spinner=s,exports.StatusIndicator=Qu,exports.Toaster=Du,exports.Tooltip=Rd,exports.TooltipContent=Bd,exports.TooltipProvider=Ld,exports.TooltipTrigger=zd,exports.colors=e.B,exports.typography=e.V,exports.useIsMobile=c,exports.useToast=ll;
|