@motiadev/ui 0.8.2-beta.140-628177 → 0.8.2-beta.140-027880
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/components/ui/background-effect.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +2 -2
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.stories.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.stories.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.stories.d.ts.map +1 -1
- package/dist/components/ui/collapsible-panel.d.ts.map +1 -1
- package/dist/components/ui/collapsible-panel.stories.d.ts.map +1 -1
- package/dist/components/ui/container.d.ts +1 -1
- package/dist/components/ui/container.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.stories.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.stories.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.stories.d.ts.map +1 -1
- package/dist/components/ui/level-dot.d.ts +1 -1
- package/dist/components/ui/level-dot.d.ts.map +1 -1
- package/dist/components/ui/panel.d.ts.map +1 -1
- package/dist/components/ui/panel.stories.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +2 -2
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/side-panel-detail.d.ts.map +1 -1
- package/dist/components/ui/side-panel.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.stories.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.stories.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.stories.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.stories.d.ts.map +1 -1
- package/dist/globals.css +52 -42
- package/dist/index.cjs +53 -53
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5607 -5634
- package/dist/ui.css +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -19,104 +19,104 @@
|
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,I,k,z,k),O[k+I]=!0)}if(k=null,re!==void 0&&(n(re),k=""+re),i($)&&(n($.key),k=""+$.key),"key"in $){re={};for(var L in $)L!=="key"&&(re[L]=$[L])}else re=$;return k&&a(re,typeof N=="function"?N.displayName||N.name||"Unknown":N),u(N,k,F,M,o(),re,D,S)}function d(N){typeof N=="object"&&N!==null&&N.$$typeof===v&&N._store&&(N._store.validated=1)}var h=T,v=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),q=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,J=Array.isArray,W=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(N){return N()}};var X,j={},Z=h.react_stack_bottom_frame.bind(h,s)(),A=W(r(s)),O={};At.Fragment=m,At.jsx=function(N,$,re,I,M){var F=1e4>q.recentlyCreatedOwnerStacks++;return f(N,$,re,!1,I,M,F?Error("react-stack-top-frame"):Z,F?W(r(N)):A)},At.jsxs=function(N,$,re,I,M){var F=1e4>q.recentlyCreatedOwnerStacks++;return f(N,$,re,!0,I,M,F?Error("react-stack-top-frame"):Z,F?W(r(N)):A)}}()),At}var No;function su(){return No||(No=1,process.env.NODE_ENV==="production"?Jt.exports=ru():Jt.exports=ou()),Jt.exports}var p=su();function Ro(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qt(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ro(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():Ro(e[o],null)}}}}function ie(...e){return c.useCallback(Qt(...e),e)}function It(e){const t=au(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(cu);if(l){const u=l.props.children,f=a.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var iu=It("Slot");function au(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=du(o),a=uu(s,o.props);return o.type!==c.Fragment&&(a.ref=r?Qt(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lu=Symbol("radix.slottable");function cu(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lu}function uu(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function du(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function To(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=To(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=To(e))&&(r&&(r+=" "),r+=t);return r}const Io=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_o=Ao,_t=(e,t)=>n=>{var r;if(t?.variants==null)return _o(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const h=Io(f)||Io(d);return o[u][h]}),a=n&&Object.entries(n).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...v}=f;return Object.entries(v).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...u,d,h]:u},[]);return _o(e,i,l,n?.class,n?.className)},Gn="-",fu=e=>{const t=mu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Gn);return a[0]===""&&a.length!==1&&a.shift(),ko(a,t)||pu(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},ko=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ko(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Gn);return t.validators.find(({validator:i})=>i(s))?.classGroupId},Mo=/^\[(.+)\]$/,pu=e=>{if(Mo.test(e)){const t=Mo.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mu=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Kn(n[o],r,o,t);return r},Kn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Oo(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(hu(o)){Kn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Kn(i,Oo(t,s),n,r)})})},Oo=(e,t)=>{let n=e;return t.split(Gn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hu=e=>e.isThemeGetter,gu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Yn="!",Xn=":",vu=Xn.length,bu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;for(let g=0;g<o.length;g++){let m=o[g];if(i===0&&a===0){if(m===Xn){s.push(o.slice(l,g)),l=g+vu;continue}if(m==="/"){u=g;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const f=s.length===0?o:o.substring(l),d=xu(f),h=d!==f,v=u&&u>l?u-l:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:v}};if(t){const o=t+Xn,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},xu=e=>e.endsWith(Yn)?e.substring(0,e.length-1):e.startsWith(Yn)?e.substring(1):e,yu=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},wu=e=>({cache:gu(e.cacheSize),parseClassName:bu(e),sortModifiers:yu(e),...fu(e)}),Cu=/\s+/,Su=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Cu);let l="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{isExternal:d,modifiers:h,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}=n(f);if(d){l=f+(l.length>0?" "+l:l);continue}let b=!!m,x=r(b?g.substring(0,m):g);if(!x){if(!b){l=f+(l.length>0?" "+l:l);continue}if(x=r(g),!x){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=s(h).join(":"),w=v?y+Yn:y,C=w+x;if(i.includes(C))continue;i.push(C);const P=o(x,b);for(let _=0;_<P.length;++_){const E=P[_];i.push(w+E)}l=f+(l.length>0?" "+l:l)}return l};function Eu(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Do(t))&&(r&&(r+=" "),r+=n);return r}const Do=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Do(e[r]))&&(n&&(n+=" "),n+=t);return n};function Pu(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((f,d)=>d(f),e());return n=wu(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=Su(l,n);return o(l,f),f}return function(){return s(Eu.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nu=/^\d+\/\d+$/,Ru=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tu=/\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$/,Au=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Iu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_u=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>Nu.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),ze=e=>!!e&&Number.isInteger(Number(e)),qn=e=>e.endsWith("%")&&se(e.slice(0,-1)),Me=e=>Ru.test(e),ku=()=>!0,Mu=e=>Tu.test(e)&&!Au.test(e),zo=()=>!1,Ou=e=>Iu.test(e),Du=e=>_u.test(e),ju=e=>!U(e)&&!G(e),Lu=e=>ut(e,Wo,zo),U=e=>jo.test(e),Qe=e=>ut(e,Vo,Mu),Zn=e=>ut(e,Bu,se),$o=e=>ut(e,Ho,zo),zu=e=>ut(e,Bo,Du),en=e=>ut(e,Uo,Ou),G=e=>Lo.test(e),kt=e=>dt(e,Vo),$u=e=>dt(e,Wu),Fo=e=>dt(e,Ho),Fu=e=>dt(e,Wo),Hu=e=>dt(e,Bo),tn=e=>dt(e,Uo,!0),ut=(e,t,n)=>{const r=jo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dt=(e,t,n=!1)=>{const r=Lo.exec(e);return r?r[1]?t(r[1]):n:!1},Ho=e=>e==="position"||e==="percentage",Bo=e=>e==="image"||e==="url",Wo=e=>e==="length"||e==="size"||e==="bg-size",Vo=e=>e==="length",Bu=e=>e==="number",Wu=e=>e==="family-name",Uo=e=>e==="shadow",Vu=Pu(()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),o=he("tracking"),s=he("leading"),i=he("breakpoint"),a=he("container"),l=he("spacing"),u=he("radius"),f=he("shadow"),d=he("inset-shadow"),h=he("text-shadow"),v=he("drop-shadow"),g=he("blur"),m=he("perspective"),b=he("aspect"),x=he("ease"),y=he("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...C(),G,U],_=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],R=()=>[G,U,l],H=()=>[ct,"full","auto",...R()],V=()=>[ze,"none","subgrid",G,U],q=()=>["auto",{span:["full",ze,G,U]},ze,G,U],B=()=>[ze,"auto",G,U],J=()=>["auto","min","max","fr",G,U],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...R()],Z=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],A=()=>[e,G,U],O=()=>[...C(),Fo,$o,{position:[G,U]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",Fu,Lu,{size:[G,U]}],re=()=>[qn,kt,Qe],I=()=>["","none","full",u,G,U],M=()=>["",se,kt,Qe],F=()=>["solid","dashed","dotted","double"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>[se,qn,Fo,$o],k=()=>["","none",g,G,U],z=()=>["none",se,G,U],L=()=>["none",se,G,U],Q=()=>[se,G,U],ne=()=>[ct,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[ku],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[ju],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",se],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,U,G,b]}],container:["container"],columns:[{columns:[se,U,G,a]}],"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"],sr:["sr-only","not-sr-only"],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:P()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[ze,"auto",G,U]}],basis:[{basis:[ct,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,ct,"auto","initial","none",U]}],grow:[{grow:["",se,G,U]}],shrink:[{shrink:["",se,G,U]}],order:[{order:[ze,"first","last","none",G,U]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,kt,Qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,G,Zn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qn,U]}],"font-family":[{font:[$u,U,t]}],"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:[o,G,U]}],"line-clamp":[{"line-clamp":[se,"none",G,Zn]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",G,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",G,Qe]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[se,"auto",G,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ze,G,U],radial:["",G,U],conic:[ze,G,U]},Hu,zu]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,G,U]}],"outline-w":[{outline:["",se,kt,Qe]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",f,tn,en]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,tn,en]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[se,Qe]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,tn,en]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[se,G,U]}],"mix-blend":[{"mix-blend":[...D(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":D()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":S()}],"mask-image-linear-to-pos":[{"mask-linear-to":S()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":S()}],"mask-image-t-to-pos":[{"mask-t-to":S()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":S()}],"mask-image-r-to-pos":[{"mask-r-to":S()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":S()}],"mask-image-b-to-pos":[{"mask-b-to":S()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":S()}],"mask-image-l-to-pos":[{"mask-l-to":S()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":S()}],"mask-image-x-to-pos":[{"mask-x-to":S()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":S()}],"mask-image-y-to-pos":[{"mask-y-to":S()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[G,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":S()}],"mask-image-radial-to-pos":[{"mask-radial-to":S()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":S()}],"mask-image-conic-to-pos":[{"mask-conic-to":S()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,U]}],filter:[{filter:["","none",G,U]}],blur:[{blur:k()}],brightness:[{brightness:[se,G,U]}],contrast:[{contrast:[se,G,U]}],"drop-shadow":[{"drop-shadow":["","none",v,tn,en]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",se,G,U]}],"hue-rotate":[{"hue-rotate":[se,G,U]}],invert:[{invert:["",se,G,U]}],saturate:[{saturate:[se,G,U]}],sepia:[{sepia:["",se,G,U]}],"backdrop-filter":[{"backdrop-filter":["","none",G,U]}],"backdrop-blur":[{"backdrop-blur":k()}],"backdrop-brightness":[{"backdrop-brightness":[se,G,U]}],"backdrop-contrast":[{"backdrop-contrast":[se,G,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,G,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,G,U]}],"backdrop-invert":[{"backdrop-invert":["",se,G,U]}],"backdrop-opacity":[{"backdrop-opacity":[se,G,U]}],"backdrop-saturate":[{"backdrop-saturate":[se,G,U]}],"backdrop-sepia":[{"backdrop-sepia":["",se,G,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",G,U]}],ease:[{ease:["linear","initial",x,G,U]}],delay:[{delay:[se,G,U]}],animate:[{animate:["none",y,G,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,G,U]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[G,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",G,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",G,U]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[se,kt,Qe,Zn]}],stroke:[{stroke:["none",...A()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function te(...e){return Vu(Ao(e))}const Uu=_t("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-input text-foreground hover:bg-border active:bg-card",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",light:"bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80",secondary:"bg-secondary text-foreground shadow-sm hover:opacity-90 active:opacity-80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80",outline:"border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground",ghost:"hover:bg-muted-foreground/20 text-foreground",link:"text-primary underline-offset-4 hover:underline text-primary-foreground",icon:"hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10"},size:{sm:"h-6 px-3 text-xs [&_svg]:size-3",default:"h-9 px-4 text-sm [&_svg]:size-4",md:"h-9 px-4 text-sm [&_svg]:size-4",lg:"h-11 px-6 text-base [&_svg]:size-5",icon:"h-4 w-4 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"default"}}),Oe=T.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?iu:"button";return p.jsx(i,{className:te(Uu({variant:t,size:n}),e),ref:s,...o})});Oe.displayName="Button";const Go=({className:e,...t})=>p.jsx("textarea",{"data-slot":"textarea",className:te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","min-h-[80px] field-sizing-content","bg-input","border border-border","text-foreground placeholder:text-muted-foreground","hover:border-border","focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]",e),...t});Go.displayName="Textarea";const Gu=_t(te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","field-sizing-content","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]"),{variants:{variant:{default:"bg-input border border-border hover:border-border focus-visible:border-ring text-foreground placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/20",shade:"bg-muted-foreground/10 text-muted-foreground hover:bg-muted-foreground/12 focus:bg-muted-foreground/15",outline:"focus-visible:border-border focus-visible:bg-card hover:border-border hover:bg-card bg-transparent text-foreground border border-transparent",outlineReadonly:"bg-transparent text-foreground border border-transparent"}},defaultVariants:{variant:"default"}}),Ko=T.forwardRef(({className:e,type:t,variant:n,...r},o)=>p.jsx("input",{type:t,className:Gu({variant:n,className:e}),ref:o,...r}));Ko.displayName="Input";function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Se(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=d=>{const{scope:h,children:v,...g}=d,m=h?.[e]?.[l]||a,b=c.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:b,children:v})};u.displayName=s+"Provider";function f(d,h){const v=h?.[e]?.[l]||a,g=c.useContext(v);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=a?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Ku(o,...t)]}function Ku(...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 i=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Yo(e){const t=e+"CollectionProvider",[n,r]=Se(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:x}=m,y=T.useRef(null),w=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=It(a),u=T.forwardRef((m,b)=>{const{scope:x,children:y}=m,w=s(a,x),C=ie(b,w.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=It(f),v=T.forwardRef((m,b)=>{const{scope:x,children:y,...w}=m,C=T.useRef(null),P=ie(b,C),_=s(f,x);return T.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),p.jsx(h,{[d]:"",ref:P,children:y})});v.displayName=f;function g(m){const b=s(e+"CollectionConsumer",m);return T.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,E)=>w.indexOf(_.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:v},g,r]}var pe=globalThis?.document?c.useLayoutEffect:()=>{},Yu=c[" useId ".trim().toString()]||(()=>{}),Xu=0;function Te(e){const[t,n]=c.useState(Yu());return pe(()=>{n(r=>r??String(Xu++))},[e]),t?`radix-${t}`:""}var qu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=qu.reduce((e,t)=>{const n=It(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xo(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}function ve(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}var Zu=c[" useInsertionEffect ".trim().toString()]||pe;function $e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ju({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=c.useCallback(f=>{if(a){const d=Qu(f)?f(e):f;d!==e&&i.current?.(d)}else s(f)},[a,e,s,i]);return[l,u]}function Ju({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Zu(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Qu(e){return typeof e=="function"}var ed=c.createContext(void 0);function nn(e){const t=c.useContext(ed);return e||t||"ltr"}var Jn="rovingFocusGroup.onEntryFocus",td={bubbles:!1,cancelable:!0},Mt="RovingFocusGroup",[Qn,qo,nd]=Yo(Mt),[rd,rn]=Se(Mt,[nd]),[od,sd]=rd(Mt),Zo=c.forwardRef((e,t)=>p.jsx(Qn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Qn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(id,{...e,ref:t})})}));Zo.displayName=Mt;var id=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,h=c.useRef(null),v=ie(t,h),g=nn(s),[m,b]=$e({prop:i,defaultProp:a??null,onChange:l,caller:Mt}),[x,y]=c.useState(!1),w=ve(u),C=qo(n),P=c.useRef(!1),[_,E]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Jn,w),()=>R.removeEventListener(Jn,w)},[w]),p.jsx(od,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:c.useCallback(R=>b(R),[b]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>E(R=>R-1),[]),children:p.jsx(ue.div,{tabIndex:x||_===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Y(e.onMouseDown,()=>{P.current=!0}),onFocus:Y(e.onFocus,R=>{const H=!P.current;if(R.target===R.currentTarget&&H&&!x){const V=new CustomEvent(Jn,td);if(R.currentTarget.dispatchEvent(V),!V.defaultPrevented){const q=C().filter(j=>j.focusable),B=q.find(j=>j.active),J=q.find(j=>j.id===m),X=[B,J,...q].filter(Boolean).map(j=>j.ref.current);es(X,f)}}P.current=!1}),onBlur:Y(e.onBlur,()=>y(!1))})})}),Jo="RovingFocusGroupItem",Qo=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=Te(),u=s||l,f=sd(Jo,n),d=f.currentTabStopId===u,h=qo(n),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:m}=f;return c.useEffect(()=>{if(r)return v(),()=>g()},[r,v,g]),p.jsx(Qn.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:Y(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:Y(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Y(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=cd(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=f.loop?ud(w,C+1):w.slice(C+1)}setTimeout(()=>es(w))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});Qo.displayName=Jo;var ad={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ld(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cd(e,t,n){const r=ld(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ad[r]}function es(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ud(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ts=Zo,ns=Qo;function dd(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=fd(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ie(r.ref,pd(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Fe.displayName="Presence";function fd(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=dd(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=on(r.current);s.current=a==="mounted"?u:"none"},[a]),pe(()=>{const u=r.current,f=o.current;if(f!==e){const h=s.current,v=on(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=v=>{const m=on(r.current).includes(v.animationName);if(v.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(s.current=on(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function on(e){return e?.animationName||"none"}function pd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sn="Tabs",[md,Vv]=Se(sn,[rn]),rs=rn(),[hd,er]=md(sn),os=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,f=nn(a),[d,h]=$e({prop:r,onChange:o,defaultProp:s??"",caller:sn});return p.jsx(hd,{scope:n,baseId:Te(),value:d,onValueChange:h,orientation:i,dir:f,activationMode:l,children:p.jsx(ue.div,{dir:f,"data-orientation":i,...u,ref:t})})});os.displayName=sn;var ss="TabsList",is=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=er(ss,n),i=rs(n);return p.jsx(ts,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(ue.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});is.displayName=ss;var as="TabsTrigger",ls=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=er(as,n),a=rs(n),l=ds(i.baseId,r),u=fs(i.baseId,r),f=r===i.value;return p.jsx(ns,{asChild:!0,...a,focusable:!o,active:f,children:p.jsx(ue.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:Y(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:Y(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{const d=i.activationMode!=="manual";!f&&!o&&d&&i.onValueChange(r)})})})});ls.displayName=as;var cs="TabsContent",us=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=er(cs,n),l=ds(a.baseId,r),u=fs(a.baseId,r),f=r===a.value,d=c.useRef(f);return c.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Fe,{present:o||f,children:({present:h})=>p.jsx(ue.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&s})})});us.displayName=cs;function ds(e,t){return`${e}-trigger-${t}`}function fs(e,t){return`${e}-content-${t}`}var gd=os,vd=is,bd=ls,xd=us;const an=({className:e,...t})=>p.jsx(gd,{"data-slot":"tabs",className:te("flex flex-col h-full",e),...t});an.displayName="Tabs";const tr=({className:e,...t})=>p.jsx(vd,{"data-slot":"tabs-list",className:te("inline-flex rounded-none bg-transparent p-0 min-h-10",e),...t});tr.displayName="TabsList";const nr=({className:e,...t})=>p.jsx(bd,{"data-slot":"tabs-trigger",className:te("inline-flex items-center justify-center whitespace-nowrap rounded-none px-4 py-2 text-sm font-medium text-muted-foreground ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 relative data-[state=active]:after:absolute data-[state=active]:after:bottom-0 data-[state=active]:after:left-1/2 data-[state=active]:after:-translate-x-1/2 data-[state=active]:after:h-0.5 data-[state=active]:after:w-[calc(100%-2.5rem)] data-[state=active]:after:bg-foreground data-[state=active]:after:rounded-full",e),...t});nr.displayName="TabsTrigger";const rr=({className:e,...t})=>p.jsx(xd,{"data-slot":"tabs-content",className:te("flex-1 outline-none text-foreground",e),...t});rr.displayName="TabsContent";const yd={subtle:{width:"100%",height:"100%"}},or=({patternType:e="subtle"})=>{const t=yd[e];return p.jsx("div",{"aria-hidden":"true",className:"absolute top-0 h-full w-full inset-x-0 -z-10 transform-gpu overflow-hidden pointer-events-none",children:p.jsx("div",{style:t,className:"relative -z-10 aspect-1155/678 bg-linear-to-br from-white/60 to-[#050505] opacity-10 pointer-events-none"})})},wd={default:"bg-transparent border border-border",outlined:"bg-transparent border border-border",filled:"bg-muted border border-transparent",ghost:"bg-transparent border-transparent shadow-none"},ps=({label:e,value:t,highlighted:n})=>p.jsxs("div",{className:"flex gap-4 items-start",children:[p.jsx("div",{className:"flex items-center h-8 shrink-0",children:p.jsx("span",{className:"text-sm font-medium text-foreground tracking-[-0.25px] w-24 truncate",children:e})}),p.jsx("div",{className:te("flex-1 rounded-lg px-2 py-1 min-h-6",n&&"bg-secondary"),children:p.jsx("div",{className:"flex items-center min-h-6",children:typeof t=="string"?p.jsx("span",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t}):t})})]}),sr=({"data-testid":e,title:t,subtitle:n,details:r,actions:o,className:s,children:i,size:a,variant:l="default",contentClassName:u,tabs:f})=>{const d=f&&f.length>0,h=T.useMemo(()=>{const v=p.jsxs(p.Fragment,{children:[d&&p.jsx(tr,{className:te("bg-card border-b border-border px-1 pt-5",{"bg-transparent":l==="ghost"}),children:f?.map(g=>p.jsx(nr,{value:g.label,"data-testid":g["data-testid"],className:"cursor-pointer",children:g.labelComponent||g.label},g.label))}),p.jsxs("div",{className:te("flex flex-col gap-2 p-4 h-full",u),children:[r?.map((g,m)=>p.jsx(ps,{...g},m)),d&&f.map(g=>p.jsx(rr,{value:g.label,children:g.content},g.label)),i]})]});return d?p.jsx(an,{defaultValue:f?.[0]?.label,children:v}):v},[f,l,a,t,n,r,o,u,i,d]);return p.jsxs("div",{className:te("relative isolate size-full backdrop-blur-[48px] backdrop-filter","text-foreground","rounded-lg overflow-hidden",wd[l],s),"data-testid":e,children:[p.jsx(or,{}),p.jsxs("div",{className:"flex flex-col size-full",children:[p.jsx("div",{className:te("relative shrink-0 w-full border-b border-border bg-card",{"bg-transparent":l==="ghost","border-b-0":d}),children:t&&p.jsxs("div",{className:te("flex flex-col gap-1 px-5 py-4",{"px-4 py-3":a==="sm","px-5 py-4":a==="md","pb-0":d}),children:[p.jsxs("div",{className:"flex items-center w-full",children:[p.jsx("div",{className:te("font-semibold text-foreground tracking-[-0.25px] leading-tight flex-1",a==="sm"?"text-xs":"text-base"),children:t}),o&&o.length>0&&p.jsx("div",{className:"flex items-center gap-1",children:o.map((v,g)=>p.jsx(Oe,{onClick:v.onClick,variant:"ghost",className:te(v.active&&"bg-muted-foreground/20 hover:bg-muted-foreground/30"),size:"icon","aria-label":v.label,"data-testid":"close-panel",children:v.icon},g))})]}),n&&p.jsx("p",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:n})]})}),p.jsx("div",{className:"flex-1 overflow-auto",children:h})]})]})};sr.displayName="Panel";function ms(e,t=globalThis?.document){const n=ve(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 Cd="DismissableLayer",ir="dismissableLayer.update",Sd="dismissableLayer.pointerDownOutside",Ed="dismissableLayer.focusOutside",hs,gs=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vs=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(gs),[f,d]=c.useState(null),h=f?.ownerDocument??globalThis?.document,[,v]=c.useState({}),g=ie(t,E=>d(E)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(b),y=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,P=Rd(E=>{const R=E.target,H=[...u.branches].some(V=>V.contains(R));!C||H||(o?.(E),i?.(E),E.defaultPrevented||a?.())},h),_=Td(E=>{const R=E.target;[...u.branches].some(V=>V.contains(R))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},h);return ms(E=>{y===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hs=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),bs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hs)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),bs())},[f,u]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(ir,E),()=>document.removeEventListener(ir,E)},[]),p.jsx(ue.div,{...l,ref:g,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,P.onPointerDownCapture)})});vs.displayName=Cd;var Pd="DismissableLayerBranch",Nd=c.forwardRef((e,t)=>{const n=c.useContext(gs),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ue.div,{...e,ref:o})});Nd.displayName=Pd;function Rd(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){xs(Sd,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Td(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&xs(Ed,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 bs(){const e=new CustomEvent(ir);document.dispatchEvent(e)}function xs(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?Xo(o,s):o.dispatchEvent(s)}var ar=0;function ys(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ws()),document.body.insertAdjacentElement("beforeend",e[1]??ws()),ar++,()=>{ar===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ar--}},[])}function ws(){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 lr="focusScope.autoFocusOnMount",cr="focusScope.autoFocusOnUnmount",Cs={bubbles:!1,cancelable:!0},Ad="FocusScope",Ss=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=ve(o),f=ve(s),d=c.useRef(null),h=ie(t,m=>l(m)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(w){if(v.paused||!a)return;const C=w.target;a.contains(C)?d.current=C:He(d.current,{select:!0})},b=function(w){if(v.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||He(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&He(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,v.paused]),c.useEffect(()=>{if(a){Ns.add(v);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(lr,Cs);a.addEventListener(lr,u),a.dispatchEvent(x),x.defaultPrevented||(Id(Dd(Es(a)),{select:!0}),document.activeElement===m&&He(a))}return()=>{a.removeEventListener(lr,u),setTimeout(()=>{const x=new CustomEvent(cr,Cs);a.addEventListener(cr,f),a.dispatchEvent(x),x.defaultPrevented||He(m??document.body,{select:!0}),a.removeEventListener(cr,f),Ns.remove(v)},0)}}},[a,u,f,v]);const g=c.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[w,C]=_d(y);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&He(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&He(C,{select:!0})):x===y&&m.preventDefault()}},[n,r,v.paused]);return p.jsx(ue.div,{tabIndex:-1,...i,ref:h,onKeyDown:g})});Ss.displayName=Ad;function Id(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(He(r,{select:t}),document.activeElement!==n)return}function _d(e){const t=Es(e),n=Ps(t,e),r=Ps(t.reverse(),e);return[n,r]}function Es(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(!kd(n,{upTo:t}))return n}function kd(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 Md(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Md(e)&&t&&e.select()}}var Ns=Od();function Od(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Rs(e,t),e.unshift(t)},remove(t){e=Rs(e,t),e[0]?.resume()}}}function Rs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dd(e){return e.filter(t=>t.tagName!=="A")}const jd=["top","right","bottom","left"],Be=Math.min,xe=Math.max,ln=Math.round,cn=Math.floor,Ae=e=>({x:e,y:e}),Ld={left:"right",right:"left",bottom:"top",top:"bottom"},zd={start:"end",end:"start"};function ur(e,t,n){return xe(e,Be(t,n))}function De(e,t){return typeof e=="function"?e(t):e}function je(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function dr(e){return e==="x"?"y":"x"}function fr(e){return e==="y"?"height":"width"}function We(e){return["top","bottom"].includes(je(e))?"y":"x"}function pr(e){return dr(We(e))}function $d(e,t,n){n===void 0&&(n=!1);const r=ft(e),o=pr(e),s=fr(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=un(i)),[i,un(i)]}function Fd(e){const t=un(e);return[mr(e),t,mr(t)]}function mr(e){return e.replace(/start|end/g,t=>zd[t])}function Hd(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Bd(e,t,n,r){const o=ft(e);let s=Hd(je(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(mr)))),s}function un(e){return e.replace(/left|right|bottom|top/g,t=>Ld[t])}function Wd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ts(e){return typeof e!="number"?Wd(e):{top:e,right:e,bottom:e,left:e}}function dn(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 As(e,t,n){let{reference:r,floating:o}=e;const s=We(t),i=pr(t),a=fr(i),l=je(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let v;switch(l){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(ft(t)){case"start":v[i]-=h*(n&&u?-1:1);break;case"end":v[i]+=h*(n&&u?-1:1);break}return v}const Vd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=As(u,r,l),h=r,v={},g=0;for(let m=0;m<a.length;m++){const{name:b,fn:x}=a[m],{x:y,y:w,data:C,reset:P}=await x({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:u,platform:i,elements:{reference:e,floating:t}});f=y??f,d=w??d,v={...v,[b]:{...v[b],...C}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=As(u,h,l)),m=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:v}};async function Ot(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:v=0}=De(t,e),g=Ts(v),b=a[h?d==="floating"?"reference":"floating":d],x=dn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},P=dn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(x.top-P.top+g.top)/C.y,bottom:(P.bottom-x.bottom+g.bottom)/C.y,left:(x.left-P.left+g.left)/C.x,right:(P.right-x.right+g.right)/C.x}}const Ud=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=De(e,t)||{};if(u==null)return{};const d=Ts(f),h={x:n,y:r},v=pr(o),g=fr(v),m=await i.getDimensions(u),b=v==="y",x=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[v]-h[v]-s.floating[g],P=h[v]-s.reference[v],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=_?_[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(_)))&&(E=a.floating[w]||s.floating[g]);const R=C/2-P/2,H=E/2-m[g]/2-1,V=Be(d[x],H),q=Be(d[y],H),B=V,J=E-m[g]-q,W=E/2-m[g]/2+R,X=ur(B,W,J),j=!l.arrow&&ft(o)!=null&&W!==X&&s.reference[g]/2-(W<B?V:q)-m[g]/2<0,Z=j?W<B?W-B:W-J:0;return{[v]:h[v]+Z,data:{[v]:X,centerOffset:W-X-Z,...j&&{alignmentOffset:Z}},reset:j}}}),Gd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=De(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=je(o),y=We(a),w=je(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=h||(w||!m?[un(a)]:Fd(a)),_=g!=="none";!h&&_&&P.push(...Bd(a,m,g,C));const E=[a,...P],R=await Ot(t,b),H=[];let V=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&H.push(R[x]),d){const W=$d(o,i,C);H.push(R[W[0]],R[W[1]])}if(V=[...V,{placement:o,overflows:H}],!H.every(W=>W<=0)){var q,B;const W=(((q=s.flip)==null?void 0:q.index)||0)+1,X=E[W];if(X)return{data:{index:W,overflows:V},reset:{placement:X}};let j=(B=V.filter(Z=>Z.overflows[0]<=0).sort((Z,A)=>Z.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(v){case"bestFit":{var J;const Z=(J=V.filter(A=>{if(_){const O=We(A.placement);return O===y||O==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(O=>O>0).reduce((O,N)=>O+N,0)]).sort((A,O)=>A[1]-O[1])[0])==null?void 0:J[0];Z&&(j=Z);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function Is(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _s(e){return jd.some(t=>e[t]>=0)}const Kd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=De(e,t);switch(r){case"referenceHidden":{const s=await Ot(t,{...o,elementContext:"reference"}),i=Is(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:_s(i)}}}case"escaped":{const s=await Ot(t,{...o,altBoundary:!0}),i=Is(s,n.floating);return{data:{escapedOffsets:i,escaped:_s(i)}}}default:return{}}}}};async function Yd(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=je(n),a=ft(n),l=We(n)==="y",u=["left","top"].includes(i)?-1:1,f=s&&l?-1:1,d=De(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(v=a==="end"?g*-1:g),l?{x:v*f,y:h*u}:{x:h*u,y:v*f}}const Xd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Yd(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},qd=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:i=!1,limiter:a={fn:b=>{let{x,y}=b;return{x,y}}},...l}=De(e,t),u={x:n,y:r},f=await Ot(t,l),d=We(je(o)),h=dr(d);let v=u[h],g=u[d];if(s){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+f[b],w=v-f[x];v=ur(y,v,w)}if(i){const b=d==="y"?"top":"left",x=d==="y"?"bottom":"right",y=g+f[b],w=g-f[x];g=ur(y,g,w)}const m=a.fn({...t,[h]:v,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[d]:i}}}}}},Zd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=De(e,t),f={x:n,y:r},d=We(o),h=dr(d);let v=f[h],g=f[d];const m=De(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=h==="y"?"height":"width",C=s.reference[h]-s.floating[w]+b.mainAxis,P=s.reference[h]+s.reference[w]-b.mainAxis;v<C?v=C:v>P&&(v=P)}if(u){var x,y;const w=h==="y"?"width":"height",C=["top","left"].includes(je(o)),P=s.reference[d]-s.floating[w]+(C&&((x=i.offset)==null?void 0:x[d])||0)+(C?0:b.crossAxis),_=s.reference[d]+s.reference[w]+(C?0:((y=i.offset)==null?void 0:y[d])||0)-(C?b.crossAxis:0);g<P?g=P:g>_&&(g=_)}return{[h]:v,[d]:g}}}},Jd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=De(e,t),f=await Ot(t,u),d=je(o),h=ft(o),v=We(o)==="y",{width:g,height:m}=s.floating;let b,x;d==="top"||d==="bottom"?(b=d,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,b=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,w=g-f.left-f.right,C=Be(m-f[b],y),P=Be(g-f[x],w),_=!t.middlewareData.shift;let E=C,R=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),_&&!h){const V=xe(f.left,0),q=xe(f.right,0),B=xe(f.top,0),J=xe(f.bottom,0);v?R=g-2*(V!==0||q!==0?V+q:xe(f.left,f.right)):E=m-2*(B!==0||J!==0?B+J:xe(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:E});const H=await i.getDimensions(a.floating);return g!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function fn(){return typeof window<"u"}function pt(e){return ks(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ks(e){return fn()?e instanceof Node||e instanceof ye(e).Node:!1}function Ee(e){return fn()?e instanceof Element||e instanceof ye(e).Element:!1}function _e(e){return fn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Ms(e){return!fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Dt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Qd(e){return["table","td","th"].includes(pt(e))}function pn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function hr(e){const t=gr(),n=Ee(e)?Pe(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 ef(e){let t=Ve(e);for(;_e(t)&&!mt(t);){if(hr(t))return t;if(pn(t))return null;t=Ve(t)}return null}function gr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mt(e){return["html","body","#document"].includes(pt(e))}function Pe(e){return ye(e).getComputedStyle(e)}function mn(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ms(e)&&e.host||Ie(e);return Ms(t)?t.host:t}function Os(e){const t=Ve(e);return mt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&Dt(t)?t:Os(t)}function jt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Os(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ye(o);if(s){const a=vr(i);return t.concat(i,i.visualViewport||[],Dt(o)?o:[],a&&n?jt(a):[])}return t.concat(o,jt(o,[],n))}function vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){const t=Pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ln(n)!==s||ln(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function br(e){return Ee(e)?e:e.contextElement}function ht(e){const t=br(e);if(!_e(t))return Ae(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ds(t);let i=(s?ln(n.width):n.width)/r,a=(s?ln(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const tf=Ae(0);function js(e){const t=ye(e);return!gr()||!t.visualViewport?tf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function et(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=br(e);let i=Ae(1);t&&(r?Ee(r)&&(i=ht(r)):i=ht(e));const a=nf(s,n,r)?js(s):Ae(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const h=ye(s),v=r&&Ee(r)?ye(r):r;let g=h,m=vr(g);for(;m&&r&&v!==g;){const b=ht(m),x=m.getBoundingClientRect(),y=Pe(m),w=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,d*=b.y,l+=w,u+=C,g=ye(m),m=vr(g)}}return dn({width:f,height:d,x:l,y:u})}function xr(e,t){const n=mn(e).scrollLeft;return t?t.left+n:et(Ie(e)).left+n}function Ls(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:xr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function rf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ie(r),a=t?pn(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ae(1);const f=Ae(0),d=_e(r);if((d||!d&&!s)&&((pt(r)!=="body"||Dt(i))&&(l=mn(r)),_e(r))){const v=et(r);u=ht(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const h=i&&!d&&!s?Ls(i,l,!0):Ae(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-l.scrollTop*u.y+f.y+h.y}}function of(e){return Array.from(e.getClientRects())}function sf(e){const t=Ie(e),n=mn(e),r=e.ownerDocument.body,o=xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+xr(e);const a=-n.scrollTop;return Pe(r).direction==="rtl"&&(i+=xe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function af(e,t){const n=ye(e),r=Ie(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=gr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function lf(e,t){const n=et(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=_e(e)?ht(e):Ae(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function zs(e,t,n){let r;if(t==="viewport")r=af(e,n);else if(t==="document")r=sf(Ie(e));else if(Ee(t))r=lf(t,n);else{const o=js(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dn(r)}function $s(e,t){const n=Ve(e);return n===t||!Ee(n)||mt(n)?!1:Pe(n).position==="fixed"||$s(n,t)}function cf(e,t){const n=t.get(e);if(n)return n;let r=jt(e,[],!1).filter(a=>Ee(a)&&pt(a)!=="body"),o=null;const s=Pe(e).position==="fixed";let i=s?Ve(e):e;for(;Ee(i)&&!mt(i);){const a=Pe(i),l=hr(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dt(i)&&!l&&$s(e,i))?r=r.filter(f=>f!==i):o=a,i=Ve(i)}return t.set(e,r),r}function uf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?pn(t)?[]:cf(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const d=zs(t,f,o);return u.top=xe(d.top,u.top),u.right=Be(d.right,u.right),u.bottom=Be(d.bottom,u.bottom),u.left=xe(d.left,u.left),u},zs(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function df(e){const{width:t,height:n}=Ds(e);return{width:t,height:n}}function ff(e,t,n){const r=_e(t),o=Ie(t),s=n==="fixed",i=et(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ae(0);if(r||!r&&!s)if((pt(t)!=="body"||Dt(o))&&(a=mn(t)),r){const h=et(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=xr(o));const u=o&&!r&&!s?Ls(o,a):Ae(0),f=i.left+a.scrollLeft-l.x-u.x,d=i.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:i.width,height:i.height}}function yr(e){return Pe(e).position==="static"}function Fs(e,t){if(!_e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function Hs(e,t){const n=ye(e);if(pn(e))return n;if(!_e(e)){let o=Ve(e);for(;o&&!mt(o);){if(Ee(o)&&!yr(o))return o;o=Ve(o)}return n}let r=Fs(e,t);for(;r&&Qd(r)&&yr(r);)r=Fs(r,t);return r&&mt(r)&&yr(r)&&!hr(r)?n:r||ef(e)||n}const pf=async function(e){const t=this.getOffsetParent||Hs,n=this.getDimensions,r=await n(e.floating);return{reference:ff(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mf(e){return Pe(e).direction==="rtl"}const hf={convertOffsetParentRelativeRectToViewportRelativeRect:rf,getDocumentElement:Ie,getClippingRect:uf,getOffsetParent:Hs,getElementRects:pf,getClientRects:of,getDimensions:df,getScale:ht,isElement:Ee,isRTL:mf};function Bs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gf(e,t){let n=null,r;const o=Ie(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:v}=u;if(a||t(),!h||!v)return;const g=cn(d),m=cn(o.clientWidth-(f+h)),b=cn(o.clientHeight-(d+v)),x=cn(f),w={rootMargin:-g+"px "+-m+"px "+-b+"px "+-x+"px",threshold:xe(0,Be(1,l))||1};let C=!0;function P(_){const E=_[0].intersectionRatio;if(E!==l){if(!C)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Bs(u,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}return i(!0),s}function Ws(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=br(e),f=o||s?[...u?jt(u):[],...jt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=u&&a?gf(u,n):null;let h=-1,v=null;i&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let g,m=l?et(e):null;l&&b();function b(){const x=et(e);m&&!Bs(m,x)&&n(),m=x,g=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d?.(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const vf=Xd,bf=qd,xf=Gd,yf=Jd,wf=Kd,Vs=Ud,Cf=Zd,Sf=(e,t,n)=>{const r=new Map,o={platform:hf,...n},s={...o.platform,_c:r};return Vd(e,t,{...o,platform:s})};var hn=typeof document<"u"?T.useLayoutEffect:T.useEffect;function gn(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(!gn(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)&&!gn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Us(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gs(e,t){const n=Us(e);return Math.round(t*n)/n}function wr(e){const t=c.useRef(e);return hn(()=>{t.current=e}),t}function Ks(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=c.useState(r);gn(h,r)||v(r);const[g,m]=c.useState(null),[b,x]=c.useState(null),y=c.useCallback(A=>{A!==_.current&&(_.current=A,m(A))},[]),w=c.useCallback(A=>{A!==E.current&&(E.current=A,x(A))},[]),C=s||g,P=i||b,_=c.useRef(null),E=c.useRef(null),R=c.useRef(f),H=l!=null,V=wr(l),q=wr(o),B=wr(u),J=c.useCallback(()=>{if(!_.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};q.current&&(A.platform=q.current),Sf(_.current,E.current,A).then(O=>{const N={...O,isPositioned:B.current!==!1};W.current&&!gn(R.current,N)&&(R.current=N,Rt.flushSync(()=>{d(N)}))})},[h,t,n,q,B]);hn(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const W=c.useRef(!1);hn(()=>(W.current=!0,()=>{W.current=!1}),[]),hn(()=>{if(C&&(_.current=C),P&&(E.current=P),C&&P){if(V.current)return V.current(C,P,J);J()}},[C,P,J,V,H]);const X=c.useMemo(()=>({reference:_,floating:E,setReference:y,setFloating:w}),[y,w]),j=c.useMemo(()=>({reference:C,floating:P}),[C,P]),Z=c.useMemo(()=>{const A={position:n,left:0,top:0};if(!j.floating)return A;const O=Gs(j.floating,f.x),N=Gs(j.floating,f.y);return a?{...A,transform:"translate("+O+"px, "+N+"px)",...Us(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:N}},[n,a,j.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:X,elements:j,floatingStyles:Z}),[f,J,X,j,Z])}const Ef=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?Vs({element:r.current,padding:o}).fn(n):{}:r?Vs({element:r,padding:o}).fn(n):{}}}},Ys=(e,t)=>({...vf(e),options:[e,t]}),Xs=(e,t)=>({...bf(e),options:[e,t]}),qs=(e,t)=>({...Cf(e),options:[e,t]}),Zs=(e,t)=>({...xf(e),options:[e,t]}),Js=(e,t)=>({...yf(e),options:[e,t]}),Qs=(e,t)=>({...wf(e),options:[e,t]}),ei=(e,t)=>({...Ef(e),options:[e,t]});var Pf="Arrow",ti=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});ti.displayName=Pf;var Nf=ti;function Cr(e){const[t,n]=c.useState(void 0);return pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Sr="Popper",[ni,ri]=Se(Sr),[Rf,oi]=ni(Sr),si=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return p.jsx(Rf,{scope:t,anchor:r,onAnchorChange:o,children:n})};si.displayName=Sr;var ii="PopperAnchor",ai=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=oi(ii,n),i=c.useRef(null),a=ie(t,i);return c.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:p.jsx(ue.div,{...o,ref:a})});ai.displayName=ii;var Er="PopperContent",[Tf,Af]=ni(Er),li=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=oi(Er,n),[x,y]=c.useState(null),w=ie(t,S=>y(S)),[C,P]=c.useState(null),_=Cr(C),E=_?.width??0,R=_?.height??0,H=r+(s!=="center"?"-"+s:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],B=q.length>0,J={padding:V,boundary:q.filter(_f),altBoundary:B},{refs:W,floatingStyles:X,placement:j,isPositioned:Z,middlewareData:A}=Ks({strategy:"fixed",placement:H,whileElementsMounted:(...S)=>Ws(...S,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Ys({mainAxis:o+R,alignmentAxis:i}),l&&Xs({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?qs():void 0,...J}),l&&Zs({...J}),Js({...J,apply:({elements:S,rects:k,availableWidth:z,availableHeight:L})=>{const{width:Q,height:ne}=k.reference,ee=S.floating.style;ee.setProperty("--radix-popper-available-width",`${z}px`),ee.setProperty("--radix-popper-available-height",`${L}px`),ee.setProperty("--radix-popper-anchor-width",`${Q}px`),ee.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),C&&ei({element:C,padding:a}),kf({arrowWidth:E,arrowHeight:R}),h&&Qs({strategy:"referenceHidden",...J})]}),[O,N]=di(j),$=ve(g);pe(()=>{Z&&$?.()},[Z,$]);const re=A.arrow?.x,I=A.arrow?.y,M=A.arrow?.centerOffset!==0,[F,D]=c.useState();return pe(()=>{x&&D(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Tf,{scope:n,placedSide:O,onArrowChange:P,arrowX:re,arrowY:I,shouldHideArrow:M,children:p.jsx(ue.div,{"data-side":O,"data-align":N,...m,ref:w,style:{...m.style,animation:Z?void 0:"none"}})})})});li.displayName=Er;var ci="PopperArrow",If={top:"bottom",right:"left",bottom:"top",left:"right"},ui=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Af(ci,r),i=If[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:p.jsx(Nf,{...o,ref:n,style:{...o.style,display:"block"}})})});ui.displayName=ci;function _f(e){return e!==null}var kf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=di(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,v=(o.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=i?d:`${h}px`,m=`${-l}px`):u==="top"?(g=i?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${v}px`),{data:{x:g,y:m}}}});function di(e){const[t,n="center"]=e.split("-");return[t,n]}var fi=si,Mf=ai,Of=li,Df=ui,jf="Portal",pi=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Zt.createPortal(p.jsx(ue.div,{...r,ref:t}),i):null});pi.displayName=jf;var Lf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,vn=new WeakMap,bn={},Pr=0,mi=function(e){return e&&(e.host||mi(e.parentNode))},zf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=mi(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})},$f=function(e,t,n,r){var o=zf(t,Array.isArray(e)?e:[e]);bn[n]||(bn[n]=new WeakMap);var s=bn[n],i=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))f(h);else try{var v=h.getAttribute(r),g=v!==null&&v!=="false",m=(gt.get(h)||0)+1,b=(s.get(h)||0)+1;gt.set(h,m),s.set(h,b),i.push(h),m===1&&g&&vn.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return f(t),a.clear(),Pr++,function(){i.forEach(function(d){var h=gt.get(d)-1,v=s.get(d)-1;gt.set(d,h),s.set(d,v),h||(vn.has(d)||d.removeAttribute(r),vn.delete(d)),v||d.removeAttribute(n)}),Pr--,Pr||(gt=new WeakMap,gt=new WeakMap,vn=new WeakMap,bn={})}},hi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Lf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),$f(r,o,n,"aria-hidden")):function(){return null}},ke=function(){return ke=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},ke.apply(this,arguments)};function gi(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 Ff(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 xn="right-scroll-bar-position",yn="width-before-scroll-bar",Hf="with-scroll-bars-hidden",Bf="--removed-body-scroll-bar-size";function Nr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wf(e,t){var n=T.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 Vf=typeof window<"u"?c.useLayoutEffect:c.useEffect,vi=new WeakMap;function Uf(e,t){var n=Wf(null,function(r){return e.forEach(function(o){return Nr(o,r)})});return Vf(function(){var r=vi.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Nr(a,null)}),s.forEach(function(a){o.has(a)||Nr(a,i)})}vi.set(n,e)},[e]),n}function Gf(e){return e}function Kf(e,t){t===void 0&&(t=Gf);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Yf(e){e===void 0&&(e={});var t=Kf(null);return t.options=ke({async:!0,ssr:!1},e),t}var bi=function(e){var t=e.sideCar,n=gi(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,ke({},n))};bi.isSideCarExport=!0;function Xf(e,t){return e.useMedium(t),bi}var xi=Yf(),Rr=function(){},wn=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Rr,onWheelCapture:Rr,onTouchMoveCapture:Rr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=e.gapMode,w=gi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,P=Uf([n,t]),_=ke(ke({},w),o);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:xi,removeScrollBar:u,shards:d,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?c.cloneElement(c.Children.only(a),ke(ke({},_),{ref:P})):c.createElement(x,ke({},_,{className:l,ref:P}),a))});wn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wn.classNames={fullWidth:yn,zeroRight:xn};var qf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qf();return t&&e.setAttribute("nonce",t),e}function Jf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ep=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zf())&&(Jf(t,n),Qf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tp=function(){var e=ep();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yi=function(){var e=tp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},np={left:0,top:0,right:0,gap:0},Tr=function(e){return parseInt(e||"",10)||0},rp=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[Tr(n),Tr(r),Tr(o)]},op=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return np;var t=rp(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])}},sp=yi(),vt="data-scroll-locked",ip=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
23
|
-
.`.concat(Hf,` {
|
|
24
|
-
overflow: hidden `).concat(r,`;
|
|
25
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
26
|
-
}
|
|
27
|
-
body[`).concat(vt,`] {
|
|
28
|
-
overflow: hidden `).concat(r,`;
|
|
29
|
-
overscroll-behavior: contain;
|
|
30
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
31
|
-
padding-left: `.concat(o,`px;
|
|
32
|
-
padding-top: `).concat(s,`px;
|
|
33
|
-
padding-right: `).concat(i,`px;
|
|
34
|
-
margin-left:0;
|
|
35
|
-
margin-top:0;
|
|
36
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
37
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.`).concat(xn,` {
|
|
41
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.`).concat(yn,` {
|
|
45
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.`).concat(xn," .").concat(xn,` {
|
|
49
|
-
right: 0 `).concat(r,`;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.`).concat(yn," .").concat(yn,` {
|
|
53
|
-
margin-right: 0 `).concat(r,`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
body[`).concat(vt,`] {
|
|
57
|
-
`).concat(Bf,": ").concat(a,`px;
|
|
58
|
-
}
|
|
59
|
-
`)},wi=function(){var e=parseInt(document.body.getAttribute(vt)||"0",10);return isFinite(e)?e:0},ap=function(){c.useEffect(function(){return document.body.setAttribute(vt,(wi()+1).toString()),function(){var e=wi()-1;e<=0?document.body.removeAttribute(vt):document.body.setAttribute(vt,e.toString())}},[])},lp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ap();var s=c.useMemo(function(){return op(o)},[o]);return c.createElement(sp,{styles:ip(s,!t,o,n?"":"!important")})},Ar=!1;if(typeof window<"u")try{var Cn=Object.defineProperty({},"passive",{get:function(){return Ar=!0,!0}});window.addEventListener("test",Cn,Cn),window.removeEventListener("test",Cn,Cn)}catch{Ar=!1}var bt=Ar?{passive:!1}:!1,cp=function(e){return e.tagName==="TEXTAREA"},Ci=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cp(e)&&n[t]==="visible")},up=function(e){return Ci(e,"overflowY")},dp=function(e){return Ci(e,"overflowX")},Si=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ei(e,r);if(o){var s=Pi(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ei=function(e,t){return e==="v"?up(t):dp(t)},Pi=function(e,t){return e==="v"?fp(t):pp(t)},mp=function(e,t){return e==="h"&&t==="rtl"?-1:1},hp=function(e,t,n,r,o){var s=mp(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,f=i>0,d=0,h=0;do{var v=Pi(e,a),g=v[0],m=v[1],b=v[2],x=m-b-s*g;(g||x)&&Ei(e,a)&&(d+=x,h+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(d)<1||!f&&Math.abs(h)<1)&&(u=!0),u},Sn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ni=function(e){return[e.deltaX,e.deltaY]},Ri=function(e){return e&&"current"in e?e.current:e},gp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vp=function(e){return`
|
|
60
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},bp=0,xt=[];function xp(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(bp++)[0],s=c.useState(yi)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Ff([e.lockRef.current],(e.shards||[]).map(Ri),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var x=Sn(m),y=n.current,w="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],P,_=m.target,E=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in m&&E==="h"&&_.type==="range")return!1;var R=Si(E,_);if(!R)return!0;if(R?P=E:(P=E==="v"?"h":"v",R=Si(E,_)),!R)return!1;if(!r.current&&"changedTouches"in m&&(w||C)&&(r.current=P),!P)return!0;var H=r.current||P;return hp(H,b,m,H==="h"?w:C)},[]),l=c.useCallback(function(m){var b=m;if(!(!xt.length||xt[xt.length-1]!==s)){var x="deltaY"in b?Ni(b):Sn(b),y=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&gp(P.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(Ri).filter(Boolean).filter(function(P){return P.contains(b.target)}),C=w.length>0?a(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=c.useCallback(function(m,b,x,y){var w={name:m,delta:b,target:x,should:y,shadowParent:yp(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=c.useCallback(function(m){n.current=Sn(m),r.current=void 0},[]),d=c.useCallback(function(m){u(m.type,Ni(m),m.target,a(m,e.lockRef.current))},[]),h=c.useCallback(function(m){u(m.type,Sn(m),m.target,a(m,e.lockRef.current))},[]);c.useEffect(function(){return xt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,bt),document.addEventListener("touchmove",l,bt),document.addEventListener("touchstart",f,bt),function(){xt=xt.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,bt),document.removeEventListener("touchmove",l,bt),document.removeEventListener("touchstart",f,bt)}},[]);var v=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(s,{styles:vp(o)}):null,v?c.createElement(lp,{gapMode:e.gapMode}):null)}function yp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wp=Xf(xi,xp);var Ir=c.forwardRef(function(e,t){return c.createElement(wn,ke({},e,{ref:t,sideCar:wp}))});Ir.classNames=wn.classNames;var _r=["Enter"," "],Cp=["ArrowDown","PageUp","Home"],Ti=["ArrowUp","PageDown","End"],Sp=[...Cp,...Ti],Ep={ltr:[..._r,"ArrowRight"],rtl:[..._r,"ArrowLeft"]},Pp={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lt="Menu",[zt,Np,Rp]=Yo(Lt),[tt,Ai]=Se(Lt,[Rp,ri,rn]),$t=ri(),Ii=rn(),[_i,Ue]=tt(Lt),[Tp,Ft]=tt(Lt),ki=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=$t(t),[l,u]=c.useState(null),f=c.useRef(!1),d=ve(s),h=nn(o);return c.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),p.jsx(fi,{...a,children:p.jsx(_i,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:p.jsx(Tp,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:i,children:r})})})};ki.displayName=Lt;var Ap="MenuAnchor",kr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$t(n);return p.jsx(Mf,{...o,...r,ref:t})});kr.displayName=Ap;var Mr="MenuPortal",[Ip,Mi]=tt(Mr,{forceMount:void 0}),Oi=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ue(Mr,t);return p.jsx(Ip,{scope:t,forceMount:n,children:p.jsx(Fe,{present:n||s.open,children:p.jsx(pi,{asChild:!0,container:o,children:r})})})};Oi.displayName=Mr;var Ce="MenuContent",[_p,Or]=tt(Ce),Di=c.forwardRef((e,t)=>{const n=Mi(Ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ue(Ce,e.__scopeMenu),i=Ft(Ce,e.__scopeMenu);return p.jsx(zt.Provider,{scope:e.__scopeMenu,children:p.jsx(Fe,{present:r||s.open,children:p.jsx(zt.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(kp,{...o,ref:t}):p.jsx(Mp,{...o,ref:t})})})})}),kp=c.forwardRef((e,t)=>{const n=Ue(Ce,e.__scopeMenu),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return hi(s)},[]),p.jsx(Dr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Y(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Mp=c.forwardRef((e,t)=>{const n=Ue(Ce,e.__scopeMenu);return p.jsx(Dr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Op=It("MenuContent.ScrollLock"),Dr=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,b=Ue(Ce,n),x=Ft(Ce,n),y=$t(n),w=Ii(n),C=Np(n),[P,_]=c.useState(null),E=c.useRef(null),R=ie(t,E,b.onContentChange),H=c.useRef(0),V=c.useRef(""),q=c.useRef(0),B=c.useRef(null),J=c.useRef("right"),W=c.useRef(0),X=g?Ir:c.Fragment,j=g?{as:Op,allowPinchZoom:!0}:void 0,Z=O=>{const N=V.current+O,$=C().filter(S=>!S.disabled),re=document.activeElement,I=$.find(S=>S.ref.current===re)?.textValue,M=$.map(S=>S.textValue),F=Gp(M,N,I),D=$.find(S=>S.textValue===F)?.ref.current;(function S(k){V.current=k,window.clearTimeout(H.current),k!==""&&(H.current=window.setTimeout(()=>S(""),1e3))})(N),D&&setTimeout(()=>D.focus())};c.useEffect(()=>()=>window.clearTimeout(H.current),[]),ys();const A=c.useCallback(O=>J.current===B.current?.side&&Yp(O,B.current?.area),[]);return p.jsx(_p,{scope:n,searchRef:V,onItemEnter:c.useCallback(O=>{A(O)&&O.preventDefault()},[A]),onItemLeave:c.useCallback(O=>{A(O)||(E.current?.focus(),_(null))},[A]),onTriggerLeave:c.useCallback(O=>{A(O)&&O.preventDefault()},[A]),pointerGraceTimerRef:q,onPointerGraceIntentChange:c.useCallback(O=>{B.current=O},[]),children:p.jsx(X,{...j,children:p.jsx(Ss,{asChild:!0,trapped:o,onMountAutoFocus:Y(s,O=>{O.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(vs,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:p.jsx(ts,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:_,onEntryFocus:Y(l,O=>{x.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Of,{role:"menu","aria-orientation":"vertical","data-state":Qi(b.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:R,style:{outline:"none",...m.style},onKeyDown:Y(m.onKeyDown,O=>{const $=O.target.closest("[data-radix-menu-content]")===O.currentTarget,re=O.ctrlKey||O.altKey||O.metaKey,I=O.key.length===1;$&&(O.key==="Tab"&&O.preventDefault(),!re&&I&&Z(O.key));const M=E.current;if(O.target!==M||!Sp.includes(O.key))return;O.preventDefault();const D=C().filter(S=>!S.disabled).map(S=>S.ref.current);Ti.includes(O.key)&&D.reverse(),Vp(D)}),onBlur:Y(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(H.current),V.current="")}),onPointerMove:Y(e.onPointerMove,Bt(O=>{const N=O.target,$=W.current!==O.clientX;if(O.currentTarget.contains(N)&&$){const re=O.clientX>W.current?"right":"left";J.current=re,W.current=O.clientX}}))})})})})})})});Di.displayName=Ce;var Dp="MenuGroup",jr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{role:"group",...r,ref:t})});jr.displayName=Dp;var jp="MenuLabel",ji=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{...r,ref:t})});ji.displayName=jp;var En="MenuItem",Li="menu.itemSelect",Pn=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),i=Ft(En,e.__scopeMenu),a=Or(En,e.__scopeMenu),l=ie(t,s),u=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const h=new CustomEvent(Li,{bubbles:!0,cancelable:!0});d.addEventListener(Li,v=>r?.(v),{once:!0}),Xo(d,h),h.defaultPrevented?u.current=!1:i.onClose()}};return p.jsx(zi,{...o,ref:l,disabled:n,onClick:Y(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:Y(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:Y(e.onKeyDown,d=>{const h=a.searchRef.current!=="";n||h&&d.key===" "||_r.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Pn.displayName=En;var zi=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Or(En,n),a=Ii(n),l=c.useRef(null),u=ie(t,l),[f,d]=c.useState(!1),[h,v]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&v((g.textContent??"").trim())},[s.children]),p.jsx(zt.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(ns,{asChild:!0,...a,focusable:!r,children:p.jsx(ue.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:Y(e.onPointerMove,Bt(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y(e.onPointerLeave,Bt(g=>i.onItemLeave(g))),onFocus:Y(e.onFocus,()=>d(!0)),onBlur:Y(e.onBlur,()=>d(!1))})})})}),Lp="MenuCheckboxItem",$i=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Vi,{scope:e.__scopeMenu,checked:n,children:p.jsx(Pn,{role:"menuitemcheckbox","aria-checked":Nn(n)?"mixed":n,...o,ref:t,"data-state":$r(n),onSelect:Y(o.onSelect,()=>r?.(Nn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$i.displayName=Lp;var Fi="MenuRadioGroup",[zp,$p]=tt(Fi,{value:void 0,onValueChange:()=>{}}),Hi=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ve(r);return p.jsx(zp,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(jr,{...o,ref:t})})});Hi.displayName=Fi;var Bi="MenuRadioItem",Wi=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=$p(Bi,e.__scopeMenu),s=n===o.value;return p.jsx(Vi,{scope:e.__scopeMenu,checked:s,children:p.jsx(Pn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":$r(s),onSelect:Y(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Wi.displayName=Bi;var Lr="MenuItemIndicator",[Vi,Fp]=tt(Lr,{checked:!1}),Ui=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Fp(Lr,n);return p.jsx(Fe,{present:r||Nn(s.checked)||s.checked===!0,children:p.jsx(ue.span,{...o,ref:t,"data-state":$r(s.checked)})})});Ui.displayName=Lr;var Hp="MenuSeparator",Gi=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Gi.displayName=Hp;var Bp="MenuArrow",Ki=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$t(n);return p.jsx(Df,{...o,...r,ref:t})});Ki.displayName=Bp;var zr="MenuSub",[Wp,Yi]=tt(zr),Xi=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ue(zr,t),i=$t(t),[a,l]=c.useState(null),[u,f]=c.useState(null),d=ve(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),p.jsx(fi,{...i,children:p.jsx(_i,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:f,children:p.jsx(Wp,{scope:t,contentId:Te(),triggerId:Te(),trigger:a,onTriggerChange:l,children:n})})})};Xi.displayName=zr;var Ht="MenuSubTrigger",qi=c.forwardRef((e,t)=>{const n=Ue(Ht,e.__scopeMenu),r=Ft(Ht,e.__scopeMenu),o=Yi(Ht,e.__scopeMenu),s=Or(Ht,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),p.jsx(kr,{asChild:!0,...u,children:p.jsx(zi,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Qi(n.open),...e,ref:Qt(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Y(e.onPointerMove,Bt(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Y(e.onPointerLeave,Bt(d=>{f();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",m=g?-5:5,b=h[g?"left":"right"],x=h[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:b,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:b,y:h.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Y(e.onKeyDown,d=>{const h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||Ep[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});qi.displayName=Ht;var Zi="MenuSubContent",Ji=c.forwardRef((e,t)=>{const n=Mi(Ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ue(Ce,e.__scopeMenu),i=Ft(Ce,e.__scopeMenu),a=Yi(Zi,e.__scopeMenu),l=c.useRef(null),u=ie(t,l);return p.jsx(zt.Provider,{scope:e.__scopeMenu,children:p.jsx(Fe,{present:r||s.open,children:p.jsx(zt.Slot,{scope:e.__scopeMenu,children:p.jsx(Dr,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:Y(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Y(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:Y(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),h=Pp[i.dir].includes(f.key);d&&h&&(s.onOpenChange(!1),a.trigger?.focus(),f.preventDefault())})})})})})});Ji.displayName=Zi;function Qi(e){return e?"open":"closed"}function Nn(e){return e==="indeterminate"}function $r(e){return Nn(e)?"indeterminate":e?"checked":"unchecked"}function Vp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Up(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Gp(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Up(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Kp(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(o=!o)}return o}function Yp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Kp(n,t)}function Bt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xp=ki,qp=kr,Zp=Oi,Jp=Di,Qp=jr,em=ji,tm=Pn,nm=$i,rm=Hi,om=Wi,sm=Ui,im=Gi,am=Ki,lm=Xi,cm=qi,um=Ji,Rn="DropdownMenu",[dm,Uv]=Se(Rn,[Ai]),be=Ai(),[fm,ea]=dm(Rn),ta=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=be(t),u=c.useRef(null),[f,d]=$e({prop:o,defaultProp:s??!1,onChange:i,caller:Rn});return p.jsx(fm,{scope:t,triggerId:Te(),triggerRef:u,contentId:Te(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(h=>!h),[d]),modal:a,children:p.jsx(Xp,{...l,open:f,onOpenChange:d,dir:r,modal:a,children:n})})};ta.displayName=Rn;var na="DropdownMenuTrigger",ra=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=ea(na,n),i=be(n);return p.jsx(qp,{asChild:!0,...i,children:p.jsx(ue.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:Qt(t,s.triggerRef),onPointerDown:Y(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:Y(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ra.displayName=na;var pm="DropdownMenuPortal",oa=e=>{const{__scopeDropdownMenu:t,...n}=e,r=be(t);return p.jsx(Zp,{...r,...n})};oa.displayName=pm;var sa="DropdownMenuContent",ia=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ea(sa,n),s=be(n),i=c.useRef(!1);return p.jsx(Jp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:Y(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:Y(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ia.displayName=sa;var mm="DropdownMenuGroup",aa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(Qp,{...o,...r,ref:t})});aa.displayName=mm;var hm="DropdownMenuLabel",la=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(em,{...o,...r,ref:t})});la.displayName=hm;var gm="DropdownMenuItem",ca=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(tm,{...o,...r,ref:t})});ca.displayName=gm;var vm="DropdownMenuCheckboxItem",ua=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(nm,{...o,...r,ref:t})});ua.displayName=vm;var bm="DropdownMenuRadioGroup",da=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(rm,{...o,...r,ref:t})});da.displayName=bm;var xm="DropdownMenuRadioItem",fa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(om,{...o,...r,ref:t})});fa.displayName=xm;var ym="DropdownMenuItemIndicator",pa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(sm,{...o,...r,ref:t})});pa.displayName=ym;var wm="DropdownMenuSeparator",ma=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(im,{...o,...r,ref:t})});ma.displayName=wm;var Cm="DropdownMenuArrow",Sm=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(am,{...o,...r,ref:t})});Sm.displayName=Cm;var Em=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=be(t),[a,l]=$e({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(lm,{...i,open:a,onOpenChange:l,children:n})},Pm="DropdownMenuSubTrigger",ha=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(cm,{...o,...r,ref:t})});ha.displayName=Pm;var Nm="DropdownMenuSubContent",ga=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(um,{...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)"}})});ga.displayName=Nm;var Rm=ta,Tm=ra,Am=oa,Im=ia,_m=aa,km=la,Mm=ca,Om=ua,Dm=da,jm=fa,va=pa,Lm=ma,zm=Em,$m=ha,Fm=ga;/**
|
|
22
|
+
<%s key={someKey} {...props} />`,I,k,z,k),O[k+I]=!0)}if(k=null,re!==void 0&&(n(re),k=""+re),i($)&&(n($.key),k=""+$.key),"key"in $){re={};for(var L in $)L!=="key"&&(re[L]=$[L])}else re=$;return k&&a(re,typeof N=="function"?N.displayName||N.name||"Unknown":N),u(N,k,F,M,o(),re,D,S)}function d(N){typeof N=="object"&&N!==null&&N.$$typeof===v&&N._store&&(N._store.validated=1)}var h=T,v=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),q=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,J=Array.isArray,W=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(N){return N()}};var X,j={},Z=h.react_stack_bottom_frame.bind(h,s)(),A=W(r(s)),O={};At.Fragment=m,At.jsx=function(N,$,re,I,M){var F=1e4>q.recentlyCreatedOwnerStacks++;return f(N,$,re,!1,I,M,F?Error("react-stack-top-frame"):Z,F?W(r(N)):A)},At.jsxs=function(N,$,re,I,M){var F=1e4>q.recentlyCreatedOwnerStacks++;return f(N,$,re,!0,I,M,F?Error("react-stack-top-frame"):Z,F?W(r(N)):A)}}()),At}var No;function su(){return No||(No=1,process.env.NODE_ENV==="production"?Jt.exports=ru():Jt.exports=ou()),Jt.exports}var p=su();const iu={subtle:{width:"100%",height:"100%"}},Gn=({patternType:e="subtle"})=>{const t=iu[e];return p.jsx("div",{"aria-hidden":"true",className:"absolute top-0 h-full w-full inset-x-0 -z-10 transform-gpu overflow-hidden pointer-events-none",children:p.jsx("div",{style:t,className:"relative -z-10 aspect-1155/678 bg-linear-to-br from-white/60 to-[#050505] opacity-10 pointer-events-none"})})};function Ro(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=Ro(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function To(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ro(e))&&(r&&(r+=" "),r+=t);return r}const Ao=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Io=To,It=(e,t)=>n=>{var r;if(t?.variants==null)return Io(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const h=Ao(f)||Ao(d);return o[u][h]}),a=n&&Object.entries(n).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...v}=f;return Object.entries(v).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...u,d,h]:u},[]);return Io(e,i,l,n?.class,n?.className)},Kn="-",au=e=>{const t=cu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Kn);return a[0]===""&&a.length!==1&&a.shift(),_o(a,t)||lu(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},_o=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?_o(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Kn);return t.validators.find(({validator:i})=>i(s))?.classGroupId},ko=/^\[(.+)\]$/,lu=e=>{if(ko.test(e)){const t=ko.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},cu=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Yn(n[o],r,o,t);return r},Yn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Mo(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(uu(o)){Yn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Yn(i,Mo(t,s),n,r)})})},Mo=(e,t)=>{let n=e;return t.split(Kn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},uu=e=>e.isThemeGetter,du=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Xn="!",qn=":",fu=qn.length,pu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,u;for(let g=0;g<o.length;g++){let m=o[g];if(i===0&&a===0){if(m===qn){s.push(o.slice(l,g)),l=g+fu;continue}if(m==="/"){u=g;continue}}m==="["?i++:m==="]"?i--:m==="("?a++:m===")"&&a--}const f=s.length===0?o:o.substring(l),d=mu(f),h=d!==f,v=u&&u>l?u-l:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:v}};if(t){const o=t+qn,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},mu=e=>e.endsWith(Xn)?e.substring(0,e.length-1):e.startsWith(Xn)?e.substring(1):e,hu=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},gu=e=>({cache:du(e.cacheSize),parseClassName:pu(e),sortModifiers:hu(e),...au(e)}),vu=/\s+/,bu=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(vu);let l="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{isExternal:d,modifiers:h,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}=n(f);if(d){l=f+(l.length>0?" "+l:l);continue}let b=!!m,x=r(b?g.substring(0,m):g);if(!x){if(!b){l=f+(l.length>0?" "+l:l);continue}if(x=r(g),!x){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=s(h).join(":"),w=v?y+Xn:y,C=w+x;if(i.includes(C))continue;i.push(C);const P=o(x,b);for(let _=0;_<P.length;++_){const E=P[_];i.push(w+E)}l=f+(l.length>0?" "+l:l)}return l};function xu(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Oo(t))&&(r&&(r+=" "),r+=n);return r}const Oo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Oo(e[r]))&&(n&&(n+=" "),n+=t);return n};function yu(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((f,d)=>d(f),e());return n=gu(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=bu(l,n);return o(l,f),f}return function(){return s(xu.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Do=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wu=/^\d+\/\d+$/,Cu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Su=/\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$/,Eu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>wu.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),ze=e=>!!e&&Number.isInteger(Number(e)),Zn=e=>e.endsWith("%")&&se(e.slice(0,-1)),Me=e=>Cu.test(e),Ru=()=>!0,Tu=e=>Su.test(e)&&!Eu.test(e),Lo=()=>!1,Au=e=>Pu.test(e),Iu=e=>Nu.test(e),_u=e=>!U(e)&&!G(e),ku=e=>ut(e,Bo,Lo),U=e=>Do.test(e),Qe=e=>ut(e,Wo,Tu),Jn=e=>ut(e,Lu,se),zo=e=>ut(e,Fo,Lo),Mu=e=>ut(e,Ho,Iu),Qt=e=>ut(e,Vo,Au),G=e=>jo.test(e),_t=e=>dt(e,Wo),Ou=e=>dt(e,zu),$o=e=>dt(e,Fo),Du=e=>dt(e,Bo),ju=e=>dt(e,Ho),en=e=>dt(e,Vo,!0),ut=(e,t,n)=>{const r=Do.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dt=(e,t,n=!1)=>{const r=jo.exec(e);return r?r[1]?t(r[1]):n:!1},Fo=e=>e==="position"||e==="percentage",Ho=e=>e==="image"||e==="url",Bo=e=>e==="length"||e==="size"||e==="bg-size",Wo=e=>e==="length",Lu=e=>e==="number",zu=e=>e==="family-name",Vo=e=>e==="shadow",$u=yu(()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),o=he("tracking"),s=he("leading"),i=he("breakpoint"),a=he("container"),l=he("spacing"),u=he("radius"),f=he("shadow"),d=he("inset-shadow"),h=he("text-shadow"),v=he("drop-shadow"),g=he("blur"),m=he("perspective"),b=he("aspect"),x=he("ease"),y=he("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...C(),G,U],_=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],R=()=>[G,U,l],H=()=>[ct,"full","auto",...R()],V=()=>[ze,"none","subgrid",G,U],q=()=>["auto",{span:["full",ze,G,U]},ze,G,U],B=()=>[ze,"auto",G,U],J=()=>["auto","min","max","fr",G,U],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...R()],Z=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],A=()=>[e,G,U],O=()=>[...C(),$o,zo,{position:[G,U]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",Du,ku,{size:[G,U]}],re=()=>[Zn,_t,Qe],I=()=>["","none","full",u,G,U],M=()=>["",se,_t,Qe],F=()=>["solid","dashed","dotted","double"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>[se,Zn,$o,zo],k=()=>["","none",g,G,U],z=()=>["none",se,G,U],L=()=>["none",se,G,U],Q=()=>[se,G,U],ne=()=>[ct,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[Ru],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[_u],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",se],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,U,G,b]}],container:["container"],columns:[{columns:[se,U,G,a]}],"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"],sr:["sr-only","not-sr-only"],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:P()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[ze,"auto",G,U]}],basis:[{basis:[ct,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,ct,"auto","initial","none",U]}],grow:[{grow:["",se,G,U]}],shrink:[{shrink:["",se,G,U]}],order:[{order:[ze,"first","last","none",G,U]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,_t,Qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,G,Jn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zn,U]}],"font-family":[{font:[Ou,U,t]}],"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:[o,G,U]}],"line-clamp":[{"line-clamp":[se,"none",G,Jn]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",G,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",G,Qe]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[se,"auto",G,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ze,G,U],radial:["",G,U],conic:[ze,G,U]},ju,Mu]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,G,U]}],"outline-w":[{outline:["",se,_t,Qe]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",f,en,Qt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,en,Qt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[se,Qe]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,en,Qt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[se,G,U]}],"mix-blend":[{"mix-blend":[...D(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":D()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":S()}],"mask-image-linear-to-pos":[{"mask-linear-to":S()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":S()}],"mask-image-t-to-pos":[{"mask-t-to":S()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":S()}],"mask-image-r-to-pos":[{"mask-r-to":S()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":S()}],"mask-image-b-to-pos":[{"mask-b-to":S()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":S()}],"mask-image-l-to-pos":[{"mask-l-to":S()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":S()}],"mask-image-x-to-pos":[{"mask-x-to":S()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":S()}],"mask-image-y-to-pos":[{"mask-y-to":S()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[G,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":S()}],"mask-image-radial-to-pos":[{"mask-radial-to":S()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":S()}],"mask-image-conic-to-pos":[{"mask-conic-to":S()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,U]}],filter:[{filter:["","none",G,U]}],blur:[{blur:k()}],brightness:[{brightness:[se,G,U]}],contrast:[{contrast:[se,G,U]}],"drop-shadow":[{"drop-shadow":["","none",v,en,Qt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",se,G,U]}],"hue-rotate":[{"hue-rotate":[se,G,U]}],invert:[{invert:["",se,G,U]}],saturate:[{saturate:[se,G,U]}],sepia:[{sepia:["",se,G,U]}],"backdrop-filter":[{"backdrop-filter":["","none",G,U]}],"backdrop-blur":[{"backdrop-blur":k()}],"backdrop-brightness":[{"backdrop-brightness":[se,G,U]}],"backdrop-contrast":[{"backdrop-contrast":[se,G,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,G,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,G,U]}],"backdrop-invert":[{"backdrop-invert":["",se,G,U]}],"backdrop-opacity":[{"backdrop-opacity":[se,G,U]}],"backdrop-saturate":[{"backdrop-saturate":[se,G,U]}],"backdrop-sepia":[{"backdrop-sepia":["",se,G,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",G,U]}],ease:[{ease:["linear","initial",x,G,U]}],delay:[{delay:[se,G,U]}],animate:[{animate:["none",y,G,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,G,U]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[G,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",G,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",G,U]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[se,_t,Qe,Jn]}],stroke:[{stroke:["none",...A()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function te(...e){return $u(To(e))}const Fu=It("inline-flex items-center rounded-full px-4 py-1 text-xs font-bold transition-colors",{variants:{variant:{info:"dark:bg-accent-100 dark:text-accent-1000 bg-accent-200 text-accent-900 capitalize",success:"bg-accent-1000 text-white",error:"bg-destructive/10 text-destructive capitalize",default:"dark:bg-gray-800/30 dark:text-gray-500 bg-gray-100 text-gray-800",outline:"border border-gray-200 dark:border-gray-700",warning:"border-transparent bg-amber-300 text-amber-950 hover:bg-amber/80"}},defaultVariants:{variant:"default"}}),Uo=({className:e,variant:t,...n})=>p.jsx("div",{className:te(Fu({variant:t}),e),...n});Uo.displayName="Badge";/**
|
|
63
23
|
* @license lucide-react v0.525.0 - ISC
|
|
64
24
|
*
|
|
65
25
|
* This source code is licensed under the ISC license.
|
|
66
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
27
|
+
*/const Hu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Go=e=>{const t=Bu(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ko=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Wu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
68
28
|
* @license lucide-react v0.525.0 - ISC
|
|
69
29
|
*
|
|
70
30
|
* This source code is licensed under the ISC license.
|
|
71
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var
|
|
32
|
+
*/var Vu={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"};/**
|
|
73
33
|
* @license lucide-react v0.525.0 - ISC
|
|
74
34
|
*
|
|
75
35
|
* This source code is licensed under the ISC license.
|
|
76
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
37
|
+
*/const Uu=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>T.createElement("svg",{ref:l,...Vu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ko("lucide",o),...!s&&!Wu(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,f])=>T.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
|
|
78
38
|
* @license lucide-react v0.525.0 - ISC
|
|
79
39
|
*
|
|
80
40
|
* This source code is licensed under the ISC license.
|
|
81
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
42
|
+
*/const $e=(e,t)=>{const n=T.forwardRef(({className:r,...o},s)=>T.createElement(Uu,{ref:s,iconNode:t,className:Ko(`lucide-${Hu(Go(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Go(e),n};/**
|
|
83
43
|
* @license lucide-react v0.525.0 - ISC
|
|
84
44
|
*
|
|
85
45
|
* This source code is licensed under the ISC license.
|
|
86
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
47
|
+
*/const Qn=$e("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
88
48
|
* @license lucide-react v0.525.0 - ISC
|
|
89
49
|
*
|
|
90
50
|
* This source code is licensed under the ISC license.
|
|
91
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
52
|
+
*/const er=$e("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
93
53
|
* @license lucide-react v0.525.0 - ISC
|
|
94
54
|
*
|
|
95
55
|
* This source code is licensed under the ISC license.
|
|
96
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
57
|
+
*/const Gu=$e("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
98
58
|
* @license lucide-react v0.525.0 - ISC
|
|
99
59
|
*
|
|
100
60
|
* This source code is licensed under the ISC license.
|
|
101
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
62
|
+
*/const Ku=$e("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
103
63
|
* @license lucide-react v0.525.0 - ISC
|
|
104
64
|
*
|
|
105
65
|
* This source code is licensed under the ISC license.
|
|
106
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
67
|
+
*/const Yu=$e("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
|
108
68
|
* @license lucide-react v0.525.0 - ISC
|
|
109
69
|
*
|
|
110
70
|
* This source code is licensed under the ISC license.
|
|
111
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
72
|
+
*/const Xu=$e("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
113
73
|
* @license lucide-react v0.525.0 - ISC
|
|
114
74
|
*
|
|
115
75
|
* This source code is licensed under the ISC license.
|
|
116
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
77
|
+
*/const Yo=$e("equal",[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]]);/**
|
|
118
78
|
* @license lucide-react v0.525.0 - ISC
|
|
119
79
|
*
|
|
120
80
|
* This source code is licensed under the ISC license.
|
|
121
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const qm=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wa=({...e})=>p.jsx(Rm,{"data-slot":"dropdown-menu",...e}),Ca=({...e})=>p.jsx(Tm,{"data-slot":"dropdown-menu-trigger",...e}),Sa=({className:e,sideOffset:t=4,...n})=>p.jsx(Am,{children:p.jsx(Im,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})}),Zm=({...e})=>p.jsx(_m,{"data-slot":"dropdown-menu-group",...e}),Ea=({className:e,inset:t,variant:n="default",...r})=>p.jsx(Mm,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r}),Jm=({className:e,children:t,checked:n,...r})=>p.jsxs(Om,{"data-slot":"dropdown-menu-checkbox-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(va,{children:p.jsx(Fr,{className:"size-4"})})}),t]}),Qm=({...e})=>p.jsx(Dm,{"data-slot":"dropdown-menu-radio-group",...e}),eh=({className:e,children:t,...n})=>p.jsxs(jm,{"data-slot":"dropdown-menu-radio-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(va,{children:p.jsx(Xm,{className:"size-2 fill-current"})})}),t]}),th=({className:e,inset:t,...n})=>p.jsx(km,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n}),nh=({className:e,...t})=>p.jsx(Lm,{"data-slot":"dropdown-menu-separator",className:te("bg-border -mx-1 my-1 h-px",e),...t}),rh=({...e})=>p.jsx(zm,{"data-slot":"dropdown-menu-sub",...e}),oh=({className:e,inset:t,children:n,...r})=>p.jsxs($m,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,p.jsx(Gm,{className:"ml-auto size-4"})]}),sh=({className:e,...t})=>p.jsx(Fm,{"data-slot":"dropdown-menu-sub-content",className:te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t}),Br=({label:e,onClick:t,isLast:n,dropdownItems:r,icon:o})=>r?.length?p.jsxs(wa,{children:[p.jsx(Ca,{asChild:!0,children:p.jsxs(Oe,{variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e," ",p.jsx(Ym,{className:"size-4"})]})}),p.jsx(Sa,{className:"bg-background text-foreground",children:r.map(s=>p.jsxs(Ea,{className:"cursor-pointer gap-2",onClick:s.onClick,children:[s.icon,s.label]},`dropdown-${s.label}`))})]}):n?p.jsx(Oe,{variant:"ghost",size:"sm",className:"cursor-default hover:bg-transparent hover:text-muted-transparent p-1",asChild:!0,children:p.jsxs("div",{className:"flex items-center gap-2",children:[o,e]})}):p.jsxs(Oe,{onClick:t,variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e]});Br.displayName="BreadcrumbItem";const Pa=({className:e,items:t,...n})=>{const r=t.length-1;return p.jsx("div",{className:te("flex items-center",e),...n,children:t.map((o,s)=>p.jsxs(c.Fragment,{children:[s!==0&&p.jsx("span",{className:"mx-1.5 text-muted-foreground",children:"/"},`${o.label}-separator`),p.jsx(Br,{label:o.label,icon:o.icon,isLast:s===r,dropdownItems:o.dropdownItems},`${o.label}-item`)]},`${o.label}-fragment`))})};Pa.displayName="Breadcrumb";const Wr=T.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,className:te("relative border border-border text-foreground rounded-lg overflow-hidden flex flex-col h-full",e),...n,children:t}));Wr.displayName="Container";const ih=_t("isolate w-full bg-card flex min-h-10 items-center",{variants:{variant:{default:"px-5 py-2 items-center",tabs:"p-0"}},defaultVariants:{variant:"default"}}),Vr=T.forwardRef(({className:e,variant:t,children:n,...r},o)=>p.jsxs("div",{ref:o,className:te(ih({variant:t,className:e})),...r,children:[p.jsx(or,{}),n]}));Vr.displayName="ContainerHeader";const Ur=T.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:te("flex-1 overflow-auto bg-default border-border border-t",e),...t}));Ur.displayName="ContainerContent";const Tn=T.createContext(null);Tn.displayName="PanelGroupContext";const de={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gr=10,nt=T.useLayoutEffect,Na=c.useId,ah=typeof Na=="function"?Na:()=>null;let lh=0;function Kr(e=null){const t=ah(),n=T.useRef(e||t||null);return n.current===null&&(n.current=""+lh++),e??n.current}function Ra({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:s,id:i,maxSize:a,minSize:l,onCollapse:u,onExpand:f,onResize:d,order:h,style:v,tagName:g="div",...m}){const b=T.useContext(Tn);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:w,getPanelStyle:C,groupId:P,isPanelCollapsed:_,reevaluatePanelConstraints:E,registerPanel:R,resizePanel:H,unregisterPanel:V}=b,q=Kr(i),B=T.useRef({callbacks:{onCollapse:u,onExpand:f,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:a,minSize:l},id:q,idIsFromProps:i!==void 0,order:h});T.useRef({didLogMissingDefaultSizeWarning:!1}),nt(()=>{const{callbacks:W,constraints:X}=B.current,j={...X};B.current.id=q,B.current.idIsFromProps=i!==void 0,B.current.order=h,W.onCollapse=u,W.onExpand=f,W.onResize=d,X.collapsedSize=n,X.collapsible=r,X.defaultSize=o,X.maxSize=a,X.minSize=l,(j.collapsedSize!==X.collapsedSize||j.collapsible!==X.collapsible||j.maxSize!==X.maxSize||j.minSize!==X.minSize)&&E(B.current,j)}),nt(()=>{const W=B.current;return R(W),()=>{V(W)}},[h,q,R,V]),T.useImperativeHandle(s,()=>({collapse:()=>{x(B.current)},expand:W=>{y(B.current,W)},getId(){return q},getSize(){return w(B.current)},isCollapsed(){return _(B.current)},isExpanded(){return!_(B.current)},resize:W=>{H(B.current,W)}}),[x,y,w,_,q,H]);const J=C(B.current,o);return T.createElement(g,{...m,children:e,className:t,id:q,style:{...J,...v},[de.groupId]:P,[de.panel]:"",[de.panelCollapsible]:r||void 0,[de.panelId]:q,[de.panelSize]:parseFloat(""+J.flexGrow).toFixed(1)})}const Ta=T.forwardRef((e,t)=>T.createElement(Ra,{...e,forwardedRef:t}));Ra.displayName="Panel",Ta.displayName="forwardRef(Panel)";let Yr=null,An=-1,Ke=null;function ch(e,t){if(t){const n=(t&ja)!==0,r=(t&La)!==0,o=(t&za)!==0,s=(t&$a)!==0;if(n)return o?"se-resize":s?"ne-resize":"e-resize";if(r)return o?"sw-resize":s?"nw-resize":"w-resize";if(o)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function uh(){Ke!==null&&(document.head.removeChild(Ke),Yr=null,Ke=null,An=-1)}function Xr(e,t){var n,r;const o=ch(e,t);if(Yr!==o){if(Yr=o,Ke===null&&(Ke=document.createElement("style"),document.head.appendChild(Ke)),An>=0){var s;(s=Ke.sheet)===null||s===void 0||s.removeRule(An)}An=(n=(r=Ke.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Aa(e){return e.type==="keydown"}function Ia(e){return e.type.startsWith("pointer")}function _a(e){return e.type.startsWith("mouse")}function In(e){if(Ia(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(_a(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function dh(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function fh(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function ph(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Oa(e),b:Oa(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;oe(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Ma(ka(n.a)),b:Ma(ka(n.b))};if(o.a===o.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const mh=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function hh(e){var t;const n=getComputedStyle((t=Da(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function gh(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||hh(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||mh.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function ka(e){let t=e.length;for(;t--;){const n=e[t];if(oe(n,"Missing node"),gh(n))return n}return null}function Ma(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Oa(e){const t=[];for(;e;)t.push(e),e=Da(e);return t}function Da(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const ja=1,La=2,za=4,$a=8,vh=dh()==="coarse";let Ne=[],yt=!1,Ye=new Map,_n=new Map;const Wt=new Set;function bh(e,t,n,r,o){var s;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(s=Ye.get(i))!==null&&s!==void 0?s:0;return Ye.set(i,l+1),Wt.add(a),kn(),function(){var f;_n.delete(e),Wt.delete(a);const d=(f=Ye.get(i))!==null&&f!==void 0?f:1;if(Ye.set(i,d-1),kn(),d===1&&Ye.delete(i),Ne.includes(a)){const h=Ne.indexOf(a);h>=0&&Ne.splice(h,1),eo(),o("up",!0,null)}}}function xh(e){const{target:t}=e,{x:n,y:r}=In(e);yt=!0,Jr({target:t,x:n,y:r}),kn(),Ne.length>0&&(Mn("down",e),e.preventDefault(),Fa(t)||e.stopImmediatePropagation())}function qr(e){const{x:t,y:n}=In(e);if(yt&&e.buttons===0&&(yt=!1,Mn("up",e)),!yt){const{target:r}=e;Jr({target:r,x:t,y:n})}Mn("move",e),eo(),Ne.length>0&&e.preventDefault()}function Zr(e){const{target:t}=e,{x:n,y:r}=In(e);_n.clear(),yt=!1,Ne.length>0&&(e.preventDefault(),Fa(t)||e.stopImmediatePropagation()),Mn("up",e),Jr({target:t,x:n,y:r}),eo(),kn()}function Fa(e){let t=e;for(;t;){if(t.hasAttribute(de.resizeHandle))return!0;t=t.parentElement}return!1}function Jr({target:e,x:t,y:n}){Ne.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Wt.forEach(o=>{const{element:s,hitAreaMargins:i}=o,a=s.getBoundingClientRect(),{bottom:l,left:u,right:f,top:d}=a,h=vh?i.coarse:i.fine;if(t>=u-h&&t<=f+h&&n>=d-h&&n<=l+h){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&ph(r,s)>0){let g=r,m=!1;for(;g&&!g.contains(s);){if(fh(g.getBoundingClientRect(),a)){m=!0;break}g=g.parentElement}if(m)return}Ne.push(o)}})}function Qr(e,t){_n.set(e,t)}function eo(){let e=!1,t=!1;Ne.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;_n.forEach(r=>{n|=r}),e&&t?Xr("intersection",n):e?Xr("horizontal",n):t?Xr("vertical",n):uh()}let to;function kn(){var e;(e=to)===null||e===void 0||e.abort(),to=new AbortController;const t={capture:!0,signal:to.signal};Wt.size&&(yt?(Ne.length>0&&Ye.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("contextmenu",Zr,t),o.addEventListener("pointerleave",qr,t),o.addEventListener("pointermove",qr,t))}),Ye.forEach((n,r)=>{const{body:o}=r;o.addEventListener("pointerup",Zr,t),o.addEventListener("pointercancel",Zr,t)})):Ye.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("pointerdown",xh,t),o.addEventListener("pointermove",qr,t))}))}function Mn(e,t){Wt.forEach(n=>{const{setResizeHandlerState:r}=n,o=Ne.includes(n);r(e,o,t)})}function yh(){const[e,t]=T.useState(0);return T.useCallback(()=>t(n=>n+1),[])}function oe(e,t){if(!e)throw console.error(t),Error(t)}function rt(e,t,n=Gr){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Le(e,t,n=Gr){return rt(e,t,n)===0}function we(e,t,n){return rt(e,t,n)===0}function wh(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],s=t[r];if(!we(o,s,n))return!1}return!0}function wt({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];oe(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:i=100,minSize:a=0}=r;if(rt(n,a)<0)if(s){const l=(o+a)/2;rt(n,l)<0?n=o:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed(Gr)),n}function Vt({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(we(e,0))return t;const i=[...t],[a,l]=r;oe(a!=null,"Invalid first pivot index"),oe(l!=null,"Invalid second pivot index");let u=0;if(s==="keyboard"){{const d=e<0?l:a,h=n[d];oe(h,`Panel constraints not found for index ${d}`);const{collapsedSize:v=0,collapsible:g,minSize:m=0}=h;if(g){const b=t[d];if(oe(b!=null,`Previous layout not found for panel index ${d}`),we(b,v)){const x=m-b;rt(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const d=e<0?a:l,h=n[d];oe(h,`No panel constraints found for index ${d}`);const{collapsedSize:v=0,collapsible:g,minSize:m=0}=h;if(g){const b=t[d];if(oe(b!=null,`Previous layout not found for panel index ${d}`),we(b,m)){const x=b-v;rt(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}}{const d=e<0?1:-1;let h=e<0?l:a,v=0;for(;;){const m=t[h];oe(m!=null,`Previous layout not found for panel index ${h}`);const x=wt({panelConstraints:n,panelIndex:h,size:100})-m;if(v+=x,h+=d,h<0||h>=n.length)break}const g=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-g:g}{let h=e<0?a:l;for(;h>=0&&h<n.length;){const v=Math.abs(e)-Math.abs(u),g=t[h];oe(g!=null,`Previous layout not found for panel index ${h}`);const m=g-v,b=wt({panelConstraints:n,panelIndex:h,size:m});if(!we(g,b)&&(u+=g-b,i[h]=b,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(wh(o,i))return o;{const d=e<0?l:a,h=t[d];oe(h!=null,`Previous layout not found for panel index ${d}`);const v=h+u,g=wt({panelConstraints:n,panelIndex:d,size:v});if(i[d]=g,!we(g,v)){let m=v-g,x=e<0?l:a;for(;x>=0&&x<n.length;){const y=i[x];oe(y!=null,`Previous layout not found for panel index ${x}`);const w=y+m,C=wt({panelConstraints:n,panelIndex:x,size:w});if(we(y,C)||(m-=C-y,i[x]=C),we(m,0))break;e>0?x--:x++}}}const f=i.reduce((d,h)=>h+d,0);return we(f,100)?i:o}function Ch({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,s=0,i=0;const a=n[0];oe(a!=null,"No pivot index found"),t.forEach((d,h)=>{const{constraints:v}=d,{maxSize:g=100,minSize:m=0}=v;h===a?(r=m,o=g):(s+=m,i+=g)});const l=Math.min(o,100-s),u=Math.max(r,100-i),f=e[a];return{valueMax:l,valueMin:u,valueNow:f}}function Ut(e,t=document){return Array.from(t.querySelectorAll(`[${de.resizeHandleId}][data-panel-group-id="${e}"]`))}function Ha(e,t,n=document){const o=Ut(e,n).findIndex(s=>s.getAttribute(de.resizeHandleId)===t);return o??null}function Ba(e,t,n){const r=Ha(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function Sh(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Wa(e,t=document){if(Sh(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function On(e,t=document){const n=t.querySelector(`[${de.resizeHandleId}="${e}"]`);return n||null}function Eh(e,t,n,r=document){var o,s,i,a;const l=On(t,r),u=Ut(e,r),f=l?u.indexOf(l):-1,d=(o=(s=n[f])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,h=(i=(a=n[f+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[d,h]}function Ph({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:s,setLayout:i}){T.useRef({didWarnAboutMissingResizeHandle:!1}),nt(()=>{if(!s)return;const a=Ut(n,s);for(let l=0;l<o.length-1;l++){const{valueMax:u,valueMin:f,valueNow:d}=Ch({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),h=a[l];if(h!=null){const v=o[l];oe(v,`No panel data found for index "${l}"`),h.setAttribute("aria-controls",v.id),h.setAttribute("aria-valuemax",""+Math.round(u)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{a.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,s]),T.useEffect(()=>{if(!s)return;const a=t.current;oe(a,"Eager values not found");const{panelDataArray:l}=a,u=Wa(n,s);oe(u!=null,`No group found for id "${n}"`);const f=Ut(n,s);oe(f,`No resize handles found for group id "${n}"`);const d=f.map(h=>{const v=h.getAttribute(de.resizeHandleId);oe(v,"Resize handle element has no handle id attribute");const[g,m]=Eh(n,v,l,s);if(g==null||m==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=l.findIndex(w=>w.id===g);if(y>=0){const w=l[y];oe(w,`No panel data found for index ${y}`);const C=r[y],{collapsedSize:P=0,collapsible:_,minSize:E=0}=w.constraints;if(C!=null&&_){const R=Vt({delta:we(C,P)?E-P:P-C,initialLayout:r,panelConstraints:l.map(H=>H.constraints),pivotIndices:Ba(n,v,s),prevLayout:r,trigger:"keyboard"});r!==R&&i(R)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{d.forEach(h=>h())}},[s,e,t,n,r,o,i])}function Va(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ua(e,t){const n=e==="horizontal",{x:r,y:o}=In(t);return n?r:o}function Nh(e,t,n,r,o){const s=n==="horizontal",i=On(t,o);oe(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(de.groupId);oe(a,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Ua(n,e),f=Wa(a,o);oe(f,`No group element found for id "${a}"`);const d=f.getBoundingClientRect(),h=s?d.width:d.height;return(u-l)/h*100}function Rh(e,t,n,r,o,s){if(Aa(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:o!=null?a=o:a=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:a;break;case"ArrowLeft":l=i?-a:0;break;case"ArrowRight":l=i?a:0;break;case"ArrowUp":l=i?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Nh(e,t,n,r,s)}function Th({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,o=100;for(let s=0;s<e.length;s++){const i=n[s];oe(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;a!=null&&(r++,t[s]=a,o-=a)}for(let s=0;s<e.length;s++){const i=n[s];oe(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;if(a!=null)continue;const l=e.length-r,u=o/l;r++,t[s]=u,o-=u}return t}function Ct(e,t,n){t.forEach((r,o)=>{const s=e[o];oe(s,`Panel data not found for index ${o}`);const{callbacks:i,constraints:a,id:l}=s,{collapsedSize:u=0,collapsible:f}=a,d=n[l];if(d==null||r!==d){n[l]=r;const{onCollapse:h,onExpand:v,onResize:g}=i;g&&g(r,d),f&&(h||v)&&(v&&(d==null||Le(d,u))&&!Le(r,u)&&v(),h&&(d==null||!Le(d,u))&&Le(r,u)&&h())}})}function Dn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ah({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:s=3}){const i=n[o];let a;return i==null?a=e!=null?e.toPrecision(s):"1":r.length===1?a="1":a=i.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Ih(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Ga(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Ka(e){return`react-resizable-panels:${e}`}function Ya(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:s}=t;return o?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Xa(e,t){try{const n=Ka(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function _h(e,t,n){var r,o;const s=(r=Xa(e,n))!==null&&r!==void 0?r:{},i=Ya(t);return(o=s[i])!==null&&o!==void 0?o:null}function kh(e,t,n,r,o){var s;const i=Ka(e),a=Ya(t),l=(s=Xa(e,o))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(u){console.error(u)}}function qa({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!we(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=100/r*i;n[s]=a}let o=0;for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=wt({panelConstraints:t,panelIndex:s,size:i});i!=a&&(o+=i-a,n[s]=a)}if(!we(o,0))for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=i+o,l=wt({panelConstraints:t,panelIndex:s,size:a});if(i!==l&&(o-=l-i,n[s]=l,we(o,0)))break}return n}const Mh=100,Gt={getItem:e=>(Ga(Gt),Gt.getItem(e)),setItem:(e,t)=>{Ga(Gt),Gt.setItem(e,t)}},Za={};function Ja({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:s=null,onLayout:i=null,keyboardResizeBy:a=null,storage:l=Gt,style:u,tagName:f="div",...d}){const h=Kr(s),v=T.useRef(null),[g,m]=T.useState(null),[b,x]=T.useState([]),y=yh(),w=T.useRef({}),C=T.useRef(new Map),P=T.useRef(0),_=T.useRef({autoSaveId:e,direction:r,dragState:g,id:h,keyboardResizeBy:a,onLayout:i,storage:l}),E=T.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});T.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),T.useImperativeHandle(o,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:I}=E.current;return I},setLayout:I=>{const{onLayout:M}=_.current,{layout:F,panelDataArray:D}=E.current,S=qa({layout:I,panelConstraints:D.map(k=>k.constraints)});Va(F,S)||(x(S),E.current.layout=S,M&&M(S),Ct(D,S,w.current))}}),[]),nt(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=g,_.current.id=h,_.current.onLayout=i,_.current.storage=l}),Ph({committedValuesRef:_,eagerValuesRef:E,groupId:h,layout:b,panelDataArray:E.current.panelDataArray,setLayout:x,panelGroupElement:v.current}),T.useEffect(()=>{const{panelDataArray:I}=E.current;if(e){if(b.length===0||b.length!==I.length)return;let M=Za[e];M==null&&(M=Ih(kh,Mh),Za[e]=M);const F=[...I],D=new Map(C.current);M(e,F,D,b,l)}},[e,b,l]),T.useEffect(()=>{});const R=T.useCallback(I=>{const{onLayout:M}=_.current,{layout:F,panelDataArray:D}=E.current;if(I.constraints.collapsible){const S=D.map(Q=>Q.constraints),{collapsedSize:k=0,panelSize:z,pivotIndices:L}=ot(D,I,F);if(oe(z!=null,`Panel size not found for panel "${I.id}"`),!Le(z,k)){C.current.set(I.id,z);const ne=St(D,I)===D.length-1?z-k:k-z,ee=Vt({delta:ne,initialLayout:F,panelConstraints:S,pivotIndices:L,prevLayout:F,trigger:"imperative-api"});Dn(F,ee)||(x(ee),E.current.layout=ee,M&&M(ee),Ct(D,ee,w.current))}}},[]),H=T.useCallback((I,M)=>{const{onLayout:F}=_.current,{layout:D,panelDataArray:S}=E.current;if(I.constraints.collapsible){const k=S.map(ae=>ae.constraints),{collapsedSize:z=0,panelSize:L=0,minSize:Q=0,pivotIndices:ne}=ot(S,I,D),ee=M??Q;if(Le(L,z)){const ae=C.current.get(I.id),me=ae!=null&&ae>=ee?ae:ee,ce=St(S,I)===S.length-1?L-me:me-L,ge=Vt({delta:ce,initialLayout:D,panelConstraints:k,pivotIndices:ne,prevLayout:D,trigger:"imperative-api"});Dn(D,ge)||(x(ge),E.current.layout=ge,F&&F(ge),Ct(S,ge,w.current))}}},[]),V=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{panelSize:D}=ot(F,I,M);return oe(D!=null,`Panel size not found for panel "${I.id}"`),D},[]),q=T.useCallback((I,M)=>{const{panelDataArray:F}=E.current,D=St(F,I);return Ah({defaultSize:M,dragState:g,layout:b,panelData:F,panelIndex:D})},[g,b]),B=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{collapsedSize:D=0,collapsible:S,panelSize:k}=ot(F,I,M);return oe(k!=null,`Panel size not found for panel "${I.id}"`),S===!0&&Le(k,D)},[]),J=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{collapsedSize:D=0,collapsible:S,panelSize:k}=ot(F,I,M);return oe(k!=null,`Panel size not found for panel "${I.id}"`),!S||rt(k,D)>0},[]),W=T.useCallback(I=>{const{panelDataArray:M}=E.current;M.push(I),M.sort((F,D)=>{const S=F.order,k=D.order;return S==null&&k==null?0:S==null?-1:k==null?1:S-k}),E.current.panelDataArrayChanged=!0,y()},[y]);nt(()=>{if(E.current.panelDataArrayChanged){E.current.panelDataArrayChanged=!1;const{autoSaveId:I,onLayout:M,storage:F}=_.current,{layout:D,panelDataArray:S}=E.current;let k=null;if(I){const L=_h(I,S,F);L&&(C.current=new Map(Object.entries(L.expandToSizes)),k=L.layout)}k==null&&(k=Th({panelDataArray:S}));const z=qa({layout:k,panelConstraints:S.map(L=>L.constraints)});Va(D,z)||(x(z),E.current.layout=z,M&&M(z),Ct(S,z,w.current))}}),nt(()=>{const I=E.current;return()=>{I.layout=[]}},[]);const X=T.useCallback(I=>{let M=!1;const F=v.current;return F&&window.getComputedStyle(F,null).getPropertyValue("direction")==="rtl"&&(M=!0),function(S){S.preventDefault();const k=v.current;if(!k)return()=>null;const{direction:z,dragState:L,id:Q,keyboardResizeBy:ne,onLayout:ee}=_.current,{layout:ae,panelDataArray:me}=E.current,{initialLayout:le}=L??{},ce=Ba(Q,I,k);let ge=Rh(S,I,z,L,ne,k);const Nt=z==="horizontal";Nt&&M&&(ge=-ge);const qt=me.map(Bv=>Bv.constraints),lt=Vt({delta:ge,initialLayout:le??ae,panelConstraints:qt,pivotIndices:ce,prevLayout:ae,trigger:Aa(S)?"keyboard":"mouse-or-touch"}),nu=!Dn(ae,lt);(Ia(S)||_a(S))&&P.current!=ge&&(P.current=ge,!nu&&ge!==0?Nt?Qr(I,ge<0?ja:La):Qr(I,ge<0?za:$a):Qr(I,0)),nu&&(x(lt),E.current.layout=lt,ee&&ee(lt),Ct(me,lt,w.current))}},[]),j=T.useCallback((I,M)=>{const{onLayout:F}=_.current,{layout:D,panelDataArray:S}=E.current,k=S.map(ae=>ae.constraints),{panelSize:z,pivotIndices:L}=ot(S,I,D);oe(z!=null,`Panel size not found for panel "${I.id}"`);const ne=St(S,I)===S.length-1?z-M:M-z,ee=Vt({delta:ne,initialLayout:D,panelConstraints:k,pivotIndices:L,prevLayout:D,trigger:"imperative-api"});Dn(D,ee)||(x(ee),E.current.layout=ee,F&&F(ee),Ct(S,ee,w.current))},[]),Z=T.useCallback((I,M)=>{const{layout:F,panelDataArray:D}=E.current,{collapsedSize:S=0,collapsible:k}=M,{collapsedSize:z=0,collapsible:L,maxSize:Q=100,minSize:ne=0}=I.constraints,{panelSize:ee}=ot(D,I,F);ee!=null&&(k&&L&&Le(ee,S)?Le(S,z)||j(I,z):ee<ne?j(I,ne):ee>Q&&j(I,Q))},[j]),A=T.useCallback((I,M)=>{const{direction:F}=_.current,{layout:D}=E.current;if(!v.current)return;const S=On(I,v.current);oe(S,`Drag handle element not found for id "${I}"`);const k=Ua(F,M);m({dragHandleId:I,dragHandleRect:S.getBoundingClientRect(),initialCursorPosition:k,initialLayout:D})},[]),O=T.useCallback(()=>{m(null)},[]),N=T.useCallback(I=>{const{panelDataArray:M}=E.current,F=St(M,I);F>=0&&(M.splice(F,1),delete w.current[I.id],E.current.panelDataArrayChanged=!0,y())},[y]),$=T.useMemo(()=>({collapsePanel:R,direction:r,dragState:g,expandPanel:H,getPanelSize:V,getPanelStyle:q,groupId:h,isPanelCollapsed:B,isPanelExpanded:J,reevaluatePanelConstraints:Z,registerPanel:W,registerResizeHandle:X,resizePanel:j,startDragging:A,stopDragging:O,unregisterPanel:N,panelGroupElement:v.current}),[R,g,r,H,V,q,h,B,J,Z,W,X,j,A,O,N]),re={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return T.createElement(Tn.Provider,{value:$},T.createElement(f,{...d,children:t,className:n,id:s,ref:v,style:{...re,...u},[de.group]:"",[de.groupDirection]:r,[de.groupId]:h}))}const Qa=T.forwardRef((e,t)=>T.createElement(Ja,{...e,forwardedRef:t}));Ja.displayName="PanelGroup",Qa.displayName="forwardRef(PanelGroup)";function St(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ot(e,t,n){const r=St(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Oh({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){T.useEffect(()=>{if(e||n==null||r==null)return;const o=On(t,r);if(o==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=o.getAttribute(de.groupId);oe(a,`No group element found for id "${a}"`);const l=Ut(a,r),u=Ha(a,t,r);oe(u!==null,`No resize element found for id "${t}"`);const f=i.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[f].focus();break}}};return o.addEventListener("keydown",s),()=>{o.removeEventListener("keydown",s)}},[r,e,t,n])}function el({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:s,onClick:i,onDragging:a,onFocus:l,onPointerDown:u,onPointerUp:f,style:d={},tabIndex:h=0,tagName:v="div",...g}){var m,b;const x=T.useRef(null),y=T.useRef({onClick:i,onDragging:a,onPointerDown:u,onPointerUp:f});T.useEffect(()=>{y.current.onClick=i,y.current.onDragging=a,y.current.onPointerDown=u,y.current.onPointerUp=f});const w=T.useContext(Tn);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:P,registerResizeHandle:_,startDragging:E,stopDragging:R,panelGroupElement:H}=w,V=Kr(o),[q,B]=T.useState("inactive"),[J,W]=T.useState(!1),[X,j]=T.useState(null),Z=T.useRef({state:q});nt(()=>{Z.current.state=q}),T.useEffect(()=>{if(n)j(null);else{const $=_(V);j(()=>$)}},[n,V,_]);const A=(m=r?.coarse)!==null&&m!==void 0?m:15,O=(b=r?.fine)!==null&&b!==void 0?b:5;T.useEffect(()=>{if(n||X==null)return;const $=x.current;oe($,"Element ref not attached");let re=!1;return bh(V,$,C,{coarse:A,fine:O},(M,F,D)=>{if(!F){B("inactive");return}switch(M){case"down":{B("drag"),re=!1,oe(D,'Expected event to be defined for "down" action'),E(V,D);const{onDragging:S,onPointerDown:k}=y.current;S?.(!0),k?.();break}case"move":{const{state:S}=Z.current;re=!0,S!=="drag"&&B("hover"),oe(D,'Expected event to be defined for "move" action'),X(D);break}case"up":{B("hover"),R();const{onClick:S,onDragging:k,onPointerUp:z}=y.current;k?.(!1),z?.(),re||S?.();break}}})},[A,C,n,O,_,V,X,E,R]),Oh({disabled:n,handleId:V,resizeHandler:X,panelGroupElement:H});const N={touchAction:"none",userSelect:"none"};return T.createElement(v,{...g,children:e,className:t,id:o,onBlur:()=>{W(!1),s?.()},onFocus:()=>{W(!0),l?.()},ref:x,role:"separator",style:{...N,...d},tabIndex:h,[de.groupDirection]:C,[de.groupId]:P,[de.resizeHandle]:"",[de.resizeHandleActive]:q==="drag"?"pointer":J?"keyboard":void 0,[de.resizeHandleEnabled]:!n,[de.resizeHandleId]:V,[de.resizeHandleState]:q})}el.displayName="PanelResizeHandle";const Dh=({header:e,isCollapsed:t,onToggle:n,variant:r="default"})=>p.jsxs(Vr,{variant:r,children:[e,p.jsx("div",{className:"flex-1"}),n&&p.jsx(Oe,{variant:"default",onClick:n,"aria-label":t?"Expand panel":"Collapse panel",className:te("h-8 px-3 [&_svg]:size-5",{"mr-5":r==="tabs"}),children:p.jsx(Hr,{className:te("transition-transform",{"-rotate-180":!t})})})]}),jh=()=>p.jsx("div",{className:"relative",children:p.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:p.jsx(el,{className:"group relative",children:p.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border",children:p.jsx(ya,{className:"h-4 w-4 text-muted-foreground"})})})})}),Lh=({id:e,header:t,children:n,withResizeHandle:r,className:o,variant:s,defaultTab:i,onTabChange:a})=>{const[l,u]=T.useState(!1),f=T.useRef(null),d=T.useCallback(()=>{const m=f.current;if(m)try{m.isCollapsed()?m.expand():m.collapse()}catch(b){console.warn("Failed to toggle panel:",b)}},[]),h=T.useCallback(()=>u(!0),[]),v=T.useCallback(()=>u(!1),[]),g=T.useMemo(()=>{const m=p.jsxs(Wr,{className:"h-full",children:[p.jsx(Dh,{header:t,isCollapsed:l,variant:s,onToggle:d}),p.jsx(Ur,{children:n})]});return s=="tabs"?p.jsx(an,{className:"h-full",defaultValue:i,onValueChange:a,children:m}):m},[s,l,t,n,i,d,a]);return p.jsxs(p.Fragment,{children:[p.jsx(Ta,{id:e,collapsible:!0,ref:f,className:te("min-h-[42px]",o),onCollapse:h,onExpand:v,children:g}),r&&p.jsx(jh,{})]})},zh=({children:e,...t})=>{const[n,r]=T.useState(0);return p.jsx(Qa,{onLayout:o=>{r(o.length)},...t,children:T.Children.map(e,(o,s)=>{if(T.isValidElement(o)){const i=n-1===s,a=n>1;return T.cloneElement(o,{withResizeHandle:a&&!i})}return o})})},tl=({title:e,subtitle:t,actions:n,className:r,children:o,onClose:s})=>p.jsx("div",{className:te("bg-muted-foreground/5 text-foreground border-l border-border overflow-hidden w-1/3",r),children:p.jsxs("div",{className:"flex flex-col size-full",children:[p.jsx("div",{className:"relative shrink-0 w-full border-b border-border",children:p.jsxs("div",{className:"flex flex-col gap-0 p-4",children:[p.jsxs("div",{className:"flex items-center justify-between w-full",children:[p.jsx("div",{className:"text-lg font-semibold text-foreground tracking-[-0.25px] leading-tight",children:e}),p.jsxs("div",{className:"flex items-center gap-1",children:[n?.map((i,a)=>p.jsx(Oe,{onClick:i.onClick,variant:"ghost",size:"icon","aria-label":i.label,children:i.icon},a)),p.jsx(Oe,{onClick:s,variant:"ghost",size:"icon","aria-label":"Close",children:p.jsx(qm,{className:"w-4 h-4 text-muted-foreground"})})]})]}),t&&p.jsx("div",{className:"text-md font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),p.jsx("div",{className:"flex-1 overflow-auto",children:p.jsx("div",{className:"flex flex-col gap-2 p-4",children:o})})]})});tl.displayName="SidePanel";const nl=({children:e})=>p.jsx("table",{className:"w-full",children:e}),rl=({title:e,children:t})=>p.jsxs("tr",{children:[p.jsx("td",{className:"text-md min-w-[100px] font-medium",children:e}),p.jsx("td",{className:"py-2 text-muted-foreground font-medium",children:t})]});nl.displayName="SidePanelDetail",rl.displayName="SidePanelDetailItem";var $h="Label",ol=c.forwardRef((e,t)=>p.jsx(ue.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ol.displayName=$h;var sl=ol;const il=({className:e,...t})=>p.jsx(sl,{"data-slot":"label",className:te("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t});il.displayName=sl.displayName;const Fh=_t("inline-flex items-center rounded-full px-4 py-1 text-xs font-bold transition-colors",{variants:{variant:{info:"dark:bg-accent-100 dark:text-accent-1000 bg-accent-200 text-accent-900 capitalize",success:"bg-accent-1000 text-white",error:"bg-destructive/10 text-destructive capitalize",default:"dark:bg-gray-800/30 dark:text-gray-500 bg-gray-100 text-gray-800",outline:"border border-gray-200 dark:border-gray-700",warning:"border-transparent bg-amber-300 text-amber-950 hover:bg-amber/80"}},defaultVariants:{variant:"default"}}),al=({className:e,variant:t,...n})=>p.jsx("div",{className:te(Fh({variant:t}),e),...n});al.displayName="Badge";var st={},ll;function Hh(){if(ll)return st;ll=1;var e=st&&st.__assign||function(){return e=Object.assign||function(i){for(var a,l=1,u=arguments.length;l<u;l++){a=arguments[l];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(i[f]=a[f])}return i},e.apply(this,arguments)};Object.defineProperty(st,"__esModule",{value:!0}),st.useResizable=void 0;var t=T,n;(function(i){i.MouseMove="mousemove",i.TouchMove="touchmove"})(n||(n={}));var r;(function(i){i.MouseUp="mouseup",i.TouchEnd="touchend"})(r||(r={}));var o={interval:1,initialHeight:100,initialWidth:100,lockHorizontal:!1,lockVertical:!1},s=function(i){var a=e(e({},o),i),l=(0,t.useRef)(null),u=function(){var d=a.initialHeight,h=a.initialWidth;return{ref:l,style:{height:d,width:h}}},f=function(d){d||(d={});var h=e(e({},a),d),v=h.parent,g=v===void 0?l:v,m=h.interval,b=m===void 0?1:m,x=h.maxHeight,y=x===void 0?Number.MAX_SAFE_INTEGER:x,w=h.maxWidth,C=w===void 0?Number.MAX_SAFE_INTEGER:w,P=h.reverse,_=h.lockHorizontal,E=h.lockVertical,R=h.onResize,H=h.onDragEnd,V=h.onDragStart,q=h.minHeight,B=q===void 0?0:q,J=h.minWidth,W=J===void 0?0:J,X=h.disabled,j=X===void 0?!1:X,Z=h.maintainAspectRatio,A=Z===void 0?!1:Z,O=function(D,S,k,z,L,Q){var ne,ee;if(!j){var ae=((ne=g?.current)===null||ne===void 0?void 0:ne.clientWidth)||0,me=((ee=g?.current)===null||ee===void 0?void 0:ee.clientHeight)||0,le=me,ce=ae;if(!E){var ge=S+(D-k)*(P?-1:1);le=Math.round(ge/b)*b,le<=0&&(le=b),le>=y&&(le=y),le<=B&&(le=B),g?.current&&(g.current.style.height="".concat(le,"px"))}if(!_){var Nt=L+(z-Q)*(P?-1:1);ce=Math.round(Nt/b)*b,ce<=0&&(ce=b),ce>=C&&(ce=C),ce<=W&&(ce=W),g?.current&&(g.current.style.width="".concat(ce,"px"))}if(A){var qt=ae/me,lt=ce/le;lt>qt?(ce=le*qt,g?.current&&(g.current.style.width="".concat(ce,"px"))):(le=ce/qt,g?.current&&(g.current.style.height="".concat(le,"px")))}R&&R({newHeight:le,heightDiff:le-me,newWidth:ce,widthDiff:ce-ae})}},N=function(D,S,k,z){return function(L){L instanceof MouseEvent&&O(L.clientY,D,S,L.clientX,k,z)}},$=function(D,S,k,z){return function(L){L.preventDefault(),L instanceof TouchEvent&&O(L.touches[0].clientY,D,S,L.touches[0].clientX,k,z)}},re=function(D,S,k,z,L){function Q(){var ne,ee;if(document.removeEventListener(S,D),document.removeEventListener(k,Q),H){var ae=((ne=g?.current)===null||ne===void 0?void 0:ne.clientWidth)||0,me=((ee=g?.current)===null||ee===void 0?void 0:ee.clientHeight)||0;H({newHeight:me,heightDiff:me-z,newWidth:ae,widthDiff:ae-L})}}return Q},I=function(D){var S,k;if(!j){var z=((S=g?.current)===null||S===void 0?void 0:S.clientHeight)||0,L=((k=g?.current)===null||k===void 0?void 0:k.clientWidth)||0,Q=null,ne=null,ee=null;if(D.type==="mousedown"){var ae=D,me=ae.clientY,le=ae.clientX;Q=N(z,me,L,le),ne=n.MouseMove,ee=r.MouseUp}else if(D.type==="touchstart"){var ce=D.touches,ge=ce[0],me=ge.clientY,le=ge.clientX;Q=$(z,me,L,le),ne=n.TouchMove,ee=r.TouchEnd}if(!(!Q||!ne||!ee)){V&&V({newHeight:z,heightDiff:0,newWidth:L,widthDiff:0});var Nt=re(Q,ne,ee,z,L);document.addEventListener(ne,Q,{passive:!1}),document.addEventListener(ee,Nt)}}},M;j?M="not-allowed":_&&E?M="default":_?M="row-resize":E?M="col-resize":M="nwse-resize";var F={cursor:M};return{onMouseDown:I,onTouchStart:I,style:F}};return{rootRef:l,getRootProps:u,getHandleProps:f}};return st.useResizable=s,st}var Bh=Hh();const cl="app-sidebar-container",no="close-previous-sidebar",Wh=({initialWidth:e,onClose:t,containerId:n,...r})=>{const o=T.useMemo(()=>Symbol(),[]),{getRootProps:s,getHandleProps:i}=Bh.useResizable({lockVertical:!0,initialWidth:e??400,initialHeight:"100%",onDragStart:()=>{document.body.style.userSelect="none"},onDragEnd:()=>{document.body.style.userSelect=""}});return T.useEffect(()=>{const a=new CustomEvent(no,{detail:{sidebarId:o}});window.dispatchEvent(a);const l=u=>{u.detail.sidebarId!==o&&t()};return window.addEventListener(no,l),()=>{window.removeEventListener(no,l)}},[o,t]),Zt.createPortal(p.jsxs("div",{...s(),className:"pr-2 py-2 relative",children:[p.jsx("div",{...i({reverse:!0}),className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border absolute top-1/2 -translate-y-1/2 -left-4 z-20",children:p.jsx(ya,{className:"rotate-90 w-4 h-4 text-muted-foreground"})}),p.jsx(sr,{...r,variant:"outlined",className:"max-h-[calc(100vh-80px)] h-full","data-testid":"sidebar-panel"})]}),document.querySelector(`#${n??cl}`))};function ul(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function dl(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])}function Vh(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var fl=e=>{const{present:t,children:n}=e,r=Uh(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ie(r.ref,Gh(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};fl.displayName="Presence";function Uh(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Vh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=jn(r.current);s.current=a==="mounted"?u:"none"},[a]),pe(()=>{const u=r.current,f=o.current;if(f!==e){const h=s.current,v=jn(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=v=>{const m=jn(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(s.current=jn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function jn(e){return e?.animationName||"none"}function Gh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ln="Checkbox",[Kh,eb]=Se(Ln),[Yh,ro]=Kh(Ln);function Xh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:d}=e,[h,v]=$e({prop:n,defaultProp:o??!1,onChange:l,caller:Ln}),[g,m]=c.useState(null),[b,x]=c.useState(null),y=c.useRef(!1),w=g?!!i||!!g.closest("form"):!0,C={checked:h,disabled:s,setChecked:v,control:g,setControl:m,name:a,form:i,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Xe(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:x};return p.jsx(Yh,{scope:t,...C,children:qh(d)?d(C):r})}var pl="CheckboxTrigger",ml=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:g}=ro(pl,e),m=ie(o,f),b=c.useRef(l);return c.useEffect(()=>{const x=s?.form;if(x){const y=()=>d(b.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,d]),p.jsx(ue.button,{type:"button",role:"checkbox","aria-checked":Xe(l)?"mixed":l,"aria-required":u,"data-state":yl(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:m,onKeyDown:ul(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:ul(n,x=>{d(y=>Xe(y)?!0:!y),g&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});ml.displayName=pl;var hl=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:u,form:f,...d}=e;return p.jsx(Xh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(ml,{...d,ref:t,__scopeCheckbox:n}),h&&p.jsx(xl,{__scopeCheckbox:n})]})})});hl.displayName=Ln;var gl="CheckboxIndicator",vl=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=ro(gl,n);return p.jsx(fl,{present:r||Xe(s.checked)||s.checked===!0,children:p.jsx(ue.span,{"data-state":yl(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vl.displayName=gl;var bl="CheckboxBubbleInput",xl=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:u,value:f,form:d,bubbleInput:h,setBubbleInput:v}=ro(bl,e),g=ie(n,v),m=dl(s),b=Cr(r);c.useEffect(()=>{const y=h;if(!y)return;const w=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(w,"checked").set,_=!o.current;if(m!==s&&P){const E=new Event("click",{bubbles:_});y.indeterminate=Xe(s),P.call(y,Xe(s)?!1:s),y.dispatchEvent(E)}},[h,m,s,o]);const x=c.useRef(Xe(s)?!1:s);return p.jsx(ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:l,name:u,value:f,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xl.displayName=bl;function qh(e){return typeof e=="function"}function Xe(e){return e==="indeterminate"}function yl(e){return Xe(e)?"indeterminate":e?"checked":"unchecked"}const Zh=({className:e,...t})=>p.jsx(hl,{"data-slot":"checkbox",className:te("cursor-pointer peer border-border dark:bg-input data-[state=checked]:bg-primary data-[state=checked]:text-white dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(vl,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(Fr,{className:"size-3.5"})})});function zn(e){const t=Jh(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(eg);if(l){const u=l.props.children,f=a.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Jh(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n,i=c.isValidElement(o)?ng(o):void 0,a=ie(i,r);if(c.isValidElement(o)){const l=tg(s,o.props);return o.type!==c.Fragment&&(l.ref=a),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wl=Symbol("radix.slottable");function Qh(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=wl,t}function eg(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wl}function tg(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ng(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fe=rg.reduce((e,t)=>{const n=zn(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function og(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}var sg="DismissableLayer",oo="dismissableLayer.update",ig="dismissableLayer.pointerDownOutside",ag="dismissableLayer.focusOutside",Cl,Sl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),so=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(Sl),[f,d]=c.useState(null),h=f?.ownerDocument??globalThis?.document,[,v]=c.useState({}),g=ie(t,E=>d(E)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(b),y=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,P=ug(E=>{const R=E.target,H=[...u.branches].some(V=>V.contains(R));!C||H||(o?.(E),i?.(E),E.defaultPrevented||a?.())},h),_=dg(E=>{const R=E.target;[...u.branches].some(V=>V.contains(R))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},h);return ms(E=>{y===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Cl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),El(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Cl)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),El())},[f,u]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(oo,E),()=>document.removeEventListener(oo,E)},[]),p.jsx(fe.div,{...l,ref:g,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,P.onPointerDownCapture)})});so.displayName=sg;var lg="DismissableLayerBranch",cg=c.forwardRef((e,t)=>{const n=c.useContext(Sl),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(fe.div,{...e,ref:o})});cg.displayName=lg;function ug(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Pl(ig,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dg(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Pl(ag,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 El(){const e=new CustomEvent(oo);document.dispatchEvent(e)}function Pl(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?og(o,s):o.dispatchEvent(s)}var fg="Arrow",Nl=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(fe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nl.displayName=fg;var pg=Nl,io="Popper",[Rl,$n]=Se(io),[mg,Tl]=Rl(io),Al=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return p.jsx(mg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Al.displayName=io;var Il="PopperAnchor",_l=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Tl(Il,n),i=c.useRef(null),a=ie(t,i);return c.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:p.jsx(fe.div,{...o,ref:a})});_l.displayName=Il;var ao="PopperContent",[hg,gg]=Rl(ao),kl=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=Tl(ao,n),[x,y]=c.useState(null),w=ie(t,S=>y(S)),[C,P]=c.useState(null),_=Cr(C),E=_?.width??0,R=_?.height??0,H=r+(s!=="center"?"-"+s:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],B=q.length>0,J={padding:V,boundary:q.filter(bg),altBoundary:B},{refs:W,floatingStyles:X,placement:j,isPositioned:Z,middlewareData:A}=Ks({strategy:"fixed",placement:H,whileElementsMounted:(...S)=>Ws(...S,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Ys({mainAxis:o+R,alignmentAxis:i}),l&&Xs({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?qs():void 0,...J}),l&&Zs({...J}),Js({...J,apply:({elements:S,rects:k,availableWidth:z,availableHeight:L})=>{const{width:Q,height:ne}=k.reference,ee=S.floating.style;ee.setProperty("--radix-popper-available-width",`${z}px`),ee.setProperty("--radix-popper-available-height",`${L}px`),ee.setProperty("--radix-popper-anchor-width",`${Q}px`),ee.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),C&&ei({element:C,padding:a}),xg({arrowWidth:E,arrowHeight:R}),h&&Qs({strategy:"referenceHidden",...J})]}),[O,N]=Dl(j),$=ve(g);pe(()=>{Z&&$?.()},[Z,$]);const re=A.arrow?.x,I=A.arrow?.y,M=A.arrow?.centerOffset!==0,[F,D]=c.useState();return pe(()=>{x&&D(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(hg,{scope:n,placedSide:O,onArrowChange:P,arrowX:re,arrowY:I,shouldHideArrow:M,children:p.jsx(fe.div,{"data-side":O,"data-align":N,...m,ref:w,style:{...m.style,animation:Z?void 0:"none"}})})})});kl.displayName=ao;var Ml="PopperArrow",vg={top:"bottom",right:"left",bottom:"top",left:"right"},Ol=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=gg(Ml,r),i=vg[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:p.jsx(pg,{...o,ref:n,style:{...o.style,display:"block"}})})});Ol.displayName=Ml;function bg(e){return e!==null}var xg=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=Dl(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,v=(o.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=i?d:`${h}px`,m=`${-l}px`):u==="top"?(g=i?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${v}px`),{data:{x:g,y:m}}}});function Dl(e){const[t,n="center"]=e.split("-");return[t,n]}var jl=Al,Ll=_l,zl=kl,$l=Ol,yg="Portal",lo=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Zt.createPortal(p.jsx(fe.div,{...r,ref:t}),i):null});lo.displayName=yg;var Fl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),wg="VisuallyHidden",Hl=c.forwardRef((e,t)=>p.jsx(fe.span,{...e,ref:t,style:{...Fl,...e.style}}));Hl.displayName=wg;var Cg=Hl,[Fn,tb]=Se("Tooltip",[$n]),Hn=$n(),Bl="TooltipProvider",Sg=700,co="tooltip.open",[Eg,uo]=Fn(Bl),Wl=e=>{const{__scopeTooltip:t,delayDuration:n=Sg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(Eg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};Wl.displayName=Bl;var Kt="Tooltip",[Pg,Yt]=Fn(Kt),Vl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=uo(Kt,e.__scopeTooltip),u=Hn(t),[f,d]=c.useState(null),h=Te(),v=c.useRef(0),g=i??l.disableHoverableContent,m=a??l.delayDuration,b=c.useRef(!1),[x,y]=$e({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(co))):l.onClose(),s?.(E)},caller:Kt}),w=c.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),C=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,y(!0)},[y]),P=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),_=c.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,y(!0),v.current=0},m)},[m,y]);return c.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(jl,{...u,children:p.jsx(Pg,{scope:t,contentId:h,open:x,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?_():C()},[l.isOpenDelayedRef,_,C]),onTriggerLeave:c.useCallback(()=>{g?P():(window.clearTimeout(v.current),v.current=0)},[P,g]),onOpen:C,onClose:P,disableHoverableContent:g,children:n})})};Vl.displayName=Kt;var fo="TooltipTrigger",Ul=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yt(fo,n),s=uo(fo,n),i=Hn(n),a=c.useRef(null),l=ie(t,a,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Ll,{asChild:!0,...i,children:p.jsx(fe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Y(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Y(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Y(e.onBlur,o.onClose),onClick:Y(e.onClick,o.onClose)})})});Ul.displayName=fo;var po="TooltipPortal",[Ng,Rg]=Fn(po,{forceMount:void 0}),Gl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Yt(po,t);return p.jsx(Ng,{scope:t,forceMount:n,children:p.jsx(Fe,{present:n||s.open,children:p.jsx(lo,{asChild:!0,container:o,children:r})})})};Gl.displayName=po;var Et="TooltipContent",Kl=c.forwardRef((e,t)=>{const n=Rg(Et,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Yt(Et,e.__scopeTooltip);return p.jsx(Fe,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Yl,{side:o,...s,ref:t}):p.jsx(Tg,{side:o,...s,ref:t})})}),Tg=c.forwardRef((e,t)=>{const n=Yt(Et,e.__scopeTooltip),r=uo(Et,e.__scopeTooltip),o=c.useRef(null),s=ie(t,o),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,h=c.useCallback(()=>{a(null),d(!1)},[d]),v=c.useCallback((g,m)=>{const b=g.currentTarget,x={x:g.clientX,y:g.clientY},y=Mg(x,b.getBoundingClientRect()),w=Og(x,y),C=Dg(m.getBoundingClientRect()),P=Lg([...w,...C]);a(P),d(!0)},[d]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&f){const g=b=>v(b,f),m=b=>v(b,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",m)}}},[l,f,v,h]),c.useEffect(()=>{if(i){const g=m=>{const b=m.target,x={x:m.clientX,y:m.clientY},y=l?.contains(b)||f?.contains(b),w=!jg(x,i);y?h():w&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,i,u,h]),p.jsx(Yl,{...e,ref:s})}),[Ag,Ig]=Fn(Kt,{isInside:!1}),_g=Qh("TooltipContent"),Yl=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Yt(Et,n),u=Hn(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(co,f),()=>document.removeEventListener(co,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=h=>{h.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),p.jsx(so,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:p.jsxs(zl,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(_g,{children:r}),p.jsx(Ag,{scope:n,isInside:!0,children:p.jsx(Cg,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Kl.displayName=Et;var Xl="TooltipArrow",kg=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hn(n);return Ig(Xl,n).isInside?null:p.jsx($l,{...o,...r,ref:t})});kg.displayName=Xl;function Mg(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 Og(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 Dg(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 jg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(o=!o)}return o}function Lg(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),zg(t)}function zg(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 $g=Wl,Fg=Vl,Hg=Ul,Bg=Gl,ql=Kl;const Wg=$g,Vg=Fg,Ug=Hg,Zl=T.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Bg,{children:p.jsx(ql,{ref:r,sideOffset:t,className:te("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Zl.displayName=ql.displayName;function Jl(e,[t,n]){return Math.min(n,Math.max(t,e))}function Gg(e){const t=e+"CollectionProvider",[n,r]=Se(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:x}=m,y=T.useRef(null),w=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=zn(a),u=T.forwardRef((m,b)=>{const{scope:x,children:y}=m,w=s(a,x),C=ie(b,w.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=zn(f),v=T.forwardRef((m,b)=>{const{scope:x,children:y,...w}=m,C=T.useRef(null),P=ie(b,C),_=s(f,x);return T.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),p.jsx(h,{[d]:"",ref:P,children:y})});v.displayName=f;function g(m){const b=s(e+"CollectionConsumer",m);return T.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,E)=>w.indexOf(_.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:v},g,r]}var mo="focusScope.autoFocusOnMount",ho="focusScope.autoFocusOnUnmount",Ql={bubbles:!1,cancelable:!0},Kg="FocusScope",ec=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=ve(o),f=ve(s),d=c.useRef(null),h=ie(t,m=>l(m)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(w){if(v.paused||!a)return;const C=w.target;a.contains(C)?d.current=C:qe(d.current,{select:!0})},b=function(w){if(v.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||qe(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&qe(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,v.paused]),c.useEffect(()=>{if(a){rc.add(v);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(mo,Ql);a.addEventListener(mo,u),a.dispatchEvent(x),x.defaultPrevented||(Yg(Qg(tc(a)),{select:!0}),document.activeElement===m&&qe(a))}return()=>{a.removeEventListener(mo,u),setTimeout(()=>{const x=new CustomEvent(ho,Ql);a.addEventListener(ho,f),a.dispatchEvent(x),x.defaultPrevented||qe(m??document.body,{select:!0}),a.removeEventListener(ho,f),rc.remove(v)},0)}}},[a,u,f,v]);const g=c.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[w,C]=Xg(y);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&qe(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&qe(C,{select:!0})):x===y&&m.preventDefault()}},[n,r,v.paused]);return p.jsx(fe.div,{tabIndex:-1,...i,ref:h,onKeyDown:g})});ec.displayName=Kg;function Yg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==n)return}function Xg(e){const t=tc(e),n=nc(t,e),r=nc(t.reverse(),e);return[n,r]}function tc(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 nc(e,t){for(const n of e)if(!qg(n,{upTo:t}))return n}function qg(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 Zg(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zg(e)&&t&&e.select()}}var rc=Jg();function Jg(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oc(e,t),e.unshift(t)},remove(t){e=oc(e,t),e[0]?.resume()}}}function oc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qg(e){return e.filter(t=>t.tagName!=="A")}var ev=[" ","Enter","ArrowUp","ArrowDown"],tv=[" ","Enter"],it="Select",[Bn,Wn,nv]=Gg(it),[Pt,nb]=Se(it,[nv,$n]),Vn=$n(),[rv,Ze]=Pt(it),[ov,sv]=Pt(it),sc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:h,required:v,form:g}=e,m=Vn(t),[b,x]=c.useState(null),[y,w]=c.useState(null),[C,P]=c.useState(!1),_=nn(u),[E,R]=$e({prop:r,defaultProp:o??!1,onChange:s,caller:it}),[H,V]=$e({prop:i,defaultProp:a,onChange:l,caller:it}),q=c.useRef(null),B=b?g||!!b.closest("form"):!0,[J,W]=c.useState(new Set),X=Array.from(J).map(j=>j.props.value).join(";");return p.jsx(jl,{...m,children:p.jsxs(rv,{required:v,scope:t,trigger:b,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:P,contentId:Te(),value:H,onValueChange:V,open:E,onOpenChange:R,dir:_,triggerPointerDownPosRef:q,disabled:h,children:[p.jsx(Bn.Provider,{scope:t,children:p.jsx(ov,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(j=>{W(Z=>new Set(Z).add(j))},[]),onNativeOptionRemove:c.useCallback(j=>{W(Z=>{const A=new Set(Z);return A.delete(j),A})},[]),children:n})}),B?p.jsxs(Ac,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:d,value:H,onChange:j=>V(j.target.value),disabled:h,form:g,children:[H===void 0?p.jsx("option",{value:""}):null,Array.from(J)]},X):null]})})};sc.displayName=it;var ic="SelectTrigger",ac=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Vn(n),i=Ze(ic,n),a=i.disabled||r,l=ie(t,i.onTriggerChange),u=Wn(n),f=c.useRef("touch"),[d,h,v]=_c(m=>{const b=u().filter(w=>!w.disabled),x=b.find(w=>w.value===i.value),y=kc(b,m,x);y!==void 0&&i.onValueChange(y.value)}),g=m=>{a||(i.onOpenChange(!0),v()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(Ll,{asChild:!0,...s,children:p.jsx(fe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ic(i.value)?"":void 0,...o,ref:l,onClick:Y(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&g(m)}),onPointerDown:Y(o.onPointerDown,m=>{f.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:Y(o.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&ev.includes(m.key)&&(g(),m.preventDefault())})})})});ac.displayName=ic;var lc="SelectValue",cc=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=Ze(lc,n),{onValueNodeHasChildrenChange:u}=l,f=s!==void 0,d=ie(t,l.onValueNodeChange);return pe(()=>{u(f)},[u,f]),p.jsx(fe.span,{...a,ref:d,style:{pointerEvents:"none"},children:Ic(l.value)?p.jsx(p.Fragment,{children:i}):s})});cc.displayName=lc;var iv="SelectIcon",uc=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(fe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});uc.displayName=iv;var av="SelectPortal",dc=e=>p.jsx(lo,{asChild:!0,...e});dc.displayName=av;var at="SelectContent",fc=c.forwardRef((e,t)=>{const n=Ze(at,e.__scopeSelect),[r,o]=c.useState();if(pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Rt.createPortal(p.jsx(pc,{scope:e.__scopeSelect,children:p.jsx(Bn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(mc,{...e,ref:t})});fc.displayName=at;var Re=10,[pc,Je]=Pt(at),lv="SelectContentImpl",cv=zn("SelectContent.RemoveScroll"),mc=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b,...x}=e,y=Ze(at,n),[w,C]=c.useState(null),[P,_]=c.useState(null),E=ie(t,S=>C(S)),[R,H]=c.useState(null),[V,q]=c.useState(null),B=Wn(n),[J,W]=c.useState(!1),X=c.useRef(!1);c.useEffect(()=>{if(w)return hi(w)},[w]),ys();const j=c.useCallback(S=>{const[k,...z]=B().map(ne=>ne.ref.current),[L]=z.slice(-1),Q=document.activeElement;for(const ne of S)if(ne===Q||(ne?.scrollIntoView({block:"nearest"}),ne===k&&P&&(P.scrollTop=0),ne===L&&P&&(P.scrollTop=P.scrollHeight),ne?.focus(),document.activeElement!==Q))return},[B,P]),Z=c.useCallback(()=>j([R,w]),[j,R,w]);c.useEffect(()=>{J&&Z()},[J,Z]);const{onOpenChange:A,triggerPointerDownPosRef:O}=y;c.useEffect(()=>{if(w){let S={x:0,y:0};const k=L=>{S={x:Math.abs(Math.round(L.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(L.pageY)-(O.current?.y??0))}},z=L=>{S.x<=10&&S.y<=10?L.preventDefault():w.contains(L.target)||A(!1),document.removeEventListener("pointermove",k),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",z,{capture:!0})}}},[w,A,O]),c.useEffect(()=>{const S=()=>A(!1);return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[A]);const[N,$]=_c(S=>{const k=B().filter(Q=>!Q.disabled),z=k.find(Q=>Q.ref.current===document.activeElement),L=kc(k,S,z);L&&setTimeout(()=>L.ref.current.focus())}),re=c.useCallback((S,k,z)=>{const L=!X.current&&!z;(y.value!==void 0&&y.value===k||L)&&(H(S),L&&(X.current=!0))},[y.value]),I=c.useCallback(()=>w?.focus(),[w]),M=c.useCallback((S,k,z)=>{const L=!X.current&&!z;(y.value!==void 0&&y.value===k||L)&&q(S)},[y.value]),F=r==="popper"?go:hc,D=F===go?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return p.jsx(pc,{scope:n,content:w,viewport:P,onViewportChange:_,itemRefCallback:re,selectedItem:R,onItemLeave:I,itemTextRefCallback:M,focusSelectedItem:Z,selectedItemText:V,position:r,isPositioned:J,searchRef:N,children:p.jsx(Ir,{as:cv,allowPinchZoom:!0,children:p.jsx(ec,{asChild:!0,trapped:y.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:Y(o,S=>{y.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:p.jsx(so,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsx(F,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:S=>S.preventDefault(),...x,...D,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Y(x.onKeyDown,S=>{const k=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!k&&S.key.length===1&&$(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let L=B().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(S.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const Q=S.target,ne=L.indexOf(Q);L=L.slice(ne+1)}setTimeout(()=>j(L)),S.preventDefault()}})})})})})})});mc.displayName=lv;var uv="SelectItemAlignedPosition",hc=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ze(at,n),i=Je(at,n),[a,l]=c.useState(null),[u,f]=c.useState(null),d=ie(t,E=>f(E)),h=Wn(n),v=c.useRef(!1),g=c.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:x,focusSelectedItem:y}=i,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&b&&x){const E=s.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),V=x.getBoundingClientRect();if(s.dir!=="rtl"){const Q=V.left-R.left,ne=H.left-Q,ee=E.left-ne,ae=E.width+ee,me=Math.max(ae,R.width),le=window.innerWidth-Re,ce=Jl(ne,[Re,Math.max(Re,le-me)]);a.style.minWidth=ae+"px",a.style.left=ce+"px"}else{const Q=R.right-V.right,ne=window.innerWidth-H.right-Q,ee=window.innerWidth-E.right-ne,ae=E.width+ee,me=Math.max(ae,R.width),le=window.innerWidth-Re,ce=Jl(ne,[Re,Math.max(Re,le-me)]);a.style.minWidth=ae+"px",a.style.right=ce+"px"}const q=h(),B=window.innerHeight-Re*2,J=m.scrollHeight,W=window.getComputedStyle(u),X=parseInt(W.borderTopWidth,10),j=parseInt(W.paddingTop,10),Z=parseInt(W.borderBottomWidth,10),A=parseInt(W.paddingBottom,10),O=X+j+J+A+Z,N=Math.min(b.offsetHeight*5,O),$=window.getComputedStyle(m),re=parseInt($.paddingTop,10),I=parseInt($.paddingBottom,10),M=E.top+E.height/2-Re,F=B-M,D=b.offsetHeight/2,S=b.offsetTop+D,k=X+j+S,z=O-k;if(k<=M){const Q=q.length>0&&b===q[q.length-1].ref.current;a.style.bottom="0px";const ne=u.clientHeight-m.offsetTop-m.offsetHeight,ee=Math.max(F,D+(Q?I:0)+ne+Z),ae=k+ee;a.style.height=ae+"px"}else{const Q=q.length>0&&b===q[0].ref.current;a.style.top="0px";const ee=Math.max(M,X+m.offsetTop+(Q?re:0)+D)+z;a.style.height=ee+"px",m.scrollTop=k-M+m.offsetTop}a.style.margin=`${Re}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,a,u,m,b,x,s.dir,r]);pe(()=>w(),[w]);const[C,P]=c.useState();pe(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const _=c.useCallback(E=>{E&&g.current===!0&&(w(),y?.(),g.current=!1)},[w,y]);return p.jsx(fv,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:_,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(fe.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});hc.displayName=uv;var dv="SelectPopperPosition",go=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...s}=e,i=Vn(n);return p.jsx(zl,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});go.displayName=dv;var[fv,vo]=Pt(at,{}),bo="SelectViewport",gc=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Je(bo,n),i=vo(bo,n),a=ie(t,s.onViewportChange),l=c.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Bn.Slot,{scope:n,children:p.jsx(fe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Y(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h?.current&&d){const v=Math.abs(l.current-f.scrollTop);if(v>0){const g=window.innerHeight-Re*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),x=Math.max(m,b);if(x<g){const y=x+v,w=Math.min(g,y),C=y-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});gc.displayName=bo;var vc="SelectGroup",[pv,mv]=Pt(vc),hv=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Te();return p.jsx(pv,{scope:n,id:o,children:p.jsx(fe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});hv.displayName=vc;var bc="SelectLabel",xc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=mv(bc,n);return p.jsx(fe.div,{id:o.id,...r,ref:t})});xc.displayName=bc;var Un="SelectItem",[gv,yc]=Pt(Un),wc=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ze(Un,n),l=Je(Un,n),u=a.value===r,[f,d]=c.useState(s??""),[h,v]=c.useState(!1),g=ie(t,y=>l.itemRefCallback?.(y,r,o)),m=Te(),b=c.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(gv,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:c.useCallback(y=>{d(w=>w||(y?.textContent??"").trim())},[]),children:p.jsx(Bn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:p.jsx(fe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:Y(i.onFocus,()=>v(!0)),onBlur:Y(i.onBlur,()=>v(!1)),onClick:Y(i.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:Y(i.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:Y(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Y(i.onPointerMove,y=>{b.current=y.pointerType,o?l.onItemLeave?.():b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Y(i.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(tv.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});wc.displayName=Un;var Xt="SelectItemText",Cc=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ze(Xt,n),a=Je(Xt,n),l=yc(Xt,n),u=sv(Xt,n),[f,d]=c.useState(null),h=ie(t,x=>d(x),l.onItemTextChange,x=>a.itemTextRefCallback?.(x,l.value,l.disabled)),v=f?.textContent,g=c.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=u;return pe(()=>(m(g),()=>b(g)),[m,b,g]),p.jsxs(p.Fragment,{children:[p.jsx(fe.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Rt.createPortal(s.children,i.valueNode):null]})});Cc.displayName=Xt;var Sc="SelectItemIndicator",Ec=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yc(Sc,n).isSelected?p.jsx(fe.span,{"aria-hidden":!0,...r,ref:t}):null});Ec.displayName=Sc;var xo="SelectScrollUpButton",Pc=c.forwardRef((e,t)=>{const n=Je(xo,e.__scopeSelect),r=vo(xo,e.__scopeSelect),[o,s]=c.useState(!1),i=ie(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Rc,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Pc.displayName=xo;var yo="SelectScrollDownButton",Nc=c.forwardRef((e,t)=>{const n=Je(yo,e.__scopeSelect),r=vo(yo,e.__scopeSelect),[o,s]=c.useState(!1),i=ie(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;s(f)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Rc,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Nc.displayName=yo;var Rc=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Je("SelectScrollButton",n),i=c.useRef(null),a=Wn(n),l=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),pe(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(fe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Y(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Y(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Y(o.onPointerLeave,()=>{l()})})}),vv="SelectSeparator",Tc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(fe.div,{"aria-hidden":!0,...r,ref:t})});Tc.displayName=vv;var wo="SelectArrow",bv=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Vn(n),s=Ze(wo,n),i=Je(wo,n);return s.open&&i.position==="popper"?p.jsx($l,{...o,...r,ref:t}):null});bv.displayName=wo;var xv="SelectBubbleInput",Ac=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=ie(r,o),i=dl(t);return c.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(d)}},[i,t]),p.jsx(fe.select,{...n,style:{...Fl,...n.style},ref:s,defaultValue:t})});Ac.displayName=xv;function Ic(e){return e===""||e===void 0}function _c(e){const t=ve(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function kc(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=yv(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function yv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wv=sc,Mc=ac,Cv=cc,Sv=uc,Ev=dc,Oc=fc,Pv=gc,Dc=xc,jc=wc,Nv=Cc,Rv=Ec,Lc=Pc,zc=Nc,$c=Tc;const Tv=wv,Av=Cv,Fc=c.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Mc,{ref:r,className:te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(Sv,{asChild:!0,children:p.jsx(Hr,{className:"h-4 w-4 opacity-50"})})]}));Fc.displayName=Mc.displayName;const Hc=c.forwardRef(({className:e,...t},n)=>p.jsx(Lc,{ref:n,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Km,{className:"h-4 w-4"})}));Hc.displayName=Lc.displayName;const Bc=c.forwardRef(({className:e,...t},n)=>p.jsx(zc,{ref:n,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Hr,{className:"h-4 w-4"})}));Bc.displayName=zc.displayName;const Wc=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(Ev,{children:p.jsxs(Oc,{ref:o,className:te("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Hc,{}),p.jsx(Pv,{className:te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(Bc,{})]})}));Wc.displayName=Oc.displayName;const Iv=c.forwardRef(({className:e,...t},n)=>p.jsx(Dc,{ref:n,className:te("px-2 py-1.5 text-sm font-semibold",e),...t}));Iv.displayName=Dc.displayName;const Vc=c.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(jc,{ref:r,className:te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Rv,{children:p.jsx(Fr,{className:"h-4 w-4"})})}),p.jsx(Nv,{children:t})]}));Vc.displayName=jc.displayName;const _v=c.forwardRef(({className:e,...t},n)=>p.jsx($c,{ref:n,className:te("-mx-1 my-1 h-px bg-muted",e),...t}));_v.displayName=$c.displayName;const Uc=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(v=>v(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,a);return a},kv=e=>e?Uc(e):Uc,Mv=e=>e;function Ov(e,t=Mv){const n=T.useSyncExternalStore(e.subscribe,T.useCallback(()=>t(e.getState()),[e,t]),T.useCallback(()=>t(e.getInitialState()),[e,t]));return T.useDebugValue(n),n}const Dv=e=>{const t=kv(e),n=r=>Ov(t,r);return Object.assign(n,t),n},jv=e=>Dv;function Gc(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const Co=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Co(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Co(r)(n)}}}},Lv=(e,t)=>(n,r,o)=>{let s={storage:Gc(()=>localStorage),partialize:m=>m,version:0,merge:(m,b)=>({...b,...m}),...t},i=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,o);const f=()=>{const m=s.partialize({...r()});return u.setItem(s.name,{state:m,version:s.version})},d=o.setState;o.setState=(m,b)=>(d(m,b),f());const h=e((...m)=>(n(...m),f()),r,o);o.getInitialState=()=>h;let v;const g=()=>{var m,b;if(!u)return;i=!1,a.forEach(y=>{var w;return y((w=r())!=null?w:h)});const x=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(m=r())!=null?m:h))||void 0;return Co(u.getItem.bind(u))(s.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==s.version){if(s.migrate){const w=s.migrate(y.state,y.version);return w instanceof Promise?w.then(C=>[!0,C]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var w;const[C,P]=y;if(v=s.merge(P,(w=r())!=null?w:h),n(v,!0),C)return f()}).then(()=>{x?.(v,void 0),v=r(),i=!0,l.forEach(y=>y(v))}).catch(y=>{x?.(void 0,y)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||g(),v||h},Kc=e=>{const t=window.document.body;if(t.classList.remove("light","dark"),e==="system"){const n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";t.classList.add(n);return}t.classList.add(e)},Yc=jv()(Lv(e=>({theme:"dark",setTheme:t=>{Kc(t),e({theme:t})}}),{name:"motia-theme-storage",storage:Gc(()=>localStorage)})),{theme:Xc}=Yc.getState();Xc&&Kc(Xc);const zv=_t("text-xs font-medium tracking-wide rounded-full h-[6px] w-[6px] m-[4px] outline-[2px]",{variants:{variant:{info:"bg-[#2862FE] outline-[#2862FE]/20",trace:"bg-[#2862FE] outline-[#2862FE]/20",debug:"bg-[#2862FE] outline-[#2862FE]/20",error:"bg-[#E22A6D] outline-[#E22A6D]/20",fatal:"bg-[#E22A6D] outline-[#E22A6D]/20",warn:"bg-[#F59F0B] outline-[#F59F0B]/20"}}}),$v=({level:e})=>p.jsx("div",{className:zv({variant:e})}),qc=T.forwardRef(({className:e,...t},n)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})}));qc.displayName="Table";const Zc=T.forwardRef(({className:e,...t},n)=>p.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t}));Zc.displayName="TableHeader";const Jc=T.forwardRef(({className:e,...t},n)=>p.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t}));Jc.displayName="TableBody";const Fv=T.forwardRef(({className:e,...t},n)=>p.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Fv.displayName="TableFooter";const Qc=T.forwardRef(({className:e,...t},n)=>p.jsx("tr",{ref:n,className:te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Qc.displayName="TableRow";const eu=T.forwardRef(({className:e,...t},n)=>p.jsx("th",{ref:n,className:te("h-10 px-2 text-left align-middle text-md font-medium bg-muted text-muted-foreground font-bold [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));eu.displayName="TableHead";const tu=T.forwardRef(({className:e,...t},n)=>p.jsx("td",{ref:n,className:te("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));tu.displayName="TableCell";const Hv=T.forwardRef(({className:e,...t},n)=>p.jsx("caption",{ref:n,className:te("mt-4 text-sm text-muted-foreground",e),...t}));Hv.displayName="TableCaption",K.APP_SIDEBAR_CONTAINER_ID=cl,K.BackgroundEffect=or,K.Badge=al,K.Breadcrumb=Pa,K.BreadcrumbItem=Br,K.Button=Oe,K.Checkbox=Zh,K.CollapsiblePanel=Lh,K.CollapsiblePanelGroup=zh,K.Container=Wr,K.ContainerContent=Ur,K.ContainerHeader=Vr,K.DropdownMenu=wa,K.DropdownMenuCheckboxItem=Jm,K.DropdownMenuContent=Sa,K.DropdownMenuGroup=Zm,K.DropdownMenuItem=Ea,K.DropdownMenuLabel=th,K.DropdownMenuRadioGroup=Qm,K.DropdownMenuRadioItem=eh,K.DropdownMenuSeparator=nh,K.DropdownMenuSub=rh,K.DropdownMenuSubContent=sh,K.DropdownMenuSubTrigger=oh,K.DropdownMenuTrigger=Ca,K.Input=Ko,K.Label=il,K.LevelDot=$v,K.Panel=sr,K.PanelDetailItem=ps,K.Select=Tv,K.SelectContent=Wc,K.SelectItem=Vc,K.SelectTrigger=Fc,K.SelectValue=Av,K.SidePanel=tl,K.SidePanelDetail=nl,K.SidePanelDetailItem=rl,K.Sidebar=Wh,K.Table=qc,K.TableBody=Jc,K.TableCell=tu,K.TableHead=eu,K.TableHeader=Zc,K.TableRow=Qc,K.Tabs=an,K.TabsContent=rr,K.TabsList=tr,K.TabsTrigger=nr,K.Textarea=Go,K.Tooltip=Vg,K.TooltipContent=Zl,K.TooltipProvider=Wg,K.TooltipTrigger=Ug,K.cn=te,K.useThemeStore=Yc,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|
|
82
|
+
*/const qu=$e("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Xo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Xo(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():Xo(e[o],null)}}}}function ie(...e){return c.useCallback(tn(...e),e)}function kt(e){const t=Ju(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(ed);if(l){const u=l.props.children,f=a.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Zu=kt("Slot");function Ju(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const i=nd(o),a=td(s,o.props);return o.type!==c.Fragment&&(a.ref=r?tn(r,i):i),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qu=Symbol("radix.slottable");function ed(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qu}function td(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function nd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const rd=It("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-input text-foreground hover:bg-border active:bg-card",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",light:"bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80",secondary:"bg-secondary text-foreground shadow-sm hover:opacity-90 active:opacity-80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80",outline:"border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground",ghost:"hover:bg-muted-foreground/20 text-foreground",link:"text-primary underline-offset-4 hover:underline text-primary-foreground",icon:"hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10"},size:{sm:"h-6 px-3 text-xs [&_svg]:size-3",default:"h-9 px-4 text-sm [&_svg]:size-4",md:"h-9 px-4 text-sm [&_svg]:size-4",lg:"h-11 px-6 text-base [&_svg]:size-5",icon:"h-4 w-4 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"default"}}),Oe=T.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Zu:"button";return p.jsx(i,{className:te(rd({variant:t,size:n}),e),ref:s,...o})});Oe.displayName="Button";function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Se(e,t=[]){let n=[];function r(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=d=>{const{scope:h,children:v,...g}=d,m=h?.[e]?.[l]||a,b=c.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:b,children:v})};u.displayName=s+"Provider";function f(d,h){const v=h?.[e]?.[l]||a,g=c.useContext(v);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=a?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,od(o,...t)]}function od(...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 i=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var pe=globalThis?.document?c.useLayoutEffect:()=>{},sd=c[" useInsertionEffect ".trim().toString()]||pe;function Fe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=id({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=c.useCallback(f=>{if(a){const d=ad(f)?f(e):f;d!==e&&i.current?.(d)}else s(f)},[a,e,s,i]);return[l,u]}function id({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return sd(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function ad(e){return typeof e=="function"}var ld=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=ld.reduce((e,t)=>{const n=kt(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qo(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}function Zo(e){const t=e+"CollectionProvider",[n,r]=Se(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:x}=m,y=T.useRef(null),w=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=kt(a),u=T.forwardRef((m,b)=>{const{scope:x,children:y}=m,w=s(a,x),C=ie(b,w.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=kt(f),v=T.forwardRef((m,b)=>{const{scope:x,children:y,...w}=m,C=T.useRef(null),P=ie(b,C),_=s(f,x);return T.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),p.jsx(h,{[d]:"",ref:P,children:y})});v.displayName=f;function g(m){const b=s(e+"CollectionConsumer",m);return T.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,E)=>w.indexOf(_.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:v},g,r]}var cd=c.createContext(void 0);function nn(e){const t=c.useContext(cd);return e||t||"ltr"}function ve(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Jo(e,t=globalThis?.document){const n=ve(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 ud="DismissableLayer",tr="dismissableLayer.update",dd="dismissableLayer.pointerDownOutside",fd="dismissableLayer.focusOutside",Qo,es=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ts=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(es),[f,d]=c.useState(null),h=f?.ownerDocument??globalThis?.document,[,v]=c.useState({}),g=ie(t,E=>d(E)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(b),y=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,P=hd(E=>{const R=E.target,H=[...u.branches].some(V=>V.contains(R));!C||H||(o?.(E),i?.(E),E.defaultPrevented||a?.())},h),_=gd(E=>{const R=E.target;[...u.branches].some(V=>V.contains(R))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},h);return Jo(E=>{y===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ns(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Qo)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ns())},[f,u]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(tr,E),()=>document.removeEventListener(tr,E)},[]),p.jsx(ue.div,{...l,ref:g,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,P.onPointerDownCapture)})});ts.displayName=ud;var pd="DismissableLayerBranch",md=c.forwardRef((e,t)=>{const n=c.useContext(es),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ue.div,{...e,ref:o})});md.displayName=pd;function hd(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){rs(dd,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gd(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&rs(fd,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 ns(){const e=new CustomEvent(tr);document.dispatchEvent(e)}function rs(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?qo(o,s):o.dispatchEvent(s)}var nr=0;function os(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ss()),document.body.insertAdjacentElement("beforeend",e[1]??ss()),nr++,()=>{nr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nr--}},[])}function ss(){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 rr="focusScope.autoFocusOnMount",or="focusScope.autoFocusOnUnmount",is={bubbles:!1,cancelable:!0},vd="FocusScope",as=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=ve(o),f=ve(s),d=c.useRef(null),h=ie(t,m=>l(m)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(w){if(v.paused||!a)return;const C=w.target;a.contains(C)?d.current=C:He(d.current,{select:!0})},b=function(w){if(v.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||He(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&He(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,v.paused]),c.useEffect(()=>{if(a){us.add(v);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(rr,is);a.addEventListener(rr,u),a.dispatchEvent(x),x.defaultPrevented||(bd(Sd(ls(a)),{select:!0}),document.activeElement===m&&He(a))}return()=>{a.removeEventListener(rr,u),setTimeout(()=>{const x=new CustomEvent(or,is);a.addEventListener(or,f),a.dispatchEvent(x),x.defaultPrevented||He(m??document.body,{select:!0}),a.removeEventListener(or,f),us.remove(v)},0)}}},[a,u,f,v]);const g=c.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[w,C]=xd(y);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&He(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&He(C,{select:!0})):x===y&&m.preventDefault()}},[n,r,v.paused]);return p.jsx(ue.div,{tabIndex:-1,...i,ref:h,onKeyDown:g})});as.displayName=vd;function bd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(He(r,{select:t}),document.activeElement!==n)return}function xd(e){const t=ls(e),n=cs(t,e),r=cs(t.reverse(),e);return[n,r]}function ls(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 cs(e,t){for(const n of e)if(!yd(n,{upTo:t}))return n}function yd(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 wd(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wd(e)&&t&&e.select()}}var us=Cd();function Cd(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ds(e,t),e.unshift(t)},remove(t){e=ds(e,t),e[0]?.resume()}}}function ds(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Sd(e){return e.filter(t=>t.tagName!=="A")}var Ed=c[" useId ".trim().toString()]||(()=>{}),Pd=0;function Te(e){const[t,n]=c.useState(Ed());return pe(()=>{n(r=>r??String(Pd++))},[e]),t?`radix-${t}`:""}const Nd=["top","right","bottom","left"],Be=Math.min,xe=Math.max,rn=Math.round,on=Math.floor,Ae=e=>({x:e,y:e}),Rd={left:"right",right:"left",bottom:"top",top:"bottom"},Td={start:"end",end:"start"};function sr(e,t,n){return xe(e,Be(t,n))}function De(e,t){return typeof e=="function"?e(t):e}function je(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function ir(e){return e==="x"?"y":"x"}function ar(e){return e==="y"?"height":"width"}function We(e){return["top","bottom"].includes(je(e))?"y":"x"}function lr(e){return ir(We(e))}function Ad(e,t,n){n===void 0&&(n=!1);const r=ft(e),o=lr(e),s=ar(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=sn(i)),[i,sn(i)]}function Id(e){const t=sn(e);return[cr(e),t,cr(t)]}function cr(e){return e.replace(/start|end/g,t=>Td[t])}function _d(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function kd(e,t,n,r){const o=ft(e);let s=_d(je(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(cr)))),s}function sn(e){return e.replace(/left|right|bottom|top/g,t=>Rd[t])}function Md(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?Md(e):{top:e,right:e,bottom:e,left:e}}function an(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 ps(e,t,n){let{reference:r,floating:o}=e;const s=We(t),i=lr(t),a=ar(i),l=je(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let v;switch(l){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(ft(t)){case"start":v[i]-=h*(n&&u?-1:1);break;case"end":v[i]+=h*(n&&u?-1:1);break}return v}const Od=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=ps(u,r,l),h=r,v={},g=0;for(let m=0;m<a.length;m++){const{name:b,fn:x}=a[m],{x:y,y:w,data:C,reset:P}=await x({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:u,platform:i,elements:{reference:e,floating:t}});f=y??f,d=w??d,v={...v,[b]:{...v[b],...C}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=ps(u,h,l)),m=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:v}};async function Mt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:v=0}=De(t,e),g=fs(v),b=a[h?d==="floating"?"reference":"floating":d],x=an(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},P=an(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(x.top-P.top+g.top)/C.y,bottom:(P.bottom-x.bottom+g.bottom)/C.y,left:(x.left-P.left+g.left)/C.x,right:(P.right-x.right+g.right)/C.x}}const Dd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=De(e,t)||{};if(u==null)return{};const d=fs(f),h={x:n,y:r},v=lr(o),g=ar(v),m=await i.getDimensions(u),b=v==="y",x=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[v]-h[v]-s.floating[g],P=h[v]-s.reference[v],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=_?_[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(_)))&&(E=a.floating[w]||s.floating[g]);const R=C/2-P/2,H=E/2-m[g]/2-1,V=Be(d[x],H),q=Be(d[y],H),B=V,J=E-m[g]-q,W=E/2-m[g]/2+R,X=sr(B,W,J),j=!l.arrow&&ft(o)!=null&&W!==X&&s.reference[g]/2-(W<B?V:q)-m[g]/2<0,Z=j?W<B?W-B:W-J:0;return{[v]:h[v]+Z,data:{[v]:X,centerOffset:W-X-Z,...j&&{alignmentOffset:Z}},reset:j}}}),jd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=De(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=je(o),y=We(a),w=je(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=h||(w||!m?[sn(a)]:Id(a)),_=g!=="none";!h&&_&&P.push(...kd(a,m,g,C));const E=[a,...P],R=await Mt(t,b),H=[];let V=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&H.push(R[x]),d){const W=Ad(o,i,C);H.push(R[W[0]],R[W[1]])}if(V=[...V,{placement:o,overflows:H}],!H.every(W=>W<=0)){var q,B;const W=(((q=s.flip)==null?void 0:q.index)||0)+1,X=E[W];if(X)return{data:{index:W,overflows:V},reset:{placement:X}};let j=(B=V.filter(Z=>Z.overflows[0]<=0).sort((Z,A)=>Z.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(v){case"bestFit":{var J;const Z=(J=V.filter(A=>{if(_){const O=We(A.placement);return O===y||O==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(O=>O>0).reduce((O,N)=>O+N,0)]).sort((A,O)=>A[1]-O[1])[0])==null?void 0:J[0];Z&&(j=Z);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function ms(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hs(e){return Nd.some(t=>e[t]>=0)}const Ld=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=De(e,t);switch(r){case"referenceHidden":{const s=await Mt(t,{...o,elementContext:"reference"}),i=ms(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:hs(i)}}}case"escaped":{const s=await Mt(t,{...o,altBoundary:!0}),i=ms(s,n.floating);return{data:{escapedOffsets:i,escaped:hs(i)}}}default:return{}}}}};async function zd(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=je(n),a=ft(n),l=We(n)==="y",u=["left","top"].includes(i)?-1:1,f=s&&l?-1:1,d=De(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(v=a==="end"?g*-1:g),l?{x:v*f,y:h*u}:{x:h*u,y:v*f}}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:i,middlewareData:a}=t,l=await zd(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},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:i=!1,limiter:a={fn:b=>{let{x,y}=b;return{x,y}}},...l}=De(e,t),u={x:n,y:r},f=await Mt(t,l),d=We(je(o)),h=ir(d);let v=u[h],g=u[d];if(s){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+f[b],w=v-f[x];v=sr(y,v,w)}if(i){const b=d==="y"?"top":"left",x=d==="y"?"bottom":"right",y=g+f[b],w=g-f[x];g=sr(y,g,w)}const m=a.fn({...t,[h]:v,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[d]:i}}}}}},Hd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=De(e,t),f={x:n,y:r},d=We(o),h=ir(d);let v=f[h],g=f[d];const m=De(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=h==="y"?"height":"width",C=s.reference[h]-s.floating[w]+b.mainAxis,P=s.reference[h]+s.reference[w]-b.mainAxis;v<C?v=C:v>P&&(v=P)}if(u){var x,y;const w=h==="y"?"width":"height",C=["top","left"].includes(je(o)),P=s.reference[d]-s.floating[w]+(C&&((x=i.offset)==null?void 0:x[d])||0)+(C?0:b.crossAxis),_=s.reference[d]+s.reference[w]+(C?0:((y=i.offset)==null?void 0:y[d])||0)-(C?b.crossAxis:0);g<P?g=P:g>_&&(g=_)}return{[h]:v,[d]:g}}}},Bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=De(e,t),f=await Mt(t,u),d=je(o),h=ft(o),v=We(o)==="y",{width:g,height:m}=s.floating;let b,x;d==="top"||d==="bottom"?(b=d,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,b=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,w=g-f.left-f.right,C=Be(m-f[b],y),P=Be(g-f[x],w),_=!t.middlewareData.shift;let E=C,R=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),_&&!h){const V=xe(f.left,0),q=xe(f.right,0),B=xe(f.top,0),J=xe(f.bottom,0);v?R=g-2*(V!==0||q!==0?V+q:xe(f.left,f.right)):E=m-2*(B!==0||J!==0?B+J:xe(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:E});const H=await i.getDimensions(a.floating);return g!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function ln(){return typeof window<"u"}function pt(e){return gs(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(gs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gs(e){return ln()?e instanceof Node||e instanceof ye(e).Node:!1}function Ee(e){return ln()?e instanceof Element||e instanceof ye(e).Element:!1}function _e(e){return ln()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function vs(e){return!ln()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ot(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Wd(e){return["table","td","th"].includes(pt(e))}function cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ur(e){const t=dr(),n=Ee(e)?Pe(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 Vd(e){let t=Ve(e);for(;_e(t)&&!mt(t);){if(ur(t))return t;if(cn(t))return null;t=Ve(t)}return null}function dr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mt(e){return["html","body","#document"].includes(pt(e))}function Pe(e){return ye(e).getComputedStyle(e)}function un(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vs(e)&&e.host||Ie(e);return vs(t)?t.host:t}function bs(e){const t=Ve(e);return mt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&Ot(t)?t:bs(t)}function Dt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=bs(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ye(o);if(s){const a=fr(i);return t.concat(i,i.visualViewport||[],Ot(o)?o:[],a&&n?Dt(a):[])}return t.concat(o,Dt(o,[],n))}function fr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xs(e){const t=Pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=rn(n)!==s||rn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function pr(e){return Ee(e)?e:e.contextElement}function ht(e){const t=pr(e);if(!_e(t))return Ae(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=xs(t);let i=(s?rn(n.width):n.width)/r,a=(s?rn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Ud=Ae(0);function ys(e){const t=ye(e);return!dr()||!t.visualViewport?Ud:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function et(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=pr(e);let i=Ae(1);t&&(r?Ee(r)&&(i=ht(r)):i=ht(e));const a=Gd(s,n,r)?ys(s):Ae(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const h=ye(s),v=r&&Ee(r)?ye(r):r;let g=h,m=fr(g);for(;m&&r&&v!==g;){const b=ht(m),x=m.getBoundingClientRect(),y=Pe(m),w=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,d*=b.y,l+=w,u+=C,g=ye(m),m=fr(g)}}return an({width:f,height:d,x:l,y:u})}function mr(e,t){const n=un(e).scrollLeft;return t?t.left+n:et(Ie(e)).left+n}function ws(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:mr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Kd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ie(r),a=t?cn(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ae(1);const f=Ae(0),d=_e(r);if((d||!d&&!s)&&((pt(r)!=="body"||Ot(i))&&(l=un(r)),_e(r))){const v=et(r);u=ht(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const h=i&&!d&&!s?ws(i,l,!0):Ae(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-l.scrollTop*u.y+f.y+h.y}}function Yd(e){return Array.from(e.getClientRects())}function Xd(e){const t=Ie(e),n=un(e),r=e.ownerDocument.body,o=xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+mr(e);const a=-n.scrollTop;return Pe(r).direction==="rtl"&&(i+=xe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function qd(e,t){const n=ye(e),r=Ie(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=dr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function Zd(e,t){const n=et(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=_e(e)?ht(e):Ae(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Cs(e,t,n){let r;if(t==="viewport")r=qd(e,n);else if(t==="document")r=Xd(Ie(e));else if(Ee(t))r=Zd(t,n);else{const o=ys(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return an(r)}function Ss(e,t){const n=Ve(e);return n===t||!Ee(n)||mt(n)?!1:Pe(n).position==="fixed"||Ss(n,t)}function Jd(e,t){const n=t.get(e);if(n)return n;let r=Dt(e,[],!1).filter(a=>Ee(a)&&pt(a)!=="body"),o=null;const s=Pe(e).position==="fixed";let i=s?Ve(e):e;for(;Ee(i)&&!mt(i);){const a=Pe(i),l=ur(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ot(i)&&!l&&Ss(e,i))?r=r.filter(f=>f!==i):o=a,i=Ve(i)}return t.set(e,r),r}function Qd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?cn(t)?[]:Jd(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const d=Cs(t,f,o);return u.top=xe(d.top,u.top),u.right=Be(d.right,u.right),u.bottom=Be(d.bottom,u.bottom),u.left=xe(d.left,u.left),u},Cs(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ef(e){const{width:t,height:n}=xs(e);return{width:t,height:n}}function tf(e,t,n){const r=_e(t),o=Ie(t),s=n==="fixed",i=et(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ae(0);if(r||!r&&!s)if((pt(t)!=="body"||Ot(o))&&(a=un(t)),r){const h=et(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=mr(o));const u=o&&!r&&!s?ws(o,a):Ae(0),f=i.left+a.scrollLeft-l.x-u.x,d=i.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:i.width,height:i.height}}function hr(e){return Pe(e).position==="static"}function Es(e,t){if(!_e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function Ps(e,t){const n=ye(e);if(cn(e))return n;if(!_e(e)){let o=Ve(e);for(;o&&!mt(o);){if(Ee(o)&&!hr(o))return o;o=Ve(o)}return n}let r=Es(e,t);for(;r&&Wd(r)&&hr(r);)r=Es(r,t);return r&&mt(r)&&hr(r)&&!ur(r)?n:r||Vd(e)||n}const nf=async function(e){const t=this.getOffsetParent||Ps,n=this.getDimensions,r=await n(e.floating);return{reference:tf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rf(e){return Pe(e).direction==="rtl"}const of={convertOffsetParentRelativeRectToViewportRelativeRect:Kd,getDocumentElement:Ie,getClippingRect:Qd,getOffsetParent:Ps,getElementRects:nf,getClientRects:Yd,getDimensions:ef,getScale:ht,isElement:Ee,isRTL:rf};function Ns(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sf(e,t){let n=null,r;const o=Ie(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:v}=u;if(a||t(),!h||!v)return;const g=on(d),m=on(o.clientWidth-(f+h)),b=on(o.clientHeight-(d+v)),x=on(f),w={rootMargin:-g+"px "+-m+"px "+-b+"px "+-x+"px",threshold:xe(0,Be(1,l))||1};let C=!0;function P(_){const E=_[0].intersectionRatio;if(E!==l){if(!C)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Ns(u,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}return i(!0),s}function Rs(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=pr(e),f=o||s?[...u?Dt(u):[],...Dt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=u&&a?sf(u,n):null;let h=-1,v=null;i&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let g,m=l?et(e):null;l&&b();function b(){const x=et(e);m&&!Ns(m,x)&&n(),m=x,g=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d?.(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const af=$d,lf=Fd,cf=jd,uf=Bd,df=Ld,Ts=Dd,ff=Hd,pf=(e,t,n)=>{const r=new Map,o={platform:of,...n},s={...o.platform,_c:r};return Od(e,t,{...o,platform:s})};var dn=typeof document<"u"?T.useLayoutEffect:T.useEffect;function fn(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(!fn(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)&&!fn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function As(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Is(e,t){const n=As(e);return Math.round(t*n)/n}function gr(e){const t=c.useRef(e);return dn(()=>{t.current=e}),t}function _s(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=c.useState(r);fn(h,r)||v(r);const[g,m]=c.useState(null),[b,x]=c.useState(null),y=c.useCallback(A=>{A!==_.current&&(_.current=A,m(A))},[]),w=c.useCallback(A=>{A!==E.current&&(E.current=A,x(A))},[]),C=s||g,P=i||b,_=c.useRef(null),E=c.useRef(null),R=c.useRef(f),H=l!=null,V=gr(l),q=gr(o),B=gr(u),J=c.useCallback(()=>{if(!_.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};q.current&&(A.platform=q.current),pf(_.current,E.current,A).then(O=>{const N={...O,isPositioned:B.current!==!1};W.current&&!fn(R.current,N)&&(R.current=N,Rt.flushSync(()=>{d(N)}))})},[h,t,n,q,B]);dn(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const W=c.useRef(!1);dn(()=>(W.current=!0,()=>{W.current=!1}),[]),dn(()=>{if(C&&(_.current=C),P&&(E.current=P),C&&P){if(V.current)return V.current(C,P,J);J()}},[C,P,J,V,H]);const X=c.useMemo(()=>({reference:_,floating:E,setReference:y,setFloating:w}),[y,w]),j=c.useMemo(()=>({reference:C,floating:P}),[C,P]),Z=c.useMemo(()=>{const A={position:n,left:0,top:0};if(!j.floating)return A;const O=Is(j.floating,f.x),N=Is(j.floating,f.y);return a?{...A,transform:"translate("+O+"px, "+N+"px)",...As(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:N}},[n,a,j.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:X,elements:j,floatingStyles:Z}),[f,J,X,j,Z])}const mf=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?Ts({element:r.current,padding:o}).fn(n):{}:r?Ts({element:r,padding:o}).fn(n):{}}}},ks=(e,t)=>({...af(e),options:[e,t]}),Ms=(e,t)=>({...lf(e),options:[e,t]}),Os=(e,t)=>({...ff(e),options:[e,t]}),Ds=(e,t)=>({...cf(e),options:[e,t]}),js=(e,t)=>({...uf(e),options:[e,t]}),Ls=(e,t)=>({...df(e),options:[e,t]}),zs=(e,t)=>({...mf(e),options:[e,t]});var hf="Arrow",$s=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});$s.displayName=hf;var gf=$s;function vr(e){const[t,n]=c.useState(void 0);return pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var br="Popper",[Fs,Hs]=Se(br),[vf,Bs]=Fs(br),Ws=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return p.jsx(vf,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ws.displayName=br;var Vs="PopperAnchor",Us=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Bs(Vs,n),i=c.useRef(null),a=ie(t,i);return c.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:p.jsx(ue.div,{...o,ref:a})});Us.displayName=Vs;var xr="PopperContent",[bf,xf]=Fs(xr),Gs=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=Bs(xr,n),[x,y]=c.useState(null),w=ie(t,S=>y(S)),[C,P]=c.useState(null),_=vr(C),E=_?.width??0,R=_?.height??0,H=r+(s!=="center"?"-"+s:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],B=q.length>0,J={padding:V,boundary:q.filter(wf),altBoundary:B},{refs:W,floatingStyles:X,placement:j,isPositioned:Z,middlewareData:A}=_s({strategy:"fixed",placement:H,whileElementsMounted:(...S)=>Rs(...S,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[ks({mainAxis:o+R,alignmentAxis:i}),l&&Ms({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Os():void 0,...J}),l&&Ds({...J}),js({...J,apply:({elements:S,rects:k,availableWidth:z,availableHeight:L})=>{const{width:Q,height:ne}=k.reference,ee=S.floating.style;ee.setProperty("--radix-popper-available-width",`${z}px`),ee.setProperty("--radix-popper-available-height",`${L}px`),ee.setProperty("--radix-popper-anchor-width",`${Q}px`),ee.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),C&&zs({element:C,padding:a}),Cf({arrowWidth:E,arrowHeight:R}),h&&Ls({strategy:"referenceHidden",...J})]}),[O,N]=Xs(j),$=ve(g);pe(()=>{Z&&$?.()},[Z,$]);const re=A.arrow?.x,I=A.arrow?.y,M=A.arrow?.centerOffset!==0,[F,D]=c.useState();return pe(()=>{x&&D(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(bf,{scope:n,placedSide:O,onArrowChange:P,arrowX:re,arrowY:I,shouldHideArrow:M,children:p.jsx(ue.div,{"data-side":O,"data-align":N,...m,ref:w,style:{...m.style,animation:Z?void 0:"none"}})})})});Gs.displayName=xr;var Ks="PopperArrow",yf={top:"bottom",right:"left",bottom:"top",left:"right"},Ys=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=xf(Ks,r),i=yf[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:p.jsx(gf,{...o,ref:n,style:{...o.style,display:"block"}})})});Ys.displayName=Ks;function wf(e){return e!==null}var Cf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=Xs(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,v=(o.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=i?d:`${h}px`,m=`${-l}px`):u==="top"?(g=i?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${v}px`),{data:{x:g,y:m}}}});function Xs(e){const[t,n="center"]=e.split("-");return[t,n]}var qs=Ws,Sf=Us,Ef=Gs,Pf=Ys,Nf="Portal",Zs=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Zt.createPortal(p.jsx(ue.div,{...r,ref:t}),i):null});Zs.displayName=Nf;function Rf(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ue=e=>{const{present:t,children:n}=e,r=Tf(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ie(r.ref,Af(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ue.displayName="Presence";function Tf(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Rf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=pn(r.current);s.current=a==="mounted"?u:"none"},[a]),pe(()=>{const u=r.current,f=o.current;if(f!==e){const h=s.current,v=pn(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=v=>{const m=pn(r.current).includes(v.animationName);if(v.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(s.current=pn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function pn(e){return e?.animationName||"none"}function Af(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yr="rovingFocusGroup.onEntryFocus",If={bubbles:!1,cancelable:!0},jt="RovingFocusGroup",[wr,Js,_f]=Zo(jt),[kf,mn]=Se(jt,[_f]),[Mf,Of]=kf(jt),Qs=c.forwardRef((e,t)=>p.jsx(wr.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(wr.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Df,{...e,ref:t})})}));Qs.displayName=jt;var Df=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,h=c.useRef(null),v=ie(t,h),g=nn(s),[m,b]=Fe({prop:i,defaultProp:a??null,onChange:l,caller:jt}),[x,y]=c.useState(!1),w=ve(u),C=Js(n),P=c.useRef(!1),[_,E]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(yr,w),()=>R.removeEventListener(yr,w)},[w]),p.jsx(Mf,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:c.useCallback(R=>b(R),[b]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>E(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>E(R=>R-1),[]),children:p.jsx(ue.div,{tabIndex:x||_===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Y(e.onMouseDown,()=>{P.current=!0}),onFocus:Y(e.onFocus,R=>{const H=!P.current;if(R.target===R.currentTarget&&H&&!x){const V=new CustomEvent(yr,If);if(R.currentTarget.dispatchEvent(V),!V.defaultPrevented){const q=C().filter(j=>j.focusable),B=q.find(j=>j.active),J=q.find(j=>j.id===m),X=[B,J,...q].filter(Boolean).map(j=>j.ref.current);ni(X,f)}}P.current=!1}),onBlur:Y(e.onBlur,()=>y(!1))})})}),ei="RovingFocusGroupItem",ti=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=Te(),u=s||l,f=Of(ei,n),d=f.currentTabStopId===u,h=Js(n),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:m}=f;return c.useEffect(()=>{if(r)return v(),()=>g()},[r,v,g]),p.jsx(wr.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(ue.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:Y(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:Y(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Y(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=zf(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=f.loop?$f(w,C+1):w.slice(C+1)}setTimeout(()=>ni(w))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});ti.displayName=ei;var jf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zf(e,t,n){const r=Lf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jf[r]}function ni(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 ri=Qs,oi=ti,Ff=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gt=new WeakMap,hn=new WeakMap,gn={},Cr=0,si=function(e){return e&&(e.host||si(e.parentNode))},Hf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=si(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})},Bf=function(e,t,n,r){var o=Hf(t,Array.isArray(e)?e:[e]);gn[n]||(gn[n]=new WeakMap);var s=gn[n],i=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))f(h);else try{var v=h.getAttribute(r),g=v!==null&&v!=="false",m=(gt.get(h)||0)+1,b=(s.get(h)||0)+1;gt.set(h,m),s.set(h,b),i.push(h),m===1&&g&&hn.set(h,!0),b===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return f(t),a.clear(),Cr++,function(){i.forEach(function(d){var h=gt.get(d)-1,v=s.get(d)-1;gt.set(d,h),s.set(d,v),h||(hn.has(d)||d.removeAttribute(r),hn.delete(d)),v||d.removeAttribute(n)}),Cr--,Cr||(gt=new WeakMap,gt=new WeakMap,hn=new WeakMap,gn={})}},ii=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ff(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Bf(r,o,n,"aria-hidden")):function(){return null}},ke=function(){return ke=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},ke.apply(this,arguments)};function ai(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 Wf(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 vn="right-scroll-bar-position",bn="width-before-scroll-bar",Vf="with-scroll-bars-hidden",Uf="--removed-body-scroll-bar-size";function Sr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gf(e,t){var n=T.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 Kf=typeof window<"u"?c.useLayoutEffect:c.useEffect,li=new WeakMap;function Yf(e,t){var n=Gf(null,function(r){return e.forEach(function(o){return Sr(o,r)})});return Kf(function(){var r=li.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Sr(a,null)}),s.forEach(function(a){o.has(a)||Sr(a,i)})}li.set(n,e)},[e]),n}function Xf(e){return e}function qf(e,t){t===void 0&&(t=Xf);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Zf(e){e===void 0&&(e={});var t=qf(null);return t.options=ke({async:!0,ssr:!1},e),t}var ci=function(e){var t=e.sideCar,n=ai(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,ke({},n))};ci.isSideCarExport=!0;function Jf(e,t){return e.useMedium(t),ci}var ui=Zf(),Er=function(){},xn=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Er,onWheelCapture:Er,onTouchMoveCapture:Er}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,y=e.gapMode,w=ai(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,P=Yf([n,t]),_=ke(ke({},w),o);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:ui,removeScrollBar:u,shards:d,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?c.cloneElement(c.Children.only(a),ke(ke({},_),{ref:P})):c.createElement(x,ke({},_,{className:l,ref:P}),a))});xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xn.classNames={fullWidth:bn,zeroRight:vn};var Qf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ep(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qf();return t&&e.setAttribute("nonce",t),e}function tp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function np(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ep())&&(tp(t,n),np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},op=function(){var e=rp();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},di=function(){var e=op(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},sp={left:0,top:0,right:0,gap:0},Pr=function(e){return parseInt(e||"",10)||0},ip=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[Pr(n),Pr(r),Pr(o)]},ap=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sp;var t=ip(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])}},lp=di(),vt="data-scroll-locked",cp=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
83
|
+
.`.concat(Vf,` {
|
|
84
|
+
overflow: hidden `).concat(r,`;
|
|
85
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
86
|
+
}
|
|
87
|
+
body[`).concat(vt,`] {
|
|
88
|
+
overflow: hidden `).concat(r,`;
|
|
89
|
+
overscroll-behavior: contain;
|
|
90
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
91
|
+
padding-left: `.concat(o,`px;
|
|
92
|
+
padding-top: `).concat(s,`px;
|
|
93
|
+
padding-right: `).concat(i,`px;
|
|
94
|
+
margin-left:0;
|
|
95
|
+
margin-top:0;
|
|
96
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
97
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.`).concat(vn,` {
|
|
101
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.`).concat(bn,` {
|
|
105
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.`).concat(vn," .").concat(vn,` {
|
|
109
|
+
right: 0 `).concat(r,`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.`).concat(bn," .").concat(bn,` {
|
|
113
|
+
margin-right: 0 `).concat(r,`;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
body[`).concat(vt,`] {
|
|
117
|
+
`).concat(Uf,": ").concat(a,`px;
|
|
118
|
+
}
|
|
119
|
+
`)},fi=function(){var e=parseInt(document.body.getAttribute(vt)||"0",10);return isFinite(e)?e:0},up=function(){c.useEffect(function(){return document.body.setAttribute(vt,(fi()+1).toString()),function(){var e=fi()-1;e<=0?document.body.removeAttribute(vt):document.body.setAttribute(vt,e.toString())}},[])},dp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;up();var s=c.useMemo(function(){return ap(o)},[o]);return c.createElement(lp,{styles:cp(s,!t,o,n?"":"!important")})},Nr=!1;if(typeof window<"u")try{var yn=Object.defineProperty({},"passive",{get:function(){return Nr=!0,!0}});window.addEventListener("test",yn,yn),window.removeEventListener("test",yn,yn)}catch{Nr=!1}var bt=Nr?{passive:!1}:!1,fp=function(e){return e.tagName==="TEXTAREA"},pi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fp(e)&&n[t]==="visible")},pp=function(e){return pi(e,"overflowY")},mp=function(e){return pi(e,"overflowX")},mi=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=hi(e,r);if(o){var s=gi(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hi=function(e,t){return e==="v"?pp(t):mp(t)},gi=function(e,t){return e==="v"?hp(t):gp(t)},vp=function(e,t){return e==="h"&&t==="rtl"?-1:1},bp=function(e,t,n,r,o){var s=vp(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,f=i>0,d=0,h=0;do{var v=gi(e,a),g=v[0],m=v[1],b=v[2],x=m-b-s*g;(g||x)&&hi(e,a)&&(d+=x,h+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(d)<1||!f&&Math.abs(h)<1)&&(u=!0),u},wn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vi=function(e){return[e.deltaX,e.deltaY]},bi=function(e){return e&&"current"in e?e.current:e},xp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yp=function(e){return`
|
|
120
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
121
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
122
|
+
`)},wp=0,xt=[];function Cp(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(wp++)[0],s=c.useState(di)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Wf([e.lockRef.current],(e.shards||[]).map(bi),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var x=wn(m),y=n.current,w="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],P,_=m.target,E=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in m&&E==="h"&&_.type==="range")return!1;var R=mi(E,_);if(!R)return!0;if(R?P=E:(P=E==="v"?"h":"v",R=mi(E,_)),!R)return!1;if(!r.current&&"changedTouches"in m&&(w||C)&&(r.current=P),!P)return!0;var H=r.current||P;return bp(H,b,m,H==="h"?w:C)},[]),l=c.useCallback(function(m){var b=m;if(!(!xt.length||xt[xt.length-1]!==s)){var x="deltaY"in b?vi(b):wn(b),y=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&xp(P.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(bi).filter(Boolean).filter(function(P){return P.contains(b.target)}),C=w.length>0?a(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=c.useCallback(function(m,b,x,y){var w={name:m,delta:b,target:x,should:y,shadowParent:Sp(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=c.useCallback(function(m){n.current=wn(m),r.current=void 0},[]),d=c.useCallback(function(m){u(m.type,vi(m),m.target,a(m,e.lockRef.current))},[]),h=c.useCallback(function(m){u(m.type,wn(m),m.target,a(m,e.lockRef.current))},[]);c.useEffect(function(){return xt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,bt),document.addEventListener("touchmove",l,bt),document.addEventListener("touchstart",f,bt),function(){xt=xt.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,bt),document.removeEventListener("touchmove",l,bt),document.removeEventListener("touchstart",f,bt)}},[]);var v=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(s,{styles:yp(o)}):null,v?c.createElement(dp,{gapMode:e.gapMode}):null)}function Sp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ep=Jf(ui,Cp);var Rr=c.forwardRef(function(e,t){return c.createElement(xn,ke({},e,{ref:t,sideCar:Ep}))});Rr.classNames=xn.classNames;var Tr=["Enter"," "],Pp=["ArrowDown","PageUp","Home"],xi=["ArrowUp","PageDown","End"],Np=[...Pp,...xi],Rp={ltr:[...Tr,"ArrowRight"],rtl:[...Tr,"ArrowLeft"]},Tp={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lt="Menu",[zt,Ap,Ip]=Zo(Lt),[tt,yi]=Se(Lt,[Ip,Hs,mn]),$t=Hs(),wi=mn(),[Ci,Ge]=tt(Lt),[_p,Ft]=tt(Lt),Si=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=$t(t),[l,u]=c.useState(null),f=c.useRef(!1),d=ve(s),h=nn(o);return c.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),p.jsx(qs,{...a,children:p.jsx(Ci,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:p.jsx(_p,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:i,children:r})})})};Si.displayName=Lt;var kp="MenuAnchor",Ar=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$t(n);return p.jsx(Sf,{...o,...r,ref:t})});Ar.displayName=kp;var Ir="MenuPortal",[Mp,Ei]=tt(Ir,{forceMount:void 0}),Pi=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ge(Ir,t);return p.jsx(Mp,{scope:t,forceMount:n,children:p.jsx(Ue,{present:n||s.open,children:p.jsx(Zs,{asChild:!0,container:o,children:r})})})};Pi.displayName=Ir;var Ce="MenuContent",[Op,_r]=tt(Ce),Ni=c.forwardRef((e,t)=>{const n=Ei(Ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ge(Ce,e.__scopeMenu),i=Ft(Ce,e.__scopeMenu);return p.jsx(zt.Provider,{scope:e.__scopeMenu,children:p.jsx(Ue,{present:r||s.open,children:p.jsx(zt.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(Dp,{...o,ref:t}):p.jsx(jp,{...o,ref:t})})})})}),Dp=c.forwardRef((e,t)=>{const n=Ge(Ce,e.__scopeMenu),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return ii(s)},[]),p.jsx(kr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Y(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jp=c.forwardRef((e,t)=>{const n=Ge(Ce,e.__scopeMenu);return p.jsx(kr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lp=kt("MenuContent.ScrollLock"),kr=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...m}=e,b=Ge(Ce,n),x=Ft(Ce,n),y=$t(n),w=wi(n),C=Ap(n),[P,_]=c.useState(null),E=c.useRef(null),R=ie(t,E,b.onContentChange),H=c.useRef(0),V=c.useRef(""),q=c.useRef(0),B=c.useRef(null),J=c.useRef("right"),W=c.useRef(0),X=g?Rr:c.Fragment,j=g?{as:Lp,allowPinchZoom:!0}:void 0,Z=O=>{const N=V.current+O,$=C().filter(S=>!S.disabled),re=document.activeElement,I=$.find(S=>S.ref.current===re)?.textValue,M=$.map(S=>S.textValue),F=Xp(M,N,I),D=$.find(S=>S.textValue===F)?.ref.current;(function S(k){V.current=k,window.clearTimeout(H.current),k!==""&&(H.current=window.setTimeout(()=>S(""),1e3))})(N),D&&setTimeout(()=>D.focus())};c.useEffect(()=>()=>window.clearTimeout(H.current),[]),os();const A=c.useCallback(O=>J.current===B.current?.side&&Zp(O,B.current?.area),[]);return p.jsx(Op,{scope:n,searchRef:V,onItemEnter:c.useCallback(O=>{A(O)&&O.preventDefault()},[A]),onItemLeave:c.useCallback(O=>{A(O)||(E.current?.focus(),_(null))},[A]),onTriggerLeave:c.useCallback(O=>{A(O)&&O.preventDefault()},[A]),pointerGraceTimerRef:q,onPointerGraceIntentChange:c.useCallback(O=>{B.current=O},[]),children:p.jsx(X,{...j,children:p.jsx(as,{asChild:!0,trapped:o,onMountAutoFocus:Y(s,O=>{O.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(ts,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:p.jsx(ri,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:_,onEntryFocus:Y(l,O=>{x.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Ef,{role:"menu","aria-orientation":"vertical","data-state":Vi(b.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:R,style:{outline:"none",...m.style},onKeyDown:Y(m.onKeyDown,O=>{const $=O.target.closest("[data-radix-menu-content]")===O.currentTarget,re=O.ctrlKey||O.altKey||O.metaKey,I=O.key.length===1;$&&(O.key==="Tab"&&O.preventDefault(),!re&&I&&Z(O.key));const M=E.current;if(O.target!==M||!Np.includes(O.key))return;O.preventDefault();const D=C().filter(S=>!S.disabled).map(S=>S.ref.current);xi.includes(O.key)&&D.reverse(),Kp(D)}),onBlur:Y(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(H.current),V.current="")}),onPointerMove:Y(e.onPointerMove,Bt(O=>{const N=O.target,$=W.current!==O.clientX;if(O.currentTarget.contains(N)&&$){const re=O.clientX>W.current?"right":"left";J.current=re,W.current=O.clientX}}))})})})})})})});Ni.displayName=Ce;var zp="MenuGroup",Mr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{role:"group",...r,ref:t})});Mr.displayName=zp;var $p="MenuLabel",Ri=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{...r,ref:t})});Ri.displayName=$p;var Cn="MenuItem",Ti="menu.itemSelect",Sn=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),i=Ft(Cn,e.__scopeMenu),a=_r(Cn,e.__scopeMenu),l=ie(t,s),u=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const h=new CustomEvent(Ti,{bubbles:!0,cancelable:!0});d.addEventListener(Ti,v=>r?.(v),{once:!0}),qo(d,h),h.defaultPrevented?u.current=!1:i.onClose()}};return p.jsx(Ai,{...o,ref:l,disabled:n,onClick:Y(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:Y(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:Y(e.onKeyDown,d=>{const h=a.searchRef.current!=="";n||h&&d.key===" "||Tr.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Sn.displayName=Cn;var Ai=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=_r(Cn,n),a=wi(n),l=c.useRef(null),u=ie(t,l),[f,d]=c.useState(!1),[h,v]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&v((g.textContent??"").trim())},[s.children]),p.jsx(zt.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(oi,{asChild:!0,...a,focusable:!r,children:p.jsx(ue.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:Y(e.onPointerMove,Bt(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y(e.onPointerLeave,Bt(g=>i.onItemLeave(g))),onFocus:Y(e.onFocus,()=>d(!0)),onBlur:Y(e.onBlur,()=>d(!1))})})})}),Fp="MenuCheckboxItem",Ii=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Di,{scope:e.__scopeMenu,checked:n,children:p.jsx(Sn,{role:"menuitemcheckbox","aria-checked":En(n)?"mixed":n,...o,ref:t,"data-state":jr(n),onSelect:Y(o.onSelect,()=>r?.(En(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ii.displayName=Fp;var _i="MenuRadioGroup",[Hp,Bp]=tt(_i,{value:void 0,onValueChange:()=>{}}),ki=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ve(r);return p.jsx(Hp,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Mr,{...o,ref:t})})});ki.displayName=_i;var Mi="MenuRadioItem",Oi=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=Bp(Mi,e.__scopeMenu),s=n===o.value;return p.jsx(Di,{scope:e.__scopeMenu,checked:s,children:p.jsx(Sn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":jr(s),onSelect:Y(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Oi.displayName=Mi;var Or="MenuItemIndicator",[Di,Wp]=tt(Or,{checked:!1}),ji=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Wp(Or,n);return p.jsx(Ue,{present:r||En(s.checked)||s.checked===!0,children:p.jsx(ue.span,{...o,ref:t,"data-state":jr(s.checked)})})});ji.displayName=Or;var Vp="MenuSeparator",Li=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Li.displayName=Vp;var Up="MenuArrow",zi=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$t(n);return p.jsx(Pf,{...o,...r,ref:t})});zi.displayName=Up;var Dr="MenuSub",[Gp,$i]=tt(Dr),Fi=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ge(Dr,t),i=$t(t),[a,l]=c.useState(null),[u,f]=c.useState(null),d=ve(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),p.jsx(qs,{...i,children:p.jsx(Ci,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:f,children:p.jsx(Gp,{scope:t,contentId:Te(),triggerId:Te(),trigger:a,onTriggerChange:l,children:n})})})};Fi.displayName=Dr;var Ht="MenuSubTrigger",Hi=c.forwardRef((e,t)=>{const n=Ge(Ht,e.__scopeMenu),r=Ft(Ht,e.__scopeMenu),o=$i(Ht,e.__scopeMenu),s=_r(Ht,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),p.jsx(Ar,{asChild:!0,...u,children:p.jsx(Ai,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Vi(n.open),...e,ref:tn(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Y(e.onPointerMove,Bt(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Y(e.onPointerLeave,Bt(d=>{f();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",m=g?-5:5,b=h[g?"left":"right"],x=h[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:b,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:b,y:h.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Y(e.onKeyDown,d=>{const h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||Rp[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Hi.displayName=Ht;var Bi="MenuSubContent",Wi=c.forwardRef((e,t)=>{const n=Ei(Ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ge(Ce,e.__scopeMenu),i=Ft(Ce,e.__scopeMenu),a=$i(Bi,e.__scopeMenu),l=c.useRef(null),u=ie(t,l);return p.jsx(zt.Provider,{scope:e.__scopeMenu,children:p.jsx(Ue,{present:r||s.open,children:p.jsx(zt.Slot,{scope:e.__scopeMenu,children:p.jsx(kr,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:Y(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Y(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:Y(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),h=Tp[i.dir].includes(f.key);d&&h&&(s.onOpenChange(!1),a.trigger?.focus(),f.preventDefault())})})})})})});Wi.displayName=Bi;function Vi(e){return e?"open":"closed"}function En(e){return e==="indeterminate"}function jr(e){return En(e)?"indeterminate":e?"checked":"unchecked"}function Kp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xp(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Yp(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function qp(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(o=!o)}return o}function Zp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qp(n,t)}function Bt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Jp=Si,Qp=Ar,em=Pi,tm=Ni,nm=Mr,rm=Ri,om=Sn,sm=Ii,im=ki,am=Oi,lm=ji,cm=Li,um=zi,dm=Fi,fm=Hi,pm=Wi,Pn="DropdownMenu",[mm]=Se(Pn,[yi]),be=yi(),[hm,Ui]=mm(Pn),Gi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=be(t),u=c.useRef(null),[f,d]=Fe({prop:o,defaultProp:s??!1,onChange:i,caller:Pn});return p.jsx(hm,{scope:t,triggerId:Te(),triggerRef:u,contentId:Te(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(h=>!h),[d]),modal:a,children:p.jsx(Jp,{...l,open:f,onOpenChange:d,dir:r,modal:a,children:n})})};Gi.displayName=Pn;var Ki="DropdownMenuTrigger",Yi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Ui(Ki,n),i=be(n);return p.jsx(Qp,{asChild:!0,...i,children:p.jsx(ue.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:tn(t,s.triggerRef),onPointerDown:Y(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:Y(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Yi.displayName=Ki;var gm="DropdownMenuPortal",Xi=e=>{const{__scopeDropdownMenu:t,...n}=e,r=be(t);return p.jsx(em,{...r,...n})};Xi.displayName=gm;var qi="DropdownMenuContent",Zi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ui(qi,n),s=be(n),i=c.useRef(!1);return p.jsx(tm,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:Y(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:Y(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zi.displayName=qi;var vm="DropdownMenuGroup",Ji=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(nm,{...o,...r,ref:t})});Ji.displayName=vm;var bm="DropdownMenuLabel",Qi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(rm,{...o,...r,ref:t})});Qi.displayName=bm;var xm="DropdownMenuItem",ea=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(om,{...o,...r,ref:t})});ea.displayName=xm;var ym="DropdownMenuCheckboxItem",ta=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(sm,{...o,...r,ref:t})});ta.displayName=ym;var wm="DropdownMenuRadioGroup",na=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(im,{...o,...r,ref:t})});na.displayName=wm;var Cm="DropdownMenuRadioItem",ra=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(am,{...o,...r,ref:t})});ra.displayName=Cm;var Sm="DropdownMenuItemIndicator",oa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(lm,{...o,...r,ref:t})});oa.displayName=Sm;var Em="DropdownMenuSeparator",sa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(cm,{...o,...r,ref:t})});sa.displayName=Em;var Pm="DropdownMenuArrow",Nm=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(um,{...o,...r,ref:t})});Nm.displayName=Pm;var Rm=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=be(t),[a,l]=Fe({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(dm,{...i,open:a,onOpenChange:l,children:n})},Tm="DropdownMenuSubTrigger",ia=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(fm,{...o,...r,ref:t})});ia.displayName=Tm;var Am="DropdownMenuSubContent",aa=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=be(n);return p.jsx(pm,{...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)"}})});aa.displayName=Am;var Im=Gi,_m=Yi,km=Xi,Mm=Zi,Om=Ji,Dm=Qi,jm=ea,Lm=ta,zm=na,$m=ra,la=oa,Fm=sa,Hm=Rm,Bm=ia,Wm=aa;const ca=({...e})=>p.jsx(Im,{"data-slot":"dropdown-menu",...e}),ua=({...e})=>p.jsx(_m,{"data-slot":"dropdown-menu-trigger",...e}),da=({className:e,sideOffset:t=4,...n})=>p.jsx(km,{children:p.jsx(Mm,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})}),Vm=({...e})=>p.jsx(Om,{"data-slot":"dropdown-menu-group",...e}),fa=({className:e,inset:t,variant:n="default",...r})=>p.jsx(jm,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r}),Um=({className:e,children:t,checked:n,...r})=>p.jsxs(Lm,{"data-slot":"dropdown-menu-checkbox-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(la,{children:p.jsx(Qn,{className:"size-4"})})}),t]}),Gm=({...e})=>p.jsx(zm,{"data-slot":"dropdown-menu-radio-group",...e}),Km=({className:e,children:t,...n})=>p.jsxs($m,{"data-slot":"dropdown-menu-radio-item",className:te("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(la,{children:p.jsx(Xu,{className:"size-2 fill-current"})})}),t]}),Ym=({className:e,inset:t,...n})=>p.jsx(Dm,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n}),Xm=({className:e,...t})=>p.jsx(Fm,{"data-slot":"dropdown-menu-separator",className:te("bg-border -mx-1 my-1 h-px",e),...t}),qm=({...e})=>p.jsx(Hm,{"data-slot":"dropdown-menu-sub",...e}),Zm=({className:e,inset:t,children:n,...r})=>p.jsxs(Bm,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,p.jsx(Gu,{className:"ml-auto size-4"})]}),Jm=({className:e,...t})=>p.jsx(Wm,{"data-slot":"dropdown-menu-sub-content",className:te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t}),Lr=({label:e,onClick:t,isLast:n,dropdownItems:r,icon:o})=>r?.length?p.jsxs(ca,{children:[p.jsx(ua,{asChild:!0,children:p.jsxs(Oe,{variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e," ",p.jsx(Yu,{className:"size-4"})]})}),p.jsx(da,{className:"bg-background text-foreground",children:r.map(s=>p.jsxs(fa,{className:"cursor-pointer gap-2",onClick:s.onClick,children:[s.icon,s.label]},`dropdown-${s.label}`))})]}):n?p.jsx(Oe,{variant:"ghost",size:"sm",className:"cursor-default hover:bg-transparent hover:text-muted-transparent p-1",asChild:!0,children:p.jsxs("div",{className:"flex items-center gap-2",children:[o,e]})}):p.jsxs(Oe,{onClick:t,variant:"ghost",size:"sm",className:"p-1 gap-2",children:[o,e]});Lr.displayName="BreadcrumbItem";const pa=({className:e,items:t,...n})=>{const r=t.length-1;return p.jsx("div",{className:te("flex items-center",e),...n,children:t.map((o,s)=>p.jsxs(c.Fragment,{children:[s!==0&&p.jsx("span",{className:"mx-1.5 text-muted-foreground",children:"/"},`${o.label}-separator`),p.jsx(Lr,{label:o.label,icon:o.icon,isLast:s===r,dropdownItems:o.dropdownItems},`${o.label}-item`)]},`${o.label}-fragment`))})};pa.displayName="Breadcrumb";function ma(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function ha(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])}function Qm(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ga=e=>{const{present:t,children:n}=e,r=eh(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ie(r.ref,th(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};ga.displayName="Presence";function eh(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Qm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Nn(r.current);s.current=a==="mounted"?u:"none"},[a]),pe(()=>{const u=r.current,f=o.current;if(f!==e){const h=s.current,v=Nn(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=v=>{const m=Nn(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(s.current=Nn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Nn(e){return e?.animationName||"none"}function th(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rn="Checkbox",[nh]=Se(Rn),[rh,zr]=nh(Rn);function oh(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:d}=e,[h,v]=Fe({prop:n,defaultProp:o??!1,onChange:l,caller:Rn}),[g,m]=c.useState(null),[b,x]=c.useState(null),y=c.useRef(!1),w=g?!!i||!!g.closest("form"):!0,C={checked:h,disabled:s,setChecked:v,control:g,setControl:m,name:a,form:i,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ke(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:x};return p.jsx(rh,{scope:t,...C,children:sh(d)?d(C):r})}var va="CheckboxTrigger",ba=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:g}=zr(va,e),m=ie(o,f),b=c.useRef(l);return c.useEffect(()=>{const x=s?.form;if(x){const y=()=>d(b.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,d]),p.jsx(ue.button,{type:"button",role:"checkbox","aria-checked":Ke(l)?"mixed":l,"aria-required":u,"data-state":Ea(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:m,onKeyDown:ma(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:ma(n,x=>{d(y=>Ke(y)?!0:!y),g&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});ba.displayName=va;var xa=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:u,form:f,...d}=e;return p.jsx(oh,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:u,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(ba,{...d,ref:t,__scopeCheckbox:n}),h&&p.jsx(Sa,{__scopeCheckbox:n})]})})});xa.displayName=Rn;var ya="CheckboxIndicator",wa=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=zr(ya,n);return p.jsx(ga,{present:r||Ke(s.checked)||s.checked===!0,children:p.jsx(ue.span,{"data-state":Ea(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});wa.displayName=ya;var Ca="CheckboxBubbleInput",Sa=c.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:u,value:f,form:d,bubbleInput:h,setBubbleInput:v}=zr(Ca,e),g=ie(n,v),m=ha(s),b=vr(r);c.useEffect(()=>{const y=h;if(!y)return;const w=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(w,"checked").set,_=!o.current;if(m!==s&&P){const E=new Event("click",{bubbles:_});y.indeterminate=Ke(s),P.call(y,Ke(s)?!1:s),y.dispatchEvent(E)}},[h,m,s,o]);const x=c.useRef(Ke(s)?!1:s);return p.jsx(ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:l,name:u,value:f,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Sa.displayName=Ca;function sh(e){return typeof e=="function"}function Ke(e){return e==="indeterminate"}function Ea(e){return Ke(e)?"indeterminate":e?"checked":"unchecked"}const ih=({className:e,...t})=>p.jsx(xa,{"data-slot":"checkbox",className:te("cursor-pointer peer border-border dark:bg-input data-[state=checked]:bg-primary data-[state=checked]:text-white dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(wa,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(Qn,{className:"size-3.5"})})}),Tn=T.createContext(null);Tn.displayName="PanelGroupContext";const de={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},$r=10,nt=T.useLayoutEffect,Pa=c.useId,ah=typeof Pa=="function"?Pa:()=>null;let lh=0;function Fr(e=null){const t=ah(),n=T.useRef(e||t||null);return n.current===null&&(n.current=""+lh++),e??n.current}function Na({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:s,id:i,maxSize:a,minSize:l,onCollapse:u,onExpand:f,onResize:d,order:h,style:v,tagName:g="div",...m}){const b=T.useContext(Tn);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:w,getPanelStyle:C,groupId:P,isPanelCollapsed:_,reevaluatePanelConstraints:E,registerPanel:R,resizePanel:H,unregisterPanel:V}=b,q=Fr(i),B=T.useRef({callbacks:{onCollapse:u,onExpand:f,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:a,minSize:l},id:q,idIsFromProps:i!==void 0,order:h});T.useRef({didLogMissingDefaultSizeWarning:!1}),nt(()=>{const{callbacks:W,constraints:X}=B.current,j={...X};B.current.id=q,B.current.idIsFromProps=i!==void 0,B.current.order=h,W.onCollapse=u,W.onExpand=f,W.onResize=d,X.collapsedSize=n,X.collapsible=r,X.defaultSize=o,X.maxSize=a,X.minSize=l,(j.collapsedSize!==X.collapsedSize||j.collapsible!==X.collapsible||j.maxSize!==X.maxSize||j.minSize!==X.minSize)&&E(B.current,j)}),nt(()=>{const W=B.current;return R(W),()=>{V(W)}},[h,q,R,V]),T.useImperativeHandle(s,()=>({collapse:()=>{x(B.current)},expand:W=>{y(B.current,W)},getId(){return q},getSize(){return w(B.current)},isCollapsed(){return _(B.current)},isExpanded(){return!_(B.current)},resize:W=>{H(B.current,W)}}),[x,y,w,_,q,H]);const J=C(B.current,o);return T.createElement(g,{...m,children:e,className:t,id:q,style:{...J,...v},[de.groupId]:P,[de.panel]:"",[de.panelCollapsible]:r||void 0,[de.panelId]:q,[de.panelSize]:parseFloat(""+J.flexGrow).toFixed(1)})}const Ra=T.forwardRef((e,t)=>T.createElement(Na,{...e,forwardedRef:t}));Na.displayName="Panel",Ra.displayName="forwardRef(Panel)";let Hr=null,An=-1,Ye=null;function ch(e,t){if(t){const n=(t&Da)!==0,r=(t&ja)!==0,o=(t&La)!==0,s=(t&za)!==0;if(n)return o?"se-resize":s?"ne-resize":"e-resize";if(r)return o?"sw-resize":s?"nw-resize":"w-resize";if(o)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function uh(){Ye!==null&&(document.head.removeChild(Ye),Hr=null,Ye=null,An=-1)}function Br(e,t){var n,r;const o=ch(e,t);if(Hr!==o){if(Hr=o,Ye===null&&(Ye=document.createElement("style"),document.head.appendChild(Ye)),An>=0){var s;(s=Ye.sheet)===null||s===void 0||s.removeRule(An)}An=(n=(r=Ye.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Ta(e){return e.type==="keydown"}function Aa(e){return e.type.startsWith("pointer")}function Ia(e){return e.type.startsWith("mouse")}function In(e){if(Aa(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Ia(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function dh(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function fh(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function ph(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ma(e),b:Ma(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;oe(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:ka(_a(n.a)),b:ka(_a(n.b))};if(o.a===o.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const mh=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function hh(e){var t;const n=getComputedStyle((t=Oa(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function gh(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||hh(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||mh.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function _a(e){let t=e.length;for(;t--;){const n=e[t];if(oe(n,"Missing node"),gh(n))return n}return null}function ka(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ma(e){const t=[];for(;e;)t.push(e),e=Oa(e);return t}function Oa(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Da=1,ja=2,La=4,za=8,vh=dh()==="coarse";let Ne=[],yt=!1,Xe=new Map,_n=new Map;const Wt=new Set;function bh(e,t,n,r,o){var s;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(s=Xe.get(i))!==null&&s!==void 0?s:0;return Xe.set(i,l+1),Wt.add(a),kn(),function(){var f;_n.delete(e),Wt.delete(a);const d=(f=Xe.get(i))!==null&&f!==void 0?f:1;if(Xe.set(i,d-1),kn(),d===1&&Xe.delete(i),Ne.includes(a)){const h=Ne.indexOf(a);h>=0&&Ne.splice(h,1),Kr(),o("up",!0,null)}}}function xh(e){const{target:t}=e,{x:n,y:r}=In(e);yt=!0,Ur({target:t,x:n,y:r}),kn(),Ne.length>0&&(Mn("down",e),e.preventDefault(),$a(t)||e.stopImmediatePropagation())}function Wr(e){const{x:t,y:n}=In(e);if(yt&&e.buttons===0&&(yt=!1,Mn("up",e)),!yt){const{target:r}=e;Ur({target:r,x:t,y:n})}Mn("move",e),Kr(),Ne.length>0&&e.preventDefault()}function Vr(e){const{target:t}=e,{x:n,y:r}=In(e);_n.clear(),yt=!1,Ne.length>0&&(e.preventDefault(),$a(t)||e.stopImmediatePropagation()),Mn("up",e),Ur({target:t,x:n,y:r}),Kr(),kn()}function $a(e){let t=e;for(;t;){if(t.hasAttribute(de.resizeHandle))return!0;t=t.parentElement}return!1}function Ur({target:e,x:t,y:n}){Ne.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Wt.forEach(o=>{const{element:s,hitAreaMargins:i}=o,a=s.getBoundingClientRect(),{bottom:l,left:u,right:f,top:d}=a,h=vh?i.coarse:i.fine;if(t>=u-h&&t<=f+h&&n>=d-h&&n<=l+h){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&ph(r,s)>0){let g=r,m=!1;for(;g&&!g.contains(s);){if(fh(g.getBoundingClientRect(),a)){m=!0;break}g=g.parentElement}if(m)return}Ne.push(o)}})}function Gr(e,t){_n.set(e,t)}function Kr(){let e=!1,t=!1;Ne.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;_n.forEach(r=>{n|=r}),e&&t?Br("intersection",n):e?Br("horizontal",n):t?Br("vertical",n):uh()}let Yr;function kn(){var e;(e=Yr)===null||e===void 0||e.abort(),Yr=new AbortController;const t={capture:!0,signal:Yr.signal};Wt.size&&(yt?(Ne.length>0&&Xe.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("contextmenu",Vr,t),o.addEventListener("pointerleave",Wr,t),o.addEventListener("pointermove",Wr,t))}),Xe.forEach((n,r)=>{const{body:o}=r;o.addEventListener("pointerup",Vr,t),o.addEventListener("pointercancel",Vr,t)})):Xe.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("pointerdown",xh,t),o.addEventListener("pointermove",Wr,t))}))}function Mn(e,t){Wt.forEach(n=>{const{setResizeHandlerState:r}=n,o=Ne.includes(n);r(e,o,t)})}function yh(){const[e,t]=T.useState(0);return T.useCallback(()=>t(n=>n+1),[])}function oe(e,t){if(!e)throw console.error(t),Error(t)}function rt(e,t,n=$r){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Le(e,t,n=$r){return rt(e,t,n)===0}function we(e,t,n){return rt(e,t,n)===0}function wh(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],s=t[r];if(!we(o,s,n))return!1}return!0}function wt({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];oe(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:i=100,minSize:a=0}=r;if(rt(n,a)<0)if(s){const l=(o+a)/2;rt(n,l)<0?n=o:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed($r)),n}function Vt({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(we(e,0))return t;const i=[...t],[a,l]=r;oe(a!=null,"Invalid first pivot index"),oe(l!=null,"Invalid second pivot index");let u=0;if(s==="keyboard"){{const d=e<0?l:a,h=n[d];oe(h,`Panel constraints not found for index ${d}`);const{collapsedSize:v=0,collapsible:g,minSize:m=0}=h;if(g){const b=t[d];if(oe(b!=null,`Previous layout not found for panel index ${d}`),we(b,v)){const x=m-b;rt(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const d=e<0?a:l,h=n[d];oe(h,`No panel constraints found for index ${d}`);const{collapsedSize:v=0,collapsible:g,minSize:m=0}=h;if(g){const b=t[d];if(oe(b!=null,`Previous layout not found for panel index ${d}`),we(b,m)){const x=b-v;rt(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}}{const d=e<0?1:-1;let h=e<0?l:a,v=0;for(;;){const m=t[h];oe(m!=null,`Previous layout not found for panel index ${h}`);const x=wt({panelConstraints:n,panelIndex:h,size:100})-m;if(v+=x,h+=d,h<0||h>=n.length)break}const g=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-g:g}{let h=e<0?a:l;for(;h>=0&&h<n.length;){const v=Math.abs(e)-Math.abs(u),g=t[h];oe(g!=null,`Previous layout not found for panel index ${h}`);const m=g-v,b=wt({panelConstraints:n,panelIndex:h,size:m});if(!we(g,b)&&(u+=g-b,i[h]=b,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(wh(o,i))return o;{const d=e<0?l:a,h=t[d];oe(h!=null,`Previous layout not found for panel index ${d}`);const v=h+u,g=wt({panelConstraints:n,panelIndex:d,size:v});if(i[d]=g,!we(g,v)){let m=v-g,x=e<0?l:a;for(;x>=0&&x<n.length;){const y=i[x];oe(y!=null,`Previous layout not found for panel index ${x}`);const w=y+m,C=wt({panelConstraints:n,panelIndex:x,size:w});if(we(y,C)||(m-=C-y,i[x]=C),we(m,0))break;e>0?x--:x++}}}const f=i.reduce((d,h)=>h+d,0);return we(f,100)?i:o}function Ch({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,s=0,i=0;const a=n[0];oe(a!=null,"No pivot index found"),t.forEach((d,h)=>{const{constraints:v}=d,{maxSize:g=100,minSize:m=0}=v;h===a?(r=m,o=g):(s+=m,i+=g)});const l=Math.min(o,100-s),u=Math.max(r,100-i),f=e[a];return{valueMax:l,valueMin:u,valueNow:f}}function Ut(e,t=document){return Array.from(t.querySelectorAll(`[${de.resizeHandleId}][data-panel-group-id="${e}"]`))}function Fa(e,t,n=document){const o=Ut(e,n).findIndex(s=>s.getAttribute(de.resizeHandleId)===t);return o??null}function Ha(e,t,n){const r=Fa(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function Sh(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Ba(e,t=document){if(Sh(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function On(e,t=document){const n=t.querySelector(`[${de.resizeHandleId}="${e}"]`);return n||null}function Eh(e,t,n,r=document){var o,s,i,a;const l=On(t,r),u=Ut(e,r),f=l?u.indexOf(l):-1,d=(o=(s=n[f])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,h=(i=(a=n[f+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[d,h]}function Ph({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:s,setLayout:i}){T.useRef({didWarnAboutMissingResizeHandle:!1}),nt(()=>{if(!s)return;const a=Ut(n,s);for(let l=0;l<o.length-1;l++){const{valueMax:u,valueMin:f,valueNow:d}=Ch({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),h=a[l];if(h!=null){const v=o[l];oe(v,`No panel data found for index "${l}"`),h.setAttribute("aria-controls",v.id),h.setAttribute("aria-valuemax",""+Math.round(u)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{a.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,s]),T.useEffect(()=>{if(!s)return;const a=t.current;oe(a,"Eager values not found");const{panelDataArray:l}=a,u=Ba(n,s);oe(u!=null,`No group found for id "${n}"`);const f=Ut(n,s);oe(f,`No resize handles found for group id "${n}"`);const d=f.map(h=>{const v=h.getAttribute(de.resizeHandleId);oe(v,"Resize handle element has no handle id attribute");const[g,m]=Eh(n,v,l,s);if(g==null||m==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=l.findIndex(w=>w.id===g);if(y>=0){const w=l[y];oe(w,`No panel data found for index ${y}`);const C=r[y],{collapsedSize:P=0,collapsible:_,minSize:E=0}=w.constraints;if(C!=null&&_){const R=Vt({delta:we(C,P)?E-P:P-C,initialLayout:r,panelConstraints:l.map(H=>H.constraints),pivotIndices:Ha(n,v,s),prevLayout:r,trigger:"keyboard"});r!==R&&i(R)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{d.forEach(h=>h())}},[s,e,t,n,r,o,i])}function Wa(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Va(e,t){const n=e==="horizontal",{x:r,y:o}=In(t);return n?r:o}function Nh(e,t,n,r,o){const s=n==="horizontal",i=On(t,o);oe(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(de.groupId);oe(a,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Va(n,e),f=Ba(a,o);oe(f,`No group element found for id "${a}"`);const d=f.getBoundingClientRect(),h=s?d.width:d.height;return(u-l)/h*100}function Rh(e,t,n,r,o,s){if(Ta(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:o!=null?a=o:a=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:a;break;case"ArrowLeft":l=i?-a:0;break;case"ArrowRight":l=i?a:0;break;case"ArrowUp":l=i?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Nh(e,t,n,r,s)}function Th({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,o=100;for(let s=0;s<e.length;s++){const i=n[s];oe(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;a!=null&&(r++,t[s]=a,o-=a)}for(let s=0;s<e.length;s++){const i=n[s];oe(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;if(a!=null)continue;const l=e.length-r,u=o/l;r++,t[s]=u,o-=u}return t}function Ct(e,t,n){t.forEach((r,o)=>{const s=e[o];oe(s,`Panel data not found for index ${o}`);const{callbacks:i,constraints:a,id:l}=s,{collapsedSize:u=0,collapsible:f}=a,d=n[l];if(d==null||r!==d){n[l]=r;const{onCollapse:h,onExpand:v,onResize:g}=i;g&&g(r,d),f&&(h||v)&&(v&&(d==null||Le(d,u))&&!Le(r,u)&&v(),h&&(d==null||!Le(d,u))&&Le(r,u)&&h())}})}function Dn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ah({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:s=3}){const i=n[o];let a;return i==null?a=e!=null?e.toPrecision(s):"1":r.length===1?a="1":a=i.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Ih(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Ua(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Ga(e){return`react-resizable-panels:${e}`}function Ka(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:s}=t;return o?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Ya(e,t){try{const n=Ga(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function _h(e,t,n){var r,o;const s=(r=Ya(e,n))!==null&&r!==void 0?r:{},i=Ka(t);return(o=s[i])!==null&&o!==void 0?o:null}function kh(e,t,n,r,o){var s;const i=Ga(e),a=Ka(t),l=(s=Ya(e,o))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(u){console.error(u)}}function Xa({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!we(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=100/r*i;n[s]=a}let o=0;for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=wt({panelConstraints:t,panelIndex:s,size:i});i!=a&&(o+=i-a,n[s]=a)}if(!we(o,0))for(let s=0;s<t.length;s++){const i=n[s];oe(i!=null,`No layout data found for index ${s}`);const a=i+o,l=wt({panelConstraints:t,panelIndex:s,size:a});if(i!==l&&(o-=l-i,n[s]=l,we(o,0)))break}return n}const Mh=100,Gt={getItem:e=>(Ua(Gt),Gt.getItem(e)),setItem:(e,t)=>{Ua(Gt),Gt.setItem(e,t)}},qa={};function Za({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:s=null,onLayout:i=null,keyboardResizeBy:a=null,storage:l=Gt,style:u,tagName:f="div",...d}){const h=Fr(s),v=T.useRef(null),[g,m]=T.useState(null),[b,x]=T.useState([]),y=yh(),w=T.useRef({}),C=T.useRef(new Map),P=T.useRef(0),_=T.useRef({autoSaveId:e,direction:r,dragState:g,id:h,keyboardResizeBy:a,onLayout:i,storage:l}),E=T.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});T.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),T.useImperativeHandle(o,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:I}=E.current;return I},setLayout:I=>{const{onLayout:M}=_.current,{layout:F,panelDataArray:D}=E.current,S=Xa({layout:I,panelConstraints:D.map(k=>k.constraints)});Wa(F,S)||(x(S),E.current.layout=S,M&&M(S),Ct(D,S,w.current))}}),[]),nt(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=g,_.current.id=h,_.current.onLayout=i,_.current.storage=l}),Ph({committedValuesRef:_,eagerValuesRef:E,groupId:h,layout:b,panelDataArray:E.current.panelDataArray,setLayout:x,panelGroupElement:v.current}),T.useEffect(()=>{const{panelDataArray:I}=E.current;if(e){if(b.length===0||b.length!==I.length)return;let M=qa[e];M==null&&(M=Ih(kh,Mh),qa[e]=M);const F=[...I],D=new Map(C.current);M(e,F,D,b,l)}},[e,b,l]),T.useEffect(()=>{});const R=T.useCallback(I=>{const{onLayout:M}=_.current,{layout:F,panelDataArray:D}=E.current;if(I.constraints.collapsible){const S=D.map(Q=>Q.constraints),{collapsedSize:k=0,panelSize:z,pivotIndices:L}=ot(D,I,F);if(oe(z!=null,`Panel size not found for panel "${I.id}"`),!Le(z,k)){C.current.set(I.id,z);const ne=St(D,I)===D.length-1?z-k:k-z,ee=Vt({delta:ne,initialLayout:F,panelConstraints:S,pivotIndices:L,prevLayout:F,trigger:"imperative-api"});Dn(F,ee)||(x(ee),E.current.layout=ee,M&&M(ee),Ct(D,ee,w.current))}}},[]),H=T.useCallback((I,M)=>{const{onLayout:F}=_.current,{layout:D,panelDataArray:S}=E.current;if(I.constraints.collapsible){const k=S.map(ae=>ae.constraints),{collapsedSize:z=0,panelSize:L=0,minSize:Q=0,pivotIndices:ne}=ot(S,I,D),ee=M??Q;if(Le(L,z)){const ae=C.current.get(I.id),me=ae!=null&&ae>=ee?ae:ee,ce=St(S,I)===S.length-1?L-me:me-L,ge=Vt({delta:ce,initialLayout:D,panelConstraints:k,pivotIndices:ne,prevLayout:D,trigger:"imperative-api"});Dn(D,ge)||(x(ge),E.current.layout=ge,F&&F(ge),Ct(S,ge,w.current))}}},[]),V=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{panelSize:D}=ot(F,I,M);return oe(D!=null,`Panel size not found for panel "${I.id}"`),D},[]),q=T.useCallback((I,M)=>{const{panelDataArray:F}=E.current,D=St(F,I);return Ah({defaultSize:M,dragState:g,layout:b,panelData:F,panelIndex:D})},[g,b]),B=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{collapsedSize:D=0,collapsible:S,panelSize:k}=ot(F,I,M);return oe(k!=null,`Panel size not found for panel "${I.id}"`),S===!0&&Le(k,D)},[]),J=T.useCallback(I=>{const{layout:M,panelDataArray:F}=E.current,{collapsedSize:D=0,collapsible:S,panelSize:k}=ot(F,I,M);return oe(k!=null,`Panel size not found for panel "${I.id}"`),!S||rt(k,D)>0},[]),W=T.useCallback(I=>{const{panelDataArray:M}=E.current;M.push(I),M.sort((F,D)=>{const S=F.order,k=D.order;return S==null&&k==null?0:S==null?-1:k==null?1:S-k}),E.current.panelDataArrayChanged=!0,y()},[y]);nt(()=>{if(E.current.panelDataArrayChanged){E.current.panelDataArrayChanged=!1;const{autoSaveId:I,onLayout:M,storage:F}=_.current,{layout:D,panelDataArray:S}=E.current;let k=null;if(I){const L=_h(I,S,F);L&&(C.current=new Map(Object.entries(L.expandToSizes)),k=L.layout)}k==null&&(k=Th({panelDataArray:S}));const z=Xa({layout:k,panelConstraints:S.map(L=>L.constraints)});Wa(D,z)||(x(z),E.current.layout=z,M&&M(z),Ct(S,z,w.current))}}),nt(()=>{const I=E.current;return()=>{I.layout=[]}},[]);const X=T.useCallback(I=>{let M=!1;const F=v.current;return F&&window.getComputedStyle(F,null).getPropertyValue("direction")==="rtl"&&(M=!0),function(S){S.preventDefault();const k=v.current;if(!k)return()=>null;const{direction:z,dragState:L,id:Q,keyboardResizeBy:ne,onLayout:ee}=_.current,{layout:ae,panelDataArray:me}=E.current,{initialLayout:le}=L??{},ce=Ha(Q,I,k);let ge=Rh(S,I,z,L,ne,k);const Nt=z==="horizontal";Nt&&M&&(ge=-ge);const qt=me.map(Bv=>Bv.constraints),lt=Vt({delta:ge,initialLayout:le??ae,panelConstraints:qt,pivotIndices:ce,prevLayout:ae,trigger:Ta(S)?"keyboard":"mouse-or-touch"}),nu=!Dn(ae,lt);(Aa(S)||Ia(S))&&P.current!=ge&&(P.current=ge,!nu&&ge!==0?Nt?Gr(I,ge<0?Da:ja):Gr(I,ge<0?La:za):Gr(I,0)),nu&&(x(lt),E.current.layout=lt,ee&&ee(lt),Ct(me,lt,w.current))}},[]),j=T.useCallback((I,M)=>{const{onLayout:F}=_.current,{layout:D,panelDataArray:S}=E.current,k=S.map(ae=>ae.constraints),{panelSize:z,pivotIndices:L}=ot(S,I,D);oe(z!=null,`Panel size not found for panel "${I.id}"`);const ne=St(S,I)===S.length-1?z-M:M-z,ee=Vt({delta:ne,initialLayout:D,panelConstraints:k,pivotIndices:L,prevLayout:D,trigger:"imperative-api"});Dn(D,ee)||(x(ee),E.current.layout=ee,F&&F(ee),Ct(S,ee,w.current))},[]),Z=T.useCallback((I,M)=>{const{layout:F,panelDataArray:D}=E.current,{collapsedSize:S=0,collapsible:k}=M,{collapsedSize:z=0,collapsible:L,maxSize:Q=100,minSize:ne=0}=I.constraints,{panelSize:ee}=ot(D,I,F);ee!=null&&(k&&L&&Le(ee,S)?Le(S,z)||j(I,z):ee<ne?j(I,ne):ee>Q&&j(I,Q))},[j]),A=T.useCallback((I,M)=>{const{direction:F}=_.current,{layout:D}=E.current;if(!v.current)return;const S=On(I,v.current);oe(S,`Drag handle element not found for id "${I}"`);const k=Va(F,M);m({dragHandleId:I,dragHandleRect:S.getBoundingClientRect(),initialCursorPosition:k,initialLayout:D})},[]),O=T.useCallback(()=>{m(null)},[]),N=T.useCallback(I=>{const{panelDataArray:M}=E.current,F=St(M,I);F>=0&&(M.splice(F,1),delete w.current[I.id],E.current.panelDataArrayChanged=!0,y())},[y]),$=T.useMemo(()=>({collapsePanel:R,direction:r,dragState:g,expandPanel:H,getPanelSize:V,getPanelStyle:q,groupId:h,isPanelCollapsed:B,isPanelExpanded:J,reevaluatePanelConstraints:Z,registerPanel:W,registerResizeHandle:X,resizePanel:j,startDragging:A,stopDragging:O,unregisterPanel:N,panelGroupElement:v.current}),[R,g,r,H,V,q,h,B,J,Z,W,X,j,A,O,N]),re={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return T.createElement(Tn.Provider,{value:$},T.createElement(f,{...d,children:t,className:n,id:s,ref:v,style:{...re,...u},[de.group]:"",[de.groupDirection]:r,[de.groupId]:h}))}const Ja=T.forwardRef((e,t)=>T.createElement(Za,{...e,forwardedRef:t}));Za.displayName="PanelGroup",Ja.displayName="forwardRef(PanelGroup)";function St(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ot(e,t,n){const r=St(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Oh({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){T.useEffect(()=>{if(e||n==null||r==null)return;const o=On(t,r);if(o==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=o.getAttribute(de.groupId);oe(a,`No group element found for id "${a}"`);const l=Ut(a,r),u=Fa(a,t,r);oe(u!==null,`No resize element found for id "${t}"`);const f=i.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[f].focus();break}}};return o.addEventListener("keydown",s),()=>{o.removeEventListener("keydown",s)}},[r,e,t,n])}function Qa({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:s,onClick:i,onDragging:a,onFocus:l,onPointerDown:u,onPointerUp:f,style:d={},tabIndex:h=0,tagName:v="div",...g}){var m,b;const x=T.useRef(null),y=T.useRef({onClick:i,onDragging:a,onPointerDown:u,onPointerUp:f});T.useEffect(()=>{y.current.onClick=i,y.current.onDragging=a,y.current.onPointerDown=u,y.current.onPointerUp=f});const w=T.useContext(Tn);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:P,registerResizeHandle:_,startDragging:E,stopDragging:R,panelGroupElement:H}=w,V=Fr(o),[q,B]=T.useState("inactive"),[J,W]=T.useState(!1),[X,j]=T.useState(null),Z=T.useRef({state:q});nt(()=>{Z.current.state=q}),T.useEffect(()=>{if(n)j(null);else{const $=_(V);j(()=>$)}},[n,V,_]);const A=(m=r?.coarse)!==null&&m!==void 0?m:15,O=(b=r?.fine)!==null&&b!==void 0?b:5;T.useEffect(()=>{if(n||X==null)return;const $=x.current;oe($,"Element ref not attached");let re=!1;return bh(V,$,C,{coarse:A,fine:O},(M,F,D)=>{if(!F){B("inactive");return}switch(M){case"down":{B("drag"),re=!1,oe(D,'Expected event to be defined for "down" action'),E(V,D);const{onDragging:S,onPointerDown:k}=y.current;S?.(!0),k?.();break}case"move":{const{state:S}=Z.current;re=!0,S!=="drag"&&B("hover"),oe(D,'Expected event to be defined for "move" action'),X(D);break}case"up":{B("hover"),R();const{onClick:S,onDragging:k,onPointerUp:z}=y.current;k?.(!1),z?.(),re||S?.();break}}})},[A,C,n,O,_,V,X,E,R]),Oh({disabled:n,handleId:V,resizeHandler:X,panelGroupElement:H});const N={touchAction:"none",userSelect:"none"};return T.createElement(v,{...g,children:e,className:t,id:o,onBlur:()=>{W(!1),s?.()},onFocus:()=>{W(!0),l?.()},ref:x,role:"separator",style:{...N,...d},tabIndex:h,[de.groupDirection]:C,[de.groupId]:P,[de.resizeHandle]:"",[de.resizeHandleActive]:q==="drag"?"pointer":J?"keyboard":void 0,[de.resizeHandleEnabled]:!n,[de.resizeHandleId]:V,[de.resizeHandleState]:q})}Qa.displayName="PanelResizeHandle";const Xr=T.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,className:te("relative border border-border text-foreground rounded-lg overflow-hidden flex flex-col h-full",e),...n,children:t}));Xr.displayName="Container";const Dh=It("isolate w-full bg-card flex min-h-10 items-center",{variants:{variant:{default:"px-5 py-2 items-center",tabs:"p-0"}},defaultVariants:{variant:"default"}}),qr=T.forwardRef(({className:e,variant:t,children:n,...r},o)=>p.jsxs("div",{ref:o,className:te(Dh({variant:t,className:e})),...r,children:[p.jsx(Gn,{}),n]}));qr.displayName="ContainerHeader";const Zr=T.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:te("flex-1 overflow-auto bg-default border-border border-t",e),...t}));Zr.displayName="ContainerContent";var jn="Tabs",[jh]=Se(jn,[mn]),el=mn(),[Lh,Jr]=jh(jn),tl=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,f=nn(a),[d,h]=Fe({prop:r,onChange:o,defaultProp:s??"",caller:jn});return p.jsx(Lh,{scope:n,baseId:Te(),value:d,onValueChange:h,orientation:i,dir:f,activationMode:l,children:p.jsx(ue.div,{dir:f,"data-orientation":i,...u,ref:t})})});tl.displayName=jn;var nl="TabsList",rl=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Jr(nl,n),i=el(n);return p.jsx(ri,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(ue.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});rl.displayName=nl;var ol="TabsTrigger",sl=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Jr(ol,n),a=el(n),l=ll(i.baseId,r),u=cl(i.baseId,r),f=r===i.value;return p.jsx(oi,{asChild:!0,...a,focusable:!o,active:f,children:p.jsx(ue.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:Y(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:Y(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{const d=i.activationMode!=="manual";!f&&!o&&d&&i.onValueChange(r)})})})});sl.displayName=ol;var il="TabsContent",al=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=Jr(il,n),l=ll(a.baseId,r),u=cl(a.baseId,r),f=r===a.value,d=c.useRef(f);return c.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Ue,{present:o||f,children:({present:h})=>p.jsx(ue.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&s})})});al.displayName=il;function ll(e,t){return`${e}-trigger-${t}`}function cl(e,t){return`${e}-content-${t}`}var zh=tl,$h=rl,Fh=sl,Hh=al;const Ln=({className:e,...t})=>p.jsx(zh,{"data-slot":"tabs",className:te("flex flex-col h-full",e),...t});Ln.displayName="Tabs";const Qr=({className:e,...t})=>p.jsx($h,{"data-slot":"tabs-list",className:te("inline-flex rounded-none bg-transparent p-0 min-h-10",e),...t});Qr.displayName="TabsList";const eo=({className:e,...t})=>p.jsx(Fh,{"data-slot":"tabs-trigger",className:te("inline-flex items-center justify-center whitespace-nowrap rounded-none px-4 py-2 text-sm font-medium text-muted-foreground ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 relative data-[state=active]:after:absolute data-[state=active]:after:bottom-0 data-[state=active]:after:left-1/2 data-[state=active]:after:-translate-x-1/2 data-[state=active]:after:h-0.5 data-[state=active]:after:w-[calc(100%-2.5rem)] data-[state=active]:after:bg-foreground data-[state=active]:after:rounded-full",e),...t});eo.displayName="TabsTrigger";const to=({className:e,...t})=>p.jsx(Hh,{"data-slot":"tabs-content",className:te("flex-1 outline-none text-foreground",e),...t});to.displayName="TabsContent";const Bh=({header:e,isCollapsed:t,onToggle:n,variant:r="default"})=>p.jsxs(qr,{variant:r,children:[e,p.jsx("div",{className:"flex-1"}),n&&p.jsx(Oe,{variant:"default",onClick:n,"aria-label":t?"Expand panel":"Collapse panel",className:te("h-8 px-3 [&_svg]:size-5",{"mr-5":r==="tabs"}),children:p.jsx(er,{className:te("transition-transform",{"-rotate-180":!t})})})]}),Wh=()=>p.jsx("div",{className:"relative",children:p.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:p.jsx(Qa,{className:"group relative",children:p.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border",children:p.jsx(Yo,{className:"h-4 w-4 text-muted-foreground"})})})})}),Vh=({id:e,header:t,children:n,withResizeHandle:r,className:o,variant:s,defaultTab:i,onTabChange:a})=>{const[l,u]=T.useState(!1),f=T.useRef(null),d=T.useCallback(()=>{const m=f.current;if(m)try{m.isCollapsed()?m.expand():m.collapse()}catch(b){console.warn("Failed to toggle panel:",b)}},[]),h=T.useCallback(()=>u(!0),[]),v=T.useCallback(()=>u(!1),[]),g=T.useMemo(()=>{const m=p.jsxs(Xr,{className:"h-full",children:[p.jsx(Bh,{header:t,isCollapsed:l,variant:s,onToggle:d}),p.jsx(Zr,{children:n})]});return s=="tabs"?p.jsx(Ln,{className:"h-full",defaultValue:i,onValueChange:a,children:m}):m},[s,l,t,n,i,d,a]);return p.jsxs(p.Fragment,{children:[p.jsx(Ra,{id:e,collapsible:!0,ref:f,className:te("min-h-[42px]",o),onCollapse:h,onExpand:v,children:g}),r&&p.jsx(Wh,{})]})},Uh=({children:e,...t})=>{const[n,r]=T.useState(0);return p.jsx(Ja,{onLayout:o=>{r(o.length)},...t,children:T.Children.map(e,(o,s)=>{if(T.isValidElement(o)){const i=n-1===s,a=n>1;return T.cloneElement(o,{withResizeHandle:a&&!i})}return o})})},Gh=It(te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","field-sizing-content","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]"),{variants:{variant:{default:"bg-input border border-border hover:border-border focus-visible:border-ring text-foreground placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/20",shade:"bg-muted-foreground/10 text-muted-foreground hover:bg-muted-foreground/12 focus:bg-muted-foreground/15",outline:"focus-visible:border-border focus-visible:bg-card hover:border-border hover:bg-card bg-transparent text-foreground border border-transparent",outlineReadonly:"bg-transparent text-foreground border border-transparent"}},defaultVariants:{variant:"default"}}),ul=T.forwardRef(({className:e,type:t,variant:n,...r},o)=>p.jsx("input",{type:t,className:Gh({variant:n,className:e}),ref:o,...r}));ul.displayName="Input";var Kh="Label",dl=c.forwardRef((e,t)=>p.jsx(ue.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));dl.displayName=Kh;var fl=dl;const pl=({className:e,...t})=>p.jsx(fl,{"data-slot":"label",className:te("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t});pl.displayName=fl.displayName;const Yh=It("text-xs font-medium tracking-wide rounded-full h-[6px] w-[6px] m-[4px] outline-[2px]",{variants:{variant:{info:"bg-[#2862FE] outline-[#2862FE]/20",trace:"bg-[#2862FE] outline-[#2862FE]/20",debug:"bg-[#2862FE] outline-[#2862FE]/20",error:"bg-[#E22A6D] outline-[#E22A6D]/20",fatal:"bg-[#E22A6D] outline-[#E22A6D]/20",warn:"bg-[#F59F0B] outline-[#F59F0B]/20"}}}),Xh=({level:e})=>p.jsx("div",{className:Yh({variant:e})}),qh={default:"bg-transparent border border-border",outlined:"bg-transparent border border-border",filled:"bg-muted border border-transparent",ghost:"bg-transparent border-transparent shadow-none"},ml=({label:e,value:t,highlighted:n})=>p.jsxs("div",{className:"flex gap-4 items-start",children:[p.jsx("div",{className:"flex items-center h-8 shrink-0",children:p.jsx("span",{className:"text-sm font-medium text-foreground tracking-[-0.25px] w-24 truncate",children:e})}),p.jsx("div",{className:te("flex-1 rounded-lg px-2 py-1 min-h-6",n&&"bg-secondary"),children:p.jsx("div",{className:"flex items-center min-h-6",children:typeof t=="string"?p.jsx("span",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t}):t})})]}),no=({"data-testid":e,title:t,subtitle:n,details:r,actions:o,className:s,children:i,size:a,variant:l="default",contentClassName:u,tabs:f})=>{const d=f&&f.length>0,h=T.useMemo(()=>{const v=p.jsxs(p.Fragment,{children:[d&&p.jsx(Qr,{className:te("bg-card border-b border-border px-1 pt-5",{"bg-transparent":l==="ghost"}),children:f?.map(g=>p.jsx(eo,{value:g.label,"data-testid":g["data-testid"],className:"cursor-pointer",children:g.labelComponent||g.label},g.label))}),p.jsxs("div",{className:te("flex flex-col gap-2 p-4 h-full",u),children:[r?.map((g,m)=>p.jsx(ml,{...g},m)),d&&f.map(g=>p.jsx(to,{value:g.label,children:g.content},g.label)),i]})]});return d?p.jsx(Ln,{defaultValue:f?.[0]?.label,children:v}):v},[f,l,a,t,n,r,o,u,i,d]);return p.jsxs("div",{className:te("relative isolate size-full backdrop-blur-[48px] backdrop-filter","text-foreground","rounded-lg overflow-hidden",qh[l],s),"data-testid":e,children:[p.jsx(Gn,{}),p.jsxs("div",{className:"flex flex-col size-full",children:[p.jsx("div",{className:te("relative shrink-0 w-full border-b border-border bg-card",{"bg-transparent":l==="ghost","border-b-0":d}),children:t&&p.jsxs("div",{className:te("flex flex-col gap-1 px-5 py-4",{"px-4 py-3":a==="sm","px-5 py-4":a==="md","pb-0":d}),children:[p.jsxs("div",{className:"flex items-center w-full",children:[p.jsx("div",{className:te("font-semibold text-foreground tracking-[-0.25px] leading-tight flex-1",a==="sm"?"text-xs":"text-base"),children:t}),o&&o.length>0&&p.jsx("div",{className:"flex items-center gap-1",children:o.map((v,g)=>p.jsx(Oe,{onClick:v.onClick,variant:"ghost",className:te(v.active&&"bg-muted-foreground/20 hover:bg-muted-foreground/30"),size:"icon","aria-label":v.label,"data-testid":"close-panel",children:v.icon},g))})]}),n&&p.jsx("p",{className:"text-sm font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:n})]})}),p.jsx("div",{className:"flex-1 overflow-auto",children:h})]})]})};no.displayName="Panel";function hl(e,[t,n]){return Math.min(n,Math.max(t,e))}function zn(e){const t=Zh(e),n=c.forwardRef((r,o)=>{const{children:s,...i}=r,a=c.Children.toArray(s),l=a.find(Qh);if(l){const u=l.props.children,f=a.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Zh(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n,i=c.isValidElement(o)?tg(o):void 0,a=ie(i,r);if(c.isValidElement(o)){const l=eg(s,o.props);return o.type!==c.Fragment&&(l.ref=a),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gl=Symbol("radix.slottable");function Jh(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=gl,t}function Qh(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gl}function eg(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]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function tg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ng(e){const t=e+"CollectionProvider",[n,r]=Se(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:x}=m,y=T.useRef(null),w=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=zn(a),u=T.forwardRef((m,b)=>{const{scope:x,children:y}=m,w=s(a,x),C=ie(b,w.collectionRef);return p.jsx(l,{ref:C,children:y})});u.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=zn(f),v=T.forwardRef((m,b)=>{const{scope:x,children:y,...w}=m,C=T.useRef(null),P=ie(b,C),_=s(f,x);return T.useEffect(()=>(_.itemMap.set(C,{ref:C,...w}),()=>void _.itemMap.delete(C))),p.jsx(h,{[d]:"",ref:P,children:y})});v.displayName=f;function g(m){const b=s(e+"CollectionConsumer",m);return T.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((_,E)=>w.indexOf(_.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:v},g,r]}var rg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fe=rg.reduce((e,t)=>{const n=zn(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function og(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}var sg="DismissableLayer",ro="dismissableLayer.update",ig="dismissableLayer.pointerDownOutside",ag="dismissableLayer.focusOutside",vl,bl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oo=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(bl),[f,d]=c.useState(null),h=f?.ownerDocument??globalThis?.document,[,v]=c.useState({}),g=ie(t,E=>d(E)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(b),y=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,P=ug(E=>{const R=E.target,H=[...u.branches].some(V=>V.contains(R));!C||H||(o?.(E),i?.(E),E.defaultPrevented||a?.())},h),_=dg(E=>{const R=E.target;[...u.branches].some(V=>V.contains(R))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},h);return Jo(E=>{y===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(vl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),xl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=vl)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),xl())},[f,u]),c.useEffect(()=>{const E=()=>v({});return document.addEventListener(ro,E),()=>document.removeEventListener(ro,E)},[]),p.jsx(fe.div,{...l,ref:g,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,P.onPointerDownCapture)})});oo.displayName=sg;var lg="DismissableLayerBranch",cg=c.forwardRef((e,t)=>{const n=c.useContext(bl),r=c.useRef(null),o=ie(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(fe.div,{...e,ref:o})});cg.displayName=lg;function ug(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){yl(ig,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dg(e,t=globalThis?.document){const n=ve(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&yl(ag,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 xl(){const e=new CustomEvent(ro);document.dispatchEvent(e)}function yl(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?og(o,s):o.dispatchEvent(s)}var so="focusScope.autoFocusOnMount",io="focusScope.autoFocusOnUnmount",wl={bubbles:!1,cancelable:!0},fg="FocusScope",Cl=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=ve(o),f=ve(s),d=c.useRef(null),h=ie(t,m=>l(m)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(w){if(v.paused||!a)return;const C=w.target;a.contains(C)?d.current=C:qe(d.current,{select:!0})},b=function(w){if(v.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||qe(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&qe(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,v.paused]),c.useEffect(()=>{if(a){Pl.add(v);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(so,wl);a.addEventListener(so,u),a.dispatchEvent(x),x.defaultPrevented||(pg(bg(Sl(a)),{select:!0}),document.activeElement===m&&qe(a))}return()=>{a.removeEventListener(so,u),setTimeout(()=>{const x=new CustomEvent(io,wl);a.addEventListener(io,f),a.dispatchEvent(x),x.defaultPrevented||qe(m??document.body,{select:!0}),a.removeEventListener(io,f),Pl.remove(v)},0)}}},[a,u,f,v]);const g=c.useCallback(m=>{if(!n&&!r||v.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(b&&x){const y=m.currentTarget,[w,C]=mg(y);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&qe(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&qe(C,{select:!0})):x===y&&m.preventDefault()}},[n,r,v.paused]);return p.jsx(fe.div,{tabIndex:-1,...i,ref:h,onKeyDown:g})});Cl.displayName=fg;function pg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==n)return}function mg(e){const t=Sl(e),n=El(t,e),r=El(t.reverse(),e);return[n,r]}function Sl(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 El(e,t){for(const n of e)if(!hg(n,{upTo:t}))return n}function hg(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 gg(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gg(e)&&t&&e.select()}}var Pl=vg();function vg(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nl(e,t),e.unshift(t)},remove(t){e=Nl(e,t),e[0]?.resume()}}}function Nl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bg(e){return e.filter(t=>t.tagName!=="A")}var xg="Arrow",Rl=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(fe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rl.displayName=xg;var yg=Rl,ao="Popper",[Tl,$n]=Se(ao),[wg,Al]=Tl(ao),Il=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return p.jsx(wg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Il.displayName=ao;var _l="PopperAnchor",kl=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Al(_l,n),i=c.useRef(null),a=ie(t,i);return c.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:p.jsx(fe.div,{...o,ref:a})});kl.displayName=_l;var lo="PopperContent",[Cg,Sg]=Tl(lo),Ml=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,b=Al(lo,n),[x,y]=c.useState(null),w=ie(t,S=>y(S)),[C,P]=c.useState(null),_=vr(C),E=_?.width??0,R=_?.height??0,H=r+(s!=="center"?"-"+s:""),V=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(u)?u:[u],B=q.length>0,J={padding:V,boundary:q.filter(Pg),altBoundary:B},{refs:W,floatingStyles:X,placement:j,isPositioned:Z,middlewareData:A}=_s({strategy:"fixed",placement:H,whileElementsMounted:(...S)=>Rs(...S,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[ks({mainAxis:o+R,alignmentAxis:i}),l&&Ms({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Os():void 0,...J}),l&&Ds({...J}),js({...J,apply:({elements:S,rects:k,availableWidth:z,availableHeight:L})=>{const{width:Q,height:ne}=k.reference,ee=S.floating.style;ee.setProperty("--radix-popper-available-width",`${z}px`),ee.setProperty("--radix-popper-available-height",`${L}px`),ee.setProperty("--radix-popper-anchor-width",`${Q}px`),ee.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),C&&zs({element:C,padding:a}),Ng({arrowWidth:E,arrowHeight:R}),h&&Ls({strategy:"referenceHidden",...J})]}),[O,N]=jl(j),$=ve(g);pe(()=>{Z&&$?.()},[Z,$]);const re=A.arrow?.x,I=A.arrow?.y,M=A.arrow?.centerOffset!==0,[F,D]=c.useState();return pe(()=>{x&&D(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Cg,{scope:n,placedSide:O,onArrowChange:P,arrowX:re,arrowY:I,shouldHideArrow:M,children:p.jsx(fe.div,{"data-side":O,"data-align":N,...m,ref:w,style:{...m.style,animation:Z?void 0:"none"}})})})});Ml.displayName=lo;var Ol="PopperArrow",Eg={top:"bottom",right:"left",bottom:"top",left:"right"},Dl=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Sg(Ol,r),i=Eg[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:p.jsx(yg,{...o,ref:n,style:{...o.style,display:"block"}})})});Dl.displayName=Ol;function Pg(e){return e!==null}var Ng=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=jl(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,v=(o.arrow?.y??0)+l/2;let g="",m="";return u==="bottom"?(g=i?d:`${h}px`,m=`${-l}px`):u==="top"?(g=i?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=i?d:`${v}px`),{data:{x:g,y:m}}}});function jl(e){const[t,n="center"]=e.split("-");return[t,n]}var Ll=Il,zl=kl,$l=Ml,Fl=Dl,Rg="Portal",co=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Zt.createPortal(p.jsx(fe.div,{...r,ref:t}),i):null});co.displayName=Rg;var Hl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Tg="VisuallyHidden",Bl=c.forwardRef((e,t)=>p.jsx(fe.span,{...e,ref:t,style:{...Hl,...e.style}}));Bl.displayName=Tg;var Ag=Bl,Ig=[" ","Enter","ArrowUp","ArrowDown"],_g=[" ","Enter"],st="Select",[Fn,Hn,kg]=ng(st),[Et]=Se(st,[kg,$n]),Bn=$n(),[Mg,Ze]=Et(st),[Og,Dg]=Et(st),Wl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:h,required:v,form:g}=e,m=Bn(t),[b,x]=c.useState(null),[y,w]=c.useState(null),[C,P]=c.useState(!1),_=nn(u),[E,R]=Fe({prop:r,defaultProp:o??!1,onChange:s,caller:st}),[H,V]=Fe({prop:i,defaultProp:a,onChange:l,caller:st}),q=c.useRef(null),B=b?g||!!b.closest("form"):!0,[J,W]=c.useState(new Set),X=Array.from(J).map(j=>j.props.value).join(";");return p.jsx(Ll,{...m,children:p.jsxs(Mg,{required:v,scope:t,trigger:b,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:P,contentId:Te(),value:H,onValueChange:V,open:E,onOpenChange:R,dir:_,triggerPointerDownPosRef:q,disabled:h,children:[p.jsx(Fn.Provider,{scope:t,children:p.jsx(Og,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(j=>{W(Z=>new Set(Z).add(j))},[]),onNativeOptionRemove:c.useCallback(j=>{W(Z=>{const A=new Set(Z);return A.delete(j),A})},[]),children:n})}),B?p.jsxs(pc,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:d,value:H,onChange:j=>V(j.target.value),disabled:h,form:g,children:[H===void 0?p.jsx("option",{value:""}):null,Array.from(J)]},X):null]})})};Wl.displayName=st;var Vl="SelectTrigger",Ul=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Bn(n),i=Ze(Vl,n),a=i.disabled||r,l=ie(t,i.onTriggerChange),u=Hn(n),f=c.useRef("touch"),[d,h,v]=hc(m=>{const b=u().filter(w=>!w.disabled),x=b.find(w=>w.value===i.value),y=gc(b,m,x);y!==void 0&&i.onValueChange(y.value)}),g=m=>{a||(i.onOpenChange(!0),v()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(zl,{asChild:!0,...s,children:p.jsx(fe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":mc(i.value)?"":void 0,...o,ref:l,onClick:Y(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&g(m)}),onPointerDown:Y(o.onPointerDown,m=>{f.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:Y(o.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&Ig.includes(m.key)&&(g(),m.preventDefault())})})})});Ul.displayName=Vl;var Gl="SelectValue",Kl=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=Ze(Gl,n),{onValueNodeHasChildrenChange:u}=l,f=s!==void 0,d=ie(t,l.onValueNodeChange);return pe(()=>{u(f)},[u,f]),p.jsx(fe.span,{...a,ref:d,style:{pointerEvents:"none"},children:mc(l.value)?p.jsx(p.Fragment,{children:i}):s})});Kl.displayName=Gl;var jg="SelectIcon",Yl=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(fe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Yl.displayName=jg;var Lg="SelectPortal",Xl=e=>p.jsx(co,{asChild:!0,...e});Xl.displayName=Lg;var it="SelectContent",ql=c.forwardRef((e,t)=>{const n=Ze(it,e.__scopeSelect),[r,o]=c.useState();if(pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Rt.createPortal(p.jsx(Zl,{scope:e.__scopeSelect,children:p.jsx(Fn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Jl,{...e,ref:t})});ql.displayName=it;var Re=10,[Zl,Je]=Et(it),zg="SelectContentImpl",$g=zn("SelectContent.RemoveScroll"),Jl=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b,...x}=e,y=Ze(it,n),[w,C]=c.useState(null),[P,_]=c.useState(null),E=ie(t,S=>C(S)),[R,H]=c.useState(null),[V,q]=c.useState(null),B=Hn(n),[J,W]=c.useState(!1),X=c.useRef(!1);c.useEffect(()=>{if(w)return ii(w)},[w]),os();const j=c.useCallback(S=>{const[k,...z]=B().map(ne=>ne.ref.current),[L]=z.slice(-1),Q=document.activeElement;for(const ne of S)if(ne===Q||(ne?.scrollIntoView({block:"nearest"}),ne===k&&P&&(P.scrollTop=0),ne===L&&P&&(P.scrollTop=P.scrollHeight),ne?.focus(),document.activeElement!==Q))return},[B,P]),Z=c.useCallback(()=>j([R,w]),[j,R,w]);c.useEffect(()=>{J&&Z()},[J,Z]);const{onOpenChange:A,triggerPointerDownPosRef:O}=y;c.useEffect(()=>{if(w){let S={x:0,y:0};const k=L=>{S={x:Math.abs(Math.round(L.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(L.pageY)-(O.current?.y??0))}},z=L=>{S.x<=10&&S.y<=10?L.preventDefault():w.contains(L.target)||A(!1),document.removeEventListener("pointermove",k),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",z,{capture:!0})}}},[w,A,O]),c.useEffect(()=>{const S=()=>A(!1);return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[A]);const[N,$]=hc(S=>{const k=B().filter(Q=>!Q.disabled),z=k.find(Q=>Q.ref.current===document.activeElement),L=gc(k,S,z);L&&setTimeout(()=>L.ref.current.focus())}),re=c.useCallback((S,k,z)=>{const L=!X.current&&!z;(y.value!==void 0&&y.value===k||L)&&(H(S),L&&(X.current=!0))},[y.value]),I=c.useCallback(()=>w?.focus(),[w]),M=c.useCallback((S,k,z)=>{const L=!X.current&&!z;(y.value!==void 0&&y.value===k||L)&&q(S)},[y.value]),F=r==="popper"?uo:Ql,D=F===uo?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return p.jsx(Zl,{scope:n,content:w,viewport:P,onViewportChange:_,itemRefCallback:re,selectedItem:R,onItemLeave:I,itemTextRefCallback:M,focusSelectedItem:Z,selectedItemText:V,position:r,isPositioned:J,searchRef:N,children:p.jsx(Rr,{as:$g,allowPinchZoom:!0,children:p.jsx(Cl,{asChild:!0,trapped:y.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:Y(o,S=>{y.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:p.jsx(oo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsx(F,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:S=>S.preventDefault(),...x,...D,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Y(x.onKeyDown,S=>{const k=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!k&&S.key.length===1&&$(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let L=B().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(S.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const Q=S.target,ne=L.indexOf(Q);L=L.slice(ne+1)}setTimeout(()=>j(L)),S.preventDefault()}})})})})})})});Jl.displayName=zg;var Fg="SelectItemAlignedPosition",Ql=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ze(it,n),i=Je(it,n),[a,l]=c.useState(null),[u,f]=c.useState(null),d=ie(t,E=>f(E)),h=Hn(n),v=c.useRef(!1),g=c.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:x,focusSelectedItem:y}=i,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&b&&x){const E=s.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),V=x.getBoundingClientRect();if(s.dir!=="rtl"){const Q=V.left-R.left,ne=H.left-Q,ee=E.left-ne,ae=E.width+ee,me=Math.max(ae,R.width),le=window.innerWidth-Re,ce=hl(ne,[Re,Math.max(Re,le-me)]);a.style.minWidth=ae+"px",a.style.left=ce+"px"}else{const Q=R.right-V.right,ne=window.innerWidth-H.right-Q,ee=window.innerWidth-E.right-ne,ae=E.width+ee,me=Math.max(ae,R.width),le=window.innerWidth-Re,ce=hl(ne,[Re,Math.max(Re,le-me)]);a.style.minWidth=ae+"px",a.style.right=ce+"px"}const q=h(),B=window.innerHeight-Re*2,J=m.scrollHeight,W=window.getComputedStyle(u),X=parseInt(W.borderTopWidth,10),j=parseInt(W.paddingTop,10),Z=parseInt(W.borderBottomWidth,10),A=parseInt(W.paddingBottom,10),O=X+j+J+A+Z,N=Math.min(b.offsetHeight*5,O),$=window.getComputedStyle(m),re=parseInt($.paddingTop,10),I=parseInt($.paddingBottom,10),M=E.top+E.height/2-Re,F=B-M,D=b.offsetHeight/2,S=b.offsetTop+D,k=X+j+S,z=O-k;if(k<=M){const Q=q.length>0&&b===q[q.length-1].ref.current;a.style.bottom="0px";const ne=u.clientHeight-m.offsetTop-m.offsetHeight,ee=Math.max(F,D+(Q?I:0)+ne+Z),ae=k+ee;a.style.height=ae+"px"}else{const Q=q.length>0&&b===q[0].ref.current;a.style.top="0px";const ee=Math.max(M,X+m.offsetTop+(Q?re:0)+D)+z;a.style.height=ee+"px",m.scrollTop=k-M+m.offsetTop}a.style.margin=`${Re}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,a,u,m,b,x,s.dir,r]);pe(()=>w(),[w]);const[C,P]=c.useState();pe(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const _=c.useCallback(E=>{E&&g.current===!0&&(w(),y?.(),g.current=!1)},[w,y]);return p.jsx(Bg,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:_,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(fe.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ql.displayName=Fg;var Hg="SelectPopperPosition",uo=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...s}=e,i=Bn(n);return p.jsx($l,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});uo.displayName=Hg;var[Bg,fo]=Et(it,{}),po="SelectViewport",ec=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Je(po,n),i=fo(po,n),a=ie(t,s.onViewportChange),l=c.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Fn.Slot,{scope:n,children:p.jsx(fe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Y(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h?.current&&d){const v=Math.abs(l.current-f.scrollTop);if(v>0){const g=window.innerHeight-Re*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),x=Math.max(m,b);if(x<g){const y=x+v,w=Math.min(g,y),C=y-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});ec.displayName=po;var tc="SelectGroup",[Wg,Vg]=Et(tc),Ug=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Te();return p.jsx(Wg,{scope:n,id:o,children:p.jsx(fe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ug.displayName=tc;var nc="SelectLabel",rc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Vg(nc,n);return p.jsx(fe.div,{id:o.id,...r,ref:t})});rc.displayName=nc;var Wn="SelectItem",[Gg,oc]=Et(Wn),sc=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ze(Wn,n),l=Je(Wn,n),u=a.value===r,[f,d]=c.useState(s??""),[h,v]=c.useState(!1),g=ie(t,y=>l.itemRefCallback?.(y,r,o)),m=Te(),b=c.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Gg,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:c.useCallback(y=>{d(w=>w||(y?.textContent??"").trim())},[]),children:p.jsx(Fn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:p.jsx(fe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:Y(i.onFocus,()=>v(!0)),onBlur:Y(i.onBlur,()=>v(!1)),onClick:Y(i.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:Y(i.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:Y(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Y(i.onPointerMove,y=>{b.current=y.pointerType,o?l.onItemLeave?.():b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Y(i.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(_g.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});sc.displayName=Wn;var Kt="SelectItemText",ic=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ze(Kt,n),a=Je(Kt,n),l=oc(Kt,n),u=Dg(Kt,n),[f,d]=c.useState(null),h=ie(t,x=>d(x),l.onItemTextChange,x=>a.itemTextRefCallback?.(x,l.value,l.disabled)),v=f?.textContent,g=c.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=u;return pe(()=>(m(g),()=>b(g)),[m,b,g]),p.jsxs(p.Fragment,{children:[p.jsx(fe.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Rt.createPortal(s.children,i.valueNode):null]})});ic.displayName=Kt;var ac="SelectItemIndicator",lc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return oc(ac,n).isSelected?p.jsx(fe.span,{"aria-hidden":!0,...r,ref:t}):null});lc.displayName=ac;var mo="SelectScrollUpButton",cc=c.forwardRef((e,t)=>{const n=Je(mo,e.__scopeSelect),r=fo(mo,e.__scopeSelect),[o,s]=c.useState(!1),i=ie(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(dc,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});cc.displayName=mo;var ho="SelectScrollDownButton",uc=c.forwardRef((e,t)=>{const n=Je(ho,e.__scopeSelect),r=fo(ho,e.__scopeSelect),[o,s]=c.useState(!1),i=ie(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;s(f)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(dc,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});uc.displayName=ho;var dc=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Je("SelectScrollButton",n),i=c.useRef(null),a=Hn(n),l=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),pe(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(fe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Y(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Y(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Y(o.onPointerLeave,()=>{l()})})}),Kg="SelectSeparator",fc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(fe.div,{"aria-hidden":!0,...r,ref:t})});fc.displayName=Kg;var go="SelectArrow",Yg=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Bn(n),s=Ze(go,n),i=Je(go,n);return s.open&&i.position==="popper"?p.jsx(Fl,{...o,...r,ref:t}):null});Yg.displayName=go;var Xg="SelectBubbleInput",pc=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=ie(r,o),i=ha(t);return c.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(d)}},[i,t]),p.jsx(fe.select,{...n,style:{...Hl,...n.style},ref:s,defaultValue:t})});pc.displayName=Xg;function mc(e){return e===""||e===void 0}function hc(e){const t=ve(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function gc(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=qg(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function qg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zg=Wl,vc=Ul,Jg=Kl,Qg=Yl,ev=Xl,bc=ql,tv=ec,xc=rc,yc=sc,nv=ic,rv=lc,wc=cc,Cc=uc,Sc=fc;const ov=Zg,sv=Jg,Ec=c.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(vc,{ref:r,className:te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(Qg,{asChild:!0,children:p.jsx(er,{className:"h-4 w-4 opacity-50"})})]}));Ec.displayName=vc.displayName;const Pc=c.forwardRef(({className:e,...t},n)=>p.jsx(wc,{ref:n,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Ku,{className:"h-4 w-4"})}));Pc.displayName=wc.displayName;const Nc=c.forwardRef(({className:e,...t},n)=>p.jsx(Cc,{ref:n,className:te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(er,{className:"h-4 w-4"})}));Nc.displayName=Cc.displayName;const Rc=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(ev,{children:p.jsxs(bc,{ref:o,className:te("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Pc,{}),p.jsx(tv,{className:te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(Nc,{})]})}));Rc.displayName=bc.displayName;const iv=c.forwardRef(({className:e,...t},n)=>p.jsx(xc,{ref:n,className:te("px-2 py-1.5 text-sm font-semibold",e),...t}));iv.displayName=xc.displayName;const Tc=c.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(yc,{ref:r,className:te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(rv,{children:p.jsx(Qn,{className:"h-4 w-4"})})}),p.jsx(nv,{children:t})]}));Tc.displayName=yc.displayName;const av=c.forwardRef(({className:e,...t},n)=>p.jsx(Sc,{ref:n,className:te("-mx-1 my-1 h-px bg-muted",e),...t}));av.displayName=Sc.displayName;const Ac=({title:e,subtitle:t,actions:n,className:r,children:o,onClose:s})=>p.jsx("div",{className:te("bg-muted-foreground/5 text-foreground border-l border-border overflow-hidden w-1/3",r),children:p.jsxs("div",{className:"flex flex-col size-full",children:[p.jsx("div",{className:"relative shrink-0 w-full border-b border-border",children:p.jsxs("div",{className:"flex flex-col gap-0 p-4",children:[p.jsxs("div",{className:"flex items-center justify-between w-full",children:[p.jsx("div",{className:"text-lg font-semibold text-foreground tracking-[-0.25px] leading-tight",children:e}),p.jsxs("div",{className:"flex items-center gap-1",children:[n?.map((i,a)=>p.jsx(Oe,{onClick:i.onClick,variant:"ghost",size:"icon","aria-label":i.label,children:i.icon},a)),p.jsx(Oe,{onClick:s,variant:"ghost",size:"icon","aria-label":"Close",children:p.jsx(qu,{className:"w-4 h-4 text-muted-foreground"})})]})]}),t&&p.jsx("div",{className:"text-md font-medium text-muted-foreground tracking-[-0.25px] leading-tight",children:t})]})}),p.jsx("div",{className:"flex-1 overflow-auto",children:p.jsx("div",{className:"flex flex-col gap-2 p-4",children:o})})]})});Ac.displayName="SidePanel";const Ic=({children:e})=>p.jsx("table",{className:"w-full",children:e}),_c=({title:e,children:t})=>p.jsxs("tr",{children:[p.jsx("td",{className:"text-md min-w-[100px] font-medium",children:e}),p.jsx("td",{className:"py-2 text-muted-foreground font-medium",children:t})]});Ic.displayName="SidePanelDetail",_c.displayName="SidePanelDetailItem";var at={},kc;function lv(){if(kc)return at;kc=1;var e=at&&at.__assign||function(){return e=Object.assign||function(i){for(var a,l=1,u=arguments.length;l<u;l++){a=arguments[l];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(i[f]=a[f])}return i},e.apply(this,arguments)};Object.defineProperty(at,"__esModule",{value:!0}),at.useResizable=void 0;var t=T,n;(function(i){i.MouseMove="mousemove",i.TouchMove="touchmove"})(n||(n={}));var r;(function(i){i.MouseUp="mouseup",i.TouchEnd="touchend"})(r||(r={}));var o={interval:1,initialHeight:100,initialWidth:100,lockHorizontal:!1,lockVertical:!1},s=function(i){var a=e(e({},o),i),l=(0,t.useRef)(null),u=function(){var d=a.initialHeight,h=a.initialWidth;return{ref:l,style:{height:d,width:h}}},f=function(d){d||(d={});var h=e(e({},a),d),v=h.parent,g=v===void 0?l:v,m=h.interval,b=m===void 0?1:m,x=h.maxHeight,y=x===void 0?Number.MAX_SAFE_INTEGER:x,w=h.maxWidth,C=w===void 0?Number.MAX_SAFE_INTEGER:w,P=h.reverse,_=h.lockHorizontal,E=h.lockVertical,R=h.onResize,H=h.onDragEnd,V=h.onDragStart,q=h.minHeight,B=q===void 0?0:q,J=h.minWidth,W=J===void 0?0:J,X=h.disabled,j=X===void 0?!1:X,Z=h.maintainAspectRatio,A=Z===void 0?!1:Z,O=function(D,S,k,z,L,Q){var ne,ee;if(!j){var ae=((ne=g?.current)===null||ne===void 0?void 0:ne.clientWidth)||0,me=((ee=g?.current)===null||ee===void 0?void 0:ee.clientHeight)||0,le=me,ce=ae;if(!E){var ge=S+(D-k)*(P?-1:1);le=Math.round(ge/b)*b,le<=0&&(le=b),le>=y&&(le=y),le<=B&&(le=B),g?.current&&(g.current.style.height="".concat(le,"px"))}if(!_){var Nt=L+(z-Q)*(P?-1:1);ce=Math.round(Nt/b)*b,ce<=0&&(ce=b),ce>=C&&(ce=C),ce<=W&&(ce=W),g?.current&&(g.current.style.width="".concat(ce,"px"))}if(A){var qt=ae/me,lt=ce/le;lt>qt?(ce=le*qt,g?.current&&(g.current.style.width="".concat(ce,"px"))):(le=ce/qt,g?.current&&(g.current.style.height="".concat(le,"px")))}R&&R({newHeight:le,heightDiff:le-me,newWidth:ce,widthDiff:ce-ae})}},N=function(D,S,k,z){return function(L){L instanceof MouseEvent&&O(L.clientY,D,S,L.clientX,k,z)}},$=function(D,S,k,z){return function(L){L.preventDefault(),L instanceof TouchEvent&&O(L.touches[0].clientY,D,S,L.touches[0].clientX,k,z)}},re=function(D,S,k,z,L){function Q(){var ne,ee;if(document.removeEventListener(S,D),document.removeEventListener(k,Q),H){var ae=((ne=g?.current)===null||ne===void 0?void 0:ne.clientWidth)||0,me=((ee=g?.current)===null||ee===void 0?void 0:ee.clientHeight)||0;H({newHeight:me,heightDiff:me-z,newWidth:ae,widthDiff:ae-L})}}return Q},I=function(D){var S,k;if(!j){var z=((S=g?.current)===null||S===void 0?void 0:S.clientHeight)||0,L=((k=g?.current)===null||k===void 0?void 0:k.clientWidth)||0,Q=null,ne=null,ee=null;if(D.type==="mousedown"){var ae=D,me=ae.clientY,le=ae.clientX;Q=N(z,me,L,le),ne=n.MouseMove,ee=r.MouseUp}else if(D.type==="touchstart"){var ce=D.touches,ge=ce[0],me=ge.clientY,le=ge.clientX;Q=$(z,me,L,le),ne=n.TouchMove,ee=r.TouchEnd}if(!(!Q||!ne||!ee)){V&&V({newHeight:z,heightDiff:0,newWidth:L,widthDiff:0});var Nt=re(Q,ne,ee,z,L);document.addEventListener(ne,Q,{passive:!1}),document.addEventListener(ee,Nt)}}},M;j?M="not-allowed":_&&E?M="default":_?M="row-resize":E?M="col-resize":M="nwse-resize";var F={cursor:M};return{onMouseDown:I,onTouchStart:I,style:F}};return{rootRef:l,getRootProps:u,getHandleProps:f}};return at.useResizable=s,at}var cv=lv();const Mc="app-sidebar-container",vo="close-previous-sidebar",uv=({initialWidth:e,onClose:t,containerId:n,...r})=>{const o=T.useMemo(()=>Symbol(),[]),{getRootProps:s,getHandleProps:i}=cv.useResizable({lockVertical:!0,initialWidth:e??400,initialHeight:"100%",onDragStart:()=>{document.body.style.userSelect="none"},onDragEnd:()=>{document.body.style.userSelect=""}});return T.useEffect(()=>{const a=new CustomEvent(vo,{detail:{sidebarId:o}});window.dispatchEvent(a);const l=u=>{u.detail.sidebarId!==o&&t()};return window.addEventListener(vo,l),()=>{window.removeEventListener(vo,l)}},[o,t]),Zt.createPortal(p.jsxs("div",{...s(),className:"pr-2 py-2 relative",children:[p.jsx("div",{...i({reverse:!0}),className:"flex h-6 w-6 items-center justify-center rounded-full bg-background border border-border absolute top-1/2 -translate-y-1/2 -left-4 z-20",children:p.jsx(Yo,{className:"rotate-90 w-4 h-4 text-muted-foreground"})}),p.jsx(no,{...r,variant:"outlined",className:"max-h-[calc(100vh-80px)] h-full","data-testid":"sidebar-panel"})]}),document.querySelector(`#${n??Mc}`))},Oc=T.forwardRef(({className:e,...t},n)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})}));Oc.displayName="Table";const Dc=T.forwardRef(({className:e,...t},n)=>p.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t}));Dc.displayName="TableHeader";const jc=T.forwardRef(({className:e,...t},n)=>p.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t}));jc.displayName="TableBody";const dv=T.forwardRef(({className:e,...t},n)=>p.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));dv.displayName="TableFooter";const Lc=T.forwardRef(({className:e,...t},n)=>p.jsx("tr",{ref:n,className:te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Lc.displayName="TableRow";const zc=T.forwardRef(({className:e,...t},n)=>p.jsx("th",{ref:n,className:te("h-10 px-2 text-left align-middle text-md font-medium bg-muted text-muted-foreground font-bold [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));zc.displayName="TableHead";const $c=T.forwardRef(({className:e,...t},n)=>p.jsx("td",{ref:n,className:te("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));$c.displayName="TableCell";const fv=T.forwardRef(({className:e,...t},n)=>p.jsx("caption",{ref:n,className:te("mt-4 text-sm text-muted-foreground",e),...t}));fv.displayName="TableCaption";const Fc=({className:e,...t})=>p.jsx("textarea",{"data-slot":"textarea",className:te("flex w-full rounded-md px-3 py-2 text-base transition-colors outline-none resize-none","min-h-[80px] field-sizing-content","bg-input","border border-border","text-foreground placeholder:text-muted-foreground","hover:border-border","focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20","aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","text-sm font-medium leading-[1.3] tracking-[-0.01em]",e),...t});Fc.displayName="Textarea";var[Vn]=Se("Tooltip",[$n]),Un=$n(),Hc="TooltipProvider",pv=700,bo="tooltip.open",[mv,xo]=Vn(Hc),Bc=e=>{const{__scopeTooltip:t,delayDuration:n=pv,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(mv,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};Bc.displayName=Hc;var Yt="Tooltip",[hv,Xt]=Vn(Yt),Wc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=xo(Yt,e.__scopeTooltip),u=Un(t),[f,d]=c.useState(null),h=Te(),v=c.useRef(0),g=i??l.disableHoverableContent,m=a??l.delayDuration,b=c.useRef(!1),[x,y]=Fe({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(bo))):l.onClose(),s?.(E)},caller:Yt}),w=c.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),C=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,y(!0)},[y]),P=c.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),_=c.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,y(!0),v.current=0},m)},[m,y]);return c.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Ll,{...u,children:p.jsx(hv,{scope:t,contentId:h,open:x,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?_():C()},[l.isOpenDelayedRef,_,C]),onTriggerLeave:c.useCallback(()=>{g?P():(window.clearTimeout(v.current),v.current=0)},[P,g]),onOpen:C,onClose:P,disableHoverableContent:g,children:n})})};Wc.displayName=Yt;var yo="TooltipTrigger",Vc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Xt(yo,n),s=xo(yo,n),i=Un(n),a=c.useRef(null),l=ie(t,a,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(zl,{asChild:!0,...i,children:p.jsx(fe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Y(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Y(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Y(e.onBlur,o.onClose),onClick:Y(e.onClick,o.onClose)})})});Vc.displayName=yo;var wo="TooltipPortal",[gv,vv]=Vn(wo,{forceMount:void 0}),Uc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Xt(wo,t);return p.jsx(gv,{scope:t,forceMount:n,children:p.jsx(Ue,{present:n||s.open,children:p.jsx(co,{asChild:!0,container:o,children:r})})})};Uc.displayName=wo;var Pt="TooltipContent",Gc=c.forwardRef((e,t)=>{const n=vv(Pt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Xt(Pt,e.__scopeTooltip);return p.jsx(Ue,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Kc,{side:o,...s,ref:t}):p.jsx(bv,{side:o,...s,ref:t})})}),bv=c.forwardRef((e,t)=>{const n=Xt(Pt,e.__scopeTooltip),r=xo(Pt,e.__scopeTooltip),o=c.useRef(null),s=ie(t,o),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,h=c.useCallback(()=>{a(null),d(!1)},[d]),v=c.useCallback((g,m)=>{const b=g.currentTarget,x={x:g.clientX,y:g.clientY},y=Sv(x,b.getBoundingClientRect()),w=Ev(x,y),C=Pv(m.getBoundingClientRect()),P=Rv([...w,...C]);a(P),d(!0)},[d]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&f){const g=b=>v(b,f),m=b=>v(b,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",m)}}},[l,f,v,h]),c.useEffect(()=>{if(i){const g=m=>{const b=m.target,x={x:m.clientX,y:m.clientY},y=l?.contains(b)||f?.contains(b),w=!Nv(x,i);y?h():w&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,i,u,h]),p.jsx(Kc,{...e,ref:s})}),[xv,yv]=Vn(Yt,{isInside:!1}),wv=Jh("TooltipContent"),Kc=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Xt(Pt,n),u=Un(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(bo,f),()=>document.removeEventListener(bo,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=h=>{h.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),p.jsx(oo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:p.jsxs($l,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(wv,{children:r}),p.jsx(xv,{scope:n,isInside:!0,children:p.jsx(Ag,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Gc.displayName=Pt;var Yc="TooltipArrow",Cv=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Un(n);return yv(Yc,n).isInside?null:p.jsx(Fl,{...o,...r,ref:t})});Cv.displayName=Yc;function Sv(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 Ev(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 Pv(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 Nv(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,d=l.x,h=l.y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(o=!o)}return o}function Rv(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),Tv(t)}function Tv(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 Av=Bc,Iv=Wc,_v=Vc,kv=Uc,Xc=Gc;const Mv=Av,Ov=Iv,Dv=_v,qc=T.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(kv,{children:p.jsx(Xc,{ref:r,sideOffset:t,className:te("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));qc.displayName=Xc.displayName;const Zc=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(v=>v(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,a);return a},jv=e=>e?Zc(e):Zc,Lv=e=>e;function zv(e,t=Lv){const n=T.useSyncExternalStore(e.subscribe,T.useCallback(()=>t(e.getState()),[e,t]),T.useCallback(()=>t(e.getInitialState()),[e,t]));return T.useDebugValue(n),n}const $v=e=>{const t=jv(e),n=r=>zv(t,r);return Object.assign(n,t),n},Fv=e=>$v;function Jc(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const Co=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Co(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Co(r)(n)}}}},Hv=(e,t)=>(n,r,o)=>{let s={storage:Jc(()=>localStorage),partialize:m=>m,version:0,merge:(m,b)=>({...b,...m}),...t},i=!1;const a=new Set,l=new Set;let u=s.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,o);const f=()=>{const m=s.partialize({...r()});return u.setItem(s.name,{state:m,version:s.version})},d=o.setState;o.setState=(m,b)=>(d(m,b),f());const h=e((...m)=>(n(...m),f()),r,o);o.getInitialState=()=>h;let v;const g=()=>{var m,b;if(!u)return;i=!1,a.forEach(y=>{var w;return y((w=r())!=null?w:h)});const x=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(m=r())!=null?m:h))||void 0;return Co(u.getItem.bind(u))(s.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==s.version){if(s.migrate){const w=s.migrate(y.state,y.version);return w instanceof Promise?w.then(C=>[!0,C]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var w;const[C,P]=y;if(v=s.merge(P,(w=r())!=null?w:h),n(v,!0),C)return f()}).then(()=>{x?.(v,void 0),v=r(),i=!0,l.forEach(y=>y(v))}).catch(y=>{x?.(void 0,y)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||g(),v||h},Qc=e=>{const t=window.document.body;if(t.classList.remove("light","dark"),e==="system"){const n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";t.classList.add(n);return}t.classList.add(e)},eu=Fv()(Hv(e=>({theme:"dark",setTheme:t=>{Qc(t),e({theme:t})}}),{name:"motia-theme-storage",storage:Jc(()=>localStorage)})),{theme:tu}=eu.getState();tu&&Qc(tu),K.APP_SIDEBAR_CONTAINER_ID=Mc,K.BackgroundEffect=Gn,K.Badge=Uo,K.Breadcrumb=pa,K.BreadcrumbItem=Lr,K.Button=Oe,K.Checkbox=ih,K.CollapsiblePanel=Vh,K.CollapsiblePanelGroup=Uh,K.Container=Xr,K.ContainerContent=Zr,K.ContainerHeader=qr,K.DropdownMenu=ca,K.DropdownMenuCheckboxItem=Um,K.DropdownMenuContent=da,K.DropdownMenuGroup=Vm,K.DropdownMenuItem=fa,K.DropdownMenuLabel=Ym,K.DropdownMenuRadioGroup=Gm,K.DropdownMenuRadioItem=Km,K.DropdownMenuSeparator=Xm,K.DropdownMenuSub=qm,K.DropdownMenuSubContent=Jm,K.DropdownMenuSubTrigger=Zm,K.DropdownMenuTrigger=ua,K.Input=ul,K.Label=pl,K.LevelDot=Xh,K.Panel=no,K.PanelDetailItem=ml,K.Select=ov,K.SelectContent=Rc,K.SelectItem=Tc,K.SelectTrigger=Ec,K.SelectValue=sv,K.SidePanel=Ac,K.SidePanelDetail=Ic,K.SidePanelDetailItem=_c,K.Sidebar=uv,K.Table=Oc,K.TableBody=jc,K.TableCell=$c,K.TableHead=zc,K.TableHeader=Dc,K.TableRow=Lc,K.Tabs=Ln,K.TabsContent=to,K.TabsList=Qr,K.TabsTrigger=eo,K.Textarea=Fc,K.Tooltip=Ov,K.TooltipContent=qc,K.TooltipProvider=Mv,K.TooltipTrigger=Dv,K.cn=te,K.useThemeStore=eu,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|