@keeper-security/keeper-js-ui 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(R,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(R=typeof globalThis<"u"?globalThis:R||self,h(R["keeper-js-ui"]={},R["react/jsx-runtime"],R.React,R.ReactDOM))})(this,function(R,h,G,Dt){"use strict";function Fn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Fn(G),rt=Fn(Dt);function de(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const l=d=>{var w;const{scope:m,children:v,...b}=d,p=((w=m==null?void 0:m[e])==null?void 0:w[u])||i,g=c.useMemo(()=>b,Object.values(b));return h.jsx(p.Provider,{value:g,children:v})};l.displayName=s+"Provider";function f(d,m){var p;const v=((p=m==null?void 0:m[e])==null?void 0:p[u])||i,b=c.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=(i==null?void 0:i[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,Fi(o,...t)]}function Fi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function H(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Q=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function $n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$n(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$n(e[o],null)}}}}function K(...e){return c.useCallback(ot(...e),e)}var q=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find($i);if(s){const a=s.props.children,i=o.map(u=>u===s?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:u);return h.jsx(Rt,{...r,ref:t,children:c.isValidElement(a)?c.cloneElement(a,void 0,i):null})}return h.jsx(Rt,{...r,ref:t,children:n})});q.displayName="Slot";var Rt=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Wi(n);return c.cloneElement(n,{...zi(r,n.props),ref:t?ot(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Rt.displayName="SlotClone";var zn=({children:e})=>h.jsx(h.Fragment,{children:e});function $i(e){return c.isValidElement(e)&&e.type===zn}function zi(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Wi(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Lt=Bi.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ft="Avatar",[Vi,Ff]=de(Ft),[Ui,Wn]=Vi(Ft),Bn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return h.jsx(Ui,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:h.jsx(Lt.span,{...r,ref:t})})});Bn.displayName=Ft;var Vn="AvatarImage",Un=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Wn(Vn,n),i=Gi(r,s.referrerPolicy),u=H(l=>{o(l),a.onImageLoadingStatusChange(l)});return Q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?h.jsx(Lt.img,{...s,ref:t,src:r}):null});Un.displayName=Vn;var Gn="AvatarFallback",Kn=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Wn(Gn,n),[a,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&s.imageLoadingStatus!=="loaded"?h.jsx(Lt.span,{...o,ref:t}):null});Kn.displayName=Gn;function Gi(e,t){const[n,r]=c.useState("idle");return Q(()=>{if(!e){r("error");return}let o=!0;const s=new window.Image,a=i=>()=>{o&&r(i)};return r("loading"),s.onload=a("loaded"),s.onerror=a("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var Hn=Bn,Yn=Un,Xn=Kn;function qn(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qn(e))&&(r&&(r+=" "),r+=t);return r}const Qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jn=Zn,Le=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Jn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],d=s==null?void 0:s[l];if(f===null)return null;const m=Qn(f)||Qn(d);return o[l][m]}),i=n&&Object.entries(n).reduce((l,f)=>{let[d,m]=f;return m===void 0||(l[d]=m),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:d,className:m,...v}=f;return Object.entries(v).every(b=>{let[p,g]=b;return Array.isArray(g)?g.includes({...s,...i}[p]):{...s,...i}[p]===g})?[...l,d,m]:l},[]);return Jn(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},$t="-",Ki=e=>{const t=Yi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split($t);return i[0]===""&&i.length!==1&&i.shift(),er(i,t)||Hi(a)},getConflictingClassGroupIds:(a,i)=>{const u=n[a]||[];return i&&r[a]?[...u,...r[a]]:u}}},er=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?er(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($t);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},tr=/^\[(.+)\]$/,Hi=e=>{if(tr.test(e)){const t=tr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yi=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qi(Object.entries(e.classGroups),n).forEach(([s,a])=>{zt(a,r,s,t)}),r},zt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:nr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xi(o)){zt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{zt(a,nr(t,s),n,r)})})},nr=(e,t)=>{let n=e;return t.split($t).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Xi=e=>e.isThemeGetter,qi=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[t+a,i])):s);return[n,o]}):e,Zi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},rr="!",Qi=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=i=>{const u=[];let l=0,f=0,d;for(let g=0;g<i.length;g++){let w=i[g];if(l===0){if(w===o&&(r||i.slice(g,g+s)===t)){u.push(i.slice(f,g)),f=g+s;continue}if(w==="/"){d=g;continue}}w==="["?l++:w==="]"&&l--}const m=u.length===0?i:i.substring(f),v=m.startsWith(rr),b=v?m.substring(1):m,p=d&&d>f?d-f:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:p}};return n?i=>n({className:i,parseClassName:a}):a},Ji=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ea=e=>({cache:Zi(e.cacheSize),parseClassName:Qi(e),...Ki(e)}),ta=/\s+/,na=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(ta);let i="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:f,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:v}=n(l);let b=!!v,p=r(b?m.substring(0,v):m);if(!p){if(!b){i=l+(i.length>0?" "+i:i);continue}if(p=r(m),!p){i=l+(i.length>0?" "+i:i);continue}b=!1}const g=Ji(f).join(":"),w=d?g+rr:g,y=w+p;if(s.includes(y))continue;s.push(y);const k=o(p,b);for(let x=0;x<k.length;++x){const C=k[x];s.push(w+C)}i=l+(i.length>0?" "+i:i)}return i};function ra(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=or(t))&&(r&&(r+=" "),r+=n);return r}const or=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=or(e[r]))&&(n&&(n+=" "),n+=t);return n};function sr(e,...t){let n,r,o,s=a;function a(u){const l=t.reduce((f,d)=>d(f),e());return n=ea(l),r=n.cache.get,o=n.cache.set,s=i,i(u)}function i(u){const l=r(u);if(l)return l;const f=na(u,n);return o(u,f),f}return function(){return s(ra.apply(null,arguments))}}const V=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ir=/^\[(?:([a-z-]+):)?(.+)\]$/i,oa=/^\d+\/\d+$/,sa=new Set(["px","full","screen"]),ia=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,la=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ua=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Pe(e)||sa.has(e)||oa.test(e),ge=e=>Te(e,"length",ba),Pe=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>Te(e,"number",Pe),Fe=e=>!!e&&Number.isInteger(Number(e)),da=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),D=e=>ir.test(e),ve=e=>ia.test(e),fa=new Set(["length","size","percentage"]),pa=e=>Te(e,fa,ar),ma=e=>Te(e,"position",ar),ha=new Set(["image","url"]),ga=e=>Te(e,ha,ya),va=e=>Te(e,"",wa),$e=()=>!0,Te=(e,t,n)=>{const r=ir.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ba=e=>aa.test(e)&&!ca.test(e),ar=()=>!1,wa=e=>la.test(e),ya=e=>ua.test(e),cr=()=>{const e=V("colors"),t=V("spacing"),n=V("blur"),r=V("brightness"),o=V("borderColor"),s=V("borderRadius"),a=V("borderSpacing"),i=V("borderWidth"),u=V("contrast"),l=V("grayscale"),f=V("hueRotate"),d=V("invert"),m=V("gap"),v=V("gradientColorStops"),b=V("gradientColorStopPositions"),p=V("inset"),g=V("margin"),w=V("opacity"),y=V("padding"),k=V("saturate"),x=V("scale"),C=V("sepia"),P=V("skew"),E=V("space"),T=V("translate"),O=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",D,t],A=()=>[D,t],F=()=>["",fe,ge],S=()=>["auto",Pe,D],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",D],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Pe,D];return{cacheSize:500,separator:":",theme:{colors:[$e],spacing:[fe,ge],blur:["none","",ve,D],brightness:B(),borderColor:[e],borderRadius:["none","","full",ve,D],borderSpacing:A(),borderWidth:F(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[da,ge],inset:L(),margin:L(),opacity:B(),padding:A(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",D]}],container:["container"],columns:[{columns:[ve]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),D]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fe,D]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",D]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Fe,D]}],"grid-cols":[{"grid-cols":[$e]}],"col-start-end":[{col:["auto",{span:["full",Fe,D]},D]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[$e]}],"row-start-end":[{row:["auto",{span:[Fe,D]},D]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",D]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",D]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",D,t]}],"min-w":[{"min-w":[D,t,"min","max","fit"]}],"max-w":[{"max-w":[D,t,"none","full","min","max","fit","prose",{screen:[ve]},ve]}],h:[{h:[D,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[D,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[D,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ve,ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[$e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",D]}],"line-clamp":[{"line-clamp":["none",Pe,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,D]}],"list-image":[{"list-image":["none",D]}],"list-style-type":[{list:["none","disc","decimal",D]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,ge]}],"underline-offset":[{"underline-offset":["auto",fe,D]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",D]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),ma]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ga]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:_()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[fe,D]}],"outline-w":[{outline:[fe,ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[fe,ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ve,va]}],"shadow-color":[{shadow:[$e]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ve,D]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[k]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",D]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",D]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",D]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Fe,D]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",D]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",D]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",D]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,ge,Wt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ka=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:s={},override:a={}})=>{ze(e,"cacheSize",t),ze(e,"prefix",n),ze(e,"separator",r),ze(e,"experimentalParseClassName",o);for(const i in a)xa(e[i],a[i]);for(const i in s)Ca(e[i],s[i]);return e},ze=(e,t,n)=>{n!==void 0&&(e[t]=n)},xa=(e,t)=>{if(t)for(const n in t)ze(e,n,t[n])},Ca=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Ea=((e,...t)=>typeof e=="function"?sr(cr,e,...t):sr(()=>ka(cr(),e),...t))({prefix:"ksjsui-"});function U(...e){return Ea(Zn(e))}const lr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],Sa=Le(["ksjsui-relative ksjsui-flex ksjsui-shrink-0 ksjsui-overflow-hidden ksjsui-rounded-full"],{variants:{size:{sm:"ksjsui-size-8",md:"ksjsui-size-9",lg:"ksjsui-size-10"}},defaultVariants:{size:"md"}}),ur=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx(Hn,{ref:r,className:U(Sa({size:t,className:e})),...n}));ur.displayName=Hn.displayName;const dr=c.forwardRef(({className:e,...t},n)=>h.jsx(Yn,{ref:n,className:U("ksjsui-aspect-square ksjsui-size-full",e),...t}));dr.displayName=Yn.displayName;const fr=c.forwardRef(({className:e,...t},n)=>{var r;return h.jsx(Xn,{ref:n,className:U("ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full ksjsui-bg-muted",e),style:{...ja((r=t.children)==null?void 0:r.toString(),lr)},...t})});fr.displayName=Xn.displayName;function ja(e="",t=lr){const n=e.substring(0,2),r=Pa(n)%t.length,o=t[r],s=Ta(o);return{backgroundColor:o,color:s}}function Pa(e){const t=e.substring(0,2);return t.split("").reduce((r,o,s)=>r+t.charCodeAt(s),0)}function Ta(e){return e==="#fff"?"#000":"#fff"}const Aa=Le(["ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-text-base ksjsui-font-medium ksjsui-ring-offset-background ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-bg-disabled disabled:ksjsui-text-disabled-foreground","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-bg-button-face forced-colors:ksjsui-text-button-text","forced-colors:hover:ksjsui-border-highlight","forced-colors:disabled:ksjsui-border-gray-text","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0"],{variants:{variant:{solid:"",outline:"ksjsui-border-current ksjsui-text-secondary hover:ksjsui-bg-neutral-hover",plain:"ksjsui-bg-transparent",link:"ksjsui-underline-current ksjsui-h-auto ksjsui-p-0 ksjsui-text-secondary hover:ksjsui-underline"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},avatar:{true:"ksjsui-p-0"},iconOnly:{true:""},radius:{md:"ksjsui-rounded-lg",full:"ksjsui-rounded-full"},size:{sm:"ksjsui-h-8 [&_svg]:ksjsui-size-5",md:"ksjsui-h-9 [&_svg]:ksjsui-size-5",lg:"ksjsui-h-10 [&_svg]:ksjsui-size-6"}},defaultVariants:{variant:"solid",color:"neutral",fullWidth:void 0,radius:"md",size:"md"},compoundVariants:[{variant:"solid",color:"neutral",className:"ksjsui-bg-neutral ksjsui-text-neutral-foreground hover:ksjsui-bg-neutral-hover"},{variant:"solid",color:"primary",className:"ksjsui-bg-primary ksjsui-text-primary-foreground hover:ksjsui-bg-primary-hover"},{variant:"solid",color:"secondary",className:"ksjsui-bg-secondary ksjsui-text-secondary-foreground hover:ksjsui-bg-secondary-hover"},{variant:"solid",color:"destructive",className:"ksjsui-bg-destructive ksjsui-text-destructive-foreground hover:ksjsui-bg-destructive-hover"},{variant:["outline","plain","link"],color:"neutral",className:"ksjsui-text-neutral-foreground"},{variant:["outline","plain","link"],color:"primary",className:"ksjsui-text-primary"},{variant:["outline","plain","link"],color:"secondary",className:"ksjsui-text-secondary"},{variant:["outline","plain","link"],color:"destructive",className:"ksjsui-text-destructive"},{avatar:!0,size:"sm",className:"ksjsui-size-8 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"md",className:"ksjsui-size-9 ksjsui-rounded-full ksjsui-border-0"},{avatar:!0,size:"lg",className:"ksjsui-size-10 ksjsui-rounded-full ksjsui-border-0"},{iconOnly:!0,size:"sm",className:"ksjsui-w-8"},{iconOnly:!0,size:"md",className:"ksjsui-w-9"},{iconOnly:!0,size:"lg",className:"ksjsui-w-10"}]}),Bt=c.forwardRef(({className:e,endContent:t,startContent:n,variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,asChild:f,children:d,tabIndex:m=0,...v},b)=>{const p=f?q:"button";return h.jsxs(p,{className:U(Aa({variant:r,color:o,fullWidth:s,avatar:a,iconOnly:i,radius:u,size:l,className:e})),ref:b,tabIndex:m,...v,children:[n&&h.jsx("span",{className:"ksjsui-me-2",children:n}),h.jsx(zn,{children:d}),t&&h.jsx("span",{className:"ksjsui-ms-2",children:t})]})});Bt.displayName="Button";function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function We({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Ma({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=H(n),u=c.useCallback(l=>{if(s){const d=typeof l=="function"?l(e):l;d!==e&&i(d)}else o(l)},[s,e,o,i]);return[a,u]}function Ma({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),s=H(t);return c.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Na=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],X=Na.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pr(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function mr(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var hr=c.createContext(void 0),Oa=e=>{const{dir:t,children:n}=e;return h.jsx(hr.Provider,{value:t,children:n})};function gr(e){const t=c.useContext(hr);return e||t||"ltr"}function vr(e,t=globalThis==null?void 0:globalThis.document){const n=H(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ia="DismissableLayer",Vt="dismissableLayer.update",_a="dismissableLayer.pointerDownOutside",Da="dismissableLayer.focusOutside",br,wr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yr=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(wr),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=Fa(E=>{const T=E.target,O=[...l.branches].some(I=>I.contains(T));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=$a(E=>{const T=E.target;[...l.branches].some(I=>I.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(br=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),kr(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=br)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),kr())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(Vt,E),()=>document.removeEventListener(Vt,E)},[]),h.jsx(X.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});yr.displayName=Ia;var Ra="DismissableLayerBranch",La=c.forwardRef((e,t)=>{const n=c.useContext(wr),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(X.div,{...e,ref:o})});La.displayName=Ra;function Fa(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){xr(_a,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $a(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&xr(Da,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kr(){const e=new CustomEvent(Vt);document.dispatchEvent(e)}function xr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pr(o,s):o.dispatchEvent(s)}var Ut=0;function za(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cr()),document.body.insertAdjacentElement("beforeend",e[1]??Cr()),Ut++,()=>{Ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ut--}},[])}function Cr(){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 Gt="focusScope.autoFocusOnMount",Kt="focusScope.autoFocusOnUnmount",Er={bubbles:!1,cancelable:!0},Wa="FocusScope",Sr=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),l=H(o),f=H(s),d=c.useRef(null),m=K(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(k){if(v.paused||!i)return;const x=k.target;i.contains(x)?d.current=x:be(d.current,{select:!0})},g=function(k){if(v.paused||!i)return;const x=k.relatedTarget;x!==null&&(i.contains(x)||be(d.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&be(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),y.disconnect()}}},[r,i,v.paused]),c.useEffect(()=>{if(i){Tr.add(v);const p=document.activeElement;if(!i.contains(p)){const w=new CustomEvent(Gt,Er);i.addEventListener(Gt,l),i.dispatchEvent(w),w.defaultPrevented||(Ba(Ha(jr(i)),{select:!0}),document.activeElement===p&&be(i))}return()=>{i.removeEventListener(Gt,l),setTimeout(()=>{const w=new CustomEvent(Kt,Er);i.addEventListener(Kt,f),i.dispatchEvent(w),w.defaultPrevented||be(p??document.body,{select:!0}),i.removeEventListener(Kt,f),Tr.remove(v)},0)}}},[i,l,f,v]);const b=c.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(g&&w){const y=p.currentTarget,[k,x]=Va(y);k&&x?!p.shiftKey&&w===x?(p.preventDefault(),n&&be(k,{select:!0})):p.shiftKey&&w===k&&(p.preventDefault(),n&&be(x,{select:!0})):w===y&&p.preventDefault()}},[n,r,v.paused]);return h.jsx(X.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});Sr.displayName=Wa;function Ba(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(be(r,{select:t}),document.activeElement!==n)return}function Va(e){const t=jr(e),n=Pr(t,e),r=Pr(t.reverse(),e);return[n,r]}function jr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pr(e,t){for(const n of e)if(!Ua(n,{upTo:t}))return n}function Ua(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 Ga(e){return e instanceof HTMLInputElement&&"select"in e}function be(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ga(e)&&t&&e.select()}}var Tr=Ka();function Ka(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ar(e,t),e.unshift(t)},remove(t){var n;e=Ar(e,t),(n=e[0])==null||n.resume()}}}function Ar(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ha(e){return e.filter(t=>t.tagName!=="A")}var Ya=c.useId||(()=>{}),Xa=0;function Be(e){const[t,n]=c.useState(Ya());return Q(()=>{e||n(r=>r??String(Xa++))},[e]),e||(t?`radix-${t}`:"")}const qa=["top","right","bottom","left"],we=Math.min,J=Math.max,st=Math.round,it=Math.floor,se=e=>({x:e,y:e}),Za={left:"right",right:"left",bottom:"top",top:"bottom"},Qa={start:"end",end:"start"};function Ht(e,t,n){return J(e,we(t,n))}function pe(e,t){return typeof e=="function"?e(t):e}function me(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function Yt(e){return e==="x"?"y":"x"}function Xt(e){return e==="y"?"height":"width"}function ye(e){return["top","bottom"].includes(me(e))?"y":"x"}function qt(e){return Yt(ye(e))}function Ja(e,t,n){n===void 0&&(n=!1);const r=Ae(e),o=qt(e),s=Xt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=at(a)),[a,at(a)]}function ec(e){const t=at(e);return[Zt(e),t,Zt(t)]}function Zt(e){return e.replace(/start|end/g,t=>Qa[t])}function tc(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function nc(e,t,n,r){const o=Ae(e);let s=tc(me(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Zt)))),s}function at(e){return e.replace(/left|right|bottom|top/g,t=>Za[t])}function rc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mr(e){return typeof e!="number"?rc(e):{top:e,right:e,bottom:e,left:e}}function ct(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Nr(e,t,n){let{reference:r,floating:o}=e;const s=ye(t),a=qt(t),i=Xt(a),u=me(t),l=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let v;switch(u){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Ae(t)){case"start":v[a]-=m*(n&&l?-1:1);break;case"end":v[a]+=m*(n&&l?-1:1);break}return v}const oc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Nr(l,r,u),m=r,v={},b=0;for(let p=0;p<i.length;p++){const{name:g,fn:w}=i[p],{x:y,y:k,data:x,reset:C}=await w({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});f=y??f,d=k??d,v={...v,[g]:{...v[g],...x}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(l=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=Nr(l,m,u)),p=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:v}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=pe(t,e),b=Mr(v),g=i[m?d==="floating"?"reference":"floating":d],w=ct(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:f,strategy:u})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},C=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:u}):y);return{top:(w.top-C.top+b.top)/x.y,bottom:(C.bottom-w.bottom+b.bottom)/x.y,left:(w.left-C.left+b.left)/x.x,right:(C.right-w.right+b.right)/x.x}}const sc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:f=0}=pe(e,t)||{};if(l==null)return{};const d=Mr(f),m={x:n,y:r},v=qt(o),b=Xt(v),p=await a.getDimensions(l),g=v==="y",w=g?"top":"left",y=g?"bottom":"right",k=g?"clientHeight":"clientWidth",x=s.reference[b]+s.reference[v]-m[v]-s.floating[b],C=m[v]-s.reference[v],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=P?P[k]:0;(!E||!await(a.isElement==null?void 0:a.isElement(P)))&&(E=i.floating[k]||s.floating[b]);const T=x/2-C/2,O=E/2-p[b]/2-1,I=we(d[w],O),L=we(d[y],O),A=I,F=E-p[b]-L,S=E/2-p[b]/2+T,$=Ht(A,S,F),_=!u.arrow&&Ae(o)!=null&&S!==$&&s.reference[b]/2-(S<A?I:L)-p[b]/2<0,z=_?S<A?S-A:S-F:0;return{[v]:m[v]+z,data:{[v]:$,centerOffset:S-$-z,..._&&{alignmentOffset:z}},reset:_}}}),ic=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...g}=pe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=me(o),y=ye(i),k=me(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=m||(k||!p?[at(i)]:ec(i)),P=b!=="none";!m&&P&&C.push(...nc(i,p,b,x));const E=[i,...C],T=await Ve(t,g),O=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[w]),d){const S=Ja(o,a,x);O.push(T[S[0]],T[S[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(S=>S<=0)){var L,A;const S=(((L=s.flip)==null?void 0:L.index)||0)+1,$=E[S];if($)return{data:{index:S,overflows:I},reset:{placement:$}};let _=(A=I.filter(z=>z.overflows[0]<=0).sort((z,N)=>z.overflows[1]-N.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(v){case"bestFit":{var F;const z=(F=I.filter(N=>{if(P){const j=ye(N.placement);return j===y||j==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((N,j)=>N[1]-j[1])[0])==null?void 0:F[0];z&&(_=z);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Or(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ir(e){return qa.some(t=>e[t]>=0)}const ac=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=pe(e,t);switch(r){case"referenceHidden":{const s=await Ve(t,{...o,elementContext:"reference"}),a=Or(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ir(a)}}}case"escaped":{const s=await Ve(t,{...o,altBoundary:!0}),a=Or(s,n.floating);return{data:{escapedOffsets:a,escaped:Ir(a)}}}default:return{}}}}};async function cc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=me(n),i=Ae(n),u=ye(n)==="y",l=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,d=pe(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof b=="number"&&(v=i==="end"?b*-1:b),u?{x:v*f,y:m*l}:{x:m*l,y:v*f}}const lc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await cc(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},uc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...u}=pe(e,t),l={x:n,y:r},f=await Ve(t,u),d=ye(me(o)),m=Yt(d);let v=l[m],b=l[d];if(s){const g=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=v+f[g],k=v-f[w];v=Ht(y,v,k)}if(a){const g=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=b+f[g],k=b-f[w];b=Ht(y,b,k)}const p=i.fn({...t,[m]:v,[d]:b});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[m]:s,[d]:a}}}}}},dc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=pe(e,t),f={x:n,y:r},d=ye(o),m=Yt(d);let v=f[m],b=f[d];const p=pe(i,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const k=m==="y"?"height":"width",x=s.reference[m]-s.floating[k]+g.mainAxis,C=s.reference[m]+s.reference[k]-g.mainAxis;v<x?v=x:v>C&&(v=C)}if(l){var w,y;const k=m==="y"?"width":"height",x=["top","left"].includes(me(o)),C=s.reference[d]-s.floating[k]+(x&&((w=a.offset)==null?void 0:w[d])||0)+(x?0:g.crossAxis),P=s.reference[d]+s.reference[k]+(x?0:((y=a.offset)==null?void 0:y[d])||0)-(x?g.crossAxis:0);b<C?b=C:b>P&&(b=P)}return{[m]:v,[d]:b}}}},fc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=pe(e,t),f=await Ve(t,l),d=me(o),m=Ae(o),v=ye(o)==="y",{width:b,height:p}=s.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,g=m==="end"?"top":"bottom");const y=p-f.top-f.bottom,k=b-f.left-f.right,x=we(p-f[g],y),C=we(b-f[w],k),P=!t.middlewareData.shift;let E=x,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),P&&!m){const I=J(f.left,0),L=J(f.right,0),A=J(f.top,0),F=J(f.bottom,0);v?T=b-2*(I!==0||L!==0?I+L:J(f.left,f.right)):E=p-2*(A!==0||F!==0?A+F:J(f.top,f.bottom))}await u({...t,availableWidth:T,availableHeight:E});const O=await a.getDimensions(i.floating);return b!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function lt(){return typeof window<"u"}function Me(e){return _r(e)?(e.nodeName||"").toLowerCase():"#document"}function ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(_r(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _r(e){return lt()?e instanceof Node||e instanceof ee(e).Node:!1}function re(e){return lt()?e instanceof Element||e instanceof ee(e).Element:!1}function ae(e){return lt()?e instanceof HTMLElement||e instanceof ee(e).HTMLElement:!1}function Dr(e){return!lt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ee(e).ShadowRoot}function Ue(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pc(e){return["table","td","th"].includes(Me(e))}function ut(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Qt(e){const t=Jt(),n=re(e)?oe(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mc(e){let t=ke(e);for(;ae(t)&&!Ne(t);){if(Qt(t))return t;if(ut(t))return null;t=ke(t)}return null}function Jt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ne(e){return["html","body","#document"].includes(Me(e))}function oe(e){return ee(e).getComputedStyle(e)}function dt(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ke(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dr(e)&&e.host||ie(e);return Dr(t)?t.host:t}function Rr(e){const t=ke(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ue(t)?t:Rr(t)}function Ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ee(o);if(s){const i=en(a);return t.concat(a,a.visualViewport||[],Ue(o)?o:[],i&&n?Ge(i):[])}return t.concat(o,Ge(o,[],n))}function en(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lr(e){const t=oe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=st(n)!==s||st(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function tn(e){return re(e)?e:e.contextElement}function Oe(e){const t=tn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Lr(t);let a=(s?st(n.width):n.width)/r,i=(s?st(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const hc=se(0);function Fr(e){const t=ee(e);return!Jt()||!t.visualViewport?hc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ee(e)?!1:t}function Ee(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=tn(e);let a=se(1);t&&(r?re(r)&&(a=Oe(r)):a=Oe(e));const i=gc(s,n,r)?Fr(s):se(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const m=ee(s),v=r&&re(r)?ee(r):r;let b=m,p=en(b);for(;p&&r&&v!==b;){const g=Oe(p),w=p.getBoundingClientRect(),y=oe(p),k=w.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,x=w.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,l*=g.y,f*=g.x,d*=g.y,u+=k,l+=x,b=ee(p),p=en(b)}}return ct({width:f,height:d,x:u,y:l})}function nn(e,t){const n=dt(e).scrollLeft;return t?t.left+n:Ee(ie(e)).left+n}function $r(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:nn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function vc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ie(r),i=t?ut(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=se(1);const f=se(0),d=ae(r);if((d||!d&&!s)&&((Me(r)!=="body"||Ue(a))&&(u=dt(r)),ae(r))){const v=Ee(r);l=Oe(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=a&&!d&&!s?$r(a,u,!0):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+m.x,y:n.y*l.y-u.scrollTop*l.y+f.y+m.y}}function bc(e){return Array.from(e.getClientRects())}function wc(e){const t=ie(e),n=dt(e),r=e.ownerDocument.body,o=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nn(e);const i=-n.scrollTop;return oe(r).direction==="rtl"&&(a+=J(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function yc(e,t){const n=ee(e),r=ie(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Jt();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function kc(e,t){const n=Ee(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ae(e)?Oe(e):se(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function zr(e,t,n){let r;if(t==="viewport")r=yc(e,n);else if(t==="document")r=wc(ie(e));else if(re(t))r=kc(t,n);else{const o=Fr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(r)}function Wr(e,t){const n=ke(e);return n===t||!re(n)||Ne(n)?!1:oe(n).position==="fixed"||Wr(n,t)}function xc(e,t){const n=t.get(e);if(n)return n;let r=Ge(e,[],!1).filter(i=>re(i)&&Me(i)!=="body"),o=null;const s=oe(e).position==="fixed";let a=s?ke(e):e;for(;re(a)&&!Ne(a);){const i=oe(a),u=Qt(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ue(a)&&!u&&Wr(e,a))?r=r.filter(f=>f!==a):o=i,a=ke(a)}return t.set(e,r),r}function Cc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ut(t)?[]:xc(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,f)=>{const d=zr(t,f,o);return l.top=J(d.top,l.top),l.right=we(d.right,l.right),l.bottom=we(d.bottom,l.bottom),l.left=J(d.left,l.left),l},zr(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ec(e){const{width:t,height:n}=Lr(e);return{width:t,height:n}}function Sc(e,t,n){const r=ae(t),o=ie(t),s=n==="fixed",a=Ee(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=se(0);if(r||!r&&!s)if((Me(t)!=="body"||Ue(o))&&(i=dt(t)),r){const m=Ee(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=nn(o));const l=o&&!r&&!s?$r(o,i):se(0),f=a.left+i.scrollLeft-u.x-l.x,d=a.top+i.scrollTop-u.y-l.y;return{x:f,y:d,width:a.width,height:a.height}}function rn(e){return oe(e).position==="static"}function Br(e,t){if(!ae(e)||oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ie(e)===n&&(n=n.ownerDocument.body),n}function Vr(e,t){const n=ee(e);if(ut(e))return n;if(!ae(e)){let o=ke(e);for(;o&&!Ne(o);){if(re(o)&&!rn(o))return o;o=ke(o)}return n}let r=Br(e,t);for(;r&&pc(r)&&rn(r);)r=Br(r,t);return r&&Ne(r)&&rn(r)&&!Qt(r)?n:r||mc(e)||n}const jc=async function(e){const t=this.getOffsetParent||Vr,n=this.getDimensions,r=await n(e.floating);return{reference:Sc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pc(e){return oe(e).direction==="rtl"}const Tc={convertOffsetParentRelativeRectToViewportRelativeRect:vc,getDocumentElement:ie,getClippingRect:Cc,getOffsetParent:Vr,getElementRects:jc,getClientRects:bc,getDimensions:Ec,getScale:Oe,isElement:re,isRTL:Pc};function Ac(e,t){let n=null,r;const o=ie(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const{left:l,top:f,width:d,height:m}=e.getBoundingClientRect();if(i||t(),!d||!m)return;const v=it(f),b=it(o.clientWidth-(l+d)),p=it(o.clientHeight-(f+m)),g=it(l),y={rootMargin:-v+"px "+-b+"px "+-p+"px "+-g+"px",threshold:J(0,we(1,u))||1};let k=!0;function x(C){const P=C[0].intersectionRatio;if(P!==u){if(!k)return a();P?a(!1,P):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return a(!0),s}function Mc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=tn(e),f=o||s?[...l?Ge(l):[],...Ge(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=l&&i?Ac(l,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(w=>{let[y]=w;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let b,p=u?Ee(e):null;u&&g();function g(){const w=Ee(e);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&n(),p=w,b=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const Nc=lc,Oc=uc,Ic=ic,_c=fc,Dc=ac,Ur=sc,Rc=dc,Lc=(e,t,n)=>{const r=new Map,o={platform:Tc,...n},s={...o.platform,_c:r};return oc(e,t,{...o,platform:s})};var ft=typeof document<"u"?G.useLayoutEffect:G.useEffect;function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr(e,t){const n=Gr(e);return Math.round(t*n)/n}function on(e){const t=c.useRef(e);return ft(()=>{t.current=e}),t}function Fc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=c.useState(r);pt(m,r)||v(r);const[b,p]=c.useState(null),[g,w]=c.useState(null),y=c.useCallback(N=>{N!==P.current&&(P.current=N,p(N))},[]),k=c.useCallback(N=>{N!==E.current&&(E.current=N,w(N))},[]),x=s||b,C=a||g,P=c.useRef(null),E=c.useRef(null),T=c.useRef(f),O=u!=null,I=on(u),L=on(o),A=on(l),F=c.useCallback(()=>{if(!P.current||!E.current)return;const N={placement:t,strategy:n,middleware:m};L.current&&(N.platform=L.current),Lc(P.current,E.current,N).then(j=>{const W={...j,isPositioned:A.current!==!1};S.current&&!pt(T.current,W)&&(T.current=W,rt.flushSync(()=>{d(W)}))})},[m,t,n,L,A]);ft(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[l]);const S=c.useRef(!1);ft(()=>(S.current=!0,()=>{S.current=!1}),[]),ft(()=>{if(x&&(P.current=x),C&&(E.current=C),x&&C){if(I.current)return I.current(x,C,F);F()}},[x,C,F,I,O]);const $=c.useMemo(()=>({reference:P,floating:E,setReference:y,setFloating:k}),[y,k]),_=c.useMemo(()=>({reference:x,floating:C}),[x,C]),z=c.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const j=Kr(_.floating,f.x),W=Kr(_.floating,f.y);return i?{...N,transform:"translate("+j+"px, "+W+"px)",...Gr(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:W}},[n,i,_.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:F,refs:$,elements:_,floatingStyles:z}),[f,F,$,_,z])}const $c=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ur({element:r.current,padding:o}).fn(n):{}:r?Ur({element:r,padding:o}).fn(n):{}}}},zc=(e,t)=>({...Nc(e),options:[e,t]}),Wc=(e,t)=>({...Oc(e),options:[e,t]}),Bc=(e,t)=>({...Rc(e),options:[e,t]}),Vc=(e,t)=>({...Ic(e),options:[e,t]}),Uc=(e,t)=>({..._c(e),options:[e,t]}),Gc=(e,t)=>({...Dc(e),options:[e,t]}),Kc=(e,t)=>({...$c(e),options:[e,t]});var Hc="Arrow",Hr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(X.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hr.displayName=Hc;var Yc=Hr;function Yr(e){const[t,n]=c.useState(void 0);return Q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sn="Popper",[Xr,qr]=de(sn),[Xc,Zr]=Xr(sn),Qr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(Xc,{scope:t,anchor:r,onAnchorChange:o,children:n})};Qr.displayName=sn;var Jr="PopperAnchor",eo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Zr(Jr,n),a=c.useRef(null),i=K(t,a);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.jsx(X.div,{...o,ref:i})});eo.displayName=Jr;var an="PopperContent",[qc,Zc]=Xr(an),to=c.forwardRef((e,t)=>{var he,et,ne,tt,Di,Ri;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...p}=e,g=Zr(an,n),[w,y]=c.useState(null),k=K(t,nt=>y(nt)),[x,C]=c.useState(null),P=Yr(x),E=(P==null?void 0:P.width)??0,T=(P==null?void 0:P.height)??0,O=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(l)?l:[l],A=L.length>0,F={padding:I,boundary:L.filter(Jc),altBoundary:A},{refs:S,floatingStyles:$,placement:_,isPositioned:z,middlewareData:N}=Fc({strategy:"fixed",placement:O,whileElementsMounted:(...nt)=>Mc(...nt,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[zc({mainAxis:o+T,alignmentAxis:a}),u&&Wc({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Bc():void 0,...F}),u&&Vc({...F}),Uc({...F,apply:({elements:nt,rects:Li,availableWidth:_f,availableHeight:Df})=>{const{width:Rf,height:Lf}=Li.reference,_t=nt.floating.style;_t.setProperty("--radix-popper-available-width",`${_f}px`),_t.setProperty("--radix-popper-available-height",`${Df}px`),_t.setProperty("--radix-popper-anchor-width",`${Rf}px`),_t.setProperty("--radix-popper-anchor-height",`${Lf}px`)}}),x&&Kc({element:x,padding:i}),el({arrowWidth:E,arrowHeight:T}),m&&Gc({strategy:"referenceHidden",...F})]}),[j,W]=oo(_),B=H(b);Q(()=>{z&&(B==null||B())},[z,B]);const Z=(he=N.arrow)==null?void 0:he.x,ue=(et=N.arrow)==null?void 0:et.y,Ce=((ne=N.arrow)==null?void 0:ne.centerOffset)!==0,[It,je]=c.useState();return Q(()=>{w&&je(window.getComputedStyle(w).zIndex)},[w]),h.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:It,"--radix-popper-transform-origin":[(tt=N.transformOrigin)==null?void 0:tt.x,(Di=N.transformOrigin)==null?void 0:Di.y].join(" "),...((Ri=N.hide)==null?void 0:Ri.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(qc,{scope:n,placedSide:j,onArrowChange:C,arrowX:Z,arrowY:ue,shouldHideArrow:Ce,children:h.jsx(X.div,{"data-side":j,"data-align":W,...p,ref:k,style:{...p.style,animation:z?void 0:"none"}})})})});to.displayName=an;var no="PopperArrow",Qc={top:"bottom",right:"left",bottom:"top",left:"right"},ro=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Zc(no,r),a=Qc[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(Yc,{...o,ref:n,style:{...o.style,display:"block"}})})});ro.displayName=no;function Jc(e){return e!==null}var el=e=>({name:"transformOrigin",options:e,fn(t){var g,w,y;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,f]=oo(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,v=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let b="",p="";return l==="bottom"?(b=a?d:`${m}px`,p=`${-u}px`):l==="top"?(b=a?d:`${m}px`,p=`${r.floating.height+u}px`):l==="right"?(b=`${-u}px`,p=a?d:`${v}px`):l==="left"&&(b=`${r.floating.width+u}px`,p=a?d:`${v}px`),{data:{x:b,y:p}}}});function oo(e){const[t,n="center"]=e.split("-");return[t,n]}var so=Qr,tl=eo,nl=to,rl=ro,ol="Portal",io=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(X.div,{...r,ref:t}),a):null});io.displayName=ol;function sl(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ke=e=>{const{present:t,children:n}=e,r=il(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,al(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ke.displayName="Presence";function il(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=sl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=mt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=mt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=mt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=mt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function mt(e){return(e==null?void 0:e.animationName)||"none"}function al(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cn="rovingFocusGroup.onEntryFocus",cl={bubbles:!1,cancelable:!0},ht="RovingFocusGroup",[ln,ao,ll]=mr(ht),[ul,co]=de(ht,[ll]),[dl,fl]=ul(ht),lo=c.forwardRef((e,t)=>h.jsx(ln.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(ln.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(pl,{...e,ref:t})})}));lo.displayName=ht;var pl=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...d}=e,m=c.useRef(null),v=K(t,m),b=gr(s),[p=null,g]=We({prop:a,defaultProp:i,onChange:u}),[w,y]=c.useState(!1),k=H(l),x=ao(n),C=c.useRef(!1),[P,E]=c.useState(0);return c.useEffect(()=>{const T=m.current;if(T)return T.addEventListener(cn,k),()=>T.removeEventListener(cn,k)},[k]),h.jsx(dl,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:c.useCallback(T=>g(T),[g]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:c.useCallback(()=>E(T=>T-1),[]),children:h.jsx(X.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{C.current=!0}),onFocus:M(e.onFocus,T=>{const O=!C.current;if(T.target===T.currentTarget&&O&&!w){const I=new CustomEvent(cn,cl);if(T.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=x().filter(_=>_.focusable),A=L.find(_=>_.active),F=L.find(_=>_.id===p),$=[A,F,...L].filter(Boolean).map(_=>_.ref.current);po($,f)}}C.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),uo="RovingFocusGroupItem",fo=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...a}=e,i=Be(),u=s||i,l=fl(uo,n),f=l.currentTabStopId===u,d=ao(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=l;return c.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),h.jsx(ln.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(X.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:M(e.onMouseDown,b=>{r?l.onItemFocus(u):b.preventDefault()}),onFocus:M(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:M(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){l.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=gl(b,l.orientation,l.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=d().filter(y=>y.focusable).map(y=>y.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const y=w.indexOf(b.currentTarget);w=l.loop?vl(w,y+1):w.slice(y+1)}setTimeout(()=>po(w))}})})})});fo.displayName=uo;var ml={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gl(e,t,n){const r=hl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ml[r]}function po(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bl=lo,wl=fo,yl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ie=new WeakMap,gt=new WeakMap,vt={},un=0,mo=function(e){return e&&(e.host||mo(e.parentNode))},kl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=mo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xl=function(e,t,n,r){var o=kl(t,Array.isArray(e)?e:[e]);vt[n]||(vt[n]=new WeakMap);var s=vt[n],a=[],i=new Set,u=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))f(m);else try{var v=m.getAttribute(r),b=v!==null&&v!=="false",p=(Ie.get(m)||0)+1,g=(s.get(m)||0)+1;Ie.set(m,p),s.set(m,g),a.push(m),p===1&&b&&gt.set(m,!0),g===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return f(t),i.clear(),un++,function(){a.forEach(function(d){var m=Ie.get(d)-1,v=s.get(d)-1;Ie.set(d,m),s.set(d,v),m||(gt.has(d)||d.removeAttribute(r),gt.delete(d)),v||d.removeAttribute(n)}),un--,un||(Ie=new WeakMap,Ie=new WeakMap,gt=new WeakMap,vt={})}},Cl=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),xl(r,o,n,"aria-hidden")):function(){return null}},ce=function(){return ce=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ce.apply(this,arguments)};function ho(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function El(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bt="right-scroll-bar-position",wt="width-before-scroll-bar",Sl="with-scroll-bars-hidden",jl="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pl(e,t){var n=G.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Tl=typeof window<"u"?c.useLayoutEffect:c.useEffect,go=new WeakMap;function Al(e,t){var n=Pl(null,function(r){return e.forEach(function(o){return dn(o,r)})});return Tl(function(){var r=go.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){o.has(i)||dn(i,a)})}go.set(n,e)},[e]),n}function Ml(e){return e}function Nl(e,t){t===void 0&&(t=Ml);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var f=a;a=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function Ol(e){e===void 0&&(e={});var t=Nl(null);return t.options=ce({async:!0,ssr:!1},e),t}var vo=function(e){var t=e.sideCar,n=ho(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,ce({},n))};vo.isSideCarExport=!0;function Il(e,t){return e.useMedium(t),vo}var bo=Ol(),fn=function(){},yt=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,p=e.allowPinchZoom,g=e.as,w=g===void 0?"div":g,y=e.gapMode,k=ho(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,C=Al([n,t]),P=ce(ce({},k),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:bo,removeScrollBar:l,shards:d,noIsolation:v,inert:b,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),ce(ce({},P),{ref:C})):c.createElement(w,ce({},P,{className:u,ref:C}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yt.classNames={fullWidth:wt,zeroRight:bt};var _l=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_l();return t&&e.setAttribute("nonce",t),e}function Rl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ll(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Dl())&&(Rl(t,n),Ll(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$l=function(){var e=Fl();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wo=function(){var e=$l(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},zl={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Wl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pn(n),pn(r),pn(o)]},Bl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zl;var t=Wl(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vl=wo(),_e="data-scroll-locked",Ul=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Sl,` {
1
+ (function(_,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],m):(_=typeof globalThis<"u"?globalThis:_||self,m(_["keeper-js-ui"]={},_["react/jsx-runtime"],_.React,_.ReactDOM))})(this,function(_,m,K,ht){"use strict";function kr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=kr(K),$e=kr(ht);function Uc(e,t){const n=c.createContext(t),r=s=>{const{children:a,...i}=s,u=c.useMemo(()=>i,Object.values(i));return m.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ne(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const l=f=>{var b;const{scope:h,children:v,...y}=f,p=((b=h==null?void 0:h[e])==null?void 0:b[u])||i,g=c.useMemo(()=>y,Object.values(y));return m.jsx(p.Provider,{value:g,children:v})};l.displayName=s+"Provider";function d(f,h){var p;const v=((p=h==null?void 0:h[e])==null?void 0:p[u])||i,y=c.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=(i==null?void 0:i[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,zc(o,...t)]}function zc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const f=u(s)[`__scope${l}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function H(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Y=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function Cr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vt(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Cr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Cr(e[o],null)}}}}function F(...e){return c.useCallback(vt(...e),e)}var X=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),s=o.find(Vc);if(s){const a=s.props.children,i=o.map(u=>u===s?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:u);return m.jsx(en,{...r,ref:t,children:c.isValidElement(a)?c.cloneElement(a,void 0,i):null})}return m.jsx(en,{...r,ref:t,children:n})});X.displayName="Slot";var en=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Gc(n),s=Hc(r,n.props);return n.type!==c.Fragment&&(s.ref=t?vt(t,o):o),c.cloneElement(n,s)}return c.Children.count(n)>1?c.Children.only(null):null});en.displayName="SlotClone";var tn=({children:e})=>m.jsx(m.Fragment,{children:e});function Vc(e){return c.isValidElement(e)&&e.type===tn}function Hc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Gc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],nn=Kc.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),rn="Avatar",[Yc,ev]=ne(rn),[Xc,Pr]=Yc(rn),Tr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=c.useState("idle");return m.jsx(Xc,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:m.jsx(nn.span,{...r,ref:t})})});Tr.displayName=rn;var Sr="AvatarImage",Nr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=Pr(Sr,n),i=qc(r,s.referrerPolicy),u=H(l=>{o(l),a.onImageLoadingStatusChange(l)});return Y(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?m.jsx(nn.img,{...s,ref:t,src:r}):null});Nr.displayName=Sr;var Ar="AvatarFallback",jr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Pr(Ar,n),[a,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&s.imageLoadingStatus!=="loaded"?m.jsx(nn.span,{...o,ref:t}):null});jr.displayName=Ar;function qc(e,t){const[n,r]=c.useState("idle");return Y(()=>{if(!e){r("error");return}let o=!0;const s=new window.Image,a=i=>()=>{o&&r(i)};return r("loading"),s.onload=a("loaded"),s.onerror=a("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var Mr=Tr,Or=Nr,Dr=jr;function _r(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=_r(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ir(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=_r(e))&&(r&&(r+=" "),r+=t);return r}const Rr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Lr=Ir,Ze=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lr(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const d=n==null?void 0:n[l],f=s==null?void 0:s[l];if(d===null)return null;const h=Rr(d)||Rr(f);return o[l][h]}),i=n&&Object.entries(n).reduce((l,d)=>{let[f,h]=d;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:f,className:h,...v}=d;return Object.entries(v).every(y=>{let[p,g]=y;return Array.isArray(g)?g.includes({...s,...i}[p]):{...s,...i}[p]===g})?[...l,f,h]:l},[]);return Lr(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},on="-",Zc=e=>{const t=Jc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(on);return i[0]===""&&i.length!==1&&i.shift(),$r(i,t)||Qc(a)},getConflictingClassGroupIds:(a,i)=>{const u=n[a]||[];return i&&r[a]?[...u,...r[a]]:u}}},$r=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$r(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(on);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},Fr=/^\[(.+)\]$/,Qc=e=>{if(Fr.test(e)){const t=Fr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Jc=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return tl(Object.entries(e.classGroups),n).forEach(([s,a])=>{sn(a,r,s,t)}),r},sn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Wr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(el(o)){sn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{sn(a,Wr(t,s),n,r)})})},Wr=(e,t)=>{let n=e;return t.split(on).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},el=e=>e.isThemeGetter,tl=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[t+a,i])):s);return[n,o]}):e,nl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Br="!",rl=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=i=>{const u=[];let l=0,d=0,f;for(let g=0;g<i.length;g++){let b=i[g];if(l===0){if(b===o&&(r||i.slice(g,g+s)===t)){u.push(i.slice(d,g)),d=g+s;continue}if(b==="/"){f=g;continue}}b==="["?l++:b==="]"&&l--}const h=u.length===0?i:i.substring(d),v=h.startsWith(Br),y=v?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:p}};return n?i=>n({className:i,parseClassName:a}):a},ol=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},sl=e=>({cache:nl(e.cacheSize),parseClassName:rl(e),...Zc(e)}),il=/\s+/,al=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(il);let i="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:v}=n(l);let y=!!v,p=r(y?h.substring(0,v):h);if(!p){if(!y){i=l+(i.length>0?" "+i:i);continue}if(p=r(h),!p){i=l+(i.length>0?" "+i:i);continue}y=!1}const g=ol(d).join(":"),b=f?g+Br:g,w=b+p;if(s.includes(w))continue;s.push(w);const E=o(p,y);for(let x=0;x<E.length;++x){const C=E[x];s.push(b+C)}i=l+(i.length>0?" "+i:i)}return i};function cl(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ur(t))&&(r&&(r+=" "),r+=n);return r}const Ur=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ur(e[r]))&&(n&&(n+=" "),n+=t);return n};function zr(e,...t){let n,r,o,s=a;function a(u){const l=t.reduce((d,f)=>f(d),e());return n=sl(l),r=n.cache.get,o=n.cache.set,s=i,i(u)}function i(u){const l=r(u);if(l)return l;const d=al(u,n);return o(u,d),d}return function(){return s(cl.apply(null,arguments))}}const G=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vr=/^\[(?:([a-z-]+):)?(.+)\]$/i,ll=/^\d+\/\d+$/,ul=new Set(["px","full","screen"]),dl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fl=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ml=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ve=e=>Fe(e)||ul.has(e)||ll.test(e),ke=e=>We(e,"length",kl),Fe=e=>!!e&&!Number.isNaN(Number(e)),an=e=>We(e,"number",Fe),Qe=e=>!!e&&Number.isInteger(Number(e)),vl=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),R=e=>Vr.test(e),Ce=e=>dl.test(e),gl=new Set(["length","size","percentage"]),yl=e=>We(e,gl,Hr),bl=e=>We(e,"position",Hr),wl=new Set(["image","url"]),xl=e=>We(e,wl,Pl),El=e=>We(e,"",Cl),Je=()=>!0,We=(e,t,n)=>{const r=Vr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},kl=e=>fl.test(e)&&!pl.test(e),Hr=()=>!1,Cl=e=>ml.test(e),Pl=e=>hl.test(e),Gr=()=>{const e=G("colors"),t=G("spacing"),n=G("blur"),r=G("brightness"),o=G("borderColor"),s=G("borderRadius"),a=G("borderSpacing"),i=G("borderWidth"),u=G("contrast"),l=G("grayscale"),d=G("hueRotate"),f=G("invert"),h=G("gap"),v=G("gradientColorStops"),y=G("gradientColorStopPositions"),p=G("inset"),g=G("margin"),b=G("opacity"),w=G("padding"),E=G("saturate"),x=G("scale"),C=G("sepia"),P=G("skew"),k=G("space"),T=G("translate"),D=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",R,t],j=()=>[R,t],L=()=>["",ve,ke],S=()=>["auto",Fe,R],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",R],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Fe,R];return{cacheSize:500,separator:":",theme:{colors:[Je],spacing:[ve,ke],blur:["none","",Ce,R],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ce,R],borderSpacing:j(),borderWidth:L(),contrast:z(),grayscale:N(),hueRotate:z(),invert:N(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[vl,ke],inset:$(),margin:$(),opacity:z(),padding:j(),saturate:z(),scale:z(),sepia:N(),skew:z(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",R]}],container:["container"],columns:[{columns:[Ce]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),R]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qe,R]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",R]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",Qe,R]}],"grid-cols":[{"grid-cols":[Je]}],"col-start-end":[{col:["auto",{span:["full",Qe,R]},R]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Je]}],"row-start-end":[{row:["auto",{span:[Qe,R]},R]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",R]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",R]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",R,t]}],"min-w":[{"min-w":[R,t,"min","max","fit"]}],"max-w":[{"max-w":[R,t,"none","full","min","max","fit","prose",{screen:[Ce]},Ce]}],h:[{h:[R,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[R,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ce,ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",an]}],"font-family":[{font:[Je]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",R]}],"line-clamp":[{"line-clamp":["none",Fe,an]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ve,R]}],"list-image":[{"list-image":["none",R]}],"list-style-type":[{list:["none","disc","decimal",R]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ve,ke]}],"underline-offset":[{"underline-offset":["auto",ve,R]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),bl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:I()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[ve,R]}],"outline-w":[{outline:[ve,ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ve,ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ce,El]}],"shadow-color":[{shadow:[Je]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ce,R]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[E]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",R]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",R]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",R]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Qe,R]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",R]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ve,ke,an]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Tl=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:s={},override:a={}})=>{et(e,"cacheSize",t),et(e,"prefix",n),et(e,"separator",r),et(e,"experimentalParseClassName",o);for(const i in a)Sl(e[i],a[i]);for(const i in s)Nl(e[i],s[i]);return e},et=(e,t,n)=>{n!==void 0&&(e[t]=n)},Sl=(e,t)=>{if(t)for(const n in t)et(e,n,t[n])},Nl=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Al=((e,...t)=>typeof e=="function"?zr(Gr,e,...t):zr(()=>Tl(Gr(),e),...t))({prefix:"ksjsui-"});function U(...e){return Al(Ir(e))}const Kr=["#E60060","#ED0C0C","#B20000","#CC4400","#558000","#008A22","#006600","#004C40","#008099","#0059B2","#0070F0","#0022FF","#6619FF","#9900E5","#747474","#191919"],jl=Ze(["ksjsui-relative ksjsui-flex ksjsui-shrink-0 ksjsui-overflow-hidden ksjsui-rounded-full"],{variants:{size:{sm:"ksjsui-size-8",md:"ksjsui-size-9",lg:"ksjsui-size-10"}},defaultVariants:{size:"md"}}),Yr=c.forwardRef(({className:e,size:t,...n},r)=>m.jsx(Mr,{ref:r,className:U(jl({size:t,className:e})),...n}));Yr.displayName=Mr.displayName;const Xr=c.forwardRef(({className:e,...t},n)=>m.jsx(Or,{ref:n,className:U("ksjsui-aspect-square ksjsui-size-full",e),...t}));Xr.displayName=Or.displayName;const qr=c.forwardRef(({className:e,...t},n)=>{var r;return m.jsx(Dr,{ref:n,className:U("ksjsui-flex ksjsui-size-full ksjsui-items-center ksjsui-justify-center ksjsui-rounded-full ksjsui-bg-muted",e),style:{...Ml((r=t.children)==null?void 0:r.toString(),Kr)},...t})});qr.displayName=Dr.displayName;function Ml(e="",t=Kr){const n=e.substring(0,2),r=Ol(n)%t.length,o=t[r],s=Dl(o);return{backgroundColor:o,color:s}}function Ol(e){const t=e.substring(0,2);return t.split("").reduce((r,o,s)=>r+t.charCodeAt(s),0)}function Dl(e){return e==="#fff"?"#000":"#fff"}const _l=Ze(["ksjsui-text-base ksjsui-inline-flex ksjsui-items-center ksjsui-justify-center ksjsui-whitespace-nowrap ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-p-2 ksjsui-ring-offset-background ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-bg-disabled disabled:ksjsui-text-disabled-foreground","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-bg-button-face forced-colors:ksjsui-text-button-text","forced-colors:hover:ksjsui-border-highlight","forced-colors:disabled:ksjsui-border-gray-text","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-shrink-0"],{variants:{variant:{solid:"",outline:"ksjsui-border-current ksjsui-text-secondary hover:ksjsui-bg-neutral-hover",plain:"ksjsui-bg-transparent",link:"ksjsui-underline-current ksjsui-h-auto ksjsui-p-0 ksjsui-text-secondary hover:ksjsui-underline",avatar:"ksjsui-rounded-full ksjsui-border-0 ksjsui-p-0"},color:{neutral:"",primary:"",secondary:"",destructive:""},fullWidth:{true:"ksjsui-w-full"},iconOnly:{true:"ksjsui-icon-only [&.ksjsui-icon-only_svg]:ksjsui-size-6"},radius:{full:"ksjsui-rounded-full"},size:{sm:"ksjsui-h-8 [&_svg]:ksjsui-size-5",md:"ksjsui-h-9 [&_svg]:ksjsui-size-5",lg:"ksjsui-h-10 [&_svg]:ksjsui-size-6"}},defaultVariants:{variant:"solid",color:"neutral",fullWidth:!1,size:"md"},compoundVariants:[{variant:"solid",color:"neutral",className:"ksjsui-bg-neutral ksjsui-text-neutral-foreground hover:ksjsui-bg-neutral-hover"},{variant:"solid",color:"primary",className:"ksjsui-bg-primary ksjsui-text-primary-foreground hover:ksjsui-bg-primary-hover"},{variant:"solid",color:"secondary",className:"ksjsui-bg-secondary ksjsui-text-secondary-foreground hover:ksjsui-bg-secondary-hover"},{variant:"solid",color:"destructive",className:"ksjsui-bg-destructive ksjsui-text-destructive-foreground hover:ksjsui-bg-destructive-hover"},{variant:["outline","plain","link"],color:"neutral",className:"ksjsui-text-neutral-foreground"},{variant:["outline","plain","link"],color:"primary",className:"ksjsui-text-primary"},{variant:["outline","plain","link"],color:"secondary",className:"ksjsui-text-secondary"},{variant:["outline","plain","link"],color:"destructive",className:"ksjsui-text-destructive"},{iconOnly:!0,size:"sm",className:"ksjsui-size-8"},{iconOnly:!0,size:"md",className:"ksjsui-size-9"},{iconOnly:!0,size:"lg",className:"ksjsui-size-10"}]}),cn=c.forwardRef(({className:e,endContent:t,startContent:n,variant:r,color:o,fullWidth:s,iconOnly:a,radius:i,size:u,asChild:l,children:d,tabIndex:f=0,...h},v)=>{const y=l?X:"button";return m.jsxs(y,{className:U(_l({variant:r,color:o,fullWidth:s,iconOnly:a,radius:i,size:u,className:e})),ref:v,tabIndex:f,...h,children:[n&&m.jsx("span",{className:"ksjsui-me-2",children:n}),m.jsx(tn,{children:d}),t&&m.jsx("span",{className:"ksjsui-ms-2",children:t})]})});cn.displayName="Button";function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Il=c.useId||(()=>{}),Rl=0;function ge(e){const[t,n]=c.useState(Il());return Y(()=>{n(r=>r??String(Rl++))},[e]),t?`radix-${t}`:""}function De({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Ll({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=H(n),u=c.useCallback(l=>{if(s){const f=typeof l=="function"?l(e):l;f!==e&&i(f)}else o(l)},[s,e,o,i]);return[a,u]}function Ll({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),s=H(t);return c.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var $l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ye=$l.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Fl(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function gt(e,t=globalThis==null?void 0:globalThis.document){const n=H(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Wl="DismissableLayer",ln="dismissableLayer.update",Bl="dismissableLayer.pointerDownOutside",Ul="dismissableLayer.focusOutside",Zr,Qr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jr=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(Qr),[d,f]=c.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),y=F(t,k=>f(k)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=d?p.indexOf(d):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,C=Hl(k=>{const T=k.target,D=[...l.branches].some(O=>O.contains(T));!x||D||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},h),P=Gl(k=>{const T=k.target;[...l.branches].some(O=>O.contains(T))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},h);return gt(k=>{w===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Zr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),eo(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Zr)}},[d,h,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),eo())},[d,l]),c.useEffect(()=>{const k=()=>v({});return document.addEventListener(ln,k),()=>document.removeEventListener(ln,k)},[]),m.jsx(ye.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,C.onPointerDownCapture)})});Jr.displayName=Wl;var zl="DismissableLayerBranch",Vl=c.forwardRef((e,t)=>{const n=c.useContext(Qr),r=c.useRef(null),o=F(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(ye.div,{...e,ref:o})});Vl.displayName=zl;function Hl(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){to(Bl,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gl(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&to(Ul,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eo(){const e=new CustomEvent(ln);document.dispatchEvent(e)}function to(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fl(o,s):o.dispatchEvent(s)}var un="focusScope.autoFocusOnMount",dn="focusScope.autoFocusOnUnmount",no={bubbles:!1,cancelable:!0},Kl="FocusScope",ro=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),l=H(o),d=H(s),f=c.useRef(null),h=F(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(E){if(v.paused||!i)return;const x=E.target;i.contains(x)?f.current=x:Pe(f.current,{select:!0})},g=function(E){if(v.paused||!i)return;const x=E.relatedTarget;x!==null&&(i.contains(x)||Pe(f.current,{select:!0}))},b=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&Pe(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),w.disconnect()}}},[r,i,v.paused]),c.useEffect(()=>{if(i){io.add(v);const p=document.activeElement;if(!i.contains(p)){const b=new CustomEvent(un,no);i.addEventListener(un,l),i.dispatchEvent(b),b.defaultPrevented||(Yl(Jl(oo(i)),{select:!0}),document.activeElement===p&&Pe(i))}return()=>{i.removeEventListener(un,l),setTimeout(()=>{const b=new CustomEvent(dn,no);i.addEventListener(dn,d),i.dispatchEvent(b),b.defaultPrevented||Pe(p??document.body,{select:!0}),i.removeEventListener(dn,d),io.remove(v)},0)}}},[i,l,d,v]);const y=c.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const w=p.currentTarget,[E,x]=Xl(w);E&&x?!p.shiftKey&&b===x?(p.preventDefault(),n&&Pe(E,{select:!0})):p.shiftKey&&b===E&&(p.preventDefault(),n&&Pe(x,{select:!0})):b===w&&p.preventDefault()}},[n,r,v.paused]);return m.jsx(ye.div,{tabIndex:-1,...a,ref:h,onKeyDown:y})});ro.displayName=Kl;function Yl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}function Xl(e){const t=oo(e),n=so(t,e),r=so(t.reverse(),e);return[n,r]}function oo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function so(e,t){for(const n of e)if(!ql(n,{upTo:t}))return n}function ql(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 Zl(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zl(e)&&t&&e.select()}}var io=Ql();function Ql(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ao(e,t),e.unshift(t)},remove(t){var n;e=ao(e,t),(n=e[0])==null||n.resume()}}}function ao(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jl(e){return e.filter(t=>t.tagName!=="A")}var eu="Portal",co=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Y(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ht.createPortal(m.jsx(ye.div,{...r,ref:t}),a):null});co.displayName=eu;function tu(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var yt=e=>{const{present:t,children:n}=e,r=nu(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=F(r.ref,ru(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};yt.displayName="Presence";function nu(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=tu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=bt(r.current);s.current=i==="mounted"?l:"none"},[i]),Y(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,v=bt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=v=>{const p=bt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=bt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function bt(e){return(e==null?void 0:e.animationName)||"none"}function ru(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn=0;function lo(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uo()),document.body.insertAdjacentElement("beforeend",e[1]??uo()),fn++,()=>{fn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fn--}},[])}function uo(){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 ue=function(){return ue=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ue.apply(this,arguments)};function fo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ou(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var wt="right-scroll-bar-position",xt="width-before-scroll-bar",su="with-scroll-bars-hidden",iu="--removed-body-scroll-bar-size";function pn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function au(e,t){var n=K.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var cu=typeof window<"u"?c.useLayoutEffect:c.useEffect,po=new WeakMap;function lu(e,t){var n=au(null,function(r){return e.forEach(function(o){return pn(o,r)})});return cu(function(){var r=po.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||pn(i,null)}),s.forEach(function(i){o.has(i)||pn(i,a)})}po.set(n,e)},[e]),n}function uu(e){return e}function du(e,t){t===void 0&&(t=uu);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var d=a;a=[],d.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){a.push(d),l()},filter:function(d){return a=a.filter(d),n}}}};return o}function fu(e){e===void 0&&(e={});var t=du(null);return t.options=ue({async:!0,ssr:!1},e),t}var mo=function(e){var t=e.sideCar,n=fo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,ue({},n))};mo.isSideCarExport=!0;function pu(e,t){return e.useMedium(t),mo}var ho=fu(),mn=function(){},Et=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:mn,onWheelCapture:mn,onTouchMoveCapture:mn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noIsolation,y=e.inert,p=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,E=fo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=h,C=lu([n,t]),P=ue(ue({},E),o);return c.createElement(c.Fragment,null,d&&c.createElement(x,{sideCar:ho,removeScrollBar:l,shards:f,noIsolation:v,inert:y,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:w}),a?c.cloneElement(c.Children.only(i),ue(ue({},P),{ref:C})):c.createElement(b,ue({},P,{className:u,ref:C}),i))});Et.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Et.classNames={fullWidth:xt,zeroRight:wt};var mu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mu();return t&&e.setAttribute("nonce",t),e}function vu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hu())&&(vu(t,n),gu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bu=function(){var e=yu();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vo=function(){var e=bu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},wu={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},xu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[hn(n),hn(r),hn(o)]},Eu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wu;var t=xu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ku=vo(),Be="data-scroll-locked",Cu=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(su,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(i,"px ").concat(r,`;
5
5
  }
6
- body[`).concat(_e,`] {
6
+ body[`).concat(Be,`] {
7
7
  overflow: hidden `).concat(r,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -16,66 +16,70 @@
16
16
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(bt,` {
19
+ .`).concat(wt,` {
20
20
  right: `).concat(i,"px ").concat(r,`;
21
21
  }
22
22
 
23
- .`).concat(wt,` {
23
+ .`).concat(xt,` {
24
24
  margin-right: `).concat(i,"px ").concat(r,`;
25
25
  }
26
26
 
27
- .`).concat(bt," .").concat(bt,` {
27
+ .`).concat(wt," .").concat(wt,` {
28
28
  right: 0 `).concat(r,`;
29
29
  }
30
30
 
31
- .`).concat(wt," .").concat(wt,` {
31
+ .`).concat(xt," .").concat(xt,` {
32
32
  margin-right: 0 `).concat(r,`;
33
33
  }
34
34
 
35
- body[`).concat(_e,`] {
36
- `).concat(jl,": ").concat(i,`px;
35
+ body[`).concat(Be,`] {
36
+ `).concat(iu,": ").concat(i,`px;
37
37
  }
38
- `)},yo=function(){var e=parseInt(document.body.getAttribute(_e)||"0",10);return isFinite(e)?e:0},Gl=function(){c.useEffect(function(){return document.body.setAttribute(_e,(yo()+1).toString()),function(){var e=yo()-1;e<=0?document.body.removeAttribute(_e):document.body.setAttribute(_e,e.toString())}},[])},Kl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Gl();var s=c.useMemo(function(){return Bl(o)},[o]);return c.createElement(Vl,{styles:Ul(s,!t,o,n?"":"!important")})},mn=!1;if(typeof window<"u")try{var kt=Object.defineProperty({},"passive",{get:function(){return mn=!0,!0}});window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{mn=!1}var De=mn?{passive:!1}:!1,Hl=function(e){return e.tagName==="TEXTAREA"},ko=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hl(e)&&n[t]==="visible")},Yl=function(e){return ko(e,"overflowY")},Xl=function(e){return ko(e,"overflowX")},xo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Co(e,r);if(o){var s=Eo(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ql=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Zl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Co=function(e,t){return e==="v"?Yl(t):Xl(t)},Eo=function(e,t){return e==="v"?ql(t):Zl(t)},Ql=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jl=function(e,t,n,r,o){var s=Ql(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,u=t.contains(i),l=!1,f=a>0,d=0,m=0;do{var v=Eo(e,i),b=v[0],p=v[1],g=v[2],w=p-g-s*b;(b||w)&&Co(e,i)&&(d+=w,m+=b),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&(Math.abs(d)<1||!o)||!f&&(Math.abs(m)<1||!o))&&(l=!0),l},xt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},So=function(e){return[e.deltaX,e.deltaY]},jo=function(e){return e&&"current"in e?e.current:e},eu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tu=function(e){return`
38
+ `)},go=function(){var e=parseInt(document.body.getAttribute(Be)||"0",10);return isFinite(e)?e:0},Pu=function(){c.useEffect(function(){return document.body.setAttribute(Be,(go()+1).toString()),function(){var e=go()-1;e<=0?document.body.removeAttribute(Be):document.body.setAttribute(Be,e.toString())}},[])},Tu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Pu();var s=c.useMemo(function(){return Eu(o)},[o]);return c.createElement(ku,{styles:Cu(s,!t,o,n?"":"!important")})},vn=!1;if(typeof window<"u")try{var kt=Object.defineProperty({},"passive",{get:function(){return vn=!0,!0}});window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{vn=!1}var Ue=vn?{passive:!1}:!1,Su=function(e){return e.tagName==="TEXTAREA"},yo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Su(e)&&n[t]==="visible")},Nu=function(e){return yo(e,"overflowY")},Au=function(e){return yo(e,"overflowX")},bo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=wo(e,r);if(o){var s=xo(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ju=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Mu=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wo=function(e,t){return e==="v"?Nu(t):Au(t)},xo=function(e,t){return e==="v"?ju(t):Mu(t)},Ou=function(e,t){return e==="h"&&t==="rtl"?-1:1},Du=function(e,t,n,r,o){var s=Ou(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,u=t.contains(i),l=!1,d=a>0,f=0,h=0;do{var v=xo(e,i),y=v[0],p=v[1],g=v[2],b=p-g-s*y;(y||b)&&wo(e,i)&&(f+=b,h+=y),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(l=!0),l},Ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Eo=function(e){return[e.deltaX,e.deltaY]},ko=function(e){return e&&"current"in e?e.current:e},_u=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Iu=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},nu=0,Re=[];function ru(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(nu++)[0],s=c.useState(wo)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=El([e.lockRef.current],(e.shards||[]).map(jo),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var w=xt(p),y=n.current,k="deltaX"in p?p.deltaX:y[0]-w[0],x="deltaY"in p?p.deltaY:y[1]-w[1],C,P=p.target,E=Math.abs(k)>Math.abs(x)?"h":"v";if("touches"in p&&E==="h"&&P.type==="range")return!1;var T=xo(E,P);if(!T)return!0;if(T?C=E:(C=E==="v"?"h":"v",T=xo(E,P)),!T)return!1;if(!r.current&&"changedTouches"in p&&(k||x)&&(r.current=C),!C)return!0;var O=r.current||C;return Jl(O,g,p,O==="h"?k:x,!0)},[]),u=c.useCallback(function(p){var g=p;if(!(!Re.length||Re[Re.length-1]!==s)){var w="deltaY"in g?So(g):xt(g),y=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&eu(C.delta,w)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var k=(a.current.shards||[]).map(jo).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=k.length>0?i(g,k[0]):!a.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),l=c.useCallback(function(p,g,w,y){var k={name:p,delta:g,target:w,should:y,shadowParent:ou(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(x){return x!==k})},1)},[]),f=c.useCallback(function(p){n.current=xt(p),r.current=void 0},[]),d=c.useCallback(function(p){l(p.type,So(p),p.target,i(p,e.lockRef.current))},[]),m=c.useCallback(function(p){l(p.type,xt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Re.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",u,De),document.addEventListener("touchmove",u,De),document.addEventListener("touchstart",f,De),function(){Re=Re.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,De),document.removeEventListener("touchmove",u,De),document.removeEventListener("touchstart",f,De)}},[]);var v=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(s,{styles:tu(o)}):null,v?c.createElement(Kl,{gapMode:e.gapMode}):null)}function ou(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const su=Il(bo,ru);var Po=c.forwardRef(function(e,t){return c.createElement(yt,ce({},e,{ref:t,sideCar:su}))});Po.classNames=yt.classNames;var hn=["Enter"," "],iu=["ArrowDown","PageUp","Home"],To=["ArrowUp","PageDown","End"],au=[...iu,...To],cu={ltr:[...hn,"ArrowRight"],rtl:[...hn,"ArrowLeft"]},lu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},He="Menu",[Ye,uu,du]=mr(He),[Se,Ao]=de(He,[du,qr,co]),Xe=qr(),Mo=co(),[No,xe]=Se(He),[fu,qe]=Se(He),Oo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=Xe(t),[u,l]=c.useState(null),f=c.useRef(!1),d=H(s),m=gr(o);return c.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),h.jsx(so,{...i,children:h.jsx(No,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:h.jsx(fu,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:a,children:r})})})};Oo.displayName=He;var pu="MenuAnchor",gn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(tl,{...o,...r,ref:t})});gn.displayName=pu;var vn="MenuPortal",[mu,Io]=Se(vn,{forceMount:void 0}),_o=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(vn,t);return h.jsx(mu,{scope:t,forceMount:n,children:h.jsx(Ke,{present:n||s.open,children:h.jsx(io,{asChild:!0,container:o,children:r})})})};_o.displayName=vn;var te="MenuContent",[hu,bn]=Se(te),Do=c.forwardRef((e,t)=>{const n=Io(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(gu,{...o,ref:t}):h.jsx(vu,{...o,ref:t})})})})}),gu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return Cl(s)},[]),h.jsx(wn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vu=c.forwardRef((e,t)=>{const n=xe(te,e.__scopeMenu);return h.jsx(wn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),wn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:b,...p}=e,g=xe(te,n),w=qe(te,n),y=Xe(n),k=Mo(n),x=uu(n),[C,P]=c.useState(null),E=c.useRef(null),T=K(t,E,g.onContentChange),O=c.useRef(0),I=c.useRef(""),L=c.useRef(0),A=c.useRef(null),F=c.useRef("right"),S=c.useRef(0),$=b?Po:c.Fragment,_=b?{as:q,allowPinchZoom:!0}:void 0,z=j=>{var he,et;const W=I.current+j,B=x().filter(ne=>!ne.disabled),Z=document.activeElement,ue=(he=B.find(ne=>ne.ref.current===Z))==null?void 0:he.textValue,Ce=B.map(ne=>ne.textValue),It=Au(Ce,W,ue),je=(et=B.find(ne=>ne.textValue===It))==null?void 0:et.ref.current;(function ne(tt){I.current=tt,window.clearTimeout(O.current),tt!==""&&(O.current=window.setTimeout(()=>ne(""),1e3))})(W),je&&setTimeout(()=>je.focus())};c.useEffect(()=>()=>window.clearTimeout(O.current),[]),za();const N=c.useCallback(j=>{var B,Z;return F.current===((B=A.current)==null?void 0:B.side)&&Nu(j,(Z=A.current)==null?void 0:Z.area)},[]);return h.jsx(hu,{scope:n,searchRef:I,onItemEnter:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),onItemLeave:c.useCallback(j=>{var W;N(j)||((W=E.current)==null||W.focus(),P(null))},[N]),onTriggerLeave:c.useCallback(j=>{N(j)&&j.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:c.useCallback(j=>{A.current=j},[]),children:h.jsx($,{..._,children:h.jsx(Sr,{asChild:!0,trapped:o,onMountAutoFocus:M(s,j=>{var W;j.preventDefault(),(W=E.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(yr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:h.jsx(bl,{asChild:!0,...k,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:M(u,j=>{w.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":Jo(g.open),"data-radix-menu-content":"",dir:w.dir,...y,...p,ref:T,style:{outline:"none",...p.style},onKeyDown:M(p.onKeyDown,j=>{const B=j.target.closest("[data-radix-menu-content]")===j.currentTarget,Z=j.ctrlKey||j.altKey||j.metaKey,ue=j.key.length===1;B&&(j.key==="Tab"&&j.preventDefault(),!Z&&ue&&z(j.key));const Ce=E.current;if(j.target!==Ce||!au.includes(j.key))return;j.preventDefault();const je=x().filter(he=>!he.disabled).map(he=>he.ref.current);To.includes(j.key)&&je.reverse(),Pu(je)}),onBlur:M(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(O.current),I.current="")}),onPointerMove:M(e.onPointerMove,Qe(j=>{const W=j.target,B=S.current!==j.clientX;if(j.currentTarget.contains(W)&&B){const Z=j.clientX>S.current?"right":"left";F.current=Z,S.current=j.clientX}}))})})})})})})});Do.displayName=te;var bu="MenuGroup",yn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"group",...r,ref:t})});yn.displayName=bu;var wu="MenuLabel",Ro=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{...r,ref:t})});Ro.displayName=wu;var Ct="MenuItem",Lo="menu.itemSelect",Et=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=qe(Ct,e.__scopeMenu),i=bn(Ct,e.__scopeMenu),u=K(t,s),l=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Lo,{bubbles:!0,cancelable:!0});d.addEventListener(Lo,v=>r==null?void 0:r(v),{once:!0}),pr(d,m),m.defaultPrevented?l.current=!1:a.onClose()}};return h.jsx(Fo,{...o,ref:u,disabled:n,onClick:M(e.onClick,f),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),l.current=!0},onPointerUp:M(e.onPointerUp,d=>{var m;l.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:M(e.onKeyDown,d=>{const m=i.searchRef.current!=="";n||m&&d.key===" "||hn.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Et.displayName=Ct;var Fo=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=bn(Ct,n),i=Mo(n),u=c.useRef(null),l=K(t,u),[f,d]=c.useState(!1),[m,v]=c.useState("");return c.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[s.children]),h.jsx(Ye.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:h.jsx(wl,{asChild:!0,...i,focusable:!r,children:h.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:M(e.onPointerMove,Qe(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,Qe(b=>a.onItemLeave(b))),onFocus:M(e.onFocus,()=>d(!0)),onBlur:M(e.onBlur,()=>d(!1))})})})}),yu="MenuCheckboxItem",$o=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(Uo,{scope:e.__scopeMenu,checked:n,children:h.jsx(Et,{role:"menuitemcheckbox","aria-checked":St(n)?"mixed":n,...o,ref:t,"data-state":Cn(n),onSelect:M(o.onSelect,()=>r==null?void 0:r(St(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$o.displayName=yu;var zo="MenuRadioGroup",[ku,xu]=Se(zo,{value:void 0,onValueChange:()=>{}}),Wo=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=H(r);return h.jsx(ku,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(yn,{...o,ref:t})})});Wo.displayName=zo;var Bo="MenuRadioItem",Vo=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=xu(Bo,e.__scopeMenu),s=n===o.value;return h.jsx(Uo,{scope:e.__scopeMenu,checked:s,children:h.jsx(Et,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Cn(s),onSelect:M(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});Vo.displayName=Bo;var kn="MenuItemIndicator",[Uo,Cu]=Se(kn,{checked:!1}),Go=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Cu(kn,n);return h.jsx(Ke,{present:r||St(s.checked)||s.checked===!0,children:h.jsx(X.span,{...o,ref:t,"data-state":Cn(s.checked)})})});Go.displayName=kn;var Eu="MenuSeparator",Ko=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ko.displayName=Eu;var Su="MenuArrow",Ho=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return h.jsx(rl,{...o,...r,ref:t})});Ho.displayName=Su;var xn="MenuSub",[ju,Yo]=Se(xn),Xo=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(xn,t),a=Xe(t),[i,u]=c.useState(null),[l,f]=c.useState(null),d=H(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),h.jsx(so,{...a,children:h.jsx(No,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:f,children:h.jsx(ju,{scope:t,contentId:Be(),triggerId:Be(),trigger:i,onTriggerChange:u,children:n})})})};Xo.displayName=xn;var Ze="MenuSubTrigger",qo=c.forwardRef((e,t)=>{const n=xe(Ze,e.__scopeMenu),r=qe(Ze,e.__scopeMenu),o=Yo(Ze,e.__scopeMenu),s=bn(Ze,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),u(null)}},[i,u]),h.jsx(gn,{asChild:!0,...l,children:h.jsx(Fo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Jo(n.open),...e,ref:ot(t,o.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,Qe(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,Qe(d=>{var v,b;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const p=(b=n.content)==null?void 0:b.dataset.side,g=p==="right",w=g?-5:5,y=m[g?"left":"right"],k=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x:y,y:m.top},{x:k,y:m.top},{x:k,y:m.bottom},{x:y,y:m.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,d=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||cu[r.dir].includes(d.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),d.preventDefault())})})})});qo.displayName=Ze;var Zo="MenuSubContent",Qo=c.forwardRef((e,t)=>{const n=Io(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(te,e.__scopeMenu),a=qe(te,e.__scopeMenu),i=Yo(Zo,e.__scopeMenu),u=c.useRef(null),l=K(t,u);return h.jsx(Ye.Provider,{scope:e.__scopeMenu,children:h.jsx(Ke,{present:r||s.open,children:h.jsx(Ye.Slot,{scope:e.__scopeMenu,children:h.jsx(wn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;a.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{var v;const d=f.currentTarget.contains(f.target),m=lu[a.dir].includes(f.key);d&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Qo.displayName=Zo;function Jo(e){return e?"open":"closed"}function St(e){return e==="indeterminate"}function Cn(e){return St(e)?"indeterminate":e?"checked":"unchecked"}function Pu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Tu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Au(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Tu(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Mu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s].x,u=t[s].y,l=t[a].x,f=t[a].y;u>r!=f>r&&n<(l-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function Nu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Mu(n,t)}function Qe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ou=Oo,Iu=gn,_u=_o,Du=Do,Ru=yn,Lu=Ro,Fu=Et,$u=$o,zu=Wo,Wu=Vo,Bu=Go,Vu=Ko,Uu=Ho,Gu=Xo,Ku=qo,Hu=Qo,En="DropdownMenu",[Yu,zf]=de(En,[Ao]),Y=Ao(),[Xu,es]=Yu(En),ts=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=Y(t),l=c.useRef(null),[f=!1,d]=We({prop:o,defaultProp:s,onChange:a});return h.jsx(Xu,{scope:t,triggerId:Be(),triggerRef:l,contentId:Be(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(m=>!m),[d]),modal:i,children:h.jsx(Ou,{...u,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};ts.displayName=En;var ns="DropdownMenuTrigger",rs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=es(ns,n),a=Y(n);return h.jsx(Iu,{asChild:!0,...a,children:h.jsx(X.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ot(t,s.triggerRef),onPointerDown:M(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:M(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rs.displayName=ns;var qu="DropdownMenuPortal",os=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Y(t);return h.jsx(_u,{...r,...n})};os.displayName=qu;var ss="DropdownMenuContent",is=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=es(ss,n),s=Y(n),a=c.useRef(!1);return h.jsx(Du,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,i=>{var u;a.current||(u=o.triggerRef.current)==null||u.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:M(e.onInteractOutside,i=>{const u=i.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,f=u.button===2||l;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});is.displayName=ss;var Zu="DropdownMenuGroup",as=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Ru,{...o,...r,ref:t})});as.displayName=Zu;var Qu="DropdownMenuLabel",cs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Lu,{...o,...r,ref:t})});cs.displayName=Qu;var Ju="DropdownMenuItem",ls=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Fu,{...o,...r,ref:t})});ls.displayName=Ju;var ed="DropdownMenuCheckboxItem",us=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx($u,{...o,...r,ref:t})});us.displayName=ed;var td="DropdownMenuRadioGroup",ds=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(zu,{...o,...r,ref:t})});ds.displayName=td;var nd="DropdownMenuRadioItem",fs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Wu,{...o,...r,ref:t})});fs.displayName=nd;var rd="DropdownMenuItemIndicator",ps=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Bu,{...o,...r,ref:t})});ps.displayName=rd;var od="DropdownMenuSeparator",ms=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Vu,{...o,...r,ref:t})});ms.displayName=od;var sd="DropdownMenuArrow",id=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Uu,{...o,...r,ref:t})});id.displayName=sd;var ad=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Y(t),[i=!1,u]=We({prop:r,defaultProp:s,onChange:o});return h.jsx(Gu,{...a,open:i,onOpenChange:u,children:n})},cd="DropdownMenuSubTrigger",hs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Ku,{...o,...r,ref:t})});hs.displayName=cd;var ld="DropdownMenuSubContent",gs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Y(n);return h.jsx(Hu,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gs.displayName=ld;var ud=ts,dd=rs,vs=os,bs=is,fd=as,ws=cs,ys=ls,ks=us,pd=ds,xs=fs,Cs=ps,Es=ms,md=ad,Ss=hs,js=gs;/**
41
+ `)},Ru=0,ze=[];function Lu(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Ru++)[0],s=c.useState(vo)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=ou([e.lockRef.current],(e.shards||[]).map(ko),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var b=Ct(p),w=n.current,E="deltaX"in p?p.deltaX:w[0]-b[0],x="deltaY"in p?p.deltaY:w[1]-b[1],C,P=p.target,k=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in p&&k==="h"&&P.type==="range")return!1;var T=bo(k,P);if(!T)return!0;if(T?C=k:(C=k==="v"?"h":"v",T=bo(k,P)),!T)return!1;if(!r.current&&"changedTouches"in p&&(E||x)&&(r.current=C),!C)return!0;var D=r.current||C;return Du(D,g,p,D==="h"?E:x)},[]),u=c.useCallback(function(p){var g=p;if(!(!ze.length||ze[ze.length-1]!==s)){var b="deltaY"in g?Eo(g):Ct(g),w=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&_u(C.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(ko).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=E.length>0?i(g,E[0]):!a.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),l=c.useCallback(function(p,g,b,w){var E={name:p,delta:g,target:b,should:w,shadowParent:$u(b)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),d=c.useCallback(function(p){n.current=Ct(p),r.current=void 0},[]),f=c.useCallback(function(p){l(p.type,Eo(p),p.target,i(p,e.lockRef.current))},[]),h=c.useCallback(function(p){l(p.type,Ct(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return ze.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",d,Ue),function(){ze=ze.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",d,Ue)}},[]);var v=e.removeScrollBar,y=e.inert;return c.createElement(c.Fragment,null,y?c.createElement(s,{styles:Iu(o)}):null,v?c.createElement(Tu,{gapMode:e.gapMode}):null)}function $u(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Fu=pu(ho,Lu);var gn=c.forwardRef(function(e,t){return c.createElement(Et,ue({},e,{ref:t,sideCar:Fu}))});gn.classNames=Et.classNames;var Wu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ve=new WeakMap,Pt=new WeakMap,Tt={},yn=0,Co=function(e){return e&&(e.host||Co(e.parentNode))},Bu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Co(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Uu=function(e,t,n,r){var o=Bu(t,Array.isArray(e)?e:[e]);Tt[n]||(Tt[n]=new WeakMap);var s=Tt[n],a=[],i=new Set,u=new Set(o),l=function(f){!f||i.has(f)||(i.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(i.has(h))d(h);else try{var v=h.getAttribute(r),y=v!==null&&v!=="false",p=(Ve.get(h)||0)+1,g=(s.get(h)||0)+1;Ve.set(h,p),s.set(h,g),a.push(h),p===1&&y&&Pt.set(h,!0),g===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(t),i.clear(),yn++,function(){a.forEach(function(f){var h=Ve.get(f)-1,v=s.get(f)-1;Ve.set(f,h),s.set(f,v),h||(Pt.has(f)||f.removeAttribute(r),Pt.delete(f)),v||f.removeAttribute(n)}),yn--,yn||(Ve=new WeakMap,Ve=new WeakMap,Pt=new WeakMap,Tt={})}},Po=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Wu(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Uu(r,o,n,"aria-hidden")):function(){return null}},bn="Dialog",[To,nv]=ne(bn),[zu,ie]=To(bn),So=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),u=c.useRef(null),[l=!1,d]=De({prop:r,defaultProp:o,onChange:s});return m.jsx(zu,{scope:t,triggerRef:i,contentRef:u,contentId:ge(),titleId:ge(),descriptionId:ge(),open:l,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};So.displayName=bn;var No="DialogTrigger",Ao=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(No,n),s=F(t,o.triggerRef);return m.jsx(ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":En(o.open),...r,ref:s,onClick:A(e.onClick,o.onOpenToggle)})});Ao.displayName=No;var wn="DialogPortal",[Vu,jo]=To(wn,{forceMount:void 0}),Mo=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ie(wn,t);return m.jsx(Vu,{scope:t,forceMount:n,children:c.Children.map(r,a=>m.jsx(yt,{present:n||s.open,children:m.jsx(co,{asChild:!0,container:o,children:a})}))})};Mo.displayName=wn;var St="DialogOverlay",Oo=c.forwardRef((e,t)=>{const n=jo(St,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ie(St,e.__scopeDialog);return s.modal?m.jsx(yt,{present:r||s.open,children:m.jsx(Hu,{...o,ref:t})}):null});Oo.displayName=St;var Hu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(St,n);return m.jsx(gn,{as:X,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(ye.div,{"data-state":En(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),_e="DialogContent",Do=c.forwardRef((e,t)=>{const n=jo(_e,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ie(_e,e.__scopeDialog);return m.jsx(yt,{present:r||s.open,children:s.modal?m.jsx(Gu,{...o,ref:t}):m.jsx(Ku,{...o,ref:t})})});Do.displayName=_e;var Gu=c.forwardRef((e,t)=>{const n=ie(_e,e.__scopeDialog),r=c.useRef(null),o=F(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return Po(s)},[]),m.jsx(_o,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault())})}),Ku=c.forwardRef((e,t)=>{const n=ie(_e,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return m.jsx(_o,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),_o=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=ie(_e,n),u=c.useRef(null),l=F(t,u);return lo(),m.jsxs(m.Fragment,{children:[m.jsx(ro,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(Jr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":En(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Yu,{titleId:i.titleId}),m.jsx(qu,{contentRef:u,descriptionId:i.descriptionId})]})]})}),xn="DialogTitle",Io=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(xn,n);return m.jsx(ye.h2,{id:o.titleId,...r,ref:t})});Io.displayName=xn;var Ro="DialogDescription",Lo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie(Ro,n);return m.jsx(ye.p,{id:o.descriptionId,...r,ref:t})});Lo.displayName=Ro;var $o="DialogClose",Fo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ie($o,n);return m.jsx(ye.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});Fo.displayName=$o;function En(e){return e?"open":"closed"}var Wo="DialogTitleWarning",[rv,Bo]=Uc(Wo,{contentName:_e,titleName:xn,docsSlug:"dialog"}),Yu=({titleId:e})=>{const t=Bo(Wo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Xu="DialogDescriptionWarning",qu=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bo(Xu).contentName}}.`;return c.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Zu=So,Qu=Ao,Ju=Mo,Uo=Oo,zo=Do,Vo=Io,Ho=Lo,Go=Fo;/**
42
46
  * @license lucide-react v0.453.0 - ISC
43
47
  *
44
48
  * This source code is licensed under the ISC license.
45
49
  * See the LICENSE file in the root directory of this source tree.
46
- */const hd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ps=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
50
+ */const ed=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ko=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
47
51
  * @license lucide-react v0.453.0 - ISC
48
52
  *
49
53
  * This source code is licensed under the ISC license.
50
54
  * See the LICENSE file in the root directory of this source tree.
51
- */var gd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
55
+ */var td={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
52
56
  * @license lucide-react v0.453.0 - ISC
53
57
  *
54
58
  * This source code is licensed under the ISC license.
55
59
  * See the LICENSE file in the root directory of this source tree.
56
- */const vd=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},u)=>G.createElement("svg",{ref:u,...gd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ps("lucide",o),...i},[...a.map(([l,f])=>G.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
60
+ */const nd=K.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},u)=>K.createElement("svg",{ref:u,...td,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ko("lucide",o),...i},[...a.map(([l,d])=>K.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
57
61
  * @license lucide-react v0.453.0 - ISC
58
62
  *
59
63
  * This source code is licensed under the ISC license.
60
64
  * See the LICENSE file in the root directory of this source tree.
61
- */const jt=(e,t)=>{const n=G.forwardRef(({className:r,...o},s)=>G.createElement(vd,{ref:s,iconNode:t,className:Ps(`lucide-${hd(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
65
+ */const Nt=(e,t)=>{const n=K.forwardRef(({className:r,...o},s)=>K.createElement(nd,{ref:s,iconNode:t,className:Ko(`lucide-${ed(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
62
66
  * @license lucide-react v0.453.0 - ISC
63
67
  *
64
68
  * This source code is licensed under the ISC license.
65
69
  * See the LICENSE file in the root directory of this source tree.
66
- */const bd=jt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
70
+ */const rd=Nt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
67
71
  * @license lucide-react v0.453.0 - ISC
68
72
  *
69
73
  * This source code is licensed under the ISC license.
70
74
  * See the LICENSE file in the root directory of this source tree.
71
- */const wd=jt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
75
+ */const od=Nt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
76
  * @license lucide-react v0.453.0 - ISC
73
77
  *
74
78
  * This source code is licensed under the ISC license.
75
79
  * See the LICENSE file in the root directory of this source tree.
76
- */const yd=jt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
80
+ */const sd=Nt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
77
81
  * @license lucide-react v0.453.0 - ISC
78
82
  *
79
83
  * This source code is licensed under the ISC license.
80
84
  * See the LICENSE file in the root directory of this source tree.
81
- */const kd=jt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xd=ud,Cd=dd,Ed=fd,Sd=vs,jd=md,Pd=pd,Ts=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsxs(Ss,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-px-2 ksjsui-py-1.5 ksjsui-outline-none","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...r,children:[n,h.jsx(wd,{className:"ksjsui-ms-auto"})]}));Ts.displayName=Ss.displayName;const As=c.forwardRef(({className:e,...t},n)=>h.jsx(js,{ref:n,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-md ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...t}));As.displayName=js.displayName;const Ms=c.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},s)=>h.jsx(vs,{children:h.jsx(bs,{ref:s,align:t,side:n,sideOffset:r,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...o})}));Ms.displayName=bs.displayName;const Ns=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ys,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...n}));Ns.displayName=ys.displayName;const Os=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(ks,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),checked:n,...r,children:[t,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Cs,{children:h.jsx(bd,{className:"ksjsui-size-4"})})})]}));Os.displayName=ks.displayName;const Is=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(xs,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[t,h.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:h.jsx(Cs,{children:h.jsx(yd,{className:"ksjsui-size-2"})})})]}));Is.displayName=xs.displayName;const _s=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ws,{ref:r,className:U("ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-sm ksjsui-font-semibold",t&&"ksjsui-ps-8",e),...n}));_s.displayName=ws.displayName;const Ds=c.forwardRef(({className:e,...t},n)=>h.jsx(Es,{ref:n,className:U(["-ksjsui-mx-1 ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-forced-color-adjust-none"],e),...t}));Ds.displayName=Es.displayName;const Rs=({className:e,...t})=>h.jsx("span",{className:U("ksjsui-ms-auto ksjsui-text-sm ksjsui-tracking-widest ksjsui-opacity-60",e),...t});Rs.displayName="DropdownMenuShortcut";const Ls=c.forwardRef((e,t)=>h.jsx(Bt,{ref:t,...e,iconOnly:!0,fullWidth:!1}));Ls.displayName="IconButton";var Td=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ad=Td.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Md="Separator",Fs="horizontal",Nd=["horizontal","vertical"],$s=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Fs,...o}=e,s=Od(r)?r:Fs,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(Ad.div,{"data-orientation":s,...i,...o,ref:t})});$s.displayName=Md;function Od(e){return Nd.includes(e)}var zs=$s;const Ws=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(zs,{ref:o,decorative:n,orientation:t,className:U("ksjsui-shrink-0 ksjsui-bg-border forced-colors:ksjsui-bg-canvas-text forced-colors:ksjsui-forced-color-adjust-none",t==="horizontal"?"ksjsui-block ksjsui-h-px ksjsui-w-full":"ksjsui-inline-block ksjsui-w-px",e),...r}));Ws.displayName=zs.displayName;function Id(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Bs=_d.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Sn="Switch",[Dd,Wf]=de(Sn),[Rd,Ld]=Dd(Sn),Vs=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:u="on",onCheckedChange:l,form:f,...d}=e,[m,v]=c.useState(null),b=K(t,k=>v(k)),p=c.useRef(!1),g=m?f||!!m.closest("form"):!0,[w=!1,y]=We({prop:o,defaultProp:s,onChange:l});return h.jsxs(Rd,{scope:n,checked:w,disabled:i,children:[h.jsx(Bs.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":Ks(w),"data-disabled":i?"":void 0,disabled:i,value:u,...d,ref:b,onClick:M(e.onClick,k=>{y(x=>!x),g&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})}),g&&h.jsx(Fd,{control:m,bubbles:!p.current,name:r,value:u,checked:w,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Vs.displayName=Sn;var Us="SwitchThumb",Gs=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Ld(Us,n);return h.jsx(Bs.span,{"data-state":Ks(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gs.displayName=Us;var Fd=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=c.useRef(null),a=Id(n),i=Yr(t);return c.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(u,n),u.dispatchEvent(m)}},[a,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ks(e){return e?"checked":"unchecked"}var Hs=Vs,$d=Gs;const Ys=c.forwardRef(({className:e,tabIndex:t=0,...n},r)=>h.jsx(Hs,{className:U(["ksjsui-peer ksjsui-inline-flex ksjsui-h-6 ksjsui-w-11 ksjsui-shrink-0 ksjsui-cursor-pointer ksjsui-items-center ksjsui-rounded-full ksjsui-border-2 ksjsui-border-transparent ksjsui-bg-neutral ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2 focus-visible:ksjsui-ring-offset-background","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","data-[state=unchecked]:ksjsui-bg-input","data-[state=checked]:ksjsui-border-secondary data-[state=checked]:ksjsui-bg-secondary","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-border-highlight forced-colors:data-[state=checked]:ksjsui-bg-highlight"],e),tabIndex:t,...n,ref:r,children:h.jsx($d,{className:U(["ksjsui-pointer-events-none ksjsui-block ksjsui-size-5 ksjsui-translate-x-0 ksjsui-rounded-full ksjsui-bg-thumb ksjsui-shadow ksjsui-ring-0 ksjsui-transition-transform","data-[state=unchecked]:ksjsui-translate-x-0","data-[state=checked]:ksjsui-translate-x-5","rtl:data-[state=checked]:-ksjsui-translate-x-5","forced-colors:ksjsui-bg-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-bg-canvas"])})}));Ys.displayName=Hs.displayName;function zd(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:p}=v,g=G.useRef(null),w=G.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:w,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=G.forwardRef((v,b)=>{const{scope:p,children:g}=v,w=s(i,p),y=K(b,w.collectionRef);return h.jsx(q,{ref:y,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",f="data-radix-collection-item",d=G.forwardRef((v,b)=>{const{scope:p,children:g,...w}=v,y=G.useRef(null),k=K(b,y),x=s(l,p);return G.useEffect(()=>(x.itemMap.set(y,{ref:y,...w}),()=>void x.itemMap.delete(y))),h.jsx(q,{[f]:"",ref:k,children:g})});d.displayName=l;function m(v){const b=s(e+"CollectionConsumer",v);return G.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},m,r]}var Wd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Wd.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?q:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xs(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}var Bd="DismissableLayer",jn="dismissableLayer.update",Vd="dismissableLayer.pointerDownOutside",Ud="dismissableLayer.focusOutside",qs,Zs=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qs=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(Zs),[f,d]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),b=K(t,E=>d(E)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),y=f?p.indexOf(f):-1,k=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,C=Kd(E=>{const T=E.target,O=[...l.branches].some(I=>I.contains(T));!x||O||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),P=Hd(E=>{const T=E.target;[...l.branches].some(I=>I.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return vr(E=>{y===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(qs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ei(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qs)}},[f,m,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ei())},[f,l]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(jn,E),()=>document.removeEventListener(jn,E)},[]),h.jsx(le.div,{...u,ref:b,style:{pointerEvents:k?x?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,C.onPointerDownCapture)})});Qs.displayName=Bd;var Gd="DismissableLayerBranch",Js=c.forwardRef((e,t)=>{const n=c.useContext(Zs),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(le.div,{...e,ref:o})});Js.displayName=Gd;function Kd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){ti(Vd,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Hd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&ti(Ud,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ei(){const e=new CustomEvent(jn);document.dispatchEvent(e)}function ti(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xs(o,s):o.dispatchEvent(s)}var Yd=Qs,Xd=Js,qd="Portal",ni=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Q(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Dt.createPortal(h.jsx(le.div,{...r,ref:t}),a):null});ni.displayName=qd;function Zd(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ri=e=>{const{present:t,children:n}=e,r=Qd(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=K(r.ref,Jd(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};ri.displayName="Presence";function Qd(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Zd(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Pt(r.current);s.current=i==="mounted"?l:"none"},[i]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const m=s.current,v=Pt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=v=>{const p=Pt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Pt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Pt(e){return(e==null?void 0:e.animationName)||"none"}function Jd(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ef="VisuallyHidden",Pn=c.forwardRef((e,t)=>h.jsx(le.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Pn.displayName=ef;var Tn="ToastProvider",[An,tf,nf]=zd("Toast"),[oi,Bf]=de("Toast",[nf]),[rf,Tt]=oi(Tn),si=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[l,f]=c.useState(0),d=c.useRef(!1),m=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tn}\`. Expected non-empty \`string\`.`),h.jsx(An.Provider,{scope:t,children:h.jsx(rf,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:l,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>f(v=>v+1),[]),onToastRemove:c.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:a})})};si.displayName=Tn;var ii="ToastViewport",of=["F8"],Mn="toast.viewportPause",Nn="toast.viewportResume",ai=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=of,label:o="Notifications ({hotkey})",...s}=e,a=Tt(ii,n),i=tf(n),u=c.useRef(null),l=c.useRef(null),f=c.useRef(null),d=c.useRef(null),m=K(t,d,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;c.useEffect(()=>{const g=w=>{var k;r.length!==0&&r.every(x=>w[x]||w.code===x)&&((k=d.current)==null||k.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),c.useEffect(()=>{const g=u.current,w=d.current;if(b&&g&&w){const y=()=>{if(!a.isClosePausedRef.current){const P=new CustomEvent(Mn);w.dispatchEvent(P),a.isClosePausedRef.current=!0}},k=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(Nn);w.dispatchEvent(P),a.isClosePausedRef.current=!1}},x=P=>{!g.contains(P.relatedTarget)&&k()},C=()=>{g.contains(document.activeElement)||k()};return g.addEventListener("focusin",y),g.addEventListener("focusout",x),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",k),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",x),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",k)}}},[b,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:g})=>{const y=i().map(k=>{const x=k.ref.current,C=[x,...bf(x)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?y.reverse():y).flat()},[i]);return c.useEffect(()=>{const g=d.current;if(g){const w=y=>{var C,P,E;const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k){const T=document.activeElement,O=y.shiftKey;if(y.target===g&&O){(C=l.current)==null||C.focus();return}const A=p({tabbingDirection:O?"backwards":"forwards"}),F=A.findIndex(S=>S===T);_n(A.slice(F+1))?y.preventDefault():O?(P=l.current)==null||P.focus():(E=f.current)==null||E.focus()}};return g.addEventListener("keydown",w),()=>g.removeEventListener("keydown",w)}},[i,p]),h.jsxs(Xd,{ref:u,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&h.jsx(On,{ref:l,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});_n(g)}}),h.jsx(An.Slot,{scope:n,children:h.jsx(le.ol,{tabIndex:-1,...s,ref:m})}),b&&h.jsx(On,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});_n(g)}})]})});ai.displayName=ii;var ci="ToastFocusProxy",On=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Tt(ci,n);return h.jsx(Pn,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const i=a.relatedTarget;!((l=s.viewport)!=null&&l.contains(i))&&r()}})});On.displayName=ci;var At="Toast",sf="toast.swipeStart",af="toast.swipeMove",cf="toast.swipeCancel",lf="toast.swipeEnd",li=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[i=!0,u]=We({prop:r,defaultProp:o,onChange:s});return h.jsx(ri,{present:n||i,children:h.jsx(ff,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:H(e.onPause),onResume:H(e.onResume),onSwipeStart:M(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:M(e.onSwipeMove,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:M(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:M(e.onSwipeEnd,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});li.displayName=At;var[uf,df]=oi(At,{onClose(){}}),ff=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:l,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...b}=e,p=Tt(At,n),[g,w]=c.useState(null),y=K(t,S=>w(S)),k=c.useRef(null),x=c.useRef(null),C=o||p.duration,P=c.useRef(0),E=c.useRef(C),T=c.useRef(0),{onToastAdd:O,onToastRemove:I}=p,L=H(()=>{var $;(g==null?void 0:g.contains(document.activeElement))&&(($=p.viewport)==null||$.focus()),a()}),A=c.useCallback(S=>{!S||S===1/0||(window.clearTimeout(T.current),P.current=new Date().getTime(),T.current=window.setTimeout(L,S))},[L]);c.useEffect(()=>{const S=p.viewport;if(S){const $=()=>{A(E.current),l==null||l()},_=()=>{const z=new Date().getTime()-P.current;E.current=E.current-z,window.clearTimeout(T.current),u==null||u()};return S.addEventListener(Mn,_),S.addEventListener(Nn,$),()=>{S.removeEventListener(Mn,_),S.removeEventListener(Nn,$)}}},[p.viewport,C,u,l,A]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&A(C)},[s,C,p.isClosePausedRef,A]),c.useEffect(()=>(O(),()=>I()),[O,I]);const F=c.useMemo(()=>g?gi(g):null,[g]);return p.viewport?h.jsxs(h.Fragment,{children:[F&&h.jsx(pf,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),h.jsx(uf,{scope:n,onClose:L,children:rt.createPortal(h.jsx(An.ItemSlot,{scope:n,children:h.jsx(Yd,{asChild:!0,onEscapeKeyDown:M(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:M(e.onKeyDown,S=>{S.key==="Escape"&&(i==null||i(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:M(e.onPointerDown,S=>{S.button===0&&(k.current={x:S.clientX,y:S.clientY})}),onPointerMove:M(e.onPointerMove,S=>{if(!k.current)return;const $=S.clientX-k.current.x,_=S.clientY-k.current.y,z=!!x.current,N=["left","right"].includes(p.swipeDirection),j=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,W=N?j(0,$):0,B=N?0:j(0,_),Z=S.pointerType==="touch"?10:2,ue={x:W,y:B},Ce={originalEvent:S,delta:ue};z?(x.current=ue,Mt(af,d,Ce,{discrete:!1})):vi(ue,p.swipeDirection,Z)?(x.current=ue,Mt(sf,f,Ce,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs($)>Z||Math.abs(_)>Z)&&(k.current=null)}),onPointerUp:M(e.onPointerUp,S=>{const $=x.current,_=S.target;if(_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),x.current=null,k.current=null,$){const z=S.currentTarget,N={originalEvent:S,delta:$};vi($,p.swipeDirection,p.swipeThreshold)?Mt(lf,v,N,{discrete:!0}):Mt(cf,m,N,{discrete:!0}),z.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),pf=e=>{const{__scopeToast:t,children:n,...r}=e,o=Tt(At,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return gf(()=>a(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),i?null:h.jsx(ni,{asChild:!0,children:h.jsx(Pn,{...r,children:s&&h.jsxs(h.Fragment,{children:[o.label," ",n]})})})},mf="ToastTitle",ui=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});ui.displayName=mf;var hf="ToastDescription",di=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(le.div,{...r,ref:t})});di.displayName=hf;var fi="ToastAction",pi=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?h.jsx(hi,{altText:n,asChild:!0,children:h.jsx(In,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${fi}\`. Expected non-empty \`string\`.`),null)});pi.displayName=fi;var mi="ToastClose",In=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=df(mi,n);return h.jsx(hi,{asChild:!0,children:h.jsx(le.button,{type:"button",...r,ref:t,onClick:M(e.onClick,o.onClose)})})});In.displayName=mi;var hi=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return h.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function gi(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),vf(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...gi(r))}}),t}function Mt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xs(o,s):o.dispatchEvent(s)}var vi=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function gf(e=()=>{}){const t=H(e);Q(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function vf(e){return e.nodeType===e.ELEMENT_NODE}function bf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _n(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var wf=si,bi=ai,wi=li,yi=ui,ki=di,xi=pi,Ci=In;const yf=1,kf=1e6;let Dn=0;function xf(){return Dn=(Dn+1)%Number.MAX_SAFE_INTEGER,Dn.toString()}const Rn=new Map,Ei=e=>{if(Rn.has(e))return;const t=setTimeout(()=>{Rn.delete(e),Je({type:"REMOVE_TOAST",toastId:e})},kf);Rn.set(e,t)},Cf=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,yf)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ei(n):e.toasts.forEach(r=>{Ei(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Nt=[];let Ot={toasts:[]};function Je(e){Ot=Cf(Ot,e),Nt.forEach(t=>{t(Ot)})}function Ef({...e}){const t=xf(),n=o=>Je({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Je({type:"DISMISS_TOAST",toastId:t});return Je({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Si(){const[e,t]=c.useState(Ot);return c.useEffect(()=>(Nt.push(t),()=>{const n=Nt.indexOf(t);n>-1&&Nt.splice(n,1)}),[e]),{...e,toast:Ef,dismiss:n=>Je({type:"DISMISS_TOAST",toastId:n})}}const Sf=wf,ji=c.forwardRef(({className:e,...t},n)=>h.jsx(bi,{ref:n,className:U(["ksjsui-fixed ksjsui-bottom-0 ksjsui-end-0 ksjsui-z-[100] ksjsui-flex ksjsui-max-h-screen ksjsui-w-full ksjsui-flex-col ksjsui-p-4","md:ksjsui-max-w-[420px]"],e),...t}));ji.displayName=bi.displayName;const jf=Le(["ksjsui-group ksjsui-pointer-events-auto ksjsui-relative ksjsui-flex ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-space-x-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-bg-toast ksjsui-p-3 ksjsui-text-toast-foreground ksjsui-shadow-lg ksjsui-transition-all","rtl:ksjsui-space-x-reverse","data-[swipe=cancel]:ksjsui-translate-x-0","data-[swipe=end]:ksjsui-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:ksjsui-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:ksjsui-transition-none","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-slide-in-from-top-full","data-[state=open]:sm:ksjsui-slide-in-from-bottom-full","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-80","ltr:data-[state=closed]:ksjsui-slide-out-to-right-full","rtl:data-[state=closed]:ksjsui-slide-out-to-left-full"]),Pi=c.forwardRef(({className:e,...t},n)=>h.jsx(wi,{ref:n,className:U(jf(),e),...t}));Pi.displayName=wi.displayName;const Pf=c.forwardRef(({className:e,...t},n)=>h.jsx(xi,{ref:n,className:U(["ksjsui-inline-flex ksjsui-h-8 ksjsui-shrink-0 ksjsui-items-center ksjsui-justify-center ksjsui-rounded-lg ksjsui-border ksjsui-bg-transparent ksjsui-px-3 ksjsui-text-sm ksjsui-font-medium ksjsui-ring-offset-background ksjsui-transition-colors","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50"],e),...t}));Pf.displayName=xi.displayName;const Ti=c.forwardRef(({className:e,...t},n)=>h.jsx(Ci,{ref:n,className:U(["ksjsui-rounded-sm ksjsui-p-1 ksjsui-text-current ksjsui-transition-opacity","focus:ksjsui-outline-none focus:ksjsui-ring-2"],e),"toast-close":"",...t,children:h.jsx(kd,{className:"ksjsui-size-6"})}));Ti.displayName=Ci.displayName;const Ai=c.forwardRef(({className:e,...t},n)=>h.jsx(yi,{ref:n,className:U("ksjsui-text-sm ksjsui-font-semibold",e),...t}));Ai.displayName=yi.displayName;const Mi=c.forwardRef(({className:e,...t},n)=>h.jsx(ki,{ref:n,className:U("ksjsui-text-sm ksjsui-opacity-90",e),...t}));Mi.displayName=ki.displayName;const Tf=()=>{const{toasts:e}=Si();return h.jsxs(Sf,{children:[e.map(function({id:t,title:n,description:r,action:o,icon:s,...a}){return h.jsxs(Pi,{...a,className:"ksjsui-flex ksjsui-gap-x-2",children:[s&&h.jsx("div",{className:"ksjsui-shrink-0",children:s}),h.jsxs("div",{className:"ksjsui-grid ksjsui-gap-1 ksjsui-grow",children:[n&&h.jsx(Ai,{children:n}),r&&h.jsx(Mi,{children:r})]}),o,h.jsx(Ti,{})]},t)}),h.jsx(ji,{})]})},Ln=["px",0,.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,11,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],Af=[...Ln,"auto"];function Mf(){return Ln.reduce((e,t)=>(e.gap[t]=`ksjsui-gap-${t}`,e.gapColumn[t]=`ksjsui-gap-x-${t}`,e.gapRow[t]=`ksjsui-gap-y-${t}`,e),{gap:{},gapColumn:{},gapRow:{}})}function Ni(){return Af.reduce((e,t)=>(e.m[t]=`ksjsui-m-${t}`,e.mb[t]=`ksjsui-mb-${t}`,e.me[t]=`ksjsui-me-${t}`,e.ms[t]=`ksjsui-ms-${t}`,e.mt[t]=`ksjsui-mt-${t}`,e.mx[t]=`ksjsui-mx-${t}`,e.my[t]=`ksjsui-my-${t}`,e),{m:{},mb:{},me:{},ms:{},mt:{},mx:{},my:{}})}function Oi(){return Ln.reduce((e,t)=>(e.p[t]=`ksjsui-p-${t}`,e.pb[t]=`ksjsui-pb-${t}`,e.pe[t]=`ksjsui-pe-${t}`,e.ps[t]=`ksjsui-ps-${t}`,e.pt[t]=`ksjsui-pt-${t}`,e.px[t]=`ksjsui-px-${t}`,e.py[t]=`ksjsui-py-${t}`,e),{p:{},pb:{},pe:{},ps:{},pt:{},px:{},py:{}})}const Nf=Le("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...Ni(),...Oi()},defaultVariants:{display:"block"}}),Ii=c.forwardRef(({as:e="div",asChild:t,className:n,display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,...y},k)=>{const x=t?q:e;return h.jsx(x,{className:U(Nf({display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:f,p:d,pb:m,pe:v,ps:b,pt:p,px:g,py:w,className:n})),ref:k,...y})});Ii.displayName="Box";const Of={align:{baseline:"ksjsui-items-baseline",center:"ksjsui-items-center",end:"ksjsui-items-end",start:"ksjsui-items-start",stretch:"ksjsui-items-stretch"},direction:{"column-reverse":"ksjsui-flex-col-reverse","row-reverse":"ksjsui-flex-row-reverse",column:"ksjsui-flex-col",row:"ksjsui-flex-row"},display:{"inline-flex":"ksjsui-inline-flex",flex:"ksjsui-flex",none:"ksjsui-hidden"},...Mf(),grow:{0:"ksjsui-grow-0",1:"ksjsui-grow"},justify:{around:"ksjsui-justify-around",baseline:"ksjsui-justify-baseline",between:"ksjsui-justify-between",center:"ksjsui-justify-center",end:"ksjsui-justify-end",evenly:"ksjsui-justify-evenly",normal:"ksjsui-justify-normal",start:"ksjsui-justify-start",stretch:"ksjsui-justify-stretch"},...Ni(),...Oi(),self:{auto:"ksjsui-self-auto",baseline:"ksjsui-self-baseline",center:"ksjsui-self-center",end:"ksjsui-self-end",start:"ksjsui-self-start",stretch:"ksjsui-self-stretch"},shrink:{0:"ksjsui-shrink-0",1:"ksjsui-shrink"},wrap:{nowrap:"ksjsui-flex-nowrap",reverse:"ksjsui-flex-wrap-reverse",wrap:"ksjsui-flex-wrap"}},If=Le("ksjsui-inline-flex",{variants:{...Of},defaultVariants:{display:"flex",justify:"start"}}),_i=c.forwardRef(({align:e,as:t="div",asChild:n,className:r,display:o,direction:s,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:T,self:O,shrink:I,wrap:L,...A},F)=>{const S=n?q:t;return h.jsx(S,{className:U(If({align:e,direction:s,display:o,gap:a,gapColumn:i,gapRow:u,grow:l,justify:f,m:d,mb:m,me:v,ms:b,mt:p,mx:g,my:w,p:y,pb:k,pe:x,ps:C,pt:P,px:E,py:T,self:O,shrink:I,wrap:L,className:r})),ref:F,...A})});_i.displayName="Flex",R.Avatar=ur,R.AvatarFallback=fr,R.AvatarImage=dr,R.Box=Ii,R.Button=Bt,R.DirectionProvider=Oa,R.DropdownMenu=xd,R.DropdownMenuCheckboxItem=Os,R.DropdownMenuContent=Ms,R.DropdownMenuGroup=Ed,R.DropdownMenuItem=Ns,R.DropdownMenuLabel=_s,R.DropdownMenuPortal=Sd,R.DropdownMenuRadioGroup=Pd,R.DropdownMenuRadioItem=Is,R.DropdownMenuSeparator=Ds,R.DropdownMenuShortcut=Rs,R.DropdownMenuSub=jd,R.DropdownMenuSubContent=As,R.DropdownMenuSubTrigger=Ts,R.DropdownMenuTrigger=Cd,R.Flex=_i,R.IconButton=Ls,R.Separator=Ws,R.Switch=Ys,R.Toast=Tf,R.useToast=Si,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
85
+ */const Yo=Nt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),id=Zu,ad=Qu,Xo=Ju,cd=Go,kn=c.forwardRef(({className:e,...t},n)=>m.jsx(Uo,{ref:n,className:U(["ksjsui-fixed ksjsui-inset-0 ksjsui-z-50 ksjsui-bg-black/80","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0"],e),...t}));kn.displayName=Uo.displayName;const qo=c.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Xo,{children:[m.jsx(kn,{}),m.jsxs(zo,{ref:r,className:U(["ksjsui-fixed ksjsui-left-[50%] ksjsui-top-[50%] ksjsui-z-50 ksjsui-grid ksjsui-w-full ksjsui-max-w-lg ksjsui-translate-x-[-50%] ksjsui-translate-y-[-50%] ksjsui-gap-4 ksjsui-border ksjsui-bg-background ksjsui-p-6 ksjsui-shadow-lg ksjsui-duration-200","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95 data-[state=open]:ksjsui-slide-in-from-left-1/2 data-[state=open]:ksjsui-slide-in-from-top-[48%]","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95 data-[state=closed]:ksjsui-slide-out-to-top-[48%] data-[state=closed]:ksjsui-slide-out-to-left-1/2","sm:ksjsui-rounded-lg"],e),...n,children:[t,m.jsxs(Go,{className:U(["ksjsui-absolute ksjsui-end-4 ksjsui-top-4 ksjsui-rounded-sm ksjsui-opacity-70 ksjsui-ring-offset-background ksjsui-transition-opacity hover:ksjsui-opacity-100","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none","data-[state=open]:ksjsui-bg-accent data-[state=open]:ksjsui-text-muted-foreground"]),children:[m.jsx(Yo,{className:"ksjsui-size-4"}),m.jsx("span",{className:"ksjsui-sr-only",children:"Close"})]})]})]}));qo.displayName=zo.displayName;const Zo=({className:e,...t})=>m.jsx("div",{className:U("ksjsui-flex ksjsui-flex-col ksjsui-space-y-1.5",e),...t});Zo.displayName="DialogHeader";const Qo=({className:e,...t})=>m.jsx("div",{className:U(["ksjsui-flex ksjsui-flex-col-reverse","sm:ksjsui-flex-row sm:ksjsui-justify-end sm:ksjsui-space-x-2"],e),...t});Qo.displayName="DialogFooter";const Jo=c.forwardRef(({className:e,...t},n)=>m.jsx(Vo,{ref:n,className:U("ksjsui-text-lg ksjsui-font-semibold ksjsui-leading-none ksjsui-tracking-tight",e),...t}));Jo.displayName=Vo.displayName;const es=c.forwardRef(({className:e,...t},n)=>m.jsx(Ho,{ref:n,className:U("ksjsui-text-sm ksjsui-text-muted-foreground",e),...t}));es.displayName=Ho.displayName;var ld=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=ld.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ts(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function ns(e){const t=e+"CollectionProvider",[n,r]=ne(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:p}=v,g=K.useRef(null),b=K.useRef(new Map).current;return m.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=K.forwardRef((v,y)=>{const{scope:p,children:g}=v,b=s(i,p),w=F(y,b.collectionRef);return m.jsx(X,{ref:w,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",d="data-radix-collection-item",f=K.forwardRef((v,y)=>{const{scope:p,children:g,...b}=v,w=K.useRef(null),E=F(y,w),x=s(l,p);return K.useEffect(()=>(x.itemMap.set(w,{ref:w,...b}),()=>void x.itemMap.delete(w))),m.jsx(X,{[d]:"",ref:E,children:g})});f.displayName=l;function h(v){const y=s(e+"CollectionConsumer",v);return K.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((x,C)=>b.indexOf(x.ref.current)-b.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var rs=c.createContext(void 0),ud=e=>{const{dir:t,children:n}=e;return m.jsx(rs.Provider,{value:t,children:n})};function os(e){const t=c.useContext(rs);return e||t||"ltr"}var dd="DismissableLayer",Cn="dismissableLayer.update",fd="dismissableLayer.pointerDownOutside",pd="dismissableLayer.focusOutside",ss,is=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),as=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(is),[d,f]=c.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),y=F(t,k=>f(k)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=d?p.indexOf(d):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,C=vd(k=>{const T=k.target,D=[...l.branches].some(O=>O.contains(T));!x||D||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},h),P=gd(k=>{const T=k.target;[...l.branches].some(O=>O.contains(T))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},h);return gt(k=>{w===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ss=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),cs(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ss)}},[d,h,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),cs())},[d,l]),c.useEffect(()=>{const k=()=>v({});return document.addEventListener(Cn,k),()=>document.removeEventListener(Cn,k)},[]),m.jsx(Q.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,C.onPointerDownCapture)})});as.displayName=dd;var md="DismissableLayerBranch",hd=c.forwardRef((e,t)=>{const n=c.useContext(is),r=c.useRef(null),o=F(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(Q.div,{...e,ref:o})});hd.displayName=md;function vd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){ls(fd,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gd(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&ls(pd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function cs(){const e=new CustomEvent(Cn);document.dispatchEvent(e)}function ls(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ts(o,s):o.dispatchEvent(s)}var Pn="focusScope.autoFocusOnMount",Tn="focusScope.autoFocusOnUnmount",us={bubbles:!1,cancelable:!0},yd="FocusScope",ds=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),l=H(o),d=H(s),f=c.useRef(null),h=F(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(E){if(v.paused||!i)return;const x=E.target;i.contains(x)?f.current=x:Te(f.current,{select:!0})},g=function(E){if(v.paused||!i)return;const x=E.relatedTarget;x!==null&&(i.contains(x)||Te(f.current,{select:!0}))},b=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&Te(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),w.disconnect()}}},[r,i,v.paused]),c.useEffect(()=>{if(i){ms.add(v);const p=document.activeElement;if(!i.contains(p)){const b=new CustomEvent(Pn,us);i.addEventListener(Pn,l),i.dispatchEvent(b),b.defaultPrevented||(bd(Cd(fs(i)),{select:!0}),document.activeElement===p&&Te(i))}return()=>{i.removeEventListener(Pn,l),setTimeout(()=>{const b=new CustomEvent(Tn,us);i.addEventListener(Tn,d),i.dispatchEvent(b),b.defaultPrevented||Te(p??document.body,{select:!0}),i.removeEventListener(Tn,d),ms.remove(v)},0)}}},[i,l,d,v]);const y=c.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const w=p.currentTarget,[E,x]=wd(w);E&&x?!p.shiftKey&&b===x?(p.preventDefault(),n&&Te(E,{select:!0})):p.shiftKey&&b===E&&(p.preventDefault(),n&&Te(x,{select:!0})):b===w&&p.preventDefault()}},[n,r,v.paused]);return m.jsx(Q.div,{tabIndex:-1,...a,ref:h,onKeyDown:y})});ds.displayName=yd;function bd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Te(r,{select:t}),document.activeElement!==n)return}function wd(e){const t=fs(e),n=ps(t,e),r=ps(t.reverse(),e);return[n,r]}function fs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ps(e,t){for(const n of e)if(!xd(n,{upTo:t}))return n}function xd(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 Ed(e){return e instanceof HTMLInputElement&&"select"in e}function Te(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ed(e)&&t&&e.select()}}var ms=kd();function kd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hs(e,t),e.unshift(t)},remove(t){var n;e=hs(e,t),(n=e[0])==null||n.resume()}}}function hs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Cd(e){return e.filter(t=>t.tagName!=="A")}const Pd=["top","right","bottom","left"],Se=Math.min,ee=Math.max,At=Math.round,jt=Math.floor,de=e=>({x:e,y:e}),Td={left:"right",right:"left",bottom:"top",top:"bottom"},Sd={start:"end",end:"start"};function Sn(e,t,n){return ee(e,Se(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function we(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}function Ne(e){return["top","bottom"].includes(we(e))?"y":"x"}function jn(e){return Nn(Ne(e))}function Nd(e,t,n){n===void 0&&(n=!1);const r=He(e),o=jn(e),s=An(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Mt(a)),[a,Mt(a)]}function Ad(e){const t=Mt(e);return[Mn(e),t,Mn(t)]}function Mn(e){return e.replace(/start|end/g,t=>Sd[t])}function jd(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Md(e,t,n,r){const o=He(e);let s=jd(we(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Mn)))),s}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Td[t])}function Od(e){return{top:0,right:0,bottom:0,left:0,...e}}function vs(e){return typeof e!="number"?Od(e):{top:e,right:e,bottom:e,left:e}}function Ot(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gs(e,t,n){let{reference:r,floating:o}=e;const s=Ne(t),a=jn(t),i=An(a),u=we(t),l=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let v;switch(u){case"top":v={x:d,y:r.y-o.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(He(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Dd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=gs(l,r,u),h=r,v={},y=0;for(let p=0;p<i.length;p++){const{name:g,fn:b}=i[p],{x:w,y:E,data:x,reset:C}=await b({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});d=w??d,f=E??f,v={...v,[g]:{...v[g],...x}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(l=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:f}=gs(l,h,u)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:v}};async function tt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=be(t,e),y=vs(v),g=i[h?f==="floating"?"reference":"floating":f],b=Ot(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:d,strategy:u})),w=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},C=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:E,strategy:u}):w);return{top:(b.top-C.top+y.top)/x.y,bottom:(C.bottom-b.bottom+y.bottom)/x.y,left:(b.left-C.left+y.left)/x.x,right:(C.right-b.right+y.right)/x.x}}const _d=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:d=0}=be(e,t)||{};if(l==null)return{};const f=vs(d),h={x:n,y:r},v=jn(o),y=An(v),p=await a.getDimensions(l),g=v==="y",b=g?"top":"left",w=g?"bottom":"right",E=g?"clientHeight":"clientWidth",x=s.reference[y]+s.reference[v]-h[v]-s.floating[y],C=h[v]-s.reference[v],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=P?P[E]:0;(!k||!await(a.isElement==null?void 0:a.isElement(P)))&&(k=i.floating[E]||s.floating[y]);const T=x/2-C/2,D=k/2-p[y]/2-1,O=Se(f[b],D),$=Se(f[w],D),j=O,L=k-p[y]-$,S=k/2-p[y]/2+T,W=Sn(j,S,L),I=!u.arrow&&He(o)!=null&&S!==W&&s.reference[y]/2-(S<j?O:$)-p[y]/2<0,B=I?S<j?S-j:S-L:0;return{[v]:h[v]+B,data:{[v]:W,centerOffset:S-W-B,...I&&{alignmentOffset:B}},reset:I}}}),Id=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...g}=be(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=we(o),w=Ne(i),E=we(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=h||(E||!p?[Mt(i)]:Ad(i)),P=y!=="none";!h&&P&&C.push(...Md(i,p,y,x));const k=[i,...C],T=await tt(t,g),D=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&D.push(T[b]),f){const S=Nd(o,a,x);D.push(T[S[0]],T[S[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(S=>S<=0)){var $,j;const S=((($=s.flip)==null?void 0:$.index)||0)+1,W=k[S];if(W)return{data:{index:S,overflows:O},reset:{placement:W}};let I=(j=O.filter(B=>B.overflows[0]<=0).sort((B,M)=>B.overflows[1]-M.overflows[1])[0])==null?void 0:j.placement;if(!I)switch(v){case"bestFit":{var L;const B=(L=O.filter(M=>{if(P){const N=Ne(M.placement);return N===w||N==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(N=>N>0).reduce((N,V)=>N+V,0)]).sort((M,N)=>M[1]-N[1])[0])==null?void 0:L[0];B&&(I=B);break}case"initialPlacement":I=i;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function ys(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bs(e){return Pd.some(t=>e[t]>=0)}const Rd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=be(e,t);switch(r){case"referenceHidden":{const s=await tt(t,{...o,elementContext:"reference"}),a=ys(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:bs(a)}}}case"escaped":{const s=await tt(t,{...o,altBoundary:!0}),a=ys(s,n.floating);return{data:{escapedOffsets:a,escaped:bs(a)}}}default:return{}}}}};async function Ld(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=we(n),i=He(n),u=Ne(n)==="y",l=["left","top"].includes(a)?-1:1,d=s&&u?-1:1,f=be(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof y=="number"&&(v=i==="end"?y*-1:y),u?{x:v*d,y:h*l}:{x:h*l,y:v*d}}const $d=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await Ld(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},Fd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=be(e,t),l={x:n,y:r},d=await tt(t,u),f=Ne(we(o)),h=Nn(f);let v=l[h],y=l[f];if(s){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=v+d[g],E=v-d[b];v=Sn(w,v,E)}if(a){const g=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=y+d[g],E=y-d[b];y=Sn(w,y,E)}const p=i.fn({...t,[h]:v,[f]:y});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:s,[f]:a}}}}}},Wd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=be(e,t),d={x:n,y:r},f=Ne(o),h=Nn(f);let v=d[h],y=d[f];const p=be(i,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const E=h==="y"?"height":"width",x=s.reference[h]-s.floating[E]+g.mainAxis,C=s.reference[h]+s.reference[E]-g.mainAxis;v<x?v=x:v>C&&(v=C)}if(l){var b,w;const E=h==="y"?"width":"height",x=["top","left"].includes(we(o)),C=s.reference[f]-s.floating[E]+(x&&((b=a.offset)==null?void 0:b[f])||0)+(x?0:g.crossAxis),P=s.reference[f]+s.reference[E]+(x?0:((w=a.offset)==null?void 0:w[f])||0)-(x?g.crossAxis:0);y<C?y=C:y>P&&(y=P)}return{[h]:v,[f]:y}}}},Bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=be(e,t),d=await tt(t,l),f=we(o),h=He(o),v=Ne(o)==="y",{width:y,height:p}=s.floating;let g,b;f==="top"||f==="bottom"?(g=f,b=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(b=f,g=h==="end"?"top":"bottom");const w=p-d.top-d.bottom,E=y-d.left-d.right,x=Se(p-d[g],w),C=Se(y-d[b],E),P=!t.middlewareData.shift;let k=x,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),P&&!h){const O=ee(d.left,0),$=ee(d.right,0),j=ee(d.top,0),L=ee(d.bottom,0);v?T=y-2*(O!==0||$!==0?O+$:ee(d.left,d.right)):k=p-2*(j!==0||L!==0?j+L:ee(d.top,d.bottom))}await u({...t,availableWidth:T,availableHeight:k});const D=await a.getDimensions(i.floating);return y!==D.width||p!==D.height?{reset:{rects:!0}}:{}}}};function Dt(){return typeof window<"u"}function Ge(e){return ws(e)?(e.nodeName||"").toLowerCase():"#document"}function te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fe(e){var t;return(t=(ws(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ws(e){return Dt()?e instanceof Node||e instanceof te(e).Node:!1}function ae(e){return Dt()?e instanceof Element||e instanceof te(e).Element:!1}function pe(e){return Dt()?e instanceof HTMLElement||e instanceof te(e).HTMLElement:!1}function xs(e){return!Dt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof te(e).ShadowRoot}function nt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ud(e){return["table","td","th"].includes(Ge(e))}function _t(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function On(e){const t=Dn(),n=ae(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zd(e){let t=Ae(e);for(;pe(t)&&!Ke(t);){if(On(t))return t;if(_t(t))return null;t=Ae(t)}return null}function Dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ke(e){return["html","body","#document"].includes(Ge(e))}function ce(e){return te(e).getComputedStyle(e)}function It(e){return ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(Ge(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xs(e)&&e.host||fe(e);return xs(t)?t.host:t}function Es(e){const t=Ae(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:pe(t)&&nt(t)?t:Es(t)}function rt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Es(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=te(o);if(s){const i=_n(a);return t.concat(a,a.visualViewport||[],nt(o)?o:[],i&&n?rt(i):[])}return t.concat(o,rt(o,[],n))}function _n(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ks(e){const t=ce(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pe(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=At(n)!==s||At(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function In(e){return ae(e)?e:e.contextElement}function Ye(e){const t=In(e);if(!pe(t))return de(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=ks(t);let a=(s?At(n.width):n.width)/r,i=(s?At(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Vd=de(0);function Cs(e){const t=te(e);return!Dn()||!t.visualViewport?Vd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==te(e)?!1:t}function Ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=In(e);let a=de(1);t&&(r?ae(r)&&(a=Ye(r)):a=Ye(e));const i=Hd(s,n,r)?Cs(s):de(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(s){const h=te(s),v=r&&ae(r)?te(r):r;let y=h,p=_n(y);for(;p&&r&&v!==y;){const g=Ye(p),b=p.getBoundingClientRect(),w=ce(p),E=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*g.x,x=b.top+(p.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,l*=g.y,d*=g.x,f*=g.y,u+=E,l+=x,y=te(p),p=_n(y)}}return Ot({width:d,height:f,x:u,y:l})}function Rn(e,t){const n=It(e).scrollLeft;return t?t.left+n:Ie(fe(e)).left+n}function Ps(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Rn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Gd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=fe(r),i=t?_t(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=de(1);const d=de(0),f=pe(r);if((f||!f&&!s)&&((Ge(r)!=="body"||nt(a))&&(u=It(r)),pe(r))){const v=Ie(r);l=Ye(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}const h=a&&!f&&!s?Ps(a,u,!0):de(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-u.scrollTop*l.y+d.y+h.y}}function Kd(e){return Array.from(e.getClientRects())}function Yd(e){const t=fe(e),n=It(e),r=e.ownerDocument.body,o=ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rn(e);const i=-n.scrollTop;return ce(r).direction==="rtl"&&(a+=ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Xd(e,t){const n=te(e),r=fe(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Dn();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function qd(e,t){const n=Ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=pe(e)?Ye(e):de(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function Ts(e,t,n){let r;if(t==="viewport")r=Xd(e,n);else if(t==="document")r=Yd(fe(e));else if(ae(t))r=qd(t,n);else{const o=Cs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ot(r)}function Ss(e,t){const n=Ae(e);return n===t||!ae(n)||Ke(n)?!1:ce(n).position==="fixed"||Ss(n,t)}function Zd(e,t){const n=t.get(e);if(n)return n;let r=rt(e,[],!1).filter(i=>ae(i)&&Ge(i)!=="body"),o=null;const s=ce(e).position==="fixed";let a=s?Ae(e):e;for(;ae(a)&&!Ke(a);){const i=ce(a),u=On(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||nt(a)&&!u&&Ss(e,a))?r=r.filter(d=>d!==a):o=i,a=Ae(a)}return t.set(e,r),r}function Qd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?_t(t)?[]:Zd(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,d)=>{const f=Ts(t,d,o);return l.top=ee(f.top,l.top),l.right=Se(f.right,l.right),l.bottom=Se(f.bottom,l.bottom),l.left=ee(f.left,l.left),l},Ts(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Jd(e){const{width:t,height:n}=ks(e);return{width:t,height:n}}function ef(e,t,n){const r=pe(t),o=fe(t),s=n==="fixed",a=Ie(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=de(0);if(r||!r&&!s)if((Ge(t)!=="body"||nt(o))&&(i=It(t)),r){const h=Ie(t,!0,s,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&(u.x=Rn(o));const l=o&&!r&&!s?Ps(o,i):de(0),d=a.left+i.scrollLeft-u.x-l.x,f=a.top+i.scrollTop-u.y-l.y;return{x:d,y:f,width:a.width,height:a.height}}function Ln(e){return ce(e).position==="static"}function Ns(e,t){if(!pe(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fe(e)===n&&(n=n.ownerDocument.body),n}function As(e,t){const n=te(e);if(_t(e))return n;if(!pe(e)){let o=Ae(e);for(;o&&!Ke(o);){if(ae(o)&&!Ln(o))return o;o=Ae(o)}return n}let r=Ns(e,t);for(;r&&Ud(r)&&Ln(r);)r=Ns(r,t);return r&&Ke(r)&&Ln(r)&&!On(r)?n:r||zd(e)||n}const tf=async function(e){const t=this.getOffsetParent||As,n=this.getDimensions,r=await n(e.floating);return{reference:ef(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nf(e){return ce(e).direction==="rtl"}const rf={convertOffsetParentRelativeRectToViewportRelativeRect:Gd,getDocumentElement:fe,getClippingRect:Qd,getOffsetParent:As,getElementRects:tf,getClientRects:Kd,getDimensions:Jd,getScale:Ye,isElement:ae,isRTL:nf};function js(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function of(e,t){let n=null,r;const o=fe(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=l;if(i||t(),!h||!v)return;const y=jt(f),p=jt(o.clientWidth-(d+h)),g=jt(o.clientHeight-(f+v)),b=jt(d),E={rootMargin:-y+"px "+-p+"px "+-g+"px "+-b+"px",threshold:ee(0,Se(1,u))||1};let x=!0;function C(P){const k=P[0].intersectionRatio;if(k!==u){if(!x)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!js(l,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(C,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,E)}n.observe(e)}return a(!0),s}function Ms(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=In(e),d=o||s?[...l?rt(l):[],...rt(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=l&&i?of(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),n()}),l&&!u&&v.observe(l),v.observe(t));let y,p=u?Ie(e):null;u&&g();function g(){const b=Ie(e);p&&!js(p,b)&&n(),p=b,y=requestAnimationFrame(g)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const sf=$d,af=Fd,cf=Id,lf=Bd,uf=Rd,Os=_d,df=Wd,ff=(e,t,n)=>{const r=new Map,o={platform:rf,...n},s={...o.platform,_c:r};return Dd(e,t,{...o,platform:s})};var Rt=typeof document<"u"?K.useLayoutEffect:K.useEffect;function Lt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Lt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ds(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _s(e,t){const n=Ds(e);return Math.round(t*n)/n}function $n(e){const t=c.useRef(e);return Rt(()=>{t.current=e}),t}function Is(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=c.useState(r);Lt(h,r)||v(r);const[y,p]=c.useState(null),[g,b]=c.useState(null),w=c.useCallback(M=>{M!==P.current&&(P.current=M,p(M))},[]),E=c.useCallback(M=>{M!==k.current&&(k.current=M,b(M))},[]),x=s||y,C=a||g,P=c.useRef(null),k=c.useRef(null),T=c.useRef(d),D=u!=null,O=$n(u),$=$n(o),j=$n(l),L=c.useCallback(()=>{if(!P.current||!k.current)return;const M={placement:t,strategy:n,middleware:h};$.current&&(M.platform=$.current),ff(P.current,k.current,M).then(N=>{const V={...N,isPositioned:j.current!==!1};S.current&&!Lt(T.current,V)&&(T.current=V,$e.flushSync(()=>{f(V)}))})},[h,t,n,$,j]);Rt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[l]);const S=c.useRef(!1);Rt(()=>(S.current=!0,()=>{S.current=!1}),[]),Rt(()=>{if(x&&(P.current=x),C&&(k.current=C),x&&C){if(O.current)return O.current(x,C,L);L()}},[x,C,L,O,D]);const W=c.useMemo(()=>({reference:P,floating:k,setReference:w,setFloating:E}),[w,E]),I=c.useMemo(()=>({reference:x,floating:C}),[x,C]),B=c.useMemo(()=>{const M={position:n,left:0,top:0};if(!I.floating)return M;const N=_s(I.floating,d.x),V=_s(I.floating,d.y);return i?{...M,transform:"translate("+N+"px, "+V+"px)",...Ds(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:V}},[n,i,I.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:L,refs:W,elements:I,floatingStyles:B}),[d,L,W,I,B])}const pf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Os({element:r.current,padding:o}).fn(n):{}:r?Os({element:r,padding:o}).fn(n):{}}}},Rs=(e,t)=>({...sf(e),options:[e,t]}),Ls=(e,t)=>({...af(e),options:[e,t]}),$s=(e,t)=>({...df(e),options:[e,t]}),Fs=(e,t)=>({...cf(e),options:[e,t]}),Ws=(e,t)=>({...lf(e),options:[e,t]}),Bs=(e,t)=>({...uf(e),options:[e,t]}),Us=(e,t)=>({...pf(e),options:[e,t]});var mf="Arrow",zs=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});zs.displayName=mf;var hf=zs;function Fn(e){const[t,n]=c.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Wn="Popper",[Vs,Hs]=ne(Wn),[vf,Gs]=Vs(Wn),Ks=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return m.jsx(vf,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ks.displayName=Wn;var Ys="PopperAnchor",Xs=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Gs(Ys,n),a=c.useRef(null),i=F(t,a);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:m.jsx(Q.div,{...o,ref:i})});Xs.displayName=Ys;var Bn="PopperContent",[gf,yf]=Vs(Bn),qs=c.forwardRef((e,t)=>{var se,Me,J,Oe,ft,pt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:y,...p}=e,g=Gs(Bn,n),[b,w]=c.useState(null),E=F(t,le=>w(le)),[x,C]=c.useState(null),P=Fn(x),k=(P==null?void 0:P.width)??0,T=(P==null?void 0:P.height)??0,D=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],j=$.length>0,L={padding:O,boundary:$.filter(wf),altBoundary:j},{refs:S,floatingStyles:W,placement:I,isPositioned:B,middlewareData:M}=Is({strategy:"fixed",placement:D,whileElementsMounted:(...le)=>Ms(...le,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Rs({mainAxis:o+T,alignmentAxis:a}),u&&Ls({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$s():void 0,...L}),u&&Fs({...L}),Ws({...L,apply:({elements:le,rects:mt,availableWidth:br,availableHeight:wr})=>{const{width:xr,height:Er}=mt.reference,Ee=le.floating.style;Ee.setProperty("--radix-popper-available-width",`${br}px`),Ee.setProperty("--radix-popper-available-height",`${wr}px`),Ee.setProperty("--radix-popper-anchor-width",`${xr}px`),Ee.setProperty("--radix-popper-anchor-height",`${Er}px`)}}),x&&Us({element:x,padding:i}),xf({arrowWidth:k,arrowHeight:T}),h&&Bs({strategy:"referenceHidden",...L})]}),[N,V]=Js(I),z=H(y);Y(()=>{B&&(z==null||z())},[B,z]);const Z=(se=M.arrow)==null?void 0:se.x,oe=(Me=M.arrow)==null?void 0:Me.y,he=((J=M.arrow)==null?void 0:J.centerOffset)!==0,[qe,xe]=c.useState();return Y(()=>{b&&xe(window.getComputedStyle(b).zIndex)},[b]),m.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:B?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:qe,"--radix-popper-transform-origin":[(Oe=M.transformOrigin)==null?void 0:Oe.x,(ft=M.transformOrigin)==null?void 0:ft.y].join(" "),...((pt=M.hide)==null?void 0:pt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(gf,{scope:n,placedSide:N,onArrowChange:C,arrowX:Z,arrowY:oe,shouldHideArrow:he,children:m.jsx(Q.div,{"data-side":N,"data-align":V,...p,ref:E,style:{...p.style,animation:B?void 0:"none"}})})})});qs.displayName=Bn;var Zs="PopperArrow",bf={top:"bottom",right:"left",bottom:"top",left:"right"},Qs=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=yf(Zs,r),a=bf[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(hf,{...o,ref:n,style:{...o.style,display:"block"}})})});Qs.displayName=Zs;function wf(e){return e!==null}var xf=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,d]=Js(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",p="";return l==="bottom"?(y=a?f:`${h}px`,p=`${-u}px`):l==="top"?(y=a?f:`${h}px`,p=`${r.floating.height+u}px`):l==="right"?(y=`${-u}px`,p=a?f:`${v}px`):l==="left"&&(y=`${r.floating.width+u}px`,p=a?f:`${v}px`),{data:{x:y,y:p}}}});function Js(e){const[t,n="center"]=e.split("-");return[t,n]}var ei=Ks,Ef=Xs,kf=qs,Cf=Qs,Pf="Portal",ti=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Y(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ht.createPortal(m.jsx(Q.div,{...r,ref:t}),a):null});ti.displayName=Pf;function Tf(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ot=e=>{const{present:t,children:n}=e,r=Sf(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=F(r.ref,Nf(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};ot.displayName="Presence";function Sf(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Tf(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=$t(r.current);s.current=i==="mounted"?l:"none"},[i]),Y(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,v=$t(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=v=>{const p=$t(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=$t(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function $t(e){return(e==null?void 0:e.animationName)||"none"}function Nf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Un="rovingFocusGroup.onEntryFocus",Af={bubbles:!1,cancelable:!0},Ft="RovingFocusGroup",[zn,ni,jf]=ns(Ft),[Mf,ri]=ne(Ft,[jf]),[Of,Df]=Mf(Ft),oi=c.forwardRef((e,t)=>m.jsx(zn.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(zn.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(_f,{...e,ref:t})})}));oi.displayName=Ft;var _f=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...f}=e,h=c.useRef(null),v=F(t,h),y=os(s),[p=null,g]=De({prop:a,defaultProp:i,onChange:u}),[b,w]=c.useState(!1),E=H(l),x=ni(n),C=c.useRef(!1),[P,k]=c.useState(0);return c.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(Un,E),()=>T.removeEventListener(Un,E)},[E]),m.jsx(Of,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:p,onItemFocus:c.useCallback(T=>g(T),[g]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:c.useCallback(()=>k(T=>T-1),[]),children:m.jsx(Q.div,{tabIndex:b||P===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,T=>{const D=!C.current;if(T.target===T.currentTarget&&D&&!b){const O=new CustomEvent(Un,Af);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=x().filter(I=>I.focusable),j=$.find(I=>I.active),L=$.find(I=>I.id===p),W=[j,L,...$].filter(Boolean).map(I=>I.ref.current);ai(W,d)}}C.current=!1}),onBlur:A(e.onBlur,()=>w(!1))})})}),si="RovingFocusGroupItem",ii=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...a}=e,i=ge(),u=s||i,l=Df(si,n),d=l.currentTabStopId===u,f=ni(n),{onFocusableItemAdd:h,onFocusableItemRemove:v}=l;return c.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),m.jsx(zn.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(Q.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:A(e.onMouseDown,y=>{r?l.onItemFocus(u):y.preventDefault()}),onFocus:A(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:A(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const p=Lf(y,l.orientation,l.dir);if(p!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=f().filter(w=>w.focusable).map(w=>w.ref.current);if(p==="last")b.reverse();else if(p==="prev"||p==="next"){p==="prev"&&b.reverse();const w=b.indexOf(y.currentTarget);b=l.loop?$f(b,w+1):b.slice(w+1)}setTimeout(()=>ai(b))}})})})});ii.displayName=si;var If={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Rf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Lf(e,t,n){const r=Rf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return If[r]}function ai(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $f(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ff=oi,Wf=ii,Vn=["Enter"," "],Bf=["ArrowDown","PageUp","Home"],ci=["ArrowUp","PageDown","End"],Uf=[...Bf,...ci],zf={ltr:[...Vn,"ArrowRight"],rtl:[...Vn,"ArrowLeft"]},Vf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},st="Menu",[it,Hf,Gf]=ns(st),[Re,li]=ne(st,[Gf,Hs,ri]),at=Hs(),ui=ri(),[di,je]=Re(st),[Kf,ct]=Re(st),fi=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=at(t),[u,l]=c.useState(null),d=c.useRef(!1),f=H(s),h=os(o);return c.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),m.jsx(ei,{...i,children:m.jsx(di,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:m.jsx(Kf,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:r})})})};fi.displayName=st;var Yf="MenuAnchor",Hn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=at(n);return m.jsx(Ef,{...o,...r,ref:t})});Hn.displayName=Yf;var Gn="MenuPortal",[Xf,pi]=Re(Gn,{forceMount:void 0}),mi=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=je(Gn,t);return m.jsx(Xf,{scope:t,forceMount:n,children:m.jsx(ot,{present:n||s.open,children:m.jsx(ti,{asChild:!0,container:o,children:r})})})};mi.displayName=Gn;var re="MenuContent",[qf,Kn]=Re(re),hi=c.forwardRef((e,t)=>{const n=pi(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=je(re,e.__scopeMenu),a=ct(re,e.__scopeMenu);return m.jsx(it.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{present:r||s.open,children:m.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?m.jsx(Zf,{...o,ref:t}):m.jsx(Qf,{...o,ref:t})})})})}),Zf=c.forwardRef((e,t)=>{const n=je(re,e.__scopeMenu),r=c.useRef(null),o=F(t,r);return c.useEffect(()=>{const s=r.current;if(s)return Po(s)},[]),m.jsx(Yn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qf=c.forwardRef((e,t)=>{const n=je(re,e.__scopeMenu);return m.jsx(Yn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Yn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:y,...p}=e,g=je(re,n),b=ct(re,n),w=at(n),E=ui(n),x=Hf(n),[C,P]=c.useState(null),k=c.useRef(null),T=F(t,k,g.onContentChange),D=c.useRef(0),O=c.useRef(""),$=c.useRef(0),j=c.useRef(null),L=c.useRef("right"),S=c.useRef(0),W=y?gn:c.Fragment,I=y?{as:X,allowPinchZoom:!0}:void 0,B=N=>{var se,Me;const V=O.current+N,z=x().filter(J=>!J.disabled),Z=document.activeElement,oe=(se=z.find(J=>J.ref.current===Z))==null?void 0:se.textValue,he=z.map(J=>J.textValue),qe=up(he,V,oe),xe=(Me=z.find(J=>J.textValue===qe))==null?void 0:Me.ref.current;(function J(Oe){O.current=Oe,window.clearTimeout(D.current),Oe!==""&&(D.current=window.setTimeout(()=>J(""),1e3))})(V),xe&&setTimeout(()=>xe.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),lo();const M=c.useCallback(N=>{var z,Z;return L.current===((z=j.current)==null?void 0:z.side)&&fp(N,(Z=j.current)==null?void 0:Z.area)},[]);return m.jsx(qf,{scope:n,searchRef:O,onItemEnter:c.useCallback(N=>{M(N)&&N.preventDefault()},[M]),onItemLeave:c.useCallback(N=>{var V;M(N)||((V=k.current)==null||V.focus(),P(null))},[M]),onTriggerLeave:c.useCallback(N=>{M(N)&&N.preventDefault()},[M]),pointerGraceTimerRef:$,onPointerGraceIntentChange:c.useCallback(N=>{j.current=N},[]),children:m.jsx(W,{...I,children:m.jsx(ds,{asChild:!0,trapped:o,onMountAutoFocus:A(s,N=>{var V;N.preventDefault(),(V=k.current)==null||V.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(as,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:m.jsx(Ff,{asChild:!0,...E,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:A(u,N=>{b.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(kf,{role:"menu","aria-orientation":"vertical","data-state":Di(g.open),"data-radix-menu-content":"",dir:b.dir,...w,...p,ref:T,style:{outline:"none",...p.style},onKeyDown:A(p.onKeyDown,N=>{const z=N.target.closest("[data-radix-menu-content]")===N.currentTarget,Z=N.ctrlKey||N.altKey||N.metaKey,oe=N.key.length===1;z&&(N.key==="Tab"&&N.preventDefault(),!Z&&oe&&B(N.key));const he=k.current;if(N.target!==he||!Uf.includes(N.key))return;N.preventDefault();const xe=x().filter(se=>!se.disabled).map(se=>se.ref.current);ci.includes(N.key)&&xe.reverse(),cp(xe)}),onBlur:A(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(D.current),O.current="")}),onPointerMove:A(e.onPointerMove,ut(N=>{const V=N.target,z=S.current!==N.clientX;if(N.currentTarget.contains(V)&&z){const Z=N.clientX>S.current?"right":"left";L.current=Z,S.current=N.clientX}}))})})})})})})});hi.displayName=re;var Jf="MenuGroup",Xn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Q.div,{role:"group",...r,ref:t})});Xn.displayName=Jf;var ep="MenuLabel",vi=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Q.div,{...r,ref:t})});vi.displayName=ep;var Wt="MenuItem",gi="menu.itemSelect",Bt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=ct(Wt,e.__scopeMenu),i=Kn(Wt,e.__scopeMenu),u=F(t,s),l=c.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(gi,{bubbles:!0,cancelable:!0});f.addEventListener(gi,v=>r==null?void 0:r(v),{once:!0}),ts(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return m.jsx(yi,{...o,ref:u,disabled:n,onClick:A(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),l.current=!0},onPointerUp:A(e.onPointerUp,f=>{var h;l.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:A(e.onKeyDown,f=>{const h=i.searchRef.current!=="";n||h&&f.key===" "||Vn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Bt.displayName=Wt;var yi=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Kn(Wt,n),i=ui(n),u=c.useRef(null),l=F(t,u),[d,f]=c.useState(!1),[h,v]=c.useState("");return c.useEffect(()=>{const y=u.current;y&&v((y.textContent??"").trim())},[s.children]),m.jsx(it.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:m.jsx(Wf,{asChild:!0,...i,focusable:!r,children:m.jsx(Q.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:A(e.onPointerMove,ut(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,ut(y=>a.onItemLeave(y))),onFocus:A(e.onFocus,()=>f(!0)),onBlur:A(e.onBlur,()=>f(!1))})})})}),tp="MenuCheckboxItem",bi=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Ci,{scope:e.__scopeMenu,checked:n,children:m.jsx(Bt,{role:"menuitemcheckbox","aria-checked":Ut(n)?"mixed":n,...o,ref:t,"data-state":Qn(n),onSelect:A(o.onSelect,()=>r==null?void 0:r(Ut(n)?!0:!n),{checkForDefaultPrevented:!1})})})});bi.displayName=tp;var wi="MenuRadioGroup",[np,rp]=Re(wi,{value:void 0,onValueChange:()=>{}}),xi=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=H(r);return m.jsx(np,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(Xn,{...o,ref:t})})});xi.displayName=wi;var Ei="MenuRadioItem",ki=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=rp(Ei,e.__scopeMenu),s=n===o.value;return m.jsx(Ci,{scope:e.__scopeMenu,checked:s,children:m.jsx(Bt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Qn(s),onSelect:A(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});ki.displayName=Ei;var qn="MenuItemIndicator",[Ci,op]=Re(qn,{checked:!1}),Pi=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=op(qn,n);return m.jsx(ot,{present:r||Ut(s.checked)||s.checked===!0,children:m.jsx(Q.span,{...o,ref:t,"data-state":Qn(s.checked)})})});Pi.displayName=qn;var sp="MenuSeparator",Ti=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Q.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ti.displayName=sp;var ip="MenuArrow",Si=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=at(n);return m.jsx(Cf,{...o,...r,ref:t})});Si.displayName=ip;var Zn="MenuSub",[ap,Ni]=Re(Zn),Ai=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=je(Zn,t),a=at(t),[i,u]=c.useState(null),[l,d]=c.useState(null),f=H(o);return c.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),m.jsx(ei,{...a,children:m.jsx(di,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:d,children:m.jsx(ap,{scope:t,contentId:ge(),triggerId:ge(),trigger:i,onTriggerChange:u,children:n})})})};Ai.displayName=Zn;var lt="MenuSubTrigger",ji=c.forwardRef((e,t)=>{const n=je(lt,e.__scopeMenu),r=ct(lt,e.__scopeMenu),o=Ni(lt,e.__scopeMenu),s=Kn(lt,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,l={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>d,[d]),c.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),u(null)}},[i,u]),m.jsx(Hn,{asChild:!0,...l,children:m.jsx(yi,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Di(n.open),...e,ref:vt(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,ut(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:A(e.onPointerLeave,ut(f=>{var v,y;d();const h=(v=n.content)==null?void 0:v.getBoundingClientRect();if(h){const p=(y=n.content)==null?void 0:y.dataset.side,g=p==="right",b=g?-5:5,w=h[g?"left":"right"],E=h[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x:w,y:h.top},{x:E,y:h.top},{x:E,y:h.bottom},{x:w,y:h.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,f=>{var v;const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||zf[r.dir].includes(f.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),f.preventDefault())})})})});ji.displayName=lt;var Mi="MenuSubContent",Oi=c.forwardRef((e,t)=>{const n=pi(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=je(re,e.__scopeMenu),a=ct(re,e.__scopeMenu),i=Ni(Mi,e.__scopeMenu),u=c.useRef(null),l=F(t,u);return m.jsx(it.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{present:r||s.open,children:m.jsx(it.Slot,{scope:e.__scopeMenu,children:m.jsx(Yn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:A(e.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:A(e.onKeyDown,d=>{var v;const f=d.currentTarget.contains(d.target),h=Vf[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),d.preventDefault())})})})})})});Oi.displayName=Mi;function Di(e){return e?"open":"closed"}function Ut(e){return e==="indeterminate"}function Qn(e){return Ut(e)?"indeterminate":e?"checked":"unchecked"}function cp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function lp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function up(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=lp(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function dp(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s].x,u=t[s].y,l=t[a].x,d=t[a].y;u>r!=d>r&&n<(l-i)*(r-u)/(d-u)+i&&(o=!o)}return o}function fp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dp(n,t)}function ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pp=fi,mp=Hn,hp=mi,vp=hi,gp=Xn,yp=vi,bp=Bt,wp=bi,xp=xi,Ep=ki,kp=Pi,Cp=Ti,Pp=Si,Tp=Ai,Sp=ji,Np=Oi,Jn="DropdownMenu",[Ap,ov]=ne(Jn,[li]),q=li(),[jp,_i]=Ap(Jn),Ii=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=q(t),l=c.useRef(null),[d=!1,f]=De({prop:o,defaultProp:s,onChange:a});return m.jsx(jp,{scope:t,triggerId:ge(),triggerRef:l,contentId:ge(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(h=>!h),[f]),modal:i,children:m.jsx(pp,{...u,open:d,onOpenChange:f,dir:r,modal:i,children:n})})};Ii.displayName=Jn;var Ri="DropdownMenuTrigger",Li=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=_i(Ri,n),a=q(n);return m.jsx(mp,{asChild:!0,...a,children:m.jsx(Q.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:vt(t,s.triggerRef),onPointerDown:A(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:A(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Li.displayName=Ri;var Mp="DropdownMenuPortal",$i=e=>{const{__scopeDropdownMenu:t,...n}=e,r=q(t);return m.jsx(hp,{...r,...n})};$i.displayName=Mp;var Fi="DropdownMenuContent",Wi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_i(Fi,n),s=q(n),a=c.useRef(!1);return m.jsx(vp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{var u;a.current||(u=o.triggerRef.current)==null||u.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:A(e.onInteractOutside,i=>{const u=i.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,d=u.button===2||l;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wi.displayName=Fi;var Op="DropdownMenuGroup",Bi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(gp,{...o,...r,ref:t})});Bi.displayName=Op;var Dp="DropdownMenuLabel",Ui=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(yp,{...o,...r,ref:t})});Ui.displayName=Dp;var _p="DropdownMenuItem",zi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(bp,{...o,...r,ref:t})});zi.displayName=_p;var Ip="DropdownMenuCheckboxItem",Vi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(wp,{...o,...r,ref:t})});Vi.displayName=Ip;var Rp="DropdownMenuRadioGroup",Hi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(xp,{...o,...r,ref:t})});Hi.displayName=Rp;var Lp="DropdownMenuRadioItem",Gi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(Ep,{...o,...r,ref:t})});Gi.displayName=Lp;var $p="DropdownMenuItemIndicator",Ki=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(kp,{...o,...r,ref:t})});Ki.displayName=$p;var Fp="DropdownMenuSeparator",Yi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(Cp,{...o,...r,ref:t})});Yi.displayName=Fp;var Wp="DropdownMenuArrow",Bp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(Pp,{...o,...r,ref:t})});Bp.displayName=Wp;var Up=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=q(t),[i=!1,u]=De({prop:r,defaultProp:s,onChange:o});return m.jsx(Tp,{...a,open:i,onOpenChange:u,children:n})},zp="DropdownMenuSubTrigger",Xi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(Sp,{...o,...r,ref:t})});Xi.displayName=zp;var Vp="DropdownMenuSubContent",qi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=q(n);return m.jsx(Np,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qi.displayName=Vp;var Hp=Ii,Gp=Li,Zi=$i,Qi=Wi,Kp=Bi,Ji=Ui,ea=zi,ta=Vi,Yp=Hi,na=Gi,ra=Ki,oa=Yi,Xp=Up,sa=Xi,ia=qi;const qp=Hp,Zp=Gp,Qp=Kp,Jp=Zi,em=Xp,tm=Yp,aa=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(sa,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-px-2 ksjsui-py-1.5 ksjsui-outline-none","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","data-[state=open]:ksjsui-bg-neutral data-[state=open]:ksjsui-text-neutral-foreground","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...r,children:[n,m.jsx(od,{className:"ksjsui-ms-auto"})]}));aa.displayName=sa.displayName;const ca=c.forwardRef(({className:e,...t},n)=>m.jsx(ia,{ref:n,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-md ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...t}));ca.displayName=ia.displayName;const la=c.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},s)=>m.jsx(Zi,{children:m.jsx(Qi,{ref:s,align:t,side:n,sideOffset:r,className:U(["ksjsui-z-50 ksjsui-min-w-32 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-popover-border ksjsui-bg-popover ksjsui-p-1 ksjsui-text-popover-foreground ksjsui-shadow-md","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-fade-in-0 data-[state=open]:ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","data-[side=left]:ksjsui-slide-in-from-right-2"],e),...o})}));la.displayName=Qi.displayName;const ua=c.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(ea,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","[&_svg]:ksjsui-pointer-events-none [&_svg]:ksjsui-size-4 [&_svg]:ksjsui-shrink-0","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],t&&"ksjsui-ps-8",e),...n}));ua.displayName=ea.displayName;const da=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(ta,{ref:o,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),checked:n,...r,children:[t,m.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:m.jsx(ra,{children:m.jsx(rd,{className:"ksjsui-size-4"})})})]}));da.displayName=ta.displayName;const fa=c.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(na,{ref:r,className:U(["ksjsui-flex ksjsui-cursor-default ksjsui-select-none ksjsui-items-center ksjsui-justify-between ksjsui-gap-2 ksjsui-rounded-md ksjsui-border-0 ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-base ksjsui-outline-none ksjsui-transition-colors","focus:ksjsui-bg-neutral focus:ksjsui-text-neutral-foreground","hover:ksjsui-bg-neutral hover:ksjsui-text-neutral-foreground","data-[disabled]:ksjsui-pointer-events-none data-[disabled]:ksjsui-opacity-50","forced-colors:ksjsui-outline-0 forced-colors:ksjsui-transition-none","forced-colors:hover:ksjsui-bg-highlight forced-colors:hover:ksjsui-text-highlight-text forced-colors:hover:ksjsui-forced-color-adjust-none","forced-colors:focus:ksjsui-bg-highlight forced-colors:focus:ksjsui-text-highlight-text forced-colors:focus:ksjsui-forced-color-adjust-none"],e),...n,children:[t,m.jsx("span",{className:"ksjsui-flex ksjsui-size-3.5 ksjsui-items-center ksjsui-justify-center",children:m.jsx(ra,{children:m.jsx(sd,{className:"ksjsui-size-2"})})})]}));fa.displayName=na.displayName;const pa=c.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(Ji,{ref:r,className:U("ksjsui-px-2 ksjsui-py-1.5 ksjsui-text-sm ksjsui-font-semibold",t&&"ksjsui-ps-8",e),...n}));pa.displayName=Ji.displayName;const ma=c.forwardRef(({className:e,...t},n)=>m.jsx(oa,{ref:n,className:U(["-ksjsui-mx-1 ksjsui-my-1 ksjsui-h-px ksjsui-bg-border","forced-colors:ksjsui-forced-color-adjust-none"],e),...t}));ma.displayName=oa.displayName;const ha=({className:e,...t})=>m.jsx("span",{className:U("ksjsui-ms-auto ksjsui-text-sm ksjsui-tracking-widest ksjsui-opacity-60",e),...t});ha.displayName="DropdownMenuShortcut";const va=c.forwardRef((e,t)=>m.jsx(cn,{ref:t,...e,iconOnly:!0,fullWidth:!1}));va.displayName="IconButton";var nm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rm=nm.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),om="Separator",ga="horizontal",sm=["horizontal","vertical"],ya=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=ga,...o}=e,s=im(r)?r:ga,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return m.jsx(rm.div,{"data-orientation":s,...i,...o,ref:t})});ya.displayName=om;function im(e){return sm.includes(e)}var ba=ya;const wa=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(ba,{ref:o,decorative:n,orientation:t,className:U("ksjsui-shrink-0 ksjsui-bg-border forced-colors:ksjsui-bg-canvas-text forced-colors:ksjsui-forced-color-adjust-none",t==="horizontal"?"ksjsui-block ksjsui-h-px ksjsui-w-full":"ksjsui-inline-block ksjsui-w-px",e),...r}));wa.displayName=ba.displayName;function am(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],xa=cm.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),er="Switch",[lm,sv]=ne(er),[um,dm]=lm(er),Ea=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:u="on",onCheckedChange:l,form:d,...f}=e,[h,v]=c.useState(null),y=F(t,E=>v(E)),p=c.useRef(!1),g=h?d||!!h.closest("form"):!0,[b=!1,w]=De({prop:o,defaultProp:s,onChange:l});return m.jsxs(um,{scope:n,checked:b,disabled:i,children:[m.jsx(xa.button,{type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":Pa(b),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:y,onClick:A(e.onClick,E=>{w(x=>!x),g&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})}),g&&m.jsx(fm,{control:h,bubbles:!p.current,name:r,value:u,checked:b,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Ea.displayName=er;var ka="SwitchThumb",Ca=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=dm(ka,n);return m.jsx(xa.span,{"data-state":Pa(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Ca.displayName=ka;var fm=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=c.useRef(null),a=am(n),i=Fn(t);return c.useEffect(()=>{const u=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Pa(e){return e?"checked":"unchecked"}var Ta=Ea,pm=Ca;const Sa=c.forwardRef(({className:e,tabIndex:t=0,...n},r)=>m.jsx(Ta,{className:U(["ksjsui-peer ksjsui-inline-flex ksjsui-h-6 ksjsui-w-11 ksjsui-shrink-0 ksjsui-cursor-pointer ksjsui-items-center ksjsui-rounded-full ksjsui-border-2 ksjsui-border-transparent ksjsui-bg-neutral ksjsui-transition-colors","focus-visible:ksjsui-outline-none focus-visible:ksjsui-ring-2 focus-visible:ksjsui-ring-ring focus-visible:ksjsui-ring-offset-2 focus-visible:ksjsui-ring-offset-background","disabled:ksjsui-pointer-events-none disabled:ksjsui-cursor-not-allowed disabled:ksjsui-opacity-50","data-[state=unchecked]:ksjsui-bg-input","data-[state=checked]:ksjsui-border-secondary data-[state=checked]:ksjsui-bg-secondary","forced-colors:ksjsui-border-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-border-highlight forced-colors:data-[state=checked]:ksjsui-bg-highlight"],e),tabIndex:t,...n,ref:r,children:m.jsx(pm,{className:U(["ksjsui-pointer-events-none ksjsui-block ksjsui-size-5 ksjsui-translate-x-0 ksjsui-rounded-full ksjsui-bg-thumb ksjsui-shadow ksjsui-ring-0 ksjsui-transition-transform","data-[state=unchecked]:ksjsui-translate-x-0","data-[state=checked]:ksjsui-translate-x-5","rtl:data-[state=checked]:-ksjsui-translate-x-5","forced-colors:ksjsui-bg-button-border forced-colors:ksjsui-transition-none","forced-colors:data-[state=checked]:ksjsui-bg-canvas"])})}));Sa.displayName=Ta.displayName;function mm(e){const t=e+"CollectionProvider",[n,r]=ne(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:p}=v,g=K.useRef(null),b=K.useRef(new Map).current;return m.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:p})};a.displayName=t;const i=e+"CollectionSlot",u=K.forwardRef((v,y)=>{const{scope:p,children:g}=v,b=s(i,p),w=F(y,b.collectionRef);return m.jsx(X,{ref:w,children:g})});u.displayName=i;const l=e+"CollectionItemSlot",d="data-radix-collection-item",f=K.forwardRef((v,y)=>{const{scope:p,children:g,...b}=v,w=K.useRef(null),E=F(y,w),x=s(l,p);return K.useEffect(()=>(x.itemMap.set(w,{ref:w,...b}),()=>void x.itemMap.delete(w))),m.jsx(X,{[d]:"",ref:E,children:g})});f.displayName=l;function h(v){const y=s(e+"CollectionConsumer",v);return K.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((x,C)=>b.indexOf(x.ref.current)-b.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var hm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],me=hm.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Na(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}var vm="DismissableLayer",tr="dismissableLayer.update",gm="dismissableLayer.pointerDownOutside",ym="dismissableLayer.focusOutside",Aa,ja=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ma=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(ja),[d,f]=c.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),y=F(t,k=>f(k)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=d?p.indexOf(d):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,C=wm(k=>{const T=k.target,D=[...l.branches].some(O=>O.contains(T));!x||D||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},h),P=xm(k=>{const T=k.target;[...l.branches].some(O=>O.contains(T))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},h);return gt(k=>{w===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Aa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Da(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Aa)}},[d,h,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Da())},[d,l]),c.useEffect(()=>{const k=()=>v({});return document.addEventListener(tr,k),()=>document.removeEventListener(tr,k)},[]),m.jsx(me.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,C.onPointerDownCapture)})});Ma.displayName=vm;var bm="DismissableLayerBranch",Oa=c.forwardRef((e,t)=>{const n=c.useContext(ja),r=c.useRef(null),o=F(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(me.div,{...e,ref:o})});Oa.displayName=bm;function wm(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){_a(gm,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xm(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&_a(ym,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Da(){const e=new CustomEvent(tr);document.dispatchEvent(e)}function _a(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Na(o,s):o.dispatchEvent(s)}var Em=Ma,km=Oa,Cm="Portal",Ia=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=c.useState(!1);Y(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?ht.createPortal(m.jsx(me.div,{...r,ref:t}),a):null});Ia.displayName=Cm;function Pm(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ra=e=>{const{present:t,children:n}=e,r=Tm(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=F(r.ref,Sm(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ra.displayName="Presence";function Tm(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Pm(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=zt(r.current);s.current=i==="mounted"?l:"none"},[i]),Y(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,v=zt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=v=>{const p=zt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=zt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function zt(e){return(e==null?void 0:e.animationName)||"none"}function Sm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nm="VisuallyHidden",nr=c.forwardRef((e,t)=>m.jsx(me.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));nr.displayName=Nm;var rr="ToastProvider",[or,Am,jm]=mm("Toast"),[La,iv]=ne("Toast",[jm]),[Mm,Vt]=La(rr),$a=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[l,d]=c.useState(0),f=c.useRef(!1),h=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${rr}\`. Expected non-empty \`string\`.`),m.jsx(or.Provider,{scope:t,children:m.jsx(Mm,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:l,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>d(v=>v+1),[]),onToastRemove:c.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};$a.displayName=rr;var Fa="ToastViewport",Om=["F8"],sr="toast.viewportPause",ir="toast.viewportResume",Wa=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Om,label:o="Notifications ({hotkey})",...s}=e,a=Vt(Fa,n),i=Am(n),u=c.useRef(null),l=c.useRef(null),d=c.useRef(null),f=c.useRef(null),h=F(t,f,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;c.useEffect(()=>{const g=b=>{var E;r.length!==0&&r.every(x=>b[x]||b.code===x)&&((E=f.current)==null||E.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),c.useEffect(()=>{const g=u.current,b=f.current;if(y&&g&&b){const w=()=>{if(!a.isClosePausedRef.current){const P=new CustomEvent(sr);b.dispatchEvent(P),a.isClosePausedRef.current=!0}},E=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(ir);b.dispatchEvent(P),a.isClosePausedRef.current=!1}},x=P=>{!g.contains(P.relatedTarget)&&E()},C=()=>{g.contains(document.activeElement)||E()};return g.addEventListener("focusin",w),g.addEventListener("focusout",x),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",E),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",x),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",E)}}},[y,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:g})=>{const w=i().map(E=>{const x=E.ref.current,C=[x,...Hm(x)];return g==="forwards"?C:C.reverse()});return(g==="forwards"?w.reverse():w).flat()},[i]);return c.useEffect(()=>{const g=f.current;if(g){const b=w=>{var C,P,k;const E=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!E){const T=document.activeElement,D=w.shiftKey;if(w.target===g&&D){(C=l.current)==null||C.focus();return}const j=p({tabbingDirection:D?"backwards":"forwards"}),L=j.findIndex(S=>S===T);lr(j.slice(L+1))?w.preventDefault():D?(P=l.current)==null||P.focus():(k=d.current)==null||k.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[i,p]),m.jsxs(km,{ref:u,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&m.jsx(ar,{ref:l,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});lr(g)}}),m.jsx(or.Slot,{scope:n,children:m.jsx(me.ol,{tabIndex:-1,...s,ref:h})}),y&&m.jsx(ar,{ref:d,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});lr(g)}})]})});Wa.displayName=Fa;var Ba="ToastFocusProxy",ar=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Vt(Ba,n);return m.jsx(nr,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const i=a.relatedTarget;!((l=s.viewport)!=null&&l.contains(i))&&r()}})});ar.displayName=Ba;var Ht="Toast",Dm="toast.swipeStart",_m="toast.swipeMove",Im="toast.swipeCancel",Rm="toast.swipeEnd",Ua=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[i=!0,u]=De({prop:r,defaultProp:o,onChange:s});return m.jsx(Ra,{present:n||i,children:m.jsx(Fm,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:H(e.onPause),onResume:H(e.onResume),onSwipeStart:A(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:A(e.onSwipeMove,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:A(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:A(e.onSwipeEnd,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Ua.displayName=Ht;var[Lm,$m]=La(Ht,{onClose(){}}),Fm=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:l,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...y}=e,p=Vt(Ht,n),[g,b]=c.useState(null),w=F(t,S=>b(S)),E=c.useRef(null),x=c.useRef(null),C=o||p.duration,P=c.useRef(0),k=c.useRef(C),T=c.useRef(0),{onToastAdd:D,onToastRemove:O}=p,$=H(()=>{var W;(g==null?void 0:g.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),a()}),j=c.useCallback(S=>{!S||S===1/0||(window.clearTimeout(T.current),P.current=new Date().getTime(),T.current=window.setTimeout($,S))},[$]);c.useEffect(()=>{const S=p.viewport;if(S){const W=()=>{j(k.current),l==null||l()},I=()=>{const B=new Date().getTime()-P.current;k.current=k.current-B,window.clearTimeout(T.current),u==null||u()};return S.addEventListener(sr,I),S.addEventListener(ir,W),()=>{S.removeEventListener(sr,I),S.removeEventListener(ir,W)}}},[p.viewport,C,u,l,j]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&j(C)},[s,C,p.isClosePausedRef,j]),c.useEffect(()=>(D(),()=>O()),[D,O]);const L=c.useMemo(()=>g?Xa(g):null,[g]);return p.viewport?m.jsxs(m.Fragment,{children:[L&&m.jsx(Wm,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),m.jsx(Lm,{scope:n,onClose:$,children:$e.createPortal(m.jsx(or.ItemSlot,{scope:n,children:m.jsx(Em,{asChild:!0,onEscapeKeyDown:A(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(me.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:A(e.onKeyDown,S=>{S.key==="Escape"&&(i==null||i(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:A(e.onPointerDown,S=>{S.button===0&&(E.current={x:S.clientX,y:S.clientY})}),onPointerMove:A(e.onPointerMove,S=>{if(!E.current)return;const W=S.clientX-E.current.x,I=S.clientY-E.current.y,B=!!x.current,M=["left","right"].includes(p.swipeDirection),N=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=M?N(0,W):0,z=M?0:N(0,I),Z=S.pointerType==="touch"?10:2,oe={x:V,y:z},he={originalEvent:S,delta:oe};B?(x.current=oe,Gt(_m,f,he,{discrete:!1})):qa(oe,p.swipeDirection,Z)?(x.current=oe,Gt(Dm,d,he,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(W)>Z||Math.abs(I)>Z)&&(E.current=null)}),onPointerUp:A(e.onPointerUp,S=>{const W=x.current,I=S.target;if(I.hasPointerCapture(S.pointerId)&&I.releasePointerCapture(S.pointerId),x.current=null,E.current=null,W){const B=S.currentTarget,M={originalEvent:S,delta:W};qa(W,p.swipeDirection,p.swipeThreshold)?Gt(Rm,v,M,{discrete:!0}):Gt(Im,h,M,{discrete:!0}),B.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Wm=e=>{const{__scopeToast:t,children:n,...r}=e,o=Vt(Ht,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return zm(()=>a(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),i?null:m.jsx(Ia,{asChild:!0,children:m.jsx(nr,{...r,children:s&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},Bm="ToastTitle",za=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(me.div,{...r,ref:t})});za.displayName=Bm;var Um="ToastDescription",Va=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(me.div,{...r,ref:t})});Va.displayName=Um;var Ha="ToastAction",Ga=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Ya,{altText:n,asChild:!0,children:m.jsx(cr,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ha}\`. Expected non-empty \`string\`.`),null)});Ga.displayName=Ha;var Ka="ToastClose",cr=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$m(Ka,n);return m.jsx(Ya,{asChild:!0,children:m.jsx(me.button,{type:"button",...r,ref:t,onClick:A(e.onClick,o.onClose)})})});cr.displayName=Ka;var Ya=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Xa(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Vm(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Xa(r))}}),t}function Gt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Na(o,s):o.dispatchEvent(s)}var qa=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function zm(e=()=>{}){const t=H(e);Y(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Vm(e){return e.nodeType===e.ELEMENT_NODE}function Hm(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lr(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Gm=$a,Za=Wa,Qa=Ua,Ja=za,ec=Va,tc=Ga,nc=cr;const Km=1,Ym=1e6;let ur=0;function Xm(){return ur=(ur+1)%Number.MAX_SAFE_INTEGER,ur.toString()}const dr=new Map,rc=e=>{if(dr.has(e))return;const t=setTimeout(()=>{dr.delete(e),dt({type:"REMOVE_TOAST",toastId:e})},Ym);dr.set(e,t)},qm=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Km)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?rc(n):e.toasts.forEach(r=>{rc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Kt=[];let Yt={toasts:[]};function dt(e){Yt=qm(Yt,e),Kt.forEach(t=>{t(Yt)})}function Zm({...e}){const t=Xm(),n=o=>dt({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>dt({type:"DISMISS_TOAST",toastId:t});return dt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function oc(){const[e,t]=c.useState(Yt);return c.useEffect(()=>(Kt.push(t),()=>{const n=Kt.indexOf(t);n>-1&&Kt.splice(n,1)}),[e]),{...e,toast:Zm,dismiss:n=>dt({type:"DISMISS_TOAST",toastId:n})}}const Qm=Gm,sc=c.forwardRef(({className:e,...t},n)=>m.jsx(Za,{ref:n,className:U(["ksjsui-fixed ksjsui-bottom-0 ksjsui-end-0 ksjsui-z-[100] ksjsui-flex ksjsui-max-h-screen ksjsui-w-full ksjsui-flex-col ksjsui-p-4","md:ksjsui-max-w-[420px]"],e),...t}));sc.displayName=Za.displayName;const Jm=Ze(["ksjsui-group ksjsui-pointer-events-auto ksjsui-relative ksjsui-flex ksjsui-w-full ksjsui-items-center ksjsui-justify-between ksjsui-space-x-2 ksjsui-overflow-hidden ksjsui-rounded-lg ksjsui-border ksjsui-border-transparent ksjsui-bg-toast ksjsui-p-3 ksjsui-text-toast-foreground ksjsui-shadow-lg ksjsui-transition-all","rtl:ksjsui-space-x-reverse","data-[swipe=cancel]:ksjsui-translate-x-0","data-[swipe=end]:ksjsui-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:ksjsui-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:ksjsui-transition-none","data-[state=open]:ksjsui-animate-in data-[state=open]:ksjsui-slide-in-from-bottom-full","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-80","ltr:data-[state=closed]:ksjsui-slide-out-to-right-full","rtl:data-[state=closed]:ksjsui-slide-out-to-left-full"]),ic=c.forwardRef(({className:e,...t},n)=>m.jsx(Qa,{ref:n,className:U(Jm(),e),...t}));ic.displayName=Qa.displayName;const eh=c.forwardRef(({className:e,...t},n)=>m.jsx(tc,{ref:n,className:U(["ksjsui-inline-flex ksjsui-h-8 ksjsui-shrink-0 ksjsui-items-center ksjsui-justify-center ksjsui-rounded-lg ksjsui-border ksjsui-bg-transparent ksjsui-px-3 ksjsui-text-sm ksjsui-font-medium ksjsui-ring-offset-background ksjsui-transition-colors","focus:ksjsui-outline-none focus:ksjsui-ring-2 focus:ksjsui-ring-ring focus:ksjsui-ring-offset-2","disabled:ksjsui-pointer-events-none disabled:ksjsui-opacity-50"],e),...t}));eh.displayName=tc.displayName;const ac=c.forwardRef(({className:e,...t},n)=>m.jsx(nc,{ref:n,className:U(["ksjsui-rounded-sm ksjsui-p-1 ksjsui-text-current ksjsui-transition-opacity","focus:ksjsui-outline-none focus:ksjsui-ring-2"],e),"toast-close":"",...t,children:m.jsx(Yo,{className:"ksjsui-size-6"})}));ac.displayName=nc.displayName;const cc=c.forwardRef(({className:e,...t},n)=>m.jsx(Ja,{ref:n,className:U("ksjsui-text-sm ksjsui-font-semibold",e),...t}));cc.displayName=Ja.displayName;const lc=c.forwardRef(({className:e,...t},n)=>m.jsx(ec,{ref:n,className:U("ksjsui-text-sm ksjsui-opacity-90",e),...t}));lc.displayName=ec.displayName;const th=()=>{const{toasts:e}=oc();return m.jsxs(Qm,{children:[e.map(function({id:t,title:n,description:r,action:o,icon:s,...a}){return m.jsxs(ic,{...a,className:"ksjsui-flex ksjsui-gap-x-2",children:[s&&m.jsx("div",{className:"ksjsui-shrink-0",children:s}),m.jsxs("div",{className:"ksjsui-grid ksjsui-gap-1 ksjsui-grow",children:[n&&m.jsx(cc,{children:n}),r&&m.jsx(lc,{children:r})]}),o,m.jsx(ac,{})]},t)}),m.jsx(sc,{})]})};var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=nh.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?X:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rh(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}var oh="DismissableLayer",fr="dismissableLayer.update",sh="dismissableLayer.pointerDownOutside",ih="dismissableLayer.focusOutside",uc,dc=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fc=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=c.useContext(dc),[d,f]=c.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=c.useState({}),y=F(t,k=>f(k)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=d?p.indexOf(d):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,C=lh(k=>{const T=k.target,D=[...l.branches].some(O=>O.contains(T));!x||D||(o==null||o(k),a==null||a(k),k.defaultPrevented||i==null||i())},h),P=uh(k=>{const T=k.target;[...l.branches].some(O=>O.contains(T))||(s==null||s(k),a==null||a(k),k.defaultPrevented||i==null||i())},h);return gt(k=>{w===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),c.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(uc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),pc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=uc)}},[d,h,n,l]),c.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),pc())},[d,l]),c.useEffect(()=>{const k=()=>v({});return document.addEventListener(fr,k),()=>document.removeEventListener(fr,k)},[]),m.jsx(Le.div,{...u,ref:y,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,C.onPointerDownCapture)})});fc.displayName=oh;var ah="DismissableLayerBranch",ch=c.forwardRef((e,t)=>{const n=c.useContext(dc),r=c.useRef(null),o=F(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(Le.div,{...e,ref:o})});ch.displayName=ah;function lh(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){mc(sh,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uh(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&mc(ih,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pc(){const e=new CustomEvent(fr);document.dispatchEvent(e)}function mc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rh(o,s):o.dispatchEvent(s)}var dh="Arrow",hc=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(Le.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});hc.displayName=dh;var fh=hc,pr="Popper",[vc,gc]=ne(pr),[ph,yc]=vc(pr),bc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return m.jsx(ph,{scope:t,anchor:r,onAnchorChange:o,children:n})};bc.displayName=pr;var wc="PopperAnchor",xc=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=yc(wc,n),a=c.useRef(null),i=F(t,a);return c.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:m.jsx(Le.div,{...o,ref:i})});xc.displayName=wc;var mr="PopperContent",[mh,hh]=vc(mr),Ec=c.forwardRef((e,t)=>{var se,Me,J,Oe,ft,pt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:y,...p}=e,g=yc(mr,n),[b,w]=c.useState(null),E=F(t,le=>w(le)),[x,C]=c.useState(null),P=Fn(x),k=(P==null?void 0:P.width)??0,T=(P==null?void 0:P.height)??0,D=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(l)?l:[l],j=$.length>0,L={padding:O,boundary:$.filter(gh),altBoundary:j},{refs:S,floatingStyles:W,placement:I,isPositioned:B,middlewareData:M}=Is({strategy:"fixed",placement:D,whileElementsMounted:(...le)=>Ms(...le,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Rs({mainAxis:o+T,alignmentAxis:a}),u&&Ls({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$s():void 0,...L}),u&&Fs({...L}),Ws({...L,apply:({elements:le,rects:mt,availableWidth:br,availableHeight:wr})=>{const{width:xr,height:Er}=mt.reference,Ee=le.floating.style;Ee.setProperty("--radix-popper-available-width",`${br}px`),Ee.setProperty("--radix-popper-available-height",`${wr}px`),Ee.setProperty("--radix-popper-anchor-width",`${xr}px`),Ee.setProperty("--radix-popper-anchor-height",`${Er}px`)}}),x&&Us({element:x,padding:i}),yh({arrowWidth:k,arrowHeight:T}),h&&Bs({strategy:"referenceHidden",...L})]}),[N,V]=Pc(I),z=H(y);Y(()=>{B&&(z==null||z())},[B,z]);const Z=(se=M.arrow)==null?void 0:se.x,oe=(Me=M.arrow)==null?void 0:Me.y,he=((J=M.arrow)==null?void 0:J.centerOffset)!==0,[qe,xe]=c.useState();return Y(()=>{b&&xe(window.getComputedStyle(b).zIndex)},[b]),m.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:B?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:qe,"--radix-popper-transform-origin":[(Oe=M.transformOrigin)==null?void 0:Oe.x,(ft=M.transformOrigin)==null?void 0:ft.y].join(" "),...((pt=M.hide)==null?void 0:pt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(mh,{scope:n,placedSide:N,onArrowChange:C,arrowX:Z,arrowY:oe,shouldHideArrow:he,children:m.jsx(Le.div,{"data-side":N,"data-align":V,...p,ref:E,style:{...p.style,animation:B?void 0:"none"}})})})});Ec.displayName=mr;var kc="PopperArrow",vh={top:"bottom",right:"left",bottom:"top",left:"right"},Cc=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=hh(kc,r),a=vh[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(fh,{...o,ref:n,style:{...o.style,display:"block"}})})});Cc.displayName=kc;function gh(e){return e!==null}var yh=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,d]=Pc(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",p="";return l==="bottom"?(y=a?f:`${h}px`,p=`${-u}px`):l==="top"?(y=a?f:`${h}px`,p=`${r.floating.height+u}px`):l==="right"?(y=`${-u}px`,p=a?f:`${v}px`):l==="left"&&(y=`${r.floating.width+u}px`,p=a?f:`${v}px`),{data:{x:y,y:p}}}});function Pc(e){const[t,n="center"]=e.split("-");return[t,n]}var bh=bc,wh=xc,xh=Ec,Eh=Cc;function kh(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Tc=e=>{const{present:t,children:n}=e,r=Ch(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=F(r.ref,Ph(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Tc.displayName="Presence";function Ch(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=kh(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=Xt(r.current);s.current=i==="mounted"?l:"none"},[i]),Y(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,v=Xt(l);e?u("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Y(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=v=>{const p=Xt(r.current).includes(v.animationName);if(v.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=Xt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Xt(e){return(e==null?void 0:e.animationName)||"none"}function Ph(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Th="VisuallyHidden",Sc=c.forwardRef((e,t)=>m.jsx(Le.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Sc.displayName=Th;var Sh=Sc,[qt,av]=ne("Tooltip",[gc]),Zt=gc(),Nc="TooltipProvider",Nh=700,hr="tooltip.open",[Ah,vr]=qt(Nc),Ac=e=>{const{__scopeTooltip:t,delayDuration:n=Nh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[a,i]=c.useState(!0),u=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),m.jsx(Ah,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:c.useCallback(d=>{u.current=d},[]),disableHoverableContent:o,children:s})};Ac.displayName=Nc;var Qt="Tooltip",[jh,Jt]=qt(Qt),jc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,u=vr(Qt,e.__scopeTooltip),l=Zt(t),[d,f]=c.useState(null),h=ge(),v=c.useRef(0),y=a??u.disableHoverableContent,p=i??u.delayDuration,g=c.useRef(!1),[b=!1,w]=De({prop:r,defaultProp:o,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(hr))):u.onClose(),s==null||s(k)}}),E=c.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),x=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,w(!0)},[w]),C=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),P=c.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0),v.current=0},p)},[p,w]);return c.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(bh,{...l,children:m.jsx(jh,{scope:t,contentId:h,open:b,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?P():x()},[u.isOpenDelayed,P,x]),onTriggerLeave:c.useCallback(()=>{y?C():(window.clearTimeout(v.current),v.current=0)},[C,y]),onOpen:x,onClose:C,disableHoverableContent:y,children:n})})};jc.displayName=Qt;var gr="TooltipTrigger",Mc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jt(gr,n),s=vr(gr,n),a=Zt(n),i=c.useRef(null),u=F(t,i,o.onTriggerChange),l=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(wh,{asChild:!0,...a,children:m.jsx(Le.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:A(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});Mc.displayName=gr;var Mh="TooltipPortal",[cv,Oh]=qt(Mh,{forceMount:void 0}),Xe="TooltipContent",Oc=c.forwardRef((e,t)=>{const n=Oh(Xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Jt(Xe,e.__scopeTooltip);return m.jsx(Tc,{present:r||a.open,children:a.disableHoverableContent?m.jsx(Dc,{side:o,...s,ref:t}):m.jsx(Dh,{side:o,...s,ref:t})})}),Dh=c.forwardRef((e,t)=>{const n=Jt(Xe,e.__scopeTooltip),r=vr(Xe,e.__scopeTooltip),o=c.useRef(null),s=F(t,o),[a,i]=c.useState(null),{trigger:u,onClose:l}=n,d=o.current,{onPointerInTransitChange:f}=r,h=c.useCallback(()=>{i(null),f(!1)},[f]),v=c.useCallback((y,p)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=Rh(b,g.getBoundingClientRect()),E=Lh(b,w),x=$h(p.getBoundingClientRect()),C=Wh([...E,...x]);i(C),f(!0)},[f]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(u&&d){const y=g=>v(g,d),p=g=>v(g,u);return u.addEventListener("pointerleave",y),d.addEventListener("pointerleave",p),()=>{u.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",p)}}},[u,d,v,h]),c.useEffect(()=>{if(a){const y=p=>{const g=p.target,b={x:p.clientX,y:p.clientY},w=(u==null?void 0:u.contains(g))||(d==null?void 0:d.contains(g)),E=!Fh(b,a);w?h():E&&(h(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,d,a,l,h]),m.jsx(Dc,{...e,ref:s})}),[_h,Ih]=qt(Qt,{isInside:!1}),Dc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,u=Jt(Xe,n),l=Zt(n),{onClose:d}=u;return c.useEffect(()=>(document.addEventListener(hr,d),()=>document.removeEventListener(hr,d)),[d]),c.useEffect(()=>{if(u.trigger){const f=h=>{const v=h.target;v!=null&&v.contains(u.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,d]),m.jsx(fc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(xh,{"data-state":u.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(tn,{children:r}),m.jsx(_h,{scope:n,isInside:!0,children:m.jsx(Sh,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Oc.displayName=Xe;var _c="TooltipArrow",Ic=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zt(n);return Ih(_c,n).isInside?null:m.jsx(Eh,{...o,...r,ref:t})});Ic.displayName=_c;function Rh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Lh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function $h(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Fh(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s].x,u=t[s].y,l=t[a].x,d=t[a].y;u>r!=d>r&&n<(l-i)*(r-u)/(d-u)+i&&(o=!o)}return o}function Wh(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Bh(t)}function Bh(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uh=Ac,zh=jc,Vh=Mc,Rc=Oc,Hh=Ic;const Gh=Uh,Kh=zh,Yh=Vh,Lc=c.forwardRef(({children:e,className:t,sideOffset:n=4,...r},o)=>m.jsxs(Rc,{ref:o,sideOffset:n,className:U(["ksjsui-z-50 ksjsui-rounded-md ksjsui-bg-popover-foreground ksjsui-px-3 ksjsui-py-1.5 ksjsui-text-sm ksjsui-text-popover ksjsui-shadow-md ksjsui-animate-in ksjsui-fade-in-0 ksjsui-zoom-in-95","data-[state=closed]:ksjsui-animate-out data-[state=closed]:ksjsui-fade-out-0 data-[state=closed]:ksjsui-zoom-out-95","data-[side=top]:ksjsui-slide-in-from-bottom-2","data-[side=right]:ksjsui-slide-in-from-left-2","data-[side=left]:ksjsui-slide-in-from-right-2","data-[side=bottom]:ksjsui-slide-in-from-top-2","forced-colors:ksjsui-border forced-colors:ksjsui-border-canvas-text"],t),...r,children:[e,m.jsx(Hh,{className:U(["ksjsui-fill-popover-foreground ksjsui-shadow-md","forced-colors:ksjsui-fill-canvas-text"])})]}));Lc.displayName=Rc.displayName;const yr=["px",0,.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,11,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],Xh=[...yr,"auto"];function qh(){return yr.reduce((e,t)=>(e.gap[t]=`ksjsui-gap-${t}`,e.gapColumn[t]=`ksjsui-gap-x-${t}`,e.gapRow[t]=`ksjsui-gap-y-${t}`,e),{gap:{},gapColumn:{},gapRow:{}})}function $c(){return Xh.reduce((e,t)=>(e.m[t]=`ksjsui-m-${t}`,e.mb[t]=`ksjsui-mb-${t}`,e.me[t]=`ksjsui-me-${t}`,e.ms[t]=`ksjsui-ms-${t}`,e.mt[t]=`ksjsui-mt-${t}`,e.mx[t]=`ksjsui-mx-${t}`,e.my[t]=`ksjsui-my-${t}`,e),{m:{},mb:{},me:{},ms:{},mt:{},mx:{},my:{}})}function Fc(){return yr.reduce((e,t)=>(e.p[t]=`ksjsui-p-${t}`,e.pb[t]=`ksjsui-pb-${t}`,e.pe[t]=`ksjsui-pe-${t}`,e.ps[t]=`ksjsui-ps-${t}`,e.pt[t]=`ksjsui-pt-${t}`,e.px[t]=`ksjsui-px-${t}`,e.py[t]=`ksjsui-py-${t}`,e),{p:{},pb:{},pe:{},ps:{},pt:{},px:{},py:{}})}const Zh=Ze("",{variants:{display:{block:"ksjsui-block","inline-block":"ksjsui-inline-block",none:"ksjsui-hidden"},...$c(),...Fc()},defaultVariants:{display:"block"}}),Wc=c.forwardRef(({as:e="div",asChild:t,className:n,display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:d,p:f,pb:h,pe:v,ps:y,pt:p,px:g,py:b,...w},E)=>{const x=t?X:e;return m.jsx(x,{className:U(Zh({display:r,m:o,mb:s,me:a,ms:i,mt:u,mx:l,my:d,p:f,pb:h,pe:v,ps:y,pt:p,px:g,py:b,className:n})),ref:E,...w})});Wc.displayName="Box";const Qh={align:{baseline:"ksjsui-items-baseline",center:"ksjsui-items-center",end:"ksjsui-items-end",start:"ksjsui-items-start",stretch:"ksjsui-items-stretch"},direction:{"column-reverse":"ksjsui-flex-col-reverse","row-reverse":"ksjsui-flex-row-reverse",column:"ksjsui-flex-col",row:"ksjsui-flex-row"},display:{"inline-flex":"ksjsui-inline-flex",flex:"ksjsui-flex",none:"ksjsui-hidden"},...qh(),grow:{0:"ksjsui-grow-0",1:"ksjsui-grow"},justify:{around:"ksjsui-justify-around",baseline:"ksjsui-justify-baseline",between:"ksjsui-justify-between",center:"ksjsui-justify-center",end:"ksjsui-justify-end",evenly:"ksjsui-justify-evenly",normal:"ksjsui-justify-normal",start:"ksjsui-justify-start",stretch:"ksjsui-justify-stretch"},...$c(),...Fc(),self:{auto:"ksjsui-self-auto",baseline:"ksjsui-self-baseline",center:"ksjsui-self-center",end:"ksjsui-self-end",start:"ksjsui-self-start",stretch:"ksjsui-self-stretch"},shrink:{0:"ksjsui-shrink-0",1:"ksjsui-shrink"},wrap:{nowrap:"ksjsui-flex-nowrap",reverse:"ksjsui-flex-wrap-reverse",wrap:"ksjsui-flex-wrap"}},Jh=Ze("ksjsui-inline-flex",{variants:{...Qh},defaultVariants:{display:"flex",justify:"start"}}),Bc=c.forwardRef(({align:e,as:t="div",asChild:n,className:r,display:o,direction:s,gap:a,gapColumn:i,gapRow:u,grow:l,justify:d,m:f,mb:h,me:v,ms:y,mt:p,mx:g,my:b,p:w,pb:E,pe:x,ps:C,pt:P,px:k,py:T,self:D,shrink:O,wrap:$,...j},L)=>{const S=n?X:t;return m.jsx(S,{className:U(Jh({align:e,direction:s,display:o,gap:a,gapColumn:i,gapRow:u,grow:l,justify:d,m:f,mb:h,me:v,ms:y,mt:p,mx:g,my:b,p:w,pb:E,pe:x,ps:C,pt:P,px:k,py:T,self:D,shrink:O,wrap:$,className:r})),ref:L,...j})});Bc.displayName="Flex",_.Avatar=Yr,_.AvatarFallback=qr,_.AvatarImage=Xr,_.Box=Wc,_.Button=cn,_.Dialog=id,_.DialogClose=cd,_.DialogContent=qo,_.DialogDescription=es,_.DialogFooter=Qo,_.DialogHeader=Zo,_.DialogOverlay=kn,_.DialogPortal=Xo,_.DialogTitle=Jo,_.DialogTrigger=ad,_.DirectionProvider=ud,_.DropdownMenu=qp,_.DropdownMenuCheckboxItem=da,_.DropdownMenuContent=la,_.DropdownMenuGroup=Qp,_.DropdownMenuItem=ua,_.DropdownMenuLabel=pa,_.DropdownMenuPortal=Jp,_.DropdownMenuRadioGroup=tm,_.DropdownMenuRadioItem=fa,_.DropdownMenuSeparator=ma,_.DropdownMenuShortcut=ha,_.DropdownMenuSub=em,_.DropdownMenuSubContent=ca,_.DropdownMenuSubTrigger=aa,_.DropdownMenuTrigger=Zp,_.Flex=Bc,_.IconButton=va,_.Separator=wa,_.Switch=Sa,_.Toast=th,_.Tooltip=Kh,_.TooltipContent=Lc,_.TooltipProvider=Gh,_.TooltipTrigger=Yh,_.useToast=oc,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});