@tomny-dev/uzi 0.1.12 → 0.1.13

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 CHANGED
@@ -1,5 +1,5 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),N=require("react"),tr=require("react-dom");function nr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=nr(N),ct=nr(tr);function go(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=go(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():go(e[r],null)}}}}function H(...e){return c.useCallback(lt(...e),e)}var na=Symbol.for("react.lazy"),It=c[" use ".trim().toString()];function oa(e){return typeof e=="object"&&e!==null&&"then"in e}function or(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===na&&"_payload"in e&&oa(e._payload)}function rr(e){const t=sa(e),n=c.forwardRef((o,r)=>{let{children:s,...a}=o;or(s)&&typeof It=="function"&&(s=It(s._payload));const i=c.Children.toArray(s),u=i.find(aa);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var ra=rr("Slot");function sa(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n;if(or(r)&&typeof It=="function"&&(r=It(r._payload)),c.isValidElement(r)){const a=la(r),i=ca(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ia=Symbol("radix.slottable");function aa(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ia}function ca(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function la(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)}function F(...e){return e.filter(Boolean).join(" ")}const ua="uzi-button-module__button__5dzDN",da="uzi-button-module__sizeSm__jb544",fa="uzi-button-module__sizeMd__lIo8M",pa="uzi-button-module__sizeLg__QSSuW",ma="uzi-button-module__sizeIcon__Aa9tN",ha="uzi-button-module__variantPrimary__zp2Pg",va="uzi-button-module__variantSecondary__oX5CB",ga="uzi-button-module__variantOutline__uXfiP",wa="uzi-button-module__variantGhost__-OEB8",_a="uzi-button-module__variantDestructive__5IeYA",xa="uzi-button-module__variantLink__Olx4I",rn={button:ua,sizeSm:da,sizeMd:fa,sizeLg:pa,sizeIcon:ma,variantPrimary:ha,variantSecondary:va,variantOutline:ga,variantGhost:wa,variantDestructive:_a,variantLink:xa},ya={default:"variantPrimary",primary:"variantPrimary",secondary:"variantSecondary",outline:"variantOutline",ghost:"variantGhost",destructive:"variantDestructive",link:"variantLink"},ba={default:"sizeMd",sm:"sizeSm",md:"sizeMd",lg:"sizeLg",icon:"sizeIcon"};function sr({as:e,variant:t="default",size:n="default",className:o,children:r,asChild:s=!1,...a}){const i=F(rn.button,rn[ya[t]],rn[ba[n]],o);return s?l.jsx(ra,{className:i,...a,children:r}):e==="a"?l.jsx("a",{className:i,...a,children:r}):l.jsx("button",{type:"button",className:i,...a,children:r})}function Sa(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a);i.displayName=s+"Context";const u=n.length;n=[...n,a];const d=f=>{const{scope:v,children:g,...w}=f,p=v?.[e]?.[u]||i,h=c.useMemo(()=>w,Object.values(w));return l.jsx(p.Provider,{value:h,children:g})};d.displayName=s+"Provider";function m(f,v){const g=v?.[e]?.[u]||i,w=c.useContext(g);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Ca(r,...t)]}function Ca(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}var q=globalThis?.document?c.useLayoutEffect:()=>{},Ea=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kn=Ea.reduce((e,t)=>{const n=rr(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),wt={exports:{}},sn={};var wo;function Ra(){if(wo)return sn;wo=1;var e=N;function t(f,v){return f===v&&(f!==0||1/f===1/v)||f!==f&&v!==v}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(f,v){var g=v(),w=o({inst:{value:g,getSnapshot:v}}),p=w[0].inst,h=w[1];return s(function(){p.value=g,p.getSnapshot=v,u(p)&&h({inst:p})},[f,g,v]),r(function(){return u(p)&&h({inst:p}),f(function(){u(p)&&h({inst:p})})},[f]),a(g),g}function u(f){var v=f.getSnapshot;f=f.value;try{var g=v();return!n(f,g)}catch{return!0}}function d(f,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return sn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sn}var an={};var _o;function Ta(){return _o||(_o=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,w){return g===w&&(g!==0||1/g===1/w)||g!==g&&w!==w}function t(g,w){m||r.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=w();if(!f){var h=w();s(p,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=a({inst:{value:p,getSnapshot:w}});var y=h[0].inst,_=h[1];return u(function(){y.value=p,y.getSnapshot=w,n(y)&&_({inst:y})},[g,p,w]),i(function(){return n(y)&&_({inst:y}),g(function(){n(y)&&_({inst:y})})},[g]),d(p),p}function n(g){var w=g.getSnapshot;g=g.value;try{var p=w();return!s(g,p)}catch{return!0}}function o(g,w){return w()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=N,s=typeof Object.is=="function"?Object.is:e,a=r.useState,i=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue,m=!1,f=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;an.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),an}var xo;function Ma(){return xo||(xo=1,process.env.NODE_ENV==="production"?wt.exports=Ra():wt.exports=Ta()),wt.exports}var Pa=Ma();function Ia(){return Pa.useSyncExternalStore(Na,()=>!0,()=>!1)}function Na(){return()=>{}}var Ln="Avatar",[Aa]=Sa(Ln),[Oa,ir]=Aa(Ln),ar=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=c.useState("idle");return l.jsx(Oa,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:l.jsx(kn.span,{...o,ref:t})})});ar.displayName=Ln;var cr="AvatarImage",lr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,a=ir(cr,n),i=Da(o,s),u=ne(d=>{r(d),a.onImageLoadingStatusChange(d)});return q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(kn.img,{...s,ref:t,src:o}):null});lr.displayName=cr;var ur="AvatarFallback",dr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=ir(ur,n),[a,i]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(u)}},[o]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(kn.span,{...r,ref:t}):null});dr.displayName=ur;function yo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Da(e,{referrerPolicy:t,crossOrigin:n}){const o=Ia(),r=c.useRef(null),s=o?(r.current||(r.current=new window.Image),r.current):null,[a,i]=c.useState(()=>yo(s,e));return q(()=>{i(yo(s,e))},[s,e]),q(()=>{const u=f=>()=>{i(f)};if(!s)return;const d=u("loaded"),m=u("error");return s.addEventListener("load",d),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",d),s.removeEventListener("error",m)}},[s,n,t]),a}var ja=ar,ka=lr,La=dr;const Fa="uzi-avatar-module__avatar__yPIOs",za="uzi-avatar-module__image__Ngo7A",Ba="uzi-avatar-module__fallback__Tf3oZ",Ye={avatar:Fa,"size-sm":"uzi-avatar-module__size-sm__v5riJ","size-md":"uzi-avatar-module__size-md__g7IQS","size-lg":"uzi-avatar-module__size-lg__Ca4xk",image:za,fallback:Ba};function $a({className:e,size:t="md",...n}){const o=t==="sm"?Ye["size-sm"]:t==="lg"?Ye["size-lg"]:Ye["size-md"];return l.jsx(ja,{className:F(Ye.avatar,o,e),...n})}function Wa({className:e,...t}){return l.jsx(ka,{className:F(Ye.image,e),...t})}function Va({className:e,...t}){return l.jsx(La,{className:F(Ye.fallback,e),...t})}const Ha="uzi-card-module__card__ZPFTz",Ua="uzi-card-module__interactive__zlPML",_t={card:Ha,"tone-default":"uzi-card-module__tone-default__7Ujf9","tone-muted":"uzi-card-module__tone-muted__RQy5B","tone-contrast":"uzi-card-module__tone-contrast__JpFxL",interactive:Ua,"padding-none":"uzi-card-module__padding-none__LXdx-","padding-sm":"uzi-card-module__padding-sm__-Ub1s","padding-md":"uzi-card-module__padding-md__kUf46","padding-lg":"uzi-card-module__padding-lg__a5mWP"};function Ka({as:e,tone:t="default",padding:n="md",interactive:o=!1,className:r,children:s,...a}){const i=e??"div",u={default:null,muted:"tone-muted",contrast:"tone-contrast"},d={none:"padding-none",sm:"padding-sm",md:"padding-md",lg:"padding-lg"},m=F(_t.card,u[t]?_t[u[t]]:null,_t[d[n]],o&&_t.interactive,r);return l.jsx(i,{className:m,...a,children:s})}const Ga="uzi-pill-module__pill__uCKcP",Ya="uzi-pill-module__icon__KQ8zg",Xa="uzi-pill-module__content__T7AG1",nt={pill:Ga,"size-sm":"uzi-pill-module__size-sm__JANOQ","size-md":"uzi-pill-module__size-md__fdsqR","tone-success":"uzi-pill-module__tone-success__kW2Kf","tone-warning":"uzi-pill-module__tone-warning__Rc5-s","tone-info":"uzi-pill-module__tone-info__0vQrj","tone-danger":"uzi-pill-module__tone-danger__gzNOa",icon:Ya,content:Xa};function qa({as:e,tone:t="neutral",size:n="md",icon:o,className:r,children:s,...a}){const i=e??"span",u=F(nt.pill,nt[`tone-${t}`],nt[`size-${n}`],r);return l.jsxs(i,{className:u,...a,children:[o?l.jsx("span",{className:nt.icon,"aria-hidden":"true",children:o}):null,l.jsx("span",{className:nt.content,children:s})]})}function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Za(e,t){const n=c.createContext(t),o=s=>{const{children:a,...i}=s,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:a})};o.displayName=e+"Provider";function r(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Oe(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const d=f=>{const{scope:v,children:g,...w}=f,p=v?.[e]?.[u]||i,h=c.useMemo(()=>w,Object.values(w));return l.jsx(p.Provider,{value:h,children:g})};d.displayName=s+"Provider";function m(f,v){const g=v?.[e]?.[u]||i,w=c.useContext(g);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Ja(r,...t)]}function Ja(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Qa=c[" useId ".trim().toString()]||(()=>{}),ec=0;function ve(e){const[t,n]=c.useState(Qa());return q(()=>{n(o=>o??String(ec++))},[e]),e||(t?`radix-${t}`:"")}var tc=c[" useInsertionEffect ".trim().toString()]||q;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=nc({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r;{const m=c.useRef(e!==void 0);c.useEffect(()=>{const f=m.current;f!==i&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,o])}const d=c.useCallback(m=>{if(i){const f=oc(m)?m(e):m;f!==e&&a.current?.(f)}else s(m)},[i,e,s,a]);return[u,d]}function nc({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return tc(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function oc(e){return typeof e=="function"}function Ze(e){const t=rc(e),n=c.forwardRef((o,r)=>{const{children:s,...a}=o,i=c.Children.toArray(s),u=i.find(ic);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function rc(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const a=cc(r),i=ac(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sc=Symbol("radix.slottable");function ic(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sc}function ac(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function cc(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 lc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=lc.reduce((e,t)=>{const n=Ze(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Fn(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function uc(e,t=globalThis?.document){const n=ne(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var dc="DismissableLayer",yn="dismissableLayer.update",fc="dismissableLayer.pointerDownOutside",pc="dismissableLayer.focusOutside",bo,fr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,d=c.useContext(fr),[m,f]=c.useState(null),v=m?.ownerDocument??globalThis?.document,[,g]=c.useState({}),w=H(t,C=>f(C)),p=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(h),_=m?p.indexOf(m):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,b=_>=y,S=hc(C=>{const A=C.target,k=[...d.branches].some(M=>M.contains(A));!b||k||(r?.(C),a?.(C),C.defaultPrevented||i?.())},v),E=vc(C=>{const A=C.target;[...d.branches].some(M=>M.contains(A))||(s?.(C),a?.(C),C.defaultPrevented||i?.())},v);return uc(C=>{_===d.layers.size-1&&(o?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},v),c.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(bo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),So(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=bo)}},[m,v,n,d]),c.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),So())},[m,d]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(yn,C),()=>document.removeEventListener(yn,C)},[]),l.jsx(B.div,{...u,ref:w,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,E.onFocusCapture),onBlurCapture:I(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=dc;var mc="DismissableLayerBranch",pr=c.forwardRef((e,t)=>{const n=c.useContext(fr),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(B.div,{...e,ref:r})});pr.displayName=mc;function hc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let u=function(){mr(fc,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function vc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&mr(pc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function So(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function mr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Fn(r,s):r.dispatchEvent(s)}var gc=ut,wc=pr,cn="focusScope.autoFocusOnMount",ln="focusScope.autoFocusOnUnmount",Co={bubbles:!1,cancelable:!0},_c="FocusScope",zt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),d=ne(r),m=ne(s),f=c.useRef(null),v=H(t,p=>u(p)),g=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(x){if(g.paused||!i)return;const b=x.target;i.contains(b)?f.current=b:Ie(f.current,{select:!0})},h=function(x){if(g.paused||!i)return;const b=x.relatedTarget;b!==null&&(i.contains(b)||Ie(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Ie(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",h);const _=new MutationObserver(y);return i&&_.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),_.disconnect()}}},[o,i,g.paused]),c.useEffect(()=>{if(i){Ro.add(g);const p=document.activeElement;if(!i.contains(p)){const y=new CustomEvent(cn,Co);i.addEventListener(cn,d),i.dispatchEvent(y),y.defaultPrevented||(xc(Ec(hr(i)),{select:!0}),document.activeElement===p&&Ie(i))}return()=>{i.removeEventListener(cn,d),setTimeout(()=>{const y=new CustomEvent(ln,Co);i.addEventListener(ln,m),i.dispatchEvent(y),y.defaultPrevented||Ie(p??document.body,{select:!0}),i.removeEventListener(ln,m),Ro.remove(g)},0)}}},[i,d,m,g]);const w=c.useCallback(p=>{if(!n&&!o||g.paused)return;const h=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(h&&y){const _=p.currentTarget,[x,b]=yc(_);x&&b?!p.shiftKey&&y===b?(p.preventDefault(),n&&Ie(x,{select:!0})):p.shiftKey&&y===x&&(p.preventDefault(),n&&Ie(b,{select:!0})):y===_&&p.preventDefault()}},[n,o,g.paused]);return l.jsx(B.div,{tabIndex:-1,...a,ref:v,onKeyDown:w})});zt.displayName=_c;function xc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function yc(e){const t=hr(e),n=Eo(t,e),o=Eo(t.reverse(),e);return[n,o]}function hr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Eo(e,t){for(const n of e)if(!bc(n,{upTo:t}))return n}function bc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sc(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sc(e)&&t&&e.select()}}var Ro=Cc();function Cc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=To(e,t),e.unshift(t)},remove(t){e=To(e,t),e[0]?.resume()}}}function To(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ec(e){return e.filter(t=>t.tagName!=="A")}var Rc="Portal",dt=c.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=c.useState(!1);q(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?tr.createPortal(l.jsx(B.div,{...o,ref:t}),a):null});dt.displayName=Rc;function Tc(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Me=e=>{const{present:t,children:n}=e,o=Mc(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=H(o.ref,Pc(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Me.displayName="Presence";function Mc(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Tc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=xt(o.current);s.current=i==="mounted"?d:"none"},[i]),q(()=>{const d=o.current,m=r.current;if(m!==e){const v=s.current,g=xt(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(m&&v!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,f=g=>{const p=xt(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&p&&(u("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=g=>{g.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function xt(e){return e?.animationName||"none"}function Pc(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 un=0;function zn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),un++,()=>{un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),un--}},[])}function Mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ye=function(){return ye=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ye.apply(this,arguments)};function vr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Ic(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Tt="right-scroll-bar-position",Mt="width-before-scroll-bar",Nc="with-scroll-bars-hidden",Ac="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oc(e,t){var n=N.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Dc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Po=new WeakMap;function jc(e,t){var n=Oc(null,function(o){return e.forEach(function(r){return dn(r,o)})});return Dc(function(){var o=Po.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){r.has(i)||dn(i,a)})}Po.set(n,e)},[e]),n}function kc(e){return e}function Lc(e,t){t===void 0&&(t=kc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var m=a;a=[],m.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return r}function Fc(e){e===void 0&&(e={});var t=Lc(null);return t.options=ye({async:!0,ssr:!1},e),t}var gr=function(e){var t=e.sideCar,n=vr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,ye({},n))};gr.isSideCarExport=!0;function zc(e,t){return e.useMedium(t),gr}var wr=Fc(),fn=function(){},Bt=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,m=e.enabled,f=e.shards,v=e.sideCar,g=e.noRelative,w=e.noIsolation,p=e.inert,h=e.allowPinchZoom,y=e.as,_=y===void 0?"div":y,x=e.gapMode,b=vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=v,E=jc([n,t]),C=ye(ye({},b),r);return c.createElement(c.Fragment,null,m&&c.createElement(S,{sideCar:wr,removeScrollBar:d,shards:f,noRelative:g,noIsolation:w,inert:p,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:x}),a?c.cloneElement(c.Children.only(i),ye(ye({},C),{ref:E})):c.createElement(_,ye({},C,{className:u,ref:E}),i))});Bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bt.classNames={fullWidth:Mt,zeroRight:Tt};var Bc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bc();return t&&e.setAttribute("nonce",t),e}function Wc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Hc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(Wc(t,n),Vc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Uc=function(){var e=Hc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_r=function(){var e=Uc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Kc={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Gc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[pn(n),pn(o),pn(r)]},Yc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kc;var t=Gc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Xc=_r(),Xe="data-scroll-locked",qc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Nc,` {
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),N=require("react"),nr=require("react-dom");function or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=or(N),ct=or(nr);function wo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=wo(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():wo(e[r],null)}}}}function H(...e){return c.useCallback(lt(...e),e)}var oa=Symbol.for("react.lazy"),It=c[" use ".trim().toString()];function ra(e){return typeof e=="object"&&e!==null&&"then"in e}function rr(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===oa&&"_payload"in e&&ra(e._payload)}function sr(e){const t=ia(e),n=c.forwardRef((o,r)=>{let{children:s,...a}=o;rr(s)&&typeof It=="function"&&(s=It(s._payload));const i=c.Children.toArray(s),u=i.find(ca);if(u){const d=u.props.children,m=i.map(p=>p===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var sa=sr("Slot");function ia(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n;if(rr(r)&&typeof It=="function"&&(r=It(r._payload)),c.isValidElement(r)){const a=ua(r),i=la(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aa=Symbol("radix.slottable");function ca(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aa}function la(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ua(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)}function L(...e){return e.filter(Boolean).join(" ")}const da="uzi-button-module__button__5dzDN",fa="uzi-button-module__sizeSm__jb544",pa="uzi-button-module__sizeMd__lIo8M",ma="uzi-button-module__sizeLg__QSSuW",ha="uzi-button-module__sizeIcon__Aa9tN",va="uzi-button-module__variantPrimary__zp2Pg",ga="uzi-button-module__variantSecondary__oX5CB",wa="uzi-button-module__variantOutline__uXfiP",_a="uzi-button-module__variantGhost__-OEB8",xa="uzi-button-module__variantDestructive__5IeYA",ya="uzi-button-module__variantLink__Olx4I",rn={button:da,sizeSm:fa,sizeMd:pa,sizeLg:ma,sizeIcon:ha,variantPrimary:va,variantSecondary:ga,variantOutline:wa,variantGhost:_a,variantDestructive:xa,variantLink:ya},ba={default:"variantPrimary",primary:"variantPrimary",secondary:"variantSecondary",outline:"variantOutline",ghost:"variantGhost",destructive:"variantDestructive",link:"variantLink"},Sa={default:"sizeMd",sm:"sizeSm",md:"sizeMd",lg:"sizeLg",icon:"sizeIcon"};function ir({as:e,variant:t="default",size:n="default",className:o,children:r,asChild:s=!1,...a}){const i=L(rn.button,rn[ba[t]],rn[Sa[n]],o);return s?l.jsx(sa,{className:i,...a,children:r}):e==="a"?l.jsx("a",{className:i,...a,children:r}):l.jsx("button",{type:"button",className:i,...a,children:r})}function Ca(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a);i.displayName=s+"Context";const u=n.length;n=[...n,a];const d=p=>{const{scope:g,children:v,...w}=p,f=g?.[e]?.[u]||i,h=c.useMemo(()=>w,Object.values(w));return l.jsx(f.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[u]||i,w=c.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Ea(r,...t)]}function Ea(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...i,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}var q=globalThis?.document?c.useLayoutEffect:()=>{},Ra=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ln=Ra.reduce((e,t)=>{const n=sr(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),wt={exports:{}},sn={};var _o;function Ta(){if(_o)return sn;_o=1;var e=N;function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(p,g){var v=g(),w=o({inst:{value:v,getSnapshot:g}}),f=w[0].inst,h=w[1];return s(function(){f.value=v,f.getSnapshot=g,u(f)&&h({inst:f})},[p,v,g]),r(function(){return u(f)&&h({inst:f}),p(function(){u(f)&&h({inst:f})})},[p]),a(v),v}function u(p){var g=p.getSnapshot;p=p.value;try{var v=g();return!n(p,v)}catch{return!0}}function d(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return sn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sn}var an={};var xo;function Ma(){return xo||(xo=1,process.env.NODE_ENV!=="production"&&(function(){function e(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}function t(v,w){m||r.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var f=w();if(!p){var h=w();s(f,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}h=a({inst:{value:f,getSnapshot:w}});var _=h[0].inst,x=h[1];return u(function(){_.value=f,_.getSnapshot=w,n(_)&&x({inst:_})},[v,f,w]),i(function(){return n(_)&&x({inst:_}),v(function(){n(_)&&x({inst:_})})},[v]),d(f),f}function n(v){var w=v.getSnapshot;v=v.value;try{var f=w();return!s(v,f)}catch{return!0}}function o(v,w){return w()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=N,s=typeof Object.is=="function"?Object.is:e,a=r.useState,i=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue,m=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;an.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),an}var yo;function Pa(){return yo||(yo=1,process.env.NODE_ENV==="production"?wt.exports=Ta():wt.exports=Ma()),wt.exports}var Ia=Pa();function Na(){return Ia.useSyncExternalStore(Aa,()=>!0,()=>!1)}function Aa(){return()=>{}}var Fn="Avatar",[Oa]=Ca(Fn),[Da,ar]=Oa(Fn),cr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=c.useState("idle");return l.jsx(Da,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:l.jsx(Ln.span,{...o,ref:t})})});cr.displayName=Fn;var lr="AvatarImage",ur=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,a=ar(lr,n),i=ja(o,s),u=ne(d=>{r(d),a.onImageLoadingStatusChange(d)});return q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(Ln.img,{...s,ref:t,src:o}):null});ur.displayName=lr;var dr="AvatarFallback",fr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=ar(dr,n),[a,i]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(u)}},[o]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(Ln.span,{...r,ref:t}):null});fr.displayName=dr;function bo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ja(e,{referrerPolicy:t,crossOrigin:n}){const o=Na(),r=c.useRef(null),s=o?(r.current||(r.current=new window.Image),r.current):null,[a,i]=c.useState(()=>bo(s,e));return q(()=>{i(bo(s,e))},[s,e]),q(()=>{const u=p=>()=>{i(p)};if(!s)return;const d=u("loaded"),m=u("error");return s.addEventListener("load",d),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",d),s.removeEventListener("error",m)}},[s,n,t]),a}var ka=cr,La=ur,Fa=fr;const za="uzi-avatar-module__avatar__yPIOs",Ba="uzi-avatar-module__image__Ngo7A",$a="uzi-avatar-module__fallback__Tf3oZ",Ye={avatar:za,"size-sm":"uzi-avatar-module__size-sm__v5riJ","size-md":"uzi-avatar-module__size-md__g7IQS","size-lg":"uzi-avatar-module__size-lg__Ca4xk",image:Ba,fallback:$a};function Wa({className:e,size:t="md",...n}){const o=t==="sm"?Ye["size-sm"]:t==="lg"?Ye["size-lg"]:Ye["size-md"];return l.jsx(ka,{className:L(Ye.avatar,o,e),...n})}function Va({className:e,...t}){return l.jsx(La,{className:L(Ye.image,e),...t})}function Ha({className:e,...t}){return l.jsx(Fa,{className:L(Ye.fallback,e),...t})}const Ua="uzi-card-module__card__ZPFTz",Ka="uzi-card-module__interactive__zlPML",_t={card:Ua,"tone-default":"uzi-card-module__tone-default__7Ujf9","tone-muted":"uzi-card-module__tone-muted__RQy5B","tone-contrast":"uzi-card-module__tone-contrast__JpFxL",interactive:Ka,"padding-none":"uzi-card-module__padding-none__LXdx-","padding-sm":"uzi-card-module__padding-sm__-Ub1s","padding-md":"uzi-card-module__padding-md__kUf46","padding-lg":"uzi-card-module__padding-lg__a5mWP"};function Ga({as:e,tone:t="default",padding:n="md",interactive:o=!1,className:r,children:s,...a}){const i=e??"div",u={default:null,muted:"tone-muted",contrast:"tone-contrast"},d={none:"padding-none",sm:"padding-sm",md:"padding-md",lg:"padding-lg"},m=L(_t.card,u[t]?_t[u[t]]:null,_t[d[n]],o&&_t.interactive,r);return l.jsx(i,{className:m,...a,children:s})}const Ya="uzi-pill-module__pill__uCKcP",Xa="uzi-pill-module__icon__KQ8zg",qa="uzi-pill-module__content__T7AG1",nt={pill:Ya,"size-sm":"uzi-pill-module__size-sm__JANOQ","size-md":"uzi-pill-module__size-md__fdsqR","tone-success":"uzi-pill-module__tone-success__kW2Kf","tone-warning":"uzi-pill-module__tone-warning__Rc5-s","tone-info":"uzi-pill-module__tone-info__0vQrj","tone-danger":"uzi-pill-module__tone-danger__gzNOa",icon:Xa,content:qa};function Za({as:e,tone:t="neutral",size:n="md",icon:o,className:r,children:s,...a}){const i=e??"span",u=L(nt.pill,nt[`tone-${t}`],nt[`size-${n}`],r);return l.jsxs(i,{className:u,...a,children:[o?l.jsx("span",{className:nt.icon,"aria-hidden":"true",children:o}):null,l.jsx("span",{className:nt.content,children:s})]})}function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ja(e,t){const n=c.createContext(t),o=s=>{const{children:a,...i}=s,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:a})};o.displayName=e+"Provider";function r(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Oe(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const d=p=>{const{scope:g,children:v,...w}=p,f=g?.[e]?.[u]||i,h=c.useMemo(()=>w,Object.values(w));return l.jsx(f.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[u]||i,w=c.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Qa(r,...t)]}function Qa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...i,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ec=c[" useId ".trim().toString()]||(()=>{}),tc=0;function ve(e){const[t,n]=c.useState(ec());return q(()=>{n(o=>o??String(tc++))},[e]),e||(t?`radix-${t}`:"")}var nc=c[" useInsertionEffect ".trim().toString()]||q;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=oc({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r;{const m=c.useRef(e!==void 0);c.useEffect(()=>{const p=m.current;p!==i&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,o])}const d=c.useCallback(m=>{if(i){const p=rc(m)?m(e):m;p!==e&&a.current?.(p)}else s(m)},[i,e,s,a]);return[u,d]}function oc({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return nc(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function rc(e){return typeof e=="function"}function Ze(e){const t=sc(e),n=c.forwardRef((o,r)=>{const{children:s,...a}=o,i=c.Children.toArray(s),u=i.find(ac);if(u){const d=u.props.children,m=i.map(p=>p===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function sc(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const a=lc(r),i=cc(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ic=Symbol("radix.slottable");function ac(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ic}function cc(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function lc(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 uc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=uc.reduce((e,t)=>{const n=Ze(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function zn(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function dc(e,t=globalThis?.document){const n=ne(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var fc="DismissableLayer",bn="dismissableLayer.update",pc="dismissableLayer.pointerDownOutside",mc="dismissableLayer.focusOutside",So,pr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,d=c.useContext(pr),[m,p]=c.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=c.useState({}),w=H(t,C=>p(C)),f=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=f.indexOf(h),x=m?f.indexOf(m):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,b=x>=_,S=vc(C=>{const A=C.target,k=[...d.branches].some(M=>M.contains(A));!b||k||(r?.(C),a?.(C),C.defaultPrevented||i?.())},g),E=gc(C=>{const A=C.target;[...d.branches].some(M=>M.contains(A))||(s?.(C),a?.(C),C.defaultPrevented||i?.())},g);return dc(C=>{x===d.layers.size-1&&(o?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},g),c.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(So=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),Co(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=So)}},[m,g,n,d]),c.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),Co())},[m,d]),c.useEffect(()=>{const C=()=>v({});return document.addEventListener(bn,C),()=>document.removeEventListener(bn,C)},[]),l.jsx(B.div,{...u,ref:w,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,E.onFocusCapture),onBlurCapture:I(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=fc;var hc="DismissableLayerBranch",mr=c.forwardRef((e,t)=>{const n=c.useContext(pr),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(B.div,{...e,ref:r})});mr.displayName=hc;function vc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let u=function(){hr(pc,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function gc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&hr(mc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Co(){const e=new CustomEvent(bn);document.dispatchEvent(e)}function hr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?zn(r,s):r.dispatchEvent(s)}var wc=ut,_c=mr,cn="focusScope.autoFocusOnMount",ln="focusScope.autoFocusOnUnmount",Eo={bubbles:!1,cancelable:!0},xc="FocusScope",zt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),d=ne(r),m=ne(s),p=c.useRef(null),g=H(t,f=>u(f)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function(y){if(v.paused||!i)return;const b=y.target;i.contains(b)?p.current=b:Ie(p.current,{select:!0})},h=function(y){if(v.paused||!i)return;const b=y.relatedTarget;b!==null&&(i.contains(b)||Ie(p.current,{select:!0}))},_=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&Ie(i)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const x=new MutationObserver(_);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),x.disconnect()}}},[o,i,v.paused]),c.useEffect(()=>{if(i){To.add(v);const f=document.activeElement;if(!i.contains(f)){const _=new CustomEvent(cn,Eo);i.addEventListener(cn,d),i.dispatchEvent(_),_.defaultPrevented||(yc(Rc(vr(i)),{select:!0}),document.activeElement===f&&Ie(i))}return()=>{i.removeEventListener(cn,d),setTimeout(()=>{const _=new CustomEvent(ln,Eo);i.addEventListener(ln,m),i.dispatchEvent(_),_.defaultPrevented||Ie(f??document.body,{select:!0}),i.removeEventListener(ln,m),To.remove(v)},0)}}},[i,d,m,v]);const w=c.useCallback(f=>{if(!n&&!o||v.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,_=document.activeElement;if(h&&_){const x=f.currentTarget,[y,b]=bc(x);y&&b?!f.shiftKey&&_===b?(f.preventDefault(),n&&Ie(y,{select:!0})):f.shiftKey&&_===y&&(f.preventDefault(),n&&Ie(b,{select:!0})):_===x&&f.preventDefault()}},[n,o,v.paused]);return l.jsx(B.div,{tabIndex:-1,...a,ref:g,onKeyDown:w})});zt.displayName=xc;function yc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function bc(e){const t=vr(e),n=Ro(t,e),o=Ro(t.reverse(),e);return[n,o]}function vr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ro(e,t){for(const n of e)if(!Sc(n,{upTo:t}))return n}function Sc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cc(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cc(e)&&t&&e.select()}}var To=Ec();function Ec(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Mo(e,t),e.unshift(t)},remove(t){e=Mo(e,t),e[0]?.resume()}}}function Mo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Rc(e){return e.filter(t=>t.tagName!=="A")}var Tc="Portal",dt=c.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=c.useState(!1);q(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?nr.createPortal(l.jsx(B.div,{...o,ref:t}),a):null});dt.displayName=Tc;function Mc(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Me=e=>{const{present:t,children:n}=e,o=Pc(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=H(o.ref,Ic(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Me.displayName="Presence";function Pc(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Mc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=xt(o.current);s.current=i==="mounted"?d:"none"},[i]),q(()=>{const d=o.current,m=r.current;if(m!==e){const g=s.current,v=xt(d);e?u("MOUNT"):v==="none"||d?.display==="none"?u("UNMOUNT"):u(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=v=>{const f=xt(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&f&&(u("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=v=>{v.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function xt(e){return e?.animationName||"none"}function Ic(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 un=0;function Bn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),un++,()=>{un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),un--}},[])}function Po(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ye=function(){return ye=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ye.apply(this,arguments)};function gr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Nc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Tt="right-scroll-bar-position",Mt="width-before-scroll-bar",Ac="with-scroll-bars-hidden",Oc="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dc(e,t){var n=N.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var jc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Io=new WeakMap;function kc(e,t){var n=Dc(null,function(o){return e.forEach(function(r){return dn(r,o)})});return jc(function(){var o=Io.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){r.has(i)||dn(i,a)})}Io.set(n,e)},[e]),n}function Lc(e){return e}function Fc(e,t){t===void 0&&(t=Lc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var m=a;a=[],m.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return r}function zc(e){e===void 0&&(e={});var t=Fc(null);return t.options=ye({async:!0,ssr:!1},e),t}var wr=function(e){var t=e.sideCar,n=gr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,ye({},n))};wr.isSideCarExport=!0;function Bc(e,t){return e.useMedium(t),wr}var _r=zc(),fn=function(){},Bt=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,f=e.inert,h=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,y=e.gapMode,b=gr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,E=kc([n,t]),C=ye(ye({},b),r);return c.createElement(c.Fragment,null,m&&c.createElement(S,{sideCar:_r,removeScrollBar:d,shards:p,noRelative:v,noIsolation:w,inert:f,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),ye(ye({},C),{ref:E})):c.createElement(x,ye({},C,{className:u,ref:E}),i))});Bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bt.classNames={fullWidth:Mt,zeroRight:Tt};var $c=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$c();return t&&e.setAttribute("nonce",t),e}function Vc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Uc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wc())&&(Vc(t,n),Hc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kc=function(){var e=Uc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xr=function(){var e=Kc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Gc={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Yc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[pn(n),pn(o),pn(r)]},Xc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gc;var t=Yc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},qc=xr(),Xe="data-scroll-locked",Zc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Ac,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
5
5
  }
@@ -33,14 +33,14 @@
33
33
  }
34
34
 
35
35
  body[`).concat(Xe,`] {
36
- `).concat(Ac,": ").concat(i,`px;
36
+ `).concat(Oc,": ").concat(i,`px;
37
37
  }
38
- `)},Io=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},Zc=function(){c.useEffect(function(){return document.body.setAttribute(Xe,(Io()+1).toString()),function(){var e=Io()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Jc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Zc();var s=c.useMemo(function(){return Yc(r)},[r]);return c.createElement(Xc,{styles:qc(s,!t,r,n?"":"!important")})},bn=!1;if(typeof window<"u")try{var yt=Object.defineProperty({},"passive",{get:function(){return bn=!0,!0}});window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch{bn=!1}var Ue=bn?{passive:!1}:!1,Qc=function(e){return e.tagName==="TEXTAREA"},xr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qc(e)&&n[t]==="visible")},el=function(e){return xr(e,"overflowY")},tl=function(e){return xr(e,"overflowX")},No=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=yr(e,o);if(r){var s=br(e,o),a=s[1],i=s[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},nl=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ol=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},yr=function(e,t){return e==="v"?el(t):tl(t)},br=function(e,t){return e==="v"?nl(t):ol(t)},rl=function(e,t){return e==="h"&&t==="rtl"?-1:1},sl=function(e,t,n,o,r){var s=rl(e,window.getComputedStyle(t).direction),a=s*o,i=n.target,u=t.contains(i),d=!1,m=a>0,f=0,v=0;do{if(!i)break;var g=br(e,i),w=g[0],p=g[1],h=g[2],y=p-h-s*w;(w||y)&&yr(e,i)&&(f+=y,v+=w);var _=i.parentNode;i=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(m&&Math.abs(f)<1||!m&&Math.abs(v)<1)&&(d=!0),d},bt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ao=function(e){return[e.deltaX,e.deltaY]},Oo=function(e){return e&&"current"in e?e.current:e},il=function(e,t){return e[0]===t[0]&&e[1]===t[1]},al=function(e){return`
38
+ `)},No=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},Jc=function(){c.useEffect(function(){return document.body.setAttribute(Xe,(No()+1).toString()),function(){var e=No()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Qc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Jc();var s=c.useMemo(function(){return Xc(r)},[r]);return c.createElement(qc,{styles:Zc(s,!t,r,n?"":"!important")})},Sn=!1;if(typeof window<"u")try{var yt=Object.defineProperty({},"passive",{get:function(){return Sn=!0,!0}});window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch{Sn=!1}var Ue=Sn?{passive:!1}:!1,el=function(e){return e.tagName==="TEXTAREA"},yr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!el(e)&&n[t]==="visible")},tl=function(e){return yr(e,"overflowY")},nl=function(e){return yr(e,"overflowX")},Ao=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=br(e,o);if(r){var s=Sr(e,o),a=s[1],i=s[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ol=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},rl=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},br=function(e,t){return e==="v"?tl(t):nl(t)},Sr=function(e,t){return e==="v"?ol(t):rl(t)},sl=function(e,t){return e==="h"&&t==="rtl"?-1:1},il=function(e,t,n,o,r){var s=sl(e,window.getComputedStyle(t).direction),a=s*o,i=n.target,u=t.contains(i),d=!1,m=a>0,p=0,g=0;do{if(!i)break;var v=Sr(e,i),w=v[0],f=v[1],h=v[2],_=f-h-s*w;(w||_)&&br(e,i)&&(p+=_,g+=w);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(d=!0),d},bt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oo=function(e){return[e.deltaX,e.deltaY]},Do=function(e){return e&&"current"in e?e.current:e},al=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cl=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},cl=0,Ke=[];function ll(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(cl++)[0],s=c.useState(_r)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Ic([e.lockRef.current],(e.shards||[]).map(Oo),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var y=bt(p),_=n.current,x="deltaX"in p?p.deltaX:_[0]-y[0],b="deltaY"in p?p.deltaY:_[1]-y[1],S,E=p.target,C=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in p&&C==="h"&&E.type==="range")return!1;var A=window.getSelection(),k=A&&A.anchorNode,M=k?k===E||k.contains(E):!1;if(M)return!1;var j=No(C,E);if(!j)return!0;if(j?S=C:(S=C==="v"?"h":"v",j=No(C,E)),!j)return!1;if(!o.current&&"changedTouches"in p&&(x||b)&&(o.current=S),!S)return!0;var L=o.current||S;return sl(L,h,p,L==="h"?x:b)},[]),u=c.useCallback(function(p){var h=p;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var y="deltaY"in h?Ao(h):bt(h),_=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&il(S.delta,y)})[0];if(_&&_.should){h.cancelable&&h.preventDefault();return}if(!_){var x=(a.current.shards||[]).map(Oo).filter(Boolean).filter(function(S){return S.contains(h.target)}),b=x.length>0?i(h,x[0]):!a.current.noIsolation;b&&h.cancelable&&h.preventDefault()}}},[]),d=c.useCallback(function(p,h,y,_){var x={name:p,delta:h,target:y,should:_,shadowParent:ul(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),m=c.useCallback(function(p){n.current=bt(p),o.current=void 0},[]),f=c.useCallback(function(p){d(p.type,Ao(p),p.target,i(p,e.lockRef.current))},[]),v=c.useCallback(function(p){d(p.type,bt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",m,Ue),function(){Ke=Ke.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",m,Ue)}},[]);var g=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(s,{styles:al(r)}):null,g?c.createElement(Jc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ul(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dl=zc(wr,ll);var $t=c.forwardRef(function(e,t){return c.createElement(Bt,ye({},e,{ref:t,sideCar:dl}))});$t.classNames=Bt.classNames;var fl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,St=new WeakMap,Ct={},mn=0,Sr=function(e){return e&&(e.host||Sr(e.parentNode))},pl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Sr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ml=function(e,t,n,o){var r=pl(t,Array.isArray(e)?e:[e]);Ct[n]||(Ct[n]=new WeakMap);var s=Ct[n],a=[],i=new Set,u=new Set(r),d=function(f){!f||i.has(f)||(i.add(f),d(f.parentNode))};r.forEach(d);var m=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(v){if(i.has(v))m(v);else try{var g=v.getAttribute(o),w=g!==null&&g!=="false",p=(Ge.get(v)||0)+1,h=(s.get(v)||0)+1;Ge.set(v,p),s.set(v,h),a.push(v),p===1&&w&&St.set(v,!0),h===1&&v.setAttribute(n,"true"),w||v.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return m(t),i.clear(),mn++,function(){a.forEach(function(f){var v=Ge.get(f)-1,g=s.get(f)-1;Ge.set(f,v),s.set(f,g),v||(St.has(f)||f.removeAttribute(o),St.delete(f)),g||f.removeAttribute(n)}),mn--,mn||(Ge=new WeakMap,Ge=new WeakMap,St=new WeakMap,Ct={})}},Bn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=fl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),ml(o,r,n,"aria-hidden")):function(){return null}},Wt="Dialog",[Cr]=Oe(Wt),[hl,_e]=Cr(Wt),Er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),u=c.useRef(null),[d,m]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:Wt});return l.jsx(hl,{scope:t,triggerRef:i,contentRef:u,contentId:ve(),titleId:ve(),descriptionId:ve(),open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(f=>!f),[m]),modal:a,children:n})};Er.displayName=Wt;var Rr="DialogTrigger",vl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Rr,n),s=H(t,r.triggerRef);return l.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Vn(r.open),...o,ref:s,onClick:I(e.onClick,r.onOpenToggle)})});vl.displayName=Rr;var $n="DialogPortal",[gl,Tr]=Cr($n,{forceMount:void 0}),Mr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=_e($n,t);return l.jsx(gl,{scope:t,forceMount:n,children:c.Children.map(o,a=>l.jsx(Me,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:a})}))})};Mr.displayName=$n;var Nt="DialogOverlay",Pr=c.forwardRef((e,t)=>{const n=Tr(Nt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Nt,e.__scopeDialog);return s.modal?l.jsx(Me,{present:o||s.open,children:l.jsx(_l,{...r,ref:t})}):null});Pr.displayName=Nt;var wl=Ze("DialogOverlay.RemoveScroll"),_l=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Nt,n);return l.jsx($t,{as:wl,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(B.div,{"data-state":Vn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Be="DialogContent",Ir=c.forwardRef((e,t)=>{const n=Tr(Be,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Be,e.__scopeDialog);return l.jsx(Me,{present:o||s.open,children:s.modal?l.jsx(xl,{...r,ref:t}):l.jsx(yl,{...r,ref:t})})});Ir.displayName=Be;var xl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(null),r=H(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return Bn(s)},[]),l.jsx(Nr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault())})}),yl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return l.jsx(Nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Nr=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,i=_e(Be,n),u=c.useRef(null),d=H(t,u);return zn(),l.jsxs(l.Fragment,{children:[l.jsx(zt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Vn(i.open),...a,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(bl,{titleId:i.titleId}),l.jsx(Cl,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Wn="DialogTitle",Ar=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Wn,n);return l.jsx(B.h2,{id:r.titleId,...o,ref:t})});Ar.displayName=Wn;var Or="DialogDescription",Dr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Or,n);return l.jsx(B.p,{id:r.descriptionId,...o,ref:t})});Dr.displayName=Or;var jr="DialogClose",kr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(jr,n);return l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});kr.displayName=jr;function Vn(e){return e?"open":"closed"}var Lr="DialogTitleWarning",[Pv,Fr]=Za(Lr,{contentName:Be,titleName:Wn,docsSlug:"dialog"}),bl=({titleId:e})=>{const t=Fr(Lr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},ll=0,Ke=[];function ul(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(ll++)[0],s=c.useState(xr)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var f=Nc([e.lockRef.current],(e.shards||[]).map(Do),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!a.current.allowPinchZoom;var _=bt(f),x=n.current,y="deltaX"in f?f.deltaX:x[0]-_[0],b="deltaY"in f?f.deltaY:x[1]-_[1],S,E=f.target,C=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in f&&C==="h"&&E.type==="range")return!1;var A=window.getSelection(),k=A&&A.anchorNode,M=k?k===E||k.contains(E):!1;if(M)return!1;var j=Ao(C,E);if(!j)return!0;if(j?S=C:(S=C==="v"?"h":"v",j=Ao(C,E)),!j)return!1;if(!o.current&&"changedTouches"in f&&(y||b)&&(o.current=S),!S)return!0;var F=o.current||S;return il(F,h,f,F==="h"?y:b)},[]),u=c.useCallback(function(f){var h=f;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var _="deltaY"in h?Oo(h):bt(h),x=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&al(S.delta,_)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var y=(a.current.shards||[]).map(Do).filter(Boolean).filter(function(S){return S.contains(h.target)}),b=y.length>0?i(h,y[0]):!a.current.noIsolation;b&&h.cancelable&&h.preventDefault()}}},[]),d=c.useCallback(function(f,h,_,x){var y={name:f,delta:h,target:_,should:x,shadowParent:dl(_)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),m=c.useCallback(function(f){n.current=bt(f),o.current=void 0},[]),p=c.useCallback(function(f){d(f.type,Oo(f),f.target,i(f,e.lockRef.current))},[]),g=c.useCallback(function(f){d(f.type,bt(f),f.target,i(f,e.lockRef.current))},[]);c.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",m,Ue),function(){Ke=Ke.filter(function(f){return f!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",m,Ue)}},[]);var v=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(s,{styles:cl(r)}):null,v?c.createElement(Qc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fl=Bc(_r,ul);var $t=c.forwardRef(function(e,t){return c.createElement(Bt,ye({},e,{ref:t,sideCar:fl}))});$t.classNames=Bt.classNames;var pl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,St=new WeakMap,Ct={},mn=0,Cr=function(e){return e&&(e.host||Cr(e.parentNode))},ml=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Cr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hl=function(e,t,n,o){var r=ml(t,Array.isArray(e)?e:[e]);Ct[n]||(Ct[n]=new WeakMap);var s=Ct[n],a=[],i=new Set,u=new Set(r),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};r.forEach(d);var m=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(i.has(g))m(g);else try{var v=g.getAttribute(o),w=v!==null&&v!=="false",f=(Ge.get(g)||0)+1,h=(s.get(g)||0)+1;Ge.set(g,f),s.set(g,h),a.push(g),f===1&&w&&St.set(g,!0),h===1&&g.setAttribute(n,"true"),w||g.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return m(t),i.clear(),mn++,function(){a.forEach(function(p){var g=Ge.get(p)-1,v=s.get(p)-1;Ge.set(p,g),s.set(p,v),g||(St.has(p)||p.removeAttribute(o),St.delete(p)),v||p.removeAttribute(n)}),mn--,mn||(Ge=new WeakMap,Ge=new WeakMap,St=new WeakMap,Ct={})}},$n=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=pl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),hl(o,r,n,"aria-hidden")):function(){return null}},Wt="Dialog",[Er]=Oe(Wt),[vl,_e]=Er(Wt),Rr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),u=c.useRef(null),[d,m]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:Wt});return l.jsx(vl,{scope:t,triggerRef:i,contentRef:u,contentId:ve(),titleId:ve(),descriptionId:ve(),open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(p=>!p),[m]),modal:a,children:n})};Rr.displayName=Wt;var Tr="DialogTrigger",gl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Tr,n),s=H(t,r.triggerRef);return l.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Hn(r.open),...o,ref:s,onClick:I(e.onClick,r.onOpenToggle)})});gl.displayName=Tr;var Wn="DialogPortal",[wl,Mr]=Er(Wn,{forceMount:void 0}),Pr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=_e(Wn,t);return l.jsx(wl,{scope:t,forceMount:n,children:c.Children.map(o,a=>l.jsx(Me,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:a})}))})};Pr.displayName=Wn;var Nt="DialogOverlay",Ir=c.forwardRef((e,t)=>{const n=Mr(Nt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Nt,e.__scopeDialog);return s.modal?l.jsx(Me,{present:o||s.open,children:l.jsx(xl,{...r,ref:t})}):null});Ir.displayName=Nt;var _l=Ze("DialogOverlay.RemoveScroll"),xl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Nt,n);return l.jsx($t,{as:_l,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(B.div,{"data-state":Hn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Be="DialogContent",Nr=c.forwardRef((e,t)=>{const n=Mr(Be,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Be,e.__scopeDialog);return l.jsx(Me,{present:o||s.open,children:s.modal?l.jsx(yl,{...r,ref:t}):l.jsx(bl,{...r,ref:t})})});Nr.displayName=Be;var yl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(null),r=H(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return $n(s)},[]),l.jsx(Ar,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault())})}),bl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return l.jsx(Ar,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Ar=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,i=_e(Be,n),u=c.useRef(null),d=H(t,u);return Bn(),l.jsxs(l.Fragment,{children:[l.jsx(zt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Hn(i.open),...a,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Sl,{titleId:i.titleId}),l.jsx(El,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Vn="DialogTitle",Or=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Vn,n);return l.jsx(B.h2,{id:r.titleId,...o,ref:t})});Or.displayName=Vn;var Dr="DialogDescription",jr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Dr,n);return l.jsx(B.p,{id:r.descriptionId,...o,ref:t})});jr.displayName=Dr;var kr="DialogClose",Lr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(kr,n);return l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});Lr.displayName=kr;function Hn(e){return e?"open":"closed"}var Fr="DialogTitleWarning",[Dv,zr]=Ja(Fr,{contentName:Be,titleName:Vn,docsSlug:"dialog"}),Sl=({titleId:e})=>{const t=zr(Fr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Sl="DialogDescriptionWarning",Cl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fr(Sl).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},El=Er,Rl=Mr,Tl=Pr,Ml=Ir,Pl=Ar,Il=Dr,Nl=kr;const Al="uzi-modal-module__portalLayer__t7blc",Ol="uzi-modal-module__backdrop__IMd3b",Dl="uzi-modal-module__backdropFadeIn__GNJdx",jl="uzi-modal-module__backdropFadeOut__R-3K5",kl="uzi-modal-module__overlayContent__0DtbP",Ll="uzi-modal-module__modalContentIn__fub8M",Fl="uzi-modal-module__modalContentOut__elTJ3",zl="uzi-modal-module__modal__Mao59",Bl="uzi-modal-module__header__PmCaO",$l="uzi-modal-module__titles__IboyQ",Wl="uzi-modal-module__title__Zd7pL",Vl="uzi-modal-module__subtitle__t-LRK",Hl="uzi-modal-module__closeButton__GTiZr",Ul="uzi-modal-module__body__km6FQ",Kl="uzi-modal-module__footer__jWLTv",fe={portalLayer:Al,backdrop:Ol,backdropFadeIn:Dl,backdropFadeOut:jl,overlayContent:kl,modalContentIn:Ll,modalContentOut:Fl,modal:zl,"size-sm":"uzi-modal-module__size-sm__Uu9je","size-md":"uzi-modal-module__size-md__TiiWy","size-lg":"uzi-modal-module__size-lg__BrTIO","size-xl":"uzi-modal-module__size-xl__sj0mh",header:Bl,titles:$l,title:Wl,subtitle:Vl,closeButton:Hl,body:Ul,footer:Kl};function zr({open:e,onClose:t,className:n,children:o}){return l.jsx(El,{open:e,onOpenChange:r=>{r||t()},children:l.jsx(Rl,{children:l.jsxs("div",{className:fe.portalLayer,children:[l.jsx(Tl,{className:F(fe.backdrop,n)}),l.jsx(Ml,{className:fe.overlayContent,children:o})]})})})}function Gl({open:e,onClose:t,title:n,subtitle:o,size:r="md",children:s,footer:a}){return l.jsx(zr,{open:e,onClose:t,children:l.jsxs("div",{className:F(fe.modal,fe[`size-${r}`]),children:[l.jsxs("div",{className:fe.header,children:[l.jsxs("div",{className:fe.titles,children:[l.jsx(Pl,{className:fe.title,children:n}),o?l.jsx(Il,{className:fe.subtitle,children:o}):null]}),l.jsx(Nl,{asChild:!0,children:l.jsx("button",{className:fe.closeButton,"aria-label":"Close",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})})]}),l.jsx("div",{className:fe.body,children:s}),a&&l.jsx("div",{className:fe.footer,children:a})]})})}const Yl="uzi-alert-module__alert__7Bt6c",Xl="uzi-alert-module__success__apdFG",ql="uzi-alert-module__error__KLgi1",Zl="uzi-alert-module__warning__F4fpk",Jl="uzi-alert-module__info__1IKHt",Do={alert:Yl,success:Xl,error:ql,warning:Zl,info:Jl};function Ql({tone:e,children:t,className:n}){return l.jsx("div",{className:F(Do.alert,Do[e],n),role:"alert",children:t})}function Vt(e){const t=e+"CollectionProvider",[n,o]=Oe(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:y}=p,_=N.useRef(null),x=N.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:x,collectionRef:_,children:y})};a.displayName=t;const i=e+"CollectionSlot",u=Ze(i),d=N.forwardRef((p,h)=>{const{scope:y,children:_}=p,x=s(i,y),b=H(h,x.collectionRef);return l.jsx(u,{ref:b,children:_})});d.displayName=i;const m=e+"CollectionItemSlot",f="data-radix-collection-item",v=Ze(m),g=N.forwardRef((p,h)=>{const{scope:y,children:_,...x}=p,b=N.useRef(null),S=H(h,b),E=s(m,y);return N.useEffect(()=>(E.itemMap.set(b,{ref:b,...x}),()=>{E.itemMap.delete(b)})),l.jsx(v,{[f]:"",ref:S,children:_})});g.displayName=m;function w(p){const h=s(e+"CollectionConsumer",p);return N.useCallback(()=>{const _=h.collectionRef.current;if(!_)return[];const x=Array.from(_.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:d,ItemSlot:g},w,o]}var Br=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eu="VisuallyHidden",Hn=c.forwardRef((e,t)=>l.jsx(B.span,{...e,ref:t,style:{...Br,...e.style}}));Hn.displayName=eu;var Un="ToastProvider",[Kn,tu,nu]=Vt("Toast"),[$r]=Oe("Toast",[nu]),[ou,Ht]=$r(Un),Wr=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[d,m]=c.useState(0),f=c.useRef(!1),v=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Un}\`. Expected non-empty \`string\`.`),l.jsx(Kn.Provider,{scope:t,children:l.jsx(ou,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:d,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>m(g=>g+1),[]),onToastRemove:c.useCallback(()=>m(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:v,children:a})})};Wr.displayName=Un;var Vr="ToastViewport",ru=["F8"],Sn="toast.viewportPause",Cn="toast.viewportResume",Hr=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=ru,label:r="Notifications ({hotkey})",...s}=e,a=Ht(Vr,n),i=tu(n),u=c.useRef(null),d=c.useRef(null),m=c.useRef(null),f=c.useRef(null),v=H(t,f,a.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;c.useEffect(()=>{const h=y=>{o.length!==0&&o.every(x=>y[x]||y.code===x)&&f.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]),c.useEffect(()=>{const h=u.current,y=f.current;if(w&&h&&y){const _=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Sn);y.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Cn);y.dispatchEvent(E),a.isClosePausedRef.current=!1}},b=E=>{!h.contains(E.relatedTarget)&&x()},S=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",_),h.addEventListener("focusout",b),h.addEventListener("pointermove",_),h.addEventListener("pointerleave",S),window.addEventListener("blur",_),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",_),h.removeEventListener("focusout",b),h.removeEventListener("pointermove",_),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",_),window.removeEventListener("focus",x)}}},[w,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:h})=>{const _=i().map(x=>{const b=x.ref.current,S=[b,...wu(b)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?_.reverse():_).flat()},[i]);return c.useEffect(()=>{const h=f.current;if(h){const y=_=>{const x=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!x){const S=document.activeElement,E=_.shiftKey;if(_.target===h&&E){d.current?.focus();return}const k=p({tabbingDirection:E?"backwards":"forwards"}),M=k.findIndex(j=>j===S);hn(k.slice(M+1))?_.preventDefault():E?d.current?.focus():m.current?.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[i,p]),l.jsxs(wc,{ref:u,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"forwards"});hn(h)}}),l.jsx(Kn.Slot,{scope:n,children:l.jsx(B.ol,{tabIndex:-1,...s,ref:v})}),w&&l.jsx(En,{ref:m,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"backwards"});hn(h)}})]})});Hr.displayName=Vr;var Ur="ToastFocusProxy",En=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ht(Ur,n);return l.jsx(Hn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const i=a.relatedTarget;!s.viewport?.contains(i)&&o()}})});En.displayName=Ur;var ft="Toast",su="toast.swipeStart",iu="toast.swipeMove",au="toast.swipeCancel",cu="toast.swipeEnd",Kr=c.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[i,u]=ze({prop:o,defaultProp:r??!0,onChange:s,caller:ft});return l.jsx(Me,{present:n||i,children:l.jsx(du,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:I(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:I(e.onSwipeMove,d=>{const{x:m,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:I(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:I(e.onSwipeEnd,d=>{const{x:m,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Kr.displayName=ft;var[lu,uu]=$r(ft,{onClose(){}}),du=c.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:d,onSwipeStart:m,onSwipeMove:f,onSwipeCancel:v,onSwipeEnd:g,...w}=e,p=Ht(ft,n),[h,y]=c.useState(null),_=H(t,T=>y(T)),x=c.useRef(null),b=c.useRef(null),S=r||p.duration,E=c.useRef(0),C=c.useRef(S),A=c.useRef(0),{onToastAdd:k,onToastRemove:M}=p,j=ne(()=>{h?.contains(document.activeElement)&&p.viewport?.focus(),a()}),L=c.useCallback(T=>{!T||T===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(j,T))},[j]);c.useEffect(()=>{const T=p.viewport;if(T){const $=()=>{L(C.current),d?.()},D=()=>{const z=new Date().getTime()-E.current;C.current=C.current-z,window.clearTimeout(A.current),u?.()};return T.addEventListener(Sn,D),T.addEventListener(Cn,$),()=>{T.removeEventListener(Sn,D),T.removeEventListener(Cn,$)}}},[p.viewport,S,u,d,L]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&L(S)},[s,S,p.isClosePausedRef,L]),c.useEffect(()=>(k(),()=>M()),[k,M]);const W=c.useMemo(()=>h?Jr(h):null,[h]);return p.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(fu,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(lu,{scope:n,onClose:j,children:ct.createPortal(l.jsx(Kn.ItemSlot,{scope:n,children:l.jsx(gc,{asChild:!0,onEscapeKeyDown:I(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||j(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(B.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...w,ref:_,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:I(e.onKeyDown,T=>{T.key==="Escape"&&(i?.(T.nativeEvent),T.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:I(e.onPointerDown,T=>{T.button===0&&(x.current={x:T.clientX,y:T.clientY})}),onPointerMove:I(e.onPointerMove,T=>{if(!x.current)return;const $=T.clientX-x.current.x,D=T.clientY-x.current.y,z=!!b.current,P=["left","right"].includes(p.swipeDirection),R=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=P?R(0,$):0,G=P?0:R(0,D),Q=T.pointerType==="touch"?10:2,Z={x:V,y:G},re={originalEvent:T,delta:Z};z?(b.current=Z,Et(iu,f,re,{discrete:!1})):jo(Z,p.swipeDirection,Q)?(b.current=Z,Et(su,m,re,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs($)>Q||Math.abs(D)>Q)&&(x.current=null)}),onPointerUp:I(e.onPointerUp,T=>{const $=b.current,D=T.target;if(D.hasPointerCapture(T.pointerId)&&D.releasePointerCapture(T.pointerId),b.current=null,x.current=null,$){const z=T.currentTarget,P={originalEvent:T,delta:$};jo($,p.swipeDirection,p.swipeThreshold)?Et(cu,g,P,{discrete:!0}):Et(au,v,P,{discrete:!0}),z.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),fu=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ht(ft,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return vu(()=>a(!0)),c.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:l.jsx(dt,{asChild:!0,children:l.jsx(Hn,{...o,children:s&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},pu="ToastTitle",mu=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});mu.displayName=pu;var hu="ToastDescription",Gr=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});Gr.displayName=hu;var Yr="ToastAction",Xr=c.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(Zr,{altText:n,asChild:!0,children:l.jsx(Gn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yr}\`. Expected non-empty \`string\`.`),null)});Xr.displayName=Yr;var qr="ToastClose",Gn=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=uu(qr,n);return l.jsx(Zr,{asChild:!0,children:l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,r.onClose)})})});Gn.displayName=qr;var Zr=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(B.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Jr(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),gu(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Jr(o))}}),t}function Et(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Fn(r,s):r.dispatchEvent(s)}var jo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function vu(e=()=>{}){const t=ne(e);q(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function gu(e){return e.nodeType===e.ELEMENT_NODE}function wu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var _u=Wr,xu=Hr,yu=Kr,bu=Gr,Su=Xr,Cu=Gn;const Eu="uzi-toast-module__stack__SRrda",Ru="uzi-toast-module__topRight__WiZzM",Tu="uzi-toast-module__topLeft__SzFS9",Mu="uzi-toast-module__topCenter__X5W-x",Pu="uzi-toast-module__bottomRight__DMtoS",Iu="uzi-toast-module__bottomLeft__ZZ7VF",Nu="uzi-toast-module__bottomCenter__QNJrM",Au="uzi-toast-module__toast__HNUcj",Ou="uzi-toast-module__toastSlideIn__BTXfm",Du="uzi-toast-module__toastSlideOut__mBX-G",ju="uzi-toast-module__toastSwipeOut__R-jk2",ku="uzi-toast-module__icon__LIAqr",Lu="uzi-toast-module__body__9vzs7",Fu="uzi-toast-module__message__TBY65",zu="uzi-toast-module__actions__Iykd9",Bu="uzi-toast-module__actionButton__cvUr0",$u="uzi-toast-module__controls__LqA4Q",Wu="uzi-toast-module__iconButton__FOsOp",Vu="uzi-toast-module__iconButtonError__NJsLX",de={stack:Eu,topRight:Ru,topLeft:Tu,topCenter:Mu,bottomRight:Pu,bottomLeft:Iu,bottomCenter:Nu,toast:Au,toastSlideIn:Ou,toastSlideOut:Du,toastSwipeOut:ju,icon:ku,body:Lu,message:Fu,actions:zu,actionButton:Bu,controls:$u,iconButton:Wu,iconButtonError:Vu},Hu={position:"top-right",maxToasts:5,defaultDuration:4e3,pauseOnHover:!0,pauseOnFocusLoss:!0},Qr=N.createContext(void 0);let Uu=0;const Ku=()=>`toast-${++Uu}-${Date.now()}`;function es({children:e,config:t}){const[n,o]=N.useState([]),[r,s]=N.useState(!1),a=N.useMemo(()=>({...Hu,...t}),[t]),i=N.useCallback((p,h={})=>{const y=Ku();return o(_=>{const x=[..._,{id:y,message:p,type:h.type??"info",duration:h.duration??(h.type==="error"?6e3:a.defaultDuration),dismissible:h.dismissible??!0,copyable:h.copyable??!1,action:h.action}];return x.length>a.maxToasts&&x.shift(),x}),y},[a.defaultDuration,a.maxToasts]),u=N.useCallback((p,h)=>i(p,{...h,type:"success"}),[i]),d=N.useCallback((p,h)=>i(p,{copyable:!0,...h,type:"error"}),[i]),m=N.useCallback((p,h)=>i(p,{...h,type:"warning"}),[i]),f=N.useCallback((p,h)=>i(p,{...h,type:"info"}),[i]),v=N.useCallback(p=>{o(h=>h.filter(y=>y.id!==p))},[]),g=N.useCallback(()=>o([]),[]);N.useEffect(()=>{if(!a.pauseOnFocusLoss)return;const p=()=>s(document.visibilityState!=="visible");return document.addEventListener("visibilitychange",p),()=>document.removeEventListener("visibilitychange",p)},[a.pauseOnFocusLoss]);const w=N.useMemo(()=>({toasts:n,push:i,success:u,error:d,warning:m,info:f,dismiss:v,dismissAll:g}),[n,i,u,d,m,f,v,g]);return l.jsx(Qr.Provider,{value:w,children:l.jsxs(_u,{swipeDirection:"right",children:[e,l.jsx(Yu,{toasts:n,position:a.position,pauseOnHover:a.pauseOnHover,isPaused:r,onDismiss:v,onPauseChange:s})]})})}function Gu(){const e=N.useContext(Qr);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function Yu({toasts:e,position:t,pauseOnHover:n,isPaused:o,onDismiss:r,onPauseChange:s}){const a=(()=>{switch(t){case"top-left":return"topLeft";case"top-center":return"topCenter";case"bottom-right":return"bottomRight";case"bottom-left":return"bottomLeft";case"bottom-center":return"bottomCenter";default:return"topRight"}})();return l.jsxs(l.Fragment,{children:[e.map(i=>l.jsx(Xu,{toast:i,isPaused:o,onDismiss:r},i.id)),l.jsx(xu,{className:F(de.stack,de[a]),label:"Notifications",onMouseEnter:()=>n&&s(!0),onMouseLeave:()=>n&&s(!1)})]})}function Xu({toast:e,isPaused:t,onDismiss:n}){const[o,r]=N.useState(!0),[s,a]=N.useState("idle"),i=N.useRef(null),u=N.useRef(null),d=N.useRef(0),m=N.useRef(e.duration??0),f=N.useRef(!1),v=qu(e.type),g={"--toast-bg":v.background,"--toast-border":v.border,"--toast-accent":v.accent,"--toast-text":v.text,"--toast-action-bg":v.actionBg,"--toast-action-border":v.actionBorder},w=()=>{u.current&&(window.clearTimeout(u.current),u.current=null)},p=N.useCallback(()=>{f.current||(f.current=!0,r(!1),w(),window.setTimeout(()=>n(e.id),160))},[n,e.id]),h=N.useCallback(x=>{if(!x||x<=0){p();return}d.current=performance.now(),w(),u.current=window.setTimeout(()=>p(),x)},[p]);N.useEffect(()=>{if(!(!e.duration||e.duration<=0))return h(e.duration),w},[h,e.duration]),N.useEffect(()=>{if(!(!e.duration||e.duration<=0))if(t){const x=performance.now()-d.current;m.current=Math.max(0,m.current-x),w()}else h(m.current)},[t,h,e.duration]),N.useEffect(()=>()=>{i.current&&window.clearTimeout(i.current)},[]);const y=N.useCallback(async()=>{i.current&&window.clearTimeout(i.current);try{if(!navigator.clipboard)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(e.message),a("copied")}catch{a("failed")}i.current=window.setTimeout(()=>a("idle"),1800)},[e.message]),_=Zu(e.type);return l.jsxs(yu,{open:o,onOpenChange:x=>{x||p()},duration:2147483647,className:de.toast,style:g,children:[l.jsx("span",{className:de.icon,"aria-hidden":!0,children:_}),l.jsxs("div",{className:de.body,children:[l.jsx(bu,{className:de.message,children:e.message}),e.action&&l.jsx("div",{className:de.actions,children:l.jsx(Su,{asChild:!0,altText:e.action.label,children:l.jsx("button",{type:"button",className:de.actionButton,onClick:()=>{e.action?.onClick(),p()},children:e.action.label})})})]}),l.jsxs("div",{className:de.controls,children:[e.copyable&&l.jsx("button",{type:"button",className:F(de.iconButton,s==="failed"&&de.iconButtonError),"aria-label":"Copy message",onClick:y,children:s==="copied"?l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M2 6.5l3 3 6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):s==="failed"?l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M10 3L3 10M3 3l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):l.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:[l.jsx("rect",{x:"4.5",y:"1.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("path",{d:"M1.5 5.5v5a1.5 1.5 0 001.5 1.5h5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}),e.dismissible!==!1&&l.jsx(Cu,{asChild:!0,children:l.jsx("button",{type:"button",className:de.iconButton,"aria-label":"Dismiss notification",children:l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M10 3L3 10M3 3l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]})]})}function qu(e){switch(e){case"success":return{background:"color-mix(in srgb, var(--success) 12%, var(--popover))",border:"color-mix(in srgb, var(--success) 30%, transparent)",accent:"var(--success)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--success) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--success) 35%, transparent)"};case"error":return{background:"color-mix(in srgb, var(--destructive) 12%, var(--popover))",border:"color-mix(in srgb, var(--destructive) 30%, transparent)",accent:"var(--destructive)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--destructive) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--destructive) 35%, transparent)"};case"warning":return{background:"color-mix(in srgb, var(--warning) 12%, var(--popover))",border:"color-mix(in srgb, var(--warning) 30%, transparent)",accent:"var(--warning)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--warning) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--warning) 35%, transparent)"};default:return{background:"color-mix(in srgb, var(--primary) 12%, var(--popover))",border:"color-mix(in srgb, var(--primary) 30%, transparent)",accent:"var(--primary)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--primary) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--primary) 35%, transparent)"}}}function Zu(e){switch(e){case"success":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});case"error":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});case"warning":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M8 3v6M8 11.5v1",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});default:return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M8 7v5M8 4.5v.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}}const Ju="uzi-input-module__input__-ipHD",Qu={input:Ju},ts=c.forwardRef(({className:e,type:t,...n},o)=>l.jsx("input",{ref:o,type:t,className:F(Qu.input,e),...n}));ts.displayName="Input";const ed="uzi-label-module__label__gKflt",td={label:ed},ns=c.forwardRef(({className:e,...t},n)=>l.jsx("label",{ref:n,className:F(td.label,e),...t}));ns.displayName="Label";const nd="uzi-checkbox-module__checkbox__zAB1y",od={checkbox:nd},os=c.forwardRef(({className:e,...t},n)=>l.jsx("input",{ref:n,type:"checkbox",className:F(od.checkbox,e),...t}));os.displayName="Checkbox";var rd=c.createContext(void 0);function Yn(e){const t=c.useContext(rd);return e||t||"ltr"}const sd=["top","right","bottom","left"],Ne=Math.min,ce=Math.max,At=Math.round,Rt=Math.floor,Se=e=>({x:e,y:e}),id={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(e,t,n){return ce(e,Ne(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function be(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(be(e))}function ad(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=Zn(e),s=qn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ot(a)),[a,Ot(a)]}function cd(e){const t=Ot(e);return[Tn(e),t,Tn(t)]}function Tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ko=["left","right"],Lo=["right","left"],ld=["top","bottom"],ud=["bottom","top"];function dd(e,t,n){switch(e){case"top":case"bottom":return n?t?Lo:ko:t?ko:Lo;case"left":case"right":return t?ld:ud;default:return[]}}function fd(e,t,n,o){const r=Qe(e);let s=dd(Te(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Tn)))),s}function Ot(e){const t=Te(e);return id[t]+e.slice(t.length)}function pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function rs(e){return typeof e!="number"?pd(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Fo(e,t,n){let{reference:o,floating:r}=e;const s=be(t),a=Zn(t),i=qn(a),u=Te(t),d=s==="y",m=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,v=o[i]/2-r[i]/2;let g;switch(u){case"top":g={x:m,y:o.y-r.height};break;case"bottom":g={x:m,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:f};break;case"left":g={x:o.x-r.width,y:f};break;default:g={x:o.x,y:o.y}}switch(Qe(t)){case"start":g[a]-=v*(n&&d?-1:1);break;case"end":g[a]+=v*(n&&d?-1:1);break}return g}async function md(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:v=!1,padding:g=0}=Re(t,e),w=rs(g),h=i[v?f==="floating"?"reference":"floating":f],y=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:m,strategy:u})),_=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),b=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:_,offsetParent:x,strategy:u}):_);return{top:(y.top-S.top+w.top)/b.y,bottom:(S.bottom-y.bottom+w.bottom)/b.y,left:(y.left-S.left+w.left)/b.x,right:(S.right-y.right+w.right)/b.x}}const hd=50,vd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:md},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:m,y:f}=Fo(d,o,u),v=o,g=0;const w={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:y,fn:_}=h,{x,y:b,data:S,reset:E}=await _({x:m,y:f,initialPlacement:o,placement:v,strategy:r,middlewareData:w,rects:d,platform:i,elements:{reference:e,floating:t}});m=x??m,f=b??f,w[y]={...w[y],...S},E&&g<hd&&(g++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:m,y:f}=Fo(d,v,u)),p=-1)}return{x:m,y:f,placement:v,strategy:r,middlewareData:w}},gd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:m=0}=Re(e,t)||{};if(d==null)return{};const f=rs(m),v={x:n,y:o},g=Zn(r),w=qn(g),p=await a.getDimensions(d),h=g==="y",y=h?"top":"left",_=h?"bottom":"right",x=h?"clientHeight":"clientWidth",b=s.reference[w]+s.reference[g]-v[g]-s.floating[w],S=v[g]-s.reference[g],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=E?E[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=i.floating[x]||s.floating[w]);const A=b/2-S/2,k=C/2-p[w]/2-1,M=Ne(f[y],k),j=Ne(f[_],k),L=M,W=C-p[w]-j,T=C/2-p[w]/2+A,$=Rn(L,T,W),D=!u.arrow&&Qe(r)!=null&&T!==$&&s.reference[w]/2-(T<L?M:j)-p[w]/2<0,z=D?T<L?T-L:T-W:0;return{[g]:v[g]+z,data:{[g]:$,centerOffset:T-$-z,...D&&{alignmentOffset:z}},reset:D}}}),wd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...h}=Re(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Te(r),_=be(i),x=Te(i)===i,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(x||!p?[Ot(i)]:cd(i)),E=w!=="none";!v&&E&&S.push(...fd(i,p,w,b));const C=[i,...S],A=await u.detectOverflow(t,h),k=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(m&&k.push(A[y]),f){const T=ad(r,a,b);k.push(A[T[0]],A[T[1]])}if(M=[...M,{placement:r,overflows:k}],!k.every(T=>T<=0)){var j,L;const T=(((j=s.flip)==null?void 0:j.index)||0)+1,$=C[T];if($&&(!(f==="alignment"?_!==be($):!1)||M.every(P=>be(P.placement)===_?P.overflows[0]>0:!0)))return{data:{index:T,overflows:M},reset:{placement:$}};let D=(L=M.filter(z=>z.overflows[0]<=0).sort((z,P)=>z.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!D)switch(g){case"bestFit":{var W;const z=(W=M.filter(P=>{if(E){const R=be(P.placement);return R===_||R==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(R=>R>0).reduce((R,V)=>R+V,0)]).sort((P,R)=>P[1]-R[1])[0])==null?void 0:W[0];z&&(D=z);break}case"initialPlacement":D=i;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bo(e){return sd.some(t=>e[t]>=0)}const _d=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Re(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...s,elementContext:"reference"}),i=zo(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Bo(i)}}}case"escaped":{const a=await o.detectOverflow(t,{...s,altBoundary:!0}),i=zo(a,n.floating);return{data:{escapedOffsets:i,escaped:Bo(i)}}}default:return{}}}}},ss=new Set(["left","top"]);async function xd(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Te(n),i=Qe(n),u=be(n)==="y",d=ss.has(a)?-1:1,m=s&&u?-1:1,f=Re(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),u?{x:g*m,y:v*d}:{x:v*d,y:g*m}}const yd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,u=await xd(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},bd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:y=>{let{x:_,y:x}=y;return{x:_,y:x}}},...d}=Re(e,t),m={x:n,y:o},f=await s.detectOverflow(t,d),v=be(Te(r)),g=Xn(v);let w=m[g],p=m[v];if(a){const y=g==="y"?"top":"left",_=g==="y"?"bottom":"right",x=w+f[y],b=w-f[_];w=Rn(x,w,b)}if(i){const y=v==="y"?"top":"left",_=v==="y"?"bottom":"right",x=p+f[y],b=p-f[_];p=Rn(x,p,b)}const h=u.fn({...t,[g]:w,[v]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[g]:a,[v]:i}}}}}},Sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=Re(e,t),m={x:n,y:o},f=be(r),v=Xn(f);let g=m[v],w=m[f];const p=Re(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const x=v==="y"?"height":"width",b=s.reference[v]-s.floating[x]+h.mainAxis,S=s.reference[v]+s.reference[x]-h.mainAxis;g<b?g=b:g>S&&(g=S)}if(d){var y,_;const x=v==="y"?"width":"height",b=ss.has(Te(r)),S=s.reference[f]-s.floating[x]+(b&&((y=a.offset)==null?void 0:y[f])||0)+(b?0:h.crossAxis),E=s.reference[f]+s.reference[x]+(b?0:((_=a.offset)==null?void 0:_[f])||0)-(b?h.crossAxis:0);w<S?w=S:w>E&&(w=E)}return{[v]:g,[f]:w}}}},Cd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...d}=Re(e,t),m=await a.detectOverflow(t,d),f=Te(r),v=Qe(r),g=be(r)==="y",{width:w,height:p}=s.floating;let h,y;f==="top"||f==="bottom"?(h=f,y=v===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=f,h=v==="end"?"top":"bottom");const _=p-m.top-m.bottom,x=w-m.left-m.right,b=Ne(p-m[h],_),S=Ne(w-m[y],x),E=!t.middlewareData.shift;let C=b,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(C=_),E&&!v){const M=ce(m.left,0),j=ce(m.right,0),L=ce(m.top,0),W=ce(m.bottom,0);g?A=w-2*(M!==0||j!==0?M+j:ce(m.left,m.right)):C=p-2*(L!==0||W!==0?L+W:ce(m.top,m.bottom))}await u({...t,availableWidth:A,availableHeight:C});const k=await a.getDimensions(i.floating);return w!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function et(e){return is(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(is(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function is(e){return Ut()?e instanceof Node||e instanceof le(e).Node:!1}function ge(e){return Ut()?e instanceof Element||e instanceof le(e).Element:!1}function Pe(e){return Ut()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function $o(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Ed(e){return/^(table|td|th)$/.test(et(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Rd=/transform|translate|scale|rotate|perspective|filter/,Td=/paint|layout|strict|content/,Fe=e=>!!e&&e!=="none";let vn;function Jn(e){const t=ge(e)?we(e):e;return Fe(t.transform)||Fe(t.translate)||Fe(t.scale)||Fe(t.rotate)||Fe(t.perspective)||!Qn()&&(Fe(t.backdropFilter)||Fe(t.filter))||Rd.test(t.willChange||"")||Td.test(t.contain||"")}function Md(e){let t=Ae(e);for(;Pe(t)&&!Je(t);){if(Jn(t))return t;if(Kt(t))return null;t=Ae(t)}return null}function Qn(){return vn==null&&(vn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vn}function Je(e){return/^(html|body|#document)$/.test(et(e))}function we(e){return le(e).getComputedStyle(e)}function Gt(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$o(e)&&e.host||Ce(e);return $o(t)?t.host:t}function as(e){const t=Ae(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&pt(t)?t:as(t)}function st(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=as(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=le(r);if(s){const i=Mn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],i&&n?st(i):[])}else return t.concat(r,st(r,[],n))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=we(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pe(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=At(n)!==s||At(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function eo(e){return ge(e)?e:e.contextElement}function qe(e){const t=eo(e);if(!Pe(t))return Se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=cs(t);let a=(s?At(n.width):n.width)/o,i=(s?At(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Pd=Se(0);function ls(e){const t=le(e);return!Qn()||!t.visualViewport?Pd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Id(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=eo(e);let a=Se(1);t&&(o?ge(o)&&(a=qe(o)):a=qe(e));const i=Id(s,n,o)?ls(s):Se(0);let u=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,m=r.width/a.x,f=r.height/a.y;if(s){const v=le(s),g=o&&ge(o)?le(o):o;let w=v,p=Mn(w);for(;p&&o&&g!==w;){const h=qe(p),y=p.getBoundingClientRect(),_=we(p),x=y.left+(p.clientLeft+parseFloat(_.paddingLeft))*h.x,b=y.top+(p.clientTop+parseFloat(_.paddingTop))*h.y;u*=h.x,d*=h.y,m*=h.x,f*=h.y,u+=x,d+=b,w=le(p),p=Mn(w)}}return Dt({width:m,height:f,x:u,y:d})}function Yt(e,t){const n=Gt(e).scrollLeft;return t?t.left+n:$e(Ce(e)).left+n}function us(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Nd(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=Ce(o),i=t?Kt(t.floating):!1;if(o===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Se(1);const m=Se(0),f=Pe(o);if((f||!f&&!s)&&((et(o)!=="body"||pt(a))&&(u=Gt(o)),f)){const g=$e(o);d=qe(o),m.x=g.x+o.clientLeft,m.y=g.y+o.clientTop}const v=a&&!f&&!s?us(a,u):Se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+m.x+v.x,y:n.y*d.y-u.scrollTop*d.y+m.y+v.y}}function Ad(e){return Array.from(e.getClientRects())}function Od(e){const t=Ce(e),n=Gt(e),o=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const i=-n.scrollTop;return we(o).direction==="rtl"&&(a+=ce(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const Wo=25;function Dd(e,t){const n=le(e),o=Ce(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,u=0;if(r){s=r.width,a=r.height;const m=Qn();(!m||m&&t==="fixed")&&(i=r.offsetLeft,u=r.offsetTop)}const d=Yt(o);if(d<=0){const m=o.ownerDocument,f=m.body,v=getComputedStyle(f),g=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-g);w<=Wo&&(s-=w)}else d<=Wo&&(s+=d);return{width:s,height:a,x:i,y:u}}function jd(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Pe(e)?qe(e):Se(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=r*s.x,d=o*s.y;return{width:a,height:i,x:u,y:d}}function Vo(e,t,n){let o;if(t==="viewport")o=Dd(e,n);else if(t==="document")o=Od(Ce(e));else if(ge(t))o=jd(t,n);else{const r=ls(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function ds(e,t){const n=Ae(e);return n===t||!ge(n)||Je(n)?!1:we(n).position==="fixed"||ds(n,t)}function kd(e,t){const n=t.get(e);if(n)return n;let o=st(e,[],!1).filter(i=>ge(i)&&et(i)!=="body"),r=null;const s=we(e).position==="fixed";let a=s?Ae(e):e;for(;ge(a)&&!Je(a);){const i=we(a),u=Jn(a);!u&&i.position==="fixed"&&(r=null),(s?!u&&!r:!u&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||pt(a)&&!u&&ds(e,a))?o=o.filter(m=>m!==a):r=i,a=Ae(a)}return t.set(e,o),o}function Ld(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:kd(t,this._c):[].concat(n),o],i=Vo(t,a[0],r);let u=i.top,d=i.right,m=i.bottom,f=i.left;for(let v=1;v<a.length;v++){const g=Vo(t,a[v],r);u=ce(g.top,u),d=Ne(g.right,d),m=Ne(g.bottom,m),f=ce(g.left,f)}return{width:d-f,height:m-u,x:f,y:u}}function Fd(e){const{width:t,height:n}=cs(e);return{width:t,height:n}}function zd(e,t,n){const o=Pe(t),r=Ce(t),s=n==="fixed",a=$e(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=Se(0);function d(){u.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||pt(r))&&(i=Gt(t)),o){const g=$e(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else r&&d();s&&!o&&r&&d();const m=r&&!o&&!s?us(r,i):Se(0),f=a.left+i.scrollLeft-u.x-m.x,v=a.top+i.scrollTop-u.y-m.y;return{x:f,y:v,width:a.width,height:a.height}}function gn(e){return we(e).position==="static"}function Ho(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function fs(e,t){const n=le(e);if(Kt(e))return n;if(!Pe(e)){let r=Ae(e);for(;r&&!Je(r);){if(ge(r)&&!gn(r))return r;r=Ae(r)}return n}let o=Ho(e,t);for(;o&&Ed(o)&&gn(o);)o=Ho(o,t);return o&&Je(o)&&gn(o)&&!Jn(o)?n:o||Md(e)||n}const Bd=async function(e){const t=this.getOffsetParent||fs,n=this.getDimensions,o=await n(e.floating);return{reference:zd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $d(e){return we(e).direction==="rtl"}const Wd={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:Ce,getClippingRect:Ld,getOffsetParent:fs,getElementRects:Bd,getClientRects:Ad,getDimensions:Fd,getScale:qe,isElement:ge,isRTL:$d};function ps(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vd(e,t){let n=null,o;const r=Ce(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:m,top:f,width:v,height:g}=d;if(i||t(),!v||!g)return;const w=Rt(f),p=Rt(r.clientWidth-(m+v)),h=Rt(r.clientHeight-(f+g)),y=Rt(m),x={rootMargin:-w+"px "+-p+"px "+-h+"px "+-y+"px",threshold:ce(0,Ne(1,u))||1};let b=!0;function S(E){const C=E[0].intersectionRatio;if(C!==u){if(!b)return a();C?a(!1,C):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!ps(d,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),s}function Hd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=eo(e),m=r||s?[...d?st(d):[],...t?st(t):[]]:[];m.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=d&&i?Vd(d,n):null;let v=-1,g=null;a&&(g=new ResizeObserver(y=>{let[_]=y;_&&_.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!u&&g.observe(d),t&&g.observe(t));let w,p=u?$e(e):null;u&&h();function h(){const y=$e(e);p&&!ps(p,y)&&n(),p=y,w=requestAnimationFrame(h)}return n(),()=>{var y;m.forEach(_=>{r&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(w)}}const Ud=yd,Kd=bd,Gd=wd,Yd=Cd,Xd=_d,Uo=gd,qd=Sd,Zd=(e,t,n)=>{const o=new Map,r={platform:Wd,...n},s={...r.platform,_c:o};return vd(e,t,{...r,platform:s})};var Jd=typeof document<"u",Qd=function(){},Pt=Jd?N.useLayoutEffect:Qd;function jt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!jt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ms(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(e,t){const n=ms(e);return Math.round(t*n)/n}function wn(e){const t=c.useRef(e);return Pt(()=>{t.current=e}),t}function ef(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[m,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=c.useState(o);jt(v,o)||g(o);const[w,p]=c.useState(null),[h,y]=c.useState(null),_=c.useCallback(P=>{P!==E.current&&(E.current=P,p(P))},[]),x=c.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),b=s||w,S=a||h,E=c.useRef(null),C=c.useRef(null),A=c.useRef(m),k=u!=null,M=wn(u),j=wn(r),L=wn(d),W=c.useCallback(()=>{if(!E.current||!C.current)return;const P={placement:t,strategy:n,middleware:v};j.current&&(P.platform=j.current),Zd(E.current,C.current,P).then(R=>{const V={...R,isPositioned:L.current!==!1};T.current&&!jt(A.current,V)&&(A.current=V,ct.flushSync(()=>{f(V)}))})},[v,t,n,j,L]);Pt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[d]);const T=c.useRef(!1);Pt(()=>(T.current=!0,()=>{T.current=!1}),[]),Pt(()=>{if(b&&(E.current=b),S&&(C.current=S),b&&S){if(M.current)return M.current(b,S,W);W()}},[b,S,W,M,k]);const $=c.useMemo(()=>({reference:E,floating:C,setReference:_,setFloating:x}),[_,x]),D=c.useMemo(()=>({reference:b,floating:S}),[b,S]),z=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!D.floating)return P;const R=Ko(D.floating,m.x),V=Ko(D.floating,m.y);return i?{...P,transform:"translate("+R+"px, "+V+"px)",...ms(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:V}},[n,i,D.floating,m.x,m.y]);return c.useMemo(()=>({...m,update:W,refs:$,elements:D,floatingStyles:z}),[m,W,$,D,z])}const tf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Uo({element:o.current,padding:r}).fn(n):{}:o?Uo({element:o,padding:r}).fn(n):{}}}},nf=(e,t)=>{const n=Ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},of=(e,t)=>{const n=Kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},rf=(e,t)=>({fn:qd(e).fn,options:[e,t]}),sf=(e,t)=>{const n=Gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},af=(e,t)=>{const n=Yd(e);return{name:n.name,fn:n.fn,options:[e,t]}},cf=(e,t)=>{const n=Xd(e);return{name:n.name,fn:n.fn,options:[e,t]}},lf=(e,t)=>{const n=tf(e);return{name:n.name,fn:n.fn,options:[e,t]}};var uf="Arrow",hs=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(B.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});hs.displayName=uf;var df=hs;function ff(e){const[t,n]=c.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var to="Popper",[vs,Xt]=Oe(to),[pf,gs]=vs(to),ws=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return l.jsx(pf,{scope:t,anchor:o,onAnchorChange:r,children:n})};ws.displayName=to;var _s="PopperAnchor",xs=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=gs(_s,n),a=c.useRef(null),i=H(t,a),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=o?.current||a.current,d!==u.current&&s.onAnchorChange(u.current)}),o?null:l.jsx(B.div,{...r,ref:i})});xs.displayName=_s;var no="PopperContent",[mf,hf]=vs(no),ys=c.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:w,...p}=e,h=gs(no,n),[y,_]=c.useState(null),x=H(t,O=>_(O)),[b,S]=c.useState(null),E=ff(b),C=E?.width??0,A=E?.height??0,k=o+(s!=="center"?"-"+s:""),M=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},j=Array.isArray(d)?d:[d],L=j.length>0,W={padding:M,boundary:j.filter(gf),altBoundary:L},{refs:T,floatingStyles:$,placement:D,isPositioned:z,middlewareData:P}=ef({strategy:"fixed",placement:k,whileElementsMounted:(...O)=>Hd(...O,{animationFrame:g==="always"}),elements:{reference:h.anchor},middleware:[nf({mainAxis:r+A,alignmentAxis:a}),u&&of({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?rf():void 0,...W}),u&&sf({...W}),af({...W,apply:({elements:O,rects:U,availableWidth:se,availableHeight:K})=>{const{width:Y,height:X}=U.reference,ue=O.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${K}px`),ue.setProperty("--radix-popper-anchor-width",`${Y}px`),ue.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&lf({element:b,padding:i}),wf({arrowWidth:C,arrowHeight:A}),v&&cf({strategy:"referenceHidden",...W})]}),[R,V]=Cs(D),G=ne(w);q(()=>{z&&G?.()},[z,G]);const Q=P.arrow?.x,Z=P.arrow?.y,re=P.arrow?.centerOffset!==0,[Ee,ie]=c.useState();return q(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(mf,{scope:n,placedSide:R,onArrowChange:S,arrowX:Q,arrowY:Z,shouldHideArrow:re,children:l.jsx(B.div,{"data-side":R,"data-align":V,...p,ref:x,style:{...p.style,animation:z?void 0:"none"}})})})});ys.displayName=no;var bs="PopperArrow",vf={top:"bottom",right:"left",bottom:"top",left:"right"},Ss=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=hf(bs,o),a=vf[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(df,{...r,ref:n,style:{...r.style,display:"block"}})})});Ss.displayName=bs;function gf(e){return e!==null}var wf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,m]=Cs(n),f={start:"0%",center:"50%",end:"100%"}[m],v=(r.arrow?.x??0)+i/2,g=(r.arrow?.y??0)+u/2;let w="",p="";return d==="bottom"?(w=a?f:`${v}px`,p=`${-u}px`):d==="top"?(w=a?f:`${v}px`,p=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,p=a?f:`${g}px`):d==="left"&&(w=`${o.floating.width+u}px`,p=a?f:`${g}px`),{data:{x:w,y:p}}}});function Cs(e){const[t,n="center"]=e.split("-");return[t,n]}var oo=ws,Es=xs,Rs=ys,Ts=Ss,_n="rovingFocusGroup.onEntryFocus",_f={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[Pn,Ms,xf]=Vt(mt),[yf,Ps]=Oe(mt,[xf]),[bf,Sf]=yf(mt),Is=c.forwardRef((e,t)=>l.jsx(Pn.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Pn.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Cf,{...e,ref:t})})}));Is.displayName=mt;var Cf=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...f}=e,v=c.useRef(null),g=H(t,v),w=Yn(s),[p,h]=ze({prop:a,defaultProp:i??null,onChange:u,caller:mt}),[y,_]=c.useState(!1),x=ne(d),b=Ms(n),S=c.useRef(!1),[E,C]=c.useState(0);return c.useEffect(()=>{const A=v.current;if(A)return A.addEventListener(_n,x),()=>A.removeEventListener(_n,x)},[x]),l.jsx(bf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:p,onItemFocus:c.useCallback(A=>h(A),[h]),onItemShiftTab:c.useCallback(()=>_(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(A=>A+1),[]),onFocusableItemRemove:c.useCallback(()=>C(A=>A-1),[]),children:l.jsx(B.div,{tabIndex:y||E===0?-1:0,"data-orientation":o,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{S.current=!0}),onFocus:I(e.onFocus,A=>{const k=!S.current;if(A.target===A.currentTarget&&k&&!y){const M=new CustomEvent(_n,_f);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const j=b().filter(D=>D.focusable),L=j.find(D=>D.active),W=j.find(D=>D.id===p),$=[L,W,...j].filter(Boolean).map(D=>D.ref.current);Os($,m)}}S.current=!1}),onBlur:I(e.onBlur,()=>_(!1))})})}),Ns="RovingFocusGroupItem",As=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,u=ve(),d=s||u,m=Sf(Ns,n),f=m.currentTabStopId===d,v=Ms(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:p}=m;return c.useEffect(()=>{if(o)return g(),()=>w()},[o,g,w]),l.jsx(Pn.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(B.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:I(e.onMouseDown,h=>{o?m.onItemFocus(d):h.preventDefault()}),onFocus:I(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:I(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){m.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Tf(h,m.orientation,m.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let x=v().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const b=x.indexOf(h.currentTarget);x=m.loop?Mf(x,b+1):x.slice(b+1)}setTimeout(()=>Os(x))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:p!=null}):a})})});As.displayName=Ns;var Ef={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Rf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Tf(e,t,n){const o=Rf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Ef[o]}function Os(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Mf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Pf=Is,If=As,In=["Enter"," "],Nf=["ArrowDown","PageUp","Home"],Ds=["ArrowUp","PageDown","End"],Af=[...Nf,...Ds],Of={ltr:[...In,"ArrowRight"],rtl:[...In,"ArrowLeft"]},Df={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ht="Menu",[it,jf,kf]=Vt(ht),[He,js]=Oe(ht,[kf,Xt,Ps]),vt=Xt(),ks=Ps(),[Ls,De]=He(ht),[Lf,gt]=He(ht),Fs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,i=vt(t),[u,d]=c.useState(null),m=c.useRef(!1),f=ne(s),v=Yn(r);return c.useEffect(()=>{const g=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(oo,{...i,children:l.jsx(Ls,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:l.jsx(Lf,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:m,dir:v,modal:a,children:o})})})};Fs.displayName=ht;var Ff="MenuAnchor",ro=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Es,{...r,...o,ref:t})});ro.displayName=Ff;var so="MenuPortal",[zf,zs]=He(so,{forceMount:void 0}),Bs=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=De(so,t);return l.jsx(zf,{scope:t,forceMount:n,children:l.jsx(Me,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:o})})})};Bs.displayName=so;var pe="MenuContent",[Bf,io]=He(pe),$s=c.forwardRef((e,t)=>{const n=zs(pe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(pe,e.__scopeMenu),a=gt(pe,e.__scopeMenu);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Me,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx($f,{...r,ref:t}):l.jsx(Wf,{...r,ref:t})})})})}),$f=c.forwardRef((e,t)=>{const n=De(pe,e.__scopeMenu),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return Bn(s)},[]),l.jsx(ao,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wf=c.forwardRef((e,t)=>{const n=De(pe,e.__scopeMenu);return l.jsx(ao,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Vf=Ze("MenuContent.ScrollLock"),ao=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:v,onDismiss:g,disableOutsideScroll:w,...p}=e,h=De(pe,n),y=gt(pe,n),_=vt(n),x=ks(n),b=jf(n),[S,E]=c.useState(null),C=c.useRef(null),A=H(t,C,h.onContentChange),k=c.useRef(0),M=c.useRef(""),j=c.useRef(0),L=c.useRef(null),W=c.useRef("right"),T=c.useRef(0),$=w?$t:c.Fragment,D=w?{as:Vf,allowPinchZoom:!0}:void 0,z=R=>{const V=M.current+R,G=b().filter(O=>!O.disabled),Q=document.activeElement,Z=G.find(O=>O.ref.current===Q)?.textValue,re=G.map(O=>O.textValue),Ee=tp(re,V,Z),ie=G.find(O=>O.textValue===Ee)?.ref.current;(function O(U){M.current=U,window.clearTimeout(k.current),U!==""&&(k.current=window.setTimeout(()=>O(""),1e3))})(V),ie&&setTimeout(()=>ie.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),zn();const P=c.useCallback(R=>W.current===L.current?.side&&op(R,L.current?.area),[]);return l.jsx(Bf,{scope:n,searchRef:M,onItemEnter:c.useCallback(R=>{P(R)&&R.preventDefault()},[P]),onItemLeave:c.useCallback(R=>{P(R)||(C.current?.focus(),E(null))},[P]),onTriggerLeave:c.useCallback(R=>{P(R)&&R.preventDefault()},[P]),pointerGraceTimerRef:j,onPointerGraceIntentChange:c.useCallback(R=>{L.current=R},[]),children:l.jsx($,{...D,children:l.jsx(zt,{asChild:!0,trapped:r,onMountAutoFocus:I(s,R=>{R.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:v,onDismiss:g,children:l.jsx(Pf,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:I(u,R=>{y.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Rs,{role:"menu","aria-orientation":"vertical","data-state":ri(h.open),"data-radix-menu-content":"",dir:y.dir,..._,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:I(p.onKeyDown,R=>{const G=R.target.closest("[data-radix-menu-content]")===R.currentTarget,Q=R.ctrlKey||R.altKey||R.metaKey,Z=R.key.length===1;G&&(R.key==="Tab"&&R.preventDefault(),!Q&&Z&&z(R.key));const re=C.current;if(R.target!==re||!Af.includes(R.key))return;R.preventDefault();const ie=b().filter(O=>!O.disabled).map(O=>O.ref.current);Ds.includes(R.key)&&ie.reverse(),Qf(ie)}),onBlur:I(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(k.current),M.current="")}),onPointerMove:I(e.onPointerMove,at(R=>{const V=R.target,G=T.current!==R.clientX;if(R.currentTarget.contains(V)&&G){const Q=R.clientX>T.current?"right":"left";W.current=Q,T.current=R.clientX}}))})})})})})})});$s.displayName=pe;var Hf="MenuGroup",co=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"group",...o,ref:t})});co.displayName=Hf;var Uf="MenuLabel",Ws=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});Ws.displayName=Uf;var kt="MenuItem",Go="menu.itemSelect",qt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=c.useRef(null),a=gt(kt,e.__scopeMenu),i=io(kt,e.__scopeMenu),u=H(t,s),d=c.useRef(!1),m=()=>{const f=s.current;if(!n&&f){const v=new CustomEvent(Go,{bubbles:!0,cancelable:!0});f.addEventListener(Go,g=>o?.(g),{once:!0}),Fn(f,v),v.defaultPrevented?d.current=!1:a.onClose()}};return l.jsx(Vs,{...r,ref:u,disabled:n,onClick:I(e.onClick,m),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:I(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,f=>{const v=i.searchRef.current!=="";n||v&&f.key===" "||In.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});qt.displayName=kt;var Vs=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=io(kt,n),i=ks(n),u=c.useRef(null),d=H(t,u),[m,f]=c.useState(!1),[v,g]=c.useState("");return c.useEffect(()=>{const w=u.current;w&&g((w.textContent??"").trim())},[s.children]),l.jsx(it.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:l.jsx(If,{asChild:!0,...i,focusable:!o,children:l.jsx(B.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:I(e.onPointerMove,at(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,at(w=>a.onItemLeave(w))),onFocus:I(e.onFocus,()=>f(!0)),onBlur:I(e.onBlur,()=>f(!1))})})})}),Kf="MenuCheckboxItem",Hs=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Xs,{scope:e.__scopeMenu,checked:n,children:l.jsx(qt,{role:"menuitemcheckbox","aria-checked":Lt(n)?"mixed":n,...r,ref:t,"data-state":fo(n),onSelect:I(r.onSelect,()=>o?.(Lt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hs.displayName=Kf;var Us="MenuRadioGroup",[Gf,Yf]=He(Us,{value:void 0,onValueChange:()=>{}}),Ks=c.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ne(o);return l.jsx(Gf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(co,{...r,ref:t})})});Ks.displayName=Us;var Gs="MenuRadioItem",Ys=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=Yf(Gs,e.__scopeMenu),s=n===r.value;return l.jsx(Xs,{scope:e.__scopeMenu,checked:s,children:l.jsx(qt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":fo(s),onSelect:I(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ys.displayName=Gs;var lo="MenuItemIndicator",[Xs,Xf]=He(lo,{checked:!1}),qs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Xf(lo,n);return l.jsx(Me,{present:o||Lt(s.checked)||s.checked===!0,children:l.jsx(B.span,{...r,ref:t,"data-state":fo(s.checked)})})});qs.displayName=lo;var qf="MenuSeparator",Zs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Zs.displayName=qf;var Zf="MenuArrow",Js=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Ts,{...r,...o,ref:t})});Js.displayName=Zf;var uo="MenuSub",[Jf,Qs]=He(uo),ei=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=De(uo,t),a=vt(t),[i,u]=c.useState(null),[d,m]=c.useState(null),f=ne(r);return c.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),l.jsx(oo,{...a,children:l.jsx(Ls,{scope:t,open:o,onOpenChange:f,content:d,onContentChange:m,children:l.jsx(Jf,{scope:t,contentId:ve(),triggerId:ve(),trigger:i,onTriggerChange:u,children:n})})})};ei.displayName=uo;var ot="MenuSubTrigger",ti=c.forwardRef((e,t)=>{const n=De(ot,e.__scopeMenu),o=gt(ot,e.__scopeMenu),r=Qs(ot,e.__scopeMenu),s=io(ot,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},m=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>m,[m]),c.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),u(null)}},[i,u]),l.jsx(ro,{asChild:!0,...d,children:l.jsx(Vs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ri(n.open),...e,ref:lt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,at(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:I(e.onPointerLeave,at(f=>{m();const v=n.content?.getBoundingClientRect();if(v){const g=n.content?.dataset.side,w=g==="right",p=w?-5:5,h=v[w?"left":"right"],y=v[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:h,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:h,y:v.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,f=>{const v=s.searchRef.current!=="";e.disabled||v&&f.key===" "||Of[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ti.displayName=ot;var ni="MenuSubContent",oi=c.forwardRef((e,t)=>{const n=zs(pe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(pe,e.__scopeMenu),a=gt(pe,e.__scopeMenu),i=Qs(ni,e.__scopeMenu),u=c.useRef(null),d=H(t,u);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Me,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:l.jsx(ao,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{a.isUsingKeyboardRef.current&&u.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:I(e.onFocusOutside,m=>{m.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,m=>{a.onClose(),m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{const f=m.currentTarget.contains(m.target),v=Df[a.dir].includes(m.key);f&&v&&(s.onOpenChange(!1),i.trigger?.focus(),m.preventDefault())})})})})})});oi.displayName=ni;function ri(e){return e?"open":"closed"}function Lt(e){return e==="indeterminate"}function fo(e){return Lt(e)?"indeterminate":e?"checked":"unchecked"}function Qf(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ep(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function tp(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=ep(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function np(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],u=t[a],d=i.x,m=i.y,f=u.x,v=u.y;m>o!=v>o&&n<(f-d)*(o-m)/(v-m)+d&&(r=!r)}return r}function op(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return np(n,t)}function at(e){return t=>t.pointerType==="mouse"?e(t):void 0}var rp=Fs,sp=ro,ip=Bs,ap=$s,cp=co,lp=Ws,up=qt,dp=Hs,fp=Ks,pp=Ys,mp=qs,hp=Zs,vp=Js,gp=ei,wp=ti,_p=oi,Zt="DropdownMenu",[xp]=Oe(Zt,[js]),oe=js(),[yp,si]=xp(Zt),ii=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=oe(t),d=c.useRef(null),[m,f]=ze({prop:r,defaultProp:s??!1,onChange:a,caller:Zt});return l.jsx(yp,{scope:t,triggerId:ve(),triggerRef:d,contentId:ve(),open:m,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(v=>!v),[f]),modal:i,children:l.jsx(rp,{...u,open:m,onOpenChange:f,dir:o,modal:i,children:n})})};ii.displayName=Zt;var ai="DropdownMenuTrigger",ci=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=si(ai,n),a=oe(n);return l.jsx(sp,{asChild:!0,...a,children:l.jsx(B.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:lt(t,s.triggerRef),onPointerDown:I(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:I(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});ci.displayName=ai;var bp="DropdownMenuPortal",li=e=>{const{__scopeDropdownMenu:t,...n}=e,o=oe(t);return l.jsx(ip,{...o,...n})};li.displayName=bp;var ui="DropdownMenuContent",di=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=si(ui,n),s=oe(n),a=c.useRef(!1);return l.jsx(ap,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{a.current||r.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:I(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,m=u.button===2||d;(!r.modal||m)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});di.displayName=ui;var Sp="DropdownMenuGroup",fi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(cp,{...r,...o,ref:t})});fi.displayName=Sp;var Cp="DropdownMenuLabel",pi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(lp,{...r,...o,ref:t})});pi.displayName=Cp;var Ep="DropdownMenuItem",mi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(up,{...r,...o,ref:t})});mi.displayName=Ep;var Rp="DropdownMenuCheckboxItem",hi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(dp,{...r,...o,ref:t})});hi.displayName=Rp;var Tp="DropdownMenuRadioGroup",vi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(fp,{...r,...o,ref:t})});vi.displayName=Tp;var Mp="DropdownMenuRadioItem",gi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(pp,{...r,...o,ref:t})});gi.displayName=Mp;var Pp="DropdownMenuItemIndicator",wi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(mp,{...r,...o,ref:t})});wi.displayName=Pp;var Ip="DropdownMenuSeparator",_i=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(hp,{...r,...o,ref:t})});_i.displayName=Ip;var Np="DropdownMenuArrow",Ap=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(vp,{...r,...o,ref:t})});Ap.displayName=Np;var Op=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,a=oe(t),[i,u]=ze({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return l.jsx(gp,{...a,open:i,onOpenChange:u,children:n})},Dp="DropdownMenuSubTrigger",xi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(wp,{...r,...o,ref:t})});xi.displayName=Dp;var jp="DropdownMenuSubContent",yi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(_p,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yi.displayName=jp;var bi=ii,Si=ci,po=li,Ci=di,kp=fi,Lp=pi,Fp=mi,Ei=hi,zp=vi,Bp=gi,mo=wi,$p=_i,Wp=Op,Vp=xi,Hp=yi;const Up="uzi-multi-select-module__wrapper__Izj2x",Kp="uzi-multi-select-module__wrapperFullWidth__eH8pf",Gp="uzi-multi-select-module__trigger__r3816",Yp="uzi-multi-select-module__value__PuUmG",Xp="uzi-multi-select-module__placeholder__dJIU-",qp="uzi-multi-select-module__chip__46Ms-",Zp="uzi-multi-select-module__chipSummary__zLwi8",Jp="uzi-multi-select-module__chevron__SWK5l",Qp="uzi-multi-select-module__menu__q8auA",em="uzi-multi-select-module__option__-Ioqk",tm="uzi-multi-select-module__optionDisabled__qtCi8",nm="uzi-multi-select-module__optionSelected__74IO8",om="uzi-multi-select-module__optionLabel__cVoN7",rm="uzi-multi-select-module__indicator__NO-WE",sm="uzi-multi-select-module__indicatorSelected__9sEAy",im="uzi-multi-select-module__indicatorDisabled__vqdiH",ee={wrapper:Up,wrapperFullWidth:Kp,trigger:Gp,value:Yp,placeholder:Xp,chip:qp,chipSummary:Zp,chevron:Jp,menu:Qp,option:em,optionDisabled:tm,optionSelected:nm,optionLabel:om,indicator:rm,indicatorSelected:sm,indicatorDisabled:im},Ri=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="Select options",fullWidth:r=!0,maxVisibleValues:s=2,className:a,disabled:i=!1,name:u,"aria-label":d,"aria-labelledby":m},f)=>{const v=c.useMemo(()=>new Set(t),[t]),g=c.useMemo(()=>e.filter(_=>v.has(_.value)),[e,v]),w=c.useCallback(_=>{if(v.has(_)){n(t.filter(x=>x!==_));return}n([...t,_])},[n,v,t]),p=Math.max(1,s),h=g.slice(0,p),y=Math.max(0,g.length-h.length);return l.jsx(bi,{modal:!1,children:l.jsxs("div",{className:F(ee.wrapper,r&&ee.wrapperFullWidth,a),children:[l.jsx(Si,{asChild:!0,children:l.jsxs("button",{ref:f,type:"button",className:ee.trigger,"aria-label":d,"aria-labelledby":m,disabled:i,children:[l.jsx("span",{className:ee.value,children:g.length===0?l.jsx("span",{className:ee.placeholder,children:o}):l.jsxs(l.Fragment,{children:[h.map(_=>l.jsx("span",{className:ee.chip,children:_.label},_.value)),y>0?l.jsxs("span",{className:F(ee.chip,ee.chipSummary),children:["+",y]}):null]})}),l.jsx("span",{className:ee.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),u?t.map(_=>l.jsx("input",{type:"hidden",name:u,value:_},_)):null,l.jsx(po,{children:l.jsx(Ci,{className:ee.menu,sideOffset:4,align:"start",children:e.map(_=>{const x=v.has(_.value);return l.jsxs(Ei,{className:F(ee.option,x&&ee.optionSelected,_.disabled&&ee.optionDisabled),checked:x,disabled:_.disabled,onCheckedChange:()=>w(_.value),onSelect:b=>b.preventDefault(),children:[l.jsx("span",{className:F(ee.indicator,x&&ee.indicatorSelected,_.disabled&&ee.indicatorDisabled),"aria-hidden":"true",children:l.jsx(mo,{forceMount:!0,children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx("span",{className:ee.optionLabel,children:_.label})]},_.value)})})})]})})});Ri.displayName="MultiSelect";function Yo(e,[t,n]){return Math.min(n,Math.max(t,e))}function am(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cm=[" ","Enter","ArrowUp","ArrowDown"],lm=[" ","Enter"],We="Select",[Jt,Qt,um]=Vt(We),[tt]=Oe(We,[um,Xt]),en=Xt(),[dm,je]=tt(We),[fm,pm]=tt(We),Ti=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:u,dir:d,name:m,autoComplete:f,disabled:v,required:g,form:w}=e,p=en(t),[h,y]=c.useState(null),[_,x]=c.useState(null),[b,S]=c.useState(!1),E=Yn(d),[C,A]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[k,M]=ze({prop:a,defaultProp:i,onChange:u,caller:We}),j=c.useRef(null),L=h?w||!!h.closest("form"):!0,[W,T]=c.useState(new Set),$=Array.from(W).map(D=>D.props.value).join(";");return l.jsx(oo,{...p,children:l.jsxs(dm,{required:g,scope:t,trigger:h,onTriggerChange:y,valueNode:_,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:ve(),value:k,onValueChange:M,open:C,onOpenChange:A,dir:E,triggerPointerDownPosRef:j,disabled:v,children:[l.jsx(Jt.Provider,{scope:t,children:l.jsx(fm,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(D=>{T(z=>new Set(z).add(D))},[]),onNativeOptionRemove:c.useCallback(D=>{T(z=>{const P=new Set(z);return P.delete(D),P})},[]),children:n})}),L?l.jsxs(Gi,{"aria-hidden":!0,required:g,tabIndex:-1,name:m,autoComplete:f,value:k,onChange:D=>M(D.target.value),disabled:v,form:w,children:[k===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Ti.displayName=We;var Mi="SelectTrigger",Pi=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=en(n),a=je(Mi,n),i=a.disabled||o,u=H(t,a.onTriggerChange),d=Qt(n),m=c.useRef("touch"),[f,v,g]=Xi(p=>{const h=d().filter(x=>!x.disabled),y=h.find(x=>x.value===a.value),_=qi(h,p,y);_!==void 0&&a.onValueChange(_.value)}),w=p=>{i||(a.onOpenChange(!0),g()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return l.jsx(Es,{asChild:!0,...s,children:l.jsx(B.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Yi(a.value)?"":void 0,...r,ref:u,onClick:I(r.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&w(p)}),onPointerDown:I(r.onPointerDown,p=>{m.current=p.pointerType;const h=p.target;h.hasPointerCapture(p.pointerId)&&h.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(w(p),p.preventDefault())}),onKeyDown:I(r.onKeyDown,p=>{const h=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&v(p.key),!(h&&p.key===" ")&&cm.includes(p.key)&&(w(),p.preventDefault())})})})});Pi.displayName=Mi;var Ii="SelectValue",Ni=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,u=je(Ii,n),{onValueNodeHasChildrenChange:d}=u,m=s!==void 0,f=H(t,u.onValueNodeChange);return q(()=>{d(m)},[d,m]),l.jsx(B.span,{...i,ref:f,style:{pointerEvents:"none"},children:Yi(u.value)?l.jsx(l.Fragment,{children:a}):s})});Ni.displayName=Ii;var mm="SelectIcon",Ai=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(B.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Ai.displayName=mm;var hm="SelectPortal",Oi=e=>l.jsx(dt,{asChild:!0,...e});Oi.displayName=hm;var Ve="SelectContent",Di=c.forwardRef((e,t)=>{const n=je(Ve,e.__scopeSelect),[o,r]=c.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?ct.createPortal(l.jsx(ji,{scope:e.__scopeSelect,children:l.jsx(Jt.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(ki,{...e,ref:t})});Di.displayName=Ve;var he=10,[ji,ke]=tt(Ve),vm="SelectContentImpl",gm=Ze("SelectContent.RemoveScroll"),ki=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:v,collisionPadding:g,sticky:w,hideWhenDetached:p,avoidCollisions:h,...y}=e,_=je(Ve,n),[x,b]=c.useState(null),[S,E]=c.useState(null),C=H(t,O=>b(O)),[A,k]=c.useState(null),[M,j]=c.useState(null),L=Qt(n),[W,T]=c.useState(!1),$=c.useRef(!1);c.useEffect(()=>{if(x)return Bn(x)},[x]),zn();const D=c.useCallback(O=>{const[U,...se]=L().map(X=>X.ref.current),[K]=se.slice(-1),Y=document.activeElement;for(const X of O)if(X===Y||(X?.scrollIntoView({block:"nearest"}),X===U&&S&&(S.scrollTop=0),X===K&&S&&(S.scrollTop=S.scrollHeight),X?.focus(),document.activeElement!==Y))return},[L,S]),z=c.useCallback(()=>D([A,x]),[D,A,x]);c.useEffect(()=>{W&&z()},[W,z]);const{onOpenChange:P,triggerPointerDownPosRef:R}=_;c.useEffect(()=>{if(x){let O={x:0,y:0};const U=K=>{O={x:Math.abs(Math.round(K.pageX)-(R.current?.x??0)),y:Math.abs(Math.round(K.pageY)-(R.current?.y??0))}},se=K=>{O.x<=10&&O.y<=10?K.preventDefault():x.contains(K.target)||P(!1),document.removeEventListener("pointermove",U),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",se,{capture:!0})}}},[x,P,R]),c.useEffect(()=>{const O=()=>P(!1);return window.addEventListener("blur",O),window.addEventListener("resize",O),()=>{window.removeEventListener("blur",O),window.removeEventListener("resize",O)}},[P]);const[V,G]=Xi(O=>{const U=L().filter(Y=>!Y.disabled),se=U.find(Y=>Y.ref.current===document.activeElement),K=qi(U,O,se);K&&setTimeout(()=>K.ref.current.focus())}),Q=c.useCallback((O,U,se)=>{const K=!$.current&&!se;(_.value!==void 0&&_.value===U||K)&&(k(O),K&&($.current=!0))},[_.value]),Z=c.useCallback(()=>x?.focus(),[x]),re=c.useCallback((O,U,se)=>{const K=!$.current&&!se;(_.value!==void 0&&_.value===U||K)&&j(O)},[_.value]),Ee=o==="popper"?Nn:Li,ie=Ee===Nn?{side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:v,collisionPadding:g,sticky:w,hideWhenDetached:p,avoidCollisions:h}:{};return l.jsx(ji,{scope:n,content:x,viewport:S,onViewportChange:E,itemRefCallback:Q,selectedItem:A,onItemLeave:Z,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:M,position:o,isPositioned:W,searchRef:V,children:l.jsx($t,{as:gm,allowPinchZoom:!0,children:l.jsx(zt,{asChild:!0,trapped:_.open,onMountAutoFocus:O=>{O.preventDefault()},onUnmountAutoFocus:I(r,O=>{_.trigger?.focus({preventScroll:!0}),O.preventDefault()}),children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:O=>O.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:l.jsx(Ee,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:O=>O.preventDefault(),...y,...ie,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:I(y.onKeyDown,O=>{const U=O.ctrlKey||O.altKey||O.metaKey;if(O.key==="Tab"&&O.preventDefault(),!U&&O.key.length===1&&G(O.key),["ArrowUp","ArrowDown","Home","End"].includes(O.key)){let K=L().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(O.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(O.key)){const Y=O.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>D(K)),O.preventDefault()}})})})})})})});ki.displayName=vm;var wm="SelectItemAlignedPosition",Li=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=je(Ve,n),a=ke(Ve,n),[i,u]=c.useState(null),[d,m]=c.useState(null),f=H(t,C=>m(C)),v=Qt(n),g=c.useRef(!1),w=c.useRef(!0),{viewport:p,selectedItem:h,selectedItemText:y,focusSelectedItem:_}=a,x=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&p&&h&&y){const C=s.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),k=s.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(s.dir!=="rtl"){const Y=M.left-A.left,X=k.left-Y,ue=C.left-X,Le=C.width+ue,tn=Math.max(Le,A.width),nn=window.innerWidth-he,on=Yo(X,[he,Math.max(he,nn-tn)]);i.style.minWidth=Le+"px",i.style.left=on+"px"}else{const Y=A.right-M.right,X=window.innerWidth-k.right-Y,ue=window.innerWidth-C.right-X,Le=C.width+ue,tn=Math.max(Le,A.width),nn=window.innerWidth-he,on=Yo(X,[he,Math.max(he,nn-tn)]);i.style.minWidth=Le+"px",i.style.right=on+"px"}const j=v(),L=window.innerHeight-he*2,W=p.scrollHeight,T=window.getComputedStyle(d),$=parseInt(T.borderTopWidth,10),D=parseInt(T.paddingTop,10),z=parseInt(T.borderBottomWidth,10),P=parseInt(T.paddingBottom,10),R=$+D+W+P+z,V=Math.min(h.offsetHeight*5,R),G=window.getComputedStyle(p),Q=parseInt(G.paddingTop,10),Z=parseInt(G.paddingBottom,10),re=C.top+C.height/2-he,Ee=L-re,ie=h.offsetHeight/2,O=h.offsetTop+ie,U=$+D+O,se=R-U;if(U<=re){const Y=j.length>0&&h===j[j.length-1].ref.current;i.style.bottom="0px";const X=d.clientHeight-p.offsetTop-p.offsetHeight,ue=Math.max(Ee,ie+(Y?Z:0)+X+z),Le=U+ue;i.style.height=Le+"px"}else{const Y=j.length>0&&h===j[0].ref.current;i.style.top="0px";const ue=Math.max(re,$+p.offsetTop+(Y?Q:0)+ie)+se;i.style.height=ue+"px",p.scrollTop=U-re+p.offsetTop}i.style.margin=`${he}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=L+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[v,s.trigger,s.valueNode,i,d,p,h,y,s.dir,o]);q(()=>x(),[x]);const[b,S]=c.useState();q(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const E=c.useCallback(C=>{C&&w.current===!0&&(x(),_?.(),w.current=!1)},[x,_]);return l.jsx(xm,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(B.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Li.displayName=wm;var _m="SelectPopperPosition",Nn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=he,...s}=e,a=en(n);return l.jsx(Rs,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Nn.displayName=_m;var[xm,ho]=tt(Ve,{}),An="SelectViewport",Fi=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=ke(An,n),a=ho(An,n),i=H(t,s.onViewportChange),u=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Jt.Slot,{scope:n,children:l.jsx(B.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,d=>{const m=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:v}=a;if(v?.current&&f){const g=Math.abs(u.current-m.scrollTop);if(g>0){const w=window.innerHeight-he*2,p=parseFloat(f.style.minHeight),h=parseFloat(f.style.height),y=Math.max(p,h);if(y<w){const _=y+g,x=Math.min(w,_),b=_-x;f.style.height=x+"px",f.style.bottom==="0px"&&(m.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});Fi.displayName=An;var zi="SelectGroup",[ym,bm]=tt(zi),Sm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ve();return l.jsx(ym,{scope:n,id:r,children:l.jsx(B.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Sm.displayName=zi;var Bi="SelectLabel",Cm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=bm(Bi,n);return l.jsx(B.div,{id:r.id,...o,ref:t})});Cm.displayName=Bi;var Ft="SelectItem",[Em,$i]=tt(Ft),Wi=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=je(Ft,n),u=ke(Ft,n),d=i.value===o,[m,f]=c.useState(s??""),[v,g]=c.useState(!1),w=H(t,_=>u.itemRefCallback?.(_,o,r)),p=ve(),h=c.useRef("touch"),y=()=>{r||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Em,{scope:n,value:o,disabled:r,textId:p,isSelected:d,onItemTextChange:c.useCallback(_=>{f(x=>x||(_?.textContent??"").trim())},[]),children:l.jsx(Jt.ItemSlot,{scope:n,value:o,disabled:r,textValue:m,children:l.jsx(B.div,{role:"option","aria-labelledby":p,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:I(a.onFocus,()=>g(!0)),onBlur:I(a.onBlur,()=>g(!1)),onClick:I(a.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:I(a.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:I(a.onPointerDown,_=>{h.current=_.pointerType}),onPointerMove:I(a.onPointerMove,_=>{h.current=_.pointerType,r?u.onItemLeave?.():h.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(a.onPointerLeave,_=>{_.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:I(a.onKeyDown,_=>{u.searchRef?.current!==""&&_.key===" "||(lm.includes(_.key)&&y(),_.key===" "&&_.preventDefault())})})})})});Wi.displayName=Ft;var rt="SelectItemText",Vi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=je(rt,n),i=ke(rt,n),u=$i(rt,n),d=pm(rt,n),[m,f]=c.useState(null),v=H(t,y=>f(y),u.onItemTextChange,y=>i.itemTextRefCallback?.(y,u.value,u.disabled)),g=m?.textContent,w=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:p,onNativeOptionRemove:h}=d;return q(()=>(p(w),()=>h(w)),[p,h,w]),l.jsxs(l.Fragment,{children:[l.jsx(B.span,{id:u.textId,...s,ref:v}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ct.createPortal(s.children,a.valueNode):null]})});Vi.displayName=rt;var Hi="SelectItemIndicator",Ui=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return $i(Hi,n).isSelected?l.jsx(B.span,{"aria-hidden":!0,...o,ref:t}):null});Ui.displayName=Hi;var On="SelectScrollUpButton",Rm=c.forwardRef((e,t)=>{const n=ke(On,e.__scopeSelect),o=ho(On,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ki,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Rm.displayName=On;var Dn="SelectScrollDownButton",Tm=c.forwardRef((e,t)=>{const n=ke(Dn,e.__scopeSelect),o=ho(Dn,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)<d;s(m)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ki,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Tm.displayName=Dn;var Ki=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=ke("SelectScrollButton",n),a=c.useRef(null),i=Qt(n),u=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),q(()=>{i().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(B.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{u()})})}),Mm="SelectSeparator",Pm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(B.div,{"aria-hidden":!0,...o,ref:t})});Pm.displayName=Mm;var jn="SelectArrow",Im=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=en(n),s=je(jn,n),a=ke(jn,n);return s.open&&a.position==="popper"?l.jsx(Ts,{...r,...o,ref:t}):null});Im.displayName=jn;var Nm="SelectBubbleInput",Gi=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=H(o,r),a=am(t);return c.useEffect(()=>{const i=r.current;if(!i)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&m){const f=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(f)}},[a,t]),l.jsx(B.select,{...n,style:{...Br,...n.style},ref:s,defaultValue:t})});Gi.displayName=Nm;function Yi(e){return e===""||e===void 0}function Xi(e){const t=ne(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(a=>{const i=n.current+a;t(i),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function qi(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Am(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Am(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Om=Ti,Dm=Pi,jm=Ni,km=Ai,Lm=Oi,Fm=Di,zm=Fi,Xo=Wi,qo=Vi,Zo=Ui;const Bm="uzi-select-module__wrapper__7szq0",$m="uzi-select-module__wrapperFullWidth__IyOIG",Wm="uzi-select-module__trigger__ldh8w",Vm="uzi-select-module__value__FTUJh",Hm="uzi-select-module__chevron__U6HXS",Um="uzi-select-module__content__pOWWy",Km="uzi-select-module__viewport__VGZM6",Gm="uzi-select-module__item__6uM6-",Ym="uzi-select-module__indicator__ZHcg5",Xm="uzi-select-module__indicatorIcon__kOV2G",ae={wrapper:Bm,wrapperFullWidth:$m,trigger:Wm,value:Vm,chevron:Hm,content:Um,viewport:Km,item:Gm,indicator:Ym,indicatorIcon:Xm},Jo="__uzi_select_empty__",vo=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r=!1,fullWidth:s=!0,className:a,id:i,name:u,disabled:d,required:m,autoComplete:f,form:v,title:g,"aria-label":w,"aria-labelledby":p,onBlur:h,onFocus:y},_)=>l.jsx("div",{className:F(ae.wrapper,s&&ae.wrapperFullWidth,a),children:l.jsxs(Om,{value:t,onValueChange:x=>n(x===Jo?"":x),name:u,disabled:d,required:m,autoComplete:f,form:v,children:[l.jsxs(Dm,{ref:_,id:i,className:ae.trigger,title:g,"aria-label":w,"aria-labelledby":p,onBlur:h,onFocus:y,children:[l.jsx(jm,{className:ae.value,placeholder:o}),l.jsx(km,{className:ae.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l.jsx(Lm,{children:l.jsx(Fm,{className:ae.content,position:"popper",sideOffset:4,align:"start",children:l.jsxs(zm,{className:ae.viewport,children:[o&&r?l.jsxs(Xo,{value:Jo,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:o})]}):null,e.map(x=>l.jsxs(Xo,{value:x.value,disabled:x.disabled,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:x.label})]},x.value))]})})})]})}));vo.displayName="Select";const Zi=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="All",allowClear:r=!0,...s},a)=>l.jsx(vo,{ref:a,options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r,fullWidth:!1,...s}));Zi.displayName="Dropdown";const qm="uzi-dropdown-menu-module__content__n-ElH",Zm="uzi-dropdown-menu-module__item__tBNtW",Jm="uzi-dropdown-menu-module__itemDestructive__oWmKd",Qm="uzi-dropdown-menu-module__insetItem__g7ONJ",eh="uzi-dropdown-menu-module__indicator__5qwFh",th="uzi-dropdown-menu-module__indicatorIcon__nhJMw",nh="uzi-dropdown-menu-module__radioDot__GWUVT",oh="uzi-dropdown-menu-module__label__sFnNR",rh="uzi-dropdown-menu-module__separator__PgUob",sh="uzi-dropdown-menu-module__chevron__kxfiF",te={content:qm,item:Zm,itemDestructive:Jm,insetItem:Qm,indicator:eh,indicatorIcon:th,radioDot:nh,label:oh,separator:rh,chevron:sh};function ih(e){return l.jsx(bi,{...e})}function ah(e){return l.jsx(Si,{...e})}function ch(e){return l.jsx(kp,{...e})}function lh(e){return l.jsx(po,{...e})}function uh(e){return l.jsx(Wp,{...e})}function dh(e){return l.jsx(zp,{...e})}function fh({className:e,sideOffset:t=4,...n}){return l.jsx(po,{children:l.jsx(Ci,{sideOffset:t,className:F(te.content,e),...n})})}function ph({className:e,inset:t,variant:n="default",...o}){return l.jsx(Fp,{"data-inset":t?"true":void 0,className:F(te.item,n==="destructive"&&te.itemDestructive,e),...o})}function mh({className:e,children:t,...n}){return l.jsxs(Ei,{className:F(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),t]})}function hh({className:e,children:t,...n}){return l.jsxs(Bp,{className:F(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("span",{className:te.radioDot})})}),t]})}function vh({className:e,inset:t,...n}){return l.jsx(Lp,{"data-inset":t?"true":void 0,className:F(te.label,e),...n})}function gh({className:e,...t}){return l.jsx($p,{className:F(te.separator,e),...t})}function wh({className:e,inset:t,children:n,...o}){return l.jsxs(Vp,{"data-inset":t?"true":void 0,className:F(te.item,e),...o,children:[n,l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.chevron,children:l.jsx("path",{d:"M6 3.5 10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function _h({className:e,...t}){return l.jsx(Hp,{className:F(te.content,e),...t})}const xh=["light","dark","system"],yh=["blue","cyan","violet","emerald","amber","rose"],bh="uzi-theme",Sh="uzi-accent",Ch=bh,Eh=Sh,Rh="data-uzi-theme",Th="data-uzi-accent",Ji=N.createContext(void 0);function Mh(e){return xh.includes(e)}function Ph(e){return yh.includes(e)}function Ih(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Nh({children:e,theme:t,defaultTheme:n="system",accent:o,defaultAccent:r="blue",onThemeChange:s,onAccentChange:a,storageKey:i=Ch,accentStorageKey:u=Eh,disableStorage:d=!1,toastConfig:m}){const[f,v]=N.useState(n),[g,w]=N.useState(r),[p,h]=N.useState("light");N.useEffect(()=>{if(h(Ih()),!d){const M=window.localStorage.getItem(i);Mh(M)&&v(M);const j=window.localStorage.getItem(u);Ph(j)&&w(j)}},[d,i,u]);const y=t!==void 0,_=o!==void 0,x=y?t:f,b=_?o:g,S=x==="system"?p:x;N.useEffect(()=>{if(typeof window>"u")return;const M=window.matchMedia("(prefers-color-scheme: dark)"),j=()=>h(M.matches?"dark":"light");return j(),M.addEventListener("change",j),()=>M.removeEventListener("change",j)},[]),N.useEffect(()=>{if(typeof document>"u")return;const M=document.documentElement;M.setAttribute(Rh,S),M.setAttribute(Th,b),M.style.colorScheme=S,M.classList.toggle("dark",S==="dark")},[b,S]);const E=N.useCallback(M=>{y||v(M),!d&&typeof window<"u"&&window.localStorage.setItem(i,M),s?.(M)},[d,y,s,i]),C=N.useCallback(M=>{_||w(M),!d&&typeof window<"u"&&window.localStorage.setItem(u,M),a?.(M)},[u,d,_,a]),A=N.useCallback(()=>{E(S==="dark"?"light":"dark")},[S,E]),k=N.useMemo(()=>({theme:x,resolvedTheme:S,accent:b,setTheme:E,setAccent:C,toggleTheme:A}),[b,x,S,C,E,A]);return l.jsx(Ji.Provider,{value:k,children:l.jsx(es,{config:m,children:e})})}function Qi(){const e=N.useContext(Ji);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const Ah="uzi-theme-toggle-button-module__withLabel__KqtDj",Oh={withLabel:Ah};function Dh(){return l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:l.jsx("path",{d:"M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function jh(){return l.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:[l.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.8"}),l.jsx("path",{d:"M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function ea({showLabel:e=!1,lightLabel:t="Light mode",darkLabel:n="Dark mode",className:o,onClick:r,...s}){const{resolvedTheme:a,toggleTheme:i}=Qi(),u=a==="dark"?t:n;return l.jsxs(sr,{type:"button",variant:"ghost",size:e?"sm":"icon",className:F(e&&Oh.withLabel,o),"aria-label":`Switch to ${u.toLowerCase()}`,title:`Switch to ${u.toLowerCase()}`,onClick:d=>{r?.(d),d.defaultPrevented||i()},...s,children:[a==="dark"?l.jsx(jh,{}):l.jsx(Dh,{}),e&&l.jsx("span",{children:u})]})}const kh="uzi-top-bar-module__topBar__MJ-7S",Lh="uzi-top-bar-module__topBarStatic__JvEwt",Fh="uzi-top-bar-module__topBarInner__PBbi8",zh="uzi-top-bar-module__topBarStart__DrdN2",Bh="uzi-top-bar-module__topBarBrand__80VV3",$h="uzi-top-bar-module__topBarBrandContent__O4Uto",Wh="uzi-top-bar-module__topBarCenter__Kwxg-",Vh="uzi-top-bar-module__topBarCenterGroup__7Ishp",Hh="uzi-top-bar-module__topBarActions__mgMd8",me={topBar:kh,topBarStatic:Lh,topBarInner:Fh,topBarStart:zh,topBarBrand:Bh,topBarBrandContent:$h,topBarCenter:Wh,topBarCenterGroup:Vh,topBarActions:Hh};function ta({leading:e,brand:t,brandHref:n,brandingLocation:o="left",start:r,center:s,actions:a,showThemeToggle:i=!1,themeToggleProps:u,className:d,innerClassName:m,isSticky:f,sticky:v=!0,children:g,...w}){const p=f??v,h=t?n?l.jsx("a",{href:n,className:me.topBarBrand,children:l.jsx("span",{className:me.topBarBrandContent,children:t})}):l.jsx("div",{className:me.topBarBrand,children:l.jsx("span",{className:me.topBarBrandContent,children:t})}):null;return l.jsx("header",{className:F(me.topBar,!p&&me.topBarStatic,d),...w,children:l.jsxs("div",{className:F(me.topBarInner,m),children:[l.jsxs("div",{className:me.topBarStart,children:[e,o==="left"&&h,r]}),h&&o==="center"||s||g?l.jsx("div",{className:me.topBarCenter,children:l.jsxs("div",{className:me.topBarCenterGroup,children:[o==="center"&&h,s??g]})}):null,l.jsxs("div",{className:me.topBarActions,children:[i&&l.jsx(ea,{...u}),a]})]})})}const Uh="uzi-app-shell-module__appShell__S0cVI",Kh="uzi-app-shell-module__appShellAnimated__-CRIl",Gh="uzi-app-shell-module__appShellOpen__1rZUl",Yh="uzi-app-shell-module__appShellCollapsed__fSasN",Xh="uzi-app-shell-module__appShellTopbar__rgXsW",qh="uzi-app-shell-module__appShellHamburger__BciFA",Zh="uzi-app-shell-module__appShellSidebar__oY7uj",Jh="uzi-app-shell-module__appShellMain__eHP2r",Qh="uzi-app-shell-module__appShellBackdrop__y31xs",ev="uzi-app-shell-module__appShellSidebarOpen__Z5AIo",xe={appShell:Uh,appShellAnimated:Kh,appShellOpen:Gh,appShellCollapsed:Yh,appShellTopbar:Xh,appShellHamburger:qh,appShellSidebar:Zh,appShellMain:Jh,appShellBackdrop:Qh,appShellSidebarOpen:ev},tv=960;function Qo(){return typeof window>"u"?!1:window.innerWidth>=tv}function nv({children:e,sidebar:t,brand:n,brandHref:o,topbarStart:r,topbarEnd:s,showThemeToggle:a=!1,themeToggleProps:i,topBarBrandingLocation:u="left",className:d,sidebarClassName:m,topbarClassName:f,mainClassName:v,sidebarWidth:g,closeSidebarOnChangeKey:w,hamburgerLabel:p="Toggle navigation",onSidebarToggle:h}){const[y,_]=N.useState(!1),[x,b]=N.useState(!1),[S,E]=N.useState(!1),C=N.useRef(!1),A=N.useRef(w),k=N.useRef(null),M=N.useRef(null),j=N.useRef(null),L=N.useId();N.useEffect(()=>{const P=Qo();_(P),b(P),C.current=P;const R=window.requestAnimationFrame(()=>{E(!0)}),V=()=>{const G=Qo();_(G),G!==C.current&&(b(G),C.current=G)};return window.addEventListener("resize",V),()=>{window.cancelAnimationFrame(R),window.removeEventListener("resize",V)}},[]),N.useEffect(()=>{if(y||!x)return;const P=j.current,R=()=>b(!1),V=Q=>{const Z=Q.target;Z&&(k.current?.contains(Z)||M.current?.contains(Z)||R())},G=window.setTimeout(()=>{document.addEventListener("pointerdown",V),window.addEventListener("scroll",R,{passive:!0}),P?.addEventListener("scroll",R,{passive:!0}),document.addEventListener("touchmove",R,{passive:!0})},10);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",V),window.removeEventListener("scroll",R),P?.removeEventListener("scroll",R),document.removeEventListener("touchmove",R)}},[x,y]),N.useEffect(()=>{!y&&A.current!==w&&b(!1),A.current=w},[w,y]),N.useEffect(()=>{h?.(x)},[x,h]);const W=()=>b(P=>!P),T=g===void 0?void 0:typeof g=="number"?`${g}px`:g,$=T?{"--app-shell-sidebar-width":T}:void 0,D=F(xe.appShell,S&&xe.appShellAnimated,x?xe.appShellOpen:xe.appShellCollapsed,d),z=F(xe.appShellSidebar,x&&xe.appShellSidebarOpen,m);return l.jsxs("div",{className:D,style:$,"data-app-shell":!0,"data-desktop":y?"true":"false","data-sidebar-open":x?"true":"false",children:[l.jsx(ta,{className:F(xe.appShellTopbar,f),leading:l.jsx("button",{ref:M,type:"button",className:xe.appShellHamburger,onClick:W,"aria-label":p,"aria-expanded":x,"aria-controls":L,children:l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:l.jsx("path",{d:"M3 6h18M3 12h18M3 18h18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})})}),brand:n,brandHref:o,brandingLocation:u,start:r,actions:s,showThemeToggle:a,themeToggleProps:i}),!y&&x&&l.jsx("div",{className:xe.appShellBackdrop,onClick:()=>b(!1),onTouchStart:()=>b(!1),"aria-hidden":"true"}),l.jsx("aside",{ref:k,id:L,className:z,"aria-label":"Sidebar navigation",children:t}),l.jsx("main",{ref:j,className:F(xe.appShellMain,v),children:e})]})}const ov="uzi-sidebar-nav-module__sidebarNav__eUI5c",rv="uzi-sidebar-nav-module__sidebarNavCollapsed__xTM9s",sv="uzi-sidebar-nav-module__header__Y4NLy",iv="uzi-sidebar-nav-module__footer__GjWky",av="uzi-sidebar-nav-module__sections__mXuGQ",cv="uzi-sidebar-nav-module__section__yjtCY",lv="uzi-sidebar-nav-module__sectionItems__tNcph",uv="uzi-sidebar-nav-module__sectionLabel__Wx94m",dv="uzi-sidebar-nav-module__item__uMHkJ",fv="uzi-sidebar-nav-module__itemActive__wBbiS",pv="uzi-sidebar-nav-module__itemCollapsed__jLJN-",mv="uzi-sidebar-nav-module__itemDisabled__Yf8Il",hv="uzi-sidebar-nav-module__icon__tyrUg",vv="uzi-sidebar-nav-module__itemBody__wI0iy",gv="uzi-sidebar-nav-module__labelRow__D8sEJ",wv="uzi-sidebar-nav-module__label__A-nt6",_v="uzi-sidebar-nav-module__description__Xf3Si",xv="uzi-sidebar-nav-module__badge__-hnFd",J={sidebarNav:ov,sidebarNavCollapsed:rv,header:sv,footer:iv,sections:av,section:cv,sectionItems:lv,sectionLabel:uv,item:dv,itemActive:fv,itemCollapsed:pv,itemDisabled:mv,icon:hv,itemBody:vv,labelRow:gv,label:wv,description:_v,badge:xv},yv=(e,t)=>e.active!==void 0?e.active:!e.href||!t?!1:e.href==="/"?t==="/":t.startsWith(e.href);function bv({items:e=[],sections:t,currentPath:n,getIsActive:o=yv,onItemClick:r,header:s,footer:a,ariaLabel:i="Sidebar navigation",collapsed:u=!1,iconSize:d,className:m,itemClassName:f,sectionClassName:v}){const g=t?.length?t:[{id:"default",items:e}],w=d!==void 0?{"--sidebar-nav-icon-size":typeof d=="number"?`${d}px`:d}:void 0;return l.jsxs("nav",{className:F(J.sidebarNav,u&&J.sidebarNavCollapsed,m),"aria-label":i,style:w,children:[s?l.jsx("div",{className:J.header,children:s}):null,l.jsx("div",{className:J.sections,children:g.map((p,h)=>l.jsxs("div",{className:F(J.section,v),children:[p.label&&!u?l.jsx("div",{className:J.sectionLabel,children:p.label}):null,l.jsx("div",{className:J.sectionItems,children:p.items.map((y,_)=>l.jsx(Sv,{item:y,active:o(y,n),collapsed:u,itemClassName:f,onItemClick:r},`${p.id??h}-${y.href??y.title??_}`))})]},p.id??`section-${h}`))}),a?l.jsx("div",{className:J.footer,children:a}):null]})}function Sv({item:e,active:t,collapsed:n,itemClassName:o,onItemClick:r}){const s=e.rel??(e.target==="_blank"?"noreferrer":void 0),a=e.title??(typeof e.label=="string"?e.label:void 0),i=F(J.item,t&&J.itemActive,n&&J.itemCollapsed,e.disabled&&J.itemDisabled,o),u=l.jsxs(l.Fragment,{children:[e.icon&&l.jsx("span",{className:J.icon,children:e.icon}),n?null:l.jsxs("span",{className:J.itemBody,children:[l.jsxs("span",{className:J.labelRow,children:[l.jsx("span",{className:J.label,children:e.label}),e.badge&&l.jsx("span",{className:J.badge,children:e.badge})]}),e.description?l.jsx("span",{className:J.description,children:e.description}):null]})]}),d=()=>{e.disabled||(e.onClick?.(),r?.(e))};return e.href?e.disabled?l.jsx("div",{className:i,"aria-current":t?"page":void 0,"aria-disabled":"true",title:n?a:void 0,children:u}):l.jsx("a",{className:i,href:e.href,target:e.target,rel:s,"aria-current":t?"page":void 0,title:n?a:void 0,onClick:d,children:u}):l.jsx("button",{type:"button",className:i,"aria-current":t?"page":void 0,"aria-disabled":e.disabled?"true":void 0,disabled:e.disabled,title:n?a:void 0,onClick:d,children:u})}const Cv="uzi-skeleton-module__skeleton__fula5",er={skeleton:Cv,"skeleton-pulse":"uzi-skeleton-module__skeleton-pulse__Yp45W","radius-sm":"uzi-skeleton-module__radius-sm__FdccD","radius-md":"uzi-skeleton-module__radius-md__zH3RE","radius-lg":"uzi-skeleton-module__radius-lg__YVrHw","radius-full":"uzi-skeleton-module__radius-full__5o2m0"};function Ev({width:e,height:t,radius:n="md",className:o,style:r,...s}){return l.jsx("div",{className:F(er.skeleton,er[`radius-${n}`],o),style:{width:e,height:t,...r},"aria-hidden":"true",...s})}const Rv="uzi-progress-module__track__gM0oV",Tv="uzi-progress-module__fill__aLAbp",xn={track:Rv,fill:Tv,"tone-default":"uzi-progress-module__tone-default__fhf7o","tone-success":"uzi-progress-module__tone-success__FsGHD","tone-warning":"uzi-progress-module__tone-warning__UAttL","tone-danger":"uzi-progress-module__tone-danger__-L-Ee"};function Mv({value:e,tone:t="default",className:n,"aria-label":o,...r}){const s=Math.max(0,Math.min(100,e));return l.jsx("div",{className:F(xn.track,n),role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,...r,children:l.jsx("div",{className:F(xn.fill,xn[`tone-${t}`]),style:{width:`${s}%`}})})}exports.Alert=Ql;exports.AppShell=nv;exports.Avatar=$a;exports.AvatarFallback=Va;exports.AvatarImage=Wa;exports.Button=sr;exports.Card=Ka;exports.Checkbox=os;exports.Dropdown=Zi;exports.DropdownMenu=ih;exports.DropdownMenuCheckboxItem=mh;exports.DropdownMenuContent=fh;exports.DropdownMenuGroup=ch;exports.DropdownMenuItem=ph;exports.DropdownMenuLabel=vh;exports.DropdownMenuPortal=lh;exports.DropdownMenuRadioGroup=dh;exports.DropdownMenuRadioItem=hh;exports.DropdownMenuSeparator=gh;exports.DropdownMenuSub=uh;exports.DropdownMenuSubContent=_h;exports.DropdownMenuSubTrigger=wh;exports.DropdownMenuTrigger=ah;exports.Input=ts;exports.Label=ns;exports.Modal=Gl;exports.ModalOverlay=zr;exports.MultiSelect=Ri;exports.Pill=qa;exports.Progress=Mv;exports.Select=vo;exports.SidebarNav=bv;exports.Skeleton=Ev;exports.ThemeProvider=Nh;exports.ThemeToggleButton=ea;exports.ToastProvider=es;exports.TopBar=ta;exports.cx=F;exports.useTheme=Qi;exports.useToast=Gu;
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Cl="DialogDescriptionWarning",El=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zr(Cl).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Rl=Rr,Tl=Pr,Ml=Ir,Pl=Nr,Il=Or,Nl=jr,Al=Lr;const Ol="uzi-modal-module__portalLayer__t7blc",Dl="uzi-modal-module__backdrop__IMd3b",jl="uzi-modal-module__backdropFadeIn__GNJdx",kl="uzi-modal-module__backdropFadeOut__R-3K5",Ll="uzi-modal-module__overlayContent__0DtbP",Fl="uzi-modal-module__modalContentIn__fub8M",zl="uzi-modal-module__modalContentOut__elTJ3",Bl="uzi-modal-module__modal__Mao59",$l="uzi-modal-module__header__PmCaO",Wl="uzi-modal-module__titles__IboyQ",Vl="uzi-modal-module__title__Zd7pL",Hl="uzi-modal-module__subtitle__t-LRK",Ul="uzi-modal-module__closeButton__GTiZr",Kl="uzi-modal-module__body__km6FQ",Gl="uzi-modal-module__footer__jWLTv",fe={portalLayer:Ol,backdrop:Dl,backdropFadeIn:jl,backdropFadeOut:kl,overlayContent:Ll,modalContentIn:Fl,modalContentOut:zl,modal:Bl,"size-sm":"uzi-modal-module__size-sm__Uu9je","size-md":"uzi-modal-module__size-md__TiiWy","size-lg":"uzi-modal-module__size-lg__BrTIO","size-xl":"uzi-modal-module__size-xl__sj0mh",header:$l,titles:Wl,title:Vl,subtitle:Hl,closeButton:Ul,body:Kl,footer:Gl};function Br({open:e,onClose:t,className:n,children:o}){return l.jsx(Rl,{open:e,onOpenChange:r=>{r||t()},children:l.jsx(Tl,{children:l.jsxs("div",{className:fe.portalLayer,children:[l.jsx(Ml,{className:L(fe.backdrop,n)}),l.jsx(Pl,{className:fe.overlayContent,children:o})]})})})}function Yl({open:e,onClose:t,title:n,subtitle:o,size:r="md",children:s,footer:a}){return l.jsx(Br,{open:e,onClose:t,children:l.jsxs("div",{className:L(fe.modal,fe[`size-${r}`]),children:[l.jsxs("div",{className:fe.header,children:[l.jsxs("div",{className:fe.titles,children:[l.jsx(Il,{className:fe.title,children:n}),o?l.jsx(Nl,{className:fe.subtitle,children:o}):null]}),l.jsx(Al,{asChild:!0,children:l.jsx("button",{className:fe.closeButton,"aria-label":"Close",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})})]}),l.jsx("div",{className:fe.body,children:s}),a&&l.jsx("div",{className:fe.footer,children:a})]})})}const Xl="uzi-alert-module__alert__7Bt6c",ql="uzi-alert-module__success__apdFG",Zl="uzi-alert-module__error__KLgi1",Jl="uzi-alert-module__warning__F4fpk",Ql="uzi-alert-module__info__1IKHt",jo={alert:Xl,success:ql,error:Zl,warning:Jl,info:Ql};function eu({tone:e,children:t,className:n}){return l.jsx("div",{className:L(jo.alert,jo[e],n),role:"alert",children:t})}function Vt(e){const t=e+"CollectionProvider",[n,o]=Oe(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:_}=f,x=N.useRef(null),y=N.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:y,collectionRef:x,children:_})};a.displayName=t;const i=e+"CollectionSlot",u=Ze(i),d=N.forwardRef((f,h)=>{const{scope:_,children:x}=f,y=s(i,_),b=H(h,y.collectionRef);return l.jsx(u,{ref:b,children:x})});d.displayName=i;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=Ze(m),v=N.forwardRef((f,h)=>{const{scope:_,children:x,...y}=f,b=N.useRef(null),S=H(h,b),E=s(m,_);return N.useEffect(()=>(E.itemMap.set(b,{ref:b,...y}),()=>{E.itemMap.delete(b)})),l.jsx(g,{[p]:"",ref:S,children:x})});v.displayName=m;function w(f){const h=s(e+"CollectionConsumer",f);return N.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const y=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((E,C)=>y.indexOf(E.ref.current)-y.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:d,ItemSlot:v},w,o]}var $r=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),tu="VisuallyHidden",Un=c.forwardRef((e,t)=>l.jsx(B.span,{...e,ref:t,style:{...$r,...e.style}}));Un.displayName=tu;var Kn="ToastProvider",[Gn,nu,ou]=Vt("Toast"),[Wr]=Oe("Toast",[ou]),[ru,Ht]=Wr(Kn),Vr=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[d,m]=c.useState(0),p=c.useRef(!1),g=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Kn}\`. Expected non-empty \`string\`.`),l.jsx(Gn.Provider,{scope:t,children:l.jsx(ru,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:d,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>m(v=>v+1),[]),onToastRemove:c.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:g,children:a})})};Vr.displayName=Kn;var Hr="ToastViewport",su=["F8"],Cn="toast.viewportPause",En="toast.viewportResume",Ur=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=su,label:r="Notifications ({hotkey})",...s}=e,a=Ht(Hr,n),i=nu(n),u=c.useRef(null),d=c.useRef(null),m=c.useRef(null),p=c.useRef(null),g=H(t,p,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;c.useEffect(()=>{const h=_=>{o.length!==0&&o.every(y=>_[y]||_.code===y)&&p.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]),c.useEffect(()=>{const h=u.current,_=p.current;if(w&&h&&_){const x=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Cn);_.dispatchEvent(E),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(En);_.dispatchEvent(E),a.isClosePausedRef.current=!1}},b=E=>{!h.contains(E.relatedTarget)&&y()},S=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",x),h.addEventListener("focusout",b),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",b),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",y)}}},[w,a.isClosePausedRef]);const f=c.useCallback(({tabbingDirection:h})=>{const x=i().map(y=>{const b=y.ref.current,S=[b,..._u(b)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?x.reverse():x).flat()},[i]);return c.useEffect(()=>{const h=p.current;if(h){const _=x=>{const y=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!y){const S=document.activeElement,E=x.shiftKey;if(x.target===h&&E){d.current?.focus();return}const k=f({tabbingDirection:E?"backwards":"forwards"}),M=k.findIndex(j=>j===S);hn(k.slice(M+1))?x.preventDefault():E?d.current?.focus():m.current?.focus()}};return h.addEventListener("keydown",_),()=>h.removeEventListener("keydown",_)}},[i,f]),l.jsxs(_c,{ref:u,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Rn,{ref:d,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"forwards"});hn(h)}}),l.jsx(Gn.Slot,{scope:n,children:l.jsx(B.ol,{tabIndex:-1,...s,ref:g})}),w&&l.jsx(Rn,{ref:m,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"backwards"});hn(h)}})]})});Ur.displayName=Hr;var Kr="ToastFocusProxy",Rn=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ht(Kr,n);return l.jsx(Un,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const i=a.relatedTarget;!s.viewport?.contains(i)&&o()}})});Rn.displayName=Kr;var ft="Toast",iu="toast.swipeStart",au="toast.swipeMove",cu="toast.swipeCancel",lu="toast.swipeEnd",Gr=c.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[i,u]=ze({prop:o,defaultProp:r??!0,onChange:s,caller:ft});return l.jsx(Me,{present:n||i,children:l.jsx(fu,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:I(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:I(e.onSwipeMove,d=>{const{x:m,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:I(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:I(e.onSwipeEnd,d=>{const{x:m,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});Gr.displayName=ft;var[uu,du]=Wr(ft,{onClose(){}}),fu=c.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:d,onSwipeStart:m,onSwipeMove:p,onSwipeCancel:g,onSwipeEnd:v,...w}=e,f=Ht(ft,n),[h,_]=c.useState(null),x=H(t,T=>_(T)),y=c.useRef(null),b=c.useRef(null),S=r||f.duration,E=c.useRef(0),C=c.useRef(S),A=c.useRef(0),{onToastAdd:k,onToastRemove:M}=f,j=ne(()=>{h?.contains(document.activeElement)&&f.viewport?.focus(),a()}),F=c.useCallback(T=>{!T||T===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(j,T))},[j]);c.useEffect(()=>{const T=f.viewport;if(T){const $=()=>{F(C.current),d?.()},D=()=>{const z=new Date().getTime()-E.current;C.current=C.current-z,window.clearTimeout(A.current),u?.()};return T.addEventListener(Cn,D),T.addEventListener(En,$),()=>{T.removeEventListener(Cn,D),T.removeEventListener(En,$)}}},[f.viewport,S,u,d,F]),c.useEffect(()=>{s&&!f.isClosePausedRef.current&&F(S)},[s,S,f.isClosePausedRef,F]),c.useEffect(()=>(k(),()=>M()),[k,M]);const W=c.useMemo(()=>h?Qr(h):null,[h]);return f.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(pu,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(uu,{scope:n,onClose:j,children:ct.createPortal(l.jsx(Gn.ItemSlot,{scope:n,children:l.jsx(wc,{asChild:!0,onEscapeKeyDown:I(i,()=>{f.isFocusedToastEscapeKeyDownRef.current||j(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(B.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:I(e.onKeyDown,T=>{T.key==="Escape"&&(i?.(T.nativeEvent),T.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:I(e.onPointerDown,T=>{T.button===0&&(y.current={x:T.clientX,y:T.clientY})}),onPointerMove:I(e.onPointerMove,T=>{if(!y.current)return;const $=T.clientX-y.current.x,D=T.clientY-y.current.y,z=!!b.current,P=["left","right"].includes(f.swipeDirection),R=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,V=P?R(0,$):0,G=P?0:R(0,D),Q=T.pointerType==="touch"?10:2,Z={x:V,y:G},re={originalEvent:T,delta:Z};z?(b.current=Z,Et(au,p,re,{discrete:!1})):ko(Z,f.swipeDirection,Q)?(b.current=Z,Et(iu,m,re,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs($)>Q||Math.abs(D)>Q)&&(y.current=null)}),onPointerUp:I(e.onPointerUp,T=>{const $=b.current,D=T.target;if(D.hasPointerCapture(T.pointerId)&&D.releasePointerCapture(T.pointerId),b.current=null,y.current=null,$){const z=T.currentTarget,P={originalEvent:T,delta:$};ko($,f.swipeDirection,f.swipeThreshold)?Et(lu,v,P,{discrete:!0}):Et(cu,g,P,{discrete:!0}),z.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),pu=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ht(ft,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return gu(()=>a(!0)),c.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:l.jsx(dt,{asChild:!0,children:l.jsx(Un,{...o,children:s&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},mu="ToastTitle",hu=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});hu.displayName=mu;var vu="ToastDescription",Yr=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});Yr.displayName=vu;var Xr="ToastAction",qr=c.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(Jr,{altText:n,asChild:!0,children:l.jsx(Yn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Xr}\`. Expected non-empty \`string\`.`),null)});qr.displayName=Xr;var Zr="ToastClose",Yn=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=du(Zr,n);return l.jsx(Jr,{asChild:!0,children:l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,r.onClose)})})});Yn.displayName=Zr;var Jr=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(B.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Qr(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),wu(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Qr(o))}}),t}function Et(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?zn(r,s):r.dispatchEvent(s)}var ko=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function gu(e=()=>{}){const t=ne(e);q(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function wu(e){return e.nodeType===e.ELEMENT_NODE}function _u(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var xu=Vr,yu=Ur,bu=Gr,Su=Yr,Cu=qr,Eu=Yn;const Ru="uzi-toast-module__stack__SRrda",Tu="uzi-toast-module__topRight__WiZzM",Mu="uzi-toast-module__topLeft__SzFS9",Pu="uzi-toast-module__topCenter__X5W-x",Iu="uzi-toast-module__bottomRight__DMtoS",Nu="uzi-toast-module__bottomLeft__ZZ7VF",Au="uzi-toast-module__bottomCenter__QNJrM",Ou="uzi-toast-module__toast__HNUcj",Du="uzi-toast-module__toastSlideIn__BTXfm",ju="uzi-toast-module__toastSlideOut__mBX-G",ku="uzi-toast-module__toastSwipeOut__R-jk2",Lu="uzi-toast-module__icon__LIAqr",Fu="uzi-toast-module__body__9vzs7",zu="uzi-toast-module__message__TBY65",Bu="uzi-toast-module__actions__Iykd9",$u="uzi-toast-module__actionButton__cvUr0",Wu="uzi-toast-module__controls__LqA4Q",Vu="uzi-toast-module__iconButton__FOsOp",Hu="uzi-toast-module__iconButtonError__NJsLX",de={stack:Ru,topRight:Tu,topLeft:Mu,topCenter:Pu,bottomRight:Iu,bottomLeft:Nu,bottomCenter:Au,toast:Ou,toastSlideIn:Du,toastSlideOut:ju,toastSwipeOut:ku,icon:Lu,body:Fu,message:zu,actions:Bu,actionButton:$u,controls:Wu,iconButton:Vu,iconButtonError:Hu},Uu={position:"top-right",maxToasts:5,defaultDuration:4e3,pauseOnHover:!0,pauseOnFocusLoss:!0},es=N.createContext(void 0);let Ku=0;const Gu=()=>`toast-${++Ku}-${Date.now()}`;function ts({children:e,config:t}){const[n,o]=N.useState([]),[r,s]=N.useState(!1),a=N.useMemo(()=>({...Uu,...t}),[t]),i=N.useCallback((f,h={})=>{const _=Gu();return o(x=>{const y=[...x,{id:_,message:f,type:h.type??"info",duration:h.duration??(h.type==="error"?6e3:a.defaultDuration),dismissible:h.dismissible??!0,copyable:h.copyable??!1,action:h.action}];return y.length>a.maxToasts&&y.shift(),y}),_},[a.defaultDuration,a.maxToasts]),u=N.useCallback((f,h)=>i(f,{...h,type:"success"}),[i]),d=N.useCallback((f,h)=>i(f,{copyable:!0,...h,type:"error"}),[i]),m=N.useCallback((f,h)=>i(f,{...h,type:"warning"}),[i]),p=N.useCallback((f,h)=>i(f,{...h,type:"info"}),[i]),g=N.useCallback(f=>{o(h=>h.filter(_=>_.id!==f))},[]),v=N.useCallback(()=>o([]),[]);N.useEffect(()=>{if(!a.pauseOnFocusLoss)return;const f=()=>s(document.visibilityState!=="visible");return document.addEventListener("visibilitychange",f),()=>document.removeEventListener("visibilitychange",f)},[a.pauseOnFocusLoss]);const w=N.useMemo(()=>({toasts:n,push:i,success:u,error:d,warning:m,info:p,dismiss:g,dismissAll:v}),[n,i,u,d,m,p,g,v]);return l.jsx(es.Provider,{value:w,children:l.jsxs(xu,{swipeDirection:"right",children:[e,l.jsx(Xu,{toasts:n,position:a.position,pauseOnHover:a.pauseOnHover,isPaused:r,onDismiss:g,onPauseChange:s})]})})}function Yu(){const e=N.useContext(es);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function Xu({toasts:e,position:t,pauseOnHover:n,isPaused:o,onDismiss:r,onPauseChange:s}){const a=(()=>{switch(t){case"top-left":return"topLeft";case"top-center":return"topCenter";case"bottom-right":return"bottomRight";case"bottom-left":return"bottomLeft";case"bottom-center":return"bottomCenter";default:return"topRight"}})();return l.jsxs(l.Fragment,{children:[e.map(i=>l.jsx(qu,{toast:i,isPaused:o,onDismiss:r},i.id)),l.jsx(yu,{className:L(de.stack,de[a]),label:"Notifications",onMouseEnter:()=>n&&s(!0),onMouseLeave:()=>n&&s(!1)})]})}function qu({toast:e,isPaused:t,onDismiss:n}){const[o,r]=N.useState(!0),[s,a]=N.useState("idle"),i=N.useRef(null),u=N.useRef(null),d=N.useRef(0),m=N.useRef(e.duration??0),p=N.useRef(!1),g=Zu(e.type),v={"--toast-bg":g.background,"--toast-border":g.border,"--toast-accent":g.accent,"--toast-text":g.text,"--toast-action-bg":g.actionBg,"--toast-action-border":g.actionBorder},w=()=>{u.current&&(window.clearTimeout(u.current),u.current=null)},f=N.useCallback(()=>{p.current||(p.current=!0,r(!1),w(),window.setTimeout(()=>n(e.id),160))},[n,e.id]),h=N.useCallback(y=>{if(!y||y<=0){f();return}d.current=performance.now(),w(),u.current=window.setTimeout(()=>f(),y)},[f]);N.useEffect(()=>{if(!(!e.duration||e.duration<=0))return h(e.duration),w},[h,e.duration]),N.useEffect(()=>{if(!(!e.duration||e.duration<=0))if(t){const y=performance.now()-d.current;m.current=Math.max(0,m.current-y),w()}else h(m.current)},[t,h,e.duration]),N.useEffect(()=>()=>{i.current&&window.clearTimeout(i.current)},[]);const _=N.useCallback(async()=>{i.current&&window.clearTimeout(i.current);try{if(!navigator.clipboard)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(e.message),a("copied")}catch{a("failed")}i.current=window.setTimeout(()=>a("idle"),1800)},[e.message]),x=Ju(e.type);return l.jsxs(bu,{open:o,onOpenChange:y=>{y||f()},duration:2147483647,className:de.toast,style:v,children:[l.jsx("span",{className:de.icon,"aria-hidden":!0,children:x}),l.jsxs("div",{className:de.body,children:[l.jsx(Su,{className:de.message,children:e.message}),e.action&&l.jsx("div",{className:de.actions,children:l.jsx(Cu,{asChild:!0,altText:e.action.label,children:l.jsx("button",{type:"button",className:de.actionButton,onClick:()=>{e.action?.onClick(),f()},children:e.action.label})})})]}),l.jsxs("div",{className:de.controls,children:[e.copyable&&l.jsx("button",{type:"button",className:L(de.iconButton,s==="failed"&&de.iconButtonError),"aria-label":"Copy message",onClick:_,children:s==="copied"?l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M2 6.5l3 3 6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):s==="failed"?l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M10 3L3 10M3 3l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):l.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:[l.jsx("rect",{x:"4.5",y:"1.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("path",{d:"M1.5 5.5v5a1.5 1.5 0 001.5 1.5h5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}),e.dismissible!==!1&&l.jsx(Eu,{asChild:!0,children:l.jsx("button",{type:"button",className:de.iconButton,"aria-label":"Dismiss notification",children:l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M10 3L3 10M3 3l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]})]})}function Zu(e){switch(e){case"success":return{background:"color-mix(in srgb, var(--success) 12%, var(--popover))",border:"color-mix(in srgb, var(--success) 30%, transparent)",accent:"var(--success)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--success) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--success) 35%, transparent)"};case"error":return{background:"color-mix(in srgb, var(--destructive) 12%, var(--popover))",border:"color-mix(in srgb, var(--destructive) 30%, transparent)",accent:"var(--destructive)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--destructive) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--destructive) 35%, transparent)"};case"warning":return{background:"color-mix(in srgb, var(--warning) 12%, var(--popover))",border:"color-mix(in srgb, var(--warning) 30%, transparent)",accent:"var(--warning)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--warning) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--warning) 35%, transparent)"};default:return{background:"color-mix(in srgb, var(--primary) 12%, var(--popover))",border:"color-mix(in srgb, var(--primary) 30%, transparent)",accent:"var(--primary)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--primary) 14%, transparent)",actionBorder:"color-mix(in srgb, var(--primary) 35%, transparent)"}}}function Ju(e){switch(e){case"success":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});case"error":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});case"warning":return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M8 3v6M8 11.5v1",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});default:return l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M8 7v5M8 4.5v.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}}const Qu="uzi-input-module__input__-ipHD",ed={input:Qu},ns=c.forwardRef(({className:e,type:t,...n},o)=>l.jsx("input",{ref:o,type:t,className:L(ed.input,e),...n}));ns.displayName="Input";const td="uzi-label-module__label__gKflt",nd={label:td},os=c.forwardRef(({className:e,...t},n)=>l.jsx("label",{ref:n,className:L(nd.label,e),...t}));os.displayName="Label";const od="uzi-checkbox-module__checkbox__zAB1y",rd={checkbox:od},rs=c.forwardRef(({className:e,...t},n)=>l.jsx("input",{ref:n,type:"checkbox",className:L(rd.checkbox,e),...t}));rs.displayName="Checkbox";var sd=c.createContext(void 0);function Xn(e){const t=c.useContext(sd);return e||t||"ltr"}const id=["top","right","bottom","left"],Ne=Math.min,ce=Math.max,At=Math.round,Rt=Math.floor,Se=e=>({x:e,y:e}),ad={left:"right",right:"left",bottom:"top",top:"bottom"};function Tn(e,t,n){return ce(e,Ne(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function qn(e){return e==="x"?"y":"x"}function Zn(e){return e==="y"?"height":"width"}function be(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Jn(e){return qn(be(e))}function cd(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=Jn(e),s=Zn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ot(a)),[a,Ot(a)]}function ld(e){const t=Ot(e);return[Mn(e),t,Mn(t)]}function Mn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lo=["left","right"],Fo=["right","left"],ud=["top","bottom"],dd=["bottom","top"];function fd(e,t,n){switch(e){case"top":case"bottom":return n?t?Fo:Lo:t?Lo:Fo;case"left":case"right":return t?ud:dd;default:return[]}}function pd(e,t,n,o){const r=Qe(e);let s=fd(Te(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Mn)))),s}function Ot(e){const t=Te(e);return ad[t]+e.slice(t.length)}function md(e){return{top:0,right:0,bottom:0,left:0,...e}}function ss(e){return typeof e!="number"?md(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function zo(e,t,n){let{reference:o,floating:r}=e;const s=be(t),a=Jn(t),i=Zn(a),u=Te(t),d=s==="y",m=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let v;switch(u){case"top":v={x:m,y:o.y-r.height};break;case"bottom":v={x:m,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:p};break;case"left":v={x:o.x-r.width,y:p};break;default:v={x:o.x,y:o.y}}switch(Qe(t)){case"start":v[a]-=g*(n&&d?-1:1);break;case"end":v[a]+=g*(n&&d?-1:1);break}return v}async function hd(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Re(t,e),w=ss(v),h=i[g?p==="floating"?"reference":"floating":p],_=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:m,strategy:u})),x=p==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),b=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:u}):x);return{top:(_.top-S.top+w.top)/b.y,bottom:(S.bottom-_.bottom+w.bottom)/b.y,left:(_.left-S.left+w.left)/b.x,right:(S.right-_.right+w.right)/b.x}}const vd=50,gd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:hd},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:m,y:p}=zo(d,o,u),g=o,v=0;const w={};for(let f=0;f<s.length;f++){const h=s[f];if(!h)continue;const{name:_,fn:x}=h,{x:y,y:b,data:S,reset:E}=await x({x:m,y:p,initialPlacement:o,placement:g,strategy:r,middlewareData:w,rects:d,platform:i,elements:{reference:e,floating:t}});m=y??m,p=b??p,w[_]={...w[_],...S},E&&v<vd&&(v++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:m,y:p}=zo(d,g,u)),f=-1)}return{x:m,y:p,placement:g,strategy:r,middlewareData:w}},wd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:m=0}=Re(e,t)||{};if(d==null)return{};const p=ss(m),g={x:n,y:o},v=Jn(r),w=Zn(v),f=await a.getDimensions(d),h=v==="y",_=h?"top":"left",x=h?"bottom":"right",y=h?"clientHeight":"clientWidth",b=s.reference[w]+s.reference[v]-g[v]-s.floating[w],S=g[v]-s.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=E?E[y]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=i.floating[y]||s.floating[w]);const A=b/2-S/2,k=C/2-f[w]/2-1,M=Ne(p[_],k),j=Ne(p[x],k),F=M,W=C-f[w]-j,T=C/2-f[w]/2+A,$=Tn(F,T,W),D=!u.arrow&&Qe(r)!=null&&T!==$&&s.reference[w]/2-(T<F?M:j)-f[w]/2<0,z=D?T<F?T-F:T-W:0;return{[v]:g[v]+z,data:{[v]:$,centerOffset:T-$-z,...D&&{alignmentOffset:z}},reset:D}}}),_d=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:f=!0,...h}=Re(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=Te(r),x=be(i),y=Te(i)===i,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=g||(y||!f?[Ot(i)]:ld(i)),E=w!=="none";!g&&E&&S.push(...pd(i,f,w,b));const C=[i,...S],A=await u.detectOverflow(t,h),k=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(m&&k.push(A[_]),p){const T=cd(r,a,b);k.push(A[T[0]],A[T[1]])}if(M=[...M,{placement:r,overflows:k}],!k.every(T=>T<=0)){var j,F;const T=(((j=s.flip)==null?void 0:j.index)||0)+1,$=C[T];if($&&(!(p==="alignment"?x!==be($):!1)||M.every(P=>be(P.placement)===x?P.overflows[0]>0:!0)))return{data:{index:T,overflows:M},reset:{placement:$}};let D=(F=M.filter(z=>z.overflows[0]<=0).sort((z,P)=>z.overflows[1]-P.overflows[1])[0])==null?void 0:F.placement;if(!D)switch(v){case"bestFit":{var W;const z=(W=M.filter(P=>{if(E){const R=be(P.placement);return R===x||R==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(R=>R>0).reduce((R,V)=>R+V,0)]).sort((P,R)=>P[1]-R[1])[0])==null?void 0:W[0];z&&(D=z);break}case"initialPlacement":D=i;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function Bo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $o(e){return id.some(t=>e[t]>=0)}const xd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Re(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...s,elementContext:"reference"}),i=Bo(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:$o(i)}}}case"escaped":{const a=await o.detectOverflow(t,{...s,altBoundary:!0}),i=Bo(a,n.floating);return{data:{escapedOffsets:i,escaped:$o(i)}}}default:return{}}}}},is=new Set(["left","top"]);async function yd(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Te(n),i=Qe(n),u=be(n)==="y",d=is.has(a)?-1:1,m=s&&u?-1:1,p=Re(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),u?{x:v*m,y:g*d}:{x:g*d,y:v*m}}const bd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,u=await yd(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},Sd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:_=>{let{x,y}=_;return{x,y}}},...d}=Re(e,t),m={x:n,y:o},p=await s.detectOverflow(t,d),g=be(Te(r)),v=qn(g);let w=m[v],f=m[g];if(a){const _=v==="y"?"top":"left",x=v==="y"?"bottom":"right",y=w+p[_],b=w-p[x];w=Tn(y,w,b)}if(i){const _=g==="y"?"top":"left",x=g==="y"?"bottom":"right",y=f+p[_],b=f-p[x];f=Tn(y,f,b)}const h=u.fn({...t,[v]:w,[g]:f});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:a,[g]:i}}}}}},Cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=Re(e,t),m={x:n,y:o},p=be(r),g=qn(p);let v=m[g],w=m[p];const f=Re(i,t),h=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const y=g==="y"?"height":"width",b=s.reference[g]-s.floating[y]+h.mainAxis,S=s.reference[g]+s.reference[y]-h.mainAxis;v<b?v=b:v>S&&(v=S)}if(d){var _,x;const y=g==="y"?"width":"height",b=is.has(Te(r)),S=s.reference[p]-s.floating[y]+(b&&((_=a.offset)==null?void 0:_[p])||0)+(b?0:h.crossAxis),E=s.reference[p]+s.reference[y]+(b?0:((x=a.offset)==null?void 0:x[p])||0)-(b?h.crossAxis:0);w<S?w=S:w>E&&(w=E)}return{[g]:v,[p]:w}}}},Ed=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...d}=Re(e,t),m=await a.detectOverflow(t,d),p=Te(r),g=Qe(r),v=be(r)==="y",{width:w,height:f}=s.floating;let h,_;p==="top"||p==="bottom"?(h=p,_=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=p,h=g==="end"?"top":"bottom");const x=f-m.top-m.bottom,y=w-m.left-m.right,b=Ne(f-m[h],x),S=Ne(w-m[_],y),E=!t.middlewareData.shift;let C=b,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(C=x),E&&!g){const M=ce(m.left,0),j=ce(m.right,0),F=ce(m.top,0),W=ce(m.bottom,0);v?A=w-2*(M!==0||j!==0?M+j:ce(m.left,m.right)):C=f-2*(F!==0||W!==0?F+W:ce(m.top,m.bottom))}await u({...t,availableWidth:A,availableHeight:C});const k=await a.getDimensions(i.floating);return w!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function et(e){return as(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(as(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function as(e){return Ut()?e instanceof Node||e instanceof le(e).Node:!1}function ge(e){return Ut()?e instanceof Element||e instanceof le(e).Element:!1}function Pe(e){return Ut()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function Wo(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Rd(e){return/^(table|td|th)$/.test(et(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Td=/transform|translate|scale|rotate|perspective|filter/,Md=/paint|layout|strict|content/,Fe=e=>!!e&&e!=="none";let vn;function Qn(e){const t=ge(e)?we(e):e;return Fe(t.transform)||Fe(t.translate)||Fe(t.scale)||Fe(t.rotate)||Fe(t.perspective)||!eo()&&(Fe(t.backdropFilter)||Fe(t.filter))||Td.test(t.willChange||"")||Md.test(t.contain||"")}function Pd(e){let t=Ae(e);for(;Pe(t)&&!Je(t);){if(Qn(t))return t;if(Kt(t))return null;t=Ae(t)}return null}function eo(){return vn==null&&(vn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vn}function Je(e){return/^(html|body|#document)$/.test(et(e))}function we(e){return le(e).getComputedStyle(e)}function Gt(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wo(e)&&e.host||Ce(e);return Wo(t)?t.host:t}function cs(e){const t=Ae(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&pt(t)?t:cs(t)}function st(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=cs(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=le(r);if(s){const i=Pn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],i&&n?st(i):[])}else return t.concat(r,st(r,[],n))}function Pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ls(e){const t=we(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Pe(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=At(n)!==s||At(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function to(e){return ge(e)?e:e.contextElement}function qe(e){const t=to(e);if(!Pe(t))return Se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=ls(t);let a=(s?At(n.width):n.width)/o,i=(s?At(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Id=Se(0);function us(e){const t=le(e);return!eo()||!t.visualViewport?Id:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=to(e);let a=Se(1);t&&(o?ge(o)&&(a=qe(o)):a=qe(e));const i=Nd(s,n,o)?us(s):Se(0);let u=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,m=r.width/a.x,p=r.height/a.y;if(s){const g=le(s),v=o&&ge(o)?le(o):o;let w=g,f=Pn(w);for(;f&&o&&v!==w;){const h=qe(f),_=f.getBoundingClientRect(),x=we(f),y=_.left+(f.clientLeft+parseFloat(x.paddingLeft))*h.x,b=_.top+(f.clientTop+parseFloat(x.paddingTop))*h.y;u*=h.x,d*=h.y,m*=h.x,p*=h.y,u+=y,d+=b,w=le(f),f=Pn(w)}}return Dt({width:m,height:p,x:u,y:d})}function Yt(e,t){const n=Gt(e).scrollLeft;return t?t.left+n:$e(Ce(e)).left+n}function ds(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Ad(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=Ce(o),i=t?Kt(t.floating):!1;if(o===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Se(1);const m=Se(0),p=Pe(o);if((p||!p&&!s)&&((et(o)!=="body"||pt(a))&&(u=Gt(o)),p)){const v=$e(o);d=qe(o),m.x=v.x+o.clientLeft,m.y=v.y+o.clientTop}const g=a&&!p&&!s?ds(a,u):Se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-u.scrollTop*d.y+m.y+g.y}}function Od(e){return Array.from(e.getClientRects())}function Dd(e){const t=Ce(e),n=Gt(e),o=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const i=-n.scrollTop;return we(o).direction==="rtl"&&(a+=ce(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const Vo=25;function jd(e,t){const n=le(e),o=Ce(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,u=0;if(r){s=r.width,a=r.height;const m=eo();(!m||m&&t==="fixed")&&(i=r.offsetLeft,u=r.offsetTop)}const d=Yt(o);if(d<=0){const m=o.ownerDocument,p=m.body,g=getComputedStyle(p),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-v);w<=Vo&&(s-=w)}else d<=Vo&&(s+=d);return{width:s,height:a,x:i,y:u}}function kd(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Pe(e)?qe(e):Se(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=r*s.x,d=o*s.y;return{width:a,height:i,x:u,y:d}}function Ho(e,t,n){let o;if(t==="viewport")o=jd(e,n);else if(t==="document")o=Dd(Ce(e));else if(ge(t))o=kd(t,n);else{const r=us(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function fs(e,t){const n=Ae(e);return n===t||!ge(n)||Je(n)?!1:we(n).position==="fixed"||fs(n,t)}function Ld(e,t){const n=t.get(e);if(n)return n;let o=st(e,[],!1).filter(i=>ge(i)&&et(i)!=="body"),r=null;const s=we(e).position==="fixed";let a=s?Ae(e):e;for(;ge(a)&&!Je(a);){const i=we(a),u=Qn(a);!u&&i.position==="fixed"&&(r=null),(s?!u&&!r:!u&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||pt(a)&&!u&&fs(e,a))?o=o.filter(m=>m!==a):r=i,a=Ae(a)}return t.set(e,o),o}function Fd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:Ld(t,this._c):[].concat(n),o],i=Ho(t,a[0],r);let u=i.top,d=i.right,m=i.bottom,p=i.left;for(let g=1;g<a.length;g++){const v=Ho(t,a[g],r);u=ce(v.top,u),d=Ne(v.right,d),m=Ne(v.bottom,m),p=ce(v.left,p)}return{width:d-p,height:m-u,x:p,y:u}}function zd(e){const{width:t,height:n}=ls(e);return{width:t,height:n}}function Bd(e,t,n){const o=Pe(t),r=Ce(t),s=n==="fixed",a=$e(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=Se(0);function d(){u.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||pt(r))&&(i=Gt(t)),o){const v=$e(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else r&&d();s&&!o&&r&&d();const m=r&&!o&&!s?ds(r,i):Se(0),p=a.left+i.scrollLeft-u.x-m.x,g=a.top+i.scrollTop-u.y-m.y;return{x:p,y:g,width:a.width,height:a.height}}function gn(e){return we(e).position==="static"}function Uo(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function ps(e,t){const n=le(e);if(Kt(e))return n;if(!Pe(e)){let r=Ae(e);for(;r&&!Je(r);){if(ge(r)&&!gn(r))return r;r=Ae(r)}return n}let o=Uo(e,t);for(;o&&Rd(o)&&gn(o);)o=Uo(o,t);return o&&Je(o)&&gn(o)&&!Qn(o)?n:o||Pd(e)||n}const $d=async function(e){const t=this.getOffsetParent||ps,n=this.getDimensions,o=await n(e.floating);return{reference:Bd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Wd(e){return we(e).direction==="rtl"}const Vd={convertOffsetParentRelativeRectToViewportRelativeRect:Ad,getDocumentElement:Ce,getClippingRect:Fd,getOffsetParent:ps,getElementRects:$d,getClientRects:Od,getDimensions:zd,getScale:qe,isElement:ge,isRTL:Wd};function ms(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hd(e,t){let n=null,o;const r=Ce(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:m,top:p,width:g,height:v}=d;if(i||t(),!g||!v)return;const w=Rt(p),f=Rt(r.clientWidth-(m+g)),h=Rt(r.clientHeight-(p+v)),_=Rt(m),y={rootMargin:-w+"px "+-f+"px "+-h+"px "+-_+"px",threshold:ce(0,Ne(1,u))||1};let b=!0;function S(E){const C=E[0].intersectionRatio;if(C!==u){if(!b)return a();C?a(!1,C):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!ms(d,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),s}function Ud(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=to(e),m=r||s?[...d?st(d):[],...t?st(t):[]]:[];m.forEach(_=>{r&&_.addEventListener("scroll",n,{passive:!0}),s&&_.addEventListener("resize",n)});const p=d&&i?Hd(d,n):null;let g=-1,v=null;a&&(v=new ResizeObserver(_=>{let[x]=_;x&&x.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),d&&!u&&v.observe(d),t&&v.observe(t));let w,f=u?$e(e):null;u&&h();function h(){const _=$e(e);f&&!ms(f,_)&&n(),f=_,w=requestAnimationFrame(h)}return n(),()=>{var _;m.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p?.(),(_=v)==null||_.disconnect(),v=null,u&&cancelAnimationFrame(w)}}const Kd=bd,Gd=Sd,Yd=_d,Xd=Ed,qd=xd,Ko=wd,Zd=Cd,Jd=(e,t,n)=>{const o=new Map,r={platform:Vd,...n},s={...r.platform,_c:o};return gd(e,t,{...r,platform:s})};var Qd=typeof document<"u",ef=function(){},Pt=Qd?N.useLayoutEffect:ef;function jt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!jt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function hs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Go(e,t){const n=hs(e);return Math.round(t*n)/n}function wn(e){const t=c.useRef(e);return Pt(()=>{t.current=e}),t}function tf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[m,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=c.useState(o);jt(g,o)||v(o);const[w,f]=c.useState(null),[h,_]=c.useState(null),x=c.useCallback(P=>{P!==E.current&&(E.current=P,f(P))},[]),y=c.useCallback(P=>{P!==C.current&&(C.current=P,_(P))},[]),b=s||w,S=a||h,E=c.useRef(null),C=c.useRef(null),A=c.useRef(m),k=u!=null,M=wn(u),j=wn(r),F=wn(d),W=c.useCallback(()=>{if(!E.current||!C.current)return;const P={placement:t,strategy:n,middleware:g};j.current&&(P.platform=j.current),Jd(E.current,C.current,P).then(R=>{const V={...R,isPositioned:F.current!==!1};T.current&&!jt(A.current,V)&&(A.current=V,ct.flushSync(()=>{p(V)}))})},[g,t,n,j,F]);Pt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[d]);const T=c.useRef(!1);Pt(()=>(T.current=!0,()=>{T.current=!1}),[]),Pt(()=>{if(b&&(E.current=b),S&&(C.current=S),b&&S){if(M.current)return M.current(b,S,W);W()}},[b,S,W,M,k]);const $=c.useMemo(()=>({reference:E,floating:C,setReference:x,setFloating:y}),[x,y]),D=c.useMemo(()=>({reference:b,floating:S}),[b,S]),z=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!D.floating)return P;const R=Go(D.floating,m.x),V=Go(D.floating,m.y);return i?{...P,transform:"translate("+R+"px, "+V+"px)",...hs(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:V}},[n,i,D.floating,m.x,m.y]);return c.useMemo(()=>({...m,update:W,refs:$,elements:D,floatingStyles:z}),[m,W,$,D,z])}const nf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Ko({element:o.current,padding:r}).fn(n):{}:o?Ko({element:o,padding:r}).fn(n):{}}}},of=(e,t)=>{const n=Kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},rf=(e,t)=>{const n=Gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},sf=(e,t)=>({fn:Zd(e).fn,options:[e,t]}),af=(e,t)=>{const n=Yd(e);return{name:n.name,fn:n.fn,options:[e,t]}},cf=(e,t)=>{const n=Xd(e);return{name:n.name,fn:n.fn,options:[e,t]}},lf=(e,t)=>{const n=qd(e);return{name:n.name,fn:n.fn,options:[e,t]}},uf=(e,t)=>{const n=nf(e);return{name:n.name,fn:n.fn,options:[e,t]}};var df="Arrow",vs=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(B.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});vs.displayName=df;var ff=vs;function pf(e){const[t,n]=c.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var no="Popper",[gs,Xt]=Oe(no),[mf,ws]=gs(no),_s=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return l.jsx(mf,{scope:t,anchor:o,onAnchorChange:r,children:n})};_s.displayName=no;var xs="PopperAnchor",ys=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=ws(xs,n),a=c.useRef(null),i=H(t,a),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=o?.current||a.current,d!==u.current&&s.onAnchorChange(u.current)}),o?null:l.jsx(B.div,{...r,ref:i})});ys.displayName=xs;var oo="PopperContent",[hf,vf]=gs(oo),bs=c.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:w,...f}=e,h=ws(oo,n),[_,x]=c.useState(null),y=H(t,O=>x(O)),[b,S]=c.useState(null),E=pf(b),C=E?.width??0,A=E?.height??0,k=o+(s!=="center"?"-"+s:""),M=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},j=Array.isArray(d)?d:[d],F=j.length>0,W={padding:M,boundary:j.filter(wf),altBoundary:F},{refs:T,floatingStyles:$,placement:D,isPositioned:z,middlewareData:P}=tf({strategy:"fixed",placement:k,whileElementsMounted:(...O)=>Ud(...O,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[of({mainAxis:r+A,alignmentAxis:a}),u&&rf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?sf():void 0,...W}),u&&af({...W}),cf({...W,apply:({elements:O,rects:U,availableWidth:se,availableHeight:K})=>{const{width:Y,height:X}=U.reference,ue=O.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${K}px`),ue.setProperty("--radix-popper-anchor-width",`${Y}px`),ue.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&uf({element:b,padding:i}),_f({arrowWidth:C,arrowHeight:A}),g&&lf({strategy:"referenceHidden",...W})]}),[R,V]=Es(D),G=ne(w);q(()=>{z&&G?.()},[z,G]);const Q=P.arrow?.x,Z=P.arrow?.y,re=P.arrow?.centerOffset!==0,[Ee,ie]=c.useState();return q(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(hf,{scope:n,placedSide:R,onArrowChange:S,arrowX:Q,arrowY:Z,shouldHideArrow:re,children:l.jsx(B.div,{"data-side":R,"data-align":V,...f,ref:y,style:{...f.style,animation:z?void 0:"none"}})})})});bs.displayName=oo;var Ss="PopperArrow",gf={top:"bottom",right:"left",bottom:"top",left:"right"},Cs=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=vf(Ss,o),a=gf[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(ff,{...r,ref:n,style:{...r.style,display:"block"}})})});Cs.displayName=Ss;function wf(e){return e!==null}var _f=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,m]=Es(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(r.arrow?.x??0)+i/2,v=(r.arrow?.y??0)+u/2;let w="",f="";return d==="bottom"?(w=a?p:`${g}px`,f=`${-u}px`):d==="top"?(w=a?p:`${g}px`,f=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,f=a?p:`${v}px`):d==="left"&&(w=`${o.floating.width+u}px`,f=a?p:`${v}px`),{data:{x:w,y:f}}}});function Es(e){const[t,n="center"]=e.split("-");return[t,n]}var ro=_s,Rs=ys,Ts=bs,Ms=Cs,_n="rovingFocusGroup.onEntryFocus",xf={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[In,Ps,yf]=Vt(mt),[bf,Is]=Oe(mt,[yf]),[Sf,Cf]=bf(mt),Ns=c.forwardRef((e,t)=>l.jsx(In.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(In.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ef,{...e,ref:t})})}));Ns.displayName=mt;var Ef=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...p}=e,g=c.useRef(null),v=H(t,g),w=Xn(s),[f,h]=ze({prop:a,defaultProp:i??null,onChange:u,caller:mt}),[_,x]=c.useState(!1),y=ne(d),b=Ps(n),S=c.useRef(!1),[E,C]=c.useState(0);return c.useEffect(()=>{const A=g.current;if(A)return A.addEventListener(_n,y),()=>A.removeEventListener(_n,y)},[y]),l.jsx(Sf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:f,onItemFocus:c.useCallback(A=>h(A),[h]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(A=>A+1),[]),onFocusableItemRemove:c.useCallback(()=>C(A=>A-1),[]),children:l.jsx(B.div,{tabIndex:_||E===0?-1:0,"data-orientation":o,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{S.current=!0}),onFocus:I(e.onFocus,A=>{const k=!S.current;if(A.target===A.currentTarget&&k&&!_){const M=new CustomEvent(_n,xf);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const j=b().filter(D=>D.focusable),F=j.find(D=>D.active),W=j.find(D=>D.id===f),$=[F,W,...j].filter(Boolean).map(D=>D.ref.current);Ds($,m)}}S.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),As="RovingFocusGroupItem",Os=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,u=ve(),d=s||u,m=Cf(As,n),p=m.currentTabStopId===d,g=Ps(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:f}=m;return c.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),l.jsx(In.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(B.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:I(e.onMouseDown,h=>{o?m.onItemFocus(d):h.preventDefault()}),onFocus:I(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:I(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){m.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const _=Mf(h,m.orientation,m.dir);if(_!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=g().filter(b=>b.focusable).map(b=>b.ref.current);if(_==="last")y.reverse();else if(_==="prev"||_==="next"){_==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=m.loop?Pf(y,b+1):y.slice(b+1)}setTimeout(()=>Ds(y))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:f!=null}):a})})});Os.displayName=As;var Rf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Tf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mf(e,t,n){const o=Tf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Rf[o]}function Ds(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Pf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var If=Ns,Nf=Os,Nn=["Enter"," "],Af=["ArrowDown","PageUp","Home"],js=["ArrowUp","PageDown","End"],Of=[...Af,...js],Df={ltr:[...Nn,"ArrowRight"],rtl:[...Nn,"ArrowLeft"]},jf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ht="Menu",[it,kf,Lf]=Vt(ht),[He,ks]=Oe(ht,[Lf,Xt,Is]),vt=Xt(),Ls=Is(),[Fs,De]=He(ht),[Ff,gt]=He(ht),zs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,i=vt(t),[u,d]=c.useState(null),m=c.useRef(!1),p=ne(s),g=Xn(r);return c.useEffect(()=>{const v=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(ro,{...i,children:l.jsx(Fs,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(Ff,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:a,children:o})})})};zs.displayName=ht;var zf="MenuAnchor",so=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Rs,{...r,...o,ref:t})});so.displayName=zf;var io="MenuPortal",[Bf,Bs]=He(io,{forceMount:void 0}),$s=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=De(io,t);return l.jsx(Bf,{scope:t,forceMount:n,children:l.jsx(Me,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:o})})})};$s.displayName=io;var pe="MenuContent",[$f,ao]=He(pe),Ws=c.forwardRef((e,t)=>{const n=Bs(pe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(pe,e.__scopeMenu),a=gt(pe,e.__scopeMenu);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Me,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(Wf,{...r,ref:t}):l.jsx(Vf,{...r,ref:t})})})})}),Wf=c.forwardRef((e,t)=>{const n=De(pe,e.__scopeMenu),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return $n(s)},[]),l.jsx(co,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Vf=c.forwardRef((e,t)=>{const n=De(pe,e.__scopeMenu);return l.jsx(co,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Hf=Ze("MenuContent.ScrollLock"),co=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:w,...f}=e,h=De(pe,n),_=gt(pe,n),x=vt(n),y=Ls(n),b=kf(n),[S,E]=c.useState(null),C=c.useRef(null),A=H(t,C,h.onContentChange),k=c.useRef(0),M=c.useRef(""),j=c.useRef(0),F=c.useRef(null),W=c.useRef("right"),T=c.useRef(0),$=w?$t:c.Fragment,D=w?{as:Hf,allowPinchZoom:!0}:void 0,z=R=>{const V=M.current+R,G=b().filter(O=>!O.disabled),Q=document.activeElement,Z=G.find(O=>O.ref.current===Q)?.textValue,re=G.map(O=>O.textValue),Ee=np(re,V,Z),ie=G.find(O=>O.textValue===Ee)?.ref.current;(function O(U){M.current=U,window.clearTimeout(k.current),U!==""&&(k.current=window.setTimeout(()=>O(""),1e3))})(V),ie&&setTimeout(()=>ie.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),Bn();const P=c.useCallback(R=>W.current===F.current?.side&&rp(R,F.current?.area),[]);return l.jsx($f,{scope:n,searchRef:M,onItemEnter:c.useCallback(R=>{P(R)&&R.preventDefault()},[P]),onItemLeave:c.useCallback(R=>{P(R)||(C.current?.focus(),E(null))},[P]),onTriggerLeave:c.useCallback(R=>{P(R)&&R.preventDefault()},[P]),pointerGraceTimerRef:j,onPointerGraceIntentChange:c.useCallback(R=>{F.current=R},[]),children:l.jsx($,{...D,children:l.jsx(zt,{asChild:!0,trapped:r,onMountAutoFocus:I(s,R=>{R.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:l.jsx(If,{asChild:!0,...y,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:I(u,R=>{_.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Ts,{role:"menu","aria-orientation":"vertical","data-state":si(h.open),"data-radix-menu-content":"",dir:_.dir,...x,...f,ref:A,style:{outline:"none",...f.style},onKeyDown:I(f.onKeyDown,R=>{const G=R.target.closest("[data-radix-menu-content]")===R.currentTarget,Q=R.ctrlKey||R.altKey||R.metaKey,Z=R.key.length===1;G&&(R.key==="Tab"&&R.preventDefault(),!Q&&Z&&z(R.key));const re=C.current;if(R.target!==re||!Of.includes(R.key))return;R.preventDefault();const ie=b().filter(O=>!O.disabled).map(O=>O.ref.current);js.includes(R.key)&&ie.reverse(),ep(ie)}),onBlur:I(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(k.current),M.current="")}),onPointerMove:I(e.onPointerMove,at(R=>{const V=R.target,G=T.current!==R.clientX;if(R.currentTarget.contains(V)&&G){const Q=R.clientX>T.current?"right":"left";W.current=Q,T.current=R.clientX}}))})})})})})})});Ws.displayName=pe;var Uf="MenuGroup",lo=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"group",...o,ref:t})});lo.displayName=Uf;var Kf="MenuLabel",Vs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});Vs.displayName=Kf;var kt="MenuItem",Yo="menu.itemSelect",qt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=c.useRef(null),a=gt(kt,e.__scopeMenu),i=ao(kt,e.__scopeMenu),u=H(t,s),d=c.useRef(!1),m=()=>{const p=s.current;if(!n&&p){const g=new CustomEvent(Yo,{bubbles:!0,cancelable:!0});p.addEventListener(Yo,v=>o?.(v),{once:!0}),zn(p,g),g.defaultPrevented?d.current=!1:a.onClose()}};return l.jsx(Hs,{...r,ref:u,disabled:n,onClick:I(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:I(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,p=>{const g=i.searchRef.current!=="";n||g&&p.key===" "||Nn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});qt.displayName=kt;var Hs=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=ao(kt,n),i=Ls(n),u=c.useRef(null),d=H(t,u),[m,p]=c.useState(!1),[g,v]=c.useState("");return c.useEffect(()=>{const w=u.current;w&&v((w.textContent??"").trim())},[s.children]),l.jsx(it.ItemSlot,{scope:n,disabled:o,textValue:r??g,children:l.jsx(Nf,{asChild:!0,...i,focusable:!o,children:l.jsx(B.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:I(e.onPointerMove,at(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,at(w=>a.onItemLeave(w))),onFocus:I(e.onFocus,()=>p(!0)),onBlur:I(e.onBlur,()=>p(!1))})})})}),Gf="MenuCheckboxItem",Us=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(qs,{scope:e.__scopeMenu,checked:n,children:l.jsx(qt,{role:"menuitemcheckbox","aria-checked":Lt(n)?"mixed":n,...r,ref:t,"data-state":po(n),onSelect:I(r.onSelect,()=>o?.(Lt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Us.displayName=Gf;var Ks="MenuRadioGroup",[Yf,Xf]=He(Ks,{value:void 0,onValueChange:()=>{}}),Gs=c.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ne(o);return l.jsx(Yf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(lo,{...r,ref:t})})});Gs.displayName=Ks;var Ys="MenuRadioItem",Xs=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=Xf(Ys,e.__scopeMenu),s=n===r.value;return l.jsx(qs,{scope:e.__scopeMenu,checked:s,children:l.jsx(qt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":po(s),onSelect:I(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Xs.displayName=Ys;var uo="MenuItemIndicator",[qs,qf]=He(uo,{checked:!1}),Zs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=qf(uo,n);return l.jsx(Me,{present:o||Lt(s.checked)||s.checked===!0,children:l.jsx(B.span,{...r,ref:t,"data-state":po(s.checked)})})});Zs.displayName=uo;var Zf="MenuSeparator",Js=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Js.displayName=Zf;var Jf="MenuArrow",Qs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Ms,{...r,...o,ref:t})});Qs.displayName=Jf;var fo="MenuSub",[Qf,ei]=He(fo),ti=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=De(fo,t),a=vt(t),[i,u]=c.useState(null),[d,m]=c.useState(null),p=ne(r);return c.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),l.jsx(ro,{...a,children:l.jsx(Fs,{scope:t,open:o,onOpenChange:p,content:d,onContentChange:m,children:l.jsx(Qf,{scope:t,contentId:ve(),triggerId:ve(),trigger:i,onTriggerChange:u,children:n})})})};ti.displayName=fo;var ot="MenuSubTrigger",ni=c.forwardRef((e,t)=>{const n=De(ot,e.__scopeMenu),o=gt(ot,e.__scopeMenu),r=ei(ot,e.__scopeMenu),s=ao(ot,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},m=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>m,[m]),c.useEffect(()=>{const p=i.current;return()=>{window.clearTimeout(p),u(null)}},[i,u]),l.jsx(so,{asChild:!0,...d,children:l.jsx(Hs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":si(n.open),...e,ref:lt(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,at(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:I(e.onPointerLeave,at(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,w=v==="right",f=w?-5:5,h=g[w?"left":"right"],_=g[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+f,y:p.clientY},{x:h,y:g.top},{x:_,y:g.top},{x:_,y:g.bottom},{x:h,y:g.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,p=>{const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||Df[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});ni.displayName=ot;var oi="MenuSubContent",ri=c.forwardRef((e,t)=>{const n=Bs(pe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(pe,e.__scopeMenu),a=gt(pe,e.__scopeMenu),i=ei(oi,e.__scopeMenu),u=c.useRef(null),d=H(t,u);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Me,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:l.jsx(co,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{a.isUsingKeyboardRef.current&&u.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:I(e.onFocusOutside,m=>{m.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,m=>{a.onClose(),m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=jf[a.dir].includes(m.key);p&&g&&(s.onOpenChange(!1),i.trigger?.focus(),m.preventDefault())})})})})})});ri.displayName=oi;function si(e){return e?"open":"closed"}function Lt(e){return e==="indeterminate"}function po(e){return Lt(e)?"indeterminate":e?"checked":"unchecked"}function ep(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function np(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=tp(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function op(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],u=t[a],d=i.x,m=i.y,p=u.x,g=u.y;m>o!=g>o&&n<(p-d)*(o-m)/(g-m)+d&&(r=!r)}return r}function rp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return op(n,t)}function at(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sp=zs,ip=so,ap=$s,cp=Ws,lp=lo,up=Vs,dp=qt,fp=Us,pp=Gs,mp=Xs,hp=Zs,vp=Js,gp=Qs,wp=ti,_p=ni,xp=ri,Zt="DropdownMenu",[yp]=Oe(Zt,[ks]),oe=ks(),[bp,ii]=yp(Zt),ai=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=oe(t),d=c.useRef(null),[m,p]=ze({prop:r,defaultProp:s??!1,onChange:a,caller:Zt});return l.jsx(bp,{scope:t,triggerId:ve(),triggerRef:d,contentId:ve(),open:m,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:i,children:l.jsx(sp,{...u,open:m,onOpenChange:p,dir:o,modal:i,children:n})})};ai.displayName=Zt;var ci="DropdownMenuTrigger",li=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=ii(ci,n),a=oe(n);return l.jsx(ip,{asChild:!0,...a,children:l.jsx(B.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:lt(t,s.triggerRef),onPointerDown:I(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:I(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});li.displayName=ci;var Sp="DropdownMenuPortal",ui=e=>{const{__scopeDropdownMenu:t,...n}=e,o=oe(t);return l.jsx(ap,{...o,...n})};ui.displayName=Sp;var di="DropdownMenuContent",fi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ii(di,n),s=oe(n),a=c.useRef(!1);return l.jsx(cp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{a.current||r.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:I(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,m=u.button===2||d;(!r.modal||m)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fi.displayName=di;var Cp="DropdownMenuGroup",pi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(lp,{...r,...o,ref:t})});pi.displayName=Cp;var Ep="DropdownMenuLabel",mi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(up,{...r,...o,ref:t})});mi.displayName=Ep;var Rp="DropdownMenuItem",hi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(dp,{...r,...o,ref:t})});hi.displayName=Rp;var Tp="DropdownMenuCheckboxItem",vi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(fp,{...r,...o,ref:t})});vi.displayName=Tp;var Mp="DropdownMenuRadioGroup",gi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(pp,{...r,...o,ref:t})});gi.displayName=Mp;var Pp="DropdownMenuRadioItem",wi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(mp,{...r,...o,ref:t})});wi.displayName=Pp;var Ip="DropdownMenuItemIndicator",_i=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(hp,{...r,...o,ref:t})});_i.displayName=Ip;var Np="DropdownMenuSeparator",xi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(vp,{...r,...o,ref:t})});xi.displayName=Np;var Ap="DropdownMenuArrow",Op=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(gp,{...r,...o,ref:t})});Op.displayName=Ap;var Dp=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,a=oe(t),[i,u]=ze({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return l.jsx(wp,{...a,open:i,onOpenChange:u,children:n})},jp="DropdownMenuSubTrigger",yi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(_p,{...r,...o,ref:t})});yi.displayName=jp;var kp="DropdownMenuSubContent",bi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(xp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bi.displayName=kp;var Si=ai,Ci=li,mo=ui,Ei=fi,Lp=pi,Fp=mi,zp=hi,Ri=vi,Bp=gi,$p=wi,ho=_i,Wp=xi,Vp=Dp,Hp=yi,Up=bi;const Kp="uzi-multi-select-module__wrapper__Izj2x",Gp="uzi-multi-select-module__wrapperFullWidth__eH8pf",Yp="uzi-multi-select-module__trigger__r3816",Xp="uzi-multi-select-module__value__PuUmG",qp="uzi-multi-select-module__placeholder__dJIU-",Zp="uzi-multi-select-module__chip__46Ms-",Jp="uzi-multi-select-module__chipSummary__zLwi8",Qp="uzi-multi-select-module__chevron__SWK5l",em="uzi-multi-select-module__menu__q8auA",tm="uzi-multi-select-module__option__-Ioqk",nm="uzi-multi-select-module__optionDisabled__qtCi8",om="uzi-multi-select-module__optionSelected__74IO8",rm="uzi-multi-select-module__optionLabel__cVoN7",sm="uzi-multi-select-module__indicator__NO-WE",im="uzi-multi-select-module__indicatorSelected__9sEAy",am="uzi-multi-select-module__indicatorDisabled__vqdiH",ee={wrapper:Kp,wrapperFullWidth:Gp,trigger:Yp,value:Xp,placeholder:qp,chip:Zp,chipSummary:Jp,chevron:Qp,menu:em,option:tm,optionDisabled:nm,optionSelected:om,optionLabel:rm,indicator:sm,indicatorSelected:im,indicatorDisabled:am},Ti=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="Select options",fullWidth:r=!0,maxVisibleValues:s=2,className:a,disabled:i=!1,name:u,"aria-label":d,"aria-labelledby":m},p)=>{const g=c.useMemo(()=>new Set(t),[t]),v=c.useMemo(()=>e.filter(x=>g.has(x.value)),[e,g]),w=c.useCallback(x=>{if(g.has(x)){n(t.filter(y=>y!==x));return}n([...t,x])},[n,g,t]),f=Math.max(1,s),h=v.slice(0,f),_=Math.max(0,v.length-h.length);return l.jsx(Si,{modal:!1,children:l.jsxs("div",{className:L(ee.wrapper,r&&ee.wrapperFullWidth,a),children:[l.jsx(Ci,{asChild:!0,children:l.jsxs("button",{ref:p,type:"button",className:ee.trigger,"aria-label":d,"aria-labelledby":m,disabled:i,children:[l.jsx("span",{className:ee.value,children:v.length===0?l.jsx("span",{className:ee.placeholder,children:o}):l.jsxs(l.Fragment,{children:[h.map(x=>l.jsx("span",{className:ee.chip,children:x.label},x.value)),_>0?l.jsxs("span",{className:L(ee.chip,ee.chipSummary),children:["+",_]}):null]})}),l.jsx("span",{className:ee.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),u?t.map(x=>l.jsx("input",{type:"hidden",name:u,value:x},x)):null,l.jsx(mo,{children:l.jsx(Ei,{className:ee.menu,sideOffset:4,align:"start",children:e.map(x=>{const y=g.has(x.value);return l.jsxs(Ri,{className:L(ee.option,y&&ee.optionSelected,x.disabled&&ee.optionDisabled),checked:y,disabled:x.disabled,onCheckedChange:()=>w(x.value),onSelect:b=>b.preventDefault(),children:[l.jsx("span",{className:L(ee.indicator,y&&ee.indicatorSelected,x.disabled&&ee.indicatorDisabled),"aria-hidden":"true",children:l.jsx(ho,{forceMount:!0,children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx("span",{className:ee.optionLabel,children:x.label})]},x.value)})})})]})})});Ti.displayName="MultiSelect";function Xo(e,[t,n]){return Math.min(n,Math.max(t,e))}function cm(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var lm=[" ","Enter","ArrowUp","ArrowDown"],um=[" ","Enter"],We="Select",[Jt,Qt,dm]=Vt(We),[tt]=Oe(We,[dm,Xt]),en=Xt(),[fm,je]=tt(We),[pm,mm]=tt(We),Mi=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:u,dir:d,name:m,autoComplete:p,disabled:g,required:v,form:w}=e,f=en(t),[h,_]=c.useState(null),[x,y]=c.useState(null),[b,S]=c.useState(!1),E=Xn(d),[C,A]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[k,M]=ze({prop:a,defaultProp:i,onChange:u,caller:We}),j=c.useRef(null),F=h?w||!!h.closest("form"):!0,[W,T]=c.useState(new Set),$=Array.from(W).map(D=>D.props.value).join(";");return l.jsx(ro,{...f,children:l.jsxs(fm,{required:v,scope:t,trigger:h,onTriggerChange:_,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:ve(),value:k,onValueChange:M,open:C,onOpenChange:A,dir:E,triggerPointerDownPosRef:j,disabled:g,children:[l.jsx(Jt.Provider,{scope:t,children:l.jsx(pm,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(D=>{T(z=>new Set(z).add(D))},[]),onNativeOptionRemove:c.useCallback(D=>{T(z=>{const P=new Set(z);return P.delete(D),P})},[]),children:n})}),F?l.jsxs(Yi,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:p,value:k,onChange:D=>M(D.target.value),disabled:g,form:w,children:[k===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Mi.displayName=We;var Pi="SelectTrigger",Ii=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=en(n),a=je(Pi,n),i=a.disabled||o,u=H(t,a.onTriggerChange),d=Qt(n),m=c.useRef("touch"),[p,g,v]=qi(f=>{const h=d().filter(y=>!y.disabled),_=h.find(y=>y.value===a.value),x=Zi(h,f,_);x!==void 0&&a.onValueChange(x.value)}),w=f=>{i||(a.onOpenChange(!0),v()),f&&(a.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return l.jsx(Rs,{asChild:!0,...s,children:l.jsx(B.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Xi(a.value)?"":void 0,...r,ref:u,onClick:I(r.onClick,f=>{f.currentTarget.focus(),m.current!=="mouse"&&w(f)}),onPointerDown:I(r.onPointerDown,f=>{m.current=f.pointerType;const h=f.target;h.hasPointerCapture(f.pointerId)&&h.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(w(f),f.preventDefault())}),onKeyDown:I(r.onKeyDown,f=>{const h=p.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&g(f.key),!(h&&f.key===" ")&&lm.includes(f.key)&&(w(),f.preventDefault())})})})});Ii.displayName=Pi;var Ni="SelectValue",Ai=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,u=je(Ni,n),{onValueNodeHasChildrenChange:d}=u,m=s!==void 0,p=H(t,u.onValueNodeChange);return q(()=>{d(m)},[d,m]),l.jsx(B.span,{...i,ref:p,style:{pointerEvents:"none"},children:Xi(u.value)?l.jsx(l.Fragment,{children:a}):s})});Ai.displayName=Ni;var hm="SelectIcon",Oi=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(B.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Oi.displayName=hm;var vm="SelectPortal",Di=e=>l.jsx(dt,{asChild:!0,...e});Di.displayName=vm;var Ve="SelectContent",ji=c.forwardRef((e,t)=>{const n=je(Ve,e.__scopeSelect),[o,r]=c.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?ct.createPortal(l.jsx(ki,{scope:e.__scopeSelect,children:l.jsx(Jt.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(Li,{...e,ref:t})});ji.displayName=Ve;var he=10,[ki,ke]=tt(Ve),gm="SelectContentImpl",wm=Ze("SelectContent.RemoveScroll"),Li=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:f,avoidCollisions:h,..._}=e,x=je(Ve,n),[y,b]=c.useState(null),[S,E]=c.useState(null),C=H(t,O=>b(O)),[A,k]=c.useState(null),[M,j]=c.useState(null),F=Qt(n),[W,T]=c.useState(!1),$=c.useRef(!1);c.useEffect(()=>{if(y)return $n(y)},[y]),Bn();const D=c.useCallback(O=>{const[U,...se]=F().map(X=>X.ref.current),[K]=se.slice(-1),Y=document.activeElement;for(const X of O)if(X===Y||(X?.scrollIntoView({block:"nearest"}),X===U&&S&&(S.scrollTop=0),X===K&&S&&(S.scrollTop=S.scrollHeight),X?.focus(),document.activeElement!==Y))return},[F,S]),z=c.useCallback(()=>D([A,y]),[D,A,y]);c.useEffect(()=>{W&&z()},[W,z]);const{onOpenChange:P,triggerPointerDownPosRef:R}=x;c.useEffect(()=>{if(y){let O={x:0,y:0};const U=K=>{O={x:Math.abs(Math.round(K.pageX)-(R.current?.x??0)),y:Math.abs(Math.round(K.pageY)-(R.current?.y??0))}},se=K=>{O.x<=10&&O.y<=10?K.preventDefault():y.contains(K.target)||P(!1),document.removeEventListener("pointermove",U),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",se,{capture:!0})}}},[y,P,R]),c.useEffect(()=>{const O=()=>P(!1);return window.addEventListener("blur",O),window.addEventListener("resize",O),()=>{window.removeEventListener("blur",O),window.removeEventListener("resize",O)}},[P]);const[V,G]=qi(O=>{const U=F().filter(Y=>!Y.disabled),se=U.find(Y=>Y.ref.current===document.activeElement),K=Zi(U,O,se);K&&setTimeout(()=>K.ref.current.focus())}),Q=c.useCallback((O,U,se)=>{const K=!$.current&&!se;(x.value!==void 0&&x.value===U||K)&&(k(O),K&&($.current=!0))},[x.value]),Z=c.useCallback(()=>y?.focus(),[y]),re=c.useCallback((O,U,se)=>{const K=!$.current&&!se;(x.value!==void 0&&x.value===U||K)&&j(O)},[x.value]),Ee=o==="popper"?An:Fi,ie=Ee===An?{side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:f,avoidCollisions:h}:{};return l.jsx(ki,{scope:n,content:y,viewport:S,onViewportChange:E,itemRefCallback:Q,selectedItem:A,onItemLeave:Z,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:M,position:o,isPositioned:W,searchRef:V,children:l.jsx($t,{as:wm,allowPinchZoom:!0,children:l.jsx(zt,{asChild:!0,trapped:x.open,onMountAutoFocus:O=>{O.preventDefault()},onUnmountAutoFocus:I(r,O=>{x.trigger?.focus({preventScroll:!0}),O.preventDefault()}),children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:O=>O.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(Ee,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:O=>O.preventDefault(),..._,...ie,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:I(_.onKeyDown,O=>{const U=O.ctrlKey||O.altKey||O.metaKey;if(O.key==="Tab"&&O.preventDefault(),!U&&O.key.length===1&&G(O.key),["ArrowUp","ArrowDown","Home","End"].includes(O.key)){let K=F().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(O.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(O.key)){const Y=O.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>D(K)),O.preventDefault()}})})})})})})});Li.displayName=gm;var _m="SelectItemAlignedPosition",Fi=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=je(Ve,n),a=ke(Ve,n),[i,u]=c.useState(null),[d,m]=c.useState(null),p=H(t,C=>m(C)),g=Qt(n),v=c.useRef(!1),w=c.useRef(!0),{viewport:f,selectedItem:h,selectedItemText:_,focusSelectedItem:x}=a,y=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&f&&h&&_){const C=s.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),k=s.valueNode.getBoundingClientRect(),M=_.getBoundingClientRect();if(s.dir!=="rtl"){const Y=M.left-A.left,X=k.left-Y,ue=C.left-X,Le=C.width+ue,tn=Math.max(Le,A.width),nn=window.innerWidth-he,on=Xo(X,[he,Math.max(he,nn-tn)]);i.style.minWidth=Le+"px",i.style.left=on+"px"}else{const Y=A.right-M.right,X=window.innerWidth-k.right-Y,ue=window.innerWidth-C.right-X,Le=C.width+ue,tn=Math.max(Le,A.width),nn=window.innerWidth-he,on=Xo(X,[he,Math.max(he,nn-tn)]);i.style.minWidth=Le+"px",i.style.right=on+"px"}const j=g(),F=window.innerHeight-he*2,W=f.scrollHeight,T=window.getComputedStyle(d),$=parseInt(T.borderTopWidth,10),D=parseInt(T.paddingTop,10),z=parseInt(T.borderBottomWidth,10),P=parseInt(T.paddingBottom,10),R=$+D+W+P+z,V=Math.min(h.offsetHeight*5,R),G=window.getComputedStyle(f),Q=parseInt(G.paddingTop,10),Z=parseInt(G.paddingBottom,10),re=C.top+C.height/2-he,Ee=F-re,ie=h.offsetHeight/2,O=h.offsetTop+ie,U=$+D+O,se=R-U;if(U<=re){const Y=j.length>0&&h===j[j.length-1].ref.current;i.style.bottom="0px";const X=d.clientHeight-f.offsetTop-f.offsetHeight,ue=Math.max(Ee,ie+(Y?Z:0)+X+z),Le=U+ue;i.style.height=Le+"px"}else{const Y=j.length>0&&h===j[0].ref.current;i.style.top="0px";const ue=Math.max(re,$+f.offsetTop+(Y?Q:0)+ie)+se;i.style.height=ue+"px",f.scrollTop=U-re+f.offsetTop}i.style.margin=`${he}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=F+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[g,s.trigger,s.valueNode,i,d,f,h,_,s.dir,o]);q(()=>y(),[y]);const[b,S]=c.useState();q(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const E=c.useCallback(C=>{C&&w.current===!0&&(y(),x?.(),w.current=!1)},[y,x]);return l.jsx(ym,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(B.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Fi.displayName=_m;var xm="SelectPopperPosition",An=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=he,...s}=e,a=en(n);return l.jsx(Ts,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});An.displayName=xm;var[ym,vo]=tt(Ve,{}),On="SelectViewport",zi=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=ke(On,n),a=vo(On,n),i=H(t,s.onViewportChange),u=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Jt.Slot,{scope:n,children:l.jsx(B.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,d=>{const m=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g?.current&&p){const v=Math.abs(u.current-m.scrollTop);if(v>0){const w=window.innerHeight-he*2,f=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),_=Math.max(f,h);if(_<w){const x=_+v,y=Math.min(w,x),b=x-y;p.style.height=y+"px",p.style.bottom==="0px"&&(m.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});zi.displayName=On;var Bi="SelectGroup",[bm,Sm]=tt(Bi),Cm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ve();return l.jsx(bm,{scope:n,id:r,children:l.jsx(B.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Cm.displayName=Bi;var $i="SelectLabel",Em=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Sm($i,n);return l.jsx(B.div,{id:r.id,...o,ref:t})});Em.displayName=$i;var Ft="SelectItem",[Rm,Wi]=tt(Ft),Vi=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=je(Ft,n),u=ke(Ft,n),d=i.value===o,[m,p]=c.useState(s??""),[g,v]=c.useState(!1),w=H(t,x=>u.itemRefCallback?.(x,o,r)),f=ve(),h=c.useRef("touch"),_=()=>{r||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Rm,{scope:n,value:o,disabled:r,textId:f,isSelected:d,onItemTextChange:c.useCallback(x=>{p(y=>y||(x?.textContent??"").trim())},[]),children:l.jsx(Jt.ItemSlot,{scope:n,value:o,disabled:r,textValue:m,children:l.jsx(B.div,{role:"option","aria-labelledby":f,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:I(a.onFocus,()=>v(!0)),onBlur:I(a.onBlur,()=>v(!1)),onClick:I(a.onClick,()=>{h.current!=="mouse"&&_()}),onPointerUp:I(a.onPointerUp,()=>{h.current==="mouse"&&_()}),onPointerDown:I(a.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:I(a.onPointerMove,x=>{h.current=x.pointerType,r?u.onItemLeave?.():h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:I(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(um.includes(x.key)&&_(),x.key===" "&&x.preventDefault())})})})})});Vi.displayName=Ft;var rt="SelectItemText",Hi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=je(rt,n),i=ke(rt,n),u=Wi(rt,n),d=mm(rt,n),[m,p]=c.useState(null),g=H(t,_=>p(_),u.onItemTextChange,_=>i.itemTextRefCallback?.(_,u.value,u.disabled)),v=m?.textContent,w=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:f,onNativeOptionRemove:h}=d;return q(()=>(f(w),()=>h(w)),[f,h,w]),l.jsxs(l.Fragment,{children:[l.jsx(B.span,{id:u.textId,...s,ref:g}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ct.createPortal(s.children,a.valueNode):null]})});Hi.displayName=rt;var Ui="SelectItemIndicator",Ki=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Wi(Ui,n).isSelected?l.jsx(B.span,{"aria-hidden":!0,...o,ref:t}):null});Ki.displayName=Ui;var Dn="SelectScrollUpButton",Tm=c.forwardRef((e,t)=>{const n=ke(Dn,e.__scopeSelect),o=vo(Dn,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Gi,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Tm.displayName=Dn;var jn="SelectScrollDownButton",Mm=c.forwardRef((e,t)=>{const n=ke(jn,e.__scopeSelect),o=vo(jn,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)<d;s(m)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Gi,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Mm.displayName=jn;var Gi=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=ke("SelectScrollButton",n),a=c.useRef(null),i=Qt(n),u=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),q(()=>{i().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(B.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{u()})})}),Pm="SelectSeparator",Im=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(B.div,{"aria-hidden":!0,...o,ref:t})});Im.displayName=Pm;var kn="SelectArrow",Nm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=en(n),s=je(kn,n),a=ke(kn,n);return s.open&&a.position==="popper"?l.jsx(Ms,{...r,...o,ref:t}):null});Nm.displayName=kn;var Am="SelectBubbleInput",Yi=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=H(o,r),a=cm(t);return c.useEffect(()=>{const i=r.current;if(!i)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&m){const p=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(p)}},[a,t]),l.jsx(B.select,{...n,style:{...$r,...n.style},ref:s,defaultValue:t})});Yi.displayName=Am;function Xi(e){return e===""||e===void 0}function qi(e){const t=ne(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(a=>{const i=n.current+a;t(i),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Zi(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Om(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Om(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Dm=Mi,jm=Ii,km=Ai,Lm=Oi,Fm=Di,zm=ji,Bm=zi,qo=Vi,Zo=Hi,Jo=Ki;const $m="uzi-select-module__wrapper__7szq0",Wm="uzi-select-module__wrapperFullWidth__IyOIG",Vm="uzi-select-module__trigger__ldh8w",Hm="uzi-select-module__value__FTUJh",Um="uzi-select-module__chevron__U6HXS",Km="uzi-select-module__content__pOWWy",Gm="uzi-select-module__viewport__VGZM6",Ym="uzi-select-module__item__6uM6-",Xm="uzi-select-module__indicator__ZHcg5",qm="uzi-select-module__indicatorIcon__kOV2G",ae={wrapper:$m,wrapperFullWidth:Wm,trigger:Vm,value:Hm,chevron:Um,content:Km,viewport:Gm,item:Ym,indicator:Xm,indicatorIcon:qm},Qo="__uzi_select_empty__",go=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r=!1,fullWidth:s=!0,className:a,id:i,name:u,disabled:d,required:m,autoComplete:p,form:g,title:v,"aria-label":w,"aria-labelledby":f,onBlur:h,onFocus:_},x)=>l.jsx("div",{className:L(ae.wrapper,s&&ae.wrapperFullWidth,a),children:l.jsxs(Dm,{value:t,onValueChange:y=>n(y===Qo?"":y),name:u,disabled:d,required:m,autoComplete:p,form:g,children:[l.jsxs(jm,{ref:x,id:i,className:ae.trigger,title:v,"aria-label":w,"aria-labelledby":f,onBlur:h,onFocus:_,children:[l.jsx(km,{className:ae.value,placeholder:o}),l.jsx(Lm,{className:ae.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l.jsx(Fm,{children:l.jsx(zm,{className:ae.content,position:"popper",sideOffset:4,align:"start",children:l.jsxs(Bm,{className:ae.viewport,children:[o&&r?l.jsxs(qo,{value:Qo,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Jo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(Zo,{children:o})]}):null,e.map(y=>l.jsxs(qo,{value:y.value,disabled:y.disabled,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Jo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(Zo,{children:y.label})]},y.value))]})})})]})}));go.displayName="Select";const Ji=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="All",allowClear:r=!0,...s},a)=>l.jsx(go,{ref:a,options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r,fullWidth:!1,...s}));Ji.displayName="Dropdown";const Zm="uzi-dropdown-menu-module__content__n-ElH",Jm="uzi-dropdown-menu-module__item__tBNtW",Qm="uzi-dropdown-menu-module__itemDestructive__oWmKd",eh="uzi-dropdown-menu-module__insetItem__g7ONJ",th="uzi-dropdown-menu-module__indicator__5qwFh",nh="uzi-dropdown-menu-module__indicatorIcon__nhJMw",oh="uzi-dropdown-menu-module__radioDot__GWUVT",rh="uzi-dropdown-menu-module__label__sFnNR",sh="uzi-dropdown-menu-module__separator__PgUob",ih="uzi-dropdown-menu-module__chevron__kxfiF",te={content:Zm,item:Jm,itemDestructive:Qm,insetItem:eh,indicator:th,indicatorIcon:nh,radioDot:oh,label:rh,separator:sh,chevron:ih};function ah(e){return l.jsx(Si,{...e})}function ch(e){return l.jsx(Ci,{...e})}function lh(e){return l.jsx(Lp,{...e})}function uh(e){return l.jsx(mo,{...e})}function dh(e){return l.jsx(Vp,{...e})}function fh(e){return l.jsx(Bp,{...e})}function ph({className:e,sideOffset:t=4,...n}){return l.jsx(mo,{children:l.jsx(Ei,{sideOffset:t,className:L(te.content,e),...n})})}function mh({className:e,inset:t,variant:n="default",...o}){return l.jsx(zp,{"data-inset":t?"true":void 0,className:L(te.item,n==="destructive"&&te.itemDestructive,e),...o})}function hh({className:e,children:t,...n}){return l.jsxs(Ri,{className:L(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(ho,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),t]})}function vh({className:e,children:t,...n}){return l.jsxs($p,{className:L(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(ho,{children:l.jsx("span",{className:te.radioDot})})}),t]})}function gh({className:e,inset:t,...n}){return l.jsx(Fp,{"data-inset":t?"true":void 0,className:L(te.label,e),...n})}function wh({className:e,...t}){return l.jsx(Wp,{className:L(te.separator,e),...t})}function _h({className:e,inset:t,children:n,...o}){return l.jsxs(Hp,{"data-inset":t?"true":void 0,className:L(te.item,e),...o,children:[n,l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.chevron,children:l.jsx("path",{d:"M6 3.5 10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function xh({className:e,...t}){return l.jsx(Up,{className:L(te.content,e),...t})}const yh=["light","dark","system"],bh=["blue","cyan","violet","emerald","amber","rose"],Sh="uzi-theme",Ch="uzi-accent",Eh=Sh,Rh=Ch,Th="data-uzi-theme",Mh="data-uzi-accent",Qi=N.createContext(void 0);function Ph(e){return yh.includes(e)}function Ih(e){return bh.includes(e)}function Nh(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ah({children:e,theme:t,defaultTheme:n="system",accent:o,defaultAccent:r="blue",onThemeChange:s,onAccentChange:a,storageKey:i=Eh,accentStorageKey:u=Rh,disableStorage:d=!1,toastConfig:m}){const[p,g]=N.useState(n),[v,w]=N.useState(r),[f,h]=N.useState("light");N.useEffect(()=>{if(h(Nh()),!d){const M=window.localStorage.getItem(i);Ph(M)&&g(M);const j=window.localStorage.getItem(u);Ih(j)&&w(j)}},[d,i,u]);const _=t!==void 0,x=o!==void 0,y=_?t:p,b=x?o:v,S=y==="system"?f:y;N.useEffect(()=>{if(typeof window>"u")return;const M=window.matchMedia("(prefers-color-scheme: dark)"),j=()=>h(M.matches?"dark":"light");return j(),M.addEventListener("change",j),()=>M.removeEventListener("change",j)},[]),N.useEffect(()=>{if(typeof document>"u")return;const M=document.documentElement;M.setAttribute(Th,S),M.setAttribute(Mh,b),M.style.colorScheme=S,M.classList.toggle("dark",S==="dark")},[b,S]);const E=N.useCallback(M=>{_||g(M),!d&&typeof window<"u"&&window.localStorage.setItem(i,M),s?.(M)},[d,_,s,i]),C=N.useCallback(M=>{x||w(M),!d&&typeof window<"u"&&window.localStorage.setItem(u,M),a?.(M)},[u,d,x,a]),A=N.useCallback(()=>{E(S==="dark"?"light":"dark")},[S,E]),k=N.useMemo(()=>({theme:y,resolvedTheme:S,accent:b,setTheme:E,setAccent:C,toggleTheme:A}),[b,y,S,C,E,A]);return l.jsx(Qi.Provider,{value:k,children:l.jsx(ts,{config:m,children:e})})}function ea(){const e=N.useContext(Qi);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const Oh="uzi-theme-toggle-button-module__withLabel__KqtDj",Dh={withLabel:Oh};function jh(){return l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:l.jsx("path",{d:"M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function kh(){return l.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:[l.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.8"}),l.jsx("path",{d:"M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function ta({showLabel:e=!1,lightLabel:t="Light mode",darkLabel:n="Dark mode",className:o,onClick:r,...s}){const{resolvedTheme:a,toggleTheme:i}=ea(),u=a==="dark"?t:n;return l.jsxs(ir,{type:"button",variant:"ghost",size:e?"sm":"icon",className:L(e&&Dh.withLabel,o),"aria-label":`Switch to ${u.toLowerCase()}`,title:`Switch to ${u.toLowerCase()}`,onClick:d=>{r?.(d),d.defaultPrevented||i()},...s,children:[a==="dark"?l.jsx(kh,{}):l.jsx(jh,{}),e&&l.jsx("span",{children:u})]})}const Lh="uzi-top-bar-module__topBar__MJ-7S",Fh="uzi-top-bar-module__topBarStatic__JvEwt",zh="uzi-top-bar-module__topBarInner__PBbi8",Bh="uzi-top-bar-module__topBarStart__DrdN2",$h="uzi-top-bar-module__topBarBrand__80VV3",Wh="uzi-top-bar-module__topBarBrandContent__O4Uto",Vh="uzi-top-bar-module__topBarCenter__Kwxg-",Hh="uzi-top-bar-module__topBarCenterGroup__7Ishp",Uh="uzi-top-bar-module__topBarActions__mgMd8",me={topBar:Lh,topBarStatic:Fh,topBarInner:zh,topBarStart:Bh,topBarBrand:$h,topBarBrandContent:Wh,topBarCenter:Vh,topBarCenterGroup:Hh,topBarActions:Uh};function na({leading:e,brand:t,brandHref:n,brandingLocation:o="left",start:r,center:s,actions:a,showThemeToggle:i=!1,themeToggleProps:u,className:d,innerClassName:m,isSticky:p,sticky:g=!0,children:v,...w}){const f=p??g,h=t?n?l.jsx("a",{href:n,className:me.topBarBrand,children:l.jsx("span",{className:me.topBarBrandContent,children:t})}):l.jsx("div",{className:me.topBarBrand,children:l.jsx("span",{className:me.topBarBrandContent,children:t})}):null;return l.jsx("header",{className:L(me.topBar,!f&&me.topBarStatic,d),...w,children:l.jsxs("div",{className:L(me.topBarInner,m),children:[l.jsxs("div",{className:me.topBarStart,children:[e,o==="left"&&h,r]}),h&&o==="center"||s||v?l.jsx("div",{className:me.topBarCenter,children:l.jsxs("div",{className:me.topBarCenterGroup,children:[o==="center"&&h,s??v]})}):null,l.jsxs("div",{className:me.topBarActions,children:[i&&l.jsx(ta,{...u}),a]})]})})}const Kh="uzi-app-shell-module__appShell__S0cVI",Gh="uzi-app-shell-module__appShellAnimated__-CRIl",Yh="uzi-app-shell-module__appShellOpen__1rZUl",Xh="uzi-app-shell-module__appShellCollapsed__fSasN",qh="uzi-app-shell-module__appShellTopbar__rgXsW",Zh="uzi-app-shell-module__appShellHamburger__BciFA",Jh="uzi-app-shell-module__appShellSidebar__oY7uj",Qh="uzi-app-shell-module__appShellMain__eHP2r",ev="uzi-app-shell-module__appShellBackdrop__y31xs",tv="uzi-app-shell-module__appShellSidebarOpen__Z5AIo",xe={appShell:Kh,appShellAnimated:Gh,appShellOpen:Yh,appShellCollapsed:Xh,appShellTopbar:qh,appShellHamburger:Zh,appShellSidebar:Jh,appShellMain:Qh,appShellBackdrop:ev,appShellSidebarOpen:tv},nv=960;function er(){return typeof window>"u"?!1:window.innerWidth>=nv}function ov({children:e,sidebar:t,brand:n,brandHref:o,topbarStart:r,topbarEnd:s,showThemeToggle:a=!1,themeToggleProps:i,topBarBrandingLocation:u="left",className:d,sidebarClassName:m,topbarClassName:p,mainClassName:g,sidebarWidth:v,closeSidebarOnChangeKey:w,hamburgerLabel:f="Toggle navigation",onSidebarToggle:h}){const[_,x]=N.useState(!1),[y,b]=N.useState(!1),[S,E]=N.useState(!1),C=N.useRef(!1),A=N.useRef(w),k=N.useRef(null),M=N.useRef(null),j=N.useRef(null),F=N.useId();N.useEffect(()=>{const P=er();x(P),b(P),C.current=P;const R=window.requestAnimationFrame(()=>{E(!0)}),V=()=>{const G=er();x(G),G!==C.current&&(b(G),C.current=G)};return window.addEventListener("resize",V),()=>{window.cancelAnimationFrame(R),window.removeEventListener("resize",V)}},[]),N.useEffect(()=>{if(_||!y)return;const P=j.current,R=()=>b(!1),V=Q=>{const Z=Q.target;Z&&(k.current?.contains(Z)||M.current?.contains(Z)||R())},G=window.setTimeout(()=>{document.addEventListener("pointerdown",V),window.addEventListener("scroll",R,{passive:!0}),P?.addEventListener("scroll",R,{passive:!0}),document.addEventListener("touchmove",R,{passive:!0})},10);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",V),window.removeEventListener("scroll",R),P?.removeEventListener("scroll",R),document.removeEventListener("touchmove",R)}},[y,_]),N.useEffect(()=>{!_&&A.current!==w&&b(!1),A.current=w},[w,_]),N.useEffect(()=>{h?.(y)},[y,h]);const W=()=>b(P=>!P),T=v===void 0?void 0:typeof v=="number"?`${v}px`:v,$=T?{"--app-shell-sidebar-width":T}:void 0,D=L(xe.appShell,S&&xe.appShellAnimated,y?xe.appShellOpen:xe.appShellCollapsed,d),z=L(xe.appShellSidebar,y&&xe.appShellSidebarOpen,m);return l.jsxs("div",{className:D,style:$,"data-app-shell":!0,"data-desktop":_?"true":"false","data-sidebar-open":y?"true":"false",children:[l.jsx(na,{className:L(xe.appShellTopbar,p),leading:l.jsx("button",{ref:M,type:"button",className:xe.appShellHamburger,onClick:W,"aria-label":f,"aria-expanded":y,"aria-controls":F,children:l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:l.jsx("path",{d:"M3 6h18M3 12h18M3 18h18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})})}),brand:n,brandHref:o,brandingLocation:u,start:r,actions:s,showThemeToggle:a,themeToggleProps:i}),!_&&y&&l.jsx("div",{className:xe.appShellBackdrop,onClick:()=>b(!1),onTouchStart:()=>b(!1),"aria-hidden":"true"}),l.jsx("aside",{ref:k,id:F,className:z,"aria-label":"Sidebar navigation",children:t}),l.jsx("main",{ref:j,className:L(xe.appShellMain,g),children:e})]})}const rv="uzi-sidebar-nav-module__sidebarNav__eUI5c",sv="uzi-sidebar-nav-module__sidebarNavCollapsed__xTM9s",iv="uzi-sidebar-nav-module__header__Y4NLy",av="uzi-sidebar-nav-module__footer__GjWky",cv="uzi-sidebar-nav-module__sections__mXuGQ",lv="uzi-sidebar-nav-module__section__yjtCY",uv="uzi-sidebar-nav-module__sectionItems__tNcph",dv="uzi-sidebar-nav-module__sectionLabel__Wx94m",fv="uzi-sidebar-nav-module__item__uMHkJ",pv="uzi-sidebar-nav-module__itemActive__wBbiS",mv="uzi-sidebar-nav-module__itemCollapsed__jLJN-",hv="uzi-sidebar-nav-module__itemDisabled__Yf8Il",vv="uzi-sidebar-nav-module__icon__tyrUg",gv="uzi-sidebar-nav-module__itemBody__wI0iy",wv="uzi-sidebar-nav-module__labelRow__D8sEJ",_v="uzi-sidebar-nav-module__label__A-nt6",xv="uzi-sidebar-nav-module__description__Xf3Si",yv="uzi-sidebar-nav-module__badge__-hnFd",J={sidebarNav:rv,sidebarNavCollapsed:sv,header:iv,footer:av,sections:cv,section:lv,sectionItems:uv,sectionLabel:dv,item:fv,itemActive:pv,itemCollapsed:mv,itemDisabled:hv,icon:vv,itemBody:gv,labelRow:wv,label:_v,description:xv,badge:yv},bv=(e,t)=>e.active!==void 0?e.active:!e.href||!t?!1:e.href==="/"?t==="/":t.startsWith(e.href);function Sv({items:e=[],sections:t,currentPath:n,getIsActive:o=bv,onItemClick:r,header:s,footer:a,ariaLabel:i="Sidebar navigation",collapsed:u=!1,iconSize:d,className:m,itemClassName:p,sectionClassName:g}){const v=t?.length?t:[{id:"default",items:e}],w=d!==void 0?{"--sidebar-nav-icon-size":typeof d=="number"?`${d}px`:d}:void 0;return l.jsxs("nav",{className:L(J.sidebarNav,u&&J.sidebarNavCollapsed,m),"aria-label":i,style:w,children:[s?l.jsx("div",{className:J.header,children:s}):null,l.jsx("div",{className:J.sections,children:v.map((f,h)=>l.jsxs("div",{className:L(J.section,g),children:[f.label&&!u?l.jsx("div",{className:J.sectionLabel,children:f.label}):null,l.jsx("div",{className:J.sectionItems,children:f.items.map((_,x)=>l.jsx(Cv,{item:_,active:o(_,n),collapsed:u,itemClassName:p,onItemClick:r},`${f.id??h}-${_.href??_.title??x}`))})]},f.id??`section-${h}`))}),a?l.jsx("div",{className:J.footer,children:a}):null]})}function Cv({item:e,active:t,collapsed:n,itemClassName:o,onItemClick:r}){const s=e.rel??(e.target==="_blank"?"noreferrer":void 0),a=e.title??(typeof e.label=="string"?e.label:void 0),i=L(J.item,t&&J.itemActive,n&&J.itemCollapsed,e.disabled&&J.itemDisabled,o),u=l.jsxs(l.Fragment,{children:[e.icon&&l.jsx("span",{className:J.icon,children:e.icon}),n?null:l.jsxs("span",{className:J.itemBody,children:[l.jsxs("span",{className:J.labelRow,children:[l.jsx("span",{className:J.label,children:e.label}),e.badge&&l.jsx("span",{className:J.badge,children:e.badge})]}),e.description?l.jsx("span",{className:J.description,children:e.description}):null]})]}),d=()=>{e.disabled||(e.onClick?.(),r?.(e))};return e.href?e.disabled?l.jsx("div",{className:i,"aria-current":t?"page":void 0,"aria-disabled":"true",title:n?a:void 0,children:u}):l.jsx("a",{className:i,href:e.href,target:e.target,rel:s,"aria-current":t?"page":void 0,title:n?a:void 0,onClick:d,children:u}):l.jsx("button",{type:"button",className:i,"aria-current":t?"page":void 0,"aria-disabled":e.disabled?"true":void 0,disabled:e.disabled,title:n?a:void 0,onClick:d,children:u})}const Ev="uzi-skeleton-module__skeleton__fula5",tr={skeleton:Ev,"skeleton-pulse":"uzi-skeleton-module__skeleton-pulse__Yp45W","radius-sm":"uzi-skeleton-module__radius-sm__FdccD","radius-md":"uzi-skeleton-module__radius-md__zH3RE","radius-lg":"uzi-skeleton-module__radius-lg__YVrHw","radius-full":"uzi-skeleton-module__radius-full__5o2m0"};function Rv({width:e,height:t,radius:n="md",className:o,style:r,...s}){return l.jsx("div",{className:L(tr.skeleton,tr[`radius-${n}`],o),style:{width:e,height:t,...r},"aria-hidden":"true",...s})}const Tv="uzi-progress-module__track__gM0oV",Mv="uzi-progress-module__fill__aLAbp",xn={track:Tv,fill:Mv,"tone-default":"uzi-progress-module__tone-default__fhf7o","tone-success":"uzi-progress-module__tone-success__FsGHD","tone-warning":"uzi-progress-module__tone-warning__UAttL","tone-danger":"uzi-progress-module__tone-danger__-L-Ee"};function Pv({value:e,tone:t="default",className:n,"aria-label":o,...r}){const s=Math.max(0,Math.min(100,e));return l.jsx("div",{className:L(xn.track,n),role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,...r,children:l.jsx("div",{className:L(xn.fill,xn[`tone-${t}`]),style:{width:`${s}%`}})})}const Iv="uzi-segmented-toggle-module__track__M4fjm",Nv="uzi-segmented-toggle-module__option__7cEZJ",Av="uzi-segmented-toggle-module__label__bDAIv",yn={track:Iv,option:Nv,label:Av};function Ov({options:e,value:t,onChange:n,"aria-label":o,"aria-labelledby":r,className:s}){const a=c.useRef([]),i=e.findIndex(f=>f.value===t),u=e.findIndex(f=>!f.disabled);let d=-1;for(let f=e.length-1;f>=0;f-=1)if(!e[f]?.disabled){d=f;break}const m=i>=0&&!e[i]?.disabled?i:u,p=f=>{a.current[f]?.focus()},g=(f,h)=>{if(e.length===0)return-1;let _=f;for(let x=0;x<e.length;x+=1)if(_=(_+h+e.length)%e.length,!e[_]?.disabled)return _;return f},v=f=>{const h=e[f];!h||h.disabled||h.value===t||n(h.value)},w=(f,h)=>{switch(f.key){case"ArrowRight":case"ArrowDown":{f.preventDefault();const _=g(h,1);p(_),v(_);break}case"ArrowLeft":case"ArrowUp":{f.preventDefault();const _=g(h,-1);p(_),v(_);break}case"Home":{f.preventDefault(),p(u),u>=0&&v(u);break}case"End":{f.preventDefault(),d>=0&&(p(d),v(d));break}}};return l.jsx("div",{className:L(yn.track,s),role:"radiogroup","aria-label":o,"aria-labelledby":r,children:e.map((f,h)=>l.jsx("button",{ref:_=>{a.current[h]=_},type:"button",role:"radio","aria-checked":f.value===t,disabled:f.disabled,tabIndex:f.disabled?-1:h===m?0:-1,onClick:()=>{f.value!==t&&n(f.value)},onKeyDown:_=>w(_,h),className:L(yn.option),children:l.jsx("span",{className:yn.label,children:f.label})},f.value))})}exports.Alert=eu;exports.AppShell=ov;exports.Avatar=Wa;exports.AvatarFallback=Ha;exports.AvatarImage=Va;exports.Button=ir;exports.Card=Ga;exports.Checkbox=rs;exports.Dropdown=Ji;exports.DropdownMenu=ah;exports.DropdownMenuCheckboxItem=hh;exports.DropdownMenuContent=ph;exports.DropdownMenuGroup=lh;exports.DropdownMenuItem=mh;exports.DropdownMenuLabel=gh;exports.DropdownMenuPortal=uh;exports.DropdownMenuRadioGroup=fh;exports.DropdownMenuRadioItem=vh;exports.DropdownMenuSeparator=wh;exports.DropdownMenuSub=dh;exports.DropdownMenuSubContent=xh;exports.DropdownMenuSubTrigger=_h;exports.DropdownMenuTrigger=ch;exports.Input=ns;exports.Label=os;exports.Modal=Yl;exports.ModalOverlay=Br;exports.MultiSelect=Ti;exports.Pill=Za;exports.Progress=Pv;exports.SegmentedToggle=Ov;exports.Select=go;exports.SidebarNav=Sv;exports.Skeleton=Rv;exports.ThemeProvider=Ah;exports.ThemeToggleButton=ta;exports.ToastProvider=ts;exports.TopBar=na;exports.cx=L;exports.useTheme=ea;exports.useToast=Yu;
46
46
  //# sourceMappingURL=index.cjs.map