@bookers/ui 0.2.0 → 0.4.0
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/README.md +21 -0
- package/dist/index.d.ts +204 -14
- package/dist/index.js +9411 -7978
- package/dist/index.umd.cjs +78 -37
- package/dist/styles.css +1 -1
- package/package.json +18 -13
package/dist/index.umd.cjs
CHANGED
|
@@ -1,89 +1,139 @@
|
|
|
1
|
-
(function(k,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(k=typeof globalThis<"u"?globalThis:k||self,p(k.BookersUi={},k.jsxRuntime,k.React,k.ReactDOM))})(this,(function(k,p,S,no){"use strict";function Ds(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Ds(S),er=Ds(no);function Ap(e,t){const n=u.createContext(t),r=a=>{const{children:s,...i}=a,l=u.useMemo(()=>i,Object.values(i));return p.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Fe(e,t=[]){let n=[];function r(a,s){const i=u.createContext(s),l=n.length;n=[...n,s];const c=d=>{var y;const{scope:h,children:m,...w}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[l])||i,v=u.useMemo(()=>w,Object.values(w));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=a+"Provider";function f(d,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||i,w=u.useContext(m);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,f]}const o=()=>{const a=n.map(s=>u.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,Ip(o,...t)]}function Ip(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...i,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ts(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ts(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ts(e[o],null)}}}}function ce(...e){return u.useCallback(Qe(...e),e)}function Pt(e){const t=Wp(e),n=u.forwardRef((r,o)=>{const{children:a,...s}=r,i=u.Children.toArray(a),l=i.find($p);if(l){const c=l.props.children,f=i.map(d=>d===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,f):null})}return p.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Wp(e){const t=u.forwardRef((n,r)=>{const{children:o,...a}=n;if(u.isValidElement(o)){const s=Lp(o),i=Bp(a,o.props);return o.type!==u.Fragment&&(i.ref=r?Qe(r,s):s),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ps=Symbol("radix.slottable");function Fp(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ps,t}function $p(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ps}function Bp(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Lp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function tr(e){const t=e+"CollectionProvider",[n,r]=Fe(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:y}=g,b=S.useRef(null),x=S.useRef(new Map).current;return p.jsx(o,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",l=Pt(i),c=S.forwardRef((g,v)=>{const{scope:y,children:b}=g,x=a(i,y),N=ce(v,x.collectionRef);return p.jsx(l,{ref:N,children:b})});c.displayName=i;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=Pt(f),m=S.forwardRef((g,v)=>{const{scope:y,children:b,...x}=g,N=S.useRef(null),M=ce(v,N),C=a(f,y);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),p.jsx(h,{[d]:"",ref:M,children:b})});m.displayName=f;function w(g){const v=a(e+"CollectionConsumer",g);return S.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,E)=>x.indexOf(C.ref.current)-x.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},w,r]}function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var we=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Rp=u[" useInsertionEffect ".trim().toString()]||we;function $e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Yp({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const d=f.current;d!==i&&console.warn(`${r} is changing from ${d?"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.`),f.current=i},[i,r])}const c=u.useCallback(f=>{var d;if(i){const h=zp(f)?f(e):f;h!==e&&((d=s.current)==null||d.call(s,h))}else a(f)},[i,e,a,s]);return[l,c]}function Yp({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),a=u.useRef(t);return Rp(()=>{a.current=t},[t]),u.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function zp(e){return typeof e=="function"}var Vp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Z=Vp.reduce((e,t)=>{const n=Pt(`Primitive.${t}`),r=u.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Os(e,t){e&&er.flushSync(()=>e.dispatchEvent(t))}function Hp(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Te=e=>{const{present:t,children:n}=e,r=Gp(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),a=ce(r.ref,jp(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:a}):null};Te.displayName="Presence";function Gp(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),a=u.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Hp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=nr(r.current);a.current=i==="mounted"?c:"none"},[i]),we(()=>{const c=r.current,f=o.current;if(f!==e){const h=a.current,m=nr(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),we(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,d=m=>{const g=nr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=nr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function nr(e){return(e==null?void 0:e.animationName)||"none"}function jp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Up=u[" useId ".trim().toString()]||(()=>{}),Kp=0;function me(e){const[t,n]=u.useState(Up());return we(()=>{n(r=>r??String(Kp++))},[e]),t?`radix-${t}`:""}var rr="Collapsible",[qp,_s]=Fe(rr),[Xp,ro]=qp(rr),As=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,c]=$e({prop:r,defaultProp:o??!1,onChange:s,caller:rr});return p.jsx(Xp,{scope:n,disabled:a,contentId:me(),open:l,onOpenToggle:u.useCallback(()=>c(f=>!f),[c]),children:p.jsx(Z.div,{"data-state":ao(l),"data-disabled":a?"":void 0,...i,ref:t})})});As.displayName=rr;var Is="CollapsibleTrigger",Ws=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ro(Is,n);return p.jsx(Z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ao(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:L(e.onClick,o.onOpenToggle)})});Ws.displayName=Is;var oo="CollapsibleContent",Fs=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ro(oo,e.__scopeCollapsible);return p.jsx(Te,{present:n||o.open,children:({present:a})=>p.jsx(Zp,{...r,ref:t,present:a})})});Fs.displayName=oo;var Zp=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=ro(oo,n),[i,l]=u.useState(r),c=u.useRef(null),f=ce(t,c),d=u.useRef(0),h=d.current,m=u.useRef(0),w=m.current,g=s.open||i,v=u.useRef(g),y=u.useRef(void 0);return u.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),we(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();d.current=x.height,m.current=x.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),l(r)}},[s.open,r]),p.jsx(Z.div,{"data-state":ao(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:g&&o})});function ao(e){return e?"open":"closed"}var Qp=As,Jp=Ws,eh=Fs,th=u.createContext(void 0);function bn(e){const t=u.useContext(th);return e||t||"ltr"}var Ye="Accordion",nh=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[so,rh,oh]=tr(Ye),[or]=Fe(Ye,[oh,_s]),io=_s(),$s=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return p.jsx(so.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?p.jsx(lh,{...a,ref:t}):p.jsx(ih,{...o,ref:t})})});$s.displayName=Ye;var[Bs,ah]=or(Ye),[Ls,sh]=or(Ye,{collapsible:!1}),ih=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,l]=$e({prop:n,defaultProp:r??"",onChange:o,caller:Ye});return p.jsx(Bs,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:p.jsx(Ls,{scope:e.__scopeAccordion,collapsible:a,children:p.jsx(Rs,{...s,ref:t})})})}),lh=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=$e({prop:n,defaultProp:r??[],onChange:o,caller:Ye}),l=S.useCallback(f=>i((d=[])=>[...d,f]),[i]),c=S.useCallback(f=>i((d=[])=>d.filter(h=>h!==f)),[i]);return p.jsx(Bs,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:c,children:p.jsx(Ls,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(Rs,{...a,ref:t})})})}),[ch,ar]=or(Ye),Rs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=ce(i,t),c=rh(n),d=bn(o)==="ltr",h=L(e.onKeyDown,m=>{var T;if(!nh.includes(m.key))return;const w=m.target,g=c().filter(R=>{var F;return!((F=R.ref.current)!=null&&F.disabled)}),v=g.findIndex(R=>R.ref.current===w),y=g.length;if(v===-1)return;m.preventDefault();let b=v;const x=0,N=y-1,M=()=>{b=v+1,b>N&&(b=x)},C=()=>{b=v-1,b<x&&(b=N)};switch(m.key){case"Home":b=x;break;case"End":b=N;break;case"ArrowRight":a==="horizontal"&&(d?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(d?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const E=b%y;(T=g[E].ref.current)==null||T.focus()});return p.jsx(ch,{scope:n,disabled:r,direction:o,orientation:a,children:p.jsx(so.Slot,{scope:n,children:p.jsx(Z.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),sr="AccordionItem",[dh,lo]=or(sr),Ys=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=ar(sr,n),s=ah(sr,n),i=io(n),l=me(),c=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return p.jsx(dh,{scope:n,open:c,disabled:f,triggerId:l,children:p.jsx(Qp,{"data-orientation":a.orientation,"data-state":Us(c),...i,...o,ref:t,disabled:f,open:c,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});Ys.displayName=sr;var zs="AccordionHeader",Vs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ar(Ye,n),a=lo(zs,n);return p.jsx(Z.h3,{"data-orientation":o.orientation,"data-state":Us(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Vs.displayName=zs;var co="AccordionTrigger",Hs=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ar(Ye,n),a=lo(co,n),s=sh(co,n),i=io(n);return p.jsx(so.ItemSlot,{scope:n,children:p.jsx(Jp,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Hs.displayName=co;var Gs="AccordionContent",js=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ar(Ye,n),a=lo(Gs,n),s=io(n);return p.jsx(eh,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});js.displayName=Gs;function Us(e){return e?"open":"closed"}var uh=$s,fh=Ys,ph=Vs,hh=Hs,mh=js;/**
|
|
1
|
+
(function(E,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("@tanstack/react-table"),require("@tanstack/react-virtual")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","@tanstack/react-table","@tanstack/react-virtual"],d):(E=typeof globalThis<"u"?globalThis:E||self,d(E.BookersUi={},E.jsxRuntime,E.React,E.ReactDOM,E.ReactTable,E.ReactVirtual))})(this,(function(E,d,S,Qo,He,Bh){"use strict";function Oi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Oi(S),Vr=Oi(Qo);function zh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ze(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var y;const{scope:h,children:g,...w}=c,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||i,v=f.useMemo(()=>w,Object.values(w));return d.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function p(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,w=f.useContext(g);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,Lh(o,...t)]}function Lh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function _i(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=_i(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():_i(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function Qt(e){const t=Hh(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Yh);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Hh(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=jh(o),i=Gh(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ai=Symbol("radix.slottable");function Vh(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ai,t}function Yh(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ai}function Gh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yr(e){const t=e+"CollectionProvider",[n,r]=Ze(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,b=S.useRef(null),x=S.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",l=Qt(i),u=S.forwardRef((m,v)=>{const{scope:y,children:b}=m,x=a(i,y),N=he(v,x.collectionRef);return d.jsx(l,{ref:N,children:b})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=Qt(p),g=S.forwardRef((m,v)=>{const{scope:y,children:b,...x}=m,N=S.useRef(null),M=he(v,N),C=a(p,y);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),d.jsx(h,{[c]:"",ref:M,children:b})});g.displayName=p;function w(m){const v=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,k)=>x.indexOf(C.ref.current)-x.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},w,r]}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Pe=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Rh=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Uh({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${r} is changing from ${c?"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.`),p.current=i},[i,r])}const u=f.useCallback(p=>{var c;if(i){const h=Kh(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function Uh({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return Rh(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Kh(e){return typeof e=="function"}var qh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=qh.reduce((e,t)=>{const n=Qt(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ii(e,t){e&&Vr.flushSync(()=>e.dispatchEvent(t))}function Xh(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=Zh(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,Qh(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Be.displayName="Presence";function Zh(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Xh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Gr(r.current);a.current=i==="mounted"?u:"none"},[i]),Pe(()=>{const u=r.current,p=o.current;if(p!==e){const h=a.current,g=Gr(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=g=>{const m=Gr(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Gr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Gr(e){return(e==null?void 0:e.animationName)||"none"}function Qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jh=f[" useId ".trim().toString()]||(()=>{}),eg=0;function we(e){const[t,n]=f.useState(Jh());return Pe(()=>{n(r=>r??String(eg++))},[e]),t?`radix-${t}`:""}var jr="Collapsible",[tg,Fi]=Ze(jr),[ng,Jo]=tg(jr),Wi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:jr});return d.jsx(ng,{scope:n,disabled:a,contentId:we(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(ne.div,{"data-state":ta(l),"data-disabled":a?"":void 0,...i,ref:t})})});Wi.displayName=jr;var $i="CollapsibleTrigger",Bi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Jo($i,n);return d.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ta(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Bi.displayName=$i;var ea="CollapsibleContent",zi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Jo(ea,e.__scopeCollapsible);return d.jsx(Be,{present:n||o.open,children:({present:a})=>d.jsx(rg,{...r,ref:t,present:a})})});zi.displayName=ea;var rg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Jo(ea,n),[i,l]=f.useState(r),u=f.useRef(null),p=he(t,u),c=f.useRef(0),h=c.current,g=f.useRef(0),w=g.current,m=s.open||i,v=f.useRef(m),y=f.useRef(void 0);return f.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),Pe(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();c.current=x.height,g.current=x.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),l(r)}},[s.open,r]),d.jsx(ne.div,{"data-state":ta(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&o})});function ta(e){return e?"open":"closed"}var og=Wi,ag=Bi,sg=zi,ig=f.createContext(void 0);function Jn(e){const t=f.useContext(ig);return e||t||"ltr"}var rt="Accordion",lg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[na,cg,dg]=Yr(rt),[Rr]=Ze(rt,[dg,Fi]),ra=Fi(),Li=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return d.jsx(na.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?d.jsx(hg,{...a,ref:t}):d.jsx(pg,{...o,ref:t})})});Li.displayName=rt;var[Hi,ug]=Rr(rt),[Vi,fg]=Rr(rt,{collapsible:!1}),pg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,l]=Qe({prop:n,defaultProp:r??"",onChange:o,caller:rt});return d.jsx(Hi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:d.jsx(Vi,{scope:e.__scopeAccordion,collapsible:a,children:d.jsx(Yi,{...s,ref:t})})})}),hg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Qe({prop:n,defaultProp:r??[],onChange:o,caller:rt}),l=S.useCallback(p=>i((c=[])=>[...c,p]),[i]),u=S.useCallback(p=>i((c=[])=>c.filter(h=>h!==p)),[i]);return d.jsx(Hi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d.jsx(Vi,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(Yi,{...a,ref:t})})})}),[gg,Ur]=Rr(rt),Yi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=he(i,t),u=cg(n),c=Jn(o)==="ltr",h=j(e.onKeyDown,g=>{var O;if(!lg.includes(g.key))return;const w=g.target,m=u().filter(V=>{var $;return!(($=V.ref.current)!=null&&$.disabled)}),v=m.findIndex(V=>V.ref.current===w),y=m.length;if(v===-1)return;g.preventDefault();let b=v;const x=0,N=y-1,M=()=>{b=v+1,b>N&&(b=x)},C=()=>{b=v-1,b<x&&(b=N)};switch(g.key){case"Home":b=x;break;case"End":b=N;break;case"ArrowRight":a==="horizontal"&&(c?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(c?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const k=b%y;(O=m[k].ref.current)==null||O.focus()});return d.jsx(gg,{scope:n,disabled:r,direction:o,orientation:a,children:d.jsx(na.Slot,{scope:n,children:d.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Kr="AccordionItem",[mg,oa]=Rr(Kr),Gi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Ur(Kr,n),s=ug(Kr,n),i=ra(n),l=we(),u=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return d.jsx(mg,{scope:n,open:u,disabled:p,triggerId:l,children:d.jsx(og,{"data-orientation":a.orientation,"data-state":Xi(u),...i,...o,ref:t,disabled:p,open:u,onOpenChange:c=>{c?s.onItemOpen(r):s.onItemClose(r)}})})});Gi.displayName=Kr;var ji="AccordionHeader",Ri=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(ji,n);return d.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Xi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ri.displayName=ji;var aa="AccordionTrigger",Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(aa,n),s=fg(aa,n),i=ra(n);return d.jsx(na.ItemSlot,{scope:n,children:d.jsx(ag,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Ui.displayName=aa;var Ki="AccordionContent",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(Ki,n),s=ra(n);return d.jsx(sg,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});qi.displayName=Ki;function Xi(e){return e?"open":"closed"}var vg=Li,bg=Gi,yg=Ri,wg=Ui,xg=qi;/**
|
|
2
2
|
* @license lucide-react v0.475.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const Cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
7
7
|
* @license lucide-react v0.475.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var Sg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
12
|
* @license lucide-react v0.475.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const Ng=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>S.createElement("svg",{ref:l,...Sg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zi("lucide",o),...i},[...s.map(([u,p])=>S.createElement(u,p)),...Array.isArray(a)?a:[a]]));/**
|
|
17
17
|
* @license lucide-react v0.475.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(Ng,{ref:a,iconNode:t,className:Zi(`lucide-${Cg(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
22
22
|
* @license lucide-react v0.475.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const Mg=xe("ArrowDownNarrowWide",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]]);/**
|
|
27
27
|
* @license lucide-react v0.475.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const kg=xe("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
|
|
32
32
|
* @license lucide-react v0.475.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const Eg=xe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
37
37
|
* @license lucide-react v0.475.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const er=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
42
42
|
* @license lucide-react v0.475.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const Jt=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
47
47
|
* @license lucide-react v0.475.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const Qi=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
52
52
|
* @license lucide-react v0.475.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const vn=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
57
57
|
* @license lucide-react v0.475.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const sa=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
62
62
|
* @license lucide-react v0.475.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Dg=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
67
67
|
* @license lucide-react v0.475.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const Tg=xe("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
72
72
|
* @license lucide-react v0.475.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const Pg=xe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
|
77
77
|
* @license lucide-react v0.475.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Nh=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Qs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Qs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Js(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qs(e))&&(r&&(r+=" "),r+=t);return r}const ei=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ti=Js,be=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ti(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(c=>{const f=n==null?void 0:n[c],d=a==null?void 0:a[c];if(f===null)return null;const h=ei(f)||ei(d);return o[c][h]}),i=n&&Object.entries(n).reduce((c,f)=>{let[d,h]=f;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:d,className:h,...m}=f;return Object.entries(m).every(w=>{let[g,v]=w;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...c,d,h]:c},[]);return ti(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},fo="-",Mh=e=>{const t=kh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(fo);return i[0]===""&&i.length!==1&&i.shift(),ni(i,t)||Eh(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},ni=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ni(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(fo);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},ri=/^\[(.+)\]$/,Eh=e=>{if(ri.test(e)){const t=ri.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kh=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Th(Object.entries(e.classGroups),n).forEach(([a,s])=>{po(s,r,a,t)}),r},po=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:oi(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Dh(o)){po(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{po(s,oi(t,a),n,r)})})},oi=(e,t)=>{let n=e;return t.split(fo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Dh=e=>e.isThemeGetter,Th=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,Ph=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},ai="!",Oh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let c=0,f=0,d;for(let v=0;v<i.length;v++){let y=i[v];if(c===0){if(y===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(f,v)),f=v+a;continue}if(y==="/"){d=v;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?i:i.substring(f),m=h.startsWith(ai),w=m?h.substring(1):h,g=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:w,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},_h=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Ah=e=>({cache:Ph(e.cacheSize),parseClassName:Oh(e),...Mh(e)}),Ih=/\s+/,Wh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Ih);let i="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(c);let w=!!m,g=r(w?h.substring(0,m):h);if(!g){if(!w){i=c+(i.length>0?" "+i:i);continue}if(g=r(h),!g){i=c+(i.length>0?" "+i:i);continue}w=!1}const v=_h(f).join(":"),y=d?v+ai:v,b=y+g;if(a.includes(b))continue;a.push(b);const x=o(g,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(y+M)}i=c+(i.length>0?" "+i:i)}return i};function Fh(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=si(t))&&(r&&(r+=" "),r+=n);return r}const si=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=si(e[r]))&&(n&&(n+=" "),n+=t);return n};function $h(e,...t){let n,r,o,a=s;function s(l){const c=t.reduce((f,d)=>d(f),e());return n=Ah(c),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const c=r(l);if(c)return c;const f=Wh(l,n);return o(l,f),f}return function(){return a(Fh.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ii=/^\[(?:([a-z-]+):)?(.+)\]$/i,Bh=/^\d+\/\d+$/,Lh=new Set(["px","full","screen"]),Rh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>Vt(e)||Lh.has(e)||Bh.test(e),gt=e=>Ht(e,"length",Qh),Vt=e=>!!e&&!Number.isNaN(Number(e)),ho=e=>Ht(e,"number",Vt),wn=e=>!!e&&Number.isInteger(Number(e)),Gh=e=>e.endsWith("%")&&Vt(e.slice(0,-1)),ae=e=>ii.test(e),vt=e=>Rh.test(e),jh=new Set(["length","size","percentage"]),Uh=e=>Ht(e,jh,li),Kh=e=>Ht(e,"position",li),qh=new Set(["image","url"]),Xh=e=>Ht(e,qh,em),Zh=e=>Ht(e,"",Jh),xn=()=>!0,Ht=(e,t,n)=>{const r=ii.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Qh=e=>Yh.test(e)&&!zh.test(e),li=()=>!1,Jh=e=>Vh.test(e),em=e=>Hh.test(e),tm=$h(()=>{const e=pe("colors"),t=pe("spacing"),n=pe("blur"),r=pe("brightness"),o=pe("borderColor"),a=pe("borderRadius"),s=pe("borderSpacing"),i=pe("borderWidth"),l=pe("contrast"),c=pe("grayscale"),f=pe("hueRotate"),d=pe("invert"),h=pe("gap"),m=pe("gradientColorStops"),w=pe("gradientColorStopPositions"),g=pe("inset"),v=pe("margin"),y=pe("opacity"),b=pe("padding"),x=pe("saturate"),N=pe("scale"),M=pe("sepia"),C=pe("skew"),E=pe("space"),T=pe("translate"),R=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",ae,t],$=()=>[ae,t],j=()=>["",ct,gt],V=()=>["auto",Vt,ae],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Vt,ae];return{cacheSize:500,separator:":",theme:{colors:[xn],spacing:[ct,gt],blur:["none","",vt,ae],brightness:te(),borderColor:[e],borderRadius:["none","","full",vt,ae],borderSpacing:$(),borderWidth:j(),contrast:te(),grayscale:P(),hueRotate:te(),invert:P(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Gh,gt],inset:H(),margin:H(),opacity:te(),padding:$(),saturate:te(),scale:te(),sepia:P(),skew:te(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[vt]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),ae]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wn,ae]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",wn,ae]}],"grid-cols":[{"grid-cols":[xn]}],"col-start-end":[{col:["auto",{span:["full",wn,ae]},ae]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[xn]}],"row-start-end":[{row:["auto",{span:[wn,ae]},ae]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[vt]},vt]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vt,gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ho]}],"font-family":[{font:[xn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",Vt,ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ct,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ct,gt]}],"underline-offset":[{"underline-offset":["auto",ct,ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),Kh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[ct,ae]}],"outline-w":[{outline:[ct,gt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ct,gt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vt,Zh]}],"shadow-color":[{shadow:[xn]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vt,ae]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[wn,ae]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ct,gt,ho]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function O(...e){return tm(Js(e))}const ci=be(["flex w-full items-center justify-between gap-4 text-left font-medium text-foreground","transition-[color,background-color] duration-150","hover:text-foreground/80","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:opacity-50"],{variants:{size:{sm:"py-2 text-sm",md:"py-3 text-sm",lg:"py-4 text-base"}},defaultVariants:{size:"md"}}),di=be(["overflow-hidden text-foreground","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),ui=be("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),mo=u.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(uh,{ref:r,className:O(ui({variant:t}),e),...n}));mo.displayName="AccordionRoot";const go=u.forwardRef(({className:e,...t},n)=>p.jsx(fh,{ref:n,className:O("border-b border-border last:border-b-0",e),...t}));go.displayName="AccordionItem";const vo=u.forwardRef(({className:e,size:t,children:n,...r},o)=>p.jsx(ph,{className:"flex",children:p.jsxs(hh,{ref:o,className:O("group",ci({size:t}),"px-4",e),...r,children:[n,p.jsx(zt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));vo.displayName="AccordionTrigger";const bo=u.forwardRef(({className:e,size:t,children:n,...r},o)=>p.jsx(mh,{ref:o,className:O(di({size:t}),e),...r,children:p.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));bo.displayName="AccordionContent";const fi=u.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:c,dir:f},d)=>p.jsx(mo,{ref:d,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:c,dir:f,children:e.map(h=>p.jsxs(go,{value:h.value,children:[p.jsx(vo,{size:t,disabled:h.disabled,children:h.trigger}),p.jsx(bo,{size:t,children:h.content})]},h.value))}));fi.displayName="Accordion";const pi=be(["relative w-full rounded-lg border p-4","[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4","[&>svg~*]:pl-7"],{variants:{variant:{default:"bg-background border-border text-foreground [&>svg]:text-foreground",info:"bg-blue-50 border-blue-200 text-blue-900 [&>svg]:text-blue-600",success:"bg-green-50 border-green-200 text-green-900 [&>svg]:text-green-600",warning:"bg-amber-50 border-amber-200 text-amber-900 [&>svg]:text-amber-700",destructive:"bg-destructive/10 border-destructive/30 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),hi=u.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("div",{ref:r,role:"alert",className:O(pi({variant:t}),e),...n}));hi.displayName="Alert";const mi=u.forwardRef(({className:e,...t},n)=>p.jsx("h5",{ref:n,className:O("mb-1 font-medium leading-none tracking-tight text-balance",e),...t}));mi.displayName="AlertTitle";const gi=u.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:O("text-sm leading-relaxed opacity-90 text-pretty",e),...t}));gi.displayName="AlertDescription";var nm=Symbol.for("react.lazy"),ir=u[" use ".trim().toString()];function rm(e){return typeof e=="object"&&e!==null&&"then"in e}function vi(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===nm&&"_payload"in e&&rm(e._payload)}function om(e){const t=am(e),n=u.forwardRef((r,o)=>{let{children:a,...s}=r;vi(a)&&typeof ir=="function"&&(a=ir(a._payload));const i=u.Children.toArray(a),l=i.find(im);if(l){const c=l.props.children,f=i.map(d=>d===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,f):null})}return p.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function am(e){const t=u.forwardRef((n,r)=>{let{children:o,...a}=n;if(vi(o)&&typeof ir=="function"&&(o=ir(o._payload)),u.isValidElement(o)){const s=cm(o),i=lm(a,o.props);return o.type!==u.Fragment&&(i.ref=r?Qe(r,s):s),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sm=Symbol("radix.slottable");function im(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sm}function lm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function cm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],um=dm.reduce((e,t)=>{const n=om(`Primitive.${t}`),r=u.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fm="AspectRatio",bi=u.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return p.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:p.jsx(um.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});bi.displayName=fm;var pm=bi;const yi=u.forwardRef(({className:e,ratio:t=16/9,...n},r)=>p.jsx(pm,{ref:r,ratio:t,className:O("overflow-hidden",e),...n}));yi.displayName="AspectRatio";const wi=be("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}});function hm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const xi=u.forwardRef(({className:e,size:t,src:n,alt:r="",fallback:o,...a},s)=>{const[i,l]=u.useState(!1);u.useEffect(()=>{l(!1)},[n]);const c=o??(r?hm(r):null),f=n&&!i;return p.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:O(wi({size:t}),e),...a,children:f?p.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>l(!0)}):p.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:c??"?"})})});xi.displayName="Avatar";const Ci=be("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"border border-border bg-transparent text-foreground",success:"bg-green-100 text-green-800",warning:"bg-amber-100 text-amber-800"}},defaultVariants:{variant:"default"}}),Si=u.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("span",{ref:r,className:O(Ci({variant:t}),e),...n}));Si.displayName="Badge";const Ni=be(["relative inline-flex items-center justify-center gap-2","whitespace-nowrap rounded-md font-medium","ring-offset-background transition-[background-color,color,border-color,scale]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-[0.96]","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:["bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-ring"],destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive/90","focus-visible:ring-ring"],outline:["border border-border bg-background text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],ghost:["bg-transparent text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],link:["bg-transparent text-foreground underline-offset-4","hover:underline","focus-visible:ring-ring","active:scale-100"]},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2 text-sm",lg:"h-11 px-8 text-base"}},defaultVariants:{variant:"default",size:"md"}}),Mi=u.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:l=!1,...c},f)=>{const d=o?p.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[p.jsx("span",{"aria-hidden":"true",className:O("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-0 translate-y-1 blur-sm":"opacity-100 translate-y-0 blur-0"),children:o}),p.jsx("span",{"aria-hidden":"true",className:O("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-1 blur-sm"),children:p.jsx(Zs,{className:"animate-spin"})})]}):r?p.jsx(Zs,{className:"animate-spin","aria-hidden":"true"}):null;return p.jsx("button",{ref:f,className:O(Ni({variant:t,size:n}),l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...c,children:a==="center"?d:p.jsxs(p.Fragment,{children:[a==="left"&&d,i,a==="right"&&d]})})});Mi.displayName="Button";const Ei=be(["peer appearance-none rounded-sm border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","indeterminate:bg-primary indeterminate:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),mm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},ki=u.forwardRef(({className:e,size:t,isError:n,...r},o)=>{const a=mm[t??"md"];return p.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[p.jsx("input",{type:"checkbox",ref:o,className:O(Ei({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...r}),p.jsx(yn,{"aria-hidden":"true",className:O("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",a)}),p.jsx(Sh,{"aria-hidden":"true",className:O("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",a)})]})});ki.displayName="Checkbox";var Di=1,gm=.9,vm=.8,bm=.17,yo=.1,wo=.999,ym=.9999,wm=.99,xm=/[\\\/_+.#"@\[\(\{&]/,Cm=/[\\\/_+.#"@\[\(\{&]/g,Sm=/[\s-]/,Ti=/[\s-]/g;function xo(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Di:wm;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),c=n.indexOf(l,o),f=0,d,h,m,w;c>=0;)d=xo(e,t,n,r,c+1,a+1,s),d>f&&(c===o?d*=Di:xm.test(e.charAt(c-1))?(d*=vm,m=e.slice(o,c-1).match(Cm),m&&o>0&&(d*=Math.pow(wo,m.length))):Sm.test(e.charAt(c-1))?(d*=gm,w=e.slice(o,c-1).match(Ti),w&&o>0&&(d*=Math.pow(wo,w.length))):(d*=bm,o>0&&(d*=Math.pow(wo,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=ym)),(d<yo&&n.charAt(c-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(c-1)!==r.charAt(a))&&(h=xo(e,t,n,r,c+1,a+2,s),h*yo>d&&(d=h*yo)),d>f&&(f=d),c=n.indexOf(l,c+1);return s[i]=f,f}function Pi(e){return e.toLowerCase().replace(Ti," ")}function Nm(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,xo(e,t,Pi(e),Pi(t),0,0,{})}function ze(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Mm(e,t=globalThis==null?void 0:globalThis.document){const n=ze(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Em="DismissableLayer",Co="dismissableLayer.update",km="dismissableLayer.pointerDownOutside",Dm="dismissableLayer.focusOutside",Oi,_i=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,c=u.useContext(_i),[f,d]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=u.useState({}),w=ce(t,E=>d(E)),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=f?g.indexOf(f):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,N=b>=y,M=Om(E=>{const T=E.target,R=[...c.branches].some(F=>F.contains(T));!N||R||(o==null||o(E),s==null||s(E),E.defaultPrevented||i==null||i())},h),C=_m(E=>{const T=E.target;[...c.branches].some(F=>F.contains(T))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},h);return Mm(E=>{b===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),u.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Oi=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),Ai(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oi)}},[f,h,n,c]),u.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Ai())},[f,c]),u.useEffect(()=>{const E=()=>m({});return document.addEventListener(Co,E),()=>document.removeEventListener(Co,E)},[]),p.jsx(Z.div,{...l,ref:w,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:L(e.onFocusCapture,C.onFocusCapture),onBlurCapture:L(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:L(e.onPointerDownCapture,M.onPointerDownCapture)})});Gt.displayName=Em;var Tm="DismissableLayerBranch",Pm=u.forwardRef((e,t)=>{const n=u.useContext(_i),r=u.useRef(null),o=ce(t,r);return u.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(Z.div,{...e,ref:o})});Pm.displayName=Tm;function Om(e,t=globalThis==null?void 0:globalThis.document){const n=ze(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Ii(km,n,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _m(e,t=globalThis==null?void 0:globalThis.document){const n=ze(e),r=u.useRef(!1);return u.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ii(Dm,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ai(){const e=new CustomEvent(Co);document.dispatchEvent(e)}function Ii(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Os(o,a):o.dispatchEvent(a)}var So="focusScope.autoFocusOnMount",No="focusScope.autoFocusOnUnmount",Wi={bubbles:!1,cancelable:!0},Am="FocusScope",Cn=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=u.useState(null),c=ze(o),f=ze(a),d=u.useRef(null),h=ce(t,g=>l(g)),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const N=x.target;i.contains(N)?d.current=N:bt(d.current,{select:!0})},v=function(x){if(m.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||bt(d.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&bt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),b.disconnect()}}},[r,i,m.paused]),u.useEffect(()=>{if(i){Bi.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(So,Wi);i.addEventListener(So,c),i.dispatchEvent(y),y.defaultPrevented||(Im(Lm(Fi(i)),{select:!0}),document.activeElement===g&&bt(i))}return()=>{i.removeEventListener(So,c),setTimeout(()=>{const y=new CustomEvent(No,Wi);i.addEventListener(No,f),i.dispatchEvent(y),y.defaultPrevented||bt(g??document.body,{select:!0}),i.removeEventListener(No,f),Bi.remove(m)},0)}}},[i,c,f,m]);const w=u.useCallback(g=>{if(!n&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const b=g.currentTarget,[x,N]=Wm(b);x&&N?!g.shiftKey&&y===N?(g.preventDefault(),n&&bt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&bt(N,{select:!0})):y===b&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(Z.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});Cn.displayName=Am;function Im(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bt(r,{select:t}),document.activeElement!==n)return}function Wm(e){const t=Fi(e),n=$i(t,e),r=$i(t.reverse(),e);return[n,r]}function Fi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $i(e,t){for(const n of e)if(!Fm(n,{upTo:t}))return n}function Fm(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 $m(e){return e instanceof HTMLInputElement&&"select"in e}function bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$m(e)&&t&&e.select()}}var Bi=Bm();function Bm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Li(e,t),e.unshift(t)},remove(t){var n;e=Li(e,t),(n=e[0])==null||n.resume()}}}function Li(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lm(e){return e.filter(t=>t.tagName!=="A")}var Rm="Portal",jt=u.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=u.useState(!1);we(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?no.createPortal(p.jsx(Z.div,{...r,ref:t}),s):null});jt.displayName=Rm;var Mo=0;function lr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ri()),document.body.insertAdjacentElement("beforeend",e[1]??Ri()),Mo++,()=>{Mo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mo--}},[])}function Ri(){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 Je=function(){return Je=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Je.apply(this,arguments)};function Yi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ym(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var cr="right-scroll-bar-position",dr="width-before-scroll-bar",zm="with-scroll-bars-hidden",Vm="--removed-body-scroll-bar-size";function Eo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Hm(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Gm=typeof window<"u"?u.useLayoutEffect:u.useEffect,zi=new WeakMap;function jm(e,t){var n=Hm(null,function(r){return e.forEach(function(o){return Eo(o,r)})});return Gm(function(){var r=zi.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Eo(i,null)}),a.forEach(function(i){o.has(i)||Eo(i,s)})}zi.set(n,e)},[e]),n}function Um(e){return e}function Km(e,t){t===void 0&&(t=Um);var n=[],r=!1,o={read:function(){if(r)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(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var f=s;s=[],f.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(f){s.push(f),c()},filter:function(f){return s=s.filter(f),n}}}};return o}function qm(e){e===void 0&&(e={});var t=Km(null);return t.options=Je({async:!0,ssr:!1},e),t}var Vi=function(e){var t=e.sideCar,n=Yi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,Je({},n))};Vi.isSideCarExport=!0;function Xm(e,t){return e.useMedium(t),Vi}var Hi=qm(),ko=function(){},ur=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:ko,onWheelCapture:ko,onTouchMoveCapture:ko}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,N=Yi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=jm([n,t]),E=Je(Je({},N),o);return u.createElement(u.Fragment,null,f&&u.createElement(M,{sideCar:Hi,removeScrollBar:c,shards:d,noRelative:m,noIsolation:w,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?u.cloneElement(u.Children.only(i),Je(Je({},E),{ref:C})):u.createElement(b,Je({},E,{className:l,ref:C}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ur.classNames={fullWidth:dr,zeroRight:cr};var Zm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zm();return t&&e.setAttribute("nonce",t),e}function Jm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eg(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tg=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qm())&&(Jm(t,n),eg(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ng=function(){var e=tg();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gi=function(){var e=ng(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rg={left:0,top:0,right:0,gap:0},Do=function(e){return parseInt(e||"",10)||0},og=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Do(n),Do(r),Do(o)]},ag=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rg;var t=og(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sg=Gi(),Ut="data-scroll-locked",ig=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
82
|
-
|
|
81
|
+
*/const Og=xe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
82
|
+
* @license lucide-react v0.475.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const _g=xe("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
|
|
87
|
+
* @license lucide-react v0.475.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Ag=xe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
92
|
+
* @license lucide-react v0.475.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Ig=xe("Grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);/**
|
|
97
|
+
* @license lucide-react v0.475.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Fg=xe("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
102
|
+
* @license lucide-react v0.475.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Wg=xe("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
|
|
107
|
+
* @license lucide-react v0.475.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Ji=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
112
|
+
* @license lucide-react v0.475.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const $g=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
117
|
+
* @license lucide-react v0.475.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Bg=xe("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
|
|
122
|
+
* @license lucide-react v0.475.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const zg=xe("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|
127
|
+
* @license lucide-react v0.475.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const tr=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function el(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=el(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=el(e))&&(r&&(r+=" "),r+=t);return r}const nl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rl=tl,Me=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],c=a==null?void 0:a[u];if(p===null)return null;const h=nl(p)||nl(c);return o[u][h]}),i=n&&Object.entries(n).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:c,className:h,...g}=p;return Object.entries(g).every(w=>{let[m,v]=w;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,c,h]:u},[]);return rl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ia="-",Lg=e=>{const t=Vg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(ia);return i[0]===""&&i.length!==1&&i.shift(),ol(i,t)||Hg(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},ol=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ol(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ia);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},al=/^\[(.+)\]$/,Hg=e=>{if(al.test(e)){const t=al.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Vg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Gg(Object.entries(e.classGroups),n).forEach(([a,s])=>{la(s,r,a,t)}),r},la=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:sl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Yg(o)){la(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{la(s,sl(t,a),n,r)})})},sl=(e,t)=>{let n=e;return t.split(ia).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yg=e=>e.isThemeGetter,Gg=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,jg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},il="!",Rg=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let u=0,p=0,c;for(let v=0;v<i.length;v++){let y=i[v];if(u===0){if(y===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(p,v)),p=v+a;continue}if(y==="/"){c=v;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?i:i.substring(p),g=h.startsWith(il),w=g?h.substring(1):h,m=c&&c>p?c-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},Ug=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Kg=e=>({cache:jg(e.cacheSize),parseClassName:Rg(e),...Lg(e)}),qg=/\s+/,Xg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(qg);let i="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:p,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:g}=n(u);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=u+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=Ug(p).join(":"),y=c?v+il:v,b=y+m;if(a.includes(b))continue;a.push(b);const x=o(m,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(y+M)}i=u+(i.length>0?" "+i:i)}return i};function Zg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ll(t))&&(r&&(r+=" "),r+=n);return r}const ll=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ll(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qg(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((p,c)=>c(p),e());return n=Kg(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const p=Xg(l,n);return o(l,p),p}return function(){return a(Zg.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jg=/^\d+\/\d+$/,em=new Set(["px","full","screen"]),tm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,om=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,am=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>bn(e)||em.has(e)||Jg.test(e),Wt=e=>yn(e,"length",pm),bn=e=>!!e&&!Number.isNaN(Number(e)),ca=e=>yn(e,"number",bn),nr=e=>!!e&&Number.isInteger(Number(e)),sm=e=>e.endsWith("%")&&bn(e.slice(0,-1)),le=e=>cl.test(e),$t=e=>tm.test(e),im=new Set(["length","size","percentage"]),lm=e=>yn(e,im,dl),cm=e=>yn(e,"position",dl),dm=new Set(["image","url"]),um=e=>yn(e,dm,gm),fm=e=>yn(e,"",hm),rr=()=>!0,yn=(e,t,n)=>{const r=cl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pm=e=>nm.test(e)&&!rm.test(e),dl=()=>!1,hm=e=>om.test(e),gm=e=>am.test(e),mm=Qg(()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),a=ve("borderRadius"),s=ve("borderSpacing"),i=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),p=ve("hueRotate"),c=ve("invert"),h=ve("gap"),g=ve("gradientColorStops"),w=ve("gradientColorStopPositions"),m=ve("inset"),v=ve("margin"),y=ve("opacity"),b=ve("padding"),x=ve("saturate"),N=ve("scale"),M=ve("sepia"),C=ve("skew"),k=ve("space"),O=ve("translate"),V=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",le,t],B=()=>[le,t],q=()=>["",kt,Wt],Y=()=>["auto",bn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[bn,le];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[kt,Wt],blur:["none","",$t,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",$t,le],borderSpacing:B(),borderWidth:q(),contrast:oe(),grayscale:_(),hueRotate:oe(),invert:_(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[sm,Wt],inset:U(),margin:U(),opacity:oe(),padding:B(),saturate:oe(),scale:oe(),sepia:_(),skew:oe(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[$t]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),le]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nr,le]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",nr,le]}],"grid-cols":[{"grid-cols":[rr]}],"col-start-end":[{col:["auto",{span:["full",nr,le]},le]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[rr]}],"row-start-end":[{row:["auto",{span:[nr,le]},le]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[$t]},$t]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$t,Wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ca]}],"font-family":[{font:[rr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",bn,ca]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kt,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kt,Wt]}],"underline-offset":[{"underline-offset":["auto",kt,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),cm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},um]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[kt,le]}],"outline-w":[{outline:[kt,Wt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[kt,Wt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$t,fm]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$t,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[c]}],saturate:[{saturate:[x]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[nr,le]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kt,Wt,ca]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function D(...e){return mm(tl(e))}const ul=Me(["flex w-full items-center justify-between gap-4 text-left font-medium text-foreground","transition-[color,background-color] duration-150","hover:text-foreground/80","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:opacity-50"],{variants:{size:{sm:"py-2 text-sm",md:"py-3 text-sm",lg:"py-4 text-base"}},defaultVariants:{size:"md"}}),fl=Me(["overflow-hidden text-foreground","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),pl=Me("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),da=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(vg,{ref:r,className:D(pl({variant:t}),e),...n}));da.displayName="AccordionRoot";const ua=f.forwardRef(({className:e,...t},n)=>d.jsx(bg,{ref:n,className:D("border-b border-border last:border-b-0",e),...t}));ua.displayName="AccordionItem";const fa=f.forwardRef(({className:e,size:t,children:n,...r},o)=>d.jsx(yg,{className:"flex",children:d.jsxs(wg,{ref:o,className:D("group",ul({size:t}),"px-4",e),...r,children:[n,d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));fa.displayName="AccordionTrigger";const pa=f.forwardRef(({className:e,size:t,children:n,...r},o)=>d.jsx(xg,{ref:o,className:D(fl({size:t}),e),...r,children:d.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));pa.displayName="AccordionContent";const hl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p},c)=>d.jsx(da,{ref:c,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p,children:e.map(h=>d.jsxs(ua,{value:h.value,children:[d.jsx(fa,{size:t,disabled:h.disabled,children:h.trigger}),d.jsx(pa,{size:t,children:h.content})]},h.value))}));hl.displayName="Accordion";const gl=Me(["relative w-full rounded-lg border p-4","[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4","[&>svg~*]:pl-7"],{variants:{variant:{default:"bg-background border-border text-foreground [&>svg]:text-foreground",info:"bg-info/10 border-info/30 text-foreground [&>svg]:text-info",success:"bg-success/10 border-success/30 text-foreground [&>svg]:text-success",warning:"bg-warning/10 border-warning/30 text-foreground [&>svg]:text-warning",destructive:"bg-destructive/10 border-destructive/30 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ml=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:D(gl({variant:t}),e),...n}));ml.displayName="Alert";const vl=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:D("mb-1 font-medium leading-none tracking-tight text-balance",e),...t}));vl.displayName="AlertTitle";const bl=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:D("text-sm leading-relaxed opacity-90 text-pretty",e),...t}));bl.displayName="AlertDescription";var vm=Symbol.for("react.lazy"),qr=f[" use ".trim().toString()];function bm(e){return typeof e=="object"&&e!==null&&"then"in e}function yl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===vm&&"_payload"in e&&bm(e._payload)}function ym(e){const t=wm(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;yl(a)&&typeof qr=="function"&&(a=qr(a._payload));const i=f.Children.toArray(a),l=i.find(Cm);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function wm(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(yl(o)&&typeof qr=="function"&&(o=qr(o._payload)),f.isValidElement(o)){const s=Nm(o),i=Sm(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xm=Symbol("radix.slottable");function Cm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xm}function Sm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Nm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],km=Mm.reduce((e,t)=>{const n=ym(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Em="AspectRatio",wl=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return d.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:d.jsx(km.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});wl.displayName=Em;var Dm=wl;const xl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>d.jsx(Dm,{ref:r,ratio:t,className:D("overflow-hidden",e),...n}));xl.displayName="AspectRatio";const Cl=Me("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}});function Tm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Sl=f.forwardRef(({className:e,size:t,src:n,alt:r="",fallback:o,...a},s)=>{const[i,l]=f.useState(!1);f.useEffect(()=>{l(!1)},[n]);const u=o??(r?Tm(r):null),p=n&&!i;return d.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:D(Cl({size:t}),e),...a,children:p?d.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>l(!0)}):d.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:u??"?"})})});Sl.displayName="Avatar";const Nl=Me("inline-flex items-center rounded-sm px-2.5 py-0.5 text-xs font-ui font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"border border-border bg-transparent text-foreground",success:"bg-success/10 text-success",warning:"bg-warning/10 text-foreground"}},defaultVariants:{variant:"default"}}),Ml=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("span",{ref:r,className:D(Nl({variant:t}),e),...n}));Ml.displayName="Badge";const kl=Me(["relative inline-flex items-center justify-center gap-2","cursor-pointer","whitespace-nowrap rounded-md font-ui font-medium","ring-offset-background transition-[background-color,color,border-color,scale]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-[0.96]","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:["bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-ring"],destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive/90","focus-visible:ring-ring"],outline:["border border-border bg-background text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],ghost:["bg-transparent text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],link:["bg-transparent text-primary underline underline-offset-4","justify-start","hover:text-primary/80","focus-visible:ring-ring","active:scale-100"]},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-5 text-sm",lg:"h-12 px-6 text-base"}},defaultVariants:{variant:"default",size:"md"}}),wn=f.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:l=!1,...u},p)=>{const c=o?d.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[d.jsx("span",{"aria-hidden":"true",className:D("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-0 translate-y-1 blur-sm":"opacity-100 translate-y-0 blur-0"),children:o}),d.jsx("span",{"aria-hidden":"true",className:D("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-1 blur-sm"),children:d.jsx(Ji,{className:"animate-spin"})})]}):r?d.jsx(Ji,{className:"animate-spin","aria-hidden":"true"}):null;return d.jsx("button",{ref:p,className:D(kl({variant:t,size:n}),a==="center"&&"aspect-square p-0",l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...u,children:a==="center"?c:d.jsxs(d.Fragment,{children:[a==="left"&&c,i,a==="right"&&c]})})});wn.displayName="Button";const El=Me(["peer appearance-none rounded-xs border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","indeterminate:bg-primary indeterminate:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Pm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},Dl=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>{const a=Pm[t??"md"];return d.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[d.jsx("input",{type:"checkbox",ref:o,className:D(El({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...r}),d.jsx(er,{"aria-hidden":"true",className:D("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",a)}),d.jsx($g,{"aria-hidden":"true",className:D("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",a)})]})});Dl.displayName="Checkbox";var Tl=1,Om=.9,_m=.8,Am=.17,ha=.1,ga=.999,Im=.9999,Fm=.99,Wm=/[\\\/_+.#"@\[\(\{&]/,$m=/[\\\/_+.#"@\[\(\{&]/g,Bm=/[\s-]/,Pl=/[\s-]/g;function ma(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Tl:Fm;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),p=0,c,h,g,w;u>=0;)c=ma(e,t,n,r,u+1,a+1,s),c>p&&(u===o?c*=Tl:Wm.test(e.charAt(u-1))?(c*=_m,g=e.slice(o,u-1).match($m),g&&o>0&&(c*=Math.pow(ga,g.length))):Bm.test(e.charAt(u-1))?(c*=Om,w=e.slice(o,u-1).match(Pl),w&&o>0&&(c*=Math.pow(ga,w.length))):(c*=Am,o>0&&(c*=Math.pow(ga,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=Im)),(c<ha&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(h=ma(e,t,n,r,u+1,a+2,s),h*ha>c&&(c=h*ha)),c>p&&(p=c),u=n.indexOf(l,u+1);return s[i]=p,p}function Ol(e){return e.toLowerCase().replace(Pl," ")}function zm(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ma(e,t,Ol(e),Ol(t),0,0,{})}function ot(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Lm(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hm="DismissableLayer",va="dismissableLayer.update",Vm="dismissableLayer.pointerDownOutside",Ym="dismissableLayer.focusOutside",_l,Al=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(Al),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>c(k)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),b=p?m.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,N=b>=y,M=Rm(k=>{const O=k.target,V=[...u.branches].some($=>$.contains(O));!N||V||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=Um(k=>{const O=k.target;[...u.branches].some($=>$.contains(O))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return Lm(k=>{b===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_l=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Il(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=_l)}},[p,h,n,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Il())},[p,u]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(va,k),()=>document.removeEventListener(va,k)},[]),d.jsx(ne.div,{...l,ref:w,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,C.onFocusCapture),onBlurCapture:j(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,M.onPointerDownCapture)})});xn.displayName=Hm;var Gm="DismissableLayerBranch",jm=f.forwardRef((e,t)=>{const n=f.useContext(Al),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ne.div,{...e,ref:o})});jm.displayName=Gm;function Rm(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Fl(Vm,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Um(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&Fl(Ym,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Il(){const e=new CustomEvent(va);document.dispatchEvent(e)}function Fl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ii(o,a):o.dispatchEvent(a)}var ba="focusScope.autoFocusOnMount",ya="focusScope.autoFocusOnUnmount",Wl={bubbles:!1,cancelable:!0},Km="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=ot(o),p=ot(a),c=f.useRef(null),h=he(t,m=>l(m)),g=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const N=x.target;i.contains(N)?c.current=N:Bt(c.current,{select:!0})},v=function(x){if(g.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||Bt(c.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&Bt(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){zl.add(g);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(ba,Wl);i.addEventListener(ba,u),i.dispatchEvent(y),y.defaultPrevented||(qm(ev($l(i)),{select:!0}),document.activeElement===m&&Bt(i))}return()=>{i.removeEventListener(ba,u),setTimeout(()=>{const y=new CustomEvent(ya,Wl);i.addEventListener(ya,p),i.dispatchEvent(y),y.defaultPrevented||Bt(m??document.body,{select:!0}),i.removeEventListener(ya,p),zl.remove(g)},0)}}},[i,u,p,g]);const w=f.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const b=m.currentTarget,[x,N]=Xm(b);x&&N?!m.shiftKey&&y===N?(m.preventDefault(),n&&Bt(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&Bt(N,{select:!0})):y===b&&m.preventDefault()}},[n,r,g.paused]);return d.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=Km;function qm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bt(r,{select:t}),document.activeElement!==n)return}function Xm(e){const t=$l(e),n=Bl(t,e),r=Bl(t.reverse(),e);return[n,r]}function $l(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bl(e,t){for(const n of e)if(!Zm(n,{upTo:t}))return n}function Zm(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 Qm(e){return e instanceof HTMLInputElement&&"select"in e}function Bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qm(e)&&t&&e.select()}}var zl=Jm();function Jm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ll(e,t),e.unshift(t)},remove(t){var n;e=Ll(e,t),(n=e[0])==null||n.resume()}}}function Ll(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ev(e){return e.filter(t=>t.tagName!=="A")}var tv="Portal",Cn=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Pe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Qo.createPortal(d.jsx(ne.div,{...r,ref:t}),s):null});Cn.displayName=tv;var wa=0;function Xr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hl()),document.body.insertAdjacentElement("beforeend",e[1]??Hl()),wa++,()=>{wa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wa--}},[])}function Hl(){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 vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},vt.apply(this,arguments)};function Vl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function nv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zr="right-scroll-bar-position",Qr="width-before-scroll-bar",rv="with-scroll-bars-hidden",ov="--removed-body-scroll-bar-size";function xa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function av(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Yl=new WeakMap;function iv(e,t){var n=av(null,function(r){return e.forEach(function(o){return xa(o,r)})});return sv(function(){var r=Yl.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||xa(i,null)}),a.forEach(function(i){o.has(i)||xa(i,s)})}Yl.set(n,e)},[e]),n}function lv(e){return e}function cv(e,t){t===void 0&&(t=lv);var n=[],r=!1,o={read:function(){if(r)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(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),n}}}};return o}function dv(e){e===void 0&&(e={});var t=cv(null);return t.options=vt({async:!0,ssr:!1},e),t}var Gl=function(e){var t=e.sideCar,n=Vl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,vt({},n))};Gl.isSideCarExport=!0;function uv(e,t){return e.useMedium(t),Gl}var jl=dv(),Ca=function(){},Jr=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ca,onWheelCapture:Ca,onTouchMoveCapture:Ca}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,N=Vl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=iv([n,t]),k=vt(vt({},N),o);return f.createElement(f.Fragment,null,p&&f.createElement(M,{sideCar:jl,removeScrollBar:u,shards:c,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?f.cloneElement(f.Children.only(i),vt(vt({},k),{ref:C})):f.createElement(b,vt({},k,{className:l,ref:C}),i))});Jr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jr.classNames={fullWidth:Qr,zeroRight:Zr};var fv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fv();return t&&e.setAttribute("nonce",t),e}function hv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pv())&&(hv(t,n),gv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vv=function(){var e=mv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rl=function(){var e=vv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bv={left:0,top:0,right:0,gap:0},Sa=function(e){return parseInt(e||"",10)||0},yv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sa(n),Sa(r),Sa(o)]},wv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bv;var t=yv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xv=Rl(),Sn="data-scroll-locked",Cv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
132
|
+
.`.concat(rv,` {
|
|
83
133
|
overflow: hidden `).concat(r,`;
|
|
84
134
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
85
135
|
}
|
|
86
|
-
body[`).concat(
|
|
136
|
+
body[`).concat(Sn,`] {
|
|
87
137
|
overflow: hidden `).concat(r,`;
|
|
88
138
|
overscroll-behavior: contain;
|
|
89
139
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -96,39 +146,30 @@
|
|
|
96
146
|
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
97
147
|
}
|
|
98
148
|
|
|
99
|
-
.`).concat(
|
|
149
|
+
.`).concat(Zr,` {
|
|
100
150
|
right: `).concat(i,"px ").concat(r,`;
|
|
101
151
|
}
|
|
102
152
|
|
|
103
|
-
.`).concat(
|
|
153
|
+
.`).concat(Qr,` {
|
|
104
154
|
margin-right: `).concat(i,"px ").concat(r,`;
|
|
105
155
|
}
|
|
106
156
|
|
|
107
|
-
.`).concat(
|
|
157
|
+
.`).concat(Zr," .").concat(Zr,` {
|
|
108
158
|
right: 0 `).concat(r,`;
|
|
109
159
|
}
|
|
110
160
|
|
|
111
|
-
.`).concat(
|
|
161
|
+
.`).concat(Qr," .").concat(Qr,` {
|
|
112
162
|
margin-right: 0 `).concat(r,`;
|
|
113
163
|
}
|
|
114
164
|
|
|
115
|
-
body[`).concat(
|
|
116
|
-
`).concat(
|
|
165
|
+
body[`).concat(Sn,`] {
|
|
166
|
+
`).concat(ov,": ").concat(i,`px;
|
|
117
167
|
}
|
|
118
|
-
`)},
|
|
168
|
+
`)},Ul=function(){var e=parseInt(document.body.getAttribute(Sn)||"0",10);return isFinite(e)?e:0},Sv=function(){f.useEffect(function(){return document.body.setAttribute(Sn,(Ul()+1).toString()),function(){var e=Ul()-1;e<=0?document.body.removeAttribute(Sn):document.body.setAttribute(Sn,e.toString())}},[])},Nv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Sv();var a=f.useMemo(function(){return wv(o)},[o]);return f.createElement(xv,{styles:Cv(a,!t,o,n?"":"!important")})},Na=!1;if(typeof window<"u")try{var eo=Object.defineProperty({},"passive",{get:function(){return Na=!0,!0}});window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{Na=!1}var Nn=Na?{passive:!1}:!1,Mv=function(e){return e.tagName==="TEXTAREA"},Kl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mv(e)&&n[t]==="visible")},kv=function(e){return Kl(e,"overflowY")},Ev=function(e){return Kl(e,"overflowX")},ql=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xl(e,r);if(o){var a=Zl(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xl=function(e,t){return e==="v"?kv(t):Ev(t)},Zl=function(e,t){return e==="v"?Dv(t):Tv(t)},Pv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ov=function(e,t,n,r,o){var a=Pv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,p=s>0,c=0,h=0;do{if(!i)break;var g=Zl(e,i),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&Xl(e,i)&&(c+=y,h+=w);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(c)<1||!p&&Math.abs(h)<1)&&(u=!0),u},to=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ql=function(e){return[e.deltaX,e.deltaY]},Jl=function(e){return e&&"current"in e?e.current:e},_v=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Av=function(e){return`
|
|
119
169
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
120
170
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
121
|
-
`)},
|
|
171
|
+
`)},Iv=0,Mn=[];function Fv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Iv++)[0],a=f.useState(Rl)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=nv([e.lockRef.current],(e.shards||[]).map(Jl),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=to(m),b=n.current,x="deltaX"in m?m.deltaX:b[0]-y[0],N="deltaY"in m?m.deltaY:b[1]-y[1],M,C=m.target,k=Math.abs(x)>Math.abs(N)?"h":"v";if("touches"in m&&k==="h"&&C.type==="range")return!1;var O=window.getSelection(),V=O&&O.anchorNode,$=V?V===C||V.contains(C):!1;if($)return!1;var U=ql(k,C);if(!U)return!0;if(U?M=k:(M=k==="v"?"h":"v",U=ql(k,C)),!U)return!1;if(!r.current&&"changedTouches"in m&&(x||N)&&(r.current=M),!M)return!0;var B=r.current||M;return Ov(B,v,m,B==="h"?x:N)},[]),l=f.useCallback(function(m){var v=m;if(!(!Mn.length||Mn[Mn.length-1]!==a)){var y="deltaY"in v?Ql(v):to(v),b=t.current.filter(function(M){return M.name===v.type&&(M.target===v.target||v.target===M.shadowParent)&&_v(M.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(Jl).filter(Boolean).filter(function(M){return M.contains(v.target)}),N=x.length>0?i(v,x[0]):!s.current.noIsolation;N&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(m,v,y,b){var x={name:m,delta:v,target:y,should:b,shadowParent:Wv(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),p=f.useCallback(function(m){n.current=to(m),r.current=void 0},[]),c=f.useCallback(function(m){u(m.type,Ql(m),m.target,i(m,e.lockRef.current))},[]),h=f.useCallback(function(m){u(m.type,to(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return Mn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Nn),document.addEventListener("touchmove",l,Nn),document.addEventListener("touchstart",p,Nn),function(){Mn=Mn.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Nn),document.removeEventListener("touchmove",l,Nn),document.removeEventListener("touchstart",p,Nn)}},[]);var g=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(a,{styles:Av(o)}):null,g?f.createElement(Nv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $v=uv(jl,Fv);var ar=f.forwardRef(function(e,t){return f.createElement(Jr,vt({},e,{ref:t,sideCar:$v}))});ar.classNames=Jr.classNames;var Bv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kn=new WeakMap,no=new WeakMap,ro={},Ma=0,ec=function(e){return e&&(e.host||ec(e.parentNode))},zv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ec(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Lv=function(e,t,n,r){var o=zv(t,Array.isArray(e)?e:[e]);ro[n]||(ro[n]=new WeakMap);var a=ro[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))p(h);else try{var g=h.getAttribute(r),w=g!==null&&g!=="false",m=(kn.get(h)||0)+1,v=(a.get(h)||0)+1;kn.set(h,m),a.set(h,v),s.push(h),m===1&&w&&no.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return p(t),i.clear(),Ma++,function(){s.forEach(function(c){var h=kn.get(c)-1,g=a.get(c)-1;kn.set(c,h),a.set(c,g),h||(no.has(c)||c.removeAttribute(r),no.delete(c)),g||c.removeAttribute(n)}),Ma--,Ma||(kn=new WeakMap,kn=new WeakMap,no=new WeakMap,ro={})}},oo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Lv(r,o,n,"aria-hidden")):function(){return null}},ao="Dialog",[tc]=Ze(ao),[Hv,at]=tc(ao),nc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,p]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:ao});return d.jsx(Hv,{scope:t,triggerRef:i,contentRef:l,contentId:we(),titleId:we(),descriptionId:we(),open:u,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(c=>!c),[p]),modal:s,children:n})};nc.displayName=ao;var rc="DialogTrigger",oc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(rc,n),a=he(t,o.triggerRef);return d.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Da(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)})});oc.displayName=rc;var ka="DialogPortal",[Vv,ac]=tc(ka,{forceMount:void 0}),sc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=at(ka,t);return d.jsx(Vv,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:s})}))})};sc.displayName=ka;var so="DialogOverlay",ic=f.forwardRef((e,t)=>{const n=ac(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(so,e.__scopeDialog);return a.modal?d.jsx(Be,{present:r||a.open,children:d.jsx(Gv,{...o,ref:t})}):null});ic.displayName=so;var Yv=Qt("DialogOverlay.RemoveScroll"),Gv=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(so,n);return d.jsx(ar,{as:Yv,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ne.div,{"data-state":Da(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),en="DialogContent",lc=f.forwardRef((e,t)=>{const n=ac(en,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(en,e.__scopeDialog);return d.jsx(Be,{present:r||a.open,children:a.modal?d.jsx(jv,{...o,ref:t}):d.jsx(Rv,{...o,ref:t})})});lc.displayName=en;var jv=f.forwardRef((e,t)=>{const n=at(en,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return oo(a)},[]),d.jsx(cc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault())})}),Rv=f.forwardRef((e,t)=>{const n=at(en,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(cc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),cc=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=at(en,n),l=f.useRef(null),u=he(t,l);return Xr(),d.jsxs(d.Fragment,{children:[d.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(xn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Da(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Uv,{titleId:i.titleId}),d.jsx(qv,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Ea="DialogTitle",dc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Ea,n);return d.jsx(ne.h2,{id:o.titleId,...r,ref:t})});dc.displayName=Ea;var uc="DialogDescription",fc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(uc,n);return d.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});fc.displayName=uc;var pc="DialogClose",hc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(pc,n);return d.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});hc.displayName=pc;function Da(e){return e?"open":"closed"}var gc="DialogTitleWarning",[RN,mc]=zh(gc,{contentName:en,titleName:Ea,docsSlug:"dialog"}),Uv=({titleId:e})=>{const t=mc(gc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
122
172
|
|
|
123
173
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
124
174
|
|
|
125
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ag="DialogDescriptionWarning",Ig=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ml(Ag).contentName}}.`;return u.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gl=tl,Wg=rl,vl=al,Io=sl,Wo=il,bl=cl,yl=ul,Fg=pl,Nn='[cmdk-group=""]',Fo='[cmdk-group-items=""]',$g='[cmdk-group-heading=""]',wl='[cmdk-item=""]',xl=`${wl}:not([aria-disabled="true"])`,$o="cmdk-item-select",Zt="data-value",Bg=(e,t,n)=>Nm(e,t,n),Cl=u.createContext(void 0),Mn=()=>u.useContext(Cl),Sl=u.createContext(void 0),Bo=()=>u.useContext(Sl),Nl=u.createContext(void 0),yr=u.forwardRef((e,t)=>{let n=Qt(()=>{var D,_;return{search:"",value:(_=(D=e.value)!=null?D:e.defaultValue)!=null?_:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Qt(()=>new Set),o=Qt(()=>new Map),a=Qt(()=>new Map),s=Qt(()=>new Set),i=kl(e),{label:l,children:c,value:f,onValueChange:d,filter:h,shouldFilter:m,loop:w,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=e,b=me(),x=me(),N=me(),M=u.useRef(null),C=Vg();_t(()=>{if(f!==void 0){let D=f.trim();n.current.value=D,E.emit()}},[f]),_t(()=>{C(6,j)},[]);let E=u.useMemo(()=>({subscribe:D=>(s.current.add(D),()=>s.current.delete(D)),snapshot:()=>n.current,setState:(D,_,B)=>{var A,K,I,z;if(!Object.is(n.current[D],_)){if(n.current[D]=_,D==="search")$(),F(),C(1,H);else if(D==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(N);J?J.focus():(A=document.getElementById(b))==null||A.focus()}if(C(7,()=>{var J;n.current.selectedItemId=(J=V())==null?void 0:J.id,E.emit()}),B||C(5,j),((K=i.current)==null?void 0:K.value)!==void 0){let J=_??"";(z=(I=i.current).onValueChange)==null||z.call(I,J);return}}E.emit()}},emit:()=>{s.current.forEach(D=>D())}}),[]),T=u.useMemo(()=>({value:(D,_,B)=>{var A;_!==((A=a.current.get(D))==null?void 0:A.value)&&(a.current.set(D,{value:_,keywords:B}),n.current.filtered.items.set(D,R(_,B)),C(2,()=>{F(),E.emit()}))},item:(D,_)=>(r.current.add(D),_&&(o.current.has(_)?o.current.get(_).add(D):o.current.set(_,new Set([D]))),C(3,()=>{$(),F(),n.current.value||H(),E.emit()}),()=>{a.current.delete(D),r.current.delete(D),n.current.filtered.items.delete(D);let B=V();C(4,()=>{$(),(B==null?void 0:B.getAttribute("id"))===D&&H(),E.emit()})}),group:D=>(o.current.has(D)||o.current.set(D,new Set),()=>{a.current.delete(D),o.current.delete(D)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:N,labelId:x,listInnerRef:M}),[]);function R(D,_){var B,A;let K=(A=(B=i.current)==null?void 0:B.filter)!=null?A:Bg;return D?K(D,n.current.search,_):0}function F(){if(!n.current.search||i.current.shouldFilter===!1)return;let D=n.current.filtered.items,_=[];n.current.filtered.groups.forEach(A=>{let K=o.current.get(A),I=0;K.forEach(z=>{let J=D.get(z);I=Math.max(J,I)}),_.push([A,I])});let B=M.current;ne().sort((A,K)=>{var I,z;let J=A.getAttribute("id"),re=K.getAttribute("id");return((I=D.get(re))!=null?I:0)-((z=D.get(J))!=null?z:0)}).forEach(A=>{let K=A.closest(Fo);K?K.appendChild(A.parentElement===K?A:A.closest(`${Fo} > *`)):B.appendChild(A.parentElement===B?A:A.closest(`${Fo} > *`))}),_.sort((A,K)=>K[1]-A[1]).forEach(A=>{var K;let I=(K=M.current)==null?void 0:K.querySelector(`${Nn}[${Zt}="${encodeURIComponent(A[0])}"]`);I==null||I.parentElement.appendChild(I)})}function H(){let D=ne().find(B=>B.getAttribute("aria-disabled")!=="true"),_=D==null?void 0:D.getAttribute(Zt);E.setState("value",_||void 0)}function $(){var D,_,B,A;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let K=0;for(let I of r.current){let z=(_=(D=a.current.get(I))==null?void 0:D.value)!=null?_:"",J=(A=(B=a.current.get(I))==null?void 0:B.keywords)!=null?A:[],re=R(z,J);n.current.filtered.items.set(I,re),re>0&&K++}for(let[I,z]of o.current)for(let J of z)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(I);break}n.current.filtered.count=K}function j(){var D,_,B;let A=V();A&&(((D=A.parentElement)==null?void 0:D.firstChild)===A&&((B=(_=A.closest(Nn))==null?void 0:_.querySelector($g))==null||B.scrollIntoView({block:"nearest"})),A.scrollIntoView({block:"nearest"}))}function V(){var D;return(D=M.current)==null?void 0:D.querySelector(`${wl}[aria-selected="true"]`)}function ne(){var D;return Array.from(((D=M.current)==null?void 0:D.querySelectorAll(xl))||[])}function W(D){let _=ne()[D];_&&E.setState("value",_.getAttribute(Zt))}function G(D){var _;let B=V(),A=ne(),K=A.findIndex(z=>z===B),I=A[K+D];(_=i.current)!=null&&_.loop&&(I=K+D<0?A[A.length-1]:K+D===A.length?A[0]:A[K+D]),I&&E.setState("value",I.getAttribute(Zt))}function Y(D){let _=V(),B=_==null?void 0:_.closest(Nn),A;for(;B&&!A;)B=D>0?Yg(B,Nn):zg(B,Nn),A=B==null?void 0:B.querySelector(xl);A?E.setState("value",A.getAttribute(Zt)):G(D)}let P=()=>W(ne().length-1),U=D=>{D.preventDefault(),D.metaKey?P():D.altKey?Y(1):G(1)},te=D=>{D.preventDefault(),D.metaKey?W(0):D.altKey?Y(-1):G(-1)};return u.createElement(Z.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:D=>{var _;(_=y.onKeyDown)==null||_.call(y,D);let B=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||B))switch(D.key){case"n":case"j":{v&&D.ctrlKey&&U(D);break}case"ArrowDown":{U(D);break}case"p":case"k":{v&&D.ctrlKey&&te(D);break}case"ArrowUp":{te(D);break}case"Home":{D.preventDefault(),W(0);break}case"End":{D.preventDefault(),P();break}case"Enter":{D.preventDefault();let A=V();if(A){let K=new Event($o);A.dispatchEvent(K)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Gg},l),wr(e,D=>u.createElement(Sl.Provider,{value:E},u.createElement(Cl.Provider,{value:T},D))))}),Lo=u.forwardRef((e,t)=>{var n,r;let o=me(),a=u.useRef(null),s=u.useContext(Nl),i=Mn(),l=kl(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;_t(()=>{if(!c)return i.item(o,s==null?void 0:s.id)},[c]);let f=Dl(o,a,[e.value,e.children,a],e.keywords),d=Bo(),h=yt(C=>C.value&&C.value===f.current),m=yt(C=>c||i.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);u.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener($o,w),()=>C.removeEventListener($o,w)},[m,e.onSelect,e.disabled]);function w(){var C,E;g(),(E=(C=l.current).onSelect)==null||E.call(C,f.current)}function g(){d.setState("value",f.current,!0)}if(!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:N,...M}=e;return u.createElement(Z.div,{ref:Qe(a,t),...M,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:w},e.children)}),Ml=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=me(),i=u.useRef(null),l=u.useRef(null),c=me(),f=Mn(),d=yt(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);_t(()=>f.group(s),[]),Dl(s,i,[e.value,e.heading,l]);let h=u.useMemo(()=>({id:s,forceMount:o}),[o]);return u.createElement(Z.div,{ref:Qe(i,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&u.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),wr(e,m=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},u.createElement(Nl.Provider,{value:h},m))))}),El=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),a=yt(s=>!s.search);return!n&&!a?null:u.createElement(Z.div,{ref:Qe(o,t),...r,"cmdk-separator":"",role:"separator"})}),Ro=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Bo(),s=yt(c=>c.search),i=yt(c=>c.selectedItemId),l=Mn();return u.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),u.createElement(Z.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:c=>{o||a.setState("search",c.target.value),n==null||n(c.target.value)}})}),Yo=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=u.useRef(null),s=u.useRef(null),i=yt(c=>c.selectedItemId),l=Mn();return u.useEffect(()=>{if(s.current&&a.current){let c=s.current,f=a.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let m=c.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(d),h.unobserve(c)}}},[]),u.createElement(Z.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},wr(e,c=>u.createElement("div",{ref:Qe(s,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Lg=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return u.createElement(gl,{open:n,onOpenChange:r},u.createElement(vl,{container:s},u.createElement(Io,{"cmdk-overlay":"",className:o}),u.createElement(Wo,{"aria-label":e.label,"cmdk-dialog":"",className:a},u.createElement(yr,{ref:t,...i}))))}),zo=u.forwardRef((e,t)=>yt(n=>n.filtered.count===0)?u.createElement(Z.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Rg=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return u.createElement(Z.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},wr(e,s=>u.createElement("div",{"aria-hidden":!0},s)))});Object.assign(yr,{List:Yo,Item:Lo,Input:Ro,Group:Ml,Separator:El,Dialog:Lg,Empty:zo,Loading:Rg});function Yg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function zg(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function kl(e){let t=u.useRef(e);return _t(()=>{t.current=e}),t}var _t=typeof window>"u"?u.useEffect:u.useLayoutEffect;function Qt(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function yt(e){let t=Bo(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function Dl(e,t,n,r=[]){let o=u.useRef(),a=Mn();return _t(()=>{var s;let i=(()=>{var c;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map(c=>c.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Zt,i),o.current=i}),o}var Vg=()=>{let[e,t]=u.useState(),n=Qt(()=>new Map);return _t(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Hg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function wr({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(Hg(t),{ref:t.ref},n(t.props.children)):n(t)}var Gg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const jg=["top","right","bottom","left"],wt=Math.min,Oe=Math.max,xr=Math.round,Cr=Math.floor,et=e=>({x:e,y:e}),Ug={left:"right",right:"left",bottom:"top",top:"bottom"};function Vo(e,t,n){return Oe(e,wt(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function Ho(e){return e==="x"?"y":"x"}function Go(e){return e==="y"?"height":"width"}function tt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jo(e){return Ho(tt(e))}function Kg(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=jo(e),a=Go(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Sr(s)),[s,Sr(s)]}function qg(e){const t=Sr(e);return[Uo(e),t,Uo(t)]}function Uo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Tl=["left","right"],Pl=["right","left"],Xg=["top","bottom"],Zg=["bottom","top"];function Qg(e,t,n){switch(e){case"top":case"bottom":return n?t?Pl:Tl:t?Tl:Pl;case"left":case"right":return t?Xg:Zg;default:return[]}}function Jg(e,t,n,r){const o=Jt(e);let a=Qg(ut(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Uo)))),a}function Sr(e){const t=ut(e);return Ug[t]+e.slice(t.length)}function ev(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ol(e){return typeof e!="number"?ev(e):{top:e,right:e,bottom:e,left:e}}function Nr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function _l(e,t,n){let{reference:r,floating:o}=e;const a=tt(t),s=jo(t),i=Go(s),l=ut(t),c=a==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Jt(t)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}async function tv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=dt(t,e),w=Ol(m),v=i[h?d==="floating"?"reference":"floating":d],y=Nr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:f,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),N=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},M=Nr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-M.top+w.top)/N.y,bottom:(M.bottom-y.bottom+w.bottom)/N.y,left:(y.left-M.left+w.left)/N.x,right:(M.right-y.right+w.right)/N.x}}const nv=50,rv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:tv},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=_l(c,r,l),h=r,m=0;const w={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:y,fn:b}=v,{x,y:N,data:M,reset:C}=await b({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:c,platform:i,elements:{reference:e,floating:t}});f=x??f,d=N??d,w[y]={...w[y],...M},C&&m<nv&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=_l(c,h,l)),g=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:w}},ov=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:f=0}=dt(e,t)||{};if(c==null)return{};const d=Ol(f),h={x:n,y:r},m=jo(o),w=Go(m),g=await s.getDimensions(c),v=m==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[m]-h[m]-a.floating[w],M=h[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=C?C[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=i.floating[x]||a.floating[w]);const T=N/2-M/2,R=E/2-g[w]/2-1,F=wt(d[y],R),H=wt(d[b],R),$=F,j=E-g[w]-H,V=E/2-g[w]/2+T,ne=Vo($,V,j),W=!l.arrow&&Jt(o)!=null&&V!==ne&&a.reference[w]/2-(V<$?F:H)-g[w]/2<0,G=W?V<$?V-$:V-j:0;return{[m]:h[m]+G,data:{[m]:ne,centerOffset:V-ne-G,...W&&{alignmentOffset:G}},reset:W}}}),av=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:g=!0,...v}=dt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=ut(o),b=tt(i),x=ut(i)===i,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=h||(x||!g?[Sr(i)]:qg(i)),C=w!=="none";!h&&C&&M.push(...Jg(i,g,w,N));const E=[i,...M],T=await l.detectOverflow(t,v),R=[];let F=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&R.push(T[y]),d){const V=Kg(o,s,N);R.push(T[V[0]],T[V[1]])}if(F=[...F,{placement:o,overflows:R}],!R.every(V=>V<=0)){var H,$;const V=(((H=a.flip)==null?void 0:H.index)||0)+1,ne=E[V];if(ne&&(!(d==="alignment"?b!==tt(ne):!1)||F.every(Y=>tt(Y.placement)===b?Y.overflows[0]>0:!0)))return{data:{index:V,overflows:F},reset:{placement:ne}};let W=($=F.filter(G=>G.overflows[0]<=0).sort((G,Y)=>G.overflows[1]-Y.overflows[1])[0])==null?void 0:$.placement;if(!W)switch(m){case"bestFit":{var j;const G=(j=F.filter(Y=>{if(C){const P=tt(Y.placement);return P===b||P==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(P=>P>0).reduce((P,U)=>P+U,0)]).sort((Y,P)=>Y[1]-P[1])[0])==null?void 0:j[0];G&&(W=G);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Al(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Il(e){return jg.some(t=>e[t]>=0)}const sv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=dt(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Al(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Il(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Al(s,n.floating);return{data:{escapedOffsets:i,escaped:Il(i)}}}default:return{}}}}},Wl=new Set(["left","top"]);async function iv(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ut(n),i=Jt(n),l=tt(n)==="y",c=Wl.has(s)?-1:1,f=a&&l?-1:1,d=dt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof w=="number"&&(m=i==="end"?w*-1:w),l?{x:m*f,y:h*c}:{x:h*c,y:m*f}}const lv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await iv(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},cv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...c}=dt(e,t),f={x:n,y:r},d=await a.detectOverflow(t,c),h=tt(ut(o)),m=Ho(h);let w=f[m],g=f[h];if(s){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=w+d[y],N=w-d[b];w=Vo(x,w,N)}if(i){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=g+d[y],N=g-d[b];g=Vo(x,g,N)}const v=l.fn({...t,[m]:w,[h]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[h]:i}}}}}},dv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=dt(e,t),f={x:n,y:r},d=tt(o),h=Ho(d);let m=f[h],w=f[d];const g=dt(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=h==="y"?"height":"width",N=a.reference[h]-a.floating[x]+v.mainAxis,M=a.reference[h]+a.reference[x]-v.mainAxis;m<N?m=N:m>M&&(m=M)}if(c){var y,b;const x=h==="y"?"width":"height",N=Wl.has(ut(o)),M=a.reference[d]-a.floating[x]+(N&&((y=s.offset)==null?void 0:y[d])||0)+(N?0:v.crossAxis),C=a.reference[d]+a.reference[x]+(N?0:((b=s.offset)==null?void 0:b[d])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:m,[d]:w}}}},uv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...c}=dt(e,t),f=await s.detectOverflow(t,c),d=ut(o),h=Jt(o),m=tt(o)==="y",{width:w,height:g}=a.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,v=h==="end"?"top":"bottom");const b=g-f.top-f.bottom,x=w-f.left-f.right,N=wt(g-f[v],b),M=wt(w-f[y],x),C=!t.middlewareData.shift;let E=N,T=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=b),C&&!h){const F=Oe(f.left,0),H=Oe(f.right,0),$=Oe(f.top,0),j=Oe(f.bottom,0);m?T=w-2*(F!==0||H!==0?F+H:Oe(f.left,f.right)):E=g-2*($!==0||j!==0?$+j:Oe(f.top,f.bottom))}await l({...t,availableWidth:T,availableHeight:E});const R=await s.getDimensions(i.floating);return w!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function Mr(){return typeof window<"u"}function en(e){return Fl(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(Fl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fl(e){return Mr()?e instanceof Node||e instanceof _e(e).Node:!1}function He(e){return Mr()?e instanceof Element||e instanceof _e(e).Element:!1}function ft(e){return Mr()?e instanceof HTMLElement||e instanceof _e(e).HTMLElement:!1}function $l(e){return!Mr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}function En(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function fv(e){return/^(table|td|th)$/.test(en(e))}function Er(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const pv=/transform|translate|scale|rotate|perspective|filter/,hv=/paint|layout|strict|content/,At=e=>!!e&&e!=="none";let Ko;function qo(e){const t=He(e)?Ge(e):e;return At(t.transform)||At(t.translate)||At(t.scale)||At(t.rotate)||At(t.perspective)||!Xo()&&(At(t.backdropFilter)||At(t.filter))||pv.test(t.willChange||"")||hv.test(t.contain||"")}function mv(e){let t=xt(e);for(;ft(t)&&!tn(t);){if(qo(t))return t;if(Er(t))return null;t=xt(t)}return null}function Xo(){return Ko==null&&(Ko=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ko}function tn(e){return/^(html|body|#document)$/.test(en(e))}function Ge(e){return _e(e).getComputedStyle(e)}function kr(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$l(e)&&e.host||nt(e);return $l(t)?t.host:t}function Bl(e){const t=xt(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&En(t)?t:Bl(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bl(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=_e(o);if(a){const i=Zo(s);return t.concat(s,s.visualViewport||[],En(o)?o:[],i&&n?kn(i):[])}else return t.concat(o,kn(o,[],n))}function Zo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ll(e){const t=Ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=xr(n)!==a||xr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Qo(e){return He(e)?e:e.contextElement}function nn(e){const t=Qo(e);if(!ft(t))return et(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ll(t);let s=(a?xr(n.width):n.width)/r,i=(a?xr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const gv=et(0);function Rl(e){const t=_e(e);return!Xo()||!t.visualViewport?gv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function It(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Qo(e);let s=et(1);t&&(r?He(r)&&(s=nn(r)):s=nn(e));const i=vv(a,n,r)?Rl(a):et(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(a){const h=_e(a),m=r&&He(r)?_e(r):r;let w=h,g=Zo(w);for(;g&&r&&m!==w;){const v=nn(g),y=g.getBoundingClientRect(),b=Ge(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,N=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,f*=v.x,d*=v.y,l+=x,c+=N,w=_e(g),g=Zo(w)}}return Nr({width:f,height:d,x:l,y:c})}function Dr(e,t){const n=kr(e).scrollLeft;return t?t.left+n:It(nt(e)).left+n}function Yl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=nt(r),i=t?Er(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=et(1);const f=et(0),d=ft(r);if((d||!d&&!a)&&((en(r)!=="body"||En(s))&&(l=kr(r)),d)){const m=It(r);c=nn(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=s&&!d&&!a?Yl(s,l):et(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+h.x,y:n.y*c.y-l.scrollTop*c.y+f.y+h.y}}function yv(e){return Array.from(e.getClientRects())}function wv(e){const t=nt(e),n=kr(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Dr(e);const i=-n.scrollTop;return Ge(r).direction==="rtl"&&(s+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const zl=25;function xv(e,t){const n=_e(e),r=nt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=Xo();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const c=Dr(r);if(c<=0){const f=r.ownerDocument,d=f.body,h=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-d.clientWidth-m);w<=zl&&(a-=w)}else c<=zl&&(a+=c);return{width:a,height:s,x:i,y:l}}function Cv(e,t){const n=It(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ft(e)?nn(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,c=r*a.y;return{width:s,height:i,x:l,y:c}}function Vl(e,t,n){let r;if(t==="viewport")r=xv(e,n);else if(t==="document")r=wv(nt(e));else if(He(t))r=Cv(t,n);else{const o=Rl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Nr(r)}function Hl(e,t){const n=xt(e);return n===t||!He(n)||tn(n)?!1:Ge(n).position==="fixed"||Hl(n,t)}function Sv(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(i=>He(i)&&en(i)!=="body"),o=null;const a=Ge(e).position==="fixed";let s=a?xt(e):e;for(;He(s)&&!tn(s);){const i=Ge(s),l=qo(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||En(s)&&!l&&Hl(e,s))?r=r.filter(f=>f!==s):o=i,s=xt(s)}return t.set(e,r),r}function Nv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Er(t)?[]:Sv(t,this._c):[].concat(n),r],i=Vl(t,s[0],o);let l=i.top,c=i.right,f=i.bottom,d=i.left;for(let h=1;h<s.length;h++){const m=Vl(t,s[h],o);l=Oe(m.top,l),c=wt(m.right,c),f=wt(m.bottom,f),d=Oe(m.left,d)}return{width:c-d,height:f-l,x:d,y:l}}function Mv(e){const{width:t,height:n}=Ll(e);return{width:t,height:n}}function Ev(e,t,n){const r=ft(t),o=nt(t),a=n==="fixed",s=It(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=et(0);function c(){l.x=Dr(o)}if(r||!r&&!a)if((en(t)!=="body"||En(o))&&(i=kr(t)),r){const m=It(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&c();a&&!r&&o&&c();const f=o&&!r&&!a?Yl(o,i):et(0),d=s.left+i.scrollLeft-l.x-f.x,h=s.top+i.scrollTop-l.y-f.y;return{x:d,y:h,width:s.width,height:s.height}}function Jo(e){return Ge(e).position==="static"}function Gl(e,t){if(!ft(e)||Ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function jl(e,t){const n=_e(e);if(Er(e))return n;if(!ft(e)){let o=xt(e);for(;o&&!tn(o);){if(He(o)&&!Jo(o))return o;o=xt(o)}return n}let r=Gl(e,t);for(;r&&fv(r)&&Jo(r);)r=Gl(r,t);return r&&tn(r)&&Jo(r)&&!qo(r)?n:r||mv(e)||n}const kv=async function(e){const t=this.getOffsetParent||jl,n=this.getDimensions,r=await n(e.floating);return{reference:Ev(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dv(e){return Ge(e).direction==="rtl"}const Tv={convertOffsetParentRelativeRectToViewportRelativeRect:bv,getDocumentElement:nt,getClippingRect:Nv,getOffsetParent:jl,getElementRects:kv,getClientRects:yv,getDimensions:Mv,getScale:nn,isElement:He,isRTL:Dv};function Ul(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pv(e,t){let n=null,r;const o=nt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:f,top:d,width:h,height:m}=c;if(i||t(),!h||!m)return;const w=Cr(d),g=Cr(o.clientWidth-(f+h)),v=Cr(o.clientHeight-(d+m)),y=Cr(f),x={rootMargin:-w+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Oe(0,wt(1,l))||1};let N=!0;function M(C){const E=C[0].intersectionRatio;if(E!==l){if(!N)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Ul(c,e.getBoundingClientRect())&&s(),N=!1}try{n=new IntersectionObserver(M,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,x)}n.observe(e)}return s(!0),a}function Ov(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Qo(e),f=o||a?[...c?kn(c):[],...t?kn(t):[]]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const d=c&&i?Pv(c,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),c&&!l&&m.observe(c),t&&m.observe(t));let w,g=l?It(e):null;l&&v();function v(){const y=It(e);g&&!Ul(g,y)&&n(),g=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(w)}}const _v=lv,Av=cv,Iv=av,Wv=uv,Fv=sv,Kl=ov,$v=dv,Bv=(e,t,n)=>{const r=new Map,o={platform:Tv,...n},a={...o.platform,_c:r};return rv(e,t,{...o,platform:a})};var Lv=typeof document<"u",Rv=function(){},Tr=Lv?S.useLayoutEffect:Rv;function Pr(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Pr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Pr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ql(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xl(e,t){const n=ql(e);return Math.round(t*n)/n}function ea(e){const t=u.useRef(e);return Tr(()=>{t.current=e}),t}function Yv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[f,d]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=u.useState(r);Pr(h,r)||m(r);const[w,g]=u.useState(null),[v,y]=u.useState(null),b=u.useCallback(Y=>{Y!==C.current&&(C.current=Y,g(Y))},[]),x=u.useCallback(Y=>{Y!==E.current&&(E.current=Y,y(Y))},[]),N=a||w,M=s||v,C=u.useRef(null),E=u.useRef(null),T=u.useRef(f),R=l!=null,F=ea(l),H=ea(o),$=ea(c),j=u.useCallback(()=>{if(!C.current||!E.current)return;const Y={placement:t,strategy:n,middleware:h};H.current&&(Y.platform=H.current),Bv(C.current,E.current,Y).then(P=>{const U={...P,isPositioned:$.current!==!1};V.current&&!Pr(T.current,U)&&(T.current=U,er.flushSync(()=>{d(U)}))})},[h,t,n,H,$]);Tr(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(Y=>({...Y,isPositioned:!1})))},[c]);const V=u.useRef(!1);Tr(()=>(V.current=!0,()=>{V.current=!1}),[]),Tr(()=>{if(N&&(C.current=N),M&&(E.current=M),N&&M){if(F.current)return F.current(N,M,j);j()}},[N,M,j,F,R]);const ne=u.useMemo(()=>({reference:C,floating:E,setReference:b,setFloating:x}),[b,x]),W=u.useMemo(()=>({reference:N,floating:M}),[N,M]),G=u.useMemo(()=>{const Y={position:n,left:0,top:0};if(!W.floating)return Y;const P=Xl(W.floating,f.x),U=Xl(W.floating,f.y);return i?{...Y,transform:"translate("+P+"px, "+U+"px)",...ql(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:U}},[n,i,W.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:j,refs:ne,elements:W,floatingStyles:G}),[f,j,ne,W,G])}const zv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Kl({element:r.current,padding:o}).fn(n):{}:r?Kl({element:r,padding:o}).fn(n):{}}}},Vv=(e,t)=>{const n=_v(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hv=(e,t)=>{const n=Av(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gv=(e,t)=>({fn:$v(e).fn,options:[e,t]}),jv=(e,t)=>{const n=Iv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uv=(e,t)=>{const n=Wv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kv=(e,t)=>{const n=Fv(e);return{name:n.name,fn:n.fn,options:[e,t]}},qv=(e,t)=>{const n=zv(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Xv="Arrow",Zl=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return p.jsx(Z.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zl.displayName=Xv;var Zv=Zl;function Qv(e){const[t,n]=u.useState(void 0);return we(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,i=c.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ta="Popper",[Ql,Ct]=Fe(ta),[Jv,Jl]=Ql(ta),ec=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return p.jsx(Jv,{scope:t,anchor:r,onAnchorChange:o,children:n})};ec.displayName=ta;var tc="PopperAnchor",nc=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Jl(tc,n),s=u.useRef(null),i=ce(t,s),l=u.useRef(null);return u.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||s.current,c!==l.current&&a.onAnchorChange(l.current)}),r?null:p.jsx(Z.div,{...o,ref:i})});nc.displayName=tc;var na="PopperContent",[eb,tb]=Ql(na),rc=u.forwardRef((e,t)=>{var I,z,J,re,ie,se;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...g}=e,v=Jl(na,n),[y,b]=u.useState(null),x=ce(t,xe=>b(xe)),[N,M]=u.useState(null),C=Qv(N),E=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,R=r+(a!=="center"?"-"+a:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(c)?c:[c],$=H.length>0,j={padding:F,boundary:H.filter(rb),altBoundary:$},{refs:V,floatingStyles:ne,placement:W,isPositioned:G,middlewareData:Y}=Yv({strategy:"fixed",placement:R,whileElementsMounted:(...xe)=>Ov(...xe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[Vv({mainAxis:o+T,alignmentAxis:s}),l&&Hv({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Gv():void 0,...j}),l&&jv({...j}),Uv({...j,apply:({elements:xe,rects:Ne,availableWidth:it,availableHeight:lt})=>{const{width:We,height:mn}=Ne.reference,Me=xe.floating.style;Me.setProperty("--radix-popper-available-width",`${it}px`),Me.setProperty("--radix-popper-available-height",`${lt}px`),Me.setProperty("--radix-popper-anchor-width",`${We}px`),Me.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),N&&qv({element:N,padding:i}),ob({arrowWidth:E,arrowHeight:T}),h&&Kv({strategy:"referenceHidden",...j})]}),[P,U]=sc(W),te=ze(w);we(()=>{G&&(te==null||te())},[G,te]);const D=(I=Y.arrow)==null?void 0:I.x,_=(z=Y.arrow)==null?void 0:z.y,B=((J=Y.arrow)==null?void 0:J.centerOffset)!==0,[A,K]=u.useState();return we(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:G?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A,"--radix-popper-transform-origin":[(re=Y.transformOrigin)==null?void 0:re.x,(ie=Y.transformOrigin)==null?void 0:ie.y].join(" "),...((se=Y.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(eb,{scope:n,placedSide:P,onArrowChange:M,arrowX:D,arrowY:_,shouldHideArrow:B,children:p.jsx(Z.div,{"data-side":P,"data-align":U,...g,ref:x,style:{...g.style,animation:G?void 0:"none"}})})})});rc.displayName=na;var oc="PopperArrow",nb={top:"bottom",right:"left",bottom:"top",left:"right"},ac=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=tb(oc,r),s=nb[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(Zv,{...o,ref:n,style:{...o.style,display:"block"}})})});ac.displayName=oc;function rb(e){return e!==null}var ob=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,f]=sc(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let w="",g="";return c==="bottom"?(w=s?d:`${h}px`,g=`${-l}px`):c==="top"?(w=s?d:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(w=`${-l}px`,g=s?d:`${m}px`):c==="left"&&(w=`${r.floating.width+l}px`,g=s?d:`${m}px`),{data:{x:w,y:g}}}});function sc(e){const[t,n="center"]=e.split("-");return[t,n]}var Dn=ec,Tn=nc,Or=rc,_r=ac,Ar="Popover",[ic]=Fe(Ar,[Ct]),Pn=Ct(),[ab,St]=ic(Ar),lc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=Pn(t),l=u.useRef(null),[c,f]=u.useState(!1),[d,h]=$e({prop:r,defaultProp:o??!1,onChange:a,caller:Ar});return p.jsx(Dn,{...i,children:p.jsx(ab,{scope:t,contentId:me(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:c,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:s,children:n})})};lc.displayName=Ar;var cc="PopoverAnchor",dc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(cc,n),a=Pn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(s(),()=>i()),[s,i]),p.jsx(Tn,{...a,...r,ref:t})});dc.displayName=cc;var uc="PopoverTrigger",fc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(uc,n),a=Pn(n),s=ce(t,o.triggerRef),i=p.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bc(o.open),...r,ref:s,onClick:L(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(Tn,{asChild:!0,...a,children:i})});fc.displayName=uc;var ra="PopoverPortal",[sb,ib]=ic(ra,{forceMount:void 0}),pc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=St(ra,t);return p.jsx(sb,{scope:t,forceMount:n,children:p.jsx(Te,{present:n||a.open,children:p.jsx(jt,{asChild:!0,container:o,children:r})})})};pc.displayName=ra;var rn="PopoverContent",hc=u.forwardRef((e,t)=>{const n=ib(rn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=St(rn,e.__scopePopover);return p.jsx(Te,{present:r||a.open,children:a.modal?p.jsx(cb,{...o,ref:t}):p.jsx(db,{...o,ref:t})})});hc.displayName=rn;var lb=Pt("PopoverContent.RemoveScroll"),cb=u.forwardRef((e,t)=>{const n=St(rn,e.__scopePopover),r=u.useRef(null),o=ce(t,r),a=u.useRef(!1);return u.useEffect(()=>{const s=r.current;if(s)return gr(s)},[]),p.jsx(Sn,{as:lb,allowPinchZoom:!0,children:p.jsx(mc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:L(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),db=u.forwardRef((e,t)=>{const n=St(rn,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return p.jsx(mc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),mc=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,...d}=e,h=St(rn,n),m=Pn(n);return lr(),p.jsx(Cn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(Or,{"data-state":bc(h.open),role:"dialog",id:h.contentId,...m,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),gc="PopoverClose",vc=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(gc,n);return p.jsx(Z.button,{type:"button",...r,ref:t,onClick:L(e.onClick,()=>o.onOpenChange(!1))})});vc.displayName=gc;var ub="PopoverArrow",fb=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pn(n);return p.jsx(_r,{...o,...r,ref:t})});fb.displayName=ub;function bc(e){return e?"open":"closed"}var pb=lc,hb=dc,mb=fc,gb=pc,yc=hc,vb=vc;const on=pb,Ir=mb,bb=vb,yb=hb,Wt=u.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>p.jsx(gb,{children:p.jsx(yc,{ref:o,align:t,sideOffset:n,className:O("z-50 rounded-lg ring-1 ring-border/60 bg-background p-4 shadow-md outline-none","origin-(--radix-popover-content-transform-origin)","data-[state=open]:animate-popover-in","data-[state=closed]:animate-popover-out",e),...r})}));Wt.displayName=yc.displayName;const wc=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>p.jsxs(on,{...s,children:[p.jsx(Ir,{asChild:!0,children:t}),p.jsx(Wt,{side:n,align:r,sideOffset:o,className:a,children:e})]});wc.displayName="Popover";const xc=be(["w-full flex items-center justify-between gap-2","rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),oa=u.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>p.jsxs("button",{ref:s,type:"button",className:O(xc({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[p.jsx("span",{className:O("truncate",!o&&"text-muted-foreground"),children:o??r}),p.jsx(zt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));oa.displayName="ComboBoxTrigger";const Cc=u.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>p.jsx(Wt,{ref:s,className:O("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:p.jsxs(yr,{className:"w-full",value:r,onValueChange:o,children:[p.jsx("div",{className:"border-b border-border",children:p.jsx(Ro,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),p.jsx(Yo,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Cc.displayName="ComboBoxContent";const Sc=u.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>p.jsxs(Lo,{ref:a,className:O("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),onSelect:r,...o,children:[p.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&p.jsx(yn,{className:"size-4","aria-hidden":"true"})}),t]}));Sc.displayName="ComboBoxItem";const Nc=u.forwardRef(({className:e,children:t,...n},r)=>p.jsx(zo,{ref:r,className:O("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Nc.displayName="ComboBoxEmpty";const Mc=u.forwardRef(({className:e,heading:t,children:n,...r},o)=>p.jsx(Ml,{ref:o,heading:t,className:O("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",e),...r,children:n}));Mc.displayName="ComboBoxGroup";const Ec=u.forwardRef(({className:e,...t},n)=>p.jsx(El,{ref:n,className:O("-mx-1 my-1 h-px bg-border",e),...t}));Ec.displayName="ComboBoxSeparator";const kc=on;kc.displayName="ComboBoxRoot";const Dc=u.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",searchPlaceholder:o="Search…",emptyMessage:a="No results found.",size:s,isError:i,disabled:l,className:c},f)=>{const[d,h]=u.useState(!1),[m,w]=u.useState(""),g=u.useMemo(()=>{var y;return(y=e.find(b=>b.value===t))==null?void 0:y.label},[e,t]);function v(y){h(y),y||w("")}return p.jsxs(on,{open:d,onOpenChange:v,children:[p.jsx(Ir,{asChild:!0,children:p.jsx(oa,{ref:f,size:s,isError:i,disabled:l,className:c,placeholder:r,"aria-expanded":d,"aria-haspopup":"listbox",children:g})}),p.jsx(Wt,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:p.jsxs(yr,{className:"w-full",children:[p.jsx("div",{className:"border-b border-border",children:p.jsx(Ro,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:m,onValueChange:w})}),p.jsxs(Yo,{className:"max-h-60 overflow-y-auto p-1",children:[p.jsx(zo,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(y=>p.jsxs(Lo,{value:y.label,disabled:y.disabled,className:O("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),onSelect:()=>{n==null||n(y.value),h(!1)},children:[p.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===y.value&&p.jsx(yn,{className:"size-4","aria-hidden":"true"})}),y.label]},y.value))]})]})})]})});Dc.displayName="ComboBox";/**
|
|
126
|
-
* react-table
|
|
127
|
-
*
|
|
128
|
-
* Copyright (c) TanStack
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the MIT license found in the
|
|
131
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
132
|
-
*
|
|
133
|
-
* @license MIT
|
|
134
|
-
*/function aa(e,t){return e?wb(e)?u.createElement(e,t):e:null}function wb(e){return xb(e)||typeof e=="function"||Cb(e)}function xb(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Cb(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const sa=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{className:"w-full overflow-x-auto",children:p.jsx("table",{ref:n,className:O("w-full caption-bottom text-sm",e),...t})}));sa.displayName="Table";const ia=u.forwardRef(({className:e,...t},n)=>p.jsx("thead",{ref:n,className:O("[&_tr]:border-b [&_tr]:border-border",e),...t}));ia.displayName="TableHeader";const la=u.forwardRef(({className:e,...t},n)=>p.jsx("tbody",{ref:n,className:O("[&_tr:last-child]:border-0",e),...t}));la.displayName="TableBody";const Tc=u.forwardRef(({className:e,...t},n)=>p.jsx("tfoot",{ref:n,className:O("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));Tc.displayName="TableFooter";const an=u.forwardRef(({className:e,...t},n)=>p.jsx("tr",{ref:n,className:O("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));an.displayName="TableRow";const ca=u.forwardRef(({className:e,...t},n)=>p.jsx("th",{ref:n,className:O("h-10 px-4 text-left align-middle","text-xs font-medium text-muted-foreground uppercase tracking-wide","whitespace-nowrap","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));ca.displayName="TableHead";const On=u.forwardRef(({className:e,...t},n)=>p.jsx("td",{ref:n,className:O("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));On.displayName="TableCell";const Pc=u.forwardRef(({className:e,...t},n)=>p.jsx("caption",{ref:n,className:O("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Pc.displayName="TableCaption";const da=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:O("animate-pulse rounded-md bg-muted",e),...t}));da.displayName="Skeleton";function Sb({table:e,isLoading:t=!1,loadingRows:n=5,emptyState:r,className:o,...a},s){const i=e.getAllColumns().length,l=e.getRowModel().rows;return p.jsx("div",{ref:s,className:O("w-full overflow-x-auto",o),...a,children:p.jsxs(sa,{children:[p.jsx(ia,{children:e.getHeaderGroups().map(c=>p.jsx(an,{children:c.headers.map(f=>{const d=f.column.getCanSort(),h=f.column.getIsSorted();return p.jsx(ca,{colSpan:f.colSpan,className:O(d&&"cursor-pointer select-none"),onClick:d?f.column.getToggleSortingHandler():void 0,children:f.isPlaceholder?null:d?p.jsxs("span",{className:"flex items-center gap-1.5",children:[aa(f.column.columnDef.header,f.getContext()),p.jsxs("span",{className:"relative size-3.5 shrink-0",children:[p.jsx(wh,{className:O("absolute inset-0 size-3.5 text-muted-foreground","transition-[opacity,scale] duration-150 ease-out",h?"scale-50 opacity-0":"scale-100 opacity-100"),"aria-hidden":"true"}),p.jsx(Xs,{className:O("absolute inset-0 size-3.5","transition-[opacity,scale] duration-150 ease-out",h==="asc"?"scale-100 opacity-100":"scale-50 opacity-0"),"aria-hidden":"true"}),p.jsx(zt,{className:O("absolute inset-0 size-3.5","transition-[opacity,scale] duration-150 ease-out",h==="desc"?"scale-100 opacity-100":"scale-50 opacity-0"),"aria-hidden":"true"})]})]}):aa(f.column.columnDef.header,f.getContext())},f.id)})},c.id))}),p.jsx(la,{children:t?Array.from({length:n}).map((c,f)=>p.jsx(an,{children:p.jsx(On,{colSpan:i,children:p.jsx(da,{className:"h-4 w-full"})})},f)):l.length===0?p.jsx(an,{children:p.jsx(On,{colSpan:i,className:"h-24 text-center text-sm text-muted-foreground",children:r??"No results."})}):l.map(c=>p.jsx(an,{"data-selected":c.getIsSelected()?"true":void 0,children:c.getVisibleCells().map(f=>p.jsx(On,{children:aa(f.column.columnDef.cell,f.getContext())},f.id))},c.id))})]})})}const Oc=u.forwardRef(Sb);Oc.displayName="DataTable";const _c=6048e5,Nb=864e5,Ac=Symbol.for("constructDateFrom");function ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ac in e?e[Ac](t):e instanceof Date?new e.constructor(t):new Date(t)}function fe(e,t){return ve(t||e,e)}function Ic(e,t,n){const r=fe(e,n==null?void 0:n.in);return isNaN(t)?ve(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Wc(e,t,n){const r=fe(e,n==null?void 0:n.in);if(isNaN(t))return ve(e,NaN);if(!t)return r;const o=r.getDate(),a=ve(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Mb={};function _n(){return Mb}function sn(e,t){var i,l,c,f;const n=_n(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,o=fe(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function An(e,t){return sn(e,{...t,weekStartsOn:1})}function Fc(e,t){const n=fe(e,t==null?void 0:t.in),r=n.getFullYear(),o=ve(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=An(o),s=ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=An(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function $c(e){const t=fe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ln(e,...t){const n=ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function In(e,t){const n=fe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ua(e,t,n){const[r,o]=ln(n==null?void 0:n.in,e,t),a=In(r),s=In(o),i=+a-$c(a),l=+s-$c(s);return Math.round((i-l)/Nb)}function Eb(e,t){const n=Fc(e,t),r=ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),An(r)}function kb(e,t,n){return Ic(e,t*7,n)}function Db(e,t,n){return Wc(e,t*12,n)}function Tb(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ve.bind(null,o));const a=fe(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ve(r,n||NaN)}function Pb(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ve.bind(null,o));const a=fe(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ve(r,n||NaN)}function Ob(e,t,n){const[r,o]=ln(n==null?void 0:n.in,e,t);return+In(r)==+In(o)}function Bc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _b(e){return!(!Bc(e)&&typeof e!="number"||isNaN(+fe(e)))}function Lc(e,t,n){const[r,o]=ln(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Ab(e,t){const n=fe(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Rc(e,t){const[n,r]=ln(e,t.start,t.end);return{start:n,end:r}}function Ib(e,t){const{start:n,end:r}=Rc(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(ve(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function Wb(e,t){const n=fe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Fb(e,t){const n=fe(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Yc(e,t){const n=fe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $b(e,t){const{start:n,end:r}=Rc(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const l=[];for(;+s<=a;)l.push(ve(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function zc(e,t){var i,l,c,f;const n=_n(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,o=fe(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function Bb(e,t){return zc(e,{...t,weekStartsOn:1})}const Lb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Rb=(e,t,n)=>{let r;const o=Lb[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function fa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Hb={date:fa({formats:Yb,defaultWidth:"full"}),time:fa({formats:zb,defaultWidth:"full"}),dateTime:fa({formats:Vb,defaultWidth:"full"})},Gb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jb=(e,t,n,r)=>Gb[e];function Wn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Ub={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Jb={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Wn({values:Ub,defaultWidth:"wide"}),quarter:Wn({values:Kb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wn({values:qb,defaultWidth:"wide"}),day:Wn({values:Xb,defaultWidth:"wide"}),dayPeriod:Wn({values:Zb,defaultWidth:"wide",formattingValues:Qb,defaultFormattingWidth:"wide"})};function Fn(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?ty(i,d=>d.test(s)):ey(i,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(s.length);return{value:c,rest:f}}}function ey(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ty(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ny(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const ry=/^(\d+)(th|st|nd|rd)?/i,oy=/\d+/i,ay={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},sy={any:[/^b/i,/^(a|c)/i]},iy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ly={any:[/1/i,/2/i,/3/i,/4/i]},cy={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},py={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},my={ordinalNumber:ny({matchPattern:ry,parsePattern:oy,valueCallback:e=>parseInt(e,10)}),era:Fn({matchPatterns:ay,defaultMatchWidth:"wide",parsePatterns:sy,defaultParseWidth:"any"}),quarter:Fn({matchPatterns:iy,defaultMatchWidth:"wide",parsePatterns:ly,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fn({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),day:Fn({matchPatterns:uy,defaultMatchWidth:"wide",parsePatterns:fy,defaultParseWidth:"any"}),dayPeriod:Fn({matchPatterns:py,defaultMatchWidth:"any",parsePatterns:hy,defaultParseWidth:"any"})},cn={code:"en-US",formatDistance:Rb,formatLong:Hb,formatRelative:jb,localize:Jb,match:my,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gy(e,t){const n=fe(e,t==null?void 0:t.in);return ua(n,Yc(n))+1}function pa(e,t){const n=fe(e,t==null?void 0:t.in),r=+An(n)-+Eb(n);return Math.round(r/_c)+1}function Vc(e,t){var f,d,h,m;const n=fe(e,t==null?void 0:t.in),r=n.getFullYear(),o=_n(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(h=o.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=ve((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=sn(s,t),l=ve((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=sn(l,t);return+n>=+i?r+1:+n>=+c?r:r-1}function vy(e,t){var i,l,c,f;const n=_n(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,o=Vc(e,t),a=ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),sn(a,t)}function ha(e,t){const n=fe(e,t==null?void 0:t.in),r=+sn(n,t)-+vy(n,t);return Math.round(r/_c)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Nt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ue(n+1,2)},d(e,t){return ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ue(e.getHours()%12||12,t.length)},H(e,t){return ue(e.getHours(),t.length)},m(e,t){return ue(e.getMinutes(),t.length)},s(e,t){return ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ue(o,t.length)}},dn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Hc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Nt.y(e,t)},Y:function(e,t,n,r){const o=Vc(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ue(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ue(a,t.length)},R:function(e,t){const n=Fc(e);return ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Nt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ha(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=pa(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Nt.d(e,t)},D:function(e,t,n){const r=gy(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ue(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ue(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ue(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=dn.noon:r===0?o=dn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=dn.evening:r>=12?o=dn.afternoon:r>=4?o=dn.morning:o=dn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Nt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Nt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Nt.s(e,t)},S:function(e,t){return Nt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jc(r);case"XXXX":case"XX":return Ft(r);case"XXXXX":case"XXX":default:return Ft(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jc(r);case"xxxx":case"xx":return Ft(r);case"xxxxx":case"xxx":default:return Ft(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Gc(r,":");case"OOOO":default:return"GMT"+Ft(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Gc(r,":");case"zzzz":default:return"GMT"+Ft(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ue(r,t.length)},T:function(e,t,n){return ue(+e,t.length)}};function Gc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ue(a,2)}function jc(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):Ft(e,t)}function Ft(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ue(Math.trunc(r/60),2),a=ue(r%60,2);return n+o+t+a}const Uc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Kc=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},by={p:Kc,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Uc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Uc(r,t)).replace("{{time}}",Kc(o,t))}},yy=/^D+$/,wy=/^Y+$/,xy=["D","DD","YY","YYYY"];function Cy(e){return yy.test(e)}function Sy(e){return wy.test(e)}function Ny(e,t,n){const r=My(e,t,n);if(console.warn(r),xy.includes(e))throw new RangeError(r)}function My(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ey=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ky=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dy=/^'([^]*?)'?$/,Ty=/''/g,Py=/[a-zA-Z]/;function un(e,t,n){var f,d,h,m,w,g,v,y;const r=_n(),o=(n==null?void 0:n.locale)??r.locale??cn,a=(n==null?void 0:n.firstWeekContainsDate)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(v=r.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0,i=fe(e,n==null?void 0:n.in);if(!_b(i))throw new RangeError("Invalid time value");let l=t.match(ky).map(b=>{const x=b[0];if(x==="p"||x==="P"){const N=by[x];return N(b,o.formatLong)}return b}).join("").match(Ey).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const x=b[0];if(x==="'")return{isToken:!1,value:Oy(b)};if(Hc[x])return{isToken:!0,value:b};if(x.match(Py))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(b=>{if(!b.isToken)return b.value;const x=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Sy(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Cy(x))&&Ny(x,t,String(e));const N=Hc[x[0]];return N(i,x,o.localize,c)}).join("")}function Oy(e){const t=e.match(Dy);return t?t[1].replace(Ty,"'"):e}function _y(e,t){const n=fe(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ve(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Ay(e,t){return fe(e,t==null?void 0:t.in).getMonth()}function Iy(e,t){return fe(e,t==null?void 0:t.in).getFullYear()}function Wy(e,t){return+fe(e)>+fe(t)}function Fy(e,t){return+fe(e)<+fe(t)}function $y(e,t,n){const[r,o]=ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function By(e,t,n){const[r,o]=ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Ly(e,t,n){const r=fe(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=ve(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=_y(s);return r.setMonth(t,Math.min(a,i)),r}function Ry(e,t,n){const r=fe(e,n==null?void 0:n.in);return isNaN(+r)?ve(e,NaN):(r.setFullYear(t),r)}function Yy(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const ma={},$n={};function $t(e,t){try{const r=(ma[e]||(ma[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in $n?$n[r]:qc(r,r.split(":"))}catch{if(e in $n)return $n[e];const n=e==null?void 0:e.match(zy);return n?qc(e,n.slice(1)):NaN}}const zy=/([+-]\d\d):?(\d\d)?/;function qc(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return $n[e]=n*60+r>0?n*60+r+o:n*60-r-o}class rt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN($t(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Zc(this),ga(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new rt(...n,t):new rt(Date.now(),t)}withTimeZone(t){return new rt(+this,t)}getTimezoneOffset(){const t=-$t(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new rt(+new Date(t),this.timeZone)}}const Xc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Xc.test(e))return;const t=e.replace(Xc,"$1UTC");rt.prototype[t]&&(e.startsWith("get")?rt.prototype[e]=function(){return this.internal[t]()}:(rt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Vy(this),+this},rt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ga(this),+this}))});function ga(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-$t(e.timeZone,e)*60))}function Vy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Zc(e)}function Zc(e){const t=$t(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),s=o-a,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=new Date(+e);c.setUTCSeconds(0);const f=o>0?c.getSeconds():(c.getSeconds()-60)%60,d=Math.round(-($t(e.timeZone,e)*60))%60;(d||f)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+f));const h=$t(e.timeZone,e),m=h>0?Math.floor(h):Math.ceil(h),g=-new Date(+e).getTimezoneOffset()-m,v=m!==n,y=g-l;if(v&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const b=$t(e.timeZone,e),x=b>0?Math.floor(b):Math.ceil(b),N=m-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Ce extends rt{static tz(t,...n){return n.length?new Ce(...n,t):new Ce(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Yy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ce(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ce(+new Date(t),this.timeZone)}}const Qc=5,Hy=4;function Gy(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Qc*7-1);return t.getMonth(e)===t.getMonth(a)?Qc:Hy}function Jc(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function jy(e,t){const n=Jc(e,t),r=Gy(e,t);return t.addDays(n,r*7-1)}const ed={...cn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>un(s,i,{locale:cn,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>un(o,a,{locale:cn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>un(s,i,{locale:cn,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>un(o,a,{locale:cn,...t}),r(e,"cccc")}}};class Ae{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ce.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ce(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Ic(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Wc(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):kb(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Db(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ua(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Lc(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Ib(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):$b(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):jy(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Bb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Ab(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):zc(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Fb(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):un(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):pa(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Ay(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Iy(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):ha(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Wy(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Fy(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Bc(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Ob(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):$y(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):By(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Tb(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Pb(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Ly(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Ry(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Jc(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):In(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):An(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Wb(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):sn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Yc(r)},this.options={locale:ed,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Ae.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&Ae.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Ae.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const ot=new Ae;class td{constructor(t,n,r=ot){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Uy{constructor(t,n){this.date=t,this.weeks=n}}class Ky{constructor(t,n){this.days=n,this.weekNumber=t}}function qy(e){return S.createElement("button",{...e})}function Xy(e){return S.createElement("span",{...e})}function Zy(e){const{size:t=24,orientation:n="left",className:r}=e;return S.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&S.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&S.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&S.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&S.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Qy(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function Jy(e){const{day:t,modifiers:n,...r}=e,o=S.useRef(null);return S.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),S.createElement("button",{ref:o,...r})}var q;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(q||(q={}));var he;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(he||(he={}));var je;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(je||(je={}));var Ie;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ie||(Ie={}));function ew(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[q.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return S.createElement("span",{"data-disabled":a.disabled,className:o[q.DropdownRoot]},S.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:c,disabled:f})=>S.createElement(r.Option,{key:l,value:l,disabled:f},c))),S.createElement("span",{className:o[q.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,S.createElement(r.Chevron,{orientation:"down",size:18,className:o[q.Chevron]})))}function tw(e){return S.createElement("div",{...e})}function nw(e){return S.createElement("div",{...e})}function rw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function ow(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function aw(e){return S.createElement("table",{...e})}function sw(e){return S.createElement("div",{...e})}const nd=S.createContext(void 0);function Bn(){const e=S.useContext(nd);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function iw(e){const{components:t}=Bn();return S.createElement(t.Dropdown,{...e})}function lw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:c}}=Bn(),f=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),d=S.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return S.createElement("nav",{...a},S.createElement(s.PreviousMonthButton,{type:"button",className:i[q.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:d},S.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[q.Chevron],orientation:"left"})),S.createElement(s.NextMonthButton,{type:"button",className:i[q.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:f},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[q.Chevron]})))}function cw(e){const{components:t}=Bn();return S.createElement(t.Button,{...e})}function dw(e){return S.createElement("option",{...e})}function uw(e){const{components:t}=Bn();return S.createElement(t.Button,{...e})}function fw(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function pw(e){return S.createElement("select",{...e})}function hw(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function mw(e){return S.createElement("th",{...e})}function gw(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function vw(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function bw(e){return S.createElement("th",{...e})}function yw(e){return S.createElement("tbody",{...e})}function ww(e){const{components:t}=Bn();return S.createElement(t.Dropdown,{...e})}const xw=Object.freeze(Object.defineProperty({__proto__:null,Button:qy,CaptionLabel:Xy,Chevron:Zy,Day:Qy,DayButton:Jy,Dropdown:ew,DropdownNav:tw,Footer:nw,Month:rw,MonthCaption:ow,MonthGrid:aw,Months:sw,MonthsDropdown:iw,Nav:lw,NextMonthButton:cw,Option:dw,PreviousMonthButton:uw,Root:fw,Select:pw,Week:hw,WeekNumber:vw,WeekNumberHeader:bw,Weekday:mw,Weekdays:gw,Weeks:yw,YearsDropdown:ww},Symbol.toStringTag,{value:"Module"}));function pt(e,t,n=!1,r=ot){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function va(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Wr(e){return!!(e&&typeof e=="object"&&"from"in e)}function ba(e){return!!(e&&typeof e=="object"&&"after"in e)}function ya(e){return!!(e&&typeof e=="object"&&"before"in e)}function rd(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function od(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ht(e,t,n=ot){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(od(i,n))return i.some(l=>o(e,l));if(Wr(i))return pt(i,e,!1,n);if(rd(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(va(i)){const l=a(i.before,e),c=a(i.after,e),f=l>0,d=c<0;return s(i.before,i.after)?d&&f:f||d}return ba(i)?a(e,i.after)>0:ya(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function Cw(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:c,today:f=o.today()}=t,{isSameDay:d,isSameMonth:h,startOfMonth:m,isBefore:w,endOfMonth:g,isAfter:v}=o,y=n&&m(n),b=r&&g(r),x={[he.focused]:[],[he.outside]:[],[he.disabled]:[],[he.hidden]:[],[he.today]:[]},N={};for(const M of e){const{date:C,displayMonth:E}=M,T=!!(E&&!h(C,E)),R=!!(y&&w(C,y)),F=!!(b&&v(C,b)),H=!!(a&&ht(C,a,o)),$=!!(s&&ht(C,s,o))||R||F||!c&&!l&&T||c&&l===!1&&T,j=d(C,f);T&&x.outside.push(M),H&&x.disabled.push(M),$&&x.hidden.push(M),j&&x.today.push(M),i&&Object.keys(i).forEach(V=>{const ne=i==null?void 0:i[V];ne&&ht(C,ne,o)&&(N[V]?N[V].push(M):N[V]=[M])})}return M=>{const C={[he.focused]:!1,[he.disabled]:!1,[he.hidden]:!1,[he.outside]:!1,[he.today]:!1},E={};for(const T in x){const R=x[T];C[T]=R.some(F=>F===M)}for(const T in N)E[T]=N[T].some(R=>R===M);return{...C,...E}}}function Sw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[he[a]]?o.push(t[he[a]]):t[je[a]]&&o.push(t[je[a]]),o),[t[q.Day]])}function Nw(e){return{...xw,...e}}function Mw(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Ew(){const e={};for(const t in q)e[q[t]]=`rdp-${q[t]}`;for(const t in he)e[he[t]]=`rdp-${he[t]}`;for(const t in je)e[je[t]]=`rdp-${je[t]}`;for(const t in Ie)e[Ie[t]]=`rdp-${Ie[t]}`;return e}function ad(e,t,n){return(n??new Ae(t)).formatMonthYear(e)}const kw=ad;function Dw(e,t,n){return(n??new Ae(t)).format(e,"d")}function Tw(e,t=ot){return t.format(e,"LLLL")}function Pw(e,t,n){return(n??new Ae(t)).format(e,"cccccc")}function Ow(e,t=ot){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function _w(){return""}function sd(e,t=ot){return t.format(e,"yyyy")}const Aw=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:ad,formatDay:Dw,formatMonthCaption:kw,formatMonthDropdown:Tw,formatWeekNumber:Ow,formatWeekNumberHeader:_w,formatWeekdayName:Pw,formatYearCaption:sd,formatYearDropdown:sd},Symbol.toStringTag,{value:"Module"}));function Iw(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Aw,...e}}function wa(e,t,n,r){let o=(r??new Ae(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ww=wa;function xa(e,t,n){return(n??new Ae(t)).formatMonthYear(e)}const Fw=xa;function id(e,t,n,r){let o=(r??new Ae(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ld(e){return"Choose the Month"}function cd(){return""}const $w="Go to the Next Month";function dd(e,t){return $w}function ud(e){return"Go to the Previous Month"}function fd(e,t,n){return(n??new Ae(t)).format(e,"cccc")}function pd(e,t){return`Week ${e}`}function hd(e){return"Week Number"}function md(e){return"Choose the Year"}const Bw=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Fw,labelDay:Ww,labelDayButton:wa,labelGrid:xa,labelGridcell:id,labelMonthDropdown:ld,labelNav:cd,labelNext:dd,labelPrevious:ud,labelWeekNumber:pd,labelWeekNumberHeader:hd,labelWeekday:fd,labelYearDropdown:md},Symbol.toStringTag,{value:"Module"})),Ue=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function Lw(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...Bw,...e??{},labelDayButton:Ue(wa,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:Ue(ld,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:Ue(dd,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:Ue(ud,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:Ue(pd,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Ue(md,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:Ue(xa,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:Ue(id,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:Ue(cd,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:Ue(hd,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Ue(fd,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function Rw(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:c}=o;return l({start:s(e),end:i(e)}).map(h=>{const m=r.formatMonthDropdown(h,o),w=c(h),g=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:m,disabled:g}})}function Yw(e,t={},n={}){let r={...t==null?void 0:t[q.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function zw(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let i=0;i<7;i++){const l=e.addDays(a,i);s.push(l)}return s}function Vw(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,c=a(e),f=s(t),d=i({start:c,end:f});return o&&d.reverse(),d.map(h=>{const m=n.formatYearDropdown(h,r);return{value:l(h),label:m,disabled:!1}})}function Hw(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,o=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,a=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ce(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},s=l=>{const c=a(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>a(Ce.tz(e)),newDate:(l,c,f)=>new Ce(l,c,f,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,c)=>{const f=a(l),d=(c==null?void 0:c.weekStartsOn)??o,h=(f.getDay()-d+7)%7;return f.setDate(f.getDate()-h),f},startOfISOWeek:l=>{const c=a(l),f=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-f),c},startOfMonth:l=>{const c=a(l);return c.setDate(1),c},startOfYear:l=>{const c=a(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const f=a(l),m=((((c==null?void 0:c.weekStartsOn)??o)+6)%7-f.getDay()+7)%7;return f.setDate(f.getDate()+m),f},endOfISOWeek:l=>{const c=a(l),f=(7-c.getDay())%7;return c.setDate(c.getDate()+f),c},endOfMonth:l=>{const c=a(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=a(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=a(l.start),f=a(l.end),d=[],h=new Ce(c.getFullYear(),c.getMonth(),1,12,0,0,e),m=f.getFullYear()*12+f.getMonth();for(;h.getFullYear()*12+h.getMonth()<=m;)d.push(new Ce(h,e)),h.setMonth(h.getMonth()+1,1);return d},addDays:(l,c)=>{const f=a(l);return f.setDate(f.getDate()+c),f},addWeeks:(l,c)=>{const f=a(l);return f.setDate(f.getDate()+c*7),f},addMonths:(l,c)=>{const f=a(l);return f.setMonth(f.getMonth()+c),f},addYears:(l,c)=>{const f=a(l);return f.setFullYear(f.getFullYear()+c),f},eachYearOfInterval:l=>{const c=a(l.start),f=a(l.end),d=[],h=new Ce(c.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=f.getFullYear();)d.push(new Ce(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return d},getWeek:(l,c)=>{var d;const f=s(l);return ha(f,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??o,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((d=r==null?void 0:r.options)==null?void 0:d.firstWeekContainsDate)??1})},getISOWeek:l=>{const c=s(l);return pa(c)},differenceInCalendarDays:(l,c)=>{const f=s(l),d=s(c);return ua(f,d)},differenceInCalendarMonths:(l,c)=>{const f=s(l),d=s(c);return Lc(f,d)}}}const Ln=e=>e instanceof HTMLElement?e:null,Ca=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Gw=e=>Ln(e.querySelector("[data-animated-month]")),Sa=e=>Ln(e.querySelector("[data-animated-caption]")),Na=e=>Ln(e.querySelector("[data-animated-weeks]")),jw=e=>Ln(e.querySelector("[data-animated-nav]")),Uw=e=>Ln(e.querySelector("[data-animated-weekdays]"));function Kw(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=S.useRef(null),i=S.useRef(r),l=S.useRef(!1);S.useLayoutEffect(()=>{const c=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const f=a.isSameMonth(r[0].date,c[0].date),d=a.isAfter(r[0].date,c[0].date),h=d?n[Ie.caption_after_enter]:n[Ie.caption_before_enter],m=d?n[Ie.weeks_after_enter]:n[Ie.weeks_before_enter],w=s.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Ca(g).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=Gw(x);N&&x.contains(N)&&x.removeChild(N);const M=Sa(x);M&&M.classList.remove(h);const C=Na(x);C&&C.classList.remove(m)}),s.current=g):s.current=null,l.current||f||o)return;const v=w instanceof HTMLElement?Ca(w):[],y=Ca(e.current);if(y!=null&&y.every(b=>b instanceof HTMLElement)&&v&&v.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=jw(e.current);b&&(b.style.zIndex="1"),y.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=Sa(x);C&&C.classList.add(h);const E=Na(x);E&&E.classList.add(m);const T=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),C&&C.classList.remove(h),E&&E.classList.remove(m),x.style.position="",x.style.overflow="",x.contains(M)&&x.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const R=Uw(M);R&&(R.style.opacity="0");const F=Sa(M);F&&(F.classList.add(d?n[Ie.caption_before_exit]:n[Ie.caption_after_exit]),F.addEventListener("animationend",T));const H=Na(M);H&&H.classList.add(d?n[Ie.weeks_before_exit]:n[Ie.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function qw(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:f,differenceInCalendarMonths:d,endOfBroadcastWeek:h,endOfISOWeek:m,endOfMonth:w,endOfWeek:g,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:x}=r,N=l?y(o,r):s?b(o):x(o),M=l?h(a):s?m(w(a)):g(w(a)),C=t&&(l?h(t):s?m(t):g(t)),E=C&&v(M,C)?C:M,T=f(E,N),R=d(a,o)+1,F=[];for(let j=0;j<=T;j++){const V=c(N,j);F.push(V)}const $=(l?35:42)*R;if(i&&F.length<$){const j=$-F.length;for(let V=0;V<j;V++){const ne=c(F[F.length-1],1);F.push(ne)}}return F}function Xw(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function Zw(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function gd(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:c,addMonths:f,startOfMonth:d}=r;if(n&&c(n,l)<i-1){const h=-1*(i-1);l=f(n,h)}return t&&c(l,t)<0&&(l=t),d(l)}function Qw(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:c,getWeek:f,startOfBroadcastWeek:d,startOfISOWeek:h,startOfWeek:m}=r,w=e.reduce((g,v)=>{const y=n.broadcastCalendar?d(v,r):n.ISOWeek?h(v):m(v),b=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(E=>E>=y&&E<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const E=t.filter(T=>{const R=N-x.length;return T>b&&T<=o(b,R)});x.push(...E)}const M=x.reduce((E,T)=>{const R=n.ISOWeek?c(T):f(T),F=E.find($=>$.weekNumber===R),H=new td(T,v,r);return F?F.days.push(H):E.push(new Ky(R,[H])),E},[]),C=new Uy(v,M);return g.push(C),g},[]);return n.reverseMonths?w.reverse():w}function Jw(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:c,newDate:f,today:d}=t,{fromYear:h,toYear:m,fromMonth:w,toMonth:g}=e;!n&&w&&(n=w),!n&&h&&(n=t.newDate(h,0,1)),!r&&g&&(r=g),!r&&m&&(r=f(m,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):h?n=f(h,0,1):!n&&v&&(n=o(l(e.today??d(),-100))),r?r=i(r):m?r=f(m,11,31):!r&&v&&(r=c(e.today??d())),[n&&a(n),r&&a(r)]}function e0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,c=o?a:1,f=s(e);if(!t)return i(f,c);if(!(l(t,e)<a))return i(f,c)}function t0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,c=o?a??1:1,f=s(e);if(!t)return i(f,-c);if(!(l(f,t)<=0))return i(f,-c)}function n0(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Fr(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function r0(e,t){var N;const[n,r]=Jw(e,t),{startOfMonth:o,endOfMonth:a}=t,s=gd(e,n,r,t),[i,l]=Fr(s,e.month?s:void 0);S.useEffect(()=>{const M=gd(e,n,r,t);l(M)},[e.timeZone]);const{months:c,weeks:f,days:d,previousMonth:h,nextMonth:m}=S.useMemo(()=>{const M=Zw(i,r,{numberOfMonths:e.numberOfMonths},t),C=qw(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),E=Qw(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),T=n0(E),R=Xw(E),F=t0(i,n,e,t),H=e0(i,r,e,t);return{months:E,weeks:T,days:R,previousMonth:F,nextMonth:H}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:g}=e,v=M=>f.some(C=>C.days.some(E=>E.isEqualTo(M))),y=M=>{if(w)return;let C=o(M);n&&C<o(n)&&(C=o(n)),r&&C>o(r)&&(C=o(r)),l(C),g==null||g(C)};return{months:c,weeks:f,days:d,navStart:n,navEnd:r,previousMonth:h,nextMonth:m,goToMonth:y,goToDay:M=>{v(M)||y(M.date)}}}var at;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(at||(at={}));function vd(e){return!e[he.disabled]&&!e[he.hidden]&&!e[he.outside]}function o0(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);vd(i)&&(i[he.focused]&&a<at.FocusedModifier?(o=s,a=at.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<at.LastFocused?(o=s,a=at.LastFocused):n(s.date)&&a<at.Selected?(o=s,a=at.Selected):i[he.today]&&a<at.Today&&(o=s,a=at.Today))}return o||(o=e.find(s=>vd(t(s)))),o}function a0(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:c,addMonths:f,addWeeks:d,addYears:h,endOfBroadcastWeek:m,endOfISOWeek:w,endOfWeek:g,max:v,min:y,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:N}=s;let C={day:c,week:d,month:f,year:h,startOfWeek:E=>l?b(E,s):i?x(E):N(E),endOfWeek:E=>l?m(E):i?w(E):g(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?C=v([r,C]):t==="after"&&o&&(C=y([o,C])),C}function bd(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=a0(e,t,n.date,r,o,a,s),c=!!(a.disabled&&ht(l,a.disabled,s)),f=!!(a.hidden&&ht(l,a.hidden,s)),d=l,h=new td(l,d,s);return!c&&!f?h:bd(e,t,h,r,o,a,s,i+1)}function s0(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=o0(t.days,n,r||(()=>!1),s),[c,f]=S.useState(a?l:void 0);return{isFocusTarget:g=>!!(l!=null&&l.isEqualTo(g)),setFocused:f,focused:c,blur:()=>{i(c),f(void 0)},moveFocus:(g,v)=>{if(!c)return;const y=bd(g,v,c,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(y))||(t.goToDay(y),f(y)))}}}function i0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Fr(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,c=m=>(i==null?void 0:i.some(w=>l(w,m)))??!1,{min:f,max:d}=e;return{selected:i,select:(m,w,g)=>{let v=[...i??[]];if(c(m)){if((i==null?void 0:i.length)===f||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(y=>!l(y,m))}else(i==null?void 0:i.length)===d?v=[m]:v=[...v,m];return o||s(v),o==null||o(v,m,w,g),v},isSelected:c}}function l0(e,t,n=0,r=0,o=!1,a=ot){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:c,isBefore:f}=a;let d;if(!s&&!i)d={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?d={from:s,to:e}:o?d={from:s,to:void 0}:d=void 0:f(e,s)?d={from:e,to:s}:d={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?d={from:s,to:i}:d=void 0;else if(l(s,e))d={from:s,to:n>0?void 0:e};else if(l(i,e))d={from:e,to:n>0?void 0:e};else if(f(e,s))d={from:e,to:i};else if(c(e,s))d={from:s,to:e};else if(c(e,i))d={from:s,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const h=a.differenceInCalendarDays(d.to,d.from);r>0&&h>r?d={from:e,to:void 0}:n>1&&h<n&&(d={from:e,to:void 0})}return d}function c0(e,t,n=ot){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function yd(e,t,n=ot){return pt(e,t.from,!1,n)||pt(e,t.to,!1,n)||pt(t,e.from,!1,n)||pt(t,e.to,!1,n)}function d0(e,t,n=ot){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?pt(e,i,!1,n):od(i,n)?i.some(l=>pt(e,l,!1,n)):Wr(i)?i.from&&i.to?yd(e,{from:i.from,to:i.to},n):!1:rd(i)?c0(e,i.dayOfWeek,n):va(i)?n.isAfter(i.before,i.after)?yd(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):ht(e.from,i,n)||ht(e.to,i,n):ba(i)||ya(i)?ht(e.from,i,n)||ht(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(s.some(f=>f(i)))return!0;i=n.addDays(i,1)}}return!1}function u0(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,c]=Fr(a,i?a:void 0),f=i?a:l;return{selected:f,select:(m,w,g)=>{const{min:v,max:y}=e;let b;if(m){const x=f==null?void 0:f.from,N=f==null?void 0:f.to,M=!!x&&!!N,C=!!x&&!!N&&t.isSameDay(x,N)&&t.isSameDay(m,x);o&&(M||!(f!=null&&f.from))?!s&&C?b=void 0:b={from:m,to:void 0}:b=l0(m,f,v,y,s,t)}return r&&n&&(b!=null&&b.from)&&b.to&&d0({from:b.from,to:b.to},n,t)&&(b.from=m,b.to=void 0),i||c(b),i==null||i(b,m,w,g),b},isSelected:m=>f&&pt(f,m,!1,t)}}function f0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Fr(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(d,h,m)=>{let w=d;return!r&&i&&i&&l(d,i)&&(w=void 0),o||s(w),o==null||o(w,d,h,m),w},isSelected:d=>i?l(i,d):!1}}function p0(e,t){const n=f0(e,t),r=i0(e,t),o=u0(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Le(e,t){return e instanceof Ce&&e.timeZone===t?e:new Ce(e,t)}function fn(e,t,n){return Le(e,t)}function wd(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?fn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?fn(r,t):r):Wr(e)?{...e,from:e.from?Le(e.from,t):e.from,to:e.to?Le(e.to,t):e.to}:va(e)?{before:fn(e.before,t),after:fn(e.after,t)}:ba(e)?{after:fn(e.after,t)}:ya(e)?{before:fn(e.before,t)}:e}function Ma(e,t,n){return e&&(Array.isArray(e)?e.map(r=>wd(r,t)):wd(e,t))}function h0(e){var qe;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Le(t.today,n)),t.month&&(t.month=Le(t.month,n)),t.defaultMonth&&(t.defaultMonth=Le(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Le(t.startMonth,n)),t.endMonth&&(t.endMonth=Le(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Le(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(qe=t.selected)==null?void 0:qe.map(oe=>Le(oe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Le(t.selected.from,n):t.selected.from,to:t.selected.to?Le(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Ma(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Ma(t.hidden,n)),t.modifiers)){const oe={};Object.keys(t.modifiers).forEach(de=>{var ee;oe[de]=Ma((ee=t.modifiers)==null?void 0:ee[de],n)}),t.modifiers=oe}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:l}=S.useMemo(()=>{const oe={...ed,...t.locale},de=t.broadcastCalendar?1:t.weekStartsOn,ee=t.noonSafe&&t.timeZone?Hw(t.timeZone,{weekStartsOn:de,locale:oe}):void 0,le=t.dateLib&&ee?{...ee,...t.dateLib}:t.dateLib??ee,X=new Ae({locale:oe,weekStartsOn:de,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},le);return{dateLib:X,components:Nw(t.components),formatters:Iw(t.formatters),labels:Lw(t.labels,X.options),locale:oe,classNames:{...Ew(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:c,mode:f,navLayout:d,numberOfMonths:h=1,onDayBlur:m,onDayClick:w,onDayFocus:g,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:x,onPrevClick:N,showWeekNumber:M,styles:C}=t,{formatCaption:E,formatDay:T,formatMonthDropdown:R,formatWeekNumber:F,formatWeekNumberHeader:H,formatWeekdayName:$,formatYearDropdown:j}=o,V=r0(t,s),{days:ne,months:W,navStart:G,navEnd:Y,previousMonth:P,nextMonth:U,goToMonth:te}=V,D=Cw(ne,t,G,Y,s),{isSelected:_,select:B,selected:A}=p0(t,s)??{},{blur:K,focused:I,isFocusTarget:z,moveFocus:J,setFocused:re}=s0(t,V,D,_??(()=>!1),s),{labelDayButton:ie,labelGridcell:se,labelGrid:xe,labelMonthDropdown:Ne,labelNav:it,labelPrevious:lt,labelNext:We,labelWeekday:mn,labelWeekNumber:Me,labelWeekNumberHeader:Ss,labelYearDropdown:Ns}=a,ke=S.useMemo(()=>zw(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),mt=f!==void 0||w!==void 0,Xn=S.useCallback(()=>{P&&(te(P),N==null||N(P))},[P,te,N]),Zn=S.useCallback(()=>{U&&(te(U),x==null||x(U))},[te,U,x]),gn=S.useCallback((oe,de)=>ee=>{ee.preventDefault(),ee.stopPropagation(),re(oe),!de.disabled&&(B==null||B(oe.date,de,ee),w==null||w(oe.date,de,ee))},[B,w,re]),Ms=S.useCallback((oe,de)=>ee=>{re(oe),g==null||g(oe.date,de,ee)},[g,re]),Xr=S.useCallback((oe,de)=>ee=>{K(),m==null||m(oe.date,de,ee)},[K,m]),Qn=S.useCallback((oe,de)=>ee=>{const le={ArrowLeft:[ee.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ee.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ee.shiftKey?"year":"week","after"],ArrowUp:[ee.shiftKey?"year":"week","before"],PageUp:[ee.shiftKey?"year":"month","before"],PageDown:[ee.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(le[ee.key]){ee.preventDefault(),ee.stopPropagation();const[X,Q]=le[ee.key];J(X,Q)}v==null||v(oe.date,de,ee)},[J,v,t.dir]),Dt=S.useCallback((oe,de)=>ee=>{y==null||y(oe.date,de,ee)},[y]),Zr=S.useCallback((oe,de)=>ee=>{b==null||b(oe.date,de,ee)},[b]),Tt=S.useCallback(oe=>de=>{const ee=Number(de.target.value),le=s.setMonth(s.startOfMonth(oe),ee);te(le)},[s,te]),Es=S.useCallback(oe=>de=>{const ee=Number(de.target.value),le=s.setYear(s.startOfMonth(oe),ee);te(le)},[s,te]),{className:ks,style:Qr}=S.useMemo(()=>({className:[l[q.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[q.Root],...t.style}}),[l,t.className,t.style,C]),Jr=Mw(t),eo=S.useRef(null);Kw(eo,!!t.animate,{classNames:l,months:W,focused:I,dateLib:s});const Jn={dayPickerProps:t,selected:A,select:B,isSelected:_,months:W,nextMonth:U,previousMonth:P,goToMonth:te,getModifiers:D,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(nd.Provider,{value:Jn},S.createElement(r.Root,{rootRef:t.animate?eo:void 0,className:ks,style:Qr,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Jr},S.createElement(r.Months,{className:l[q.Months],style:C==null?void 0:C[q.Months]},!t.hideNavigation&&!d&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[q.Nav],style:C==null?void 0:C[q.Nav],"aria-label":it(),onPreviousClick:Xn,onNextClick:Zn,previousMonth:P,nextMonth:U}),W.map((oe,de)=>S.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[q.Month],style:C==null?void 0:C[q.Month],key:de,displayIndex:de,calendarMonth:oe},d==="around"&&!t.hideNavigation&&de===0&&S.createElement(r.PreviousMonthButton,{type:"button",className:l[q.PreviousMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":lt(P),onClick:Xn,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:P?void 0:!0,className:l[q.Chevron],orientation:t.dir==="rtl"?"right":"left"})),S.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[q.MonthCaption],style:C==null?void 0:C[q.MonthCaption],calendarMonth:oe,displayIndex:de},c!=null&&c.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[q.Dropdowns],style:C==null?void 0:C[q.Dropdowns]},(()=>{const ee=c==="dropdown"||c==="dropdown-months"?S.createElement(r.MonthsDropdown,{key:"month",className:l[q.MonthsDropdown],"aria-label":Ne(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Tt(oe.date),options:Rw(oe.date,G,Y,o,s),style:C==null?void 0:C[q.Dropdown],value:s.getMonth(oe.date)}):S.createElement("span",{key:"month"},R(oe.date,s)),le=c==="dropdown"||c==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[q.YearsDropdown],"aria-label":Ns(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Es(oe.date),options:Vw(G,Y,o,s,!!t.reverseYears),style:C==null?void 0:C[q.Dropdown],value:s.getYear(oe.date)}):S.createElement("span",{key:"year"},j(oe.date,s));return s.getMonthYearOrder()==="year-first"?[le,ee]:[ee,le]})(),S.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(oe.date,s.options,s))):S.createElement(r.CaptionLabel,{className:l[q.CaptionLabel],role:"status","aria-live":"polite"},E(oe.date,s.options,s))),d==="around"&&!t.hideNavigation&&de===h-1&&S.createElement(r.NextMonthButton,{type:"button",className:l[q.NextMonthButton],tabIndex:U?void 0:-1,"aria-disabled":U?void 0:!0,"aria-label":We(U),onClick:Zn,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:U?void 0:!0,className:l[q.Chevron],orientation:t.dir==="rtl"?"left":"right"})),de===h-1&&d==="after"&&!t.hideNavigation&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[q.Nav],style:C==null?void 0:C[q.Nav],"aria-label":it(),onPreviousClick:Xn,onNextClick:Zn,previousMonth:P,nextMonth:U}),S.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":xe(oe.date,s.options,s)||void 0,className:l[q.MonthGrid],style:C==null?void 0:C[q.MonthGrid]},!t.hideWeekdays&&S.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[q.Weekdays],style:C==null?void 0:C[q.Weekdays]},M&&S.createElement(r.WeekNumberHeader,{"aria-label":Ss(s.options),className:l[q.WeekNumberHeader],style:C==null?void 0:C[q.WeekNumberHeader],scope:"col"},H()),ke.map(ee=>S.createElement(r.Weekday,{"aria-label":mn(ee,s.options,s),className:l[q.Weekday],key:String(ee),style:C==null?void 0:C[q.Weekday],scope:"col"},$(ee,s.options,s)))),S.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[q.Weeks],style:C==null?void 0:C[q.Weeks]},oe.weeks.map(ee=>S.createElement(r.Week,{className:l[q.Week],key:ee.weekNumber,style:C==null?void 0:C[q.Week],week:ee},M&&S.createElement(r.WeekNumber,{week:ee,style:C==null?void 0:C[q.WeekNumber],"aria-label":Me(ee.weekNumber,{locale:i}),className:l[q.WeekNumber],scope:"row",role:"rowheader"},F(ee.weekNumber,s)),ee.days.map(le=>{const{date:X}=le,Q=D(le);if(Q[he.focused]=!Q.hidden&&!!(I!=null&&I.isEqualTo(le)),Q[je.selected]=(_==null?void 0:_(X))||Q.selected,Wr(A)){const{from:ge,to:Ee}=A;Q[je.range_start]=!!(ge&&Ee&&s.isSameDay(X,ge)),Q[je.range_end]=!!(ge&&Ee&&s.isSameDay(X,Ee)),Q[je.range_middle]=pt(A,X,!0,s)}const ye=Yw(Q,C,t.modifiersStyles),De=Sw(Q,l,t.modifiersClassNames),vn=!mt&&!Q.hidden?se(X,Q,s.options,s):void 0;return S.createElement(r.Day,{key:`${le.isoDate}_${le.displayMonthId}`,day:le,modifiers:Q,className:De.join(" "),style:ye,role:"gridcell","aria-selected":Q.selected||void 0,"aria-label":vn,"data-day":le.isoDate,"data-month":le.outside?le.dateMonthId:void 0,"data-selected":Q.selected||void 0,"data-disabled":Q.disabled||void 0,"data-hidden":Q.hidden||void 0,"data-outside":le.outside||void 0,"data-focused":Q.focused||void 0,"data-today":Q.today||void 0},!Q.hidden&&mt?S.createElement(r.DayButton,{className:l[q.DayButton],style:C==null?void 0:C[q.DayButton],type:"button",day:le,modifiers:Q,disabled:!Q.focused&&Q.disabled||void 0,"aria-disabled":Q.focused&&Q.disabled||void 0,tabIndex:z(le)?0:-1,"aria-label":ie(X,Q,s.options,s),onClick:gn(le,Q),onBlur:Xr(le,Q),onFocus:Ms(le,Q),onKeyDown:Qn(le,Q),onMouseEnter:Dt(le,Q),onMouseLeave:Zr(le,Q)},T(X,s.options,s)):!Q.hidden&&T(le.date,s.options,s))})))))))),t.footer&&S.createElement(r.Footer,{className:l[q.Footer],style:C==null?void 0:C[q.Footer],role:"status","aria-live":"polite"},t.footer)))}const xd=be(["w-full flex items-center gap-2","rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ea=u.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>p.jsxs("button",{ref:s,type:"button",className:O(xd({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[p.jsx(yh,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),p.jsx("span",{className:O("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));Ea.displayName="DatePickerTrigger";const ka=({className:e,classNames:t,...n})=>p.jsx(h0,{showOutsideDays:!0,className:O("p-3",e),classNames:{months:"relative flex gap-4",month:"flex flex-col gap-3",month_caption:"flex h-9 items-center justify-center",caption_label:"text-sm font-medium pointer-events-none",nav:"absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between",button_previous:O("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),button_next:O("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),month_grid:"w-full border-collapse",weekdays:"flex",weekday:"flex h-9 w-9 items-center justify-center text-xs font-normal text-muted-foreground",week:"mt-1 flex",day:"flex h-9 w-9 items-center justify-center p-0",day_button:O("h-9 w-9 rounded-md p-0 text-sm font-normal","transition-colors duration-100","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-selected:opacity-100"),selected:"rounded-md bg-primary text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",today:"rounded-md bg-accent text-accent-foreground",outside:"opacity-50 text-muted-foreground",disabled:"opacity-30 text-muted-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:r})=>r==="left"?p.jsx(qs,{className:"size-4","aria-hidden":"true"}):p.jsx(uo,{className:"size-4","aria-hidden":"true"})},...n});ka.displayName="Calendar";const Cd=on;Cd.displayName="DatePickerRoot";const Sd=u.forwardRef(({className:e,align:t="start",...n},r)=>p.jsx(Wt,{ref:r,align:t,className:O("w-auto p-0",e),...n}));Sd.displayName="DatePickerContent";const Nd=u.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[c,f]=u.useState(!1),d=e?un(e,r):void 0;return p.jsxs(on,{open:c,onOpenChange:f,children:[p.jsx(Ir,{asChild:!0,children:p.jsx(Ea,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":c,"aria-haspopup":"dialog",children:d})}),p.jsx(Wt,{className:"w-auto p-0",align:"start",children:p.jsx(ka,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),f(!1)},defaultMonth:e})})]})});Nd.displayName="DatePicker";const Md=gl,Ed=Wg,kd=Fg,Dd=vl,Da=u.forwardRef(({className:e,...t},n)=>p.jsx(Io,{ref:n,className:O("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));Da.displayName=Io.displayName;const Ta=u.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>p.jsxs(Dd,{children:[p.jsx(Da,{}),p.jsx(Wo,{ref:i,onInteractOutside:l=>{n||l.preventDefault(),r==null||r(l)},onPointerDownOutside:l=>{n||l.preventDefault(),o==null||o(l)},onEscapeKeyDown:l=>{n||l.preventDefault(),a==null||a(l)},className:O("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full max-w-lg rounded-xl bg-background p-6","ring-1 ring-border/60 shadow-xl","data-[state=open]:animate-dialog-content-in","data-[state=closed]:animate-dialog-content-out",e),...s,children:t})]}));Ta.displayName=Wo.displayName;const Pa=({className:e,...t})=>p.jsx("div",{className:O("flex flex-col gap-1.5 mb-4",e),...t});Pa.displayName="DialogHeader";const Oa=({className:e,...t})=>p.jsx("div",{className:O("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});Oa.displayName="DialogFooter";const _a=u.forwardRef(({className:e,...t},n)=>p.jsx(bl,{ref:n,className:O("text-lg font-semibold leading-none text-balance",e),...t}));_a.displayName=bl.displayName;const Aa=u.forwardRef(({className:e,...t},n)=>p.jsx(yl,{ref:n,className:O("text-sm text-muted-foreground text-pretty",e),...t}));Aa.displayName=yl.displayName;const Td=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>p.jsxs(Md,{...i,children:[e&&p.jsx(Ed,{asChild:!0,children:e}),p.jsxs(Ta,{className:a,dismissible:s,children:[s&&p.jsx(kd,{className:O("absolute right-4 top-4 rounded-md p-3 text-muted-foreground","transition-[color,background-color] duration-150","hover:bg-accent hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Close",children:p.jsx(Nh,{className:"size-4","aria-hidden":"true"})}),p.jsxs(Pa,{children:[p.jsx(_a,{children:t}),n&&p.jsx(Aa,{children:n})]}),r,o&&p.jsx(Oa,{children:o})]})]});Td.displayName="Dialog";var Ia="rovingFocusGroup.onEntryFocus",m0={bubbles:!1,cancelable:!0},Rn="RovingFocusGroup",[Wa,Pd,g0]=tr(Rn),[v0,$r]=Fe(Rn,[g0]),[b0,y0]=v0(Rn),Od=u.forwardRef((e,t)=>p.jsx(Wa.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wa.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(w0,{...e,ref:t})})}));Od.displayName=Rn;var w0=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,h=u.useRef(null),m=ce(t,h),w=bn(a),[g,v]=$e({prop:s,defaultProp:i??null,onChange:l,caller:Rn}),[y,b]=u.useState(!1),x=ze(c),N=Pd(n),M=u.useRef(!1),[C,E]=u.useState(0);return u.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(Ia,x),()=>T.removeEventListener(Ia,x)},[x]),p.jsx(b0,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:g,onItemFocus:u.useCallback(T=>v(T),[v]),onItemShiftTab:u.useCallback(()=>b(!0),[]),onFocusableItemAdd:u.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:u.useCallback(()=>E(T=>T-1),[]),children:p.jsx(Z.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:L(e.onMouseDown,()=>{M.current=!0}),onFocus:L(e.onFocus,T=>{const R=!M.current;if(T.target===T.currentTarget&&R&&!y){const F=new CustomEvent(Ia,m0);if(T.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=N().filter(W=>W.focusable),$=H.find(W=>W.active),j=H.find(W=>W.id===g),ne=[$,j,...H].filter(Boolean).map(W=>W.ref.current);Id(ne,f)}}M.current=!1}),onBlur:L(e.onBlur,()=>b(!1))})})}),_d="RovingFocusGroupItem",Ad=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=me(),c=a||l,f=y0(_d,n),d=f.currentTabStopId===c,h=Pd(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:g}=f;return u.useEffect(()=>{if(r)return m(),()=>w()},[r,m,w]),p.jsx(Wa.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(Z.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:L(e.onMouseDown,v=>{r?f.onItemFocus(c):v.preventDefault()}),onFocus:L(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:L(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=S0(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(N=>N.focusable).map(N=>N.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=f.loop?N0(x,N+1):x.slice(N+1)}setTimeout(()=>Id(x))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:g!=null}):s})})});Ad.displayName=_d;var x0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function S0(e,t,n){const r=C0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return x0[r]}function Id(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function N0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wd=Od,Fd=Ad,Fa=["Enter"," "],M0=["ArrowDown","PageUp","Home"],$d=["ArrowUp","PageDown","End"],E0=[...M0,...$d],k0={ltr:[...Fa,"ArrowRight"],rtl:[...Fa,"ArrowLeft"]},D0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Yn="Menu",[zn,T0,P0]=tr(Yn),[Bt,Bd]=Fe(Yn,[P0,Ct,$r]),Vn=Ct(),Ld=$r(),[Rd,Mt]=Bt(Yn),[O0,Hn]=Bt(Yn),Yd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Vn(t),[l,c]=u.useState(null),f=u.useRef(!1),d=ze(a),h=bn(o);return u.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Dn,{...i,children:p.jsx(Rd,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:c,children:p.jsx(O0,{scope:t,onClose:u.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};Yd.displayName=Yn;var _0="MenuAnchor",$a=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Vn(n);return p.jsx(Tn,{...o,...r,ref:t})});$a.displayName=_0;var Ba="MenuPortal",[A0,zd]=Bt(Ba,{forceMount:void 0}),Vd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Mt(Ba,t);return p.jsx(A0,{scope:t,forceMount:n,children:p.jsx(Te,{present:n||a.open,children:p.jsx(jt,{asChild:!0,container:o,children:r})})})};Vd.displayName=Ba;var Re="MenuContent",[I0,La]=Bt(Re),Hd=u.forwardRef((e,t)=>{const n=zd(Re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Mt(Re,e.__scopeMenu),s=Hn(Re,e.__scopeMenu);return p.jsx(zn.Provider,{scope:e.__scopeMenu,children:p.jsx(Te,{present:r||a.open,children:p.jsx(zn.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(W0,{...o,ref:t}):p.jsx(F0,{...o,ref:t})})})})}),W0=u.forwardRef((e,t)=>{const n=Mt(Re,e.__scopeMenu),r=u.useRef(null),o=ce(t,r);return u.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),p.jsx(Ra,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),F0=u.forwardRef((e,t)=>{const n=Mt(Re,e.__scopeMenu);return p.jsx(Ra,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$0=Pt("MenuContent.ScrollLock"),Ra=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:w,...g}=e,v=Mt(Re,n),y=Hn(Re,n),b=Vn(n),x=Ld(n),N=T0(n),[M,C]=u.useState(null),E=u.useRef(null),T=ce(t,E,v.onContentChange),R=u.useRef(0),F=u.useRef(""),H=u.useRef(0),$=u.useRef(null),j=u.useRef("right"),V=u.useRef(0),ne=w?Sn:u.Fragment,W=w?{as:$0,allowPinchZoom:!0}:void 0,G=P=>{var I,z;const U=F.current+P,te=N().filter(J=>!J.disabled),D=document.activeElement,_=(I=te.find(J=>J.ref.current===D))==null?void 0:I.textValue,B=te.map(J=>J.textValue),A=q0(B,U,_),K=(z=te.find(J=>J.textValue===A))==null?void 0:z.ref.current;(function J(re){F.current=re,window.clearTimeout(R.current),re!==""&&(R.current=window.setTimeout(()=>J(""),1e3))})(U),K&&setTimeout(()=>K.focus())};u.useEffect(()=>()=>window.clearTimeout(R.current),[]),lr();const Y=u.useCallback(P=>{var te,D;return j.current===((te=$.current)==null?void 0:te.side)&&Z0(P,(D=$.current)==null?void 0:D.area)},[]);return p.jsx(I0,{scope:n,searchRef:F,onItemEnter:u.useCallback(P=>{Y(P)&&P.preventDefault()},[Y]),onItemLeave:u.useCallback(P=>{var U;Y(P)||((U=E.current)==null||U.focus(),C(null))},[Y]),onTriggerLeave:u.useCallback(P=>{Y(P)&&P.preventDefault()},[Y]),pointerGraceTimerRef:H,onPointerGraceIntentChange:u.useCallback(P=>{$.current=P},[]),children:p.jsx(ne,{...W,children:p.jsx(Cn,{asChild:!0,trapped:o,onMountAutoFocus:L(a,P=>{var U;P.preventDefault(),(U=E.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:p.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:p.jsx(Wd,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:L(l,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Or,{role:"menu","aria-orientation":"vertical","data-state":lu(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:L(g.onKeyDown,P=>{const te=P.target.closest("[data-radix-menu-content]")===P.currentTarget,D=P.ctrlKey||P.altKey||P.metaKey,_=P.key.length===1;te&&(P.key==="Tab"&&P.preventDefault(),!D&&_&&G(P.key));const B=E.current;if(P.target!==B||!E0.includes(P.key))return;P.preventDefault();const K=N().filter(I=>!I.disabled).map(I=>I.ref.current);$d.includes(P.key)&&K.reverse(),U0(K)}),onBlur:L(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(R.current),F.current="")}),onPointerMove:L(e.onPointerMove,jn(P=>{const U=P.target,te=V.current!==P.clientX;if(P.currentTarget.contains(U)&&te){const D=P.clientX>V.current?"right":"left";j.current=D,V.current=P.clientX}}))})})})})})})});Hd.displayName=Re;var B0="MenuGroup",Ya=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Z.div,{role:"group",...r,ref:t})});Ya.displayName=B0;var L0="MenuLabel",Gd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Z.div,{...r,ref:t})});Gd.displayName=L0;var Br="MenuItem",jd="menu.itemSelect",Lr=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=u.useRef(null),s=Hn(Br,e.__scopeMenu),i=La(Br,e.__scopeMenu),l=ce(t,a),c=u.useRef(!1),f=()=>{const d=a.current;if(!n&&d){const h=new CustomEvent(jd,{bubbles:!0,cancelable:!0});d.addEventListener(jd,m=>r==null?void 0:r(m),{once:!0}),Os(d,h),h.defaultPrevented?c.current=!1:s.onClose()}};return p.jsx(Ud,{...o,ref:l,disabled:n,onClick:L(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),c.current=!0},onPointerUp:L(e.onPointerUp,d=>{var h;c.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:L(e.onKeyDown,d=>{const h=i.searchRef.current!=="";n||h&&d.key===" "||Fa.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Lr.displayName=Br;var Ud=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=La(Br,n),i=Ld(n),l=u.useRef(null),c=ce(t,l),[f,d]=u.useState(!1),[h,m]=u.useState("");return u.useEffect(()=>{const w=l.current;w&&m((w.textContent??"").trim())},[a.children]),p.jsx(zn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(Fd,{asChild:!0,...i,focusable:!r,children:p.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:L(e.onPointerMove,jn(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,jn(w=>s.onItemLeave(w))),onFocus:L(e.onFocus,()=>d(!0)),onBlur:L(e.onBlur,()=>d(!1))})})})}),R0="MenuCheckboxItem",Kd=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Jd,{scope:e.__scopeMenu,checked:n,children:p.jsx(Lr,{role:"menuitemcheckbox","aria-checked":Rr(n)?"mixed":n,...o,ref:t,"data-state":Ha(n),onSelect:L(o.onSelect,()=>r==null?void 0:r(Rr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Kd.displayName=R0;var qd="MenuRadioGroup",[Y0,z0]=Bt(qd,{value:void 0,onValueChange:()=>{}}),Xd=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ze(r);return p.jsx(Y0,{scope:e.__scopeMenu,value:n,onValueChange:a,children:p.jsx(Ya,{...o,ref:t})})});Xd.displayName=qd;var Zd="MenuRadioItem",Qd=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=z0(Zd,e.__scopeMenu),a=n===o.value;return p.jsx(Jd,{scope:e.__scopeMenu,checked:a,children:p.jsx(Lr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ha(a),onSelect:L(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Qd.displayName=Zd;var za="MenuItemIndicator",[Jd,V0]=Bt(za,{checked:!1}),eu=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=V0(za,n);return p.jsx(Te,{present:r||Rr(a.checked)||a.checked===!0,children:p.jsx(Z.span,{...o,ref:t,"data-state":Ha(a.checked)})})});eu.displayName=za;var H0="MenuSeparator",tu=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tu.displayName=H0;var G0="MenuArrow",nu=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Vn(n);return p.jsx(_r,{...o,...r,ref:t})});nu.displayName=G0;var Va="MenuSub",[j0,ru]=Bt(Va),ou=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Mt(Va,t),s=Vn(t),[i,l]=u.useState(null),[c,f]=u.useState(null),d=ze(o);return u.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),p.jsx(Dn,{...s,children:p.jsx(Rd,{scope:t,open:r,onOpenChange:d,content:c,onContentChange:f,children:p.jsx(j0,{scope:t,contentId:me(),triggerId:me(),trigger:i,onTriggerChange:l,children:n})})})};ou.displayName=Va;var Gn="MenuSubTrigger",au=u.forwardRef((e,t)=>{const n=Mt(Gn,e.__scopeMenu),r=Hn(Gn,e.__scopeMenu),o=ru(Gn,e.__scopeMenu),a=La(Gn,e.__scopeMenu),s=u.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),p.jsx($a,{asChild:!0,...c,children:p.jsx(Ud,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":lu(n.open),...e,ref:Qe(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,jn(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:L(e.onPointerLeave,jn(d=>{var m,w;f();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(w=n.content)==null?void 0:w.dataset.side,v=g==="right",y=v?-5:5,b=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:b,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:b,y:h.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,d=>{var m;const h=a.searchRef.current!=="";e.disabled||h&&d.key===" "||k0[r.dir].includes(d.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),d.preventDefault())})})})});au.displayName=Gn;var su="MenuSubContent",iu=u.forwardRef((e,t)=>{const n=zd(Re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Mt(Re,e.__scopeMenu),s=Hn(Re,e.__scopeMenu),i=ru(su,e.__scopeMenu),l=u.useRef(null),c=ce(t,l);return p.jsx(zn.Provider,{scope:e.__scopeMenu,children:p.jsx(Te,{present:r||a.open,children:p.jsx(zn.Slot,{scope:e.__scopeMenu,children:p.jsx(Ra,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;s.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:L(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:L(e.onKeyDown,f=>{var m;const d=f.currentTarget.contains(f.target),h=D0[s.dir].includes(f.key);d&&h&&(a.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});iu.displayName=su;function lu(e){return e?"open":"closed"}function Rr(e){return e==="indeterminate"}function Ha(e){return Rr(e)?"indeterminate":e?"checked":"unchecked"}function U0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function K0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function q0(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=K0(e,Math.max(a,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function X0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],c=i.x,f=i.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-c)*(r-f)/(h-f)+c&&(o=!o)}return o}function Z0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return X0(n,t)}function jn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Q0=Yd,J0=$a,ex=Vd,tx=Hd,nx=Ya,rx=Gd,ox=Lr,ax=Kd,sx=Xd,ix=Qd,lx=eu,cx=tu,dx=nu,ux=ou,fx=au,px=iu,Yr="DropdownMenu",[hx]=Fe(Yr,[Bd]),Se=Bd(),[mx,cu]=hx(Yr),du=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Se(t),c=u.useRef(null),[f,d]=$e({prop:o,defaultProp:a??!1,onChange:s,caller:Yr});return p.jsx(mx,{scope:t,triggerId:me(),triggerRef:c,contentId:me(),open:f,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(h=>!h),[d]),modal:i,children:p.jsx(Q0,{...l,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};du.displayName=Yr;var uu="DropdownMenuTrigger",fu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=cu(uu,n),s=Se(n);return p.jsx(J0,{asChild:!0,...s,children:p.jsx(Z.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Qe(t,a.triggerRef),onPointerDown:L(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:L(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});fu.displayName=uu;var gx="DropdownMenuPortal",pu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return p.jsx(ex,{...r,...n})};pu.displayName=gx;var hu="DropdownMenuContent",mu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=cu(hu,n),a=Se(n),s=u.useRef(!1);return p.jsx(tx,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:L(e.onInteractOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,f=l.button===2||c;(!o.modal||f)&&(s.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)"}})});mu.displayName=hu;var vx="DropdownMenuGroup",gu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(nx,{...o,...r,ref:t})});gu.displayName=vx;var bx="DropdownMenuLabel",vu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(rx,{...o,...r,ref:t})});vu.displayName=bx;var yx="DropdownMenuItem",bu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(ox,{...o,...r,ref:t})});bu.displayName=yx;var wx="DropdownMenuCheckboxItem",yu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(ax,{...o,...r,ref:t})});yu.displayName=wx;var xx="DropdownMenuRadioGroup",wu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(sx,{...o,...r,ref:t})});wu.displayName=xx;var Cx="DropdownMenuRadioItem",xu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(ix,{...o,...r,ref:t})});xu.displayName=Cx;var Sx="DropdownMenuItemIndicator",Cu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(lx,{...o,...r,ref:t})});Cu.displayName=Sx;var Nx="DropdownMenuSeparator",Su=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(cx,{...o,...r,ref:t})});Su.displayName=Nx;var Mx="DropdownMenuArrow",Ex=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(dx,{...o,...r,ref:t})});Ex.displayName=Mx;var kx=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Se(t),[i,l]=$e({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(ux,{...s,open:i,onOpenChange:l,children:n})},Dx="DropdownMenuSubTrigger",Nu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(fx,{...o,...r,ref:t})});Nu.displayName=Dx;var Tx="DropdownMenuSubContent",Mu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return p.jsx(px,{...o,...r,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)"}})});Mu.displayName=Tx;var Px=du,Ox=fu,Eu=pu,ku=mu,_x=gu,Du=vu,Tu=bu,Pu=yu,Ax=wu,Ou=xu,_u=Cu,Au=Su,Ix=kx,Iu=Nu,Wu=Mu;const Fu=Px,$u=Ox,Wx=_x,Fx=Eu,$x=Ix,Bx=Ax,Ga=u.forwardRef(({className:e,sideOffset:t=6,...n},r)=>p.jsx(Eu,{children:p.jsx(ku,{ref:r,sideOffset:t,className:O("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","origin-(--radix-dropdown-menu-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...n})}));Ga.displayName=ku.displayName;const ja=u.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>p.jsx(Tu,{ref:o,className:O("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",n==="destructive"&&"text-destructive focus:bg-destructive/10 focus:text-destructive [&_svg]:text-destructive",e),...r}));ja.displayName=Tu.displayName;const Bu=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>p.jsxs(Pu,{ref:o,className:O("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(_u,{children:p.jsx(yn,{className:"size-3.5"})})}),t]}));Bu.displayName=Pu.displayName;const Lu=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Ou,{ref:r,className:O("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(_u,{children:p.jsx(xh,{className:"size-2 fill-current"})})}),t]}));Lu.displayName=Ou.displayName;const Ua=u.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Du,{ref:r,className:O("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ua.displayName=Du.displayName;const Ka=u.forwardRef(({className:e,...t},n)=>p.jsx(Au,{ref:n,className:O("-mx-1 my-1 h-px bg-border",e),...t}));Ka.displayName=Au.displayName;const Ru=u.forwardRef(({className:e,inset:t,children:n,...r},o)=>p.jsxs(Iu,{ref:o,className:O("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent data-[state=open]:bg-accent","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",e),...r,children:[n,p.jsx(uo,{className:"ml-auto"})]}));Ru.displayName=Iu.displayName;const Yu=u.forwardRef(({className:e,...t},n)=>p.jsx(Wu,{ref:n,className:O("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...t}));Yu.displayName=Wu.displayName;const zu=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>p.jsxs(Fu,{...s,children:[p.jsx($u,{asChild:!0,children:e}),p.jsx(Ga,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,l)=>i.type==="separator"?p.jsx(Ka,{},l):i.type==="label"?p.jsx(Ua,{children:i.label},l):p.jsxs(ja,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});zu.displayName="DropdownMenu";const Vu=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:O("flex flex-col gap-1.5",e),...t}));Vu.displayName="Field";const Hu=u.forwardRef(({className:e,required:t,children:n,...r},o)=>p.jsxs("label",{ref:o,className:O("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&p.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));Hu.displayName="Label";const Gu=u.forwardRef(({className:e,isError:t,...n},r)=>p.jsx("p",{ref:r,className:O("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));Gu.displayName="FieldMessage";const ju=u.createContext({inGroup:!1}),Uu=be(["w-full rounded-md border border-input bg-background","text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default","[&_svg]:pointer-events-none"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),Ku=u.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=u.use(ju);return p.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&p.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r}),p.jsx("input",{ref:s,className:O(Uu({size:t}),i&&"border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",n&&"border-destructive focus-visible:ring-destructive",r&&o==="left"&&"pl-9",r&&o==="right"&&"pr-9",e),"aria-invalid":n||void 0,...a}),r&&o==="right"&&p.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r})]})});Ku.displayName="Input";const qu=u.forwardRef(({className:e,isError:t,children:n,...r},o)=>p.jsx(ju,{value:{inGroup:!0,isError:t},children:p.jsx("div",{ref:o,"aria-invalid":t||void 0,className:O("flex items-stretch overflow-hidden","rounded-md border border-input bg-background","divide-x divide-border","transition-[color,border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background","has-[input:disabled]:opacity-50 has-[input:disabled]:pointer-events-none",t&&"border-destructive focus-within:ring-destructive",e),...r,children:n})}));qu.displayName="InputGroup";const Xu=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:O("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));Xu.displayName="InputAddon";const Zu=be(["w-full appearance-none rounded-md border border-input bg-background pr-9","text-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),Qu=u.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>p.jsxs("div",{className:"group relative w-full",children:[p.jsx("select",{ref:a,className:O(Zu({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),p.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground group-has-[select:disabled]:opacity-50 [&_svg]:size-4",children:p.jsx(zt,{})})]}));Qu.displayName="NativeSelect";const qa=u.forwardRef(({className:e,...t},n)=>p.jsx("nav",{ref:n,"aria-label":"Pagination",className:O("flex items-center gap-1",e),...t}));qa.displayName="PaginationRoot";const Xa=["inline-flex items-center justify-center","size-10 rounded-md text-sm font-medium select-none tabular-nums","transition-[color,background-color,box-shadow] duration-150","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),Za=u.forwardRef(({className:e,isActive:t,...n},r)=>p.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:O(Xa,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));Za.displayName="PaginationItem";const Qa=u.forwardRef(({className:e,...t},n)=>p.jsx("button",{ref:n,"aria-label":"Previous page",className:O(Xa,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:p.jsx(qs,{className:"size-4"})}));Qa.displayName="PaginationPrev";const Ja=u.forwardRef(({className:e,...t},n)=>p.jsx("button",{ref:n,"aria-label":"Next page",className:O(Xa,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:p.jsx(uo,{className:"size-4"})}));Ja.displayName="PaginationNext";const es=({className:e,...t})=>p.jsx("span",{"aria-hidden":"true",className:O("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:p.jsx(Ch,{className:"size-4"})});es.displayName="PaginationEllipsis";function Lx(e,t,n){const r=Math.max(e-n,1),o=Math.min(e+n,t),a=r>2,s=o<t-1;if(!a&&!s)return Array.from({length:t},(i,l)=>l+1);if(!a){const i=3+2*n;return i>=t?Array.from({length:t},(l,c)=>c+1):[...Array.from({length:i},(l,c)=>c+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(c,f)=>f+1):[1,"ellipsis-left",...Array.from({length:i},(c,f)=>l+f)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const Ju=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=Lx(e,t,r);return p.jsxs(qa,{className:o,...a,children:[p.jsx(Qa,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?p.jsx(es,{},i):p.jsx(Za,{isActive:i===e,onClick:()=>n(i),children:i},i)),p.jsx(Ja,{onClick:()=>n(e+1),disabled:e>=t})]})};Ju.displayName="Pagination";const ef=u.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return p.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:O("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?p.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):p.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});ef.displayName="Progress";const ts=u.createContext({}),tf=be(["peer appearance-none rounded-full border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Rx=be(["pointer-events-none absolute rounded-full bg-primary-foreground","opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"}},defaultVariants:{size:"md"}}),nf=u.forwardRef(({className:e,size:t,isError:n,name:r,...o},a)=>{const s=u.use(ts);return p.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[p.jsx("input",{type:"radio",ref:a,name:r??s.name,className:O(tf({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...o}),p.jsx("span",{"aria-hidden":"true",className:Rx({size:t})})]})});nf.displayName="Radio";const rf=be("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),of=u.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>p.jsx(ts,{value:{name:t},children:p.jsx("div",{ref:a,role:"radiogroup",className:O(rf({orientation:n}),e),...o,children:r})}));of.displayName="RadioGroup";function af(e,[t,n]){return Math.min(n,Math.max(t,e))}function Yx(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var sf=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"}),zx="VisuallyHidden",lf=u.forwardRef((e,t)=>p.jsx(Z.span,{...e,ref:t,style:{...sf,...e.style}}));lf.displayName=zx;var Vx=lf,Hx=[" ","Enter","ArrowUp","ArrowDown"],Gx=[" ","Enter"],Lt="Select",[zr,Vr,jx]=tr(Lt),[pn]=Fe(Lt,[jx,Ct]),Hr=Ct(),[Ux,Et]=pn(Lt),[Kx,qx]=pn(Lt),cf=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:c,name:f,autoComplete:d,disabled:h,required:m,form:w}=e,g=Hr(t),[v,y]=u.useState(null),[b,x]=u.useState(null),[N,M]=u.useState(!1),C=bn(c),[E,T]=$e({prop:r,defaultProp:o??!1,onChange:a,caller:Lt}),[R,F]=$e({prop:s,defaultProp:i,onChange:l,caller:Lt}),H=u.useRef(null),$=v?w||!!v.closest("form"):!0,[j,V]=u.useState(new Set),ne=Array.from(j).map(W=>W.props.value).join(";");return p.jsx(Dn,{...g,children:p.jsxs(Ux,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:me(),value:R,onValueChange:F,open:E,onOpenChange:T,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[p.jsx(zr.Provider,{scope:t,children:p.jsx(Kx,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(W=>{V(G=>new Set(G).add(W))},[]),onNativeOptionRemove:u.useCallback(W=>{V(G=>{const Y=new Set(G);return Y.delete(W),Y})},[]),children:n})}),$?p.jsxs(Af,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:R,onChange:W=>F(W.target.value),disabled:h,form:w,children:[R===void 0?p.jsx("option",{value:""}):null,Array.from(j)]},ne):null]})})};cf.displayName=Lt;var df="SelectTrigger",uf=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Hr(n),s=Et(df,n),i=s.disabled||r,l=ce(t,s.onTriggerChange),c=Vr(n),f=u.useRef("touch"),[d,h,m]=Wf(g=>{const v=c().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=Ff(v,g,y);b!==void 0&&s.onValueChange(b.value)}),w=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(Tn,{asChild:!0,...a,children:p.jsx(Z.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":If(s.value)?"":void 0,...o,ref:l,onClick:L(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&w(g)}),onPointerDown:L(o.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(w(g),g.preventDefault())}),onKeyDown:L(o.onKeyDown,g=>{const v=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&Hx.includes(g.key)&&(w(),g.preventDefault())})})})});uf.displayName=df;var ff="SelectValue",pf=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Et(ff,n),{onValueNodeHasChildrenChange:c}=l,f=a!==void 0,d=ce(t,l.onValueNodeChange);return we(()=>{c(f)},[c,f]),p.jsx(Z.span,{...i,ref:d,style:{pointerEvents:"none"},children:If(l.value)?p.jsx(p.Fragment,{children:s}):a})});pf.displayName=ff;var Xx="SelectIcon",Zx=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(Z.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Zx.displayName=Xx;var Qx="SelectPortal",hf=e=>p.jsx(jt,{asChild:!0,...e});hf.displayName=Qx;var Rt="SelectContent",mf=u.forwardRef((e,t)=>{const n=Et(Rt,e.__scopeSelect),[r,o]=u.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?er.createPortal(p.jsx(gf,{scope:e.__scopeSelect,children:p.jsx(zr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(vf,{...e,ref:t})});mf.displayName=Rt;var Ke=10,[gf,kt]=pn(Rt),Jx="SelectContentImpl",eC=Pt("SelectContent.RemoveScroll"),vf=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:g,avoidCollisions:v,...y}=e,b=Et(Rt,n),[x,N]=u.useState(null),[M,C]=u.useState(null),E=ce(t,I=>N(I)),[T,R]=u.useState(null),[F,H]=u.useState(null),$=Vr(n),[j,V]=u.useState(!1),ne=u.useRef(!1);u.useEffect(()=>{if(x)return gr(x)},[x]),lr();const W=u.useCallback(I=>{const[z,...J]=$().map(se=>se.ref.current),[re]=J.slice(-1),ie=document.activeElement;for(const se of I)if(se===ie||(se==null||se.scrollIntoView({block:"nearest"}),se===z&&M&&(M.scrollTop=0),se===re&&M&&(M.scrollTop=M.scrollHeight),se==null||se.focus(),document.activeElement!==ie))return},[$,M]),G=u.useCallback(()=>W([T,x]),[W,T,x]);u.useEffect(()=>{j&&G()},[j,G]);const{onOpenChange:Y,triggerPointerDownPosRef:P}=b;u.useEffect(()=>{if(x){let I={x:0,y:0};const z=re=>{var ie,se;I={x:Math.abs(Math.round(re.pageX)-(((ie=P.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(re.pageY)-(((se=P.current)==null?void 0:se.y)??0))}},J=re=>{I.x<=10&&I.y<=10?re.preventDefault():x.contains(re.target)||Y(!1),document.removeEventListener("pointermove",z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",J,{capture:!0})}}},[x,Y,P]),u.useEffect(()=>{const I=()=>Y(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[Y]);const[U,te]=Wf(I=>{const z=$().filter(ie=>!ie.disabled),J=z.find(ie=>ie.ref.current===document.activeElement),re=Ff(z,I,J);re&&setTimeout(()=>re.ref.current.focus())}),D=u.useCallback((I,z,J)=>{const re=!ne.current&&!J;(b.value!==void 0&&b.value===z||re)&&(R(I),re&&(ne.current=!0))},[b.value]),_=u.useCallback(()=>x==null?void 0:x.focus(),[x]),B=u.useCallback((I,z,J)=>{const re=!ne.current&&!J;(b.value!==void 0&&b.value===z||re)&&H(I)},[b.value]),A=r==="popper"?ns:bf,K=A===ns?{side:i,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:g,avoidCollisions:v}:{};return p.jsx(gf,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:D,selectedItem:T,onItemLeave:_,itemTextRefCallback:B,focusSelectedItem:G,selectedItemText:F,position:r,isPositioned:j,searchRef:U,children:p.jsx(Sn,{as:eC,allowPinchZoom:!0,children:p.jsx(Cn,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:L(o,I=>{var z;(z=b.trigger)==null||z.focus({preventScroll:!0}),I.preventDefault()}),children:p.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:p.jsx(A,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...K,onPlaced:()=>V(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:L(y.onKeyDown,I=>{const z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!z&&I.key.length===1&&te(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let re=$().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(I.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ie=I.target,se=re.indexOf(ie);re=re.slice(se+1)}setTimeout(()=>W(re)),I.preventDefault()}})})})})})})});vf.displayName=Jx;var tC="SelectItemAlignedPosition",bf=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Et(Rt,n),s=kt(Rt,n),[i,l]=u.useState(null),[c,f]=u.useState(null),d=ce(t,E=>f(E)),h=Vr(n),m=u.useRef(!1),w=u.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=u.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&c&&g&&v&&y){const E=a.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(a.dir!=="rtl"){const ie=F.left-T.left,se=R.left-ie,xe=E.left-se,Ne=E.width+xe,it=Math.max(Ne,T.width),lt=window.innerWidth-Ke,We=af(se,[Ke,Math.max(Ke,lt-it)]);i.style.minWidth=Ne+"px",i.style.left=We+"px"}else{const ie=T.right-F.right,se=window.innerWidth-R.right-ie,xe=window.innerWidth-E.right-se,Ne=E.width+xe,it=Math.max(Ne,T.width),lt=window.innerWidth-Ke,We=af(se,[Ke,Math.max(Ke,lt-it)]);i.style.minWidth=Ne+"px",i.style.right=We+"px"}const H=h(),$=window.innerHeight-Ke*2,j=g.scrollHeight,V=window.getComputedStyle(c),ne=parseInt(V.borderTopWidth,10),W=parseInt(V.paddingTop,10),G=parseInt(V.borderBottomWidth,10),Y=parseInt(V.paddingBottom,10),P=ne+W+j+Y+G,U=Math.min(v.offsetHeight*5,P),te=window.getComputedStyle(g),D=parseInt(te.paddingTop,10),_=parseInt(te.paddingBottom,10),B=E.top+E.height/2-Ke,A=$-B,K=v.offsetHeight/2,I=v.offsetTop+K,z=ne+W+I,J=P-z;if(z<=B){const ie=H.length>0&&v===H[H.length-1].ref.current;i.style.bottom="0px";const se=c.clientHeight-g.offsetTop-g.offsetHeight,xe=Math.max(A,K+(ie?_:0)+se+G),Ne=z+xe;i.style.height=Ne+"px"}else{const ie=H.length>0&&v===H[0].ref.current;i.style.top="0px";const xe=Math.max(B,ne+g.offsetTop+(ie?D:0)+K)+J;i.style.height=xe+"px",g.scrollTop=z-B+g.offsetTop}i.style.margin=`${Ke}px 0`,i.style.minHeight=U+"px",i.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,c,g,v,y,a.dir,r]);we(()=>x(),[x]);const[N,M]=u.useState();we(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const C=u.useCallback(E=>{E&&w.current===!0&&(x(),b==null||b(),w.current=!1)},[x,b]);return p.jsx(rC,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:p.jsx(Z.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bf.displayName=tC;var nC="SelectPopperPosition",ns=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ke,...a}=e,s=Hr(n);return p.jsx(Or,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});ns.displayName=nC;var[rC,rs]=pn(Rt,{}),os="SelectViewport",yf=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=kt(os,n),s=rs(os,n),i=ce(t,a.onViewportChange),l=u.useRef(0);return p.jsxs(p.Fragment,{children:[p.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:r}),p.jsx(zr.Slot,{scope:n,children:p.jsx(Z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:L(o.onScroll,c=>{const f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const w=window.innerHeight-Ke*2,g=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(g,v);if(y<w){const b=y+m,x=Math.min(w,b),N=b-x;d.style.height=x+"px",d.style.bottom==="0px"&&(f.scrollTop=N>0?N:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});yf.displayName=os;var wf="SelectGroup",[oC,aC]=pn(wf),xf=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=me();return p.jsx(oC,{scope:n,id:o,children:p.jsx(Z.div,{role:"group","aria-labelledby":o,...r,ref:t})})});xf.displayName=wf;var Cf="SelectLabel",Sf=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=aC(Cf,n);return p.jsx(Z.div,{id:o.id,...r,ref:t})});Sf.displayName=Cf;var Gr="SelectItem",[sC,Nf]=pn(Gr),Mf=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Et(Gr,n),l=kt(Gr,n),c=i.value===r,[f,d]=u.useState(a??""),[h,m]=u.useState(!1),w=ce(t,b=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,b,r,o)}),g=me(),v=u.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")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 p.jsx(sC,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:u.useCallback(b=>{d(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:p.jsx(zr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:p.jsx(Z.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:L(s.onFocus,()=>m(!0)),onBlur:L(s.onBlur,()=>m(!1)),onClick:L(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:L(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:L(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:L(s.onPointerMove,b=>{var x;v.current=b.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(s.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:L(s.onKeyDown,b=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&b.key===" "||(Gx.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Mf.displayName=Gr;var Un="SelectItemText",Ef=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Et(Un,n),i=kt(Un,n),l=Nf(Un,n),c=qx(Un,n),[f,d]=u.useState(null),h=ce(t,y=>d(y),l.onItemTextChange,y=>{var b;return(b=i.itemTextRefCallback)==null?void 0:b.call(i,y,l.value,l.disabled)}),m=f==null?void 0:f.textContent,w=u.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=c;return we(()=>(g(w),()=>v(w)),[g,v,w]),p.jsxs(p.Fragment,{children:[p.jsx(Z.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?er.createPortal(a.children,s.valueNode):null]})});Ef.displayName=Un;var kf="SelectItemIndicator",Df=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Nf(kf,n).isSelected?p.jsx(Z.span,{"aria-hidden":!0,...r,ref:t}):null});Df.displayName=kf;var as="SelectScrollUpButton",Tf=u.forwardRef((e,t)=>{const n=kt(as,e.__scopeSelect),r=rs(as,e.__scopeSelect),[o,a]=u.useState(!1),s=ce(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let i=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(Of,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Tf.displayName=as;var ss="SelectScrollDownButton",Pf=u.forwardRef((e,t)=>{const n=kt(ss,e.__scopeSelect),r=rs(ss,e.__scopeSelect),[o,a]=u.useState(!1),s=ce(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let i=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(Of,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Pf.displayName=ss;var Of=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=kt("SelectScrollButton",n),s=u.useRef(null),i=Vr(n),l=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>l(),[l]),we(()=>{var f;const c=i().find(d=>d.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),p.jsx(Z.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:L(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:L(o.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:L(o.onPointerLeave,()=>{l()})})}),iC="SelectSeparator",_f=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(Z.div,{"aria-hidden":!0,...r,ref:t})});_f.displayName=iC;var is="SelectArrow",lC=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(n),a=Et(is,n),s=kt(is,n);return a.open&&s.position==="popper"?p.jsx(_r,{...o,...r,ref:t}):null});lC.displayName=is;var cC="SelectBubbleInput",Af=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),a=ce(r,o),s=Yx(t);return u.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const d=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(d)}},[s,t]),p.jsx(Z.select,{...n,style:{...sf,...n.style},ref:a,defaultValue:t})});Af.displayName=cC;function If(e){return e===""||e===void 0}function Wf(e){const t=ze(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(s=>{const i=n.current+s;t(i),(function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Ff(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=dC(e,Math.max(a,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function dC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uC=cf,$f=uf,fC=pf,pC=hf,Bf=mf,hC=yf,mC=xf,Lf=Sf,Rf=Mf,gC=Ef,vC=Df,Yf=Tf,zf=Pf,Vf=_f;const Hf=be(["w-full flex items-center justify-between gap-2","rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-muted-foreground"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Gf=uC,bC=mC,jf=fC,ls=u.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>p.jsxs($f,{ref:a,className:O("group",Hf({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,p.jsx(zt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));ls.displayName=$f.displayName;const cs=u.forwardRef(({className:e,...t},n)=>p.jsx(Yf,{ref:n,className:O("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:p.jsx(Xs,{className:"size-4"})}));cs.displayName=Yf.displayName;const ds=u.forwardRef(({className:e,...t},n)=>p.jsx(zf,{ref:n,className:O("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:p.jsx(zt,{className:"size-4"})}));ds.displayName=zf.displayName;const us=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(pC,{children:p.jsxs(Bf,{ref:o,position:n,sideOffset:4,className:O("z-50 min-w-32 overflow-hidden rounded-lg ring-1 ring-border/60 bg-background text-foreground shadow-md","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",n==="popper"&&["data-[side=bottom]:translate-y-1","data-[side=top]:-translate-y-1"],e),...r,children:[p.jsx(cs,{}),p.jsx(hC,{className:"p-1",children:t}),p.jsx(ds,{})]})}));us.displayName=Bf.displayName;const Uf=u.forwardRef(({className:e,...t},n)=>p.jsx(Lf,{ref:n,className:O("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));Uf.displayName=Lf.displayName;const Kf=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Rf,{ref:r,className:O("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm","outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:p.jsx(vC,{children:p.jsx(yn,{className:"size-4"})})}),p.jsx(gC,{children:t})]}));Kf.displayName=Rf.displayName;const qf=u.forwardRef(({className:e,...t},n)=>p.jsx(Vf,{ref:n,className:O("-mx-1 my-1 h-px bg-border",e),...t}));qf.displayName=Vf.displayName;const Xf=u.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>p.jsxs(Gf,{disabled:r,...s,children:[p.jsx(ls,{ref:i,size:t,isError:n,className:o,children:p.jsx(jf,{placeholder:e})}),p.jsx(us,{children:a})]}));Xf.displayName="Select";const Zf=u.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>p.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:O("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));Zf.displayName="Separator";const Qf=be(["rounded-full bg-input transition-[background-color]","peer-checked:bg-primary","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background","peer-disabled:opacity-50"],{variants:{size:{sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),yC=be(["absolute top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm","transition-[translate]","peer-disabled:opacity-50"],{variants:{size:{sm:"left-0.5 size-3 peer-checked:translate-x-3",md:"left-0.5 size-4 peer-checked:translate-x-4",lg:"left-0.5 size-5 peer-checked:translate-x-5"}},defaultVariants:{size:"md"}}),Jf=u.forwardRef(({className:e,size:t,isError:n,...r},o)=>p.jsxs("span",{className:"relative inline-flex shrink-0 items-center",children:[p.jsx("input",{type:"checkbox",role:"switch",ref:o,className:O("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",e),"aria-invalid":n||void 0,...r}),p.jsx("span",{"aria-hidden":"true",className:O(Qf({size:t}),n&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",n&&"peer-focus-visible:ring-destructive")}),p.jsx("span",{"aria-hidden":"true",className:yC({size:t})})]}));Jf.displayName="Switch";var jr="Tabs",[wC]=Fe(jr,[$r]),ep=$r(),[xC,fs]=wC(jr),tp=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,f=bn(i),[d,h]=$e({prop:r,onChange:o,defaultProp:a??"",caller:jr});return p.jsx(xC,{scope:n,baseId:me(),value:d,onValueChange:h,orientation:s,dir:f,activationMode:l,children:p.jsx(Z.div,{dir:f,"data-orientation":s,...c,ref:t})})});tp.displayName=jr;var np="TabsList",rp=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fs(np,n),s=ep(n);return p.jsx(Wd,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:p.jsx(Z.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});rp.displayName=np;var op="TabsTrigger",ap=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=fs(op,n),i=ep(n),l=lp(s.baseId,r),c=cp(s.baseId,r),f=r===s.value;return p.jsx(Fd,{asChild:!0,...i,focusable:!o,active:f,children:p.jsx(Z.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:L(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:L(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:L(e.onFocus,()=>{const d=s.activationMode!=="manual";!f&&!o&&d&&s.onValueChange(r)})})})});ap.displayName=op;var sp="TabsContent",ip=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=fs(sp,n),l=lp(i.baseId,r),c=cp(i.baseId,r),f=r===i.value,d=u.useRef(f);return u.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Te,{present:o||f,children:({present:h})=>p.jsx(Z.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&a})})});ip.displayName=sp;function lp(e,t){return`${e}-trigger-${t}`}function cp(e,t){return`${e}-content-${t}`}var dp=tp,up=rp,fp=ap,pp=ip;const ps=u.forwardRef(({className:e,...t},n)=>p.jsx(dp,{ref:n,className:O("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));ps.displayName=dp.displayName;const hs=u.forwardRef(({className:e,...t},n)=>p.jsx(up,{ref:n,className:O("inline-flex items-center gap-1 rounded-lg bg-muted p-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:h-fit data-[orientation=vertical]:items-stretch",e),...t}));hs.displayName=up.displayName;const ms=u.forwardRef(({className:e,...t},n)=>p.jsx(fp,{ref:n,className:O("inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm px-3 py-1.5 text-sm font-medium","text-muted-foreground select-none outline-none","transition-[color,background-color,box-shadow] duration-150","hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-muted","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm","data-[orientation=vertical]:justify-start","[&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ms.displayName=fp.displayName;const gs=u.forwardRef(({className:e,...t},n)=>p.jsx(pp,{ref:n,className:O("mt-4 outline-none","group-data-[orientation=vertical]/tabs:mt-0 group-data-[orientation=vertical]/tabs:flex-1","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));gs.displayName=pp.displayName;const hp=({items:e,listClassName:t,className:n,...r})=>p.jsxs(ps,{className:n,...r,children:[p.jsx(hs,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>p.jsxs(ms,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>p.jsx(gs,{value:o,children:a},o))]});hp.displayName="Tabs";const mp=be(["w-full rounded-md border border-input bg-background","text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","resize-y","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default"],{variants:{size:{sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-4 py-4 text-base"}},defaultVariants:{size:"md"}}),gp=u.forwardRef(({className:e,size:t,isError:n,...r},o)=>p.jsx("textarea",{ref:o,className:O(mp({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));gp.displayName="Textarea";function CC(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const SC=e=>{switch(e){case"success":return EC;case"info":return DC;case"warning":return kC;case"error":return TC;default:return null}},NC=Array(12).fill(0),MC=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},NC.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),EC=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),kC=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),DC=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),TC=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),PC=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OC=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let vs=1;class _C{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:vs++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async c=>{if(s=["resolve",c],S.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(IC(c)&&!c.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...w})}else if(c instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(c):n.error,h=typeof n.description=="function"?await n.description(c):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(c):n.success,h=typeof n.description=="function"?await n.description(c):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:h,...w})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,m=typeof f=="object"&&!S.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,f)=>i.then(()=>s[0]==="reject"?f(s[1]):c(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||vs++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Pe=new _C,AC=(e,t)=>{const n=(t==null?void 0:t.id)||vs++;return Pe.addToast({title:e,...t,id:n}),n},IC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WC=AC,FC=()=>Pe.toasts,$C=()=>Pe.getActiveToasts(),BC=Object.assign(WC,{success:Pe.success,info:Pe.info,warning:Pe.warning,error:Pe.error,custom:Pe.custom,message:Pe.message,promise:Pe.promise,dismiss:Pe.dismiss,loading:Pe.loading},{getHistory:FC,getToasts:$C});CC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ur(e){return e.label!==void 0}const LC=3,RC="24px",YC="16px",vp=4e3,zC=356,VC=14,HC=45,GC=200;function st(...e){return e.filter(Boolean).join(" ")}function jC(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const UC=e=>{var t,n,r,o,a,s,i,l,c;const{invert:f,toast:d,unstyled:h,interacting:m,setHeights:w,visibleToasts:g,heights:v,index:y,toasts:b,expanded:x,removeToast:N,defaultRichColors:M,closeButton:C,style:E,cancelButtonStyle:T,actionButtonStyle:R,className:F="",descriptionClassName:H="",duration:$,position:j,gap:V,expandByDefault:ne,classNames:W,icons:G,closeButtonAriaLabel:Y="Close toast"}=e,[P,U]=S.useState(null),[te,D]=S.useState(null),[_,B]=S.useState(!1),[A,K]=S.useState(!1),[I,z]=S.useState(!1),[J,re]=S.useState(!1),[ie,se]=S.useState(!1),[xe,Ne]=S.useState(0),[it,lt]=S.useState(0),We=S.useRef(d.duration||$||vp),mn=S.useRef(null),Me=S.useRef(null),Ss=y===0,Ns=y+1<=g,ke=d.type,mt=d.dismissible!==!1,Xn=d.className||"",Zn=d.descriptionClassName||"",gn=S.useMemo(()=>v.findIndex(X=>X.toastId===d.id)||0,[v,d.id]),Ms=S.useMemo(()=>{var X;return(X=d.closeButton)!=null?X:C},[d.closeButton,C]),Xr=S.useMemo(()=>d.duration||$||vp,[d.duration,$]),Qn=S.useRef(0),Dt=S.useRef(0),Zr=S.useRef(0),Tt=S.useRef(null),[Es,ks]=j.split("-"),Qr=S.useMemo(()=>v.reduce((X,Q,ye)=>ye>=gn?X:X+Q.height,0),[v,gn]),Jr=OC(),eo=d.invert||f,Jn=ke==="loading";Dt.current=S.useMemo(()=>gn*V+Qr,[gn,Qr]),S.useEffect(()=>{We.current=Xr},[Xr]),S.useEffect(()=>{B(!0)},[]),S.useEffect(()=>{const X=Me.current;if(X){const Q=X.getBoundingClientRect().height;return lt(Q),w(ye=>[{toastId:d.id,height:Q,position:d.position},...ye]),()=>w(ye=>ye.filter(De=>De.toastId!==d.id))}},[w,d.id]),S.useLayoutEffect(()=>{if(!_)return;const X=Me.current,Q=X.style.height;X.style.height="auto";const ye=X.getBoundingClientRect().height;X.style.height=Q,lt(ye),w(De=>De.find(ge=>ge.toastId===d.id)?De.map(ge=>ge.toastId===d.id?{...ge,height:ye}:ge):[{toastId:d.id,height:ye,position:d.position},...De])},[_,d.title,d.description,w,d.id,d.jsx,d.action,d.cancel]);const qe=S.useCallback(()=>{K(!0),Ne(Dt.current),w(X=>X.filter(Q=>Q.toastId!==d.id)),setTimeout(()=>{N(d)},GC)},[d,N,w,Dt]);S.useEffect(()=>{if(d.promise&&ke==="loading"||d.duration===1/0||d.type==="loading")return;let X;return x||m||Jr?(()=>{if(Zr.current<Qn.current){const De=new Date().getTime()-Qn.current;We.current=We.current-De}Zr.current=new Date().getTime()})():(()=>{We.current!==1/0&&(Qn.current=new Date().getTime(),X=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),qe()},We.current))})(),()=>clearTimeout(X)},[x,m,d,ke,Jr,qe]),S.useEffect(()=>{d.delete&&(qe(),d.onDismiss==null||d.onDismiss.call(d,d))},[qe,d.delete]);function oe(){var X;if(G!=null&&G.loading){var Q;return S.createElement("div",{className:st(W==null?void 0:W.loader,d==null||(Q=d.classNames)==null?void 0:Q.loader,"sonner-loader"),"data-visible":ke==="loading"},G.loading)}return S.createElement(MC,{className:st(W==null?void 0:W.loader,d==null||(X=d.classNames)==null?void 0:X.loader),visible:ke==="loading"})}const de=d.icon||(G==null?void 0:G[ke])||SC(ke);var ee,le;return S.createElement("li",{tabIndex:0,ref:Me,className:st(F,Xn,W==null?void 0:W.toast,d==null||(t=d.classNames)==null?void 0:t.toast,W==null?void 0:W.default,W==null?void 0:W[ke],d==null||(n=d.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(ee=d.richColors)!=null?ee:M,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":_,"data-promise":!!d.promise,"data-swiped":ie,"data-removed":A,"data-visible":Ns,"data-y-position":Es,"data-x-position":ks,"data-index":y,"data-front":Ss,"data-swiping":I,"data-dismissible":mt,"data-type":ke,"data-invert":eo,"data-swipe-out":J,"data-swipe-direction":te,"data-expanded":!!(x||ne&&_),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${A?xe:Dt.current}px`,"--initial-height":ne?"auto":`${it}px`,...E,...d.style},onDragEnd:()=>{z(!1),U(null),Tt.current=null},onPointerDown:X=>{X.button!==2&&(Jn||!mt||(mn.current=new Date,Ne(Dt.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(z(!0),Tt.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,Q,ye;if(J||!mt)return;Tt.current=null;const De=Number(((X=Me.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((Q=Me.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((ye=mn.current)==null?void 0:ye.getTime()),Ee=P==="x"?De:vn,to=Math.abs(Ee)/ge;if(Math.abs(Ee)>=HC||to>.11){Ne(Dt.current),d.onDismiss==null||d.onDismiss.call(d,d),D(P==="x"?De>0?"right":"left":vn>0?"down":"up"),qe(),re(!0);return}else{var Xe,Ze;(Xe=Me.current)==null||Xe.style.setProperty("--swipe-amount-x","0px"),(Ze=Me.current)==null||Ze.style.setProperty("--swipe-amount-y","0px")}se(!1),z(!1),U(null)},onPointerMove:X=>{var Q,ye,De;if(!Tt.current||!mt||((Q=window.getSelection())==null?void 0:Q.toString().length)>0)return;const ge=X.clientY-Tt.current.y,Ee=X.clientX-Tt.current.x;var to;const Xe=(to=e.swipeDirections)!=null?to:jC(j);!P&&(Math.abs(Ee)>1||Math.abs(ge)>1)&&U(Math.abs(Ee)>Math.abs(ge)?"x":"y");let Ze={x:0,y:0};const _p=Yt=>1/(1.5+Math.abs(Yt)/20);if(P==="y"){if(Xe.includes("top")||Xe.includes("bottom"))if(Xe.includes("top")&&ge<0||Xe.includes("bottom")&&ge>0)Ze.y=ge;else{const Yt=ge*_p(ge);Ze.y=Math.abs(Yt)<Math.abs(ge)?Yt:ge}}else if(P==="x"&&(Xe.includes("left")||Xe.includes("right")))if(Xe.includes("left")&&Ee<0||Xe.includes("right")&&Ee>0)Ze.x=Ee;else{const Yt=Ee*_p(Ee);Ze.x=Math.abs(Yt)<Math.abs(Ee)?Yt:Ee}(Math.abs(Ze.x)>0||Math.abs(Ze.y)>0)&&se(!0),(ye=Me.current)==null||ye.style.setProperty("--swipe-amount-x",`${Ze.x}px`),(De=Me.current)==null||De.style.setProperty("--swipe-amount-y",`${Ze.y}px`)}},Ms&&!d.jsx&&ke!=="loading"?S.createElement("button",{"aria-label":Y,"data-disabled":Jn,"data-close-button":!0,onClick:Jn||!mt?()=>{}:()=>{qe(),d.onDismiss==null||d.onDismiss.call(d,d)},className:st(W==null?void 0:W.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(le=G==null?void 0:G.close)!=null?le:PC):null,(ke||d.icon||d.promise)&&d.icon!==null&&((G==null?void 0:G[ke])!==null||d.icon)?S.createElement("div",{"data-icon":"",className:st(W==null?void 0:W.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||oe():null,d.type!=="loading"?de:null):null,S.createElement("div",{"data-content":"",className:st(W==null?void 0:W.content,d==null||(a=d.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:st(W==null?void 0:W.title,d==null||(s=d.classNames)==null?void 0:s.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?S.createElement("div",{"data-description":"",className:st(H,Zn,W==null?void 0:W.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),S.isValidElement(d.cancel)?d.cancel:d.cancel&&Ur(d.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||T,onClick:X=>{Ur(d.cancel)&&mt&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,X),qe())},className:st(W==null?void 0:W.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,S.isValidElement(d.action)?d.action:d.action&&Ur(d.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||R,onClick:X=>{Ur(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,X),!X.defaultPrevented&&qe())},className:st(W==null?void 0:W.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function bp(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function KC(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?YC:RC;function l(c){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=i:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(i)}),n}const qC=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:c,offset:f,mobileOffset:d,theme:h="light",richColors:m,duration:w,style:g,visibleToasts:v=LC,toastOptions:y,dir:b=bp(),gap:x=VC,icons:N,containerAriaLabel:M="Notifications"}=t,[C,E]=S.useState([]),T=S.useMemo(()=>r?C.filter(_=>_.toasterId===r):C.filter(_=>!_.toasterId),[C,r]),R=S.useMemo(()=>Array.from(new Set([a].concat(T.filter(_=>_.position).map(_=>_.position)))),[T,a]),[F,H]=S.useState([]),[$,j]=S.useState(!1),[V,ne]=S.useState(!1),[W,G]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=S.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=S.useRef(null),te=S.useRef(!1),D=S.useCallback(_=>{E(B=>{var A;return(A=B.find(K=>K.id===_.id))!=null&&A.delete||Pe.dismiss(_.id),B.filter(({id:K})=>K!==_.id)})},[]);return S.useEffect(()=>Pe.subscribe(_=>{if(_.dismiss){requestAnimationFrame(()=>{E(B=>B.map(A=>A.id===_.id?{...A,delete:!0}:A))});return}setTimeout(()=>{no.flushSync(()=>{E(B=>{const A=B.findIndex(K=>K.id===_.id);return A!==-1?[...B.slice(0,A),{...B[A],..._},...B.slice(A+1)]:[_,...B]})})})}),[C]),S.useEffect(()=>{if(h!=="system"){G(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const _=window.matchMedia("(prefers-color-scheme: dark)");try{_.addEventListener("change",({matches:B})=>{G(B?"dark":"light")})}catch{_.addListener(({matches:A})=>{try{G(A?"dark":"light")}catch(K){console.error(K)}})}},[h]),S.useEffect(()=>{C.length<=1&&j(!1)},[C]),S.useEffect(()=>{const _=B=>{var A;if(s.every(z=>B[z]||B.code===z)){var I;j(!0),(I=Y.current)==null||I.focus()}B.code==="Escape"&&(document.activeElement===Y.current||(A=Y.current)!=null&&A.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[s]),S.useEffect(()=>{if(Y.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,te.current=!1)}},[Y.current]),S.createElement("section",{ref:n,"aria-label":`${M} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((_,B)=>{var A;const[K,I]=_.split("-");return T.length?S.createElement("ol",{key:_,dir:b==="auto"?bp():b,tabIndex:-1,ref:Y,className:c,"data-sonner-toaster":!0,"data-sonner-theme":W,"data-y-position":K,"data-x-position":I,style:{"--front-toast-height":`${((A=F[0])==null?void 0:A.height)||0}px`,"--width":`${zC}px`,"--gap":`${x}px`,...g,...KC(f,d)},onBlur:z=>{te.current&&!z.currentTarget.contains(z.relatedTarget)&&(te.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||te.current||(te.current=!0,U.current=z.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{V||j(!1)},onDragEnd:()=>j(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},T.filter(z=>!z.position&&B===0||z.position===_).map((z,J)=>{var re,ie;return S.createElement(UC,{key:z.id,icons:N,index:J,toast:z,defaultRichColors:m,duration:(re=y==null?void 0:y.duration)!=null?re:w,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:v,closeButton:(ie=y==null?void 0:y.closeButton)!=null?ie:l,interacting:V,position:_,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:D,toasts:T.filter(se=>se.position==z.position),heights:F.filter(se=>se.position==z.position),setHeights:H,expandByDefault:i,gap:x,expanded:$,swipeDirections:t.swipeDirections})})):null}))}),yp=({...e})=>p.jsx(qC,{theme:"light",richColors:!0,position:"top-center",closeButton:!0,...e});yp.displayName="Toaster";var[Kr]=Fe("Tooltip",[Ct]),qr=Ct(),wp="TooltipProvider",XC=700,bs="tooltip.open",[ZC,ys]=Kr(wp),xp=e=>{const{__scopeTooltip:t,delayDuration:n=XC,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=u.useRef(!0),i=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(ZC,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:u.useCallback(c=>{i.current=c},[]),disableHoverableContent:o,children:a})};xp.displayName=wp;var Kn="Tooltip",[QC,qn]=Kr(Kn),Cp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=ys(Kn,e.__scopeTooltip),c=qr(t),[f,d]=u.useState(null),h=me(),m=u.useRef(0),w=s??l.disableHoverableContent,g=i??l.delayDuration,v=u.useRef(!1),[y,b]=$e({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(bs))):l.onClose(),a==null||a(E)},caller:Kn}),x=u.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),N=u.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)},[b]),M=u.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),C=u.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,b(!0),m.current=0},g)},[g,b]);return u.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(Dn,{...c,children:p.jsx(QC,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:f,onTriggerChange:d,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayedRef.current?C():N()},[l.isOpenDelayedRef,C,N]),onTriggerLeave:u.useCallback(()=>{w?M():(window.clearTimeout(m.current),m.current=0)},[M,w]),onOpen:N,onClose:M,disableHoverableContent:w,children:n})})};Cp.displayName=Kn;var ws="TooltipTrigger",Sp=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qn(ws,n),a=ys(ws,n),s=qr(n),i=u.useRef(null),l=ce(t,i,o.onTriggerChange),c=u.useRef(!1),f=u.useRef(!1),d=u.useCallback(()=>c.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Tn,{asChild:!0,...s,children:p.jsx(Z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:L(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:L(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:L(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:L(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:L(e.onBlur,o.onClose),onClick:L(e.onClick,o.onClose)})})});Sp.displayName=ws;var xs="TooltipPortal",[JC,eS]=Kr(xs,{forceMount:void 0}),Np=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=qn(xs,t);return p.jsx(JC,{scope:t,forceMount:n,children:p.jsx(Te,{present:n||a.open,children:p.jsx(jt,{asChild:!0,container:o,children:r})})})};Np.displayName=xs;var hn="TooltipContent",Mp=u.forwardRef((e,t)=>{const n=eS(hn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=qn(hn,e.__scopeTooltip);return p.jsx(Te,{present:r||s.open,children:s.disableHoverableContent?p.jsx(Ep,{side:o,...a,ref:t}):p.jsx(tS,{side:o,...a,ref:t})})}),tS=u.forwardRef((e,t)=>{const n=qn(hn,e.__scopeTooltip),r=ys(hn,e.__scopeTooltip),o=u.useRef(null),a=ce(t,o),[s,i]=u.useState(null),{trigger:l,onClose:c}=n,f=o.current,{onPointerInTransitChange:d}=r,h=u.useCallback(()=>{i(null),d(!1)},[d]),m=u.useCallback((w,g)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=sS(y,v.getBoundingClientRect()),x=iS(y,b),N=lS(g.getBoundingClientRect()),M=dS([...x,...N]);i(M),d(!0)},[d]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(l&&f){const w=v=>m(v,f),g=v=>m(v,l);return l.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[l,f,m,h]),u.useEffect(()=>{if(s){const w=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),x=!cS(y,s);b?h():x&&(h(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,f,s,c,h]),p.jsx(Ep,{...e,ref:a})}),[nS,rS]=Kr(Kn,{isInside:!1}),oS=Fp("TooltipContent"),Ep=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=qn(hn,n),c=qr(n),{onClose:f}=l;return u.useEffect(()=>(document.addEventListener(bs,f),()=>document.removeEventListener(bs,f)),[f]),u.useEffect(()=>{if(l.trigger){const d=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),p.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:p.jsxs(Or,{"data-state":l.stateAttribute,...c,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(oS,{children:r}),p.jsx(nS,{scope:n,isInside:!0,children:p.jsx(Vx,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Mp.displayName=hn;var kp="TooltipArrow",aS=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qr(n);return rS(kp,n).isInside?null:p.jsx(_r,{...o,...r,ref:t})});aS.displayName=kp;function sS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function iS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function lS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function cS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],c=i.x,f=i.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-c)*(r-f)/(h-f)+c&&(o=!o)}return o}function dS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uS(t)}function uS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fS=xp,pS=Cp,hS=Sp,mS=Np,Dp=Mp;const gS=fS,Tp=pS,Pp=hS,Cs=u.forwardRef(({className:e,sideOffset:t=6,...n},r)=>p.jsx(mS,{children:p.jsx(Dp,{ref:r,sideOffset:t,className:O("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5","text-xs text-background font-medium","origin-(--radix-tooltip-content-transform-origin)","data-[state=delayed-open]:animate-tooltip-in","data-[state=instant-open]:animate-tooltip-in","data-[state=closed]:animate-tooltip-out",e),...n})}));Cs.displayName=Dp.displayName;const Op=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>p.jsxs(Tp,{...a,children:[p.jsx(Pp,{asChild:!0,children:t}),p.jsx(Cs,{side:n,align:r,sideOffset:o,children:e})]});Op.displayName="Tooltip",k.Accordion=fi,k.AccordionContent=bo,k.AccordionItem=go,k.AccordionRoot=mo,k.AccordionTrigger=vo,k.Alert=hi,k.AlertDescription=gi,k.AlertTitle=mi,k.AspectRatio=yi,k.Avatar=xi,k.Badge=Si,k.Button=Mi,k.Calendar=ka,k.Checkbox=ki,k.ComboBox=Dc,k.ComboBoxContent=Cc,k.ComboBoxEmpty=Nc,k.ComboBoxGroup=Mc,k.ComboBoxItem=Sc,k.ComboBoxRoot=kc,k.ComboBoxSeparator=Ec,k.ComboBoxTrigger=oa,k.ComboBoxTriggerVariants=xc,k.DataTable=Oc,k.DatePicker=Nd,k.DatePickerContent=Sd,k.DatePickerRoot=Cd,k.DatePickerTrigger=Ea,k.Dialog=Td,k.DialogClose=kd,k.DialogContent=Ta,k.DialogDescription=Aa,k.DialogFooter=Oa,k.DialogHeader=Pa,k.DialogOverlay=Da,k.DialogPortal=Dd,k.DialogRoot=Md,k.DialogTitle=_a,k.DialogTrigger=Ed,k.DropdownMenu=zu,k.DropdownMenuCheckboxItem=Bu,k.DropdownMenuContent=Ga,k.DropdownMenuGroup=Wx,k.DropdownMenuItem=ja,k.DropdownMenuLabel=Ua,k.DropdownMenuPortal=Fx,k.DropdownMenuRadioGroup=Bx,k.DropdownMenuRadioItem=Lu,k.DropdownMenuRoot=Fu,k.DropdownMenuSeparator=Ka,k.DropdownMenuSub=$x,k.DropdownMenuSubContent=Yu,k.DropdownMenuSubTrigger=Ru,k.DropdownMenuTrigger=$u,k.Field=Vu,k.FieldMessage=Gu,k.Input=Ku,k.InputAddon=Xu,k.InputGroup=qu,k.Label=Hu,k.NativeSelect=Qu,k.Pagination=Ju,k.PaginationEllipsis=es,k.PaginationItem=Za,k.PaginationNext=Ja,k.PaginationPrev=Qa,k.PaginationRoot=qa,k.Popover=wc,k.PopoverAnchor=yb,k.PopoverClose=bb,k.PopoverContent=Wt,k.PopoverRoot=on,k.PopoverTrigger=Ir,k.Progress=ef,k.Radio=nf,k.RadioGroup=of,k.RadioGroupContext=ts,k.Select=Xf,k.SelectContent=us,k.SelectGroup=bC,k.SelectItem=Kf,k.SelectLabel=Uf,k.SelectRoot=Gf,k.SelectScrollDownButton=ds,k.SelectScrollUpButton=cs,k.SelectSeparator=qf,k.SelectTrigger=ls,k.SelectValue=jf,k.Separator=Zf,k.Skeleton=da,k.Switch=Jf,k.Table=sa,k.TableBody=la,k.TableCaption=Pc,k.TableCell=On,k.TableFooter=Tc,k.TableHead=ca,k.TableHeader=ia,k.TableRow=an,k.Tabs=hp,k.TabsContent=gs,k.TabsList=hs,k.TabsRoot=ps,k.TabsTrigger=ms,k.Textarea=gp,k.Toaster=yp,k.Tooltip=Op,k.TooltipContent=Cs,k.TooltipProvider=gS,k.TooltipRoot=Tp,k.TooltipTrigger=Pp,k.accordionContentVariants=di,k.accordionRootVariants=ui,k.accordionTriggerVariants=ci,k.alertVariants=pi,k.avatarVariants=wi,k.badgeVariants=Ci,k.buttonVariants=Ni,k.checkboxVariants=Ei,k.cn=O,k.datePickerTriggerVariants=xd,k.inputVariants=Uu,k.nativeSelectVariants=Zu,k.radioGroupVariants=rf,k.radioVariants=tf,k.selectTriggerVariants=Hf,k.switchTrackVariants=Qf,k.textareaVariants=mp,k.toast=BC,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
175
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Kv="DialogDescriptionWarning",qv=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mc(Kv).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vc=nc,Xv=oc,bc=sc,Ta=ic,Pa=lc,yc=dc,wc=fc,Zv=hc,sr='[cmdk-group=""]',Oa='[cmdk-group-items=""]',Qv='[cmdk-group-heading=""]',xc='[cmdk-item=""]',Cc=`${xc}:not([aria-disabled="true"])`,_a="cmdk-item-select",En="data-value",Jv=(e,t,n)=>zm(e,t,n),Sc=f.createContext(void 0),ir=()=>f.useContext(Sc),Nc=f.createContext(void 0),Aa=()=>f.useContext(Nc),Mc=f.createContext(void 0),io=f.forwardRef((e,t)=>{let n=Dn(()=>{var P,A;return{search:"",value:(A=(P=e.value)!=null?P:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Dn(()=>new Set),o=Dn(()=>new Map),a=Dn(()=>new Map),s=Dn(()=>new Set),i=Dc(e),{label:l,children:u,value:p,onValueChange:c,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...y}=e,b=we(),x=we(),N=we(),M=f.useRef(null),C=ob();tn(()=>{if(p!==void 0){let P=p.trim();n.current.value=P,k.emit()}},[p]),tn(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:P=>(s.current.add(P),()=>s.current.delete(P)),snapshot:()=>n.current,setState:(P,A,H)=>{var F,Z,I,R;if(!Object.is(n.current[P],A)){if(n.current[P]=A,P==="search")B(),$(),C(1,U);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(N);X?X.focus():(F=document.getElementById(b))==null||F.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.emit()}),H||C(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let X=A??"";(R=(I=i.current).onValueChange)==null||R.call(I,X);return}}k.emit()}},emit:()=>{s.current.forEach(P=>P())}}),[]),O=f.useMemo(()=>({value:(P,A,H)=>{var F;A!==((F=a.current.get(P))==null?void 0:F.value)&&(a.current.set(P,{value:A,keywords:H}),n.current.filtered.items.set(P,V(A,H)),C(2,()=>{$(),k.emit()}))},item:(P,A)=>(r.current.add(P),A&&(o.current.has(A)?o.current.get(A).add(P):o.current.set(A,new Set([P]))),C(3,()=>{B(),$(),n.current.value||U(),k.emit()}),()=>{a.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let H=Y();C(4,()=>{B(),(H==null?void 0:H.getAttribute("id"))===P&&U(),k.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{a.current.delete(P),o.current.delete(P)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:N,labelId:x,listInnerRef:M}),[]);function V(P,A){var H,F;let Z=(F=(H=i.current)==null?void 0:H.filter)!=null?F:Jv;return P?Z(P,n.current.search,A):0}function $(){if(!n.current.search||i.current.shouldFilter===!1)return;let P=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(F=>{let Z=o.current.get(F),I=0;Z.forEach(R=>{let X=P.get(R);I=Math.max(X,I)}),A.push([F,I])});let H=M.current;ae().sort((F,Z)=>{var I,R;let X=F.getAttribute("id"),se=Z.getAttribute("id");return((I=P.get(se))!=null?I:0)-((R=P.get(X))!=null?R:0)}).forEach(F=>{let Z=F.closest(Oa);Z?Z.appendChild(F.parentElement===Z?F:F.closest(`${Oa} > *`)):H.appendChild(F.parentElement===H?F:F.closest(`${Oa} > *`))}),A.sort((F,Z)=>Z[1]-F[1]).forEach(F=>{var Z;let I=(Z=M.current)==null?void 0:Z.querySelector(`${sr}[${En}="${encodeURIComponent(F[0])}"]`);I==null||I.parentElement.appendChild(I)})}function U(){let P=ae().find(H=>H.getAttribute("aria-disabled")!=="true"),A=P==null?void 0:P.getAttribute(En);k.setState("value",A||void 0)}function B(){var P,A,H,F;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let I of r.current){let R=(A=(P=a.current.get(I))==null?void 0:P.value)!=null?A:"",X=(F=(H=a.current.get(I))==null?void 0:H.keywords)!=null?F:[],se=V(R,X);n.current.filtered.items.set(I,se),se>0&&Z++}for(let[I,R]of o.current)for(let X of R)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(I);break}n.current.filtered.count=Z}function q(){var P,A,H;let F=Y();F&&(((P=F.parentElement)==null?void 0:P.firstChild)===F&&((H=(A=F.closest(sr))==null?void 0:A.querySelector(Qv))==null||H.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function Y(){var P;return(P=M.current)==null?void 0:P.querySelector(`${xc}[aria-selected="true"]`)}function ae(){var P;return Array.from(((P=M.current)==null?void 0:P.querySelectorAll(Cc))||[])}function W(P){let A=ae()[P];A&&k.setState("value",A.getAttribute(En))}function K(P){var A;let H=Y(),F=ae(),Z=F.findIndex(R=>R===H),I=F[Z+P];(A=i.current)!=null&&A.loop&&(I=Z+P<0?F[F.length-1]:Z+P===F.length?F[0]:F[Z+P]),I&&k.setState("value",I.getAttribute(En))}function G(P){let A=Y(),H=A==null?void 0:A.closest(sr),F;for(;H&&!F;)H=P>0?nb(H,sr):rb(H,sr),F=H==null?void 0:H.querySelector(Cc);F?k.setState("value",F.getAttribute(En)):K(P)}let _=()=>W(ae().length-1),Q=P=>{P.preventDefault(),P.metaKey?_():P.altKey?G(1):K(1)},oe=P=>{P.preventDefault(),P.metaKey?W(0):P.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:P=>{var A;(A=y.onKeyDown)==null||A.call(y,P);let H=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||H))switch(P.key){case"n":case"j":{v&&P.ctrlKey&&Q(P);break}case"ArrowDown":{Q(P);break}case"p":case"k":{v&&P.ctrlKey&&oe(P);break}case"ArrowUp":{oe(P);break}case"Home":{P.preventDefault(),W(0);break}case"End":{P.preventDefault(),_();break}case"Enter":{P.preventDefault();let F=Y();if(F){let Z=new Event(_a);F.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:sb},l),lo(e,P=>f.createElement(Nc.Provider,{value:k},f.createElement(Sc.Provider,{value:O},P))))}),Ia=f.forwardRef((e,t)=>{var n,r;let o=we(),a=f.useRef(null),s=f.useContext(Mc),i=ir(),l=Dc(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;tn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let p=Tc(o,a,[e.value,e.children,a],e.keywords),c=Aa(),h=zt(C=>C.value&&C.value===p.current),g=zt(C=>u||i.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);f.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener(_a,w),()=>C.removeEventListener(_a,w)},[g,e.onSelect,e.disabled]);function w(){var C,k;m(),(k=(C=l.current).onSelect)==null||k.call(C,p.current)}function m(){c.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:N,...M}=e;return f.createElement(ne.div,{ref:mt(a,t),...M,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||i.getDisablePointerSelection()?void 0:m,onClick:v?void 0:w},e.children)}),kc=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=we(),i=f.useRef(null),l=f.useRef(null),u=we(),p=ir(),c=zt(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);tn(()=>p.group(s),[]),Tc(s,i,[e.value,e.heading,l]);let h=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ne.div,{ref:mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),lo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(Mc.Provider,{value:h},g))))}),Ec=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=zt(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),Fa=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Aa(),s=zt(u=>u.search),i=zt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ne.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),Wa=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=zt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,p=a.current,c,h=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=u.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(c),h.unobserve(u)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},lo(e,u=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),eb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(vc,{open:n,onOpenChange:r},f.createElement(bc,{container:s},f.createElement(Ta,{"cmdk-overlay":"",className:o}),f.createElement(Pa,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(io,{ref:t,...i}))))}),$a=f.forwardRef((e,t)=>zt(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),tb=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ne.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},lo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(io,{List:Wa,Item:Ia,Input:Fa,Group:kc,Separator:Ec,Dialog:eb,Empty:$a,Loading:tb});function nb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function rb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Dc(e){let t=f.useRef(e);return tn(()=>{t.current=e}),t}var tn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function Dn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function zt(e){let t=Aa(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Tc(e,t,n,r=[]){let o=f.useRef(),a=ir();return tn(()=>{var s;let i=(()=>{var u;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(u=p.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(En,i),o.current=i}),o}var ob=()=>{let[e,t]=f.useState(),n=Dn(()=>new Map);return tn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function ab(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(ab(t),{ref:t.ref},n(t.props.children)):n(t)}var sb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ib=["top","right","bottom","left"],Lt=Math.min,Ve=Math.max,co=Math.round,uo=Math.floor,bt=e=>({x:e,y:e}),lb={left:"right",right:"left",bottom:"top",top:"bottom"};function Ba(e,t,n){return Ve(e,Lt(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Dt(e){return e.split("-")[0]}function Tn(e){return e.split("-")[1]}function za(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ha(e){return za(yt(e))}function cb(e,t,n){n===void 0&&(n=!1);const r=Tn(e),o=Ha(e),a=La(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=fo(s)),[s,fo(s)]}function db(e){const t=fo(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pc=["left","right"],Oc=["right","left"],ub=["top","bottom"],fb=["bottom","top"];function pb(e,t,n){switch(e){case"top":case"bottom":return n?t?Oc:Pc:t?Pc:Oc;case"left":case"right":return t?ub:fb;default:return[]}}function hb(e,t,n,r){const o=Tn(e);let a=pb(Dt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Va)))),a}function fo(e){const t=Dt(e);return lb[t]+e.slice(t.length)}function gb(e){return{top:0,right:0,bottom:0,left:0,...e}}function _c(e){return typeof e!="number"?gb(e):{top:e,right:e,bottom:e,left:e}}function po(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ac(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ha(t),i=La(s),l=Dt(t),u=a==="y",p=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(Tn(t)){case"start":g[s]-=h*(n&&u?-1:1);break;case"end":g[s]+=h*(n&&u?-1:1);break}return g}async function mb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Et(t,e),w=_c(g),v=i[h?c==="floating"?"reference":"floating":c],y=po(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),b=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),N=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},M=po(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-M.top+w.top)/N.y,bottom:(M.bottom-y.bottom+w.bottom)/N.y,left:(y.left-M.left+w.left)/N.x,right:(M.right-y.right+w.right)/N.x}}const vb=50,bb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:mb},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:c}=Ac(u,r,l),h=r,g=0;const w={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:y,fn:b}=v,{x,y:N,data:M,reset:C}=await b({x:p,y:c,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});p=x??p,c=N??c,w[y]={...w[y],...M},C&&g<vb&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:c}=Ac(u,h,l)),m=-1)}return{x:p,y:c,placement:h,strategy:o,middlewareData:w}},yb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=Et(e,t)||{};if(u==null)return{};const c=_c(p),h={x:n,y:r},g=Ha(o),w=La(g),m=await s.getDimensions(u),v=g==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[g]-h[g]-a.floating[w],M=h[g]-a.reference[g],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=C?C[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(C)))&&(k=i.floating[x]||a.floating[w]);const O=N/2-M/2,V=k/2-m[w]/2-1,$=Lt(c[y],V),U=Lt(c[b],V),B=$,q=k-m[w]-U,Y=k/2-m[w]/2+O,ae=Ba(B,Y,q),W=!l.arrow&&Tn(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<B?$:U)-m[w]/2<0,K=W?Y<B?Y-B:Y-q:0;return{[g]:h[g]+K,data:{[g]:ae,centerOffset:Y-ae-K,...W&&{alignmentOffset:K}},reset:W}}}),wb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Et(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Dt(o),b=yt(i),x=Dt(i)===i,N=await(l.isRTL==null?void 0:l.isRTL(u.floating)),M=h||(x||!m?[fo(i)]:db(i)),C=w!=="none";!h&&C&&M.push(...hb(i,m,w,N));const k=[i,...M],O=await l.detectOverflow(t,v),V=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&V.push(O[y]),c){const Y=cb(o,s,N);V.push(O[Y[0]],O[Y[1]])}if($=[...$,{placement:o,overflows:V}],!V.every(Y=>Y<=0)){var U,B;const Y=(((U=a.flip)==null?void 0:U.index)||0)+1,ae=k[Y];if(ae&&(!(c==="alignment"?b!==yt(ae):!1)||$.every(G=>yt(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:$},reset:{placement:ae}};let W=(B=$.filter(K=>K.overflows[0]<=0).sort((K,G)=>K.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!W)switch(g){case"bestFit":{var q;const K=(q=$.filter(G=>{if(C){const _=yt(G.placement);return _===b||_==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(_=>_>0).reduce((_,Q)=>_+Q,0)]).sort((G,_)=>G[1]-_[1])[0])==null?void 0:q[0];K&&(W=K);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Ic(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fc(e){return ib.some(t=>e[t]>=0)}const xb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Et(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ic(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ic(s,n.floating);return{data:{escapedOffsets:i,escaped:Fc(i)}}}default:return{}}}}},Wc=new Set(["left","top"]);async function Cb(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Dt(n),i=Tn(n),l=yt(n)==="y",u=Wc.has(s)?-1:1,p=a&&l?-1:1,c=Et(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),l?{x:g*p,y:h*u}:{x:h*u,y:g*p}}const Sb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Cb(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Nb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=Et(e,t),p={x:n,y:r},c=await a.detectOverflow(t,u),h=yt(Dt(o)),g=za(h);let w=p[g],m=p[h];if(s){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",x=w+c[y],N=w-c[b];w=Ba(x,w,N)}if(i){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=m+c[y],N=m-c[b];m=Ba(x,m,N)}const v=l.fn({...t,[g]:w,[h]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},Mb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Et(e,t),p={x:n,y:r},c=yt(o),h=za(c);let g=p[h],w=p[c];const m=Et(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",N=a.reference[h]-a.floating[x]+v.mainAxis,M=a.reference[h]+a.reference[x]-v.mainAxis;g<N?g=N:g>M&&(g=M)}if(u){var y,b;const x=h==="y"?"width":"height",N=Wc.has(Dt(o)),M=a.reference[c]-a.floating[x]+(N&&((y=s.offset)==null?void 0:y[c])||0)+(N?0:v.crossAxis),C=a.reference[c]+a.reference[x]+(N?0:((b=s.offset)==null?void 0:b[c])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:g,[c]:w}}}},kb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Et(e,t),p=await s.detectOverflow(t,u),c=Dt(o),h=Tn(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=h==="end"?"top":"bottom");const b=m-p.top-p.bottom,x=w-p.left-p.right,N=Lt(m-p[v],b),M=Lt(w-p[y],x),C=!t.middlewareData.shift;let k=N,O=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),C&&!h){const $=Ve(p.left,0),U=Ve(p.right,0),B=Ve(p.top,0),q=Ve(p.bottom,0);g?O=w-2*($!==0||U!==0?$+U:Ve(p.left,p.right)):k=m-2*(B!==0||q!==0?B+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:O,availableHeight:k});const V=await s.getDimensions(i.floating);return w!==V.width||m!==V.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function Pn(e){return $c(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=($c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $c(e){return ho()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return ho()?e instanceof Element||e instanceof Ye(e).Element:!1}function Tt(e){return ho()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Bc(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function lr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Eb(e){return/^(table|td|th)$/.test(Pn(e))}function go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Db=/transform|translate|scale|rotate|perspective|filter/,Tb=/paint|layout|strict|content/,nn=e=>!!e&&e!=="none";let Ya;function Ga(e){const t=st(e)?it(e):e;return nn(t.transform)||nn(t.translate)||nn(t.scale)||nn(t.rotate)||nn(t.perspective)||!ja()&&(nn(t.backdropFilter)||nn(t.filter))||Db.test(t.willChange||"")||Tb.test(t.contain||"")}function Pb(e){let t=Ht(e);for(;Tt(t)&&!On(t);){if(Ga(t))return t;if(go(t))return null;t=Ht(t)}return null}function ja(){return Ya==null&&(Ya=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ya}function On(e){return/^(html|body|#document)$/.test(Pn(e))}function it(e){return Ye(e).getComputedStyle(e)}function mo(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(Pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bc(e)&&e.host||wt(e);return Bc(t)?t.host:t}function zc(e){const t=Ht(e);return On(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&lr(t)?t:zc(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=Ra(s);return t.concat(s,s.visualViewport||[],lr(o)?o:[],i&&n?cr(i):[])}else return t.concat(o,cr(o,[],n))}function Ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=co(n)!==a||co(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ua(e){return st(e)?e:e.contextElement}function _n(e){const t=Ua(e);if(!Tt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Lc(t);let s=(a?co(n.width):n.width)/r,i=(a?co(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Ob=bt(0);function Hc(e){const t=Ye(e);return!ja()||!t.visualViewport?Ob:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _b(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function rn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ua(e);let s=bt(1);t&&(r?st(r)&&(s=_n(r)):s=_n(e));const i=_b(a,n,r)?Hc(a):bt(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,p=o.width/s.x,c=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=Ra(w);for(;m&&r&&g!==w;){const v=_n(m),y=m.getBoundingClientRect(),b=it(m),x=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,N=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=x,u+=N,w=Ye(m),m=Ra(w)}}return po({width:p,height:c,x:l,y:u})}function vo(e,t){const n=mo(e).scrollLeft;return t?t.left+n:rn(wt(e)).left+n}function Vc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ab(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?go(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const p=bt(0),c=Tt(r);if((c||!c&&!a)&&((Pn(r)!=="body"||lr(s))&&(l=mo(r)),c)){const g=rn(r);u=_n(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!c&&!a?Vc(s,l):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:n.y*u.y-l.scrollTop*u.y+p.y+h.y}}function Ib(e){return Array.from(e.getClientRects())}function Fb(e){const t=wt(e),n=mo(e),r=e.ownerDocument.body,o=Ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vo(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Ve(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Yc=25;function Wb(e,t){const n=Ye(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const p=ja();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const u=vo(r);if(u<=0){const p=r.ownerDocument,c=p.body,h=getComputedStyle(c),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-c.clientWidth-g);w<=Yc&&(a-=w)}else u<=Yc&&(a+=u);return{width:a,height:s,x:i,y:l}}function $b(e,t){const n=rn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Tt(e)?_n(e):bt(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Gc(e,t,n){let r;if(t==="viewport")r=Wb(e,n);else if(t==="document")r=Fb(wt(e));else if(st(t))r=$b(t,n);else{const o=Hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return po(r)}function jc(e,t){const n=Ht(e);return n===t||!st(n)||On(n)?!1:it(n).position==="fixed"||jc(n,t)}function Bb(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(i=>st(i)&&Pn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?Ht(e):e;for(;st(s)&&!On(s);){const i=it(s),l=Ga(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||lr(s)&&!l&&jc(e,s))?r=r.filter(p=>p!==s):o=i,s=Ht(s)}return t.set(e,r),r}function zb(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?go(t)?[]:Bb(t,this._c):[].concat(n),r],i=Gc(t,s[0],o);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=Gc(t,s[h],o);l=Ve(g.top,l),u=Lt(g.right,u),p=Lt(g.bottom,p),c=Ve(g.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function Lb(e){const{width:t,height:n}=Lc(e);return{width:t,height:n}}function Hb(e,t,n){const r=Tt(t),o=wt(t),a=n==="fixed",s=rn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=vo(o)}if(r||!r&&!a)if((Pn(t)!=="body"||lr(o))&&(i=mo(t)),r){const g=rn(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&u();a&&!r&&o&&u();const p=o&&!r&&!a?Vc(o,i):bt(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function Ka(e){return it(e).position==="static"}function Rc(e,t){if(!Tt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Uc(e,t){const n=Ye(e);if(go(e))return n;if(!Tt(e)){let o=Ht(e);for(;o&&!On(o);){if(st(o)&&!Ka(o))return o;o=Ht(o)}return n}let r=Rc(e,t);for(;r&&Eb(r)&&Ka(r);)r=Rc(r,t);return r&&On(r)&&Ka(r)&&!Ga(r)?n:r||Pb(e)||n}const Vb=async function(e){const t=this.getOffsetParent||Uc,n=this.getDimensions,r=await n(e.floating);return{reference:Hb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yb(e){return it(e).direction==="rtl"}const Gb={convertOffsetParentRelativeRectToViewportRelativeRect:Ab,getDocumentElement:wt,getClippingRect:zb,getOffsetParent:Uc,getElementRects:Vb,getClientRects:Ib,getDimensions:Lb,getScale:_n,isElement:st,isRTL:Yb};function Kc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jb(e,t){let n=null,r;const o=wt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:g}=u;if(i||t(),!h||!g)return;const w=uo(c),m=uo(o.clientWidth-(p+h)),v=uo(o.clientHeight-(c+g)),y=uo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ve(0,Lt(1,l))||1};let N=!0;function M(C){const k=C[0].intersectionRatio;if(k!==l){if(!N)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!Kc(u,e.getBoundingClientRect())&&s(),N=!1}try{n=new IntersectionObserver(M,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,x)}n.observe(e)}return s(!0),a}function Rb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ua(e),p=o||a?[...u?cr(u):[],...t?cr(t):[]]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const c=u&&i?jb(u,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!l&&g.observe(u),t&&g.observe(t));let w,m=l?rn(e):null;l&&v();function v(){const y=rn(e);m&&!Kc(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;p.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),c==null||c(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const Ub=Sb,Kb=Nb,qb=wb,Xb=kb,Zb=xb,qc=yb,Qb=Mb,Jb=(e,t,n)=>{const r=new Map,o={platform:Gb,...n},a={...o.platform,_c:r};return bb(e,t,{...o,platform:a})};var ey=typeof document<"u",ty=function(){},bo=ey?S.useLayoutEffect:ty;function yo(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!yo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Xc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zc(e,t){const n=Xc(e);return Math.round(t*n)/n}function qa(e){const t=f.useRef(e);return bo(()=>{t.current=e}),t}function ny(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);yo(h,r)||g(r);const[w,m]=f.useState(null),[v,y]=f.useState(null),b=f.useCallback(G=>{G!==C.current&&(C.current=G,m(G))},[]),x=f.useCallback(G=>{G!==k.current&&(k.current=G,y(G))},[]),N=a||w,M=s||v,C=f.useRef(null),k=f.useRef(null),O=f.useRef(p),V=l!=null,$=qa(l),U=qa(o),B=qa(u),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};U.current&&(G.platform=U.current),Jb(C.current,k.current,G).then(_=>{const Q={..._,isPositioned:B.current!==!1};Y.current&&!yo(O.current,Q)&&(O.current=Q,Vr.flushSync(()=>{c(Q)}))})},[h,t,n,U,B]);bo(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,c(G=>({...G,isPositioned:!1})))},[u]);const Y=f.useRef(!1);bo(()=>(Y.current=!0,()=>{Y.current=!1}),[]),bo(()=>{if(N&&(C.current=N),M&&(k.current=M),N&&M){if($.current)return $.current(N,M,q);q()}},[N,M,q,$,V]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:b,setFloating:x}),[b,x]),W=f.useMemo(()=>({reference:N,floating:M}),[N,M]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!W.floating)return G;const _=Zc(W.floating,p.x),Q=Zc(W.floating,p.y);return i?{...G,transform:"translate("+_+"px, "+Q+"px)",...Xc(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Q}},[n,i,W.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:W,floatingStyles:K}),[p,q,ae,W,K])}const ry=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qc({element:r.current,padding:o}).fn(n):{}:r?qc({element:r,padding:o}).fn(n):{}}}},oy=(e,t)=>{const n=Ub(e);return{name:n.name,fn:n.fn,options:[e,t]}},ay=(e,t)=>{const n=Kb(e);return{name:n.name,fn:n.fn,options:[e,t]}},sy=(e,t)=>({fn:Qb(e).fn,options:[e,t]}),iy=(e,t)=>{const n=qb(e);return{name:n.name,fn:n.fn,options:[e,t]}},ly=(e,t)=>{const n=Xb(e);return{name:n.name,fn:n.fn,options:[e,t]}},cy=(e,t)=>{const n=Zb(e);return{name:n.name,fn:n.fn,options:[e,t]}},dy=(e,t)=>{const n=ry(e);return{name:n.name,fn:n.fn,options:[e,t]}};var uy="Arrow",Qc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(ne.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=uy;var fy=Qc;function py(e){const[t,n]=f.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xa="Popper",[Jc,Vt]=Ze(Xa),[hy,ed]=Jc(Xa),td=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(hy,{scope:t,anchor:r,onAnchorChange:o,children:n})};td.displayName=Xa;var nd="PopperAnchor",rd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ed(nd,n),s=f.useRef(null),i=he(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(ne.div,{...o,ref:i})});rd.displayName=nd;var Za="PopperContent",[gy,my]=Jc(Za),od=f.forwardRef((e,t)=>{var I,R,X,se,de,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=ed(Za,n),[y,b]=f.useState(null),x=he(t,ke=>b(ke)),[N,M]=f.useState(null),C=py(N),k=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(a!=="center"?"-"+a:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},U=Array.isArray(u)?u:[u],B=U.length>0,q={padding:$,boundary:U.filter(by),altBoundary:B},{refs:Y,floatingStyles:ae,placement:W,isPositioned:K,middlewareData:G}=ny({strategy:"fixed",placement:V,whileElementsMounted:(...ke)=>Rb(...ke,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[oy({mainAxis:o+O,alignmentAxis:s}),l&&ay({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?sy():void 0,...q}),l&&iy({...q}),ly({...q,apply:({elements:ke,rects:De,availableWidth:tt,availableHeight:Re})=>{const{width:Fe,height:Kt}=De.reference,Ee=ke.floating.style;Ee.setProperty("--radix-popper-available-width",`${tt}px`),Ee.setProperty("--radix-popper-available-height",`${Re}px`),Ee.setProperty("--radix-popper-anchor-width",`${Fe}px`),Ee.setProperty("--radix-popper-anchor-height",`${Kt}px`)}}),N&&dy({element:N,padding:i}),yy({arrowWidth:k,arrowHeight:O}),h&&cy({strategy:"referenceHidden",...q})]}),[_,Q]=id(W),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const P=(I=G.arrow)==null?void 0:I.x,A=(R=G.arrow)==null?void 0:R.y,H=((X=G.arrow)==null?void 0:X.centerOffset)!==0,[F,Z]=f.useState();return Pe(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:K?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(se=G.transformOrigin)==null?void 0:se.x,(de=G.transformOrigin)==null?void 0:de.y].join(" "),...((ce=G.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(gy,{scope:n,placedSide:_,onArrowChange:M,arrowX:P,arrowY:A,shouldHideArrow:H,children:d.jsx(ne.div,{"data-side":_,"data-align":Q,...m,ref:x,style:{...m.style,animation:K?void 0:"none"}})})})});od.displayName=Za;var ad="PopperArrow",vy={top:"bottom",right:"left",bottom:"top",left:"right"},sd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=my(ad,r),s=vy[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(fy,{...o,ref:n,style:{...o.style,display:"block"}})})});sd.displayName=ad;function by(e){return e!==null}var yy=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=id(n),c={start:"0%",center:"50%",end:"100%"}[p],h=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,g=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let w="",m="";return u==="bottom"?(w=s?c:`${h}px`,m=`${-l}px`):u==="top"?(w=s?c:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(w=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:w,y:m}}}});function id(e){const[t,n="center"]=e.split("-");return[t,n]}var dr=td,ur=rd,wo=od,xo=sd,Co="Popover",[ld]=Ze(Co,[Vt]),fr=Vt(),[wy,Yt]=ld(Co),cd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=fr(t),l=f.useRef(null),[u,p]=f.useState(!1),[c,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:Co});return d.jsx(dr,{...i,children:d.jsx(wy,{scope:t,contentId:we(),triggerRef:l,open:c,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};cd.displayName=Co;var dd="PopoverAnchor",ud=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(dd,n),a=fr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(ur,{...a,...r,ref:t})});ud.displayName=dd;var fd="PopoverTrigger",pd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(fd,n),a=fr(n),s=he(t,o.triggerRef),i=d.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(ur,{asChild:!0,...a,children:i})});pd.displayName=fd;var Qa="PopoverPortal",[xy,Cy]=ld(Qa,{forceMount:void 0}),hd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Yt(Qa,t);return d.jsx(xy,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};hd.displayName=Qa;var An="PopoverContent",gd=f.forwardRef((e,t)=>{const n=Cy(An,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Yt(An,e.__scopePopover);return d.jsx(Be,{present:r||a.open,children:a.modal?d.jsx(Ny,{...o,ref:t}):d.jsx(My,{...o,ref:t})})});gd.displayName=An;var Sy=Qt("PopoverContent.RemoveScroll"),Ny=f.forwardRef((e,t)=>{const n=Yt(An,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return oo(s)},[]),d.jsx(ar,{as:Sy,allowPinchZoom:!0,children:d.jsx(md,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),My=f.forwardRef((e,t)=>{const n=Yt(An,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(md,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),md=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:p,...c}=e,h=Yt(An,n),g=fr(n);return Xr(),d.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:d.jsx(wo,{"data-state":yd(h.open),role:"dialog",id:h.contentId,...g,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),vd="PopoverClose",bd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(vd,n);return d.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});bd.displayName=vd;var ky="PopoverArrow",Ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=fr(n);return d.jsx(xo,{...o,...r,ref:t})});Ey.displayName=ky;function yd(e){return e?"open":"closed"}var Dy=cd,Ty=ud,Py=pd,Oy=hd,wd=gd,_y=bd;const In=Dy,So=Py,Ay=_y,Iy=Ty,on=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>d.jsx(Oy,{children:d.jsx(wd,{ref:o,align:t,sideOffset:n,className:D("z-50 rounded-lg ring-1 ring-border/60 bg-background p-4 shadow-md outline-none","origin-(--radix-popover-content-transform-origin)","data-[state=open]:animate-popover-in","data-[state=closed]:animate-popover-out",e),...r})}));on.displayName=wd.displayName;const xd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>d.jsxs(In,{...s,children:[d.jsx(So,{asChild:!0,children:t}),d.jsx(on,{side:n,align:r,sideOffset:o,className:a,children:e})]});xd.displayName="Popover";const Cd=Me(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ja=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>d.jsxs("button",{ref:s,type:"button",className:D(Cd({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[d.jsx("span",{className:D("truncate",!o&&"text-muted-foreground"),children:o??r}),d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));Ja.displayName="ComboBoxTrigger";const Sd=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>d.jsx(on,{ref:s,className:D("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:d.jsxs(io,{className:"w-full",value:r,onValueChange:o,children:[d.jsx("div",{className:"border-b border-border",children:d.jsx(Fa,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),d.jsx(Wa,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Sd.displayName="ComboBoxContent";const Nd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>d.jsxs(Ia,{ref:a,className:D("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),onSelect:r,...o,children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&d.jsx(er,{className:"size-4","aria-hidden":"true"})}),t]}));Nd.displayName="ComboBoxItem";const Md=f.forwardRef(({className:e,children:t,...n},r)=>d.jsx($a,{ref:r,className:D("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Md.displayName="ComboBoxEmpty";const kd=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>d.jsx(kc,{ref:o,heading:t,className:D("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",e),...r,children:n}));kd.displayName="ComboBoxGroup";const Ed=f.forwardRef(({className:e,...t},n)=>d.jsx(Ec,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));Ed.displayName="ComboBoxSeparator";const Dd=In;Dd.displayName="ComboBoxRoot";const Td=f.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",searchPlaceholder:o="Search…",emptyMessage:a="No results found.",size:s,isError:i,disabled:l,className:u},p)=>{const[c,h]=f.useState(!1),[g,w]=f.useState(""),m=f.useMemo(()=>{var y;return(y=e.find(b=>b.value===t))==null?void 0:y.label},[e,t]);function v(y){h(y),y||w("")}return d.jsxs(In,{open:c,onOpenChange:v,children:[d.jsx(So,{asChild:!0,children:d.jsx(Ja,{ref:p,size:s,isError:i,disabled:l,className:u,placeholder:r,"aria-expanded":c,"aria-haspopup":"listbox",children:m})}),d.jsx(on,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:d.jsxs(io,{className:"w-full",children:[d.jsx("div",{className:"border-b border-border",children:d.jsx(Fa,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:g,onValueChange:w})}),d.jsxs(Wa,{className:"max-h-60 overflow-y-auto p-1",children:[d.jsx($a,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(y=>d.jsxs(Ia,{value:y.label,disabled:y.disabled,className:D("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),onSelect:()=>{n==null||n(y.value),h(!1)},children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===y.value&&d.jsx(er,{className:"size-4","aria-hidden":"true"})}),y.label]},y.value))]})]})})]})});Td.displayName="ComboBox";const Fy=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function es(e){return Fy.has(e)}const ts=[{value:"contains",label:"Contains"},{value:"equals",label:"Equals"},{value:"startsWith",label:"Starts with"},{value:"endsWith",label:"Ends with"},{value:"notContains",label:"Does not contain"},{value:"empty",label:"Is empty"},{value:"notEmpty",label:"Is not empty"}];function Wy(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const ns=(e,t,n,r)=>{const o=Wy(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const u=n.trim().toLowerCase();return u===""||o.includes(u)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!es(s))return!0;const l=i.trim().toLowerCase();switch(s){case"empty":return o.trim()==="";case"notEmpty":return o.trim()!=="";case"contains":return l===""||o.includes(l);case"equals":return l===""?!0:o===l;case"startsWith":return l===""||o.startsWith(l);case"endsWith":return l===""||o.endsWith(l);case"notContains":return l===""?!0:!o.includes(l);default:return!0}};function $y(e){if(e==null||e==="")return{op:"contains",value:""};if(typeof e=="string")return{op:"contains",value:e};if(typeof e=="object"&&e!==null&&"op"in e){const t=e;if(es(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function By(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const rs=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:"w-full min-w-0",children:d.jsx("table",{ref:n,className:D("w-full caption-bottom text-sm",e),...t})}));rs.displayName="Table";const os=f.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:D("[&_tr]:border-b [&_tr]:border-border",e),...t}));os.displayName="TableHeader";const as=f.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:D("[&_tr:last-child]:border-0",e),...t}));as.displayName="TableBody";const ss=f.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:D("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));ss.displayName="TableFooter";const Pt=f.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:D("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));Pt.displayName="TableRow";const No=f.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:D("h-10 px-4 text-left align-middle","text-xs font-medium text-muted-foreground uppercase tracking-wide","whitespace-nowrap","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));No.displayName="TableHead";const an=f.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:D("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));an.displayName="TableCell";const Pd=f.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:D("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Pd.displayName="TableCaption";const is=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("animate-pulse rounded-md bg-muted",e),...t}));is.displayName="Skeleton";const Od=f.createContext({inGroup:!1}),_d=Me(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default","[&_svg]:pointer-events-none"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),pr=f.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=f.use(Od);return d.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r}),d.jsx("input",{ref:s,className:D(_d({size:t}),i&&"border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",n&&"border-destructive focus-visible:ring-destructive",r&&o==="left"&&"pl-9",r&&o==="right"&&"pr-9",e),"aria-invalid":n||void 0,...a}),r&&o==="right"&&d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r})]})});pr.displayName="Input";const ls=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>d.jsx(Od,{value:{inGroup:!0,isError:t},children:d.jsx("div",{ref:o,"aria-invalid":t||void 0,className:D("flex items-stretch overflow-hidden","rounded-md border border-input bg-background","divide-x divide-border","transition-[color,border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background","has-[input:disabled]:opacity-50 has-[input:disabled]:pointer-events-none",t&&"border-destructive focus-within:ring-destructive",e),...r,children:n})}));ls.displayName="InputGroup";const cs=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));cs.displayName="InputAddon";const ds=f.forwardRef(({className:e,...t},n)=>d.jsx("nav",{ref:n,"aria-label":"Pagination",className:D("flex items-center gap-1",e),...t}));ds.displayName="PaginationRoot";const us=["inline-flex items-center justify-center","size-10 rounded-md text-sm font-ui font-medium select-none tabular-nums","transition-[color,background-color,box-shadow] duration-150","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),fs=f.forwardRef(({className:e,isActive:t,...n},r)=>d.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:D(us,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));fs.displayName="PaginationItem";const ps=f.forwardRef(({className:e,...t},n)=>d.jsx("button",{ref:n,"aria-label":"Previous page",className:D(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:d.jsx(Qi,{className:"size-4"})}));ps.displayName="PaginationPrev";const hs=f.forwardRef(({className:e,...t},n)=>d.jsx("button",{ref:n,"aria-label":"Next page",className:D(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:d.jsx(vn,{className:"size-4"})}));hs.displayName="PaginationNext";const gs=({className:e,...t})=>d.jsx("span",{"aria-hidden":"true",className:D("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:d.jsx(Og,{className:"size-4"})});gs.displayName="PaginationEllipsis";function zy(e,t,n){const r=Math.max(e-n,1),o=Math.min(e+n,t),a=r>2,s=o<t-1;if(!a&&!s)return Array.from({length:t},(i,l)=>l+1);if(!a){const i=3+2*n;return i>=t?Array.from({length:t},(l,u)=>u+1):[...Array.from({length:i},(l,u)=>u+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(u,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(u,p)=>l+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const ms=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=zy(e,t,r);return d.jsxs(ds,{className:o,...a,children:[d.jsx(ps,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?d.jsx(gs,{},i):d.jsx(fs,{isActive:i===e,onClick:()=>n(i),children:i},i)),d.jsx(hs,{onClick:()=>n(e+1),disabled:e>=t})]})};ms.displayName="Pagination";function Ad(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ly(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Id=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"}),Hy="VisuallyHidden",Fd=f.forwardRef((e,t)=>d.jsx(ne.span,{...e,ref:t,style:{...Id,...e.style}}));Fd.displayName=Hy;var Vy=Fd,Yy=[" ","Enter","ArrowUp","ArrowDown"],Gy=[" ","Enter"],sn="Select",[Mo,ko,jy]=Yr(sn),[Fn]=Ze(sn,[jy,Vt]),Eo=Vt(),[Ry,Gt]=Fn(sn),[Uy,Ky]=Fn(sn),Wd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:g,form:w}=e,m=Eo(t),[v,y]=f.useState(null),[b,x]=f.useState(null),[N,M]=f.useState(!1),C=Jn(u),[k,O]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:sn}),[V,$]=Qe({prop:s,defaultProp:i,onChange:l,caller:sn}),U=f.useRef(null),B=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(W=>W.props.value).join(";");return d.jsx(dr,{...m,children:d.jsxs(Ry,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:we(),value:V,onValueChange:$,open:k,onOpenChange:O,dir:C,triggerPointerDownPosRef:U,disabled:h,children:[d.jsx(Mo.Provider,{scope:t,children:d.jsx(Uy,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(W=>{Y(K=>new Set(K).add(W))},[]),onNativeOptionRemove:f.useCallback(W=>{Y(K=>{const G=new Set(K);return G.delete(W),G})},[]),children:n})}),B?d.jsxs(su,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:c,value:V,onChange:W=>$(W.target.value),disabled:h,form:w,children:[V===void 0?d.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Wd.displayName=sn;var $d="SelectTrigger",Bd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Eo(n),s=Gt($d,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=ko(n),p=f.useRef("touch"),[c,h,g]=lu(m=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=cu(v,m,y);b!==void 0&&s.onValueChange(b.value)}),w=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(ur,{asChild:!0,...a,children:d.jsx(ne.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":iu(s.value)?"":void 0,...o,ref:l,onClick:j(o.onClick,m=>{m.currentTarget.focus(),p.current!=="mouse"&&w(m)}),onPointerDown:j(o.onPointerDown,m=>{p.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:j(o.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Yy.includes(m.key)&&(w(),m.preventDefault())})})})});Bd.displayName=$d;var zd="SelectValue",Ld=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Gt(zd,n),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=he(t,l.onValueNodeChange);return Pe(()=>{u(p)},[u,p]),d.jsx(ne.span,{...i,ref:c,style:{pointerEvents:"none"},children:iu(l.value)?d.jsx(d.Fragment,{children:s}):a})});Ld.displayName=zd;var qy="SelectIcon",Xy=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Xy.displayName=qy;var Zy="SelectPortal",Hd=e=>d.jsx(Cn,{asChild:!0,...e});Hd.displayName=Zy;var ln="SelectContent",Vd=f.forwardRef((e,t)=>{const n=Gt(ln,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Vr.createPortal(d.jsx(Yd,{scope:e.__scopeSelect,children:d.jsx(Mo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Gd,{...e,ref:t})});Vd.displayName=ln;var lt=10,[Yd,jt]=Fn(ln),Qy="SelectContentImpl",Jy=Qt("SelectContent.RemoveScroll"),Gd=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,b=Gt(ln,n),[x,N]=f.useState(null),[M,C]=f.useState(null),k=he(t,I=>N(I)),[O,V]=f.useState(null),[$,U]=f.useState(null),B=ko(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return oo(x)},[x]),Xr();const W=f.useCallback(I=>{const[R,...X]=B().map(ce=>ce.ref.current),[se]=X.slice(-1),de=document.activeElement;for(const ce of I)if(ce===de||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===R&&M&&(M.scrollTop=0),ce===se&&M&&(M.scrollTop=M.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[B,M]),K=f.useCallback(()=>W([O,x]),[W,O,x]);f.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:G,triggerPointerDownPosRef:_}=b;f.useEffect(()=>{if(x){let I={x:0,y:0};const R=se=>{var de,ce;I={x:Math.abs(Math.round(se.pageX)-(((de=_.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(se.pageY)-(((ce=_.current)==null?void 0:ce.y)??0))}},X=se=>{I.x<=10&&I.y<=10?se.preventDefault():x.contains(se.target)||G(!1),document.removeEventListener("pointermove",R),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,G,_]),f.useEffect(()=>{const I=()=>G(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[G]);const[Q,oe]=lu(I=>{const R=B().filter(de=>!de.disabled),X=R.find(de=>de.ref.current===document.activeElement),se=cu(R,I,X);se&&setTimeout(()=>se.ref.current.focus())}),P=f.useCallback((I,R,X)=>{const se=!ae.current&&!X;(b.value!==void 0&&b.value===R||se)&&(V(I),se&&(ae.current=!0))},[b.value]),A=f.useCallback(()=>x==null?void 0:x.focus(),[x]),H=f.useCallback((I,R,X)=>{const se=!ae.current&&!X;(b.value!==void 0&&b.value===R||se)&&U(I)},[b.value]),F=r==="popper"?vs:jd,Z=F===vs?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Yd,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:P,selectedItem:O,onItemLeave:A,itemTextRefCallback:H,focusSelectedItem:K,selectedItemText:$,position:r,isPositioned:q,searchRef:Q,children:d.jsx(ar,{as:Jy,allowPinchZoom:!0,children:d.jsx(or,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:j(o,I=>{var R;(R=b.trigger)==null||R.focus({preventScroll:!0}),I.preventDefault()}),children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(F,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...Z,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j(y.onKeyDown,I=>{const R=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!R&&I.key.length===1&&oe(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let se=B().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(I.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const de=I.target,ce=se.indexOf(de);se=se.slice(ce+1)}setTimeout(()=>W(se)),I.preventDefault()}})})})})})})});Gd.displayName=Qy;var ew="SelectItemAlignedPosition",jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gt(ln,n),s=jt(ln,n),[i,l]=f.useState(null),[u,p]=f.useState(null),c=he(t,k=>p(k)),h=ko(n),g=f.useRef(!1),w=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&y){const k=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),V=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const de=$.left-O.left,ce=V.left-de,ke=k.left-ce,De=k.width+ke,tt=Math.max(De,O.width),Re=window.innerWidth-lt,Fe=Ad(ce,[lt,Math.max(lt,Re-tt)]);i.style.minWidth=De+"px",i.style.left=Fe+"px"}else{const de=O.right-$.right,ce=window.innerWidth-V.right-de,ke=window.innerWidth-k.right-ce,De=k.width+ke,tt=Math.max(De,O.width),Re=window.innerWidth-lt,Fe=Ad(ce,[lt,Math.max(lt,Re-tt)]);i.style.minWidth=De+"px",i.style.right=Fe+"px"}const U=h(),B=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(u),ae=parseInt(Y.borderTopWidth,10),W=parseInt(Y.paddingTop,10),K=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),_=ae+W+q+G+K,Q=Math.min(v.offsetHeight*5,_),oe=window.getComputedStyle(m),P=parseInt(oe.paddingTop,10),A=parseInt(oe.paddingBottom,10),H=k.top+k.height/2-lt,F=B-H,Z=v.offsetHeight/2,I=v.offsetTop+Z,R=ae+W+I,X=_-R;if(R<=H){const de=U.length>0&&v===U[U.length-1].ref.current;i.style.bottom="0px";const ce=u.clientHeight-m.offsetTop-m.offsetHeight,ke=Math.max(F,Z+(de?A:0)+ce+K),De=R+ke;i.style.height=De+"px"}else{const de=U.length>0&&v===U[0].ref.current;i.style.top="0px";const ke=Math.max(H,ae+m.offsetTop+(de?P:0)+Z)+X;i.style.height=ke+"px",m.scrollTop=R-H+m.offsetTop}i.style.margin=`${lt}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,y,a.dir,r]);Pe(()=>x(),[x]);const[N,M]=f.useState();Pe(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),b==null||b(),w.current=!1)},[x,b]);return d.jsx(nw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:d.jsx(ne.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jd.displayName=ew;var tw="SelectPopperPosition",vs=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=Eo(n);return d.jsx(wo,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});vs.displayName=tw;var[nw,bs]=Fn(ln,{}),ys="SelectViewport",Rd=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=jt(ys,n),s=bs(ys,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:r}),d.jsx(Mo.Slot,{scope:n,children:d.jsx(ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:j(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),y=Math.max(m,v);if(y<w){const b=y+g,x=Math.min(w,b),N=b-x;c.style.height=x+"px",c.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});Rd.displayName=ys;var Ud="SelectGroup",[rw,ow]=Fn(Ud),Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=we();return d.jsx(rw,{scope:n,id:o,children:d.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Kd.displayName=Ud;var qd="SelectLabel",Xd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ow(qd,n);return d.jsx(ne.div,{id:o.id,...r,ref:t})});Xd.displayName=qd;var Do="SelectItem",[aw,Zd]=Fn(Do),Qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Gt(Do,n),l=jt(Do,n),u=i.value===r,[p,c]=f.useState(a??""),[h,g]=f.useState(!1),w=he(t,b=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,b,r,o)}),m=we(),v=f.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")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 d.jsx(aw,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:f.useCallback(b=>{c(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:d.jsx(Mo.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:d.jsx(ne.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:j(s.onFocus,()=>g(!0)),onBlur:j(s.onBlur,()=>g(!1)),onClick:j(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:j(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:j(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:j(s.onPointerMove,b=>{var x;v.current=b.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(s.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:j(s.onKeyDown,b=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&b.key===" "||(Gy.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Qd.displayName=Do;var hr="SelectItemText",Jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Gt(hr,n),i=jt(hr,n),l=Zd(hr,n),u=Ky(hr,n),[p,c]=f.useState(null),h=he(t,y=>c(y),l.onItemTextChange,y=>{var b;return(b=i.itemTextRefCallback)==null?void 0:b.call(i,y,l.value,l.disabled)}),g=p==null?void 0:p.textContent,w=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Pe(()=>(m(w),()=>v(w)),[m,v,w]),d.jsxs(d.Fragment,{children:[d.jsx(ne.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vr.createPortal(a.children,s.valueNode):null]})});Jd.displayName=hr;var eu="SelectItemIndicator",tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Zd(eu,n).isSelected?d.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});tu.displayName=eu;var ws="SelectScrollUpButton",nu=f.forwardRef((e,t)=>{const n=jt(ws,e.__scopeSelect),r=bs(ws,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});nu.displayName=ws;var xs="SelectScrollDownButton",ru=f.forwardRef((e,t)=>{const n=jt(xs,e.__scopeSelect),r=bs(xs,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ru.displayName=xs;var ou=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=jt("SelectScrollButton",n),s=f.useRef(null),i=ko(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Pe(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:j(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:j(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{l()})})}),sw="SelectSeparator",au=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});au.displayName=sw;var Cs="SelectArrow",iw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Eo(n),a=Gt(Cs,n),s=jt(Cs,n);return a.open&&s.position==="popper"?d.jsx(xo,{...o,...r,ref:t}):null});iw.displayName=Cs;var lw="SelectBubbleInput",su=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=Ly(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(ne.select,{...n,style:{...Id,...n.style},ref:a,defaultValue:t})});su.displayName=lw;function iu(e){return e===""||e===void 0}function lu(e){const t=ot(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function cu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=cw(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function cw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dw=Wd,du=Bd,uw=Ld,fw=Hd,uu=Vd,pw=Rd,hw=Kd,fu=Xd,pu=Qd,gw=Jd,mw=tu,hu=nu,gu=ru,mu=au;const vu=Me(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-muted-foreground"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ss=dw,vw=hw,Ns=uw,To=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>d.jsxs(du,{ref:a,className:D("group",vu({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));To.displayName=du.displayName;const Ms=f.forwardRef(({className:e,...t},n)=>d.jsx(hu,{ref:n,className:D("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:d.jsx(sa,{className:"size-4"})}));Ms.displayName=hu.displayName;const ks=f.forwardRef(({className:e,...t},n)=>d.jsx(gu,{ref:n,className:D("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:d.jsx(Jt,{className:"size-4"})}));ks.displayName=gu.displayName;const Po=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(fw,{children:d.jsxs(uu,{ref:o,position:n,sideOffset:4,className:D("z-50 min-w-32 overflow-hidden rounded-lg ring-1 ring-border/60 bg-background text-foreground shadow-md","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",n==="popper"&&["data-[side=bottom]:translate-y-1","data-[side=top]:-translate-y-1"],e),...r,children:[d.jsx(Ms,{}),d.jsx(pw,{className:"p-1",children:t}),d.jsx(ks,{})]})}));Po.displayName=uu.displayName;const bu=f.forwardRef(({className:e,...t},n)=>d.jsx(fu,{ref:n,className:D("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));bu.displayName=fu.displayName;const Es=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(pu,{ref:r,className:D("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm","outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:d.jsx(mw,{children:d.jsx(er,{className:"size-4"})})}),d.jsx(gw,{children:t})]}));Es.displayName=pu.displayName;const yu=f.forwardRef(({className:e,...t},n)=>d.jsx(mu,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));yu.displayName=mu.displayName;const wu=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>d.jsxs(Ss,{disabled:r,...s,children:[d.jsx(To,{ref:i,size:t,isError:n,className:o,children:d.jsx(Ns,{placeholder:e})}),d.jsx(Po,{children:a})]}));wu.displayName="Select";var Ds="rovingFocusGroup.onEntryFocus",bw={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[Ts,xu,yw]=Yr(gr),[ww,Oo]=Ze(gr,[yw]),[xw,Cw]=ww(gr),Cu=f.forwardRef((e,t)=>d.jsx(Ts.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Ts.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Sw,{...e,ref:t})})}));Cu.displayName=gr;var Sw=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),g=he(t,h),w=Jn(a),[m,v]=Qe({prop:s,defaultProp:i??null,onChange:l,caller:gr}),[y,b]=f.useState(!1),x=ot(u),N=xu(n),M=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(Ds,x),()=>O.removeEventListener(Ds,x)},[x]),d.jsx(xw,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(O=>v(O),[v]),onItemShiftTab:f.useCallback(()=>b(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(O=>O+1),[]),onFocusableItemRemove:f.useCallback(()=>k(O=>O-1),[]),children:d.jsx(ne.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{M.current=!0}),onFocus:j(e.onFocus,O=>{const V=!M.current;if(O.target===O.currentTarget&&V&&!y){const $=new CustomEvent(Ds,bw);if(O.currentTarget.dispatchEvent($),!$.defaultPrevented){const U=N().filter(W=>W.focusable),B=U.find(W=>W.active),q=U.find(W=>W.id===m),ae=[B,q,...U].filter(Boolean).map(W=>W.ref.current);Mu(ae,p)}}M.current=!1}),onBlur:j(e.onBlur,()=>b(!1))})})}),Su="RovingFocusGroupItem",Nu=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=we(),u=a||l,p=Cw(Su,n),c=p.currentTabStopId===u,h=xu(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),d.jsx(Ts.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(ne.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=kw(v,p.orientation,p.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(N=>N.focusable).map(N=>N.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=p.loop?Ew(x,N+1):x.slice(N+1)}setTimeout(()=>Mu(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Nu.displayName=Su;var Nw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kw(e,t,n){const r=Mw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nw[r]}function Mu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ew(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ku=Cu,Eu=Nu,Ps=["Enter"," "],Dw=["ArrowDown","PageUp","Home"],Du=["ArrowUp","PageDown","End"],Tw=[...Dw,...Du],Pw={ltr:[...Ps,"ArrowRight"],rtl:[...Ps,"ArrowLeft"]},Ow={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mr="Menu",[vr,_w,Aw]=Yr(mr),[cn,Tu]=Ze(mr,[Aw,Vt,Oo]),br=Vt(),Pu=Oo(),[Ou,Rt]=cn(mr),[Iw,yr]=cn(mr),_u=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=br(t),[l,u]=f.useState(null),p=f.useRef(!1),c=ot(a),h=Jn(o);return f.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.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})}},[]),d.jsx(dr,{...i,children:d.jsx(Ou,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(Iw,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};_u.displayName=mr;var Fw="MenuAnchor",Os=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return d.jsx(ur,{...o,...r,ref:t})});Os.displayName=Fw;var _s="MenuPortal",[Ww,Au]=cn(_s,{forceMount:void 0}),Iu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Rt(_s,t);return d.jsx(Ww,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};Iu.displayName=_s;var Je="MenuContent",[$w,As]=cn(Je),Fu=f.forwardRef((e,t)=>{const n=Au(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Rt(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu);return d.jsx(vr.Provider,{scope:e.__scopeMenu,children:d.jsx(Be,{present:r||a.open,children:d.jsx(vr.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(Bw,{...o,ref:t}):d.jsx(zw,{...o,ref:t})})})})}),Bw=f.forwardRef((e,t)=>{const n=Rt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return oo(a)},[]),d.jsx(Is,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zw=f.forwardRef((e,t)=>{const n=Rt(Je,e.__scopeMenu);return d.jsx(Is,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lw=Qt("MenuContent.ScrollLock"),Is=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:c,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Rt(Je,n),y=yr(Je,n),b=br(n),x=Pu(n),N=_w(n),[M,C]=f.useState(null),k=f.useRef(null),O=he(t,k,v.onContentChange),V=f.useRef(0),$=f.useRef(""),U=f.useRef(0),B=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,W=w?{as:Lw,allowPinchZoom:!0}:void 0,K=_=>{var I,R;const Q=$.current+_,oe=N().filter(X=>!X.disabled),P=document.activeElement,A=(I=oe.find(X=>X.ref.current===P))==null?void 0:I.textValue,H=oe.map(X=>X.textValue),F=Qw(H,Q,A),Z=(R=oe.find(X=>X.textValue===F))==null?void 0:R.ref.current;(function X(se){$.current=se,window.clearTimeout(V.current),se!==""&&(V.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(V.current),[]),Xr();const G=f.useCallback(_=>{var oe,P;return q.current===((oe=B.current)==null?void 0:oe.side)&&e0(_,(P=B.current)==null?void 0:P.area)},[]);return d.jsx($w,{scope:n,searchRef:$,onItemEnter:f.useCallback(_=>{G(_)&&_.preventDefault()},[G]),onItemLeave:f.useCallback(_=>{var Q;G(_)||((Q=k.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(_=>{G(_)&&_.preventDefault()},[G]),pointerGraceTimerRef:U,onPointerGraceIntentChange:f.useCallback(_=>{B.current=_},[]),children:d.jsx(ae,{...W,children:d.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,_=>{var Q;_.preventDefault(),(Q=k.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:c,onInteractOutside:h,onDismiss:g,children:d.jsx(ku,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:j(l,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(wo,{role:"menu","aria-orientation":"vertical","data-state":Ju(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...m,ref:O,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,_=>{const oe=_.target.closest("[data-radix-menu-content]")===_.currentTarget,P=_.ctrlKey||_.altKey||_.metaKey,A=_.key.length===1;oe&&(_.key==="Tab"&&_.preventDefault(),!P&&A&&K(_.key));const H=k.current;if(_.target!==H||!Tw.includes(_.key))return;_.preventDefault();const Z=N().filter(I=>!I.disabled).map(I=>I.ref.current);Du.includes(_.key)&&Z.reverse(),Xw(Z)}),onBlur:j(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(V.current),$.current="")}),onPointerMove:j(e.onPointerMove,xr(_=>{const Q=_.target,oe=Y.current!==_.clientX;if(_.currentTarget.contains(Q)&&oe){const P=_.clientX>Y.current?"right":"left";q.current=P,Y.current=_.clientX}}))})})})})})})});Fu.displayName=Je;var Hw="MenuGroup",Fs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{role:"group",...r,ref:t})});Fs.displayName=Hw;var Vw="MenuLabel",Wu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{...r,ref:t})});Wu.displayName=Vw;var _o="MenuItem",$u="menu.itemSelect",Ao=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=yr(_o,e.__scopeMenu),i=As(_o,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),p=()=>{const c=a.current;if(!n&&c){const h=new CustomEvent($u,{bubbles:!0,cancelable:!0});c.addEventListener($u,g=>r==null?void 0:r(g),{once:!0}),Ii(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(Bu,{...o,ref:l,disabled:n,onClick:j(e.onClick,p),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:j(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,c=>{const h=i.searchRef.current!=="";n||h&&c.key===" "||Ps.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});Ao.displayName=_o;var Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=As(_o,n),i=Pu(n),l=f.useRef(null),u=he(t,l),[p,c]=f.useState(!1),[h,g]=f.useState("");return f.useEffect(()=>{const w=l.current;w&&g((w.textContent??"").trim())},[a.children]),d.jsx(vr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:d.jsx(Eu,{asChild:!0,...i,focusable:!r,children:d.jsx(ne.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:j(e.onPointerMove,xr(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,xr(w=>s.onItemLeave(w))),onFocus:j(e.onFocus,()=>c(!0)),onBlur:j(e.onBlur,()=>c(!1))})})})}),Yw="MenuCheckboxItem",zu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(Gu,{scope:e.__scopeMenu,checked:n,children:d.jsx(Ao,{role:"menuitemcheckbox","aria-checked":Io(n)?"mixed":n,...o,ref:t,"data-state":Bs(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Io(n)?!0:!n),{checkForDefaultPrevented:!1})})})});zu.displayName=Yw;var Lu="MenuRadioGroup",[Gw,jw]=cn(Lu,{value:void 0,onValueChange:()=>{}}),Hu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return d.jsx(Gw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Fs,{...o,ref:t})})});Hu.displayName=Lu;var Vu="MenuRadioItem",Yu=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jw(Vu,e.__scopeMenu),a=n===o.value;return d.jsx(Gu,{scope:e.__scopeMenu,checked:a,children:d.jsx(Ao,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Bs(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Yu.displayName=Vu;var Ws="MenuItemIndicator",[Gu,Rw]=cn(Ws,{checked:!1}),ju=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Rw(Ws,n);return d.jsx(Be,{present:r||Io(a.checked)||a.checked===!0,children:d.jsx(ne.span,{...o,ref:t,"data-state":Bs(a.checked)})})});ju.displayName=Ws;var Uw="MenuSeparator",Ru=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ru.displayName=Uw;var Kw="MenuArrow",Uu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return d.jsx(xo,{...o,...r,ref:t})});Uu.displayName=Kw;var $s="MenuSub",[qw,Ku]=cn($s),qu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Rt($s,t),s=br(t),[i,l]=f.useState(null),[u,p]=f.useState(null),c=ot(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(dr,{...s,children:d.jsx(Ou,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:p,children:d.jsx(qw,{scope:t,contentId:we(),triggerId:we(),trigger:i,onTriggerChange:l,children:n})})})};qu.displayName=$s;var wr="MenuSubTrigger",Xu=f.forwardRef((e,t)=>{const n=Rt(wr,e.__scopeMenu),r=yr(wr,e.__scopeMenu),o=Ku(wr,e.__scopeMenu),a=As(wr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(Os,{asChild:!0,...u,children:d.jsx(Bu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ju(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,xr(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,xr(c=>{var g,w;p();const h=(g=n.content)==null?void 0:g.getBoundingClientRect();if(h){const m=(w=n.content)==null?void 0:w.dataset.side,v=m==="right",y=v?-5:5,b=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+y,y:c.clientY},{x:b,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:b,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,c=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&c.key===" "||Pw[r.dir].includes(c.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),c.preventDefault())})})})});Xu.displayName=wr;var Zu="MenuSubContent",Qu=f.forwardRef((e,t)=>{const n=Au(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Rt(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu),i=Ku(Zu,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(vr.Provider,{scope:e.__scopeMenu,children:d.jsx(Be,{present:r||a.open,children:d.jsx(vr.Slot,{scope:e.__scopeMenu,children:d.jsx(Is,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:j(e.onFocusOutside,p=>{p.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,p=>{s.onClose(),p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{var g;const c=p.currentTarget.contains(p.target),h=Ow[s.dir].includes(p.key);c&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});Qu.displayName=Zu;function Ju(e){return e?"open":"closed"}function Io(e){return e==="indeterminate"}function Bs(e){return Io(e)?"indeterminate":e?"checked":"unchecked"}function Xw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qw(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Zw(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Jw(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function e0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jw(n,t)}function xr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var t0=_u,n0=Os,r0=Iu,o0=Fu,a0=Fs,s0=Wu,i0=Ao,l0=zu,c0=Hu,d0=Yu,u0=ju,f0=Ru,p0=Uu,h0=qu,g0=Xu,m0=Qu,Fo="DropdownMenu",[v0]=Ze(Fo,[Tu]),Ae=Tu(),[b0,ef]=v0(Fo),tf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ae(t),u=f.useRef(null),[p,c]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:Fo});return d.jsx(b0,{scope:t,triggerId:we(),triggerRef:u,contentId:we(),open:p,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:i,children:d.jsx(t0,{...l,open:p,onOpenChange:c,dir:r,modal:i,children:n})})};tf.displayName=Fo;var nf="DropdownMenuTrigger",rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ef(nf,n),s=Ae(n);return d.jsx(n0,{asChild:!0,...s,children:d.jsx(ne.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:mt(t,a.triggerRef),onPointerDown:j(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:j(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rf.displayName=nf;var y0="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ae(t);return d.jsx(r0,{...r,...n})};of.displayName=y0;var af="DropdownMenuContent",sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ef(af,n),a=Ae(n),s=f.useRef(!1);return d.jsx(o0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;(!o.modal||p)&&(s.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)"}})});sf.displayName=af;var w0="DropdownMenuGroup",lf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(a0,{...o,...r,ref:t})});lf.displayName=w0;var x0="DropdownMenuLabel",cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(s0,{...o,...r,ref:t})});cf.displayName=x0;var C0="DropdownMenuItem",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(i0,{...o,...r,ref:t})});df.displayName=C0;var S0="DropdownMenuCheckboxItem",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(l0,{...o,...r,ref:t})});uf.displayName=S0;var N0="DropdownMenuRadioGroup",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(c0,{...o,...r,ref:t})});ff.displayName=N0;var M0="DropdownMenuRadioItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(d0,{...o,...r,ref:t})});pf.displayName=M0;var k0="DropdownMenuItemIndicator",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(u0,{...o,...r,ref:t})});hf.displayName=k0;var E0="DropdownMenuSeparator",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(f0,{...o,...r,ref:t})});gf.displayName=E0;var D0="DropdownMenuArrow",T0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(p0,{...o,...r,ref:t})});T0.displayName=D0;var P0=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ae(t),[i,l]=Qe({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(h0,{...s,open:i,onOpenChange:l,children:n})},O0="DropdownMenuSubTrigger",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(g0,{...o,...r,ref:t})});mf.displayName=O0;var _0="DropdownMenuSubContent",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(m0,{...o,...r,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)"}})});vf.displayName=_0;var A0=tf,I0=rf,bf=of,yf=sf,F0=lf,wf=cf,xf=df,Cf=uf,W0=ff,Sf=pf,Nf=hf,Mf=gf,$0=P0,kf=mf,Ef=vf;const Wo=A0,$o=I0,B0=F0,z0=bf,zs=$0,Df=W0,Cr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>d.jsx(bf,{children:d.jsx(yf,{ref:r,sideOffset:t,className:D("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","origin-(--radix-dropdown-menu-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...n})}));Cr.displayName=yf.displayName;const Ot=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>d.jsx(xf,{ref:o,className:D("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",n==="destructive"&&"text-destructive focus:bg-destructive/10 focus:text-destructive [&_svg]:text-destructive",e),...r}));Ot.displayName=xf.displayName;const Ls=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(Cf,{ref:o,className:D("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(er,{className:"size-3.5"})})}),t]}));Ls.displayName=Cf.displayName;const Hs=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Sf,{ref:r,className:D("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(Dg,{className:"size-2 fill-current"})})}),t]}));Hs.displayName=Sf.displayName;const Sr=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(wf,{ref:r,className:D("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Sr.displayName=wf.displayName;const Wn=f.forwardRef(({className:e,...t},n)=>d.jsx(Mf,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));Wn.displayName=Mf.displayName;const Bo=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(kf,{ref:o,className:D("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent data-[state=open]:bg-accent","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",e),...r,children:[n,d.jsx(vn,{className:"ml-auto"})]}));Bo.displayName=kf.displayName;const zo=f.forwardRef(({className:e,...t},n)=>d.jsx(Ef,{ref:n,className:D("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...t}));zo.displayName=Ef.displayName;const Tf=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>d.jsxs(Wo,{...s,children:[d.jsx($o,{asChild:!0,children:e}),d.jsx(Cr,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,l)=>i.type==="separator"?d.jsx(Wn,{},l):i.type==="label"?d.jsx(Sr,{children:i.label},l):d.jsxs(Ot,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});Tf.displayName="DropdownMenu";const Pf=f.createContext(null);function Of(){return f.useContext(Pf)}const _f="application/x-bookers-grouping-column-id",Nr="application/x-bookers-grouping-chip",_t="bookers-expand";function Af(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Af):e.footer!==void 0}function L0(){if(typeof document>"u")return{minPx:128,maxPx:1280};const e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return{minPx:8*e,maxPx:Math.min(window.innerHeight*.9,80*e)}}function If(e,t){if(typeof e=="number")return e;const n=e.trim();if(n.includes("min(")||typeof document>"u")return t;const r=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return n.endsWith("rem")?parseFloat(n)*r:n.endsWith("vh")?parseFloat(n)/100*window.innerHeight:n.endsWith("px")?parseFloat(n):t}function Lo(e,t,n){return Math.min(Math.max(e,t),n)}function H0({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=l=>{var p;l.preventDefault(),l.stopPropagation();const u=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:l.pointerId,startY:l.clientY,startHeight:u},l.currentTarget.setPointerCapture(l.pointerId)},s=l=>{const u=o.current;if(!u||l.pointerId!==u.pointerId)return;const p=l.clientY-u.startY,c=Lo(u.startHeight+p,t,n);r(c)},i=l=>{const u=o.current;if(!(!u||l.pointerId!==u.pointerId)){o.current=null;try{l.currentTarget.releasePointerCapture(l.pointerId)}catch{}}};return d.jsx("div",{className:D("relative flex min-h-10 w-full shrink-0 cursor-ns-resize items-center justify-center","text-muted-foreground/45 transition-[color] duration-150 ease-out","hover:text-muted-foreground/75","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),role:"separator","aria-orientation":"horizontal","aria-label":"Drag to resize table height",tabIndex:0,onPointerDown:a,onPointerMove:s,onPointerUp:i,onPointerCancel:i,onKeyDown:l=>{var h;if(l.key!=="ArrowUp"&&l.key!=="ArrowDown")return;l.preventDefault();const u=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,c=l.key==="ArrowUp"?-u:u;r(Lo(p+c,t,n))},children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5","aria-hidden":!0,children:[d.jsx("span",{className:"h-px w-6 bg-border/50"}),d.jsx(_g,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),d.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function V0({column:e,id:t,showClear:n}){const r=e.getFilterValue();return d.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[d.jsx(pr,{size:"sm",type:"text",value:String(r??""),onChange:o=>{const a=o.target.value;e.setFilterValue(a===""?void 0:a)},placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"h-8 min-w-0 flex-1"}),n&&e.getIsFiltered()?d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}function Y0({column:e,id:t,showClear:n}){var c;const r=e.getFilterValue(),o=$y(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(By(h))},u=((c=ts.find(h=>h.value===a))==null?void 0:c.label)??a,p=e.getIsFiltered();return d.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[d.jsxs(ls,{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"min-w-0 flex-1",children:i?d.jsx(pr,{size:"sm",type:"text",value:s,onChange:h=>l({op:a,value:h.target.value}),placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"w-full min-w-0"}):d.jsx("div",{className:"flex h-8 w-full min-w-0 items-center border-0 bg-background px-3 text-xs text-muted-foreground select-none",children:u})}),d.jsx(cs,{className:"p-0",children:d.jsxs(Wo,{children:[d.jsx($o,{asChild:!0,children:d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:D("h-8 min-w-8 shrink-0 rounded-none px-2 text-muted-foreground transition-colors",p&&"text-primary"),"aria-label":`${t} filter operator: ${u}`,children:d.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[d.jsx(Fg,{className:"size-4","aria-hidden":!0}),p?d.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-1.5 rounded-full bg-primary ring-2 ring-background","aria-hidden":!0}):null]})})}),d.jsx(Cr,{align:"end",className:"min-w-44",children:d.jsx(Df,{value:a,onValueChange:h=>{es(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:ts.map(h=>d.jsx(Hs,{value:h.value,children:h.label},h.value))})})]})})]}),n&&p?d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}function G0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===ns)?d.jsx(Y0,{column:e,id:r,showClear:n}):d.jsx(V0,{column:e,id:r,showClear:n})}function ct(e,t,n,r){const o=e!==void 0&&t!==void 0;return[o?e:n,o?t:r]}function Ff(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+Ff(n),0)}function j0({table:e,manualPagination:t,pageSizeOptions:n,paginationSiblingCount:r}){const{pageIndex:o,pageSize:a}=e.getState().pagination,s=t?e.getRowCount():e.getPrePaginationRowModel().rows.length,i=s===0?0:o*a+1,l=Math.min((o+1)*a,s),u=e.getPageCount(),p=f.useMemo(()=>{const c=[...new Set(n)].sort((h,g)=>h-g);return c.includes(a)||(c.push(a),c.sort((h,g)=>h-g)),c},[n,a]);return d.jsxs("div",{className:"mt-3 flex flex-col gap-3 border-border border-t pt-3 sm:flex-row sm:items-center sm:justify-between",children:[d.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:s===0?"No rows.":d.jsxs(d.Fragment,{children:["Showing"," ",d.jsx("span",{className:"text-foreground",children:i}),"–",d.jsx("span",{className:"text-foreground",children:l})," of ",d.jsx("span",{className:"text-foreground",children:s})]})}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-muted-foreground",children:"Rows per page"}),d.jsxs(Ss,{value:String(a),onValueChange:c=>{e.setPageSize(Number(c))},children:[d.jsx(To,{size:"sm",className:"w-18","aria-label":"Rows per page",children:d.jsx(Ns,{})}),d.jsx(Po,{children:p.map(c=>d.jsx(Es,{value:String(c),children:c},c))})]})]}),d.jsx(ms,{page:o+1,totalPages:Math.max(1,u),onPageChange:c=>e.setPageIndex(c-1),siblingCount:r})]})]})}function R0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:l,rowSelection:u,onRowSelectionChange:p,enableColumnResizing:c=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:y,columnOrder:b,onColumnOrderChange:x,enableColumnPinning:N=!1,defaultColumnPinning:M,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:O=!1,showGlobalFilter:V=!0,globalFilterPlaceholder:$="Search…",defaultGlobalFilter:U="",globalFilter:B,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:W=!0,showColumnFilterClear:K=!0,defaultColumnFilters:G,columnFilters:_,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:P,expanded:A,onExpandedChange:H,getRowCanExpand:F,renderExpandedRow:Z,showExpandColumn:I=!1,expandedRowClassName:R,enableGrouping:X=!1,defaultGrouping:se,grouping:de,onGroupingChange:ce,showGroupingDropZone:ke=!0,groupingDropZoneLabel:De="Drag column headers here to set row groups.",groupingDropZoneHint:tt="Drag to add another group level.",isLoading:Re=!1,loadingRows:Fe=5,emptyState:Kt,enableColumnVisibility:Ee=!1,defaultColumnVisibility:Fr,columnVisibility:Wr,onColumnVisibilityChange:Oe,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:fn=48,virtualOverscan:qt=8,enableFooter:Gn=!1,enableScrollContainerResize:Mt=!1,scrollContainerResizeMaxHeight:Xt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:jn=!1,manualPagination:pt=!1,rowCount:Rn,pageCount:Un,defaultPagination:ht,pagination:Kn,onPaginationChange:qn,pageSizeOptions:pn=[10,20,50,100],paginationSiblingCount:Ue=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Se]=ct(a,s,ue,J),[_e,Zt]=f.useState(l??{}),[ye,Te]=ct(u,p,_e,Zt),[Xn,Ke]=f.useState(g??{}),[qe,Uo]=ct(w,m,Xn,Ke),[Ft,Eh]=f.useState(y??[]),[L1,H1]=ct(b,x,Ft,Eh),[V1,Y1]=f.useState(M??{left:[],right:[]}),[G1,j1]=ct(C,k,V1,Y1),[R1,U1]=f.useState(U??""),[Ko,Si]=ct(B,q,R1,U1),[K1,q1]=f.useState(G??[]),[X1,Z1]=ct(_,Q,K1,q1),[Q1,J1]=f.useState(P??{}),[eN,Dh]=ct(A,H,Q1,J1),[tN,nN]=f.useState(se??[]),[Ni,$r]=ct(de,ce,tN,nN),[rN,oN]=f.useState(Fr??{}),[aN,sN]=ct(Wr,Oe,rN,oN),Mi=!!(jn&&!X),[iN,lN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[cN,dN]=ct(Kn,qn,iN,lN),uN=O||Y,hn=!!(oe&&Z&&!X),ki=f.useMemo(()=>!hn||!I||t.some(z=>z.id===_t)?t:[{id:_t,header:()=>null,size:48,minSize:40,maxSize:56,enableSorting:!1,enableColumnFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,meta:{bookersExpandColumn:!0},cell:({row:z})=>d.jsx("button",{type:"button",className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]",!z.getCanExpand()&&"cursor-not-allowed opacity-40"),onClick:z.getToggleExpandedHandler(),"aria-expanded":z.getIsExpanded(),"aria-label":z.getIsExpanded()?"Collapse row details":"Expand row details",disabled:!z.getCanExpand(),children:d.jsx(vn,{className:D("size-4 transition-transform duration-150 ease-out",z.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})})},...t],[t,hn,I]),fN=f.useMemo(()=>Gn&&ki.some(Af),[Gn,ki]),Th=f.useMemo(()=>{const T={};return c&&(T.minSize=72,T.size=160,T.maxSize=640),Y&&(T.filterFn=W?ns:"includesString"),Object.keys(T).length>0?T:void 0},[c,Y,W]),qo=f.useRef(null),Zn=f.useRef(0),[pN,Xo]=f.useState(!1),gt=He.useReactTable({data:e,columns:ki,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...uN?{getFilteredRowModel:He.getFilteredRowModel(),...O?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Si}:{},...Y?{onColumnFiltersChange:Z1}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Se}:{},...Mi?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:dN,...pt?{manualPagination:!0,...Rn!==void 0?{rowCount:Rn}:{},...Un!==void 0?{pageCount:Un}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...c?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Uo}:{},...Th?{defaultColumn:Th}:{},...v?{onColumnOrderChange:H1}:{},enableColumnPinning:N,onColumnPinningChange:j1,...Ee?{enableHiding:!0,onColumnVisibilityChange:sN}:{enableHiding:!1},...hn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:F??(()=>!0),onExpandedChange:Dh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:$r,onExpandedChange:Dh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:ye}:{},...c?{columnSizing:qe}:{},...v?{columnOrder:L1}:{},columnPinning:G1,...O?{globalFilter:Ko}:{},...Y?{columnFilters:X1}:{},...X?{grouping:Ni}:{},...X||hn?{expanded:eN}:{},...Ee?{columnVisibility:aN}:{},...Mi?{pagination:cN}:{}},...n?{getRowId:(T,z)=>String(n(T,z))}:{}}),Br=gt.getVisibleLeafColumns().length,zr=gt.getRowModel().rows,Ph=f.useRef(null),Qn=ft&&!X&&!hn&&zr.length>0&&!Re,Ei=f.useRef(null),hN=f.useCallback(T=>{Ei.current=T,Ph.current=Qn?T:null},[Qn]),gn=f.useMemo(()=>{const T=L0(),z=If(Le,T.minPx),L=If(Xt,T.maxPx);return{minPx:Math.min(z,L),maxPx:Math.max(z,L)}},[Le,Xt]),[Zo,Oh]=f.useState(()=>Mt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!Mt||Zo!==null)return;const T=Ei.current;T&&Oh(Lo(T.offsetHeight,gn.minPx,gn.maxPx))},[Mt,Zo,We,gn]);const _h=Bh.useVirtualizer({count:zr.length,getScrollElement:()=>Ph.current,estimateSize:()=>fn,overscan:qt,enabled:Qn}),gN=T=>{var nt;const z=T.column.getCanSort(),L=T.column.getIsSorted(),fe=!!((nt=T.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(T.isPlaceholder)return null;if(!z||fe)return He.flexRender(T.column.columnDef.header,T.getContext());const Ne=T.column.getToggleSortingHandler();return d.jsxs("button",{type:"button",className:D("flex min-h-10 min-w-0 w-full cursor-pointer items-center gap-1.5 rounded-sm text-left select-none outline-none","transition-[color,scale] duration-150 ease-out hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:Ne,children:[He.flexRender(T.column.columnDef.header,T.getContext()),L==="asc"?d.jsx(sa,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,L==="desc"?d.jsx(Jt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]})},mN=(T,z)=>{!z||z===T||z===_t||T===_t||gt.setColumnOrder(L=>{const fe=L.length>0?L:gt.getAllLeafColumns().map(mn=>mn.id),Ne=fe.indexOf(z),nt=fe.indexOf(T);if(Ne===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(Ne,1),Xe.splice(nt,0,z),I&&hn&&Xe.includes(_t)){const mn=Xe.filter(Hr=>Hr!==_t);return[_t,...mn]}return Xe})},Di=gt.getHeaderGroups(),Ah=Di[0],Ih=2.5,vN=`${Di.length*Ih}rem`,Ti=T=>{const z=gt.getColumn(T);if(!z)return T;const L=z.columnDef.header;return typeof L=="string"?L:T},bN=(T,z)=>{T!==z&&$r(L=>{const fe=[...L],Ne=fe.filter(Xe=>Xe!==T),nt=Ne.indexOf(z);return nt===-1?fe:(Ne.splice(nt,0,T),Ne)})},yN=T=>{$r(z=>{const fe=[...z].filter(Ne=>Ne!==T);return fe.push(T),fe})},wN=T=>{var L;if(T.getIsPlaceholder())return null;if(T.getIsAggregated())return He.flexRender(T.column.columnDef.aggregatedCell??T.column.columnDef.cell,T.getContext());const z=!!((L=T.column.columnDef.meta)!=null&&L.bookersSkipGroupRowExpand);if(X&&T.getIsGrouped()&&!z){const fe=T.row,Ne=Ff(fe);return d.jsxs("span",{className:"flex min-h-10 min-w-0 items-center gap-1.5",children:[d.jsx("button",{type:"button",className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:fe.getToggleExpandedHandler(),"aria-expanded":fe.getIsExpanded(),"aria-label":`Toggle group ${fe.id}`,children:d.jsx(vn,{className:D("size-4 transition-transform duration-150 ease-out",fe.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})}),d.jsx("span",{className:"min-w-0 flex-1",children:He.flexRender(T.column.columnDef.cell,T.getContext())}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",Ne,")"]})]})}return He.flexRender(T.column.columnDef.cell,T.getContext())},Fh=T=>d.jsxs(f.Fragment,{children:[d.jsx(Pt,{"data-selected":T.getIsSelected()?"true":void 0,children:T.getVisibleCells().map((z,L)=>{const fe=z.column.getIsPinned();return d.jsx(an,{className:D(fe==="left"&&D("relative sticky z-30 bg-background",!z.column.getIsLastColumn("left")&&"border-r border-border",z.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),fe==="right"&&D("relative sticky z-30 bg-background",!z.column.getIsFirstColumn("right")&&"border-l border-border",z.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...L===0&&T.depth>0?{paddingLeft:`${T.depth*.75+.75}rem`}:{},...c||fe?{width:z.column.getSize(),minWidth:z.column.getSize(),maxWidth:z.column.getSize()}:{},...fe==="left"?{left:z.column.getStart("left")}:{},...fe==="right"?{right:z.column.getAfter("right")}:{}},children:wN(z)},z.id)})}),hn&&T.getIsExpanded()&&Z?d.jsx(Pt,{"data-expanded-detail":T.id,children:d.jsx(an,{colSpan:Br,className:D("border-t border-border bg-muted/30 p-4 align-top",R),children:Z(T)})}):null]},T.id),Lr=Qn?_h.getVirtualItems():[],Pi=Qn&&Lr.length>0,Wh=Pi?Lr[0].start:0,$h=Pi?_h.getTotalSize()-Lr[Lr.length-1].end:0,xN=Mt?Zo!==null?{height:Zo}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return d.jsx(Pf.Provider,{value:gt,children:d.jsxs("div",{ref:re,className:D("w-full min-w-0",ie),...pe,children:[O&&V?d.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:d.jsxs("div",{className:"relative min-w-0 max-w-sm flex-1 self-start",children:[d.jsx(pr,{size:"sm",type:"text",placeholder:$,value:Ko,onChange:T=>{Si(T.target.value)},"aria-label":$,autoComplete:"off",className:D("min-w-0 w-full",Ko.trim()!==""&&"pr-12")}),Ko.trim()!==""?d.jsx(wn,{type:"button",variant:"ghost",className:D("absolute right-1 top-1/2 z-10 flex size-10 -translate-y-1/2 items-center justify-center rounded-md px-0","bg-background text-muted-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),"aria-label":"Clear global search",onClick:()=>Si(""),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}):null,X&&ke?d.jsxs("div",{role:"region","aria-label":"Row groups",className:D("mb-3 flex min-h-11 flex-wrap items-stretch gap-2 rounded-md border border-dashed px-2 py-1.5 transition-[border-color,box-shadow] duration-150 sm:items-center",pN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:T=>{T.preventDefault();const z=Array.from(T.dataTransfer.types);T.dataTransfer.dropEffect=z.includes(Nr)?"move":"copy"},onDragEnter:T=>{T.preventDefault(),Zn.current+=1,Xo(!0)},onDragLeave:()=>{Zn.current-=1,Zn.current<=0&&(Zn.current=0,Xo(!1))},onDrop:T=>{T.preventDefault(),Zn.current=0,Xo(!1);const z=T.dataTransfer.getData(Nr);if(z){yN(z);return}const L=T.dataTransfer.getData(_f);if(!L)return;const fe=gt.getColumn(L);fe!=null&&fe.getCanGroup()&&$r(Ne=>{const Xe=[...Ne].filter(mn=>mn!==L);return Xe.push(L),Xe})},children:[d.jsx("span",{className:"inline-flex size-10 shrink-0 items-center justify-center self-center rounded-sm text-muted-foreground",children:d.jsx(Wg,{className:"size-4","aria-hidden":!0})}),d.jsx("div",{className:"flex min-h-8 min-w-0 flex-1 flex-wrap items-center gap-1",children:Ni.length===0?d.jsx("span",{className:"text-sm text-muted-foreground select-none",children:De}):d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[Ni.map((T,z)=>d.jsxs(f.Fragment,{children:[z>0?d.jsx(vn,{className:"size-3.5 shrink-0 text-muted-foreground/80","aria-hidden":!0}):null,d.jsxs("div",{className:D("inline-flex w-full max-w-72 items-center rounded-md border border-border bg-background text-sm shadow-sm","transition-[border-color,box-shadow] duration-150"),onDragOver:L=>{L.preventDefault(),L.stopPropagation(),Array.from(L.dataTransfer.types).includes(Nr)&&(L.dataTransfer.dropEffect="move")},onDrop:L=>{L.preventDefault(),L.stopPropagation(),Zn.current=0,Xo(!1);const fe=L.dataTransfer.getData(Nr);fe&&bN(fe,T)},children:[d.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Ti(T)}`,className:D("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-l-md border-r border-border text-muted-foreground","touch-none transition-[color,background-color] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing"),onDragStart:L=>{L.dataTransfer.setData(Nr,T),L.dataTransfer.effectAllowed="move"},children:d.jsx(Ig,{className:"size-4","aria-hidden":!0})}),d.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Ti(T)}),d.jsx("button",{type:"button","aria-label":`Remove ${Ti(T)} from row groups`,className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-r-md","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:()=>{$r(L=>[...L].filter(fe=>fe!==T))},children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})})]})]},T)),d.jsx("span",{className:"text-xs text-muted-foreground select-none",children:tt})]})})]}):null,d.jsxs("div",{className:"w-full",children:[d.jsx("div",{ref:hN,className:D("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",Qn&&"[overflow-anchor:none]"),style:xN,children:d.jsxs(rs,{className:D(c&&"table-fixed"),style:c?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[d.jsxs(os,{children:[Di.map((T,z)=>d.jsx(Pt,{children:T.headers.map(L=>{const fe=`${z*Ih}rem`,Ne=L.column.getIsPinned(),nt=c&&L.column.getCanResize()&&!L.isPlaceholder,Xe=L.column.id===_t,mn=v&&!L.isPlaceholder&&!Xe&&(!L.subHeaders||L.subHeaders.length===0),Hr=X&&!L.isPlaceholder&&!Xe&&L.column.getCanGroup()&&(!L.subHeaders||L.subHeaders.length===0);return d.jsxs(No,{colSpan:L.colSpan,className:D("relative sticky z-30 bg-background",Ne==="left"&&D("z-50 bg-background",!L.column.getIsLastColumn("left")&&"border-r border-border",L.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),Ne==="right"&&D("z-50 bg-background",!L.column.getIsFirstColumn("right")&&"border-l border-border",L.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:fe,...(c||Ne)&&!L.isPlaceholder?{width:L.getSize(),minWidth:L.getSize(),maxWidth:L.getSize()}:{},...Ne==="left"?{left:L.column.getStart("left")}:{},...Ne==="right"?{right:L.column.getAfter("right")}:{}},onDragOver:v?$e=>{$e.preventDefault(),$e.dataTransfer.dropEffect="move"}:void 0,onDrop:v?$e=>{$e.preventDefault();const CN=$e.dataTransfer.getData("application/x-bookers-column-id")||qo.current;mN(L.column.id,CN),qo.current=null}:void 0,children:[d.jsxs("span",{className:D("flex min-h-10 min-w-0 items-center gap-1",nt?"pr-1":"pr-2"),children:[mn?d.jsx("span",{draggable:!0,"aria-label":`Reorder column ${L.column.id}`,className:D("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-sm","text-muted-foreground","touch-none transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing active:scale-[0.96]"),onClick:$e=>$e.stopPropagation(),onDragStart:$e=>{qo.current=L.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",L.column.id)},onDragEnd:()=>{qo.current=null},children:d.jsx(Ag,{className:"size-4","aria-hidden":"true"})}):null,d.jsx("span",{className:D("min-w-0 flex-1",Hr&&"cursor-grab active:cursor-grabbing"),draggable:Hr,onDragStart:Hr?$e=>{$e.dataTransfer.setData(_f,L.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:gN(L)})]}),nt?d.jsx("div",{"data-column-resize-handle":L.column.id,onClick:$e=>$e.stopPropagation(),onMouseDown:L.getResizeHandler(),onTouchStart:L.getResizeHandler(),className:D("absolute end-0 top-0 z-20 flex h-full w-2 cursor-col-resize select-none","touch-none items-center justify-end","transition-[opacity] duration-150 ease-out",L.column.getIsResizing()?"opacity-100":"opacity-75 hover:opacity-100"),"aria-hidden":!0,children:d.jsx("span",{className:"h-1/2 w-[3px] rounded-full bg-border"})}):null]},L.id)})},T.id)),Y&&ae&&Ah?d.jsx(Pt,{children:Ah.headers.map(T=>{const z=T.column.getIsPinned();return d.jsx(No,{colSpan:T.colSpan,className:D("relative sticky z-30 bg-background py-2",z==="left"&&D("z-50 bg-background",!T.column.getIsLastColumn("left")&&"border-r border-border",T.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),z==="right"&&D("z-50 bg-background",!T.column.getIsFirstColumn("right")&&"border-l border-border",T.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:vN,...(c||z)&&!T.isPlaceholder?{width:T.getSize(),minWidth:T.getSize(),maxWidth:T.getSize()}:{},...z==="left"?{left:T.column.getStart("left")}:{},...z==="right"?{right:T.column.getAfter("right")}:{}},children:!T.isPlaceholder&&T.column.getCanFilter()?d.jsx(G0,{column:T.column,enableAdvancedColumnFilters:W,showColumnFilterClear:K}):null},`filter-${T.id}`)})}):null]}),d.jsx(as,{children:Re?Array.from({length:Fe}).map((T,z)=>d.jsx(Pt,{children:d.jsx(an,{colSpan:Br,children:d.jsx(is,{className:"h-4 w-full"})})},z)):zr.length===0?d.jsx(Pt,{children:d.jsx(an,{colSpan:Br,className:"h-24 text-center text-sm text-muted-foreground",children:Kt??"No results."})}):Pi?d.jsxs(d.Fragment,{children:[Wh>0?d.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:d.jsx("td",{colSpan:Br,className:"h-0 border-0 p-0",style:{height:Wh}})}):null,Lr.map(T=>{const z=zr[T.index];return Fh(z)}),$h>0?d.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:d.jsx("td",{colSpan:Br,className:"h-0 border-0 p-0",style:{height:$h}})}):null]}):zr.map(T=>Fh(T))}),fN?d.jsx(ss,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(T=>d.jsx(Pt,{children:T.headers.map(z=>{const L=z.column.getIsPinned();return d.jsx(an,{colSpan:z.colSpan,className:D("border-border text-sm font-medium text-foreground",L==="left"&&D("relative sticky z-30 bg-muted/50",!z.column.getIsLastColumn("left")&&"border-r border-border",z.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),L==="right"&&D("relative sticky z-30 bg-muted/50",!z.column.getIsFirstColumn("right")&&"border-l border-border",z.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...(c||L)&&!z.isPlaceholder?{width:z.getSize(),minWidth:z.getSize(),maxWidth:z.getSize()}:{},...L==="left"?{left:z.column.getStart("left")}:{},...L==="right"?{right:z.column.getAfter("right")}:{}},children:z.isPlaceholder?null:He.flexRender(z.column.columnDef.footer,z.getContext())},z.id)})},T.id))}):null]})}),Mi?d.jsx(j0,{table:gt,manualPagination:pt,pageSizeOptions:pn,paginationSiblingCount:Ue}):null,Mt?d.jsx(H0,{scrollRegionRef:Ei,minPx:gn.minPx,maxPx:gn.maxPx,onHeightChange:T=>Oh(Lo(T,gn.minPx,gn.maxPx))}):null]})]})})}const Wf=f.forwardRef(R0);Wf.displayName="DataTable";const U0={bookersColumnHeaderActions:!0};function K0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function q0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),l=e.getCanPin(),u=e.getIsSorted(),p=e.getIsPinned(),c=Of(),h=!!(c!=null&&c.options.enableHiding&&c.getAllLeafColumns().some(g=>g.getCanHide()));return d.jsxs("div",{ref:a,className:D("flex min-w-0 items-center gap-0.5",r),...o,children:[i?d.jsxs("button",{type:"button",className:D("flex min-h-10 min-w-0 flex-1 cursor-pointer items-center gap-1.5 rounded-sm px-0 text-left","text-xs font-medium uppercase tracking-wide text-muted-foreground","transition-[color,scale] duration-150 ease-out","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:e.getToggleSortingHandler(),children:[d.jsx("span",{className:"min-w-0 truncate",children:s}),u==="asc"?d.jsx(sa,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,u==="desc"?d.jsx(Jt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]}):d.jsx("span",{className:"flex min-h-10 min-w-0 flex-1 items-center px-0 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:d.jsx("span",{className:"min-w-0 truncate",children:s})}),(i||l||h)&&d.jsxs(Wo,{children:[d.jsx($o,{asChild:!0,children:d.jsx("button",{type:"button",className:D("inline-flex size-8 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-sm border-0","text-muted-foreground transition-[color,background-color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","outline-none focus:outline-none focus-visible:outline-none","focus:ring-0 focus-visible:ring-0 focus:shadow-none focus-visible:shadow-none","active:scale-[0.96]"),"aria-label":`Column actions (${e.id})`,onClick:g=>g.stopPropagation(),children:d.jsx(Pg,{className:"size-3.5","aria-hidden":"true"})})}),d.jsxs(Cr,{align:"end",className:"min-w-44",children:[i?d.jsxs(d.Fragment,{children:[d.jsx(Sr,{children:"Sort"}),d.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!1)},children:[d.jsx(kg,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),d.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!0)},children:[d.jsx(Mg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),d.jsx(Ot,{disabled:u===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?d.jsx(Wn,{}):null,l?d.jsxs(zs,{children:[d.jsxs(Bo,{children:[d.jsx(zg,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),d.jsxs(zo,{children:[d.jsx(Ot,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),d.jsx(Ot,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),d.jsxs(Ot,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[d.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&c&&(i||l)?d.jsx(Wn,{}):null,h&&c?d.jsxs(zs,{children:[d.jsxs(Bo,{children:[d.jsx(Tg,{className:"size-4","aria-hidden":"true"}),"Columns"]}),d.jsxs(zo,{className:"min-w-48",children:[d.jsx(Sr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),d.jsx(Wn,{}),c.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>d.jsx(Ls,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:K0(g)},g.id))]})]}):null]})]})]})}const $f=f.forwardRef(q0);$f.displayName="DataTableColumnHeader";const Bf=6048e5,X0=864e5,zf=Symbol.for("constructDateFrom");function Ce(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&zf in e?e[zf](t):e instanceof Date?new e.constructor(t):new Date(t)}function me(e,t){return Ce(t||e,e)}function Lf(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(t)?Ce(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Hf(e,t,n){const r=me(e,n==null?void 0:n.in);if(isNaN(t))return Ce(e,NaN);if(!t)return r;const o=r.getDate(),a=Ce(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Z0={};function Mr(){return Z0}function $n(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function kr(e,t){return $n(e,{...t,weekStartsOn:1})}function Vf(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ce(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=kr(o),s=Ce(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=kr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Yf(e){const t=me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Bn(e,...t){const n=Ce.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Er(e,t){const n=me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Vs(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t),a=Er(r),s=Er(o),i=+a-Yf(a),l=+s-Yf(s);return Math.round((i-l)/X0)}function Q0(e,t){const n=Vf(e,t),r=Ce(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kr(r)}function J0(e,t,n){return Lf(e,t*7,n)}function ex(e,t,n){return Hf(e,t*12,n)}function tx(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ce.bind(null,o));const a=me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Ce(r,n||NaN)}function nx(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ce.bind(null,o));const a=me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Ce(r,n||NaN)}function rx(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return+Er(r)==+Er(o)}function Gf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ox(e){return!(!Gf(e)&&typeof e!="number"||isNaN(+me(e)))}function jf(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function ax(e,t){const n=me(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Rf(e,t){const[n,r]=Bn(e,t.start,t.end);return{start:n,end:r}}function sx(e,t){const{start:n,end:r}=Rf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Ce(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function ix(e,t){const n=me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function lx(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Uf(e,t){const n=me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cx(e,t){const{start:n,end:r}=Rf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const l=[];for(;+s<=a;)l.push(Ce(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function Kf(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function dx(e,t){return Kf(e,{...t,weekStartsOn:1})}const ux={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},fx=(e,t,n)=>{let r;const o=ux[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ys(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const px={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mx={date:Ys({formats:px,defaultWidth:"full"}),time:Ys({formats:hx,defaultWidth:"full"}),dateTime:Ys({formats:gx,defaultWidth:"full"})},vx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bx=(e,t,n,r)=>vx[e];function Dr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const yx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Sx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Nx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Mx={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Dr({values:yx,defaultWidth:"wide"}),quarter:Dr({values:wx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Dr({values:xx,defaultWidth:"wide"}),day:Dr({values:Cx,defaultWidth:"wide"}),dayPeriod:Dr({values:Sx,defaultWidth:"wide",formattingValues:Nx,defaultFormattingWidth:"wide"})};function Tr(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?Ex(i,c=>c.test(s)):kx(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const p=t.slice(s.length);return{value:u,rest:p}}}function kx(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ex(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Dx(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const Tx=/^(\d+)(th|st|nd|rd)?/i,Px=/\d+/i,Ox={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},_x={any:[/^b/i,/^(a|c)/i]},Ax={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ix={any:[/1/i,/2/i,/3/i,/4/i]},Fx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Wx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$x={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Bx={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},zx={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Lx={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hx={ordinalNumber:Dx({matchPattern:Tx,parsePattern:Px,valueCallback:e=>parseInt(e,10)}),era:Tr({matchPatterns:Ox,defaultMatchWidth:"wide",parsePatterns:_x,defaultParseWidth:"any"}),quarter:Tr({matchPatterns:Ax,defaultMatchWidth:"wide",parsePatterns:Ix,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Tr({matchPatterns:Fx,defaultMatchWidth:"wide",parsePatterns:Wx,defaultParseWidth:"any"}),day:Tr({matchPatterns:$x,defaultMatchWidth:"wide",parsePatterns:Bx,defaultParseWidth:"any"}),dayPeriod:Tr({matchPatterns:zx,defaultMatchWidth:"any",parsePatterns:Lx,defaultParseWidth:"any"})},zn={code:"en-US",formatDistance:fx,formatLong:mx,formatRelative:bx,localize:Mx,match:Hx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vx(e,t){const n=me(e,t==null?void 0:t.in);return Vs(n,Uf(n))+1}function Gs(e,t){const n=me(e,t==null?void 0:t.in),r=+kr(n)-+Q0(n);return Math.round(r/Bf)+1}function qf(e,t){var p,c,h,g;const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Mr(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=Ce((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=$n(s,t),l=Ce((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=$n(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Yx(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??1,o=qf(e,t),a=Ce((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),$n(a,t)}function js(e,t){const n=me(e,t==null?void 0:t.in),r=+$n(n,t)-+Yx(n,t);return Math.round(r/Bf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ut={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ge(n+1,2)},d(e,t){return ge(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ge(e.getHours()%12||12,t.length)},H(e,t){return ge(e.getHours(),t.length)},m(e,t){return ge(e.getMinutes(),t.length)},s(e,t){return ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ge(o,t.length)}},Ln={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xf={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ut.y(e,t)},Y:function(e,t,n,r){const o=qf(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ge(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ge(a,t.length)},R:function(e,t){const n=Vf(e);return ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return ge(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ge(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ge(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ut.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ge(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=js(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Gs(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ut.d(e,t)},D:function(e,t,n){const r=Vx(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ge(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ge(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ge(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ln.noon:r===0?o=Ln.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ln.evening:r>=12?o=Ln.afternoon:r>=4?o=Ln.morning:o=Ln.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ut.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ut.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ut.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ut.s(e,t)},S:function(e,t){return Ut.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qf(r);case"XXXX":case"XX":return dn(r);case"XXXXX":case"XXX":default:return dn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qf(r);case"xxxx":case"xx":return dn(r);case"xxxxx":case"xxx":default:return dn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Zf(r,":");case"OOOO":default:return"GMT"+dn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Zf(r,":");case"zzzz":default:return"GMT"+dn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ge(r,t.length)},T:function(e,t,n){return ge(+e,t.length)}};function Zf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ge(a,2)}function Qf(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):dn(e,t)}function dn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ge(Math.trunc(r/60),2),a=ge(r%60,2);return n+o+t+a}const Jf=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ep=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Gx={p:ep,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Jf(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Jf(r,t)).replace("{{time}}",ep(o,t))}},jx=/^D+$/,Rx=/^Y+$/,Ux=["D","DD","YY","YYYY"];function Kx(e){return jx.test(e)}function qx(e){return Rx.test(e)}function Xx(e,t,n){const r=Zx(e,t,n);if(console.warn(r),Ux.includes(e))throw new RangeError(r)}function Zx(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eC=/^'([^]*?)'?$/,tC=/''/g,nC=/[a-zA-Z]/;function Hn(e,t,n){var p,c,h,g,w,m,v,y;const r=Mr(),o=(n==null?void 0:n.locale)??r.locale??zn,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(h=r.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((m=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((y=(v=r.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0,i=me(e,n==null?void 0:n.in);if(!ox(i))throw new RangeError("Invalid time value");let l=t.match(Jx).map(b=>{const x=b[0];if(x==="p"||x==="P"){const N=Gx[x];return N(b,o.formatLong)}return b}).join("").match(Qx).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const x=b[0];if(x==="'")return{isToken:!1,value:rC(b)};if(Xf[x])return{isToken:!0,value:b};if(x.match(nC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(b=>{if(!b.isToken)return b.value;const x=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&qx(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kx(x))&&Xx(x,t,String(e));const N=Xf[x[0]];return N(i,x,o.localize,u)}).join("")}function rC(e){const t=e.match(eC);return t?t[1].replace(tC,"'"):e}function oC(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ce(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function aC(e,t){return me(e,t==null?void 0:t.in).getMonth()}function sC(e,t){return me(e,t==null?void 0:t.in).getFullYear()}function iC(e,t){return+me(e)>+me(t)}function lC(e,t){return+me(e)<+me(t)}function cC(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function dC(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function uC(e,t,n){const r=me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Ce(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=oC(s);return r.setMonth(t,Math.min(a,i)),r}function fC(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(+r)?Ce(e,NaN):(r.setFullYear(t),r)}function pC(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Rs={},Pr={};function un(e,t){try{const r=(Rs[e]||(Rs[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Pr?Pr[r]:tp(r,r.split(":"))}catch{if(e in Pr)return Pr[e];const n=e==null?void 0:e.match(hC);return n?tp(e,n.slice(1)):NaN}}const hC=/([+-]\d\d):?(\d\d)?/;function tp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Pr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class xt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),rp(this),Us(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new xt(...n,t):new xt(Date.now(),t)}withTimeZone(t){return new xt(+this,t)}getTimezoneOffset(){const t=-un(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Us(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const np=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!np.test(e))return;const t=e.replace(np,"$1UTC");xt.prototype[t]&&(e.startsWith("get")?xt.prototype[e]=function(){return this.internal[t]()}:(xt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),gC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Us(this),+this}))});function Us(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-un(e.timeZone,e)*60))}function gC(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),rp(e)}function rp(e){const t=un(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),s=o-a,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const u=new Date(+e);u.setUTCSeconds(0);const p=o>0?u.getSeconds():(u.getSeconds()-60)%60,c=Math.round(-(un(e.timeZone,e)*60))%60;(c||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+c+p));const h=un(e.timeZone,e),g=h>0?Math.floor(h):Math.ceil(h),m=-new Date(+e).getTimezoneOffset()-g,v=g!==n,y=m-l;if(v&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const b=un(e.timeZone,e),x=b>0?Math.floor(b):Math.ceil(b),N=g-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Ie extends xt{static tz(t,...n){return n.length?new Ie(...n,t):new Ie(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${pC(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ie(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ie(+new Date(t),this.timeZone)}}const op=5,mC=4;function vC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,op*7-1);return t.getMonth(e)===t.getMonth(a)?op:mC}function ap(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function bC(e,t){const n=ap(e,t),r=vC(e,t);return t.addDays(n,r*7-1)}const sp={...zn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Hn(s,i,{locale:zn,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Hn(o,a,{locale:zn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Hn(s,i,{locale:zn,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Hn(o,a,{locale:zn,...t}),r(e,"cccc")}}};class Ge{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ie.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ie(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Lf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Hf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):J0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):ex(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Vs(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):jf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):sx(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):cx(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):bC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):dx(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):ax(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Kf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):lx(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Hn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Gs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):aC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):sC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):js(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):iC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):lC(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Gf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):rx(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):cC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):dC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):tx(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):nx(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):uC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):fC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ap(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Er(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):kr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):ix(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):$n(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Uf(r)},this.options={locale:sp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Ge.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&Ge.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Ge.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Ct=new Ge;class ip{constructor(t,n,r=Ct){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class yC{constructor(t,n){this.date=t,this.weeks=n}}class wC{constructor(t,n){this.days=n,this.weekNumber=t}}function xC(e){return S.createElement("button",{...e})}function CC(e){return S.createElement("span",{...e})}function SC(e){const{size:t=24,orientation:n="left",className:r}=e;return S.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&S.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&S.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&S.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&S.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function NC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function MC(e){const{day:t,modifiers:n,...r}=e,o=S.useRef(null);return S.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),S.createElement("button",{ref:o,...r})}var ee;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ee||(ee={}));var be;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(be||(be={}));var dt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(dt||(dt={}));var je;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(je||(je={}));function kC(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ee.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return S.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},S.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:p})=>S.createElement(r.Option,{key:l,value:l,disabled:p},u))),S.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,S.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function EC(e){return S.createElement("div",{...e})}function DC(e){return S.createElement("div",{...e})}function TC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function PC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function OC(e){return S.createElement("table",{...e})}function _C(e){return S.createElement("div",{...e})}const lp=S.createContext(void 0);function Or(){const e=S.useContext(lp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function AC(e){const{components:t}=Or();return S.createElement(t.Dropdown,{...e})}function IC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=Or(),p=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),c=S.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return S.createElement("nav",{...a},S.createElement(s.PreviousMonthButton,{type:"button",className:i[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},S.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ee.Chevron],orientation:"left"})),S.createElement(s.NextMonthButton,{type:"button",className:i[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:p},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function FC(e){const{components:t}=Or();return S.createElement(t.Button,{...e})}function WC(e){return S.createElement("option",{...e})}function $C(e){const{components:t}=Or();return S.createElement(t.Button,{...e})}function BC(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function zC(e){return S.createElement("select",{...e})}function LC(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function HC(e){return S.createElement("th",{...e})}function VC(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function YC(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function GC(e){return S.createElement("th",{...e})}function jC(e){return S.createElement("tbody",{...e})}function RC(e){const{components:t}=Or();return S.createElement(t.Dropdown,{...e})}const UC=Object.freeze(Object.defineProperty({__proto__:null,Button:xC,CaptionLabel:CC,Chevron:SC,Day:NC,DayButton:MC,Dropdown:kC,DropdownNav:EC,Footer:DC,Month:TC,MonthCaption:PC,MonthGrid:OC,Months:_C,MonthsDropdown:AC,Nav:IC,NextMonthButton:FC,Option:WC,PreviousMonthButton:$C,Root:BC,Select:zC,Week:LC,WeekNumber:YC,WeekNumberHeader:GC,Weekday:HC,Weekdays:VC,Weeks:jC,YearsDropdown:RC},Symbol.toStringTag,{value:"Module"}));function At(e,t,n=!1,r=Ct){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Ks(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ho(e){return!!(e&&typeof e=="object"&&"from"in e)}function qs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Xs(e){return!!(e&&typeof e=="object"&&"before"in e)}function cp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function dp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function It(e,t,n=Ct){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(dp(i,n))return i.some(l=>o(e,l));if(Ho(i))return At(i,e,!1,n);if(cp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ks(i)){const l=a(i.before,e),u=a(i.after,e),p=l>0,c=u<0;return s(i.before,i.after)?c&&p:p||c}return qs(i)?a(e,i.after)>0:Xs(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function KC(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:p=o.today()}=t,{isSameDay:c,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,y=n&&g(n),b=r&&m(r),x={[be.focused]:[],[be.outside]:[],[be.disabled]:[],[be.hidden]:[],[be.today]:[]},N={};for(const M of e){const{date:C,displayMonth:k}=M,O=!!(k&&!h(C,k)),V=!!(y&&w(C,y)),$=!!(b&&v(C,b)),U=!!(a&&It(C,a,o)),B=!!(s&&It(C,s,o))||V||$||!u&&!l&&O||u&&l===!1&&O,q=c(C,p);O&&x.outside.push(M),U&&x.disabled.push(M),B&&x.hidden.push(M),q&&x.today.push(M),i&&Object.keys(i).forEach(Y=>{const ae=i==null?void 0:i[Y];ae&&It(C,ae,o)&&(N[Y]?N[Y].push(M):N[Y]=[M])})}return M=>{const C={[be.focused]:!1,[be.disabled]:!1,[be.hidden]:!1,[be.outside]:!1,[be.today]:!1},k={};for(const O in x){const V=x[O];C[O]=V.some($=>$===M)}for(const O in N)k[O]=N[O].some(V=>V===M);return{...C,...k}}}function qC(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[be[a]]?o.push(t[be[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function XC(e){return{...UC,...e}}function ZC(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function QC(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in be)e[be[t]]=`rdp-${be[t]}`;for(const t in dt)e[dt[t]]=`rdp-${dt[t]}`;for(const t in je)e[je[t]]=`rdp-${je[t]}`;return e}function up(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const JC=up;function eS(e,t,n){return(n??new Ge(t)).format(e,"d")}function tS(e,t=Ct){return t.format(e,"LLLL")}function nS(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function rS(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function oS(){return""}function fp(e,t=Ct){return t.format(e,"yyyy")}const aS=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:up,formatDay:eS,formatMonthCaption:JC,formatMonthDropdown:tS,formatWeekNumber:rS,formatWeekNumberHeader:oS,formatWeekdayName:nS,formatYearCaption:fp,formatYearDropdown:fp},Symbol.toStringTag,{value:"Module"}));function sS(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...aS,...e}}function Zs(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const iS=Zs;function Qs(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const lS=Qs;function pp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function hp(e){return"Choose the Month"}function gp(){return""}const cS="Go to the Next Month";function mp(e,t){return cS}function vp(e){return"Go to the Previous Month"}function bp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function yp(e,t){return`Week ${e}`}function wp(e){return"Week Number"}function xp(e){return"Choose the Year"}const dS=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:lS,labelDay:iS,labelDayButton:Zs,labelGrid:Qs,labelGridcell:pp,labelMonthDropdown:hp,labelNav:gp,labelNext:mp,labelPrevious:vp,labelWeekNumber:yp,labelWeekNumberHeader:wp,labelWeekday:bp,labelYearDropdown:xp},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function uS(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...dS,...e??{},labelDayButton:ut(Zs,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(hp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(mp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(vp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(yp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(xp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(Qs,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(pp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(gp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(wp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(bp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function fS(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=u(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function pS(e,t={},n={}){let r={...t==null?void 0:t[ee.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function hS(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let i=0;i<7;i++){const l=e.addDays(a,i);s.push(l)}return s}function gS(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,u=a(e),p=s(t),c=i({start:u,end:p});return o&&c.reverse(),c.map(h=>{const g=n.formatYearDropdown(h,r);return{value:l(h),label:g,disabled:!1}})}function mS(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,o=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,a=l=>{const u=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ie(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},s=l=>{const u=a(l);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>a(Ie.tz(e)),newDate:(l,u,p)=>new Ie(l,u,p,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,u)=>{const p=a(l),c=(u==null?void 0:u.weekStartsOn)??o,h=(p.getDay()-c+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:l=>{const u=a(l),p=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-p),u},startOfMonth:l=>{const u=a(l);return u.setDate(1),u},startOfYear:l=>{const u=a(l);return u.setMonth(0,1),u},endOfWeek:(l,u)=>{const p=a(l),g=((((u==null?void 0:u.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:l=>{const u=a(l),p=(7-u.getDay())%7;return u.setDate(u.getDate()+p),u},endOfMonth:l=>{const u=a(l);return u.setMonth(u.getMonth()+1,0),u},endOfYear:l=>{const u=a(l);return u.setMonth(11,31),u},eachMonthOfInterval:l=>{const u=a(l.start),p=a(l.end),c=[],h=new Ie(u.getFullYear(),u.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)c.push(new Ie(h,e)),h.setMonth(h.getMonth()+1,1);return c},addDays:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u),p},addWeeks:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u*7),p},addMonths:(l,u)=>{const p=a(l);return p.setMonth(p.getMonth()+u),p},addYears:(l,u)=>{const p=a(l);return p.setFullYear(p.getFullYear()+u),p},eachYearOfInterval:l=>{const u=a(l.start),p=a(l.end),c=[],h=new Ie(u.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)c.push(new Ie(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return c},getWeek:(l,u)=>{var c;const p=s(l);return js(p,{weekStartsOn:(u==null?void 0:u.weekStartsOn)??o,firstWeekContainsDate:(u==null?void 0:u.firstWeekContainsDate)??((c=r==null?void 0:r.options)==null?void 0:c.firstWeekContainsDate)??1})},getISOWeek:l=>{const u=s(l);return Gs(u)},differenceInCalendarDays:(l,u)=>{const p=s(l),c=s(u);return Vs(p,c)},differenceInCalendarMonths:(l,u)=>{const p=s(l),c=s(u);return jf(p,c)}}}const _r=e=>e instanceof HTMLElement?e:null,Js=e=>[...e.querySelectorAll("[data-animated-month]")??[]],vS=e=>_r(e.querySelector("[data-animated-month]")),ei=e=>_r(e.querySelector("[data-animated-caption]")),ti=e=>_r(e.querySelector("[data-animated-weeks]")),bS=e=>_r(e.querySelector("[data-animated-nav]")),yS=e=>_r(e.querySelector("[data-animated-weekdays]"));function wS(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=S.useRef(null),i=S.useRef(r),l=S.useRef(!1);S.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const p=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),h=c?n[je.caption_after_enter]:n[je.caption_before_enter],g=c?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Js(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=vS(x);N&&x.contains(N)&&x.removeChild(N);const M=ei(x);M&&M.classList.remove(h);const C=ti(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?Js(w):[],y=Js(e.current);if(y!=null&&y.every(b=>b instanceof HTMLElement)&&v&&v.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=bS(e.current);b&&(b.style.zIndex="1"),y.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=ei(x);C&&C.classList.add(h);const k=ti(x);k&&k.classList.add(g);const O=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),C&&C.classList.remove(h),k&&k.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(M)&&x.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const V=yS(M);V&&(V.style.opacity="0");const $=ei(M);$&&($.classList.add(c?n[je.caption_before_exit]:n[je.caption_after_exit]),$.addEventListener("animationend",O));const U=ti(M);U&&U.classList.add(c?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function xS(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:p,differenceInCalendarMonths:c,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:x}=r,N=l?y(o,r):s?b(o):x(o),M=l?h(a):s?g(w(a)):m(w(a)),C=t&&(l?h(t):s?g(t):m(t)),k=C&&v(M,C)?C:M,O=p(k,N),V=c(a,o)+1,$=[];for(let q=0;q<=O;q++){const Y=u(N,q);$.push(Y)}const B=(l?35:42)*V;if(i&&$.length<B){const q=B-$.length;for(let Y=0;Y<q;Y++){const ae=u($[$.length-1],1);$.push(ae)}}return $}function CS(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function SS(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function Cp(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:p,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const h=-1*(i-1);l=p(n,h)}return t&&u(l,t)<0&&(l=t),c(l)}function NS(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:p,startOfBroadcastWeek:c,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const y=n.broadcastCalendar?c(v,r):n.ISOWeek?h(v):g(v),b=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(k=>k>=y&&k<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const k=t.filter(O=>{const V=N-x.length;return O>b&&O<=o(b,V)});x.push(...k)}const M=x.reduce((k,O)=>{const V=n.ISOWeek?u(O):p(O),$=k.find(B=>B.weekNumber===V),U=new ip(O,v,r);return $?$.days.push(U):k.push(new wC(V,[U])),k},[]),C=new yC(v,M);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function MS(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:p,today:c}=t,{fromYear:h,toYear:g,fromMonth:w,toMonth:m}=e;!n&&w&&(n=w),!n&&h&&(n=t.newDate(h,0,1)),!r&&m&&(r=m),!r&&g&&(r=p(g,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):h?n=p(h,0,1):!n&&v&&(n=o(l(e.today??c(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function kS(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,p=s(e);if(!t)return i(p,u);if(!(l(t,e)<a))return i(p,u)}function ES(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,p=s(e);if(!t)return i(p,-u);if(!(l(p,t)<=0))return i(p,-u)}function DS(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Vo(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function TS(e,t){var N;const[n,r]=MS(e,t),{startOfMonth:o,endOfMonth:a}=t,s=Cp(e,n,r,t),[i,l]=Vo(s,e.month?s:void 0);S.useEffect(()=>{const M=Cp(e,n,r,t);l(M)},[e.timeZone]);const{months:u,weeks:p,days:c,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const M=SS(i,r,{numberOfMonths:e.numberOfMonths},t),C=xS(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=NS(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),O=DS(k),V=CS(k),$=ES(i,n,e,t),U=kS(i,r,e,t);return{months:k,weeks:O,days:V,previousMonth:$,nextMonth:U}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:m}=e,v=M=>p.some(C=>C.days.some(k=>k.isEqualTo(M))),y=M=>{if(w)return;let C=o(M);n&&C<o(n)&&(C=o(n)),r&&C>o(r)&&(C=o(r)),l(C),m==null||m(C)};return{months:u,weeks:p,days:c,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:y,goToDay:M=>{v(M)||y(M.date)}}}var St;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(St||(St={}));function Sp(e){return!e[be.disabled]&&!e[be.hidden]&&!e[be.outside]}function PS(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Sp(i)&&(i[be.focused]&&a<St.FocusedModifier?(o=s,a=St.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<St.LastFocused?(o=s,a=St.LastFocused):n(s.date)&&a<St.Selected?(o=s,a=St.Selected):i[be.today]&&a<St.Today&&(o=s,a=St.Today))}return o||(o=e.find(s=>Sp(t(s)))),o}function OS(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:p,addWeeks:c,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:y,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:N}=s;let C={day:u,week:c,month:p,year:h,startOfWeek:k=>l?b(k,s):i?x(k):N(k),endOfWeek:k=>l?g(k):i?w(k):m(k)}[e](n,t==="after"?1:-1);return t==="before"&&r?C=v([r,C]):t==="after"&&o&&(C=y([o,C])),C}function Np(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=OS(e,t,n.date,r,o,a,s),u=!!(a.disabled&&It(l,a.disabled,s)),p=!!(a.hidden&&It(l,a.hidden,s)),c=l,h=new ip(l,c,s);return!u&&!p?h:Np(e,t,h,r,o,a,s,i+1)}function _S(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=PS(t.days,n,r||(()=>!1),s),[u,p]=S.useState(a?l:void 0);return{isFocusTarget:m=>!!(l!=null&&l.isEqualTo(m)),setFocused:p,focused:u,blur:()=>{i(u),p(void 0)},moveFocus:(m,v)=>{if(!u)return;const y=Np(m,v,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(y))||(t.goToDay(y),p(y)))}}}function AS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Vo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=g=>(i==null?void 0:i.some(w=>l(w,g)))??!1,{min:p,max:c}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(u(g)){if((i==null?void 0:i.length)===p||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(y=>!l(y,g))}else(i==null?void 0:i.length)===c?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:u}}function IS(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:p}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?c={from:s,to:e}:o?c={from:s,to:void 0}:c=void 0:p(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(p(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const h=a.differenceInCalendarDays(c.to,c.from);r>0&&h>r?c={from:e,to:void 0}:n>1&&h<n&&(c={from:e,to:void 0})}return c}function FS(e,t,n=Ct){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Mp(e,t,n=Ct){return At(e,t.from,!1,n)||At(e,t.to,!1,n)||At(t,e.from,!1,n)||At(t,e.to,!1,n)}function WS(e,t,n=Ct){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?At(e,i,!1,n):dp(i,n)?i.some(l=>At(e,l,!1,n)):Ho(i)?i.from&&i.to?Mp(e,{from:i.from,to:i.to},n):!1:cp(i)?FS(e,i.dayOfWeek,n):Ks(i)?n.isAfter(i.before,i.after)?Mp(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):It(e.from,i,n)||It(e.to,i,n):qs(i)||Xs(i)?It(e.from,i,n)||It(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function $S(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,u]=Vo(a,i?a:void 0),p=i?a:l;return{selected:p,select:(g,w,m)=>{const{min:v,max:y}=e;let b;if(g){const x=p==null?void 0:p.from,N=p==null?void 0:p.to,M=!!x&&!!N,C=!!x&&!!N&&t.isSameDay(x,N)&&t.isSameDay(g,x);o&&(M||!(p!=null&&p.from))?!s&&C?b=void 0:b={from:g,to:void 0}:b=IS(g,p,v,y,s,t)}return r&&n&&(b!=null&&b.from)&&b.to&&WS({from:b.from,to:b.to},n,t)&&(b.from=g,b.to=void 0),i||u(b),i==null||i(b,g,w,m),b},isSelected:g=>p&&At(p,g,!1,t)}}function BS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Vo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,h,g)=>{let w=c;return!r&&i&&i&&l(c,i)&&(w=void 0),o||s(w),o==null||o(w,c,h,g),w},isSelected:c=>i?l(i,c):!1}}function zS(e,t){const n=BS(e,t),r=AS(e,t),o=$S(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function et(e,t){return e instanceof Ie&&e.timeZone===t?e:new Ie(e,t)}function Vn(e,t,n){return et(e,t)}function kp(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vn(r,t):r):Ho(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Ks(e)?{before:Vn(e.before,t),after:Vn(e.after,t)}:qs(e)?{after:Vn(e.after,t)}:Xs(e)?{before:Vn(e.before,t)}:e}function ni(e,t,n){return e&&(Array.isArray(e)?e.map(r=>kp(r,t)):kp(e,t))}function LS(e){var Ue;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=et(t.today,n)),t.month&&(t.month=et(t.month,n)),t.defaultMonth&&(t.defaultMonth=et(t.defaultMonth,n)),t.startMonth&&(t.startMonth=et(t.startMonth,n)),t.endMonth&&(t.endMonth=et(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=et(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(Ue=t.selected)==null?void 0:Ue.map(ie=>et(ie,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?et(t.selected.from,n):t.selected.from,to:t.selected.to?et(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=ni(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ni(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ni((re=t.modifiers)==null?void 0:re[pe],n)}),t.modifiers=ie}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:l}=S.useMemo(()=>{const ie={...sp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?mS(t.timeZone,{weekStartsOn:pe,locale:ie}):void 0,ue=t.dateLib&&re?{...re,...t.dateLib}:t.dateLib??re,J=new Ge({locale:ie,weekStartsOn:pe,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ue);return{dateLib:J,components:XC(t.components),formatters:sS(t.formatters),labels:uS(t.labels,J.options),locale:ie,classNames:{...QC(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:u,mode:p,navLayout:c,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:x,onPrevClick:N,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:O,formatMonthDropdown:V,formatWeekNumber:$,formatWeekNumberHeader:U,formatWeekdayName:B,formatYearDropdown:q}=o,Y=TS(t,s),{days:ae,months:W,navStart:K,navEnd:G,previousMonth:_,nextMonth:Q,goToMonth:oe}=Y,P=KC(ae,t,K,G,s),{isSelected:A,select:H,selected:F}=zS(t,s)??{},{blur:Z,focused:I,isFocusTarget:R,moveFocus:X,setFocused:se}=_S(t,Y,P,A??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:ke,labelMonthDropdown:De,labelNav:tt,labelPrevious:Re,labelNext:Fe,labelWeekday:Kt,labelWeekNumber:Ee,labelWeekNumberHeader:Fr,labelYearDropdown:Wr}=a,Oe=S.useMemo(()=>hS(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),ft=p!==void 0||w!==void 0,We=S.useCallback(()=>{_&&(oe(_),N==null||N(_))},[_,oe,N]),fn=S.useCallback(()=>{Q&&(oe(Q),x==null||x(Q))},[oe,Q,x]),qt=S.useCallback((ie,pe)=>re=>{re.preventDefault(),re.stopPropagation(),se(ie),!pe.disabled&&(H==null||H(ie.date,pe,re),w==null||w(ie.date,pe,re))},[H,w,se]),Gn=S.useCallback((ie,pe)=>re=>{se(ie),m==null||m(ie.date,pe,re)},[m,se]),Mt=S.useCallback((ie,pe)=>re=>{Z(),g==null||g(ie.date,pe,re)},[Z,g]),Xt=S.useCallback((ie,pe)=>re=>{const ue={ArrowLeft:[re.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[re.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[re.shiftKey?"year":"week","after"],ArrowUp:[re.shiftKey?"year":"week","before"],PageUp:[re.shiftKey?"year":"month","before"],PageDown:[re.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ue[re.key]){re.preventDefault(),re.stopPropagation();const[J,te]=ue[re.key];X(J,te)}v==null||v(ie.date,pe,re)},[X,v,t.dir]),Le=S.useCallback((ie,pe)=>re=>{y==null||y(ie.date,pe,re)},[y]),jn=S.useCallback((ie,pe)=>re=>{b==null||b(ie.date,pe,re)},[b]),pt=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setMonth(s.startOfMonth(ie),re);oe(ue)},[s,oe]),Rn=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setYear(s.startOfMonth(ie),re);oe(ue)},[s,oe]),{className:Un,style:ht}=S.useMemo(()=>({className:[l[ee.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ee.Root],...t.style}}),[l,t.className,t.style,C]),Kn=ZC(t),qn=S.useRef(null);wS(qn,!!t.animate,{classNames:l,months:W,focused:I,dateLib:s});const pn={dayPickerProps:t,selected:F,select:H,isSelected:A,months:W,nextMonth:Q,previousMonth:_,goToMonth:oe,getModifiers:P,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(lp.Provider,{value:pn},S.createElement(r.Root,{rootRef:t.animate?qn:void 0,className:Un,style:ht,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Kn},S.createElement(r.Months,{className:l[ee.Months],style:C==null?void 0:C[ee.Months]},!t.hideNavigation&&!c&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:fn,previousMonth:_,nextMonth:Q}),W.map((ie,pe)=>S.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ee.Month],style:C==null?void 0:C[ee.Month],key:pe,displayIndex:pe,calendarMonth:ie},c==="around"&&!t.hideNavigation&&pe===0&&S.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:_?void 0:-1,"aria-disabled":_?void 0:!0,"aria-label":Re(_),onClick:We,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:_?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),S.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ee.MonthCaption],style:C==null?void 0:C[ee.MonthCaption],calendarMonth:ie,displayIndex:pe},u!=null&&u.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=u==="dropdown"||u==="dropdown-months"?S.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":De(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:pt(ie.date),options:fS(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},V(ie.date,s)),ue=u==="dropdown"||u==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Wr(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Rn(ie.date),options:gS(K,G,o,s,!!t.reverseYears),style:C==null?void 0:C[ee.Dropdown],value:s.getYear(ie.date)}):S.createElement("span",{key:"year"},q(ie.date,s));return s.getMonthYearOrder()==="year-first"?[ue,re]:[re,ue]})(),S.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},k(ie.date,s.options,s))):S.createElement(r.CaptionLabel,{className:l[ee.CaptionLabel],role:"status","aria-live":"polite"},k(ie.date,s.options,s))),c==="around"&&!t.hideNavigation&&pe===h-1&&S.createElement(r.NextMonthButton,{type:"button",className:l[ee.NextMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":Fe(Q),onClick:fn,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:Q?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),pe===h-1&&c==="after"&&!t.hideNavigation&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:fn,previousMonth:_,nextMonth:Q}),S.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":ke(ie.date,s.options,s)||void 0,className:l[ee.MonthGrid],style:C==null?void 0:C[ee.MonthGrid]},!t.hideWeekdays&&S.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ee.Weekdays],style:C==null?void 0:C[ee.Weekdays]},M&&S.createElement(r.WeekNumberHeader,{"aria-label":Fr(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},U()),Oe.map(re=>S.createElement(r.Weekday,{"aria-label":Kt(re,s.options,s),className:l[ee.Weekday],key:String(re),style:C==null?void 0:C[ee.Weekday],scope:"col"},B(re,s.options,s)))),S.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ee.Weeks],style:C==null?void 0:C[ee.Weeks]},ie.weeks.map(re=>S.createElement(r.Week,{className:l[ee.Week],key:re.weekNumber,style:C==null?void 0:C[ee.Week],week:re},M&&S.createElement(r.WeekNumber,{week:re,style:C==null?void 0:C[ee.WeekNumber],"aria-label":Ee(re.weekNumber,{locale:i}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},$(re.weekNumber,s)),re.days.map(ue=>{const{date:J}=ue,te=P(ue);if(te[be.focused]=!te.hidden&&!!(I!=null&&I.isEqualTo(ue)),te[dt.selected]=(A==null?void 0:A(J))||te.selected,Ho(F)){const{from:ye,to:Te}=F;te[dt.range_start]=!!(ye&&Te&&s.isSameDay(J,ye)),te[dt.range_end]=!!(ye&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=At(F,J,!0,s)}const Se=pS(te,C,t.modifiersStyles),_e=qC(te,l,t.modifiersClassNames),Zt=!ft&&!te.hidden?ce(J,te,s.options,s):void 0;return S.createElement(r.Day,{key:`${ue.isoDate}_${ue.displayMonthId}`,day:ue,modifiers:te,className:_e.join(" "),style:Se,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":Zt,"data-day":ue.isoDate,"data-month":ue.outside?ue.dateMonthId:void 0,"data-selected":te.selected||void 0,"data-disabled":te.disabled||void 0,"data-hidden":te.hidden||void 0,"data-outside":ue.outside||void 0,"data-focused":te.focused||void 0,"data-today":te.today||void 0},!te.hidden&&ft?S.createElement(r.DayButton,{className:l[ee.DayButton],style:C==null?void 0:C[ee.DayButton],type:"button",day:ue,modifiers:te,disabled:!te.focused&&te.disabled||void 0,"aria-disabled":te.focused&&te.disabled||void 0,tabIndex:R(ue)?0:-1,"aria-label":de(J,te,s.options,s),onClick:qt(ue,te),onBlur:Mt(ue,te),onFocus:Gn(ue,te),onKeyDown:Xt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:jn(ue,te)},O(J,s.options,s)):!te.hidden&&O(ue.date,s.options,s))})))))))),t.footer&&S.createElement(r.Footer,{className:l[ee.Footer],style:C==null?void 0:C[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}const Ep=Me(["w-full flex items-center gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),ri=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>d.jsxs("button",{ref:s,type:"button",className:D(Ep({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[d.jsx(Eg,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),d.jsx("span",{className:D("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));ri.displayName="DatePickerTrigger";const oi=({className:e,classNames:t,...n})=>d.jsx(LS,{showOutsideDays:!0,className:D("p-3",e),classNames:{months:"relative flex gap-4",month:"flex flex-col gap-3",month_caption:"flex h-9 items-center justify-center",caption_label:"text-sm font-medium pointer-events-none",nav:"absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between",button_previous:D("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),button_next:D("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),month_grid:"w-full border-collapse",weekdays:"flex",weekday:"flex h-9 w-9 items-center justify-center text-xs font-normal text-muted-foreground",week:"mt-1 flex",day:"flex h-9 w-9 items-center justify-center p-0",day_button:D("h-9 w-9 rounded-md p-0 text-sm font-normal","transition-colors duration-100","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-selected:opacity-100"),selected:"rounded-md bg-primary text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",today:"rounded-md bg-accent text-accent-foreground",outside:"opacity-50 text-muted-foreground",disabled:"opacity-30 text-muted-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:r})=>r==="left"?d.jsx(Qi,{className:"size-4","aria-hidden":"true"}):d.jsx(vn,{className:"size-4","aria-hidden":"true"})},...n});oi.displayName="Calendar";const Dp=In;Dp.displayName="DatePickerRoot";const Tp=f.forwardRef(({className:e,align:t="start",...n},r)=>d.jsx(on,{ref:r,align:t,className:D("w-auto p-0",e),...n}));Tp.displayName="DatePickerContent";const Pp=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[u,p]=f.useState(!1),c=e?Hn(e,r):void 0;return d.jsxs(In,{open:u,onOpenChange:p,children:[d.jsx(So,{asChild:!0,children:d.jsx(ri,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":u,"aria-haspopup":"dialog",children:c})}),d.jsx(on,{className:"w-auto p-0",align:"start",children:d.jsx(oi,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Pp.displayName="DatePicker";const Op=vc,_p=Xv,Ap=Zv,Ip=bc,ai=f.forwardRef(({className:e,...t},n)=>d.jsx(Ta,{ref:n,className:D("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));ai.displayName=Ta.displayName;const si=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>d.jsxs(Ip,{children:[d.jsx(ai,{}),d.jsx(Pa,{ref:i,onInteractOutside:l=>{n||l.preventDefault(),r==null||r(l)},onPointerDownOutside:l=>{n||l.preventDefault(),o==null||o(l)},onEscapeKeyDown:l=>{n||l.preventDefault(),a==null||a(l)},className:D("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full max-w-lg rounded-xl bg-background p-6","ring-1 ring-border/60 shadow-lg","data-[state=open]:animate-dialog-content-in","data-[state=closed]:animate-dialog-content-out",e),...s,children:t})]}));si.displayName=Pa.displayName;const ii=({className:e,...t})=>d.jsx("div",{className:D("flex flex-col gap-1.5 mb-4",e),...t});ii.displayName="DialogHeader";const li=({className:e,...t})=>d.jsx("div",{className:D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});li.displayName="DialogFooter";const ci=f.forwardRef(({className:e,...t},n)=>d.jsx(yc,{ref:n,className:D("text-lg font-semibold leading-none text-balance",e),...t}));ci.displayName=yc.displayName;const di=f.forwardRef(({className:e,...t},n)=>d.jsx(wc,{ref:n,className:D("text-sm text-muted-foreground text-pretty",e),...t}));di.displayName=wc.displayName;const Fp=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>d.jsxs(Op,{...i,children:[e&&d.jsx(_p,{asChild:!0,children:e}),d.jsxs(si,{className:a,dismissible:s,children:[s&&d.jsx(Ap,{className:D("absolute right-4 top-4 rounded-md p-3 text-muted-foreground","transition-[color,background-color] duration-150","hover:bg-accent hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Close",children:d.jsx(tr,{className:"size-4","aria-hidden":"true"})}),d.jsxs(ii,{children:[d.jsx(ci,{children:t}),n&&d.jsx(di,{children:n})]}),r,o&&d.jsx(li,{children:o})]})]});Fp.displayName="Dialog";const Wp=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("flex flex-col gap-1.5",e),...t}));Wp.displayName="Field";const $p=f.forwardRef(({className:e,required:t,children:n,...r},o)=>d.jsxs("label",{ref:o,className:D("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&d.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));$p.displayName="Label";const Bp=f.forwardRef(({className:e,isError:t,...n},r)=>d.jsx("p",{ref:r,className:D("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));Bp.displayName="FieldMessage";const zp=Me(["w-full appearance-none rounded-md border border-input bg-background pr-9","font-ui text-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),Lp=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>d.jsxs("div",{className:"group relative w-full",children:[d.jsx("select",{ref:a,className:D(zp({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground group-has-[select:disabled]:opacity-50 [&_svg]:size-4",children:d.jsx(Jt,{})})]}));Lp.displayName="NativeSelect";const Hp=f.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return d.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:D("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?d.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):d.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});Hp.displayName="Progress";const ui=f.createContext({}),Vp=Me(["peer appearance-none rounded-full border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),HS=Me(["pointer-events-none absolute rounded-full bg-primary-foreground","opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"}},defaultVariants:{size:"md"}}),Yp=f.forwardRef(({className:e,size:t,isError:n,name:r,...o},a)=>{const s=f.use(ui);return d.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[d.jsx("input",{type:"radio",ref:a,name:r??s.name,className:D(Vp({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...o}),d.jsx("span",{"aria-hidden":"true",className:HS({size:t})})]})});Yp.displayName="Radio";const Gp=Me("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),jp=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>d.jsx(ui,{value:{name:t},children:d.jsx("div",{ref:a,role:"radiogroup",className:D(Gp({orientation:n}),e),...o,children:r})}));jp.displayName="RadioGroup";const Rp=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>d.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));Rp.displayName="Separator";const Up=Me(["rounded-full bg-input transition-[background-color]","peer-checked:bg-primary","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background","peer-disabled:opacity-50"],{variants:{size:{sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),VS=Me(["absolute top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm","transition-[translate]","peer-disabled:opacity-50"],{variants:{size:{sm:"left-0.5 size-3 peer-checked:translate-x-3",md:"left-0.5 size-4 peer-checked:translate-x-4",lg:"left-0.5 size-5 peer-checked:translate-x-5"}},defaultVariants:{size:"md"}}),Kp=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>d.jsxs("span",{className:"relative inline-flex shrink-0 items-center",children:[d.jsx("input",{type:"checkbox",role:"switch",ref:o,className:D("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",e),"aria-invalid":n||void 0,...r}),d.jsx("span",{"aria-hidden":"true",className:D(Up({size:t}),n&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",n&&"peer-focus-visible:ring-destructive")}),d.jsx("span",{"aria-hidden":"true",className:VS({size:t})})]}));Kp.displayName="Switch";var Yo="Tabs",[YS]=Ze(Yo,[Oo]),qp=Oo(),[GS,fi]=YS(Yo),Xp=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=Jn(i),[c,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:Yo});return d.jsx(GS,{scope:n,baseId:we(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(ne.div,{dir:p,"data-orientation":s,...u,ref:t})})});Xp.displayName=Yo;var Zp="TabsList",Qp=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fi(Zp,n),s=qp(n);return d.jsx(ku,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Qp.displayName=Zp;var Jp="TabsTrigger",eh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=fi(Jp,n),i=qp(n),l=rh(s.baseId,r),u=oh(s.baseId,r),p=r===s.value;return d.jsx(Eu,{asChild:!0,...i,focusable:!o,active:p,children:d.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:j(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!o&&c&&s.onValueChange(r)})})})});eh.displayName=Jp;var th="TabsContent",nh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=fi(th,n),l=rh(i.baseId,r),u=oh(i.baseId,r),p=r===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Be,{present:o||p,children:({present:h})=>d.jsx(ne.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});nh.displayName=th;function rh(e,t){return`${e}-trigger-${t}`}function oh(e,t){return`${e}-content-${t}`}var ah=Xp,sh=Qp,ih=eh,lh=nh;const pi=f.forwardRef(({className:e,...t},n)=>d.jsx(ah,{ref:n,className:D("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));pi.displayName=ah.displayName;const hi=f.forwardRef(({className:e,...t},n)=>d.jsx(sh,{ref:n,className:D("inline-flex items-center gap-1 rounded-lg bg-muted p-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:h-fit data-[orientation=vertical]:items-stretch",e),...t}));hi.displayName=sh.displayName;const gi=f.forwardRef(({className:e,...t},n)=>d.jsx(ih,{ref:n,className:D("inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm px-3 py-1.5 text-sm font-ui font-medium","text-muted-foreground select-none outline-none","transition-[color,background-color,box-shadow] duration-150","hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-muted","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm","data-[orientation=vertical]:justify-start","[&_svg]:size-4 [&_svg]:shrink-0",e),...t}));gi.displayName=ih.displayName;const mi=f.forwardRef(({className:e,...t},n)=>d.jsx(lh,{ref:n,className:D("mt-4 outline-none","group-data-[orientation=vertical]/tabs:mt-0 group-data-[orientation=vertical]/tabs:flex-1","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mi.displayName=lh.displayName;const ch=({items:e,listClassName:t,className:n,...r})=>d.jsxs(pi,{className:n,...r,children:[d.jsx(hi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>d.jsxs(gi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>d.jsx(mi,{value:o,children:a},o))]});ch.displayName="Tabs";const dh=Me(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","resize-y","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default"],{variants:{size:{sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-4 py-4 text-base"}},defaultVariants:{size:"md"}}),uh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>d.jsx("textarea",{ref:o,className:D(dh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));uh.displayName="Textarea";function jS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const RS=e=>{switch(e){case"success":return qS;case"info":return ZS;case"warning":return XS;case"error":return QS;default:return null}},US=Array(12).fill(0),KS=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},US.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),qS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),XS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ZS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),QS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),JS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e1=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let vi=1;class t1{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:vi++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],S.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(r1(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...w})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...w})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||vi++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ze=new t1,n1=(e,t)=>{const n=(t==null?void 0:t.id)||vi++;return ze.addToast({title:e,...t,id:n}),n},r1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",o1=n1,a1=()=>ze.toasts,s1=()=>ze.getActiveToasts(),i1=Object.assign(o1,{success:ze.success,info:ze.info,warning:ze.warning,error:ze.error,custom:ze.custom,message:ze.message,promise:ze.promise,dismiss:ze.dismiss,loading:ze.loading},{getHistory:a1,getToasts:s1});jS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Go(e){return e.label!==void 0}const l1=3,c1="24px",d1="16px",fh=4e3,u1=356,f1=14,p1=45,h1=200;function Nt(...e){return e.filter(Boolean).join(" ")}function g1(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const m1=e=>{var t,n,r,o,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:y,toasts:b,expanded:x,removeToast:N,defaultRichColors:M,closeButton:C,style:k,cancelButtonStyle:O,actionButtonStyle:V,className:$="",descriptionClassName:U="",duration:B,position:q,gap:Y,expandByDefault:ae,classNames:W,icons:K,closeButtonAriaLabel:G="Close toast"}=e,[_,Q]=S.useState(null),[oe,P]=S.useState(null),[A,H]=S.useState(!1),[F,Z]=S.useState(!1),[I,R]=S.useState(!1),[X,se]=S.useState(!1),[de,ce]=S.useState(!1),[ke,De]=S.useState(0),[tt,Re]=S.useState(0),Fe=S.useRef(c.duration||B||fh),Kt=S.useRef(null),Ee=S.useRef(null),Fr=y===0,Wr=y+1<=m,Oe=c.type,ft=c.dismissible!==!1,We=c.className||"",fn=c.descriptionClassName||"",qt=S.useMemo(()=>v.findIndex(J=>J.toastId===c.id)||0,[v,c.id]),Gn=S.useMemo(()=>{var J;return(J=c.closeButton)!=null?J:C},[c.closeButton,C]),Mt=S.useMemo(()=>c.duration||B||fh,[c.duration,B]),Xt=S.useRef(0),Le=S.useRef(0),jn=S.useRef(0),pt=S.useRef(null),[Rn,Un]=q.split("-"),ht=S.useMemo(()=>v.reduce((J,te,Se)=>Se>=qt?J:J+te.height,0),[v,qt]),Kn=e1(),qn=c.invert||p,pn=Oe==="loading";Le.current=S.useMemo(()=>qt*Y+ht,[qt,ht]),S.useEffect(()=>{Fe.current=Mt},[Mt]),S.useEffect(()=>{H(!0)},[]),S.useEffect(()=>{const J=Ee.current;if(J){const te=J.getBoundingClientRect().height;return Re(te),w(Se=>[{toastId:c.id,height:te,position:c.position},...Se]),()=>w(Se=>Se.filter(_e=>_e.toastId!==c.id))}},[w,c.id]),S.useLayoutEffect(()=>{if(!A)return;const J=Ee.current,te=J.style.height;J.style.height="auto";const Se=J.getBoundingClientRect().height;J.style.height=te,Re(Se),w(_e=>_e.find(ye=>ye.toastId===c.id)?_e.map(ye=>ye.toastId===c.id?{...ye,height:Se}:ye):[{toastId:c.id,height:Se,position:c.position},..._e])},[A,c.title,c.description,w,c.id,c.jsx,c.action,c.cancel]);const Ue=S.useCallback(()=>{Z(!0),De(Le.current),w(J=>J.filter(te=>te.toastId!==c.id)),setTimeout(()=>{N(c)},h1)},[c,N,w,Le]);S.useEffect(()=>{if(c.promise&&Oe==="loading"||c.duration===1/0||c.type==="loading")return;let J;return x||g||Kn?(()=>{if(jn.current<Xt.current){const _e=new Date().getTime()-Xt.current;Fe.current=Fe.current-_e}jn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Xt.current=new Date().getTime(),J=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Ue()},Fe.current))})(),()=>clearTimeout(J)},[x,g,c,Oe,Kn,Ue]),S.useEffect(()=>{c.delete&&(Ue(),c.onDismiss==null||c.onDismiss.call(c,c))},[Ue,c.delete]);function ie(){var J;if(K!=null&&K.loading){var te;return S.createElement("div",{className:Nt(W==null?void 0:W.loader,c==null||(te=c.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Oe==="loading"},K.loading)}return S.createElement(KS,{className:Nt(W==null?void 0:W.loader,c==null||(J=c.classNames)==null?void 0:J.loader),visible:Oe==="loading"})}const pe=c.icon||(K==null?void 0:K[Oe])||RS(Oe);var re,ue;return S.createElement("li",{tabIndex:0,ref:Ee,className:Nt($,We,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W.default,W==null?void 0:W[Oe],c==null||(n=c.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(re=c.richColors)!=null?re:M,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":de,"data-removed":F,"data-visible":Wr,"data-y-position":Rn,"data-x-position":Un,"data-index":y,"data-front":Fr,"data-swiping":I,"data-dismissible":ft,"data-type":Oe,"data-invert":qn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&A),"data-testid":c.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${F?ke:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...k,...c.style},onDragEnd:()=>{R(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(pn||!ft||(Kt.current=new Date,De(Le.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(R(!0),pt.current={x:J.clientX,y:J.clientY})))},onPointerUp:()=>{var J,te,Se;if(X||!ft)return;pt.current=null;const _e=Number(((J=Ee.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zt=Number(((te=Ee.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((Se=Kt.current)==null?void 0:Se.getTime()),Te=_==="x"?_e:Zt,Xn=Math.abs(Te)/ye;if(Math.abs(Te)>=p1||Xn>.11){De(Le.current),c.onDismiss==null||c.onDismiss.call(c,c),P(_==="x"?_e>0?"right":"left":Zt>0?"down":"up"),Ue(),se(!0);return}else{var Ke,qe;(Ke=Ee.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(qe=Ee.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}ce(!1),R(!1),Q(null)},onPointerMove:J=>{var te,Se,_e;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const ye=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Xn;const Ke=(Xn=e.swipeDirections)!=null?Xn:g1(q);!_&&(Math.abs(Te)>1||Math.abs(ye)>1)&&Q(Math.abs(Te)>Math.abs(ye)?"x":"y");let qe={x:0,y:0};const Uo=Ft=>1/(1.5+Math.abs(Ft)/20);if(_==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&ye<0||Ke.includes("bottom")&&ye>0)qe.y=ye;else{const Ft=ye*Uo(ye);qe.y=Math.abs(Ft)<Math.abs(ye)?Ft:ye}}else if(_==="x"&&(Ke.includes("left")||Ke.includes("right")))if(Ke.includes("left")&&Te<0||Ke.includes("right")&&Te>0)qe.x=Te;else{const Ft=Te*Uo(Te);qe.x=Math.abs(Ft)<Math.abs(Te)?Ft:Te}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&ce(!0),(Se=Ee.current)==null||Se.style.setProperty("--swipe-amount-x",`${qe.x}px`),(_e=Ee.current)==null||_e.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Gn&&!c.jsx&&Oe!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":pn,"data-close-button":!0,onClick:pn||!ft?()=>{}:()=>{Ue(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Nt(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ue=K==null?void 0:K.close)!=null?ue:JS):null,(Oe||c.icon||c.promise)&&c.icon!==null&&((K==null?void 0:K[Oe])!==null||c.icon)?S.createElement("div",{"data-icon":"",className:Nt(W==null?void 0:W.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ie():null,c.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Nt(W==null?void 0:W.content,c==null||(a=c.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Nt(W==null?void 0:W.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?S.createElement("div",{"data-description":"",className:Nt(U,fn,W==null?void 0:W.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),S.isValidElement(c.cancel)?c.cancel:c.cancel&&Go(c.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||O,onClick:J=>{Go(c.cancel)&&ft&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,J),Ue())},className:Nt(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,S.isValidElement(c.action)?c.action:c.action&&Go(c.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||V,onClick:J=>{Go(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,J),!J.defaultPrevented&&Ue())},className:Nt(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ph(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function v1(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?d1:c1;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const b1=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=l1,toastOptions:y,dir:b=ph(),gap:x=f1,icons:N,containerAriaLabel:M="Notifications"}=t,[C,k]=S.useState([]),O=S.useMemo(()=>r?C.filter(A=>A.toasterId===r):C.filter(A=>!A.toasterId),[C,r]),V=S.useMemo(()=>Array.from(new Set([a].concat(O.filter(A=>A.position).map(A=>A.position)))),[O,a]),[$,U]=S.useState([]),[B,q]=S.useState(!1),[Y,ae]=S.useState(!1),[W,K]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=S.useRef(null),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=S.useRef(null),oe=S.useRef(!1),P=S.useCallback(A=>{k(H=>{var F;return(F=H.find(Z=>Z.id===A.id))!=null&&F.delete||ze.dismiss(A.id),H.filter(({id:Z})=>Z!==A.id)})},[]);return S.useEffect(()=>ze.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{k(H=>H.map(F=>F.id===A.id?{...F,delete:!0}:F))});return}setTimeout(()=>{Qo.flushSync(()=>{k(H=>{const F=H.findIndex(Z=>Z.id===A.id);return F!==-1?[...H.slice(0,F),{...H[F],...A},...H.slice(F+1)]:[A,...H]})})})}),[C]),S.useEffect(()=>{if(h!=="system"){K(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:H})=>{K(H?"dark":"light")})}catch{A.addListener(({matches:F})=>{try{K(F?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),S.useEffect(()=>{C.length<=1&&q(!1)},[C]),S.useEffect(()=>{const A=H=>{var F;if(s.every(R=>H[R]||H.code===R)){var I;q(!0),(I=G.current)==null||I.focus()}H.code==="Escape"&&(document.activeElement===G.current||(F=G.current)!=null&&F.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),S.useEffect(()=>{if(G.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,oe.current=!1)}},[G.current]),S.createElement("section",{ref:n,"aria-label":`${M} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((A,H)=>{var F;const[Z,I]=A.split("-");return O.length?S.createElement("ol",{key:A,dir:b==="auto"?ph():b,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":W,"data-y-position":Z,"data-x-position":I,style:{"--front-toast-height":`${((F=$[0])==null?void 0:F.height)||0}px`,"--width":`${u1}px`,"--gap":`${x}px`,...m,...v1(p,c)},onBlur:R=>{oe.current&&!R.currentTarget.contains(R.relatedTarget)&&(oe.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||oe.current||(oe.current=!0,Q.current=R.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},O.filter(R=>!R.position&&H===0||R.position===A).map((R,X)=>{var se,de;return S.createElement(m1,{key:R.id,icons:N,index:X,toast:R,defaultRichColors:g,duration:(se=y==null?void 0:y.duration)!=null?se:w,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:v,closeButton:(de=y==null?void 0:y.closeButton)!=null?de:l,interacting:Y,position:A,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:P,toasts:O.filter(ce=>ce.position==R.position),heights:$.filter(ce=>ce.position==R.position),setHeights:U,expandByDefault:i,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),hh=({toastOptions:e,...t})=>{var n;return d.jsx(b1,{theme:"light",richColors:!0,position:"top-center",closeButton:!0,toastOptions:{...e,classNames:{...e==null?void 0:e.classNames,toast:`shadow-lg ${((n=e==null?void 0:e.classNames)==null?void 0:n.toast)??""}`.trim()}},...t})};hh.displayName="Toaster";var[jo]=Ze("Tooltip",[Vt]),Ro=Vt(),gh="TooltipProvider",y1=700,bi="tooltip.open",[w1,yi]=jo(gh),mh=e=>{const{__scopeTooltip:t,delayDuration:n=y1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(w1,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};mh.displayName=gh;var Ar="Tooltip",[x1,Ir]=jo(Ar),vh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=yi(Ar,e.__scopeTooltip),u=Ro(t),[p,c]=f.useState(null),h=we(),g=f.useRef(0),w=s??l.disableHoverableContent,m=i??l.delayDuration,v=f.useRef(!1),[y,b]=Qe({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(bi))):l.onClose(),a==null||a(k)},caller:Ar}),x=f.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),N=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,b(!0)},[b]),M=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b(!1)},[b]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,b(!0),g.current=0},m)},[m,b]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(dr,{...u,children:d.jsx(x1,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():N()},[l.isOpenDelayedRef,C,N]),onTriggerLeave:f.useCallback(()=>{w?M():(window.clearTimeout(g.current),g.current=0)},[M,w]),onOpen:N,onClose:M,disableHoverableContent:w,children:n})})};vh.displayName=Ar;var wi="TooltipTrigger",bh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ir(wi,n),a=yi(wi,n),s=Ro(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ur,{asChild:!0,...s,children:d.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:j(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});bh.displayName=wi;var xi="TooltipPortal",[C1,S1]=jo(xi,{forceMount:void 0}),yh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Ir(xi,t);return d.jsx(C1,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};yh.displayName=xi;var Yn="TooltipContent",wh=f.forwardRef((e,t)=>{const n=S1(Yn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Ir(Yn,e.__scopeTooltip);return d.jsx(Be,{present:r||s.open,children:s.disableHoverableContent?d.jsx(xh,{side:o,...a,ref:t}):d.jsx(N1,{side:o,...a,ref:t})})}),N1=f.forwardRef((e,t)=>{const n=Ir(Yn,e.__scopeTooltip),r=yi(Yn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,p=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{i(null),c(!1)},[c]),g=f.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=T1(y,v.getBoundingClientRect()),x=P1(y,b),N=O1(m.getBoundingClientRect()),M=A1([...x,...N]);i(M),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const w=v=>g(v,p),m=v=>g(v,l);return l.addEventListener("pointerleave",w),p.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",m)}}},[l,p,g,h]),f.useEffect(()=>{if(s){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),x=!_1(y,s);b?h():x&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,u,h]),d.jsx(xh,{...e,ref:a})}),[M1,k1]=jo(Ar,{isInside:!1}),E1=Vh("TooltipContent"),xh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ir(Yn,n),u=Ro(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(bi,p),()=>document.removeEventListener(bi,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(wo,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(E1,{children:r}),d.jsx(M1,{scope:n,isInside:!0,children:d.jsx(Vy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});wh.displayName=Yn;var Ch="TooltipArrow",D1=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return k1(Ch,n).isInside?null:d.jsx(xo,{...o,...r,ref:t})});D1.displayName=Ch;function T1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function P1(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function O1(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _1(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function A1(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),I1(t)}function I1(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var F1=mh,W1=vh,$1=bh,B1=yh,Sh=wh;const z1=F1,Nh=W1,Mh=$1,Ci=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>d.jsx(B1,{children:d.jsx(Sh,{ref:r,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 shadow-md","text-xs font-body text-background font-medium","origin-(--radix-tooltip-content-transform-origin)","data-[state=delayed-open]:animate-tooltip-in","data-[state=instant-open]:animate-tooltip-in","data-[state=closed]:animate-tooltip-out",e),...n})}));Ci.displayName=Sh.displayName;const kh=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>d.jsxs(Nh,{...a,children:[d.jsx(Mh,{asChild:!0,children:t}),d.jsx(Ci,{side:n,align:r,sideOffset:o,children:e})]});kh.displayName="Tooltip",E.Accordion=hl,E.AccordionContent=pa,E.AccordionItem=ua,E.AccordionRoot=da,E.AccordionTrigger=fa,E.Alert=ml,E.AlertDescription=bl,E.AlertTitle=vl,E.AspectRatio=xl,E.Avatar=Sl,E.Badge=Ml,E.Button=wn,E.Calendar=oi,E.Checkbox=Dl,E.ComboBox=Td,E.ComboBoxContent=Sd,E.ComboBoxEmpty=Md,E.ComboBoxGroup=kd,E.ComboBoxItem=Nd,E.ComboBoxRoot=Dd,E.ComboBoxSeparator=Ed,E.ComboBoxTrigger=Ja,E.ComboBoxTriggerVariants=Cd,E.DATA_TABLE_EXPAND_COLUMN_ID=_t,E.DataTable=Wf,E.DataTableColumnHeader=$f,E.DatePicker=Pp,E.DatePickerContent=Tp,E.DatePickerRoot=Dp,E.DatePickerTrigger=ri,E.Dialog=Fp,E.DialogClose=Ap,E.DialogContent=si,E.DialogDescription=di,E.DialogFooter=li,E.DialogHeader=ii,E.DialogOverlay=ai,E.DialogPortal=Ip,E.DialogRoot=Op,E.DialogTitle=ci,E.DialogTrigger=_p,E.DropdownMenu=Tf,E.DropdownMenuCheckboxItem=Ls,E.DropdownMenuContent=Cr,E.DropdownMenuGroup=B0,E.DropdownMenuItem=Ot,E.DropdownMenuLabel=Sr,E.DropdownMenuPortal=z0,E.DropdownMenuRadioGroup=Df,E.DropdownMenuRadioItem=Hs,E.DropdownMenuRoot=Wo,E.DropdownMenuSeparator=Wn,E.DropdownMenuSub=zs,E.DropdownMenuSubContent=zo,E.DropdownMenuSubTrigger=Bo,E.DropdownMenuTrigger=$o,E.Field=Wp,E.FieldMessage=Bp,E.Input=pr,E.InputAddon=cs,E.InputGroup=ls,E.Label=$p,E.NativeSelect=Lp,E.Pagination=ms,E.PaginationEllipsis=gs,E.PaginationItem=fs,E.PaginationNext=hs,E.PaginationPrev=ps,E.PaginationRoot=ds,E.Popover=xd,E.PopoverAnchor=Iy,E.PopoverClose=Ay,E.PopoverContent=on,E.PopoverRoot=In,E.PopoverTrigger=So,E.Progress=Hp,E.Radio=Yp,E.RadioGroup=jp,E.RadioGroupContext=ui,E.STRING_COLUMN_FILTER_OPTIONS=ts,E.Select=wu,E.SelectContent=Po,E.SelectGroup=vw,E.SelectItem=Es,E.SelectLabel=bu,E.SelectRoot=Ss,E.SelectScrollDownButton=ks,E.SelectScrollUpButton=Ms,E.SelectSeparator=yu,E.SelectTrigger=To,E.SelectValue=Ns,E.Separator=Rp,E.Skeleton=is,E.Switch=Kp,E.Table=rs,E.TableBody=as,E.TableCaption=Pd,E.TableCell=an,E.TableFooter=ss,E.TableHead=No,E.TableHeader=os,E.TableRow=Pt,E.Tabs=ch,E.TabsContent=mi,E.TabsList=hi,E.TabsRoot=pi,E.TabsTrigger=gi,E.Textarea=uh,E.Toaster=hh,E.Tooltip=kh,E.TooltipContent=Ci,E.TooltipProvider=z1,E.TooltipRoot=Nh,E.TooltipTrigger=Mh,E.accordionContentVariants=fl,E.accordionRootVariants=pl,E.accordionTriggerVariants=ul,E.alertVariants=gl,E.avatarVariants=Cl,E.badgeVariants=Nl,E.bookersStringFilter=ns,E.buttonVariants=kl,E.checkboxVariants=El,E.cn=D,E.dataTableColumnHeaderMeta=U0,E.datePickerTriggerVariants=Ep,E.inputVariants=_d,E.nativeSelectVariants=zp,E.radioGroupVariants=Gp,E.radioVariants=Vp,E.selectTriggerVariants=vu,E.switchTrackVariants=Up,E.textareaVariants=dh,E.toast=i1,E.useDataTableTable=Of,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|