@ryanodd/design-system 0.2.0-dev1 → 0.2.0-dev2

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/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),nr=require("react-dom");function or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=or(O),pt=or(nr),Ti="_badge_1quq7_1",Mi={badge:Ti},Ai=({variant:e="neutral",size:t="md",className:n,...o})=>l.jsx("div",{className:`${Mi.badge} ${n??""}`,"data-variant":e,"data-size":t,...o}),Ii="_button_1wslv_1",Ni="_buttonNotificationDot_1wslv_143",_o={button:Ii,buttonNotificationDot:Ni},Oi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ki=O.forwardRef(Oi),Di=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),ji=O.forwardRef(Di),Li=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),Fi=O.forwardRef(Li),$i=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),Bi=O.forwardRef($i),Wi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),Hi=O.forwardRef(Wi),Vi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),Ki=O.forwardRef(Vi),Ui=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),Gi=O.forwardRef(Ui),zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),Yi=O.forwardRef(zi),qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Xi=O.forwardRef(qi),Zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Qi=O.forwardRef(Zi),Ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),ec=O.forwardRef(Ji),tc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),nc=O.forwardRef(tc),oc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),rc=O.forwardRef(oc),sc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),ac=O.forwardRef(sc),ic=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),cc=O.forwardRef(ic),lc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),uc=O.forwardRef(lc),dc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),fc=O.forwardRef(dc),pc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),mc=O.forwardRef(pc),hc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),vc=O.forwardRef(hc),gc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),wc=O.forwardRef(gc),xc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",fillRule:"evenodd",clipRule:"evenodd"},s.createElement("path",{fill:"#f44336",d:"M7.209 1.061c.725-.081 1.154-.081 1.933 0a6.57 6.57 0 0 1 3.65 1.82a100 100 0 0 0-1.986 1.93q-1.876-1.59-4.188-.734q-1.696.78-2.362 2.528a78 78 0 0 1-2.148-1.658a.26.26 0 0 0-.16-.027q1.683-3.245 5.26-3.86",opacity:.987}),s.createElement("path",{fill:"#ffc107",d:"M1.946 4.92q.085-.013.161.027a78 78 0 0 0 2.148 1.658A7.6 7.6 0 0 0 4.04 7.99q.037.678.215 1.331L2 11.116Q.527 8.038 1.946 4.92",opacity:.997}),s.createElement("path",{fill:"#448aff",d:"M12.685 13.29a26 26 0 0 0-2.202-1.74q1.15-.812 1.396-2.228H8.122V6.713q3.25-.027 6.497.055q.616 3.345-1.423 6.032a7 7 0 0 1-.51.49",opacity:.999}),s.createElement("path",{fill:"#43a047",d:"M4.255 9.322q1.23 3.057 4.51 2.854a3.94 3.94 0 0 0 1.718-.626q1.148.812 2.202 1.74a6.62 6.62 0 0 1-4.027 1.684a6.4 6.4 0 0 1-1.02 0Q3.82 14.524 2 11.116z",opacity:.993}))),yc=O.forwardRef(xc),Cc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),bc=O.forwardRef(Cc),Ec=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Rc=O.forwardRef(Ec),Sc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),_c=O.forwardRef(Sc),Pc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),Tc=O.forwardRef(Pc),Mc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),Ac=O.forwardRef(Mc),Ic=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),Nc=O.forwardRef(Ic),Oc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),kc=O.forwardRef(Oc),Dc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),jc=O.forwardRef(Dc),Lc="_icon_178c1_1",Fc={icon:Lc},$c=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=O.forwardRef(({size:o="lg",className:r,...a},i)=>l.jsx(e,{className:`${r} ${Fc.icon}`,"data-size":o,ref:i,alt:t,...a}));return n.displayName=t,n},rr=V(ki,"Left"),sr=V(ji,"Right"),ar=V(Fi,"Calendar"),Ut=V(Bi,"Check"),ir=V(Hi,"Chevron Down"),Bc=V(Ki,"Chevron Left"),Wc=V(Gi,"Chevron Right"),Hc=V(Yi,"Chevron Up"),cr=V(Xi,"Circle"),qn=V(Qi,"Close"),lr=V(ec,"Coffee"),ur=V(nc,"External Link"),dr=V(rc,"Gear"),fr=V(ac,"Hammer"),pr=V(cc,"Heart"),mr=V(uc,"Inbox"),hr=V(mc,"Lamp"),vr=V(fc,"Kebab"),gr=V(vc,"Lightning"),wr=V(wc,"Log In"),xr=V(yc,"Google"),yr=V(bc,"Log Out"),Cr=V(Rc,"Mail"),br=V(_c,"Menu"),Er=V(Tc,"No Mobile Devices"),Rr=V(Ac,"Pencil"),Sr=V(Nc,"Plus"),_r=V(kc,"Signpost"),Pr=V(jc,"Sun Moon"),Ze={ArrowLeft:rr,ArrowRight:sr,Calendar:ar,Check:Ut,Circle:cr,Close:qn,Coffee:lr,ExternalLink:ur,Gear:dr,Hammer:fr,Heart:pr,Inbox:mr,Kebab:vr,Lamp:hr,Lightning:gr,LogIn:wr,LogoGoogle:xr,LogOut:yr,Mail:Cr,Menu:br,NoMobile:Er,Pencil:Rr,Plus:Sr,Signpost:_r,SunMoon:Pr},Vc="_spinnerWrapper_1mfc7_1",Kc="_spinner_1mfc7_1",Po={spinnerWrapper:Vc,spinner:Kc},Xn=O.forwardRef(({className:e,size:t="lg",...n},o)=>l.jsx("div",{ref:o,className:Po.spinnerWrapper,"data-size":t,...n,children:l.jsx("div",{className:Po.spinner})}));Xn.displayName="Spinner";const mt=O.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:a="md",variant:i,loading:c,iconOnly:u,...d},f)=>{const p=o?Ze[o]:void 0,h=r?Ze[r]:void 0,g=a==="sm"?"sm":a==="md"?"md":"lg";return l.jsxs("button",{ref:f,...d,className:`${_o.button} ${e??""}`,"data-size":a,"data-variant":i,"data-icon-only":u,children:[p&&l.jsx(p,{size:g}),c&&l.jsx(Xn,{size:g}),n,h&&l.jsx(h,{size:g}),t&&l.jsx("span",{className:_o.buttonNotificationDot,children:t})]})});mt.displayName="Button";function To(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gt(...e){return t=>{let n=!1;const o=e.map(r=>{const a=To(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():To(e[r],null)}}}}function H(...e){return s.useCallback(Gt(...e),e)}function Uc(e,t){const n=s.createContext(t),o=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return l.jsx(n.Provider,{value:u,children:i})};o.displayName=e+"Provider";function r(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function pe(e,t=[]){let n=[];function o(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=p=>{const{scope:h,children:g,...w}=p,m=h?.[e]?.[u]||c,v=s.useMemo(()=>w,Object.values(w));return l.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function f(p,h){const g=h?.[e]?.[u]||c,w=s.useContext(g);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return r.scopeName=e,[o,Gc(r,...t)]}function Gc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var X=globalThis?.document?s.useLayoutEffect:()=>{},zc=s[" useInsertionEffect ".trim().toString()]||X;function be({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=Yc({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:r;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,o])}const d=s.useCallback(f=>{if(c){const p=qc(f)?f(e):f;p!==e&&i.current?.(p)}else a(f)},[c,e,a,i]);return[u,d]}function Yc({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return zc(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function qc(e){return typeof e=="function"}function Tr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mr(e){const[t,n]=s.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Xc(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var oe=e=>{const{present:t,children:n}=e,o=Zc(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=H(o.ref,Qc(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};oe.displayName="Presence";function Zc(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,u]=Xc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=St(o.current);a.current=c==="mounted"?d:"none"},[c]),X(()=>{const d=o.current,f=r.current;if(f!==e){const h=a.current,g=St(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),X(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=g=>{const m=St(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=St(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function St(e){return e?.animationName||"none"}function Qc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function De(e){const t=Jc(e),n=s.forwardRef((o,r)=>{const{children:a,...i}=o,c=s.Children.toArray(a),u=c.find(tl);if(u){const d=u.props.children,f=c.map(p=>p===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return l.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function Jc(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const i=ol(r),c=nl(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Gt(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ar=Symbol("radix.slottable");function el(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ar,t}function tl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ar}function nl(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const u=a(...c);return r(...c),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function ol(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=rl.reduce((e,t)=>{const n=De(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Zn(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}var zt="Checkbox",[sl]=pe(zt),[al,Qn]=sl(zt);function il(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=e,[h,g]=be({prop:n,defaultProp:r??!1,onChange:u,caller:zt}),[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useRef(!1),C=w?!!i||!!w.closest("form"):!0,b={checked:h,disabled:a,setChecked:g,control:w,setControl:m,name:c,form:i,value:f,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:Pe(r)?!1:r,isFormControl:C,bubbleInput:v,setBubbleInput:y};return l.jsx(al,{scope:t,...b,children:cl(p)?p(b):o})}var Ir="CheckboxTrigger",Nr=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:w}=Qn(Ir,e),m=H(r,f),v=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const x=()=>p(v.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[a,p]),l.jsx(k.button,{type:"button",role:"checkbox","aria-checked":Pe(u)?"mixed":u,"aria-required":d,"data-state":Fr(u),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:m,onKeyDown:S(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:S(n,y=>{p(x=>Pe(x)?!0:!x),w&&g&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Nr.displayName=Ir;var Or=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:f,...p}=e;return l.jsx(il,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:o,form:f,value:u,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Nr,{...p,ref:t,__scopeCheckbox:n}),h&&l.jsx(Lr,{__scopeCheckbox:n})]})})});Or.displayName=zt;var kr="CheckboxIndicator",Dr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=Qn(kr,n);return l.jsx(oe,{present:o||Pe(a.checked)||a.checked===!0,children:l.jsx(k.span,{"data-state":Fr(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Dr.displayName=kr;var jr="CheckboxBubbleInput",Lr=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=Qn(jr,e),w=H(n,g),m=Tr(a),v=Mr(o);s.useEffect(()=>{const x=h;if(!x)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==a&&E){const R=new Event("click",{bubbles:T});x.indeterminate=Pe(a),E.call(x,Pe(a)?!1:a),x.dispatchEvent(R)}},[h,m,a,r]);const y=s.useRef(Pe(a)?!1:a);return l.jsx(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Lr.displayName=jr;function cl(e){return typeof e=="function"}function Pe(e){return e==="indeterminate"}function Fr(e){return Pe(e)?"indeterminate":e?"checked":"unchecked"}const ll="_checkboxRow_aw0oa_1",ul="_checkboxRoot_aw0oa_7",dl="_checkboxIndicator_aw0oa_19",fl="_checkboxCheckmarkIcon_aw0oa_29",pl="_checkboxLabel_aw0oa_35",rt={checkboxRow:ll,checkboxRoot:ul,checkboxIndicator:dl,checkboxCheckmarkIcon:fl,checkboxLabel:pl},ml=({id:e,labelContent:t,checked:n,onClick:o})=>l.jsxs("div",{className:rt.checkboxRow,children:[l.jsx(Or,{checked:n,onCheckedChange:r=>{o(r===!0)},className:rt.checkboxRoot,defaultChecked:!0,id:e,children:l.jsx(Dr,{className:rt.checkboxIndicator,children:l.jsx(Ut,{className:rt.checkboxCheckmarkIcon})})}),l.jsx("label",{className:rt.checkboxLabel,htmlFor:e,children:t})]});var hl=s[" useId ".trim().toString()]||(()=>{}),vl=0;function ue(e){const[t,n]=s.useState(hl());return X(()=>{n(o=>o??String(vl++))},[e]),t?`radix-${t}`:""}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function gl(e,t=globalThis?.document){const n=ne(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var wl="DismissableLayer",Nn="dismissableLayer.update",xl="dismissableLayer.pointerDownOutside",yl="dismissableLayer.focusOutside",Mo,$r=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext($r),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),w=H(t,R=>p(R)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,E=bl(R=>{const A=R.target,j=[...d.branches].some(D=>D.contains(A));!b||j||(r?.(R),i?.(R),R.defaultPrevented||c?.())},h),T=El(R=>{const A=R.target;[...d.branches].some(D=>D.contains(A))||(a?.(R),i?.(R),R.defaultPrevented||c?.())},h);return gl(R=>{x===d.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Mo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ao(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Mo)}},[f,h,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ao())},[f,d]),s.useEffect(()=>{const R=()=>g({});return document.addEventListener(Nn,R),()=>document.removeEventListener(Nn,R)},[]),l.jsx(k.div,{...u,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,T.onFocusCapture),onBlurCapture:S(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,E.onPointerDownCapture)})});Be.displayName=wl;var Cl="DismissableLayerBranch",Br=s.forwardRef((e,t)=>{const n=s.useContext($r),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(k.div,{...e,ref:r})});Br.displayName=Cl;function bl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Wr(xl,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function El(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Wr(yl,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Nn);document.dispatchEvent(e)}function Wr(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var Rl=Be,Sl=Br,Cn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},_l="FocusScope",ht=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=ne(r),f=ne(a),p=s.useRef(null),h=H(t,m=>u(m)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(C){if(g.paused||!c)return;const b=C.target;c.contains(b)?p.current=b:_e(p.current,{select:!0})},v=function(C){if(g.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||_e(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[o,c,g.paused]),s.useEffect(()=>{if(c){Oo.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(Cn,Io);c.addEventListener(Cn,d),c.dispatchEvent(y),y.defaultPrevented||(Pl(Nl(Hr(c)),{select:!0}),document.activeElement===m&&_e(c))}return()=>{c.removeEventListener(Cn,d),setTimeout(()=>{const y=new CustomEvent(bn,Io);c.addEventListener(bn,f),c.dispatchEvent(y),y.defaultPrevented||_e(m??document.body,{select:!0}),c.removeEventListener(bn,f),Oo.remove(g)},0)}}},[c,d,f,g]);const w=s.useCallback(m=>{if(!n&&!o||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[C,b]=Tl(x);C&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&_e(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),n&&_e(b,{select:!0})):y===x&&m.preventDefault()}},[n,o,g.paused]);return l.jsx(k.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});ht.displayName=_l;function Pl(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(_e(o,{select:t}),document.activeElement!==n)return}function Tl(e){const t=Hr(e),n=No(t,e),o=No(t.reverse(),e);return[n,o]}function Hr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function No(e,t){for(const n of e)if(!Ml(n,{upTo:t}))return n}function Ml(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 Al(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Al(e)&&t&&e.select()}}var Oo=Il();function Il(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ko(e,t),e.unshift(t)},remove(t){e=ko(e,t),e[0]?.resume()}}}function ko(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Nl(e){return e.filter(t=>t.tagName!=="A")}var Ol="Portal",We=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);X(()=>a(!0),[]);const i=n||r&&globalThis?.document?.body;return i?nr.createPortal(l.jsx(k.div,{...o,ref:t}),i):null});We.displayName=Ol;var En=0;function Yt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Do()),document.body.insertAdjacentElement("beforeend",e[1]??Do()),En++,()=>{En===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),En--}},[])}function Do(){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 ve=function(){return ve=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ve.apply(this,arguments)};function Vr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function kl(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",kt="width-before-scroll-bar",Dl="with-scroll-bars-hidden",jl="--removed-body-scroll-bar-size";function Rn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ll(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Fl=typeof window<"u"?s.useLayoutEffect:s.useEffect,jo=new WeakMap;function $l(e,t){var n=Ll(null,function(o){return e.forEach(function(r){return Rn(r,o)})});return Fl(function(){var o=jo.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(c){a.has(c)||Rn(c,null)}),a.forEach(function(c){r.has(c)||Rn(c,i)})}jo.set(n,e)},[e]),n}function Bl(e){return e}function Wl(e,t){t===void 0&&(t=Bl);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return r}function Hl(e){e===void 0&&(e={});var t=Wl(null);return t.options=ve({async:!0,ssr:!1},e),t}var Kr=function(e){var t=e.sideCar,n=Vr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,ve({},n))};Kr.isSideCarExport=!0;function Vl(e,t){return e.useMedium(t),Kr}var Ur=Hl(),Sn=function(){},qt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:Sn,onWheelCapture:Sn,onTouchMoveCapture:Sn}),r=o[0],a=o[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,b=Vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=$l([n,t]),R=ve(ve({},b),r);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:Ur,removeScrollBar:d,shards:p,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),ve(ve({},R),{ref:T})):s.createElement(x,ve({},R,{className:u,ref:T}),c))});qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qt.classNames={fullWidth:kt,zeroRight:Ot};var Kl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ul(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Kl();return t&&e.setAttribute("nonce",t),e}function Gl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ul())&&(Gl(t,n),zl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ql=function(){var e=Yl();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gr=function(){var e=ql(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Xl={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Zl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[_n(n),_n(o),_n(r)]},Ql=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xl;var t=Zl(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Jl=Gr(),qe="data-scroll-locked",eu=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Dl,` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),nr=require("react-dom");function or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=or(O),pt=or(nr),Mi="_badge_1quq7_1",Ai={badge:Mi},Ii=({variant:e="neutral",size:t="md",className:n,...o})=>l.jsx("div",{className:`${Ai.badge} ${n??""}`,"data-variant":e,"data-size":t,...o}),Ni="_button_1wslv_1",Oi="_buttonNotificationDot_1wslv_143",_o={button:Ni,buttonNotificationDot:Oi},ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),Di=O.forwardRef(ki),Li=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),ji=O.forwardRef(Li),Fi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),$i=O.forwardRef(Fi),Bi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),Wi=O.forwardRef(Bi),Hi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),Vi=O.forwardRef(Hi),Ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),Ui=O.forwardRef(Ki),Gi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),zi=O.forwardRef(Gi),Yi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),qi=O.forwardRef(Yi),Xi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Zi=O.forwardRef(Xi),Qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Ji=O.forwardRef(Qi),ec=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),tc=O.forwardRef(ec),nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),oc=O.forwardRef(nc),rc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),sc=O.forwardRef(rc),ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),ic=O.forwardRef(ac),cc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),lc=O.forwardRef(cc),uc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),dc=O.forwardRef(uc),fc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),pc=O.forwardRef(fc),mc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),hc=O.forwardRef(mc),vc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),gc=O.forwardRef(vc),wc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),xc=O.forwardRef(wc),yc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",fillRule:"evenodd",clipRule:"evenodd"},s.createElement("path",{fill:"#f44336",d:"M7.209 1.061c.725-.081 1.154-.081 1.933 0a6.57 6.57 0 0 1 3.65 1.82a100 100 0 0 0-1.986 1.93q-1.876-1.59-4.188-.734q-1.696.78-2.362 2.528a78 78 0 0 1-2.148-1.658a.26.26 0 0 0-.16-.027q1.683-3.245 5.26-3.86",opacity:.987}),s.createElement("path",{fill:"#ffc107",d:"M1.946 4.92q.085-.013.161.027a78 78 0 0 0 2.148 1.658A7.6 7.6 0 0 0 4.04 7.99q.037.678.215 1.331L2 11.116Q.527 8.038 1.946 4.92",opacity:.997}),s.createElement("path",{fill:"#448aff",d:"M12.685 13.29a26 26 0 0 0-2.202-1.74q1.15-.812 1.396-2.228H8.122V6.713q3.25-.027 6.497.055q.616 3.345-1.423 6.032a7 7 0 0 1-.51.49",opacity:.999}),s.createElement("path",{fill:"#43a047",d:"M4.255 9.322q1.23 3.057 4.51 2.854a3.94 3.94 0 0 0 1.718-.626q1.148.812 2.202 1.74a6.62 6.62 0 0 1-4.027 1.684a6.4 6.4 0 0 1-1.02 0Q3.82 14.524 2 11.116z",opacity:.993}))),Cc=O.forwardRef(yc),bc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),Ec=O.forwardRef(bc),Sc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Rc=O.forwardRef(Sc),_c=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Pc=O.forwardRef(_c),Tc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),Mc=O.forwardRef(Tc),Ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),Ic=O.forwardRef(Ac),Nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),Oc=O.forwardRef(Nc),kc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),Dc=O.forwardRef(kc),Lc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("circle",{cx:12,cy:12,r:4}),s.createElement("path",{d:"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"}))),jc=O.forwardRef(Lc),Fc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),$c=O.forwardRef(Fc),Bc="_icon_178c1_1",Wc={icon:Bc},Hc=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=O.forwardRef(({size:o="lg",className:r,...a},i)=>l.jsx(e,{className:`${r} ${Wc.icon}`,"data-size":o,ref:i,alt:t,...a}));return n.displayName=t,n},rr=V(Di,"Left"),sr=V(ji,"Right"),ar=V($i,"Calendar"),Ut=V(Wi,"Check"),ir=V(Vi,"Chevron Down"),Vc=V(Ui,"Chevron Left"),Kc=V(zi,"Chevron Right"),Uc=V(qi,"Chevron Up"),cr=V(Zi,"Circle"),qn=V(Ji,"Close"),lr=V(tc,"Coffee"),ur=V(oc,"External Link"),dr=V(sc,"Gear"),fr=V(ic,"Hammer"),pr=V(lc,"Heart"),mr=V(dc,"Inbox"),hr=V(hc,"Lamp"),vr=V(pc,"Kebab"),gr=V(gc,"Lightning"),wr=V(xc,"Log In"),xr=V(Cc,"Google"),yr=V(Ec,"Log Out"),Cr=V(Rc,"Mail"),br=V(Pc,"Menu"),Er=V(Mc,"No Mobile Devices"),Sr=V(Ic,"Pencil"),Rr=V(Oc,"Plus"),_r=V(Dc,"Signpost"),Pr=V(jc,"Sun"),Tr=V($c,"Sun Moon"),Ze={ArrowLeft:rr,ArrowRight:sr,Calendar:ar,Check:Ut,Circle:cr,Close:qn,Coffee:lr,ExternalLink:ur,Gear:dr,Hammer:fr,Heart:pr,Inbox:mr,Kebab:vr,Lamp:hr,Lightning:gr,LogIn:wr,LogoGoogle:xr,LogOut:yr,Mail:Cr,Menu:br,NoMobile:Er,Pencil:Sr,Plus:Rr,Signpost:_r,Sun:Pr,SunMoon:Tr},Gc="_spinnerWrapper_1mfc7_1",zc="_spinner_1mfc7_1",Po={spinnerWrapper:Gc,spinner:zc},Xn=O.forwardRef(({className:e,size:t="lg",...n},o)=>l.jsx("div",{ref:o,className:Po.spinnerWrapper,"data-size":t,...n,children:l.jsx("div",{className:Po.spinner})}));Xn.displayName="Spinner";const mt=O.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:a="md",variant:i,loading:c,iconOnly:u,...d},f)=>{const p=o?Ze[o]:void 0,h=r?Ze[r]:void 0,g=a==="sm"?"sm":a==="md"?"md":"lg";return l.jsxs("button",{ref:f,...d,className:`${_o.button} ${e??""}`,"data-size":a,"data-variant":i,"data-icon-only":u,children:[p&&l.jsx(p,{size:g}),c&&l.jsx(Xn,{size:g}),n,h&&l.jsx(h,{size:g}),t&&l.jsx("span",{className:_o.buttonNotificationDot,children:t})]})});mt.displayName="Button";function To(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gt(...e){return t=>{let n=!1;const o=e.map(r=>{const a=To(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():To(e[r],null)}}}}function H(...e){return s.useCallback(Gt(...e),e)}function Yc(e,t){const n=s.createContext(t),o=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return l.jsx(n.Provider,{value:u,children:i})};o.displayName=e+"Provider";function r(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function pe(e,t=[]){let n=[];function o(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=p=>{const{scope:h,children:g,...w}=p,m=h?.[e]?.[u]||c,v=s.useMemo(()=>w,Object.values(w));return l.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function f(p,h){const g=h?.[e]?.[u]||c,w=s.useContext(g);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return r.scopeName=e,[o,qc(r,...t)]}function qc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var X=globalThis?.document?s.useLayoutEffect:()=>{},Xc=s[" useInsertionEffect ".trim().toString()]||X;function be({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=Zc({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:r;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,o])}const d=s.useCallback(f=>{if(c){const p=Qc(f)?f(e):f;p!==e&&i.current?.(p)}else a(f)},[c,e,a,i]);return[u,d]}function Zc({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return Xc(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function Qc(e){return typeof e=="function"}function Mr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ar(e){const[t,n]=s.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Jc(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var oe=e=>{const{present:t,children:n}=e,o=el(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=H(o.ref,tl(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};oe.displayName="Presence";function el(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,u]=Jc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=Rt(o.current);a.current=c==="mounted"?d:"none"},[c]),X(()=>{const d=o.current,f=r.current;if(f!==e){const h=a.current,g=Rt(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),X(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=g=>{const m=Rt(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Rt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function Rt(e){return e?.animationName||"none"}function tl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function De(e){const t=nl(e),n=s.forwardRef((o,r)=>{const{children:a,...i}=o,c=s.Children.toArray(a),u=c.find(rl);if(u){const d=u.props.children,f=c.map(p=>p===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return l.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function nl(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const i=al(r),c=sl(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Gt(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ir=Symbol("radix.slottable");function ol(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ir,t}function rl(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ir}function sl(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const u=a(...c);return r(...c),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function al(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var il=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=il.reduce((e,t)=>{const n=De(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Zn(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}var zt="Checkbox",[cl]=pe(zt),[ll,Qn]=cl(zt);function ul(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=e,[h,g]=be({prop:n,defaultProp:r??!1,onChange:u,caller:zt}),[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useRef(!1),C=w?!!i||!!w.closest("form"):!0,b={checked:h,disabled:a,setChecked:g,control:w,setControl:m,name:c,form:i,value:f,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:Pe(r)?!1:r,isFormControl:C,bubbleInput:v,setBubbleInput:y};return l.jsx(ll,{scope:t,...b,children:dl(p)?p(b):o})}var Nr="CheckboxTrigger",Or=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:w}=Qn(Nr,e),m=H(r,f),v=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const x=()=>p(v.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[a,p]),l.jsx(k.button,{type:"button",role:"checkbox","aria-checked":Pe(u)?"mixed":u,"aria-required":d,"data-state":$r(u),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:m,onKeyDown:R(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:R(n,y=>{p(x=>Pe(x)?!0:!x),w&&g&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Or.displayName=Nr;var kr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:f,...p}=e;return l.jsx(ul,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:o,form:f,value:u,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Or,{...p,ref:t,__scopeCheckbox:n}),h&&l.jsx(Fr,{__scopeCheckbox:n})]})})});kr.displayName=zt;var Dr="CheckboxIndicator",Lr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=Qn(Dr,n);return l.jsx(oe,{present:o||Pe(a.checked)||a.checked===!0,children:l.jsx(k.span,{"data-state":$r(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Lr.displayName=Dr;var jr="CheckboxBubbleInput",Fr=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=Qn(jr,e),w=H(n,g),m=Mr(a),v=Ar(o);s.useEffect(()=>{const x=h;if(!x)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==a&&E){const S=new Event("click",{bubbles:T});x.indeterminate=Pe(a),E.call(x,Pe(a)?!1:a),x.dispatchEvent(S)}},[h,m,a,r]);const y=s.useRef(Pe(a)?!1:a);return l.jsx(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Fr.displayName=jr;function dl(e){return typeof e=="function"}function Pe(e){return e==="indeterminate"}function $r(e){return Pe(e)?"indeterminate":e?"checked":"unchecked"}const fl="_checkboxRow_aw0oa_1",pl="_checkboxRoot_aw0oa_7",ml="_checkboxIndicator_aw0oa_19",hl="_checkboxCheckmarkIcon_aw0oa_29",vl="_checkboxLabel_aw0oa_35",rt={checkboxRow:fl,checkboxRoot:pl,checkboxIndicator:ml,checkboxCheckmarkIcon:hl,checkboxLabel:vl},gl=({id:e,labelContent:t,checked:n,onClick:o})=>l.jsxs("div",{className:rt.checkboxRow,children:[l.jsx(kr,{checked:n,onCheckedChange:r=>{o(r===!0)},className:rt.checkboxRoot,defaultChecked:!0,id:e,children:l.jsx(Lr,{className:rt.checkboxIndicator,children:l.jsx(Ut,{className:rt.checkboxCheckmarkIcon})})}),l.jsx("label",{className:rt.checkboxLabel,htmlFor:e,children:t})]});var wl=s[" useId ".trim().toString()]||(()=>{}),xl=0;function ue(e){const[t,n]=s.useState(wl());return X(()=>{n(o=>o??String(xl++))},[e]),t?`radix-${t}`:""}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function yl(e,t=globalThis?.document){const n=ne(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Cl="DismissableLayer",Nn="dismissableLayer.update",bl="dismissableLayer.pointerDownOutside",El="dismissableLayer.focusOutside",Mo,Br=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(Br),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),w=H(t,S=>p(S)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,E=Rl(S=>{const A=S.target,L=[...d.branches].some(D=>D.contains(A));!b||L||(r?.(S),i?.(S),S.defaultPrevented||c?.())},h),T=_l(S=>{const A=S.target;[...d.branches].some(D=>D.contains(A))||(a?.(S),i?.(S),S.defaultPrevented||c?.())},h);return yl(S=>{x===d.layers.size-1&&(o?.(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},h),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Mo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ao(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Mo)}},[f,h,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ao())},[f,d]),s.useEffect(()=>{const S=()=>g({});return document.addEventListener(Nn,S),()=>document.removeEventListener(Nn,S)},[]),l.jsx(k.div,{...u,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,T.onFocusCapture),onBlurCapture:R(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,E.onPointerDownCapture)})});Be.displayName=Cl;var Sl="DismissableLayerBranch",Wr=s.forwardRef((e,t)=>{const n=s.useContext(Br),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(k.div,{...e,ref:r})});Wr.displayName=Sl;function Rl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Hr(bl,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function _l(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Hr(El,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Nn);document.dispatchEvent(e)}function Hr(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var Pl=Be,Tl=Wr,Cn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},Ml="FocusScope",ht=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=ne(r),f=ne(a),p=s.useRef(null),h=H(t,m=>u(m)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(C){if(g.paused||!c)return;const b=C.target;c.contains(b)?p.current=b:_e(p.current,{select:!0})},v=function(C){if(g.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||_e(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[o,c,g.paused]),s.useEffect(()=>{if(c){Oo.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(Cn,Io);c.addEventListener(Cn,d),c.dispatchEvent(y),y.defaultPrevented||(Al(Dl(Vr(c)),{select:!0}),document.activeElement===m&&_e(c))}return()=>{c.removeEventListener(Cn,d),setTimeout(()=>{const y=new CustomEvent(bn,Io);c.addEventListener(bn,f),c.dispatchEvent(y),y.defaultPrevented||_e(m??document.body,{select:!0}),c.removeEventListener(bn,f),Oo.remove(g)},0)}}},[c,d,f,g]);const w=s.useCallback(m=>{if(!n&&!o||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[C,b]=Il(x);C&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&_e(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),n&&_e(b,{select:!0})):y===x&&m.preventDefault()}},[n,o,g.paused]);return l.jsx(k.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});ht.displayName=Ml;function Al(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(_e(o,{select:t}),document.activeElement!==n)return}function Il(e){const t=Vr(e),n=No(t,e),o=No(t.reverse(),e);return[n,o]}function Vr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function No(e,t){for(const n of e)if(!Nl(n,{upTo:t}))return n}function Nl(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 Ol(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ol(e)&&t&&e.select()}}var Oo=kl();function kl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ko(e,t),e.unshift(t)},remove(t){e=ko(e,t),e[0]?.resume()}}}function ko(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Dl(e){return e.filter(t=>t.tagName!=="A")}var Ll="Portal",We=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);X(()=>a(!0),[]);const i=n||r&&globalThis?.document?.body;return i?nr.createPortal(l.jsx(k.div,{...o,ref:t}),i):null});We.displayName=Ll;var En=0;function Yt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Do()),document.body.insertAdjacentElement("beforeend",e[1]??Do()),En++,()=>{En===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),En--}},[])}function Do(){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 ve=function(){return ve=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ve.apply(this,arguments)};function Kr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function jl(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",kt="width-before-scroll-bar",Fl="with-scroll-bars-hidden",$l="--removed-body-scroll-bar-size";function Sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bl(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Wl=typeof window<"u"?s.useLayoutEffect:s.useEffect,Lo=new WeakMap;function Hl(e,t){var n=Bl(null,function(o){return e.forEach(function(r){return Sn(r,o)})});return Wl(function(){var o=Lo.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(c){a.has(c)||Sn(c,null)}),a.forEach(function(c){r.has(c)||Sn(c,i)})}Lo.set(n,e)},[e]),n}function Vl(e){return e}function Kl(e,t){t===void 0&&(t=Vl);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return r}function Ul(e){e===void 0&&(e={});var t=Kl(null);return t.options=ve({async:!0,ssr:!1},e),t}var Ur=function(e){var t=e.sideCar,n=Kr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,ve({},n))};Ur.isSideCarExport=!0;function Gl(e,t){return e.useMedium(t),Ur}var Gr=Ul(),Rn=function(){},qt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:Rn,onWheelCapture:Rn,onTouchMoveCapture:Rn}),r=o[0],a=o[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,b=Kr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=Hl([n,t]),S=ve(ve({},b),r);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:Gr,removeScrollBar:d,shards:p,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),ve(ve({},S),{ref:T})):s.createElement(x,ve({},S,{className:u,ref:T}),c))});qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qt.classNames={fullWidth:kt,zeroRight:Ot};var zl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zl();return t&&e.setAttribute("nonce",t),e}function ql(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Yl())&&(ql(t,n),Xl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ql=function(){var e=Zl();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zr=function(){var e=Ql(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Jl={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},eu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[_n(n),_n(o),_n(r)]},tu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jl;var t=eu(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},nu=zr(),qe="data-scroll-locked",ou=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Fl,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(c,"px ").concat(o,`;
5
5
  }
