@json-to-office/jto 0.2.0 → 0.2.1
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/cli.js +1 -1
- package/dist/client/assets/HomePage-DX_EbLqY.js +99 -0
- package/dist/client/assets/HomePage-DX_EbLqY.js.map +1 -0
- package/dist/client/assets/{JsonEditorPage-y7DXYaWc.js → JsonEditorPage-C8a43kG2.js} +3 -3
- package/dist/client/assets/{JsonEditorPage-y7DXYaWc.js.map → JsonEditorPage-C8a43kG2.js.map} +1 -1
- package/dist/client/assets/{MonacoPluginProvider-B4-PgJ0r.js → MonacoPluginProvider-C_k1zpkx.js} +3 -3
- package/dist/client/assets/{MonacoPluginProvider-B4-PgJ0r.js.map → MonacoPluginProvider-C_k1zpkx.js.map} +1 -1
- package/dist/client/assets/{NotFoundPage-Et1QhbQw.js → NotFoundPage-ILCklaD-.js} +2 -2
- package/dist/client/assets/{NotFoundPage-Et1QhbQw.js.map → NotFoundPage-ILCklaD-.js.map} +1 -1
- package/dist/client/assets/{button-Bf6x7Zjh.js → button-DLt0WPRa.js} +2 -2
- package/dist/client/assets/{button-Bf6x7Zjh.js.map → button-DLt0WPRa.js.map} +1 -1
- package/dist/client/assets/{docx-preview-CUjVWdSJ.js → docx-preview-DkKCgwb-.js} +2 -2
- package/dist/client/assets/{docx-preview-CUjVWdSJ.js.map → docx-preview-DkKCgwb-.js.map} +1 -1
- package/dist/client/assets/{editor-Bwuq290w.js → editor-LsSIrw3S.js} +2 -2
- package/dist/client/assets/{editor-Bwuq290w.js.map → editor-LsSIrw3S.js.map} +1 -1
- package/dist/client/assets/{editor-monaco-json-BrfKPhHP.js → editor-monaco-json-CTzuM8w2.js} +3 -3
- package/dist/client/assets/{editor-monaco-json-BrfKPhHP.js.map → editor-monaco-json-CTzuM8w2.js.map} +1 -1
- package/dist/client/assets/index-Cph82KFG.css +1 -0
- package/dist/client/assets/{index-uE8YOnrS.js → index-CslfgN2g.js} +3 -3
- package/dist/client/assets/{index-uE8YOnrS.js.map → index-CslfgN2g.js.map} +1 -1
- package/dist/client/assets/{monaco-editor-DzeBDgmk.js → monaco-editor-B-NlkJ5A.js} +2 -2
- package/dist/client/assets/{monaco-editor-DzeBDgmk.js.map → monaco-editor-B-NlkJ5A.js.map} +1 -1
- package/dist/client/assets/{preview-kcqt_5hb.js → preview-CeZ8u4Ec.js} +3 -3
- package/dist/client/assets/{preview-kcqt_5hb.js.map → preview-CeZ8u4Ec.js.map} +1 -1
- package/dist/client/assets/{query-vendor-UL64zsGL.js → query-vendor-CT0SoqJh.js} +2 -2
- package/dist/client/assets/{query-vendor-UL64zsGL.js.map → query-vendor-CT0SoqJh.js.map} +1 -1
- package/dist/client/assets/{radix-ui-CXavUarI.js → radix-ui-DkKm4m5M.js} +2 -2
- package/dist/client/assets/{radix-ui-CXavUarI.js.map → radix-ui-DkKm4m5M.js.map} +1 -1
- package/dist/client/assets/{react-vendor-DhdcN9D5.js → react-vendor-B_QXlk-T.js} +4 -4
- package/dist/client/assets/{react-vendor-DhdcN9D5.js.map → react-vendor-B_QXlk-T.js.map} +1 -1
- package/dist/client/assets/{state-vendor-DypmJYNT.js → state-vendor-Az8redj0.js} +2 -2
- package/dist/client/assets/{state-vendor-DypmJYNT.js.map → state-vendor-Az8redj0.js.map} +1 -1
- package/dist/client/assets/{ui-vendor-BFdEgxEg.js → ui-vendor-ChWVh3T-.js} +48 -43
- package/dist/client/assets/ui-vendor-ChWVh3T-.js.map +1 -0
- package/dist/client/index.html +7 -7
- package/package.json +1 -1
- package/dist/client/assets/HomePage-BuV1dGoc.js +0 -99
- package/dist/client/assets/HomePage-BuV1dGoc.js.map +0 -1
- package/dist/client/assets/index-Dmrqj1a7.css +0 -1
- package/dist/client/assets/ui-vendor-BFdEgxEg.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as Ja,u as Oe,a as CC,c as le,b as ct,d as wC,e as ht,f as Jt,g as RC,h as kt,i as xl,j as Xf,k as TC,l as vr,m as AC,n as Af,o as jg,p as MC,q as Bg,r as _C,s as OC,t as DC,v as NC,w as Pg}from"./radix-ui-
|
|
1
|
+
import{S as Ja,u as Oe,a as CC,c as le,b as ct,d as wC,e as ht,f as Jt,g as RC,h as kt,i as xl,j as Xf,k as TC,l as vr,m as AC,n as Af,o as jg,p as MC,q as Bg,r as _C,s as OC,t as DC,v as NC,w as Pg}from"./radix-ui-DkKm4m5M.js";import{j as T}from"./query-vendor-CT0SoqJh.js";function zC(l,o){for(var r=0;r<o.length;r++){const i=o[r];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in l)){const f=Object.getOwnPropertyDescriptor(i,c);f&&Object.defineProperty(l,c,f.get?f:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}var Q_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gg(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var uf={exports:{}},be={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.js
|
|
4
4
|
*
|
|
@@ -93,10 +93,10 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
93
93
|
|
|
94
94
|
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
95
95
|
|
|
96
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;return p.useEffect(()=>{l&&(document.getElementById(l)||console.error(r))},[r,l]),null},ZT="DialogDescriptionWarning",$T=({contentRef:l,descriptionId:o})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${i0(ZT).contentName}}.`;return p.useEffect(()=>{var f;const c=(f=l.current)==null?void 0:f.getAttribute("aria-describedby");o&&c&&(document.getElementById(o)||console.warn(i))},[i,l,o]),null},aO=Qy,oO=$y,rO=Fy,iO=Jy,uO=Wy,cO=t0,sO=l0,fO=o0,kT="Label",u0=p.forwardRef((l,o)=>T.jsx(ye.label,{...l,ref:o,onMouseDown:r=>{var c;r.target.closest("button, input, select, textarea")||((c=l.onMouseDown)==null||c.call(l,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));u0.displayName=kT;var dO=u0;function gd(l){const o=l+"CollectionProvider",[r,i]=Jt(o),[c,f]=r(o,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:w,children:C}=E,A=yl.useRef(null),R=yl.useRef(new Map).current;return T.jsx(c,{scope:w,itemMap:R,collectionRef:A,children:C})};d.displayName=o;const m=l+"CollectionSlot",h=yl.forwardRef((E,w)=>{const{scope:C,children:A}=E,R=f(m,C),_=Oe(w,R.collectionRef);return T.jsx(Ja,{ref:_,children:A})});h.displayName=m;const v=l+"CollectionItemSlot",y="data-radix-collection-item",S=yl.forwardRef((E,w)=>{const{scope:C,children:A,...R}=E,_=yl.useRef(null),N=Oe(w,_),G=f(v,C);return yl.useEffect(()=>(G.itemMap.set(_,{ref:_,...R}),()=>void G.itemMap.delete(_))),T.jsx(Ja,{[y]:"",ref:N,children:A})});S.displayName=v;function b(E){const w=f(l+"CollectionConsumer",E);return yl.useCallback(()=>{const A=w.collectionRef.current;if(!A)return[];const R=Array.from(A.querySelectorAll(`[${y}]`));return Array.from(w.itemMap.values()).sort((G,I)=>R.indexOf(G.ref.current)-R.indexOf(I.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:d,Slot:h,ItemSlot:S},b,i]}var FT=[" ","Enter","ArrowUp","ArrowDown"],JT=[" ","Enter"],wr="Select",[Nu,zu,WT]=gd(wr),[io]=Jt(wr,[WT,ro]),Lu=ro(),[eA,Rl]=io(wr),[tA,nA]=io(wr),c0=l=>{const{__scopeSelect:o,children:r,open:i,defaultOpen:c,onOpenChange:f,value:d,defaultValue:m,onValueChange:h,dir:v,name:y,autoComplete:S,disabled:b,required:E,form:w}=l,C=Lu(o),[A,R]=p.useState(null),[_,N]=p.useState(null),[G,I]=p.useState(!1),$=vr(v),[U=!1,ee]=xl({prop:i,defaultProp:c,onChange:f}),[W,oe]=xl({prop:d,defaultProp:m,onChange:h}),ue=p.useRef(null),re=A?w||!!A.closest("form"):!0,[ge,se]=p.useState(new Set),me=Array.from(ge).map(z=>z.props.value).join(";");return T.jsx(od,{...C,children:T.jsxs(eA,{required:E,scope:o,trigger:A,onTriggerChange:R,valueNode:_,onValueNodeChange:N,valueNodeHasChildren:G,onValueNodeHasChildrenChange:I,contentId:kt(),value:W,onValueChange:oe,open:U,onOpenChange:ee,dir:$,triggerPointerDownPosRef:ue,disabled:b,children:[T.jsx(Nu.Provider,{scope:o,children:T.jsx(tA,{scope:l.__scopeSelect,onNativeOptionAdd:p.useCallback(z=>{se(k=>new Set(k).add(z))},[]),onNativeOptionRemove:p.useCallback(z=>{se(k=>{const F=new Set(k);return F.delete(z),F})},[]),children:r})}),re?T.jsxs(U0,{"aria-hidden":!0,required:E,tabIndex:-1,name:y,autoComplete:S,value:W,onChange:z=>oe(z.target.value),disabled:b,form:w,children:[W===void 0?T.jsx("option",{value:""}):null,Array.from(ge)]},me):null]})})};c0.displayName=wr;var s0="SelectTrigger",f0=p.forwardRef((l,o)=>{const{__scopeSelect:r,disabled:i=!1,...c}=l,f=Lu(r),d=Rl(s0,r),m=d.disabled||i,h=Oe(o,d.onTriggerChange),v=zu(r),y=p.useRef("touch"),[S,b,E]=H0(C=>{const A=v().filter(N=>!N.disabled),R=A.find(N=>N.value===d.value),_=j0(A,C,R);_!==void 0&&d.onValueChange(_.value)}),w=C=>{m||(d.onOpenChange(!0),E()),C&&(d.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return T.jsx(rd,{asChild:!0,...f,children:T.jsx(ye.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":L0(d.value)?"":void 0,...c,ref:h,onClick:le(c.onClick,C=>{C.currentTarget.focus(),y.current!=="mouse"&&w(C)}),onPointerDown:le(c.onPointerDown,C=>{y.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(w(C),C.preventDefault())}),onKeyDown:le(c.onKeyDown,C=>{const A=S.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&b(C.key),!(A&&C.key===" ")&&FT.includes(C.key)&&(w(),C.preventDefault())})})})});f0.displayName=s0;var d0="SelectValue",m0=p.forwardRef((l,o)=>{const{__scopeSelect:r,className:i,style:c,children:f,placeholder:d="",...m}=l,h=Rl(d0,r),{onValueNodeHasChildrenChange:v}=h,y=f!==void 0,S=Oe(o,h.onValueNodeChange);return ht(()=>{v(y)},[v,y]),T.jsx(ye.span,{...m,ref:S,style:{pointerEvents:"none"},children:L0(h.value)?T.jsx(T.Fragment,{children:d}):f})});m0.displayName=d0;var lA="SelectIcon",h0=p.forwardRef((l,o)=>{const{__scopeSelect:r,children:i,...c}=l;return T.jsx(ye.span,{"aria-hidden":!0,...c,ref:o,children:i||"▼"})});h0.displayName=lA;var aA="SelectPortal",v0=l=>T.jsx(Er,{asChild:!0,...l});v0.displayName=aA;var Jl="SelectContent",p0=p.forwardRef((l,o)=>{const r=Rl(Jl,l.__scopeSelect),[i,c]=p.useState();if(ht(()=>{c(new DocumentFragment)},[]),!r.open){const f=i;return f?Sr.createPortal(T.jsx(g0,{scope:l.__scopeSelect,children:T.jsx(Nu.Slot,{scope:l.__scopeSelect,children:T.jsx("div",{children:l.children})})}),f):null}return T.jsx(y0,{...l,ref:o})});p0.displayName=Jl;var on=10,[g0,Tl]=io(Jl),oA="SelectContentImpl",y0=p.forwardRef((l,o)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,side:m,sideOffset:h,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:E,sticky:w,hideWhenDetached:C,avoidCollisions:A,...R}=l,_=Rl(Jl,r),[N,G]=p.useState(null),[I,$]=p.useState(null),U=Oe(o,q=>G(q)),[ee,W]=p.useState(null),[oe,ue]=p.useState(null),re=zu(r),[ge,se]=p.useState(!1),me=p.useRef(!1);p.useEffect(()=>{if(N)return dd(N)},[N]),Xf();const z=p.useCallback(q=>{const[ae,...ie]=re().map(xe=>xe.ref.current),[he]=ie.slice(-1),Se=document.activeElement;for(const xe of q)if(xe===Se||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ae&&I&&(I.scrollTop=0),xe===he&&I&&(I.scrollTop=I.scrollHeight),xe==null||xe.focus(),document.activeElement!==Se))return},[re,I]),k=p.useCallback(()=>z([ee,N]),[z,ee,N]);p.useEffect(()=>{ge&&k()},[ge,k]);const{onOpenChange:F,triggerPointerDownPosRef:J}=_;p.useEffect(()=>{if(N){let q={x:0,y:0};const ae=he=>{var Se,xe;q={x:Math.abs(Math.round(he.pageX)-(((Se=J.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(he.pageY)-(((xe=J.current)==null?void 0:xe.y)??0))}},ie=he=>{q.x<=10&&q.y<=10?he.preventDefault():N.contains(he.target)||F(!1),document.removeEventListener("pointermove",ae),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",ie,{capture:!0})}}},[N,F,J]),p.useEffect(()=>{const q=()=>F(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[F]);const[de,O]=H0(q=>{const ae=re().filter(Se=>!Se.disabled),ie=ae.find(Se=>Se.ref.current===document.activeElement),he=j0(ae,q,ie);he&&setTimeout(()=>he.ref.current.focus())}),V=p.useCallback((q,ae,ie)=>{const he=!me.current&&!ie;(_.value!==void 0&&_.value===ae||he)&&(W(q),he&&(me.current=!0))},[_.value]),P=p.useCallback(()=>N==null?void 0:N.focus(),[N]),Q=p.useCallback((q,ae,ie)=>{const he=!me.current&&!ie;(_.value!==void 0&&_.value===ae||he)&&ue(q)},[_.value]),ne=i==="popper"?Hf:S0,te=ne===Hf?{side:m,sideOffset:h,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:E,sticky:w,hideWhenDetached:C,avoidCollisions:A}:{};return T.jsx(g0,{scope:r,content:N,viewport:I,onViewportChange:$,itemRefCallback:V,selectedItem:ee,onItemLeave:P,itemTextRefCallback:Q,focusSelectedItem:k,selectedItemText:oe,position:i,isPositioned:ge,searchRef:de,children:T.jsx(Du,{as:Ja,allowPinchZoom:!0,children:T.jsx(_u,{asChild:!0,trapped:_.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:le(c,q=>{var ae;(ae=_.trigger)==null||ae.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(br,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:T.jsx(ne,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:q=>q.preventDefault(),...R,...te,onPlaced:()=>se(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:le(R.onKeyDown,q=>{const ae=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!ae&&q.key.length===1&&O(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let he=re().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(q.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const Se=q.target,xe=he.indexOf(Se);he=he.slice(xe+1)}setTimeout(()=>z(he)),q.preventDefault()}})})})})})})});y0.displayName=oA;var rA="SelectItemAlignedPosition",S0=p.forwardRef((l,o)=>{const{__scopeSelect:r,onPlaced:i,...c}=l,f=Rl(Jl,r),d=Tl(Jl,r),[m,h]=p.useState(null),[v,y]=p.useState(null),S=Oe(o,U=>y(U)),b=zu(r),E=p.useRef(!1),w=p.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:R,focusSelectedItem:_}=d,N=p.useCallback(()=>{if(f.trigger&&f.valueNode&&m&&v&&C&&A&&R){const U=f.trigger.getBoundingClientRect(),ee=v.getBoundingClientRect(),W=f.valueNode.getBoundingClientRect(),oe=R.getBoundingClientRect();if(f.dir!=="rtl"){const Se=oe.left-ee.left,xe=W.left-Se,Re=U.left-xe,Ue=U.width+Re,dt=Math.max(Ue,ee.width),gt=window.innerWidth-on,en=Af(xe,[on,Math.max(on,gt-dt)]);m.style.minWidth=Ue+"px",m.style.left=en+"px"}else{const Se=ee.right-oe.right,xe=window.innerWidth-W.right-Se,Re=window.innerWidth-U.right-xe,Ue=U.width+Re,dt=Math.max(Ue,ee.width),gt=window.innerWidth-on,en=Af(xe,[on,Math.max(on,gt-dt)]);m.style.minWidth=Ue+"px",m.style.right=en+"px"}const ue=b(),re=window.innerHeight-on*2,ge=C.scrollHeight,se=window.getComputedStyle(v),me=parseInt(se.borderTopWidth,10),z=parseInt(se.paddingTop,10),k=parseInt(se.borderBottomWidth,10),F=parseInt(se.paddingBottom,10),J=me+z+ge+F+k,de=Math.min(A.offsetHeight*5,J),O=window.getComputedStyle(C),V=parseInt(O.paddingTop,10),P=parseInt(O.paddingBottom,10),Q=U.top+U.height/2-on,ne=re-Q,te=A.offsetHeight/2,q=A.offsetTop+te,ae=me+z+q,ie=J-ae;if(ae<=Q){const Se=ue.length>0&&A===ue[ue.length-1].ref.current;m.style.bottom="0px";const xe=v.clientHeight-C.offsetTop-C.offsetHeight,Re=Math.max(ne,te+(Se?P:0)+xe+k),Ue=ae+Re;m.style.height=Ue+"px"}else{const Se=ue.length>0&&A===ue[0].ref.current;m.style.top="0px";const Re=Math.max(Q,me+C.offsetTop+(Se?V:0)+te)+ie;m.style.height=Re+"px",C.scrollTop=ae-Q+C.offsetTop}m.style.margin=`${on}px 0`,m.style.minHeight=de+"px",m.style.maxHeight=re+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[b,f.trigger,f.valueNode,m,v,C,A,R,f.dir,i]);ht(()=>N(),[N]);const[G,I]=p.useState();ht(()=>{v&&I(window.getComputedStyle(v).zIndex)},[v]);const $=p.useCallback(U=>{U&&w.current===!0&&(N(),_==null||_(),w.current=!1)},[N,_]);return T.jsx(uA,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:$,children:T.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:G},children:T.jsx(ye.div,{...c,ref:S,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});S0.displayName=rA;var iA="SelectPopperPosition",Hf=p.forwardRef((l,o)=>{const{__scopeSelect:r,align:i="start",collisionPadding:c=on,...f}=l,d=Lu(r);return T.jsx(id,{...d,...f,ref:o,align:i,collisionPadding:c,style:{boxSizing:"border-box",...f.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)"}})});Hf.displayName=iA;var[uA,yd]=io(Jl,{}),jf="SelectViewport",b0=p.forwardRef((l,o)=>{const{__scopeSelect:r,nonce:i,...c}=l,f=Tl(jf,r),d=yd(jf,r),m=Oe(o,f.onViewportChange),h=p.useRef(0);return T.jsxs(T.Fragment,{children:[T.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:i}),T.jsx(Nu.Slot,{scope:r,children:T.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:le(c.onScroll,v=>{const y=v.currentTarget,{contentWrapper:S,shouldExpandOnScrollRef:b}=d;if(b!=null&&b.current&&S){const E=Math.abs(h.current-y.scrollTop);if(E>0){const w=window.innerHeight-on*2,C=parseFloat(S.style.minHeight),A=parseFloat(S.style.height),R=Math.max(C,A);if(R<w){const _=R+E,N=Math.min(w,_),G=_-N;S.style.height=N+"px",S.style.bottom==="0px"&&(y.scrollTop=G>0?G:0,S.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});b0.displayName=jf;var x0="SelectGroup",[cA,sA]=io(x0),E0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=kt();return T.jsx(cA,{scope:r,id:c,children:T.jsx(ye.div,{role:"group","aria-labelledby":c,...i,ref:o})})});E0.displayName=x0;var C0="SelectLabel",w0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=sA(C0,r);return T.jsx(ye.div,{id:c.id,...i,ref:o})});w0.displayName=C0;var fu="SelectItem",[fA,R0]=io(fu),T0=p.forwardRef((l,o)=>{const{__scopeSelect:r,value:i,disabled:c=!1,textValue:f,...d}=l,m=Rl(fu,r),h=Tl(fu,r),v=m.value===i,[y,S]=p.useState(f??""),[b,E]=p.useState(!1),w=Oe(o,_=>{var N;return(N=h.itemRefCallback)==null?void 0:N.call(h,_,i,c)}),C=kt(),A=p.useRef("touch"),R=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")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 T.jsx(fA,{scope:r,value:i,disabled:c,textId:C,isSelected:v,onItemTextChange:p.useCallback(_=>{S(N=>N||((_==null?void 0:_.textContent)??"").trim())},[]),children:T.jsx(Nu.ItemSlot,{scope:r,value:i,disabled:c,textValue:y,children:T.jsx(ye.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:w,onFocus:le(d.onFocus,()=>E(!0)),onBlur:le(d.onBlur,()=>E(!1)),onClick:le(d.onClick,()=>{A.current!=="mouse"&&R()}),onPointerUp:le(d.onPointerUp,()=>{A.current==="mouse"&&R()}),onPointerDown:le(d.onPointerDown,_=>{A.current=_.pointerType}),onPointerMove:le(d.onPointerMove,_=>{var N;A.current=_.pointerType,c?(N=h.onItemLeave)==null||N.call(h):A.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(d.onPointerLeave,_=>{var N;_.currentTarget===document.activeElement&&((N=h.onItemLeave)==null||N.call(h))}),onKeyDown:le(d.onKeyDown,_=>{var G;((G=h.searchRef)==null?void 0:G.current)!==""&&_.key===" "||(JT.includes(_.key)&&R(),_.key===" "&&_.preventDefault())})})})})});T0.displayName=fu;var or="SelectItemText",A0=p.forwardRef((l,o)=>{const{__scopeSelect:r,className:i,style:c,...f}=l,d=Rl(or,r),m=Tl(or,r),h=R0(or,r),v=nA(or,r),[y,S]=p.useState(null),b=Oe(o,R=>S(R),h.onItemTextChange,R=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,R,h.value,h.disabled)}),E=y==null?void 0:y.textContent,w=p.useMemo(()=>T.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=v;return ht(()=>(C(w),()=>A(w)),[C,A,w]),T.jsxs(T.Fragment,{children:[T.jsx(ye.span,{id:h.textId,...f,ref:b}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Sr.createPortal(f.children,d.valueNode):null]})});A0.displayName=or;var M0="SelectItemIndicator",_0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l;return R0(M0,r).isSelected?T.jsx(ye.span,{"aria-hidden":!0,...i,ref:o}):null});_0.displayName=M0;var Bf="SelectScrollUpButton",O0=p.forwardRef((l,o)=>{const r=Tl(Bf,l.__scopeSelect),i=yd(Bf,l.__scopeSelect),[c,f]=p.useState(!1),d=Oe(o,i.onScrollButtonChange);return ht(()=>{if(r.viewport&&r.isPositioned){let m=function(){const v=h.scrollTop>0;f(v)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?T.jsx(N0,{...l,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});O0.displayName=Bf;var Pf="SelectScrollDownButton",D0=p.forwardRef((l,o)=>{const r=Tl(Pf,l.__scopeSelect),i=yd(Pf,l.__scopeSelect),[c,f]=p.useState(!1),d=Oe(o,i.onScrollButtonChange);return ht(()=>{if(r.viewport&&r.isPositioned){let m=function(){const v=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)<v;f(y)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?T.jsx(N0,{...l,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});D0.displayName=Pf;var N0=p.forwardRef((l,o)=>{const{__scopeSelect:r,onAutoScroll:i,...c}=l,f=Tl("SelectScrollButton",r),d=p.useRef(null),m=zu(r),h=p.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return p.useEffect(()=>()=>h(),[h]),ht(()=>{var y;const v=m().find(S=>S.ref.current===document.activeElement);(y=v==null?void 0:v.ref.current)==null||y.scrollIntoView({block:"nearest"})},[m]),T.jsx(ye.div,{"aria-hidden":!0,...c,ref:o,style:{flexShrink:0,...c.style},onPointerDown:le(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:le(c.onPointerMove,()=>{var v;(v=f.onItemLeave)==null||v.call(f),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:le(c.onPointerLeave,()=>{h()})})}),dA="SelectSeparator",z0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l;return T.jsx(ye.div,{"aria-hidden":!0,...i,ref:o})});z0.displayName=dA;var Gf="SelectArrow",mA=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=Lu(r),f=Rl(Gf,r),d=Tl(Gf,r);return f.open&&d.position==="popper"?T.jsx(ud,{...c,...i,ref:o}):null});mA.displayName=Gf;function L0(l){return l===""||l===void 0}var U0=p.forwardRef((l,o)=>{const{value:r,...i}=l,c=p.useRef(null),f=Oe(o,c),d=AC(r);return p.useEffect(()=>{const m=c.current,h=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==r&&y){const S=new Event("change",{bubbles:!0});y.call(m,r),m.dispatchEvent(S)}},[d,r]),T.jsx(cd,{asChild:!0,children:T.jsx("select",{...i,ref:f,defaultValue:r})})});U0.displayName="BubbleSelect";function H0(l){const o=ct(l),r=p.useRef(""),i=p.useRef(0),c=p.useCallback(d=>{const m=r.current+d;o(m),function h(v){r.current=v,window.clearTimeout(i.current),v!==""&&(i.current=window.setTimeout(()=>h(""),1e3))}(m)},[o]),f=p.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,c,f]}function j0(l,o,r){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,f=r?l.indexOf(r):-1;let d=hA(l,Math.max(f,0));c.length===1&&(d=d.filter(v=>v!==r));const h=d.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return h!==r?h:void 0}function hA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}var mO=c0,hO=f0,vO=m0,pO=h0,gO=v0,yO=p0,SO=b0,bO=E0,xO=w0,EO=T0,CO=A0,wO=_0,RO=O0,TO=D0,AO=z0,wf="rovingFocusGroup.onEntryFocus",vA={bubbles:!1,cancelable:!0},Uu="RovingFocusGroup",[Yf,B0,pA]=gd(Uu),[gA,Hu]=Jt(Uu,[pA]),[yA,SA]=gA(Uu),P0=p.forwardRef((l,o)=>T.jsx(Yf.Provider,{scope:l.__scopeRovingFocusGroup,children:T.jsx(Yf.Slot,{scope:l.__scopeRovingFocusGroup,children:T.jsx(bA,{...l,ref:o})})}));P0.displayName=Uu;var bA=p.forwardRef((l,o)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:v,preventScrollOnEntryFocus:y=!1,...S}=l,b=p.useRef(null),E=Oe(o,b),w=vr(f),[C=null,A]=xl({prop:d,defaultProp:m,onChange:h}),[R,_]=p.useState(!1),N=ct(v),G=B0(r),I=p.useRef(!1),[$,U]=p.useState(0);return p.useEffect(()=>{const ee=b.current;if(ee)return ee.addEventListener(wf,N),()=>ee.removeEventListener(wf,N)},[N]),T.jsx(yA,{scope:r,orientation:i,dir:w,loop:c,currentTabStopId:C,onItemFocus:p.useCallback(ee=>A(ee),[A]),onItemShiftTab:p.useCallback(()=>_(!0),[]),onFocusableItemAdd:p.useCallback(()=>U(ee=>ee+1),[]),onFocusableItemRemove:p.useCallback(()=>U(ee=>ee-1),[]),children:T.jsx(ye.div,{tabIndex:R||$===0?-1:0,"data-orientation":i,...S,ref:E,style:{outline:"none",...l.style},onMouseDown:le(l.onMouseDown,()=>{I.current=!0}),onFocus:le(l.onFocus,ee=>{const W=!I.current;if(ee.target===ee.currentTarget&&W&&!R){const oe=new CustomEvent(wf,vA);if(ee.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const ue=G().filter(z=>z.focusable),re=ue.find(z=>z.active),ge=ue.find(z=>z.id===C),me=[re,ge,...ue].filter(Boolean).map(z=>z.ref.current);V0(me,y)}}I.current=!1}),onBlur:le(l.onBlur,()=>_(!1))})})}),G0="RovingFocusGroupItem",Y0=p.forwardRef((l,o)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:c=!1,tabStopId:f,...d}=l,m=kt(),h=f||m,v=SA(G0,r),y=v.currentTabStopId===h,S=B0(r),{onFocusableItemAdd:b,onFocusableItemRemove:E}=v;return p.useEffect(()=>{if(i)return b(),()=>E()},[i,b,E]),T.jsx(Yf.ItemSlot,{scope:r,id:h,focusable:i,active:c,children:T.jsx(ye.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...d,ref:o,onMouseDown:le(l.onMouseDown,w=>{i?v.onItemFocus(h):w.preventDefault()}),onFocus:le(l.onFocus,()=>v.onItemFocus(h)),onKeyDown:le(l.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){v.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=CA(w,v.orientation,v.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let R=S().filter(_=>_.focusable).map(_=>_.ref.current);if(C==="last")R.reverse();else if(C==="prev"||C==="next"){C==="prev"&&R.reverse();const _=R.indexOf(w.currentTarget);R=v.loop?wA(R,_+1):R.slice(_+1)}setTimeout(()=>V0(R))}})})})});Y0.displayName=G0;var xA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EA(l,o){return o!=="rtl"?l:l==="ArrowLeft"?"ArrowRight":l==="ArrowRight"?"ArrowLeft":l}function CA(l,o,r){const i=EA(l.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return xA[i]}function V0(l,o=!1){const r=document.activeElement;for(const i of l)if(i===r||(i.focus({preventScroll:o}),document.activeElement!==r))return}function wA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}var q0=P0,X0=Y0,Vf=["Enter"," "],RA=["ArrowDown","PageUp","Home"],K0=["ArrowUp","PageDown","End"],TA=[...RA,...K0],AA={ltr:[...Vf,"ArrowRight"],rtl:[...Vf,"ArrowLeft"]},MA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rr="Menu",[fr,_A,OA]=gd(Rr),[ta,ju]=Jt(Rr,[OA,ro,Hu]),Bu=ro(),I0=Hu(),[DA,na]=ta(Rr),[NA,Tr]=ta(Rr),Q0=l=>{const{__scopeMenu:o,open:r=!1,children:i,dir:c,onOpenChange:f,modal:d=!0}=l,m=Bu(o),[h,v]=p.useState(null),y=p.useRef(!1),S=ct(f),b=vr(c);return p.useEffect(()=>{const E=()=>{y.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>y.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),T.jsx(od,{...m,children:T.jsx(DA,{scope:o,open:r,onOpenChange:S,content:h,onContentChange:v,children:T.jsx(NA,{scope:o,onClose:p.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:y,dir:b,modal:d,children:i})})})};Q0.displayName=Rr;var zA="MenuAnchor",Sd=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l,c=Bu(r);return T.jsx(rd,{...c,...i,ref:o})});Sd.displayName=zA;var bd="MenuPortal",[LA,Z0]=ta(bd,{forceMount:void 0}),$0=l=>{const{__scopeMenu:o,forceMount:r,children:i,container:c}=l,f=na(bd,o);return T.jsx(LA,{scope:o,forceMount:r,children:T.jsx(ft,{present:r||f.open,children:T.jsx(Er,{asChild:!0,container:c,children:i})})})};$0.displayName=bd;var Ft="MenuContent",[UA,xd]=ta(Ft),k0=p.forwardRef((l,o)=>{const r=Z0(Ft,l.__scopeMenu),{forceMount:i=r.forceMount,...c}=l,f=na(Ft,l.__scopeMenu),d=Tr(Ft,l.__scopeMenu);return T.jsx(fr.Provider,{scope:l.__scopeMenu,children:T.jsx(ft,{present:i||f.open,children:T.jsx(fr.Slot,{scope:l.__scopeMenu,children:d.modal?T.jsx(HA,{...c,ref:o}):T.jsx(jA,{...c,ref:o})})})})}),HA=p.forwardRef((l,o)=>{const r=na(Ft,l.__scopeMenu),i=p.useRef(null),c=Oe(o,i);return p.useEffect(()=>{const f=i.current;if(f)return dd(f)},[]),T.jsx(Ed,{...l,ref:c,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:le(l.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),jA=p.forwardRef((l,o)=>{const r=na(Ft,l.__scopeMenu);return T.jsx(Ed,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Ed=p.forwardRef((l,o)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:c,onOpenAutoFocus:f,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:S,onInteractOutside:b,onDismiss:E,disableOutsideScroll:w,...C}=l,A=na(Ft,r),R=Tr(Ft,r),_=Bu(r),N=I0(r),G=_A(r),[I,$]=p.useState(null),U=p.useRef(null),ee=Oe(o,U,A.onContentChange),W=p.useRef(0),oe=p.useRef(""),ue=p.useRef(0),re=p.useRef(null),ge=p.useRef("right"),se=p.useRef(0),me=w?Du:p.Fragment,z=w?{as:Ja,allowPinchZoom:!0}:void 0,k=J=>{var q,ae;const de=oe.current+J,O=G().filter(ie=>!ie.disabled),V=document.activeElement,P=(q=O.find(ie=>ie.ref.current===V))==null?void 0:q.textValue,Q=O.map(ie=>ie.textValue),ne=$A(Q,de,P),te=(ae=O.find(ie=>ie.textValue===ne))==null?void 0:ae.ref.current;(function ie(he){oe.current=he,window.clearTimeout(W.current),he!==""&&(W.current=window.setTimeout(()=>ie(""),1e3))})(de),te&&setTimeout(()=>te.focus())};p.useEffect(()=>()=>window.clearTimeout(W.current),[]),Xf();const F=p.useCallback(J=>{var O,V;return ge.current===((O=re.current)==null?void 0:O.side)&&FA(J,(V=re.current)==null?void 0:V.area)},[]);return T.jsx(UA,{scope:r,searchRef:oe,onItemEnter:p.useCallback(J=>{F(J)&&J.preventDefault()},[F]),onItemLeave:p.useCallback(J=>{var de;F(J)||((de=U.current)==null||de.focus(),$(null))},[F]),onTriggerLeave:p.useCallback(J=>{F(J)&&J.preventDefault()},[F]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:p.useCallback(J=>{re.current=J},[]),children:T.jsx(me,{...z,children:T.jsx(_u,{asChild:!0,trapped:c,onMountAutoFocus:le(f,J=>{var de;J.preventDefault(),(de=U.current)==null||de.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:T.jsx(br,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:S,onInteractOutside:b,onDismiss:E,children:T.jsx(q0,{asChild:!0,...N,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:I,onCurrentTabStopIdChange:$,onEntryFocus:le(h,J=>{R.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:T.jsx(id,{role:"menu","aria-orientation":"vertical","data-state":dS(A.open),"data-radix-menu-content":"",dir:R.dir,..._,...C,ref:ee,style:{outline:"none",...C.style},onKeyDown:le(C.onKeyDown,J=>{const O=J.target.closest("[data-radix-menu-content]")===J.currentTarget,V=J.ctrlKey||J.altKey||J.metaKey,P=J.key.length===1;O&&(J.key==="Tab"&&J.preventDefault(),!V&&P&&k(J.key));const Q=U.current;if(J.target!==Q||!TA.includes(J.key))return;J.preventDefault();const te=G().filter(q=>!q.disabled).map(q=>q.ref.current);K0.includes(J.key)&&te.reverse(),QA(te)}),onBlur:le(l.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(W.current),oe.current="")}),onPointerMove:le(l.onPointerMove,dr(J=>{const de=J.target,O=se.current!==J.clientX;if(J.currentTarget.contains(de)&&O){const V=J.clientX>se.current?"right":"left";ge.current=V,se.current=J.clientX}}))})})})})})})});k0.displayName=Ft;var BA="MenuGroup",Cd=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{role:"group",...i,ref:o})});Cd.displayName=BA;var PA="MenuLabel",F0=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{...i,ref:o})});F0.displayName=PA;var du="MenuItem",Cg="menu.itemSelect",Pu=p.forwardRef((l,o)=>{const{disabled:r=!1,onSelect:i,...c}=l,f=p.useRef(null),d=Tr(du,l.__scopeMenu),m=xd(du,l.__scopeMenu),h=Oe(o,f),v=p.useRef(!1),y=()=>{const S=f.current;if(!r&&S){const b=new CustomEvent(Cg,{bubbles:!0,cancelable:!0});S.addEventListener(Cg,E=>i==null?void 0:i(E),{once:!0}),oy(S,b),b.defaultPrevented?v.current=!1:d.onClose()}};return T.jsx(J0,{...c,ref:h,disabled:r,onClick:le(l.onClick,y),onPointerDown:S=>{var b;(b=l.onPointerDown)==null||b.call(l,S),v.current=!0},onPointerUp:le(l.onPointerUp,S=>{var b;v.current||(b=S.currentTarget)==null||b.click()}),onKeyDown:le(l.onKeyDown,S=>{const b=m.searchRef.current!=="";r||b&&S.key===" "||Vf.includes(S.key)&&(S.currentTarget.click(),S.preventDefault())})})});Pu.displayName=du;var J0=p.forwardRef((l,o)=>{const{__scopeMenu:r,disabled:i=!1,textValue:c,...f}=l,d=xd(du,r),m=I0(r),h=p.useRef(null),v=Oe(o,h),[y,S]=p.useState(!1),[b,E]=p.useState("");return p.useEffect(()=>{const w=h.current;w&&E((w.textContent??"").trim())},[f.children]),T.jsx(fr.ItemSlot,{scope:r,disabled:i,textValue:c??b,children:T.jsx(X0,{asChild:!0,...m,focusable:!i,children:T.jsx(ye.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...f,ref:v,onPointerMove:le(l.onPointerMove,dr(w=>{i?d.onItemLeave(w):(d.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:le(l.onPointerLeave,dr(w=>d.onItemLeave(w))),onFocus:le(l.onFocus,()=>S(!0)),onBlur:le(l.onBlur,()=>S(!1))})})})}),GA="MenuCheckboxItem",W0=p.forwardRef((l,o)=>{const{checked:r=!1,onCheckedChange:i,...c}=l;return T.jsx(aS,{scope:l.__scopeMenu,checked:r,children:T.jsx(Pu,{role:"menuitemcheckbox","aria-checked":mu(r)?"mixed":r,...c,ref:o,"data-state":Rd(r),onSelect:le(c.onSelect,()=>i==null?void 0:i(mu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});W0.displayName=GA;var eS="MenuRadioGroup",[YA,VA]=ta(eS,{value:void 0,onValueChange:()=>{}}),tS=p.forwardRef((l,o)=>{const{value:r,onValueChange:i,...c}=l,f=ct(i);return T.jsx(YA,{scope:l.__scopeMenu,value:r,onValueChange:f,children:T.jsx(Cd,{...c,ref:o})})});tS.displayName=eS;var nS="MenuRadioItem",lS=p.forwardRef((l,o)=>{const{value:r,...i}=l,c=VA(nS,l.__scopeMenu),f=r===c.value;return T.jsx(aS,{scope:l.__scopeMenu,checked:f,children:T.jsx(Pu,{role:"menuitemradio","aria-checked":f,...i,ref:o,"data-state":Rd(f),onSelect:le(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,r)},{checkForDefaultPrevented:!1})})})});lS.displayName=nS;var wd="MenuItemIndicator",[aS,qA]=ta(wd,{checked:!1}),oS=p.forwardRef((l,o)=>{const{__scopeMenu:r,forceMount:i,...c}=l,f=qA(wd,r);return T.jsx(ft,{present:i||mu(f.checked)||f.checked===!0,children:T.jsx(ye.span,{...c,ref:o,"data-state":Rd(f.checked)})})});oS.displayName=wd;var XA="MenuSeparator",rS=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{role:"separator","aria-orientation":"horizontal",...i,ref:o})});rS.displayName=XA;var KA="MenuArrow",iS=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l,c=Bu(r);return T.jsx(ud,{...c,...i,ref:o})});iS.displayName=KA;var IA="MenuSub",[MO,uS]=ta(IA),rr="MenuSubTrigger",cS=p.forwardRef((l,o)=>{const r=na(rr,l.__scopeMenu),i=Tr(rr,l.__scopeMenu),c=uS(rr,l.__scopeMenu),f=xd(rr,l.__scopeMenu),d=p.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=f,v={__scopeMenu:l.__scopeMenu},y=p.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return p.useEffect(()=>y,[y]),p.useEffect(()=>{const S=m.current;return()=>{window.clearTimeout(S),h(null)}},[m,h]),T.jsx(Sd,{asChild:!0,...v,children:T.jsx(J0,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":c.contentId,"data-state":dS(r.open),...l,ref:jg(o,c.onTriggerChange),onClick:S=>{var b;(b=l.onClick)==null||b.call(l,S),!(l.disabled||S.defaultPrevented)&&(S.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:le(l.onPointerMove,dr(S=>{f.onItemEnter(S),!S.defaultPrevented&&!l.disabled&&!r.open&&!d.current&&(f.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),y()},100))})),onPointerLeave:le(l.onPointerLeave,dr(S=>{var E,w;y();const b=(E=r.content)==null?void 0:E.getBoundingClientRect();if(b){const C=(w=r.content)==null?void 0:w.dataset.side,A=C==="right",R=A?-5:5,_=b[A?"left":"right"],N=b[A?"right":"left"];f.onPointerGraceIntentChange({area:[{x:S.clientX+R,y:S.clientY},{x:_,y:b.top},{x:N,y:b.top},{x:N,y:b.bottom},{x:_,y:b.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.onPointerGraceIntentChange(null),300)}else{if(f.onTriggerLeave(S),S.defaultPrevented)return;f.onPointerGraceIntentChange(null)}})),onKeyDown:le(l.onKeyDown,S=>{var E;const b=f.searchRef.current!=="";l.disabled||b&&S.key===" "||AA[i.dir].includes(S.key)&&(r.onOpenChange(!0),(E=r.content)==null||E.focus(),S.preventDefault())})})})});cS.displayName=rr;var sS="MenuSubContent",fS=p.forwardRef((l,o)=>{const r=Z0(Ft,l.__scopeMenu),{forceMount:i=r.forceMount,...c}=l,f=na(Ft,l.__scopeMenu),d=Tr(Ft,l.__scopeMenu),m=uS(sS,l.__scopeMenu),h=p.useRef(null),v=Oe(o,h);return T.jsx(fr.Provider,{scope:l.__scopeMenu,children:T.jsx(ft,{present:i||f.open,children:T.jsx(fr.Slot,{scope:l.__scopeMenu,children:T.jsx(Ed,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:v,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{var S;d.isUsingKeyboardRef.current&&((S=h.current)==null||S.focus()),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:le(l.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:le(l.onEscapeKeyDown,y=>{d.onClose(),y.preventDefault()}),onKeyDown:le(l.onKeyDown,y=>{var E;const S=y.currentTarget.contains(y.target),b=MA[d.dir].includes(y.key);S&&b&&(f.onOpenChange(!1),(E=m.trigger)==null||E.focus(),y.preventDefault())})})})})})});fS.displayName=sS;function dS(l){return l?"open":"closed"}function mu(l){return l==="indeterminate"}function Rd(l){return mu(l)?"indeterminate":l?"checked":"unchecked"}function QA(l){const o=document.activeElement;for(const r of l)if(r===o||(r.focus(),document.activeElement!==o))return}function ZA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}function $A(l,o,r){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,f=r?l.indexOf(r):-1;let d=ZA(l,Math.max(f,0));c.length===1&&(d=d.filter(v=>v!==r));const h=d.find(v=>v.toLowerCase().startsWith(c.toLowerCase()));return h!==r?h:void 0}function kA(l,o){const{x:r,y:i}=l;let c=!1;for(let f=0,d=o.length-1;f<o.length;d=f++){const m=o[f].x,h=o[f].y,v=o[d].x,y=o[d].y;h>i!=y>i&&r<(v-m)*(i-h)/(y-h)+m&&(c=!c)}return c}function FA(l,o){if(!o)return!1;const r={x:l.clientX,y:l.clientY};return kA(r,o)}function dr(l){return o=>o.pointerType==="mouse"?l(o):void 0}var mS=Q0,hS=Sd,vS=$0,pS=k0,gS=Cd,yS=F0,SS=Pu,bS=W0,xS=tS,ES=lS,CS=oS,wS=rS,RS=iS,TS=cS,AS=fS,Td="ContextMenu",[JA]=Jt(Td,[ju]),vt=ju(),[WA,MS]=JA(Td),_S=l=>{const{__scopeContextMenu:o,children:r,onOpenChange:i,dir:c,modal:f=!0}=l,[d,m]=p.useState(!1),h=vt(o),v=ct(i),y=p.useCallback(S=>{m(S),v(S)},[v]);return T.jsx(WA,{scope:o,open:d,onOpenChange:y,modal:f,children:T.jsx(mS,{...h,dir:c,open:d,onOpenChange:y,modal:f,children:r})})};_S.displayName=Td;var OS="ContextMenuTrigger",DS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,disabled:i=!1,...c}=l,f=MS(OS,r),d=vt(r),m=p.useRef({x:0,y:0}),h=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),v=p.useRef(0),y=p.useCallback(()=>window.clearTimeout(v.current),[]),S=b=>{m.current={x:b.clientX,y:b.clientY},f.onOpenChange(!0)};return p.useEffect(()=>y,[y]),p.useEffect(()=>void(i&&y()),[i,y]),T.jsxs(T.Fragment,{children:[T.jsx(hS,{...d,virtualRef:h}),T.jsx(ye.span,{"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:o,style:{WebkitTouchCallout:"none",...l.style},onContextMenu:i?l.onContextMenu:le(l.onContextMenu,b=>{y(),S(b),b.preventDefault()}),onPointerDown:i?l.onPointerDown:le(l.onPointerDown,Ji(b=>{y(),v.current=window.setTimeout(()=>S(b),700)})),onPointerMove:i?l.onPointerMove:le(l.onPointerMove,Ji(y)),onPointerCancel:i?l.onPointerCancel:le(l.onPointerCancel,Ji(y)),onPointerUp:i?l.onPointerUp:le(l.onPointerUp,Ji(y))})]})});DS.displayName=OS;var eM="ContextMenuPortal",NS=l=>{const{__scopeContextMenu:o,...r}=l,i=vt(o);return T.jsx(vS,{...i,...r})};NS.displayName=eM;var zS="ContextMenuContent",LS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=MS(zS,r),f=vt(r),d=p.useRef(!1);return T.jsx(pS,{...f,...i,ref:o,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=l.onCloseAutoFocus)==null||h.call(l,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=l.onInteractOutside)==null||h.call(l,m),!m.defaultPrevented&&!c.modal&&(d.current=!0)},style:{...l.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LS.displayName=zS;var tM="ContextMenuGroup",nM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(gS,{...c,...i,ref:o})});nM.displayName=tM;var lM="ContextMenuLabel",US=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(yS,{...c,...i,ref:o})});US.displayName=lM;var aM="ContextMenuItem",HS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(SS,{...c,...i,ref:o})});HS.displayName=aM;var oM="ContextMenuCheckboxItem",jS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(bS,{...c,...i,ref:o})});jS.displayName=oM;var rM="ContextMenuRadioGroup",iM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(xS,{...c,...i,ref:o})});iM.displayName=rM;var uM="ContextMenuRadioItem",BS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(ES,{...c,...i,ref:o})});BS.displayName=uM;var cM="ContextMenuItemIndicator",PS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(CS,{...c,...i,ref:o})});PS.displayName=cM;var sM="ContextMenuSeparator",GS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(wS,{...c,...i,ref:o})});GS.displayName=sM;var fM="ContextMenuArrow",dM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(RS,{...c,...i,ref:o})});dM.displayName=fM;var mM="ContextMenuSubTrigger",YS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(TS,{...c,...i,ref:o})});YS.displayName=mM;var hM="ContextMenuSubContent",VS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(AS,{...c,...i,ref:o,style:{...l.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});VS.displayName=hM;function Ji(l){return o=>o.pointerType!=="mouse"?l(o):void 0}var _O=_S,OO=DS,DO=NS,NO=LS,zO=US,LO=HS,UO=jS,HO=BS,jO=PS,BO=GS,PO=YS,GO=VS,vM="Separator",wg="horizontal",pM=["horizontal","vertical"],qS=p.forwardRef((l,o)=>{const{decorative:r,orientation:i=wg,...c}=l,f=gM(i)?i:wg,m=r?{role:"none"}:{"aria-orientation":f==="vertical"?f:void 0,role:"separator"};return T.jsx(ye.div,{"data-orientation":f,...m,...c,ref:o})});qS.displayName=vM;function gM(l){return pM.includes(l)}var YO=qS;function yM(l,o){return p.useReducer((r,i)=>o[r][i]??r,l)}var Ad="ScrollArea",[XS]=Jt(Ad),[SM,Wt]=XS(Ad),KS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,type:i="hover",dir:c,scrollHideDelay:f=600,...d}=l,[m,h]=p.useState(null),[v,y]=p.useState(null),[S,b]=p.useState(null),[E,w]=p.useState(null),[C,A]=p.useState(null),[R,_]=p.useState(0),[N,G]=p.useState(0),[I,$]=p.useState(!1),[U,ee]=p.useState(!1),W=Oe(o,ue=>h(ue)),oe=vr(c);return T.jsx(SM,{scope:r,type:i,dir:oe,scrollHideDelay:f,scrollArea:m,viewport:v,onViewportChange:y,content:S,onContentChange:b,scrollbarX:E,onScrollbarXChange:w,scrollbarXEnabled:I,onScrollbarXEnabledChange:$,scrollbarY:C,onScrollbarYChange:A,scrollbarYEnabled:U,onScrollbarYEnabledChange:ee,onCornerWidthChange:_,onCornerHeightChange:G,children:T.jsx(ye.div,{dir:oe,...d,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":N+"px",...l.style}})})});KS.displayName=Ad;var IS="ScrollAreaViewport",QS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,children:i,nonce:c,...f}=l,d=Wt(IS,r),m=p.useRef(null),h=Oe(o,m,d.onViewportChange);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),T.jsx(ye.div,{"data-radix-scroll-area-viewport":"",...f,ref:h,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...l.style},children:T.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});QS.displayName=IS;var En="ScrollAreaScrollbar",bM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),{onScrollbarXEnabledChange:f,onScrollbarYEnabledChange:d}=c,m=l.orientation==="horizontal";return p.useEffect(()=>(m?f(!0):d(!0),()=>{m?f(!1):d(!1)}),[m,f,d]),c.type==="hover"?T.jsx(xM,{...i,ref:o,forceMount:r}):c.type==="scroll"?T.jsx(EM,{...i,ref:o,forceMount:r}):c.type==="auto"?T.jsx(ZS,{...i,ref:o,forceMount:r}):c.type==="always"?T.jsx(Md,{...i,ref:o}):null});bM.displayName=En;var xM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),[f,d]=p.useState(!1);return p.useEffect(()=>{const m=c.scrollArea;let h=0;if(m){const v=()=>{window.clearTimeout(h),d(!0)},y=()=>{h=window.setTimeout(()=>d(!1),c.scrollHideDelay)};return m.addEventListener("pointerenter",v),m.addEventListener("pointerleave",y),()=>{window.clearTimeout(h),m.removeEventListener("pointerenter",v),m.removeEventListener("pointerleave",y)}}},[c.scrollArea,c.scrollHideDelay]),T.jsx(ft,{present:r||f,children:T.jsx(ZS,{"data-state":f?"visible":"hidden",...i,ref:o})})}),EM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),f=l.orientation==="horizontal",d=Yu(()=>h("SCROLL_END"),100),[m,h]=yM("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(m==="idle"){const v=window.setTimeout(()=>h("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(v)}},[m,c.scrollHideDelay,h]),p.useEffect(()=>{const v=c.viewport,y=f?"scrollLeft":"scrollTop";if(v){let S=v[y];const b=()=>{const E=v[y];S!==E&&(h("SCROLL"),d()),S=E};return v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[c.viewport,f,h,d]),T.jsx(ft,{present:r||m!=="hidden",children:T.jsx(Md,{"data-state":m==="hidden"?"hidden":"visible",...i,ref:o,onPointerEnter:le(l.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:le(l.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),ZS=p.forwardRef((l,o)=>{const r=Wt(En,l.__scopeScrollArea),{forceMount:i,...c}=l,[f,d]=p.useState(!1),m=l.orientation==="horizontal",h=Yu(()=>{if(r.viewport){const v=r.viewport.offsetWidth<r.viewport.scrollWidth,y=r.viewport.offsetHeight<r.viewport.scrollHeight;d(m?v:y)}},10);return to(r.viewport,h),to(r.content,h),T.jsx(ft,{present:i||f,children:T.jsx(Md,{"data-state":f?"visible":"hidden",...c,ref:o})})}),Md=p.forwardRef((l,o)=>{const{orientation:r="vertical",...i}=l,c=Wt(En,l.__scopeScrollArea),f=p.useRef(null),d=p.useRef(0),[m,h]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=JS(m.viewport,m.content),y={...i,sizes:m,onSizesChange:h,hasThumb:v>0&&v<1,onThumbChange:b=>f.current=b,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:b=>d.current=b};function S(b,E){return _M(b,d.current,m,E)}return r==="horizontal"?T.jsx(CM,{...y,ref:o,onThumbPositionChange:()=>{if(c.viewport&&f.current){const b=c.viewport.scrollLeft,E=Rg(b,m,c.dir);f.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollLeft=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollLeft=S(b,c.dir))}}):r==="vertical"?T.jsx(wM,{...y,ref:o,onThumbPositionChange:()=>{if(c.viewport&&f.current){const b=c.viewport.scrollTop,E=Rg(b,m);f.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollTop=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollTop=S(b))}}):null}),CM=p.forwardRef((l,o)=>{const{sizes:r,onSizesChange:i,...c}=l,f=Wt(En,l.__scopeScrollArea),[d,m]=p.useState(),h=p.useRef(null),v=Oe(o,h,f.onScrollbarXChange);return p.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),T.jsx(kS,{"data-orientation":"horizontal",...c,ref:v,sizes:r,style:{bottom:0,left:f.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:f.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Gu(r)+"px",...l.style},onThumbPointerDown:y=>l.onThumbPointerDown(y.x),onDragScroll:y=>l.onDragScroll(y.x),onWheelScroll:(y,S)=>{if(f.viewport){const b=f.viewport.scrollLeft+y.deltaX;l.onWheelScroll(b),eb(b,S)&&y.preventDefault()}},onResize:()=>{h.current&&f.viewport&&d&&i({content:f.viewport.scrollWidth,viewport:f.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:vu(d.paddingLeft),paddingEnd:vu(d.paddingRight)}})}})}),wM=p.forwardRef((l,o)=>{const{sizes:r,onSizesChange:i,...c}=l,f=Wt(En,l.__scopeScrollArea),[d,m]=p.useState(),h=p.useRef(null),v=Oe(o,h,f.onScrollbarYChange);return p.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),T.jsx(kS,{"data-orientation":"vertical",...c,ref:v,sizes:r,style:{top:0,right:f.dir==="ltr"?0:void 0,left:f.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Gu(r)+"px",...l.style},onThumbPointerDown:y=>l.onThumbPointerDown(y.y),onDragScroll:y=>l.onDragScroll(y.y),onWheelScroll:(y,S)=>{if(f.viewport){const b=f.viewport.scrollTop+y.deltaY;l.onWheelScroll(b),eb(b,S)&&y.preventDefault()}},onResize:()=>{h.current&&f.viewport&&d&&i({content:f.viewport.scrollHeight,viewport:f.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:vu(d.paddingTop),paddingEnd:vu(d.paddingBottom)}})}})}),[RM,$S]=XS(En),kS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:c,onThumbChange:f,onThumbPointerUp:d,onThumbPointerDown:m,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:y,onResize:S,...b}=l,E=Wt(En,r),[w,C]=p.useState(null),A=Oe(o,W=>C(W)),R=p.useRef(null),_=p.useRef(""),N=E.viewport,G=i.content-i.viewport,I=ct(y),$=ct(h),U=Yu(S,10);function ee(W){if(R.current){const oe=W.clientX-R.current.left,ue=W.clientY-R.current.top;v({x:oe,y:ue})}}return p.useEffect(()=>{const W=oe=>{const ue=oe.target;(w==null?void 0:w.contains(ue))&&I(oe,G)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[N,w,G,I]),p.useEffect($,[i,$]),to(w,U),to(E.content,U),T.jsx(RM,{scope:r,scrollbar:w,hasThumb:c,onThumbChange:ct(f),onThumbPointerUp:ct(d),onThumbPositionChange:$,onThumbPointerDown:ct(m),children:T.jsx(ye.div,{...b,ref:A,style:{position:"absolute",...b.style},onPointerDown:le(l.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),R.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),ee(W))}),onPointerMove:le(l.onPointerMove,ee),onPointerUp:le(l.onPointerUp,W=>{const oe=W.target;oe.hasPointerCapture(W.pointerId)&&oe.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=_.current,E.viewport&&(E.viewport.style.scrollBehavior=""),R.current=null})})})}),hu="ScrollAreaThumb",TM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=$S(hu,l.__scopeScrollArea);return T.jsx(ft,{present:r||c.hasThumb,children:T.jsx(AM,{ref:o,...i})})}),AM=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,style:i,...c}=l,f=Wt(hu,r),d=$S(hu,r),{onThumbPositionChange:m}=d,h=Oe(o,S=>d.onThumbChange(S)),v=p.useRef(void 0),y=Yu(()=>{v.current&&(v.current(),v.current=void 0)},100);return p.useEffect(()=>{const S=f.viewport;if(S){const b=()=>{if(y(),!v.current){const E=OM(S,m);v.current=E,m()}};return m(),S.addEventListener("scroll",b),()=>S.removeEventListener("scroll",b)}},[f.viewport,y,m]),T.jsx(ye.div,{"data-state":d.hasThumb?"visible":"hidden",...c,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:le(l.onPointerDownCapture,S=>{const E=S.target.getBoundingClientRect(),w=S.clientX-E.left,C=S.clientY-E.top;d.onThumbPointerDown({x:w,y:C})}),onPointerUp:le(l.onPointerUp,d.onThumbPointerUp)})});TM.displayName=hu;var _d="ScrollAreaCorner",FS=p.forwardRef((l,o)=>{const r=Wt(_d,l.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?T.jsx(MM,{...l,ref:o}):null});FS.displayName=_d;var MM=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,...i}=l,c=Wt(_d,r),[f,d]=p.useState(0),[m,h]=p.useState(0),v=!!(f&&m);return to(c.scrollbarX,()=>{var S;const y=((S=c.scrollbarX)==null?void 0:S.offsetHeight)||0;c.onCornerHeightChange(y),h(y)}),to(c.scrollbarY,()=>{var S;const y=((S=c.scrollbarY)==null?void 0:S.offsetWidth)||0;c.onCornerWidthChange(y),d(y)}),v?T.jsx(ye.div,{...i,ref:o,style:{width:f,height:m,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...l.style}}):null});function vu(l){return l?parseInt(l,10):0}function JS(l,o){const r=l/o;return isNaN(r)?0:r}function Gu(l){const o=JS(l.viewport,l.content),r=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,i=(l.scrollbar.size-r)*o;return Math.max(i,18)}function _M(l,o,r,i="ltr"){const c=Gu(r),f=c/2,d=o||f,m=c-d,h=r.scrollbar.paddingStart+d,v=r.scrollbar.size-r.scrollbar.paddingEnd-m,y=r.content-r.viewport,S=i==="ltr"?[0,y]:[y*-1,0];return WS([h,v],S)(l)}function Rg(l,o,r="ltr"){const i=Gu(o),c=o.scrollbar.paddingStart+o.scrollbar.paddingEnd,f=o.scrollbar.size-c,d=o.content-o.viewport,m=f-i,h=r==="ltr"?[0,d]:[d*-1,0],v=Af(l,h);return WS([0,d],[0,m])(v)}function WS(l,o){return r=>{if(l[0]===l[1]||o[0]===o[1])return o[0];const i=(o[1]-o[0])/(l[1]-l[0]);return o[0]+i*(r-l[0])}}function eb(l,o){return l>0&&l<o}var OM=(l,o=()=>{})=>{let r={left:l.scrollLeft,top:l.scrollTop},i=0;return function c(){const f={left:l.scrollLeft,top:l.scrollTop},d=r.left!==f.left,m=r.top!==f.top;(d||m)&&o(),r=f,i=window.requestAnimationFrame(c)}(),()=>window.cancelAnimationFrame(i)};function Yu(l,o){const r=ct(l),i=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),p.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,o)},[r,o])}function to(l,o){const r=ct(o);ht(()=>{let i=0;if(l){const c=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return c.observe(l),()=>{window.cancelAnimationFrame(i),c.unobserve(l)}}},[l,r])}var VO=KS,qO=QS,XO=FS,Od="Tabs",[DM]=Jt(Od,[Hu]),tb=Hu(),[NM,Dd]=DM(Od),nb=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,onValueChange:c,defaultValue:f,orientation:d="horizontal",dir:m,activationMode:h="automatic",...v}=l,y=vr(m),[S,b]=xl({prop:i,onChange:c,defaultProp:f});return T.jsx(NM,{scope:r,baseId:kt(),value:S,onValueChange:b,orientation:d,dir:y,activationMode:h,children:T.jsx(ye.div,{dir:y,"data-orientation":d,...v,ref:o})})});nb.displayName=Od;var lb="TabsList",ab=p.forwardRef((l,o)=>{const{__scopeTabs:r,loop:i=!0,...c}=l,f=Dd(lb,r),d=tb(r);return T.jsx(q0,{asChild:!0,...d,orientation:f.orientation,dir:f.dir,loop:i,children:T.jsx(ye.div,{role:"tablist","aria-orientation":f.orientation,...c,ref:o})})});ab.displayName=lb;var ob="TabsTrigger",rb=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,disabled:c=!1,...f}=l,d=Dd(ob,r),m=tb(r),h=cb(d.baseId,i),v=sb(d.baseId,i),y=i===d.value;return T.jsx(X0,{asChild:!0,...m,focusable:!c,active:y,children:T.jsx(ye.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":v,"data-state":y?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:h,...f,ref:o,onMouseDown:le(l.onMouseDown,S=>{!c&&S.button===0&&S.ctrlKey===!1?d.onValueChange(i):S.preventDefault()}),onKeyDown:le(l.onKeyDown,S=>{[" ","Enter"].includes(S.key)&&d.onValueChange(i)}),onFocus:le(l.onFocus,()=>{const S=d.activationMode!=="manual";!y&&!c&&S&&d.onValueChange(i)})})})});rb.displayName=ob;var ib="TabsContent",ub=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,forceMount:c,children:f,...d}=l,m=Dd(ib,r),h=cb(m.baseId,i),v=sb(m.baseId,i),y=i===m.value,S=p.useRef(y);return p.useEffect(()=>{const b=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(b)},[]),T.jsx(ft,{present:c||y,children:({present:b})=>T.jsx(ye.div,{"data-state":y?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:v,tabIndex:0,...d,ref:o,style:{...l.style,animationDuration:S.current?"0s":void 0},children:b&&f})})});ub.displayName=ib;function cb(l,o){return`${l}-trigger-${o}`}function sb(l,o){return`${l}-content-${o}`}var KO=nb,IO=ab,QO=rb,ZO=ub,Nd="Collapsible",[zM]=Jt(Nd),[LM,zd]=zM(Nd),fb=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,open:i,defaultOpen:c,disabled:f,onOpenChange:d,...m}=l,[h=!1,v]=xl({prop:i,defaultProp:c,onChange:d});return T.jsx(LM,{scope:r,disabled:f,contentId:kt(),open:h,onOpenToggle:p.useCallback(()=>v(y=>!y),[v]),children:T.jsx(ye.div,{"data-state":Ud(h),"data-disabled":f?"":void 0,...m,ref:o})})});fb.displayName=Nd;var db="CollapsibleTrigger",UM=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,...i}=l,c=zd(db,r);return T.jsx(ye.button,{type:"button","aria-controls":c.contentId,"aria-expanded":c.open||!1,"data-state":Ud(c.open),"data-disabled":c.disabled?"":void 0,disabled:c.disabled,...i,ref:o,onClick:le(l.onClick,c.onOpenToggle)})});UM.displayName=db;var Ld="CollapsibleContent",HM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=zd(Ld,l.__scopeCollapsible);return T.jsx(ft,{present:r||c.open,children:({present:f})=>T.jsx(jM,{...i,ref:o,present:f})})});HM.displayName=Ld;var jM=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,present:i,children:c,...f}=l,d=zd(Ld,r),[m,h]=p.useState(i),v=p.useRef(null),y=Oe(o,v),S=p.useRef(0),b=S.current,E=p.useRef(0),w=E.current,C=d.open||m,A=p.useRef(C),R=p.useRef(void 0);return p.useEffect(()=>{const _=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(_)},[]),ht(()=>{const _=v.current;if(_){R.current=R.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const N=_.getBoundingClientRect();S.current=N.height,E.current=N.width,A.current||(_.style.transitionDuration=R.current.transitionDuration,_.style.animationName=R.current.animationName),h(i)}},[d.open,i]),T.jsx(ye.div,{"data-state":Ud(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!C,...f,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...l.style},children:C&&c})});function Ud(l){return l?"open":"closed"}var $O=fb,Hd="DropdownMenu",[BM]=Jt(Hd,[ju]),pt=ju(),[PM,mb]=BM(Hd),hb=l=>{const{__scopeDropdownMenu:o,children:r,dir:i,open:c,defaultOpen:f,onOpenChange:d,modal:m=!0}=l,h=pt(o),v=p.useRef(null),[y=!1,S]=xl({prop:c,defaultProp:f,onChange:d});return T.jsx(PM,{scope:o,triggerId:kt(),triggerRef:v,contentId:kt(),open:y,onOpenChange:S,onOpenToggle:p.useCallback(()=>S(b=>!b),[S]),modal:m,children:T.jsx(mS,{...h,open:y,onOpenChange:S,dir:i,modal:m,children:r})})};hb.displayName=Hd;var vb="DropdownMenuTrigger",pb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...c}=l,f=mb(vb,r),d=pt(r);return T.jsx(hS,{asChild:!0,...d,children:T.jsx(ye.button,{type:"button",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...c,ref:jg(o,f.triggerRef),onPointerDown:le(l.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(f.onOpenToggle(),f.open||m.preventDefault())}),onKeyDown:le(l.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&f.onOpenToggle(),m.key==="ArrowDown"&&f.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})});pb.displayName=vb;var GM="DropdownMenuPortal",gb=l=>{const{__scopeDropdownMenu:o,...r}=l,i=pt(o);return T.jsx(vS,{...i,...r})};gb.displayName=GM;var yb="DropdownMenuContent",Sb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=mb(yb,r),f=pt(r),d=p.useRef(!1);return T.jsx(pS,{id:c.contentId,"aria-labelledby":c.triggerId,...f,...i,ref:o,onCloseAutoFocus:le(l.onCloseAutoFocus,m=>{var h;d.current||(h=c.triggerRef.current)==null||h.focus(),d.current=!1,m.preventDefault()}),onInteractOutside:le(l.onInteractOutside,m=>{const h=m.detail.originalEvent,v=h.button===0&&h.ctrlKey===!0,y=h.button===2||v;(!c.modal||y)&&(d.current=!0)}),style:{...l.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)"}})});Sb.displayName=yb;var YM="DropdownMenuGroup",VM=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(gS,{...c,...i,ref:o})});VM.displayName=YM;var qM="DropdownMenuLabel",bb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(yS,{...c,...i,ref:o})});bb.displayName=qM;var XM="DropdownMenuItem",xb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(SS,{...c,...i,ref:o})});xb.displayName=XM;var KM="DropdownMenuCheckboxItem",Eb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(bS,{...c,...i,ref:o})});Eb.displayName=KM;var IM="DropdownMenuRadioGroup",QM=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(xS,{...c,...i,ref:o})});QM.displayName=IM;var ZM="DropdownMenuRadioItem",Cb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(ES,{...c,...i,ref:o})});Cb.displayName=ZM;var $M="DropdownMenuItemIndicator",wb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(CS,{...c,...i,ref:o})});wb.displayName=$M;var kM="DropdownMenuSeparator",Rb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(wS,{...c,...i,ref:o})});Rb.displayName=kM;var FM="DropdownMenuArrow",JM=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(RS,{...c,...i,ref:o})});JM.displayName=FM;var WM="DropdownMenuSubTrigger",Tb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(TS,{...c,...i,ref:o})});Tb.displayName=WM;var e_="DropdownMenuSubContent",Ab=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(AS,{...c,...i,ref:o,style:{...l.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)"}})});Ab.displayName=e_;var kO=hb,FO=pb,JO=gb,WO=Sb,eD=bb,tD=xb,nD=Eb,lD=Cb,aD=wb,oD=Rb,rD=Tb,iD=Ab;const{createElement:no,createContext:t_,forwardRef:Mb,useCallback:Rt,useContext:_b,useEffect:Zl,useImperativeHandle:Ob,useLayoutEffect:n_,useMemo:l_,useRef:Tt,useState:ka}=Yg,Tg=Yg[`useId${Math.random()}`.slice(0,5)],a_=n_,Vu=t_(null);Vu.displayName="PanelGroupContext";const $l=a_,o_=typeof Tg=="function"?Tg:()=>null;let r_=0;function jd(l=null){const o=o_(),r=Tt(l||o||null);return r.current===null&&(r.current=""+r_++),l??r.current}function Db({children:l,className:o="",collapsedSize:r,collapsible:i,defaultSize:c,forwardedRef:f,id:d,maxSize:m,minSize:h,onCollapse:v,onExpand:y,onResize:S,order:b,style:E,tagName:w="div",...C}){const A=_b(Vu);if(A===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:R,expandPanel:_,getPanelSize:N,getPanelStyle:G,groupId:I,isPanelCollapsed:$,reevaluatePanelConstraints:U,registerPanel:ee,resizePanel:W,unregisterPanel:oe}=A,ue=jd(d),re=Tt({callbacks:{onCollapse:v,onExpand:y,onResize:S},constraints:{collapsedSize:r,collapsible:i,defaultSize:c,maxSize:m,minSize:h},id:ue,idIsFromProps:d!==void 0,order:b});Tt({didLogMissingDefaultSizeWarning:!1}),$l(()=>{const{callbacks:se,constraints:me}=re.current,z={...me};re.current.id=ue,re.current.idIsFromProps=d!==void 0,re.current.order=b,se.onCollapse=v,se.onExpand=y,se.onResize=S,me.collapsedSize=r,me.collapsible=i,me.defaultSize=c,me.maxSize=m,me.minSize=h,(z.collapsedSize!==me.collapsedSize||z.collapsible!==me.collapsible||z.maxSize!==me.maxSize||z.minSize!==me.minSize)&&U(re.current,z)}),$l(()=>{const se=re.current;return ee(se),()=>{oe(se)}},[b,ue,ee,oe]),Ob(f,()=>({collapse:()=>{R(re.current)},expand:se=>{_(re.current,se)},getId(){return ue},getSize(){return N(re.current)},isCollapsed(){return $(re.current)},isExpanded(){return!$(re.current)},resize:se=>{W(re.current,se)}}),[R,_,N,$,ue,W]);const ge=G(re.current,c);return no(w,{...C,children:l,className:o,id:d,style:{...ge,...E},"data-panel":"","data-panel-collapsible":i||void 0,"data-panel-group-id":I,"data-panel-id":ue,"data-panel-size":parseFloat(""+ge.flexGrow).toFixed(1)})}const i_=Mb((l,o)=>no(Db,{...l,forwardedRef:o}));Db.displayName="Panel";i_.displayName="forwardRef(Panel)";let qf=null,Ql=null;function u_(l,o){if(o){const r=(o&Hb)!==0,i=(o&jb)!==0,c=(o&Bb)!==0,f=(o&Pb)!==0;if(r)return c?"se-resize":f?"ne-resize":"e-resize";if(i)return c?"sw-resize":f?"nw-resize":"w-resize";if(c)return"s-resize";if(f)return"n-resize"}switch(l){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function c_(){Ql!==null&&(document.head.removeChild(Ql),qf=null,Ql=null)}function Rf(l,o){const r=u_(l,o);qf!==r&&(qf=r,Ql===null&&(Ql=document.createElement("style"),document.head.appendChild(Ql)),Ql.innerHTML=`*{cursor: ${r}!important;}`)}function Nb(l){return l.type==="keydown"}function zb(l){return l.type.startsWith("pointer")}function Lb(l){return l.type.startsWith("mouse")}function qu(l){if(zb(l)){if(l.isPrimary)return{x:l.clientX,y:l.clientY}}else if(Lb(l))return{x:l.clientX,y:l.clientY};return{x:1/0,y:1/0}}function s_(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function f_(l,o,r){return l.x<o.x+o.width&&l.x+l.width>o.x&&l.y<o.y+o.height&&l.y+l.height>o.y}function d_(l,o){if(l===o)throw new Error("Cannot compare node with itself");const r={a:_g(l),b:_g(o)};let i;for(;r.a.at(-1)===r.b.at(-1);)l=r.a.pop(),o=r.b.pop(),i=l;we(i,"Stacking order can only be calculated for elements with a common ancestor");const c={a:Mg(Ag(r.a)),b:Mg(Ag(r.b))};if(c.a===c.b){const f=i.childNodes,d={a:r.a.at(-1),b:r.b.at(-1)};let m=f.length;for(;m--;){const h=f[m];if(h===d.a)return 1;if(h===d.b)return-1}}return Math.sign(c.a-c.b)}const m_=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function h_(l){var o;const r=getComputedStyle((o=Ub(l))!==null&&o!==void 0?o:l).display;return r==="flex"||r==="inline-flex"}function v_(l){const o=getComputedStyle(l);return!!(o.position==="fixed"||o.zIndex!=="auto"&&(o.position!=="static"||h_(l))||+o.opacity<1||"transform"in o&&o.transform!=="none"||"webkitTransform"in o&&o.webkitTransform!=="none"||"mixBlendMode"in o&&o.mixBlendMode!=="normal"||"filter"in o&&o.filter!=="none"||"webkitFilter"in o&&o.webkitFilter!=="none"||"isolation"in o&&o.isolation==="isolate"||m_.test(o.willChange)||o.webkitOverflowScrolling==="touch")}function Ag(l){let o=l.length;for(;o--;){const r=l[o];if(we(r,"Missing node"),v_(r))return r}return null}function Mg(l){return l&&Number(getComputedStyle(l).zIndex)||0}function _g(l){const o=[];for(;l;)o.push(l),l=Ub(l);return o}function Ub(l){const{parentNode:o}=l;return o&&o instanceof ShadowRoot?o.host:o}const Hb=1,jb=2,Bb=4,Pb=8,p_=s_()==="coarse";let rn=[],Fa=!1,bl=new Map,Xu=new Map;const mr=new Set;function g_(l,o,r,i,c){var f;const{ownerDocument:d}=o,m={direction:r,element:o,hitAreaMargins:i,setResizeHandlerState:c},h=(f=bl.get(d))!==null&&f!==void 0?f:0;return bl.set(d,h+1),mr.add(m),pu(),function(){var y;Xu.delete(l),mr.delete(m);const S=(y=bl.get(d))!==null&&y!==void 0?y:1;if(bl.set(d,S-1),pu(),S===1&&bl.delete(d),rn.includes(m)){const b=rn.indexOf(m);b>=0&&rn.splice(b,1),Pd(),c("up",!0,null)}}}function Og(l){const{target:o}=l,{x:r,y:i}=qu(l);Fa=!0,Bd({target:o,x:r,y:i}),pu(),rn.length>0&&(gu("down",l),l.preventDefault(),l.stopPropagation())}function ar(l){const{x:o,y:r}=qu(l);if(Fa&&l.buttons===0&&(Fa=!1,gu("up",l)),!Fa){const{target:i}=l;Bd({target:i,x:o,y:r})}gu("move",l),Pd(),rn.length>0&&l.preventDefault()}function Xa(l){const{target:o}=l,{x:r,y:i}=qu(l);Xu.clear(),Fa=!1,rn.length>0&&l.preventDefault(),gu("up",l),Bd({target:o,x:r,y:i}),Pd(),pu()}function Bd({target:l,x:o,y:r}){rn.splice(0);let i=null;(l instanceof HTMLElement||l instanceof SVGElement)&&(i=l),mr.forEach(c=>{const{element:f,hitAreaMargins:d}=c,m=f.getBoundingClientRect(),{bottom:h,left:v,right:y,top:S}=m,b=p_?d.coarse:d.fine;if(o>=v-b&&o<=y+b&&r>=S-b&&r<=h+b){if(i!==null&&document.contains(i)&&f!==i&&!f.contains(i)&&!i.contains(f)&&d_(i,f)>0){let w=i,C=!1;for(;w&&!w.contains(f);){if(f_(w.getBoundingClientRect(),m)){C=!0;break}w=w.parentElement}if(C)return}rn.push(c)}})}function Tf(l,o){Xu.set(l,o)}function Pd(){let l=!1,o=!1;rn.forEach(i=>{const{direction:c}=i;c==="horizontal"?l=!0:o=!0});let r=0;Xu.forEach(i=>{r|=i}),l&&o?Rf("intersection",r):l?Rf("horizontal",r):o?Rf("vertical",r):c_()}function pu(){bl.forEach((l,o)=>{const{body:r}=o;r.removeEventListener("contextmenu",Xa),r.removeEventListener("pointerdown",Og),r.removeEventListener("pointerleave",ar),r.removeEventListener("pointermove",ar)}),window.removeEventListener("pointerup",Xa),window.removeEventListener("pointercancel",Xa),mr.size>0&&(Fa?(rn.length>0&&bl.forEach((l,o)=>{const{body:r}=o;l>0&&(r.addEventListener("contextmenu",Xa),r.addEventListener("pointerleave",ar),r.addEventListener("pointermove",ar))}),window.addEventListener("pointerup",Xa),window.addEventListener("pointercancel",Xa)):bl.forEach((l,o)=>{const{body:r}=o;l>0&&(r.addEventListener("pointerdown",Og,{capture:!0}),r.addEventListener("pointermove",ar))}))}function gu(l,o){mr.forEach(r=>{const{setResizeHandlerState:i}=r,c=rn.includes(r);i(l,c,o)})}function y_(){const[l,o]=ka(0);return Rt(()=>o(r=>r+1),[])}function we(l,o){if(!l)throw console.error(o),Error(o)}const Gd=10;function Wl(l,o,r=Gd){return l.toFixed(r)===o.toFixed(r)?0:l>o?1:-1}function Vn(l,o,r=Gd){return Wl(l,o,r)===0}function jt(l,o,r){return Wl(l,o,r)===0}function S_(l,o,r){if(l.length!==o.length)return!1;for(let i=0;i<l.length;i++){const c=l[i],f=o[i];if(!jt(c,f,r))return!1}return!0}function Qa({panelConstraints:l,panelIndex:o,size:r}){const i=l[o];we(i!=null,`Panel constraints not found for index ${o}`);let{collapsedSize:c=0,collapsible:f,maxSize:d=100,minSize:m=0}=i;if(Wl(r,m)<0)if(f){const h=(c+m)/2;Wl(r,h)<0?r=c:r=m}else r=m;return r=Math.min(d,r),r=parseFloat(r.toFixed(Gd)),r}function ir({delta:l,initialLayout:o,panelConstraints:r,pivotIndices:i,prevLayout:c,trigger:f}){if(jt(l,0))return o;const d=[...o],[m,h]=i;we(m!=null,"Invalid first pivot index"),we(h!=null,"Invalid second pivot index");let v=0;if(f==="keyboard"){{const S=l<0?h:m,b=r[S];we(b,`Panel constraints not found for index ${S}`);const{collapsedSize:E=0,collapsible:w,minSize:C=0}=b;if(w){const A=o[S];if(we(A!=null,`Previous layout not found for panel index ${S}`),jt(A,E)){const R=C-A;Wl(R,Math.abs(l))>0&&(l=l<0?0-R:R)}}}{const S=l<0?m:h,b=r[S];we(b,`No panel constraints found for index ${S}`);const{collapsedSize:E=0,collapsible:w,minSize:C=0}=b;if(w){const A=o[S];if(we(A!=null,`Previous layout not found for panel index ${S}`),jt(A,C)){const R=A-E;Wl(R,Math.abs(l))>0&&(l=l<0?0-R:R)}}}}{const S=l<0?1:-1;let b=l<0?h:m,E=0;for(;;){const C=o[b];we(C!=null,`Previous layout not found for panel index ${b}`);const R=Qa({panelConstraints:r,panelIndex:b,size:100})-C;if(E+=R,b+=S,b<0||b>=r.length)break}const w=Math.min(Math.abs(l),Math.abs(E));l=l<0?0-w:w}{let b=l<0?m:h;for(;b>=0&&b<r.length;){const E=Math.abs(l)-Math.abs(v),w=o[b];we(w!=null,`Previous layout not found for panel index ${b}`);const C=w-E,A=Qa({panelConstraints:r,panelIndex:b,size:C});if(!jt(w,A)&&(v+=w-A,d[b]=A,v.toPrecision(3).localeCompare(Math.abs(l).toPrecision(3),void 0,{numeric:!0})>=0))break;l<0?b--:b++}}if(S_(c,d))return c;{const S=l<0?h:m,b=o[S];we(b!=null,`Previous layout not found for panel index ${S}`);const E=b+v,w=Qa({panelConstraints:r,panelIndex:S,size:E});if(d[S]=w,!jt(w,E)){let C=E-w,R=l<0?h:m;for(;R>=0&&R<r.length;){const _=d[R];we(_!=null,`Previous layout not found for panel index ${R}`);const N=_+C,G=Qa({panelConstraints:r,panelIndex:R,size:N});if(jt(_,G)||(C-=G-_,d[R]=G),jt(C,0))break;l>0?R--:R++}}}const y=d.reduce((S,b)=>b+S,0);return jt(y,100)?d:c}function b_({layout:l,panelsArray:o,pivotIndices:r}){let i=0,c=100,f=0,d=0;const m=r[0];we(m!=null,"No pivot index found"),o.forEach((S,b)=>{const{constraints:E}=S,{maxSize:w=100,minSize:C=0}=E;b===m?(i=C,c=w):(f+=C,d+=w)});const h=Math.min(c,100-f),v=Math.max(i,100-d),y=l[m];return{valueMax:h,valueMin:v,valueNow:y}}function hr(l,o=document){return Array.from(o.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${l}"]`))}function Gb(l,o,r=document){const c=hr(l,r).findIndex(f=>f.getAttribute("data-panel-resize-handle-id")===o);return c??null}function Yb(l,o,r){const i=Gb(l,o,r);return i!=null?[i,i+1]:[-1,-1]}function Vb(l,o=document){var r;if(o instanceof HTMLElement&&(o==null||(r=o.dataset)===null||r===void 0?void 0:r.panelGroupId)==l)return o;const i=o.querySelector(`[data-panel-group][data-panel-group-id="${l}"]`);return i||null}function Ku(l,o=document){const r=o.querySelector(`[data-panel-resize-handle-id="${l}"]`);return r||null}function x_(l,o,r,i=document){var c,f,d,m;const h=Ku(o,i),v=hr(l,i),y=h?v.indexOf(h):-1,S=(c=(f=r[y])===null||f===void 0?void 0:f.id)!==null&&c!==void 0?c:null,b=(d=(m=r[y+1])===null||m===void 0?void 0:m.id)!==null&&d!==void 0?d:null;return[S,b]}function E_({committedValuesRef:l,eagerValuesRef:o,groupId:r,layout:i,panelDataArray:c,panelGroupElement:f,setLayout:d}){Tt({didWarnAboutMissingResizeHandle:!1}),$l(()=>{if(!f)return;const m=hr(r,f);for(let h=0;h<c.length-1;h++){const{valueMax:v,valueMin:y,valueNow:S}=b_({layout:i,panelsArray:c,pivotIndices:[h,h+1]}),b=m[h];if(b!=null){const E=c[h];we(E,`No panel data found for index "${h}"`),b.setAttribute("aria-controls",E.id),b.setAttribute("aria-valuemax",""+Math.round(v)),b.setAttribute("aria-valuemin",""+Math.round(y)),b.setAttribute("aria-valuenow",S!=null?""+Math.round(S):"")}}return()=>{m.forEach((h,v)=>{h.removeAttribute("aria-controls"),h.removeAttribute("aria-valuemax"),h.removeAttribute("aria-valuemin"),h.removeAttribute("aria-valuenow")})}},[r,i,c,f]),Zl(()=>{if(!f)return;const m=o.current;we(m,"Eager values not found");const{panelDataArray:h}=m,v=Vb(r,f);we(v!=null,`No group found for id "${r}"`);const y=hr(r,f);we(y,`No resize handles found for group id "${r}"`);const S=y.map(b=>{const E=b.getAttribute("data-panel-resize-handle-id");we(E,"Resize handle element has no handle id attribute");const[w,C]=x_(r,E,h,f);if(w==null||C==null)return()=>{};const A=R=>{if(!R.defaultPrevented)switch(R.key){case"Enter":{R.preventDefault();const _=h.findIndex(N=>N.id===w);if(_>=0){const N=h[_];we(N,`No panel data found for index ${_}`);const G=i[_],{collapsedSize:I=0,collapsible:$,minSize:U=0}=N.constraints;if(G!=null&&$){const ee=ir({delta:jt(G,I)?U-I:I-G,initialLayout:i,panelConstraints:h.map(W=>W.constraints),pivotIndices:Yb(r,E,f),prevLayout:i,trigger:"keyboard"});i!==ee&&d(ee)}}break}}};return b.addEventListener("keydown",A),()=>{b.removeEventListener("keydown",A)}});return()=>{S.forEach(b=>b())}},[f,l,o,r,i,c,d])}function Dg(l,o){if(l.length!==o.length)return!1;for(let r=0;r<l.length;r++)if(l[r]!==o[r])return!1;return!0}function qb(l,o){const r=l==="horizontal",{x:i,y:c}=qu(o);return r?i:c}function C_(l,o,r,i,c){const f=r==="horizontal",d=Ku(o,c);we(d,`No resize handle element found for id "${o}"`);const m=d.getAttribute("data-panel-group-id");we(m,"Resize handle element has no group id attribute");let{initialCursorPosition:h}=i;const v=qb(r,l),y=Vb(m,c);we(y,`No group element found for id "${m}"`);const S=y.getBoundingClientRect(),b=f?S.width:S.height;return(v-h)/b*100}function w_(l,o,r,i,c,f){if(Nb(l)){const d=r==="horizontal";let m=0;l.shiftKey?m=100:c!=null?m=c:m=10;let h=0;switch(l.key){case"ArrowDown":h=d?0:m;break;case"ArrowLeft":h=d?-m:0;break;case"ArrowRight":h=d?m:0;break;case"ArrowUp":h=d?0:-m;break;case"End":h=100;break;case"Home":h=-100;break}return h}else return i==null?0:C_(l,o,r,i,f)}function R_({panelDataArray:l}){const o=Array(l.length),r=l.map(f=>f.constraints);let i=0,c=100;for(let f=0;f<l.length;f++){const d=r[f];we(d,`Panel constraints not found for index ${f}`);const{defaultSize:m}=d;m!=null&&(i++,o[f]=m,c-=m)}for(let f=0;f<l.length;f++){const d=r[f];we(d,`Panel constraints not found for index ${f}`);const{defaultSize:m}=d;if(m!=null)continue;const h=l.length-i,v=c/h;i++,o[f]=v,c-=v}return o}function Ka(l,o,r){o.forEach((i,c)=>{const f=l[c];we(f,`Panel data not found for index ${c}`);const{callbacks:d,constraints:m,id:h}=f,{collapsedSize:v=0,collapsible:y}=m,S=r[h];if(S==null||i!==S){r[h]=i;const{onCollapse:b,onExpand:E,onResize:w}=d;w&&w(i,S),y&&(b||E)&&(E&&(S==null||Vn(S,v))&&!Vn(i,v)&&E(),b&&(S==null||!Vn(S,v))&&Vn(i,v)&&b())}})}function Wi(l,o){if(l.length!==o.length)return!1;for(let r=0;r<l.length;r++)if(l[r]!=o[r])return!1;return!0}function T_({defaultSize:l,dragState:o,layout:r,panelData:i,panelIndex:c,precision:f=3}){const d=r[c];let m;return d==null?m=l!=null?l.toPrecision(f):"1":i.length===1?m="1":m=d.toPrecision(f),{flexBasis:0,flexGrow:m,flexShrink:1,overflow:"hidden",pointerEvents:o!==null?"none":void 0}}function A_(l,o=10){let r=null;return(...c)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{l(...c)},o)}}function Ng(l){try{if(typeof localStorage<"u")l.getItem=o=>localStorage.getItem(o),l.setItem=(o,r)=>{localStorage.setItem(o,r)};else throw new Error("localStorage not supported in this environment")}catch(o){console.error(o),l.getItem=()=>null,l.setItem=()=>{}}}function Xb(l){return`react-resizable-panels:${l}`}function Kb(l){return l.map(o=>{const{constraints:r,id:i,idIsFromProps:c,order:f}=o;return c?i:f?`${f}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((o,r)=>o.localeCompare(r)).join(",")}function Ib(l,o){try{const r=Xb(l),i=o.getItem(r);if(i){const c=JSON.parse(i);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function M_(l,o,r){var i,c;const f=(i=Ib(l,r))!==null&&i!==void 0?i:{},d=Kb(o);return(c=f[d])!==null&&c!==void 0?c:null}function __(l,o,r,i,c){var f;const d=Xb(l),m=Kb(o),h=(f=Ib(l,c))!==null&&f!==void 0?f:{};h[m]={expandToSizes:Object.fromEntries(r.entries()),layout:i};try{c.setItem(d,JSON.stringify(h))}catch(v){console.error(v)}}function zg({layout:l,panelConstraints:o}){const r=[...l],i=r.reduce((f,d)=>f+d,0);if(r.length!==o.length)throw Error(`Invalid ${o.length} panel layout: ${r.map(f=>`${f}%`).join(", ")}`);if(!jt(i,100)&&r.length>0)for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=100/i*d;r[f]=m}let c=0;for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=Qa({panelConstraints:o,panelIndex:f,size:d});d!=m&&(c+=d-m,r[f]=m)}if(!jt(c,0))for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=d+c,h=Qa({panelConstraints:o,panelIndex:f,size:m});if(d!==h&&(c-=h-d,r[f]=h,jt(c,0)))break}return r}const O_=100,ur={getItem:l=>(Ng(ur),ur.getItem(l)),setItem:(l,o)=>{Ng(ur),ur.setItem(l,o)}},Lg={};function Qb({autoSaveId:l=null,children:o,className:r="",direction:i,forwardedRef:c,id:f=null,onLayout:d=null,keyboardResizeBy:m=null,storage:h=ur,style:v,tagName:y="div",...S}){const b=jd(f),E=Tt(null),[w,C]=ka(null),[A,R]=ka([]),_=y_(),N=Tt({}),G=Tt(new Map),I=Tt(0),$=Tt({autoSaveId:l,direction:i,dragState:w,id:b,keyboardResizeBy:m,onLayout:d,storage:h}),U=Tt({layout:A,panelDataArray:[],panelDataArrayChanged:!1});Tt({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),Ob(c,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:P}=U.current;return P},setLayout:P=>{const{onLayout:Q}=$.current,{layout:ne,panelDataArray:te}=U.current,q=zg({layout:P,panelConstraints:te.map(ae=>ae.constraints)});Dg(ne,q)||(R(q),U.current.layout=q,Q&&Q(q),Ka(te,q,N.current))}}),[]),$l(()=>{$.current.autoSaveId=l,$.current.direction=i,$.current.dragState=w,$.current.id=b,$.current.onLayout=d,$.current.storage=h}),E_({committedValuesRef:$,eagerValuesRef:U,groupId:b,layout:A,panelDataArray:U.current.panelDataArray,setLayout:R,panelGroupElement:E.current}),Zl(()=>{const{panelDataArray:P}=U.current;if(l){if(A.length===0||A.length!==P.length)return;let Q=Lg[l];Q==null&&(Q=A_(__,O_),Lg[l]=Q);const ne=[...P],te=new Map(G.current);Q(l,ne,te,A,h)}},[l,A,h]),Zl(()=>{});const ee=Rt(P=>{const{onLayout:Q}=$.current,{layout:ne,panelDataArray:te}=U.current;if(P.constraints.collapsible){const q=te.map(Se=>Se.constraints),{collapsedSize:ae=0,panelSize:ie,pivotIndices:he}=Il(te,P,ne);if(we(ie!=null,`Panel size not found for panel "${P.id}"`),!Vn(ie,ae)){G.current.set(P.id,ie);const xe=Ia(te,P)===te.length-1?ie-ae:ae-ie,Re=ir({delta:xe,initialLayout:ne,panelConstraints:q,pivotIndices:he,prevLayout:ne,trigger:"imperative-api"});Wi(ne,Re)||(R(Re),U.current.layout=Re,Q&&Q(Re),Ka(te,Re,N.current))}}},[]),W=Rt((P,Q)=>{const{onLayout:ne}=$.current,{layout:te,panelDataArray:q}=U.current;if(P.constraints.collapsible){const ae=q.map(Ue=>Ue.constraints),{collapsedSize:ie=0,panelSize:he=0,minSize:Se=0,pivotIndices:xe}=Il(q,P,te),Re=Q??Se;if(Vn(he,ie)){const Ue=G.current.get(P.id),dt=Ue!=null&&Ue>=Re?Ue:Re,en=Ia(q,P)===q.length-1?he-dt:dt-he,We=ir({delta:en,initialLayout:te,panelConstraints:ae,pivotIndices:xe,prevLayout:te,trigger:"imperative-api"});Wi(te,We)||(R(We),U.current.layout=We,ne&&ne(We),Ka(q,We,N.current))}}},[]),oe=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{panelSize:te}=Il(ne,P,Q);return we(te!=null,`Panel size not found for panel "${P.id}"`),te},[]),ue=Rt((P,Q)=>{const{panelDataArray:ne}=U.current,te=Ia(ne,P);return T_({defaultSize:Q,dragState:w,layout:A,panelData:ne,panelIndex:te})},[w,A]),re=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{collapsedSize:te=0,collapsible:q,panelSize:ae}=Il(ne,P,Q);return we(ae!=null,`Panel size not found for panel "${P.id}"`),q===!0&&Vn(ae,te)},[]),ge=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{collapsedSize:te=0,collapsible:q,panelSize:ae}=Il(ne,P,Q);return we(ae!=null,`Panel size not found for panel "${P.id}"`),!q||Wl(ae,te)>0},[]),se=Rt(P=>{const{panelDataArray:Q}=U.current;Q.push(P),Q.sort((ne,te)=>{const q=ne.order,ae=te.order;return q==null&&ae==null?0:q==null?-1:ae==null?1:q-ae}),U.current.panelDataArrayChanged=!0,_()},[_]);$l(()=>{if(U.current.panelDataArrayChanged){U.current.panelDataArrayChanged=!1;const{autoSaveId:P,onLayout:Q,storage:ne}=$.current,{layout:te,panelDataArray:q}=U.current;let ae=null;if(P){const he=M_(P,q,ne);he&&(G.current=new Map(Object.entries(he.expandToSizes)),ae=he.layout)}ae==null&&(ae=R_({panelDataArray:q}));const ie=zg({layout:ae,panelConstraints:q.map(he=>he.constraints)});Dg(te,ie)||(R(ie),U.current.layout=ie,Q&&Q(ie),Ka(q,ie,N.current))}}),$l(()=>{const P=U.current;return()=>{P.layout=[]}},[]);const me=Rt(P=>{let Q=!1;const ne=E.current;return ne&&window.getComputedStyle(ne,null).getPropertyValue("direction")==="rtl"&&(Q=!0),function(q){q.preventDefault();const ae=E.current;if(!ae)return()=>null;const{direction:ie,dragState:he,id:Se,keyboardResizeBy:xe,onLayout:Re}=$.current,{layout:Ue,panelDataArray:dt}=U.current,{initialLayout:gt}=he??{},en=Yb(Se,P,ae);let We=w_(q,P,ie,he,xe,ae);const tn=ie==="horizontal";tn&&Q&&(We=-We);const uo=dt.map(Zu=>Zu.constraints),Cn=ir({delta:We,initialLayout:gt??Ue,panelConstraints:uo,pivotIndices:en,prevLayout:Ue,trigger:Nb(q)?"keyboard":"mouse-or-touch"}),Ar=!Wi(Ue,Cn);(zb(q)||Lb(q))&&I.current!=We&&(I.current=We,!Ar&&We!==0?tn?Tf(P,We<0?Hb:jb):Tf(P,We<0?Bb:Pb):Tf(P,0)),Ar&&(R(Cn),U.current.layout=Cn,Re&&Re(Cn),Ka(dt,Cn,N.current))}},[]),z=Rt((P,Q)=>{const{onLayout:ne}=$.current,{layout:te,panelDataArray:q}=U.current,ae=q.map(Ue=>Ue.constraints),{panelSize:ie,pivotIndices:he}=Il(q,P,te);we(ie!=null,`Panel size not found for panel "${P.id}"`);const xe=Ia(q,P)===q.length-1?ie-Q:Q-ie,Re=ir({delta:xe,initialLayout:te,panelConstraints:ae,pivotIndices:he,prevLayout:te,trigger:"imperative-api"});Wi(te,Re)||(R(Re),U.current.layout=Re,ne&&ne(Re),Ka(q,Re,N.current))},[]),k=Rt((P,Q)=>{const{layout:ne,panelDataArray:te}=U.current,{collapsedSize:q=0,collapsible:ae}=Q,{collapsedSize:ie=0,collapsible:he,maxSize:Se=100,minSize:xe=0}=P.constraints,{panelSize:Re}=Il(te,P,ne);Re!=null&&(ae&&he&&Vn(Re,q)?Vn(q,ie)||z(P,ie):Re<xe?z(P,xe):Re>Se&&z(P,Se))},[z]),F=Rt((P,Q)=>{const{direction:ne}=$.current,{layout:te}=U.current;if(!E.current)return;const q=Ku(P,E.current);we(q,`Drag handle element not found for id "${P}"`);const ae=qb(ne,Q);C({dragHandleId:P,dragHandleRect:q.getBoundingClientRect(),initialCursorPosition:ae,initialLayout:te})},[]),J=Rt(()=>{C(null)},[]),de=Rt(P=>{const{panelDataArray:Q}=U.current,ne=Ia(Q,P);ne>=0&&(Q.splice(ne,1),delete N.current[P.id],U.current.panelDataArrayChanged=!0,_())},[_]),O=l_(()=>({collapsePanel:ee,direction:i,dragState:w,expandPanel:W,getPanelSize:oe,getPanelStyle:ue,groupId:b,isPanelCollapsed:re,isPanelExpanded:ge,reevaluatePanelConstraints:k,registerPanel:se,registerResizeHandle:me,resizePanel:z,startDragging:F,stopDragging:J,unregisterPanel:de,panelGroupElement:E.current}),[ee,w,i,W,oe,ue,b,re,ge,k,se,me,z,F,J,de]),V={display:"flex",flexDirection:i==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return no(Vu.Provider,{value:O},no(y,{...S,children:o,className:r,id:f,ref:E,style:{...V,...v},"data-panel-group":"","data-panel-group-direction":i,"data-panel-group-id":b}))}const D_=Mb((l,o)=>no(Qb,{...l,forwardedRef:o}));Qb.displayName="PanelGroup";D_.displayName="forwardRef(PanelGroup)";function Ia(l,o){return l.findIndex(r=>r===o||r.id===o.id)}function Il(l,o,r){const i=Ia(l,o),f=i===l.length-1?[i-1,i]:[i,i+1],d=r[i];return{...o.constraints,panelSize:d,pivotIndices:f}}function N_({disabled:l,handleId:o,resizeHandler:r,panelGroupElement:i}){Zl(()=>{if(l||r==null||i==null)return;const c=Ku(o,i);if(c==null)return;const f=d=>{if(!d.defaultPrevented)switch(d.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{d.preventDefault(),r(d);break}case"F6":{d.preventDefault();const m=c.getAttribute("data-panel-group-id");we(m,`No group element found for id "${m}"`);const h=hr(m,i),v=Gb(m,o,i);we(v!==null,`No resize element found for id "${o}"`);const y=d.shiftKey?v>0?v-1:h.length-1:v+1<h.length?v+1:0;h[y].focus();break}}};return c.addEventListener("keydown",f),()=>{c.removeEventListener("keydown",f)}},[i,l,o,r])}function z_({children:l=null,className:o="",disabled:r=!1,hitAreaMargins:i,id:c,onBlur:f,onDragging:d,onFocus:m,style:h={},tabIndex:v=0,tagName:y="div",...S}){var b,E;const w=Tt(null),C=Tt({onDragging:d});Zl(()=>{C.current.onDragging=d});const A=_b(Vu);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:_,registerResizeHandle:N,startDragging:G,stopDragging:I,panelGroupElement:$}=A,U=jd(c),[ee,W]=ka("inactive"),[oe,ue]=ka(!1),[re,ge]=ka(null),se=Tt({state:ee});$l(()=>{se.current.state=ee}),Zl(()=>{if(r)ge(null);else{const F=N(U);ge(()=>F)}},[r,U,N]);const me=(b=i==null?void 0:i.coarse)!==null&&b!==void 0?b:15,z=(E=i==null?void 0:i.fine)!==null&&E!==void 0?E:5;return Zl(()=>{if(r||re==null)return;const F=w.current;return we(F,"Element ref not attached"),g_(U,F,R,{coarse:me,fine:z},(de,O,V)=>{if(O)switch(de){case"down":{W("drag"),we(V,'Expected event to be defined for "down" action'),G(U,V);const{onDragging:P}=C.current;P&&P(!0);break}case"move":{const{state:P}=se.current;P!=="drag"&&W("hover"),we(V,'Expected event to be defined for "move" action'),re(V);break}case"up":{W("hover"),I();const{onDragging:P}=C.current;P&&P(!1);break}}else W("inactive")})},[me,R,r,z,N,U,re,G,I]),N_({disabled:r,handleId:U,resizeHandler:re,panelGroupElement:$}),no(y,{...S,children:l,className:o,id:c,onBlur:()=>{ue(!1),f==null||f()},onFocus:()=>{ue(!0),m==null||m()},ref:w,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...h},tabIndex:v,"data-panel-group-direction":R,"data-panel-group-id":_,"data-resize-handle":"","data-resize-handle-active":ee==="drag"?"pointer":oe?"keyboard":void 0,"data-resize-handle-state":ee,"data-panel-resize-handle-enabled":!r,"data-panel-resize-handle-id":U})}z_.displayName="PanelResizeHandle";var L_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Iu=L_.reduce((l,o)=>{const r=MC(`Primitive.${o}`),i=p.forwardRef((c,f)=>{const{asChild:d,...m}=c,h=d?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(h,{...m,ref:f})});return i.displayName=`Primitive.${o}`,{...l,[o]:i}},{}),Qu="Switch",[U_]=Pg(Qu),[H_,j_]=U_(Qu),Zb=p.forwardRef((l,o)=>{const{__scopeSwitch:r,name:i,checked:c,defaultChecked:f,required:d,disabled:m,value:h="on",onCheckedChange:v,form:y,...S}=l,[b,E]=p.useState(null),w=Bg(o,N=>E(N)),C=p.useRef(!1),A=b?y||!!b.closest("form"):!0,[R,_]=_C({prop:c,defaultProp:f??!1,onChange:v,caller:Qu});return T.jsxs(H_,{scope:r,checked:R,disabled:m,children:[T.jsx(Iu.button,{type:"button",role:"switch","aria-checked":R,"aria-required":d,"data-state":Jb(R),"data-disabled":m?"":void 0,disabled:m,value:h,...S,ref:w,onClick:OC(l.onClick,N=>{_(G=>!G),A&&(C.current=N.isPropagationStopped(),C.current||N.stopPropagation())})}),A&&T.jsx(Fb,{control:b,bubbles:!C.current,name:i,value:h,checked:R,required:d,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});Zb.displayName=Qu;var $b="SwitchThumb",kb=p.forwardRef((l,o)=>{const{__scopeSwitch:r,...i}=l,c=j_($b,r);return T.jsx(Iu.span,{"data-state":Jb(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:o})});kb.displayName=$b;var B_="SwitchBubbleInput",Fb=p.forwardRef(({__scopeSwitch:l,control:o,checked:r,bubbles:i=!0,...c},f)=>{const d=p.useRef(null),m=Bg(d,f),h=DC(r),v=NC(o);return p.useEffect(()=>{const y=d.current;if(!y)return;const S=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(S,"checked").set;if(h!==r&&E){const w=new Event("click",{bubbles:i});E.call(y,r),y.dispatchEvent(w)}},[h,r,i]),T.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...c,tabIndex:-1,ref:m,style:{...c.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Fb.displayName=B_;function Jb(l){return l?"checked":"unchecked"}var uD=Zb,cD=kb,Yd="Progress",Vd=100,[P_]=Pg(Yd),[G_,Y_]=P_(Yd),Wb=p.forwardRef((l,o)=>{const{__scopeProgress:r,value:i=null,max:c,getValueLabel:f=V_,...d}=l;(c||c===0)&&!Ug(c)&&console.error(q_(`${c}`,"Progress"));const m=Ug(c)?c:Vd;i!==null&&!Hg(i,m)&&console.error(X_(`${i}`,"Progress"));const h=Hg(i,m)?i:null,v=yu(h)?f(h,m):void 0;return T.jsx(G_,{scope:r,value:h,max:m,children:T.jsx(Iu.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":yu(h)?h:void 0,"aria-valuetext":v,role:"progressbar","data-state":nx(h,m),"data-value":h??void 0,"data-max":m,...d,ref:o})})});Wb.displayName=Yd;var ex="ProgressIndicator",tx=p.forwardRef((l,o)=>{const{__scopeProgress:r,...i}=l,c=Y_(ex,r);return T.jsx(Iu.div,{"data-state":nx(c.value,c.max),"data-value":c.value??void 0,"data-max":c.max,...i,ref:o})});tx.displayName=ex;function V_(l,o){return`${Math.round(l/o*100)}%`}function nx(l,o){return l==null?"indeterminate":l===o?"complete":"loading"}function yu(l){return typeof l=="number"}function Ug(l){return yu(l)&&!isNaN(l)&&l>0}function Hg(l,o){return yu(l)&&!isNaN(l)&&l<=o&&l>=0}function q_(l,o){return`Invalid prop \`max\` of value \`${l}\` supplied to \`${o}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vd}\`.`}function X_(l,o){return`Invalid prop \`value\` of value \`${l}\` supplied to \`${o}\`. The \`value\` prop must be:
|
|
96
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;return p.useEffect(()=>{l&&(document.getElementById(l)||console.error(r))},[r,l]),null},ZT="DialogDescriptionWarning",$T=({contentRef:l,descriptionId:o})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${i0(ZT).contentName}}.`;return p.useEffect(()=>{var f;const c=(f=l.current)==null?void 0:f.getAttribute("aria-describedby");o&&c&&(document.getElementById(o)||console.warn(i))},[i,l,o]),null},aO=Qy,oO=$y,rO=Fy,iO=Jy,uO=Wy,cO=t0,sO=l0,fO=o0,kT="Label",u0=p.forwardRef((l,o)=>T.jsx(ye.label,{...l,ref:o,onMouseDown:r=>{var c;r.target.closest("button, input, select, textarea")||((c=l.onMouseDown)==null||c.call(l,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));u0.displayName=kT;var dO=u0;function gd(l){const o=l+"CollectionProvider",[r,i]=Jt(o),[c,f]=r(o,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:w,children:C}=E,A=yl.useRef(null),R=yl.useRef(new Map).current;return T.jsx(c,{scope:w,itemMap:R,collectionRef:A,children:C})};d.displayName=o;const m=l+"CollectionSlot",h=yl.forwardRef((E,w)=>{const{scope:C,children:A}=E,R=f(m,C),_=Oe(w,R.collectionRef);return T.jsx(Ja,{ref:_,children:A})});h.displayName=m;const v=l+"CollectionItemSlot",y="data-radix-collection-item",S=yl.forwardRef((E,w)=>{const{scope:C,children:A,...R}=E,_=yl.useRef(null),N=Oe(w,_),G=f(v,C);return yl.useEffect(()=>(G.itemMap.set(_,{ref:_,...R}),()=>void G.itemMap.delete(_))),T.jsx(Ja,{[y]:"",ref:N,children:A})});S.displayName=v;function b(E){const w=f(l+"CollectionConsumer",E);return yl.useCallback(()=>{const A=w.collectionRef.current;if(!A)return[];const R=Array.from(A.querySelectorAll(`[${y}]`));return Array.from(w.itemMap.values()).sort((G,I)=>R.indexOf(G.ref.current)-R.indexOf(I.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:d,Slot:h,ItemSlot:S},b,i]}var FT=[" ","Enter","ArrowUp","ArrowDown"],JT=[" ","Enter"],wr="Select",[Nu,zu,WT]=gd(wr),[io]=Jt(wr,[WT,ro]),Lu=ro(),[eA,Rl]=io(wr),[tA,nA]=io(wr),c0=l=>{const{__scopeSelect:o,children:r,open:i,defaultOpen:c,onOpenChange:f,value:d,defaultValue:m,onValueChange:h,dir:v,name:y,autoComplete:S,disabled:b,required:E,form:w}=l,C=Lu(o),[A,R]=p.useState(null),[_,N]=p.useState(null),[G,I]=p.useState(!1),$=vr(v),[U=!1,ee]=xl({prop:i,defaultProp:c,onChange:f}),[W,oe]=xl({prop:d,defaultProp:m,onChange:h}),ue=p.useRef(null),re=A?w||!!A.closest("form"):!0,[ge,se]=p.useState(new Set),me=Array.from(ge).map(z=>z.props.value).join(";");return T.jsx(od,{...C,children:T.jsxs(eA,{required:E,scope:o,trigger:A,onTriggerChange:R,valueNode:_,onValueNodeChange:N,valueNodeHasChildren:G,onValueNodeHasChildrenChange:I,contentId:kt(),value:W,onValueChange:oe,open:U,onOpenChange:ee,dir:$,triggerPointerDownPosRef:ue,disabled:b,children:[T.jsx(Nu.Provider,{scope:o,children:T.jsx(tA,{scope:l.__scopeSelect,onNativeOptionAdd:p.useCallback(z=>{se(k=>new Set(k).add(z))},[]),onNativeOptionRemove:p.useCallback(z=>{se(k=>{const F=new Set(k);return F.delete(z),F})},[]),children:r})}),re?T.jsxs(U0,{"aria-hidden":!0,required:E,tabIndex:-1,name:y,autoComplete:S,value:W,onChange:z=>oe(z.target.value),disabled:b,form:w,children:[W===void 0?T.jsx("option",{value:""}):null,Array.from(ge)]},me):null]})})};c0.displayName=wr;var s0="SelectTrigger",f0=p.forwardRef((l,o)=>{const{__scopeSelect:r,disabled:i=!1,...c}=l,f=Lu(r),d=Rl(s0,r),m=d.disabled||i,h=Oe(o,d.onTriggerChange),v=zu(r),y=p.useRef("touch"),[S,b,E]=H0(C=>{const A=v().filter(N=>!N.disabled),R=A.find(N=>N.value===d.value),_=j0(A,C,R);_!==void 0&&d.onValueChange(_.value)}),w=C=>{m||(d.onOpenChange(!0),E()),C&&(d.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return T.jsx(rd,{asChild:!0,...f,children:T.jsx(ye.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":L0(d.value)?"":void 0,...c,ref:h,onClick:le(c.onClick,C=>{C.currentTarget.focus(),y.current!=="mouse"&&w(C)}),onPointerDown:le(c.onPointerDown,C=>{y.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(w(C),C.preventDefault())}),onKeyDown:le(c.onKeyDown,C=>{const A=S.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&b(C.key),!(A&&C.key===" ")&&FT.includes(C.key)&&(w(),C.preventDefault())})})})});f0.displayName=s0;var d0="SelectValue",m0=p.forwardRef((l,o)=>{const{__scopeSelect:r,className:i,style:c,children:f,placeholder:d="",...m}=l,h=Rl(d0,r),{onValueNodeHasChildrenChange:v}=h,y=f!==void 0,S=Oe(o,h.onValueNodeChange);return ht(()=>{v(y)},[v,y]),T.jsx(ye.span,{...m,ref:S,style:{pointerEvents:"none"},children:L0(h.value)?T.jsx(T.Fragment,{children:d}):f})});m0.displayName=d0;var lA="SelectIcon",h0=p.forwardRef((l,o)=>{const{__scopeSelect:r,children:i,...c}=l;return T.jsx(ye.span,{"aria-hidden":!0,...c,ref:o,children:i||"▼"})});h0.displayName=lA;var aA="SelectPortal",v0=l=>T.jsx(Er,{asChild:!0,...l});v0.displayName=aA;var Jl="SelectContent",p0=p.forwardRef((l,o)=>{const r=Rl(Jl,l.__scopeSelect),[i,c]=p.useState();if(ht(()=>{c(new DocumentFragment)},[]),!r.open){const f=i;return f?Sr.createPortal(T.jsx(g0,{scope:l.__scopeSelect,children:T.jsx(Nu.Slot,{scope:l.__scopeSelect,children:T.jsx("div",{children:l.children})})}),f):null}return T.jsx(y0,{...l,ref:o})});p0.displayName=Jl;var on=10,[g0,Tl]=io(Jl),oA="SelectContentImpl",y0=p.forwardRef((l,o)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,side:m,sideOffset:h,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:E,sticky:w,hideWhenDetached:C,avoidCollisions:A,...R}=l,_=Rl(Jl,r),[N,G]=p.useState(null),[I,$]=p.useState(null),U=Oe(o,q=>G(q)),[ee,W]=p.useState(null),[oe,ue]=p.useState(null),re=zu(r),[ge,se]=p.useState(!1),me=p.useRef(!1);p.useEffect(()=>{if(N)return dd(N)},[N]),Xf();const z=p.useCallback(q=>{const[ae,...ie]=re().map(xe=>xe.ref.current),[he]=ie.slice(-1),Se=document.activeElement;for(const xe of q)if(xe===Se||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ae&&I&&(I.scrollTop=0),xe===he&&I&&(I.scrollTop=I.scrollHeight),xe==null||xe.focus(),document.activeElement!==Se))return},[re,I]),k=p.useCallback(()=>z([ee,N]),[z,ee,N]);p.useEffect(()=>{ge&&k()},[ge,k]);const{onOpenChange:F,triggerPointerDownPosRef:J}=_;p.useEffect(()=>{if(N){let q={x:0,y:0};const ae=he=>{var Se,xe;q={x:Math.abs(Math.round(he.pageX)-(((Se=J.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(he.pageY)-(((xe=J.current)==null?void 0:xe.y)??0))}},ie=he=>{q.x<=10&&q.y<=10?he.preventDefault():N.contains(he.target)||F(!1),document.removeEventListener("pointermove",ae),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",ie,{capture:!0})}}},[N,F,J]),p.useEffect(()=>{const q=()=>F(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[F]);const[de,O]=H0(q=>{const ae=re().filter(Se=>!Se.disabled),ie=ae.find(Se=>Se.ref.current===document.activeElement),he=j0(ae,q,ie);he&&setTimeout(()=>he.ref.current.focus())}),V=p.useCallback((q,ae,ie)=>{const he=!me.current&&!ie;(_.value!==void 0&&_.value===ae||he)&&(W(q),he&&(me.current=!0))},[_.value]),P=p.useCallback(()=>N==null?void 0:N.focus(),[N]),Q=p.useCallback((q,ae,ie)=>{const he=!me.current&&!ie;(_.value!==void 0&&_.value===ae||he)&&ue(q)},[_.value]),ne=i==="popper"?Hf:S0,te=ne===Hf?{side:m,sideOffset:h,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:E,sticky:w,hideWhenDetached:C,avoidCollisions:A}:{};return T.jsx(g0,{scope:r,content:N,viewport:I,onViewportChange:$,itemRefCallback:V,selectedItem:ee,onItemLeave:P,itemTextRefCallback:Q,focusSelectedItem:k,selectedItemText:oe,position:i,isPositioned:ge,searchRef:de,children:T.jsx(Du,{as:Ja,allowPinchZoom:!0,children:T.jsx(_u,{asChild:!0,trapped:_.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:le(c,q=>{var ae;(ae=_.trigger)==null||ae.focus({preventScroll:!0}),q.preventDefault()}),children:T.jsx(br,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:T.jsx(ne,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:q=>q.preventDefault(),...R,...te,onPlaced:()=>se(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:le(R.onKeyDown,q=>{const ae=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!ae&&q.key.length===1&&O(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let he=re().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(q.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const Se=q.target,xe=he.indexOf(Se);he=he.slice(xe+1)}setTimeout(()=>z(he)),q.preventDefault()}})})})})})})});y0.displayName=oA;var rA="SelectItemAlignedPosition",S0=p.forwardRef((l,o)=>{const{__scopeSelect:r,onPlaced:i,...c}=l,f=Rl(Jl,r),d=Tl(Jl,r),[m,h]=p.useState(null),[v,y]=p.useState(null),S=Oe(o,U=>y(U)),b=zu(r),E=p.useRef(!1),w=p.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:R,focusSelectedItem:_}=d,N=p.useCallback(()=>{if(f.trigger&&f.valueNode&&m&&v&&C&&A&&R){const U=f.trigger.getBoundingClientRect(),ee=v.getBoundingClientRect(),W=f.valueNode.getBoundingClientRect(),oe=R.getBoundingClientRect();if(f.dir!=="rtl"){const Se=oe.left-ee.left,xe=W.left-Se,Re=U.left-xe,Ue=U.width+Re,dt=Math.max(Ue,ee.width),gt=window.innerWidth-on,en=Af(xe,[on,Math.max(on,gt-dt)]);m.style.minWidth=Ue+"px",m.style.left=en+"px"}else{const Se=ee.right-oe.right,xe=window.innerWidth-W.right-Se,Re=window.innerWidth-U.right-xe,Ue=U.width+Re,dt=Math.max(Ue,ee.width),gt=window.innerWidth-on,en=Af(xe,[on,Math.max(on,gt-dt)]);m.style.minWidth=Ue+"px",m.style.right=en+"px"}const ue=b(),re=window.innerHeight-on*2,ge=C.scrollHeight,se=window.getComputedStyle(v),me=parseInt(se.borderTopWidth,10),z=parseInt(se.paddingTop,10),k=parseInt(se.borderBottomWidth,10),F=parseInt(se.paddingBottom,10),J=me+z+ge+F+k,de=Math.min(A.offsetHeight*5,J),O=window.getComputedStyle(C),V=parseInt(O.paddingTop,10),P=parseInt(O.paddingBottom,10),Q=U.top+U.height/2-on,ne=re-Q,te=A.offsetHeight/2,q=A.offsetTop+te,ae=me+z+q,ie=J-ae;if(ae<=Q){const Se=ue.length>0&&A===ue[ue.length-1].ref.current;m.style.bottom="0px";const xe=v.clientHeight-C.offsetTop-C.offsetHeight,Re=Math.max(ne,te+(Se?P:0)+xe+k),Ue=ae+Re;m.style.height=Ue+"px"}else{const Se=ue.length>0&&A===ue[0].ref.current;m.style.top="0px";const Re=Math.max(Q,me+C.offsetTop+(Se?V:0)+te)+ie;m.style.height=Re+"px",C.scrollTop=ae-Q+C.offsetTop}m.style.margin=`${on}px 0`,m.style.minHeight=de+"px",m.style.maxHeight=re+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[b,f.trigger,f.valueNode,m,v,C,A,R,f.dir,i]);ht(()=>N(),[N]);const[G,I]=p.useState();ht(()=>{v&&I(window.getComputedStyle(v).zIndex)},[v]);const $=p.useCallback(U=>{U&&w.current===!0&&(N(),_==null||_(),w.current=!1)},[N,_]);return T.jsx(uA,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:$,children:T.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:G},children:T.jsx(ye.div,{...c,ref:S,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});S0.displayName=rA;var iA="SelectPopperPosition",Hf=p.forwardRef((l,o)=>{const{__scopeSelect:r,align:i="start",collisionPadding:c=on,...f}=l,d=Lu(r);return T.jsx(id,{...d,...f,ref:o,align:i,collisionPadding:c,style:{boxSizing:"border-box",...f.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)"}})});Hf.displayName=iA;var[uA,yd]=io(Jl,{}),jf="SelectViewport",b0=p.forwardRef((l,o)=>{const{__scopeSelect:r,nonce:i,...c}=l,f=Tl(jf,r),d=yd(jf,r),m=Oe(o,f.onViewportChange),h=p.useRef(0);return T.jsxs(T.Fragment,{children:[T.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:i}),T.jsx(Nu.Slot,{scope:r,children:T.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:le(c.onScroll,v=>{const y=v.currentTarget,{contentWrapper:S,shouldExpandOnScrollRef:b}=d;if(b!=null&&b.current&&S){const E=Math.abs(h.current-y.scrollTop);if(E>0){const w=window.innerHeight-on*2,C=parseFloat(S.style.minHeight),A=parseFloat(S.style.height),R=Math.max(C,A);if(R<w){const _=R+E,N=Math.min(w,_),G=_-N;S.style.height=N+"px",S.style.bottom==="0px"&&(y.scrollTop=G>0?G:0,S.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});b0.displayName=jf;var x0="SelectGroup",[cA,sA]=io(x0),E0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=kt();return T.jsx(cA,{scope:r,id:c,children:T.jsx(ye.div,{role:"group","aria-labelledby":c,...i,ref:o})})});E0.displayName=x0;var C0="SelectLabel",w0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=sA(C0,r);return T.jsx(ye.div,{id:c.id,...i,ref:o})});w0.displayName=C0;var fu="SelectItem",[fA,R0]=io(fu),T0=p.forwardRef((l,o)=>{const{__scopeSelect:r,value:i,disabled:c=!1,textValue:f,...d}=l,m=Rl(fu,r),h=Tl(fu,r),v=m.value===i,[y,S]=p.useState(f??""),[b,E]=p.useState(!1),w=Oe(o,_=>{var N;return(N=h.itemRefCallback)==null?void 0:N.call(h,_,i,c)}),C=kt(),A=p.useRef("touch"),R=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")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 T.jsx(fA,{scope:r,value:i,disabled:c,textId:C,isSelected:v,onItemTextChange:p.useCallback(_=>{S(N=>N||((_==null?void 0:_.textContent)??"").trim())},[]),children:T.jsx(Nu.ItemSlot,{scope:r,value:i,disabled:c,textValue:y,children:T.jsx(ye.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:w,onFocus:le(d.onFocus,()=>E(!0)),onBlur:le(d.onBlur,()=>E(!1)),onClick:le(d.onClick,()=>{A.current!=="mouse"&&R()}),onPointerUp:le(d.onPointerUp,()=>{A.current==="mouse"&&R()}),onPointerDown:le(d.onPointerDown,_=>{A.current=_.pointerType}),onPointerMove:le(d.onPointerMove,_=>{var N;A.current=_.pointerType,c?(N=h.onItemLeave)==null||N.call(h):A.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(d.onPointerLeave,_=>{var N;_.currentTarget===document.activeElement&&((N=h.onItemLeave)==null||N.call(h))}),onKeyDown:le(d.onKeyDown,_=>{var G;((G=h.searchRef)==null?void 0:G.current)!==""&&_.key===" "||(JT.includes(_.key)&&R(),_.key===" "&&_.preventDefault())})})})})});T0.displayName=fu;var or="SelectItemText",A0=p.forwardRef((l,o)=>{const{__scopeSelect:r,className:i,style:c,...f}=l,d=Rl(or,r),m=Tl(or,r),h=R0(or,r),v=nA(or,r),[y,S]=p.useState(null),b=Oe(o,R=>S(R),h.onItemTextChange,R=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,R,h.value,h.disabled)}),E=y==null?void 0:y.textContent,w=p.useMemo(()=>T.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=v;return ht(()=>(C(w),()=>A(w)),[C,A,w]),T.jsxs(T.Fragment,{children:[T.jsx(ye.span,{id:h.textId,...f,ref:b}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Sr.createPortal(f.children,d.valueNode):null]})});A0.displayName=or;var M0="SelectItemIndicator",_0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l;return R0(M0,r).isSelected?T.jsx(ye.span,{"aria-hidden":!0,...i,ref:o}):null});_0.displayName=M0;var Bf="SelectScrollUpButton",O0=p.forwardRef((l,o)=>{const r=Tl(Bf,l.__scopeSelect),i=yd(Bf,l.__scopeSelect),[c,f]=p.useState(!1),d=Oe(o,i.onScrollButtonChange);return ht(()=>{if(r.viewport&&r.isPositioned){let m=function(){const v=h.scrollTop>0;f(v)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?T.jsx(N0,{...l,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});O0.displayName=Bf;var Pf="SelectScrollDownButton",D0=p.forwardRef((l,o)=>{const r=Tl(Pf,l.__scopeSelect),i=yd(Pf,l.__scopeSelect),[c,f]=p.useState(!1),d=Oe(o,i.onScrollButtonChange);return ht(()=>{if(r.viewport&&r.isPositioned){let m=function(){const v=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)<v;f(y)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),c?T.jsx(N0,{...l,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});D0.displayName=Pf;var N0=p.forwardRef((l,o)=>{const{__scopeSelect:r,onAutoScroll:i,...c}=l,f=Tl("SelectScrollButton",r),d=p.useRef(null),m=zu(r),h=p.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return p.useEffect(()=>()=>h(),[h]),ht(()=>{var y;const v=m().find(S=>S.ref.current===document.activeElement);(y=v==null?void 0:v.ref.current)==null||y.scrollIntoView({block:"nearest"})},[m]),T.jsx(ye.div,{"aria-hidden":!0,...c,ref:o,style:{flexShrink:0,...c.style},onPointerDown:le(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:le(c.onPointerMove,()=>{var v;(v=f.onItemLeave)==null||v.call(f),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:le(c.onPointerLeave,()=>{h()})})}),dA="SelectSeparator",z0=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l;return T.jsx(ye.div,{"aria-hidden":!0,...i,ref:o})});z0.displayName=dA;var Gf="SelectArrow",mA=p.forwardRef((l,o)=>{const{__scopeSelect:r,...i}=l,c=Lu(r),f=Rl(Gf,r),d=Tl(Gf,r);return f.open&&d.position==="popper"?T.jsx(ud,{...c,...i,ref:o}):null});mA.displayName=Gf;function L0(l){return l===""||l===void 0}var U0=p.forwardRef((l,o)=>{const{value:r,...i}=l,c=p.useRef(null),f=Oe(o,c),d=AC(r);return p.useEffect(()=>{const m=c.current,h=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==r&&y){const S=new Event("change",{bubbles:!0});y.call(m,r),m.dispatchEvent(S)}},[d,r]),T.jsx(cd,{asChild:!0,children:T.jsx("select",{...i,ref:f,defaultValue:r})})});U0.displayName="BubbleSelect";function H0(l){const o=ct(l),r=p.useRef(""),i=p.useRef(0),c=p.useCallback(d=>{const m=r.current+d;o(m),function h(v){r.current=v,window.clearTimeout(i.current),v!==""&&(i.current=window.setTimeout(()=>h(""),1e3))}(m)},[o]),f=p.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,c,f]}function j0(l,o,r){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,f=r?l.indexOf(r):-1;let d=hA(l,Math.max(f,0));c.length===1&&(d=d.filter(v=>v!==r));const h=d.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return h!==r?h:void 0}function hA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}var mO=c0,hO=f0,vO=m0,pO=h0,gO=v0,yO=p0,SO=b0,bO=E0,xO=w0,EO=T0,CO=A0,wO=_0,RO=O0,TO=D0,AO=z0,wf="rovingFocusGroup.onEntryFocus",vA={bubbles:!1,cancelable:!0},Uu="RovingFocusGroup",[Yf,B0,pA]=gd(Uu),[gA,Hu]=Jt(Uu,[pA]),[yA,SA]=gA(Uu),P0=p.forwardRef((l,o)=>T.jsx(Yf.Provider,{scope:l.__scopeRovingFocusGroup,children:T.jsx(Yf.Slot,{scope:l.__scopeRovingFocusGroup,children:T.jsx(bA,{...l,ref:o})})}));P0.displayName=Uu;var bA=p.forwardRef((l,o)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:v,preventScrollOnEntryFocus:y=!1,...S}=l,b=p.useRef(null),E=Oe(o,b),w=vr(f),[C=null,A]=xl({prop:d,defaultProp:m,onChange:h}),[R,_]=p.useState(!1),N=ct(v),G=B0(r),I=p.useRef(!1),[$,U]=p.useState(0);return p.useEffect(()=>{const ee=b.current;if(ee)return ee.addEventListener(wf,N),()=>ee.removeEventListener(wf,N)},[N]),T.jsx(yA,{scope:r,orientation:i,dir:w,loop:c,currentTabStopId:C,onItemFocus:p.useCallback(ee=>A(ee),[A]),onItemShiftTab:p.useCallback(()=>_(!0),[]),onFocusableItemAdd:p.useCallback(()=>U(ee=>ee+1),[]),onFocusableItemRemove:p.useCallback(()=>U(ee=>ee-1),[]),children:T.jsx(ye.div,{tabIndex:R||$===0?-1:0,"data-orientation":i,...S,ref:E,style:{outline:"none",...l.style},onMouseDown:le(l.onMouseDown,()=>{I.current=!0}),onFocus:le(l.onFocus,ee=>{const W=!I.current;if(ee.target===ee.currentTarget&&W&&!R){const oe=new CustomEvent(wf,vA);if(ee.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const ue=G().filter(z=>z.focusable),re=ue.find(z=>z.active),ge=ue.find(z=>z.id===C),me=[re,ge,...ue].filter(Boolean).map(z=>z.ref.current);V0(me,y)}}I.current=!1}),onBlur:le(l.onBlur,()=>_(!1))})})}),G0="RovingFocusGroupItem",Y0=p.forwardRef((l,o)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:c=!1,tabStopId:f,...d}=l,m=kt(),h=f||m,v=SA(G0,r),y=v.currentTabStopId===h,S=B0(r),{onFocusableItemAdd:b,onFocusableItemRemove:E}=v;return p.useEffect(()=>{if(i)return b(),()=>E()},[i,b,E]),T.jsx(Yf.ItemSlot,{scope:r,id:h,focusable:i,active:c,children:T.jsx(ye.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...d,ref:o,onMouseDown:le(l.onMouseDown,w=>{i?v.onItemFocus(h):w.preventDefault()}),onFocus:le(l.onFocus,()=>v.onItemFocus(h)),onKeyDown:le(l.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){v.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=CA(w,v.orientation,v.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let R=S().filter(_=>_.focusable).map(_=>_.ref.current);if(C==="last")R.reverse();else if(C==="prev"||C==="next"){C==="prev"&&R.reverse();const _=R.indexOf(w.currentTarget);R=v.loop?wA(R,_+1):R.slice(_+1)}setTimeout(()=>V0(R))}})})})});Y0.displayName=G0;var xA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EA(l,o){return o!=="rtl"?l:l==="ArrowLeft"?"ArrowRight":l==="ArrowRight"?"ArrowLeft":l}function CA(l,o,r){const i=EA(l.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return xA[i]}function V0(l,o=!1){const r=document.activeElement;for(const i of l)if(i===r||(i.focus({preventScroll:o}),document.activeElement!==r))return}function wA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}var q0=P0,X0=Y0,Vf=["Enter"," "],RA=["ArrowDown","PageUp","Home"],K0=["ArrowUp","PageDown","End"],TA=[...RA,...K0],AA={ltr:[...Vf,"ArrowRight"],rtl:[...Vf,"ArrowLeft"]},MA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rr="Menu",[fr,_A,OA]=gd(Rr),[ta,ju]=Jt(Rr,[OA,ro,Hu]),Bu=ro(),I0=Hu(),[DA,na]=ta(Rr),[NA,Tr]=ta(Rr),Q0=l=>{const{__scopeMenu:o,open:r=!1,children:i,dir:c,onOpenChange:f,modal:d=!0}=l,m=Bu(o),[h,v]=p.useState(null),y=p.useRef(!1),S=ct(f),b=vr(c);return p.useEffect(()=>{const E=()=>{y.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>y.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),T.jsx(od,{...m,children:T.jsx(DA,{scope:o,open:r,onOpenChange:S,content:h,onContentChange:v,children:T.jsx(NA,{scope:o,onClose:p.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:y,dir:b,modal:d,children:i})})})};Q0.displayName=Rr;var zA="MenuAnchor",Sd=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l,c=Bu(r);return T.jsx(rd,{...c,...i,ref:o})});Sd.displayName=zA;var bd="MenuPortal",[LA,Z0]=ta(bd,{forceMount:void 0}),$0=l=>{const{__scopeMenu:o,forceMount:r,children:i,container:c}=l,f=na(bd,o);return T.jsx(LA,{scope:o,forceMount:r,children:T.jsx(ft,{present:r||f.open,children:T.jsx(Er,{asChild:!0,container:c,children:i})})})};$0.displayName=bd;var Ft="MenuContent",[UA,xd]=ta(Ft),k0=p.forwardRef((l,o)=>{const r=Z0(Ft,l.__scopeMenu),{forceMount:i=r.forceMount,...c}=l,f=na(Ft,l.__scopeMenu),d=Tr(Ft,l.__scopeMenu);return T.jsx(fr.Provider,{scope:l.__scopeMenu,children:T.jsx(ft,{present:i||f.open,children:T.jsx(fr.Slot,{scope:l.__scopeMenu,children:d.modal?T.jsx(HA,{...c,ref:o}):T.jsx(jA,{...c,ref:o})})})})}),HA=p.forwardRef((l,o)=>{const r=na(Ft,l.__scopeMenu),i=p.useRef(null),c=Oe(o,i);return p.useEffect(()=>{const f=i.current;if(f)return dd(f)},[]),T.jsx(Ed,{...l,ref:c,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:le(l.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),jA=p.forwardRef((l,o)=>{const r=na(Ft,l.__scopeMenu);return T.jsx(Ed,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Ed=p.forwardRef((l,o)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:c,onOpenAutoFocus:f,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:S,onInteractOutside:b,onDismiss:E,disableOutsideScroll:w,...C}=l,A=na(Ft,r),R=Tr(Ft,r),_=Bu(r),N=I0(r),G=_A(r),[I,$]=p.useState(null),U=p.useRef(null),ee=Oe(o,U,A.onContentChange),W=p.useRef(0),oe=p.useRef(""),ue=p.useRef(0),re=p.useRef(null),ge=p.useRef("right"),se=p.useRef(0),me=w?Du:p.Fragment,z=w?{as:Ja,allowPinchZoom:!0}:void 0,k=J=>{var q,ae;const de=oe.current+J,O=G().filter(ie=>!ie.disabled),V=document.activeElement,P=(q=O.find(ie=>ie.ref.current===V))==null?void 0:q.textValue,Q=O.map(ie=>ie.textValue),ne=$A(Q,de,P),te=(ae=O.find(ie=>ie.textValue===ne))==null?void 0:ae.ref.current;(function ie(he){oe.current=he,window.clearTimeout(W.current),he!==""&&(W.current=window.setTimeout(()=>ie(""),1e3))})(de),te&&setTimeout(()=>te.focus())};p.useEffect(()=>()=>window.clearTimeout(W.current),[]),Xf();const F=p.useCallback(J=>{var O,V;return ge.current===((O=re.current)==null?void 0:O.side)&&FA(J,(V=re.current)==null?void 0:V.area)},[]);return T.jsx(UA,{scope:r,searchRef:oe,onItemEnter:p.useCallback(J=>{F(J)&&J.preventDefault()},[F]),onItemLeave:p.useCallback(J=>{var de;F(J)||((de=U.current)==null||de.focus(),$(null))},[F]),onTriggerLeave:p.useCallback(J=>{F(J)&&J.preventDefault()},[F]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:p.useCallback(J=>{re.current=J},[]),children:T.jsx(me,{...z,children:T.jsx(_u,{asChild:!0,trapped:c,onMountAutoFocus:le(f,J=>{var de;J.preventDefault(),(de=U.current)==null||de.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:T.jsx(br,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:S,onInteractOutside:b,onDismiss:E,children:T.jsx(q0,{asChild:!0,...N,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:I,onCurrentTabStopIdChange:$,onEntryFocus:le(h,J=>{R.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:T.jsx(id,{role:"menu","aria-orientation":"vertical","data-state":dS(A.open),"data-radix-menu-content":"",dir:R.dir,..._,...C,ref:ee,style:{outline:"none",...C.style},onKeyDown:le(C.onKeyDown,J=>{const O=J.target.closest("[data-radix-menu-content]")===J.currentTarget,V=J.ctrlKey||J.altKey||J.metaKey,P=J.key.length===1;O&&(J.key==="Tab"&&J.preventDefault(),!V&&P&&k(J.key));const Q=U.current;if(J.target!==Q||!TA.includes(J.key))return;J.preventDefault();const te=G().filter(q=>!q.disabled).map(q=>q.ref.current);K0.includes(J.key)&&te.reverse(),QA(te)}),onBlur:le(l.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(W.current),oe.current="")}),onPointerMove:le(l.onPointerMove,dr(J=>{const de=J.target,O=se.current!==J.clientX;if(J.currentTarget.contains(de)&&O){const V=J.clientX>se.current?"right":"left";ge.current=V,se.current=J.clientX}}))})})})})})})});k0.displayName=Ft;var BA="MenuGroup",Cd=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{role:"group",...i,ref:o})});Cd.displayName=BA;var PA="MenuLabel",F0=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{...i,ref:o})});F0.displayName=PA;var du="MenuItem",Cg="menu.itemSelect",Pu=p.forwardRef((l,o)=>{const{disabled:r=!1,onSelect:i,...c}=l,f=p.useRef(null),d=Tr(du,l.__scopeMenu),m=xd(du,l.__scopeMenu),h=Oe(o,f),v=p.useRef(!1),y=()=>{const S=f.current;if(!r&&S){const b=new CustomEvent(Cg,{bubbles:!0,cancelable:!0});S.addEventListener(Cg,E=>i==null?void 0:i(E),{once:!0}),oy(S,b),b.defaultPrevented?v.current=!1:d.onClose()}};return T.jsx(J0,{...c,ref:h,disabled:r,onClick:le(l.onClick,y),onPointerDown:S=>{var b;(b=l.onPointerDown)==null||b.call(l,S),v.current=!0},onPointerUp:le(l.onPointerUp,S=>{var b;v.current||(b=S.currentTarget)==null||b.click()}),onKeyDown:le(l.onKeyDown,S=>{const b=m.searchRef.current!=="";r||b&&S.key===" "||Vf.includes(S.key)&&(S.currentTarget.click(),S.preventDefault())})})});Pu.displayName=du;var J0=p.forwardRef((l,o)=>{const{__scopeMenu:r,disabled:i=!1,textValue:c,...f}=l,d=xd(du,r),m=I0(r),h=p.useRef(null),v=Oe(o,h),[y,S]=p.useState(!1),[b,E]=p.useState("");return p.useEffect(()=>{const w=h.current;w&&E((w.textContent??"").trim())},[f.children]),T.jsx(fr.ItemSlot,{scope:r,disabled:i,textValue:c??b,children:T.jsx(X0,{asChild:!0,...m,focusable:!i,children:T.jsx(ye.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...f,ref:v,onPointerMove:le(l.onPointerMove,dr(w=>{i?d.onItemLeave(w):(d.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:le(l.onPointerLeave,dr(w=>d.onItemLeave(w))),onFocus:le(l.onFocus,()=>S(!0)),onBlur:le(l.onBlur,()=>S(!1))})})})}),GA="MenuCheckboxItem",W0=p.forwardRef((l,o)=>{const{checked:r=!1,onCheckedChange:i,...c}=l;return T.jsx(aS,{scope:l.__scopeMenu,checked:r,children:T.jsx(Pu,{role:"menuitemcheckbox","aria-checked":mu(r)?"mixed":r,...c,ref:o,"data-state":Rd(r),onSelect:le(c.onSelect,()=>i==null?void 0:i(mu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});W0.displayName=GA;var eS="MenuRadioGroup",[YA,VA]=ta(eS,{value:void 0,onValueChange:()=>{}}),tS=p.forwardRef((l,o)=>{const{value:r,onValueChange:i,...c}=l,f=ct(i);return T.jsx(YA,{scope:l.__scopeMenu,value:r,onValueChange:f,children:T.jsx(Cd,{...c,ref:o})})});tS.displayName=eS;var nS="MenuRadioItem",lS=p.forwardRef((l,o)=>{const{value:r,...i}=l,c=VA(nS,l.__scopeMenu),f=r===c.value;return T.jsx(aS,{scope:l.__scopeMenu,checked:f,children:T.jsx(Pu,{role:"menuitemradio","aria-checked":f,...i,ref:o,"data-state":Rd(f),onSelect:le(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,r)},{checkForDefaultPrevented:!1})})})});lS.displayName=nS;var wd="MenuItemIndicator",[aS,qA]=ta(wd,{checked:!1}),oS=p.forwardRef((l,o)=>{const{__scopeMenu:r,forceMount:i,...c}=l,f=qA(wd,r);return T.jsx(ft,{present:i||mu(f.checked)||f.checked===!0,children:T.jsx(ye.span,{...c,ref:o,"data-state":Rd(f.checked)})})});oS.displayName=wd;var XA="MenuSeparator",rS=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l;return T.jsx(ye.div,{role:"separator","aria-orientation":"horizontal",...i,ref:o})});rS.displayName=XA;var KA="MenuArrow",iS=p.forwardRef((l,o)=>{const{__scopeMenu:r,...i}=l,c=Bu(r);return T.jsx(ud,{...c,...i,ref:o})});iS.displayName=KA;var IA="MenuSub",[MO,uS]=ta(IA),rr="MenuSubTrigger",cS=p.forwardRef((l,o)=>{const r=na(rr,l.__scopeMenu),i=Tr(rr,l.__scopeMenu),c=uS(rr,l.__scopeMenu),f=xd(rr,l.__scopeMenu),d=p.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=f,v={__scopeMenu:l.__scopeMenu},y=p.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return p.useEffect(()=>y,[y]),p.useEffect(()=>{const S=m.current;return()=>{window.clearTimeout(S),h(null)}},[m,h]),T.jsx(Sd,{asChild:!0,...v,children:T.jsx(J0,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":c.contentId,"data-state":dS(r.open),...l,ref:jg(o,c.onTriggerChange),onClick:S=>{var b;(b=l.onClick)==null||b.call(l,S),!(l.disabled||S.defaultPrevented)&&(S.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:le(l.onPointerMove,dr(S=>{f.onItemEnter(S),!S.defaultPrevented&&!l.disabled&&!r.open&&!d.current&&(f.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),y()},100))})),onPointerLeave:le(l.onPointerLeave,dr(S=>{var E,w;y();const b=(E=r.content)==null?void 0:E.getBoundingClientRect();if(b){const C=(w=r.content)==null?void 0:w.dataset.side,A=C==="right",R=A?-5:5,_=b[A?"left":"right"],N=b[A?"right":"left"];f.onPointerGraceIntentChange({area:[{x:S.clientX+R,y:S.clientY},{x:_,y:b.top},{x:N,y:b.top},{x:N,y:b.bottom},{x:_,y:b.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.onPointerGraceIntentChange(null),300)}else{if(f.onTriggerLeave(S),S.defaultPrevented)return;f.onPointerGraceIntentChange(null)}})),onKeyDown:le(l.onKeyDown,S=>{var E;const b=f.searchRef.current!=="";l.disabled||b&&S.key===" "||AA[i.dir].includes(S.key)&&(r.onOpenChange(!0),(E=r.content)==null||E.focus(),S.preventDefault())})})})});cS.displayName=rr;var sS="MenuSubContent",fS=p.forwardRef((l,o)=>{const r=Z0(Ft,l.__scopeMenu),{forceMount:i=r.forceMount,...c}=l,f=na(Ft,l.__scopeMenu),d=Tr(Ft,l.__scopeMenu),m=uS(sS,l.__scopeMenu),h=p.useRef(null),v=Oe(o,h);return T.jsx(fr.Provider,{scope:l.__scopeMenu,children:T.jsx(ft,{present:i||f.open,children:T.jsx(fr.Slot,{scope:l.__scopeMenu,children:T.jsx(Ed,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:v,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{var S;d.isUsingKeyboardRef.current&&((S=h.current)==null||S.focus()),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:le(l.onFocusOutside,y=>{y.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:le(l.onEscapeKeyDown,y=>{d.onClose(),y.preventDefault()}),onKeyDown:le(l.onKeyDown,y=>{var E;const S=y.currentTarget.contains(y.target),b=MA[d.dir].includes(y.key);S&&b&&(f.onOpenChange(!1),(E=m.trigger)==null||E.focus(),y.preventDefault())})})})})})});fS.displayName=sS;function dS(l){return l?"open":"closed"}function mu(l){return l==="indeterminate"}function Rd(l){return mu(l)?"indeterminate":l?"checked":"unchecked"}function QA(l){const o=document.activeElement;for(const r of l)if(r===o||(r.focus(),document.activeElement!==o))return}function ZA(l,o){return l.map((r,i)=>l[(o+i)%l.length])}function $A(l,o,r){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,f=r?l.indexOf(r):-1;let d=ZA(l,Math.max(f,0));c.length===1&&(d=d.filter(v=>v!==r));const h=d.find(v=>v.toLowerCase().startsWith(c.toLowerCase()));return h!==r?h:void 0}function kA(l,o){const{x:r,y:i}=l;let c=!1;for(let f=0,d=o.length-1;f<o.length;d=f++){const m=o[f].x,h=o[f].y,v=o[d].x,y=o[d].y;h>i!=y>i&&r<(v-m)*(i-h)/(y-h)+m&&(c=!c)}return c}function FA(l,o){if(!o)return!1;const r={x:l.clientX,y:l.clientY};return kA(r,o)}function dr(l){return o=>o.pointerType==="mouse"?l(o):void 0}var mS=Q0,hS=Sd,vS=$0,pS=k0,gS=Cd,yS=F0,SS=Pu,bS=W0,xS=tS,ES=lS,CS=oS,wS=rS,RS=iS,TS=cS,AS=fS,Td="ContextMenu",[JA]=Jt(Td,[ju]),vt=ju(),[WA,MS]=JA(Td),_S=l=>{const{__scopeContextMenu:o,children:r,onOpenChange:i,dir:c,modal:f=!0}=l,[d,m]=p.useState(!1),h=vt(o),v=ct(i),y=p.useCallback(S=>{m(S),v(S)},[v]);return T.jsx(WA,{scope:o,open:d,onOpenChange:y,modal:f,children:T.jsx(mS,{...h,dir:c,open:d,onOpenChange:y,modal:f,children:r})})};_S.displayName=Td;var OS="ContextMenuTrigger",DS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,disabled:i=!1,...c}=l,f=MS(OS,r),d=vt(r),m=p.useRef({x:0,y:0}),h=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),v=p.useRef(0),y=p.useCallback(()=>window.clearTimeout(v.current),[]),S=b=>{m.current={x:b.clientX,y:b.clientY},f.onOpenChange(!0)};return p.useEffect(()=>y,[y]),p.useEffect(()=>void(i&&y()),[i,y]),T.jsxs(T.Fragment,{children:[T.jsx(hS,{...d,virtualRef:h}),T.jsx(ye.span,{"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:o,style:{WebkitTouchCallout:"none",...l.style},onContextMenu:i?l.onContextMenu:le(l.onContextMenu,b=>{y(),S(b),b.preventDefault()}),onPointerDown:i?l.onPointerDown:le(l.onPointerDown,Ji(b=>{y(),v.current=window.setTimeout(()=>S(b),700)})),onPointerMove:i?l.onPointerMove:le(l.onPointerMove,Ji(y)),onPointerCancel:i?l.onPointerCancel:le(l.onPointerCancel,Ji(y)),onPointerUp:i?l.onPointerUp:le(l.onPointerUp,Ji(y))})]})});DS.displayName=OS;var eM="ContextMenuPortal",NS=l=>{const{__scopeContextMenu:o,...r}=l,i=vt(o);return T.jsx(vS,{...i,...r})};NS.displayName=eM;var zS="ContextMenuContent",LS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=MS(zS,r),f=vt(r),d=p.useRef(!1);return T.jsx(pS,{...f,...i,ref:o,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=l.onCloseAutoFocus)==null||h.call(l,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=l.onInteractOutside)==null||h.call(l,m),!m.defaultPrevented&&!c.modal&&(d.current=!0)},style:{...l.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LS.displayName=zS;var tM="ContextMenuGroup",nM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(gS,{...c,...i,ref:o})});nM.displayName=tM;var lM="ContextMenuLabel",US=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(yS,{...c,...i,ref:o})});US.displayName=lM;var aM="ContextMenuItem",HS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(SS,{...c,...i,ref:o})});HS.displayName=aM;var oM="ContextMenuCheckboxItem",jS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(bS,{...c,...i,ref:o})});jS.displayName=oM;var rM="ContextMenuRadioGroup",iM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(xS,{...c,...i,ref:o})});iM.displayName=rM;var uM="ContextMenuRadioItem",BS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(ES,{...c,...i,ref:o})});BS.displayName=uM;var cM="ContextMenuItemIndicator",PS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(CS,{...c,...i,ref:o})});PS.displayName=cM;var sM="ContextMenuSeparator",GS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(wS,{...c,...i,ref:o})});GS.displayName=sM;var fM="ContextMenuArrow",dM=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(RS,{...c,...i,ref:o})});dM.displayName=fM;var mM="ContextMenuSubTrigger",YS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(TS,{...c,...i,ref:o})});YS.displayName=mM;var hM="ContextMenuSubContent",VS=p.forwardRef((l,o)=>{const{__scopeContextMenu:r,...i}=l,c=vt(r);return T.jsx(AS,{...c,...i,ref:o,style:{...l.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});VS.displayName=hM;function Ji(l){return o=>o.pointerType!=="mouse"?l(o):void 0}var _O=_S,OO=DS,DO=NS,NO=LS,zO=US,LO=HS,UO=jS,HO=BS,jO=PS,BO=GS,PO=YS,GO=VS,vM="Separator",wg="horizontal",pM=["horizontal","vertical"],qS=p.forwardRef((l,o)=>{const{decorative:r,orientation:i=wg,...c}=l,f=gM(i)?i:wg,m=r?{role:"none"}:{"aria-orientation":f==="vertical"?f:void 0,role:"separator"};return T.jsx(ye.div,{"data-orientation":f,...m,...c,ref:o})});qS.displayName=vM;function gM(l){return pM.includes(l)}var YO=qS;function yM(l,o){return p.useReducer((r,i)=>o[r][i]??r,l)}var Ad="ScrollArea",[XS]=Jt(Ad),[SM,Wt]=XS(Ad),KS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,type:i="hover",dir:c,scrollHideDelay:f=600,...d}=l,[m,h]=p.useState(null),[v,y]=p.useState(null),[S,b]=p.useState(null),[E,w]=p.useState(null),[C,A]=p.useState(null),[R,_]=p.useState(0),[N,G]=p.useState(0),[I,$]=p.useState(!1),[U,ee]=p.useState(!1),W=Oe(o,ue=>h(ue)),oe=vr(c);return T.jsx(SM,{scope:r,type:i,dir:oe,scrollHideDelay:f,scrollArea:m,viewport:v,onViewportChange:y,content:S,onContentChange:b,scrollbarX:E,onScrollbarXChange:w,scrollbarXEnabled:I,onScrollbarXEnabledChange:$,scrollbarY:C,onScrollbarYChange:A,scrollbarYEnabled:U,onScrollbarYEnabledChange:ee,onCornerWidthChange:_,onCornerHeightChange:G,children:T.jsx(ye.div,{dir:oe,...d,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":N+"px",...l.style}})})});KS.displayName=Ad;var IS="ScrollAreaViewport",QS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,children:i,nonce:c,...f}=l,d=Wt(IS,r),m=p.useRef(null),h=Oe(o,m,d.onViewportChange);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),T.jsx(ye.div,{"data-radix-scroll-area-viewport":"",...f,ref:h,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...l.style},children:T.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});QS.displayName=IS;var En="ScrollAreaScrollbar",bM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),{onScrollbarXEnabledChange:f,onScrollbarYEnabledChange:d}=c,m=l.orientation==="horizontal";return p.useEffect(()=>(m?f(!0):d(!0),()=>{m?f(!1):d(!1)}),[m,f,d]),c.type==="hover"?T.jsx(xM,{...i,ref:o,forceMount:r}):c.type==="scroll"?T.jsx(EM,{...i,ref:o,forceMount:r}):c.type==="auto"?T.jsx(ZS,{...i,ref:o,forceMount:r}):c.type==="always"?T.jsx(Md,{...i,ref:o}):null});bM.displayName=En;var xM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),[f,d]=p.useState(!1);return p.useEffect(()=>{const m=c.scrollArea;let h=0;if(m){const v=()=>{window.clearTimeout(h),d(!0)},y=()=>{h=window.setTimeout(()=>d(!1),c.scrollHideDelay)};return m.addEventListener("pointerenter",v),m.addEventListener("pointerleave",y),()=>{window.clearTimeout(h),m.removeEventListener("pointerenter",v),m.removeEventListener("pointerleave",y)}}},[c.scrollArea,c.scrollHideDelay]),T.jsx(ft,{present:r||f,children:T.jsx(ZS,{"data-state":f?"visible":"hidden",...i,ref:o})})}),EM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Wt(En,l.__scopeScrollArea),f=l.orientation==="horizontal",d=Yu(()=>h("SCROLL_END"),100),[m,h]=yM("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(m==="idle"){const v=window.setTimeout(()=>h("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(v)}},[m,c.scrollHideDelay,h]),p.useEffect(()=>{const v=c.viewport,y=f?"scrollLeft":"scrollTop";if(v){let S=v[y];const b=()=>{const E=v[y];S!==E&&(h("SCROLL"),d()),S=E};return v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[c.viewport,f,h,d]),T.jsx(ft,{present:r||m!=="hidden",children:T.jsx(Md,{"data-state":m==="hidden"?"hidden":"visible",...i,ref:o,onPointerEnter:le(l.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:le(l.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),ZS=p.forwardRef((l,o)=>{const r=Wt(En,l.__scopeScrollArea),{forceMount:i,...c}=l,[f,d]=p.useState(!1),m=l.orientation==="horizontal",h=Yu(()=>{if(r.viewport){const v=r.viewport.offsetWidth<r.viewport.scrollWidth,y=r.viewport.offsetHeight<r.viewport.scrollHeight;d(m?v:y)}},10);return to(r.viewport,h),to(r.content,h),T.jsx(ft,{present:i||f,children:T.jsx(Md,{"data-state":f?"visible":"hidden",...c,ref:o})})}),Md=p.forwardRef((l,o)=>{const{orientation:r="vertical",...i}=l,c=Wt(En,l.__scopeScrollArea),f=p.useRef(null),d=p.useRef(0),[m,h]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=JS(m.viewport,m.content),y={...i,sizes:m,onSizesChange:h,hasThumb:v>0&&v<1,onThumbChange:b=>f.current=b,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:b=>d.current=b};function S(b,E){return _M(b,d.current,m,E)}return r==="horizontal"?T.jsx(CM,{...y,ref:o,onThumbPositionChange:()=>{if(c.viewport&&f.current){const b=c.viewport.scrollLeft,E=Rg(b,m,c.dir);f.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollLeft=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollLeft=S(b,c.dir))}}):r==="vertical"?T.jsx(wM,{...y,ref:o,onThumbPositionChange:()=>{if(c.viewport&&f.current){const b=c.viewport.scrollTop,E=Rg(b,m);f.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:b=>{c.viewport&&(c.viewport.scrollTop=b)},onDragScroll:b=>{c.viewport&&(c.viewport.scrollTop=S(b))}}):null}),CM=p.forwardRef((l,o)=>{const{sizes:r,onSizesChange:i,...c}=l,f=Wt(En,l.__scopeScrollArea),[d,m]=p.useState(),h=p.useRef(null),v=Oe(o,h,f.onScrollbarXChange);return p.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),T.jsx(kS,{"data-orientation":"horizontal",...c,ref:v,sizes:r,style:{bottom:0,left:f.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:f.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Gu(r)+"px",...l.style},onThumbPointerDown:y=>l.onThumbPointerDown(y.x),onDragScroll:y=>l.onDragScroll(y.x),onWheelScroll:(y,S)=>{if(f.viewport){const b=f.viewport.scrollLeft+y.deltaX;l.onWheelScroll(b),eb(b,S)&&y.preventDefault()}},onResize:()=>{h.current&&f.viewport&&d&&i({content:f.viewport.scrollWidth,viewport:f.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:vu(d.paddingLeft),paddingEnd:vu(d.paddingRight)}})}})}),wM=p.forwardRef((l,o)=>{const{sizes:r,onSizesChange:i,...c}=l,f=Wt(En,l.__scopeScrollArea),[d,m]=p.useState(),h=p.useRef(null),v=Oe(o,h,f.onScrollbarYChange);return p.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),T.jsx(kS,{"data-orientation":"vertical",...c,ref:v,sizes:r,style:{top:0,right:f.dir==="ltr"?0:void 0,left:f.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Gu(r)+"px",...l.style},onThumbPointerDown:y=>l.onThumbPointerDown(y.y),onDragScroll:y=>l.onDragScroll(y.y),onWheelScroll:(y,S)=>{if(f.viewport){const b=f.viewport.scrollTop+y.deltaY;l.onWheelScroll(b),eb(b,S)&&y.preventDefault()}},onResize:()=>{h.current&&f.viewport&&d&&i({content:f.viewport.scrollHeight,viewport:f.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:vu(d.paddingTop),paddingEnd:vu(d.paddingBottom)}})}})}),[RM,$S]=XS(En),kS=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,sizes:i,hasThumb:c,onThumbChange:f,onThumbPointerUp:d,onThumbPointerDown:m,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:y,onResize:S,...b}=l,E=Wt(En,r),[w,C]=p.useState(null),A=Oe(o,W=>C(W)),R=p.useRef(null),_=p.useRef(""),N=E.viewport,G=i.content-i.viewport,I=ct(y),$=ct(h),U=Yu(S,10);function ee(W){if(R.current){const oe=W.clientX-R.current.left,ue=W.clientY-R.current.top;v({x:oe,y:ue})}}return p.useEffect(()=>{const W=oe=>{const ue=oe.target;(w==null?void 0:w.contains(ue))&&I(oe,G)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[N,w,G,I]),p.useEffect($,[i,$]),to(w,U),to(E.content,U),T.jsx(RM,{scope:r,scrollbar:w,hasThumb:c,onThumbChange:ct(f),onThumbPointerUp:ct(d),onThumbPositionChange:$,onThumbPointerDown:ct(m),children:T.jsx(ye.div,{...b,ref:A,style:{position:"absolute",...b.style},onPointerDown:le(l.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),R.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),ee(W))}),onPointerMove:le(l.onPointerMove,ee),onPointerUp:le(l.onPointerUp,W=>{const oe=W.target;oe.hasPointerCapture(W.pointerId)&&oe.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=_.current,E.viewport&&(E.viewport.style.scrollBehavior=""),R.current=null})})})}),hu="ScrollAreaThumb",TM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=$S(hu,l.__scopeScrollArea);return T.jsx(ft,{present:r||c.hasThumb,children:T.jsx(AM,{ref:o,...i})})}),AM=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,style:i,...c}=l,f=Wt(hu,r),d=$S(hu,r),{onThumbPositionChange:m}=d,h=Oe(o,S=>d.onThumbChange(S)),v=p.useRef(void 0),y=Yu(()=>{v.current&&(v.current(),v.current=void 0)},100);return p.useEffect(()=>{const S=f.viewport;if(S){const b=()=>{if(y(),!v.current){const E=OM(S,m);v.current=E,m()}};return m(),S.addEventListener("scroll",b),()=>S.removeEventListener("scroll",b)}},[f.viewport,y,m]),T.jsx(ye.div,{"data-state":d.hasThumb?"visible":"hidden",...c,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:le(l.onPointerDownCapture,S=>{const E=S.target.getBoundingClientRect(),w=S.clientX-E.left,C=S.clientY-E.top;d.onThumbPointerDown({x:w,y:C})}),onPointerUp:le(l.onPointerUp,d.onThumbPointerUp)})});TM.displayName=hu;var _d="ScrollAreaCorner",FS=p.forwardRef((l,o)=>{const r=Wt(_d,l.__scopeScrollArea),i=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&i?T.jsx(MM,{...l,ref:o}):null});FS.displayName=_d;var MM=p.forwardRef((l,o)=>{const{__scopeScrollArea:r,...i}=l,c=Wt(_d,r),[f,d]=p.useState(0),[m,h]=p.useState(0),v=!!(f&&m);return to(c.scrollbarX,()=>{var S;const y=((S=c.scrollbarX)==null?void 0:S.offsetHeight)||0;c.onCornerHeightChange(y),h(y)}),to(c.scrollbarY,()=>{var S;const y=((S=c.scrollbarY)==null?void 0:S.offsetWidth)||0;c.onCornerWidthChange(y),d(y)}),v?T.jsx(ye.div,{...i,ref:o,style:{width:f,height:m,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...l.style}}):null});function vu(l){return l?parseInt(l,10):0}function JS(l,o){const r=l/o;return isNaN(r)?0:r}function Gu(l){const o=JS(l.viewport,l.content),r=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,i=(l.scrollbar.size-r)*o;return Math.max(i,18)}function _M(l,o,r,i="ltr"){const c=Gu(r),f=c/2,d=o||f,m=c-d,h=r.scrollbar.paddingStart+d,v=r.scrollbar.size-r.scrollbar.paddingEnd-m,y=r.content-r.viewport,S=i==="ltr"?[0,y]:[y*-1,0];return WS([h,v],S)(l)}function Rg(l,o,r="ltr"){const i=Gu(o),c=o.scrollbar.paddingStart+o.scrollbar.paddingEnd,f=o.scrollbar.size-c,d=o.content-o.viewport,m=f-i,h=r==="ltr"?[0,d]:[d*-1,0],v=Af(l,h);return WS([0,d],[0,m])(v)}function WS(l,o){return r=>{if(l[0]===l[1]||o[0]===o[1])return o[0];const i=(o[1]-o[0])/(l[1]-l[0]);return o[0]+i*(r-l[0])}}function eb(l,o){return l>0&&l<o}var OM=(l,o=()=>{})=>{let r={left:l.scrollLeft,top:l.scrollTop},i=0;return function c(){const f={left:l.scrollLeft,top:l.scrollTop},d=r.left!==f.left,m=r.top!==f.top;(d||m)&&o(),r=f,i=window.requestAnimationFrame(c)}(),()=>window.cancelAnimationFrame(i)};function Yu(l,o){const r=ct(l),i=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),p.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,o)},[r,o])}function to(l,o){const r=ct(o);ht(()=>{let i=0;if(l){const c=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(r)});return c.observe(l),()=>{window.cancelAnimationFrame(i),c.unobserve(l)}}},[l,r])}var VO=KS,qO=QS,XO=FS,DM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vu=DM.reduce((l,o)=>{const r=MC(`Primitive.${o}`),i=p.forwardRef((c,f)=>{const{asChild:d,...m}=c,h=d?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(h,{...m,ref:f})});return i.displayName=`Primitive.${o}`,{...l,[o]:i}},{}),qu="Switch",[NM]=Pg(qu),[zM,LM]=NM(qu),tb=p.forwardRef((l,o)=>{const{__scopeSwitch:r,name:i,checked:c,defaultChecked:f,required:d,disabled:m,value:h="on",onCheckedChange:v,form:y,...S}=l,[b,E]=p.useState(null),w=Bg(o,N=>E(N)),C=p.useRef(!1),A=b?y||!!b.closest("form"):!0,[R,_]=_C({prop:c,defaultProp:f??!1,onChange:v,caller:qu});return T.jsxs(zM,{scope:r,checked:R,disabled:m,children:[T.jsx(Vu.button,{type:"button",role:"switch","aria-checked":R,"aria-required":d,"data-state":ob(R),"data-disabled":m?"":void 0,disabled:m,value:h,...S,ref:w,onClick:OC(l.onClick,N=>{_(G=>!G),A&&(C.current=N.isPropagationStopped(),C.current||N.stopPropagation())})}),A&&T.jsx(ab,{control:b,bubbles:!C.current,name:i,value:h,checked:R,required:d,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});tb.displayName=qu;var nb="SwitchThumb",lb=p.forwardRef((l,o)=>{const{__scopeSwitch:r,...i}=l,c=LM(nb,r);return T.jsx(Vu.span,{"data-state":ob(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:o})});lb.displayName=nb;var UM="SwitchBubbleInput",ab=p.forwardRef(({__scopeSwitch:l,control:o,checked:r,bubbles:i=!0,...c},f)=>{const d=p.useRef(null),m=Bg(d,f),h=DC(r),v=NC(o);return p.useEffect(()=>{const y=d.current;if(!y)return;const S=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(S,"checked").set;if(h!==r&&E){const w=new Event("click",{bubbles:i});E.call(y,r),y.dispatchEvent(w)}},[h,r,i]),T.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...c,tabIndex:-1,ref:m,style:{...c.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ab.displayName=UM;function ob(l){return l?"checked":"unchecked"}var KO=tb,IO=lb,Od="Collapsible",[HM]=Jt(Od),[jM,Dd]=HM(Od),rb=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,open:i,defaultOpen:c,disabled:f,onOpenChange:d,...m}=l,[h=!1,v]=xl({prop:i,defaultProp:c,onChange:d});return T.jsx(jM,{scope:r,disabled:f,contentId:kt(),open:h,onOpenToggle:p.useCallback(()=>v(y=>!y),[v]),children:T.jsx(ye.div,{"data-state":zd(h),"data-disabled":f?"":void 0,...m,ref:o})})});rb.displayName=Od;var ib="CollapsibleTrigger",BM=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,...i}=l,c=Dd(ib,r);return T.jsx(ye.button,{type:"button","aria-controls":c.contentId,"aria-expanded":c.open||!1,"data-state":zd(c.open),"data-disabled":c.disabled?"":void 0,disabled:c.disabled,...i,ref:o,onClick:le(l.onClick,c.onOpenToggle)})});BM.displayName=ib;var Nd="CollapsibleContent",PM=p.forwardRef((l,o)=>{const{forceMount:r,...i}=l,c=Dd(Nd,l.__scopeCollapsible);return T.jsx(ft,{present:r||c.open,children:({present:f})=>T.jsx(GM,{...i,ref:o,present:f})})});PM.displayName=Nd;var GM=p.forwardRef((l,o)=>{const{__scopeCollapsible:r,present:i,children:c,...f}=l,d=Dd(Nd,r),[m,h]=p.useState(i),v=p.useRef(null),y=Oe(o,v),S=p.useRef(0),b=S.current,E=p.useRef(0),w=E.current,C=d.open||m,A=p.useRef(C),R=p.useRef(void 0);return p.useEffect(()=>{const _=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(_)},[]),ht(()=>{const _=v.current;if(_){R.current=R.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const N=_.getBoundingClientRect();S.current=N.height,E.current=N.width,A.current||(_.style.transitionDuration=R.current.transitionDuration,_.style.animationName=R.current.animationName),h(i)}},[d.open,i]),T.jsx(ye.div,{"data-state":zd(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!C,...f,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...l.style},children:C&&c})});function zd(l){return l?"open":"closed"}var QO=rb,Ld="DropdownMenu",[YM]=Jt(Ld,[ju]),pt=ju(),[VM,ub]=YM(Ld),cb=l=>{const{__scopeDropdownMenu:o,children:r,dir:i,open:c,defaultOpen:f,onOpenChange:d,modal:m=!0}=l,h=pt(o),v=p.useRef(null),[y=!1,S]=xl({prop:c,defaultProp:f,onChange:d});return T.jsx(VM,{scope:o,triggerId:kt(),triggerRef:v,contentId:kt(),open:y,onOpenChange:S,onOpenToggle:p.useCallback(()=>S(b=>!b),[S]),modal:m,children:T.jsx(mS,{...h,open:y,onOpenChange:S,dir:i,modal:m,children:r})})};cb.displayName=Ld;var sb="DropdownMenuTrigger",fb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...c}=l,f=ub(sb,r),d=pt(r);return T.jsx(hS,{asChild:!0,...d,children:T.jsx(ye.button,{type:"button",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...c,ref:jg(o,f.triggerRef),onPointerDown:le(l.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(f.onOpenToggle(),f.open||m.preventDefault())}),onKeyDown:le(l.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&f.onOpenToggle(),m.key==="ArrowDown"&&f.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})});fb.displayName=sb;var qM="DropdownMenuPortal",db=l=>{const{__scopeDropdownMenu:o,...r}=l,i=pt(o);return T.jsx(vS,{...i,...r})};db.displayName=qM;var mb="DropdownMenuContent",hb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=ub(mb,r),f=pt(r),d=p.useRef(!1);return T.jsx(pS,{id:c.contentId,"aria-labelledby":c.triggerId,...f,...i,ref:o,onCloseAutoFocus:le(l.onCloseAutoFocus,m=>{var h;d.current||(h=c.triggerRef.current)==null||h.focus(),d.current=!1,m.preventDefault()}),onInteractOutside:le(l.onInteractOutside,m=>{const h=m.detail.originalEvent,v=h.button===0&&h.ctrlKey===!0,y=h.button===2||v;(!c.modal||y)&&(d.current=!0)}),style:{...l.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)"}})});hb.displayName=mb;var XM="DropdownMenuGroup",KM=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(gS,{...c,...i,ref:o})});KM.displayName=XM;var IM="DropdownMenuLabel",vb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(yS,{...c,...i,ref:o})});vb.displayName=IM;var QM="DropdownMenuItem",pb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(SS,{...c,...i,ref:o})});pb.displayName=QM;var ZM="DropdownMenuCheckboxItem",gb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(bS,{...c,...i,ref:o})});gb.displayName=ZM;var $M="DropdownMenuRadioGroup",kM=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(xS,{...c,...i,ref:o})});kM.displayName=$M;var FM="DropdownMenuRadioItem",yb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(ES,{...c,...i,ref:o})});yb.displayName=FM;var JM="DropdownMenuItemIndicator",Sb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(CS,{...c,...i,ref:o})});Sb.displayName=JM;var WM="DropdownMenuSeparator",bb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(wS,{...c,...i,ref:o})});bb.displayName=WM;var e_="DropdownMenuArrow",t_=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(RS,{...c,...i,ref:o})});t_.displayName=e_;var n_="DropdownMenuSubTrigger",xb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(TS,{...c,...i,ref:o})});xb.displayName=n_;var l_="DropdownMenuSubContent",Eb=p.forwardRef((l,o)=>{const{__scopeDropdownMenu:r,...i}=l,c=pt(r);return T.jsx(AS,{...c,...i,ref:o,style:{...l.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)"}})});Eb.displayName=l_;var ZO=cb,$O=fb,kO=db,FO=hb,JO=vb,WO=pb,eD=gb,tD=yb,nD=Sb,lD=bb,aD=xb,oD=Eb,Ud="Tabs",[a_]=Jt(Ud,[Hu]),Cb=Hu(),[o_,Hd]=a_(Ud),wb=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,onValueChange:c,defaultValue:f,orientation:d="horizontal",dir:m,activationMode:h="automatic",...v}=l,y=vr(m),[S,b]=xl({prop:i,onChange:c,defaultProp:f});return T.jsx(o_,{scope:r,baseId:kt(),value:S,onValueChange:b,orientation:d,dir:y,activationMode:h,children:T.jsx(ye.div,{dir:y,"data-orientation":d,...v,ref:o})})});wb.displayName=Ud;var Rb="TabsList",Tb=p.forwardRef((l,o)=>{const{__scopeTabs:r,loop:i=!0,...c}=l,f=Hd(Rb,r),d=Cb(r);return T.jsx(q0,{asChild:!0,...d,orientation:f.orientation,dir:f.dir,loop:i,children:T.jsx(ye.div,{role:"tablist","aria-orientation":f.orientation,...c,ref:o})})});Tb.displayName=Rb;var Ab="TabsTrigger",Mb=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,disabled:c=!1,...f}=l,d=Hd(Ab,r),m=Cb(r),h=Db(d.baseId,i),v=Nb(d.baseId,i),y=i===d.value;return T.jsx(X0,{asChild:!0,...m,focusable:!c,active:y,children:T.jsx(ye.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":v,"data-state":y?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:h,...f,ref:o,onMouseDown:le(l.onMouseDown,S=>{!c&&S.button===0&&S.ctrlKey===!1?d.onValueChange(i):S.preventDefault()}),onKeyDown:le(l.onKeyDown,S=>{[" ","Enter"].includes(S.key)&&d.onValueChange(i)}),onFocus:le(l.onFocus,()=>{const S=d.activationMode!=="manual";!y&&!c&&S&&d.onValueChange(i)})})})});Mb.displayName=Ab;var _b="TabsContent",Ob=p.forwardRef((l,o)=>{const{__scopeTabs:r,value:i,forceMount:c,children:f,...d}=l,m=Hd(_b,r),h=Db(m.baseId,i),v=Nb(m.baseId,i),y=i===m.value,S=p.useRef(y);return p.useEffect(()=>{const b=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(b)},[]),T.jsx(ft,{present:c||y,children:({present:b})=>T.jsx(ye.div,{"data-state":y?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:v,tabIndex:0,...d,ref:o,style:{...l.style,animationDuration:S.current?"0s":void 0},children:b&&f})})});Ob.displayName=_b;function Db(l,o){return`${l}-trigger-${o}`}function Nb(l,o){return`${l}-content-${o}`}var rD=wb,iD=Tb,uD=Mb,cD=Ob;const{createElement:no,createContext:r_,forwardRef:zb,useCallback:Rt,useContext:Lb,useEffect:Zl,useImperativeHandle:Ub,useLayoutEffect:i_,useMemo:u_,useRef:Tt,useState:ka}=Yg,Tg=Yg[`useId${Math.random()}`.slice(0,5)],c_=i_,Xu=r_(null);Xu.displayName="PanelGroupContext";const $l=c_,s_=typeof Tg=="function"?Tg:()=>null;let f_=0;function jd(l=null){const o=s_(),r=Tt(l||o||null);return r.current===null&&(r.current=""+f_++),l??r.current}function Hb({children:l,className:o="",collapsedSize:r,collapsible:i,defaultSize:c,forwardedRef:f,id:d,maxSize:m,minSize:h,onCollapse:v,onExpand:y,onResize:S,order:b,style:E,tagName:w="div",...C}){const A=Lb(Xu);if(A===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:R,expandPanel:_,getPanelSize:N,getPanelStyle:G,groupId:I,isPanelCollapsed:$,reevaluatePanelConstraints:U,registerPanel:ee,resizePanel:W,unregisterPanel:oe}=A,ue=jd(d),re=Tt({callbacks:{onCollapse:v,onExpand:y,onResize:S},constraints:{collapsedSize:r,collapsible:i,defaultSize:c,maxSize:m,minSize:h},id:ue,idIsFromProps:d!==void 0,order:b});Tt({didLogMissingDefaultSizeWarning:!1}),$l(()=>{const{callbacks:se,constraints:me}=re.current,z={...me};re.current.id=ue,re.current.idIsFromProps=d!==void 0,re.current.order=b,se.onCollapse=v,se.onExpand=y,se.onResize=S,me.collapsedSize=r,me.collapsible=i,me.defaultSize=c,me.maxSize=m,me.minSize=h,(z.collapsedSize!==me.collapsedSize||z.collapsible!==me.collapsible||z.maxSize!==me.maxSize||z.minSize!==me.minSize)&&U(re.current,z)}),$l(()=>{const se=re.current;return ee(se),()=>{oe(se)}},[b,ue,ee,oe]),Ub(f,()=>({collapse:()=>{R(re.current)},expand:se=>{_(re.current,se)},getId(){return ue},getSize(){return N(re.current)},isCollapsed(){return $(re.current)},isExpanded(){return!$(re.current)},resize:se=>{W(re.current,se)}}),[R,_,N,$,ue,W]);const ge=G(re.current,c);return no(w,{...C,children:l,className:o,id:d,style:{...ge,...E},"data-panel":"","data-panel-collapsible":i||void 0,"data-panel-group-id":I,"data-panel-id":ue,"data-panel-size":parseFloat(""+ge.flexGrow).toFixed(1)})}const d_=zb((l,o)=>no(Hb,{...l,forwardedRef:o}));Hb.displayName="Panel";d_.displayName="forwardRef(Panel)";let qf=null,Ql=null;function m_(l,o){if(o){const r=(o&Yb)!==0,i=(o&Vb)!==0,c=(o&qb)!==0,f=(o&Xb)!==0;if(r)return c?"se-resize":f?"ne-resize":"e-resize";if(i)return c?"sw-resize":f?"nw-resize":"w-resize";if(c)return"s-resize";if(f)return"n-resize"}switch(l){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function h_(){Ql!==null&&(document.head.removeChild(Ql),qf=null,Ql=null)}function Rf(l,o){const r=m_(l,o);qf!==r&&(qf=r,Ql===null&&(Ql=document.createElement("style"),document.head.appendChild(Ql)),Ql.innerHTML=`*{cursor: ${r}!important;}`)}function jb(l){return l.type==="keydown"}function Bb(l){return l.type.startsWith("pointer")}function Pb(l){return l.type.startsWith("mouse")}function Ku(l){if(Bb(l)){if(l.isPrimary)return{x:l.clientX,y:l.clientY}}else if(Pb(l))return{x:l.clientX,y:l.clientY};return{x:1/0,y:1/0}}function v_(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function p_(l,o,r){return l.x<o.x+o.width&&l.x+l.width>o.x&&l.y<o.y+o.height&&l.y+l.height>o.y}function g_(l,o){if(l===o)throw new Error("Cannot compare node with itself");const r={a:_g(l),b:_g(o)};let i;for(;r.a.at(-1)===r.b.at(-1);)l=r.a.pop(),o=r.b.pop(),i=l;we(i,"Stacking order can only be calculated for elements with a common ancestor");const c={a:Mg(Ag(r.a)),b:Mg(Ag(r.b))};if(c.a===c.b){const f=i.childNodes,d={a:r.a.at(-1),b:r.b.at(-1)};let m=f.length;for(;m--;){const h=f[m];if(h===d.a)return 1;if(h===d.b)return-1}}return Math.sign(c.a-c.b)}const y_=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function S_(l){var o;const r=getComputedStyle((o=Gb(l))!==null&&o!==void 0?o:l).display;return r==="flex"||r==="inline-flex"}function b_(l){const o=getComputedStyle(l);return!!(o.position==="fixed"||o.zIndex!=="auto"&&(o.position!=="static"||S_(l))||+o.opacity<1||"transform"in o&&o.transform!=="none"||"webkitTransform"in o&&o.webkitTransform!=="none"||"mixBlendMode"in o&&o.mixBlendMode!=="normal"||"filter"in o&&o.filter!=="none"||"webkitFilter"in o&&o.webkitFilter!=="none"||"isolation"in o&&o.isolation==="isolate"||y_.test(o.willChange)||o.webkitOverflowScrolling==="touch")}function Ag(l){let o=l.length;for(;o--;){const r=l[o];if(we(r,"Missing node"),b_(r))return r}return null}function Mg(l){return l&&Number(getComputedStyle(l).zIndex)||0}function _g(l){const o=[];for(;l;)o.push(l),l=Gb(l);return o}function Gb(l){const{parentNode:o}=l;return o&&o instanceof ShadowRoot?o.host:o}const Yb=1,Vb=2,qb=4,Xb=8,x_=v_()==="coarse";let rn=[],Fa=!1,bl=new Map,Iu=new Map;const mr=new Set;function E_(l,o,r,i,c){var f;const{ownerDocument:d}=o,m={direction:r,element:o,hitAreaMargins:i,setResizeHandlerState:c},h=(f=bl.get(d))!==null&&f!==void 0?f:0;return bl.set(d,h+1),mr.add(m),pu(),function(){var y;Iu.delete(l),mr.delete(m);const S=(y=bl.get(d))!==null&&y!==void 0?y:1;if(bl.set(d,S-1),pu(),S===1&&bl.delete(d),rn.includes(m)){const b=rn.indexOf(m);b>=0&&rn.splice(b,1),Pd(),c("up",!0,null)}}}function Og(l){const{target:o}=l,{x:r,y:i}=Ku(l);Fa=!0,Bd({target:o,x:r,y:i}),pu(),rn.length>0&&(gu("down",l),l.preventDefault(),l.stopPropagation())}function ar(l){const{x:o,y:r}=Ku(l);if(Fa&&l.buttons===0&&(Fa=!1,gu("up",l)),!Fa){const{target:i}=l;Bd({target:i,x:o,y:r})}gu("move",l),Pd(),rn.length>0&&l.preventDefault()}function Xa(l){const{target:o}=l,{x:r,y:i}=Ku(l);Iu.clear(),Fa=!1,rn.length>0&&l.preventDefault(),gu("up",l),Bd({target:o,x:r,y:i}),Pd(),pu()}function Bd({target:l,x:o,y:r}){rn.splice(0);let i=null;(l instanceof HTMLElement||l instanceof SVGElement)&&(i=l),mr.forEach(c=>{const{element:f,hitAreaMargins:d}=c,m=f.getBoundingClientRect(),{bottom:h,left:v,right:y,top:S}=m,b=x_?d.coarse:d.fine;if(o>=v-b&&o<=y+b&&r>=S-b&&r<=h+b){if(i!==null&&document.contains(i)&&f!==i&&!f.contains(i)&&!i.contains(f)&&g_(i,f)>0){let w=i,C=!1;for(;w&&!w.contains(f);){if(p_(w.getBoundingClientRect(),m)){C=!0;break}w=w.parentElement}if(C)return}rn.push(c)}})}function Tf(l,o){Iu.set(l,o)}function Pd(){let l=!1,o=!1;rn.forEach(i=>{const{direction:c}=i;c==="horizontal"?l=!0:o=!0});let r=0;Iu.forEach(i=>{r|=i}),l&&o?Rf("intersection",r):l?Rf("horizontal",r):o?Rf("vertical",r):h_()}function pu(){bl.forEach((l,o)=>{const{body:r}=o;r.removeEventListener("contextmenu",Xa),r.removeEventListener("pointerdown",Og),r.removeEventListener("pointerleave",ar),r.removeEventListener("pointermove",ar)}),window.removeEventListener("pointerup",Xa),window.removeEventListener("pointercancel",Xa),mr.size>0&&(Fa?(rn.length>0&&bl.forEach((l,o)=>{const{body:r}=o;l>0&&(r.addEventListener("contextmenu",Xa),r.addEventListener("pointerleave",ar),r.addEventListener("pointermove",ar))}),window.addEventListener("pointerup",Xa),window.addEventListener("pointercancel",Xa)):bl.forEach((l,o)=>{const{body:r}=o;l>0&&(r.addEventListener("pointerdown",Og,{capture:!0}),r.addEventListener("pointermove",ar))}))}function gu(l,o){mr.forEach(r=>{const{setResizeHandlerState:i}=r,c=rn.includes(r);i(l,c,o)})}function C_(){const[l,o]=ka(0);return Rt(()=>o(r=>r+1),[])}function we(l,o){if(!l)throw console.error(o),Error(o)}const Gd=10;function Wl(l,o,r=Gd){return l.toFixed(r)===o.toFixed(r)?0:l>o?1:-1}function Vn(l,o,r=Gd){return Wl(l,o,r)===0}function jt(l,o,r){return Wl(l,o,r)===0}function w_(l,o,r){if(l.length!==o.length)return!1;for(let i=0;i<l.length;i++){const c=l[i],f=o[i];if(!jt(c,f,r))return!1}return!0}function Qa({panelConstraints:l,panelIndex:o,size:r}){const i=l[o];we(i!=null,`Panel constraints not found for index ${o}`);let{collapsedSize:c=0,collapsible:f,maxSize:d=100,minSize:m=0}=i;if(Wl(r,m)<0)if(f){const h=(c+m)/2;Wl(r,h)<0?r=c:r=m}else r=m;return r=Math.min(d,r),r=parseFloat(r.toFixed(Gd)),r}function ir({delta:l,initialLayout:o,panelConstraints:r,pivotIndices:i,prevLayout:c,trigger:f}){if(jt(l,0))return o;const d=[...o],[m,h]=i;we(m!=null,"Invalid first pivot index"),we(h!=null,"Invalid second pivot index");let v=0;if(f==="keyboard"){{const S=l<0?h:m,b=r[S];we(b,`Panel constraints not found for index ${S}`);const{collapsedSize:E=0,collapsible:w,minSize:C=0}=b;if(w){const A=o[S];if(we(A!=null,`Previous layout not found for panel index ${S}`),jt(A,E)){const R=C-A;Wl(R,Math.abs(l))>0&&(l=l<0?0-R:R)}}}{const S=l<0?m:h,b=r[S];we(b,`No panel constraints found for index ${S}`);const{collapsedSize:E=0,collapsible:w,minSize:C=0}=b;if(w){const A=o[S];if(we(A!=null,`Previous layout not found for panel index ${S}`),jt(A,C)){const R=A-E;Wl(R,Math.abs(l))>0&&(l=l<0?0-R:R)}}}}{const S=l<0?1:-1;let b=l<0?h:m,E=0;for(;;){const C=o[b];we(C!=null,`Previous layout not found for panel index ${b}`);const R=Qa({panelConstraints:r,panelIndex:b,size:100})-C;if(E+=R,b+=S,b<0||b>=r.length)break}const w=Math.min(Math.abs(l),Math.abs(E));l=l<0?0-w:w}{let b=l<0?m:h;for(;b>=0&&b<r.length;){const E=Math.abs(l)-Math.abs(v),w=o[b];we(w!=null,`Previous layout not found for panel index ${b}`);const C=w-E,A=Qa({panelConstraints:r,panelIndex:b,size:C});if(!jt(w,A)&&(v+=w-A,d[b]=A,v.toPrecision(3).localeCompare(Math.abs(l).toPrecision(3),void 0,{numeric:!0})>=0))break;l<0?b--:b++}}if(w_(c,d))return c;{const S=l<0?h:m,b=o[S];we(b!=null,`Previous layout not found for panel index ${S}`);const E=b+v,w=Qa({panelConstraints:r,panelIndex:S,size:E});if(d[S]=w,!jt(w,E)){let C=E-w,R=l<0?h:m;for(;R>=0&&R<r.length;){const _=d[R];we(_!=null,`Previous layout not found for panel index ${R}`);const N=_+C,G=Qa({panelConstraints:r,panelIndex:R,size:N});if(jt(_,G)||(C-=G-_,d[R]=G),jt(C,0))break;l>0?R--:R++}}}const y=d.reduce((S,b)=>b+S,0);return jt(y,100)?d:c}function R_({layout:l,panelsArray:o,pivotIndices:r}){let i=0,c=100,f=0,d=0;const m=r[0];we(m!=null,"No pivot index found"),o.forEach((S,b)=>{const{constraints:E}=S,{maxSize:w=100,minSize:C=0}=E;b===m?(i=C,c=w):(f+=C,d+=w)});const h=Math.min(c,100-f),v=Math.max(i,100-d),y=l[m];return{valueMax:h,valueMin:v,valueNow:y}}function hr(l,o=document){return Array.from(o.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${l}"]`))}function Kb(l,o,r=document){const c=hr(l,r).findIndex(f=>f.getAttribute("data-panel-resize-handle-id")===o);return c??null}function Ib(l,o,r){const i=Kb(l,o,r);return i!=null?[i,i+1]:[-1,-1]}function Qb(l,o=document){var r;if(o instanceof HTMLElement&&(o==null||(r=o.dataset)===null||r===void 0?void 0:r.panelGroupId)==l)return o;const i=o.querySelector(`[data-panel-group][data-panel-group-id="${l}"]`);return i||null}function Qu(l,o=document){const r=o.querySelector(`[data-panel-resize-handle-id="${l}"]`);return r||null}function T_(l,o,r,i=document){var c,f,d,m;const h=Qu(o,i),v=hr(l,i),y=h?v.indexOf(h):-1,S=(c=(f=r[y])===null||f===void 0?void 0:f.id)!==null&&c!==void 0?c:null,b=(d=(m=r[y+1])===null||m===void 0?void 0:m.id)!==null&&d!==void 0?d:null;return[S,b]}function A_({committedValuesRef:l,eagerValuesRef:o,groupId:r,layout:i,panelDataArray:c,panelGroupElement:f,setLayout:d}){Tt({didWarnAboutMissingResizeHandle:!1}),$l(()=>{if(!f)return;const m=hr(r,f);for(let h=0;h<c.length-1;h++){const{valueMax:v,valueMin:y,valueNow:S}=R_({layout:i,panelsArray:c,pivotIndices:[h,h+1]}),b=m[h];if(b!=null){const E=c[h];we(E,`No panel data found for index "${h}"`),b.setAttribute("aria-controls",E.id),b.setAttribute("aria-valuemax",""+Math.round(v)),b.setAttribute("aria-valuemin",""+Math.round(y)),b.setAttribute("aria-valuenow",S!=null?""+Math.round(S):"")}}return()=>{m.forEach((h,v)=>{h.removeAttribute("aria-controls"),h.removeAttribute("aria-valuemax"),h.removeAttribute("aria-valuemin"),h.removeAttribute("aria-valuenow")})}},[r,i,c,f]),Zl(()=>{if(!f)return;const m=o.current;we(m,"Eager values not found");const{panelDataArray:h}=m,v=Qb(r,f);we(v!=null,`No group found for id "${r}"`);const y=hr(r,f);we(y,`No resize handles found for group id "${r}"`);const S=y.map(b=>{const E=b.getAttribute("data-panel-resize-handle-id");we(E,"Resize handle element has no handle id attribute");const[w,C]=T_(r,E,h,f);if(w==null||C==null)return()=>{};const A=R=>{if(!R.defaultPrevented)switch(R.key){case"Enter":{R.preventDefault();const _=h.findIndex(N=>N.id===w);if(_>=0){const N=h[_];we(N,`No panel data found for index ${_}`);const G=i[_],{collapsedSize:I=0,collapsible:$,minSize:U=0}=N.constraints;if(G!=null&&$){const ee=ir({delta:jt(G,I)?U-I:I-G,initialLayout:i,panelConstraints:h.map(W=>W.constraints),pivotIndices:Ib(r,E,f),prevLayout:i,trigger:"keyboard"});i!==ee&&d(ee)}}break}}};return b.addEventListener("keydown",A),()=>{b.removeEventListener("keydown",A)}});return()=>{S.forEach(b=>b())}},[f,l,o,r,i,c,d])}function Dg(l,o){if(l.length!==o.length)return!1;for(let r=0;r<l.length;r++)if(l[r]!==o[r])return!1;return!0}function Zb(l,o){const r=l==="horizontal",{x:i,y:c}=Ku(o);return r?i:c}function M_(l,o,r,i,c){const f=r==="horizontal",d=Qu(o,c);we(d,`No resize handle element found for id "${o}"`);const m=d.getAttribute("data-panel-group-id");we(m,"Resize handle element has no group id attribute");let{initialCursorPosition:h}=i;const v=Zb(r,l),y=Qb(m,c);we(y,`No group element found for id "${m}"`);const S=y.getBoundingClientRect(),b=f?S.width:S.height;return(v-h)/b*100}function __(l,o,r,i,c,f){if(jb(l)){const d=r==="horizontal";let m=0;l.shiftKey?m=100:c!=null?m=c:m=10;let h=0;switch(l.key){case"ArrowDown":h=d?0:m;break;case"ArrowLeft":h=d?-m:0;break;case"ArrowRight":h=d?m:0;break;case"ArrowUp":h=d?0:-m;break;case"End":h=100;break;case"Home":h=-100;break}return h}else return i==null?0:M_(l,o,r,i,f)}function O_({panelDataArray:l}){const o=Array(l.length),r=l.map(f=>f.constraints);let i=0,c=100;for(let f=0;f<l.length;f++){const d=r[f];we(d,`Panel constraints not found for index ${f}`);const{defaultSize:m}=d;m!=null&&(i++,o[f]=m,c-=m)}for(let f=0;f<l.length;f++){const d=r[f];we(d,`Panel constraints not found for index ${f}`);const{defaultSize:m}=d;if(m!=null)continue;const h=l.length-i,v=c/h;i++,o[f]=v,c-=v}return o}function Ka(l,o,r){o.forEach((i,c)=>{const f=l[c];we(f,`Panel data not found for index ${c}`);const{callbacks:d,constraints:m,id:h}=f,{collapsedSize:v=0,collapsible:y}=m,S=r[h];if(S==null||i!==S){r[h]=i;const{onCollapse:b,onExpand:E,onResize:w}=d;w&&w(i,S),y&&(b||E)&&(E&&(S==null||Vn(S,v))&&!Vn(i,v)&&E(),b&&(S==null||!Vn(S,v))&&Vn(i,v)&&b())}})}function Wi(l,o){if(l.length!==o.length)return!1;for(let r=0;r<l.length;r++)if(l[r]!=o[r])return!1;return!0}function D_({defaultSize:l,dragState:o,layout:r,panelData:i,panelIndex:c,precision:f=3}){const d=r[c];let m;return d==null?m=l!=null?l.toPrecision(f):"1":i.length===1?m="1":m=d.toPrecision(f),{flexBasis:0,flexGrow:m,flexShrink:1,overflow:"hidden",pointerEvents:o!==null?"none":void 0}}function N_(l,o=10){let r=null;return(...c)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{l(...c)},o)}}function Ng(l){try{if(typeof localStorage<"u")l.getItem=o=>localStorage.getItem(o),l.setItem=(o,r)=>{localStorage.setItem(o,r)};else throw new Error("localStorage not supported in this environment")}catch(o){console.error(o),l.getItem=()=>null,l.setItem=()=>{}}}function $b(l){return`react-resizable-panels:${l}`}function kb(l){return l.map(o=>{const{constraints:r,id:i,idIsFromProps:c,order:f}=o;return c?i:f?`${f}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((o,r)=>o.localeCompare(r)).join(",")}function Fb(l,o){try{const r=$b(l),i=o.getItem(r);if(i){const c=JSON.parse(i);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function z_(l,o,r){var i,c;const f=(i=Fb(l,r))!==null&&i!==void 0?i:{},d=kb(o);return(c=f[d])!==null&&c!==void 0?c:null}function L_(l,o,r,i,c){var f;const d=$b(l),m=kb(o),h=(f=Fb(l,c))!==null&&f!==void 0?f:{};h[m]={expandToSizes:Object.fromEntries(r.entries()),layout:i};try{c.setItem(d,JSON.stringify(h))}catch(v){console.error(v)}}function zg({layout:l,panelConstraints:o}){const r=[...l],i=r.reduce((f,d)=>f+d,0);if(r.length!==o.length)throw Error(`Invalid ${o.length} panel layout: ${r.map(f=>`${f}%`).join(", ")}`);if(!jt(i,100)&&r.length>0)for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=100/i*d;r[f]=m}let c=0;for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=Qa({panelConstraints:o,panelIndex:f,size:d});d!=m&&(c+=d-m,r[f]=m)}if(!jt(c,0))for(let f=0;f<o.length;f++){const d=r[f];we(d!=null,`No layout data found for index ${f}`);const m=d+c,h=Qa({panelConstraints:o,panelIndex:f,size:m});if(d!==h&&(c-=h-d,r[f]=h,jt(c,0)))break}return r}const U_=100,ur={getItem:l=>(Ng(ur),ur.getItem(l)),setItem:(l,o)=>{Ng(ur),ur.setItem(l,o)}},Lg={};function Jb({autoSaveId:l=null,children:o,className:r="",direction:i,forwardedRef:c,id:f=null,onLayout:d=null,keyboardResizeBy:m=null,storage:h=ur,style:v,tagName:y="div",...S}){const b=jd(f),E=Tt(null),[w,C]=ka(null),[A,R]=ka([]),_=C_(),N=Tt({}),G=Tt(new Map),I=Tt(0),$=Tt({autoSaveId:l,direction:i,dragState:w,id:b,keyboardResizeBy:m,onLayout:d,storage:h}),U=Tt({layout:A,panelDataArray:[],panelDataArrayChanged:!1});Tt({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),Ub(c,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:P}=U.current;return P},setLayout:P=>{const{onLayout:Q}=$.current,{layout:ne,panelDataArray:te}=U.current,q=zg({layout:P,panelConstraints:te.map(ae=>ae.constraints)});Dg(ne,q)||(R(q),U.current.layout=q,Q&&Q(q),Ka(te,q,N.current))}}),[]),$l(()=>{$.current.autoSaveId=l,$.current.direction=i,$.current.dragState=w,$.current.id=b,$.current.onLayout=d,$.current.storage=h}),A_({committedValuesRef:$,eagerValuesRef:U,groupId:b,layout:A,panelDataArray:U.current.panelDataArray,setLayout:R,panelGroupElement:E.current}),Zl(()=>{const{panelDataArray:P}=U.current;if(l){if(A.length===0||A.length!==P.length)return;let Q=Lg[l];Q==null&&(Q=N_(L_,U_),Lg[l]=Q);const ne=[...P],te=new Map(G.current);Q(l,ne,te,A,h)}},[l,A,h]),Zl(()=>{});const ee=Rt(P=>{const{onLayout:Q}=$.current,{layout:ne,panelDataArray:te}=U.current;if(P.constraints.collapsible){const q=te.map(Se=>Se.constraints),{collapsedSize:ae=0,panelSize:ie,pivotIndices:he}=Il(te,P,ne);if(we(ie!=null,`Panel size not found for panel "${P.id}"`),!Vn(ie,ae)){G.current.set(P.id,ie);const xe=Ia(te,P)===te.length-1?ie-ae:ae-ie,Re=ir({delta:xe,initialLayout:ne,panelConstraints:q,pivotIndices:he,prevLayout:ne,trigger:"imperative-api"});Wi(ne,Re)||(R(Re),U.current.layout=Re,Q&&Q(Re),Ka(te,Re,N.current))}}},[]),W=Rt((P,Q)=>{const{onLayout:ne}=$.current,{layout:te,panelDataArray:q}=U.current;if(P.constraints.collapsible){const ae=q.map(Ue=>Ue.constraints),{collapsedSize:ie=0,panelSize:he=0,minSize:Se=0,pivotIndices:xe}=Il(q,P,te),Re=Q??Se;if(Vn(he,ie)){const Ue=G.current.get(P.id),dt=Ue!=null&&Ue>=Re?Ue:Re,en=Ia(q,P)===q.length-1?he-dt:dt-he,We=ir({delta:en,initialLayout:te,panelConstraints:ae,pivotIndices:xe,prevLayout:te,trigger:"imperative-api"});Wi(te,We)||(R(We),U.current.layout=We,ne&&ne(We),Ka(q,We,N.current))}}},[]),oe=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{panelSize:te}=Il(ne,P,Q);return we(te!=null,`Panel size not found for panel "${P.id}"`),te},[]),ue=Rt((P,Q)=>{const{panelDataArray:ne}=U.current,te=Ia(ne,P);return D_({defaultSize:Q,dragState:w,layout:A,panelData:ne,panelIndex:te})},[w,A]),re=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{collapsedSize:te=0,collapsible:q,panelSize:ae}=Il(ne,P,Q);return we(ae!=null,`Panel size not found for panel "${P.id}"`),q===!0&&Vn(ae,te)},[]),ge=Rt(P=>{const{layout:Q,panelDataArray:ne}=U.current,{collapsedSize:te=0,collapsible:q,panelSize:ae}=Il(ne,P,Q);return we(ae!=null,`Panel size not found for panel "${P.id}"`),!q||Wl(ae,te)>0},[]),se=Rt(P=>{const{panelDataArray:Q}=U.current;Q.push(P),Q.sort((ne,te)=>{const q=ne.order,ae=te.order;return q==null&&ae==null?0:q==null?-1:ae==null?1:q-ae}),U.current.panelDataArrayChanged=!0,_()},[_]);$l(()=>{if(U.current.panelDataArrayChanged){U.current.panelDataArrayChanged=!1;const{autoSaveId:P,onLayout:Q,storage:ne}=$.current,{layout:te,panelDataArray:q}=U.current;let ae=null;if(P){const he=z_(P,q,ne);he&&(G.current=new Map(Object.entries(he.expandToSizes)),ae=he.layout)}ae==null&&(ae=O_({panelDataArray:q}));const ie=zg({layout:ae,panelConstraints:q.map(he=>he.constraints)});Dg(te,ie)||(R(ie),U.current.layout=ie,Q&&Q(ie),Ka(q,ie,N.current))}}),$l(()=>{const P=U.current;return()=>{P.layout=[]}},[]);const me=Rt(P=>{let Q=!1;const ne=E.current;return ne&&window.getComputedStyle(ne,null).getPropertyValue("direction")==="rtl"&&(Q=!0),function(q){q.preventDefault();const ae=E.current;if(!ae)return()=>null;const{direction:ie,dragState:he,id:Se,keyboardResizeBy:xe,onLayout:Re}=$.current,{layout:Ue,panelDataArray:dt}=U.current,{initialLayout:gt}=he??{},en=Ib(Se,P,ae);let We=__(q,P,ie,he,xe,ae);const tn=ie==="horizontal";tn&&Q&&(We=-We);const uo=dt.map(Zu=>Zu.constraints),Cn=ir({delta:We,initialLayout:gt??Ue,panelConstraints:uo,pivotIndices:en,prevLayout:Ue,trigger:jb(q)?"keyboard":"mouse-or-touch"}),Ar=!Wi(Ue,Cn);(Bb(q)||Pb(q))&&I.current!=We&&(I.current=We,!Ar&&We!==0?tn?Tf(P,We<0?Yb:Vb):Tf(P,We<0?qb:Xb):Tf(P,0)),Ar&&(R(Cn),U.current.layout=Cn,Re&&Re(Cn),Ka(dt,Cn,N.current))}},[]),z=Rt((P,Q)=>{const{onLayout:ne}=$.current,{layout:te,panelDataArray:q}=U.current,ae=q.map(Ue=>Ue.constraints),{panelSize:ie,pivotIndices:he}=Il(q,P,te);we(ie!=null,`Panel size not found for panel "${P.id}"`);const xe=Ia(q,P)===q.length-1?ie-Q:Q-ie,Re=ir({delta:xe,initialLayout:te,panelConstraints:ae,pivotIndices:he,prevLayout:te,trigger:"imperative-api"});Wi(te,Re)||(R(Re),U.current.layout=Re,ne&&ne(Re),Ka(q,Re,N.current))},[]),k=Rt((P,Q)=>{const{layout:ne,panelDataArray:te}=U.current,{collapsedSize:q=0,collapsible:ae}=Q,{collapsedSize:ie=0,collapsible:he,maxSize:Se=100,minSize:xe=0}=P.constraints,{panelSize:Re}=Il(te,P,ne);Re!=null&&(ae&&he&&Vn(Re,q)?Vn(q,ie)||z(P,ie):Re<xe?z(P,xe):Re>Se&&z(P,Se))},[z]),F=Rt((P,Q)=>{const{direction:ne}=$.current,{layout:te}=U.current;if(!E.current)return;const q=Qu(P,E.current);we(q,`Drag handle element not found for id "${P}"`);const ae=Zb(ne,Q);C({dragHandleId:P,dragHandleRect:q.getBoundingClientRect(),initialCursorPosition:ae,initialLayout:te})},[]),J=Rt(()=>{C(null)},[]),de=Rt(P=>{const{panelDataArray:Q}=U.current,ne=Ia(Q,P);ne>=0&&(Q.splice(ne,1),delete N.current[P.id],U.current.panelDataArrayChanged=!0,_())},[_]),O=u_(()=>({collapsePanel:ee,direction:i,dragState:w,expandPanel:W,getPanelSize:oe,getPanelStyle:ue,groupId:b,isPanelCollapsed:re,isPanelExpanded:ge,reevaluatePanelConstraints:k,registerPanel:se,registerResizeHandle:me,resizePanel:z,startDragging:F,stopDragging:J,unregisterPanel:de,panelGroupElement:E.current}),[ee,w,i,W,oe,ue,b,re,ge,k,se,me,z,F,J,de]),V={display:"flex",flexDirection:i==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return no(Xu.Provider,{value:O},no(y,{...S,children:o,className:r,id:f,ref:E,style:{...V,...v},"data-panel-group":"","data-panel-group-direction":i,"data-panel-group-id":b}))}const H_=zb((l,o)=>no(Jb,{...l,forwardedRef:o}));Jb.displayName="PanelGroup";H_.displayName="forwardRef(PanelGroup)";function Ia(l,o){return l.findIndex(r=>r===o||r.id===o.id)}function Il(l,o,r){const i=Ia(l,o),f=i===l.length-1?[i-1,i]:[i,i+1],d=r[i];return{...o.constraints,panelSize:d,pivotIndices:f}}function j_({disabled:l,handleId:o,resizeHandler:r,panelGroupElement:i}){Zl(()=>{if(l||r==null||i==null)return;const c=Qu(o,i);if(c==null)return;const f=d=>{if(!d.defaultPrevented)switch(d.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{d.preventDefault(),r(d);break}case"F6":{d.preventDefault();const m=c.getAttribute("data-panel-group-id");we(m,`No group element found for id "${m}"`);const h=hr(m,i),v=Kb(m,o,i);we(v!==null,`No resize element found for id "${o}"`);const y=d.shiftKey?v>0?v-1:h.length-1:v+1<h.length?v+1:0;h[y].focus();break}}};return c.addEventListener("keydown",f),()=>{c.removeEventListener("keydown",f)}},[i,l,o,r])}function B_({children:l=null,className:o="",disabled:r=!1,hitAreaMargins:i,id:c,onBlur:f,onDragging:d,onFocus:m,style:h={},tabIndex:v=0,tagName:y="div",...S}){var b,E;const w=Tt(null),C=Tt({onDragging:d});Zl(()=>{C.current.onDragging=d});const A=Lb(Xu);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:_,registerResizeHandle:N,startDragging:G,stopDragging:I,panelGroupElement:$}=A,U=jd(c),[ee,W]=ka("inactive"),[oe,ue]=ka(!1),[re,ge]=ka(null),se=Tt({state:ee});$l(()=>{se.current.state=ee}),Zl(()=>{if(r)ge(null);else{const F=N(U);ge(()=>F)}},[r,U,N]);const me=(b=i==null?void 0:i.coarse)!==null&&b!==void 0?b:15,z=(E=i==null?void 0:i.fine)!==null&&E!==void 0?E:5;return Zl(()=>{if(r||re==null)return;const F=w.current;return we(F,"Element ref not attached"),E_(U,F,R,{coarse:me,fine:z},(de,O,V)=>{if(O)switch(de){case"down":{W("drag"),we(V,'Expected event to be defined for "down" action'),G(U,V);const{onDragging:P}=C.current;P&&P(!0);break}case"move":{const{state:P}=se.current;P!=="drag"&&W("hover"),we(V,'Expected event to be defined for "move" action'),re(V);break}case"up":{W("hover"),I();const{onDragging:P}=C.current;P&&P(!1);break}}else W("inactive")})},[me,R,r,z,N,U,re,G,I]),j_({disabled:r,handleId:U,resizeHandler:re,panelGroupElement:$}),no(y,{...S,children:l,className:o,id:c,onBlur:()=>{ue(!1),f==null||f()},onFocus:()=>{ue(!0),m==null||m()},ref:w,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...h},tabIndex:v,"data-panel-group-direction":R,"data-panel-group-id":_,"data-resize-handle":"","data-resize-handle-active":ee==="drag"?"pointer":oe?"keyboard":void 0,"data-resize-handle-state":ee,"data-panel-resize-handle-enabled":!r,"data-panel-resize-handle-id":U})}B_.displayName="PanelResizeHandle";var Yd="Progress",Vd=100,[P_]=Pg(Yd),[G_,Y_]=P_(Yd),Wb=p.forwardRef((l,o)=>{const{__scopeProgress:r,value:i=null,max:c,getValueLabel:f=V_,...d}=l;(c||c===0)&&!Ug(c)&&console.error(q_(`${c}`,"Progress"));const m=Ug(c)?c:Vd;i!==null&&!Hg(i,m)&&console.error(X_(`${i}`,"Progress"));const h=Hg(i,m)?i:null,v=yu(h)?f(h,m):void 0;return T.jsx(G_,{scope:r,value:h,max:m,children:T.jsx(Vu.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":yu(h)?h:void 0,"aria-valuetext":v,role:"progressbar","data-state":nx(h,m),"data-value":h??void 0,"data-max":m,...d,ref:o})})});Wb.displayName=Yd;var ex="ProgressIndicator",tx=p.forwardRef((l,o)=>{const{__scopeProgress:r,...i}=l,c=Y_(ex,r);return T.jsx(Vu.div,{"data-state":nx(c.value,c.max),"data-value":c.value??void 0,"data-max":c.max,...i,ref:o})});tx.displayName=ex;function V_(l,o){return`${Math.round(l/o*100)}%`}function nx(l,o){return l==null?"indeterminate":l===o?"complete":"loading"}function yu(l){return typeof l=="number"}function Ug(l){return yu(l)&&!isNaN(l)&&l>0}function Hg(l,o){return yu(l)&&!isNaN(l)&&l<=o&&l>=0}function q_(l,o){return`Invalid prop \`max\` of value \`${l}\` supplied to \`${o}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vd}\`.`}function X_(l,o){return`Invalid prop \`value\` of value \`${l}\` supplied to \`${o}\`. The \`value\` prop must be:
|
|
97
97
|
- a positive number
|
|
98
98
|
- less than the value passed to \`max\` (or ${Vd} if no \`max\` prop is set)
|
|
99
99
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
100
100
|
|
|
101
|
-
Defaulting to \`null\`.`}var sD=Wb,fD=tx;export{XO as $,_O as A,F_ as B,nO as C,sO as D,OO as E,DO as F,bO as G,NO as H,pO as I,LO as J,BO as K,xO as L,PO as M,GO as N,k_ as O,tO as P,UO as Q,Yg as R,RO as S,eO as T,jO as U,vO as V,HO as W,zO as X,YO as Y,VO as Z,qO as _,yl as a,bM as a0,TM as a1,KO as a2,IO as a3,QO as a4,
|
|
102
|
-
//# sourceMappingURL=react-vendor-
|
|
101
|
+
Defaulting to \`null\`.`}var sD=Wb,fD=tx;export{XO as $,_O as A,F_ as B,nO as C,sO as D,OO as E,DO as F,bO as G,NO as H,pO as I,LO as J,BO as K,xO as L,PO as M,GO as N,k_ as O,tO as P,UO as Q,Yg as R,RO as S,eO as T,jO as U,vO as V,HO as W,zO as X,YO as Y,VO as Z,qO as _,yl as a,bM as a0,TM as a1,KO as a2,IO as a3,QO as a4,BM as a5,PM as a6,ZO as a7,$O as a8,kO as a9,FO as aa,WO as ab,lD as ac,aD as ad,oD as ae,eD as af,nD as ag,tD as ah,JO as ai,rD as aj,iD as ak,uD as al,cD as am,d_ as an,H_ as ao,B_ as ap,ly as aq,sD as ar,fD as as,J_ as b,Q_ as c,W_ as d,Z_ as e,aO as f,Gg as g,fO as h,oO as i,rO as j,uO as k,cO as l,iO as m,dO as n,mO as o,hO as p,gO as q,p as r,yO as s,SO as t,$_ as u,EO as v,wO as w,CO as x,TO as y,AO as z};
|
|
102
|
+
//# sourceMappingURL=react-vendor-B_QXlk-T.js.map
|