@bookers/ui 0.8.0 → 0.9.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/dist/index.d.ts +52 -0
- package/dist/index.js +3149 -2978
- package/dist/index.umd.cjs +39 -39
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
(function(T,c){typeof exports=="object"&&typeof module<"u"?c(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"],c):(T=typeof globalThis<"u"?globalThis:T||self,c(T.BookersUi={},T.jsxRuntime,T.React,T.ReactDOM,T.ReactTable,T.ReactVirtual))})(this,(function(T,c,S,oa,He,Qh){"use strict";function Ai(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=Ai(S),jr=Ai(oa);function Jh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return c.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 d=u=>{var b;const{scope:h,children:g,...w}=u,m=((b=h==null?void 0:h[e])==null?void 0:b[l])||i,v=f.useMemo(()=>w,Object.values(w));return c.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function p(u,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(`\`${u}\` must be used within \`${a}\``)}return[d,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,eg(o,...t)]}function eg(...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:d})=>{const u=l(a)[`__scope${d}`];return{...i,...u}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Fi(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=Fi(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():Fi(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function tn(e){const t=tg(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(rg);if(l){const d=l.props.children,p=i.map(u=>u===l?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return c.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function tg(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=ag(o),i=og(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 Wi=Symbol("radix.slottable");function ng(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Wi,t}function rg(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wi}function og(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 ag(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 Ur(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:b}=m,y=S.useRef(null),x=S.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=tn(i),d=S.forwardRef((m,v)=>{const{scope:b,children:y}=m,x=a(i,b),N=he(v,x.collectionRef);return c.jsx(l,{ref:N,children:y})});d.displayName=i;const p=e+"CollectionItemSlot",u="data-radix-collection-item",h=tn(p),g=S.forwardRef((m,v)=>{const{scope:b,children:y,...x}=m,N=S.useRef(null),M=he(v,N),C=a(p,b);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),c.jsx(h,{[u]:"",ref:M,children:y})});g.displayName=p;function w(m){const v=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${u}]`));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:d,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:()=>{},sg=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=ig({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const u=p.current;u!==i&&console.warn(`${r} is changing from ${u?"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 d=f.useCallback(p=>{var u;if(i){const h=lg(p)?p(e):p;h!==e&&((u=s.current)==null||u.call(s,h))}else a(p)},[i,e,a,s]);return[l,d]}function ig({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return sg(()=>{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 lg(e){return typeof e=="function"}var cg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=cg.reduce((e,t)=>{const n=tn(`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),c.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $i(e,t){e&&jr.flushSync(()=>e.dispatchEvent(t))}function dg(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=ug(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,fg(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function ug(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=dg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Rr(r.current);a.current=i==="mounted"?d:"none"},[i]),Pe(()=>{const d=r.current,p=o.current;if(p!==e){const h=a.current,g=Rr(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,u=g=>{const m=Rr(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",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Rr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Rr(e){return(e==null?void 0:e.animationName)||"none"}function fg(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 pg=f[" useId ".trim().toString()]||(()=>{}),hg=0;function Ce(e){const[t,n]=f.useState(pg());return Pe(()=>{n(r=>r??String(hg++))},[e]),t?`radix-${t}`:""}var Kr="Collapsible",[gg,zi]=Ze(Kr),[mg,aa]=gg(Kr),Bi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,d]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:Kr});return c.jsx(mg,{scope:n,disabled:a,contentId:Ce(),open:l,onOpenToggle:f.useCallback(()=>d(p=>!p),[d]),children:c.jsx(ne.div,{"data-state":ia(l),"data-disabled":a?"":void 0,...i,ref:t})})});Bi.displayName=Kr;var Li="CollapsibleTrigger",Hi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=aa(Li,n);return c.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ia(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Hi.displayName=Li;var sa="CollapsibleContent",Vi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=aa(sa,e.__scopeCollapsible);return c.jsx(ze,{present:n||o.open,children:({present:a})=>c.jsx(vg,{...r,ref:t,present:a})})});Vi.displayName=sa;var vg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=aa(sa,n),[i,l]=f.useState(r),d=f.useRef(null),p=he(t,d),u=f.useRef(0),h=u.current,g=f.useRef(0),w=g.current,m=s.open||i,v=f.useRef(m),b=f.useRef(void 0);return f.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Pe(()=>{const y=d.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();u.current=x.height,g.current=x.width,v.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),l(r)}},[s.open,r]),c.jsx(ne.div,{"data-state":ia(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 ia(e){return e?"open":"closed"}var bg=Bi,yg=Hi,wg=Vi,xg=f.createContext(void 0);function tr(e){const t=f.useContext(xg);return e||t||"ltr"}var rt="Accordion",Cg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[la,Sg,Ng]=Ur(rt),[qr]=Ze(rt,[Ng,zi]),ca=zi(),Yi=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return c.jsx(la.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(Eg,{...a,ref:t}):c.jsx(Dg,{...o,ref:t})})});Yi.displayName=rt;var[Gi,kg]=qr(rt),[ji,Mg]=qr(rt,{collapsible:!1}),Dg=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 c.jsx(Gi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:c.jsx(ji,{scope:e.__scopeAccordion,collapsible:a,children:c.jsx(Ui,{...s,ref:t})})})}),Eg=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((u=[])=>[...u,p]),[i]),d=S.useCallback(p=>i((u=[])=>u.filter(h=>h!==p)),[i]);return c.jsx(Gi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:d,children:c.jsx(ji,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(Ui,{...a,ref:t})})})}),[Tg,Xr]=qr(rt),Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=he(i,t),d=Sg(n),u=tr(o)==="ltr",h=j(e.onKeyDown,g=>{var D;if(!Cg.includes(g.key))return;const w=g.target,m=d().filter(E=>{var I;return!((I=E.ref.current)!=null&&I.disabled)}),v=m.findIndex(E=>E.ref.current===w),b=m.length;if(v===-1)return;g.preventDefault();let y=v;const x=0,N=b-1,M=()=>{y=v+1,y>N&&(y=x)},C=()=>{y=v-1,y<x&&(y=N)};switch(g.key){case"Home":y=x;break;case"End":y=N;break;case"ArrowRight":a==="horizontal"&&(u?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(u?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const k=y%b;(D=m[k].ref.current)==null||D.focus()});return c.jsx(Tg,{scope:n,disabled:r,direction:o,orientation:a,children:c.jsx(la.Slot,{scope:n,children:c.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Zr="AccordionItem",[Pg,da]=qr(Zr),Ri=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Xr(Zr,n),s=kg(Zr,n),i=ca(n),l=Ce(),d=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return c.jsx(Pg,{scope:n,open:d,disabled:p,triggerId:l,children:c.jsx(bg,{"data-orientation":a.orientation,"data-state":Ji(d),...i,...o,ref:t,disabled:p,open:d,onOpenChange:u=>{u?s.onItemOpen(r):s.onItemClose(r)}})})});Ri.displayName=Zr;var Ki="AccordionHeader",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Ki,n);return c.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Ji(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});qi.displayName=Ki;var ua="AccordionTrigger",Xi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(ua,n),s=Mg(ua,n),i=ca(n);return c.jsx(la.ItemSlot,{scope:n,children:c.jsx(yg,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Xi.displayName=ua;var Zi="AccordionContent",Qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Zi,n),s=ca(n);return c.jsx(wg,{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=Zi;function Ji(e){return e?"open":"closed"}var _g=Yi,Og=Ri,Ig=qi,Ag=Xi,Fg=Qi;/**
|
|
1
|
+
(function(M,l){typeof exports=="object"&&typeof module<"u"?l(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"],l):(M=typeof globalThis<"u"?globalThis:M||self,l(M.BookersUi={},M.jsxRuntime,M.React,M.ReactDOM,M.ReactTable,M.ReactVirtual))})(this,(function(M,l,N,la,He,fg){"use strict";function Gi(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=Gi(N),Kr=Gi(la);function pg(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,c=f.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:c,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),c=n.length;n=[...n,s];const d=u=>{var b;const{scope:h,children:g,...w}=u,m=((b=h==null?void 0:h[e])==null?void 0:b[c])||i,v=f.useMemo(()=>w,Object.values(w));return l.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function p(u,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[c])||i,w=f.useContext(g);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[d,p]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,hg(o,...t)]}function hg(...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:c,scopeName:d})=>{const u=c(a)[`__scope${d}`];return{...i,...u}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function ji(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=ji(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():ji(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function tn(e){const t=gg(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),c=i.find(vg);if(c){const d=c.props.children,p=i.map(u=>u===c?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return l.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return l.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function gg(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=yg(o),i=bg(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 Ui=Symbol("radix.slottable");function mg(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ui,t}function vg(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ui}function bg(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 c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function yg(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 Rr(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:b}=m,y=N.useRef(null),x=N.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=tn(i),d=N.forwardRef((m,v)=>{const{scope:b,children:y}=m,x=a(i,b),S=he(v,x.collectionRef);return l.jsx(c,{ref:S,children:y})});d.displayName=i;const p=e+"CollectionItemSlot",u="data-radix-collection-item",h=tn(p),g=N.forwardRef((m,v)=>{const{scope:b,children:y,...x}=m,S=N.useRef(null),D=he(v,S),C=a(p,b);return N.useEffect(()=>(C.itemMap.set(S,{ref:S,...x}),()=>void C.itemMap.delete(S))),l.jsx(h,{[u]:"",ref:D,children:y})});g.displayName=p;function w(m){const v=a(e+"CollectionConsumer",m);return N.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${u}]`));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:d,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:()=>{},wg=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=xg({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const u=p.current;u!==i&&console.warn(`${r} is changing from ${u?"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 d=f.useCallback(p=>{var u;if(i){const h=Cg(p)?p(e):p;h!==e&&((u=s.current)==null||u.call(s,h))}else a(p)},[i,e,a,s]);return[c,d]}function xg({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return wg(()=>{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 Cg(e){return typeof e=="function"}var Ng=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=Ng.reduce((e,t)=>{const n=tn(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ki(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Sg(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=kg(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,Mg(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function kg(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Sg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=qr(r.current);a.current=i==="mounted"?d:"none"},[i]),Pe(()=>{const d=r.current,p=o.current;if(p!==e){const h=a.current,g=qr(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pe(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,u=g=>{const m=qr(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=qr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function qr(e){return(e==null?void 0:e.animationName)||"none"}function Mg(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 Dg=f[" useId ".trim().toString()]||(()=>{}),Eg=0;function Ce(e){const[t,n]=f.useState(Dg());return Pe(()=>{n(r=>r??String(Eg++))},[e]),t?`radix-${t}`:""}var Xr="Collapsible",[Tg,Ri]=Ze(Xr),[Pg,ca]=Tg(Xr),qi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[c,d]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:Xr});return l.jsx(Pg,{scope:n,disabled:a,contentId:Ce(),open:c,onOpenToggle:f.useCallback(()=>d(p=>!p),[d]),children:l.jsx(ne.div,{"data-state":ua(c),"data-disabled":a?"":void 0,...i,ref:t})})});qi.displayName=Xr;var Xi="CollapsibleTrigger",Zi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ca(Xi,n);return l.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ua(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Zi.displayName=Xi;var da="CollapsibleContent",Qi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ca(da,e.__scopeCollapsible);return l.jsx(ze,{present:n||o.open,children:({present:a})=>l.jsx(_g,{...r,ref:t,present:a})})});Qi.displayName=da;var _g=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=ca(da,n),[i,c]=f.useState(r),d=f.useRef(null),p=he(t,d),u=f.useRef(0),h=u.current,g=f.useRef(0),w=g.current,m=s.open||i,v=f.useRef(m),b=f.useRef(void 0);return f.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Pe(()=>{const y=d.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();u.current=x.height,g.current=x.width,v.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),c(r)}},[s.open,r]),l.jsx(ne.div,{"data-state":ua(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 ua(e){return e?"open":"closed"}var Og=qi,Ig=Zi,Ag=Qi,Fg=f.createContext(void 0);function tr(e){const t=f.useContext(Fg);return e||t||"ltr"}var rt="Accordion",Wg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[fa,$g,zg]=Rr(rt),[Zr]=Ze(rt,[zg,Ri]),pa=Ri(),Ji=N.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return l.jsx(fa.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(Vg,{...a,ref:t}):l.jsx(Hg,{...o,ref:t})})});Ji.displayName=rt;var[el,Bg]=Zr(rt),[tl,Lg]=Zr(rt,{collapsible:!1}),Hg=N.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,c]=Qe({prop:n,defaultProp:r??"",onChange:o,caller:rt});return l.jsx(el,{scope:e.__scopeAccordion,value:N.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:N.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(tl,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(nl,{...s,ref:t})})})}),Vg=N.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Qe({prop:n,defaultProp:r??[],onChange:o,caller:rt}),c=N.useCallback(p=>i((u=[])=>[...u,p]),[i]),d=N.useCallback(p=>i((u=[])=>u.filter(h=>h!==p)),[i]);return l.jsx(el,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:l.jsx(tl,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(nl,{...a,ref:t})})})}),[Yg,Qr]=Zr(rt),nl=N.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=N.useRef(null),c=he(i,t),d=$g(n),u=tr(o)==="ltr",h=j(e.onKeyDown,g=>{var E;if(!Wg.includes(g.key))return;const w=g.target,m=d().filter(T=>{var I;return!((I=T.ref.current)!=null&&I.disabled)}),v=m.findIndex(T=>T.ref.current===w),b=m.length;if(v===-1)return;g.preventDefault();let y=v;const x=0,S=b-1,D=()=>{y=v+1,y>S&&(y=x)},C=()=>{y=v-1,y<x&&(y=S)};switch(g.key){case"Home":y=x;break;case"End":y=S;break;case"ArrowRight":a==="horizontal"&&(u?D():C());break;case"ArrowDown":a==="vertical"&&D();break;case"ArrowLeft":a==="horizontal"&&(u?C():D());break;case"ArrowUp":a==="vertical"&&C();break}const k=y%b;(E=m[k].ref.current)==null||E.focus()});return l.jsx(Yg,{scope:n,disabled:r,direction:o,orientation:a,children:l.jsx(fa.Slot,{scope:n,children:l.jsx(ne.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:h})})})}),Jr="AccordionItem",[Gg,ha]=Zr(Jr),rl=N.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Qr(Jr,n),s=Bg(Jr,n),i=pa(n),c=Ce(),d=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return l.jsx(Gg,{scope:n,open:d,disabled:p,triggerId:c,children:l.jsx(Og,{"data-orientation":a.orientation,"data-state":cl(d),...i,...o,ref:t,disabled:p,open:d,onOpenChange:u=>{u?s.onItemOpen(r):s.onItemClose(r)}})})});rl.displayName=Jr;var ol="AccordionHeader",al=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Qr(rt,n),a=ha(ol,n);return l.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":cl(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});al.displayName=ol;var ga="AccordionTrigger",sl=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Qr(rt,n),a=ha(ga,n),s=Lg(ga,n),i=pa(n);return l.jsx(fa.ItemSlot,{scope:n,children:l.jsx(Ig,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});sl.displayName=ga;var il="AccordionContent",ll=N.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Qr(rt,n),a=ha(il,n),s=pa(n);return l.jsx(Ag,{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}})});ll.displayName=il;function cl(e){return e?"open":"closed"}var jg=Ji,Ug=rl,Kg=al,Rg=sl,qg=ll;/**
|
|
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 Xg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dl=(...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 Zg={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 Qg=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},c)=>N.createElement("svg",{ref:c,...Zg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:dl("lucide",o),...i},[...s.map(([d,p])=>N.createElement(d,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 me=(e,t)=>{const n=
|
|
21
|
+
*/const me=(e,t)=>{const n=N.forwardRef(({className:r,...o},a)=>N.createElement(Qg,{ref:a,iconNode:t,className:dl(`lucide-${Xg(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 Jg=me("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 em=me("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 tm=me("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.
|
|
@@ -48,7 +48,7 @@
|
|
|
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 ul=me("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.
|
|
@@ -58,108 +58,108 @@
|
|
|
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 eo=me("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 nm=me("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
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 rm=me("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
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 om=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
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
|
|
81
|
+
*/const am=me("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
82
82
|
* @license lucide-react v0.475.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const sm=me("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
|
|
87
87
|
* @license lucide-react v0.475.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const im=me("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"}]]);/**
|
|
92
92
|
* @license lucide-react v0.475.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const lm=me("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"}]]);/**
|
|
97
97
|
* @license lucide-react v0.475.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const cm=me("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"}]]);/**
|
|
102
102
|
* @license lucide-react v0.475.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const dm=me("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
107
107
|
* @license lucide-react v0.475.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const um=me("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"}]]);/**
|
|
112
112
|
* @license lucide-react v0.475.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const fm=me("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"}]]);/**
|
|
117
117
|
* @license lucide-react v0.475.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const pm=me("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"}]]);/**
|
|
122
122
|
* @license lucide-react v0.475.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const hm=me("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
127
127
|
* @license lucide-react v0.475.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const gm=me("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"}]]);/**
|
|
132
132
|
* @license lucide-react v0.475.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const ma=me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
137
137
|
* @license lucide-react v0.475.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const fl=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
142
142
|
* @license lucide-react v0.475.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const mm=me("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"}]]);/**
|
|
147
147
|
* @license lucide-react v0.475.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const vm=me("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"}]]);/**
|
|
152
152
|
* @license lucide-react v0.475.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const bm=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
157
157
|
* @license lucide-react v0.475.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const $t=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function rl(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=rl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ol(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rl(e))&&(r&&(r+=" "),r+=t);return r}const al=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sl=ol,ye=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return sl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const p=n==null?void 0:n[d],u=a==null?void 0:a[d];if(p===null)return null;const h=al(p)||al(u);return o[d][h]}),i=n&&Object.entries(n).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:u,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})?[...d,u,h]:d},[]);return sl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},pa="-",am=e=>{const t=im(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(pa);return i[0]===""&&i.length!==1&&i.shift(),il(i,t)||sm(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},il=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?il(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(pa);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},ll=/^\[(.+)\]$/,sm=e=>{if(ll.test(e)){const t=ll.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},im=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return cm(Object.entries(e.classGroups),n).forEach(([a,s])=>{ha(s,r,a,t)}),r},ha=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:cl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(lm(o)){ha(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{ha(s,cl(t,a),n,r)})})},cl=(e,t)=>{let n=e;return t.split(pa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lm=e=>e.isThemeGetter,cm=(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,dm=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)}}},dl="!",um=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let d=0,p=0,u;for(let v=0;v<i.length;v++){let b=i[v];if(d===0){if(b===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(p,v)),p=v+a;continue}if(b==="/"){u=v;continue}}b==="["?d++:b==="]"&&d--}const h=l.length===0?i:i.substring(p),g=h.startsWith(dl),w=g?h.substring(1):h,m=u&&u>p?u-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},fm=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},pm=e=>({cache:dm(e.cacheSize),parseClassName:um(e),...am(e)}),hm=/\s+/,gm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(hm);let i="";for(let l=s.length-1;l>=0;l-=1){const d=s[l],{modifiers:p,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:g}=n(d);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=d+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=d+(i.length>0?" "+i:i);continue}w=!1}const v=fm(p).join(":"),b=u?v+dl:v,y=b+m;if(a.includes(y))continue;a.push(y);const x=o(m,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(b+M)}i=d+(i.length>0?" "+i:i)}return i};function mm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ul(t))&&(r&&(r+=" "),r+=n);return r}const ul=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ul(e[r]))&&(n&&(n+=" "),n+=t);return n};function vm(e,...t){let n,r,o,a=s;function s(l){const d=t.reduce((p,u)=>u(p),e());return n=pm(d),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const d=r(l);if(d)return d;const p=gm(l,n);return o(l,p),p}return function(){return a(mm.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fl=/^\[(?:([a-z-]+):)?(.+)\]$/i,bm=/^\d+\/\d+$/,ym=new Set(["px","full","screen"]),wm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xm=/\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$/,Cm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>xn(e)||ym.has(e)||bm.test(e),zt=e=>Cn(e,"length",Om),xn=e=>!!e&&!Number.isNaN(Number(e)),ga=e=>Cn(e,"number",xn),nr=e=>!!e&&Number.isInteger(Number(e)),km=e=>e.endsWith("%")&&xn(e.slice(0,-1)),le=e=>fl.test(e),Bt=e=>wm.test(e),Mm=new Set(["length","size","percentage"]),Dm=e=>Cn(e,Mm,pl),Em=e=>Cn(e,"position",pl),Tm=new Set(["image","url"]),Pm=e=>Cn(e,Tm,Am),_m=e=>Cn(e,"",Im),rr=()=>!0,Cn=(e,t,n)=>{const r=fl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Om=e=>xm.test(e)&&!Cm.test(e),pl=()=>!1,Im=e=>Sm.test(e),Am=e=>Nm.test(e),Fm=vm(()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),o=be("borderColor"),a=be("borderRadius"),s=be("borderSpacing"),i=be("borderWidth"),l=be("contrast"),d=be("grayscale"),p=be("hueRotate"),u=be("invert"),h=be("gap"),g=be("gradientColorStops"),w=be("gradientColorStopPositions"),m=be("inset"),v=be("margin"),b=be("opacity"),y=be("padding"),x=be("saturate"),N=be("scale"),M=be("sepia"),C=be("skew"),k=be("space"),D=be("translate"),E=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",le,t],B=()=>[le,t],q=()=>["",Dt,zt],Y=()=>["auto",xn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["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"],A=()=>["","0",le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[xn,le];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[Dt,zt],blur:["none","",Bt,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Bt,le],borderSpacing:B(),borderWidth:q(),contrast:oe(),grayscale:A(),hueRotate:oe(),invert:A(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[km,zt],inset:R(),margin:R(),opacity:oe(),padding:B(),saturate:oe(),scale:oe(),sepia:A(),skew:oe(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Bt]}],"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:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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:R()}],"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:A()}],shrink:[{shrink:A()}],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:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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:[Bt]},Bt]}],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",Bt,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ga]}],"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",xn,ga]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dt,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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dt,zt]}],"underline-offset":[{"underline-offset":["auto",Dt,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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),Em]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pm]}],"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":[b]}],"border-style":[{border:[...z(),"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":[b]}],"divide-style":[{divide:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[Dt,le]}],"outline-w":[{outline:[Dt,zt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Dt,zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bt,_m]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[b]}],"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",Bt,le]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[u]}],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":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"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":[D]}],"translate-y":[{"translate-y":[D]}],"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:[Dt,zt,ga]}],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 P(...e){return Fm(ol(e))}const hl=ye(["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"}}),gl=ye(["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"}}),ml=ye("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),ma=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(_g,{ref:r,className:P(ml({variant:t}),e),...n}));ma.displayName="AccordionRoot";const va=f.forwardRef(({className:e,...t},n)=>c.jsx(Og,{ref:n,className:P("border-b border-border last:border-b-0",e),...t}));va.displayName="AccordionItem";const ba=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Ig,{className:"flex",children:c.jsxs(Ag,{ref:o,className:P("group",hl({size:t}),"px-4",e),...r,children:[n,c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));ba.displayName="AccordionTrigger";const ya=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Fg,{ref:o,className:P(gl({size:t}),e),...r,children:c.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));ya.displayName="AccordionContent";const vl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:d,dir:p},u)=>c.jsx(ma,{ref:u,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:d,dir:p,children:e.map(h=>c.jsxs(va,{value:h.value,children:[c.jsx(ba,{size:t,disabled:h.disabled,children:h.trigger}),c.jsx(ya,{size:t,children:h.content})]},h.value))}));vl.displayName="Accordion";const wa=f.createContext({size:"md"}),bl=ye(["relative w-full rounded-lg border flex","[&>svg]:shrink-0 [&>svg]:size-4 [&>svg]:mt-0.5"],{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"},size:{md:"p-4",sm:"p-3"}},defaultVariants:{variant:"default",size:"md"}});function Wm(e){if(!f.isValidElement(e))return!1;const t=e.type;return t.displayName==="AlertTitle"||t.displayName==="AlertDescription"}function $m(e){const t=f.Children.toArray(e);let n=null;const r=[];for(const o of t)!n&&!Wm(o)&&f.isValidElement(o)?n=o:r.push(o);return{icon:n,content:r}}const yl=f.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>{const{icon:s,content:i}=$m(r),l=s!=null,d=n??"md";return c.jsx(wa,{value:{size:d},children:c.jsx("div",{ref:a,role:"alert","data-size":d,className:P(bl({variant:t,size:d}),l?P("flex-row items-start",d==="sm"?"gap-2":"gap-2.5"):"flex-col",e),...o,children:l?c.jsxs(c.Fragment,{children:[s,c.jsx("div",{className:"min-w-0 flex-1",children:i})]}):r})})});yl.displayName="Alert";const zm=ye("mb-1 font-medium leading-none tracking-tight text-balance",{variants:{size:{md:"",sm:"text-sm"}},defaultVariants:{size:"md"}}),wl=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(wa);return c.jsx("h5",{ref:n,className:P(zm({size:r}),e),...t})});wl.displayName="AlertTitle";const Bm=ye("leading-relaxed opacity-90 text-pretty",{variants:{size:{md:"text-sm",sm:"text-xs"}},defaultVariants:{size:"md"}}),xl=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(wa);return c.jsx("p",{ref:n,className:P(Bm({size:r}),e),...t})});xl.displayName="AlertDescription";var Lm=Symbol.for("react.lazy"),Jr=f[" use ".trim().toString()];function Hm(e){return typeof e=="object"&&e!==null&&"then"in e}function Cl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Lm&&"_payload"in e&&Hm(e._payload)}function Vm(e){const t=Ym(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;Cl(a)&&typeof Jr=="function"&&(a=Jr(a._payload));const i=f.Children.toArray(a),l=i.find(jm);if(l){const d=l.props.children,p=i.map(u=>u===l?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return c.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Ym(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(Cl(o)&&typeof Jr=="function"&&(o=Jr(o._payload)),f.isValidElement(o)){const s=Rm(o),i=Um(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 Gm=Symbol("radix.slottable");function jm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gm}function Um(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 Rm(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 Km=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qm=Km.reduce((e,t)=>{const n=Vm(`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),c.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Xm="AspectRatio",Sl=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return c.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:c.jsx(qm.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Sl.displayName=Xm;var Zm=Sl;const Nl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>c.jsx(Zm,{ref:r,ratio:t,className:P("overflow-hidden",e),...n}));Nl.displayName="AspectRatio";const kl=ye("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 Qm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Ml=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 d=o??(r?Qm(r):null),p=n&&!i;return c.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:P(kl({size:t}),e),...a,children:p?c.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>l(!0)}):c.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:d??"?"})})});Ml.displayName="Avatar";const Dl=ye("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"}}),El=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("span",{ref:r,className:P(Dl({variant:t}),e),...n}));El.displayName="Badge";const Tl=ye(["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"}}),Sn=f.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:l=!1,...d},p)=>{const u=o?c.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[c.jsx("span",{"aria-hidden":"true",className:P("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}),c.jsx("span",{"aria-hidden":"true",className:P("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:c.jsx(fa,{className:"animate-spin"})})]}):r?c.jsx(fa,{className:"animate-spin","aria-hidden":"true"}):null;return c.jsx("button",{ref:p,className:P(Tl({variant:t,size:n}),a==="center"&&"aspect-square p-0",l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...d,children:a==="center"?u:c.jsxs(c.Fragment,{children:[a==="left"&&u,i,a==="right"&&u]})})});Sn.displayName="Button";const Pl=ye(["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"}}),Jm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},_l=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>{const s=Jm[n??"md"];return c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[c.jsx("input",{type:"checkbox",ref:a,className:P(Pl({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...o}),c.jsx(nn,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",s)}),c.jsx(nl,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",s)})]})});_l.displayName="Checkbox";var Ol=1,ev=.9,tv=.8,nv=.17,xa=.1,Ca=.999,rv=.9999,ov=.99,av=/[\\\/_+.#"@\[\(\{&]/,sv=/[\\\/_+.#"@\[\(\{&]/g,iv=/[\s-]/,Il=/[\s-]/g;function Sa(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Ol:ov;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),p=0,u,h,g,w;d>=0;)u=Sa(e,t,n,r,d+1,a+1,s),u>p&&(d===o?u*=Ol:av.test(e.charAt(d-1))?(u*=tv,g=e.slice(o,d-1).match(sv),g&&o>0&&(u*=Math.pow(Ca,g.length))):iv.test(e.charAt(d-1))?(u*=ev,w=e.slice(o,d-1).match(Il),w&&o>0&&(u*=Math.pow(Ca,w.length))):(u*=nv,o>0&&(u*=Math.pow(Ca,d-o))),e.charAt(d)!==t.charAt(a)&&(u*=rv)),(u<xa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(h=Sa(e,t,n,r,d+1,a+2,s),h*xa>u&&(u=h*xa)),u>p&&(p=u),d=n.indexOf(l,d+1);return s[i]=p,p}function Al(e){return e.toLowerCase().replace(Il," ")}function lv(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Sa(e,t,Al(e),Al(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 cv(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 dv="DismissableLayer",Na="dismissableLayer.update",uv="dismissableLayer.pointerDownOutside",fv="dismissableLayer.focusOutside",Fl,Wl=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,d=f.useContext(Wl),[p,u]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>u(k)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=p?m.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=y>=b,M=gv(k=>{const D=k.target,E=[...d.branches].some(I=>I.contains(D));!N||E||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=mv(k=>{const D=k.target;[...d.branches].some(I=>I.contains(D))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return cv(k=>{y===d.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Fl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),$l(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fl)}},[p,h,n,d]),f.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),$l())},[p,d]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(Na,k),()=>document.removeEventListener(Na,k)},[]),c.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)})});Nn.displayName=dv;var pv="DismissableLayerBranch",hv=f.forwardRef((e,t)=>{const n=f.useContext(Wl),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]),c.jsx(ne.div,{...e,ref:o})});hv.displayName=pv;function gv(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(){zl(uv,n,d,{discrete:!0})};const d={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 mv(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&&zl(fv,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 $l(){const e=new CustomEvent(Na);document.dispatchEvent(e)}function zl(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?$i(o,a):o.dispatchEvent(a)}var ka="focusScope.autoFocusOnMount",Ma="focusScope.autoFocusOnUnmount",Bl={bubbles:!1,cancelable:!0},vv="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),d=ot(o),p=ot(a),u=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)?u.current=N:Lt(u.current,{select:!0})},v=function(x){if(g.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||Lt(u.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&Lt(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){Vl.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(ka,Bl);i.addEventListener(ka,d),i.dispatchEvent(b),b.defaultPrevented||(bv(Sv(Ll(i)),{select:!0}),document.activeElement===m&&Lt(i))}return()=>{i.removeEventListener(ka,d),setTimeout(()=>{const b=new CustomEvent(Ma,Bl);i.addEventListener(Ma,p),i.dispatchEvent(b),b.defaultPrevented||Lt(m??document.body,{select:!0}),i.removeEventListener(Ma,p),Vl.remove(g)},0)}}},[i,d,p,g]);const w=f.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const y=m.currentTarget,[x,N]=yv(y);x&&N?!m.shiftKey&&b===N?(m.preventDefault(),n&&Lt(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&Lt(N,{select:!0})):b===y&&m.preventDefault()}},[n,r,g.paused]);return c.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=vv;function bv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function yv(e){const t=Ll(e),n=Hl(t,e),r=Hl(t.reverse(),e);return[n,r]}function Ll(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 Hl(e,t){for(const n of e)if(!wv(n,{upTo:t}))return n}function wv(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 xv(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xv(e)&&t&&e.select()}}var Vl=Cv();function Cv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yl(e,t),e.unshift(t)},remove(t){var n;e=Yl(e,t),(n=e[0])==null||n.resume()}}}function Yl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Sv(e){return e.filter(t=>t.tagName!=="A")}var Nv="Portal",kn=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?oa.createPortal(c.jsx(ne.div,{...r,ref:t}),s):null});kn.displayName=Nv;var Da=0;function eo(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gl()),document.body.insertAdjacentElement("beforeend",e[1]??Gl()),Da++,()=>{Da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Da--}},[])}function Gl(){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 jl(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 kv(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 to="right-scroll-bar-position",no="width-before-scroll-bar",Mv="with-scroll-bars-hidden",Dv="--removed-body-scroll-bar-size";function Ea(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ev(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 Tv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ul=new WeakMap;function Pv(e,t){var n=Ev(null,function(r){return e.forEach(function(o){return Ea(o,r)})});return Tv(function(){var r=Ul.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Ea(i,null)}),a.forEach(function(i){o.has(i)||Ea(i,s)})}Ul.set(n,e)},[e]),n}function _v(e){return e}function Ov(e,t){t===void 0&&(t=_v);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)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(p){s.push(p),d()},filter:function(p){return s=s.filter(p),n}}}};return o}function Iv(e){e===void 0&&(e={});var t=Ov(null);return t.options=vt({async:!0,ssr:!1},e),t}var Rl=function(e){var t=e.sideCar,n=jl(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))};Rl.isSideCarExport=!0;function Av(e,t){return e.useMedium(t),Rl}var Kl=Iv(),Ta=function(){},ro=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ta,onWheelCapture:Ta,onTouchMoveCapture:Ta}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,d=e.removeScrollBar,p=e.enabled,u=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,N=jl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=Pv([n,t]),k=vt(vt({},N),o);return f.createElement(f.Fragment,null,p&&f.createElement(M,{sideCar:Kl,removeScrollBar:d,shards:u,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(y,vt({},k,{className:l,ref:C}),i))});ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ro.classNames={fullWidth:no,zeroRight:to};var Fv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fv();return t&&e.setAttribute("nonce",t),e}function $v(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wv())&&($v(t,n),zv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lv=function(){var e=Bv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ql=function(){var e=Lv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Hv={left:0,top:0,right:0,gap:0},Pa=function(e){return parseInt(e||"",10)||0},Vv=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[Pa(n),Pa(r),Pa(o)]},Yv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Hv;var t=Vv(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])}},Gv=ql(),Mn="data-scroll-locked",jv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
162
|
-
.`.concat(
|
|
161
|
+
*/const Dt=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function pl(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=pl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function hl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pl(e))&&(r&&(r+=" "),r+=t);return r}const gl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ml=hl,be=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ml(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const p=n==null?void 0:n[d],u=a==null?void 0:a[d];if(p===null)return null;const h=gl(p)||gl(u);return o[d][h]}),i=n&&Object.entries(n).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:u,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})?[...d,u,h]:d},[]);return ml(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},va="-",ym=e=>{const t=xm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(va);return i[0]===""&&i.length!==1&&i.shift(),vl(i,t)||wm(s)},getConflictingClassGroupIds:(s,i)=>{const c=n[s]||[];return i&&r[s]?[...c,...r[s]]:c}}},vl=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?vl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(va);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},bl=/^\[(.+)\]$/,wm=e=>{if(bl.test(e)){const t=bl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Nm(Object.entries(e.classGroups),n).forEach(([a,s])=>{ba(s,r,a,t)}),r},ba=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:yl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Cm(o)){ba(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{ba(s,yl(t,a),n,r)})})},yl=(e,t)=>{let n=e;return t.split(va).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Cm=e=>e.isThemeGetter,Nm=(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,Sm=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)}}},wl="!",km=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const c=[];let d=0,p=0,u;for(let v=0;v<i.length;v++){let b=i[v];if(d===0){if(b===o&&(r||i.slice(v,v+a)===t)){c.push(i.slice(p,v)),p=v+a;continue}if(b==="/"){u=v;continue}}b==="["?d++:b==="]"&&d--}const h=c.length===0?i:i.substring(p),g=h.startsWith(wl),w=g?h.substring(1):h,m=u&&u>p?u-p:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},Mm=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},Dm=e=>({cache:Sm(e.cacheSize),parseClassName:km(e),...ym(e)}),Em=/\s+/,Tm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Em);let i="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{modifiers:p,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:g}=n(d);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=d+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=d+(i.length>0?" "+i:i);continue}w=!1}const v=Mm(p).join(":"),b=u?v+wl:v,y=b+m;if(a.includes(y))continue;a.push(y);const x=o(m,w);for(let S=0;S<x.length;++S){const D=x[S];a.push(b+D)}i=d+(i.length>0?" "+i:i)}return i};function Pm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=xl(t))&&(r&&(r+=" "),r+=n);return r}const xl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xl(e[r]))&&(n&&(n+=" "),n+=t);return n};function _m(e,...t){let n,r,o,a=s;function s(c){const d=t.reduce((p,u)=>u(p),e());return n=Dm(d),r=n.cache.get,o=n.cache.set,a=i,i(c)}function i(c){const d=r(c);if(d)return d;const p=Tm(c,n);return o(c,p),p}return function(){return a(Pm.apply(null,arguments))}}const ye=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Cl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Om=/^\d+\/\d+$/,Im=new Set(["px","full","screen"]),Am=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fm=/\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$/,Wm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$m=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Et=e=>xn(e)||Im.has(e)||Om.test(e),zt=e=>Cn(e,"length",Um),xn=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>Cn(e,"number",xn),nr=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&xn(e.slice(0,-1)),le=e=>Cl.test(e),Bt=e=>Am.test(e),Lm=new Set(["length","size","percentage"]),Hm=e=>Cn(e,Lm,Nl),Vm=e=>Cn(e,"position",Nl),Ym=new Set(["image","url"]),Gm=e=>Cn(e,Ym,Rm),jm=e=>Cn(e,"",Km),rr=()=>!0,Cn=(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},Um=e=>Fm.test(e)&&!Wm.test(e),Nl=()=>!1,Km=e=>$m.test(e),Rm=e=>zm.test(e),qm=_m(()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),a=ye("borderRadius"),s=ye("borderSpacing"),i=ye("borderWidth"),c=ye("contrast"),d=ye("grayscale"),p=ye("hueRotate"),u=ye("invert"),h=ye("gap"),g=ye("gradientColorStops"),w=ye("gradientColorStopPositions"),m=ye("inset"),v=ye("margin"),b=ye("opacity"),y=ye("padding"),x=ye("saturate"),S=ye("scale"),D=ye("sepia"),C=ye("skew"),k=ye("space"),E=ye("translate"),T=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",le,t],B=()=>[le,t],q=()=>["",Et,zt],Y=()=>["auto",xn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],R=()=>["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"],A=()=>["","0",le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[xn,le];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[Et,zt],blur:["none","",Bt,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Bt,le],borderSpacing:B(),borderWidth:q(),contrast:oe(),grayscale:A(),hueRotate:oe(),invert:A(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[Bm,zt],inset:K(),margin:K(),opacity:oe(),padding:B(),saturate:oe(),scale:oe(),sepia:A(),skew:oe(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Bt]}],"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:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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:K()}],"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:A()}],shrink:[{shrink:A()}],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:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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:[Bt]},Bt]}],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",Bt,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ya]}],"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",xn,ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Et,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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Et,zt]}],"underline-offset":[{"underline-offset":["auto",Et,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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),Vm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gm]}],"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":[b]}],"border-style":[{border:[...z(),"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":[b]}],"divide-style":[{divide:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[Et,le]}],"outline-w":[{outline:[Et,zt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Et,zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bt,jm]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Bt,le]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[u]}],saturate:[{saturate:[x]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"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:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[nr,le]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"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:[Et,zt,ya]}],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 P(...e){return qm(hl(e))}const Sl=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"}}),kl=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"}}),Ml=be("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),wa=f.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(jg,{ref:r,className:P(Ml({variant:t}),e),...n}));wa.displayName="AccordionRoot";const xa=f.forwardRef(({className:e,...t},n)=>l.jsx(Ug,{ref:n,className:P("border-b border-border last:border-b-0",e),...t}));xa.displayName="AccordionItem";const Ca=f.forwardRef(({className:e,size:t,children:n,...r},o)=>l.jsx(Kg,{className:"flex",children:l.jsxs(Rg,{ref:o,className:P("group",Sl({size:t}),"px-4",e),...r,children:[n,l.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));Ca.displayName="AccordionTrigger";const Na=f.forwardRef(({className:e,size:t,children:n,...r},o)=>l.jsx(qg,{ref:o,className:P(kl({size:t}),e),...r,children:l.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));Na.displayName="AccordionContent";const Dl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:c,disabled:d,dir:p},u)=>l.jsx(wa,{ref:u,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:c,disabled:d,dir:p,children:e.map(h=>l.jsxs(xa,{value:h.value,children:[l.jsx(Ca,{size:t,disabled:h.disabled,children:h.trigger}),l.jsx(Na,{size:t,children:h.content})]},h.value))}));Dl.displayName="Accordion";const Sa=f.createContext({size:"md"}),El=be(["relative w-full rounded-lg border flex","[&>svg]:shrink-0 [&>svg]:size-4 [&>svg]:mt-0.5"],{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"},size:{md:"p-4",sm:"p-3"}},defaultVariants:{variant:"default",size:"md"}});function Xm(e){if(!f.isValidElement(e))return!1;const t=e.type;return t.displayName==="AlertTitle"||t.displayName==="AlertDescription"}function Zm(e){const t=f.Children.toArray(e);let n=null;const r=[];for(const o of t)!n&&!Xm(o)&&f.isValidElement(o)?n=o:r.push(o);return{icon:n,content:r}}const Tl=f.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>{const{icon:s,content:i}=Zm(r),c=s!=null,d=n??"md";return l.jsx(Sa,{value:{size:d},children:l.jsx("div",{ref:a,role:"alert","data-size":d,className:P(El({variant:t,size:d}),c?P("flex-row items-start",d==="sm"?"gap-2":"gap-2.5"):"flex-col",e),...o,children:c?l.jsxs(l.Fragment,{children:[s,l.jsx("div",{className:"min-w-0 flex-1",children:i})]}):r})})});Tl.displayName="Alert";const Qm=be("mb-1 font-medium leading-none tracking-tight text-balance",{variants:{size:{md:"",sm:"text-sm"}},defaultVariants:{size:"md"}}),Pl=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(Sa);return l.jsx("h5",{ref:n,className:P(Qm({size:r}),e),...t})});Pl.displayName="AlertTitle";const Jm=be("leading-relaxed opacity-90 text-pretty",{variants:{size:{md:"text-sm",sm:"text-xs"}},defaultVariants:{size:"md"}}),_l=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(Sa);return l.jsx("p",{ref:n,className:P(Jm({size:r}),e),...t})});_l.displayName="AlertDescription";var ev=Symbol.for("react.lazy"),to=f[" use ".trim().toString()];function tv(e){return typeof e=="object"&&e!==null&&"then"in e}function Ol(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ev&&"_payload"in e&&tv(e._payload)}function nv(e){const t=rv(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;Ol(a)&&typeof to=="function"&&(a=to(a._payload));const i=f.Children.toArray(a),c=i.find(av);if(c){const d=c.props.children,p=i.map(u=>u===c?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return l.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return l.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function rv(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(Ol(o)&&typeof to=="function"&&(o=to(o._payload)),f.isValidElement(o)){const s=iv(o),i=sv(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 ov=Symbol("radix.slottable");function av(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ov}function sv(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 c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function iv(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 lv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cv=lv.reduce((e,t)=>{const n=nv(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),dv="AspectRatio",Il=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return l.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:l.jsx(cv.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Il.displayName=dv;var uv=Il;const Al=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>l.jsx(uv,{ref:r,ratio:t,className:P("overflow-hidden",e),...n}));Al.displayName="AspectRatio";const Fl=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 fv(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Wl=f.forwardRef(({className:e,size:t,src:n,alt:r="",fallback:o,...a},s)=>{const[i,c]=f.useState(!1);f.useEffect(()=>{c(!1)},[n]);const d=o??(r?fv(r):null),p=n&&!i;return l.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:P(Fl({size:t}),e),...a,children:p?l.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>c(!0)}):l.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:d??"?"})})});Wl.displayName="Avatar";const $l=be("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"}}),zl=f.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("span",{ref:r,className:P($l({variant:t}),e),...n}));zl.displayName="Badge";const Bl=be(["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"}}),Nn=f.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:c=!1,...d},p)=>{const u=o?l.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[l.jsx("span",{"aria-hidden":"true",className:P("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}),l.jsx("span",{"aria-hidden":"true",className:P("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:l.jsx(ma,{className:"animate-spin"})})]}):r?l.jsx(ma,{className:"animate-spin","aria-hidden":"true"}):null;return l.jsx("button",{ref:p,className:P(Bl({variant:t,size:n}),a==="center"&&"aspect-square p-0",c&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...d,children:a==="center"?u:l.jsxs(l.Fragment,{children:[a==="left"&&u,i,a==="right"&&u]})})});Nn.displayName="Button";const Ll=be(["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"}}),pv={sm:"size-2.5",md:"size-3",lg:"size-3.5"},Hl=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>{const s=pv[n??"md"];return l.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[l.jsx("input",{type:"checkbox",ref:a,className:P(Ll({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...o}),l.jsx(nn,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",s)}),l.jsx(fl,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",s)})]})});Hl.displayName="Checkbox";var Vl=1,hv=.9,gv=.8,mv=.17,ka=.1,Ma=.999,vv=.9999,bv=.99,yv=/[\\\/_+.#"@\[\(\{&]/,wv=/[\\\/_+.#"@\[\(\{&]/g,xv=/[\s-]/,Yl=/[\s-]/g;function Da(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Vl:bv;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var c=r.charAt(a),d=n.indexOf(c,o),p=0,u,h,g,w;d>=0;)u=Da(e,t,n,r,d+1,a+1,s),u>p&&(d===o?u*=Vl:yv.test(e.charAt(d-1))?(u*=gv,g=e.slice(o,d-1).match(wv),g&&o>0&&(u*=Math.pow(Ma,g.length))):xv.test(e.charAt(d-1))?(u*=hv,w=e.slice(o,d-1).match(Yl),w&&o>0&&(u*=Math.pow(Ma,w.length))):(u*=mv,o>0&&(u*=Math.pow(Ma,d-o))),e.charAt(d)!==t.charAt(a)&&(u*=vv)),(u<ka&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(h=Da(e,t,n,r,d+1,a+2,s),h*ka>u&&(u=h*ka)),u>p&&(p=u),d=n.indexOf(c,d+1);return s[i]=p,p}function Gl(e){return e.toLowerCase().replace(Yl," ")}function Cv(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Da(e,t,Gl(e),Gl(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 Nv(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 Sv="DismissableLayer",Ea="dismissableLayer.update",kv="dismissableLayer.pointerDownOutside",Mv="dismissableLayer.focusOutside",jl,Ul=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=f.useContext(Ul),[p,u]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>u(k)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=p?m.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=y>=b,D=Tv(k=>{const E=k.target,T=[...d.branches].some(I=>I.contains(E));!S||T||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=Pv(k=>{const E=k.target;[...d.branches].some(I=>I.contains(E))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return Nv(k=>{y===d.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Kl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jl)}},[p,h,n,d]),f.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Kl())},[p,d]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(Ea,k),()=>document.removeEventListener(Ea,k)},[]),l.jsx(ne.div,{...c,ref:w,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,C.onFocusCapture),onBlurCapture:j(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,D.onPointerDownCapture)})});Sn.displayName=Sv;var Dv="DismissableLayerBranch",Ev=f.forwardRef((e,t)=>{const n=f.useContext(Ul),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]),l.jsx(ne.div,{...e,ref:o})});Ev.displayName=Dv;function Tv(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 c=function(){Rl(kv,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 Pv(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&&Rl(Mv,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 Kl(){const e=new CustomEvent(Ea);document.dispatchEvent(e)}function Rl(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?Ki(o,a):o.dispatchEvent(a)}var Ta="focusScope.autoFocusOnMount",Pa="focusScope.autoFocusOnUnmount",ql={bubbles:!1,cancelable:!0},_v="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=f.useState(null),d=ot(o),p=ot(a),u=f.useRef(null),h=he(t,m=>c(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 S=x.target;i.contains(S)?u.current=S:Lt(u.current,{select:!0})},v=function(x){if(g.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Lt(u.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const D of x)D.removedNodes.length>0&&Lt(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){Ql.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(Ta,ql);i.addEventListener(Ta,d),i.dispatchEvent(b),b.defaultPrevented||(Ov($v(Xl(i)),{select:!0}),document.activeElement===m&&Lt(i))}return()=>{i.removeEventListener(Ta,d),setTimeout(()=>{const b=new CustomEvent(Pa,ql);i.addEventListener(Pa,p),i.dispatchEvent(b),b.defaultPrevented||Lt(m??document.body,{select:!0}),i.removeEventListener(Pa,p),Ql.remove(g)},0)}}},[i,d,p,g]);const w=f.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const y=m.currentTarget,[x,S]=Iv(y);x&&S?!m.shiftKey&&b===S?(m.preventDefault(),n&&Lt(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&Lt(S,{select:!0})):b===y&&m.preventDefault()}},[n,r,g.paused]);return l.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=_v;function Ov(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function Iv(e){const t=Xl(e),n=Zl(t,e),r=Zl(t.reverse(),e);return[n,r]}function Xl(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 Zl(e,t){for(const n of e)if(!Av(n,{upTo:t}))return n}function Av(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 Fv(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Fv(e)&&t&&e.select()}}var Ql=Wv();function Wv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jl(e,t),e.unshift(t)},remove(t){var n;e=Jl(e,t),(n=e[0])==null||n.resume()}}}function Jl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $v(e){return e.filter(t=>t.tagName!=="A")}var zv="Portal",kn=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?la.createPortal(l.jsx(ne.div,{...r,ref:t}),s):null});kn.displayName=zv;var _a=0;function no(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ec()),document.body.insertAdjacentElement("beforeend",e[1]??ec()),_a++,()=>{_a===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_a--}},[])}function ec(){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 tc(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 Bv(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 ro="right-scroll-bar-position",oo="width-before-scroll-bar",Lv="with-scroll-bars-hidden",Hv="--removed-body-scroll-bar-size";function Oa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vv(e,t){var n=N.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 Yv=typeof window<"u"?f.useLayoutEffect:f.useEffect,nc=new WeakMap;function Gv(e,t){var n=Vv(null,function(r){return e.forEach(function(o){return Oa(o,r)})});return Yv(function(){var r=nc.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Oa(i,null)}),a.forEach(function(i){o.has(i)||Oa(i,s)})}nc.set(n,e)},[e]),n}function jv(e){return e}function Uv(e,t){t===void 0&&(t=jv);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 c=function(){var p=s;s=[],p.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(p){s.push(p),d()},filter:function(p){return s=s.filter(p),n}}}};return o}function Kv(e){e===void 0&&(e={});var t=Uv(null);return t.options=vt({async:!0,ssr:!1},e),t}var rc=function(e){var t=e.sideCar,n=tc(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))};rc.isSideCarExport=!0;function Rv(e,t){return e.useMedium(t),rc}var oc=Kv(),Ia=function(){},ao=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ia,onWheelCapture:Ia,onTouchMoveCapture:Ia}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,p=e.enabled,u=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,S=tc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=h,C=Gv([n,t]),k=vt(vt({},S),o);return f.createElement(f.Fragment,null,p&&f.createElement(D,{sideCar:oc,removeScrollBar:d,shards:u,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(y,vt({},k,{className:c,ref:C}),i))});ao.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ao.classNames={fullWidth:oo,zeroRight:ro};var qv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qv();return t&&e.setAttribute("nonce",t),e}function Zv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xv())&&(Zv(t,n),Qv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eb=function(){var e=Jv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ac=function(){var e=eb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tb={left:0,top:0,right:0,gap:0},Aa=function(e){return parseInt(e||"",10)||0},nb=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[Aa(n),Aa(r),Aa(o)]},rb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tb;var t=nb(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])}},ob=ac(),Mn="data-scroll-locked",ab=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
162
|
+
.`.concat(Lv,` {
|
|
163
163
|
overflow: hidden `).concat(r,`;
|
|
164
164
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
165
165
|
}
|
|
@@ -176,30 +176,30 @@
|
|
|
176
176
|
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.`).concat(
|
|
179
|
+
.`).concat(ro,` {
|
|
180
180
|
right: `).concat(i,"px ").concat(r,`;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.`).concat(
|
|
183
|
+
.`).concat(oo,` {
|
|
184
184
|
margin-right: `).concat(i,"px ").concat(r,`;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.`).concat(
|
|
187
|
+
.`).concat(ro," .").concat(ro,` {
|
|
188
188
|
right: 0 `).concat(r,`;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
.`).concat(
|
|
191
|
+
.`).concat(oo," .").concat(oo,` {
|
|
192
192
|
margin-right: 0 `).concat(r,`;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
body[`).concat(Mn,`] {
|
|
196
|
-
`).concat(
|
|
196
|
+
`).concat(Hv,": ").concat(i,`px;
|
|
197
197
|
}
|
|
198
|
-
`)},
|
|
198
|
+
`)},sc=function(){var e=parseInt(document.body.getAttribute(Mn)||"0",10);return isFinite(e)?e:0},sb=function(){f.useEffect(function(){return document.body.setAttribute(Mn,(sc()+1).toString()),function(){var e=sc()-1;e<=0?document.body.removeAttribute(Mn):document.body.setAttribute(Mn,e.toString())}},[])},ib=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;sb();var a=f.useMemo(function(){return rb(o)},[o]);return f.createElement(ob,{styles:ab(a,!t,o,n?"":"!important")})},Fa=!1;if(typeof window<"u")try{var so=Object.defineProperty({},"passive",{get:function(){return Fa=!0,!0}});window.addEventListener("test",so,so),window.removeEventListener("test",so,so)}catch{Fa=!1}var Dn=Fa?{passive:!1}:!1,lb=function(e){return e.tagName==="TEXTAREA"},ic=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lb(e)&&n[t]==="visible")},cb=function(e){return ic(e,"overflowY")},db=function(e){return ic(e,"overflowX")},lc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=cc(e,r);if(o){var a=dc(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ub=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fb=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cc=function(e,t){return e==="v"?cb(t):db(t)},dc=function(e,t){return e==="v"?ub(t):fb(t)},pb=function(e,t){return e==="h"&&t==="rtl"?-1:1},hb=function(e,t,n,r,o){var a=pb(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,c=t.contains(i),d=!1,p=s>0,u=0,h=0;do{if(!i)break;var g=dc(e,i),w=g[0],m=g[1],v=g[2],b=m-v-a*w;(w||b)&&cc(e,i)&&(u+=b,h+=w);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(p&&Math.abs(u)<1||!p&&Math.abs(h)<1)&&(d=!0),d},io=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uc=function(e){return[e.deltaX,e.deltaY]},fc=function(e){return e&&"current"in e?e.current:e},gb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mb=function(e){return`
|
|
199
199
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
200
200
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
201
|
-
`)},
|
|
201
|
+
`)},vb=0,En=[];function bb(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(vb++)[0],a=f.useState(ac)[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=Bv([e.lockRef.current],(e.shards||[]).map(fc),!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 b=io(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-b[0],S="deltaY"in m?m.deltaY:y[1]-b[1],D,C=m.target,k=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&k==="h"&&C.type==="range")return!1;var E=window.getSelection(),T=E&&E.anchorNode,I=T?T===C||T.contains(C):!1;if(I)return!1;var K=lc(k,C);if(!K)return!0;if(K?D=k:(D=k==="v"?"h":"v",K=lc(k,C)),!K)return!1;if(!r.current&&"changedTouches"in m&&(x||S)&&(r.current=D),!D)return!0;var B=r.current||D;return hb(B,v,m,B==="h"?x:S)},[]),c=f.useCallback(function(m){var v=m;if(!(!En.length||En[En.length-1]!==a)){var b="deltaY"in v?uc(v):io(v),y=t.current.filter(function(D){return D.name===v.type&&(D.target===v.target||v.target===D.shadowParent)&&gb(D.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(fc).filter(Boolean).filter(function(D){return D.contains(v.target)}),S=x.length>0?i(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),d=f.useCallback(function(m,v,b,y){var x={name:m,delta:v,target:b,should:y,shadowParent:yb(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),p=f.useCallback(function(m){n.current=io(m),r.current=void 0},[]),u=f.useCallback(function(m){d(m.type,uc(m),m.target,i(m,e.lockRef.current))},[]),h=f.useCallback(function(m){d(m.type,io(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return En.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Dn),document.addEventListener("touchmove",c,Dn),document.addEventListener("touchstart",p,Dn),function(){En=En.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Dn),document.removeEventListener("touchmove",c,Dn),document.removeEventListener("touchstart",p,Dn)}},[]);var g=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(a,{styles:mb(o)}):null,g?f.createElement(ib,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wb=Rv(oc,bb);var ar=f.forwardRef(function(e,t){return f.createElement(ao,vt({},e,{ref:t,sideCar:wb}))});ar.classNames=ao.classNames;var xb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tn=new WeakMap,lo=new WeakMap,co={},Wa=0,pc=function(e){return e&&(e.host||pc(e.parentNode))},Cb=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pc(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})},Nb=function(e,t,n,r){var o=Cb(t,Array.isArray(e)?e:[e]);co[n]||(co[n]=new WeakMap);var a=co[n],s=[],i=new Set,c=new Set(o),d=function(u){!u||i.has(u)||(i.add(u),d(u.parentNode))};o.forEach(d);var p=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(h){if(i.has(h))p(h);else try{var g=h.getAttribute(r),w=g!==null&&g!=="false",m=(Tn.get(h)||0)+1,v=(a.get(h)||0)+1;Tn.set(h,m),a.set(h,v),s.push(h),m===1&&w&&lo.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return p(t),i.clear(),Wa++,function(){s.forEach(function(u){var h=Tn.get(u)-1,g=a.get(u)-1;Tn.set(u,h),a.set(u,g),h||(lo.has(u)||u.removeAttribute(r),lo.delete(u)),g||u.removeAttribute(n)}),Wa--,Wa||(Tn=new WeakMap,Tn=new WeakMap,lo=new WeakMap,co={})}},uo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xb(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Nb(r,o,n,"aria-hidden")):function(){return null}},fo="Dialog",[hc]=Ze(fo),[Sb,at]=hc(fo),gc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),c=f.useRef(null),[d,p]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:fo});return l.jsx(Sb,{scope:t,triggerRef:i,contentRef:c,contentId:Ce(),titleId:Ce(),descriptionId:Ce(),open:d,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(u=>!u),[p]),modal:s,children:n})};gc.displayName=fo;var mc="DialogTrigger",vc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(mc,n),a=he(t,o.triggerRef);return l.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ba(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)})});vc.displayName=mc;var $a="DialogPortal",[kb,bc]=hc($a,{forceMount:void 0}),yc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=at($a,t);return l.jsx(kb,{scope:t,forceMount:n,children:f.Children.map(r,s=>l.jsx(ze,{present:n||a.open,children:l.jsx(kn,{asChild:!0,container:o,children:s})}))})};yc.displayName=$a;var po="DialogOverlay",wc=f.forwardRef((e,t)=>{const n=bc(po,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(po,e.__scopeDialog);return a.modal?l.jsx(ze,{present:r||a.open,children:l.jsx(Db,{...o,ref:t})}):null});wc.displayName=po;var Mb=tn("DialogOverlay.RemoveScroll"),Db=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(po,n);return l.jsx(ar,{as:Mb,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(ne.div,{"data-state":Ba(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rn="DialogContent",xc=f.forwardRef((e,t)=>{const n=bc(rn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(rn,e.__scopeDialog);return l.jsx(ze,{present:r||a.open,children:a.modal?l.jsx(Eb,{...o,ref:t}):l.jsx(Tb,{...o,ref:t})})});xc.displayName=rn;var Eb=f.forwardRef((e,t)=>{const n=at(rn,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return uo(a)},[]),l.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())})}),Tb=f.forwardRef((e,t)=>{const n=at(rn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return l.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 c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.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(rn,n),c=f.useRef(null),d=he(t,c);return no(),l.jsxs(l.Fragment,{children:[l.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Sn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Ba(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Pb,{titleId:i.titleId}),l.jsx(Ob,{contentRef:c,descriptionId:i.descriptionId})]})]})}),za="DialogTitle",Nc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(za,n);return l.jsx(ne.h2,{id:o.titleId,...r,ref:t})});Nc.displayName=za;var Sc="DialogDescription",kc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Sc,n);return l.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});kc.displayName=Sc;var Mc="DialogClose",Dc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Mc,n);return l.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});Dc.displayName=Mc;function Ba(e){return e?"open":"closed"}var Ec="DialogTitleWarning",[Vk,Tc]=pg(Ec,{contentName:rn,titleName:za,docsSlug:"dialog"}),Pb=({titleId:e})=>{const t=Tc(Ec),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
202
202
|
|
|
203
203
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
204
204
|
|
|
205
|
-
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},vb="DialogDescriptionWarning",bb=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yc(vb).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},wc=ac,yb=ic,xc=cc,Wa=dc,$a=uc,Cc=pc,Sc=gc,wb=vc,sr='[cmdk-group=""]',za='[cmdk-group-items=""]',xb='[cmdk-group-heading=""]',Nc='[cmdk-item=""]',kc=`${Nc}:not([aria-disabled="true"])`,Ba="cmdk-item-select",Pn="data-value",Cb=(e,t,n)=>lv(e,t,n),Mc=f.createContext(void 0),ir=()=>f.useContext(Mc),Dc=f.createContext(void 0),La=()=>f.useContext(Dc),Ec=f.createContext(void 0),lr=f.forwardRef((e,t)=>{let n=_n(()=>{var O,F;return{search:"",value:(F=(O=e.value)!=null?O:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=_n(()=>new Set),o=_n(()=>new Map),a=_n(()=>new Map),s=_n(()=>new Set),i=_c(e),{label:l,children:d,value:p,onValueChange:u,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...b}=e,y=Ce(),x=Ce(),N=Ce(),M=f.useRef(null),C=Db();on(()=>{if(p!==void 0){let O=p.trim();n.current.value=O,k.emit()}},[p]),on(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,F,V)=>{var $,Z,W,U;if(!Object.is(n.current[O],F)){if(n.current[O]=F,O==="search")B(),I(),C(1,R);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(N);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.emit()}),V||C(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let X=F??"";(U=(W=i.current).onValueChange)==null||U.call(W,X);return}}k.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),D=f.useMemo(()=>({value:(O,F,V)=>{var $;F!==(($=a.current.get(O))==null?void 0:$.value)&&(a.current.set(O,{value:F,keywords:V}),n.current.filtered.items.set(O,E(F,V)),C(2,()=>{I(),k.emit()}))},item:(O,F)=>(r.current.add(O),F&&(o.current.has(F)?o.current.get(F).add(O):o.current.set(F,new Set([O]))),C(3,()=>{B(),I(),n.current.value||R(),k.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let V=Y();C(4,()=>{B(),(V==null?void 0:V.getAttribute("id"))===O&&R(),k.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:N,labelId:x,listInnerRef:M}),[]);function E(O,F){var V,$;let Z=($=(V=i.current)==null?void 0:V.filter)!=null?$:Cb;return O?Z(O,n.current.search,F):0}function I(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,F=[];n.current.filtered.groups.forEach($=>{let Z=o.current.get($),W=0;Z.forEach(U=>{let X=O.get(U);W=Math.max(X,W)}),F.push([$,W])});let V=M.current;ae().sort(($,Z)=>{var W,U;let X=$.getAttribute("id"),se=Z.getAttribute("id");return((W=O.get(se))!=null?W:0)-((U=O.get(X))!=null?U:0)}).forEach($=>{let Z=$.closest(za);Z?Z.appendChild($.parentElement===Z?$:$.closest(`${za} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${za} > *`))}),F.sort(($,Z)=>Z[1]-$[1]).forEach($=>{var Z;let W=(Z=M.current)==null?void 0:Z.querySelector(`${sr}[${Pn}="${encodeURIComponent($[0])}"]`);W==null||W.parentElement.appendChild(W)})}function R(){let O=ae().find(V=>V.getAttribute("aria-disabled")!=="true"),F=O==null?void 0:O.getAttribute(Pn);k.setState("value",F||void 0)}function B(){var O,F,V,$;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 W of r.current){let U=(F=(O=a.current.get(W))==null?void 0:O.value)!=null?F:"",X=($=(V=a.current.get(W))==null?void 0:V.keywords)!=null?$:[],se=E(U,X);n.current.filtered.items.set(W,se),se>0&&Z++}for(let[W,U]of o.current)for(let X of U)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Z}function q(){var O,F,V;let $=Y();$&&(((O=$.parentElement)==null?void 0:O.firstChild)===$&&((V=(F=$.closest(sr))==null?void 0:F.querySelector(xb))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var O;return(O=M.current)==null?void 0:O.querySelector(`${Nc}[aria-selected="true"]`)}function ae(){var O;return Array.from(((O=M.current)==null?void 0:O.querySelectorAll(kc))||[])}function z(O){let F=ae()[O];F&&k.setState("value",F.getAttribute(Pn))}function K(O){var F;let V=Y(),$=ae(),Z=$.findIndex(U=>U===V),W=$[Z+O];(F=i.current)!=null&&F.loop&&(W=Z+O<0?$[$.length-1]:Z+O===$.length?$[0]:$[Z+O]),W&&k.setState("value",W.getAttribute(Pn))}function G(O){let F=Y(),V=F==null?void 0:F.closest(sr),$;for(;V&&!$;)V=O>0?kb(V,sr):Mb(V,sr),$=V==null?void 0:V.querySelector(kc);$?k.setState("value",$.getAttribute(Pn)):K(O)}let A=()=>z(ae().length-1),Q=O=>{O.preventDefault(),O.metaKey?A():O.altKey?G(1):K(1)},oe=O=>{O.preventDefault(),O.metaKey?z(0):O.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var F;(F=b.onKeyDown)==null||F.call(b,O);let V=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||V))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&Q(O);break}case"ArrowDown":{Q(O);break}case"p":case"k":{v&&O.ctrlKey&&oe(O);break}case"ArrowUp":{oe(O);break}case"Home":{O.preventDefault(),z(0);break}case"End":{O.preventDefault(),A();break}case"Enter":{O.preventDefault();let $=Y();if($){let Z=new Event(Ba);$.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:Tb},l),mo(e,O=>f.createElement(Dc.Provider,{value:k},f.createElement(Mc.Provider,{value:D},O))))}),fo=f.forwardRef((e,t)=>{var n,r;let o=Ce(),a=f.useRef(null),s=f.useContext(Ec),i=ir(),l=_c(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;on(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let p=Oc(o,a,[e.value,e.children,a],e.keywords),u=La(),h=Ht(C=>C.value&&C.value===p.current),g=Ht(C=>d||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(Ba,w),()=>C.removeEventListener(Ba,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(){u.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:b,onSelect:y,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)}),Tc=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=Ce(),i=f.useRef(null),l=f.useRef(null),d=Ce(),p=ir(),u=Ht(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);on(()=>p.group(s),[]),Oc(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:u?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),mo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},f.createElement(Ec.Provider,{value:h},g))))}),Pc=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Ht(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),po=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=La(),s=Ht(d=>d.search),i=Ht(d=>d.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:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),ho=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Ht(d=>d.selectedItemId),l=ir();return f.useEffect(()=>{if(s.current&&a.current){let d=s.current,p=a.current,u,h=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let g=d.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(d),()=>{cancelAnimationFrame(u),h.unobserve(d)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},mo(e,d=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),Sb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(wc,{open:n,onOpenChange:r},f.createElement(xc,{container:s},f.createElement(Wa,{"cmdk-overlay":"",className:o}),f.createElement($a,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(lr,{ref:t,...i}))))}),go=f.forwardRef((e,t)=>Ht(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Nb=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},mo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(lr,{List:ho,Item:fo,Input:po,Group:Tc,Separator:Pc,Dialog:Sb,Empty:go,Loading:Nb});function kb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Mb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function _c(e){let t=f.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?f.useEffect:f.useLayoutEffect;function _n(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Ht(e){let t=La(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Oc(e,t,n,r=[]){let o=f.useRef(),a=ir();return on(()=>{var s;let i=(()=>{var d;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Pn,i),o.current=i}),o}var Db=()=>{let[e,t]=f.useState(),n=_n(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Eb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Eb(t),{ref:t.ref},n(t.props.children)):n(t)}var Tb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Pb=["top","right","bottom","left"],Vt=Math.min,Ve=Math.max,vo=Math.round,bo=Math.floor,bt=e=>({x:e,y:e}),_b={left:"right",right:"left",bottom:"top",top:"bottom"};function Ha(e,t,n){return Ve(e,Vt(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Tt(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function Va(e){return e==="x"?"y":"x"}function Ya(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ga(e){return Va(yt(e))}function Ob(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Ga(e),a=Ya(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yo(s)),[s,yo(s)]}function Ib(e){const t=yo(e);return[ja(e),t,ja(t)]}function ja(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ic=["left","right"],Ac=["right","left"],Ab=["top","bottom"],Fb=["bottom","top"];function Wb(e,t,n){switch(e){case"top":case"bottom":return n?t?Ac:Ic:t?Ic:Ac;case"left":case"right":return t?Ab:Fb;default:return[]}}function $b(e,t,n,r){const o=On(e);let a=Wb(Tt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ja)))),a}function yo(e){const t=Tt(e);return _b[t]+e.slice(t.length)}function zb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fc(e){return typeof e!="number"?zb(e):{top:e,right:e,bottom:e,left:e}}function wo(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 Wc(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ga(t),i=Ya(s),l=Tt(t),d=a==="y",p=r.x+r.width/2-o.width/2,u=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:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(On(t)){case"start":g[s]-=h*(n&&d?-1:1);break;case"end":g[s]+=h*(n&&d?-1:1);break}return g}async function Bb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=Et(t,e),w=Fc(g),v=i[h?u==="floating"?"reference":"floating":u],b=wo(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:d,rootBoundary:p,strategy:l})),y=u==="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=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-M.top+w.top)/N.y,bottom:(M.bottom-b.bottom+w.bottom)/N.y,left:(b.left-M.left+w.left)/N.x,right:(M.right-b.right+w.right)/N.x}}const Lb=50,Hb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Bb},l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:u}=Wc(d,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:b,fn:y}=v,{x,y:N,data:M,reset:C}=await y({x:p,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:d,platform:i,elements:{reference:e,floating:t}});p=x??p,u=N??u,w[b]={...w[b],...M},C&&g<Lb&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:u}=Wc(d,h,l)),m=-1)}return{x:p,y:u,placement:h,strategy:o,middlewareData:w}},Vb=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:d,padding:p=0}=Et(e,t)||{};if(d==null)return{};const u=Fc(p),h={x:n,y:r},g=Ga(o),w=Ya(g),m=await s.getDimensions(d),v=g==="y",b=v?"top":"left",y=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(d));let k=C?C[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(C)))&&(k=i.floating[x]||a.floating[w]);const D=N/2-M/2,E=k/2-m[w]/2-1,I=Vt(u[b],E),R=Vt(u[y],E),B=I,q=k-m[w]-R,Y=k/2-m[w]/2+D,ae=Ha(B,Y,q),z=!l.arrow&&On(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<B?I:R)-m[w]/2<0,K=z?Y<B?Y-B:Y-q:0;return{[g]:h[g]+K,data:{[g]:ae,centerOffset:Y-ae-K,...z&&{alignmentOffset:K}},reset:z}}}),Yb=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:d}=t,{mainAxis:p=!0,crossAxis:u=!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 b=Tt(o),y=yt(i),x=Tt(i)===i,N=await(l.isRTL==null?void 0:l.isRTL(d.floating)),M=h||(x||!m?[yo(i)]:Ib(i)),C=w!=="none";!h&&C&&M.push(...$b(i,m,w,N));const k=[i,...M],D=await l.detectOverflow(t,v),E=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&E.push(D[b]),u){const Y=Ob(o,s,N);E.push(D[Y[0]],D[Y[1]])}if(I=[...I,{placement:o,overflows:E}],!E.every(Y=>Y<=0)){var R,B;const Y=(((R=a.flip)==null?void 0:R.index)||0)+1,ae=k[Y];if(ae&&(!(u==="alignment"?y!==yt(ae):!1)||I.every(G=>yt(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:ae}};let z=(B=I.filter(K=>K.overflows[0]<=0).sort((K,G)=>K.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!z)switch(g){case"bestFit":{var q;const K=(q=I.filter(G=>{if(C){const A=yt(G.placement);return A===y||A==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(A=>A>0).reduce((A,Q)=>A+Q,0)]).sort((G,A)=>G[1]-A[1])[0])==null?void 0:q[0];K&&(z=K);break}case"initialPlacement":z=i;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function $c(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zc(e){return Pb.some(t=>e[t]>=0)}const Gb=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=$c(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:zc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=$c(s,n.floating);return{data:{escapedOffsets:i,escaped:zc(i)}}}default:return{}}}}},Bc=new Set(["left","top"]);async function jb(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Tt(n),i=On(n),l=yt(n)==="y",d=Bc.has(s)?-1:1,p=a&&l?-1:1,u=Et(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),l?{x:g*p,y:h*d}:{x:h*d,y:g*p}}const Ub=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 jb(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}}}}},Rb=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:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...d}=Et(e,t),p={x:n,y:r},u=await a.detectOverflow(t,d),h=yt(Tt(o)),g=Va(h);let w=p[g],m=p[h];if(s){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=w+u[b],N=w-u[y];w=Ha(x,w,N)}if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+u[b],N=m-u[y];m=Ha(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}}}}}},Kb=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:d=!0}=Et(e,t),p={x:n,y:r},u=yt(o),h=Va(u);let g=p[h],w=p[u];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(d){var b,y;const x=h==="y"?"width":"height",N=Bc.has(Tt(o)),M=a.reference[u]-a.floating[x]+(N&&((b=s.offset)==null?void 0:b[u])||0)+(N?0:v.crossAxis),C=a.reference[u]+a.reference[x]+(N?0:((y=s.offset)==null?void 0:y[u])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:g,[u]:w}}}},qb=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=()=>{},...d}=Et(e,t),p=await s.detectOverflow(t,d),u=Tt(o),h=On(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,v=h==="end"?"top":"bottom");const y=m-p.top-p.bottom,x=w-p.left-p.right,N=Vt(m-p[v],y),M=Vt(w-p[b],x),C=!t.middlewareData.shift;let k=N,D=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),C&&!h){const I=Ve(p.left,0),R=Ve(p.right,0),B=Ve(p.top,0),q=Ve(p.bottom,0);g?D=w-2*(I!==0||R!==0?I+R:Ve(p.left,p.right)):k=m-2*(B!==0||q!==0?B+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:D,availableHeight:k});const E=await s.getDimensions(i.floating);return w!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function xo(){return typeof window<"u"}function In(e){return Lc(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=(Lc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lc(e){return xo()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return xo()?e instanceof Element||e instanceof Ye(e).Element:!1}function Pt(e){return xo()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Hc(e){return!xo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function cr(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 Xb(e){return/^(table|td|th)$/.test(In(e))}function Co(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Zb=/transform|translate|scale|rotate|perspective|filter/,Qb=/paint|layout|strict|content/,an=e=>!!e&&e!=="none";let Ua;function Ra(e){const t=st(e)?it(e):e;return an(t.transform)||an(t.translate)||an(t.scale)||an(t.rotate)||an(t.perspective)||!Ka()&&(an(t.backdropFilter)||an(t.filter))||Zb.test(t.willChange||"")||Qb.test(t.contain||"")}function Jb(e){let t=Yt(e);for(;Pt(t)&&!An(t);){if(Ra(t))return t;if(Co(t))return null;t=Yt(t)}return null}function Ka(){return Ua==null&&(Ua=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ua}function An(e){return/^(html|body|#document)$/.test(In(e))}function it(e){return Ye(e).getComputedStyle(e)}function So(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hc(e)&&e.host||wt(e);return Hc(t)?t.host:t}function Vc(e){const t=Yt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&cr(t)?t:Vc(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Vc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=qa(s);return t.concat(s,s.visualViewport||[],cr(o)?o:[],i&&n?dr(i):[])}else return t.concat(o,dr(o,[],n))}function qa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=vo(n)!==a||vo(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Xa(e){return st(e)?e:e.contextElement}function Fn(e){const t=Xa(e);if(!Pt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Yc(t);let s=(a?vo(n.width):n.width)/r,i=(a?vo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ey=bt(0);function Gc(e){const t=Ye(e);return!Ka()||!t.visualViewport?ey:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ty(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function sn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Xa(e);let s=bt(1);t&&(r?st(r)&&(s=Fn(r)):s=Fn(e));const i=ty(a,n,r)?Gc(a):bt(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,p=o.width/s.x,u=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=qa(w);for(;m&&r&&g!==w;){const v=Fn(m),b=m.getBoundingClientRect(),y=it(m),x=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,N=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,d*=v.y,p*=v.x,u*=v.y,l+=x,d+=N,w=Ye(m),m=qa(w)}}return wo({width:p,height:u,x:l,y:d})}function No(e,t){const n=So(e).scrollLeft;return t?t.left+n:sn(wt(e)).left+n}function jc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-No(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ny(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?Co(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=bt(1);const p=bt(0),u=Pt(r);if((u||!u&&!a)&&((In(r)!=="body"||cr(s))&&(l=So(r)),u)){const g=sn(r);d=Fn(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!u&&!a?jc(s,l):bt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-l.scrollTop*d.y+p.y+h.y}}function ry(e){return Array.from(e.getClientRects())}function oy(e){const t=wt(e),n=So(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+No(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 Uc=25;function ay(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=Ka();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=No(r);if(d<=0){const p=r.ownerDocument,u=p.body,h=getComputedStyle(u),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-u.clientWidth-g);w<=Uc&&(a-=w)}else d<=Uc&&(a+=d);return{width:a,height:s,x:i,y:l}}function sy(e,t){const n=sn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Pt(e)?Fn(e):bt(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function Rc(e,t,n){let r;if(t==="viewport")r=ay(e,n);else if(t==="document")r=oy(wt(e));else if(st(t))r=sy(t,n);else{const o=Gc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wo(r)}function Kc(e,t){const n=Yt(e);return n===t||!st(n)||An(n)?!1:it(n).position==="fixed"||Kc(n,t)}function iy(e,t){const n=t.get(e);if(n)return n;let r=dr(e,[],!1).filter(i=>st(i)&&In(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?Yt(e):e;for(;st(s)&&!An(s);){const i=it(s),l=Ra(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||cr(s)&&!l&&Kc(e,s))?r=r.filter(p=>p!==s):o=i,s=Yt(s)}return t.set(e,r),r}function ly(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Co(t)?[]:iy(t,this._c):[].concat(n),r],i=Rc(t,s[0],o);let l=i.top,d=i.right,p=i.bottom,u=i.left;for(let h=1;h<s.length;h++){const g=Rc(t,s[h],o);l=Ve(g.top,l),d=Vt(g.right,d),p=Vt(g.bottom,p),u=Ve(g.left,u)}return{width:d-u,height:p-l,x:u,y:l}}function cy(e){const{width:t,height:n}=Yc(e);return{width:t,height:n}}function dy(e,t,n){const r=Pt(t),o=wt(t),a=n==="fixed",s=sn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function d(){l.x=No(o)}if(r||!r&&!a)if((In(t)!=="body"||cr(o))&&(i=So(t)),r){const g=sn(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const p=o&&!r&&!a?jc(o,i):bt(0),u=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:u,y:h,width:s.width,height:s.height}}function Za(e){return it(e).position==="static"}function qc(e,t){if(!Pt(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 Xc(e,t){const n=Ye(e);if(Co(e))return n;if(!Pt(e)){let o=Yt(e);for(;o&&!An(o);){if(st(o)&&!Za(o))return o;o=Yt(o)}return n}let r=qc(e,t);for(;r&&Xb(r)&&Za(r);)r=qc(r,t);return r&&An(r)&&Za(r)&&!Ra(r)?n:r||Jb(e)||n}const uy=async function(e){const t=this.getOffsetParent||Xc,n=this.getDimensions,r=await n(e.floating);return{reference:dy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fy(e){return it(e).direction==="rtl"}const py={convertOffsetParentRelativeRectToViewportRelativeRect:ny,getDocumentElement:wt,getClippingRect:ly,getOffsetParent:Xc,getElementRects:uy,getClientRects:ry,getDimensions:cy,getScale:Fn,isElement:st,isRTL:fy};function Zc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hy(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 d=e.getBoundingClientRect(),{left:p,top:u,width:h,height:g}=d;if(i||t(),!h||!g)return;const w=bo(u),m=bo(o.clientWidth-(p+h)),v=bo(o.clientHeight-(u+g)),b=bo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ve(0,Vt(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&&!Zc(d,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 gy(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,d=Xa(e),p=o||a?[...d?dr(d):[],...t?dr(t):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=d&&i?hy(d,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!l&&g.observe(d),t&&g.observe(t));let w,m=l?sn(e):null;l&&v();function v(){const b=sn(e);m&&!Zc(m,b)&&n(),m=b,w=requestAnimationFrame(v)}return n(),()=>{var b;p.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),u==null||u(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const my=Ub,vy=Rb,by=Yb,yy=qb,wy=Gb,Qc=Vb,xy=Kb,Cy=(e,t,n)=>{const r=new Map,o={platform:py,...n},a={...o.platform,_c:r};return Hb(e,t,{...o,platform:a})};var Sy=typeof document<"u",Ny=function(){},ko=Sy?S.useLayoutEffect:Ny;function Mo(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(!Mo(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)&&!Mo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Jc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ed(e,t){const n=Jc(e);return Math.round(t*n)/n}function Qa(e){const t=f.useRef(e);return ko(()=>{t.current=e}),t}function ky(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:d}=e,[p,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);Mo(h,r)||g(r);const[w,m]=f.useState(null),[v,b]=f.useState(null),y=f.useCallback(G=>{G!==C.current&&(C.current=G,m(G))},[]),x=f.useCallback(G=>{G!==k.current&&(k.current=G,b(G))},[]),N=a||w,M=s||v,C=f.useRef(null),k=f.useRef(null),D=f.useRef(p),E=l!=null,I=Qa(l),R=Qa(o),B=Qa(d),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};R.current&&(G.platform=R.current),Cy(C.current,k.current,G).then(A=>{const Q={...A,isPositioned:B.current!==!1};Y.current&&!Mo(D.current,Q)&&(D.current=Q,jr.flushSync(()=>{u(Q)}))})},[h,t,n,R,B]);ko(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(G=>({...G,isPositioned:!1})))},[d]);const Y=f.useRef(!1);ko(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ko(()=>{if(N&&(C.current=N),M&&(k.current=M),N&&M){if(I.current)return I.current(N,M,q);q()}},[N,M,q,I,E]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:x}),[y,x]),z=f.useMemo(()=>({reference:N,floating:M}),[N,M]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!z.floating)return G;const A=ed(z.floating,p.x),Q=ed(z.floating,p.y);return i?{...G,transform:"translate("+A+"px, "+Q+"px)",...Jc(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:Q}},[n,i,z.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:z,floatingStyles:K}),[p,q,ae,z,K])}const My=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):{}}}},Dy=(e,t)=>{const n=my(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ey=(e,t)=>{const n=vy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ty=(e,t)=>({fn:xy(e).fn,options:[e,t]}),Py=(e,t)=>{const n=by(e);return{name:n.name,fn:n.fn,options:[e,t]}},_y=(e,t)=>{const n=yy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oy=(e,t)=>{const n=wy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iy=(e,t)=>{const n=My(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ay="Arrow",td=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return c.jsx(ne.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});td.displayName=Ay;var Fy=td;function Wy(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,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,i=d.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 Ja="Popper",[nd,Gt]=Ze(Ja),[$y,rd]=nd(Ja),od=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return c.jsx($y,{scope:t,anchor:r,onAnchorChange:o,children:n})};od.displayName=Ja;var ad="PopperAnchor",sd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=rd(ad,n),s=f.useRef(null),i=he(t,s),l=f.useRef(null);return f.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:c.jsx(ne.div,{...o,ref:i})});sd.displayName=ad;var es="PopperContent",[zy,By]=nd(es),id=f.forwardRef((e,t)=>{var W,U,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:d=[],collisionPadding:p=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=rd(es,n),[b,y]=f.useState(null),x=he(t,Me=>y(Me)),[N,M]=f.useState(null),C=Wy(N),k=(C==null?void 0:C.width)??0,D=(C==null?void 0:C.height)??0,E=r+(a!=="center"?"-"+a:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(d)?d:[d],B=R.length>0,q={padding:I,boundary:R.filter(Hy),altBoundary:B},{refs:Y,floatingStyles:ae,placement:z,isPositioned:K,middlewareData:G}=ky({strategy:"fixed",placement:E,whileElementsMounted:(...Me)=>gy(...Me,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Dy({mainAxis:o+D,alignmentAxis:s}),l&&Ey({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Ty():void 0,...q}),l&&Py({...q}),_y({...q,apply:({elements:Me,rects:Ee,availableWidth:tt,availableHeight:Ue})=>{const{width:Fe,height:Zt}=Ee.reference,De=Me.floating.style;De.setProperty("--radix-popper-available-width",`${tt}px`),De.setProperty("--radix-popper-available-height",`${Ue}px`),De.setProperty("--radix-popper-anchor-width",`${Fe}px`),De.setProperty("--radix-popper-anchor-height",`${Zt}px`)}}),N&&Iy({element:N,padding:i}),Vy({arrowWidth:k,arrowHeight:D}),h&&Oy({strategy:"referenceHidden",...q})]}),[A,Q]=dd(z),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const O=(W=G.arrow)==null?void 0:W.x,F=(U=G.arrow)==null?void 0:U.y,V=((X=G.arrow)==null?void 0:X.centerOffset)!==0,[$,Z]=f.useState();return Pe(()=>{b&&Z(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:K?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--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:c.jsx(zy,{scope:n,placedSide:A,onArrowChange:M,arrowX:O,arrowY:F,shouldHideArrow:V,children:c.jsx(ne.div,{"data-side":A,"data-align":Q,...m,ref:x,style:{...m.style,animation:K?void 0:"none"}})})})});id.displayName=es;var ld="PopperArrow",Ly={top:"bottom",right:"left",bottom:"top",left:"right"},cd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=By(ld,r),s=Ly[a.placedSide];return c.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:c.jsx(Fy,{...o,ref:n,style:{...o.style,display:"block"}})})});cd.displayName=ld;function Hy(e){return e!==null}var Vy=e=>({name:"transformOrigin",options:e,fn(t){var v,b,y;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,[d,p]=dd(n),u={start:"0%",center:"50%",end:"100%"}[p],h=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let w="",m="";return d==="bottom"?(w=s?u:`${h}px`,m=`${-l}px`):d==="top"?(w=s?u:`${h}px`,m=`${r.floating.height+l}px`):d==="right"?(w=`${-l}px`,m=s?u:`${g}px`):d==="left"&&(w=`${r.floating.width+l}px`,m=s?u:`${g}px`),{data:{x:w,y:m}}}});function dd(e){const[t,n="center"]=e.split("-");return[t,n]}var ur=od,fr=sd,Do=id,Eo=cd,To="Popover",[ud]=Ze(To,[Gt]),pr=Gt(),[Yy,jt]=ud(To),fd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=pr(t),l=f.useRef(null),[d,p]=f.useState(!1),[u,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:To});return c.jsx(ur,{...i,children:c.jsx(Yy,{scope:t,contentId:Ce(),triggerRef:l,open:u,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};fd.displayName=To;var pd="PopoverAnchor",hd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(pd,n),a=pr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(fr,{...a,...r,ref:t})});hd.displayName=pd;var gd="PopoverTrigger",md=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(gd,n),a=pr(n),s=he(t,o.triggerRef),i=c.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Cd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(fr,{asChild:!0,...a,children:i})});md.displayName=gd;var ts="PopoverPortal",[Gy,jy]=ud(ts,{forceMount:void 0}),vd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=jt(ts,t);return c.jsx(Gy,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};vd.displayName=ts;var Wn="PopoverContent",bd=f.forwardRef((e,t)=>{const n=jy(Wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=jt(Wn,e.__scopePopover);return c.jsx(ze,{present:r||a.open,children:a.modal?c.jsx(Ry,{...o,ref:t}):c.jsx(Ky,{...o,ref:t})})});bd.displayName=Wn;var Uy=tn("PopoverContent.RemoveScroll"),Ry=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return lo(s)},[]),c.jsx(ar,{as:Uy,allowPinchZoom:!0,children:c.jsx(yd,{...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,d=i.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ky=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(yd,{...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,d;(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;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),yd=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:p,...u}=e,h=jt(Wn,n),g=pr(n);return eo(),c.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Do,{"data-state":Cd(h.open),role:"dialog",id:h.contentId,...g,...u,ref:t,style:{...u.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)"}})})})}),wd="PopoverClose",xd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(wd,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});xd.displayName=wd;var qy="PopoverArrow",Xy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=pr(n);return c.jsx(Eo,{...o,...r,ref:t})});Xy.displayName=qy;function Cd(e){return e?"open":"closed"}var Zy=fd,Qy=hd,Jy=md,ew=vd,Sd=bd,tw=xd;const ln=Zy,hr=Jy,nw=tw,rw=Qy,Ut=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>c.jsx(ew,{children:c.jsx(Sd,{ref:o,align:t,sideOffset:n,className:P("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})}));Ut.displayName=Sd.displayName;const Nd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(ln,{...s,children:[c.jsx(hr,{asChild:!0,children:t}),c.jsx(Ut,{side:n,align:r,sideOffset:o,className:a,children:e})]});Nd.displayName="Popover";const kd=ye(["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}}),ns=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(kd({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx("span",{className:P("truncate",!o&&"text-muted-foreground"),children:o??r}),c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));ns.displayName="ComboBoxTrigger";const Md=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>c.jsx(Ut,{ref:s,className:P("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:c.jsxs(lr,{className:"w-full",value:r,onValueChange:o,children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(po,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),c.jsx(ho,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Md.displayName="ComboBoxContent";const Dd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>c.jsxs(fo,{ref:a,className:P("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:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&c.jsx(nn,{className:"size-4","aria-hidden":"true"})}),t]}));Dd.displayName="ComboBoxItem";const Ed=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(go,{ref:r,className:P("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Ed.displayName="ComboBoxEmpty";const Td=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>c.jsx(Tc,{ref:o,heading:t,className:P("[&_[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}));Td.displayName="ComboBoxGroup";const Pd=f.forwardRef(({className:e,...t},n)=>c.jsx(Pc,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Pd.displayName="ComboBoxSeparator";const _d=ln;_d.displayName="ComboBoxRoot";const Od=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:d},p)=>{const[u,h]=f.useState(!1),[g,w]=f.useState(""),m=f.useMemo(()=>{var b;return(b=e.find(y=>y.value===t))==null?void 0:b.label},[e,t]);function v(b){h(b),b||w("")}return c.jsxs(ln,{open:u,onOpenChange:v,children:[c.jsx(hr,{asChild:!0,children:c.jsx(ns,{ref:p,size:s,isError:i,disabled:l,className:d,placeholder:r,"aria-expanded":u,"aria-haspopup":"listbox",children:m})}),c.jsx(Ut,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:c.jsxs(lr,{className:"w-full",children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(po,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:g,onValueChange:w})}),c.jsxs(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(b=>c.jsxs(fo,{value:b.label,disabled:b.disabled,className:P("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(b.value),h(!1)},children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===b.value&&c.jsx(nn,{className:"size-4","aria-hidden":"true"})}),b.label]},b.value))]})]})})]})});Od.displayName="ComboBox";const ow=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function rs(e){return ow.has(e)}const os=[{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 aw(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const as=(e,t,n,r)=>{const o=aw(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const d=n.trim().toLowerCase();return d===""||o.includes(d)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!rs(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 sw(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(rs(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function iw(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const ss=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"w-full min-w-0",children:c.jsx("table",{ref:n,className:P("w-full caption-bottom text-sm",e),...t})}));ss.displayName="Table";const is=f.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:P("[&_tr]:border-b [&_tr]:border-border",e),...t}));is.displayName="TableHeader";const ls=f.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:P("[&_tr:last-child]:border-0",e),...t}));ls.displayName="TableBody";const cs=f.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:P("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));cs.displayName="TableFooter";const _t=f.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:P("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));_t.displayName="TableRow";const Po=f.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:P("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}));Po.displayName="TableHead";const cn=f.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:P("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));cn.displayName="TableCell";const Id=f.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:P("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Id.displayName="TableCaption";const ds=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("animate-pulse rounded-md bg-muted",e),...t}));ds.displayName="Skeleton";const Ad=f.createContext({inGroup:!1}),Fd=ye(["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"}}),gr=f.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=f.use(Ad);return c.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&c.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}),c.jsx("input",{ref:s,className:P(Fd({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"&&c.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})]})});gr.displayName="Input";const us=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>c.jsx(Ad,{value:{inGroup:!0,isError:t},children:c.jsx("div",{ref:o,"aria-invalid":t||void 0,className:P("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})}));us.displayName="InputGroup";const fs=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));fs.displayName="InputAddon";const ps=f.forwardRef(({className:e,...t},n)=>c.jsx("nav",{ref:n,"aria-label":"Pagination",className:P("flex items-center gap-1",e),...t}));ps.displayName="PaginationRoot";const hs=["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(" "),gs=f.forwardRef(({className:e,isActive:t,...n},r)=>c.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:P(hs,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));gs.displayName="PaginationItem";const ms=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Previous page",className:P(hs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(tl,{className:"size-4"})}));ms.displayName="PaginationPrev";const vs=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Next page",className:P(hs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(wn,{className:"size-4"})}));vs.displayName="PaginationNext";const bs=({className:e,...t})=>c.jsx("span",{"aria-hidden":"true",className:P("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:c.jsx(qg,{className:"size-4"})});bs.displayName="PaginationEllipsis";function lw(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,d)=>d+1):[...Array.from({length:i},(l,d)=>d+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(d,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(d,p)=>l+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const ys=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=lw(e,t,r);return c.jsxs(ps,{className:o,...a,children:[c.jsx(ms,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?c.jsx(bs,{},i):c.jsx(gs,{isActive:i===e,onClick:()=>n(i),children:i},i)),c.jsx(vs,{onClick:()=>n(e+1),disabled:e>=t})]})};ys.displayName="Pagination";function Wd(e,[t,n]){return Math.min(n,Math.max(t,e))}function cw(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 $d=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"}),dw="VisuallyHidden",zd=f.forwardRef((e,t)=>c.jsx(ne.span,{...e,ref:t,style:{...$d,...e.style}}));zd.displayName=dw;var uw=zd,fw=[" ","Enter","ArrowUp","ArrowDown"],pw=[" ","Enter"],dn="Select",[_o,Oo,hw]=Ur(dn),[$n]=Ze(dn,[hw,Gt]),Io=Gt(),[gw,Rt]=$n(dn),[mw,vw]=$n(dn),Bd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:p,autoComplete:u,disabled:h,required:g,form:w}=e,m=Io(t),[v,b]=f.useState(null),[y,x]=f.useState(null),[N,M]=f.useState(!1),C=tr(d),[k,D]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:dn}),[E,I]=Qe({prop:s,defaultProp:i,onChange:l,caller:dn}),R=f.useRef(null),B=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(z=>z.props.value).join(";");return c.jsx(ur,{...m,children:c.jsxs(gw,{required:g,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:Ce(),value:E,onValueChange:I,open:k,onOpenChange:D,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[c.jsx(_o.Provider,{scope:t,children:c.jsx(mw,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(z=>{Y(K=>new Set(K).add(z))},[]),onNativeOptionRemove:f.useCallback(z=>{Y(K=>{const G=new Set(K);return G.delete(z),G})},[]),children:n})}),B?c.jsxs(cu,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:u,value:E,onChange:z=>I(z.target.value),disabled:h,form:w,children:[E===void 0?c.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Bd.displayName=dn;var Ld="SelectTrigger",Hd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Io(n),s=Rt(Ld,n),i=s.disabled||r,l=he(t,s.onTriggerChange),d=Oo(n),p=f.useRef("touch"),[u,h,g]=uu(m=>{const v=d().filter(x=>!x.disabled),b=v.find(x=>x.value===s.value),y=fu(v,m,b);y!==void 0&&s.onValueChange(y.value)}),w=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(fr,{asChild:!0,...a,children:c.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":du(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=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&fw.includes(m.key)&&(w(),m.preventDefault())})})})});Hd.displayName=Ld;var Vd="SelectValue",Yd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Rt(Vd,n),{onValueNodeHasChildrenChange:d}=l,p=a!==void 0,u=he(t,l.onValueNodeChange);return Pe(()=>{d(p)},[d,p]),c.jsx(ne.span,{...i,ref:u,style:{pointerEvents:"none"},children:du(l.value)?c.jsx(c.Fragment,{children:s}):a})});Yd.displayName=Vd;var bw="SelectIcon",yw=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});yw.displayName=bw;var ww="SelectPortal",Gd=e=>c.jsx(kn,{asChild:!0,...e});Gd.displayName=ww;var un="SelectContent",jd=f.forwardRef((e,t)=>{const n=Rt(un,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?jr.createPortal(c.jsx(Ud,{scope:e.__scopeSelect,children:c.jsx(_o.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(Rd,{...e,ref:t})});jd.displayName=un;var lt=10,[Ud,Kt]=$n(un),xw="SelectContentImpl",Cw=tn("SelectContent.RemoveScroll"),Rd=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...b}=e,y=Rt(un,n),[x,N]=f.useState(null),[M,C]=f.useState(null),k=he(t,W=>N(W)),[D,E]=f.useState(null),[I,R]=f.useState(null),B=Oo(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return lo(x)},[x]),eo();const z=f.useCallback(W=>{const[U,...X]=B().map(ce=>ce.ref.current),[se]=X.slice(-1),de=document.activeElement;for(const ce of W)if(ce===de||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===U&&M&&(M.scrollTop=0),ce===se&&M&&(M.scrollTop=M.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[B,M]),K=f.useCallback(()=>z([D,x]),[z,D,x]);f.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:G,triggerPointerDownPosRef:A}=y;f.useEffect(()=>{if(x){let W={x:0,y:0};const U=se=>{var de,ce;W={x:Math.abs(Math.round(se.pageX)-(((de=A.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(se.pageY)-(((ce=A.current)==null?void 0:ce.y)??0))}},X=se=>{W.x<=10&&W.y<=10?se.preventDefault():x.contains(se.target)||G(!1),document.removeEventListener("pointermove",U),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,G,A]),f.useEffect(()=>{const W=()=>G(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[G]);const[Q,oe]=uu(W=>{const U=B().filter(de=>!de.disabled),X=U.find(de=>de.ref.current===document.activeElement),se=fu(U,W,X);se&&setTimeout(()=>se.ref.current.focus())}),O=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&(E(W),se&&(ae.current=!0))},[y.value]),F=f.useCallback(()=>x==null?void 0:x.focus(),[x]),V=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&R(W)},[y.value]),$=r==="popper"?ws:Kd,Z=$===ws?{side:i,sideOffset:l,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(Ud,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:O,selectedItem:D,onItemLeave:F,itemTextRefCallback:V,focusSelectedItem:K,selectedItemText:I,position:r,isPositioned:q,searchRef:Q,children:c.jsx(ar,{as:Cw,allowPinchZoom:!0,children:c.jsx(or,{asChild:!0,trapped:y.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:j(o,W=>{var U;(U=y.trigger)==null||U.focus({preventScroll:!0}),W.preventDefault()}),children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:W=>W.preventDefault(),...b,...Z,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:j(b.onKeyDown,W=>{const U=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!U&&W.key.length===1&&oe(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let se=B().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(W.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const de=W.target,ce=se.indexOf(de);se=se.slice(ce+1)}setTimeout(()=>z(se)),W.preventDefault()}})})})})})})});Rd.displayName=xw;var Sw="SelectItemAlignedPosition",Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Rt(un,n),s=Kt(un,n),[i,l]=f.useState(null),[d,p]=f.useState(null),u=he(t,k=>p(k)),h=Oo(n),g=f.useRef(!1),w=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&m&&v&&b){const k=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),E=a.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(a.dir!=="rtl"){const de=I.left-D.left,ce=E.left-de,Me=k.left-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Wd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.left=Fe+"px"}else{const de=D.right-I.right,ce=window.innerWidth-E.right-de,Me=window.innerWidth-k.right-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Wd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.right=Fe+"px"}const R=h(),B=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(d),ae=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),K=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),A=ae+z+q+G+K,Q=Math.min(v.offsetHeight*5,A),oe=window.getComputedStyle(m),O=parseInt(oe.paddingTop,10),F=parseInt(oe.paddingBottom,10),V=k.top+k.height/2-lt,$=B-V,Z=v.offsetHeight/2,W=v.offsetTop+Z,U=ae+z+W,X=A-U;if(U<=V){const de=R.length>0&&v===R[R.length-1].ref.current;i.style.bottom="0px";const ce=d.clientHeight-m.offsetTop-m.offsetHeight,Me=Math.max($,Z+(de?F:0)+ce+K),Ee=U+Me;i.style.height=Ee+"px"}else{const de=R.length>0&&v===R[0].ref.current;i.style.top="0px";const Me=Math.max(V,ae+m.offsetTop+(de?O:0)+Z)+X;i.style.height=Me+"px",m.scrollTop=U-V+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,d,m,v,b,a.dir,r]);Pe(()=>x(),[x]);const[N,M]=f.useState();Pe(()=>{d&&M(window.getComputedStyle(d).zIndex)},[d]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return c.jsx(kw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:c.jsx(ne.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Kd.displayName=Sw;var Nw="SelectPopperPosition",ws=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=Io(n);return c.jsx(Do,{...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)"}})});ws.displayName=Nw;var[kw,xs]=$n(un,{}),Cs="SelectViewport",qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Kt(Cs,n),s=xs(Cs,n),i=he(t,a.onViewportChange),l=f.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(_o.Slot,{scope:n,children:c.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,d=>{const p=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&u){const g=Math.abs(l.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),b=Math.max(m,v);if(b<w){const y=b+g,x=Math.min(w,y),N=y-x;u.style.height=x+"px",u.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});qd.displayName=Cs;var Xd="SelectGroup",[Mw,Dw]=$n(Xd),Zd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ce();return c.jsx(Mw,{scope:n,id:o,children:c.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Zd.displayName=Xd;var Qd="SelectLabel",Jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dw(Qd,n);return c.jsx(ne.div,{id:o.id,...r,ref:t})});Jd.displayName=Qd;var Ao="SelectItem",[Ew,eu]=$n(Ao),tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Rt(Ao,n),l=Kt(Ao,n),d=i.value===r,[p,u]=f.useState(a??""),[h,g]=f.useState(!1),w=he(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,o)}),m=Ce(),v=f.useRef("touch"),b=()=>{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 c.jsx(Ew,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:f.useCallback(y=>{u(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(_o.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:c.jsx(ne.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"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"&&b()}),onPointerUp:j(s.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:j(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:j(s.onPointerMove,y=>{var x;v.current=y.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:j(s.onKeyDown,y=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&y.key===" "||(pw.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});tu.displayName=Ao;var mr="SelectItemText",nu=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Rt(mr,n),i=Kt(mr,n),l=eu(mr,n),d=vw(mr,n),[p,u]=f.useState(null),h=he(t,b=>u(b),l.onItemTextChange,b=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,b,l.value,l.disabled)}),g=p==null?void 0:p.textContent,w=f.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return Pe(()=>(m(w),()=>v(w)),[m,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(ne.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?jr.createPortal(a.children,s.valueNode):null]})});nu.displayName=mr;var ru="SelectItemIndicator",ou=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eu(ru,n).isSelected?c.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});ou.displayName=ru;var Ss="SelectScrollUpButton",au=f.forwardRef((e,t)=>{const n=Kt(Ss,e.__scopeSelect),r=xs(Ss,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(iu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});au.displayName=Ss;var Ns="SelectScrollDownButton",su=f.forwardRef((e,t)=>{const n=Kt(Ns,e.__scopeSelect),r=xs(Ns,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<d;a(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(iu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});su.displayName=Ns;var iu=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Kt("SelectScrollButton",n),s=f.useRef(null),i=Oo(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Pe(()=>{var p;const d=i().find(u=>u.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),c.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 d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{l()})})}),Tw="SelectSeparator",lu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});lu.displayName=Tw;var ks="SelectArrow",Pw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Io(n),a=Rt(ks,n),s=Kt(ks,n);return a.open&&s.position==="popper"?c.jsx(Eo,{...o,...r,ref:t}):null});Pw.displayName=ks;var _w="SelectBubbleInput",cu=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=cw(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 u=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(u)}},[s,t]),c.jsx(ne.select,{...n,style:{...$d,...n.style},ref:a,defaultValue:t})});cu.displayName=_w;function du(e){return e===""||e===void 0}function uu(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(d){n.current=d,window.clearTimeout(r.current),d!==""&&(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 fu(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ow(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ow(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Iw=Bd,pu=Hd,Aw=Yd,Fw=Gd,hu=jd,Ww=qd,$w=Zd,gu=Jd,mu=tu,zw=nu,Bw=ou,vu=au,bu=su,yu=lu;const wu=ye(["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}}),Ms=Iw,Lw=$w,Ds=Aw,Fo=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs(pu,{ref:a,className:P("group",wu({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Fo.displayName=pu.displayName;const Es=f.forwardRef(({className:e,...t},n)=>c.jsx(vu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Qr,{className:"size-4"})}));Es.displayName=vu.displayName;const Ts=f.forwardRef(({className:e,...t},n)=>c.jsx(bu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Mt,{className:"size-4"})}));Ts.displayName=bu.displayName;const Wo=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsx(Fw,{children:c.jsxs(hu,{ref:o,position:n,sideOffset:4,className:P("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:[c.jsx(Es,{}),c.jsx(Ww,{className:"p-1",children:t}),c.jsx(Ts,{})]})}));Wo.displayName=hu.displayName;const xu=f.forwardRef(({className:e,...t},n)=>c.jsx(gu,{ref:n,className:P("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));xu.displayName=gu.displayName;const Ps=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(mu,{ref:r,className:P("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:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:c.jsx(Bw,{children:c.jsx(nn,{className:"size-4"})})}),c.jsx(zw,{children:t})]}));Ps.displayName=mu.displayName;const Cu=f.forwardRef(({className:e,...t},n)=>c.jsx(yu,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Cu.displayName=yu.displayName;const Su=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>c.jsxs(Ms,{disabled:r,...s,children:[c.jsx(Fo,{ref:i,size:t,isError:n,className:o,children:c.jsx(Ds,{placeholder:e})}),c.jsx(Wo,{children:a})]}));Su.displayName="Select";var _s="rovingFocusGroup.onEntryFocus",Hw={bubbles:!1,cancelable:!0},vr="RovingFocusGroup",[Os,Nu,Vw]=Ur(vr),[Yw,$o]=Ze(vr,[Vw]),[Gw,jw]=Yw(vr),ku=f.forwardRef((e,t)=>c.jsx(Os.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Os.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Uw,{...e,ref:t})})}));ku.displayName=vr;var Uw=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...u}=e,h=f.useRef(null),g=he(t,h),w=tr(a),[m,v]=Qe({prop:s,defaultProp:i??null,onChange:l,caller:vr}),[b,y]=f.useState(!1),x=ot(d),N=Nu(n),M=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const D=h.current;if(D)return D.addEventListener(_s,x),()=>D.removeEventListener(_s,x)},[x]),c.jsx(Gw,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(D=>v(D),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(D=>D+1),[]),onFocusableItemRemove:f.useCallback(()=>k(D=>D-1),[]),children:c.jsx(ne.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{M.current=!0}),onFocus:j(e.onFocus,D=>{const E=!M.current;if(D.target===D.currentTarget&&E&&!b){const I=new CustomEvent(_s,Hw);if(D.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=N().filter(z=>z.focusable),B=R.find(z=>z.active),q=R.find(z=>z.id===m),ae=[B,q,...R].filter(Boolean).map(z=>z.ref.current);Eu(ae,p)}}M.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),Mu="RovingFocusGroupItem",Du=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=Ce(),d=a||l,p=jw(Mu,n),u=p.currentTabStopId===d,h=Nu(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),c.jsx(Os.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:c.jsx(ne.span,{tabIndex:u?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(d):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=qw(v,p.orientation,p.dir);if(b!==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(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=p.loop?Xw(x,N+1):x.slice(N+1)}setTimeout(()=>Eu(x))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:m!=null}):s})})});Du.displayName=Mu;var Rw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qw(e,t,n){const r=Kw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Rw[r]}function Eu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Xw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Tu=ku,Pu=Du,Is=["Enter"," "],Zw=["ArrowDown","PageUp","Home"],_u=["ArrowUp","PageDown","End"],Qw=[...Zw,..._u],Jw={ltr:[...Is,"ArrowRight"],rtl:[...Is,"ArrowLeft"]},ex={ltr:["ArrowLeft"],rtl:["ArrowRight"]},br="Menu",[yr,tx,nx]=Ur(br),[fn,Ou]=Ze(br,[nx,Gt,$o]),wr=Gt(),Iu=$o(),[Au,qt]=fn(br),[rx,xr]=fn(br),Fu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=wr(t),[l,d]=f.useState(null),p=f.useRef(!1),u=ot(a),h=tr(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})}},[]),c.jsx(ur,{...i,children:c.jsx(Au,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:d,children:c.jsx(rx,{scope:t,onClose:f.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};Fu.displayName=br;var ox="MenuAnchor",As=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(fr,{...o,...r,ref:t})});As.displayName=ox;var Fs="MenuPortal",[ax,Wu]=fn(Fs,{forceMount:void 0}),$u=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=qt(Fs,t);return c.jsx(ax,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};$u.displayName=Fs;var Je="MenuContent",[sx,Ws]=fn(Je),zu=f.forwardRef((e,t)=>{const n=Wu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(ze,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(ix,{...o,ref:t}):c.jsx(lx,{...o,ref:t})})})})}),ix=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return lo(a)},[]),c.jsx($s,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),lx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu);return c.jsx($s,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cx=tn("MenuContent.ScrollLock"),$s=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=qt(Je,n),b=xr(Je,n),y=wr(n),x=Iu(n),N=tx(n),[M,C]=f.useState(null),k=f.useRef(null),D=he(t,k,v.onContentChange),E=f.useRef(0),I=f.useRef(""),R=f.useRef(0),B=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,z=w?{as:cx,allowPinchZoom:!0}:void 0,K=A=>{var W,U;const Q=I.current+A,oe=N().filter(X=>!X.disabled),O=document.activeElement,F=(W=oe.find(X=>X.ref.current===O))==null?void 0:W.textValue,V=oe.map(X=>X.textValue),$=xx(V,Q,F),Z=(U=oe.find(X=>X.textValue===$))==null?void 0:U.ref.current;(function X(se){I.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(E.current),[]),eo();const G=f.useCallback(A=>{var oe,O;return q.current===((oe=B.current)==null?void 0:oe.side)&&Sx(A,(O=B.current)==null?void 0:O.area)},[]);return c.jsx(sx,{scope:n,searchRef:I,onItemEnter:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),onItemLeave:f.useCallback(A=>{var Q;G(A)||((Q=k.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),pointerGraceTimerRef:R,onPointerGraceIntentChange:f.useCallback(A=>{B.current=A},[]),children:c.jsx(ae,{...z,children:c.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,A=>{var Q;A.preventDefault(),(Q=k.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,children:c.jsx(Tu,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:j(l,A=>{b.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Do,{role:"menu","aria-orientation":"vertical","data-state":nf(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:D,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,A=>{const oe=A.target.closest("[data-radix-menu-content]")===A.currentTarget,O=A.ctrlKey||A.altKey||A.metaKey,F=A.key.length===1;oe&&(A.key==="Tab"&&A.preventDefault(),!O&&F&&K(A.key));const V=k.current;if(A.target!==V||!Qw.includes(A.key))return;A.preventDefault();const Z=N().filter(W=>!W.disabled).map(W=>W.ref.current);_u.includes(A.key)&&Z.reverse(),yx(Z)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(E.current),I.current="")}),onPointerMove:j(e.onPointerMove,Sr(A=>{const Q=A.target,oe=Y.current!==A.clientX;if(A.currentTarget.contains(Q)&&oe){const O=A.clientX>Y.current?"right":"left";q.current=O,Y.current=A.clientX}}))})})})})})})});zu.displayName=Je;var dx="MenuGroup",zs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"group",...r,ref:t})});zs.displayName=dx;var ux="MenuLabel",Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{...r,ref:t})});Bu.displayName=ux;var zo="MenuItem",Lu="menu.itemSelect",Bo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=xr(zo,e.__scopeMenu),i=Ws(zo,e.__scopeMenu),l=he(t,a),d=f.useRef(!1),p=()=>{const u=a.current;if(!n&&u){const h=new CustomEvent(Lu,{bubbles:!0,cancelable:!0});u.addEventListener(Lu,g=>r==null?void 0:r(g),{once:!0}),$i(u,h),h.defaultPrevented?d.current=!1:s.onClose()}};return c.jsx(Hu,{...o,ref:l,disabled:n,onClick:j(e.onClick,p),onPointerDown:u=>{var h;(h=e.onPointerDown)==null||h.call(e,u),d.current=!0},onPointerUp:j(e.onPointerUp,u=>{var h;d.current||(h=u.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,u=>{const h=i.searchRef.current!=="";n||h&&u.key===" "||Is.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Bo.displayName=zo;var Hu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ws(zo,n),i=Iu(n),l=f.useRef(null),d=he(t,l),[p,u]=f.useState(!1),[h,g]=f.useState("");return f.useEffect(()=>{const w=l.current;w&&g((w.textContent??"").trim())},[a.children]),c.jsx(yr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:c.jsx(Pu,{asChild:!0,...i,focusable:!r,children:c.jsx(ne.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:j(e.onPointerMove,Sr(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,Sr(w=>s.onItemLeave(w))),onFocus:j(e.onFocus,()=>u(!0)),onBlur:j(e.onBlur,()=>u(!1))})})})}),fx="MenuCheckboxItem",Vu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Ru,{scope:e.__scopeMenu,checked:n,children:c.jsx(Bo,{role:"menuitemcheckbox","aria-checked":Lo(n)?"mixed":n,...o,ref:t,"data-state":Hs(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Lo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vu.displayName=fx;var Yu="MenuRadioGroup",[px,hx]=fn(Yu,{value:void 0,onValueChange:()=>{}}),Gu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return c.jsx(px,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx(zs,{...o,ref:t})})});Gu.displayName=Yu;var ju="MenuRadioItem",Uu=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=hx(ju,e.__scopeMenu),a=n===o.value;return c.jsx(Ru,{scope:e.__scopeMenu,checked:a,children:c.jsx(Bo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Hs(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Uu.displayName=ju;var Bs="MenuItemIndicator",[Ru,gx]=fn(Bs,{checked:!1}),Ku=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=gx(Bs,n);return c.jsx(ze,{present:r||Lo(a.checked)||a.checked===!0,children:c.jsx(ne.span,{...o,ref:t,"data-state":Hs(a.checked)})})});Ku.displayName=Bs;var mx="MenuSeparator",qu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});qu.displayName=mx;var vx="MenuArrow",Xu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(Eo,{...o,...r,ref:t})});Xu.displayName=vx;var Ls="MenuSub",[bx,Zu]=fn(Ls),Qu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=qt(Ls,t),s=wr(t),[i,l]=f.useState(null),[d,p]=f.useState(null),u=ot(o);return f.useEffect(()=>(a.open===!1&&u(!1),()=>u(!1)),[a.open,u]),c.jsx(ur,{...s,children:c.jsx(Au,{scope:t,open:r,onOpenChange:u,content:d,onContentChange:p,children:c.jsx(bx,{scope:t,contentId:Ce(),triggerId:Ce(),trigger:i,onTriggerChange:l,children:n})})})};Qu.displayName=Ls;var Cr="MenuSubTrigger",Ju=f.forwardRef((e,t)=>{const n=qt(Cr,e.__scopeMenu),r=xr(Cr,e.__scopeMenu),o=Zu(Cr,e.__scopeMenu),a=Ws(Cr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,d={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),l(null)}},[i,l]),c.jsx(As,{asChild:!0,...d,children:c.jsx(Hu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":nf(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:u=>{var h;(h=e.onClick)==null||h.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,Sr(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,Sr(u=>{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",b=v?-5:5,y=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+b,y:u.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,u=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&u.key===" "||Jw[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});Ju.displayName=Cr;var ef="MenuSubContent",tf=f.forwardRef((e,t)=>{const n=Wu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu),i=Zu(ef,e.__scopeMenu),l=f.useRef(null),d=he(t,l);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(ze,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:c.jsx($s,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var u;s.isUsingKeyboardRef.current&&((u=l.current)==null||u.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 u=p.currentTarget.contains(p.target),h=ex[s.dir].includes(p.key);u&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});tf.displayName=ef;function nf(e){return e?"open":"closed"}function Lo(e){return e==="indeterminate"}function Hs(e){return Lo(e)?"indeterminate":e?"checked":"unchecked"}function yx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xx(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=wx(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Cx(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],d=i.x,p=i.y,u=l.x,h=l.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function Sx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Cx(n,t)}function Sr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Nx=Fu,kx=As,Mx=$u,Dx=zu,Ex=zs,Tx=Bu,Px=Bo,_x=Vu,Ox=Gu,Ix=Uu,Ax=Ku,Fx=qu,Wx=Xu,$x=Qu,zx=Ju,Bx=tf,Ho="DropdownMenu",[Lx]=Ze(Ho,[Ou]),Ie=Ou(),[Hx,rf]=Lx(Ho),of=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ie(t),d=f.useRef(null),[p,u]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:Ho});return c.jsx(Hx,{scope:t,triggerId:Ce(),triggerRef:d,contentId:Ce(),open:p,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(h=>!h),[u]),modal:i,children:c.jsx(Nx,{...l,open:p,onOpenChange:u,dir:r,modal:i,children:n})})};of.displayName=Ho;var af="DropdownMenuTrigger",sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=rf(af,n),s=Ie(n);return c.jsx(kx,{asChild:!0,...s,children:c.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())})})})});sf.displayName=af;var Vx="DropdownMenuPortal",lf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ie(t);return c.jsx(Mx,{...r,...n})};lf.displayName=Vx;var cf="DropdownMenuContent",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=rf(cf,n),a=Ie(n),s=f.useRef(!1);return c.jsx(Dx,{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,d=l.button===0&&l.ctrlKey===!0,p=l.button===2||d;(!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)"}})});df.displayName=cf;var Yx="DropdownMenuGroup",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ex,{...o,...r,ref:t})});uf.displayName=Yx;var Gx="DropdownMenuLabel",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Tx,{...o,...r,ref:t})});ff.displayName=Gx;var jx="DropdownMenuItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Px,{...o,...r,ref:t})});pf.displayName=jx;var Ux="DropdownMenuCheckboxItem",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(_x,{...o,...r,ref:t})});hf.displayName=Ux;var Rx="DropdownMenuRadioGroup",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ox,{...o,...r,ref:t})});gf.displayName=Rx;var Kx="DropdownMenuRadioItem",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ix,{...o,...r,ref:t})});mf.displayName=Kx;var qx="DropdownMenuItemIndicator",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ax,{...o,...r,ref:t})});vf.displayName=qx;var Xx="DropdownMenuSeparator",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Fx,{...o,...r,ref:t})});bf.displayName=Xx;var Zx="DropdownMenuArrow",Qx=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Wx,{...o,...r,ref:t})});Qx.displayName=Zx;var Jx=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ie(t),[i,l]=Qe({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return c.jsx($x,{...s,open:i,onOpenChange:l,children:n})},e0="DropdownMenuSubTrigger",yf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(zx,{...o,...r,ref:t})});yf.displayName=e0;var t0="DropdownMenuSubContent",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Bx,{...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)"}})});wf.displayName=t0;var n0=of,r0=sf,xf=lf,Cf=df,o0=uf,Sf=ff,Nf=pf,kf=hf,a0=gf,Mf=mf,Df=vf,Ef=bf,s0=Jx,Tf=yf,Pf=wf;const Vo=n0,Yo=r0,i0=o0,l0=xf,Vs=s0,_f=a0,Nr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(xf,{children:c.jsx(Cf,{ref:r,sideOffset:t,className:P("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})}));Nr.displayName=Cf.displayName;const Ot=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>c.jsx(Nf,{ref:o,className:P("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=Nf.displayName;const Ys=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(kf,{ref:o,className:P("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:[c.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(Df,{children:c.jsx(nn,{className:"size-3.5"})})}),t]}));Ys.displayName=kf.displayName;const Gs=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Mf,{ref:r,className:P("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:[c.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(Df,{children:c.jsx(jg,{className:"size-2 fill-current"})})}),t]}));Gs.displayName=Mf.displayName;const kr=f.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Sf,{ref:r,className:P("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));kr.displayName=Sf.displayName;const zn=f.forwardRef(({className:e,...t},n)=>c.jsx(Ef,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));zn.displayName=Ef.displayName;const Go=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(Tf,{ref:o,className:P("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,c.jsx(wn,{className:"ml-auto"})]}));Go.displayName=Tf.displayName;const jo=f.forwardRef(({className:e,...t},n)=>c.jsx(Pf,{ref:n,className:P("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}));jo.displayName=Pf.displayName;const Of=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(Vo,{...s,children:[c.jsx(Yo,{asChild:!0,children:e}),c.jsx(Nr,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,l)=>i.type==="separator"?c.jsx(zn,{},l):i.type==="label"?c.jsx(kr,{children:i.label},l):c.jsxs(Ot,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});Of.displayName="DropdownMenu";const If=f.createContext(null);function Af(){return f.useContext(If)}const Ff="application/x-bookers-grouping-column-id",Mr="application/x-bookers-grouping-chip",It="bookers-expand";function Wf(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Wf):e.footer!==void 0}function c0(){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 $f(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 Uo(e,t,n){return Math.min(Math.max(e,t),n)}function d0({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=l=>{var p;l.preventDefault(),l.stopPropagation();const d=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:l.pointerId,startY:l.clientY,startHeight:d},l.currentTarget.setPointerCapture(l.pointerId)},s=l=>{const d=o.current;if(!d||l.pointerId!==d.pointerId)return;const p=l.clientY-d.startY,u=Uo(d.startHeight+p,t,n);r(u)},i=l=>{const d=o.current;if(!(!d||l.pointerId!==d.pointerId)){o.current=null;try{l.currentTarget.releasePointerCapture(l.pointerId)}catch{}}};return c.jsx("div",{className:P("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 d=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,u=l.key==="ArrowUp"?-d:d;r(Uo(p+u,t,n))},children:c.jsxs("div",{className:"flex items-center justify-center gap-1.5","aria-hidden":!0,children:[c.jsx("span",{className:"h-px w-6 bg-border/50"}),c.jsx(Zg,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),c.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function u0({column:e,id:t,showClear:n}){const r=e.getFilterValue();return c.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[c.jsx(gr,{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()?c.jsx(Sn,{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:c.jsx($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function f0({column:e,id:t,showClear:n}){var u;const r=e.getFilterValue(),o=sw(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(iw(h))},d=((u=os.find(h=>h.value===a))==null?void 0:u.label)??a,p=e.getIsFiltered();return c.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[c.jsxs(us,{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"min-w-0 flex-1",children:i?c.jsx(gr,{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"}):c.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:d})}),c.jsx(fs,{className:"p-0",children:c.jsxs(Vo,{children:[c.jsx(Yo,{asChild:!0,children:c.jsx(Sn,{type:"button",variant:"ghost",size:"sm",className:P("h-8 min-w-8 shrink-0 rounded-none px-2 text-muted-foreground transition-colors",p&&"text-primary"),"aria-label":`${t} filter operator: ${d}`,children:c.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[c.jsx(em,{className:"size-4","aria-hidden":!0}),p?c.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]})})}),c.jsx(Nr,{align:"end",className:"min-w-44",children:c.jsx(_f,{value:a,onValueChange:h=>{rs(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:os.map(h=>c.jsx(Gs,{value:h.value,children:h.label},h.value))})})]})})]}),n&&p?c.jsx(Sn,{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:c.jsx($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function p0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===as)?c.jsx(f0,{column:e,id:r,showClear:n}):c.jsx(u0,{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 zf(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+zf(n),0)}function h0({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),d=e.getPageCount(),p=f.useMemo(()=>{const u=[...new Set(n)].sort((h,g)=>h-g);return u.includes(a)||(u.push(a),u.sort((h,g)=>h-g)),u},[n,a]);return c.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:[c.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:s===0?"No rows.":c.jsxs(c.Fragment,{children:["Showing"," ",c.jsx("span",{className:"text-foreground",children:i}),"–",c.jsx("span",{className:"text-foreground",children:l})," of ",c.jsx("span",{className:"text-foreground",children:s})]})}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm text-muted-foreground",children:"Rows per page"}),c.jsxs(Ms,{value:String(a),onValueChange:u=>{e.setPageSize(Number(u))},children:[c.jsx(Fo,{size:"sm",className:"w-18","aria-label":"Rows per page",children:c.jsx(Ds,{})}),c.jsx(Wo,{children:p.map(u=>c.jsx(Ps,{value:String(u),children:u},u))})]})]}),c.jsx(ys,{page:o+1,totalPages:Math.max(1,d),onPageChange:u=>e.setPageIndex(u-1),siblingCount:r})]})]})}function g0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:l,rowSelection:d,onRowSelectionChange:p,enableColumnResizing:u=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:b,columnOrder:y,onColumnOrderChange:x,enableColumnPinning:N=!1,defaultColumnPinning:M,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:D=!1,showGlobalFilter:E=!0,globalFilterPlaceholder:I="Search…",defaultGlobalFilter:R="",globalFilter:B,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:z=!0,showColumnFilterClear:K=!0,defaultColumnFilters:G,columnFilters:A,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:O,expanded:F,onExpandedChange:V,getRowCanExpand:$,renderExpandedRow:Z,showExpandColumn:W=!1,expandedRowClassName:U,enableGrouping:X=!1,defaultGrouping:se,grouping:de,onGroupingChange:ce,showGroupingDropZone:Me=!0,groupingDropZoneLabel:Ee="Drag column headers here to set row groups.",groupingDropZoneHint:tt="Drag to add another group level.",isLoading:Ue=!1,loadingRows:Fe=5,emptyState:Zt,enableColumnVisibility:De=!1,defaultColumnVisibility:zr,columnVisibility:Br,onColumnVisibilityChange:_e,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:gn=48,virtualOverscan:Qt=8,enableFooter:Un=!1,enableScrollContainerResize:kt=!1,scrollContainerResizeMaxHeight:Jt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:Rn=!1,manualPagination:pt=!1,rowCount:Kn,pageCount:qn,defaultPagination:ht,pagination:Xn,onPaginationChange:Zn,pageSizeOptions:mn=[10,20,50,100],paginationSiblingCount:Re=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Ne]=ct(a,s,ue,J),[Oe,en]=f.useState(l??{}),[xe,Te]=ct(d,p,Oe,en),[Qn,Ke]=f.useState(g??{}),[qe,Jo]=ct(w,m,Qn,Ke),[Wt,Hh]=f.useState(b??[]),[bN,yN]=ct(y,x,Wt,Hh),[wN,xN]=f.useState(M??{left:[],right:[]}),[CN,SN]=ct(C,k,wN,xN),[NN,kN]=f.useState(R??""),[ea,Mi]=ct(B,q,NN,kN),[MN,DN]=f.useState(G??[]),[EN,TN]=ct(A,Q,MN,DN),[PN,_N]=f.useState(O??{}),[ON,Vh]=ct(F,V,PN,_N),[IN,AN]=f.useState(se??[]),[Di,Lr]=ct(de,ce,IN,AN),[FN,WN]=f.useState(zr??{}),[$N,zN]=ct(Br,_e,FN,WN),Ei=!!(Rn&&!X),[BN,LN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[HN,VN]=ct(Xn,Zn,BN,LN),YN=D||Y,vn=!!(oe&&Z&&!X),Ti=f.useMemo(()=>!vn||!W||t.some(L=>L.id===It)?t:[{id:It,header:()=>null,size:48,minSize:40,maxSize:56,enableSorting:!1,enableColumnFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,meta:{bookersExpandColumn:!0},cell:({row:L})=>c.jsx("button",{type:"button",className:P("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]",!L.getCanExpand()&&"cursor-not-allowed opacity-40"),onClick:L.getToggleExpandedHandler(),"aria-expanded":L.getIsExpanded(),"aria-label":L.getIsExpanded()?"Collapse row details":"Expand row details",disabled:!L.getCanExpand(),children:c.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",L.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})})},...t],[t,vn,W]),GN=f.useMemo(()=>Un&&Ti.some(Wf),[Un,Ti]),Yh=f.useMemo(()=>{const _={};return u&&(_.minSize=72,_.size=160,_.maxSize=640),Y&&(_.filterFn=z?as:"includesString"),Object.keys(_).length>0?_:void 0},[u,Y,z]),ta=f.useRef(null),Jn=f.useRef(0),[jN,na]=f.useState(!1),gt=He.useReactTable({data:e,columns:Ti,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...YN?{getFilteredRowModel:He.getFilteredRowModel(),...D?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Mi}:{},...Y?{onColumnFiltersChange:TN}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Ne}:{},...Ei?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:VN,...pt?{manualPagination:!0,...Kn!==void 0?{rowCount:Kn}:{},...qn!==void 0?{pageCount:qn}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...u?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Jo}:{},...Yh?{defaultColumn:Yh}:{},...v?{onColumnOrderChange:yN}:{},enableColumnPinning:N,onColumnPinningChange:SN,...De?{enableHiding:!0,onColumnVisibilityChange:zN}:{enableHiding:!1},...vn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:$??(()=>!0),onExpandedChange:Vh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:Lr,onExpandedChange:Vh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:xe}:{},...u?{columnSizing:qe}:{},...v?{columnOrder:bN}:{},columnPinning:CN,...D?{globalFilter:ea}:{},...Y?{columnFilters:EN}:{},...X?{grouping:Di}:{},...X||vn?{expanded:ON}:{},...De?{columnVisibility:$N}:{},...Ei?{pagination:HN}:{}},...n?{getRowId:(_,L)=>String(n(_,L))}:{}}),Hr=gt.getVisibleLeafColumns().length,Vr=gt.getRowModel().rows,Gh=f.useRef(null),er=ft&&!X&&!vn&&Vr.length>0&&!Ue,Pi=f.useRef(null),UN=f.useCallback(_=>{Pi.current=_,Gh.current=er?_:null},[er]),bn=f.useMemo(()=>{const _=c0(),L=$f(Le,_.minPx),H=$f(Jt,_.maxPx);return{minPx:Math.min(L,H),maxPx:Math.max(L,H)}},[Le,Jt]),[ra,jh]=f.useState(()=>kt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!kt||ra!==null)return;const _=Pi.current;_&&jh(Uo(_.offsetHeight,bn.minPx,bn.maxPx))},[kt,ra,We,bn]);const Uh=Qh.useVirtualizer({count:Vr.length,getScrollElement:()=>Gh.current,estimateSize:()=>gn,overscan:Qt,enabled:er}),RN=_=>{var nt;const L=_.column.getCanSort(),H=_.column.getIsSorted(),fe=!!((nt=_.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(_.isPlaceholder)return null;if(!L||fe)return He.flexRender(_.column.columnDef.header,_.getContext());const ke=_.column.getToggleSortingHandler();return c.jsxs("button",{type:"button",className:P("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:ke,children:[He.flexRender(_.column.columnDef.header,_.getContext()),H==="asc"?c.jsx(Qr,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,H==="desc"?c.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]})},KN=(_,L)=>{!L||L===_||L===It||_===It||gt.setColumnOrder(H=>{const fe=H.length>0?H:gt.getAllLeafColumns().map(yn=>yn.id),ke=fe.indexOf(L),nt=fe.indexOf(_);if(ke===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(ke,1),Xe.splice(nt,0,L),W&&vn&&Xe.includes(It)){const yn=Xe.filter(Gr=>Gr!==It);return[It,...yn]}return Xe})},_i=gt.getHeaderGroups(),Rh=_i[0],Kh=2.5,qN=`${_i.length*Kh}rem`,Oi=_=>{const L=gt.getColumn(_);if(!L)return _;const H=L.columnDef.header;return typeof H=="string"?H:_},XN=(_,L)=>{_!==L&&Lr(H=>{const fe=[...H],ke=fe.filter(Xe=>Xe!==_),nt=ke.indexOf(L);return nt===-1?fe:(ke.splice(nt,0,_),ke)})},ZN=_=>{Lr(L=>{const fe=[...L].filter(ke=>ke!==_);return fe.push(_),fe})},QN=_=>{var H;if(_.getIsPlaceholder())return null;if(_.getIsAggregated())return He.flexRender(_.column.columnDef.aggregatedCell??_.column.columnDef.cell,_.getContext());const L=!!((H=_.column.columnDef.meta)!=null&&H.bookersSkipGroupRowExpand);if(X&&_.getIsGrouped()&&!L){const fe=_.row,ke=zf(fe);return c.jsxs("span",{className:"flex min-h-10 min-w-0 items-center gap-1.5",children:[c.jsx("button",{type:"button",className:P("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:c.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",fe.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 flex-1",children:He.flexRender(_.column.columnDef.cell,_.getContext())}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",ke,")"]})]})}return He.flexRender(_.column.columnDef.cell,_.getContext())},qh=_=>c.jsxs(f.Fragment,{children:[c.jsx(_t,{"data-selected":_.getIsSelected()?"true":void 0,children:_.getVisibleCells().map((L,H)=>{const fe=L.column.getIsPinned();return c.jsx(cn,{className:P(fe==="left"&&P("relative sticky z-30 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"),fe==="right"&&P("relative sticky z-30 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:{...H===0&&_.depth>0?{paddingLeft:`${_.depth*.75+.75}rem`}:{},...u||fe?{width:L.column.getSize(),minWidth:L.column.getSize(),maxWidth:L.column.getSize()}:{},...fe==="left"?{left:L.column.getStart("left")}:{},...fe==="right"?{right:L.column.getAfter("right")}:{}},children:QN(L)},L.id)})}),vn&&_.getIsExpanded()&&Z?c.jsx(_t,{"data-expanded-detail":_.id,children:c.jsx(cn,{colSpan:Hr,className:P("border-t border-border bg-muted/30 p-4 align-top",U),children:Z(_)})}):null]},_.id),Yr=er?Uh.getVirtualItems():[],Ii=er&&Yr.length>0,Xh=Ii?Yr[0].start:0,Zh=Ii?Uh.getTotalSize()-Yr[Yr.length-1].end:0,JN=kt?ra!==null?{height:ra}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return c.jsx(If.Provider,{value:gt,children:c.jsxs("div",{ref:re,className:P("w-full min-w-0",ie),...pe,children:[D&&E?c.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:c.jsxs("div",{className:"relative min-w-0 max-w-sm flex-1 self-start",children:[c.jsx(gr,{size:"sm",type:"text",placeholder:I,value:ea,onChange:_=>{Mi(_.target.value)},"aria-label":I,autoComplete:"off",className:P("min-w-0 w-full",ea.trim()!==""&&"pr-12")}),ea.trim()!==""?c.jsx(Sn,{type:"button",variant:"ghost",className:P("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:()=>Mi(""),children:c.jsx($t,{className:"size-3.5","aria-hidden":!0})}):null]})}):null,X&&Me?c.jsxs("div",{role:"region","aria-label":"Row groups",className:P("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",jN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:_=>{_.preventDefault();const L=Array.from(_.dataTransfer.types);_.dataTransfer.dropEffect=L.includes(Mr)?"move":"copy"},onDragEnter:_=>{_.preventDefault(),Jn.current+=1,na(!0)},onDragLeave:()=>{Jn.current-=1,Jn.current<=0&&(Jn.current=0,na(!1))},onDrop:_=>{_.preventDefault(),Jn.current=0,na(!1);const L=_.dataTransfer.getData(Mr);if(L){ZN(L);return}const H=_.dataTransfer.getData(Ff);if(!H)return;const fe=gt.getColumn(H);fe!=null&&fe.getCanGroup()&&Lr(ke=>{const Xe=[...ke].filter(yn=>yn!==H);return Xe.push(H),Xe})},children:[c.jsx("span",{className:"inline-flex size-10 shrink-0 items-center justify-center self-center rounded-sm text-muted-foreground",children:c.jsx(tm,{className:"size-4","aria-hidden":!0})}),c.jsx("div",{className:"flex min-h-8 min-w-0 flex-1 flex-wrap items-center gap-1",children:Di.length===0?c.jsx("span",{className:"text-sm text-muted-foreground select-none",children:Ee}):c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[Di.map((_,L)=>c.jsxs(f.Fragment,{children:[L>0?c.jsx(wn,{className:"size-3.5 shrink-0 text-muted-foreground/80","aria-hidden":!0}):null,c.jsxs("div",{className:P("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:H=>{H.preventDefault(),H.stopPropagation(),Array.from(H.dataTransfer.types).includes(Mr)&&(H.dataTransfer.dropEffect="move")},onDrop:H=>{H.preventDefault(),H.stopPropagation(),Jn.current=0,na(!1);const fe=H.dataTransfer.getData(Mr);fe&&XN(fe,_)},children:[c.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Oi(_)}`,className:P("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:H=>{H.dataTransfer.setData(Mr,_),H.dataTransfer.effectAllowed="move"},children:c.jsx(Jg,{className:"size-4","aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Oi(_)}),c.jsx("button",{type:"button","aria-label":`Remove ${Oi(_)} from row groups`,className:P("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:()=>{Lr(H=>[...H].filter(fe=>fe!==_))},children:c.jsx($t,{className:"size-3.5","aria-hidden":!0})})]})]},_)),c.jsx("span",{className:"text-xs text-muted-foreground select-none",children:tt})]})})]}):null,c.jsxs("div",{className:"w-full",children:[c.jsx("div",{ref:UN,className:P("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",er&&"[overflow-anchor:none]"),style:JN,children:c.jsxs(ss,{className:P(u&&"table-fixed"),style:u?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[c.jsxs(is,{children:[_i.map((_,L)=>c.jsx(_t,{children:_.headers.map(H=>{const fe=`${L*Kh}rem`,ke=H.column.getIsPinned(),nt=u&&H.column.getCanResize()&&!H.isPlaceholder,Xe=H.column.id===It,yn=v&&!H.isPlaceholder&&!Xe&&(!H.subHeaders||H.subHeaders.length===0),Gr=X&&!H.isPlaceholder&&!Xe&&H.column.getCanGroup()&&(!H.subHeaders||H.subHeaders.length===0);return c.jsxs(Po,{colSpan:H.colSpan,className:P("relative sticky z-30 bg-background",ke==="left"&&P("z-50 bg-background",!H.column.getIsLastColumn("left")&&"border-r border-border",H.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),ke==="right"&&P("z-50 bg-background",!H.column.getIsFirstColumn("right")&&"border-l border-border",H.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,...(u||ke)&&!H.isPlaceholder?{width:H.getSize(),minWidth:H.getSize(),maxWidth:H.getSize()}:{},...ke==="left"?{left:H.column.getStart("left")}:{},...ke==="right"?{right:H.column.getAfter("right")}:{}},onDragOver:v?$e=>{$e.preventDefault(),$e.dataTransfer.dropEffect="move"}:void 0,onDrop:v?$e=>{$e.preventDefault();const ek=$e.dataTransfer.getData("application/x-bookers-column-id")||ta.current;KN(H.column.id,ek),ta.current=null}:void 0,children:[c.jsxs("span",{className:P("flex min-h-10 min-w-0 items-center gap-1",nt?"pr-1":"pr-2"),children:[yn?c.jsx("span",{draggable:!0,"aria-label":`Reorder column ${H.column.id}`,className:P("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=>{ta.current=H.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",H.column.id)},onDragEnd:()=>{ta.current=null},children:c.jsx(Qg,{className:"size-4","aria-hidden":"true"})}):null,c.jsx("span",{className:P("min-w-0 flex-1",Gr&&"cursor-grab active:cursor-grabbing"),draggable:Gr,onDragStart:Gr?$e=>{$e.dataTransfer.setData(Ff,H.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:RN(H)})]}),nt?c.jsx("div",{"data-column-resize-handle":H.column.id,onClick:$e=>$e.stopPropagation(),onMouseDown:H.getResizeHandler(),onTouchStart:H.getResizeHandler(),className:P("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",H.column.getIsResizing()?"opacity-100":"opacity-75 hover:opacity-100"),"aria-hidden":!0,children:c.jsx("span",{className:"h-1/2 w-[3px] rounded-full bg-border"})}):null]},H.id)})},_.id)),Y&&ae&&Rh?c.jsx(_t,{children:Rh.headers.map(_=>{const L=_.column.getIsPinned();return c.jsx(Po,{colSpan:_.colSpan,className:P("relative sticky z-30 bg-background py-2",L==="left"&&P("z-50 bg-background",!_.column.getIsLastColumn("left")&&"border-r border-border",_.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),L==="right"&&P("z-50 bg-background",!_.column.getIsFirstColumn("right")&&"border-l border-border",_.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:qN,...(u||L)&&!_.isPlaceholder?{width:_.getSize(),minWidth:_.getSize(),maxWidth:_.getSize()}:{},...L==="left"?{left:_.column.getStart("left")}:{},...L==="right"?{right:_.column.getAfter("right")}:{}},children:!_.isPlaceholder&&_.column.getCanFilter()?c.jsx(p0,{column:_.column,enableAdvancedColumnFilters:z,showColumnFilterClear:K}):null},`filter-${_.id}`)})}):null]}),c.jsx(ls,{children:Ue?Array.from({length:Fe}).map((_,L)=>c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,children:c.jsx(ds,{className:"h-4 w-full"})})},L)):Vr.length===0?c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,className:"h-24 text-center text-sm text-muted-foreground",children:Zt??"No results."})}):Ii?c.jsxs(c.Fragment,{children:[Xh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:Xh}})}):null,Yr.map(_=>{const L=Vr[_.index];return qh(L)}),Zh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:Zh}})}):null]}):Vr.map(_=>qh(_))}),GN?c.jsx(cs,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(_=>c.jsx(_t,{children:_.headers.map(L=>{const H=L.column.getIsPinned();return c.jsx(cn,{colSpan:L.colSpan,className:P("border-border text-sm font-medium text-foreground",H==="left"&&P("relative sticky z-30 bg-muted/50",!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"),H==="right"&&P("relative sticky z-30 bg-muted/50",!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:{...(u||H)&&!L.isPlaceholder?{width:L.getSize(),minWidth:L.getSize(),maxWidth:L.getSize()}:{},...H==="left"?{left:L.column.getStart("left")}:{},...H==="right"?{right:L.column.getAfter("right")}:{}},children:L.isPlaceholder?null:He.flexRender(L.column.columnDef.footer,L.getContext())},L.id)})},_.id))}):null]})}),Ei?c.jsx(h0,{table:gt,manualPagination:pt,pageSizeOptions:mn,paginationSiblingCount:Re}):null,kt?c.jsx(d0,{scrollRegionRef:Pi,minPx:bn.minPx,maxPx:bn.maxPx,onHeightChange:_=>jh(Uo(_,bn.minPx,bn.maxPx))}):null]})]})})}const Bf=f.forwardRef(g0);Bf.displayName="DataTable";const m0={bookersColumnHeaderActions:!0};function v0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function b0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),l=e.getCanPin(),d=e.getIsSorted(),p=e.getIsPinned(),u=Af(),h=!!(u!=null&&u.options.enableHiding&&u.getAllLeafColumns().some(g=>g.getCanHide()));return c.jsxs("div",{ref:a,className:P("flex min-w-0 items-center gap-0.5",r),...o,children:[i?c.jsxs("button",{type:"button",className:P("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:[c.jsx("span",{className:"min-w-0 truncate",children:s}),d==="asc"?c.jsx(Qr,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,d==="desc"?c.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]}):c.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:c.jsx("span",{className:"min-w-0 truncate",children:s})}),(i||l||h)&&c.jsxs(Vo,{children:[c.jsx(Yo,{asChild:!0,children:c.jsx("button",{type:"button",className:P("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:c.jsx(Kg,{className:"size-3.5","aria-hidden":"true"})})}),c.jsxs(Nr,{align:"end",className:"min-w-44",children:[i?c.jsxs(c.Fragment,{children:[c.jsx(kr,{children:"Sort"}),c.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!1)},children:[c.jsx(Lg,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),c.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!0)},children:[c.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),c.jsx(Ot,{disabled:d===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?c.jsx(zn,{}):null,l?c.jsxs(Vs,{children:[c.jsxs(Go,{children:[c.jsx(rm,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),c.jsxs(jo,{children:[c.jsx(Ot,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),c.jsx(Ot,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),c.jsxs(Ot,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[c.jsx(nm,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&u&&(i||l)?c.jsx(zn,{}):null,h&&u?c.jsxs(Vs,{children:[c.jsxs(Go,{children:[c.jsx(Rg,{className:"size-4","aria-hidden":"true"}),"Columns"]}),c.jsxs(jo,{className:"min-w-48",children:[c.jsx(kr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),c.jsx(zn,{}),u.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>c.jsx(Ys,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:v0(g)},g.id))]})]}):null]})]})]})}const Lf=f.forwardRef(b0);Lf.displayName="DataTableColumnHeader";const Hf=6048e5,y0=864e5,Vf=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Vf in e?e[Vf](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return Se(t||e,e)}function Yf(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(t)?Se(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Gf(e,t,n){const r=ve(e,n==null?void 0:n.in);if(isNaN(t))return Se(e,NaN);if(!t)return r;const o=r.getDate(),a=Se(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 w0={};function Dr(){return w0}function Bn(e,t){var i,l,d,p;const n=Dr(),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=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 Er(e,t){return Bn(e,{...t,weekStartsOn:1})}function jf(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Se(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Er(o),s=Se(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Er(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Uf(e){const t=ve(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=Se.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Tr(e,t){const n=ve(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function js(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=Tr(r),s=Tr(o),i=+a-Uf(a),l=+s-Uf(s);return Math.round((i-l)/y0)}function x0(e,t){const n=jf(e,t),r=Se(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Er(r)}function C0(e,t,n){return Yf(e,t*7,n)}function S0(e,t,n){return Gf(e,t*12,n)}function N0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Se.bind(null,o));const a=ve(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function k0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Se.bind(null,o));const a=ve(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function M0(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function Rf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function D0(e){return!(!Rf(e)&&typeof e!="number"||isNaN(+ve(e)))}function Kf(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 E0(e,t){const n=ve(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 qf(e,t){const[n,r]=Ln(e,t.start,t.end);return{start:n,end:r}}function T0(e,t){const{start:n,end:r}=qf(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(Se(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function P0(e,t){const n=ve(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _0(e,t){const n=ve(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 Xf(e,t){const n=ve(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function O0(e,t){const{start:n,end:r}=qf(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(Se(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function Zf(e,t){var i,l,d,p;const n=Dr(),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=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 I0(e,t){return Zf(e,{...t,weekStartsOn:1})}const A0={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"}},F0=(e,t,n)=>{let r;const o=A0[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 Us(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const W0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},z0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B0={date:Us({formats:W0,defaultWidth:"full"}),time:Us({formats:$0,defaultWidth:"full"}),dateTime:Us({formats:z0,defaultWidth:"full"})},L0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H0=(e,t,n,r)=>L0[e];function Pr(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 V0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Y0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G0={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"]},j0={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"]},U0={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"}},R0={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"}},K0={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:Pr({values:V0,defaultWidth:"wide"}),quarter:Pr({values:Y0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pr({values:G0,defaultWidth:"wide"}),day:Pr({values:j0,defaultWidth:"wide"}),dayPeriod:Pr({values:U0,defaultWidth:"wide",formattingValues:R0,defaultFormattingWidth:"wide"})};function _r(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)?X0(i,u=>u.test(s)):q0(i,u=>u.test(s));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const p=t.slice(s.length);return{value:d,rest:p}}}function q0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function X0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Z0(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 Q0=/^(\d+)(th|st|nd|rd)?/i,J0=/\d+/i,eC={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},tC={any:[/^b/i,/^(a|c)/i]},nC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rC={any:[/1/i,/2/i,/3/i,/4/i]},oC={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},aC={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]},sC={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},iC={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]},lC={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},cC={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}},dC={ordinalNumber:Z0({matchPattern:Q0,parsePattern:J0,valueCallback:e=>parseInt(e,10)}),era:_r({matchPatterns:eC,defaultMatchWidth:"wide",parsePatterns:tC,defaultParseWidth:"any"}),quarter:_r({matchPatterns:nC,defaultMatchWidth:"wide",parsePatterns:rC,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_r({matchPatterns:oC,defaultMatchWidth:"wide",parsePatterns:aC,defaultParseWidth:"any"}),day:_r({matchPatterns:sC,defaultMatchWidth:"wide",parsePatterns:iC,defaultParseWidth:"any"}),dayPeriod:_r({matchPatterns:lC,defaultMatchWidth:"any",parsePatterns:cC,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:F0,formatLong:B0,formatRelative:H0,localize:K0,match:dC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uC(e,t){const n=ve(e,t==null?void 0:t.in);return js(n,Xf(n))+1}function Rs(e,t){const n=ve(e,t==null?void 0:t.in),r=+Er(n)-+x0(n);return Math.round(r/Hf)+1}function Qf(e,t){var p,u,h,g;const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((u=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:u.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=Se((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Bn(s,t),l=Se((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=Bn(l,t);return+n>=+i?r+1:+n>=+d?r:r-1}function fC(e,t){var i,l,d,p;const n=Dr(),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=(d=n.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=Qf(e,t),a=Se((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Bn(a,t)}function Ks(e,t){const n=ve(e,t==null?void 0:t.in),r=+Bn(n,t)-+fC(n,t);return Math.round(r/Hf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={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)}},Vn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jf={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 Xt.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=jf(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 Xt.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=Ks(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Rs(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"}):Xt.d(e,t)},D:function(e,t,n){const r=uC(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=Vn.noon:r===0?o=Vn.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=Vn.evening:r>=12?o=Vn.afternoon:r>=4?o=Vn.morning:o=Vn.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 Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.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"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tp(r);case"XXXX":case"XX":return pn(r);case"XXXXX":case"XXX":default:return pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tp(r);case"xxxx":case"xx":return pn(r);case"xxxxx":case"xxx":default:return pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ep(r,":");case"OOOO":default:return"GMT"+pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ep(r,":");case"zzzz":default:return"GMT"+pn(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 ep(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 tp(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):pn(e,t)}function pn(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 np=(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"})}},rp=(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"})}},pC={p:rp,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return np(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}}",np(r,t)).replace("{{time}}",rp(o,t))}},hC=/^D+$/,gC=/^Y+$/,mC=["D","DD","YY","YYYY"];function vC(e){return hC.test(e)}function bC(e){return gC.test(e)}function yC(e,t,n){const r=wC(e,t,n);if(console.warn(r),mC.includes(e))throw new RangeError(r)}function wC(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 xC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SC=/^'([^]*?)'?$/,NC=/''/g,kC=/[a-zA-Z]/;function Yn(e,t,n){var p,u,h,g,w,m,v,b;const r=Dr(),o=(n==null?void 0:n.locale)??r.locale??Hn,a=(n==null?void 0:n.firstWeekContainsDate)??((u=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:u.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??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,i=ve(e,n==null?void 0:n.in);if(!D0(i))throw new RangeError("Invalid time value");let l=t.match(CC).map(y=>{const x=y[0];if(x==="p"||x==="P"){const N=pC[x];return N(y,o.formatLong)}return y}).join("").match(xC).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:MC(y)};if(Jf[x])return{isToken:!0,value:y};if(x.match(kC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(y=>{if(!y.isToken)return y.value;const x=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bC(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&vC(x))&&yC(x,t,String(e));const N=Jf[x[0]];return N(i,x,o.localize,d)}).join("")}function MC(e){const t=e.match(SC);return t?t[1].replace(NC,"'"):e}function DC(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Se(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function EC(e,t){return ve(e,t==null?void 0:t.in).getMonth()}function TC(e,t){return ve(e,t==null?void 0:t.in).getFullYear()}function PC(e,t){return+ve(e)>+ve(t)}function _C(e,t){return+ve(e)<+ve(t)}function OC(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 IC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function AC(e,t,n){const r=ve(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Se(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=DC(s);return r.setMonth(t,Math.min(a,i)),r}function FC(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(+r)?Se(e,NaN):(r.setFullYear(t),r)}function WC(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 qs={},Or={};function hn(e,t){try{const r=(qs[e]||(qs[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Or?Or[r]:op(r,r.split(":"))}catch{if(e in Or)return Or[e];const n=e==null?void 0:e.match($C);return n?op(e,n.slice(1)):NaN}}const $C=/([+-]\d\d):?(\d\d)?/;function op(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Or[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(hn(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)),sp(this),Xs(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=-hn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Xs(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const ap=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ap.test(e))return;const t=e.replace(ap,"$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),zC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Xs(this),+this}))});function Xs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-hn(e.timeZone,e)*60))}function zC(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()),sp(e)}function sp(e){const t=hn(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 d=new Date(+e);d.setUTCSeconds(0);const p=o>0?d.getSeconds():(d.getSeconds()-60)%60,u=Math.round(-(hn(e.timeZone,e)*60))%60;(u||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+p));const h=hn(e.timeZone,e),g=h>0?Math.floor(h):Math.ceil(h),m=-new Date(+e).getTimezoneOffset()-g,v=g!==n,b=m-l;if(v&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const y=hn(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),N=g-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Ae extends xt{static tz(t,...n){return n.length?new Ae(...n,t):new Ae(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} (${WC(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 Ae(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ae(+new Date(t),this.timeZone)}}const ip=5,BC=4;function LC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,ip*7-1);return t.getMonth(e)===t.getMonth(a)?ip:BC}function lp(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 HC(e,t){const n=lp(e,t),r=LC(e,t);return t.addDays(n,r*7-1)}const cp={...Hn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Yn(s,i,{locale:Hn,...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)=>Yn(o,a,{locale:Hn,...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)=>Yn(s,i,{locale:Hn,...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)=>Yn(o,a,{locale:Hn,...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?Ae.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 Ae(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):Yf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Gf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):C0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):S0(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):js(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Kf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):T0(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):O0(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):HC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):I0(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):E0(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Zf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):_0(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Yn(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):Rs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):EC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):TC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Ks(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):PC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):_C(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Rf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):M0(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):OC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):IC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):N0(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):k0(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):AC(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):lp(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Tr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Er(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):P0(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Bn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Xf(r)},this.options={locale:cp,...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 dp{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 VC{constructor(t,n){this.date=t,this.weeks=n}}class YC{constructor(t,n){this.days=n,this.weekNumber=t}}function GC(e){return S.createElement("button",{...e})}function jC(e){return S.createElement("span",{...e})}function UC(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 RC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function KC(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 we;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(we||(we={}));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 qC(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:d,disabled:p})=>S.createElement(r.Option,{key:l,value:l,disabled:p},d))),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 XC(e){return S.createElement("div",{...e})}function ZC(e){return S.createElement("div",{...e})}function QC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function JC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function e1(e){return S.createElement("table",{...e})}function t1(e){return S.createElement("div",{...e})}const up=S.createContext(void 0);function Ir(){const e=S.useContext(up);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function n1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}function r1(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:d}}=Ir(),p=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),u=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:u},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":d(o),onClick:p},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function o1(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function a1(e){return S.createElement("option",{...e})}function s1(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function i1(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function l1(e){return S.createElement("select",{...e})}function c1(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function d1(e){return S.createElement("th",{...e})}function u1(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function f1(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function p1(e){return S.createElement("th",{...e})}function h1(e){return S.createElement("tbody",{...e})}function g1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}const m1=Object.freeze(Object.defineProperty({__proto__:null,Button:GC,CaptionLabel:jC,Chevron:UC,Day:RC,DayButton:KC,Dropdown:qC,DropdownNav:XC,Footer:ZC,Month:QC,MonthCaption:JC,MonthGrid:e1,Months:t1,MonthsDropdown:n1,Nav:r1,NextMonthButton:o1,Option:a1,PreviousMonthButton:s1,Root:i1,Select:l1,Week:c1,WeekNumber:f1,WeekNumberHeader:p1,Weekday:d1,Weekdays:u1,Weeks:h1,YearsDropdown:g1},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 Zs(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ro(e){return!!(e&&typeof e=="object"&&"from"in e)}function Qs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Js(e){return!!(e&&typeof e=="object"&&"before"in e)}function fp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function pp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ft(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(pp(i,n))return i.some(l=>o(e,l));if(Ro(i))return At(i,e,!1,n);if(fp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Zs(i)){const l=a(i.before,e),d=a(i.after,e),p=l>0,u=d<0;return s(i.before,i.after)?u&&p:p||u}return Qs(i)?a(e,i.after)>0:Js(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function v1(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:d,today:p=o.today()}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,b=n&&g(n),y=r&&m(r),x={[we.focused]:[],[we.outside]:[],[we.disabled]:[],[we.hidden]:[],[we.today]:[]},N={};for(const M of e){const{date:C,displayMonth:k}=M,D=!!(k&&!h(C,k)),E=!!(b&&w(C,b)),I=!!(y&&v(C,y)),R=!!(a&&Ft(C,a,o)),B=!!(s&&Ft(C,s,o))||E||I||!d&&!l&&D||d&&l===!1&&D,q=u(C,p);D&&x.outside.push(M),R&&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&&Ft(C,ae,o)&&(N[Y]?N[Y].push(M):N[Y]=[M])})}return M=>{const C={[we.focused]:!1,[we.disabled]:!1,[we.hidden]:!1,[we.outside]:!1,[we.today]:!1},k={};for(const D in x){const E=x[D];C[D]=E.some(I=>I===M)}for(const D in N)k[D]=N[D].some(E=>E===M);return{...C,...k}}}function b1(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[we[a]]?o.push(t[we[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function y1(e){return{...m1,...e}}function w1(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 x1(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in we)e[we[t]]=`rdp-${we[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 hp(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const C1=hp;function S1(e,t,n){return(n??new Ge(t)).format(e,"d")}function N1(e,t=Ct){return t.format(e,"LLLL")}function k1(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function M1(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function D1(){return""}function gp(e,t=Ct){return t.format(e,"yyyy")}const E1=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:hp,formatDay:S1,formatMonthCaption:C1,formatMonthDropdown:N1,formatWeekNumber:M1,formatWeekNumberHeader:D1,formatWeekdayName:k1,formatYearCaption:gp,formatYearDropdown:gp},Symbol.toStringTag,{value:"Module"}));function T1(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...E1,...e}}function ei(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 P1=ei;function ti(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const _1=ti;function mp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function vp(e){return"Choose the Month"}function bp(){return""}const O1="Go to the Next Month";function yp(e,t){return O1}function wp(e){return"Go to the Previous Month"}function xp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function Cp(e,t){return`Week ${e}`}function Sp(e){return"Week Number"}function Np(e){return"Choose the Year"}const I1=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:_1,labelDay:P1,labelDayButton:ei,labelGrid:ti,labelGridcell:mp,labelMonthDropdown:vp,labelNav:bp,labelNext:yp,labelPrevious:wp,labelWeekNumber:Cp,labelWeekNumberHeader:Sp,labelWeekday:xp,labelYearDropdown:Np},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function A1(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...I1,...e??{},labelDayButton:ut(ei,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(vp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(yp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(wp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(Cp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(Np,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(ti,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(mp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(bp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(Sp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(xp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function F1(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:d}=o;return l({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=d(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function W1(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 $1(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 z1(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,d=a(e),p=s(t),u=i({start:d,end:p});return o&&u.reverse(),u.map(h=>{const g=n.formatYearDropdown(h,r);return{value:l(h),label:g,disabled:!1}})}function B1(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 d=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ae(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},s=l=>{const d=a(l);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(Ae.tz(e)),newDate:(l,d,p)=>new Ae(l,d,p,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,d)=>{const p=a(l),u=(d==null?void 0:d.weekStartsOn)??o,h=(p.getDay()-u+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:l=>{const d=a(l),p=(d.getDay()-1+7)%7;return d.setDate(d.getDate()-p),d},startOfMonth:l=>{const d=a(l);return d.setDate(1),d},startOfYear:l=>{const d=a(l);return d.setMonth(0,1),d},endOfWeek:(l,d)=>{const p=a(l),g=((((d==null?void 0:d.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:l=>{const d=a(l),p=(7-d.getDay())%7;return d.setDate(d.getDate()+p),d},endOfMonth:l=>{const d=a(l);return d.setMonth(d.getMonth()+1,0),d},endOfYear:l=>{const d=a(l);return d.setMonth(11,31),d},eachMonthOfInterval:l=>{const d=a(l.start),p=a(l.end),u=[],h=new Ae(d.getFullYear(),d.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)u.push(new Ae(h,e)),h.setMonth(h.getMonth()+1,1);return u},addDays:(l,d)=>{const p=a(l);return p.setDate(p.getDate()+d),p},addWeeks:(l,d)=>{const p=a(l);return p.setDate(p.getDate()+d*7),p},addMonths:(l,d)=>{const p=a(l);return p.setMonth(p.getMonth()+d),p},addYears:(l,d)=>{const p=a(l);return p.setFullYear(p.getFullYear()+d),p},eachYearOfInterval:l=>{const d=a(l.start),p=a(l.end),u=[],h=new Ae(d.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)u.push(new Ae(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return u},getWeek:(l,d)=>{var u;const p=s(l);return Ks(p,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((u=r==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??1})},getISOWeek:l=>{const d=s(l);return Rs(d)},differenceInCalendarDays:(l,d)=>{const p=s(l),u=s(d);return js(p,u)},differenceInCalendarMonths:(l,d)=>{const p=s(l),u=s(d);return Kf(p,u)}}}const Ar=e=>e instanceof HTMLElement?e:null,ni=e=>[...e.querySelectorAll("[data-animated-month]")??[]],L1=e=>Ar(e.querySelector("[data-animated-month]")),ri=e=>Ar(e.querySelector("[data-animated-caption]")),oi=e=>Ar(e.querySelector("[data-animated-weeks]")),H1=e=>Ar(e.querySelector("[data-animated-nav]")),V1=e=>Ar(e.querySelector("[data-animated-weekdays]"));function Y1(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 d=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const p=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[je.caption_after_enter]:n[je.caption_before_enter],g=u?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(ni(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=L1(x);N&&x.contains(N)&&x.removeChild(N);const M=ri(x);M&&M.classList.remove(h);const C=oi(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?ni(w):[],b=ni(e.current);if(b!=null&&b.every(y=>y instanceof HTMLElement)&&v&&v.every(y=>y instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const y=H1(e.current);y&&(y.style.zIndex="1"),b.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=ri(x);C&&C.classList.add(h);const k=oi(x);k&&k.classList.add(g);const D=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.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 E=V1(M);E&&(E.style.opacity="0");const I=ri(M);I&&(I.classList.add(u?n[je.caption_before_exit]:n[je.caption_after_exit]),I.addEventListener("animationend",D));const R=oi(M);R&&R.classList.add(u?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function G1(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:d,differenceInCalendarDays:p,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:y,startOfWeek:x}=r,N=l?b(o,r):s?y(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,D=p(k,N),E=u(a,o)+1,I=[];for(let q=0;q<=D;q++){const Y=d(N,q);I.push(Y)}const B=(l?35:42)*E;if(i&&I.length<B){const q=B-I.length;for(let Y=0;Y<q;Y++){const ae=d(I[I.length-1],1);I.push(ae)}}return I}function j1(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 U1(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 kp(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:d,addMonths:p,startOfMonth:u}=r;if(n&&d(n,l)<i-1){const h=-1*(i-1);l=p(n,h)}return t&&d(l,t)<0&&(l=t),u(l)}function R1(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:d,getWeek:p,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const b=n.broadcastCalendar?u(v,r):n.ISOWeek?h(v):g(v),y=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(k=>k>=b&&k<=y),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const k=t.filter(D=>{const E=N-x.length;return D>y&&D<=o(y,E)});x.push(...k)}const M=x.reduce((k,D)=>{const E=n.ISOWeek?d(D):p(D),I=k.find(B=>B.weekNumber===E),R=new dp(D,v,r);return I?I.days.push(R):k.push(new YC(E,[R])),k},[]),C=new VC(v,M);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function K1(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:d,newDate:p,today:u}=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??u(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function q1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,d=o?a:1,p=s(e);if(!t)return i(p,d);if(!(l(t,e)<a))return i(p,d)}function X1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,d=o?a??1:1,p=s(e);if(!t)return i(p,-d);if(!(l(p,t)<=0))return i(p,-d)}function Z1(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Ko(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function Q1(e,t){var N;const[n,r]=K1(e,t),{startOfMonth:o,endOfMonth:a}=t,s=kp(e,n,r,t),[i,l]=Ko(s,e.month?s:void 0);S.useEffect(()=>{const M=kp(e,n,r,t);l(M)},[e.timeZone]);const{months:d,weeks:p,days:u,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const M=U1(i,r,{numberOfMonths:e.numberOfMonths},t),C=G1(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=R1(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=Z1(k),E=j1(k),I=X1(i,n,e,t),R=q1(i,r,e,t);return{months:k,weeks:D,days:E,previousMonth:I,nextMonth:R}},[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))),b=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:d,weeks:p,days:u,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:M=>{v(M)||b(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 Mp(e){return!e[we.disabled]&&!e[we.hidden]&&!e[we.outside]}function J1(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Mp(i)&&(i[we.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[we.today]&&a<St.Today&&(o=s,a=St.Today))}return o||(o=e.find(s=>Mp(t(s)))),o}function eS(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:d,addMonths:p,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:b,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:N}=s;let C={day:d,week:u,month:p,year:h,startOfWeek:k=>l?y(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=b([o,C])),C}function Dp(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=eS(e,t,n.date,r,o,a,s),d=!!(a.disabled&&Ft(l,a.disabled,s)),p=!!(a.hidden&&Ft(l,a.hidden,s)),u=l,h=new dp(l,u,s);return!d&&!p?h:Dp(e,t,h,r,o,a,s,i+1)}function tS(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=J1(t.days,n,r||(()=>!1),s),[d,p]=S.useState(a?l:void 0);return{isFocusTarget:m=>!!(l!=null&&l.isEqualTo(m)),setFocused:p,focused:d,blur:()=>{i(d),p(void 0)},moveFocus:(m,v)=>{if(!d)return;const b=Dp(m,v,d,t.navStart,t.navEnd,e,o);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),p(b)))}}}function nS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,d=g=>(i==null?void 0:i.some(w=>l(w,g)))??!1,{min:p,max:u}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(d(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(b=>!l(b,g))}else(i==null?void 0:i.length)===u?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:d}}function rS(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:d,isBefore:p}=a;let u;if(!s&&!i)u={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?u={from:s,to:e}:o?u={from:s,to:void 0}:u=void 0:p(e,s)?u={from:e,to:s}:u={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?u={from:s,to:i}:u=void 0;else if(l(s,e))u={from:s,to:n>0?void 0:e};else if(l(i,e))u={from:e,to:n>0?void 0:e};else if(p(e,s))u={from:e,to:i};else if(d(e,s))u={from:s,to:e};else if(d(e,i))u={from:s,to:e};else throw new Error("Invalid range");if(u!=null&&u.from&&(u!=null&&u.to)){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function oS(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 Ep(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 aS(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):pp(i,n)?i.some(l=>At(e,l,!1,n)):Ro(i)?i.from&&i.to?Ep(e,{from:i.from,to:i.to},n):!1:fp(i)?oS(e,i.dayOfWeek,n):Zs(i)?n.isAfter(i.before,i.after)?Ep(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Ft(e.from,i,n)||Ft(e.to,i,n):Qs(i)||Js(i)?Ft(e.from,i,n)||Ft(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 d=0;d<=l;d++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function sS(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,d]=Ko(a,i?a:void 0),p=i?a:l;return{selected:p,select:(g,w,m)=>{const{min:v,max:b}=e;let y;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?y=void 0:y={from:g,to:void 0}:y=rS(g,p,v,b,s,t)}return r&&n&&(y!=null&&y.from)&&y.to&&aS({from:y.from,to:y.to},n,t)&&(y.from=g,y.to=void 0),i||d(y),i==null||i(y,g,w,m),y},isSelected:g=>p&&At(p,g,!1,t)}}function iS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(u,h,g)=>{let w=u;return!r&&i&&i&&l(u,i)&&(w=void 0),o||s(w),o==null||o(w,u,h,g),w},isSelected:u=>i?l(i,u):!1}}function lS(e,t){const n=iS(e,t),r=nS(e,t),o=sS(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 Ae&&e.timeZone===t?e:new Ae(e,t)}function Gn(e,t,n){return et(e,t)}function Tp(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Gn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Gn(r,t):r):Ro(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Zs(e)?{before:Gn(e.before,t),after:Gn(e.after,t)}:Qs(e)?{after:Gn(e.after,t)}:Js(e)?{before:Gn(e.before,t)}:e}function ai(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Tp(r,t)):Tp(e,t))}function cS(e){var Re;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=(Re=t.selected)==null?void 0:Re.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=ai(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ai(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ai((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={...cp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?B1(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:y1(t.components),formatters:T1(t.formatters),labels:A1(t.labels,J.options),locale:ie,classNames:{...x1(),...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:d,mode:p,navLayout:u,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:b,onDayMouseLeave:y,onNextClick:x,onPrevClick:N,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:D,formatMonthDropdown:E,formatWeekNumber:I,formatWeekNumberHeader:R,formatWeekdayName:B,formatYearDropdown:q}=o,Y=Q1(t,s),{days:ae,months:z,navStart:K,navEnd:G,previousMonth:A,nextMonth:Q,goToMonth:oe}=Y,O=v1(ae,t,K,G,s),{isSelected:F,select:V,selected:$}=lS(t,s)??{},{blur:Z,focused:W,isFocusTarget:U,moveFocus:X,setFocused:se}=tS(t,Y,O,F??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:Me,labelMonthDropdown:Ee,labelNav:tt,labelPrevious:Ue,labelNext:Fe,labelWeekday:Zt,labelWeekNumber:De,labelWeekNumberHeader:zr,labelYearDropdown:Br}=a,_e=S.useMemo(()=>$1(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),ft=p!==void 0||w!==void 0,We=S.useCallback(()=>{A&&(oe(A),N==null||N(A))},[A,oe,N]),gn=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&&(V==null||V(ie.date,pe,re),w==null||w(ie.date,pe,re))},[V,w,se]),Un=S.useCallback((ie,pe)=>re=>{se(ie),m==null||m(ie.date,pe,re)},[m,se]),kt=S.useCallback((ie,pe)=>re=>{Z(),g==null||g(ie.date,pe,re)},[Z,g]),Jt=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=>{b==null||b(ie.date,pe,re)},[b]),Rn=S.useCallback((ie,pe)=>re=>{y==null||y(ie.date,pe,re)},[y]),pt=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setMonth(s.startOfMonth(ie),re);oe(ue)},[s,oe]),Kn=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setYear(s.startOfMonth(ie),re);oe(ue)},[s,oe]),{className:qn,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]),Xn=w1(t),Zn=S.useRef(null);Y1(Zn,!!t.animate,{classNames:l,months:z,focused:W,dateLib:s});const mn={dayPickerProps:t,selected:$,select:V,isSelected:F,months:z,nextMonth:Q,previousMonth:A,goToMonth:oe,getModifiers:O,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(up.Provider,{value:mn},S.createElement(r.Root,{rootRef:t.animate?Zn:void 0,className:qn,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"],...Xn},S.createElement(r.Months,{className:l[ee.Months],style:C==null?void 0:C[ee.Months]},!t.hideNavigation&&!u&&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:gn,previousMonth:A,nextMonth:Q}),z.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},u==="around"&&!t.hideNavigation&&pe===0&&S.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":Ue(A),onClick:We,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:A?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},d!=null&&d.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=d==="dropdown"||d==="dropdown-months"?S.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":Ee(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:pt(ie.date),options:F1(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},E(ie.date,s)),ue=d==="dropdown"||d==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Br(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Kn(ie.date),options:z1(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))),u==="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:gn,"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&&u==="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:gn,previousMonth:A,nextMonth:Q}),S.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Me(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":zr(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},R()),_e.map(re=>S.createElement(r.Weekday,{"aria-label":Zt(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":De(re.weekNumber,{locale:i}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},I(re.weekNumber,s)),re.days.map(ue=>{const{date:J}=ue,te=O(ue);if(te[we.focused]=!te.hidden&&!!(W!=null&&W.isEqualTo(ue)),te[dt.selected]=(F==null?void 0:F(J))||te.selected,Ro($)){const{from:xe,to:Te}=$;te[dt.range_start]=!!(xe&&Te&&s.isSameDay(J,xe)),te[dt.range_end]=!!(xe&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=At($,J,!0,s)}const Ne=W1(te,C,t.modifiersStyles),Oe=b1(te,l,t.modifiersClassNames),en=!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:Oe.join(" "),style:Ne,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":en,"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:U(ue)?0:-1,"aria-label":de(J,te,s.options,s),onClick:Qt(ue,te),onBlur:kt(ue,te),onFocus:Un(ue,te),onKeyDown:Jt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:Rn(ue,te)},D(J,s.options,s)):!te.hidden&&D(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 Pp=ye(["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}}),si=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Pp({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx(Hg,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:P("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));si.displayName="DatePickerTrigger";const ii=({className:e,classNames:t,...n})=>c.jsx(cS,{showOutsideDays:!0,className:P("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:P("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:P("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:P("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"?c.jsx(tl,{className:"size-4","aria-hidden":"true"}):c.jsx(wn,{className:"size-4","aria-hidden":"true"})},...n});ii.displayName="Calendar";const _p=ln;_p.displayName="DatePickerRoot";const Op=f.forwardRef(({className:e,align:t="start",...n},r)=>c.jsx(Ut,{ref:r,align:t,className:P("w-auto p-0",e),...n}));Op.displayName="DatePickerContent";const Ip=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[d,p]=f.useState(!1),u=e?Yn(e,r):void 0;return c.jsxs(ln,{open:d,onOpenChange:p,children:[c.jsx(hr,{asChild:!0,children:c.jsx(si,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":d,"aria-haspopup":"dialog",children:u})}),c.jsx(Ut,{className:"w-auto p-0",align:"start",children:c.jsx(ii,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Ip.displayName="DatePicker";const Ap=wc,Fp=yb,Wp=wb,$p=xc,li=f.forwardRef(({className:e,...t},n)=>c.jsx(Wa,{ref:n,className:P("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));li.displayName=Wa.displayName;const ci=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>c.jsxs($p,{children:[c.jsx(li,{}),c.jsx($a,{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:P("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})]}));ci.displayName=$a.displayName;const di=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});di.displayName="DialogHeader";const ui=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});ui.displayName="DialogFooter";const fi=f.forwardRef(({className:e,...t},n)=>c.jsx(Cc,{ref:n,className:P("text-lg font-semibold leading-none text-balance",e),...t}));fi.displayName=Cc.displayName;const pi=f.forwardRef(({className:e,...t},n)=>c.jsx(Sc,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));pi.displayName=Sc.displayName;const zp=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>c.jsxs(Ap,{...i,children:[e&&c.jsx(Fp,{asChild:!0,children:e}),c.jsxs(ci,{className:a,dismissible:s,children:[s&&c.jsx(Wp,{className:P("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:c.jsx($t,{className:"size-4","aria-hidden":"true"})}),c.jsxs(di,{children:[c.jsx(fi,{children:t}),n&&c.jsx(pi,{children:n})]}),r,o&&c.jsx(ui,{children:o})]})]});zp.displayName="Dialog";const Bp=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex flex-col gap-1.5",e),...t}));Bp.displayName="Field";const Lp=f.forwardRef(({className:e,required:t,children:n,...r},o)=>c.jsxs("label",{ref:o,className:P("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&c.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));Lp.displayName="Label";const Hp=f.forwardRef(({className:e,isError:t,...n},r)=>c.jsx("p",{ref:r,className:P("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));Hp.displayName="FieldMessage";function Vp(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const Yp=f.forwardRef(({accept:e,multiple:t,onFilesChange:n,isError:r,disabled:o,className:a},s)=>{const[i,l]=f.useState(!1),[d,p]=f.useState([]),[u,h]=f.useState({}),g=f.useRef(null),w=f.useCallback(E=>{g.current=E,typeof s=="function"?s(E):s&&(s.current=E)},[s]);f.useEffect(()=>{const E={};for(const I of d)I.type.startsWith("image/")&&(E[I.name]=URL.createObjectURL(I));return h(E),()=>{for(const I of Object.values(E))URL.revokeObjectURL(I)}},[d]);const m=E=>{p(E),n==null||n(E)},v=E=>{!E||E.length===0||m(Array.from(E))},b=E=>{m(d.filter(I=>I.name!==E))},y=E=>{E.preventDefault(),o||l(!0)},x=E=>{E.preventDefault()},N=E=>{E.preventDefault(),l(!1)},M=E=>{E.preventDefault(),l(!1),o||v(E.dataTransfer.files)},C=()=>{var E;o||(E=g.current)==null||E.click()},k=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),C())},D=d.length>0;return c.jsxs("div",{role:"button",tabIndex:o?-1:0,"aria-label":"Upload files","aria-invalid":r||void 0,"aria-disabled":o||void 0,onClick:C,onKeyDown:k,onDragEnter:y,onDragOver:x,onDragLeave:N,onDrop:M,className:P("relative flex flex-col gap-3 rounded-lg","min-h-40 cursor-pointer select-none p-6","border-2 border-dashed transition-[border-color,background-color]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",D?"items-start justify-start":"items-center justify-center text-center",i?"border-primary bg-primary/5":"border-input bg-background",r&&"border-destructive",o&&"pointer-events-none opacity-50",a),children:[D?c.jsxs("div",{className:"flex w-full flex-col gap-2",children:[d.map(E=>c.jsxs("div",{className:"flex items-center gap-3 rounded-md bg-muted/50 px-3 py-2",children:[u[E.name]?c.jsx("img",{src:u[E.name],alt:E.name,className:"size-8 shrink-0 rounded object-cover"}):c.jsx(Xg,{className:"size-8 shrink-0 text-muted-foreground","aria-hidden":!0}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate font-ui text-sm font-medium",children:E.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:Vp(E.size)})]}),c.jsx("button",{type:"button","aria-label":`Remove ${E.name}`,onClick:I=>{I.stopPropagation(),b(E.name)},className:P("shrink-0 rounded p-1 text-muted-foreground","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:c.jsx($t,{className:"size-4","aria-hidden":!0})})]},E.name)),c.jsx("p",{className:"text-xs text-muted-foreground",children:i?"Drop to replace":"Click or drag to replace files"})]}):c.jsxs(c.Fragment,{children:[c.jsx(Ug,{className:P("size-10",i?"text-primary":"text-muted-foreground"),"aria-hidden":!0}),c.jsxs("div",{className:"flex flex-col items-center gap-1",children:[c.jsx("p",{className:"font-ui text-sm font-medium",children:i?"Drop files here":"Drag & drop files here, or click to browse"}),e&&c.jsx("p",{className:"text-xs text-muted-foreground",children:e})]})]}),c.jsx("input",{ref:w,type:"file",accept:e,multiple:t,disabled:o,className:"sr-only","aria-hidden":!0,tabIndex:-1,onChange:E=>{v(E.target.files),E.currentTarget.value=""}})]})});Yp.displayName="FileUpload";const Gp=ye(["w-full flex items-center gap-2","rounded-md border border-input bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow]","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:"min-h-8 text-xs",md:"min-h-10",lg:"min-h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),jp=f.forwardRef(({options:e,value:t,defaultValue:n,onValueChange:r,placeholder:o="Select…",searchPlaceholder:a="Search…",emptyMessage:s="No results found.",size:i,isError:l,disabled:d,className:p},u)=>{const h=t!==void 0,[g,w]=f.useState(n??[]),m=t??g,[v,b]=f.useState(!1),[y,x]=f.useState("");function N(D){b(D),D||x("")}function M(D){const E=m.includes(D)?m.filter(I=>I!==D):[...m,D];h||w(E),r==null||r(E)}function C(D){const E=m.filter(I=>I!==D);h||w(E),r==null||r(E)}const k=f.useMemo(()=>e.filter(D=>m.includes(D.value)),[e,m]);return c.jsxs(ln,{open:v,onOpenChange:N,children:[c.jsx(hr,{asChild:!0,children:c.jsxs("button",{ref:u,type:"button",disabled:d,"aria-expanded":v,"aria-haspopup":"listbox","aria-invalid":l||void 0,className:P(Gp({size:i,isError:l}),p),children:[c.jsx("span",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:m.length>0?k.map(D=>c.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-sm bg-accent px-1.5 py-0.5 font-ui text-xs font-medium text-accent-foreground",children:[D.label,c.jsx("span",{role:"button",tabIndex:d?-1:0,"aria-label":`Remove ${D.label}`,onClick:E=>{E.stopPropagation(),C(D.value)},onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation(),C(D.value))},className:"ml-0.5 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:c.jsx($t,{className:"size-3","aria-hidden":!0})})]},D.value)):c.jsx("span",{className:"text-muted-foreground",children:o})}),c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0})]})}),c.jsx(Ut,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:c.jsxs(lr,{className:"w-full",children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(po,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:a,value:y,onValueChange:x})}),c.jsxs(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:s}),e.map(D=>c.jsxs(fo,{value:D.label,disabled:D.disabled,className:P("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:()=>M(D.value),children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:m.includes(D.value)&&c.jsx(nn,{className:"size-4","aria-hidden":!0})}),D.label]},D.value))]})]})})]})});jp.displayName="MultiSelect";const Up=ye(["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"}}),Rp=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs("div",{className:"group relative w-full",children:[c.jsx("select",{ref:a,className:P(Up({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),c.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:c.jsx(Mt,{})})]}));Rp.displayName="NativeSelect";const Kp=ye(["flex w-full overflow-hidden rounded-md border border-input bg-background","font-body text-foreground","transition-[border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background"],{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},layout:{vertical:"",horizontal:""}},defaultVariants:{size:"md",layout:"vertical"}}),qp=f.forwardRef(({className:e,size:t,layout:n,isError:r,min:o,max:a,step:s,disabled:i,...l},d)=>{const p=f.useRef(null),u=f.useCallback(v=>{p.current=v,typeof d=="function"?d(v):d&&(d.current=v)},[d]),h=v=>{var C;const b=p.current;if(!b)return;const y=parseFloat(b.value)||0,x=Number(s??1);let N=y+v*x;a!==void 0&&(N=Math.min(N,Number(a))),o!==void 0&&(N=Math.max(N,Number(o)));const M=(C=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:C.set;M==null||M.call(b,String(N)),b.dispatchEvent(new Event("input",{bubbles:!0}))},g=t==="sm"?"size-2.5":"size-3",w=t==="sm"?"size-3":"size-4",m=t==="sm"?"px-2.5":"px-3";return c.jsx("div",{className:P(Kp({size:t,layout:n}),r&&"border-destructive focus-within:ring-destructive",i&&"cursor-not-allowed opacity-50",e),children:n==="horizontal"?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(nl,{"aria-hidden":"true",className:w})}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none text-center font-medium text-primary","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","px-2"),...l}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(om,{"aria-hidden":"true",className:w})})]}):c.jsxs(c.Fragment,{children:[c.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",t==="sm"?"px-3":"px-4"),...l}),c.jsxs("div",{className:"flex shrink-0 flex-col border-l border-input",children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(Qr,{"aria-hidden":"true",className:g})}),c.jsx("div",{"aria-hidden":"true",className:"border-t border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(Mt,{"aria-hidden":"true",className:g})})]})]})})});qp.displayName="NumberInput";const Xp=ye(["flex items-center justify-center rounded-md border border-input bg-background","font-ui text-center font-medium tabular-nums","transition-[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 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg"}},defaultVariants:{size:"md"}}),Zp=f.forwardRef(({length:e=6,value:t,defaultValue:n,onChange:r,isError:o,disabled:a,size:s,className:i},l)=>{const d=t!==void 0,[p,u]=f.useState(n??""),h=t??p,g=Array.from({length:e},(k,D)=>h[D]??""),w=f.useRef([]),m=f.useMemo(()=>Array.from({length:e},(k,D)=>E=>{w.current[D]=E,D===0&&(typeof l=="function"?l(E):l&&(l.current=E))}),[e,l]),v=f.useRef(!1),b=k=>{var D;v.current=!0,(D=w.current[k])==null||D.focus()},y=k=>{const D=k.join("").slice(0,e);d||u(D),r==null||r(D)},x=(k,D)=>{const E=D.target.value,I=[...g];I[k]=E,y(I),E&&k<e-1&&b(k+1)},N=(k,D)=>{if(D.key==="Backspace"){D.preventDefault();const E=[...g];E[k]?(E[k]="",y(E)):k>0&&(E[k-1]="",y(E),b(k-1))}else D.key==="ArrowLeft"?(D.preventDefault(),k>0&&b(k-1)):D.key==="ArrowRight"&&(D.preventDefault(),k<e-1&&b(k+1))},M=k=>{k.preventDefault();const D=k.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),E=Array.from({length:e},(I,R)=>D[R]??"");y(E),b(Math.min(D.length,e-1))},C=(k,D)=>{if(v.current){v.current=!1,D.target.select();return}const E=g.findIndex(I=>!I);if(E!==-1&&k>E){b(E);return}D.target.select()};return c.jsx("div",{role:"group","aria-label":"One-time password",className:P("flex gap-2",i),children:g.map((k,D)=>c.jsx("input",{ref:m[D],type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:k,disabled:a,"aria-label":`Digit ${D+1} of ${e}`,"aria-invalid":o||void 0,className:P(Xp({size:s}),o&&"border-destructive focus-visible:ring-destructive"),onChange:E=>x(D,E),onKeyDown:E=>N(D,E),onPaste:M,onFocus:E=>C(D,E)},D))})});Zp.displayName="OTPInput";const Qp=f.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return c.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:P("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?c.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):c.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});Qp.displayName="Progress";const hi=f.createContext({}),Jp=ye(["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"}}),dS=ye(["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"}}),eh=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,name:o,...a},s)=>{const i=f.use(hi);return c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[c.jsx("input",{type:"radio",ref:s,name:o??i.name,className:P(Jp({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...a}),c.jsx("span",{"aria-hidden":"true",className:dS({size:n})})]})});eh.displayName="Radio";const th=ye("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),nh=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>c.jsx(hi,{value:{name:t},children:c.jsx("div",{ref:a,role:"radiogroup",className:P(th({orientation:n}),e),...o,children:r})}));nh.displayName="RadioGroup";const rh=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>c.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:P("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));rh.displayName="Separator";const oh=ye(["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"}}),uS=ye(["absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-foreground 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"}}),ah=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center",e),children:[c.jsx("input",{type:"checkbox",role:"switch",ref:a,className:P("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",t),"aria-invalid":r||void 0,...o}),c.jsx("span",{"aria-hidden":"true",className:P(oh({size:n}),r&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",r&&"peer-focus-visible:ring-destructive")}),c.jsx("span",{"aria-hidden":"true",className:uS({size:n})})]}));ah.displayName="Switch";var qo="Tabs",[fS]=Ze(qo,[$o]),sh=$o(),[pS,gi]=fS(qo),ih=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,p=tr(i),[u,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:qo});return c.jsx(pS,{scope:n,baseId:Ce(),value:u,onValueChange:h,orientation:s,dir:p,activationMode:l,children:c.jsx(ne.div,{dir:p,"data-orientation":s,...d,ref:t})})});ih.displayName=qo;var lh="TabsList",ch=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=gi(lh,n),s=sh(n);return c.jsx(Tu,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:c.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});ch.displayName=lh;var dh="TabsTrigger",uh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=gi(dh,n),i=sh(n),l=hh(s.baseId,r),d=gh(s.baseId,r),p=r===s.value;return c.jsx(Pu,{asChild:!0,...i,focusable:!o,active:p,children:c.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,u=>{!o&&u.button===0&&u.ctrlKey===!1?s.onValueChange(r):u.preventDefault()}),onKeyDown:j(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const u=s.activationMode!=="manual";!p&&!o&&u&&s.onValueChange(r)})})})});uh.displayName=dh;var fh="TabsContent",ph=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=gi(fh,n),l=hh(i.baseId,r),d=gh(i.baseId,r),p=r===i.value,u=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(h)},[]),c.jsx(ze,{present:o||p,children:({present:h})=>c.jsx(ne.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:h&&a})})});ph.displayName=fh;function hh(e,t){return`${e}-trigger-${t}`}function gh(e,t){return`${e}-content-${t}`}var mh=ih,vh=ch,bh=uh,yh=ph;const mi=f.forwardRef(({className:e,...t},n)=>c.jsx(mh,{ref:n,className:P("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));mi.displayName=mh.displayName;const vi=f.forwardRef(({className:e,...t},n)=>c.jsx(vh,{ref:n,className:P("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}));vi.displayName=vh.displayName;const bi=f.forwardRef(({className:e,...t},n)=>c.jsx(bh,{ref:n,className:P("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}));bi.displayName=bh.displayName;const yi=f.forwardRef(({className:e,...t},n)=>c.jsx(yh,{ref:n,className:P("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}));yi.displayName=yh.displayName;const wh=({items:e,listClassName:t,className:n,...r})=>c.jsxs(mi,{className:n,...r,children:[c.jsx(vi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>c.jsxs(bi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>c.jsx(yi,{value:o,children:a},o))]});wh.displayName="Tabs";const xh=ye(["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"}}),Ch=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>c.jsx("textarea",{ref:o,className:P(xh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));Ch.displayName="Textarea";function hS(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 gS=e=>{switch(e){case"success":return bS;case"info":return wS;case"warning":return yS;case"error":return xS;default:return null}},mS=Array(12).fill(0),vS=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},mS.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),bS=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"})),yS=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"})),wS=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"})),xS=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"})),CS=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"})),SS=()=>{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 wi=1;class NS{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:wi++,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 d=>{if(s=["resolve",d],S.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(MS(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:h,...w})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,g=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:u,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,p)=>i.then(()=>s[0]==="reject"?p(s[1]):d(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)||wi++;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 Be=new NS,kS=(e,t)=>{const n=(t==null?void 0:t.id)||wi++;return Be.addToast({title:e,...t,id:n}),n},MS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DS=kS,ES=()=>Be.toasts,TS=()=>Be.getActiveToasts(),Sh=Object.assign(DS,{success:Be.success,info:Be.info,warning:Be.warning,error:Be.error,custom:Be.custom,message:Be.message,promise:Be.promise,dismiss:Be.dismiss,loading:Be.loading},{getHistory:ES,getToasts:TS});hS("[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 Xo(e){return e.label!==void 0}const PS=3,_S="24px",OS="16px",Nh=4e3,IS=356,AS=14,FS=45,WS=200;function Nt(...e){return e.filter(Boolean).join(" ")}function $S(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const zS=e=>{var t,n,r,o,a,s,i,l,d;const{invert:p,toast:u,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:b,toasts:y,expanded:x,removeToast:N,defaultRichColors:M,closeButton:C,style:k,cancelButtonStyle:D,actionButtonStyle:E,className:I="",descriptionClassName:R="",duration:B,position:q,gap:Y,expandByDefault:ae,classNames:z,icons:K,closeButtonAriaLabel:G="Close toast"}=e,[A,Q]=S.useState(null),[oe,O]=S.useState(null),[F,V]=S.useState(!1),[$,Z]=S.useState(!1),[W,U]=S.useState(!1),[X,se]=S.useState(!1),[de,ce]=S.useState(!1),[Me,Ee]=S.useState(0),[tt,Ue]=S.useState(0),Fe=S.useRef(u.duration||B||Nh),Zt=S.useRef(null),De=S.useRef(null),zr=b===0,Br=b+1<=m,_e=u.type,ft=u.dismissible!==!1,We=u.className||"",gn=u.descriptionClassName||"",Qt=S.useMemo(()=>v.findIndex(J=>J.toastId===u.id)||0,[v,u.id]),Un=S.useMemo(()=>{var J;return(J=u.closeButton)!=null?J:C},[u.closeButton,C]),kt=S.useMemo(()=>u.duration||B||Nh,[u.duration,B]),Jt=S.useRef(0),Le=S.useRef(0),Rn=S.useRef(0),pt=S.useRef(null),[Kn,qn]=q.split("-"),ht=S.useMemo(()=>v.reduce((J,te,Ne)=>Ne>=Qt?J:J+te.height,0),[v,Qt]),Xn=SS(),Zn=u.invert||p,mn=_e==="loading";Le.current=S.useMemo(()=>Qt*Y+ht,[Qt,ht]),S.useEffect(()=>{Fe.current=kt},[kt]),S.useEffect(()=>{V(!0)},[]),S.useEffect(()=>{const J=De.current;if(J){const te=J.getBoundingClientRect().height;return Ue(te),w(Ne=>[{toastId:u.id,height:te,position:u.position},...Ne]),()=>w(Ne=>Ne.filter(Oe=>Oe.toastId!==u.id))}},[w,u.id]),S.useLayoutEffect(()=>{if(!F)return;const J=De.current,te=J.style.height;J.style.height="auto";const Ne=J.getBoundingClientRect().height;J.style.height=te,Ue(Ne),w(Oe=>Oe.find(xe=>xe.toastId===u.id)?Oe.map(xe=>xe.toastId===u.id?{...xe,height:Ne}:xe):[{toastId:u.id,height:Ne,position:u.position},...Oe])},[F,u.title,u.description,w,u.id,u.jsx,u.action,u.cancel]);const Re=S.useCallback(()=>{Z(!0),Ee(Le.current),w(J=>J.filter(te=>te.toastId!==u.id)),setTimeout(()=>{N(u)},WS)},[u,N,w,Le]);S.useEffect(()=>{if(u.promise&&_e==="loading"||u.duration===1/0||u.type==="loading")return;let J;return x||g||Xn?(()=>{if(Rn.current<Jt.current){const Oe=new Date().getTime()-Jt.current;Fe.current=Fe.current-Oe}Rn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Jt.current=new Date().getTime(),J=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Re()},Fe.current))})(),()=>clearTimeout(J)},[x,g,u,_e,Xn,Re]),S.useEffect(()=>{u.delete&&(Re(),u.onDismiss==null||u.onDismiss.call(u,u))},[Re,u.delete]);function ie(){var J;if(K!=null&&K.loading){var te;return S.createElement("div",{className:Nt(z==null?void 0:z.loader,u==null||(te=u.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":_e==="loading"},K.loading)}return S.createElement(vS,{className:Nt(z==null?void 0:z.loader,u==null||(J=u.classNames)==null?void 0:J.loader),visible:_e==="loading"})}const pe=u.icon||(K==null?void 0:K[_e])||gS(_e);var re,ue;return S.createElement("li",{tabIndex:0,ref:De,className:Nt(I,We,z==null?void 0:z.toast,u==null||(t=u.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[_e],u==null||(n=u.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(re=u.richColors)!=null?re:M,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":F,"data-promise":!!u.promise,"data-swiped":de,"data-removed":$,"data-visible":Br,"data-y-position":Kn,"data-x-position":qn,"data-index":b,"data-front":zr,"data-swiping":W,"data-dismissible":ft,"data-type":_e,"data-invert":Zn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&F),"data-testid":u.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${$?Me:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...k,...u.style},onDragEnd:()=>{U(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(mn||!ft||(Zt.current=new Date,Ee(Le.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(U(!0),pt.current={x:J.clientX,y:J.clientY})))},onPointerUp:()=>{var J,te,Ne;if(X||!ft)return;pt.current=null;const Oe=Number(((J=De.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((te=De.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((Ne=Zt.current)==null?void 0:Ne.getTime()),Te=A==="x"?Oe:en,Qn=Math.abs(Te)/xe;if(Math.abs(Te)>=FS||Qn>.11){Ee(Le.current),u.onDismiss==null||u.onDismiss.call(u,u),O(A==="x"?Oe>0?"right":"left":en>0?"down":"up"),Re(),se(!0);return}else{var Ke,qe;(Ke=De.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(qe=De.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}ce(!1),U(!1),Q(null)},onPointerMove:J=>{var te,Ne,Oe;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const xe=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Qn;const Ke=(Qn=e.swipeDirections)!=null?Qn:$S(q);!A&&(Math.abs(Te)>1||Math.abs(xe)>1)&&Q(Math.abs(Te)>Math.abs(xe)?"x":"y");let qe={x:0,y:0};const Jo=Wt=>1/(1.5+Math.abs(Wt)/20);if(A==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&xe<0||Ke.includes("bottom")&&xe>0)qe.y=xe;else{const Wt=xe*Jo(xe);qe.y=Math.abs(Wt)<Math.abs(xe)?Wt:xe}}else if(A==="x"&&(Ke.includes("left")||Ke.includes("right")))if(Ke.includes("left")&&Te<0||Ke.includes("right")&&Te>0)qe.x=Te;else{const Wt=Te*Jo(Te);qe.x=Math.abs(Wt)<Math.abs(Te)?Wt:Te}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&ce(!0),(Ne=De.current)==null||Ne.style.setProperty("--swipe-amount-x",`${qe.x}px`),(Oe=De.current)==null||Oe.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Un&&!u.jsx&&_e!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":mn,"data-close-button":!0,onClick:mn||!ft?()=>{}:()=>{Re(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Nt(z==null?void 0:z.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(ue=K==null?void 0:K.close)!=null?ue:CS):null,(_e||u.icon||u.promise)&&u.icon!==null&&((K==null?void 0:K[_e])!==null||u.icon)?S.createElement("div",{"data-icon":"",className:Nt(z==null?void 0:z.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||ie():null,u.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Nt(z==null?void 0:z.content,u==null||(a=u.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Nt(z==null?void 0:z.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?S.createElement("div",{"data-description":"",className:Nt(R,gn,z==null?void 0:z.description,u==null||(i=u.classNames)==null?void 0:i.description)},typeof u.description=="function"?u.description():u.description):null),S.isValidElement(u.cancel)?u.cancel:u.cancel&&Xo(u.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||D,onClick:J=>{Xo(u.cancel)&&ft&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,J),Re())},className:Nt(z==null?void 0:z.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,S.isValidElement(u.action)?u.action:u.action&&Xo(u.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:J=>{Xo(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,J),!J.defaultPrevented&&Re())},className:Nt(z==null?void 0:z.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function kh(){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 BS(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?OS:_S;function l(d){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(i)}),n}const LS=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:p,mobileOffset:u,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=PS,toastOptions:b,dir:y=kh(),gap:x=AS,icons:N,containerAriaLabel:M="Notifications"}=t,[C,k]=S.useState([]),D=S.useMemo(()=>r?C.filter(F=>F.toasterId===r):C.filter(F=>!F.toasterId),[C,r]),E=S.useMemo(()=>Array.from(new Set([a].concat(D.filter(F=>F.position).map(F=>F.position)))),[D,a]),[I,R]=S.useState([]),[B,q]=S.useState(!1),[Y,ae]=S.useState(!1),[z,K]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=S.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=S.useRef(null),oe=S.useRef(!1),O=S.useCallback(F=>{k(V=>{var $;return($=V.find(Z=>Z.id===F.id))!=null&&$.delete||Be.dismiss(F.id),V.filter(({id:Z})=>Z!==F.id)})},[]);return S.useEffect(()=>Be.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{k(V=>V.map($=>$.id===F.id?{...$,delete:!0}:$))});return}setTimeout(()=>{oa.flushSync(()=>{k(V=>{const $=V.findIndex(Z=>Z.id===F.id);return $!==-1?[...V.slice(0,$),{...V[$],...F},...V.slice($+1)]:[F,...V]})})})}),[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 F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:V})=>{K(V?"dark":"light")})}catch{F.addListener(({matches:$})=>{try{K($?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),S.useEffect(()=>{C.length<=1&&q(!1)},[C]),S.useEffect(()=>{const F=V=>{var $;if(s.every(U=>V[U]||V.code===U)){var W;q(!0),(W=G.current)==null||W.focus()}V.code==="Escape"&&(document.activeElement===G.current||($=G.current)!=null&&$.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[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} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((F,V)=>{var $;const[Z,W]=F.split("-");return D.length?S.createElement("ol",{key:F,dir:y==="auto"?kh():y,tabIndex:-1,ref:G,className:d,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":Z,"data-x-position":W,style:{"--front-toast-height":`${(($=I[0])==null?void 0:$.height)||0}px`,"--width":`${IS}px`,"--gap":`${x}px`,...m,...BS(p,u)},onBlur:U=>{oe.current&&!U.currentTarget.contains(U.relatedTarget)&&(oe.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||oe.current||(oe.current=!0,Q.current=U.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},D.filter(U=>!U.position&&V===0||U.position===F).map((U,X)=>{var se,de;return S.createElement(zS,{key:U.id,icons:N,index:X,toast:U,defaultRichColors:g,duration:(se=b==null?void 0:b.duration)!=null?se:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:o,visibleToasts:v,closeButton:(de=b==null?void 0:b.closeButton)!=null?de:l,interacting:Y,position:F,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:O,toasts:D.filter(ce=>ce.position==U.position),heights:I.filter(ce=>ce.position==U.position),setHeights:R,expandByDefault:i,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),HS={success:{halo:"bg-success/20",core:"bg-success text-success-foreground"},info:{halo:"bg-info/20",core:"bg-info text-info-foreground"},warning:{halo:"bg-warning/25",core:"bg-warning text-warning-foreground"},error:{halo:"bg-destructive/20",core:"bg-destructive text-destructive-foreground"},loading:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"},default:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"}};function VS({variant:e,icon:t,className:n}){const r=HS[e];return c.jsxs("span",{className:"bookers-toast-status","aria-hidden":"true",children:[c.jsx("span",{className:P("bookers-toast-status__halo",r.halo)}),c.jsx("span",{className:P("bookers-toast-status__core",r.core),children:c.jsx(t,{className:P("size-4",n),strokeWidth:2.25})})]})}function Fr(e,t,n){return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),c.jsx(VS,{variant:e,icon:t,className:n})]})}const Mh=c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),YS=Fr("success",nn),GS=Fr("info",Yg),jS=Fr("warning",Vg),US=Fr("error",Gg),RS=Fr("loading",fa,"animate-spin");function KS(e,t){const n=(t==null?void 0:t.action)!==void 0;return Sh(e,{...t,icon:(t==null?void 0:t.icon)!==void 0?t.icon:Mh,closeButton:(t==null?void 0:t.closeButton)??(n?!1:void 0)})}const qS=Object.assign(KS,Sh),Dh={toast:"bookers-toast",icon:"bookers-toast__icon",loader:"bookers-toast__loader",content:"bookers-toast__content",title:"bookers-toast__title",description:"bookers-toast__description",closeButton:"bookers-toast__close",actionButton:"bookers-toast__action",cancelButton:"bookers-toast__cancel"},XS={success:YS,info:GS,warning:jS,error:US,loading:RS,default:Mh,close:c.jsx($t,{className:"size-3.5",strokeWidth:2,"aria-hidden":"true"})},Eh=({toastOptions:e,richColors:t=!1,closeButton:n=!0,position:r="top-center",...o})=>{var a;return c.jsx(LS,{theme:"light",richColors:t,position:r,closeButton:n,icons:XS,className:"font-body",toastOptions:{unstyled:!0,...e,classNames:{...Dh,...e==null?void 0:e.classNames,toast:P(Dh.toast,(a=e==null?void 0:e.classNames)==null?void 0:a.toast)}},...o})};Eh.displayName="Toaster";var[Zo]=Ze("Tooltip",[Gt]),Qo=Gt(),Th="TooltipProvider",ZS=700,xi="tooltip.open",[QS,Ci]=Zo(Th),Ph=e=>{const{__scopeTooltip:t,delayDuration:n=ZS,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 d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(QS,{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(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Ph.displayName=Th;var Wr="Tooltip",[JS,$r]=Zo(Wr),_h=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Ci(Wr,e.__scopeTooltip),d=Qo(t),[p,u]=f.useState(null),h=Ce(),g=f.useRef(0),w=s??l.disableHoverableContent,m=i??l.delayDuration,v=f.useRef(!1),[b,y]=Qe({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(xi))):l.onClose(),a==null||a(k)},caller:Wr}),x=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),N=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),M=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),c.jsx(ur,{...d,children:c.jsx(JS,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:p,onTriggerChange:u,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})})};_h.displayName=Wr;var Si="TooltipTrigger",Oh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$r(Si,n),a=Ci(Si,n),s=Qo(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),d=f.useRef(!1),p=f.useRef(!1),u=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),c.jsx(fr,{asChild:!0,...s,children:c.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(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:j(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});Oh.displayName=Si;var Ni="TooltipPortal",[eN,tN]=Zo(Ni,{forceMount:void 0}),Ih=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=$r(Ni,t);return c.jsx(eN,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Ih.displayName=Ni;var jn="TooltipContent",Ah=f.forwardRef((e,t)=>{const n=tN(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=$r(jn,e.__scopeTooltip);return c.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Fh,{side:o,...a,ref:t}):c.jsx(nN,{side:o,...a,ref:t})})}),nN=f.forwardRef((e,t)=>{const n=$r(jn,e.__scopeTooltip),r=Ci(jn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:d}=n,p=o.current,{onPointerInTransitChange:u}=r,h=f.useCallback(()=>{i(null),u(!1)},[u]),g=f.useCallback((w,m)=>{const v=w.currentTarget,b={x:w.clientX,y:w.clientY},y=iN(b,v.getBoundingClientRect()),x=lN(b,y),N=cN(m.getBoundingClientRect()),M=uN([...x,...N]);i(M),u(!0)},[u]);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,b={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),x=!dN(b,s);y?h():x&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,d,h]),c.jsx(Fh,{...e,ref:a})}),[rN,oN]=Zo(Wr,{isInside:!1}),aN=ng("TooltipContent"),Fh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=$r(jn,n),d=Qo(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(xi,p),()=>document.removeEventListener(xi,p)),[p]),f.useEffect(()=>{if(l.trigger){const u=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&p()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,p]),c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:p,children:c.jsxs(Do,{"data-state":l.stateAttribute,...d,...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:[c.jsx(aN,{children:r}),c.jsx(rN,{scope:n,isInside:!0,children:c.jsx(uw,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ah.displayName=jn;var Wh="TooltipArrow",sN=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qo(n);return oN(Wh,n).isInside?null:c.jsx(Eo,{...o,...r,ref:t})});sN.displayName=Wh;function iN(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 lN(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 cN(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 dN(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],d=i.x,p=i.y,u=l.x,h=l.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function uN(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),fN(t)}function fN(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 pN=Ph,hN=_h,gN=Oh,mN=Ih,$h=Ah;const vN=pN,zh=hN,Bh=gN,ki=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(mN,{children:c.jsx($h,{ref:r,sideOffset:t,className:P("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})}));ki.displayName=$h.displayName;const Lh=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>c.jsxs(zh,{...a,children:[c.jsx(Bh,{asChild:!0,children:t}),c.jsx(ki,{side:n,align:r,sideOffset:o,children:e})]});Lh.displayName="Tooltip",T.Accordion=vl,T.AccordionContent=ya,T.AccordionItem=va,T.AccordionRoot=ma,T.AccordionTrigger=ba,T.Alert=yl,T.AlertDescription=xl,T.AlertTitle=wl,T.AspectRatio=Nl,T.Avatar=Ml,T.Badge=El,T.Button=Sn,T.Calendar=ii,T.Checkbox=_l,T.ComboBox=Od,T.ComboBoxContent=Md,T.ComboBoxEmpty=Ed,T.ComboBoxGroup=Td,T.ComboBoxItem=Dd,T.ComboBoxRoot=_d,T.ComboBoxSeparator=Pd,T.ComboBoxTrigger=ns,T.ComboBoxTriggerVariants=kd,T.DATA_TABLE_EXPAND_COLUMN_ID=It,T.DataTable=Bf,T.DataTableColumnHeader=Lf,T.DatePicker=Ip,T.DatePickerContent=Op,T.DatePickerRoot=_p,T.DatePickerTrigger=si,T.Dialog=zp,T.DialogClose=Wp,T.DialogContent=ci,T.DialogDescription=pi,T.DialogFooter=ui,T.DialogHeader=di,T.DialogOverlay=li,T.DialogPortal=$p,T.DialogRoot=Ap,T.DialogTitle=fi,T.DialogTrigger=Fp,T.DropdownMenu=Of,T.DropdownMenuCheckboxItem=Ys,T.DropdownMenuContent=Nr,T.DropdownMenuGroup=i0,T.DropdownMenuItem=Ot,T.DropdownMenuLabel=kr,T.DropdownMenuPortal=l0,T.DropdownMenuRadioGroup=_f,T.DropdownMenuRadioItem=Gs,T.DropdownMenuRoot=Vo,T.DropdownMenuSeparator=zn,T.DropdownMenuSub=Vs,T.DropdownMenuSubContent=jo,T.DropdownMenuSubTrigger=Go,T.DropdownMenuTrigger=Yo,T.Field=Bp,T.FieldMessage=Hp,T.FileUpload=Yp,T.Input=gr,T.InputAddon=fs,T.InputGroup=us,T.Label=Lp,T.MultiSelect=jp,T.NativeSelect=Rp,T.NumberInput=qp,T.OTPInput=Zp,T.Pagination=ys,T.PaginationEllipsis=bs,T.PaginationItem=gs,T.PaginationNext=vs,T.PaginationPrev=ms,T.PaginationRoot=ps,T.Popover=Nd,T.PopoverAnchor=rw,T.PopoverClose=nw,T.PopoverContent=Ut,T.PopoverRoot=ln,T.PopoverTrigger=hr,T.Progress=Qp,T.Radio=eh,T.RadioGroup=nh,T.RadioGroupContext=hi,T.STRING_COLUMN_FILTER_OPTIONS=os,T.Select=Su,T.SelectContent=Wo,T.SelectGroup=Lw,T.SelectItem=Ps,T.SelectLabel=xu,T.SelectRoot=Ms,T.SelectScrollDownButton=Ts,T.SelectScrollUpButton=Es,T.SelectSeparator=Cu,T.SelectTrigger=Fo,T.SelectValue=Ds,T.Separator=rh,T.Skeleton=ds,T.Switch=ah,T.Table=ss,T.TableBody=ls,T.TableCaption=Id,T.TableCell=cn,T.TableFooter=cs,T.TableHead=Po,T.TableHeader=is,T.TableRow=_t,T.Tabs=wh,T.TabsContent=yi,T.TabsList=vi,T.TabsRoot=mi,T.TabsTrigger=bi,T.Textarea=Ch,T.Toaster=Eh,T.Tooltip=Lh,T.TooltipContent=ki,T.TooltipProvider=vN,T.TooltipRoot=zh,T.TooltipTrigger=Bh,T.accordionContentVariants=gl,T.accordionRootVariants=ml,T.accordionTriggerVariants=hl,T.alertVariants=bl,T.avatarVariants=kl,T.badgeVariants=Dl,T.bookersStringFilter=as,T.buttonVariants=Tl,T.checkboxVariants=Pl,T.cn=P,T.dataTableColumnHeaderMeta=m0,T.datePickerTriggerVariants=Pp,T.formatBytes=Vp,T.inputVariants=Fd,T.multiSelectTriggerVariants=Gp,T.nativeSelectVariants=Up,T.numberInputVariants=Kp,T.otpSlotVariants=Xp,T.radioGroupVariants=th,T.radioVariants=Jp,T.selectTriggerVariants=wu,T.switchTrackVariants=oh,T.textareaVariants=xh,T.toast=qS,T.useDataTableTable=Af,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
205
|
+
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},_b="DialogDescriptionWarning",Ob=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Tc(_b).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},La=gc,Pc=vc,Ha=yc,sr=wc,ir=xc,ho=Nc,go=kc,_c=Dc,lr='[cmdk-group=""]',Va='[cmdk-group-items=""]',Ib='[cmdk-group-heading=""]',Oc='[cmdk-item=""]',Ic=`${Oc}:not([aria-disabled="true"])`,Ya="cmdk-item-select",Pn="data-value",Ab=(e,t,n)=>Cv(e,t,n),Ac=f.createContext(void 0),cr=()=>f.useContext(Ac),Fc=f.createContext(void 0),Ga=()=>f.useContext(Fc),Wc=f.createContext(void 0),dr=f.forwardRef((e,t)=>{let n=_n(()=>{var O,F;return{search:"",value:(F=(O=e.value)!=null?O:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=_n(()=>new Set),o=_n(()=>new Map),a=_n(()=>new Map),s=_n(()=>new Set),i=Bc(e),{label:c,children:d,value:p,onValueChange:u,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...b}=e,y=Ce(),x=Ce(),S=Ce(),D=f.useRef(null),C=Bb();on(()=>{if(p!==void 0){let O=p.trim();n.current.value=O,k.emit()}},[p]),on(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,F,V)=>{var $,Z,W,U;if(!Object.is(n.current[O],F)){if(n.current[O]=F,O==="search")B(),I(),C(1,K);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(S);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.emit()}),V||C(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let X=F??"";(U=(W=i.current).onValueChange)==null||U.call(W,X);return}}k.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=f.useMemo(()=>({value:(O,F,V)=>{var $;F!==(($=a.current.get(O))==null?void 0:$.value)&&(a.current.set(O,{value:F,keywords:V}),n.current.filtered.items.set(O,T(F,V)),C(2,()=>{I(),k.emit()}))},item:(O,F)=>(r.current.add(O),F&&(o.current.has(F)?o.current.get(F).add(O):o.current.set(F,new Set([O]))),C(3,()=>{B(),I(),n.current.value||K(),k.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let V=Y();C(4,()=>{B(),(V==null?void 0:V.getAttribute("id"))===O&&K(),k.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:S,labelId:x,listInnerRef:D}),[]);function T(O,F){var V,$;let Z=($=(V=i.current)==null?void 0:V.filter)!=null?$:Ab;return O?Z(O,n.current.search,F):0}function I(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,F=[];n.current.filtered.groups.forEach($=>{let Z=o.current.get($),W=0;Z.forEach(U=>{let X=O.get(U);W=Math.max(X,W)}),F.push([$,W])});let V=D.current;ae().sort(($,Z)=>{var W,U;let X=$.getAttribute("id"),se=Z.getAttribute("id");return((W=O.get(se))!=null?W:0)-((U=O.get(X))!=null?U:0)}).forEach($=>{let Z=$.closest(Va);Z?Z.appendChild($.parentElement===Z?$:$.closest(`${Va} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${Va} > *`))}),F.sort(($,Z)=>Z[1]-$[1]).forEach($=>{var Z;let W=(Z=D.current)==null?void 0:Z.querySelector(`${lr}[${Pn}="${encodeURIComponent($[0])}"]`);W==null||W.parentElement.appendChild(W)})}function K(){let O=ae().find(V=>V.getAttribute("aria-disabled")!=="true"),F=O==null?void 0:O.getAttribute(Pn);k.setState("value",F||void 0)}function B(){var O,F,V,$;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 W of r.current){let U=(F=(O=a.current.get(W))==null?void 0:O.value)!=null?F:"",X=($=(V=a.current.get(W))==null?void 0:V.keywords)!=null?$:[],se=T(U,X);n.current.filtered.items.set(W,se),se>0&&Z++}for(let[W,U]of o.current)for(let X of U)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Z}function q(){var O,F,V;let $=Y();$&&(((O=$.parentElement)==null?void 0:O.firstChild)===$&&((V=(F=$.closest(lr))==null?void 0:F.querySelector(Ib))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var O;return(O=D.current)==null?void 0:O.querySelector(`${Oc}[aria-selected="true"]`)}function ae(){var O;return Array.from(((O=D.current)==null?void 0:O.querySelectorAll(Ic))||[])}function z(O){let F=ae()[O];F&&k.setState("value",F.getAttribute(Pn))}function R(O){var F;let V=Y(),$=ae(),Z=$.findIndex(U=>U===V),W=$[Z+O];(F=i.current)!=null&&F.loop&&(W=Z+O<0?$[$.length-1]:Z+O===$.length?$[0]:$[Z+O]),W&&k.setState("value",W.getAttribute(Pn))}function G(O){let F=Y(),V=F==null?void 0:F.closest(lr),$;for(;V&&!$;)V=O>0?$b(V,lr):zb(V,lr),$=V==null?void 0:V.querySelector(Ic);$?k.setState("value",$.getAttribute(Pn)):R(O)}let A=()=>z(ae().length-1),Q=O=>{O.preventDefault(),O.metaKey?A():O.altKey?G(1):R(1)},oe=O=>{O.preventDefault(),O.metaKey?z(0):O.altKey?G(-1):R(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var F;(F=b.onKeyDown)==null||F.call(b,O);let V=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||V))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&Q(O);break}case"ArrowDown":{Q(O);break}case"p":case"k":{v&&O.ctrlKey&&oe(O);break}case"ArrowUp":{oe(O);break}case"Home":{O.preventDefault(),z(0);break}case"End":{O.preventDefault(),A();break}case"Enter":{O.preventDefault();let $=Y();if($){let Z=new Event(Ya);$.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Hb},c),wo(e,O=>f.createElement(Fc.Provider,{value:k},f.createElement(Ac.Provider,{value:E},O))))}),mo=f.forwardRef((e,t)=>{var n,r;let o=Ce(),a=f.useRef(null),s=f.useContext(Wc),i=cr(),c=Bc(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;on(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let p=Lc(o,a,[e.value,e.children,a],e.keywords),u=Ga(),h=Ht(C=>C.value&&C.value===p.current),g=Ht(C=>d||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(Ya,w),()=>C.removeEventListener(Ya,w)},[g,e.onSelect,e.disabled]);function w(){var C,k;m(),(k=(C=c.current).onSelect)==null||k.call(C,p.current)}function m(){u.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:b,onSelect:y,forceMount:x,keywords:S,...D}=e;return f.createElement(ne.div,{ref:mt(a,t),...D,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)}),$c=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=Ce(),i=f.useRef(null),c=f.useRef(null),d=Ce(),p=cr(),u=Ht(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);on(()=>p.group(s),[]),Lc(s,i,[e.value,e.heading,c]);let h=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ne.div,{ref:mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&f.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),wo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},f.createElement(Wc.Provider,{value:h},g))))}),zc=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Ht(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),vo=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Ga(),s=Ht(d=>d.search),i=Ht(d=>d.selectedItemId),c=cr();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":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":i,id:c.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),bo=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Ht(d=>d.selectedItemId),c=cr();return f.useEffect(()=>{if(s.current&&a.current){let d=s.current,p=a.current,u,h=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let g=d.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(d),()=>{cancelAnimationFrame(u),h.unobserve(d)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:c.listId},wo(e,d=>f.createElement("div",{ref:mt(s,c.listInnerRef),"cmdk-list-sizer":""},d)))}),Fb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(La,{open:n,onOpenChange:r},f.createElement(Ha,{container:s},f.createElement(sr,{"cmdk-overlay":"",className:o}),f.createElement(ir,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(dr,{ref:t,...i}))))}),yo=f.forwardRef((e,t)=>Ht(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Wb=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},wo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(dr,{List:bo,Item:mo,Input:vo,Group:$c,Separator:zc,Dialog:Fb,Empty:yo,Loading:Wb});function $b(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function zb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Bc(e){let t=f.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?f.useEffect:f.useLayoutEffect;function _n(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Ht(e){let t=Ga(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Lc(e,t,n,r=[]){let o=f.useRef(),a=cr();return on(()=>{var s;let i=(()=>{var d;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():o.current}})(),c=r.map(d=>d.trim());a.value(e,i,c),(s=t.current)==null||s.setAttribute(Pn,i),o.current=i}),o}var Bb=()=>{let[e,t]=f.useState(),n=_n(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Lb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function wo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Lb(t),{ref:t.ref},n(t.props.children)):n(t)}var Hb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Vb=["top","right","bottom","left"],Vt=Math.min,Ve=Math.max,xo=Math.round,Co=Math.floor,bt=e=>({x:e,y:e}),Yb={left:"right",right:"left",bottom:"top",top:"bottom"};function ja(e,t,n){return Ve(e,Vt(t,n))}function Tt(e,t){return typeof e=="function"?e(t):e}function Pt(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function Ua(e){return e==="x"?"y":"x"}function Ka(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ra(e){return Ua(yt(e))}function Gb(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Ra(e),a=Ka(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=No(s)),[s,No(s)]}function jb(e){const t=No(e);return[qa(e),t,qa(t)]}function qa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Hc=["left","right"],Vc=["right","left"],Ub=["top","bottom"],Kb=["bottom","top"];function Rb(e,t,n){switch(e){case"top":case"bottom":return n?t?Vc:Hc:t?Hc:Vc;case"left":case"right":return t?Ub:Kb;default:return[]}}function qb(e,t,n,r){const o=On(e);let a=Rb(Pt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(qa)))),a}function No(e){const t=Pt(e);return Yb[t]+e.slice(t.length)}function Xb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yc(e){return typeof e!="number"?Xb(e):{top:e,right:e,bottom:e,left:e}}function So(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 Gc(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ra(t),i=Ka(s),c=Pt(t),d=a==="y",p=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let g;switch(c){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:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(On(t)){case"start":g[s]-=h*(n&&d?-1:1);break;case"end":g[s]+=h*(n&&d?-1:1);break}return g}async function Zb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=Tt(t,e),w=Yc(g),v=i[h?u==="floating"?"reference":"floating":u],b=So(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:d,rootBoundary:p,strategy:c})),y=u==="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)),S=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},D=So(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:c}):y);return{top:(b.top-D.top+w.top)/S.y,bottom:(D.bottom-b.bottom+w.bottom)/S.y,left:(b.left-D.left+w.left)/S.x,right:(D.right-b.right+w.right)/S.x}}const Qb=50,Jb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Zb},c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:u}=Gc(d,r,c),h=r,g=0;const w={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:b,fn:y}=v,{x,y:S,data:D,reset:C}=await y({x:p,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:d,platform:i,elements:{reference:e,floating:t}});p=x??p,u=S??u,w[b]={...w[b],...D},C&&g<Qb&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:u}=Gc(d,h,c)),m=-1)}return{x:p,y:u,placement:h,strategy:o,middlewareData:w}},ey=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:d,padding:p=0}=Tt(e,t)||{};if(d==null)return{};const u=Yc(p),h={x:n,y:r},g=Ra(o),w=Ka(g),m=await s.getDimensions(d),v=g==="y",b=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[w]+a.reference[g]-h[g]-a.floating[w],D=h[g]-a.reference[g],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let k=C?C[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(C)))&&(k=i.floating[x]||a.floating[w]);const E=S/2-D/2,T=k/2-m[w]/2-1,I=Vt(u[b],T),K=Vt(u[y],T),B=I,q=k-m[w]-K,Y=k/2-m[w]/2+E,ae=ja(B,Y,q),z=!c.arrow&&On(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<B?I:K)-m[w]/2<0,R=z?Y<B?Y-B:Y-q:0;return{[g]:h[g]+R,data:{[g]:ae,centerOffset:Y-ae-R,...z&&{alignmentOffset:R}},reset:z}}}),ty=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:c,elements:d}=t,{mainAxis:p=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Tt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Pt(o),y=yt(i),x=Pt(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),D=h||(x||!m?[No(i)]:jb(i)),C=w!=="none";!h&&C&&D.push(...qb(i,m,w,S));const k=[i,...D],E=await c.detectOverflow(t,v),T=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&T.push(E[b]),u){const Y=Gb(o,s,S);T.push(E[Y[0]],E[Y[1]])}if(I=[...I,{placement:o,overflows:T}],!T.every(Y=>Y<=0)){var K,B;const Y=(((K=a.flip)==null?void 0:K.index)||0)+1,ae=k[Y];if(ae&&(!(u==="alignment"?y!==yt(ae):!1)||I.every(G=>yt(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:ae}};let z=(B=I.filter(R=>R.overflows[0]<=0).sort((R,G)=>R.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!z)switch(g){case"bestFit":{var q;const R=(q=I.filter(G=>{if(C){const A=yt(G.placement);return A===y||A==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(A=>A>0).reduce((A,Q)=>A+Q,0)]).sort((G,A)=>G[1]-A[1])[0])==null?void 0:q[0];R&&(z=R);break}case"initialPlacement":z=i;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function jc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uc(e){return Vb.some(t=>e[t]>=0)}const ny=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Tt(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=jc(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=jc(s,n.floating);return{data:{escapedOffsets:i,escaped:Uc(i)}}}default:return{}}}}},Kc=new Set(["left","top"]);async function ry(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Pt(n),i=On(n),c=yt(n)==="y",d=Kc.has(s)?-1:1,p=a&&c?-1:1,u=Tt(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),c?{x:g*p,y:h*d}:{x:h*d,y:g*p}}const oy=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,c=await ry(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},ay=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:c={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...d}=Tt(e,t),p={x:n,y:r},u=await a.detectOverflow(t,d),h=yt(Pt(o)),g=Ua(h);let w=p[g],m=p[h];if(s){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=w+u[b],S=w-u[y];w=ja(x,w,S)}if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+u[b],S=m-u[y];m=ja(x,m,S)}const v=c.fn({...t,[g]:w,[h]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},sy=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:c=!0,crossAxis:d=!0}=Tt(e,t),p={x:n,y:r},u=yt(o),h=Ua(u);let g=p[h],w=p[u];const m=Tt(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=h==="y"?"height":"width",S=a.reference[h]-a.floating[x]+v.mainAxis,D=a.reference[h]+a.reference[x]-v.mainAxis;g<S?g=S:g>D&&(g=D)}if(d){var b,y;const x=h==="y"?"width":"height",S=Kc.has(Pt(o)),D=a.reference[u]-a.floating[x]+(S&&((b=s.offset)==null?void 0:b[u])||0)+(S?0:v.crossAxis),C=a.reference[u]+a.reference[x]+(S?0:((y=s.offset)==null?void 0:y[u])||0)-(S?v.crossAxis:0);w<D?w=D:w>C&&(w=C)}return{[h]:g,[u]:w}}}},iy=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:c=()=>{},...d}=Tt(e,t),p=await s.detectOverflow(t,d),u=Pt(o),h=On(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,v=h==="end"?"top":"bottom");const y=m-p.top-p.bottom,x=w-p.left-p.right,S=Vt(m-p[v],y),D=Vt(w-p[b],x),C=!t.middlewareData.shift;let k=S,E=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),C&&!h){const I=Ve(p.left,0),K=Ve(p.right,0),B=Ve(p.top,0),q=Ve(p.bottom,0);g?E=w-2*(I!==0||K!==0?I+K:Ve(p.left,p.right)):k=m-2*(B!==0||q!==0?B+q:Ve(p.top,p.bottom))}await c({...t,availableWidth:E,availableHeight:k});const T=await s.getDimensions(i.floating);return w!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function ko(){return typeof window<"u"}function In(e){return Rc(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=(Rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rc(e){return ko()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return ko()?e instanceof Element||e instanceof Ye(e).Element:!1}function _t(e){return ko()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function qc(e){return!ko()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function ur(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 ly(e){return/^(table|td|th)$/.test(In(e))}function Mo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const cy=/transform|translate|scale|rotate|perspective|filter/,dy=/paint|layout|strict|content/,an=e=>!!e&&e!=="none";let Xa;function Za(e){const t=st(e)?it(e):e;return an(t.transform)||an(t.translate)||an(t.scale)||an(t.rotate)||an(t.perspective)||!Qa()&&(an(t.backdropFilter)||an(t.filter))||cy.test(t.willChange||"")||dy.test(t.contain||"")}function uy(e){let t=Yt(e);for(;_t(t)&&!An(t);){if(Za(t))return t;if(Mo(t))return null;t=Yt(t)}return null}function Qa(){return Xa==null&&(Xa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xa}function An(e){return/^(html|body|#document)$/.test(In(e))}function it(e){return Ye(e).getComputedStyle(e)}function Do(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qc(e)&&e.host||wt(e);return qc(t)?t.host:t}function Xc(e){const t=Yt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:_t(t)&&ur(t)?t:Xc(t)}function fr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=Ja(s);return t.concat(s,s.visualViewport||[],ur(o)?o:[],i&&n?fr(i):[])}else return t.concat(o,fr(o,[],n))}function Ja(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_t(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=xo(n)!==a||xo(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function es(e){return st(e)?e:e.contextElement}function Fn(e){const t=es(e);if(!_t(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Zc(t);let s=(a?xo(n.width):n.width)/r,i=(a?xo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const fy=bt(0);function Qc(e){const t=Ye(e);return!Qa()||!t.visualViewport?fy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function py(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function sn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=es(e);let s=bt(1);t&&(r?st(r)&&(s=Fn(r)):s=Fn(e));const i=py(a,n,r)?Qc(a):bt(0);let c=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,p=o.width/s.x,u=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=Ja(w);for(;m&&r&&g!==w;){const v=Fn(m),b=m.getBoundingClientRect(),y=it(m),x=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,S=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,d*=v.y,p*=v.x,u*=v.y,c+=x,d+=S,w=Ye(m),m=Ja(w)}}return So({width:p,height:u,x:c,y:d})}function Eo(e,t){const n=Do(e).scrollLeft;return t?t.left+n:sn(wt(e)).left+n}function Jc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Eo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function hy(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?Mo(t.floating):!1;if(r===s||i&&a)return n;let c={scrollLeft:0,scrollTop:0},d=bt(1);const p=bt(0),u=_t(r);if((u||!u&&!a)&&((In(r)!=="body"||ur(s))&&(c=Do(r)),u)){const g=sn(r);d=Fn(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!u&&!a?Jc(s,c):bt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-c.scrollTop*d.y+p.y+h.y}}function gy(e){return Array.from(e.getClientRects())}function my(e){const t=wt(e),n=Do(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+Eo(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 ed=25;function vy(e,t){const n=Ye(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const p=Qa();(!p||p&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const d=Eo(r);if(d<=0){const p=r.ownerDocument,u=p.body,h=getComputedStyle(u),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-u.clientWidth-g);w<=ed&&(a-=w)}else d<=ed&&(a+=d);return{width:a,height:s,x:i,y:c}}function by(e,t){const n=sn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=_t(e)?Fn(e):bt(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,d=r*a.y;return{width:s,height:i,x:c,y:d}}function td(e,t,n){let r;if(t==="viewport")r=vy(e,n);else if(t==="document")r=my(wt(e));else if(st(t))r=by(t,n);else{const o=Qc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return So(r)}function nd(e,t){const n=Yt(e);return n===t||!st(n)||An(n)?!1:it(n).position==="fixed"||nd(n,t)}function yy(e,t){const n=t.get(e);if(n)return n;let r=fr(e,[],!1).filter(i=>st(i)&&In(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?Yt(e):e;for(;st(s)&&!An(s);){const i=it(s),c=Za(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ur(s)&&!c&&nd(e,s))?r=r.filter(p=>p!==s):o=i,s=Yt(s)}return t.set(e,r),r}function wy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Mo(t)?[]:yy(t,this._c):[].concat(n),r],i=td(t,s[0],o);let c=i.top,d=i.right,p=i.bottom,u=i.left;for(let h=1;h<s.length;h++){const g=td(t,s[h],o);c=Ve(g.top,c),d=Vt(g.right,d),p=Vt(g.bottom,p),u=Ve(g.left,u)}return{width:d-u,height:p-c,x:u,y:c}}function xy(e){const{width:t,height:n}=Zc(e);return{width:t,height:n}}function Cy(e,t,n){const r=_t(t),o=wt(t),a=n==="fixed",s=sn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=bt(0);function d(){c.x=Eo(o)}if(r||!r&&!a)if((In(t)!=="body"||ur(o))&&(i=Do(t)),r){const g=sn(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const p=o&&!r&&!a?Jc(o,i):bt(0),u=s.left+i.scrollLeft-c.x-p.x,h=s.top+i.scrollTop-c.y-p.y;return{x:u,y:h,width:s.width,height:s.height}}function ts(e){return it(e).position==="static"}function rd(e,t){if(!_t(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 od(e,t){const n=Ye(e);if(Mo(e))return n;if(!_t(e)){let o=Yt(e);for(;o&&!An(o);){if(st(o)&&!ts(o))return o;o=Yt(o)}return n}let r=rd(e,t);for(;r&&ly(r)&&ts(r);)r=rd(r,t);return r&&An(r)&&ts(r)&&!Za(r)?n:r||uy(e)||n}const Ny=async function(e){const t=this.getOffsetParent||od,n=this.getDimensions,r=await n(e.floating);return{reference:Cy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sy(e){return it(e).direction==="rtl"}const ky={convertOffsetParentRelativeRectToViewportRelativeRect:hy,getDocumentElement:wt,getClippingRect:wy,getOffsetParent:od,getElementRects:Ny,getClientRects:gy,getDimensions:xy,getScale:Fn,isElement:st,isRTL:Sy};function ad(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function My(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,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:p,top:u,width:h,height:g}=d;if(i||t(),!h||!g)return;const w=Co(u),m=Co(o.clientWidth-(p+h)),v=Co(o.clientHeight-(u+g)),b=Co(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ve(0,Vt(1,c))||1};let S=!0;function D(C){const k=C[0].intersectionRatio;if(k!==c){if(!S)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!ad(d,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(D,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(D,x)}n.observe(e)}return s(!0),a}function Dy(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:c=!1}=r,d=es(e),p=o||a?[...d?fr(d):[],...t?fr(t):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=d&&i?My(d,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!c&&g.observe(d),t&&g.observe(t));let w,m=c?sn(e):null;c&&v();function v(){const b=sn(e);m&&!ad(m,b)&&n(),m=b,w=requestAnimationFrame(v)}return n(),()=>{var b;p.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),u==null||u(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(w)}}const Ey=oy,Ty=ay,Py=ty,_y=iy,Oy=ny,sd=ey,Iy=sy,Ay=(e,t,n)=>{const r=new Map,o={platform:ky,...n},a={...o.platform,_c:r};return Jb(e,t,{...o,platform:a})};var Fy=typeof document<"u",Wy=function(){},To=Fy?N.useLayoutEffect:Wy;function Po(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(!Po(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)&&!Po(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function id(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ld(e,t){const n=id(e);return Math.round(t*n)/n}function ns(e){const t=f.useRef(e);return To(()=>{t.current=e}),t}function $y(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:c,open:d}=e,[p,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);Po(h,r)||g(r);const[w,m]=f.useState(null),[v,b]=f.useState(null),y=f.useCallback(G=>{G!==C.current&&(C.current=G,m(G))},[]),x=f.useCallback(G=>{G!==k.current&&(k.current=G,b(G))},[]),S=a||w,D=s||v,C=f.useRef(null),k=f.useRef(null),E=f.useRef(p),T=c!=null,I=ns(c),K=ns(o),B=ns(d),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};K.current&&(G.platform=K.current),Ay(C.current,k.current,G).then(A=>{const Q={...A,isPositioned:B.current!==!1};Y.current&&!Po(E.current,Q)&&(E.current=Q,Kr.flushSync(()=>{u(Q)}))})},[h,t,n,K,B]);To(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(G=>({...G,isPositioned:!1})))},[d]);const Y=f.useRef(!1);To(()=>(Y.current=!0,()=>{Y.current=!1}),[]),To(()=>{if(S&&(C.current=S),D&&(k.current=D),S&&D){if(I.current)return I.current(S,D,q);q()}},[S,D,q,I,T]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:x}),[y,x]),z=f.useMemo(()=>({reference:S,floating:D}),[S,D]),R=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!z.floating)return G;const A=ld(z.floating,p.x),Q=ld(z.floating,p.y);return i?{...G,transform:"translate("+A+"px, "+Q+"px)",...id(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:Q}},[n,i,z.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:z,floatingStyles:R}),[p,q,ae,z,R])}const zy=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?sd({element:r.current,padding:o}).fn(n):{}:r?sd({element:r,padding:o}).fn(n):{}}}},By=(e,t)=>{const n=Ey(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ly=(e,t)=>{const n=Ty(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hy=(e,t)=>({fn:Iy(e).fn,options:[e,t]}),Vy=(e,t)=>{const n=Py(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yy=(e,t)=>{const n=_y(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gy=(e,t)=>{const n=Oy(e);return{name:n.name,fn:n.fn,options:[e,t]}},jy=(e,t)=>{const n=zy(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Uy="Arrow",cd=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return l.jsx(ne.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});cd.displayName=Uy;var Ky=cd;function Ry(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 c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,i=d.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 rs="Popper",[dd,Gt]=Ze(rs),[qy,ud]=dd(rs),fd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return l.jsx(qy,{scope:t,anchor:r,onAnchorChange:o,children:n})};fd.displayName=rs;var pd="PopperAnchor",hd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ud(pd,n),s=f.useRef(null),i=he(t,s),c=f.useRef(null);return f.useEffect(()=>{const d=c.current;c.current=(r==null?void 0:r.current)||s.current,d!==c.current&&a.onAnchorChange(c.current)}),r?null:l.jsx(ne.div,{...o,ref:i})});hd.displayName=pd;var os="PopperContent",[Xy,Zy]=dd(os),gd=f.forwardRef((e,t)=>{var W,U,X,se,de,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=ud(os,n),[b,y]=f.useState(null),x=he(t,Me=>y(Me)),[S,D]=f.useState(null),C=Ry(S),k=(C==null?void 0:C.width)??0,E=(C==null?void 0:C.height)??0,T=r+(a!=="center"?"-"+a:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},K=Array.isArray(d)?d:[d],B=K.length>0,q={padding:I,boundary:K.filter(Jy),altBoundary:B},{refs:Y,floatingStyles:ae,placement:z,isPositioned:R,middlewareData:G}=$y({strategy:"fixed",placement:T,whileElementsMounted:(...Me)=>Dy(...Me,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[By({mainAxis:o+E,alignmentAxis:s}),c&&Ly({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Hy():void 0,...q}),c&&Vy({...q}),Yy({...q,apply:({elements:Me,rects:Ee,availableWidth:tt,availableHeight:Ue})=>{const{width:Fe,height:Zt}=Ee.reference,De=Me.floating.style;De.setProperty("--radix-popper-available-width",`${tt}px`),De.setProperty("--radix-popper-available-height",`${Ue}px`),De.setProperty("--radix-popper-anchor-width",`${Fe}px`),De.setProperty("--radix-popper-anchor-height",`${Zt}px`)}}),S&&jy({element:S,padding:i}),ew({arrowWidth:k,arrowHeight:E}),h&&Gy({strategy:"referenceHidden",...q})]}),[A,Q]=bd(z),oe=ot(w);Pe(()=>{R&&(oe==null||oe())},[R,oe]);const O=(W=G.arrow)==null?void 0:W.x,F=(U=G.arrow)==null?void 0:U.y,V=((X=G.arrow)==null?void 0:X.centerOffset)!==0,[$,Z]=f.useState();return Pe(()=>{b&&Z(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:R?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--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:l.jsx(Xy,{scope:n,placedSide:A,onArrowChange:D,arrowX:O,arrowY:F,shouldHideArrow:V,children:l.jsx(ne.div,{"data-side":A,"data-align":Q,...m,ref:x,style:{...m.style,animation:R?void 0:"none"}})})})});gd.displayName=os;var md="PopperArrow",Qy={top:"bottom",right:"left",bottom:"top",left:"right"},vd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Zy(md,r),s=Qy[a.placedSide];return l.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:l.jsx(Ky,{...o,ref:n,style:{...o.style,display:"block"}})})});vd.displayName=md;function Jy(e){return e!==null}var ew=e=>({name:"transformOrigin",options:e,fn(t){var v,b,y;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,p]=bd(n),u={start:"0%",center:"50%",end:"100%"}[p],h=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let w="",m="";return d==="bottom"?(w=s?u:`${h}px`,m=`${-c}px`):d==="top"?(w=s?u:`${h}px`,m=`${r.floating.height+c}px`):d==="right"?(w=`${-c}px`,m=s?u:`${g}px`):d==="left"&&(w=`${r.floating.width+c}px`,m=s?u:`${g}px`),{data:{x:w,y:m}}}});function bd(e){const[t,n="center"]=e.split("-");return[t,n]}var pr=fd,hr=hd,_o=gd,Oo=vd,Io="Popover",[yd]=Ze(Io,[Gt]),gr=Gt(),[tw,jt]=yd(Io),wd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=gr(t),c=f.useRef(null),[d,p]=f.useState(!1),[u,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:Io});return l.jsx(pr,{...i,children:l.jsx(tw,{scope:t,contentId:Ce(),triggerRef:c,open:u,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};wd.displayName=Io;var xd="PopoverAnchor",Cd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(xd,n),a=gr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(hr,{...a,...r,ref:t})});Cd.displayName=xd;var Nd="PopoverTrigger",Sd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(Nd,n),a=gr(n),s=he(t,o.triggerRef),i=l.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Pd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(hr,{asChild:!0,...a,children:i})});Sd.displayName=Nd;var as="PopoverPortal",[nw,rw]=yd(as,{forceMount:void 0}),kd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=jt(as,t);return l.jsx(nw,{scope:t,forceMount:n,children:l.jsx(ze,{present:n||a.open,children:l.jsx(kn,{asChild:!0,container:o,children:r})})})};kd.displayName=as;var Wn="PopoverContent",Md=f.forwardRef((e,t)=>{const n=rw(Wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=jt(Wn,e.__scopePopover);return l.jsx(ze,{present:r||a.open,children:a.modal?l.jsx(aw,{...o,ref:t}):l.jsx(sw,{...o,ref:t})})});Md.displayName=Wn;var ow=tn("PopoverContent.RemoveScroll"),aw=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return uo(s)},[]),l.jsx(ar,{as:ow,allowPinchZoom:!0,children:l.jsx(Dd,{...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,c=i.button===0&&i.ctrlKey===!0,d=i.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),sw=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return l.jsx(Dd,{...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 c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Dd=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,...u}=e,h=jt(Wn,n),g=gr(n);return no(),l.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(_o,{"data-state":Pd(h.open),role:"dialog",id:h.contentId,...g,...u,ref:t,style:{...u.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)"}})})})}),Ed="PopoverClose",Td=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(Ed,n);return l.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});Td.displayName=Ed;var iw="PopoverArrow",lw=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gr(n);return l.jsx(Oo,{...o,...r,ref:t})});lw.displayName=iw;function Pd(e){return e?"open":"closed"}var cw=wd,dw=Cd,uw=Sd,fw=kd,_d=Md,pw=Td;const ln=cw,mr=uw,hw=pw,gw=dw,Ut=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>l.jsx(fw,{children:l.jsx(_d,{ref:o,align:t,sideOffset:n,className:P("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})}));Ut.displayName=_d.displayName;const Od=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>l.jsxs(ln,{...s,children:[l.jsx(mr,{asChild:!0,children:t}),l.jsx(Ut,{side:n,align:r,sideOffset:o,className:a,children:e})]});Od.displayName="Popover";const Id=be(["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}}),ss=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>l.jsxs("button",{ref:s,type:"button",className:P(Id({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[l.jsx("span",{className:P("truncate",!o&&"text-muted-foreground"),children:o??r}),l.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));ss.displayName="ComboBoxTrigger";const Ad=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>l.jsx(Ut,{ref:s,className:P("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:l.jsxs(dr,{className:"w-full",value:r,onValueChange:o,children:[l.jsx("div",{className:"border-b border-border",children:l.jsx(vo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),l.jsx(bo,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Ad.displayName="ComboBoxContent";const Fd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>l.jsxs(mo,{ref:a,className:P("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:[l.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&l.jsx(nn,{className:"size-4","aria-hidden":"true"})}),t]}));Fd.displayName="ComboBoxItem";const Wd=f.forwardRef(({className:e,children:t,...n},r)=>l.jsx(yo,{ref:r,className:P("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Wd.displayName="ComboBoxEmpty";const $d=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>l.jsx($c,{ref:o,heading:t,className:P("[&_[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}));$d.displayName="ComboBoxGroup";const zd=f.forwardRef(({className:e,...t},n)=>l.jsx(zc,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));zd.displayName="ComboBoxSeparator";const Bd=ln;Bd.displayName="ComboBoxRoot";const Ld=f.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",searchPlaceholder:o="Search…",emptyMessage:a="No results found.",size:s,isError:i,disabled:c,className:d},p)=>{const[u,h]=f.useState(!1),[g,w]=f.useState(""),m=f.useMemo(()=>{var b;return(b=e.find(y=>y.value===t))==null?void 0:b.label},[e,t]);function v(b){h(b),b||w("")}return l.jsxs(ln,{open:u,onOpenChange:v,children:[l.jsx(mr,{asChild:!0,children:l.jsx(ss,{ref:p,size:s,isError:i,disabled:c,className:d,placeholder:r,"aria-expanded":u,"aria-haspopup":"listbox",children:m})}),l.jsx(Ut,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:l.jsxs(dr,{className:"w-full",children:[l.jsx("div",{className:"border-b border-border",children:l.jsx(vo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:g,onValueChange:w})}),l.jsxs(bo,{className:"max-h-60 overflow-y-auto p-1",children:[l.jsx(yo,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(b=>l.jsxs(mo,{value:b.label,disabled:b.disabled,className:P("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(b.value),h(!1)},children:[l.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===b.value&&l.jsx(nn,{className:"size-4","aria-hidden":"true"})}),b.label]},b.value))]})]})})]})});Ld.displayName="ComboBox";const mw=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function is(e){return mw.has(e)}const ls=[{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 vw(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const cs=(e,t,n,r)=>{const o=vw(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const d=n.trim().toLowerCase();return d===""||o.includes(d)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!is(s))return!0;const c=i.trim().toLowerCase();switch(s){case"empty":return o.trim()==="";case"notEmpty":return o.trim()!=="";case"contains":return c===""||o.includes(c);case"equals":return c===""?!0:o===c;case"startsWith":return c===""||o.startsWith(c);case"endsWith":return c===""||o.endsWith(c);case"notContains":return c===""?!0:!o.includes(c);default:return!0}};function bw(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(is(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function yw(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const ds=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"w-full min-w-0",children:l.jsx("table",{ref:n,className:P("w-full caption-bottom text-sm",e),...t})}));ds.displayName="Table";const us=f.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:P("[&_tr]:border-b [&_tr]:border-border",e),...t}));us.displayName="TableHeader";const fs=f.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:P("[&_tr:last-child]:border-0",e),...t}));fs.displayName="TableBody";const ps=f.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:P("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));ps.displayName="TableFooter";const Ot=f.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:P("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));Ot.displayName="TableRow";const Ao=f.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:P("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}));Ao.displayName="TableHead";const cn=f.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:P("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));cn.displayName="TableCell";const Hd=f.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:P("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Hd.displayName="TableCaption";const hs=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:P("animate-pulse rounded-md bg-muted",e),...t}));hs.displayName="Skeleton";const Vd=f.createContext({inGroup:!1}),Yd=be(["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"}}),vr=f.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=f.use(Vd);return l.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&l.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}),l.jsx("input",{ref:s,className:P(Yd({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"&&l.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})]})});vr.displayName="Input";const gs=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>l.jsx(Vd,{value:{inGroup:!0,isError:t},children:l.jsx("div",{ref:o,"aria-invalid":t||void 0,className:P("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})}));gs.displayName="InputGroup";const ms=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:P("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));ms.displayName="InputAddon";const vs=f.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"Pagination",className:P("flex items-center gap-1",e),...t}));vs.displayName="PaginationRoot";const bs=["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(" "),ys=f.forwardRef(({className:e,isActive:t,...n},r)=>l.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:P(bs,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));ys.displayName="PaginationItem";const ws=f.forwardRef(({className:e,...t},n)=>l.jsx("button",{ref:n,"aria-label":"Previous page",className:P(bs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:l.jsx(ul,{className:"size-4"})}));ws.displayName="PaginationPrev";const xs=f.forwardRef(({className:e,...t},n)=>l.jsx("button",{ref:n,"aria-label":"Next page",className:P(bs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:l.jsx(wn,{className:"size-4"})}));xs.displayName="PaginationNext";const Cs=({className:e,...t})=>l.jsx("span",{"aria-hidden":"true",className:P("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:l.jsx(cm,{className:"size-4"})});Cs.displayName="PaginationEllipsis";function ww(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,c)=>c+1);if(!a){const i=3+2*n;return i>=t?Array.from({length:t},(c,d)=>d+1):[...Array.from({length:i},(c,d)=>d+1),"ellipsis-right",t]}if(!s){const i=3+2*n,c=t-i+1;return c<=1?Array.from({length:t},(d,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(d,p)=>c+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,c)=>r+c),"ellipsis-right",t]}const Ns=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=ww(e,t,r);return l.jsxs(vs,{className:o,...a,children:[l.jsx(ws,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?l.jsx(Cs,{},i):l.jsx(ys,{isActive:i===e,onClick:()=>n(i),children:i},i)),l.jsx(xs,{onClick:()=>n(e+1),disabled:e>=t})]})};Ns.displayName="Pagination";function Gd(e,[t,n]){return Math.min(n,Math.max(t,e))}function xw(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 jd=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"}),Cw="VisuallyHidden",Ud=f.forwardRef((e,t)=>l.jsx(ne.span,{...e,ref:t,style:{...jd,...e.style}}));Ud.displayName=Cw;var Nw=Ud,Sw=[" ","Enter","ArrowUp","ArrowDown"],kw=[" ","Enter"],dn="Select",[Fo,Wo,Mw]=Rr(dn),[$n]=Ze(dn,[Mw,Gt]),$o=Gt(),[Dw,Kt]=$n(dn),[Ew,Tw]=$n(dn),Kd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:c,dir:d,name:p,autoComplete:u,disabled:h,required:g,form:w}=e,m=$o(t),[v,b]=f.useState(null),[y,x]=f.useState(null),[S,D]=f.useState(!1),C=tr(d),[k,E]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:dn}),[T,I]=Qe({prop:s,defaultProp:i,onChange:c,caller:dn}),K=f.useRef(null),B=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(z=>z.props.value).join(";");return l.jsx(pr,{...m,children:l.jsxs(Dw,{required:g,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:D,contentId:Ce(),value:T,onValueChange:I,open:k,onOpenChange:E,dir:C,triggerPointerDownPosRef:K,disabled:h,children:[l.jsx(Fo.Provider,{scope:t,children:l.jsx(Ew,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(z=>{Y(R=>new Set(R).add(z))},[]),onNativeOptionRemove:f.useCallback(z=>{Y(R=>{const G=new Set(R);return G.delete(z),G})},[]),children:n})}),B?l.jsxs(vu,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:u,value:T,onChange:z=>I(z.target.value),disabled:h,form:w,children:[T===void 0?l.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Kd.displayName=dn;var Rd="SelectTrigger",qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$o(n),s=Kt(Rd,n),i=s.disabled||r,c=he(t,s.onTriggerChange),d=Wo(n),p=f.useRef("touch"),[u,h,g]=yu(m=>{const v=d().filter(x=>!x.disabled),b=v.find(x=>x.value===s.value),y=wu(v,m,b);y!==void 0&&s.onValueChange(y.value)}),w=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(hr,{asChild:!0,...a,children:l.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":bu(s.value)?"":void 0,...o,ref:c,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=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Sw.includes(m.key)&&(w(),m.preventDefault())})})})});qd.displayName=Rd;var Xd="SelectValue",Zd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,c=Kt(Xd,n),{onValueNodeHasChildrenChange:d}=c,p=a!==void 0,u=he(t,c.onValueNodeChange);return Pe(()=>{d(p)},[d,p]),l.jsx(ne.span,{...i,ref:u,style:{pointerEvents:"none"},children:bu(c.value)?l.jsx(l.Fragment,{children:s}):a})});Zd.displayName=Xd;var Pw="SelectIcon",_w=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});_w.displayName=Pw;var Ow="SelectPortal",Qd=e=>l.jsx(kn,{asChild:!0,...e});Qd.displayName=Ow;var un="SelectContent",Jd=f.forwardRef((e,t)=>{const n=Kt(un,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Kr.createPortal(l.jsx(eu,{scope:e.__scopeSelect,children:l.jsx(Fo.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(tu,{...e,ref:t})});Jd.displayName=un;var lt=10,[eu,Rt]=$n(un),Iw="SelectContentImpl",Aw=tn("SelectContent.RemoveScroll"),tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:c,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...b}=e,y=Kt(un,n),[x,S]=f.useState(null),[D,C]=f.useState(null),k=he(t,W=>S(W)),[E,T]=f.useState(null),[I,K]=f.useState(null),B=Wo(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return uo(x)},[x]),no();const z=f.useCallback(W=>{const[U,...X]=B().map(ce=>ce.ref.current),[se]=X.slice(-1),de=document.activeElement;for(const ce of W)if(ce===de||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===U&&D&&(D.scrollTop=0),ce===se&&D&&(D.scrollTop=D.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[B,D]),R=f.useCallback(()=>z([E,x]),[z,E,x]);f.useEffect(()=>{q&&R()},[q,R]);const{onOpenChange:G,triggerPointerDownPosRef:A}=y;f.useEffect(()=>{if(x){let W={x:0,y:0};const U=se=>{var de,ce;W={x:Math.abs(Math.round(se.pageX)-(((de=A.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(se.pageY)-(((ce=A.current)==null?void 0:ce.y)??0))}},X=se=>{W.x<=10&&W.y<=10?se.preventDefault():x.contains(se.target)||G(!1),document.removeEventListener("pointermove",U),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,G,A]),f.useEffect(()=>{const W=()=>G(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[G]);const[Q,oe]=yu(W=>{const U=B().filter(de=>!de.disabled),X=U.find(de=>de.ref.current===document.activeElement),se=wu(U,W,X);se&&setTimeout(()=>se.ref.current.focus())}),O=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&(T(W),se&&(ae.current=!0))},[y.value]),F=f.useCallback(()=>x==null?void 0:x.focus(),[x]),V=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&K(W)},[y.value]),$=r==="popper"?Ss:nu,Z=$===Ss?{side:i,sideOffset:c,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(eu,{scope:n,content:x,viewport:D,onViewportChange:C,itemRefCallback:O,selectedItem:E,onItemLeave:F,itemTextRefCallback:V,focusSelectedItem:R,selectedItemText:I,position:r,isPositioned:q,searchRef:Q,children:l.jsx(ar,{as:Aw,allowPinchZoom:!0,children:l.jsx(or,{asChild:!0,trapped:y.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:j(o,W=>{var U;(U=y.trigger)==null||U.focus({preventScroll:!0}),W.preventDefault()}),children:l.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:l.jsx($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:W=>W.preventDefault(),...b,...Z,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:j(b.onKeyDown,W=>{const U=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!U&&W.key.length===1&&oe(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let se=B().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(W.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const de=W.target,ce=se.indexOf(de);se=se.slice(ce+1)}setTimeout(()=>z(se)),W.preventDefault()}})})})})})})});tu.displayName=Iw;var Fw="SelectItemAlignedPosition",nu=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Kt(un,n),s=Rt(un,n),[i,c]=f.useState(null),[d,p]=f.useState(null),u=he(t,k=>p(k)),h=Wo(n),g=f.useRef(!1),w=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&m&&v&&b){const k=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(a.dir!=="rtl"){const de=I.left-E.left,ce=T.left-de,Me=k.left-ce,Ee=k.width+Me,tt=Math.max(Ee,E.width),Ue=window.innerWidth-lt,Fe=Gd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.left=Fe+"px"}else{const de=E.right-I.right,ce=window.innerWidth-T.right-de,Me=window.innerWidth-k.right-ce,Ee=k.width+Me,tt=Math.max(Ee,E.width),Ue=window.innerWidth-lt,Fe=Gd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.right=Fe+"px"}const K=h(),B=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(d),ae=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),R=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),A=ae+z+q+G+R,Q=Math.min(v.offsetHeight*5,A),oe=window.getComputedStyle(m),O=parseInt(oe.paddingTop,10),F=parseInt(oe.paddingBottom,10),V=k.top+k.height/2-lt,$=B-V,Z=v.offsetHeight/2,W=v.offsetTop+Z,U=ae+z+W,X=A-U;if(U<=V){const de=K.length>0&&v===K[K.length-1].ref.current;i.style.bottom="0px";const ce=d.clientHeight-m.offsetTop-m.offsetHeight,Me=Math.max($,Z+(de?F:0)+ce+R),Ee=U+Me;i.style.height=Ee+"px"}else{const de=K.length>0&&v===K[0].ref.current;i.style.top="0px";const Me=Math.max(V,ae+m.offsetTop+(de?O:0)+Z)+X;i.style.height=Me+"px",m.scrollTop=U-V+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,d,m,v,b,a.dir,r]);Pe(()=>x(),[x]);const[S,D]=f.useState();Pe(()=>{d&&D(window.getComputedStyle(d).zIndex)},[d]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return l.jsx($w,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(ne.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});nu.displayName=Fw;var Ww="SelectPopperPosition",Ss=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=$o(n);return l.jsx(_o,{...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)"}})});Ss.displayName=Ww;var[$w,ks]=$n(un,{}),Ms="SelectViewport",ru=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Rt(Ms,n),s=ks(Ms,n),i=he(t,a.onViewportChange),c=f.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Fo.Slot,{scope:n,children:l.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,d=>{const p=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&u){const g=Math.abs(c.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),b=Math.max(m,v);if(b<w){const y=b+g,x=Math.min(w,y),S=y-x;u.style.height=x+"px",u.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,u.style.justifyContent="flex-end")}}}c.current=p.scrollTop})})})]})});ru.displayName=Ms;var ou="SelectGroup",[zw,Bw]=$n(ou),au=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ce();return l.jsx(zw,{scope:n,id:o,children:l.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});au.displayName=ou;var su="SelectLabel",iu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Bw(su,n);return l.jsx(ne.div,{id:o.id,...r,ref:t})});iu.displayName=su;var zo="SelectItem",[Lw,lu]=$n(zo),cu=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Kt(zo,n),c=Rt(zo,n),d=i.value===r,[p,u]=f.useState(a??""),[h,g]=f.useState(!1),w=he(t,y=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,y,r,o)}),m=Ce(),v=f.useRef("touch"),b=()=>{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 l.jsx(Lw,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:f.useCallback(y=>{u(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:l.jsx(Fo.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:l.jsx(ne.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"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"&&b()}),onPointerUp:j(s.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:j(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:j(s.onPointerMove,y=>{var x;v.current=y.pointerType,o?(x=c.onItemLeave)==null||x.call(c):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:j(s.onKeyDown,y=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(kw.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});cu.displayName=zo;var br="SelectItemText",du=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Kt(br,n),i=Rt(br,n),c=lu(br,n),d=Tw(br,n),[p,u]=f.useState(null),h=he(t,b=>u(b),c.onItemTextChange,b=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,b,c.value,c.disabled)}),g=p==null?void 0:p.textContent,w=f.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return Pe(()=>(m(w),()=>v(w)),[m,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(ne.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kr.createPortal(a.children,s.valueNode):null]})});du.displayName=br;var uu="SelectItemIndicator",fu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return lu(uu,n).isSelected?l.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});fu.displayName=uu;var Ds="SelectScrollUpButton",pu=f.forwardRef((e,t)=>{const n=Rt(Ds,e.__scopeSelect),r=ks(Ds,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(gu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});pu.displayName=Ds;var Es="SelectScrollDownButton",hu=f.forwardRef((e,t)=>{const n=Rt(Es,e.__scopeSelect),r=ks(Es,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollHeight-c.clientHeight,p=Math.ceil(c.scrollTop)<d;a(p)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(gu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});hu.displayName=Es;var gu=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Rt("SelectScrollButton",n),s=f.useRef(null),i=Wo(n),c=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),Pe(()=>{var p;const d=i().find(u=>u.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),l.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 d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{c()})})}),Hw="SelectSeparator",mu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});mu.displayName=Hw;var Ts="SelectArrow",Vw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$o(n),a=Kt(Ts,n),s=Rt(Ts,n);return a.open&&s.position==="popper"?l.jsx(Oo,{...o,...r,ref:t}):null});Vw.displayName=Ts;var Yw="SelectBubbleInput",vu=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=xw(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&p){const u=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(u)}},[s,t]),l.jsx(ne.select,{...n,style:{...jd,...n.style},ref:a,defaultValue:t})});vu.displayName=Yw;function bu(e){return e===""||e===void 0}function yu(e){const t=ot(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function wu(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Gw(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Gw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jw=Kd,xu=qd,Uw=Zd,Kw=Qd,Cu=Jd,Rw=ru,qw=au,Nu=iu,Su=cu,Xw=du,Zw=fu,ku=pu,Mu=hu,Du=mu;const Eu=be(["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}}),Ps=jw,Qw=qw,_s=Uw,Bo=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>l.jsxs(xu,{ref:a,className:P("group",Eu({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,l.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Bo.displayName=xu.displayName;const Os=f.forwardRef(({className:e,...t},n)=>l.jsx(ku,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:l.jsx(eo,{className:"size-4"})}));Os.displayName=ku.displayName;const Is=f.forwardRef(({className:e,...t},n)=>l.jsx(Mu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:l.jsx(Mt,{className:"size-4"})}));Is.displayName=Mu.displayName;const Lo=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsx(Kw,{children:l.jsxs(Cu,{ref:o,position:n,sideOffset:4,className:P("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:[l.jsx(Os,{}),l.jsx(Rw,{className:"p-1",children:t}),l.jsx(Is,{})]})}));Lo.displayName=Cu.displayName;const Tu=f.forwardRef(({className:e,...t},n)=>l.jsx(Nu,{ref:n,className:P("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));Tu.displayName=Nu.displayName;const As=f.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Su,{ref:r,className:P("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:[l.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:l.jsx(Zw,{children:l.jsx(nn,{className:"size-4"})})}),l.jsx(Xw,{children:t})]}));As.displayName=Su.displayName;const Pu=f.forwardRef(({className:e,...t},n)=>l.jsx(Du,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Pu.displayName=Du.displayName;const _u=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>l.jsxs(Ps,{disabled:r,...s,children:[l.jsx(Bo,{ref:i,size:t,isError:n,className:o,children:l.jsx(_s,{placeholder:e})}),l.jsx(Lo,{children:a})]}));_u.displayName="Select";var Fs="rovingFocusGroup.onEntryFocus",Jw={bubbles:!1,cancelable:!0},yr="RovingFocusGroup",[Ws,Ou,ex]=Rr(yr),[tx,Ho]=Ze(yr,[ex]),[nx,rx]=tx(yr),Iu=f.forwardRef((e,t)=>l.jsx(Ws.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ws.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(ox,{...e,ref:t})})}));Iu.displayName=yr;var ox=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...u}=e,h=f.useRef(null),g=he(t,h),w=tr(a),[m,v]=Qe({prop:s,defaultProp:i??null,onChange:c,caller:yr}),[b,y]=f.useState(!1),x=ot(d),S=Ou(n),D=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Fs,x),()=>E.removeEventListener(Fs,x)},[x]),l.jsx(nx,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(E=>v(E),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(E=>E+1),[]),onFocusableItemRemove:f.useCallback(()=>k(E=>E-1),[]),children:l.jsx(ne.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{D.current=!0}),onFocus:j(e.onFocus,E=>{const T=!D.current;if(E.target===E.currentTarget&&T&&!b){const I=new CustomEvent(Fs,Jw);if(E.currentTarget.dispatchEvent(I),!I.defaultPrevented){const K=S().filter(z=>z.focusable),B=K.find(z=>z.active),q=K.find(z=>z.id===m),ae=[B,q,...K].filter(Boolean).map(z=>z.ref.current);Wu(ae,p)}}D.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),Au="RovingFocusGroupItem",Fu=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,c=Ce(),d=a||c,p=rx(Au,n),u=p.currentTabStopId===d,h=Ou(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),l.jsx(Ws.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:l.jsx(ne.span,{tabIndex:u?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(d):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=ix(v,p.orientation,p.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(v.currentTarget);x=p.loop?lx(x,S+1):x.slice(S+1)}setTimeout(()=>Wu(x))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:m!=null}):s})})});Fu.displayName=Au;var ax={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ix(e,t,n){const r=sx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ax[r]}function Wu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $u=Iu,zu=Fu,$s=["Enter"," "],cx=["ArrowDown","PageUp","Home"],Bu=["ArrowUp","PageDown","End"],dx=[...cx,...Bu],ux={ltr:[...$s,"ArrowRight"],rtl:[...$s,"ArrowLeft"]},fx={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wr="Menu",[xr,px,hx]=Rr(wr),[fn,Lu]=Ze(wr,[hx,Gt,Ho]),Cr=Gt(),Hu=Ho(),[Vu,qt]=fn(wr),[gx,Nr]=fn(wr),Yu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Cr(t),[c,d]=f.useState(null),p=f.useRef(!1),u=ot(a),h=tr(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})}},[]),l.jsx(pr,{...i,children:l.jsx(Vu,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:d,children:l.jsx(gx,{scope:t,onClose:f.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};Yu.displayName=wr;var mx="MenuAnchor",zs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cr(n);return l.jsx(hr,{...o,...r,ref:t})});zs.displayName=mx;var Bs="MenuPortal",[vx,Gu]=fn(Bs,{forceMount:void 0}),ju=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=qt(Bs,t);return l.jsx(vx,{scope:t,forceMount:n,children:l.jsx(ze,{present:n||a.open,children:l.jsx(kn,{asChild:!0,container:o,children:r})})})};ju.displayName=Bs;var Je="MenuContent",[bx,Ls]=fn(Je),Uu=f.forwardRef((e,t)=>{const n=Gu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=Nr(Je,e.__scopeMenu);return l.jsx(xr.Provider,{scope:e.__scopeMenu,children:l.jsx(ze,{present:r||a.open,children:l.jsx(xr.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx(yx,{...o,ref:t}):l.jsx(wx,{...o,ref:t})})})})}),yx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return uo(a)},[]),l.jsx(Hs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu);return l.jsx(Hs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xx=tn("MenuContent.ScrollLock"),Hs=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=qt(Je,n),b=Nr(Je,n),y=Cr(n),x=Hu(n),S=px(n),[D,C]=f.useState(null),k=f.useRef(null),E=he(t,k,v.onContentChange),T=f.useRef(0),I=f.useRef(""),K=f.useRef(0),B=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,z=w?{as:xx,allowPinchZoom:!0}:void 0,R=A=>{var W,U;const Q=I.current+A,oe=S().filter(X=>!X.disabled),O=document.activeElement,F=(W=oe.find(X=>X.ref.current===O))==null?void 0:W.textValue,V=oe.map(X=>X.textValue),$=Ix(V,Q,F),Z=(U=oe.find(X=>X.textValue===$))==null?void 0:U.ref.current;(function X(se){I.current=se,window.clearTimeout(T.current),se!==""&&(T.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(T.current),[]),no();const G=f.useCallback(A=>{var oe,O;return q.current===((oe=B.current)==null?void 0:oe.side)&&Fx(A,(O=B.current)==null?void 0:O.area)},[]);return l.jsx(bx,{scope:n,searchRef:I,onItemEnter:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),onItemLeave:f.useCallback(A=>{var Q;G(A)||((Q=k.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),pointerGraceTimerRef:K,onPointerGraceIntentChange:f.useCallback(A=>{B.current=A},[]),children:l.jsx(ae,{...z,children:l.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,A=>{var Q;A.preventDefault(),(Q=k.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,children:l.jsx($u,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:D,onCurrentTabStopIdChange:C,onEntryFocus:j(c,A=>{b.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(_o,{role:"menu","aria-orientation":"vertical","data-state":uf(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:E,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,A=>{const oe=A.target.closest("[data-radix-menu-content]")===A.currentTarget,O=A.ctrlKey||A.altKey||A.metaKey,F=A.key.length===1;oe&&(A.key==="Tab"&&A.preventDefault(),!O&&F&&R(A.key));const V=k.current;if(A.target!==V||!dx.includes(A.key))return;A.preventDefault();const Z=S().filter(W=>!W.disabled).map(W=>W.ref.current);Bu.includes(A.key)&&Z.reverse(),_x(Z)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(T.current),I.current="")}),onPointerMove:j(e.onPointerMove,kr(A=>{const Q=A.target,oe=Y.current!==A.clientX;if(A.currentTarget.contains(Q)&&oe){const O=A.clientX>Y.current?"right":"left";q.current=O,Y.current=A.clientX}}))})})})})})})});Uu.displayName=Je;var Cx="MenuGroup",Vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ne.div,{role:"group",...r,ref:t})});Vs.displayName=Cx;var Nx="MenuLabel",Ku=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ne.div,{...r,ref:t})});Ku.displayName=Nx;var Vo="MenuItem",Ru="menu.itemSelect",Yo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=Nr(Vo,e.__scopeMenu),i=Ls(Vo,e.__scopeMenu),c=he(t,a),d=f.useRef(!1),p=()=>{const u=a.current;if(!n&&u){const h=new CustomEvent(Ru,{bubbles:!0,cancelable:!0});u.addEventListener(Ru,g=>r==null?void 0:r(g),{once:!0}),Ki(u,h),h.defaultPrevented?d.current=!1:s.onClose()}};return l.jsx(qu,{...o,ref:c,disabled:n,onClick:j(e.onClick,p),onPointerDown:u=>{var h;(h=e.onPointerDown)==null||h.call(e,u),d.current=!0},onPointerUp:j(e.onPointerUp,u=>{var h;d.current||(h=u.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,u=>{const h=i.searchRef.current!=="";n||h&&u.key===" "||$s.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Yo.displayName=Vo;var qu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ls(Vo,n),i=Hu(n),c=f.useRef(null),d=he(t,c),[p,u]=f.useState(!1),[h,g]=f.useState("");return f.useEffect(()=>{const w=c.current;w&&g((w.textContent??"").trim())},[a.children]),l.jsx(xr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:l.jsx(zu,{asChild:!0,...i,focusable:!r,children:l.jsx(ne.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:j(e.onPointerMove,kr(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,kr(w=>s.onItemLeave(w))),onFocus:j(e.onFocus,()=>u(!0)),onBlur:j(e.onBlur,()=>u(!1))})})})}),Sx="MenuCheckboxItem",Xu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return l.jsx(tf,{scope:e.__scopeMenu,checked:n,children:l.jsx(Yo,{role:"menuitemcheckbox","aria-checked":Go(n)?"mixed":n,...o,ref:t,"data-state":js(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Go(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xu.displayName=Sx;var Zu="MenuRadioGroup",[kx,Mx]=fn(Zu,{value:void 0,onValueChange:()=>{}}),Qu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return l.jsx(kx,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(Vs,{...o,ref:t})})});Qu.displayName=Zu;var Ju="MenuRadioItem",ef=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=Mx(Ju,e.__scopeMenu),a=n===o.value;return l.jsx(tf,{scope:e.__scopeMenu,checked:a,children:l.jsx(Yo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":js(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});ef.displayName=Ju;var Ys="MenuItemIndicator",[tf,Dx]=fn(Ys,{checked:!1}),nf=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Dx(Ys,n);return l.jsx(ze,{present:r||Go(a.checked)||a.checked===!0,children:l.jsx(ne.span,{...o,ref:t,"data-state":js(a.checked)})})});nf.displayName=Ys;var Ex="MenuSeparator",rf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});rf.displayName=Ex;var Tx="MenuArrow",of=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cr(n);return l.jsx(Oo,{...o,...r,ref:t})});of.displayName=Tx;var Gs="MenuSub",[Px,af]=fn(Gs),sf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=qt(Gs,t),s=Cr(t),[i,c]=f.useState(null),[d,p]=f.useState(null),u=ot(o);return f.useEffect(()=>(a.open===!1&&u(!1),()=>u(!1)),[a.open,u]),l.jsx(pr,{...s,children:l.jsx(Vu,{scope:t,open:r,onOpenChange:u,content:d,onContentChange:p,children:l.jsx(Px,{scope:t,contentId:Ce(),triggerId:Ce(),trigger:i,onTriggerChange:c,children:n})})})};sf.displayName=Gs;var Sr="MenuSubTrigger",lf=f.forwardRef((e,t)=>{const n=qt(Sr,e.__scopeMenu),r=Nr(Sr,e.__scopeMenu),o=af(Sr,e.__scopeMenu),a=Ls(Sr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),c(null)}},[i,c]),l.jsx(zs,{asChild:!0,...d,children:l.jsx(qu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":uf(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:u=>{var h;(h=e.onClick)==null||h.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,kr(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,kr(u=>{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",b=v?-5:5,y=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+b,y:u.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,u=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&u.key===" "||ux[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});lf.displayName=Sr;var cf="MenuSubContent",df=f.forwardRef((e,t)=>{const n=Gu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=Nr(Je,e.__scopeMenu),i=af(cf,e.__scopeMenu),c=f.useRef(null),d=he(t,c);return l.jsx(xr.Provider,{scope:e.__scopeMenu,children:l.jsx(ze,{present:r||a.open,children:l.jsx(xr.Slot,{scope:e.__scopeMenu,children:l.jsx(Hs,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var u;s.isUsingKeyboardRef.current&&((u=c.current)==null||u.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 u=p.currentTarget.contains(p.target),h=fx[s.dir].includes(p.key);u&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});df.displayName=cf;function uf(e){return e?"open":"closed"}function Go(e){return e==="indeterminate"}function js(e){return Go(e)?"indeterminate":e?"checked":"unchecked"}function _x(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ox(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ix(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ox(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Ax(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],c=t[s],d=i.x,p=i.y,u=c.x,h=c.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function Fx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ax(n,t)}function kr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Wx=Yu,$x=zs,zx=ju,Bx=Uu,Lx=Vs,Hx=Ku,Vx=Yo,Yx=Xu,Gx=Qu,jx=ef,Ux=nf,Kx=rf,Rx=of,qx=sf,Xx=lf,Zx=df,jo="DropdownMenu",[Qx]=Ze(jo,[Lu]),Ie=Lu(),[Jx,ff]=Qx(jo),pf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=Ie(t),d=f.useRef(null),[p,u]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:jo});return l.jsx(Jx,{scope:t,triggerId:Ce(),triggerRef:d,contentId:Ce(),open:p,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(h=>!h),[u]),modal:i,children:l.jsx(Wx,{...c,open:p,onOpenChange:u,dir:r,modal:i,children:n})})};pf.displayName=jo;var hf="DropdownMenuTrigger",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ff(hf,n),s=Ie(n);return l.jsx($x,{asChild:!0,...s,children:l.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())})})})});gf.displayName=hf;var e0="DropdownMenuPortal",mf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ie(t);return l.jsx(zx,{...r,...n})};mf.displayName=e0;var vf="DropdownMenuContent",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ff(vf,n),a=Ie(n),s=f.useRef(!1);return l.jsx(Bx,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const c=i.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,p=c.button===2||d;(!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)"}})});bf.displayName=vf;var t0="DropdownMenuGroup",yf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Lx,{...o,...r,ref:t})});yf.displayName=t0;var n0="DropdownMenuLabel",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Hx,{...o,...r,ref:t})});wf.displayName=n0;var r0="DropdownMenuItem",xf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Vx,{...o,...r,ref:t})});xf.displayName=r0;var o0="DropdownMenuCheckboxItem",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Yx,{...o,...r,ref:t})});Cf.displayName=o0;var a0="DropdownMenuRadioGroup",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Gx,{...o,...r,ref:t})});Nf.displayName=a0;var s0="DropdownMenuRadioItem",Sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(jx,{...o,...r,ref:t})});Sf.displayName=s0;var i0="DropdownMenuItemIndicator",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Ux,{...o,...r,ref:t})});kf.displayName=i0;var l0="DropdownMenuSeparator",Mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Kx,{...o,...r,ref:t})});Mf.displayName=l0;var c0="DropdownMenuArrow",d0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Rx,{...o,...r,ref:t})});d0.displayName=c0;var u0=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ie(t),[i,c]=Qe({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return l.jsx(qx,{...s,open:i,onOpenChange:c,children:n})},f0="DropdownMenuSubTrigger",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Xx,{...o,...r,ref:t})});Df.displayName=f0;var p0="DropdownMenuSubContent",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return l.jsx(Zx,{...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)"}})});Ef.displayName=p0;var h0=pf,g0=gf,Tf=mf,Pf=bf,m0=yf,_f=wf,Of=xf,If=Cf,v0=Nf,Af=Sf,Ff=kf,Wf=Mf,b0=u0,$f=Df,zf=Ef;const Uo=h0,Ko=g0,y0=m0,w0=Tf,Us=b0,Bf=v0,Mr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>l.jsx(Tf,{children:l.jsx(Pf,{ref:r,sideOffset:t,className:P("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})}));Mr.displayName=Pf.displayName;const It=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>l.jsx(Of,{ref:o,className:P("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}));It.displayName=Of.displayName;const Ks=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(If,{ref:o,className:P("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:[l.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Ff,{children:l.jsx(nn,{className:"size-3.5"})})}),t]}));Ks.displayName=If.displayName;const Rs=f.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Af,{ref:r,className:P("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:[l.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Ff,{children:l.jsx(am,{className:"size-2 fill-current"})})}),t]}));Rs.displayName=Af.displayName;const Dr=f.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(_f,{ref:r,className:P("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Dr.displayName=_f.displayName;const zn=f.forwardRef(({className:e,...t},n)=>l.jsx(Wf,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));zn.displayName=Wf.displayName;const Ro=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs($f,{ref:o,className:P("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,l.jsx(wn,{className:"ml-auto"})]}));Ro.displayName=$f.displayName;const qo=f.forwardRef(({className:e,...t},n)=>l.jsx(zf,{ref:n,className:P("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}));qo.displayName=zf.displayName;const Lf=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>l.jsxs(Uo,{...s,children:[l.jsx(Ko,{asChild:!0,children:e}),l.jsx(Mr,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,c)=>i.type==="separator"?l.jsx(zn,{},c):i.type==="label"?l.jsx(Dr,{children:i.label},c):l.jsxs(It,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},c))})]});Lf.displayName="DropdownMenu";const Hf=f.createContext(null);function Vf(){return f.useContext(Hf)}const Yf="application/x-bookers-grouping-column-id",Er="application/x-bookers-grouping-chip",At="bookers-expand";function Gf(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Gf):e.footer!==void 0}function x0(){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 jf(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 Xo(e,t,n){return Math.min(Math.max(e,t),n)}function C0({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=c=>{var p;c.preventDefault(),c.stopPropagation();const d=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:c.pointerId,startY:c.clientY,startHeight:d},c.currentTarget.setPointerCapture(c.pointerId)},s=c=>{const d=o.current;if(!d||c.pointerId!==d.pointerId)return;const p=c.clientY-d.startY,u=Xo(d.startHeight+p,t,n);r(u)},i=c=>{const d=o.current;if(!(!d||c.pointerId!==d.pointerId)){o.current=null;try{c.currentTarget.releasePointerCapture(c.pointerId)}catch{}}};return l.jsx("div",{className:P("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:c=>{var h;if(c.key!=="ArrowUp"&&c.key!=="ArrowDown")return;c.preventDefault();const d=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,u=c.key==="ArrowUp"?-d:d;r(Xo(p+u,t,n))},children:l.jsxs("div",{className:"flex items-center justify-center gap-1.5","aria-hidden":!0,children:[l.jsx("span",{className:"h-px w-6 bg-border/50"}),l.jsx(um,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),l.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function N0({column:e,id:t,showClear:n}){const r=e.getFilterValue();return l.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[l.jsx(vr,{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()?l.jsx(Nn,{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:l.jsx(Dt,{className:"size-3.5","aria-hidden":!0})}):null]})}function S0({column:e,id:t,showClear:n}){var u;const r=e.getFilterValue(),o=bw(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",c=h=>{e.setFilterValue(yw(h))},d=((u=ls.find(h=>h.value===a))==null?void 0:u.label)??a,p=e.getIsFiltered();return l.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[l.jsxs(gs,{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"min-w-0 flex-1",children:i?l.jsx(vr,{size:"sm",type:"text",value:s,onChange:h=>c({op:a,value:h.target.value}),placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"w-full min-w-0"}):l.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:d})}),l.jsx(ms,{className:"p-0",children:l.jsxs(Uo,{children:[l.jsx(Ko,{asChild:!0,children:l.jsx(Nn,{type:"button",variant:"ghost",size:"sm",className:P("h-8 min-w-8 shrink-0 rounded-none px-2 text-muted-foreground transition-colors",p&&"text-primary"),"aria-label":`${t} filter operator: ${d}`,children:l.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[l.jsx(hm,{className:"size-4","aria-hidden":!0}),p?l.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]})})}),l.jsx(Mr,{align:"end",className:"min-w-44",children:l.jsx(Bf,{value:a,onValueChange:h=>{is(h)&&c({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:ls.map(h=>l.jsx(Rs,{value:h.value,children:h.label},h.value))})})]})})]}),n&&p?l.jsx(Nn,{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:l.jsx(Dt,{className:"size-3.5","aria-hidden":!0})}):null]})}function k0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===cs)?l.jsx(S0,{column:e,id:r,showClear:n}):l.jsx(N0,{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 Uf(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+Uf(n),0)}function M0({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,c=Math.min((o+1)*a,s),d=e.getPageCount(),p=f.useMemo(()=>{const u=[...new Set(n)].sort((h,g)=>h-g);return u.includes(a)||(u.push(a),u.sort((h,g)=>h-g)),u},[n,a]);return l.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:[l.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:s===0?"No rows.":l.jsxs(l.Fragment,{children:["Showing"," ",l.jsx("span",{className:"text-foreground",children:i}),"–",l.jsx("span",{className:"text-foreground",children:c})," of ",l.jsx("span",{className:"text-foreground",children:s})]})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Rows per page"}),l.jsxs(Ps,{value:String(a),onValueChange:u=>{e.setPageSize(Number(u))},children:[l.jsx(Bo,{size:"sm",className:"w-18","aria-label":"Rows per page",children:l.jsx(_s,{})}),l.jsx(Lo,{children:p.map(u=>l.jsx(As,{value:String(u),children:u},u))})]})]}),l.jsx(Ns,{page:o+1,totalPages:Math.max(1,d),onPageChange:u=>e.setPageIndex(u-1),siblingCount:r})]})]})}function D0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:c,rowSelection:d,onRowSelectionChange:p,enableColumnResizing:u=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:b,columnOrder:y,onColumnOrderChange:x,enableColumnPinning:S=!1,defaultColumnPinning:D,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:E=!1,showGlobalFilter:T=!0,globalFilterPlaceholder:I="Search…",defaultGlobalFilter:K="",globalFilter:B,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:z=!0,showColumnFilterClear:R=!0,defaultColumnFilters:G,columnFilters:A,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:O,expanded:F,onExpandedChange:V,getRowCanExpand:$,renderExpandedRow:Z,showExpandColumn:W=!1,expandedRowClassName:U,enableGrouping:X=!1,defaultGrouping:se,grouping:de,onGroupingChange:ce,showGroupingDropZone:Me=!0,groupingDropZoneLabel:Ee="Drag column headers here to set row groups.",groupingDropZoneHint:tt="Drag to add another group level.",isLoading:Ue=!1,loadingRows:Fe=5,emptyState:Zt,enableColumnVisibility:De=!1,defaultColumnVisibility:Lr,columnVisibility:Hr,onColumnVisibilityChange:_e,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:gn=48,virtualOverscan:Qt=8,enableFooter:Un=!1,enableScrollContainerResize:kt=!1,scrollContainerResizeMaxHeight:Jt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:Kn=!1,manualPagination:pt=!1,rowCount:Rn,pageCount:qn,defaultPagination:ht,pagination:Xn,onPaginationChange:Zn,pageSizeOptions:mn=[10,20,50,100],paginationSiblingCount:Ke=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Se]=ct(a,s,ue,J),[Oe,en]=f.useState(c??{}),[xe,Te]=ct(d,p,Oe,en),[Qn,Re]=f.useState(g??{}),[qe,ra]=ct(w,m,Qn,Re),[$t,tg]=f.useState(b??[]),[PS,_S]=ct(y,x,$t,tg),[OS,IS]=f.useState(D??{left:[],right:[]}),[AS,FS]=ct(C,k,OS,IS),[WS,$S]=f.useState(K??""),[oa,Wi]=ct(B,q,WS,$S),[zS,BS]=f.useState(G??[]),[LS,HS]=ct(A,Q,zS,BS),[VS,YS]=f.useState(O??{}),[GS,ng]=ct(F,V,VS,YS),[jS,US]=f.useState(se??[]),[$i,Vr]=ct(de,ce,jS,US),[KS,RS]=f.useState(Lr??{}),[qS,XS]=ct(Hr,_e,KS,RS),zi=!!(Kn&&!X),[ZS,QS]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[JS,ek]=ct(Xn,Zn,ZS,QS),tk=E||Y,vn=!!(oe&&Z&&!X),Bi=f.useMemo(()=>!vn||!W||t.some(L=>L.id===At)?t:[{id:At,header:()=>null,size:48,minSize:40,maxSize:56,enableSorting:!1,enableColumnFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,meta:{bookersExpandColumn:!0},cell:({row:L})=>l.jsx("button",{type:"button",className:P("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]",!L.getCanExpand()&&"cursor-not-allowed opacity-40"),onClick:L.getToggleExpandedHandler(),"aria-expanded":L.getIsExpanded(),"aria-label":L.getIsExpanded()?"Collapse row details":"Expand row details",disabled:!L.getCanExpand(),children:l.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",L.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})})},...t],[t,vn,W]),nk=f.useMemo(()=>Un&&Bi.some(Gf),[Un,Bi]),rg=f.useMemo(()=>{const _={};return u&&(_.minSize=72,_.size=160,_.maxSize=640),Y&&(_.filterFn=z?cs:"includesString"),Object.keys(_).length>0?_:void 0},[u,Y,z]),aa=f.useRef(null),Jn=f.useRef(0),[rk,sa]=f.useState(!1),gt=He.useReactTable({data:e,columns:Bi,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...tk?{getFilteredRowModel:He.getFilteredRowModel(),...E?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Wi}:{},...Y?{onColumnFiltersChange:HS}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Se}:{},...zi?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:ek,...pt?{manualPagination:!0,...Rn!==void 0?{rowCount:Rn}:{},...qn!==void 0?{pageCount:qn}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...u?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:ra}:{},...rg?{defaultColumn:rg}:{},...v?{onColumnOrderChange:_S}:{},enableColumnPinning:S,onColumnPinningChange:FS,...De?{enableHiding:!0,onColumnVisibilityChange:XS}:{enableHiding:!1},...vn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:$??(()=>!0),onExpandedChange:ng}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:Vr,onExpandedChange:ng}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:xe}:{},...u?{columnSizing:qe}:{},...v?{columnOrder:PS}:{},columnPinning:AS,...E?{globalFilter:oa}:{},...Y?{columnFilters:LS}:{},...X?{grouping:$i}:{},...X||vn?{expanded:GS}:{},...De?{columnVisibility:qS}:{},...zi?{pagination:JS}:{}},...n?{getRowId:(_,L)=>String(n(_,L))}:{}}),Yr=gt.getVisibleLeafColumns().length,Gr=gt.getRowModel().rows,og=f.useRef(null),er=ft&&!X&&!vn&&Gr.length>0&&!Ue,Li=f.useRef(null),ok=f.useCallback(_=>{Li.current=_,og.current=er?_:null},[er]),bn=f.useMemo(()=>{const _=x0(),L=jf(Le,_.minPx),H=jf(Jt,_.maxPx);return{minPx:Math.min(L,H),maxPx:Math.max(L,H)}},[Le,Jt]),[ia,ag]=f.useState(()=>kt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!kt||ia!==null)return;const _=Li.current;_&&ag(Xo(_.offsetHeight,bn.minPx,bn.maxPx))},[kt,ia,We,bn]);const sg=fg.useVirtualizer({count:Gr.length,getScrollElement:()=>og.current,estimateSize:()=>gn,overscan:Qt,enabled:er}),ak=_=>{var nt;const L=_.column.getCanSort(),H=_.column.getIsSorted(),fe=!!((nt=_.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(_.isPlaceholder)return null;if(!L||fe)return He.flexRender(_.column.columnDef.header,_.getContext());const ke=_.column.getToggleSortingHandler();return l.jsxs("button",{type:"button",className:P("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:ke,children:[He.flexRender(_.column.columnDef.header,_.getContext()),H==="asc"?l.jsx(eo,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,H==="desc"?l.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]})},sk=(_,L)=>{!L||L===_||L===At||_===At||gt.setColumnOrder(H=>{const fe=H.length>0?H:gt.getAllLeafColumns().map(yn=>yn.id),ke=fe.indexOf(L),nt=fe.indexOf(_);if(ke===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(ke,1),Xe.splice(nt,0,L),W&&vn&&Xe.includes(At)){const yn=Xe.filter(Ur=>Ur!==At);return[At,...yn]}return Xe})},Hi=gt.getHeaderGroups(),ig=Hi[0],lg=2.5,ik=`${Hi.length*lg}rem`,Vi=_=>{const L=gt.getColumn(_);if(!L)return _;const H=L.columnDef.header;return typeof H=="string"?H:_},lk=(_,L)=>{_!==L&&Vr(H=>{const fe=[...H],ke=fe.filter(Xe=>Xe!==_),nt=ke.indexOf(L);return nt===-1?fe:(ke.splice(nt,0,_),ke)})},ck=_=>{Vr(L=>{const fe=[...L].filter(ke=>ke!==_);return fe.push(_),fe})},dk=_=>{var H;if(_.getIsPlaceholder())return null;if(_.getIsAggregated())return He.flexRender(_.column.columnDef.aggregatedCell??_.column.columnDef.cell,_.getContext());const L=!!((H=_.column.columnDef.meta)!=null&&H.bookersSkipGroupRowExpand);if(X&&_.getIsGrouped()&&!L){const fe=_.row,ke=Uf(fe);return l.jsxs("span",{className:"flex min-h-10 min-w-0 items-center gap-1.5",children:[l.jsx("button",{type:"button",className:P("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:l.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",fe.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})}),l.jsx("span",{className:"min-w-0 flex-1",children:He.flexRender(_.column.columnDef.cell,_.getContext())}),l.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",ke,")"]})]})}return He.flexRender(_.column.columnDef.cell,_.getContext())},cg=_=>l.jsxs(f.Fragment,{children:[l.jsx(Ot,{"data-selected":_.getIsSelected()?"true":void 0,children:_.getVisibleCells().map((L,H)=>{const fe=L.column.getIsPinned();return l.jsx(cn,{className:P(fe==="left"&&P("relative sticky z-30 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"),fe==="right"&&P("relative sticky z-30 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:{...H===0&&_.depth>0?{paddingLeft:`${_.depth*.75+.75}rem`}:{},...u||fe?{width:L.column.getSize(),minWidth:L.column.getSize(),maxWidth:L.column.getSize()}:{},...fe==="left"?{left:L.column.getStart("left")}:{},...fe==="right"?{right:L.column.getAfter("right")}:{}},children:dk(L)},L.id)})}),vn&&_.getIsExpanded()&&Z?l.jsx(Ot,{"data-expanded-detail":_.id,children:l.jsx(cn,{colSpan:Yr,className:P("border-t border-border bg-muted/30 p-4 align-top",U),children:Z(_)})}):null]},_.id),jr=er?sg.getVirtualItems():[],Yi=er&&jr.length>0,dg=Yi?jr[0].start:0,ug=Yi?sg.getTotalSize()-jr[jr.length-1].end:0,uk=kt?ia!==null?{height:ia}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return l.jsx(Hf.Provider,{value:gt,children:l.jsxs("div",{ref:re,className:P("w-full min-w-0",ie),...pe,children:[E&&T?l.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:l.jsxs("div",{className:"relative min-w-0 max-w-sm flex-1 self-start",children:[l.jsx(vr,{size:"sm",type:"text",placeholder:I,value:oa,onChange:_=>{Wi(_.target.value)},"aria-label":I,autoComplete:"off",className:P("min-w-0 w-full",oa.trim()!==""&&"pr-12")}),oa.trim()!==""?l.jsx(Nn,{type:"button",variant:"ghost",className:P("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:()=>Wi(""),children:l.jsx(Dt,{className:"size-3.5","aria-hidden":!0})}):null]})}):null,X&&Me?l.jsxs("div",{role:"region","aria-label":"Row groups",className:P("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",rk?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:_=>{_.preventDefault();const L=Array.from(_.dataTransfer.types);_.dataTransfer.dropEffect=L.includes(Er)?"move":"copy"},onDragEnter:_=>{_.preventDefault(),Jn.current+=1,sa(!0)},onDragLeave:()=>{Jn.current-=1,Jn.current<=0&&(Jn.current=0,sa(!1))},onDrop:_=>{_.preventDefault(),Jn.current=0,sa(!1);const L=_.dataTransfer.getData(Er);if(L){ck(L);return}const H=_.dataTransfer.getData(Yf);if(!H)return;const fe=gt.getColumn(H);fe!=null&&fe.getCanGroup()&&Vr(ke=>{const Xe=[...ke].filter(yn=>yn!==H);return Xe.push(H),Xe})},children:[l.jsx("span",{className:"inline-flex size-10 shrink-0 items-center justify-center self-center rounded-sm text-muted-foreground",children:l.jsx(gm,{className:"size-4","aria-hidden":!0})}),l.jsx("div",{className:"flex min-h-8 min-w-0 flex-1 flex-wrap items-center gap-1",children:$i.length===0?l.jsx("span",{className:"text-sm text-muted-foreground select-none",children:Ee}):l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[$i.map((_,L)=>l.jsxs(f.Fragment,{children:[L>0?l.jsx(wn,{className:"size-3.5 shrink-0 text-muted-foreground/80","aria-hidden":!0}):null,l.jsxs("div",{className:P("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:H=>{H.preventDefault(),H.stopPropagation(),Array.from(H.dataTransfer.types).includes(Er)&&(H.dataTransfer.dropEffect="move")},onDrop:H=>{H.preventDefault(),H.stopPropagation(),Jn.current=0,sa(!1);const fe=H.dataTransfer.getData(Er);fe&&lk(fe,_)},children:[l.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Vi(_)}`,className:P("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:H=>{H.dataTransfer.setData(Er,_),H.dataTransfer.effectAllowed="move"},children:l.jsx(pm,{className:"size-4","aria-hidden":!0})}),l.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Vi(_)}),l.jsx("button",{type:"button","aria-label":`Remove ${Vi(_)} from row groups`,className:P("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:()=>{Vr(H=>[...H].filter(fe=>fe!==_))},children:l.jsx(Dt,{className:"size-3.5","aria-hidden":!0})})]})]},_)),l.jsx("span",{className:"text-xs text-muted-foreground select-none",children:tt})]})})]}):null,l.jsxs("div",{className:"w-full",children:[l.jsx("div",{ref:ok,className:P("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",er&&"[overflow-anchor:none]"),style:uk,children:l.jsxs(ds,{className:P(u&&"table-fixed"),style:u?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[l.jsxs(us,{children:[Hi.map((_,L)=>l.jsx(Ot,{children:_.headers.map(H=>{const fe=`${L*lg}rem`,ke=H.column.getIsPinned(),nt=u&&H.column.getCanResize()&&!H.isPlaceholder,Xe=H.column.id===At,yn=v&&!H.isPlaceholder&&!Xe&&(!H.subHeaders||H.subHeaders.length===0),Ur=X&&!H.isPlaceholder&&!Xe&&H.column.getCanGroup()&&(!H.subHeaders||H.subHeaders.length===0);return l.jsxs(Ao,{colSpan:H.colSpan,className:P("relative sticky z-30 bg-background",ke==="left"&&P("z-50 bg-background",!H.column.getIsLastColumn("left")&&"border-r border-border",H.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),ke==="right"&&P("z-50 bg-background",!H.column.getIsFirstColumn("right")&&"border-l border-border",H.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,...(u||ke)&&!H.isPlaceholder?{width:H.getSize(),minWidth:H.getSize(),maxWidth:H.getSize()}:{},...ke==="left"?{left:H.column.getStart("left")}:{},...ke==="right"?{right:H.column.getAfter("right")}:{}},onDragOver:v?$e=>{$e.preventDefault(),$e.dataTransfer.dropEffect="move"}:void 0,onDrop:v?$e=>{$e.preventDefault();const fk=$e.dataTransfer.getData("application/x-bookers-column-id")||aa.current;sk(H.column.id,fk),aa.current=null}:void 0,children:[l.jsxs("span",{className:P("flex min-h-10 min-w-0 items-center gap-1",nt?"pr-1":"pr-2"),children:[yn?l.jsx("span",{draggable:!0,"aria-label":`Reorder column ${H.column.id}`,className:P("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=>{aa.current=H.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",H.column.id)},onDragEnd:()=>{aa.current=null},children:l.jsx(fm,{className:"size-4","aria-hidden":"true"})}):null,l.jsx("span",{className:P("min-w-0 flex-1",Ur&&"cursor-grab active:cursor-grabbing"),draggable:Ur,onDragStart:Ur?$e=>{$e.dataTransfer.setData(Yf,H.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:ak(H)})]}),nt?l.jsx("div",{"data-column-resize-handle":H.column.id,onClick:$e=>$e.stopPropagation(),onMouseDown:H.getResizeHandler(),onTouchStart:H.getResizeHandler(),className:P("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",H.column.getIsResizing()?"opacity-100":"opacity-75 hover:opacity-100"),"aria-hidden":!0,children:l.jsx("span",{className:"h-1/2 w-[3px] rounded-full bg-border"})}):null]},H.id)})},_.id)),Y&&ae&&ig?l.jsx(Ot,{children:ig.headers.map(_=>{const L=_.column.getIsPinned();return l.jsx(Ao,{colSpan:_.colSpan,className:P("relative sticky z-30 bg-background py-2",L==="left"&&P("z-50 bg-background",!_.column.getIsLastColumn("left")&&"border-r border-border",_.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),L==="right"&&P("z-50 bg-background",!_.column.getIsFirstColumn("right")&&"border-l border-border",_.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:ik,...(u||L)&&!_.isPlaceholder?{width:_.getSize(),minWidth:_.getSize(),maxWidth:_.getSize()}:{},...L==="left"?{left:_.column.getStart("left")}:{},...L==="right"?{right:_.column.getAfter("right")}:{}},children:!_.isPlaceholder&&_.column.getCanFilter()?l.jsx(k0,{column:_.column,enableAdvancedColumnFilters:z,showColumnFilterClear:R}):null},`filter-${_.id}`)})}):null]}),l.jsx(fs,{children:Ue?Array.from({length:Fe}).map((_,L)=>l.jsx(Ot,{children:l.jsx(cn,{colSpan:Yr,children:l.jsx(hs,{className:"h-4 w-full"})})},L)):Gr.length===0?l.jsx(Ot,{children:l.jsx(cn,{colSpan:Yr,className:"h-24 text-center text-sm text-muted-foreground",children:Zt??"No results."})}):Yi?l.jsxs(l.Fragment,{children:[dg>0?l.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:l.jsx("td",{colSpan:Yr,className:"h-0 border-0 p-0",style:{height:dg}})}):null,jr.map(_=>{const L=Gr[_.index];return cg(L)}),ug>0?l.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:l.jsx("td",{colSpan:Yr,className:"h-0 border-0 p-0",style:{height:ug}})}):null]}):Gr.map(_=>cg(_))}),nk?l.jsx(ps,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(_=>l.jsx(Ot,{children:_.headers.map(L=>{const H=L.column.getIsPinned();return l.jsx(cn,{colSpan:L.colSpan,className:P("border-border text-sm font-medium text-foreground",H==="left"&&P("relative sticky z-30 bg-muted/50",!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"),H==="right"&&P("relative sticky z-30 bg-muted/50",!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:{...(u||H)&&!L.isPlaceholder?{width:L.getSize(),minWidth:L.getSize(),maxWidth:L.getSize()}:{},...H==="left"?{left:L.column.getStart("left")}:{},...H==="right"?{right:L.column.getAfter("right")}:{}},children:L.isPlaceholder?null:He.flexRender(L.column.columnDef.footer,L.getContext())},L.id)})},_.id))}):null]})}),zi?l.jsx(M0,{table:gt,manualPagination:pt,pageSizeOptions:mn,paginationSiblingCount:Ke}):null,kt?l.jsx(C0,{scrollRegionRef:Li,minPx:bn.minPx,maxPx:bn.maxPx,onHeightChange:_=>ag(Xo(_,bn.minPx,bn.maxPx))}):null]})]})})}const Kf=f.forwardRef(D0);Kf.displayName="DataTable";const E0={bookersColumnHeaderActions:!0};function T0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function P0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),c=e.getCanPin(),d=e.getIsSorted(),p=e.getIsPinned(),u=Vf(),h=!!(u!=null&&u.options.enableHiding&&u.getAllLeafColumns().some(g=>g.getCanHide()));return l.jsxs("div",{ref:a,className:P("flex min-w-0 items-center gap-0.5",r),...o,children:[i?l.jsxs("button",{type:"button",className:P("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:[l.jsx("span",{className:"min-w-0 truncate",children:s}),d==="asc"?l.jsx(eo,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,d==="desc"?l.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]}):l.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:l.jsx("span",{className:"min-w-0 truncate",children:s})}),(i||c||h)&&l.jsxs(Uo,{children:[l.jsx(Ko,{asChild:!0,children:l.jsx("button",{type:"button",className:P("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:l.jsx(lm,{className:"size-3.5","aria-hidden":"true"})})}),l.jsxs(Mr,{align:"end",className:"min-w-44",children:[i?l.jsxs(l.Fragment,{children:[l.jsx(Dr,{children:"Sort"}),l.jsxs(It,{onSelect:()=>{e.toggleSorting(!1)},children:[l.jsx(em,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),l.jsxs(It,{onSelect:()=>{e.toggleSorting(!0)},children:[l.jsx(Jg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),l.jsx(It,{disabled:d===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&c?l.jsx(zn,{}):null,c?l.jsxs(Us,{children:[l.jsxs(Ro,{children:[l.jsx(vm,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),l.jsxs(qo,{children:[l.jsx(It,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),l.jsx(It,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),l.jsxs(It,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[l.jsx(mm,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&u&&(i||c)?l.jsx(zn,{}):null,h&&u?l.jsxs(Us,{children:[l.jsxs(Ro,{children:[l.jsx(im,{className:"size-4","aria-hidden":"true"}),"Columns"]}),l.jsxs(qo,{className:"min-w-48",children:[l.jsx(Dr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),l.jsx(zn,{}),u.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>l.jsx(Ks,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:T0(g)},g.id))]})]}):null]})]})]})}const Rf=f.forwardRef(P0);Rf.displayName="DataTableColumnHeader";const qf=6048e5,_0=864e5,Xf=Symbol.for("constructDateFrom");function Ne(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Xf in e?e[Xf](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return Ne(t||e,e)}function Zf(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(t)?Ne(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qf(e,t,n){const r=ve(e,n==null?void 0:n.in);if(isNaN(t))return Ne(e,NaN);if(!t)return r;const o=r.getDate(),a=Ne(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 O0={};function Tr(){return O0}function Bn(e,t){var i,c,d,p;const n=Tr(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((p=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 Pr(e,t){return Bn(e,{...t,weekStartsOn:1})}function Jf(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ne(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Pr(o),s=Ne(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Pr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function ep(e){const t=ve(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=Ne.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function _r(e,t){const n=ve(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function qs(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=_r(r),s=_r(o),i=+a-ep(a),c=+s-ep(s);return Math.round((i-c)/_0)}function I0(e,t){const n=Jf(e,t),r=Ne(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Pr(r)}function A0(e,t,n){return Zf(e,t*7,n)}function F0(e,t,n){return Qf(e,t*12,n)}function W0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ne.bind(null,o));const a=ve(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Ne(r,n||NaN)}function $0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ne.bind(null,o));const a=ve(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Ne(r,n||NaN)}function z0(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return+_r(r)==+_r(o)}function tp(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function B0(e){return!(!tp(e)&&typeof e!="number"||isNaN(+ve(e)))}function np(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 L0(e,t){const n=ve(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 rp(e,t){const[n,r]=Ln(e,t.start,t.end);return{start:n,end:r}}function H0(e,t){const{start:n,end:r}=rp(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 c=[];for(;+s<=a;)c.push(Ne(n,s)),s.setMonth(s.getMonth()+i);return o?c.reverse():c}function V0(e,t){const n=ve(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Y0(e,t){const n=ve(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 op(e,t){const n=ve(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function G0(e,t){const{start:n,end:r}=rp(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 c=[];for(;+s<=a;)c.push(Ne(n,s)),s.setFullYear(s.getFullYear()+i);return o?c.reverse():c}function ap(e,t){var i,c,d,p;const n=Tr(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((p=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 j0(e,t){return ap(e,{...t,weekStartsOn:1})}const U0={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"}},K0=(e,t,n)=>{let r;const o=U0[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 Xs(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const R0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},q0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},X0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z0={date:Xs({formats:R0,defaultWidth:"full"}),time:Xs({formats:q0,defaultWidth:"full"}),dateTime:Xs({formats:X0,defaultWidth:"full"})},Q0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},J0=(e,t,n,r)=>Q0[e];function Or(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 eC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nC={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"]},rC={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"]},oC={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"}},aC={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"}},sC={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:Or({values:eC,defaultWidth:"wide"}),quarter:Or({values:tC,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Or({values:nC,defaultWidth:"wide"}),day:Or({values:rC,defaultWidth:"wide"}),dayPeriod:Or({values:oC,defaultWidth:"wide",formattingValues:aC,defaultFormattingWidth:"wide"})};function Ir(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],c=Array.isArray(i)?lC(i,u=>u.test(s)):iC(i,u=>u.test(s));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const p=t.slice(s.length);return{value:d,rest:p}}}function iC(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lC(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function cC(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 dC=/^(\d+)(th|st|nd|rd)?/i,uC=/\d+/i,fC={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},pC={any:[/^b/i,/^(a|c)/i]},hC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gC={any:[/1/i,/2/i,/3/i,/4/i]},mC={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},vC={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]},bC={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},yC={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]},wC={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},xC={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}},CC={ordinalNumber:cC({matchPattern:dC,parsePattern:uC,valueCallback:e=>parseInt(e,10)}),era:Ir({matchPatterns:fC,defaultMatchWidth:"wide",parsePatterns:pC,defaultParseWidth:"any"}),quarter:Ir({matchPatterns:hC,defaultMatchWidth:"wide",parsePatterns:gC,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ir({matchPatterns:mC,defaultMatchWidth:"wide",parsePatterns:vC,defaultParseWidth:"any"}),day:Ir({matchPatterns:bC,defaultMatchWidth:"wide",parsePatterns:yC,defaultParseWidth:"any"}),dayPeriod:Ir({matchPatterns:wC,defaultMatchWidth:"any",parsePatterns:xC,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:K0,formatLong:Z0,formatRelative:J0,localize:sC,match:CC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function NC(e,t){const n=ve(e,t==null?void 0:t.in);return qs(n,op(n))+1}function Zs(e,t){const n=ve(e,t==null?void 0:t.in),r=+Pr(n)-+I0(n);return Math.round(r/qf)+1}function sp(e,t){var p,u,h,g;const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Tr(),a=(t==null?void 0:t.firstWeekContainsDate)??((u=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:u.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=Ne((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Bn(s,t),c=Ne((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=Bn(c,t);return+n>=+i?r+1:+n>=+d?r:r-1}function SC(e,t){var i,c,d,p;const n=Tr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(d=n.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=sp(e,t),a=Ne((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Bn(a,t)}function Qs(e,t){const n=ve(e,t==null?void 0:t.in),r=+Bn(n,t)-+SC(n,t);return Math.round(r/qf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={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)}},Vn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ip={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 Xt.y(e,t)},Y:function(e,t,n,r){const o=sp(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=Jf(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 Xt.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=Qs(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Zs(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"}):Xt.d(e,t)},D:function(e,t,n){const r=NC(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=Vn.noon:r===0?o=Vn.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=Vn.evening:r>=12?o=Vn.afternoon:r>=4?o=Vn.morning:o=Vn.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 Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.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"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return cp(r);case"XXXX":case"XX":return pn(r);case"XXXXX":case"XXX":default:return pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return cp(r);case"xxxx":case"xx":return pn(r);case"xxxxx":case"xxx":default:return pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lp(r,":");case"OOOO":default:return"GMT"+pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lp(r,":");case"zzzz":default:return"GMT"+pn(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 lp(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 cp(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):pn(e,t)}function pn(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 dp=(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"})}},up=(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"})}},kC={p:up,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return dp(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}}",dp(r,t)).replace("{{time}}",up(o,t))}},MC=/^D+$/,DC=/^Y+$/,EC=["D","DD","YY","YYYY"];function TC(e){return MC.test(e)}function PC(e){return DC.test(e)}function _C(e,t,n){const r=OC(e,t,n);if(console.warn(r),EC.includes(e))throw new RangeError(r)}function OC(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 IC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FC=/^'([^]*?)'?$/,WC=/''/g,$C=/[a-zA-Z]/;function Yn(e,t,n){var p,u,h,g,w,m,v,b;const r=Tr(),o=(n==null?void 0:n.locale)??r.locale??Hn,a=(n==null?void 0:n.firstWeekContainsDate)??((u=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:u.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??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,i=ve(e,n==null?void 0:n.in);if(!B0(i))throw new RangeError("Invalid time value");let c=t.match(AC).map(y=>{const x=y[0];if(x==="p"||x==="P"){const S=kC[x];return S(y,o.formatLong)}return y}).join("").match(IC).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:zC(y)};if(ip[x])return{isToken:!0,value:y};if(x.match($C))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(y=>{if(!y.isToken)return y.value;const x=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&PC(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&TC(x))&&_C(x,t,String(e));const S=ip[x[0]];return S(i,x,o.localize,d)}).join("")}function zC(e){const t=e.match(FC);return t?t[1].replace(WC,"'"):e}function BC(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ne(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function LC(e,t){return ve(e,t==null?void 0:t.in).getMonth()}function HC(e,t){return ve(e,t==null?void 0:t.in).getFullYear()}function VC(e,t){return+ve(e)>+ve(t)}function YC(e,t){return+ve(e)<+ve(t)}function GC(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 jC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function UC(e,t,n){const r=ve(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Ne(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=BC(s);return r.setMonth(t,Math.min(a,i)),r}function KC(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(+r)?Ne(e,NaN):(r.setFullYear(t),r)}function RC(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 Js={},Ar={};function hn(e,t){try{const r=(Js[e]||(Js[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Ar?Ar[r]:fp(r,r.split(":"))}catch{if(e in Ar)return Ar[e];const n=e==null?void 0:e.match(qC);return n?fp(e,n.slice(1)):NaN}}const qC=/([+-]\d\d):?(\d\d)?/;function fp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Ar[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(hn(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)),hp(this),ei(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=-hn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ei(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const pp=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!pp.test(e))return;const t=e.replace(pp,"$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),XC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ei(this),+this}))});function ei(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-hn(e.timeZone,e)*60))}function XC(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()),hp(e)}function hp(e){const t=hn(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 c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const d=new Date(+e);d.setUTCSeconds(0);const p=o>0?d.getSeconds():(d.getSeconds()-60)%60,u=Math.round(-(hn(e.timeZone,e)*60))%60;(u||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+p));const h=hn(e.timeZone,e),g=h>0?Math.floor(h):Math.ceil(h),m=-new Date(+e).getTimezoneOffset()-g,v=g!==n,b=m-c;if(v&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const y=hn(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),S=g-x;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class Ae extends xt{static tz(t,...n){return n.length?new Ae(...n,t):new Ae(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} (${RC(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 Ae(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ae(+new Date(t),this.timeZone)}}const gp=5,ZC=4;function QC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,gp*7-1);return t.getMonth(e)===t.getMonth(a)?gp:ZC}function mp(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 JC(e,t){const n=mp(e,t),r=QC(e,t);return t.addDays(n,r*7-1)}const vp={...Hn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Yn(s,i,{locale:Hn,...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)=>Yn(o,a,{locale:Hn,...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)=>Yn(s,i,{locale:Hn,...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)=>Yn(o,a,{locale:Hn,...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?Ae.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 Ae(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):Zf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Qf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):A0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):F0(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):qs(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):np(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):H0(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):G0(r),a=new Set(o.map(c=>this.getYear(c)));if(a.size===o.length)return o;const s=[];return a.forEach(c=>{s.push(new Date(c,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):JC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):j0(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):L0(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):ap(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Y0(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Yn(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):Zs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):LC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):HC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Qs(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):VC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):YC(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):tp(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):z0(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):GC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):jC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):W0(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):$0(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):KC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):mp(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):_r(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Pr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):V0(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Bn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):op(r)},this.options={locale:vp,...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 bp{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 e1{constructor(t,n){this.date=t,this.weeks=n}}class t1{constructor(t,n){this.days=n,this.weekNumber=t}}function n1(e){return N.createElement("button",{...e})}function r1(e){return N.createElement("span",{...e})}function o1(e){const{size:t=24,orientation:n="left",className:r}=e;return N.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&N.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&N.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&N.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&N.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function a1(e){const{day:t,modifiers:n,...r}=e;return N.createElement("td",{...r})}function s1(e){const{day:t,modifiers:n,...r}=e,o=N.useRef(null);return N.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),N.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 we;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(we||(we={}));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 i1(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:c})=>c===a.value);return N.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},N.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:c,label:d,disabled:p})=>N.createElement(r.Option,{key:c,value:c,disabled:p},d))),N.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,N.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function l1(e){return N.createElement("div",{...e})}function c1(e){return N.createElement("div",{...e})}function d1(e){const{calendarMonth:t,displayIndex:n,...r}=e;return N.createElement("div",{...r},e.children)}function u1(e){const{calendarMonth:t,displayIndex:n,...r}=e;return N.createElement("div",{...r})}function f1(e){return N.createElement("table",{...e})}function p1(e){return N.createElement("div",{...e})}const yp=N.createContext(void 0);function Fr(){const e=N.useContext(yp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function h1(e){const{components:t}=Fr();return N.createElement(t.Dropdown,{...e})}function g1(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:c,labelNext:d}}=Fr(),p=N.useCallback(h=>{o&&(n==null||n(h))},[o,n]),u=N.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return N.createElement("nav",{...a},N.createElement(s.PreviousMonthButton,{type:"button",className:i[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:u},N.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ee.Chevron],orientation:"left"})),N.createElement(s.NextMonthButton,{type:"button",className:i[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:p},N.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function m1(e){const{components:t}=Fr();return N.createElement(t.Button,{...e})}function v1(e){return N.createElement("option",{...e})}function b1(e){const{components:t}=Fr();return N.createElement(t.Button,{...e})}function y1(e){const{rootRef:t,...n}=e;return N.createElement("div",{...n,ref:t})}function w1(e){return N.createElement("select",{...e})}function x1(e){const{week:t,...n}=e;return N.createElement("tr",{...n})}function C1(e){return N.createElement("th",{...e})}function N1(e){return N.createElement("thead",{"aria-hidden":!0},N.createElement("tr",{...e}))}function S1(e){const{week:t,...n}=e;return N.createElement("th",{...n})}function k1(e){return N.createElement("th",{...e})}function M1(e){return N.createElement("tbody",{...e})}function D1(e){const{components:t}=Fr();return N.createElement(t.Dropdown,{...e})}const E1=Object.freeze(Object.defineProperty({__proto__:null,Button:n1,CaptionLabel:r1,Chevron:o1,Day:a1,DayButton:s1,Dropdown:i1,DropdownNav:l1,Footer:c1,Month:d1,MonthCaption:u1,MonthGrid:f1,Months:p1,MonthsDropdown:h1,Nav:g1,NextMonthButton:m1,Option:v1,PreviousMonthButton:b1,Root:y1,Select:w1,Week:x1,WeekNumber:S1,WeekNumberHeader:k1,Weekday:C1,Weekdays:N1,Weeks:M1,YearsDropdown:D1},Symbol.toStringTag,{value:"Module"}));function Ft(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 ti(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Zo(e){return!!(e&&typeof e=="object"&&"from"in e)}function ni(e){return!!(e&&typeof e=="object"&&"after"in e)}function ri(e){return!!(e&&typeof e=="object"&&"before"in e)}function wp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function xp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Wt(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(xp(i,n))return i.some(c=>o(e,c));if(Zo(i))return Ft(i,e,!1,n);if(wp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(ti(i)){const c=a(i.before,e),d=a(i.after,e),p=c>0,u=d<0;return s(i.before,i.after)?u&&p:p||u}return ni(i)?a(e,i.after)>0:ri(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function T1(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:c,broadcastCalendar:d,today:p=o.today()}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,b=n&&g(n),y=r&&m(r),x={[we.focused]:[],[we.outside]:[],[we.disabled]:[],[we.hidden]:[],[we.today]:[]},S={};for(const D of e){const{date:C,displayMonth:k}=D,E=!!(k&&!h(C,k)),T=!!(b&&w(C,b)),I=!!(y&&v(C,y)),K=!!(a&&Wt(C,a,o)),B=!!(s&&Wt(C,s,o))||T||I||!d&&!c&&E||d&&c===!1&&E,q=u(C,p);E&&x.outside.push(D),K&&x.disabled.push(D),B&&x.hidden.push(D),q&&x.today.push(D),i&&Object.keys(i).forEach(Y=>{const ae=i==null?void 0:i[Y];ae&&Wt(C,ae,o)&&(S[Y]?S[Y].push(D):S[Y]=[D])})}return D=>{const C={[we.focused]:!1,[we.disabled]:!1,[we.hidden]:!1,[we.outside]:!1,[we.today]:!1},k={};for(const E in x){const T=x[E];C[E]=T.some(I=>I===D)}for(const E in S)k[E]=S[E].some(T=>T===D);return{...C,...k}}}function P1(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[we[a]]?o.push(t[we[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function _1(e){return{...E1,...e}}function O1(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 I1(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in we)e[we[t]]=`rdp-${we[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 Cp(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const A1=Cp;function F1(e,t,n){return(n??new Ge(t)).format(e,"d")}function W1(e,t=Ct){return t.format(e,"LLLL")}function $1(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function z1(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function B1(){return""}function Np(e,t=Ct){return t.format(e,"yyyy")}const L1=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Cp,formatDay:F1,formatMonthCaption:A1,formatMonthDropdown:W1,formatWeekNumber:z1,formatWeekNumberHeader:B1,formatWeekdayName:$1,formatYearCaption:Np,formatYearDropdown:Np},Symbol.toStringTag,{value:"Module"}));function H1(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...L1,...e}}function oi(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 V1=oi;function ai(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const Y1=ai;function Sp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function kp(e){return"Choose the Month"}function Mp(){return""}const G1="Go to the Next Month";function Dp(e,t){return G1}function Ep(e){return"Go to the Previous Month"}function Tp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function Pp(e,t){return`Week ${e}`}function _p(e){return"Week Number"}function Op(e){return"Choose the Year"}const j1=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Y1,labelDay:V1,labelDayButton:oi,labelGrid:ai,labelGridcell:Sp,labelMonthDropdown:kp,labelNav:Mp,labelNext:Dp,labelPrevious:Ep,labelWeekNumber:Pp,labelWeekNumberHeader:_p,labelWeekday:Tp,labelYearDropdown:Op},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function U1(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...j1,...e??{},labelDayButton:ut(oi,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(kp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(Dp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(Ep,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(Pp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(Op,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(ai,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(Sp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(Mp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(_p,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(Tp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function K1(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:c,getMonth:d}=o;return c({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=d(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function R1(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 q1(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 c=e.addDays(a,i);s.push(c)}return s}function X1(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:c}=r,d=a(e),p=s(t),u=i({start:d,end:p});return o&&u.reverse(),u.map(h=>{const g=n.formatYearDropdown(h,r);return{value:c(h),label:g,disabled:!1}})}function Z1(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=c=>{const d=typeof c=="number"||typeof c=="string"?new Date(c):c;return new Ae(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},s=c=>{const d=a(c);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(Ae.tz(e)),newDate:(c,d,p)=>new Ae(c,d,p,12,0,0,e),startOfDay:c=>a(c),startOfWeek:(c,d)=>{const p=a(c),u=(d==null?void 0:d.weekStartsOn)??o,h=(p.getDay()-u+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:c=>{const d=a(c),p=(d.getDay()-1+7)%7;return d.setDate(d.getDate()-p),d},startOfMonth:c=>{const d=a(c);return d.setDate(1),d},startOfYear:c=>{const d=a(c);return d.setMonth(0,1),d},endOfWeek:(c,d)=>{const p=a(c),g=((((d==null?void 0:d.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:c=>{const d=a(c),p=(7-d.getDay())%7;return d.setDate(d.getDate()+p),d},endOfMonth:c=>{const d=a(c);return d.setMonth(d.getMonth()+1,0),d},endOfYear:c=>{const d=a(c);return d.setMonth(11,31),d},eachMonthOfInterval:c=>{const d=a(c.start),p=a(c.end),u=[],h=new Ae(d.getFullYear(),d.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)u.push(new Ae(h,e)),h.setMonth(h.getMonth()+1,1);return u},addDays:(c,d)=>{const p=a(c);return p.setDate(p.getDate()+d),p},addWeeks:(c,d)=>{const p=a(c);return p.setDate(p.getDate()+d*7),p},addMonths:(c,d)=>{const p=a(c);return p.setMonth(p.getMonth()+d),p},addYears:(c,d)=>{const p=a(c);return p.setFullYear(p.getFullYear()+d),p},eachYearOfInterval:c=>{const d=a(c.start),p=a(c.end),u=[],h=new Ae(d.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)u.push(new Ae(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return u},getWeek:(c,d)=>{var u;const p=s(c);return Qs(p,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((u=r==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??1})},getISOWeek:c=>{const d=s(c);return Zs(d)},differenceInCalendarDays:(c,d)=>{const p=s(c),u=s(d);return qs(p,u)},differenceInCalendarMonths:(c,d)=>{const p=s(c),u=s(d);return np(p,u)}}}const Wr=e=>e instanceof HTMLElement?e:null,si=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Q1=e=>Wr(e.querySelector("[data-animated-month]")),ii=e=>Wr(e.querySelector("[data-animated-caption]")),li=e=>Wr(e.querySelector("[data-animated-weeks]")),J1=e=>Wr(e.querySelector("[data-animated-nav]")),eN=e=>Wr(e.querySelector("[data-animated-weekdays]"));function tN(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=N.useRef(null),i=N.useRef(r),c=N.useRef(!1);N.useLayoutEffect(()=>{const d=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const p=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[je.caption_after_enter]:n[je.caption_before_enter],g=u?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(si(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const S=Q1(x);S&&x.contains(S)&&x.removeChild(S);const D=ii(x);D&&D.classList.remove(h);const C=li(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,c.current||p||o)return;const v=w instanceof HTMLElement?si(w):[],b=si(e.current);if(b!=null&&b.every(y=>y instanceof HTMLElement)&&v&&v.every(y=>y instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const y=J1(e.current);y&&(y.style.zIndex="1"),b.forEach((x,S)=>{const D=v[S];if(!D)return;x.style.position="relative",x.style.overflow="hidden";const C=ii(x);C&&C.classList.add(h);const k=li(x);k&&k.classList.add(g);const E=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.style.zIndex=""),C&&C.classList.remove(h),k&&k.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(D)&&x.removeChild(D)};D.style.pointerEvents="none",D.style.position="absolute",D.style.overflow="hidden",D.setAttribute("aria-hidden","true");const T=eN(D);T&&(T.style.opacity="0");const I=ii(D);I&&(I.classList.add(u?n[je.caption_before_exit]:n[je.caption_after_exit]),I.addEventListener("animationend",E));const K=li(D);K&&K.classList.add(u?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(D,x.firstChild)})}})}function nN(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:p,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:y,startOfWeek:x}=r,S=c?b(o,r):s?y(o):x(o),D=c?h(a):s?g(w(a)):m(w(a)),C=t&&(c?h(t):s?g(t):m(t)),k=C&&v(D,C)?C:D,E=p(k,S),T=u(a,o)+1,I=[];for(let q=0;q<=E;q++){const Y=d(S,q);I.push(Y)}const B=(c?35:42)*T;if(i&&I.length<B){const q=B-I.length;for(let Y=0;Y<q;Y++){const ae=d(I[I.length-1],1);I.push(ae)}}return I}function rN(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 oN(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 Ip(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let c=o||a||s;const{differenceInCalendarMonths:d,addMonths:p,startOfMonth:u}=r;if(n&&d(n,c)<i-1){const h=-1*(i-1);c=p(n,h)}return t&&d(c,t)<0&&(c=t),u(c)}function aN(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:c,getISOWeek:d,getWeek:p,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const b=n.broadcastCalendar?u(v,r):n.ISOWeek?h(v):g(v),y=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):c(i(v)),x=t.filter(k=>k>=b&&k<=y),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<S){const k=t.filter(E=>{const T=S-x.length;return E>y&&E<=o(y,T)});x.push(...k)}const D=x.reduce((k,E)=>{const T=n.ISOWeek?d(E):p(E),I=k.find(B=>B.weekNumber===T),K=new bp(E,v,r);return I?I.days.push(K):k.push(new t1(T,[K])),k},[]),C=new e1(v,D);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function sN(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:c,endOfYear:d,newDate:p,today:u}=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(c(e.today??u(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function iN(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:c}=r,d=o?a:1,p=s(e);if(!t)return i(p,d);if(!(c(t,e)<a))return i(p,d)}function lN(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:c}=r,d=o?a??1:1,p=s(e);if(!t)return i(p,-d);if(!(c(p,t)<=0))return i(p,-d)}function cN(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Qo(e,t){const[n,r]=N.useState(e);return[t===void 0?n:t,r]}function dN(e,t){var S;const[n,r]=sN(e,t),{startOfMonth:o,endOfMonth:a}=t,s=Ip(e,n,r,t),[i,c]=Qo(s,e.month?s:void 0);N.useEffect(()=>{const D=Ip(e,n,r,t);c(D)},[e.timeZone]);const{months:d,weeks:p,days:u,previousMonth:h,nextMonth:g}=N.useMemo(()=>{const D=oN(i,r,{numberOfMonths:e.numberOfMonths},t),C=nN(D,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=aN(D,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=cN(k),T=rN(k),I=lN(i,n,e,t),K=iN(i,r,e,t);return{months:k,weeks:E,days:T,previousMonth:I,nextMonth:K}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(S=e.endMonth)==null?void 0:S.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:m}=e,v=D=>p.some(C=>C.days.some(k=>k.isEqualTo(D))),b=D=>{if(w)return;let C=o(D);n&&C<o(n)&&(C=o(n)),r&&C>o(r)&&(C=o(r)),c(C),m==null||m(C)};return{months:d,weeks:p,days:u,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:D=>{v(D)||b(D.date)}}}var Nt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Nt||(Nt={}));function Ap(e){return!e[we.disabled]&&!e[we.hidden]&&!e[we.outside]}function uN(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Ap(i)&&(i[we.focused]&&a<Nt.FocusedModifier?(o=s,a=Nt.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<Nt.LastFocused?(o=s,a=Nt.LastFocused):n(s.date)&&a<Nt.Selected?(o=s,a=Nt.Selected):i[we.today]&&a<Nt.Today&&(o=s,a=Nt.Today))}return o||(o=e.find(s=>Ap(t(s)))),o}function fN(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:c}=a,{addDays:d,addMonths:p,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:b,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:S}=s;let C={day:d,week:u,month:p,year:h,startOfWeek:k=>c?y(k,s):i?x(k):S(k),endOfWeek:k=>c?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=b([o,C])),C}function Fp(e,t,n,r,o,a,s,i=0){if(i>365)return;const c=fN(e,t,n.date,r,o,a,s),d=!!(a.disabled&&Wt(c,a.disabled,s)),p=!!(a.hidden&&Wt(c,a.hidden,s)),u=c,h=new bp(c,u,s);return!d&&!p?h:Fp(e,t,h,r,o,a,s,i+1)}function pN(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=N.useState(),c=uN(t.days,n,r||(()=>!1),s),[d,p]=N.useState(a?c:void 0);return{isFocusTarget:m=>!!(c!=null&&c.isEqualTo(m)),setFocused:p,focused:d,blur:()=>{i(d),p(void 0)},moveFocus:(m,v)=>{if(!d)return;const b=Fp(m,v,d,t.navStart,t.navEnd,e,o);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),p(b)))}}}function hN(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Qo(n,o?n:void 0),i=o?n:a,{isSameDay:c}=t,d=g=>(i==null?void 0:i.some(w=>c(w,g)))??!1,{min:p,max:u}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(d(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(b=>!c(b,g))}else(i==null?void 0:i.length)===u?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:d}}function gN(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:c,isAfter:d,isBefore:p}=a;let u;if(!s&&!i)u={from:e,to:n>0?void 0:e};else if(s&&!i)c(s,e)?n===0?u={from:s,to:e}:o?u={from:s,to:void 0}:u=void 0:p(e,s)?u={from:e,to:s}:u={from:s,to:e};else if(s&&i)if(c(s,e)&&c(i,e))o?u={from:s,to:i}:u=void 0;else if(c(s,e))u={from:s,to:n>0?void 0:e};else if(c(i,e))u={from:e,to:n>0?void 0:e};else if(p(e,s))u={from:e,to:i};else if(d(e,s))u={from:s,to:e};else if(d(e,i))u={from:s,to:e};else throw new Error("Invalid range");if(u!=null&&u.from&&(u!=null&&u.to)){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function mN(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 Wp(e,t,n=Ct){return Ft(e,t.from,!1,n)||Ft(e,t.to,!1,n)||Ft(t,e.from,!1,n)||Ft(t,e.to,!1,n)}function vN(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)?Ft(e,i,!1,n):xp(i,n)?i.some(c=>Ft(e,c,!1,n)):Zo(i)?i.from&&i.to?Wp(e,{from:i.from,to:i.to},n):!1:wp(i)?mN(e,i.dayOfWeek,n):ti(i)?n.isAfter(i.before,i.after)?Wp(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Wt(e.from,i,n)||Wt(e.to,i,n):ni(i)||ri(i)?Wt(e.from,i,n)||Wt(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function bN(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[c,d]=Qo(a,i?a:void 0),p=i?a:c;return{selected:p,select:(g,w,m)=>{const{min:v,max:b}=e;let y;if(g){const x=p==null?void 0:p.from,S=p==null?void 0:p.to,D=!!x&&!!S,C=!!x&&!!S&&t.isSameDay(x,S)&&t.isSameDay(g,x);o&&(D||!(p!=null&&p.from))?!s&&C?y=void 0:y={from:g,to:void 0}:y=gN(g,p,v,b,s,t)}return r&&n&&(y!=null&&y.from)&&y.to&&vN({from:y.from,to:y.to},n,t)&&(y.from=g,y.to=void 0),i||d(y),i==null||i(y,g,w,m),y},isSelected:g=>p&&Ft(p,g,!1,t)}}function yN(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Qo(n,o?n:void 0),i=o?n:a,{isSameDay:c}=t;return{selected:i,select:(u,h,g)=>{let w=u;return!r&&i&&i&&c(u,i)&&(w=void 0),o||s(w),o==null||o(w,u,h,g),w},isSelected:u=>i?c(i,u):!1}}function wN(e,t){const n=yN(e,t),r=hN(e,t),o=bN(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 Ae&&e.timeZone===t?e:new Ae(e,t)}function Gn(e,t,n){return et(e,t)}function $p(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Gn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Gn(r,t):r):Zo(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:ti(e)?{before:Gn(e.before,t),after:Gn(e.after,t)}:ni(e)?{after:Gn(e.after,t)}:ri(e)?{before:Gn(e.before,t)}:e}function ci(e,t,n){return e&&(Array.isArray(e)?e.map(r=>$p(r,t)):$p(e,t))}function xN(e){var Ke;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=(Ke=t.selected)==null?void 0:Ke.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=ci(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ci(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ci((re=t.modifiers)==null?void 0:re[pe],n)}),t.modifiers=ie}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:c}=N.useMemo(()=>{const ie={...vp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?Z1(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:_1(t.components),formatters:H1(t.formatters),labels:U1(t.labels,J.options),locale:ie,classNames:{...I1(),...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:d,mode:p,navLayout:u,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:b,onDayMouseLeave:y,onNextClick:x,onPrevClick:S,showWeekNumber:D,styles:C}=t,{formatCaption:k,formatDay:E,formatMonthDropdown:T,formatWeekNumber:I,formatWeekNumberHeader:K,formatWeekdayName:B,formatYearDropdown:q}=o,Y=dN(t,s),{days:ae,months:z,navStart:R,navEnd:G,previousMonth:A,nextMonth:Q,goToMonth:oe}=Y,O=T1(ae,t,R,G,s),{isSelected:F,select:V,selected:$}=wN(t,s)??{},{blur:Z,focused:W,isFocusTarget:U,moveFocus:X,setFocused:se}=pN(t,Y,O,F??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:Me,labelMonthDropdown:Ee,labelNav:tt,labelPrevious:Ue,labelNext:Fe,labelWeekday:Zt,labelWeekNumber:De,labelWeekNumberHeader:Lr,labelYearDropdown:Hr}=a,_e=N.useMemo(()=>q1(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),ft=p!==void 0||w!==void 0,We=N.useCallback(()=>{A&&(oe(A),S==null||S(A))},[A,oe,S]),gn=N.useCallback(()=>{Q&&(oe(Q),x==null||x(Q))},[oe,Q,x]),Qt=N.useCallback((ie,pe)=>re=>{re.preventDefault(),re.stopPropagation(),se(ie),!pe.disabled&&(V==null||V(ie.date,pe,re),w==null||w(ie.date,pe,re))},[V,w,se]),Un=N.useCallback((ie,pe)=>re=>{se(ie),m==null||m(ie.date,pe,re)},[m,se]),kt=N.useCallback((ie,pe)=>re=>{Z(),g==null||g(ie.date,pe,re)},[Z,g]),Jt=N.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=N.useCallback((ie,pe)=>re=>{b==null||b(ie.date,pe,re)},[b]),Kn=N.useCallback((ie,pe)=>re=>{y==null||y(ie.date,pe,re)},[y]),pt=N.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setMonth(s.startOfMonth(ie),re);oe(ue)},[s,oe]),Rn=N.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setYear(s.startOfMonth(ie),re);oe(ue)},[s,oe]),{className:qn,style:ht}=N.useMemo(()=>({className:[c[ee.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ee.Root],...t.style}}),[c,t.className,t.style,C]),Xn=O1(t),Zn=N.useRef(null);tN(Zn,!!t.animate,{classNames:c,months:z,focused:W,dateLib:s});const mn={dayPickerProps:t,selected:$,select:V,isSelected:F,months:z,nextMonth:Q,previousMonth:A,goToMonth:oe,getModifiers:O,components:r,classNames:c,styles:C,labels:a,formatters:o};return N.createElement(yp.Provider,{value:mn},N.createElement(r.Root,{rootRef:t.animate?Zn:void 0,className:qn,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"],...Xn},N.createElement(r.Months,{className:c[ee.Months],style:C==null?void 0:C[ee.Months]},!t.hideNavigation&&!u&&N.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:gn,previousMonth:A,nextMonth:Q}),z.map((ie,pe)=>N.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[ee.Month],style:C==null?void 0:C[ee.Month],key:pe,displayIndex:pe,calendarMonth:ie},u==="around"&&!t.hideNavigation&&pe===0&&N.createElement(r.PreviousMonthButton,{type:"button",className:c[ee.PreviousMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":Ue(A),onClick:We,"data-animated-button":t.animate?"true":void 0},N.createElement(r.Chevron,{disabled:A?void 0:!0,className:c[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),N.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[ee.MonthCaption],style:C==null?void 0:C[ee.MonthCaption],calendarMonth:ie,displayIndex:pe},d!=null&&d.startsWith("dropdown")?N.createElement(r.DropdownNav,{className:c[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=d==="dropdown"||d==="dropdown-months"?N.createElement(r.MonthsDropdown,{key:"month",className:c[ee.MonthsDropdown],"aria-label":Ee(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:pt(ie.date),options:K1(ie.date,R,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):N.createElement("span",{key:"month"},T(ie.date,s)),ue=d==="dropdown"||d==="dropdown-years"?N.createElement(r.YearsDropdown,{key:"year",className:c[ee.YearsDropdown],"aria-label":Hr(s.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Rn(ie.date),options:X1(R,G,o,s,!!t.reverseYears),style:C==null?void 0:C[ee.Dropdown],value:s.getYear(ie.date)}):N.createElement("span",{key:"year"},q(ie.date,s));return s.getMonthYearOrder()==="year-first"?[ue,re]:[re,ue]})(),N.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))):N.createElement(r.CaptionLabel,{className:c[ee.CaptionLabel],role:"status","aria-live":"polite"},k(ie.date,s.options,s))),u==="around"&&!t.hideNavigation&&pe===h-1&&N.createElement(r.NextMonthButton,{type:"button",className:c[ee.NextMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":Fe(Q),onClick:gn,"data-animated-button":t.animate?"true":void 0},N.createElement(r.Chevron,{disabled:Q?void 0:!0,className:c[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),pe===h-1&&u==="after"&&!t.hideNavigation&&N.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:gn,previousMonth:A,nextMonth:Q}),N.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Me(ie.date,s.options,s)||void 0,className:c[ee.MonthGrid],style:C==null?void 0:C[ee.MonthGrid]},!t.hideWeekdays&&N.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[ee.Weekdays],style:C==null?void 0:C[ee.Weekdays]},D&&N.createElement(r.WeekNumberHeader,{"aria-label":Lr(s.options),className:c[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},K()),_e.map(re=>N.createElement(r.Weekday,{"aria-label":Zt(re,s.options,s),className:c[ee.Weekday],key:String(re),style:C==null?void 0:C[ee.Weekday],scope:"col"},B(re,s.options,s)))),N.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[ee.Weeks],style:C==null?void 0:C[ee.Weeks]},ie.weeks.map(re=>N.createElement(r.Week,{className:c[ee.Week],key:re.weekNumber,style:C==null?void 0:C[ee.Week],week:re},D&&N.createElement(r.WeekNumber,{week:re,style:C==null?void 0:C[ee.WeekNumber],"aria-label":De(re.weekNumber,{locale:i}),className:c[ee.WeekNumber],scope:"row",role:"rowheader"},I(re.weekNumber,s)),re.days.map(ue=>{const{date:J}=ue,te=O(ue);if(te[we.focused]=!te.hidden&&!!(W!=null&&W.isEqualTo(ue)),te[dt.selected]=(F==null?void 0:F(J))||te.selected,Zo($)){const{from:xe,to:Te}=$;te[dt.range_start]=!!(xe&&Te&&s.isSameDay(J,xe)),te[dt.range_end]=!!(xe&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=Ft($,J,!0,s)}const Se=R1(te,C,t.modifiersStyles),Oe=P1(te,c,t.modifiersClassNames),en=!ft&&!te.hidden?ce(J,te,s.options,s):void 0;return N.createElement(r.Day,{key:`${ue.isoDate}_${ue.displayMonthId}`,day:ue,modifiers:te,className:Oe.join(" "),style:Se,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":en,"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?N.createElement(r.DayButton,{className:c[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:U(ue)?0:-1,"aria-label":de(J,te,s.options,s),onClick:Qt(ue,te),onBlur:kt(ue,te),onFocus:Un(ue,te),onKeyDown:Jt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:Kn(ue,te)},E(J,s.options,s)):!te.hidden&&E(ue.date,s.options,s))})))))))),t.footer&&N.createElement(r.Footer,{className:c[ee.Footer],style:C==null?void 0:C[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}const zp=be(["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}}),di=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>l.jsxs("button",{ref:s,type:"button",className:P(zp({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[l.jsx(tm,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:P("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));di.displayName="DatePickerTrigger";const ui=({className:e,classNames:t,...n})=>l.jsx(xN,{showOutsideDays:!0,className:P("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:P("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:P("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:P("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"?l.jsx(ul,{className:"size-4","aria-hidden":"true"}):l.jsx(wn,{className:"size-4","aria-hidden":"true"})},...n});ui.displayName="Calendar";const Bp=ln;Bp.displayName="DatePickerRoot";const Lp=f.forwardRef(({className:e,align:t="start",...n},r)=>l.jsx(Ut,{ref:r,align:t,className:P("w-auto p-0",e),...n}));Lp.displayName="DatePickerContent";const Hp=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},c)=>{const[d,p]=f.useState(!1),u=e?Yn(e,r):void 0;return l.jsxs(ln,{open:d,onOpenChange:p,children:[l.jsx(mr,{asChild:!0,children:l.jsx(di,{ref:c,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":d,"aria-haspopup":"dialog",children:u})}),l.jsx(Ut,{className:"w-auto p-0",align:"start",children:l.jsx(ui,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Hp.displayName="DatePicker";const Vp=La,Yp=Pc,Gp=_c,jp=Ha,fi=f.forwardRef(({className:e,...t},n)=>l.jsx(sr,{ref:n,className:P("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));fi.displayName=sr.displayName;const pi=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>l.jsxs(jp,{children:[l.jsx(fi,{}),l.jsx(ir,{ref:i,onInteractOutside:c=>{n||c.preventDefault(),r==null||r(c)},onPointerDownOutside:c=>{n||c.preventDefault(),o==null||o(c)},onEscapeKeyDown:c=>{n||c.preventDefault(),a==null||a(c)},className:P("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})]}));pi.displayName=ir.displayName;const hi=({className:e,...t})=>l.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});hi.displayName="DialogHeader";const gi=({className:e,...t})=>l.jsx("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});gi.displayName="DialogFooter";const mi=f.forwardRef(({className:e,...t},n)=>l.jsx(ho,{ref:n,className:P("text-lg font-semibold leading-none text-balance",e),...t}));mi.displayName=ho.displayName;const vi=f.forwardRef(({className:e,...t},n)=>l.jsx(go,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));vi.displayName=go.displayName;const Up=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>l.jsxs(Vp,{...i,children:[e&&l.jsx(Yp,{asChild:!0,children:e}),l.jsxs(pi,{className:a,dismissible:s,children:[s&&l.jsx(Gp,{className:P("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:l.jsx(Dt,{className:"size-4","aria-hidden":"true"})}),l.jsxs(hi,{children:[l.jsx(mi,{children:t}),n&&l.jsx(vi,{children:n})]}),r,o&&l.jsx(gi,{children:o})]})]});Up.displayName="Dialog";const Kp=La,Rp=Pc,qp=_c,Xp=Ha,bi=f.forwardRef(({className:e,...t},n)=>l.jsx(sr,{ref:n,className:P("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));bi.displayName=sr.displayName;const Zp=be(P("fixed z-50 flex flex-col bg-background p-6","ring-1 ring-border/60 shadow-lg"),{variants:{side:{right:"inset-y-0 right-0 h-full rounded-l-xl data-[state=open]:animate-drawer-in-right data-[state=closed]:animate-drawer-out-right",left:"inset-y-0 left-0 h-full rounded-r-xl data-[state=open]:animate-drawer-in-left data-[state=closed]:animate-drawer-out-left",top:"inset-x-0 top-0 w-full rounded-b-xl data-[state=open]:animate-drawer-in-top data-[state=closed]:animate-drawer-out-top",bottom:"inset-x-0 bottom-0 w-full rounded-t-xl data-[state=open]:animate-drawer-in-bottom data-[state=closed]:animate-drawer-out-bottom"},size:{sm:"",md:"",lg:"",full:""}},compoundVariants:[{side:["right","left"],size:"sm",className:"w-full max-w-xs"},{side:["right","left"],size:"md",className:"w-full max-w-sm"},{side:["right","left"],size:"lg",className:"w-full max-w-lg"},{side:["right","left"],size:"full",className:"w-screen"},{side:["top","bottom"],size:"sm",className:"h-1/4"},{side:["top","bottom"],size:"md",className:"h-1/3"},{side:["top","bottom"],size:"lg",className:"h-1/2"},{side:["top","bottom"],size:"full",className:"h-screen"}],defaultVariants:{side:"right",size:"md"}}),yi=f.forwardRef(({className:e,children:t,side:n="right",size:r="md",dismissible:o=!0,onInteractOutside:a,onPointerDownOutside:s,onEscapeKeyDown:i,...c},d)=>l.jsxs(Xp,{children:[l.jsx(bi,{}),l.jsx(ir,{ref:d,onInteractOutside:p=>{o||p.preventDefault(),a==null||a(p)},onPointerDownOutside:p=>{o||p.preventDefault(),s==null||s(p)},onEscapeKeyDown:p=>{o||p.preventDefault(),i==null||i(p)},className:P(Zp({side:n,size:r}),e),...c,children:t})]}));yi.displayName=ir.displayName;const wi=({className:e,...t})=>l.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});wi.displayName="DrawerHeader";const xi=({className:e,...t})=>l.jsx("div",{className:P("mt-auto flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",e),...t});xi.displayName="DrawerFooter";const Ci=f.forwardRef(({className:e,...t},n)=>l.jsx(ho,{ref:n,className:P("font-ui text-lg font-semibold leading-none text-balance",e),...t}));Ci.displayName=ho.displayName;const Ni=f.forwardRef(({className:e,...t},n)=>l.jsx(go,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));Ni.displayName=go.displayName;const Qp=({trigger:e,title:t,description:n,children:r,footer:o,side:a="right",size:s="md",contentClassName:i,dismissible:c=!0,...d})=>l.jsxs(Kp,{...d,children:[e&&l.jsx(Rp,{asChild:!0,children:e}),l.jsxs(yi,{side:a,size:s,dismissible:c,className:i,children:[c&&l.jsx(qp,{className:P("absolute right-4 top-4 rounded-md p-3 text-muted-foreground","transition-[color,background-color,scale] duration-150","hover:bg-accent hover:text-foreground active:scale-96","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Close",children:l.jsx(Dt,{className:"size-4","aria-hidden":"true"})}),l.jsxs(wi,{children:[l.jsx(Ci,{children:t}),n&&l.jsx(Ni,{children:n})]}),r,o&&l.jsx(xi,{children:o})]})]});Qp.displayName="Drawer";const Jp=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:P("flex flex-col gap-1.5",e),...t}));Jp.displayName="Field";const eh=f.forwardRef(({className:e,required:t,children:n,...r},o)=>l.jsxs("label",{ref:o,className:P("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&l.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));eh.displayName="Label";const th=f.forwardRef(({className:e,isError:t,...n},r)=>l.jsx("p",{ref:r,className:P("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));th.displayName="FieldMessage";function nh(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const rh=f.forwardRef(({accept:e,multiple:t,onFilesChange:n,isError:r,disabled:o,className:a},s)=>{const[i,c]=f.useState(!1),[d,p]=f.useState([]),[u,h]=f.useState({}),g=f.useRef(null),w=f.useCallback(T=>{g.current=T,typeof s=="function"?s(T):s&&(s.current=T)},[s]);f.useEffect(()=>{const T={};for(const I of d)I.type.startsWith("image/")&&(T[I.name]=URL.createObjectURL(I));return h(T),()=>{for(const I of Object.values(T))URL.revokeObjectURL(I)}},[d]);const m=T=>{p(T),n==null||n(T)},v=T=>{!T||T.length===0||m(Array.from(T))},b=T=>{m(d.filter(I=>I.name!==T))},y=T=>{T.preventDefault(),o||c(!0)},x=T=>{T.preventDefault()},S=T=>{T.preventDefault(),c(!1)},D=T=>{T.preventDefault(),c(!1),o||v(T.dataTransfer.files)},C=()=>{var T;o||(T=g.current)==null||T.click()},k=T=>{T.target===T.currentTarget&&(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),C())},E=d.length>0;return l.jsxs("div",{role:"button",tabIndex:o?-1:0,"aria-label":"Upload files","aria-invalid":r||void 0,"aria-disabled":o||void 0,onClick:C,onKeyDown:k,onDragEnter:y,onDragOver:x,onDragLeave:S,onDrop:D,className:P("relative flex flex-col gap-3 rounded-lg","min-h-40 cursor-pointer select-none p-6","border-2 border-dashed transition-[border-color,background-color]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",E?"items-start justify-start":"items-center justify-center text-center",i?"border-primary bg-primary/5":"border-input bg-background",r&&"border-destructive",o&&"pointer-events-none opacity-50",a),children:[E?l.jsxs("div",{className:"flex w-full flex-col gap-2",children:[d.map(T=>l.jsxs("div",{className:"flex items-center gap-3 rounded-md bg-muted/50 px-3 py-2",children:[u[T.name]?l.jsx("img",{src:u[T.name],alt:T.name,className:"size-8 shrink-0 rounded object-cover"}):l.jsx(dm,{className:"size-8 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate font-ui text-sm font-medium",children:T.name}),l.jsx("p",{className:"text-xs text-muted-foreground",children:nh(T.size)})]}),l.jsx("button",{type:"button","aria-label":`Remove ${T.name}`,onClick:I=>{I.stopPropagation(),b(T.name)},className:P("shrink-0 rounded p-1 text-muted-foreground","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:l.jsx(Dt,{className:"size-4","aria-hidden":!0})})]},T.name)),l.jsx("p",{className:"text-xs text-muted-foreground",children:i?"Drop to replace":"Click or drag to replace files"})]}):l.jsxs(l.Fragment,{children:[l.jsx(sm,{className:P("size-10",i?"text-primary":"text-muted-foreground"),"aria-hidden":!0}),l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx("p",{className:"font-ui text-sm font-medium",children:i?"Drop files here":"Drag & drop files here, or click to browse"}),e&&l.jsx("p",{className:"text-xs text-muted-foreground",children:e})]})]}),l.jsx("input",{ref:w,type:"file",accept:e,multiple:t,disabled:o,className:"sr-only","aria-hidden":!0,tabIndex:-1,onChange:T=>{v(T.target.files),T.currentTarget.value=""}})]})});rh.displayName="FileUpload";const oh=be(["w-full flex items-center gap-2","rounded-md border border-input bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow]","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:"min-h-8 text-xs",md:"min-h-10",lg:"min-h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),ah=f.forwardRef(({options:e,value:t,defaultValue:n,onValueChange:r,placeholder:o="Select…",searchPlaceholder:a="Search…",emptyMessage:s="No results found.",size:i,isError:c,disabled:d,className:p},u)=>{const h=t!==void 0,[g,w]=f.useState(n??[]),m=t??g,[v,b]=f.useState(!1),[y,x]=f.useState("");function S(E){b(E),E||x("")}function D(E){const T=m.includes(E)?m.filter(I=>I!==E):[...m,E];h||w(T),r==null||r(T)}function C(E){const T=m.filter(I=>I!==E);h||w(T),r==null||r(T)}const k=f.useMemo(()=>e.filter(E=>m.includes(E.value)),[e,m]);return l.jsxs(ln,{open:v,onOpenChange:S,children:[l.jsx(mr,{asChild:!0,children:l.jsxs("button",{ref:u,type:"button",disabled:d,"aria-expanded":v,"aria-haspopup":"listbox","aria-invalid":c||void 0,className:P(oh({size:i,isError:c}),p),children:[l.jsx("span",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:m.length>0?k.map(E=>l.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-sm bg-accent px-1.5 py-0.5 font-ui text-xs font-medium text-accent-foreground",children:[E.label,l.jsx("span",{role:"button",tabIndex:d?-1:0,"aria-label":`Remove ${E.label}`,onClick:T=>{T.stopPropagation(),C(E.value)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),C(E.value))},className:"ml-0.5 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:l.jsx(Dt,{className:"size-3","aria-hidden":!0})})]},E.value)):l.jsx("span",{className:"text-muted-foreground",children:o})}),l.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0})]})}),l.jsx(Ut,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:l.jsxs(dr,{className:"w-full",children:[l.jsx("div",{className:"border-b border-border",children:l.jsx(vo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:a,value:y,onValueChange:x})}),l.jsxs(bo,{className:"max-h-60 overflow-y-auto p-1",children:[l.jsx(yo,{className:"py-6 text-center text-sm text-muted-foreground",children:s}),e.map(E=>l.jsxs(mo,{value:E.label,disabled:E.disabled,className:P("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:()=>D(E.value),children:[l.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:m.includes(E.value)&&l.jsx(nn,{className:"size-4","aria-hidden":!0})}),E.label]},E.value))]})]})})]})});ah.displayName="MultiSelect";const sh=be(["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"}}),ih=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>l.jsxs("div",{className:"group relative w-full",children:[l.jsx("select",{ref:a,className:P(sh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),l.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:l.jsx(Mt,{})})]}));ih.displayName="NativeSelect";const lh=be(["flex w-full overflow-hidden rounded-md border border-input bg-background","font-body text-foreground","transition-[border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background"],{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},layout:{vertical:"",horizontal:""}},defaultVariants:{size:"md",layout:"vertical"}}),ch=f.forwardRef(({className:e,size:t,layout:n,isError:r,min:o,max:a,step:s,disabled:i,...c},d)=>{const p=f.useRef(null),u=f.useCallback(v=>{p.current=v,typeof d=="function"?d(v):d&&(d.current=v)},[d]),h=v=>{var C;const b=p.current;if(!b)return;const y=parseFloat(b.value)||0,x=Number(s??1);let S=y+v*x;a!==void 0&&(S=Math.min(S,Number(a))),o!==void 0&&(S=Math.max(S,Number(o)));const D=(C=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:C.set;D==null||D.call(b,String(S)),b.dispatchEvent(new Event("input",{bubbles:!0}))},g=t==="sm"?"size-2.5":"size-3",w=t==="sm"?"size-3":"size-4",m=t==="sm"?"px-2.5":"px-3";return l.jsx("div",{className:P(lh({size:t,layout:n}),r&&"border-destructive focus-within:ring-destructive",i&&"cursor-not-allowed opacity-50",e),children:n==="horizontal"?l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:l.jsx(fl,{"aria-hidden":"true",className:w})}),l.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),l.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none text-center font-medium text-primary","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","px-2"),...c}),l.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),l.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:l.jsx(bm,{"aria-hidden":"true",className:w})})]}):l.jsxs(l.Fragment,{children:[l.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",t==="sm"?"px-3":"px-4"),...c}),l.jsxs("div",{className:"flex shrink-0 flex-col border-l border-input",children:[l.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:l.jsx(eo,{"aria-hidden":"true",className:g})}),l.jsx("div",{"aria-hidden":"true",className:"border-t border-input"}),l.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:l.jsx(Mt,{"aria-hidden":"true",className:g})})]})]})})});ch.displayName="NumberInput";const dh=be(["flex items-center justify-center rounded-md border border-input bg-background","font-ui text-center font-medium tabular-nums","transition-[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 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg"}},defaultVariants:{size:"md"}}),uh=f.forwardRef(({length:e=6,value:t,defaultValue:n,onChange:r,isError:o,disabled:a,size:s,className:i},c)=>{const d=t!==void 0,[p,u]=f.useState(n??""),h=t??p,g=Array.from({length:e},(k,E)=>h[E]??""),w=f.useRef([]),m=f.useMemo(()=>Array.from({length:e},(k,E)=>T=>{w.current[E]=T,E===0&&(typeof c=="function"?c(T):c&&(c.current=T))}),[e,c]),v=f.useRef(!1),b=k=>{var E;v.current=!0,(E=w.current[k])==null||E.focus()},y=k=>{const E=k.join("").slice(0,e);d||u(E),r==null||r(E)},x=(k,E)=>{const T=E.target.value,I=[...g];I[k]=T,y(I),T&&k<e-1&&b(k+1)},S=(k,E)=>{if(E.key==="Backspace"){E.preventDefault();const T=[...g];T[k]?(T[k]="",y(T)):k>0&&(T[k-1]="",y(T),b(k-1))}else E.key==="ArrowLeft"?(E.preventDefault(),k>0&&b(k-1)):E.key==="ArrowRight"&&(E.preventDefault(),k<e-1&&b(k+1))},D=k=>{k.preventDefault();const E=k.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),T=Array.from({length:e},(I,K)=>E[K]??"");y(T),b(Math.min(E.length,e-1))},C=(k,E)=>{if(v.current){v.current=!1,E.target.select();return}const T=g.findIndex(I=>!I);if(T!==-1&&k>T){b(T);return}E.target.select()};return l.jsx("div",{role:"group","aria-label":"One-time password",className:P("flex gap-2",i),children:g.map((k,E)=>l.jsx("input",{ref:m[E],type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:k,disabled:a,"aria-label":`Digit ${E+1} of ${e}`,"aria-invalid":o||void 0,className:P(dh({size:s}),o&&"border-destructive focus-visible:ring-destructive"),onChange:T=>x(E,T),onKeyDown:T=>S(E,T),onPaste:D,onFocus:T=>C(E,T)},E))})});uh.displayName="OTPInput";const fh=f.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return l.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:P("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?l.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):l.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});fh.displayName="Progress";const Si=f.createContext({}),ph=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"}}),CN=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"}}),hh=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,name:o,...a},s)=>{const i=f.use(Si);return l.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[l.jsx("input",{type:"radio",ref:s,name:o??i.name,className:P(ph({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...a}),l.jsx("span",{"aria-hidden":"true",className:CN({size:n})})]})});hh.displayName="Radio";const gh=be("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),mh=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>l.jsx(Si,{value:{name:t},children:l.jsx("div",{ref:a,role:"radiogroup",className:P(gh({orientation:n}),e),...o,children:r})}));mh.displayName="RadioGroup";const vh=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>l.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:P("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));vh.displayName="Separator";const bh=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"}}),NN=be(["absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-foreground 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"}}),yh=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>l.jsxs("span",{className:P("relative inline-flex shrink-0 items-center",e),children:[l.jsx("input",{type:"checkbox",role:"switch",ref:a,className:P("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",t),"aria-invalid":r||void 0,...o}),l.jsx("span",{"aria-hidden":"true",className:P(bh({size:n}),r&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",r&&"peer-focus-visible:ring-destructive")}),l.jsx("span",{"aria-hidden":"true",className:NN({size:n})})]}));yh.displayName="Switch";var Jo="Tabs",[SN]=Ze(Jo,[Ho]),wh=Ho(),[kN,ki]=SN(Jo),xh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...d}=e,p=tr(i),[u,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:Jo});return l.jsx(kN,{scope:n,baseId:Ce(),value:u,onValueChange:h,orientation:s,dir:p,activationMode:c,children:l.jsx(ne.div,{dir:p,"data-orientation":s,...d,ref:t})})});xh.displayName=Jo;var Ch="TabsList",Nh=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=ki(Ch,n),s=wh(n);return l.jsx($u,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Nh.displayName=Ch;var Sh="TabsTrigger",kh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=ki(Sh,n),i=wh(n),c=Eh(s.baseId,r),d=Th(s.baseId,r),p=r===s.value;return l.jsx(zu,{asChild:!0,...i,focusable:!o,active:p,children:l.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:j(e.onMouseDown,u=>{!o&&u.button===0&&u.ctrlKey===!1?s.onValueChange(r):u.preventDefault()}),onKeyDown:j(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const u=s.activationMode!=="manual";!p&&!o&&u&&s.onValueChange(r)})})})});kh.displayName=Sh;var Mh="TabsContent",Dh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=ki(Mh,n),c=Eh(i.baseId,r),d=Th(i.baseId,r),p=r===i.value,u=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(ze,{present:o||p,children:({present:h})=>l.jsx(ne.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:h&&a})})});Dh.displayName=Mh;function Eh(e,t){return`${e}-trigger-${t}`}function Th(e,t){return`${e}-content-${t}`}var Ph=xh,_h=Nh,Oh=kh,Ih=Dh;const Mi=f.forwardRef(({className:e,...t},n)=>l.jsx(Ph,{ref:n,className:P("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));Mi.displayName=Ph.displayName;const Di=f.forwardRef(({className:e,...t},n)=>l.jsx(_h,{ref:n,className:P("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}));Di.displayName=_h.displayName;const Ei=f.forwardRef(({className:e,...t},n)=>l.jsx(Oh,{ref:n,className:P("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}));Ei.displayName=Oh.displayName;const Ti=f.forwardRef(({className:e,...t},n)=>l.jsx(Ih,{ref:n,className:P("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}));Ti.displayName=Ih.displayName;const Ah=({items:e,listClassName:t,className:n,...r})=>l.jsxs(Mi,{className:n,...r,children:[l.jsx(Di,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>l.jsxs(Ei,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>l.jsx(Ti,{value:o,children:a},o))]});Ah.displayName="Tabs";const Fh=be(["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"}}),Wh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>l.jsx("textarea",{ref:o,className:P(Fh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));Wh.displayName="Textarea";function MN(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 DN=e=>{switch(e){case"success":return PN;case"info":return ON;case"warning":return _N;case"error":return IN;default:return null}},EN=Array(12).fill(0),TN=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},EN.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),PN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),_N=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),ON=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),IN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),AN=N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),FN=()=>{const[e,t]=N.useState(document.hidden);return N.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Pi=1;class WN{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:Pi++,s=this.toasts.find(c=>c.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(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:i,title:r}):c):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 d=>{if(s=["resolve",d],N.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(zN(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof u=="object"&&!N.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!N.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!N.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:h,...w})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,g=typeof p=="object"&&!N.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:u,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,p)=>i.then(()=>s[0]==="reject"?p(s[1]):d(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Pi++;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 Be=new WN,$N=(e,t)=>{const n=(t==null?void 0:t.id)||Pi++;return Be.addToast({title:e,...t,id:n}),n},zN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BN=$N,LN=()=>Be.toasts,HN=()=>Be.getActiveToasts(),$h=Object.assign(BN,{success:Be.success,info:Be.info,warning:Be.warning,error:Be.error,custom:Be.custom,message:Be.message,promise:Be.promise,dismiss:Be.dismiss,loading:Be.loading},{getHistory:LN,getToasts:HN});MN("[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 ea(e){return e.label!==void 0}const VN=3,YN="24px",GN="16px",zh=4e3,jN=356,UN=14,KN=45,RN=200;function St(...e){return e.filter(Boolean).join(" ")}function qN(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const XN=e=>{var t,n,r,o,a,s,i,c,d;const{invert:p,toast:u,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:b,toasts:y,expanded:x,removeToast:S,defaultRichColors:D,closeButton:C,style:k,cancelButtonStyle:E,actionButtonStyle:T,className:I="",descriptionClassName:K="",duration:B,position:q,gap:Y,expandByDefault:ae,classNames:z,icons:R,closeButtonAriaLabel:G="Close toast"}=e,[A,Q]=N.useState(null),[oe,O]=N.useState(null),[F,V]=N.useState(!1),[$,Z]=N.useState(!1),[W,U]=N.useState(!1),[X,se]=N.useState(!1),[de,ce]=N.useState(!1),[Me,Ee]=N.useState(0),[tt,Ue]=N.useState(0),Fe=N.useRef(u.duration||B||zh),Zt=N.useRef(null),De=N.useRef(null),Lr=b===0,Hr=b+1<=m,_e=u.type,ft=u.dismissible!==!1,We=u.className||"",gn=u.descriptionClassName||"",Qt=N.useMemo(()=>v.findIndex(J=>J.toastId===u.id)||0,[v,u.id]),Un=N.useMemo(()=>{var J;return(J=u.closeButton)!=null?J:C},[u.closeButton,C]),kt=N.useMemo(()=>u.duration||B||zh,[u.duration,B]),Jt=N.useRef(0),Le=N.useRef(0),Kn=N.useRef(0),pt=N.useRef(null),[Rn,qn]=q.split("-"),ht=N.useMemo(()=>v.reduce((J,te,Se)=>Se>=Qt?J:J+te.height,0),[v,Qt]),Xn=FN(),Zn=u.invert||p,mn=_e==="loading";Le.current=N.useMemo(()=>Qt*Y+ht,[Qt,ht]),N.useEffect(()=>{Fe.current=kt},[kt]),N.useEffect(()=>{V(!0)},[]),N.useEffect(()=>{const J=De.current;if(J){const te=J.getBoundingClientRect().height;return Ue(te),w(Se=>[{toastId:u.id,height:te,position:u.position},...Se]),()=>w(Se=>Se.filter(Oe=>Oe.toastId!==u.id))}},[w,u.id]),N.useLayoutEffect(()=>{if(!F)return;const J=De.current,te=J.style.height;J.style.height="auto";const Se=J.getBoundingClientRect().height;J.style.height=te,Ue(Se),w(Oe=>Oe.find(xe=>xe.toastId===u.id)?Oe.map(xe=>xe.toastId===u.id?{...xe,height:Se}:xe):[{toastId:u.id,height:Se,position:u.position},...Oe])},[F,u.title,u.description,w,u.id,u.jsx,u.action,u.cancel]);const Ke=N.useCallback(()=>{Z(!0),Ee(Le.current),w(J=>J.filter(te=>te.toastId!==u.id)),setTimeout(()=>{S(u)},RN)},[u,S,w,Le]);N.useEffect(()=>{if(u.promise&&_e==="loading"||u.duration===1/0||u.type==="loading")return;let J;return x||g||Xn?(()=>{if(Kn.current<Jt.current){const Oe=new Date().getTime()-Jt.current;Fe.current=Fe.current-Oe}Kn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Jt.current=new Date().getTime(),J=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Ke()},Fe.current))})(),()=>clearTimeout(J)},[x,g,u,_e,Xn,Ke]),N.useEffect(()=>{u.delete&&(Ke(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ke,u.delete]);function ie(){var J;if(R!=null&&R.loading){var te;return N.createElement("div",{className:St(z==null?void 0:z.loader,u==null||(te=u.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":_e==="loading"},R.loading)}return N.createElement(TN,{className:St(z==null?void 0:z.loader,u==null||(J=u.classNames)==null?void 0:J.loader),visible:_e==="loading"})}const pe=u.icon||(R==null?void 0:R[_e])||DN(_e);var re,ue;return N.createElement("li",{tabIndex:0,ref:De,className:St(I,We,z==null?void 0:z.toast,u==null||(t=u.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[_e],u==null||(n=u.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(re=u.richColors)!=null?re:D,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":F,"data-promise":!!u.promise,"data-swiped":de,"data-removed":$,"data-visible":Hr,"data-y-position":Rn,"data-x-position":qn,"data-index":b,"data-front":Lr,"data-swiping":W,"data-dismissible":ft,"data-type":_e,"data-invert":Zn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&F),"data-testid":u.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${$?Me:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...k,...u.style},onDragEnd:()=>{U(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(mn||!ft||(Zt.current=new Date,Ee(Le.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(U(!0),pt.current={x:J.clientX,y:J.clientY})))},onPointerUp:()=>{var J,te,Se;if(X||!ft)return;pt.current=null;const Oe=Number(((J=De.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((te=De.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((Se=Zt.current)==null?void 0:Se.getTime()),Te=A==="x"?Oe:en,Qn=Math.abs(Te)/xe;if(Math.abs(Te)>=KN||Qn>.11){Ee(Le.current),u.onDismiss==null||u.onDismiss.call(u,u),O(A==="x"?Oe>0?"right":"left":en>0?"down":"up"),Ke(),se(!0);return}else{var Re,qe;(Re=De.current)==null||Re.style.setProperty("--swipe-amount-x","0px"),(qe=De.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}ce(!1),U(!1),Q(null)},onPointerMove:J=>{var te,Se,Oe;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const xe=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Qn;const Re=(Qn=e.swipeDirections)!=null?Qn:qN(q);!A&&(Math.abs(Te)>1||Math.abs(xe)>1)&&Q(Math.abs(Te)>Math.abs(xe)?"x":"y");let qe={x:0,y:0};const ra=$t=>1/(1.5+Math.abs($t)/20);if(A==="y"){if(Re.includes("top")||Re.includes("bottom"))if(Re.includes("top")&&xe<0||Re.includes("bottom")&&xe>0)qe.y=xe;else{const $t=xe*ra(xe);qe.y=Math.abs($t)<Math.abs(xe)?$t:xe}}else if(A==="x"&&(Re.includes("left")||Re.includes("right")))if(Re.includes("left")&&Te<0||Re.includes("right")&&Te>0)qe.x=Te;else{const $t=Te*ra(Te);qe.x=Math.abs($t)<Math.abs(Te)?$t:Te}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&ce(!0),(Se=De.current)==null||Se.style.setProperty("--swipe-amount-x",`${qe.x}px`),(Oe=De.current)==null||Oe.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Un&&!u.jsx&&_e!=="loading"?N.createElement("button",{"aria-label":G,"data-disabled":mn,"data-close-button":!0,onClick:mn||!ft?()=>{}:()=>{Ke(),u.onDismiss==null||u.onDismiss.call(u,u)},className:St(z==null?void 0:z.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(ue=R==null?void 0:R.close)!=null?ue:AN):null,(_e||u.icon||u.promise)&&u.icon!==null&&((R==null?void 0:R[_e])!==null||u.icon)?N.createElement("div",{"data-icon":"",className:St(z==null?void 0:z.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||ie():null,u.type!=="loading"?pe:null):null,N.createElement("div",{"data-content":"",className:St(z==null?void 0:z.content,u==null||(a=u.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:St(z==null?void 0:z.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?N.createElement("div",{"data-description":"",className:St(K,gn,z==null?void 0:z.description,u==null||(i=u.classNames)==null?void 0:i.description)},typeof u.description=="function"?u.description():u.description):null),N.isValidElement(u.cancel)?u.cancel:u.cancel&&ea(u.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||E,onClick:J=>{ea(u.cancel)&&ft&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,J),Ke())},className:St(z==null?void 0:z.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,N.isValidElement(u.action)?u.action:u.action&&ea(u.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||T,onClick:J=>{ea(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,J),!J.defaultPrevented&&Ke())},className:St(z==null?void 0:z.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Bh(){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 ZN(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?GN:YN;function c(d){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(i)}),n}const QN=N.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:c,className:d,offset:p,mobileOffset:u,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=VN,toastOptions:b,dir:y=Bh(),gap:x=UN,icons:S,containerAriaLabel:D="Notifications"}=t,[C,k]=N.useState([]),E=N.useMemo(()=>r?C.filter(F=>F.toasterId===r):C.filter(F=>!F.toasterId),[C,r]),T=N.useMemo(()=>Array.from(new Set([a].concat(E.filter(F=>F.position).map(F=>F.position)))),[E,a]),[I,K]=N.useState([]),[B,q]=N.useState(!1),[Y,ae]=N.useState(!1),[z,R]=N.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=N.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=N.useRef(null),oe=N.useRef(!1),O=N.useCallback(F=>{k(V=>{var $;return($=V.find(Z=>Z.id===F.id))!=null&&$.delete||Be.dismiss(F.id),V.filter(({id:Z})=>Z!==F.id)})},[]);return N.useEffect(()=>Be.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{k(V=>V.map($=>$.id===F.id?{...$,delete:!0}:$))});return}setTimeout(()=>{la.flushSync(()=>{k(V=>{const $=V.findIndex(Z=>Z.id===F.id);return $!==-1?[...V.slice(0,$),{...V[$],...F},...V.slice($+1)]:[F,...V]})})})}),[C]),N.useEffect(()=>{if(h!=="system"){R(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:V})=>{R(V?"dark":"light")})}catch{F.addListener(({matches:$})=>{try{R($?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),N.useEffect(()=>{C.length<=1&&q(!1)},[C]),N.useEffect(()=>{const F=V=>{var $;if(s.every(U=>V[U]||V.code===U)){var W;q(!0),(W=G.current)==null||W.focus()}V.code==="Escape"&&(document.activeElement===G.current||($=G.current)!=null&&$.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),N.useEffect(()=>{if(G.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,oe.current=!1)}},[G.current]),N.createElement("section",{ref:n,"aria-label":`${D} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,V)=>{var $;const[Z,W]=F.split("-");return E.length?N.createElement("ol",{key:F,dir:y==="auto"?Bh():y,tabIndex:-1,ref:G,className:d,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":Z,"data-x-position":W,style:{"--front-toast-height":`${(($=I[0])==null?void 0:$.height)||0}px`,"--width":`${jN}px`,"--gap":`${x}px`,...m,...ZN(p,u)},onBlur:U=>{oe.current&&!U.currentTarget.contains(U.relatedTarget)&&(oe.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||oe.current||(oe.current=!0,Q.current=U.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},E.filter(U=>!U.position&&V===0||U.position===F).map((U,X)=>{var se,de;return N.createElement(XN,{key:U.id,icons:S,index:X,toast:U,defaultRichColors:g,duration:(se=b==null?void 0:b.duration)!=null?se:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:o,visibleToasts:v,closeButton:(de=b==null?void 0:b.closeButton)!=null?de:c,interacting:Y,position:F,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:O,toasts:E.filter(ce=>ce.position==U.position),heights:I.filter(ce=>ce.position==U.position),setHeights:K,expandByDefault:i,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),JN={success:{halo:"bg-success/20",core:"bg-success text-success-foreground"},info:{halo:"bg-info/20",core:"bg-info text-info-foreground"},warning:{halo:"bg-warning/25",core:"bg-warning text-warning-foreground"},error:{halo:"bg-destructive/20",core:"bg-destructive text-destructive-foreground"},loading:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"},default:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"}};function eS({variant:e,icon:t,className:n}){const r=JN[e];return l.jsxs("span",{className:"bookers-toast-status","aria-hidden":"true",children:[l.jsx("span",{className:P("bookers-toast-status__halo",r.halo)}),l.jsx("span",{className:P("bookers-toast-status__core",r.core),children:l.jsx(t,{className:P("size-4",n),strokeWidth:2.25})})]})}function $r(e,t,n){return l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),l.jsx(eS,{variant:e,icon:t,className:n})]})}const Lh=l.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),tS=$r("success",nn),nS=$r("info",rm),rS=$r("warning",nm),oS=$r("error",om),aS=$r("loading",ma,"animate-spin");function sS(e,t){const n=(t==null?void 0:t.action)!==void 0;return $h(e,{...t,icon:(t==null?void 0:t.icon)!==void 0?t.icon:Lh,closeButton:(t==null?void 0:t.closeButton)??(n?!1:void 0)})}const iS=Object.assign(sS,$h),Hh={toast:"bookers-toast",icon:"bookers-toast__icon",loader:"bookers-toast__loader",content:"bookers-toast__content",title:"bookers-toast__title",description:"bookers-toast__description",closeButton:"bookers-toast__close",actionButton:"bookers-toast__action",cancelButton:"bookers-toast__cancel"},lS={success:tS,info:nS,warning:rS,error:oS,loading:aS,default:Lh,close:l.jsx(Dt,{className:"size-3.5",strokeWidth:2,"aria-hidden":"true"})},Vh=({toastOptions:e,richColors:t=!1,closeButton:n=!0,position:r="top-center",...o})=>{var a;return l.jsx(QN,{theme:"light",richColors:t,position:r,closeButton:n,icons:lS,className:"font-body",toastOptions:{unstyled:!0,...e,classNames:{...Hh,...e==null?void 0:e.classNames,toast:P(Hh.toast,(a=e==null?void 0:e.classNames)==null?void 0:a.toast)}},...o})};Vh.displayName="Toaster";var[ta]=Ze("Tooltip",[Gt]),na=Gt(),Yh="TooltipProvider",cS=700,_i="tooltip.open",[dS,Oi]=ta(Yh),Gh=e=>{const{__scopeTooltip:t,delayDuration:n=cS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(dS,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Gh.displayName=Yh;var zr="Tooltip",[uS,Br]=ta(zr),jh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Oi(zr,e.__scopeTooltip),d=na(t),[p,u]=f.useState(null),h=Ce(),g=f.useRef(0),w=s??c.disableHoverableContent,m=i??c.delayDuration,v=f.useRef(!1),[b,y]=Qe({prop:r,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(_i))):c.onClose(),a==null||a(k)},caller:zr}),x=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),S=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),D=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(pr,{...d,children:l.jsx(uS,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:p,onTriggerChange:u,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?C():S()},[c.isOpenDelayedRef,C,S]),onTriggerLeave:f.useCallback(()=>{w?D():(window.clearTimeout(g.current),g.current=0)},[D,w]),onOpen:S,onClose:D,disableHoverableContent:w,children:n})})};jh.displayName=zr;var Ii="TooltipTrigger",Uh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(Ii,n),a=Oi(Ii,n),s=na(n),i=f.useRef(null),c=he(t,i,o.onTriggerChange),d=f.useRef(!1),p=f.useRef(!1),u=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),l.jsx(hr,{asChild:!0,...s,children:l.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,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(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:j(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});Uh.displayName=Ii;var Ai="TooltipPortal",[fS,pS]=ta(Ai,{forceMount:void 0}),Kh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Br(Ai,t);return l.jsx(fS,{scope:t,forceMount:n,children:l.jsx(ze,{present:n||a.open,children:l.jsx(kn,{asChild:!0,container:o,children:r})})})};Kh.displayName=Ai;var jn="TooltipContent",Rh=f.forwardRef((e,t)=>{const n=pS(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Br(jn,e.__scopeTooltip);return l.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?l.jsx(qh,{side:o,...a,ref:t}):l.jsx(hS,{side:o,...a,ref:t})})}),hS=f.forwardRef((e,t)=>{const n=Br(jn,e.__scopeTooltip),r=Oi(jn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:c,onClose:d}=n,p=o.current,{onPointerInTransitChange:u}=r,h=f.useCallback(()=>{i(null),u(!1)},[u]),g=f.useCallback((w,m)=>{const v=w.currentTarget,b={x:w.clientX,y:w.clientY},y=yS(b,v.getBoundingClientRect()),x=wS(b,y),S=xS(m.getBoundingClientRect()),D=NS([...x,...S]);i(D),u(!0)},[u]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(c&&p){const w=v=>g(v,p),m=v=>g(v,c);return c.addEventListener("pointerleave",w),p.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",m)}}},[c,p,g,h]),f.useEffect(()=>{if(s){const w=m=>{const v=m.target,b={x:m.clientX,y:m.clientY},y=(c==null?void 0:c.contains(v))||(p==null?void 0:p.contains(v)),x=!CS(b,s);y?h():x&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,p,s,d,h]),l.jsx(qh,{...e,ref:a})}),[gS,mS]=ta(zr,{isInside:!1}),vS=mg("TooltipContent"),qh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=Br(jn,n),d=na(n),{onClose:p}=c;return f.useEffect(()=>(document.addEventListener(_i,p),()=>document.removeEventListener(_i,p)),[p]),f.useEffect(()=>{if(c.trigger){const u=h=>{const g=h.target;g!=null&&g.contains(c.trigger)&&p()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,p]),l.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:p,children:l.jsxs(_o,{"data-state":c.stateAttribute,...d,...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:[l.jsx(vS,{children:r}),l.jsx(gS,{scope:n,isInside:!0,children:l.jsx(Nw,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Rh.displayName=jn;var Xh="TooltipArrow",bS=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=na(n);return mS(Xh,n).isInside?null:l.jsx(Oo,{...o,...r,ref:t})});bS.displayName=Xh;function yS(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 wS(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 xS(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],c=t[s],d=i.x,p=i.y,u=c.x,h=c.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function NS(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),SS(t)}function SS(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 kS=Gh,MS=jh,DS=Uh,ES=Kh,Zh=Rh;const TS=kS,Qh=MS,Jh=DS,Fi=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>l.jsx(ES,{children:l.jsx(Zh,{ref:r,sideOffset:t,className:P("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})}));Fi.displayName=Zh.displayName;const eg=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>l.jsxs(Qh,{...a,children:[l.jsx(Jh,{asChild:!0,children:t}),l.jsx(Fi,{side:n,align:r,sideOffset:o,children:e})]});eg.displayName="Tooltip",M.Accordion=Dl,M.AccordionContent=Na,M.AccordionItem=xa,M.AccordionRoot=wa,M.AccordionTrigger=Ca,M.Alert=Tl,M.AlertDescription=_l,M.AlertTitle=Pl,M.AspectRatio=Al,M.Avatar=Wl,M.Badge=zl,M.Button=Nn,M.Calendar=ui,M.Checkbox=Hl,M.ComboBox=Ld,M.ComboBoxContent=Ad,M.ComboBoxEmpty=Wd,M.ComboBoxGroup=$d,M.ComboBoxItem=Fd,M.ComboBoxRoot=Bd,M.ComboBoxSeparator=zd,M.ComboBoxTrigger=ss,M.ComboBoxTriggerVariants=Id,M.DATA_TABLE_EXPAND_COLUMN_ID=At,M.DataTable=Kf,M.DataTableColumnHeader=Rf,M.DatePicker=Hp,M.DatePickerContent=Lp,M.DatePickerRoot=Bp,M.DatePickerTrigger=di,M.Dialog=Up,M.DialogClose=Gp,M.DialogContent=pi,M.DialogDescription=vi,M.DialogFooter=gi,M.DialogHeader=hi,M.DialogOverlay=fi,M.DialogPortal=jp,M.DialogRoot=Vp,M.DialogTitle=mi,M.DialogTrigger=Yp,M.Drawer=Qp,M.DrawerClose=qp,M.DrawerContent=yi,M.DrawerDescription=Ni,M.DrawerFooter=xi,M.DrawerHeader=wi,M.DrawerOverlay=bi,M.DrawerPortal=Xp,M.DrawerRoot=Kp,M.DrawerTitle=Ci,M.DrawerTrigger=Rp,M.DropdownMenu=Lf,M.DropdownMenuCheckboxItem=Ks,M.DropdownMenuContent=Mr,M.DropdownMenuGroup=y0,M.DropdownMenuItem=It,M.DropdownMenuLabel=Dr,M.DropdownMenuPortal=w0,M.DropdownMenuRadioGroup=Bf,M.DropdownMenuRadioItem=Rs,M.DropdownMenuRoot=Uo,M.DropdownMenuSeparator=zn,M.DropdownMenuSub=Us,M.DropdownMenuSubContent=qo,M.DropdownMenuSubTrigger=Ro,M.DropdownMenuTrigger=Ko,M.Field=Jp,M.FieldMessage=th,M.FileUpload=rh,M.Input=vr,M.InputAddon=ms,M.InputGroup=gs,M.Label=eh,M.MultiSelect=ah,M.NativeSelect=ih,M.NumberInput=ch,M.OTPInput=uh,M.Pagination=Ns,M.PaginationEllipsis=Cs,M.PaginationItem=ys,M.PaginationNext=xs,M.PaginationPrev=ws,M.PaginationRoot=vs,M.Popover=Od,M.PopoverAnchor=gw,M.PopoverClose=hw,M.PopoverContent=Ut,M.PopoverRoot=ln,M.PopoverTrigger=mr,M.Progress=fh,M.Radio=hh,M.RadioGroup=mh,M.RadioGroupContext=Si,M.STRING_COLUMN_FILTER_OPTIONS=ls,M.Select=_u,M.SelectContent=Lo,M.SelectGroup=Qw,M.SelectItem=As,M.SelectLabel=Tu,M.SelectRoot=Ps,M.SelectScrollDownButton=Is,M.SelectScrollUpButton=Os,M.SelectSeparator=Pu,M.SelectTrigger=Bo,M.SelectValue=_s,M.Separator=vh,M.Skeleton=hs,M.Switch=yh,M.Table=ds,M.TableBody=fs,M.TableCaption=Hd,M.TableCell=cn,M.TableFooter=ps,M.TableHead=Ao,M.TableHeader=us,M.TableRow=Ot,M.Tabs=Ah,M.TabsContent=Ti,M.TabsList=Di,M.TabsRoot=Mi,M.TabsTrigger=Ei,M.Textarea=Wh,M.Toaster=Vh,M.Tooltip=eg,M.TooltipContent=Fi,M.TooltipProvider=TS,M.TooltipRoot=Qh,M.TooltipTrigger=Jh,M.accordionContentVariants=kl,M.accordionRootVariants=Ml,M.accordionTriggerVariants=Sl,M.alertVariants=El,M.avatarVariants=Fl,M.badgeVariants=$l,M.bookersStringFilter=cs,M.buttonVariants=Bl,M.checkboxVariants=Ll,M.cn=P,M.dataTableColumnHeaderMeta=E0,M.datePickerTriggerVariants=zp,M.drawerVariants=Zp,M.formatBytes=nh,M.inputVariants=Yd,M.multiSelectTriggerVariants=oh,M.nativeSelectVariants=sh,M.numberInputVariants=lh,M.otpSlotVariants=dh,M.radioGroupVariants=gh,M.radioVariants=ph,M.selectTriggerVariants=Eu,M.switchTrackVariants=bh,M.textareaVariants=Fh,M.toast=iS,M.useDataTableTable=Vf,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|