@@ -33,13 +33,13 @@
33
33
  }
34
34
 
35
35
  body[`).concat(qe,`] {
36
- `).concat(jl,": ").concat(c,`px;
36
+ `).concat($l,": ").concat(c,`px;
37
37
  }
38
- `)},Lo=function(){var e=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(e)?e:0},tu=function(){s.useEffect(function(){return document.body.setAttribute(qe,(Lo()+1).toString()),function(){var e=Lo()-1;e<=0?document.body.removeAttribute(qe):document.body.setAttribute(qe,e.toString())}},[])},nu=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;tu();var a=s.useMemo(function(){return Ql(r)},[r]);return s.createElement(Jl,{styles:eu(a,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{On=!1}var Ke=On?{passive:!1}:!1,ou=function(e){return e.tagName==="TEXTAREA"},zr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ou(e)&&n[t]==="visible")},ru=function(e){return zr(e,"overflowY")},su=function(e){return zr(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Yr(e,o);if(r){var a=qr(e,o),i=a[1],c=a[2];if(i>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},au=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},iu=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Yr=function(e,t){return e==="v"?ru(t):su(t)},qr=function(e,t){return e==="v"?au(t):iu(t)},cu=function(e,t){return e==="h"&&t==="rtl"?-1:1},lu=function(e,t,n,o,r){var a=cu(e,window.getComputedStyle(t).direction),i=a*o,c=n.target,u=t.contains(c),d=!1,f=i>0,p=0,h=0;do{if(!c)break;var g=qr(e,c),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&Yr(e,c)&&(p+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$o=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},uu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},du=function(e){return`
38
+ `)},jo=function(){var e=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(e)?e:0},ru=function(){s.useEffect(function(){return document.body.setAttribute(qe,(jo()+1).toString()),function(){var e=jo()-1;e<=0?document.body.removeAttribute(qe):document.body.setAttribute(qe,e.toString())}},[])},su=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;ru();var a=s.useMemo(function(){return tu(r)},[r]);return s.createElement(nu,{styles:ou(a,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{On=!1}var Ke=On?{passive:!1}:!1,au=function(e){return e.tagName==="TEXTAREA"},Yr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!au(e)&&n[t]==="visible")},iu=function(e){return Yr(e,"overflowY")},cu=function(e){return Yr(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=qr(e,o);if(r){var a=Xr(e,o),i=a[1],c=a[2];if(i>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},lu=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},uu=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},qr=function(e,t){return e==="v"?iu(t):cu(t)},Xr=function(e,t){return e==="v"?lu(t):uu(t)},du=function(e,t){return e==="h"&&t==="rtl"?-1:1},fu=function(e,t,n,o,r){var a=du(e,window.getComputedStyle(t).direction),i=a*o,c=n.target,u=t.contains(c),d=!1,f=i>0,p=0,h=0;do{if(!c)break;var g=Xr(e,c),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&qr(e,c)&&(p+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$o=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},pu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mu=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},fu=0,Ue=[];function pu(e){var t=s.useRef([]),n=s.useRef([0,0]),o=s.useRef(),r=s.useState(fu++)[0],a=s.useState(Gr)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=kl([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Pt(m),x=n.current,C="deltaX"in m?m.deltaX:x[0]-y[0],b="deltaY"in m?m.deltaY:x[1]-y[1],E,T=m.target,R=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in m&&R==="h"&&T.type==="range")return!1;var A=Fo(R,T);if(!A)return!0;if(A?E=R:(E=R==="v"?"h":"v",A=Fo(R,T)),!A)return!1;if(!o.current&&"changedTouches"in m&&(C||b)&&(o.current=E),!E)return!0;var j=o.current||E;return lu(j,v,m,j==="h"?C:b)},[]),u=s.useCallback(function(m){var v=m;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in v?$o(v):Pt(v),x=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&uu(E.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(E){return E.contains(v.target)}),b=C.length>0?c(v,C[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=s.useCallback(function(m,v,y,x){var C={name:m,delta:v,target:y,should:x,shadowParent:mu(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),f=s.useCallback(function(m){n.current=Pt(m),o.current=void 0},[]),p=s.useCallback(function(m){d(m.type,$o(m),m.target,c(m,e.lockRef.current))},[]),h=s.useCallback(function(m){d(m.type,Pt(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ke),document.addEventListener("touchmove",u,Ke),document.addEventListener("touchstart",f,Ke),function(){Ue=Ue.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,Ke),document.removeEventListener("touchmove",u,Ke),document.removeEventListener("touchstart",f,Ke)}},[]);var g=e.removeScrollBar,w=e.inert;return s.createElement(s.Fragment,null,w?s.createElement(a,{styles:du(r)}):null,g?s.createElement(nu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hu=Vl(Ur,pu);var vt=s.forwardRef(function(e,t){return s.createElement(qt,ve({},e,{ref:t,sideCar:hu}))});vt.classNames=qt.classNames;var vu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,Tt=new WeakMap,Mt={},Pn=0,Xr=function(e){return e&&(e.host||Xr(e.parentNode))},gu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Xr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wu=function(e,t,n,o){var r=gu(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var a=Mt[n],i=[],c=new Set,u=new Set(r),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(c.has(h))f(h);else try{var g=h.getAttribute(o),w=g!==null&&g!=="false",m=(Ge.get(h)||0)+1,v=(a.get(h)||0)+1;Ge.set(h,m),a.set(h,v),i.push(h),m===1&&w&&Tt.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),c.clear(),Pn++,function(){i.forEach(function(p){var h=Ge.get(p)-1,g=a.get(p)-1;Ge.set(p,h),a.set(p,g),h||(Tt.has(p)||p.removeAttribute(o),Tt.delete(p)),g||p.removeAttribute(n)}),Pn--,Pn||(Ge=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Mt={})}},Xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=vu(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),wu(o,r,n,"aria-hidden")):function(){return null}},Zt="Dialog",[Zr]=pe(Zt),[xu,me]=Zr(Zt),Qr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Zt});return l.jsx(xu,{scope:t,triggerRef:c,contentRef:u,contentId:ue(),titleId:ue(),descriptionId:ue(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Qr.displayName=Zt;var Jr="DialogTrigger",es=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(Jr,n),a=H(t,r.triggerRef);return l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":to(r.open),...o,ref:a,onClick:S(e.onClick,r.onOpenToggle)})});es.displayName=Jr;var Jn="DialogPortal",[yu,ts]=Zr(Jn,{forceMount:void 0}),ns=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=me(Jn,t);return l.jsx(yu,{scope:t,forceMount:n,children:s.Children.map(o,i=>l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:i})}))})};ns.displayName=Jn;var jt="DialogOverlay",os=s.forwardRef((e,t)=>{const n=ts(jt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(jt,e.__scopeDialog);return a.modal?l.jsx(oe,{present:o||a.open,children:l.jsx(bu,{...r,ref:t})}):null});os.displayName=jt;var Cu=De("DialogOverlay.RemoveScroll"),bu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(jt,n);return l.jsx(vt,{as:Cu,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(k.div,{"data-state":to(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),je="DialogContent",rs=s.forwardRef((e,t)=>{const n=ts(je,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(je,e.__scopeDialog);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(Eu,{...r,ref:t}):l.jsx(Ru,{...r,ref:t})})});rs.displayName=je;var Eu=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return Xt(a)},[]),l.jsx(ss,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault())})}),Ru=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(ss,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),ss=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,c=me(je,n),u=s.useRef(null),d=H(t,u);return Yt(),l.jsxs(l.Fragment,{children:[l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":to(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(_u,{titleId:c.titleId}),l.jsx(Tu,{contentRef:u,descriptionId:c.descriptionId})]})]})}),eo="DialogTitle",as=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(eo,n);return l.jsx(k.h2,{id:r.titleId,...o,ref:t})});as.displayName=eo;var is="DialogDescription",Su=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(is,n);return l.jsx(k.p,{id:r.descriptionId,...o,ref:t})});Su.displayName=is;var cs="DialogClose",ls=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(cs,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});ls.displayName=cs;function to(e){return e?"open":"closed"}var us="DialogTitleWarning",[yv,ds]=Uc(us,{contentName:je,titleName:eo,docsSlug:"dialog"}),_u=({titleId:e})=>{const t=ds(us),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},hu=0,Ue=[];function vu(e){var t=s.useRef([]),n=s.useRef([0,0]),o=s.useRef(),r=s.useState(hu++)[0],a=s.useState(zr)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=jl([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Pt(m),x=n.current,C="deltaX"in m?m.deltaX:x[0]-y[0],b="deltaY"in m?m.deltaY:x[1]-y[1],E,T=m.target,S=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in m&&S==="h"&&T.type==="range")return!1;var A=Fo(S,T);if(!A)return!0;if(A?E=S:(E=S==="v"?"h":"v",A=Fo(S,T)),!A)return!1;if(!o.current&&"changedTouches"in m&&(C||b)&&(o.current=E),!E)return!0;var L=o.current||E;return fu(L,v,m,L==="h"?C:b)},[]),u=s.useCallback(function(m){var v=m;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in v?$o(v):Pt(v),x=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&pu(E.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(E){return E.contains(v.target)}),b=C.length>0?c(v,C[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=s.useCallback(function(m,v,y,x){var C={name:m,delta:v,target:y,should:x,shadowParent:gu(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),f=s.useCallback(function(m){n.current=Pt(m),o.current=void 0},[]),p=s.useCallback(function(m){d(m.type,$o(m),m.target,c(m,e.lockRef.current))},[]),h=s.useCallback(function(m){d(m.type,Pt(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ke),document.addEventListener("touchmove",u,Ke),document.addEventListener("touchstart",f,Ke),function(){Ue=Ue.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,Ke),document.removeEventListener("touchmove",u,Ke),document.removeEventListener("touchstart",f,Ke)}},[]);var g=e.removeScrollBar,w=e.inert;return s.createElement(s.Fragment,null,w?s.createElement(a,{styles:mu(r)}):null,g?s.createElement(su,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wu=Gl(Gr,vu);var vt=s.forwardRef(function(e,t){return s.createElement(qt,ve({},e,{ref:t,sideCar:wu}))});vt.classNames=qt.classNames;var xu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,Tt=new WeakMap,Mt={},Pn=0,Zr=function(e){return e&&(e.host||Zr(e.parentNode))},yu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Zr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Cu=function(e,t,n,o){var r=yu(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var a=Mt[n],i=[],c=new Set,u=new Set(r),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(c.has(h))f(h);else try{var g=h.getAttribute(o),w=g!==null&&g!=="false",m=(Ge.get(h)||0)+1,v=(a.get(h)||0)+1;Ge.set(h,m),a.set(h,v),i.push(h),m===1&&w&&Tt.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),c.clear(),Pn++,function(){i.forEach(function(p){var h=Ge.get(p)-1,g=a.get(p)-1;Ge.set(p,h),a.set(p,g),h||(Tt.has(p)||p.removeAttribute(o),Tt.delete(p)),g||p.removeAttribute(n)}),Pn--,Pn||(Ge=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Mt={})}},Xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=xu(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Cu(o,r,n,"aria-hidden")):function(){return null}},Zt="Dialog",[Qr]=pe(Zt),[bu,me]=Qr(Zt),Jr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Zt});return l.jsx(bu,{scope:t,triggerRef:c,contentRef:u,contentId:ue(),titleId:ue(),descriptionId:ue(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Jr.displayName=Zt;var es="DialogTrigger",ts=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(es,n),a=H(t,r.triggerRef);return l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":to(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)})});ts.displayName=es;var Jn="DialogPortal",[Eu,ns]=Qr(Jn,{forceMount:void 0}),os=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=me(Jn,t);return l.jsx(Eu,{scope:t,forceMount:n,children:s.Children.map(o,i=>l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:i})}))})};os.displayName=Jn;var Lt="DialogOverlay",rs=s.forwardRef((e,t)=>{const n=ns(Lt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(Lt,e.__scopeDialog);return a.modal?l.jsx(oe,{present:o||a.open,children:l.jsx(Ru,{...r,ref:t})}):null});rs.displayName=Lt;var Su=De("DialogOverlay.RemoveScroll"),Ru=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(Lt,n);return l.jsx(vt,{as:Su,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(k.div,{"data-state":to(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Le="DialogContent",ss=s.forwardRef((e,t)=>{const n=ns(Le,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(Le,e.__scopeDialog);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(_u,{...r,ref:t}):l.jsx(Pu,{...r,ref:t})})});ss.displayName=Le;var _u=s.forwardRef((e,t)=>{const n=me(Le,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return Xt(a)},[]),l.jsx(as,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault())})}),Pu=s.forwardRef((e,t)=>{const n=me(Le,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(as,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),as=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,c=me(Le,n),u=s.useRef(null),d=H(t,u);return Yt(),l.jsxs(l.Fragment,{children:[l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":to(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Mu,{titleId:c.titleId}),l.jsx(Iu,{contentRef:u,descriptionId:c.descriptionId})]})]})}),eo="DialogTitle",is=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(eo,n);return l.jsx(k.h2,{id:r.titleId,...o,ref:t})});is.displayName=eo;var cs="DialogDescription",Tu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(cs,n);return l.jsx(k.p,{id:r.descriptionId,...o,ref:t})});Tu.displayName=cs;var ls="DialogClose",us=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(ls,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});us.displayName=ls;function to(e){return e?"open":"closed"}var ds="DialogTitleWarning",[Ev,fs]=Yc(ds,{contentName:Le,titleName:eo,docsSlug:"dialog"}),Mu=({titleId:e})=>{const t=fs(ds),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Pu="DialogDescriptionWarning",Tu=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ds(Pu).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Mu=Qr,Au=es,Iu=ns,Nu=os,Ou=rs,ku=as,Du=ls;const ju="_dialogOverlay_1qzfk_1",Lu="_dialogContent_1qzfk_20",Fu="_dialogCloseButton_1qzfk_65",$u="_dialogTitle_1qzfk_72",At={dialogOverlay:ju,dialogContent:Lu,dialogCloseButton:Fu,dialogTitle:$u},Bu=["sm","md","lg"],Wu=({trigger:e,children:t,title:n,size:o="md",...r})=>l.jsxs(Mu,{...r,children:[l.jsx(Au,{asChild:!0,children:e}),l.jsxs(Iu,{children:[l.jsx(Nu,{className:`${At.dialogOverlay}`}),l.jsxs(Ou,{className:At.dialogContent,"data-size":o,onPointerDownOutside:a=>{a?.preventDefault()},children:[l.jsx(Du,{asChild:!0,children:l.jsx(mt,{className:`${At.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:l.jsx(qn,{})})}),l.jsx(ku,{className:At.dialogTitle,children:n}),t]})]})]}),Hu="_emptyState_nzjhq_1",Vu={emptyState:Hu},Ku=({title:e,description:t,...n})=>l.jsxs("div",{className:Vu.emptyState,...n,children:[l.jsx("h2",{className:"header-2",children:e}),t&&l.jsx("p",{className:"subtitle-2",children:t})]}),Uu="_container_swxkv_1",Gu="_label_swxkv_8",zu="_inputWrapper_swxkv_15",Yu="_input_swxkv_15",qu="_startIcon_swxkv_68",Xu="_endIcon_swxkv_69",Zu="_error_swxkv_88",Qu="_helperText_swxkv_94",Se={container:Uu,label:Gu,inputWrapper:zu,input:Yu,startIcon:qu,endIcon:Xu,error:Zu,helperText:Qu},fs=O.forwardRef(({className:e,label:t,error:n,helperText:o,startIcon:r,endIcon:a,id:i,...c},u)=>{const d=O.useId(),f=i||d,p=o?`${f}-helper-text`:void 0,h=n?`${f}-error`:void 0,g=r?Ze[r]:void 0,w=a?Ze[a]:void 0;return l.jsxs("div",{className:`${Se.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:f,className:Se.label,children:t}),l.jsxs("div",{className:Se.inputWrapper,children:[g&&l.jsx("div",{className:Se.startIcon,children:l.jsx(g,{size:"md"})}),l.jsx("input",{ref:u,id:f,className:Se.input,"aria-invalid":!!n,"aria-describedby":h||p,"data-has-start-icon":!!r,"data-has-end-icon":!!a,"data-has-error":!!n,...c}),w&&l.jsx("div",{className:Se.endIcon,children:l.jsx(w,{size:"md"})})]}),n&&l.jsx("span",{id:h,className:Se.error,children:n}),o&&!n&&l.jsx("span",{id:p,className:Se.helperText,children:o})]})});fs.displayName="Input";function Qt(e){const t=e+"CollectionProvider",[n,o]=pe(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:y}=m,x=O.useRef(null),C=O.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=De(c),d=O.forwardRef((m,v)=>{const{scope:y,children:x}=m,C=a(c,y),b=H(v,C.collectionRef);return l.jsx(u,{ref:b,children:x})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=De(f),g=O.forwardRef((m,v)=>{const{scope:y,children:x,...C}=m,b=O.useRef(null),E=H(v,b),T=a(f,y);return O.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),l.jsx(h,{[p]:"",ref:E,children:x})});g.displayName=f;function w(m){const v=a(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,R)=>C.indexOf(T.ref.current)-C.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},w,o]}var Ju=s.createContext(void 0);function no(e){const t=s.useContext(Ju);return e||t||"ltr"}const ed=["top","right","bottom","left"],Te=Math.min,se=Math.max,Lt=Math.round,It=Math.floor,we=e=>({x:e,y:e}),td={left:"right",right:"left",bottom:"top",top:"bottom"},nd={start:"end",end:"start"};function kn(e,t,n){return se(e,Te(t,n))}function Ee(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function oo(e){return e==="x"?"y":"x"}function ro(e){return e==="y"?"height":"width"}const od=new Set(["top","bottom"]);function ge(e){return od.has(Re(e))?"y":"x"}function so(e){return oo(ge(e))}function rd(e,t,n){n===void 0&&(n=!1);const o=tt(e),r=so(e),a=ro(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ft(i)),[i,Ft(i)]}function sd(e){const t=Ft(e);return[Dn(e),t,Dn(t)]}function Dn(e){return e.replace(/start|end/g,t=>nd[t])}const Wo=["left","right"],Ho=["right","left"],ad=["top","bottom"],id=["bottom","top"];function cd(e,t,n){switch(e){case"top":case"bottom":return n?t?Ho:Wo:t?Wo:Ho;case"left":case"right":return t?ad:id;default:return[]}}function ld(e,t,n,o){const r=tt(e);let a=cd(Re(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(Dn)))),a}function Ft(e){return e.replace(/left|right|bottom|top/g,t=>td[t])}function ud(e){return{top:0,right:0,bottom:0,left:0,...e}}function ps(e){return typeof e!="number"?ud(e):{top:e,right:e,bottom:e,left:e}}function $t(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Vo(e,t,n){let{reference:o,floating:r}=e;const a=ge(t),i=so(t),c=ro(i),u=Re(t),d=a==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let g;switch(u){case"top":g={x:f,y:o.y-r.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(tt(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const dd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Vo(d,o,u),h=o,g={},w=0;for(let m=0;m<c.length;m++){const{name:v,fn:y}=c[m],{x,y:C,data:b,reset:E}=await y({x:f,y:p,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,g={...g,[v]:{...g[v],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=Vo(d,h,u)),m=-1)}return{x:f,y:p,placement:h,strategy:r,middlewareData:g}};async function ct(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=Ee(t,e),w=ps(g),v=c[h?p==="floating"?"reference":"floating":p],y=$t(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(c.floating)),boundary:d,rootBoundary:f,strategy:u})),x=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),b=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=$t(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:C,strategy:u}):x);return{top:(y.top-E.top+w.top)/b.y,bottom:(E.bottom-y.bottom+w.bottom)/b.y,left:(y.left-E.left+w.left)/b.x,right:(E.right-y.right+w.right)/b.x}}const fd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:f=0}=Ee(e,t)||{};if(d==null)return{};const p=ps(f),h={x:n,y:o},g=so(r),w=ro(g),m=await i.getDimensions(d),v=g==="y",y=v?"top":"left",x=v?"bottom":"right",C=v?"clientHeight":"clientWidth",b=a.reference[w]+a.reference[g]-h[g]-a.floating[w],E=h[g]-a.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let R=T?T[C]:0;(!R||!await(i.isElement==null?void 0:i.isElement(T)))&&(R=c.floating[C]||a.floating[w]);const A=b/2-E/2,j=R/2-m[w]/2-1,D=Te(p[y],j),L=Te(p[x],j),B=D,W=R-m[w]-L,P=R/2-m[w]/2+A,$=kn(B,P,W),N=!u.arrow&&tt(r)!=null&&P!==$&&a.reference[w]/2-(P<B?D:L)-m[w]/2<0,F=N?P<B?P-B:P-W:0;return{[g]:h[g]+F,data:{[g]:$,centerOffset:P-$-F,...N&&{alignmentOffset:F}},reset:N}}}),pd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Ee(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Re(r),x=ge(c),C=Re(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!m?[Ft(c)]:sd(c)),T=w!=="none";!h&&T&&E.push(...ld(c,m,w,b));const R=[c,...E],A=await ct(t,v),j=[];let D=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&j.push(A[y]),p){const P=rd(r,i,b);j.push(A[P[0]],A[P[1]])}if(D=[...D,{placement:r,overflows:j}],!j.every(P=>P<=0)){var L,B;const P=(((L=a.flip)==null?void 0:L.index)||0)+1,$=R[P];if($&&(!(p==="alignment"?x!==ge($):!1)||D.every(I=>ge(I.placement)===x?I.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let N=(B=D.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(g){case"bestFit":{var W;const F=(W=D.filter(I=>{if(T){const _=ge(I.placement);return _===x||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];F&&(N=F);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return ed.some(t=>e[t]>=0)}const md=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ee(e,t);switch(o){case"referenceHidden":{const a=await ct(t,{...r,elementContext:"reference"}),i=Ko(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const a=await ct(t,{...r,altBoundary:!0}),i=Ko(a,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}},ms=new Set(["left","top"]);async function hd(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Re(n),c=tt(n),u=ge(n)==="y",d=ms.has(i)?-1:1,f=a&&u?-1:1,p=Ee(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(g=c==="end"?w*-1:w),u?{x:g*f,y:h*d}:{x:h*d,y:g*f}}const vd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:c}=t,u=await hd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:i}}}}},gd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...u}=Ee(e,t),d={x:n,y:o},f=await ct(t,u),p=ge(Re(r)),h=oo(p);let g=d[h],w=d[p];if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+f[v],C=g-f[y];g=kn(x,g,C)}if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=w+f[v],C=w-f[y];w=kn(x,w,C)}const m=c.fn({...t,[h]:g,[p]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:a,[p]:i}}}}}},wd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ee(e,t),f={x:n,y:o},p=ge(r),h=oo(p);let g=f[h],w=f[p];const m=Ee(c,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=h==="y"?"height":"width",b=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;g<b?g=b:g>E&&(g=E)}if(d){var y,x;const C=h==="y"?"width":"height",b=ms.has(Re(r)),E=a.reference[p]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[p])||0)+(b?0:v.crossAxis),T=a.reference[p]+a.reference[C]+(b?0:((x=i.offset)==null?void 0:x[p])||0)-(b?v.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:g,[p]:w}}}},xd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ee(e,t),f=await ct(t,d),p=Re(r),h=tt(r),g=ge(r)==="y",{width:w,height:m}=a.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=p,v=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,C=w-f.left-f.right,b=Te(m-f[v],x),E=Te(w-f[y],C),T=!t.middlewareData.shift;let R=b,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=x),T&&!h){const D=se(f.left,0),L=se(f.right,0),B=se(f.top,0),W=se(f.bottom,0);g?A=w-2*(D!==0||L!==0?D+L:se(f.left,f.right)):R=m-2*(B!==0||W!==0?B+W:se(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:R});const j=await i.getDimensions(c.floating);return w!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function nt(e){return hs(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(hs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hs(e){return Jt()?e instanceof Node||e instanceof ae(e).Node:!1}function de(e){return Jt()?e instanceof Element||e instanceof ae(e).Element:!1}function xe(e){return Jt()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function Go(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}const yd=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!yd.has(r)}const Cd=new Set(["table","td","th"]);function bd(e){return Cd.has(nt(e))}const Ed=[":popover-open",":modal"];function en(e){return Ed.some(t=>{try{return e.matches(t)}catch{return!1}})}const Rd=["transform","translate","scale","rotate","perspective"],Sd=["transform","translate","scale","rotate","perspective","filter"],_d=["paint","layout","strict","content"];function ao(e){const t=io(),n=de(e)?fe(e):e;return Rd.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Sd.some(o=>(n.willChange||"").includes(o))||_d.some(o=>(n.contain||"").includes(o))}function Pd(e){let t=Me(e);for(;xe(t)&&!Qe(t);){if(ao(t))return t;if(en(t))return null;t=Me(t)}return null}function io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Td=new Set(["html","body","#document"]);function Qe(e){return Td.has(nt(e))}function fe(e){return ae(e).getComputedStyle(e)}function tn(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Go(e)&&e.host||ye(e);return Go(t)?t.host:t}function vs(e){const t=Me(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&gt(t)?t:vs(t)}function lt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=vs(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(a){const c=jn(i);return t.concat(i,i.visualViewport||[],gt(r)?r:[],c&&n?lt(c):[])}return t.concat(r,lt(r,[],n))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gs(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=xe(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Lt(n)!==a||Lt(o)!==i;return c&&(n=a,o=i),{width:n,height:o,$:c}}function co(e){return de(e)?e:e.contextElement}function Xe(e){const t=co(e);if(!xe(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=gs(t);let i=(a?Lt(n.width):n.width)/o,c=(a?Lt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Md=we(0);function ws(e){const t=ae(e);return!io()||!t.visualViewport?Md:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ad(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function Le(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=co(e);let i=we(1);t&&(o?de(o)&&(i=Xe(o)):i=Xe(e));const c=Ad(a,n,o)?ws(a):we(0);let u=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(a){const h=ae(a),g=o&&de(o)?ae(o):o;let w=h,m=jn(w);for(;m&&o&&g!==w;){const v=Xe(m),y=m.getBoundingClientRect(),x=fe(m),C=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,p*=v.y,u+=C,d+=b,w=ae(m),m=jn(w)}}return $t({width:f,height:p,x:u,y:d})}function nn(e,t){const n=tn(e).scrollLeft;return t?t.left+n:Le(ye(e)).left+n}function xs(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-nn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Id(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=ye(o),c=t?en(t.floating):!1;if(o===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=we(1);const f=we(0),p=xe(o);if((p||!p&&!a)&&((nt(o)!=="body"||gt(i))&&(u=tn(o)),xe(o))){const g=Le(o);d=Xe(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const h=i&&!p&&!a?xs(i,u):we(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function Nd(e){return Array.from(e.getClientRects())}function Od(e){const t=ye(e),n=tn(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+nn(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:c}}const zo=25;function kd(e,t){const n=ae(e),o=ye(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,c=0,u=0;if(r){a=r.width,i=r.height;const f=io();(!f||f&&t==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}const d=nn(o);if(d<=0){const f=o.ownerDocument,p=f.body,h=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-g);w<=zo&&(a-=w)}else d<=zo&&(a+=d);return{width:a,height:i,x:c,y:u}}const Dd=new Set(["absolute","fixed"]);function jd(e,t){const n=Le(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=xe(e)?Xe(e):we(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,u=r*a.x,d=o*a.y;return{width:i,height:c,x:u,y:d}}function Yo(e,t,n){let o;if(t==="viewport")o=kd(e,n);else if(t==="document")o=Od(ye(e));else if(de(t))o=jd(t,n);else{const r=ws(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $t(o)}function ys(e,t){const n=Me(e);return n===t||!de(n)||Qe(n)?!1:fe(n).position==="fixed"||ys(n,t)}function Ld(e,t){const n=t.get(e);if(n)return n;let o=lt(e,[],!1).filter(c=>de(c)&&nt(c)!=="body"),r=null;const a=fe(e).position==="fixed";let i=a?Me(e):e;for(;de(i)&&!Qe(i);){const c=fe(i),u=ao(i);!u&&c.position==="fixed"&&(r=null),(a?!u&&!r:!u&&c.position==="static"&&!!r&&Dd.has(r.position)||gt(i)&&!u&&ys(e,i))?o=o.filter(f=>f!==i):r=c,i=Me(i)}return t.set(e,o),o}function Fd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?en(t)?[]:Ld(t,this._c):[].concat(n),o],c=i[0],u=i.reduce((d,f)=>{const p=Yo(t,f,r);return d.top=se(p.top,d.top),d.right=Te(p.right,d.right),d.bottom=Te(p.bottom,d.bottom),d.left=se(p.left,d.left),d},Yo(t,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function $d(e){const{width:t,height:n}=gs(e);return{width:t,height:n}}function Bd(e,t,n){const o=xe(t),r=ye(t),a=n==="fixed",i=Le(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=we(0);function d(){u.x=nn(r)}if(o||!o&&!a)if((nt(t)!=="body"||gt(r))&&(c=tn(t)),o){const g=Le(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else r&&d();a&&!o&&r&&d();const f=r&&!o&&!a?xs(r,c):we(0),p=i.left+c.scrollLeft-u.x-f.x,h=i.top+c.scrollTop-u.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function Tn(e){return fe(e).position==="static"}function qo(e,t){if(!xe(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Cs(e,t){const n=ae(e);if(en(e))return n;if(!xe(e)){let r=Me(e);for(;r&&!Qe(r);){if(de(r)&&!Tn(r))return r;r=Me(r)}return n}let o=qo(e,t);for(;o&&bd(o)&&Tn(o);)o=qo(o,t);return o&&Qe(o)&&Tn(o)&&!ao(o)?n:o||Pd(e)||n}const Wd=async function(e){const t=this.getOffsetParent||Cs,n=this.getDimensions,o=await n(e.floating);return{reference:Bd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Hd(e){return fe(e).direction==="rtl"}const Vd={convertOffsetParentRelativeRectToViewportRelativeRect:Id,getDocumentElement:ye,getClippingRect:Fd,getOffsetParent:Cs,getElementRects:Wd,getClientRects:Nd,getDimensions:$d,getScale:Xe,isElement:de,isRTL:Hd};function bs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kd(e,t){let n=null,o;const r=ye(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:h,height:g}=d;if(c||t(),!h||!g)return;const w=It(p),m=It(r.clientWidth-(f+h)),v=It(r.clientHeight-(p+g)),y=It(f),C={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let b=!0;function E(T){const R=T[0].intersectionRatio;if(R!==u){if(!b)return i();R?i(!1,R):o=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!bs(d,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function Ud(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=co(e),f=r||a?[...d?lt(d):[],...lt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&c?Kd(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let w,m=u?Le(e):null;u&&v();function v(){const y=Le(e);m&&!bs(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),p?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(w)}}const Gd=vd,zd=gd,Yd=pd,qd=xd,Xd=md,Xo=fd,Zd=wd,Qd=(e,t,n)=>{const o=new Map,r={platform:Vd,...n},a={...r.platform,_c:o};return dd(e,t,{...r,platform:a})};var Jd=typeof document<"u",ef=function(){},Dt=Jd?O.useLayoutEffect:ef;function Bt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Bt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!Bt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Es(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=Es(e);return Math.round(t*n)/n}function Mn(e){const t=s.useRef(e);return Dt(()=>{t.current=e}),t}function tf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=s.useState(o);Bt(h,o)||g(o);const[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useCallback(I=>{I!==T.current&&(T.current=I,m(I))},[]),C=s.useCallback(I=>{I!==R.current&&(R.current=I,y(I))},[]),b=a||w,E=i||v,T=s.useRef(null),R=s.useRef(null),A=s.useRef(f),j=u!=null,D=Mn(u),L=Mn(r),B=Mn(d),W=s.useCallback(()=>{if(!T.current||!R.current)return;const I={placement:t,strategy:n,middleware:h};L.current&&(I.platform=L.current),Qd(T.current,R.current,I).then(_=>{const z={..._,isPositioned:B.current!==!1};P.current&&!Bt(A.current,z)&&(A.current=z,pt.flushSync(()=>{p(z)}))})},[h,t,n,L,B]);Dt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[d]);const P=s.useRef(!1);Dt(()=>(P.current=!0,()=>{P.current=!1}),[]),Dt(()=>{if(b&&(T.current=b),E&&(R.current=E),b&&E){if(D.current)return D.current(b,E,W);W()}},[b,E,W,D,j]);const $=s.useMemo(()=>({reference:T,floating:R,setReference:x,setFloating:C}),[x,C]),N=s.useMemo(()=>({reference:b,floating:E}),[b,E]),F=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!N.floating)return I;const _=Zo(N.floating,f.x),z=Zo(N.floating,f.y);return c?{...I,transform:"translate("+_+"px, "+z+"px)",...Es(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,c,N.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:W,refs:$,elements:N,floatingStyles:F}),[f,W,$,N,F])}const nf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Xo({element:o.current,padding:r}).fn(n):{}:o?Xo({element:o,padding:r}).fn(n):{}}}},of=(e,t)=>({...Gd(e),options:[e,t]}),rf=(e,t)=>({...zd(e),options:[e,t]}),sf=(e,t)=>({...Zd(e),options:[e,t]}),af=(e,t)=>({...Yd(e),options:[e,t]}),cf=(e,t)=>({...qd(e),options:[e,t]}),lf=(e,t)=>({...Xd(e),options:[e,t]}),uf=(e,t)=>({...nf(e),options:[e,t]});var df="Arrow",Rs=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return l.jsx(k.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rs.displayName=df;var ff=Rs,lo="Popper",[Ss,Ae]=pe(lo),[pf,_s]=Ss(lo),Ps=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return l.jsx(pf,{scope:t,anchor:o,onAnchorChange:r,children:n})};Ps.displayName=lo;var Ts="PopperAnchor",Ms=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=_s(Ts,n),i=s.useRef(null),c=H(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=o?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),o?null:l.jsx(k.div,{...r,ref:c})});Ms.displayName=Ts;var uo="PopperContent",[mf,hf]=Ss(uo),As=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=_s(uo,n),[y,x]=s.useState(null),C=H(t,M=>x(M)),[b,E]=s.useState(null),T=Mr(b),R=T?.width??0,A=T?.height??0,j=o+(a!=="center"?"-"+a:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(d)?d:[d],B=L.length>0,W={padding:D,boundary:L.filter(gf),altBoundary:B},{refs:P,floatingStyles:$,placement:N,isPositioned:F,middlewareData:I}=tf({strategy:"fixed",placement:j,whileElementsMounted:(...M)=>Ud(...M,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[of({mainAxis:r+A,alignmentAxis:i}),u&&rf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?sf():void 0,...W}),u&&af({...W}),cf({...W,apply:({elements:M,rects:K,availableWidth:J,availableHeight:U})=>{const{width:G,height:Y}=K.reference,ie=M.floating.style;ie.setProperty("--radix-popper-available-width",`${J}px`),ie.setProperty("--radix-popper-available-height",`${U}px`),ie.setProperty("--radix-popper-anchor-width",`${G}px`),ie.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),b&&uf({element:b,padding:c}),wf({arrowWidth:R,arrowHeight:A}),h&&lf({strategy:"referenceHidden",...W})]}),[_,z]=Os(N),q=ne(w);X(()=>{F&&q?.()},[F,q]);const Z=I.arrow?.x,te=I.arrow?.y,Q=I.arrow?.centerOffset!==0,[Ce,re]=s.useState();return X(()=>{y&&re(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:F?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(mf,{scope:n,placedSide:_,onArrowChange:E,arrowX:Z,arrowY:te,shouldHideArrow:Q,children:l.jsx(k.div,{"data-side":_,"data-align":z,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});As.displayName=uo;var Is="PopperArrow",vf={top:"bottom",right:"left",bottom:"top",left:"right"},Ns=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=hf(Is,o),i=vf[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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(ff,{...r,ref:n,style:{...r.style,display:"block"}})})});Ns.displayName=Is;function gf(e){return e!==null}var wf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=Os(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,g=(r.arrow?.y??0)+u/2;let w="",m="";return d==="bottom"?(w=i?p:`${h}px`,m=`${-u}px`):d==="top"?(w=i?p:`${h}px`,m=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,m=i?p:`${g}px`):d==="left"&&(w=`${o.floating.width+u}px`,m=i?p:`${g}px`),{data:{x:w,y:m}}}});function Os(e){const[t,n="center"]=e.split("-");return[t,n]}var on=Ps,wt=Ms,rn=As,sn=Ns,An="rovingFocusGroup.onEntryFocus",xf={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[Ln,ks,yf]=Qt(xt),[Cf,Ds]=pe(xt,[yf]),[bf,Ef]=Cf(xt),js=s.forwardRef((e,t)=>l.jsx(Ln.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ln.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Rf,{...e,ref:t})})}));js.displayName=xt;var Rf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=s.useRef(null),g=H(t,h),w=no(a),[m,v]=be({prop:i,defaultProp:c??null,onChange:u,caller:xt}),[y,x]=s.useState(!1),C=ne(d),b=ks(n),E=s.useRef(!1),[T,R]=s.useState(0);return s.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(An,C),()=>A.removeEventListener(An,C)},[C]),l.jsx(bf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(A=>v(A),[v]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:s.useCallback(()=>R(A=>A-1),[]),children:l.jsx(k.div,{tabIndex:y||T===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{E.current=!0}),onFocus:S(e.onFocus,A=>{const j=!E.current;if(A.target===A.currentTarget&&j&&!y){const D=new CustomEvent(An,xf);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=b().filter(N=>N.focusable),B=L.find(N=>N.active),W=L.find(N=>N.id===m),$=[B,W,...L].filter(Boolean).map(N=>N.ref.current);$s($,f)}}E.current=!1}),onBlur:S(e.onBlur,()=>x(!1))})})}),Ls="RovingFocusGroupItem",Fs=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,children:i,...c}=e,u=ue(),d=a||u,f=Ef(Ls,n),p=f.currentTabStopId===d,h=ks(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=f;return s.useEffect(()=>{if(o)return g(),()=>w()},[o,g,w]),l.jsx(Ln.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(k.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:S(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:S(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Pf(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=h().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const b=C.indexOf(v.currentTarget);C=f.loop?Tf(C,b+1):C.slice(b+1)}setTimeout(()=>$s(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});Fs.displayName=Ls;var Sf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _f(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Pf(e,t,n){const o=_f(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Sf[o]}function $s(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Tf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Mf=js,Af=Fs,Fn=["Enter"," "],If=["ArrowDown","PageUp","Home"],Bs=["ArrowUp","PageDown","End"],Nf=[...If,...Bs],Of={ltr:[...Fn,"ArrowRight"],rtl:[...Fn,"ArrowLeft"]},kf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yt="Menu",[ut,Df,jf]=Qt(yt),[He,Ws]=pe(yt,[jf,Ae,Ds]),an=Ae(),Hs=Ds(),[Lf,Ve]=He(yt),[Ff,Ct]=He(yt),Vs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=an(t),[u,d]=s.useState(null),f=s.useRef(!1),p=ne(a),h=no(r);return s.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(on,{...c,children:l.jsx(Lf,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(Ff,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:i,children:o})})})};Vs.displayName=yt;var $f="MenuAnchor",fo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(wt,{...r,...o,ref:t})});fo.displayName=$f;var po="MenuPortal",[Bf,Ks]=He(po,{forceMount:void 0}),Us=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ve(po,t);return l.jsx(Bf,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Us.displayName=po;var ce="MenuContent",[Wf,mo]=He(ce),Gs=s.forwardRef((e,t)=>{const n=Ks(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(Hf,{...r,ref:t}):l.jsx(Vf,{...r,ref:t})})})})}),Hf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return Xt(a)},[]),l.jsx(ho,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Vf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu);return l.jsx(ho,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Kf=De("MenuContent.ScrollLock"),ho=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Ve(ce,n),y=Ct(ce,n),x=an(n),C=Hs(n),b=Df(n),[E,T]=s.useState(null),R=s.useRef(null),A=H(t,R,v.onContentChange),j=s.useRef(0),D=s.useRef(""),L=s.useRef(0),B=s.useRef(null),W=s.useRef("right"),P=s.useRef(0),$=w?vt:s.Fragment,N=w?{as:Kf,allowPinchZoom:!0}:void 0,F=_=>{const z=D.current+_,q=b().filter(M=>!M.disabled),Z=document.activeElement,te=q.find(M=>M.ref.current===Z)?.textValue,Q=q.map(M=>M.textValue),Ce=np(Q,z,te),re=q.find(M=>M.textValue===Ce)?.ref.current;(function M(K){D.current=K,window.clearTimeout(j.current),K!==""&&(j.current=window.setTimeout(()=>M(""),1e3))})(z),re&&setTimeout(()=>re.focus())};s.useEffect(()=>()=>window.clearTimeout(j.current),[]),Yt();const I=s.useCallback(_=>W.current===B.current?.side&&rp(_,B.current?.area),[]);return l.jsx(Wf,{scope:n,searchRef:D,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(R.current?.focus(),T(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback(_=>{B.current=_},[]),children:l.jsx($,{...N,children:l.jsx(ht,{asChild:!0,trapped:r,onMountAutoFocus:S(a,_=>{_.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,children:l.jsx(Mf,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:S(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(rn,{role:"menu","aria-orientation":"vertical","data-state":ca(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:S(m.onKeyDown,_=>{const q=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Z=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;q&&(_.key==="Tab"&&_.preventDefault(),!Z&&te&&F(_.key));const Q=R.current;if(_.target!==Q||!Nf.includes(_.key))return;_.preventDefault();const re=b().filter(M=>!M.disabled).map(M=>M.ref.current);Bs.includes(_.key)&&re.reverse(),ep(re)}),onBlur:S(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:S(e.onPointerMove,dt(_=>{const z=_.target,q=P.current!==_.clientX;if(_.currentTarget.contains(z)&&q){const Z=_.clientX>P.current?"right":"left";W.current=Z,P.current=_.clientX}}))})})})})})})});Gs.displayName=ce;var Uf="MenuGroup",vo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"group",...o,ref:t})});vo.displayName=Uf;var Gf="MenuLabel",zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});zs.displayName=Gf;var Wt="MenuItem",Qo="menu.itemSelect",cn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=s.useRef(null),i=Ct(Wt,e.__scopeMenu),c=mo(Wt,e.__scopeMenu),u=H(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const h=new CustomEvent(Qo,{bubbles:!0,cancelable:!0});p.addEventListener(Qo,g=>o?.(g),{once:!0}),Zn(p,h),h.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(Ys,{...r,ref:u,disabled:n,onClick:S(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:S(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,p=>{const h=c.searchRef.current!=="";n||h&&p.key===" "||Fn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});cn.displayName=Wt;var Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,i=mo(Wt,n),c=Hs(n),u=s.useRef(null),d=H(t,u),[f,p]=s.useState(!1),[h,g]=s.useState("");return s.useEffect(()=>{const w=u.current;w&&g((w.textContent??"").trim())},[a.children]),l.jsx(ut.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:l.jsx(Af,{asChild:!0,...c,focusable:!o,children:l.jsx(k.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:S(e.onPointerMove,dt(w=>{o?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,dt(w=>i.onItemLeave(w))),onFocus:S(e.onFocus,()=>p(!0)),onBlur:S(e.onBlur,()=>p(!1))})})})}),zf="MenuCheckboxItem",qs=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(ea,{scope:e.__scopeMenu,checked:n,children:l.jsx(cn,{role:"menuitemcheckbox","aria-checked":Ht(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:S(r.onSelect,()=>o?.(Ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qs.displayName=zf;var Xs="MenuRadioGroup",[Yf,qf]=He(Xs,{value:void 0,onValueChange:()=>{}}),Zs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=ne(o);return l.jsx(Yf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(vo,{...r,ref:t})})});Zs.displayName=Xs;var Qs="MenuRadioItem",Js=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=qf(Qs,e.__scopeMenu),a=n===r.value;return l.jsx(ea,{scope:e.__scopeMenu,checked:a,children:l.jsx(cn,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":wo(a),onSelect:S(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Js.displayName=Qs;var go="MenuItemIndicator",[ea,Xf]=He(go,{checked:!1}),ta=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=Xf(go,n);return l.jsx(oe,{present:o||Ht(a.checked)||a.checked===!0,children:l.jsx(k.span,{...r,ref:t,"data-state":wo(a.checked)})})});ta.displayName=go;var Zf="MenuSeparator",na=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});na.displayName=Zf;var Qf="MenuArrow",oa=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(sn,{...r,...o,ref:t})});oa.displayName=Qf;var Jf="MenuSub",[Cv,ra]=He(Jf),at="MenuSubTrigger",sa=s.forwardRef((e,t)=>{const n=Ve(at,e.__scopeMenu),o=Ct(at,e.__scopeMenu),r=ra(at,e.__scopeMenu),a=mo(at,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]),l.jsx(fo,{asChild:!0,...d,children:l.jsx(Ys,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ca(n.open),...e,ref:Gt(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,dt(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:S(e.onPointerLeave,dt(p=>{f();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,w=g==="right",m=w?-5:5,v=h[w?"left":"right"],y=h[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,p=>{const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||Of[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});sa.displayName=at;var aa="MenuSubContent",ia=s.forwardRef((e,t)=>{const n=Ks(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu),c=ra(aa,e.__scopeMenu),u=s.useRef(null),d=H(t,u);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:l.jsx(ho,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:S(e.onFocusOutside,f=>{f.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),h=kf[i.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});ia.displayName=aa;function ca(e){return e?"open":"closed"}function Ht(e){return e==="indeterminate"}function wo(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function ep(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function np(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=tp(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function op(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function rp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return op(n,t)}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sp=Vs,ap=fo,ip=Us,cp=Gs,lp=vo,up=zs,dp=cn,fp=qs,pp=Zs,mp=Js,hp=ta,vp=na,gp=oa,wp=sa,xp=ia,ln="DropdownMenu",[yp]=pe(ln,[Ws]),ee=Ws(),[Cp,la]=yp(ln),ua=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=ee(t),d=s.useRef(null),[f,p]=be({prop:r,defaultProp:a??!1,onChange:i,caller:ln});return l.jsx(Cp,{scope:t,triggerId:ue(),triggerRef:d,contentId:ue(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(h=>!h),[p]),modal:c,children:l.jsx(sp,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};ua.displayName=ln;var da="DropdownMenuTrigger",fa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=la(da,n),i=ee(n);return l.jsx(ap,{asChild:!0,...i,children:l.jsx(k.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":o?"":void 0,disabled:o,...r,ref:Gt(t,a.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});fa.displayName=da;var bp="DropdownMenuPortal",pa=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ee(t);return l.jsx(ip,{...o,...n})};pa.displayName=bp;var ma="DropdownMenuContent",ha=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=la(ma,n),a=ee(n),i=s.useRef(!1);return l.jsx(cp,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!r.modal||f)&&(i.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)"}})});ha.displayName=ma;var Ep="DropdownMenuGroup",Rp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(lp,{...r,...o,ref:t})});Rp.displayName=Ep;var Sp="DropdownMenuLabel",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(up,{...r,...o,ref:t})});_p.displayName=Sp;var Pp="DropdownMenuItem",va=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(dp,{...r,...o,ref:t})});va.displayName=Pp;var Tp="DropdownMenuCheckboxItem",Mp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(fp,{...r,...o,ref:t})});Mp.displayName=Tp;var Ap="DropdownMenuRadioGroup",Ip=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(pp,{...r,...o,ref:t})});Ip.displayName=Ap;var Np="DropdownMenuRadioItem",Op=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(mp,{...r,...o,ref:t})});Op.displayName=Np;var kp="DropdownMenuItemIndicator",Dp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(hp,{...r,...o,ref:t})});Dp.displayName=kp;var jp="DropdownMenuSeparator",Lp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(vp,{...r,...o,ref:t})});Lp.displayName=jp;var Fp="DropdownMenuArrow",ga=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(gp,{...r,...o,ref:t})});ga.displayName=Fp;var $p="DropdownMenuSubTrigger",Bp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(wp,{...r,...o,ref:t})});Bp.displayName=$p;var Wp="DropdownMenuSubContent",Hp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(xp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hp.displayName=Wp;var Vp=ua,Kp=fa,Up=pa,Gp=ha,zp=va,Yp=ga;const qp="_menuButtonContent_gcc8s_1",Xp="_menuButtonItem_gcc8s_13",Zp="_menuButtonItemLabel_gcc8s_41",Qp="_menuButtonArrow_gcc8s_46",Vt={menuButtonContent:qp,menuButtonItem:Xp,menuButtonItemLabel:Zp,menuButtonArrow:Qp},Jp=({children:e,trigger:t,...n})=>l.jsxs(Vp,{modal:!1,...n,children:[l.jsx(Kp,{asChild:!0,children:t}),l.jsx(Up,{children:l.jsxs(Gp,{align:"end",className:Vt.menuButtonContent,sideOffset:5,children:[e,l.jsx(Yp,{className:Vt.menuButtonArrow})]})})]}),em=({children:e,icon:t,...n})=>{const o=t?Ze[t]:void 0;return l.jsxs(zp,{className:Vt.menuButtonItem,...n,children:[o&&l.jsx(o,{size:"md",className:"text-color-secondary"}),l.jsx("label",{className:`label-3 text-color-secondary ${Vt.menuButtonItemLabel}`,children:e})]})};var un="Popover",[wa]=pe(un,[Ae]),bt=Ae(),[tm,Ie]=wa(un),xa=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!1}=e,c=bt(t),u=s.useRef(null),[d,f]=s.useState(!1),[p,h]=be({prop:o,defaultProp:r??!1,onChange:a,caller:un});return l.jsx(on,{...c,children:l.jsx(tm,{scope:t,contentId:ue(),triggerRef:u,open:p,onOpenChange:h,onOpenToggle:s.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>f(!0),[]),onCustomAnchorRemove:s.useCallback(()=>f(!1),[]),modal:i,children:n})})};xa.displayName=un;var ya="PopoverAnchor",nm=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(ya,n),a=bt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(wt,{...a,...o,ref:t})});nm.displayName=ya;var Ca="PopoverTrigger",ba=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(Ca,n),a=bt(n),i=H(t,r.triggerRef),c=l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ma(r.open),...o,ref:i,onClick:S(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:l.jsx(wt,{asChild:!0,...a,children:c})});ba.displayName=Ca;var xo="PopoverPortal",[om,rm]=wa(xo,{forceMount:void 0}),Ea=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ie(xo,t);return l.jsx(om,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Ea.displayName=xo;var Je="PopoverContent",Ra=s.forwardRef((e,t)=>{const n=rm(Je,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ie(Je,e.__scopePopover);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(am,{...r,ref:t}):l.jsx(im,{...r,ref:t})})});Ra.displayName=Je;var sm=De("PopoverContent.RemoveScroll"),am=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(null),r=H(t,o),a=s.useRef(!1);return s.useEffect(()=>{const i=o.current;if(i)return Xt(i)},[]),l.jsx(vt,{as:sm,allowPinchZoom:!0,children:l.jsx(Sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),im=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(Sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Sa=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,h=Ie(Je,n),g=bt(n);return Yt(),l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(rn,{"data-state":Ma(h.open),role:"dialog",id:h.contentId,...g,...p,ref:t,style:{...p.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)"}})})})}),_a="PopoverClose",Pa=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(_a,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:S(e.onClick,()=>r.onOpenChange(!1))})});Pa.displayName=_a;var cm="PopoverArrow",Ta=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=bt(n);return l.jsx(sn,{...r,...o,ref:t})});Ta.displayName=cm;function Ma(e){return e?"open":"closed"}var lm=xa,um=ba,dm=Ea,fm=Ra,pm=Pa,mm=Ta;const hm="_popover_bk0al_2",vm="_popoverContent_bk0al_34",gm="_popoverArrow_bk0al_38",wm="_popoverClose_bk0al_42",st={popover:hm,popoverContent:vm,popoverArrow:gm,popoverClose:wm},xm=({trigger:e,title:t,size:n="md",popoverContent:o,...r})=>l.jsxs(lm,{children:[l.jsx(um,{asChild:!0,children:e}),l.jsx(dm,{children:l.jsxs(fm,{side:"right",className:st.popover,...r,sideOffset:5,"data-size":n,children:[t&&l.jsx("h2",{className:`header-3 ${st.popoverTitle}`,children:t}),l.jsx("div",{className:st.popoverContent,children:o}),l.jsx("div",{className:st.popoverClose,children:l.jsx(pm,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",size:"sm",iconOnly:!0,icon:"Close"})})}),l.jsx(mm,{className:st.popoverArrow})]})})]});function Jo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Aa=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"}),ym="VisuallyHidden",dn=s.forwardRef((e,t)=>l.jsx(k.span,{...e,ref:t,style:{...Aa,...e.style}}));dn.displayName=ym;var Cm=dn,bm=[" ","Enter","ArrowUp","ArrowDown"],Em=[" ","Enter"],Fe="Select",[fn,pn,Rm]=Qt(Fe),[ot]=pe(Fe,[Rm,Ae]),mn=Ae(),[Sm,Ne]=ot(Fe),[_m,Pm]=ot(Fe),Ia=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:g,form:w}=e,m=mn(t),[v,y]=s.useState(null),[x,C]=s.useState(null),[b,E]=s.useState(!1),T=no(d),[R,A]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Fe}),[j,D]=be({prop:i,defaultProp:c,onChange:u,caller:Fe}),L=s.useRef(null),B=v?w||!!v.closest("form"):!0,[W,P]=s.useState(new Set),$=Array.from(W).map(N=>N.props.value).join(";");return l.jsx(on,{...m,children:l.jsxs(Sm,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:E,contentId:ue(),value:j,onValueChange:D,open:R,onOpenChange:A,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[l.jsx(fn.Provider,{scope:t,children:l.jsx(_m,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(N=>{P(F=>new Set(F).add(N))},[]),onNativeOptionRemove:s.useCallback(N=>{P(F=>{const I=new Set(F);return I.delete(N),I})},[]),children:n})}),B?l.jsxs(Za,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:j,onChange:N=>D(N.target.value),disabled:h,form:w,children:[j===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Ia.displayName=Fe;var Na="SelectTrigger",Oa=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=mn(n),i=Ne(Na,n),c=i.disabled||o,u=H(t,i.onTriggerChange),d=pn(n),f=s.useRef("touch"),[p,h,g]=Ja(m=>{const v=d().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),x=ei(v,m,y);x!==void 0&&i.onValueChange(x.value)}),w=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(wt,{asChild:!0,...a,children:l.jsx(k.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Qa(i.value)?"":void 0,...r,ref:u,onClick:S(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&w(m)}),onPointerDown:S(r.onPointerDown,m=>{f.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:S(r.onKeyDown,m=>{const v=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&bm.includes(m.key)&&(w(),m.preventDefault())})})})});Oa.displayName=Na;var ka="SelectValue",Da=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:i="",...c}=e,u=Ne(ka,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=H(t,u.onValueNodeChange);return X(()=>{d(f)},[d,f]),l.jsx(k.span,{...c,ref:p,style:{pointerEvents:"none"},children:Qa(u.value)?l.jsx(l.Fragment,{children:i}):a})});Da.displayName=ka;var Tm="SelectIcon",ja=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(k.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ja.displayName=Tm;var Mm="SelectPortal",La=e=>l.jsx(We,{asChild:!0,...e});La.displayName=Mm;var $e="SelectContent",Fa=s.forwardRef((e,t)=>{const n=Ne($e,e.__scopeSelect),[o,r]=s.useState();if(X(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?pt.createPortal(l.jsx($a,{scope:e.__scopeSelect,children:l.jsx(fn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(Ba,{...e,ref:t})});Fa.displayName=$e;var le=10,[$a,Oe]=ot($e),Am="SelectContentImpl",Im=De("SelectContent.RemoveScroll"),Ba=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,x=Ne($e,n),[C,b]=s.useState(null),[E,T]=s.useState(null),R=H(t,M=>b(M)),[A,j]=s.useState(null),[D,L]=s.useState(null),B=pn(n),[W,P]=s.useState(!1),$=s.useRef(!1);s.useEffect(()=>{if(C)return Xt(C)},[C]),Yt();const N=s.useCallback(M=>{const[K,...J]=B().map(Y=>Y.ref.current),[U]=J.slice(-1),G=document.activeElement;for(const Y of M)if(Y===G||(Y?.scrollIntoView({block:"nearest"}),Y===K&&E&&(E.scrollTop=0),Y===U&&E&&(E.scrollTop=E.scrollHeight),Y?.focus(),document.activeElement!==G))return},[B,E]),F=s.useCallback(()=>N([A,C]),[N,A,C]);s.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:I,triggerPointerDownPosRef:_}=x;s.useEffect(()=>{if(C){let M={x:0,y:0};const K=U=>{M={x:Math.abs(Math.round(U.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(U.pageY)-(_.current?.y??0))}},J=U=>{M.x<=10&&M.y<=10?U.preventDefault():C.contains(U.target)||I(!1),document.removeEventListener("pointermove",K),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const M=()=>I(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[I]);const[z,q]=Ja(M=>{const K=B().filter(G=>!G.disabled),J=K.find(G=>G.ref.current===document.activeElement),U=ei(K,M,J);U&&setTimeout(()=>U.ref.current.focus())}),Z=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&(j(M),U&&($.current=!0))},[x.value]),te=s.useCallback(()=>C?.focus(),[C]),Q=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&L(M)},[x.value]),Ce=o==="popper"?$n:Wa,re=Ce===$n?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx($a,{scope:n,content:C,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:A,onItemLeave:te,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:z,children:l.jsx(vt,{as:Im,allowPinchZoom:!0,children:l.jsx(ht,{asChild:!0,trapped:x.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:S(r,M=>{x.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:M=>M.preventDefault(),...y,...re,onPlaced:()=>P(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:S(y.onKeyDown,M=>{const K=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!K&&M.key.length===1&&q(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let U=B().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(M.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const G=M.target,Y=U.indexOf(G);U=U.slice(Y+1)}setTimeout(()=>N(U)),M.preventDefault()}})})})})})})});Ba.displayName=Am;var Nm="SelectItemAlignedPosition",Wa=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Ne($e,n),i=Oe($e,n),[c,u]=s.useState(null),[d,f]=s.useState(null),p=H(t,R=>f(R)),h=pn(n),g=s.useRef(!1),w=s.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&m&&v&&y){const R=a.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const G=D.left-A.left,Y=j.left-G,ie=R.left-Y,ke=R.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.left=yn+"px"}else{const G=A.right-D.right,Y=window.innerWidth-j.right-G,ie=window.innerWidth-R.right-Y,ke=R.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.right=yn+"px"}const L=h(),B=window.innerHeight-le*2,W=m.scrollHeight,P=window.getComputedStyle(d),$=parseInt(P.borderTopWidth,10),N=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),I=parseInt(P.paddingBottom,10),_=$+N+W+I+F,z=Math.min(v.offsetHeight*5,_),q=window.getComputedStyle(m),Z=parseInt(q.paddingTop,10),te=parseInt(q.paddingBottom,10),Q=R.top+R.height/2-le,Ce=B-Q,re=v.offsetHeight/2,M=v.offsetTop+re,K=$+N+M,J=_-K;if(K<=Q){const G=L.length>0&&v===L[L.length-1].ref.current;c.style.bottom="0px";const Y=d.clientHeight-m.offsetTop-m.offsetHeight,ie=Math.max(Ce,re+(G?te:0)+Y+F),ke=K+ie;c.style.height=ke+"px"}else{const G=L.length>0&&v===L[0].ref.current;c.style.top="0px";const ie=Math.max(Q,$+m.offsetTop+(G?Z:0)+re)+J;c.style.height=ie+"px",m.scrollTop=K-Q+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=z+"px",c.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,m,v,y,a.dir,o]);X(()=>C(),[C]);const[b,E]=s.useState();X(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const T=s.useCallback(R=>{R&&w.current===!0&&(C(),x?.(),w.current=!1)},[C,x]);return l.jsx(km,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(k.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Wa.displayName=Nm;var Om="SelectPopperPosition",$n=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...a}=e,i=mn(n);return l.jsx(rn,{...i,...a,ref:t,align:o,collisionPadding:r,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)"}})});$n.displayName=Om;var[km,yo]=ot($e,{}),Bn="SelectViewport",Ha=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=Oe(Bn,n),i=yo(Bn,n),c=H(t,a.onViewportChange),u=s.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(fn.Slot,{scope:n,children:l.jsx(k.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:S(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=i;if(h?.current&&p){const g=Math.abs(u.current-f.scrollTop);if(g>0){const w=window.innerHeight-le*2,m=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(m,v);if(y<w){const x=y+g,C=Math.min(w,x),b=x-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Ha.displayName=Bn;var Va="SelectGroup",[Dm,jm]=ot(Va),Lm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ue();return l.jsx(Dm,{scope:n,id:r,children:l.jsx(k.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Lm.displayName=Va;var Ka="SelectLabel",Fm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=jm(Ka,n);return l.jsx(k.div,{id:r.id,...o,ref:t})});Fm.displayName=Ka;var Kt="SelectItem",[$m,Ua]=ot(Kt),Ga=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...i}=e,c=Ne(Kt,n),u=Oe(Kt,n),d=c.value===o,[f,p]=s.useState(a??""),[h,g]=s.useState(!1),w=H(t,x=>u.itemRefCallback?.(x,o,r)),m=ue(),v=s.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx($m,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:s.useCallback(x=>{p(C=>C||(x?.textContent??"").trim())},[]),children:l.jsx(fn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(k.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:w,onFocus:S(i.onFocus,()=>g(!0)),onBlur:S(i.onBlur,()=>g(!1)),onClick:S(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:S(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:S(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:S(i.onPointerMove,x=>{v.current=x.pointerType,r?u.onItemLeave?.():v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:S(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:S(i.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(Em.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Ga.displayName=Kt;var it="SelectItemText",za=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,i=Ne(it,n),c=Oe(it,n),u=Ua(it,n),d=Pm(it,n),[f,p]=s.useState(null),h=H(t,y=>p(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),g=f?.textContent,w=s.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return X(()=>(m(w),()=>v(w)),[m,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});za.displayName=it;var Ya="SelectItemIndicator",qa=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Ua(Ya,n).isSelected?l.jsx(k.span,{"aria-hidden":!0,...o,ref:t}):null});qa.displayName=Ya;var Wn="SelectScrollUpButton",Bm=s.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=yo(Wn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Bm.displayName=Wn;var Hn="SelectScrollDownButton",Wm=s.forwardRef((e,t)=>{const n=Oe(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Wm.displayName=Hn;var Xa=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Oe("SelectScrollButton",n),i=s.useRef(null),c=pn(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),X(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),l.jsx(k.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:S(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:S(r.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:S(r.onPointerLeave,()=>{u()})})}),Hm="SelectSeparator",Vm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(k.div,{"aria-hidden":!0,...o,ref:t})});Vm.displayName=Hm;var Vn="SelectArrow",Km=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=mn(n),a=Ne(Vn,n),i=Oe(Vn,n);return a.open&&i.position==="popper"?l.jsx(sn,{...r,...o,ref:t}):null});Km.displayName=Vn;var Um="SelectBubbleInput",Za=s.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=s.useRef(null),a=H(o,r),i=Tr(t);return s.useEffect(()=>{const c=r.current;if(!c)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(p)}},[i,t]),l.jsx(k.select,{...n,style:{...Aa,...n.style},ref:a,defaultValue:t})});Za.displayName=Um;function Qa(e){return e===""||e===void 0}function Ja(e){const t=ne(e),n=s.useRef(""),o=s.useRef(0),r=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function ei(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Gm(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Gm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var zm=Ia,Ym=Oa,qm=Da,Xm=ja,Zm=La,Qm=Fa,Jm=Ha,eh=Ga,th=za,nh=qa;const oh="_container_1ka3x_1",rh="_label_1ka3x_9",sh="_trigger_1ka3x_16",ah="_icon_1ka3x_55",ih="_content_1ka3x_61",ch="_viewport_1ka3x_71",lh="_item_1ka3x_75",uh="_itemIndicator_1ka3x_93",dh="_error_1ka3x_106",fh="_helperText_1ka3x_112",he={container:oh,label:rh,trigger:sh,icon:ah,content:ih,viewport:ch,item:lh,itemIndicator:uh,error:dh,helperText:fh},ti=({label:e,error:t,helperText:n,placeholder:o="Select an option...",children:r,...a})=>{const i=O.useId(),c=a.name||i,u=n?`${c}-helper-text`:void 0,d=t?`${c}-error`:void 0;return l.jsxs("div",{className:he.container,children:[e&&l.jsx("label",{htmlFor:c,className:he.label,children:e}),l.jsxs(zm,{...a,children:[l.jsxs(Ym,{id:c,className:he.trigger,"aria-invalid":!!t,"aria-describedby":d||u,"data-has-error":!!t,children:[l.jsx(qm,{placeholder:o}),l.jsx(Xm,{className:he.icon,children:l.jsx(ir,{size:"md"})})]}),l.jsx(Zm,{children:l.jsx(Qm,{className:he.content,position:"popper",sideOffset:5,children:l.jsx(Jm,{className:he.viewport,children:r})})})]}),t&&l.jsx("span",{id:d,className:he.error,children:t}),n&&!t&&l.jsx("span",{id:u,className:he.helperText,children:n})]})},ni=O.forwardRef(({children:e,className:t,...n},o)=>l.jsxs(eh,{className:`${he.item} ${t??""}`,...n,ref:o,children:[l.jsx(th,{className:"label-1",children:e}),l.jsx(nh,{className:he.itemIndicator,children:l.jsx(Ut,{size:"sm"})})]}));ni.displayName="SelectItem";ti.displayName="SelectInput";const ph="_container_1wksd_1",mh="_label_1wksd_8",hh="_inputWrapper_1wksd_15",vh="_textArea_1wksd_21",gh="_error_1wksd_60",wh="_helperText_1wksd_66",ze={container:ph,label:mh,inputWrapper:hh,textArea:vh,error:gh,helperText:wh},oi=O.forwardRef(({className:e,label:t,error:n,helperText:o,id:r,...a},i)=>{const c=O.useId(),u=r||c,d=o?`${u}-helper-text`:void 0,f=n?`${u}-error`:void 0;return l.jsxs("div",{className:`${ze.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:u,className:ze.label,children:t}),l.jsx("div",{className:ze.inputWrapper,children:l.jsx("textarea",{ref:i,id:u,className:ze.textArea,"aria-invalid":!!n,"aria-describedby":f||d,"data-has-error":!!n,...a})}),n&&l.jsx("span",{id:f,className:ze.error,children:n}),o&&!n&&l.jsx("span",{id:d,className:ze.helperText,children:o})]})});oi.displayName="TextArea";var Co="ToastProvider",[bo,xh,yh]=Qt("Toast"),[ri]=pe("Toast",[yh]),[Ch,hn]=ri(Co),si=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:a=50,children:i}=e,[c,u]=s.useState(null),[d,f]=s.useState(0),p=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Co}\`. Expected non-empty \`string\`.`),l.jsx(bo.Provider,{scope:t,children:l.jsx(Ch,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:a,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:s.useCallback(()=>f(g=>g+1),[]),onToastRemove:s.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:i})})};si.displayName=Co;var ai="ToastViewport",bh=["F8"],Kn="toast.viewportPause",Un="toast.viewportResume",ii=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=bh,label:r="Notifications ({hotkey})",...a}=e,i=hn(ai,n),c=xh(n),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=H(t,p,i.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;s.useEffect(()=>{const v=y=>{o.length!==0&&o.every(C=>y[C]||y.code===C)&&p.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o]),s.useEffect(()=>{const v=u.current,y=p.current;if(w&&v&&y){const x=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Kn);y.dispatchEvent(T),i.isClosePausedRef.current=!0}},C=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Un);y.dispatchEvent(T),i.isClosePausedRef.current=!1}},b=T=>{!v.contains(T.relatedTarget)&&C()},E=()=>{v.contains(document.activeElement)||C()};return v.addEventListener("focusin",x),v.addEventListener("focusout",b),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",E),window.addEventListener("blur",x),window.addEventListener("focus",C),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",b),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",x),window.removeEventListener("focus",C)}}},[w,i.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:v})=>{const x=c().map(C=>{const b=C.ref.current,E=[b,...Dh(b)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?x.reverse():x).flat()},[c]);return s.useEffect(()=>{const v=p.current;if(v){const y=x=>{const C=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!C){const E=document.activeElement,T=x.shiftKey;if(x.target===v&&T){d.current?.focus();return}const j=m({tabbingDirection:T?"backwards":"forwards"}),D=j.findIndex(L=>L===E);In(j.slice(D+1))?x.preventDefault():T?d.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[c,m]),l.jsxs(Sl,{ref:u,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Gn,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});In(v)}}),l.jsx(bo.Slot,{scope:n,children:l.jsx(k.ol,{tabIndex:-1,...a,ref:h})}),w&&l.jsx(Gn,{ref:f,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});In(v)}})]})});ii.displayName=ai;var ci="ToastFocusProxy",Gn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,a=hn(ci,n);return l.jsx(dn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{const c=i.relatedTarget;!a.viewport?.contains(c)&&o()}})});Gn.displayName=ci;var Et="Toast",Eh="toast.swipeStart",Rh="toast.swipeMove",Sh="toast.swipeCancel",_h="toast.swipeEnd",li=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:a,...i}=e,[c,u]=be({prop:o,defaultProp:r??!0,onChange:a,caller:Et});return l.jsx(oe,{present:n||c,children:l.jsx(Mh,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:S(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:S(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:S(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:S(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});li.displayName=Et;var[Ph,Th]=ri(Et,{onClose(){}}),Mh=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:a,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:g,...w}=e,m=hn(Et,n),[v,y]=s.useState(null),x=H(t,P=>y(P)),C=s.useRef(null),b=s.useRef(null),E=r||m.duration,T=s.useRef(0),R=s.useRef(E),A=s.useRef(0),{onToastAdd:j,onToastRemove:D}=m,L=ne(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),B=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),T.current=new Date().getTime(),A.current=window.setTimeout(L,P))},[L]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{B(R.current),d?.()},N=()=>{const F=new Date().getTime()-T.current;R.current=R.current-F,window.clearTimeout(A.current),u?.()};return P.addEventListener(Kn,N),P.addEventListener(Un,$),()=>{P.removeEventListener(Kn,N),P.removeEventListener(Un,$)}}},[m.viewport,E,u,d,B]),s.useEffect(()=>{a&&!m.isClosePausedRef.current&&B(E)},[a,E,m.isClosePausedRef,B]),s.useEffect(()=>(j(),()=>D()),[j,D]);const W=s.useMemo(()=>v?vi(v):null,[v]);return m.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(Ah,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(Ph,{scope:n,onClose:L,children:pt.createPortal(l.jsx(bo.ItemSlot,{scope:n,children:l.jsx(Rl,{asChild:!0,onEscapeKeyDown:S(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(k.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:S(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:S(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:S(e.onPointerMove,P=>{if(!C.current)return;const $=P.clientX-C.current.x,N=P.clientY-C.current.y,F=!!b.current,I=["left","right"].includes(m.swipeDirection),_=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=I?_(0,$):0,q=I?0:_(0,N),Z=P.pointerType==="touch"?10:2,te={x:z,y:q},Q={originalEvent:P,delta:te};F?(b.current=te,Nt(Rh,p,Q,{discrete:!1})):er(te,m.swipeDirection,Z)?(b.current=te,Nt(Eh,f,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Z||Math.abs(N)>Z)&&(C.current=null)}),onPointerUp:S(e.onPointerUp,P=>{const $=b.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),b.current=null,C.current=null,$){const F=P.currentTarget,I={originalEvent:P,delta:$};er($,m.swipeDirection,m.swipeThreshold)?Nt(_h,g,I,{discrete:!0}):Nt(Sh,h,I,{discrete:!0}),F.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Ah=e=>{const{__scopeToast:t,children:n,...o}=e,r=hn(Et,t),[a,i]=s.useState(!1),[c,u]=s.useState(!1);return Oh(()=>i(!0)),s.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:l.jsx(We,{asChild:!0,children:l.jsx(dn,{...o,children:a&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},Ih="ToastTitle",ui=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});ui.displayName=Ih;var Nh="ToastDescription",di=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});di.displayName=Nh;var fi="ToastAction",pi=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(hi,{altText:n,asChild:!0,children:l.jsx(Eo,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${fi}\`. Expected non-empty \`string\`.`),null)});pi.displayName=fi;var mi="ToastClose",Eo=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Th(mi,n);return l.jsx(hi,{asChild:!0,children:l.jsx(k.button,{type:"button",...o,ref:t,onClick:S(e.onClick,r.onClose)})})});Eo.displayName=mi;var hi=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(k.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function vi(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),kh(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!r)if(a){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...vi(o))}}),t}function Nt(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var er=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),a=o>r;return t==="left"||t==="right"?a&&o>n:!a&&r>n};function Oh(e=()=>{}){const t=ne(e);X(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function kh(e){return e.nodeType===e.ELEMENT_NODE}function Dh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function In(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var jh=si,Lh=ii,Fh=li,$h=ui,Bh=di,Wh=pi,Hh=Eo;const Vh="_toast_1ga0s_1",Kh="_toastContent_1ga0s_12",Uh="_toastViewport_1ga0s_70",Gh="_toastTitle_1ga0s_89",zh="_toastDescription_1ga0s_95",Ye={toast:Vh,toastContent:Kh,toastViewport:Uh,toastTitle:Gh,toastDescription:zh},Yh=({...e})=>l.jsx(jh,{...e}),gi=O.forwardRef(({...e},t)=>l.jsx(Lh,{className:Ye.toastViewport,ref:t,...e}));gi.displayName="ToastViewport";const wi=O.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>l.jsxs(Fh,{className:Ye.toast,ref:r,...o,children:[l.jsxs("div",{className:Ye.toastContent,children:[l.jsx($h,{className:Ye.toastTitle,children:e}),t&&l.jsx(Bh,{className:Ye.toastDescription,children:t})]}),n&&l.jsx(Wh,{className:Ye.toastAction,asChild:!0,altText:"Toast action",children:n}),l.jsx(Hh,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));wi.displayName="Toast";var[vn]=pe("Tooltip",[Ae]),gn=Ae(),xi="TooltipProvider",qh=700,zn="tooltip.open",[Xh,Ro]=vn(xi),yi=e=>{const{__scopeTooltip:t,delayDuration:n=qh,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(Xh,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:a})};yi.displayName=xi;var ft="Tooltip",[Zh,Rt]=vn(ft),Ci=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=Ro(ft,e.__scopeTooltip),d=gn(t),[f,p]=s.useState(null),h=ue(),g=s.useRef(0),w=i??u.disableHoverableContent,m=c??u.delayDuration,v=s.useRef(!1),[y,x]=be({prop:o,defaultProp:r??!1,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),a?.(R)},caller:ft}),C=s.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,x(!0)},[x]),E=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,x(!0),g.current=0},m)},[m,x]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(on,{...d,children:l.jsx(Zh,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?T():b()},[u.isOpenDelayedRef,T,b]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(g.current),g.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};Ci.displayName=ft;var Yn="TooltipTrigger",bi=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Rt(Yn,n),a=Ro(Yn,n),i=gn(n),c=s.useRef(null),u=H(t,c,r.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(wt,{asChild:!0,...i,children:l.jsx(k.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:S(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:S(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:S(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:S(e.onBlur,r.onClose),onClick:S(e.onClick,r.onClose)})})});bi.displayName=Yn;var So="TooltipPortal",[Qh,Jh]=vn(So,{forceMount:void 0}),Ei=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=Rt(So,t);return l.jsx(Qh,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Ei.displayName=So;var et="TooltipContent",Ri=s.forwardRef((e,t)=>{const n=Jh(et,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=Rt(et,e.__scopeTooltip);return l.jsx(oe,{present:o||i.open,children:i.disableHoverableContent?l.jsx(Si,{side:r,...a,ref:t}):l.jsx(ev,{side:r,...a,ref:t})})}),ev=s.forwardRef((e,t)=>{const n=Rt(et,e.__scopeTooltip),o=Ro(et,e.__scopeTooltip),r=s.useRef(null),a=H(t,r),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,f=r.current,{onPointerInTransitChange:p}=o,h=s.useCallback(()=>{c(null),p(!1)},[p]),g=s.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},x=rv(y,v.getBoundingClientRect()),C=sv(y,x),b=av(m.getBoundingClientRect()),E=cv([...C,...b]);c(E),p(!0)},[p]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(u&&f){const w=v=>g(v,f),m=v=>g(v,u);return u.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[u,f,g,h]),s.useEffect(()=>{if(i){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=u?.contains(v)||f?.contains(v),C=!iv(y,i);x?h():C&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,f,i,d,h]),l.jsx(Si,{...e,ref:a})}),[tv,nv]=vn(ft,{isInside:!1}),ov=el("TooltipContent"),Si=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=Rt(et,n),d=gn(n),{onClose:f}=u;return s.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),s.useEffect(()=>{if(u.trigger){const p=h=>{h.target?.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(rn,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ov,{children:o}),l.jsx(tv,{scope:n,isInside:!0,children:l.jsx(Cm,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Ri.displayName=et;var _i="TooltipArrow",Pi=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=gn(n);return nv(_i,n).isInside?null:l.jsx(sn,{...r,...o,ref:t})});Pi.displayName=_i;function rv(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function sv(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function av(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function iv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function cv(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),lv(t)}function lv(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var uv=yi,dv=Ci,fv=bi,pv=Ei,mv=Ri,hv=Pi;const vv="_tooltipContent_17t5h_1",gv="_tooltipArrow_17t5h_12",tr={tooltipContent:vv,tooltipArrow:gv},wv=({...e})=>l.jsx(uv,{...e});function xv({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...a}){return t===void 0?l.jsx(l.Fragment,{children:e}):l.jsxs(dv,{open:n,defaultOpen:o,onOpenChange:i=>{r?.(i)},disableHoverableContent:!0,delayDuration:200,children:[l.jsx(fv,{asChild:!0,children:e}),l.jsx(pv,{children:l.jsxs(mv,{className:tr.tooltipContent,...a,sideOffset:4,children:[t,l.jsx(hv,{className:tr.tooltipArrow})]})})]})}exports.ArrowLeft=rr;exports.ArrowRight=sr;exports.Badge=Ai;exports.Button=mt;exports.Calendar=ar;exports.Check=Ut;exports.Checkbox=ml;exports.ChevronDown=ir;exports.ChevronLeft=Bc;exports.ChevronRight=Wc;exports.ChevronUp=Hc;exports.Circle=cr;exports.Close=qn;exports.Coffee=lr;exports.Dialog=Wu;exports.EmptyState=Ku;exports.ExternalLink=ur;exports.Gear=dr;exports.Hammer=fr;exports.Heart=pr;exports.IconMap=Ze;exports.Inbox=mr;exports.Input=fs;exports.Kebab=vr;exports.Lamp=hr;exports.Lightning=gr;exports.LogIn=wr;exports.LogOut=yr;exports.LogoGoogle=xr;exports.Mail=Cr;exports.Menu=br;exports.MenuButton=Jp;exports.MenuButtonItem=em;exports.NoMobile=Er;exports.Pencil=Rr;exports.Plus=Sr;exports.Popover=xm;exports.SelectInput=ti;exports.SelectItem=ni;exports.Signpost=_r;exports.Spinner=Xn;exports.SunMoon=Pr;exports.TextArea=oi;exports.Toast=wi;exports.ToastProvider=Yh;exports.ToastViewport=gi;exports.Tooltip=xv;exports.TooltipProvider=wv;exports.createIcon=V;exports.dialogSizes=Bu;exports.iconSizes=$c;
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Au="DialogDescriptionWarning",Iu=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fs(Au).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Nu=Jr,Ou=ts,ku=os,Du=rs,Lu=ss,ju=is,Fu=us;const $u="_dialogOverlay_1qzfk_1",Bu="_dialogContent_1qzfk_20",Wu="_dialogCloseButton_1qzfk_65",Hu="_dialogTitle_1qzfk_72",At={dialogOverlay:$u,dialogContent:Bu,dialogCloseButton:Wu,dialogTitle:Hu},Vu=["sm","md","lg"],Ku=({trigger:e,children:t,title:n,size:o="md",...r})=>l.jsxs(Nu,{...r,children:[l.jsx(Ou,{asChild:!0,children:e}),l.jsxs(ku,{children:[l.jsx(Du,{className:`${At.dialogOverlay}`}),l.jsxs(Lu,{className:At.dialogContent,"data-size":o,onPointerDownOutside:a=>{a?.preventDefault()},children:[l.jsx(Fu,{asChild:!0,children:l.jsx(mt,{className:`${At.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:l.jsx(qn,{})})}),l.jsx(ju,{className:At.dialogTitle,children:n}),t]})]})]}),Uu="_emptyState_nzjhq_1",Gu={emptyState:Uu},zu=({title:e,description:t,...n})=>l.jsxs("div",{className:Gu.emptyState,...n,children:[l.jsx("h2",{className:"header-2",children:e}),t&&l.jsx("p",{className:"subtitle-2",children:t})]}),Yu="_container_swxkv_1",qu="_label_swxkv_8",Xu="_inputWrapper_swxkv_15",Zu="_input_swxkv_15",Qu="_startIcon_swxkv_68",Ju="_endIcon_swxkv_69",ed="_error_swxkv_88",td="_helperText_swxkv_94",Re={container:Yu,label:qu,inputWrapper:Xu,input:Zu,startIcon:Qu,endIcon:Ju,error:ed,helperText:td},ps=O.forwardRef(({className:e,label:t,error:n,helperText:o,startIcon:r,endIcon:a,id:i,...c},u)=>{const d=O.useId(),f=i||d,p=o?`${f}-helper-text`:void 0,h=n?`${f}-error`:void 0,g=r?Ze[r]:void 0,w=a?Ze[a]:void 0;return l.jsxs("div",{className:`${Re.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:f,className:Re.label,children:t}),l.jsxs("div",{className:Re.inputWrapper,children:[g&&l.jsx("div",{className:Re.startIcon,children:l.jsx(g,{size:"md"})}),l.jsx("input",{ref:u,id:f,className:Re.input,"aria-invalid":!!n,"aria-describedby":h||p,"data-has-start-icon":!!r,"data-has-end-icon":!!a,"data-has-error":!!n,...c}),w&&l.jsx("div",{className:Re.endIcon,children:l.jsx(w,{size:"md"})})]}),n&&l.jsx("span",{id:h,className:Re.error,children:n}),o&&!n&&l.jsx("span",{id:p,className:Re.helperText,children:o})]})});ps.displayName="Input";function Qt(e){const t=e+"CollectionProvider",[n,o]=pe(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:y}=m,x=O.useRef(null),C=O.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=De(c),d=O.forwardRef((m,v)=>{const{scope:y,children:x}=m,C=a(c,y),b=H(v,C.collectionRef);return l.jsx(u,{ref:b,children:x})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=De(f),g=O.forwardRef((m,v)=>{const{scope:y,children:x,...C}=m,b=O.useRef(null),E=H(v,b),T=a(f,y);return O.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),l.jsx(h,{[p]:"",ref:E,children:x})});g.displayName=f;function w(m){const v=a(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,S)=>C.indexOf(T.ref.current)-C.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},w,o]}var nd=s.createContext(void 0);function no(e){const t=s.useContext(nd);return e||t||"ltr"}const od=["top","right","bottom","left"],Te=Math.min,se=Math.max,jt=Math.round,It=Math.floor,we=e=>({x:e,y:e}),rd={left:"right",right:"left",bottom:"top",top:"bottom"},sd={start:"end",end:"start"};function kn(e,t,n){return se(e,Te(t,n))}function Ee(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function oo(e){return e==="x"?"y":"x"}function ro(e){return e==="y"?"height":"width"}const ad=new Set(["top","bottom"]);function ge(e){return ad.has(Se(e))?"y":"x"}function so(e){return oo(ge(e))}function id(e,t,n){n===void 0&&(n=!1);const o=tt(e),r=so(e),a=ro(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ft(i)),[i,Ft(i)]}function cd(e){const t=Ft(e);return[Dn(e),t,Dn(t)]}function Dn(e){return e.replace(/start|end/g,t=>sd[t])}const Wo=["left","right"],Ho=["right","left"],ld=["top","bottom"],ud=["bottom","top"];function dd(e,t,n){switch(e){case"top":case"bottom":return n?t?Ho:Wo:t?Wo:Ho;case"left":case"right":return t?ld:ud;default:return[]}}function fd(e,t,n,o){const r=tt(e);let a=dd(Se(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(Dn)))),a}function Ft(e){return e.replace(/left|right|bottom|top/g,t=>rd[t])}function pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function ms(e){return typeof e!="number"?pd(e):{top:e,right:e,bottom:e,left:e}}function $t(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Vo(e,t,n){let{reference:o,floating:r}=e;const a=ge(t),i=so(t),c=ro(i),u=Se(t),d=a==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let g;switch(u){case"top":g={x:f,y:o.y-r.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(tt(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const md=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Vo(d,o,u),h=o,g={},w=0;for(let m=0;m<c.length;m++){const{name:v,fn:y}=c[m],{x,y:C,data:b,reset:E}=await y({x:f,y:p,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,g={...g,[v]:{...g[v],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=Vo(d,h,u)),m=-1)}return{x:f,y:p,placement:h,strategy:r,middlewareData:g}};async function ct(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=Ee(t,e),w=ms(g),v=c[h?p==="floating"?"reference":"floating":p],y=$t(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(c.floating)),boundary:d,rootBoundary:f,strategy:u})),x=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),b=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=$t(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:C,strategy:u}):x);return{top:(y.top-E.top+w.top)/b.y,bottom:(E.bottom-y.bottom+w.bottom)/b.y,left:(y.left-E.left+w.left)/b.x,right:(E.right-y.right+w.right)/b.x}}const hd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:f=0}=Ee(e,t)||{};if(d==null)return{};const p=ms(f),h={x:n,y:o},g=so(r),w=ro(g),m=await i.getDimensions(d),v=g==="y",y=v?"top":"left",x=v?"bottom":"right",C=v?"clientHeight":"clientWidth",b=a.reference[w]+a.reference[g]-h[g]-a.floating[w],E=h[g]-a.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let S=T?T[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(T)))&&(S=c.floating[C]||a.floating[w]);const A=b/2-E/2,L=S/2-m[w]/2-1,D=Te(p[y],L),j=Te(p[x],L),B=D,W=S-m[w]-j,P=S/2-m[w]/2+A,$=kn(B,P,W),N=!u.arrow&&tt(r)!=null&&P!==$&&a.reference[w]/2-(P<B?D:j)-m[w]/2<0,F=N?P<B?P-B:P-W:0;return{[g]:h[g]+F,data:{[g]:$,centerOffset:P-$-F,...N&&{alignmentOffset:F}},reset:N}}}),vd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Ee(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(r),x=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!m?[Ft(c)]:cd(c)),T=w!=="none";!h&&T&&E.push(...fd(c,m,w,b));const S=[c,...E],A=await ct(t,v),L=[];let D=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&L.push(A[y]),p){const P=id(r,i,b);L.push(A[P[0]],A[P[1]])}if(D=[...D,{placement:r,overflows:L}],!L.every(P=>P<=0)){var j,B;const P=(((j=a.flip)==null?void 0:j.index)||0)+1,$=S[P];if($&&(!(p==="alignment"?x!==ge($):!1)||D.every(I=>ge(I.placement)===x?I.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let N=(B=D.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(g){case"bestFit":{var W;const F=(W=D.filter(I=>{if(T){const _=ge(I.placement);return _===x||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];F&&(N=F);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return od.some(t=>e[t]>=0)}const gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ee(e,t);switch(o){case"referenceHidden":{const a=await ct(t,{...r,elementContext:"reference"}),i=Ko(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const a=await ct(t,{...r,altBoundary:!0}),i=Ko(a,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}},hs=new Set(["left","top"]);async function wd(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Se(n),c=tt(n),u=ge(n)==="y",d=hs.has(i)?-1:1,f=a&&u?-1:1,p=Ee(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(g=c==="end"?w*-1:w),u?{x:g*f,y:h*d}:{x:h*d,y:g*f}}const xd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:c}=t,u=await wd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:i}}}}},yd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...u}=Ee(e,t),d={x:n,y:o},f=await ct(t,u),p=ge(Se(r)),h=oo(p);let g=d[h],w=d[p];if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+f[v],C=g-f[y];g=kn(x,g,C)}if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=w+f[v],C=w-f[y];w=kn(x,w,C)}const m=c.fn({...t,[h]:g,[p]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:a,[p]:i}}}}}},Cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ee(e,t),f={x:n,y:o},p=ge(r),h=oo(p);let g=f[h],w=f[p];const m=Ee(c,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=h==="y"?"height":"width",b=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;g<b?g=b:g>E&&(g=E)}if(d){var y,x;const C=h==="y"?"width":"height",b=hs.has(Se(r)),E=a.reference[p]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[p])||0)+(b?0:v.crossAxis),T=a.reference[p]+a.reference[C]+(b?0:((x=i.offset)==null?void 0:x[p])||0)-(b?v.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:g,[p]:w}}}},bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ee(e,t),f=await ct(t,d),p=Se(r),h=tt(r),g=ge(r)==="y",{width:w,height:m}=a.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=p,v=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,C=w-f.left-f.right,b=Te(m-f[v],x),E=Te(w-f[y],C),T=!t.middlewareData.shift;let S=b,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),T&&!h){const D=se(f.left,0),j=se(f.right,0),B=se(f.top,0),W=se(f.bottom,0);g?A=w-2*(D!==0||j!==0?D+j:se(f.left,f.right)):S=m-2*(B!==0||W!==0?B+W:se(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:S});const L=await i.getDimensions(c.floating);return w!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function nt(e){return vs(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(vs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vs(e){return Jt()?e instanceof Node||e instanceof ae(e).Node:!1}function de(e){return Jt()?e instanceof Element||e instanceof ae(e).Element:!1}function xe(e){return Jt()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function Go(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}const Ed=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Ed.has(r)}const Sd=new Set(["table","td","th"]);function Rd(e){return Sd.has(nt(e))}const _d=[":popover-open",":modal"];function en(e){return _d.some(t=>{try{return e.matches(t)}catch{return!1}})}const Pd=["transform","translate","scale","rotate","perspective"],Td=["transform","translate","scale","rotate","perspective","filter"],Md=["paint","layout","strict","content"];function ao(e){const t=io(),n=de(e)?fe(e):e;return Pd.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Td.some(o=>(n.willChange||"").includes(o))||Md.some(o=>(n.contain||"").includes(o))}function Ad(e){let t=Me(e);for(;xe(t)&&!Qe(t);){if(ao(t))return t;if(en(t))return null;t=Me(t)}return null}function io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Id=new Set(["html","body","#document"]);function Qe(e){return Id.has(nt(e))}function fe(e){return ae(e).getComputedStyle(e)}function tn(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Go(e)&&e.host||ye(e);return Go(t)?t.host:t}function gs(e){const t=Me(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&gt(t)?t:gs(t)}function lt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gs(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(a){const c=Ln(i);return t.concat(i,i.visualViewport||[],gt(r)?r:[],c&&n?lt(c):[])}return t.concat(r,lt(r,[],n))}function Ln(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ws(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=xe(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=jt(n)!==a||jt(o)!==i;return c&&(n=a,o=i),{width:n,height:o,$:c}}function co(e){return de(e)?e:e.contextElement}function Xe(e){const t=co(e);if(!xe(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=ws(t);let i=(a?jt(n.width):n.width)/o,c=(a?jt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Nd=we(0);function xs(e){const t=ae(e);return!io()||!t.visualViewport?Nd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Od(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function je(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=co(e);let i=we(1);t&&(o?de(o)&&(i=Xe(o)):i=Xe(e));const c=Od(a,n,o)?xs(a):we(0);let u=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(a){const h=ae(a),g=o&&de(o)?ae(o):o;let w=h,m=Ln(w);for(;m&&o&&g!==w;){const v=Xe(m),y=m.getBoundingClientRect(),x=fe(m),C=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,p*=v.y,u+=C,d+=b,w=ae(m),m=Ln(w)}}return $t({width:f,height:p,x:u,y:d})}function nn(e,t){const n=tn(e).scrollLeft;return t?t.left+n:je(ye(e)).left+n}function ys(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-nn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function kd(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=ye(o),c=t?en(t.floating):!1;if(o===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=we(1);const f=we(0),p=xe(o);if((p||!p&&!a)&&((nt(o)!=="body"||gt(i))&&(u=tn(o)),xe(o))){const g=je(o);d=Xe(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const h=i&&!p&&!a?ys(i,u):we(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function Dd(e){return Array.from(e.getClientRects())}function Ld(e){const t=ye(e),n=tn(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+nn(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:c}}const zo=25;function jd(e,t){const n=ae(e),o=ye(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,c=0,u=0;if(r){a=r.width,i=r.height;const f=io();(!f||f&&t==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}const d=nn(o);if(d<=0){const f=o.ownerDocument,p=f.body,h=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-g);w<=zo&&(a-=w)}else d<=zo&&(a+=d);return{width:a,height:i,x:c,y:u}}const Fd=new Set(["absolute","fixed"]);function $d(e,t){const n=je(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=xe(e)?Xe(e):we(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,u=r*a.x,d=o*a.y;return{width:i,height:c,x:u,y:d}}function Yo(e,t,n){let o;if(t==="viewport")o=jd(e,n);else if(t==="document")o=Ld(ye(e));else if(de(t))o=$d(t,n);else{const r=xs(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $t(o)}function Cs(e,t){const n=Me(e);return n===t||!de(n)||Qe(n)?!1:fe(n).position==="fixed"||Cs(n,t)}function Bd(e,t){const n=t.get(e);if(n)return n;let o=lt(e,[],!1).filter(c=>de(c)&&nt(c)!=="body"),r=null;const a=fe(e).position==="fixed";let i=a?Me(e):e;for(;de(i)&&!Qe(i);){const c=fe(i),u=ao(i);!u&&c.position==="fixed"&&(r=null),(a?!u&&!r:!u&&c.position==="static"&&!!r&&Fd.has(r.position)||gt(i)&&!u&&Cs(e,i))?o=o.filter(f=>f!==i):r=c,i=Me(i)}return t.set(e,o),o}function Wd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?en(t)?[]:Bd(t,this._c):[].concat(n),o],c=i[0],u=i.reduce((d,f)=>{const p=Yo(t,f,r);return d.top=se(p.top,d.top),d.right=Te(p.right,d.right),d.bottom=Te(p.bottom,d.bottom),d.left=se(p.left,d.left),d},Yo(t,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Hd(e){const{width:t,height:n}=ws(e);return{width:t,height:n}}function Vd(e,t,n){const o=xe(t),r=ye(t),a=n==="fixed",i=je(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=we(0);function d(){u.x=nn(r)}if(o||!o&&!a)if((nt(t)!=="body"||gt(r))&&(c=tn(t)),o){const g=je(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else r&&d();a&&!o&&r&&d();const f=r&&!o&&!a?ys(r,c):we(0),p=i.left+c.scrollLeft-u.x-f.x,h=i.top+c.scrollTop-u.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function Tn(e){return fe(e).position==="static"}function qo(e,t){if(!xe(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function bs(e,t){const n=ae(e);if(en(e))return n;if(!xe(e)){let r=Me(e);for(;r&&!Qe(r);){if(de(r)&&!Tn(r))return r;r=Me(r)}return n}let o=qo(e,t);for(;o&&Rd(o)&&Tn(o);)o=qo(o,t);return o&&Qe(o)&&Tn(o)&&!ao(o)?n:o||Ad(e)||n}const Kd=async function(e){const t=this.getOffsetParent||bs,n=this.getDimensions,o=await n(e.floating);return{reference:Vd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ud(e){return fe(e).direction==="rtl"}const Gd={convertOffsetParentRelativeRectToViewportRelativeRect:kd,getDocumentElement:ye,getClippingRect:Wd,getOffsetParent:bs,getElementRects:Kd,getClientRects:Dd,getDimensions:Hd,getScale:Xe,isElement:de,isRTL:Ud};function Es(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zd(e,t){let n=null,o;const r=ye(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:h,height:g}=d;if(c||t(),!h||!g)return;const w=It(p),m=It(r.clientWidth-(f+h)),v=It(r.clientHeight-(p+g)),y=It(f),C={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let b=!0;function E(T){const S=T[0].intersectionRatio;if(S!==u){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Es(d,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function Yd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=co(e),f=r||a?[...d?lt(d):[],...lt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&c?zd(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let w,m=u?je(e):null;u&&v();function v(){const y=je(e);m&&!Es(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),p?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(w)}}const qd=xd,Xd=yd,Zd=vd,Qd=bd,Jd=gd,Xo=hd,ef=Cd,tf=(e,t,n)=>{const o=new Map,r={platform:Gd,...n},a={...r.platform,_c:o};return md(e,t,{...r,platform:a})};var nf=typeof document<"u",of=function(){},Dt=nf?O.useLayoutEffect:of;function Bt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Bt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!Bt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ss(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=Ss(e);return Math.round(t*n)/n}function Mn(e){const t=s.useRef(e);return Dt(()=>{t.current=e}),t}function rf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=s.useState(o);Bt(h,o)||g(o);const[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useCallback(I=>{I!==T.current&&(T.current=I,m(I))},[]),C=s.useCallback(I=>{I!==S.current&&(S.current=I,y(I))},[]),b=a||w,E=i||v,T=s.useRef(null),S=s.useRef(null),A=s.useRef(f),L=u!=null,D=Mn(u),j=Mn(r),B=Mn(d),W=s.useCallback(()=>{if(!T.current||!S.current)return;const I={placement:t,strategy:n,middleware:h};j.current&&(I.platform=j.current),tf(T.current,S.current,I).then(_=>{const z={..._,isPositioned:B.current!==!1};P.current&&!Bt(A.current,z)&&(A.current=z,pt.flushSync(()=>{p(z)}))})},[h,t,n,j,B]);Dt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[d]);const P=s.useRef(!1);Dt(()=>(P.current=!0,()=>{P.current=!1}),[]),Dt(()=>{if(b&&(T.current=b),E&&(S.current=E),b&&E){if(D.current)return D.current(b,E,W);W()}},[b,E,W,D,L]);const $=s.useMemo(()=>({reference:T,floating:S,setReference:x,setFloating:C}),[x,C]),N=s.useMemo(()=>({reference:b,floating:E}),[b,E]),F=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!N.floating)return I;const _=Zo(N.floating,f.x),z=Zo(N.floating,f.y);return c?{...I,transform:"translate("+_+"px, "+z+"px)",...Ss(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,c,N.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:W,refs:$,elements:N,floatingStyles:F}),[f,W,$,N,F])}const sf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Xo({element:o.current,padding:r}).fn(n):{}:o?Xo({element:o,padding:r}).fn(n):{}}}},af=(e,t)=>({...qd(e),options:[e,t]}),cf=(e,t)=>({...Xd(e),options:[e,t]}),lf=(e,t)=>({...ef(e),options:[e,t]}),uf=(e,t)=>({...Zd(e),options:[e,t]}),df=(e,t)=>({...Qd(e),options:[e,t]}),ff=(e,t)=>({...Jd(e),options:[e,t]}),pf=(e,t)=>({...sf(e),options:[e,t]});var mf="Arrow",Rs=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return l.jsx(k.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rs.displayName=mf;var hf=Rs,lo="Popper",[_s,Ae]=pe(lo),[vf,Ps]=_s(lo),Ts=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return l.jsx(vf,{scope:t,anchor:o,onAnchorChange:r,children:n})};Ts.displayName=lo;var Ms="PopperAnchor",As=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Ps(Ms,n),i=s.useRef(null),c=H(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=o?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),o?null:l.jsx(k.div,{...r,ref:c})});As.displayName=Ms;var uo="PopperContent",[gf,wf]=_s(uo),Is=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=Ps(uo,n),[y,x]=s.useState(null),C=H(t,M=>x(M)),[b,E]=s.useState(null),T=Ar(b),S=T?.width??0,A=T?.height??0,L=o+(a!=="center"?"-"+a:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],B=j.length>0,W={padding:D,boundary:j.filter(yf),altBoundary:B},{refs:P,floatingStyles:$,placement:N,isPositioned:F,middlewareData:I}=rf({strategy:"fixed",placement:L,whileElementsMounted:(...M)=>Yd(...M,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[af({mainAxis:r+A,alignmentAxis:i}),u&&cf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?lf():void 0,...W}),u&&uf({...W}),df({...W,apply:({elements:M,rects:K,availableWidth:J,availableHeight:U})=>{const{width:G,height:Y}=K.reference,ie=M.floating.style;ie.setProperty("--radix-popper-available-width",`${J}px`),ie.setProperty("--radix-popper-available-height",`${U}px`),ie.setProperty("--radix-popper-anchor-width",`${G}px`),ie.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),b&&pf({element:b,padding:c}),Cf({arrowWidth:S,arrowHeight:A}),h&&ff({strategy:"referenceHidden",...W})]}),[_,z]=ks(N),q=ne(w);X(()=>{F&&q?.()},[F,q]);const Z=I.arrow?.x,te=I.arrow?.y,Q=I.arrow?.centerOffset!==0,[Ce,re]=s.useState();return X(()=>{y&&re(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:F?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(gf,{scope:n,placedSide:_,onArrowChange:E,arrowX:Z,arrowY:te,shouldHideArrow:Q,children:l.jsx(k.div,{"data-side":_,"data-align":z,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});Is.displayName=uo;var Ns="PopperArrow",xf={top:"bottom",right:"left",bottom:"top",left:"right"},Os=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=wf(Ns,o),i=xf[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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(hf,{...r,ref:n,style:{...r.style,display:"block"}})})});Os.displayName=Ns;function yf(e){return e!==null}var Cf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=ks(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,g=(r.arrow?.y??0)+u/2;let w="",m="";return d==="bottom"?(w=i?p:`${h}px`,m=`${-u}px`):d==="top"?(w=i?p:`${h}px`,m=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,m=i?p:`${g}px`):d==="left"&&(w=`${o.floating.width+u}px`,m=i?p:`${g}px`),{data:{x:w,y:m}}}});function ks(e){const[t,n="center"]=e.split("-");return[t,n]}var on=Ts,wt=As,rn=Is,sn=Os,An="rovingFocusGroup.onEntryFocus",bf={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[jn,Ds,Ef]=Qt(xt),[Sf,Ls]=pe(xt,[Ef]),[Rf,_f]=Sf(xt),js=s.forwardRef((e,t)=>l.jsx(jn.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(jn.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Pf,{...e,ref:t})})}));js.displayName=xt;var Pf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=s.useRef(null),g=H(t,h),w=no(a),[m,v]=be({prop:i,defaultProp:c??null,onChange:u,caller:xt}),[y,x]=s.useState(!1),C=ne(d),b=Ds(n),E=s.useRef(!1),[T,S]=s.useState(0);return s.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(An,C),()=>A.removeEventListener(An,C)},[C]),l.jsx(Rf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(A=>v(A),[v]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(A=>A+1),[]),onFocusableItemRemove:s.useCallback(()=>S(A=>A-1),[]),children:l.jsx(k.div,{tabIndex:y||T===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{E.current=!0}),onFocus:R(e.onFocus,A=>{const L=!E.current;if(A.target===A.currentTarget&&L&&!y){const D=new CustomEvent(An,bf);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const j=b().filter(N=>N.focusable),B=j.find(N=>N.active),W=j.find(N=>N.id===m),$=[B,W,...j].filter(Boolean).map(N=>N.ref.current);Bs($,f)}}E.current=!1}),onBlur:R(e.onBlur,()=>x(!1))})})}),Fs="RovingFocusGroupItem",$s=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,children:i,...c}=e,u=ue(),d=a||u,f=_f(Fs,n),p=f.currentTabStopId===d,h=Ds(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=f;return s.useEffect(()=>{if(o)return g(),()=>w()},[o,g,w]),l.jsx(jn.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(k.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:R(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:R(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Af(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=h().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const b=C.indexOf(v.currentTarget);C=f.loop?If(C,b+1):C.slice(b+1)}setTimeout(()=>Bs(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});$s.displayName=Fs;var Tf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Af(e,t,n){const o=Mf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Tf[o]}function Bs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function If(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Nf=js,Of=$s,Fn=["Enter"," "],kf=["ArrowDown","PageUp","Home"],Ws=["ArrowUp","PageDown","End"],Df=[...kf,...Ws],Lf={ltr:[...Fn,"ArrowRight"],rtl:[...Fn,"ArrowLeft"]},jf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yt="Menu",[ut,Ff,$f]=Qt(yt),[He,Hs]=pe(yt,[$f,Ae,Ls]),an=Ae(),Vs=Ls(),[Bf,Ve]=He(yt),[Wf,Ct]=He(yt),Ks=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=an(t),[u,d]=s.useState(null),f=s.useRef(!1),p=ne(a),h=no(r);return s.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(on,{...c,children:l.jsx(Bf,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(Wf,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:i,children:o})})})};Ks.displayName=yt;var Hf="MenuAnchor",fo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(wt,{...r,...o,ref:t})});fo.displayName=Hf;var po="MenuPortal",[Vf,Us]=He(po,{forceMount:void 0}),Gs=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ve(po,t);return l.jsx(Vf,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Gs.displayName=po;var ce="MenuContent",[Kf,mo]=He(ce),zs=s.forwardRef((e,t)=>{const n=Us(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(Uf,{...r,ref:t}):l.jsx(Gf,{...r,ref:t})})})})}),Uf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return Xt(a)},[]),l.jsx(ho,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Gf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu);return l.jsx(ho,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zf=De("MenuContent.ScrollLock"),ho=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Ve(ce,n),y=Ct(ce,n),x=an(n),C=Vs(n),b=Ff(n),[E,T]=s.useState(null),S=s.useRef(null),A=H(t,S,v.onContentChange),L=s.useRef(0),D=s.useRef(""),j=s.useRef(0),B=s.useRef(null),W=s.useRef("right"),P=s.useRef(0),$=w?vt:s.Fragment,N=w?{as:zf,allowPinchZoom:!0}:void 0,F=_=>{const z=D.current+_,q=b().filter(M=>!M.disabled),Z=document.activeElement,te=q.find(M=>M.ref.current===Z)?.textValue,Q=q.map(M=>M.textValue),Ce=sp(Q,z,te),re=q.find(M=>M.textValue===Ce)?.ref.current;(function M(K){D.current=K,window.clearTimeout(L.current),K!==""&&(L.current=window.setTimeout(()=>M(""),1e3))})(z),re&&setTimeout(()=>re.focus())};s.useEffect(()=>()=>window.clearTimeout(L.current),[]),Yt();const I=s.useCallback(_=>W.current===B.current?.side&&ip(_,B.current?.area),[]);return l.jsx(Kf,{scope:n,searchRef:D,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(S.current?.focus(),T(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:s.useCallback(_=>{B.current=_},[]),children:l.jsx($,{...N,children:l.jsx(ht,{asChild:!0,trapped:r,onMountAutoFocus:R(a,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,children:l.jsx(Nf,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:R(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(rn,{role:"menu","aria-orientation":"vertical","data-state":la(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:R(m.onKeyDown,_=>{const q=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Z=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;q&&(_.key==="Tab"&&_.preventDefault(),!Z&&te&&F(_.key));const Q=S.current;if(_.target!==Q||!Df.includes(_.key))return;_.preventDefault();const re=b().filter(M=>!M.disabled).map(M=>M.ref.current);Ws.includes(_.key)&&re.reverse(),op(re)}),onBlur:R(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(L.current),D.current="")}),onPointerMove:R(e.onPointerMove,dt(_=>{const z=_.target,q=P.current!==_.clientX;if(_.currentTarget.contains(z)&&q){const Z=_.clientX>P.current?"right":"left";W.current=Z,P.current=_.clientX}}))})})})})})})});zs.displayName=ce;var Yf="MenuGroup",vo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"group",...o,ref:t})});vo.displayName=Yf;var qf="MenuLabel",Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});Ys.displayName=qf;var Wt="MenuItem",Qo="menu.itemSelect",cn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=s.useRef(null),i=Ct(Wt,e.__scopeMenu),c=mo(Wt,e.__scopeMenu),u=H(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const h=new CustomEvent(Qo,{bubbles:!0,cancelable:!0});p.addEventListener(Qo,g=>o?.(g),{once:!0}),Zn(p,h),h.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(qs,{...r,ref:u,disabled:n,onClick:R(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:R(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,p=>{const h=c.searchRef.current!=="";n||h&&p.key===" "||Fn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});cn.displayName=Wt;var qs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,i=mo(Wt,n),c=Vs(n),u=s.useRef(null),d=H(t,u),[f,p]=s.useState(!1),[h,g]=s.useState("");return s.useEffect(()=>{const w=u.current;w&&g((w.textContent??"").trim())},[a.children]),l.jsx(ut.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:l.jsx(Of,{asChild:!0,...c,focusable:!o,children:l.jsx(k.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:R(e.onPointerMove,dt(w=>{o?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,dt(w=>i.onItemLeave(w))),onFocus:R(e.onFocus,()=>p(!0)),onBlur:R(e.onBlur,()=>p(!1))})})})}),Xf="MenuCheckboxItem",Xs=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(ta,{scope:e.__scopeMenu,checked:n,children:l.jsx(cn,{role:"menuitemcheckbox","aria-checked":Ht(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:R(r.onSelect,()=>o?.(Ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xs.displayName=Xf;var Zs="MenuRadioGroup",[Zf,Qf]=He(Zs,{value:void 0,onValueChange:()=>{}}),Qs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=ne(o);return l.jsx(Zf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(vo,{...r,ref:t})})});Qs.displayName=Zs;var Js="MenuRadioItem",ea=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=Qf(Js,e.__scopeMenu),a=n===r.value;return l.jsx(ta,{scope:e.__scopeMenu,checked:a,children:l.jsx(cn,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":wo(a),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ea.displayName=Js;var go="MenuItemIndicator",[ta,Jf]=He(go,{checked:!1}),na=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=Jf(go,n);return l.jsx(oe,{present:o||Ht(a.checked)||a.checked===!0,children:l.jsx(k.span,{...r,ref:t,"data-state":wo(a.checked)})})});na.displayName=go;var ep="MenuSeparator",oa=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});oa.displayName=ep;var tp="MenuArrow",ra=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(sn,{...r,...o,ref:t})});ra.displayName=tp;var np="MenuSub",[Sv,sa]=He(np),at="MenuSubTrigger",aa=s.forwardRef((e,t)=>{const n=Ve(at,e.__scopeMenu),o=Ct(at,e.__scopeMenu),r=sa(at,e.__scopeMenu),a=mo(at,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]),l.jsx(fo,{asChild:!0,...d,children:l.jsx(qs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":la(n.open),...e,ref:Gt(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,dt(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,dt(p=>{f();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,w=g==="right",m=w?-5:5,v=h[w?"left":"right"],y=h[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,p=>{const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||Lf[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});aa.displayName=at;var ia="MenuSubContent",ca=s.forwardRef((e,t)=>{const n=Us(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu),c=sa(ia,e.__scopeMenu),u=s.useRef(null),d=H(t,u);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:l.jsx(ho,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),h=jf[i.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});ca.displayName=ia;function la(e){return e?"open":"closed"}function Ht(e){return e==="indeterminate"}function wo(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function op(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function sp(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=rp(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function ap(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function ip(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ap(n,t)}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cp=Ks,lp=fo,up=Gs,dp=zs,fp=vo,pp=Ys,mp=cn,hp=Xs,vp=Qs,gp=ea,wp=na,xp=oa,yp=ra,Cp=aa,bp=ca,ln="DropdownMenu",[Ep]=pe(ln,[Hs]),ee=Hs(),[Sp,ua]=Ep(ln),da=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=ee(t),d=s.useRef(null),[f,p]=be({prop:r,defaultProp:a??!1,onChange:i,caller:ln});return l.jsx(Sp,{scope:t,triggerId:ue(),triggerRef:d,contentId:ue(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(h=>!h),[p]),modal:c,children:l.jsx(cp,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};da.displayName=ln;var fa="DropdownMenuTrigger",pa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=ua(fa,n),i=ee(n);return l.jsx(lp,{asChild:!0,...i,children:l.jsx(k.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":o?"":void 0,disabled:o,...r,ref:Gt(t,a.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});pa.displayName=fa;var Rp="DropdownMenuPortal",ma=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ee(t);return l.jsx(up,{...o,...n})};ma.displayName=Rp;var ha="DropdownMenuContent",va=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ua(ha,n),a=ee(n),i=s.useRef(!1);return l.jsx(dp,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!r.modal||f)&&(i.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)"}})});va.displayName=ha;var _p="DropdownMenuGroup",Pp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(fp,{...r,...o,ref:t})});Pp.displayName=_p;var Tp="DropdownMenuLabel",Mp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(pp,{...r,...o,ref:t})});Mp.displayName=Tp;var Ap="DropdownMenuItem",ga=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(mp,{...r,...o,ref:t})});ga.displayName=Ap;var Ip="DropdownMenuCheckboxItem",Np=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(hp,{...r,...o,ref:t})});Np.displayName=Ip;var Op="DropdownMenuRadioGroup",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(vp,{...r,...o,ref:t})});kp.displayName=Op;var Dp="DropdownMenuRadioItem",Lp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(gp,{...r,...o,ref:t})});Lp.displayName=Dp;var jp="DropdownMenuItemIndicator",Fp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(wp,{...r,...o,ref:t})});Fp.displayName=jp;var $p="DropdownMenuSeparator",Bp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(xp,{...r,...o,ref:t})});Bp.displayName=$p;var Wp="DropdownMenuArrow",wa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(yp,{...r,...o,ref:t})});wa.displayName=Wp;var Hp="DropdownMenuSubTrigger",Vp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(Cp,{...r,...o,ref:t})});Vp.displayName=Hp;var Kp="DropdownMenuSubContent",Up=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(bp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Up.displayName=Kp;var Gp=da,zp=pa,Yp=ma,qp=va,Xp=ga,Zp=wa;const Qp="_menuButtonContent_gcc8s_1",Jp="_menuButtonItem_gcc8s_13",em="_menuButtonItemLabel_gcc8s_41",tm="_menuButtonArrow_gcc8s_46",Vt={menuButtonContent:Qp,menuButtonItem:Jp,menuButtonItemLabel:em,menuButtonArrow:tm},nm=({children:e,trigger:t,...n})=>l.jsxs(Gp,{modal:!1,...n,children:[l.jsx(zp,{asChild:!0,children:t}),l.jsx(Yp,{children:l.jsxs(qp,{align:"end",className:Vt.menuButtonContent,sideOffset:5,children:[e,l.jsx(Zp,{className:Vt.menuButtonArrow})]})})]}),om=({children:e,icon:t,...n})=>{const o=t?Ze[t]:void 0;return l.jsxs(Xp,{className:Vt.menuButtonItem,...n,children:[o&&l.jsx(o,{size:"md",className:"text-color-secondary"}),l.jsx("label",{className:`label-3 text-color-secondary ${Vt.menuButtonItemLabel}`,children:e})]})};var un="Popover",[xa]=pe(un,[Ae]),bt=Ae(),[rm,Ie]=xa(un),ya=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!1}=e,c=bt(t),u=s.useRef(null),[d,f]=s.useState(!1),[p,h]=be({prop:o,defaultProp:r??!1,onChange:a,caller:un});return l.jsx(on,{...c,children:l.jsx(rm,{scope:t,contentId:ue(),triggerRef:u,open:p,onOpenChange:h,onOpenToggle:s.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>f(!0),[]),onCustomAnchorRemove:s.useCallback(()=>f(!1),[]),modal:i,children:n})})};ya.displayName=un;var Ca="PopoverAnchor",sm=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(Ca,n),a=bt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(wt,{...a,...o,ref:t})});sm.displayName=Ca;var ba="PopoverTrigger",Ea=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(ba,n),a=bt(n),i=H(t,r.triggerRef),c=l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Aa(r.open),...o,ref:i,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:l.jsx(wt,{asChild:!0,...a,children:c})});Ea.displayName=ba;var xo="PopoverPortal",[am,im]=xa(xo,{forceMount:void 0}),Sa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ie(xo,t);return l.jsx(am,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Sa.displayName=xo;var Je="PopoverContent",Ra=s.forwardRef((e,t)=>{const n=im(Je,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ie(Je,e.__scopePopover);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(lm,{...r,ref:t}):l.jsx(um,{...r,ref:t})})});Ra.displayName=Je;var cm=De("PopoverContent.RemoveScroll"),lm=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(null),r=H(t,o),a=s.useRef(!1);return s.useEffect(()=>{const i=o.current;if(i)return Xt(i)},[]),l.jsx(vt,{as:cm,allowPinchZoom:!0,children:l.jsx(_a,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),um=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(_a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),_a=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,h=Ie(Je,n),g=bt(n);return Yt(),l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(rn,{"data-state":Aa(h.open),role:"dialog",id:h.contentId,...g,...p,ref:t,style:{...p.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)"}})})})}),Pa="PopoverClose",Ta=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(Pa,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Ta.displayName=Pa;var dm="PopoverArrow",Ma=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=bt(n);return l.jsx(sn,{...r,...o,ref:t})});Ma.displayName=dm;function Aa(e){return e?"open":"closed"}var fm=ya,pm=Ea,mm=Sa,hm=Ra,vm=Ta,gm=Ma;const wm="_popover_bk0al_2",xm="_popoverContent_bk0al_34",ym="_popoverArrow_bk0al_38",Cm="_popoverClose_bk0al_42",st={popover:wm,popoverContent:xm,popoverArrow:ym,popoverClose:Cm},bm=({trigger:e,title:t,size:n="md",popoverContent:o,...r})=>l.jsxs(fm,{children:[l.jsx(pm,{asChild:!0,children:e}),l.jsx(mm,{children:l.jsxs(hm,{side:"right",className:st.popover,...r,sideOffset:5,"data-size":n,children:[t&&l.jsx("h2",{className:`header-3 ${st.popoverTitle}`,children:t}),l.jsx("div",{className:st.popoverContent,children:o}),l.jsx("div",{className:st.popoverClose,children:l.jsx(vm,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",size:"sm",iconOnly:!0,icon:"Close"})})}),l.jsx(gm,{className:st.popoverArrow})]})})]});function Jo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ia=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"}),Em="VisuallyHidden",dn=s.forwardRef((e,t)=>l.jsx(k.span,{...e,ref:t,style:{...Ia,...e.style}}));dn.displayName=Em;var Sm=dn,Rm=[" ","Enter","ArrowUp","ArrowDown"],_m=[" ","Enter"],Fe="Select",[fn,pn,Pm]=Qt(Fe),[ot]=pe(Fe,[Pm,Ae]),mn=Ae(),[Tm,Ne]=ot(Fe),[Mm,Am]=ot(Fe),Na=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:g,form:w}=e,m=mn(t),[v,y]=s.useState(null),[x,C]=s.useState(null),[b,E]=s.useState(!1),T=no(d),[S,A]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Fe}),[L,D]=be({prop:i,defaultProp:c,onChange:u,caller:Fe}),j=s.useRef(null),B=v?w||!!v.closest("form"):!0,[W,P]=s.useState(new Set),$=Array.from(W).map(N=>N.props.value).join(";");return l.jsx(on,{...m,children:l.jsxs(Tm,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:E,contentId:ue(),value:L,onValueChange:D,open:S,onOpenChange:A,dir:T,triggerPointerDownPosRef:j,disabled:h,children:[l.jsx(fn.Provider,{scope:t,children:l.jsx(Mm,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(N=>{P(F=>new Set(F).add(N))},[]),onNativeOptionRemove:s.useCallback(N=>{P(F=>{const I=new Set(F);return I.delete(N),I})},[]),children:n})}),B?l.jsxs(Qa,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:L,onChange:N=>D(N.target.value),disabled:h,form:w,children:[L===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Na.displayName=Fe;var Oa="SelectTrigger",ka=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=mn(n),i=Ne(Oa,n),c=i.disabled||o,u=H(t,i.onTriggerChange),d=pn(n),f=s.useRef("touch"),[p,h,g]=ei(m=>{const v=d().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),x=ti(v,m,y);x!==void 0&&i.onValueChange(x.value)}),w=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(wt,{asChild:!0,...a,children:l.jsx(k.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ja(i.value)?"":void 0,...r,ref:u,onClick:R(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&w(m)}),onPointerDown:R(r.onPointerDown,m=>{f.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:R(r.onKeyDown,m=>{const v=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Rm.includes(m.key)&&(w(),m.preventDefault())})})})});ka.displayName=Oa;var Da="SelectValue",La=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:i="",...c}=e,u=Ne(Da,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=H(t,u.onValueNodeChange);return X(()=>{d(f)},[d,f]),l.jsx(k.span,{...c,ref:p,style:{pointerEvents:"none"},children:Ja(u.value)?l.jsx(l.Fragment,{children:i}):a})});La.displayName=Da;var Im="SelectIcon",ja=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(k.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ja.displayName=Im;var Nm="SelectPortal",Fa=e=>l.jsx(We,{asChild:!0,...e});Fa.displayName=Nm;var $e="SelectContent",$a=s.forwardRef((e,t)=>{const n=Ne($e,e.__scopeSelect),[o,r]=s.useState();if(X(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?pt.createPortal(l.jsx(Ba,{scope:e.__scopeSelect,children:l.jsx(fn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(Wa,{...e,ref:t})});$a.displayName=$e;var le=10,[Ba,Oe]=ot($e),Om="SelectContentImpl",km=De("SelectContent.RemoveScroll"),Wa=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,x=Ne($e,n),[C,b]=s.useState(null),[E,T]=s.useState(null),S=H(t,M=>b(M)),[A,L]=s.useState(null),[D,j]=s.useState(null),B=pn(n),[W,P]=s.useState(!1),$=s.useRef(!1);s.useEffect(()=>{if(C)return Xt(C)},[C]),Yt();const N=s.useCallback(M=>{const[K,...J]=B().map(Y=>Y.ref.current),[U]=J.slice(-1),G=document.activeElement;for(const Y of M)if(Y===G||(Y?.scrollIntoView({block:"nearest"}),Y===K&&E&&(E.scrollTop=0),Y===U&&E&&(E.scrollTop=E.scrollHeight),Y?.focus(),document.activeElement!==G))return},[B,E]),F=s.useCallback(()=>N([A,C]),[N,A,C]);s.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:I,triggerPointerDownPosRef:_}=x;s.useEffect(()=>{if(C){let M={x:0,y:0};const K=U=>{M={x:Math.abs(Math.round(U.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(U.pageY)-(_.current?.y??0))}},J=U=>{M.x<=10&&M.y<=10?U.preventDefault():C.contains(U.target)||I(!1),document.removeEventListener("pointermove",K),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const M=()=>I(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[I]);const[z,q]=ei(M=>{const K=B().filter(G=>!G.disabled),J=K.find(G=>G.ref.current===document.activeElement),U=ti(K,M,J);U&&setTimeout(()=>U.ref.current.focus())}),Z=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&(L(M),U&&($.current=!0))},[x.value]),te=s.useCallback(()=>C?.focus(),[C]),Q=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&j(M)},[x.value]),Ce=o==="popper"?$n:Ha,re=Ce===$n?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(Ba,{scope:n,content:C,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:A,onItemLeave:te,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:z,children:l.jsx(vt,{as:km,allowPinchZoom:!0,children:l.jsx(ht,{asChild:!0,trapped:x.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:R(r,M=>{x.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:M=>M.preventDefault(),...y,...re,onPlaced:()=>P(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,M=>{const K=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!K&&M.key.length===1&&q(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let U=B().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(M.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const G=M.target,Y=U.indexOf(G);U=U.slice(Y+1)}setTimeout(()=>N(U)),M.preventDefault()}})})})})})})});Wa.displayName=Om;var Dm="SelectItemAlignedPosition",Ha=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Ne($e,n),i=Oe($e,n),[c,u]=s.useState(null),[d,f]=s.useState(null),p=H(t,S=>f(S)),h=pn(n),g=s.useRef(!1),w=s.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&m&&v&&y){const S=a.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const G=D.left-A.left,Y=L.left-G,ie=S.left-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.left=yn+"px"}else{const G=A.right-D.right,Y=window.innerWidth-L.right-G,ie=window.innerWidth-S.right-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.right=yn+"px"}const j=h(),B=window.innerHeight-le*2,W=m.scrollHeight,P=window.getComputedStyle(d),$=parseInt(P.borderTopWidth,10),N=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),I=parseInt(P.paddingBottom,10),_=$+N+W+I+F,z=Math.min(v.offsetHeight*5,_),q=window.getComputedStyle(m),Z=parseInt(q.paddingTop,10),te=parseInt(q.paddingBottom,10),Q=S.top+S.height/2-le,Ce=B-Q,re=v.offsetHeight/2,M=v.offsetTop+re,K=$+N+M,J=_-K;if(K<=Q){const G=j.length>0&&v===j[j.length-1].ref.current;c.style.bottom="0px";const Y=d.clientHeight-m.offsetTop-m.offsetHeight,ie=Math.max(Ce,re+(G?te:0)+Y+F),ke=K+ie;c.style.height=ke+"px"}else{const G=j.length>0&&v===j[0].ref.current;c.style.top="0px";const ie=Math.max(Q,$+m.offsetTop+(G?Z:0)+re)+J;c.style.height=ie+"px",m.scrollTop=K-Q+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=z+"px",c.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,m,v,y,a.dir,o]);X(()=>C(),[C]);const[b,E]=s.useState();X(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const T=s.useCallback(S=>{S&&w.current===!0&&(C(),x?.(),w.current=!1)},[C,x]);return l.jsx(jm,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(k.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Ha.displayName=Dm;var Lm="SelectPopperPosition",$n=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...a}=e,i=mn(n);return l.jsx(rn,{...i,...a,ref:t,align:o,collisionPadding:r,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)"}})});$n.displayName=Lm;var[jm,yo]=ot($e,{}),Bn="SelectViewport",Va=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=Oe(Bn,n),i=yo(Bn,n),c=H(t,a.onViewportChange),u=s.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(fn.Slot,{scope:n,children:l.jsx(k.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=i;if(h?.current&&p){const g=Math.abs(u.current-f.scrollTop);if(g>0){const w=window.innerHeight-le*2,m=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(m,v);if(y<w){const x=y+g,C=Math.min(w,x),b=x-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Va.displayName=Bn;var Ka="SelectGroup",[Fm,$m]=ot(Ka),Bm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ue();return l.jsx(Fm,{scope:n,id:r,children:l.jsx(k.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Bm.displayName=Ka;var Ua="SelectLabel",Wm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=$m(Ua,n);return l.jsx(k.div,{id:r.id,...o,ref:t})});Wm.displayName=Ua;var Kt="SelectItem",[Hm,Ga]=ot(Kt),za=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...i}=e,c=Ne(Kt,n),u=Oe(Kt,n),d=c.value===o,[f,p]=s.useState(a??""),[h,g]=s.useState(!1),w=H(t,x=>u.itemRefCallback?.(x,o,r)),m=ue(),v=s.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Hm,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:s.useCallback(x=>{p(C=>C||(x?.textContent??"").trim())},[]),children:l.jsx(fn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(k.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:w,onFocus:R(i.onFocus,()=>g(!0)),onBlur:R(i.onBlur,()=>g(!1)),onClick:R(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:R(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:R(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:R(i.onPointerMove,x=>{v.current=x.pointerType,r?u.onItemLeave?.():v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:R(i.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(_m.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});za.displayName=Kt;var it="SelectItemText",Ya=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,i=Ne(it,n),c=Oe(it,n),u=Ga(it,n),d=Am(it,n),[f,p]=s.useState(null),h=H(t,y=>p(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),g=f?.textContent,w=s.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return X(()=>(m(w),()=>v(w)),[m,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});Ya.displayName=it;var qa="SelectItemIndicator",Xa=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Ga(qa,n).isSelected?l.jsx(k.span,{"aria-hidden":!0,...o,ref:t}):null});Xa.displayName=qa;var Wn="SelectScrollUpButton",Vm=s.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=yo(Wn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Za,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Vm.displayName=Wn;var Hn="SelectScrollDownButton",Km=s.forwardRef((e,t)=>{const n=Oe(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Za,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Km.displayName=Hn;var Za=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Oe("SelectScrollButton",n),i=s.useRef(null),c=pn(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),X(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),l.jsx(k.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{u()})})}),Um="SelectSeparator",Gm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(k.div,{"aria-hidden":!0,...o,ref:t})});Gm.displayName=Um;var Vn="SelectArrow",zm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=mn(n),a=Ne(Vn,n),i=Oe(Vn,n);return a.open&&i.position==="popper"?l.jsx(sn,{...r,...o,ref:t}):null});zm.displayName=Vn;var Ym="SelectBubbleInput",Qa=s.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=s.useRef(null),a=H(o,r),i=Mr(t);return s.useEffect(()=>{const c=r.current;if(!c)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(p)}},[i,t]),l.jsx(k.select,{...n,style:{...Ia,...n.style},ref:a,defaultValue:t})});Qa.displayName=Ym;function Ja(e){return e===""||e===void 0}function ei(e){const t=ne(e),n=s.useRef(""),o=s.useRef(0),r=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function ti(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=qm(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function qm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Xm=Na,Zm=ka,Qm=La,Jm=ja,eh=Fa,th=$a,nh=Va,oh=za,rh=Ya,sh=Xa;const ah="_container_1ka3x_1",ih="_label_1ka3x_9",ch="_trigger_1ka3x_16",lh="_icon_1ka3x_55",uh="_content_1ka3x_61",dh="_viewport_1ka3x_71",fh="_item_1ka3x_75",ph="_itemIndicator_1ka3x_93",mh="_error_1ka3x_106",hh="_helperText_1ka3x_112",he={container:ah,label:ih,trigger:ch,icon:lh,content:uh,viewport:dh,item:fh,itemIndicator:ph,error:mh,helperText:hh},ni=({label:e,error:t,helperText:n,placeholder:o="Select an option...",children:r,...a})=>{const i=O.useId(),c=a.name||i,u=n?`${c}-helper-text`:void 0,d=t?`${c}-error`:void 0;return l.jsxs("div",{className:he.container,children:[e&&l.jsx("label",{htmlFor:c,className:he.label,children:e}),l.jsxs(Xm,{...a,children:[l.jsxs(Zm,{id:c,className:he.trigger,"aria-invalid":!!t,"aria-describedby":d||u,"data-has-error":!!t,children:[l.jsx(Qm,{placeholder:o}),l.jsx(Jm,{className:he.icon,children:l.jsx(ir,{size:"md"})})]}),l.jsx(eh,{children:l.jsx(th,{className:he.content,position:"popper",sideOffset:5,children:l.jsx(nh,{className:he.viewport,children:r})})})]}),t&&l.jsx("span",{id:d,className:he.error,children:t}),n&&!t&&l.jsx("span",{id:u,className:he.helperText,children:n})]})},oi=O.forwardRef(({children:e,className:t,...n},o)=>l.jsxs(oh,{className:`${he.item} ${t??""}`,...n,ref:o,children:[l.jsx(rh,{className:"label-1",children:e}),l.jsx(sh,{className:he.itemIndicator,children:l.jsx(Ut,{size:"sm"})})]}));oi.displayName="SelectItem";ni.displayName="SelectInput";const vh="_container_1wksd_1",gh="_label_1wksd_8",wh="_inputWrapper_1wksd_15",xh="_textArea_1wksd_21",yh="_error_1wksd_60",Ch="_helperText_1wksd_66",ze={container:vh,label:gh,inputWrapper:wh,textArea:xh,error:yh,helperText:Ch},ri=O.forwardRef(({className:e,label:t,error:n,helperText:o,id:r,...a},i)=>{const c=O.useId(),u=r||c,d=o?`${u}-helper-text`:void 0,f=n?`${u}-error`:void 0;return l.jsxs("div",{className:`${ze.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:u,className:ze.label,children:t}),l.jsx("div",{className:ze.inputWrapper,children:l.jsx("textarea",{ref:i,id:u,className:ze.textArea,"aria-invalid":!!n,"aria-describedby":f||d,"data-has-error":!!n,...a})}),n&&l.jsx("span",{id:f,className:ze.error,children:n}),o&&!n&&l.jsx("span",{id:d,className:ze.helperText,children:o})]})});ri.displayName="TextArea";var Co="ToastProvider",[bo,bh,Eh]=Qt("Toast"),[si]=pe("Toast",[Eh]),[Sh,hn]=si(Co),ai=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:a=50,children:i}=e,[c,u]=s.useState(null),[d,f]=s.useState(0),p=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Co}\`. Expected non-empty \`string\`.`),l.jsx(bo.Provider,{scope:t,children:l.jsx(Sh,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:a,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:s.useCallback(()=>f(g=>g+1),[]),onToastRemove:s.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:i})})};ai.displayName=Co;var ii="ToastViewport",Rh=["F8"],Kn="toast.viewportPause",Un="toast.viewportResume",ci=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Rh,label:r="Notifications ({hotkey})",...a}=e,i=hn(ii,n),c=bh(n),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=H(t,p,i.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;s.useEffect(()=>{const v=y=>{o.length!==0&&o.every(C=>y[C]||y.code===C)&&p.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o]),s.useEffect(()=>{const v=u.current,y=p.current;if(w&&v&&y){const x=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Kn);y.dispatchEvent(T),i.isClosePausedRef.current=!0}},C=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Un);y.dispatchEvent(T),i.isClosePausedRef.current=!1}},b=T=>{!v.contains(T.relatedTarget)&&C()},E=()=>{v.contains(document.activeElement)||C()};return v.addEventListener("focusin",x),v.addEventListener("focusout",b),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",E),window.addEventListener("blur",x),window.addEventListener("focus",C),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",b),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",x),window.removeEventListener("focus",C)}}},[w,i.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:v})=>{const x=c().map(C=>{const b=C.ref.current,E=[b,...Fh(b)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?x.reverse():x).flat()},[c]);return s.useEffect(()=>{const v=p.current;if(v){const y=x=>{const C=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!C){const E=document.activeElement,T=x.shiftKey;if(x.target===v&&T){d.current?.focus();return}const L=m({tabbingDirection:T?"backwards":"forwards"}),D=L.findIndex(j=>j===E);In(L.slice(D+1))?x.preventDefault():T?d.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[c,m]),l.jsxs(Tl,{ref:u,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Gn,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});In(v)}}),l.jsx(bo.Slot,{scope:n,children:l.jsx(k.ol,{tabIndex:-1,...a,ref:h})}),w&&l.jsx(Gn,{ref:f,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});In(v)}})]})});ci.displayName=ii;var li="ToastFocusProxy",Gn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,a=hn(li,n);return l.jsx(dn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{const c=i.relatedTarget;!a.viewport?.contains(c)&&o()}})});Gn.displayName=li;var Et="Toast",_h="toast.swipeStart",Ph="toast.swipeMove",Th="toast.swipeCancel",Mh="toast.swipeEnd",ui=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:a,...i}=e,[c,u]=be({prop:o,defaultProp:r??!0,onChange:a,caller:Et});return l.jsx(oe,{present:n||c,children:l.jsx(Nh,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:R(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:R(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:R(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:R(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});ui.displayName=Et;var[Ah,Ih]=si(Et,{onClose(){}}),Nh=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:a,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:g,...w}=e,m=hn(Et,n),[v,y]=s.useState(null),x=H(t,P=>y(P)),C=s.useRef(null),b=s.useRef(null),E=r||m.duration,T=s.useRef(0),S=s.useRef(E),A=s.useRef(0),{onToastAdd:L,onToastRemove:D}=m,j=ne(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),B=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),T.current=new Date().getTime(),A.current=window.setTimeout(j,P))},[j]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{B(S.current),d?.()},N=()=>{const F=new Date().getTime()-T.current;S.current=S.current-F,window.clearTimeout(A.current),u?.()};return P.addEventListener(Kn,N),P.addEventListener(Un,$),()=>{P.removeEventListener(Kn,N),P.removeEventListener(Un,$)}}},[m.viewport,E,u,d,B]),s.useEffect(()=>{a&&!m.isClosePausedRef.current&&B(E)},[a,E,m.isClosePausedRef,B]),s.useEffect(()=>(L(),()=>D()),[L,D]);const W=s.useMemo(()=>v?gi(v):null,[v]);return m.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(Oh,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(Ah,{scope:n,onClose:j,children:pt.createPortal(l.jsx(bo.ItemSlot,{scope:n,children:l.jsx(Pl,{asChild:!0,onEscapeKeyDown:R(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(k.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:R(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:R(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:R(e.onPointerMove,P=>{if(!C.current)return;const $=P.clientX-C.current.x,N=P.clientY-C.current.y,F=!!b.current,I=["left","right"].includes(m.swipeDirection),_=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=I?_(0,$):0,q=I?0:_(0,N),Z=P.pointerType==="touch"?10:2,te={x:z,y:q},Q={originalEvent:P,delta:te};F?(b.current=te,Nt(Ph,p,Q,{discrete:!1})):er(te,m.swipeDirection,Z)?(b.current=te,Nt(_h,f,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Z||Math.abs(N)>Z)&&(C.current=null)}),onPointerUp:R(e.onPointerUp,P=>{const $=b.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),b.current=null,C.current=null,$){const F=P.currentTarget,I={originalEvent:P,delta:$};er($,m.swipeDirection,m.swipeThreshold)?Nt(Mh,g,I,{discrete:!0}):Nt(Th,h,I,{discrete:!0}),F.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Oh=e=>{const{__scopeToast:t,children:n,...o}=e,r=hn(Et,t),[a,i]=s.useState(!1),[c,u]=s.useState(!1);return Lh(()=>i(!0)),s.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:l.jsx(We,{asChild:!0,children:l.jsx(dn,{...o,children:a&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},kh="ToastTitle",di=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});di.displayName=kh;var Dh="ToastDescription",fi=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});fi.displayName=Dh;var pi="ToastAction",mi=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(vi,{altText:n,asChild:!0,children:l.jsx(Eo,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${pi}\`. Expected non-empty \`string\`.`),null)});mi.displayName=pi;var hi="ToastClose",Eo=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Ih(hi,n);return l.jsx(vi,{asChild:!0,children:l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,r.onClose)})})});Eo.displayName=hi;var vi=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(k.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function gi(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),jh(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!r)if(a){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...gi(o))}}),t}function Nt(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var er=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),a=o>r;return t==="left"||t==="right"?a&&o>n:!a&&r>n};function Lh(e=()=>{}){const t=ne(e);X(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function jh(e){return e.nodeType===e.ELEMENT_NODE}function Fh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function In(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $h=ai,Bh=ci,Wh=ui,Hh=di,Vh=fi,Kh=mi,Uh=Eo;const Gh="_toast_1ga0s_1",zh="_toastContent_1ga0s_12",Yh="_toastViewport_1ga0s_70",qh="_toastTitle_1ga0s_89",Xh="_toastDescription_1ga0s_95",Ye={toast:Gh,toastContent:zh,toastViewport:Yh,toastTitle:qh,toastDescription:Xh},Zh=({...e})=>l.jsx($h,{...e}),wi=O.forwardRef(({...e},t)=>l.jsx(Bh,{className:Ye.toastViewport,ref:t,...e}));wi.displayName="ToastViewport";const xi=O.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>l.jsxs(Wh,{className:Ye.toast,ref:r,...o,children:[l.jsxs("div",{className:Ye.toastContent,children:[l.jsx(Hh,{className:Ye.toastTitle,children:e}),t&&l.jsx(Vh,{className:Ye.toastDescription,children:t})]}),n&&l.jsx(Kh,{className:Ye.toastAction,asChild:!0,altText:"Toast action",children:n}),l.jsx(Uh,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));xi.displayName="Toast";var[vn]=pe("Tooltip",[Ae]),gn=Ae(),yi="TooltipProvider",Qh=700,zn="tooltip.open",[Jh,So]=vn(yi),Ci=e=>{const{__scopeTooltip:t,delayDuration:n=Qh,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(Jh,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:a})};Ci.displayName=yi;var ft="Tooltip",[ev,St]=vn(ft),bi=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=So(ft,e.__scopeTooltip),d=gn(t),[f,p]=s.useState(null),h=ue(),g=s.useRef(0),w=i??u.disableHoverableContent,m=c??u.delayDuration,v=s.useRef(!1),[y,x]=be({prop:o,defaultProp:r??!1,onChange:S=>{S?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),a?.(S)},caller:ft}),C=s.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,x(!0)},[x]),E=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,x(!0),g.current=0},m)},[m,x]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(on,{...d,children:l.jsx(ev,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?T():b()},[u.isOpenDelayedRef,T,b]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(g.current),g.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};bi.displayName=ft;var Yn="TooltipTrigger",Ei=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=St(Yn,n),a=So(Yn,n),i=gn(n),c=s.useRef(null),u=H(t,c,r.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(wt,{asChild:!0,...i,children:l.jsx(k.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:R(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});Ei.displayName=Yn;var Ro="TooltipPortal",[tv,nv]=vn(Ro,{forceMount:void 0}),Si=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=St(Ro,t);return l.jsx(tv,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Si.displayName=Ro;var et="TooltipContent",Ri=s.forwardRef((e,t)=>{const n=nv(et,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=St(et,e.__scopeTooltip);return l.jsx(oe,{present:o||i.open,children:i.disableHoverableContent?l.jsx(_i,{side:r,...a,ref:t}):l.jsx(ov,{side:r,...a,ref:t})})}),ov=s.forwardRef((e,t)=>{const n=St(et,e.__scopeTooltip),o=So(et,e.__scopeTooltip),r=s.useRef(null),a=H(t,r),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,f=r.current,{onPointerInTransitChange:p}=o,h=s.useCallback(()=>{c(null),p(!1)},[p]),g=s.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},x=iv(y,v.getBoundingClientRect()),C=cv(y,x),b=lv(m.getBoundingClientRect()),E=dv([...C,...b]);c(E),p(!0)},[p]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(u&&f){const w=v=>g(v,f),m=v=>g(v,u);return u.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[u,f,g,h]),s.useEffect(()=>{if(i){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=u?.contains(v)||f?.contains(v),C=!uv(y,i);x?h():C&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,f,i,d,h]),l.jsx(_i,{...e,ref:a})}),[rv,sv]=vn(ft,{isInside:!1}),av=ol("TooltipContent"),_i=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=St(et,n),d=gn(n),{onClose:f}=u;return s.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),s.useEffect(()=>{if(u.trigger){const p=h=>{h.target?.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(rn,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(av,{children:o}),l.jsx(rv,{scope:n,isInside:!0,children:l.jsx(Sm,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Ri.displayName=et;var Pi="TooltipArrow",Ti=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=gn(n);return sv(Pi,n).isInside?null:l.jsx(sn,{...r,...o,ref:t})});Ti.displayName=Pi;function iv(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function cv(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function lv(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function uv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function dv(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),fv(t)}function fv(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pv=Ci,mv=bi,hv=Ei,vv=Si,gv=Ri,wv=Ti;const xv="_tooltipContent_17t5h_1",yv="_tooltipArrow_17t5h_12",tr={tooltipContent:xv,tooltipArrow:yv},Cv=({...e})=>l.jsx(pv,{...e});function bv({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...a}){return t===void 0?l.jsx(l.Fragment,{children:e}):l.jsxs(mv,{open:n,defaultOpen:o,onOpenChange:i=>{r?.(i)},disableHoverableContent:!0,delayDuration:200,children:[l.jsx(hv,{asChild:!0,children:e}),l.jsx(vv,{children:l.jsxs(gv,{className:tr.tooltipContent,...a,sideOffset:4,children:[t,l.jsx(wv,{className:tr.tooltipArrow})]})})]})}exports.ArrowLeft=rr;exports.ArrowRight=sr;exports.Badge=Ii;exports.Button=mt;exports.Calendar=ar;exports.Check=Ut;exports.Checkbox=gl;exports.ChevronDown=ir;exports.ChevronLeft=Vc;exports.ChevronRight=Kc;exports.ChevronUp=Uc;exports.Circle=cr;exports.Close=qn;exports.Coffee=lr;exports.Dialog=Ku;exports.EmptyState=zu;exports.ExternalLink=ur;exports.Gear=dr;exports.Hammer=fr;exports.Heart=pr;exports.IconMap=Ze;exports.Inbox=mr;exports.Input=ps;exports.Kebab=vr;exports.Lamp=hr;exports.Lightning=gr;exports.LogIn=wr;exports.LogOut=yr;exports.LogoGoogle=xr;exports.Mail=Cr;exports.Menu=br;exports.MenuButton=nm;exports.MenuButtonItem=om;exports.NoMobile=Er;exports.Pencil=Sr;exports.Plus=Rr;exports.Popover=bm;exports.SelectInput=ni;exports.SelectItem=oi;exports.Signpost=_r;exports.Spinner=Xn;exports.Sun=Pr;exports.SunMoon=Tr;exports.TextArea=ri;exports.Toast=xi;exports.ToastProvider=Zh;exports.ToastViewport=wi;exports.Tooltip=bv;exports.TooltipProvider=Cv;exports.createIcon=V;exports.dialogSizes=Vu;exports.iconSizes=Hc;