@hachej/boring-ui-cli 0.1.77 → 0.1.79

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.
Files changed (73) hide show
  1. package/README.md +14 -0
  2. package/dist/server/modeApps.js +2 -2
  3. package/dist/server/pluginDiscovery.js +4 -3
  4. package/package.json +9 -8
  5. package/public/assets/{DebugDrawer-DH80atiV.js → DebugDrawer-Cvs32ZdL.js} +1 -1
  6. package/public/assets/{DiagramPane-DAgdN3YX.js → DiagramPane-Wf-HXd6E.js} +5 -5
  7. package/public/assets/{abnfDiagram-VRR7QNED-DHFtXKha.js → abnfDiagram-VRR7QNED-Dt8-RhJP.js} +1 -1
  8. package/public/assets/{architectureDiagram-ZJ3FMSHR-BqXoOqPc.js → architectureDiagram-ZJ3FMSHR-BSRHKE-m.js} +1 -1
  9. package/public/assets/{blockDiagram-677ZJIJ3-CwBNw3pP.js → blockDiagram-677ZJIJ3-w82UNb0-.js} +1 -1
  10. package/public/assets/{c4Diagram-LMCZKHZV-DbzngMZS.js → c4Diagram-LMCZKHZV-CnLTnzzV.js} +1 -1
  11. package/public/assets/channel-DE2XmAQG.js +1 -0
  12. package/public/assets/{chunk-32BRIVSS-CJKug8ts.js → chunk-32BRIVSS-DogxYg_s.js} +1 -1
  13. package/public/assets/{chunk-C7G6YPKG-BFN4wniS.js → chunk-C7G6YPKG-BZ0GT7YN.js} +1 -1
  14. package/public/assets/{chunk-EX3LRPZG-D_T6tXSz.js → chunk-EX3LRPZG-BYVb3IAw.js} +1 -1
  15. package/public/assets/{chunk-HOUHSVGY-OsF2bElz.js → chunk-HOUHSVGY-DlGWDwwE.js} +1 -1
  16. package/public/assets/{chunk-ICXQ74PX-E0PPsDNl.js → chunk-ICXQ74PX-DVqBJ4f8.js} +1 -1
  17. package/public/assets/{chunk-MOJQB5TN-CP_dQviu.js → chunk-MOJQB5TN-CgjrD8Od.js} +1 -1
  18. package/public/assets/{chunk-OGEWGWER-B_ShcHCB.js → chunk-OGEWGWER-DVvbukYU.js} +1 -1
  19. package/public/assets/{chunk-PUDLZKDR-DCfWKUqx.js → chunk-PUDLZKDR-hBf8GnAd.js} +1 -1
  20. package/public/assets/{chunk-Q4XR5HBZ-DncequgQ.js → chunk-Q4XR5HBZ-Cr1DWu55.js} +1 -1
  21. package/public/assets/{chunk-V7JOEXUC-CkWfMBya.js → chunk-V7JOEXUC-DsBAd-bv.js} +1 -1
  22. package/public/assets/{chunk-VR4S4FIN-Bwauz6ax.js → chunk-VR4S4FIN-sNODziEP.js} +1 -1
  23. package/public/assets/{chunk-WYO6CB5R-BYQBPZdV.js → chunk-WYO6CB5R-46RnbQFq.js} +2 -2
  24. package/public/assets/{chunk-ZGVPDNZ5-w40EBMAk.js → chunk-ZGVPDNZ5-7uuk8xCo.js} +1 -1
  25. package/public/assets/classDiagram-OUVF2IWQ-DCkLnpJB.js +1 -0
  26. package/public/assets/classDiagram-v2-EOCWNBFH-DCkLnpJB.js +1 -0
  27. package/public/assets/{createLucideIcon-CwPc8Vzh.js → createLucideIcon-Wu4zuv2w.js} +1 -1
  28. package/public/assets/{cynefinDiagram-TSTJHNR4-MqlLfQLV.js → cynefinDiagram-TSTJHNR4-B6yp4qEq.js} +1 -1
  29. package/public/assets/{dagre-VKFMJZFB-BtMel0jZ.js → dagre-VKFMJZFB-DkmyS-cK.js} +1 -1
  30. package/public/assets/{diagram-FQU43EPY-BLn2JOxM.js → diagram-FQU43EPY-DwGL8br_.js} +1 -1
  31. package/public/assets/{diagram-G47NLZAW-CcU7cY2d.js → diagram-G47NLZAW-iN9_l81P.js} +1 -1
  32. package/public/assets/{diagram-NH7WQ7WH-DFv5wLuq.js → diagram-NH7WQ7WH-C5qg58pO.js} +1 -1
  33. package/public/assets/{diagram-OA4YK3LP-srdMEEtw.js → diagram-OA4YK3LP-Cbm9-jVo.js} +1 -1
  34. package/public/assets/{diagram-WEI45ONY-CtD4L13_.js → diagram-WEI45ONY-CLcge7ST.js} +1 -1
  35. package/public/assets/{dist-DNd1zfJo.js → dist-B7vsEq-M.js} +1 -1
  36. package/public/assets/{ebnfDiagram-CCIWWBDH-_-229G-a.js → ebnfDiagram-CCIWWBDH-DRYda71b.js} +1 -1
  37. package/public/assets/{erDiagram-Q63AITRT-DJYYhyDf.js → erDiagram-Q63AITRT-C50x4kv9.js} +1 -1
  38. package/public/assets/flowDiagram-23GEKE2U-T6aK2e27.js +1 -0
  39. package/public/assets/{ganttDiagram-NO4QXBWP-BDWjR2BL.js → ganttDiagram-NO4QXBWP-CzjvdLdl.js} +1 -1
  40. package/public/assets/{gitGraphDiagram-IHSO6WYX-6VNHaoaE.js → gitGraphDiagram-IHSO6WYX-HmD8gMoK.js} +1 -1
  41. package/public/assets/{highlighted-body-OFNGDK62-ClTUT11e.js → highlighted-body-OFNGDK62-Q4gQw1P3.js} +1 -1
  42. package/public/assets/index-De98Q2XI.js +871 -0
  43. package/public/assets/{infoDiagram-FWYZ7A6U-C8nPo8f6.js → infoDiagram-FWYZ7A6U-BDOkL07R.js} +1 -1
  44. package/public/assets/{ishikawaDiagram-FXEZZL3T-DhhRWuLD.js → ishikawaDiagram-FXEZZL3T-B7CHS-KX.js} +1 -1
  45. package/public/assets/{journeyDiagram-5HDEW3XC-CTgKZqOm.js → journeyDiagram-5HDEW3XC-BgPXXiCJ.js} +1 -1
  46. package/public/assets/{kanban-definition-HUTT4EX6-CoVQymWJ.js → kanban-definition-HUTT4EX6-BbIJZ7B-.js} +1 -1
  47. package/public/assets/{line-DIJ2uGIx.js → line-Cd13SzRb.js} +1 -1
  48. package/public/assets/mermaid-GHXKKRXX-D-z0GHSU.js +1 -0
  49. package/public/assets/{mindmap-definition-LN4V7U3C-CnBQGuc8.js → mindmap-definition-LN4V7U3C-ea3qn5kb.js} +1 -1
  50. package/public/assets/{pegDiagram-2B236MQR-DS30M766.js → pegDiagram-2B236MQR-Bs7XJiI0.js} +1 -1
  51. package/public/assets/{pieDiagram-ENE6RG2P-BiFYahi8.js → pieDiagram-ENE6RG2P-C01cxejD.js} +1 -1
  52. package/public/assets/{quadrantDiagram-ABIIQ3AL-7RXOQFPw.js → quadrantDiagram-ABIIQ3AL-Bmr2CzYs.js} +1 -1
  53. package/public/assets/{railroadDiagram-RFXS5EU6-BfYMSm1Y.js → railroadDiagram-RFXS5EU6-SVkCP9zD.js} +1 -1
  54. package/public/assets/{requirementDiagram-TGXJPOKE-BcPpT5PP.js → requirementDiagram-TGXJPOKE-CEY-npdU.js} +1 -1
  55. package/public/assets/{sankeyDiagram-HTMAVEWB-BGYvXFPC.js → sankeyDiagram-HTMAVEWB-BSdnx5W8.js} +1 -1
  56. package/public/assets/{sequenceDiagram-DBY2YBRQ-BQDw_5wi.js → sequenceDiagram-DBY2YBRQ-BYjKenZ9.js} +1 -1
  57. package/public/assets/{stateDiagram-2N3HPSRC-tGXvsFbG.js → stateDiagram-2N3HPSRC-DAtddhRS.js} +1 -1
  58. package/public/assets/stateDiagram-v2-6OUMAXLB-DRN_cmUW.js +1 -0
  59. package/public/assets/{swimlanes-5IMT3BWC-COzjOnAn.js → swimlanes-5IMT3BWC-Cs_LTy64.js} +1 -1
  60. package/public/assets/swimlanesDiagram-G3AALYLV-_4EG4bfC.js +8 -0
  61. package/public/assets/{timeline-definition-FHXFAJF6-D3-XwGPp.js → timeline-definition-FHXFAJF6-BNdGHM8h.js} +1 -1
  62. package/public/assets/{vennDiagram-L72KCM5P-eBsFqZoN.js → vennDiagram-L72KCM5P-DF7H8jiJ.js} +1 -1
  63. package/public/assets/{wardleyDiagram-EHGQE667-CKvJIjcw.js → wardleyDiagram-EHGQE667-DogfvxG4.js} +1 -1
  64. package/public/assets/{xychartDiagram-FW5EYKEG-C49Uf4Nk.js → xychartDiagram-FW5EYKEG-BbVtwAPw.js} +1 -1
  65. package/public/index.html +10 -10
  66. package/public/assets/channel-C6WZXm7Y.js +0 -1
  67. package/public/assets/classDiagram-OUVF2IWQ-D19WQ2fv.js +0 -1
  68. package/public/assets/classDiagram-v2-EOCWNBFH-D19WQ2fv.js +0 -1
  69. package/public/assets/flowDiagram-23GEKE2U-DVtDhScs.js +0 -1
  70. package/public/assets/index-B52MzomI.js +0 -871
  71. package/public/assets/mermaid-GHXKKRXX-NeIk_INh.js +0 -1
  72. package/public/assets/stateDiagram-v2-6OUMAXLB-CYSK2pph.js +0 -1
  73. package/public/assets/swimlanesDiagram-G3AALYLV-2xI_2ZRC.js +0 -8
@@ -38,4 +38,4 @@ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{n as t,t as n}from"./j
38
38
  `},ea=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ta=function(){o.useEffect(function(){return document.body.setAttribute(Qi,(ea()+1).toString()),function(){var e=ea()-1;e<=0?document.body.removeAttribute(Qi):document.body.setAttribute(Qi,e.toString())}},[])},na=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ta();var a=o.useMemo(function(){return Xi(i)},[i]);return o.createElement(Zi,{styles:$i(a,!t,i,n?``:`!important`)})},ra=!1;if(typeof window<`u`)try{var ia=Object.defineProperty({},"passive",{get:function(){return ra=!0,!0}});window.addEventListener(`test`,ia,ia),window.removeEventListener(`test`,ia,ia)}catch{ra=!1}var aa=ra?{passive:!1}:!1,oa=function(e){return e.tagName===`TEXTAREA`},sa=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!oa(e)&&n[t]===`visible`)},ca=function(e){return sa(e,`overflowY`)},la=function(e){return sa(e,`overflowX`)},ua=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),pa(e,r)){var i=ma(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},da=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},fa=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},pa=function(e,t){return e===`v`?ca(t):la(t)},ma=function(e,t){return e===`v`?da(t):fa(t)},ha=function(e,t){return e===`h`&&t===`rtl`?-1:1},ga=function(e,t,n,r,i){var a=ha(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ma(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&pa(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},_a=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},va=function(e){return[e.deltaX,e.deltaY]},ya=function(e){return e&&`current`in e?e.current:e},ba=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xa=function(e){return`
39
39
  .block-interactivity-${e} {pointer-events: none;}
40
40
  .allow-interactivity-${e} {pointer-events: all;}
41
- `},Sa=0,Ca=[];function wa(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Sa++)[0],a=o.useState(Ki)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=xi([e.lockRef.current],(e.shards||[]).map(ya),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=_a(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ua(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ua(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ga(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!Ca.length||Ca[Ca.length-1]!==a)){var r=`deltaY`in n?va(n):_a(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ba(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(ya).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ta(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=_a(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,va(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,_a(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return Ca.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,aa),document.addEventListener(`touchmove`,l,aa),document.addEventListener(`touchstart`,d,aa),function(){Ca=Ca.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,aa),document.removeEventListener(`touchmove`,l,aa),document.removeEventListener(`touchstart`,d,aa)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:xa(i)}):null,m?o.createElement(na,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ta(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ea=Fi(Ii,wa),Da=o.forwardRef(function(e,t){return o.createElement(Ri,yi({},e,{ref:t,sideCar:Ea}))});Da.classNames=Ri.classNames;var Oa=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ka=new WeakMap,Aa=new WeakMap,ja={},Ma=0,Na=function(e){return e&&(e.host||Na(e.parentNode))},Pa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Na(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Fa=function(e,t,n,r){var i=Pa(t,Array.isArray(e)?e:[e]);ja[n]||(ja[n]=new WeakMap);var a=ja[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ka.get(e)||0)+1,l=(a.get(e)||0)+1;ka.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Aa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ma++,function(){o.forEach(function(e){var t=ka.get(e)-1,i=a.get(e)-1;ka.set(e,t),a.set(e,i),t||(Aa.has(e)||e.removeAttribute(r),Aa.delete(e)),i||e.removeAttribute(n)}),Ma--,Ma||(ka=new WeakMap,ka=new WeakMap,Aa=new WeakMap,ja={})}},Ia=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Oa(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Fa(r,i,n,`aria-hidden`)):function(){return null}},La=`Dialog`,[Ra,za]=R(La),[Ba,Y]=Ra(La),Va=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),l=o.useRef(null),[u,d]=J({prop:r,defaultProp:i??!1,onChange:a,caller:La});return(0,O.jsx)(Ba,{scope:t,triggerRef:c,contentRef:l,contentId:H(),titleId:H(),descriptionId:H(),open:u,onOpenChange:d,onOpenToggle:o.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};Va.displayName=La;var Ha=`DialogTrigger`,Ua=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Ha,n),a=l(t,i.triggerRef);return(0,O.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":lo(i.open),...r,ref:a,onClick:L(e.onClick,i.onOpenToggle)})});Ua.displayName=Ha;var Wa=`DialogPortal`,[Ga,Ka]=Ra(Wa,{forceMount:void 0}),qa=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Y(Wa,t);return(0,O.jsx)(Ga,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:e})}))})};qa.displayName=Wa;var Ja=`DialogOverlay`,Ya=o.forwardRef((e,t)=>{let n=Ka(Ja,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(Ja,e.__scopeDialog);return a.modal?(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Za,{...i,ref:t})}):null});Ya.displayName=Ja;var Xa=u(`DialogOverlay.RemoveScroll`),Za=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Ja,n),a=l(t,le());return(0,O.jsx)(Da,{as:Xa,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(k.div,{"data-state":lo(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),Qa=`DialogContent`,$a=o.forwardRef((e,t)=>{let n=Ka(Qa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(Qa,e.__scopeDialog);return(0,O.jsx)(q,{present:r||a.open,children:a.modal?(0,O.jsx)(eo,{...i,ref:t}):(0,O.jsx)(to,{...i,ref:t})})});$a.displayName=Qa;var eo=o.forwardRef((e,t)=>{let n=Y(Qa,e.__scopeDialog),r=o.useRef(null),i=l(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(no,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault())})}),to=o.forwardRef((e,t)=>{let n=Y(Qa,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,O.jsx)(no,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),no=o.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Y(Qa,n);return _i(),(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(ri,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(oe,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lo(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),ro=`DialogTitle`,io=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(ro,n);return(0,O.jsx)(k.h2,{id:i.titleId,...r,ref:t})});io.displayName=ro;var ao=`DialogDescription`,oo=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(ao,n);return(0,O.jsx)(k.p,{id:i.descriptionId,...r,ref:t})});oo.displayName=ao;var so=`DialogClose`,co=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(so,n);return(0,O.jsx)(k.button,{type:`button`,...r,ref:t,onClick:L(e.onClick,()=>i.onOpenChange(!1))})});co.displayName=so;function lo(e){return e?`open`:`closed`}function uo(e){let t=e+`CollectionProvider`,[n,r]=R(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=o.useRef(null),a=o.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};s.displayName=t;let c=e+`CollectionSlot`,d=u(c),f=o.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,a(c,n).collectionRef);return(0,O.jsx)(d,{ref:i,children:r})});f.displayName=c;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=u(p),g=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,s=o.useRef(null),c=l(t,s),u=a(p,n);return o.useEffect(()=>(u.itemMap.set(s,{ref:s,...i}),()=>void u.itemMap.delete(s))),(0,O.jsx)(h,{[m]:``,ref:c,children:r})});g.displayName=p;function _(t){let n=a(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:f,ItemSlot:g},_,r]}var fo=o.createContext(void 0);function po(e){let t=o.useContext(fo);return e||t||`ltr`}var mo=!1;function ho(){let[e,t]=o.useState(mo);return o.useEffect(()=>{mo||(mo=!0,t(!0))},[]),e}var go=o.useSyncExternalStore;function _o(){return()=>{}}function vo(){return go(_o,()=>!0,()=>!1)}var yo=typeof go==`function`?vo:ho,bo=`rovingFocusGroup.onEntryFocus`,xo={bubbles:!1,cancelable:!0},So=`RovingFocusGroup`,[Co,wo,To]=uo(So),[Eo,Do]=R(So,[To]),[Oo,ko]=Eo(So),Ao=o.forwardRef((e,t)=>(0,O.jsx)(Co.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(Co.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(jo,{...e,ref:t})})}));Ao.displayName=So;var jo=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=o.useRef(null),h=l(t,m),g=po(a),[_,v]=J({prop:s,defaultProp:c??null,onChange:u,caller:So}),[y,b]=o.useState(!1),x=B(d),S=wo(n),C=o.useRef(!1),[w,T]=o.useState(0);return o.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(bo,x),()=>e.removeEventListener(bo,x)},[x]),(0,O.jsx)(Oo,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:o.useCallback(e=>v(e),[v]),onItemShiftTab:o.useCallback(()=>b(!0),[]),onFocusableItemAdd:o.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>T(e=>e-1),[]),children:(0,O.jsx)(k.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:L(e.onMouseDown,()=>{C.current=!0}),onFocus:L(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(bo,xo);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Lo([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:L(e.onBlur,()=>b(!1))})})}),Mo=`RovingFocusGroupItem`,No=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:s,...c}=e,l=H(),u=a||l,d=ko(Mo,n),f=d.currentTabStopId===u,p=wo(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=yo();return V(()=>{if(!(!_||!r))return m(),()=>h()},[_,r,m,h]),o.useEffect(()=>{if(!(_||!r))return m(),()=>h()},[_,r,m,h]),(0,O.jsx)(Co.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,O.jsx)(k.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:L(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:L(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:L(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Io(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Ro(n,r+1):n.slice(r+1)}setTimeout(()=>Lo(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});No.displayName=Mo;var Po={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Fo(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Io(e,t,n){let r=Fo(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Po[r]}function Lo(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ro(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zo=Ao,Bo=No,Vo=[`Enter`,` `],Ho=[`ArrowDown`,`PageUp`,`Home`],Uo=[`ArrowUp`,`PageDown`,`End`],Wo=[...Ho,...Uo],Go={ltr:[...Vo,`ArrowRight`],rtl:[...Vo,`ArrowLeft`]},Ko={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},qo=`Menu`,[Jo,Yo,Xo]=uo(qo),[Zo,Qo]=R(qo,[Xo,Mn,Do]),$o=Mn(),es=Do(),[ts,ns]=Zo(qo),[rs,is]=Zo(qo),as=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:s=!0}=e,c=$o(t),[l,u]=o.useState(null),d=o.useRef(!1),f=B(a),p=po(i);return o.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),o.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,O.jsx)(Jn,{...c,children:(0,O.jsx)(ts,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,O.jsx)(rs,{scope:t,onClose:o.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};as.displayName=qo;var os=`MenuAnchor`,ss=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=$o(n);return(0,O.jsx)(Yn,{...i,...r,ref:t})});ss.displayName=os;var cs=`MenuPortal`,[ls,us]=Zo(cs,{forceMount:void 0}),ds=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ns(cs,t);return(0,O.jsx)(ls,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};ds.displayName=cs;var X=`MenuContent`,[fs,ps]=Zo(X),ms=o.forwardRef((e,t)=>{let n=us(X,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ns(X,e.__scopeMenu),o=is(X,e.__scopeMenu);return(0,O.jsx)(Jo.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Jo.Slot,{scope:e.__scopeMenu,children:o.modal?(0,O.jsx)(hs,{...i,ref:t}):(0,O.jsx)(gs,{...i,ref:t})})})})}),hs=o.forwardRef((e,t)=>{let n=ns(X,e.__scopeMenu),r=o.useRef(null),i=l(t,r);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(vs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),gs=o.forwardRef((e,t)=>{let n=ns(X,e.__scopeMenu);return(0,O.jsx)(vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_s=u(`MenuContent.ScrollLock`),vs=o.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=ns(X,n),y=is(X,n),b=$o(n),x=es(n),S=Yo(n),[C,w]=o.useState(null),T=o.useRef(null),E=l(t,T,v.onContentChange),D=o.useRef(0),k=o.useRef(``),A=o.useRef(0),j=o.useRef(null),M=o.useRef(`right`),N=o.useRef(0),P=g?Da:o.Fragment,F=g?{as:_s,allowPinchZoom:!0}:void 0,I=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=nc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};o.useEffect(()=>()=>window.clearTimeout(D.current),[]),_i();let R=o.useCallback(e=>M.current===j.current?.side&&ic(e,j.current?.area),[]);return(0,O.jsx)(fs,{scope:n,searchRef:k,onItemEnter:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:o.useCallback(e=>{R(e)||(T.current?.focus(),w(null))},[R]),onTriggerLeave:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:A,onPointerGraceIntentChange:o.useCallback(e=>{j.current=e},[]),children:(0,O.jsx)(P,{...F,children:(0,O.jsx)(ri,{asChild:!0,trapped:i,onMountAutoFocus:L(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,O.jsx)(zo,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:L(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(Xn,{role:`menu`,"aria-orientation":`vertical`,"data-state":Zs(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:L(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&I(e.key));let i=T.current;if(e.target!==i||!Wo.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Uo.includes(e.key)&&a.reverse(),ec(a)}),onBlur:L(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),k.current=``)}),onPointerMove:L(e.onPointerMove,ac(e=>{let t=e.target,n=N.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>N.current?`right`:`left`;M.current=t,N.current=e.clientX}}))})})})})})})});ms.displayName=X;var ys=`MenuGroup`,bs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{role:`group`,...r,ref:t})});bs.displayName=ys;var xs=`MenuLabel`,Ss=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{...r,ref:t})});Ss.displayName=xs;var Cs=`MenuItem`,ws=`menu.itemSelect`,Ts=o.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=o.useRef(null),s=is(Cs,e.__scopeMenu),c=ps(Cs,e.__scopeMenu),u=l(t,a),d=o.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ws,{bubbles:!0,cancelable:!0});e.addEventListener(ws,e=>r?.(e),{once:!0}),A(e,t),t.defaultPrevented?d.current=!1:s.onClose()}};return(0,O.jsx)(Es,{...i,ref:u,disabled:n,onClick:L(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:L(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:L(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||Vo.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Ts.displayName=Cs;var Es=o.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,s=ps(Cs,n),c=es(n),u=o.useRef(null),d=l(t,u),[f,p]=o.useState(!1),[m,h]=o.useState(``);return o.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[a.children]),(0,O.jsx)(Jo.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,O.jsx)(Bo,{asChild:!0,...c,focusable:!r,children:(0,O.jsx)(k.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:d,onPointerMove:L(e.onPointerMove,ac(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,ac(e=>s.onItemLeave(e))),onFocus:L(e.onFocus,()=>p(!0)),onBlur:L(e.onBlur,()=>p(!1))})})})}),Ds=`MenuCheckboxItem`,Os=o.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,O.jsx)(Is,{scope:e.__scopeMenu,checked:n,children:(0,O.jsx)(Ts,{role:`menuitemcheckbox`,"aria-checked":Qs(n)?`mixed`:n,...i,ref:t,"data-state":$s(n),onSelect:L(i.onSelect,()=>r?.(Qs(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Os.displayName=Ds;var ks=`MenuRadioGroup`,[As,js]=Zo(ks,{value:void 0,onValueChange:()=>{}}),Ms=o.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=B(r);return(0,O.jsx)(As,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(bs,{...i,ref:t})})});Ms.displayName=ks;var Ns=`MenuRadioItem`,Ps=o.forwardRef((e,t)=>{let{value:n,...r}=e,i=js(Ns,e.__scopeMenu),a=n===i.value;return(0,O.jsx)(Is,{scope:e.__scopeMenu,checked:a,children:(0,O.jsx)(Ts,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":$s(a),onSelect:L(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ps.displayName=Ns;var Fs=`MenuItemIndicator`,[Is,Ls]=Zo(Fs,{checked:!1}),Rs=o.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ls(Fs,n);return(0,O.jsx)(q,{present:r||Qs(a.checked)||a.checked===!0,children:(0,O.jsx)(k.span,{...i,ref:t,"data-state":$s(a.checked)})})});Rs.displayName=Fs;var zs=`MenuSeparator`,Bs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Bs.displayName=zs;var Vs=`MenuArrow`,Hs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=$o(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});Hs.displayName=Vs;var Us=`MenuSub`,[Ws,Gs]=Zo(Us),Ks=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ns(Us,t),s=$o(t),[c,l]=o.useState(null),[u,d]=o.useState(null),f=B(i);return o.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,O.jsx)(Jn,{...s,children:(0,O.jsx)(ts,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,O.jsx)(Ws,{scope:t,contentId:H(),triggerId:H(),trigger:c,onTriggerChange:l,children:n})})})};Ks.displayName=Us;var qs=`MenuSubTrigger`,Js=o.forwardRef((e,t)=>{let n=ns(qs,e.__scopeMenu),r=is(qs,e.__scopeMenu),i=Gs(qs,e.__scopeMenu),a=ps(qs,e.__scopeMenu),s=o.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=o.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);o.useEffect(()=>f,[f]),o.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]);let p=l(t,i.onTriggerChange);return(0,O.jsx)(ss,{asChild:!0,...d,children:(0,O.jsx)(Es,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Zs(n.open),...e,ref:p,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,ac(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:L(e.onPointerLeave,ac(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||Go[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Js.displayName=qs;var Ys=`MenuSubContent`,Xs=o.forwardRef((e,t)=>{let n=us(X,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,s=ns(X,e.__scopeMenu),c=is(X,e.__scopeMenu),u=Gs(Ys,e.__scopeMenu),d=o.useRef(null),f=l(t,d);return(0,O.jsx)(Jo.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(q,{present:r||s.open,children:(0,O.jsx)(Jo.Slot,{scope:e.__scopeMenu,children:(0,O.jsx)(vs,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:i,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:L(e.onFocusOutside,e=>{e.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:L(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ko[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});Xs.displayName=Ys;function Zs(e){return e?`open`:`closed`}function Qs(e){return e===`indeterminate`}function $s(e){return Qs(e)?`indeterminate`:e?`checked`:`unchecked`}function ec(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function nc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=tc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function rc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ic(e,t){return t?rc({x:e.clientX,y:e.clientY},t):!1}function ac(e){return t=>t.pointerType===`mouse`?e(t):void 0}var oc=as,sc=ss,cc=ds,lc=ms,uc=bs,dc=Ss,fc=Ts,pc=Os,mc=Ms,hc=Ps,gc=Rs,_c=Bs,vc=Hs,yc=Js,bc=Xs,xc=`DropdownMenu`,[Sc,Cc]=R(xc,[Qo]),Z=Qo(),[wc,Tc]=Sc(xc),Ec=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=Z(t),u=o.useRef(null),[d,f]=J({prop:i,defaultProp:a??!1,onChange:s,caller:xc});return(0,O.jsx)(wc,{scope:t,triggerId:H(),triggerRef:u,contentId:H(),open:d,onOpenChange:f,onOpenToggle:o.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,O.jsx)(oc,{...l,open:d,onOpenChange:f,dir:r,modal:c,children:n})})};Ec.displayName=xc;var Dc=`DropdownMenuTrigger`,Oc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Tc(Dc,n),o=Z(n),s=l(t,a.triggerRef);return(0,O.jsx)(sc,{asChild:!0,...o,children:(0,O.jsx)(k.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:L(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:L(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Oc.displayName=Dc;var kc=`DropdownMenuPortal`,Ac=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Z(t);return(0,O.jsx)(cc,{...r,...n})};Ac.displayName=kc;var jc=`DropdownMenuContent`,Mc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Tc(jc,n),a=Z(n),s=o.useRef(!1);return(0,O.jsx)(lc,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:L(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Mc.displayName=jc;var Nc=`DropdownMenuGroup`,Pc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(uc,{...i,...r,ref:t})});Pc.displayName=Nc;var Fc=`DropdownMenuLabel`,Ic=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(dc,{...i,...r,ref:t})});Ic.displayName=Fc;var Lc=`DropdownMenuItem`,Rc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(fc,{...i,...r,ref:t})});Rc.displayName=Lc;var zc=`DropdownMenuCheckboxItem`,Bc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(pc,{...i,...r,ref:t})});Bc.displayName=zc;var Vc=`DropdownMenuRadioGroup`,Hc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(mc,{...i,...r,ref:t})});Hc.displayName=Vc;var Uc=`DropdownMenuRadioItem`,Wc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(hc,{...i,...r,ref:t})});Wc.displayName=Uc;var Gc=`DropdownMenuItemIndicator`,Kc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(gc,{...i,...r,ref:t})});Kc.displayName=Gc;var qc=`DropdownMenuSeparator`,Jc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(_c,{...i,...r,ref:t})});Jc.displayName=qc;var Yc=`DropdownMenuArrow`,Xc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(vc,{...i,...r,ref:t})});Xc.displayName=Yc;var Zc=`DropdownMenuSubTrigger`,Qc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(yc,{...i,...r,ref:t})});Qc.displayName=Zc;var $c=`DropdownMenuSubContent`,el=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(bc,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});el.displayName=$c;var tl=Ec,nl=Oc,rl=Ac,il=Mc,al=Rc,ol=Jc;function sl(e,[t,n]){return Math.min(n,Math.max(t,e))}function cl(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ll=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ul=[` `,`Enter`],dl=`Select`,[fl,pl,ml]=uo(dl),[hl,gl]=R(dl,[ml,Mn]),_l=Mn(),[vl,yl]=hl(dl),[bl,xl]=hl(dl),Sl=`SelectProvider`;function Cl(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=_l(t),[v,y]=o.useState(null),[b,x]=o.useState(null),[S,C]=o.useState(!1),w=po(u),[T,E]=J({prop:r,defaultProp:i??!1,onChange:a,caller:dl}),[D,k]=J({prop:s,defaultProp:c,onChange:l,caller:dl}),A=o.useRef(null),j=o.useRef(D);o.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=()=>k(j.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,k]);let M=!v||!!h||!!v.closest(`form`),[N,P]=o.useState(new Set),F=H(),I=Array.from(N).map(e=>e.props.value).join(`;`),L=o.useCallback(e=>{P(t=>new Set(t).add(e))},[]),R=o.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),z={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:F,value:D,onValueChange:k,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:A,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:N,nativeSelectKey:I,isFormControl:M};return(0,O.jsx)(Jn,{..._,children:(0,O.jsx)(vl,{scope:t,...z,children:(0,O.jsx)(fl.Provider,{scope:t,children:(0,O.jsx)(bl,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:R,children:Su(g)?g(z):n})})})})}Cl.displayName=Sl;var wl=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,O.jsx)(Cl,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[n,e?(0,O.jsx)(xu,{__scopeSelect:t}):null]})})};wl.displayName=dl;var Tl=`SelectTrigger`,El=o.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=_l(n),s=yl(Tl,n),c=s.disabled||r,u=l(t,s.onTriggerChange),d=pl(n),f=o.useRef(`touch`),[p,m,h]=wu(e=>{let t=d().filter(e=>!e.disabled),n=Tu(t,e,t.find(e=>e.value===s.value));n!==void 0&&s.onValueChange(n.value)}),g=e=>{c||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,O.jsx)(Yn,{asChild:!0,...a,children:(0,O.jsx)(k.button,{type:`button`,role:`combobox`,"aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":`none`,dir:s.dir,"data-state":s.open?`open`:`closed`,disabled:c,"data-disabled":c?``:void 0,"data-placeholder":Cu(s.value)?``:void 0,...i,ref:u,onClick:L(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:L(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:L(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&ll.includes(e.key)&&(g(),e.preventDefault())})})})});El.displayName=Tl;var Dl=`SelectValue`,Ol=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:s=``,...c}=e,u=yl(Dl,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=l(t,u.onValueNodeChange);V(()=>{d(f)},[d,f]);let m=Cu(u.value);return(0,O.jsx)(k.span,{...c,asChild:!m&&c.asChild,ref:p,style:{pointerEvents:`none`},children:(0,O.jsx)(o.Fragment,{children:m?s:a},m?`placeholder`:`value`)})});Ol.displayName=Dl;var kl=`SelectIcon`,Al=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(k.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Al.displayName=kl;var jl=`SelectPortal`,[Ml,Nl]=hl(jl,{forceMount:void 0}),Pl=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,O.jsx)(Ml,{scope:e.__scopeSelect,forceMount:n,children:(0,O.jsx)($n,{asChild:!0,...r})})};Pl.displayName=jl;var Fl=`SelectContent`,Il=o.forwardRef((e,t)=>{let n=Nl(Fl,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=yl(Fl,e.__scopeSelect),[s,c]=o.useState();return V(()=>{c(new DocumentFragment)},[]),(0,O.jsx)(q,{present:r||a.open,children:({present:e})=>e?(0,O.jsx)(Hl,{...i,ref:t}):(0,O.jsx)(Ll,{...i,fragment:s})})});Il.displayName=Fl;var Ll=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?D.createPortal((0,O.jsx)(Rl,{scope:n,children:(0,O.jsx)(fl.Slot,{scope:n,children:(0,O.jsx)(`div`,{ref:t,children:r})})}),i):null});Ll.displayName=`SelectContentFragment`;var Q=10,[Rl,zl]=hl(Fl),Bl=`SelectContentImpl`,Vl=u(`SelectContent.RemoveScroll`),Hl=o.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=yl(Fl,n),[x,S]=o.useState(null),[C,w]=o.useState(null),T=l(t,S),[E,D]=o.useState(null),[k,A]=o.useState(null),j=pl(n),[M,N]=o.useState(!1),P=o.useRef(!1);o.useEffect(()=>{if(x)return Ia(x)},[x]),_i();let F=o.useCallback(e=>{let[t,...n]=j().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[j,C]),I=o.useCallback(()=>F([E,x]),[F,E,x]);o.useEffect(()=>{M&&I()},[M,I]);let{onOpenChange:R,triggerPointerDownPosRef:z}=b;o.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||R(!1),document.removeEventListener(`pointermove`,t),z.current=null};return z.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,R,z]),o.useEffect(()=>{let e=()=>R(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[R]);let[B,ee]=wu(e=>{let t=j().filter(e=>!e.disabled),n=Tu(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),te=o.useCallback((e,t,n)=>{let r=!P.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(P.current=!0))},[b.value]),ne=o.useCallback(()=>x?.focus(),[x]),re=o.useCallback((e,t,n)=>{let r=!P.current&&!n;(b.value!==void 0&&b.value===t||r)&&A(e)},[b.value]),ie=r===`popper`?Kl:Wl,ae=ie===Kl?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,O.jsx)(Rl,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:te,selectedItem:E,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:I,selectedItemText:k,position:r,isPositioned:M,searchRef:B,children:(0,O.jsx)(Da,{as:Vl,allowPinchZoom:!0,children:(0,O.jsx)(ri,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:L(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,O.jsx)(ie,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ae,onPlaced:()=>N(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:L(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>F(t)),e.preventDefault()}})})})})})})});Hl.displayName=Bl;var Ul=`SelectItemAlignedPosition`,Wl=o.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=yl(Fl,n),s=zl(Fl,n),[c,u]=o.useState(null),[d,f]=o.useState(null),p=l(t,f),m=pl(n),h=o.useRef(!1),g=o.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=o.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=sl(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=sl(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),b=parseInt(u.paddingBottom,10),x=f+p+l+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,_,v,y,a.dir,r]);V(()=>x(),[x]);let[S,C]=o.useState();return V(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]),(0,O.jsx)(ql,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:o.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]),children:(0,O.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,O.jsx)(k.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Wl.displayName=Ul;var Gl=`SelectPopperPosition`,Kl=o.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=_l(n);return(0,O.jsx)(Xn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Kl.displayName=Gl;var[ql,Jl]=hl(Fl,{}),Yl=`SelectViewport`,Xl=o.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=zl(Yl,n),s=Jl(Yl,n),c=l(t,a.onViewportChange),u=o.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)(fl.Slot,{scope:n,children:(0,O.jsx)(k.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:c,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:L(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Xl.displayName=Yl;var Zl=`SelectGroup`,[Ql,$l]=hl(Zl),eu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=H();return(0,O.jsx)(Ql,{scope:n,id:i,children:(0,O.jsx)(k.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});eu.displayName=Zl;var tu=`SelectLabel`,nu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$l(tu,n);return(0,O.jsx)(k.div,{id:i.id,...r,ref:t})});nu.displayName=tu;var ru=`SelectItem`,[iu,au]=hl(ru),ou=o.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...s}=e,c=yl(ru,n),u=zl(ru,n),d=c.value===r,[f,p]=o.useState(a??``),[m,h]=o.useState(!1),g=l(t,B(e=>u.itemRefCallback?.(e,r,i))),_=H(),v=o.useRef(`touch`),y=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};return(0,O.jsx)(iu,{scope:n,value:r,disabled:i,textId:_,isSelected:d,onItemTextChange:o.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)(fl.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:(0,O.jsx)(k.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:L(s.onFocus,()=>h(!0)),onBlur:L(s.onBlur,()=>h(!1)),onClick:L(s.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:L(s.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:L(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:L(s.onPointerMove,e=>{v.current=e.pointerType,i?u.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:L(s.onKeyDown,e=>{i||e.target!==e.currentTarget||u.searchRef?.current!==``&&e.key===` `||(ul.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});ou.displayName=ru;var su=`SelectItemText`,cu=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,s=yl(su,n),c=zl(su,n),u=au(su,n),d=xl(su,n),[f,p]=o.useState(null),m=B(e=>c.itemTextRefCallback?.(e,u.value,u.disabled)),h=l(t,p,u.onItemTextChange,m),g=f?.textContent,_=o.useMemo(()=>(0,O.jsx)(`option`,{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return V(()=>(v(_),()=>y(_)),[v,y,_]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Cu(s.value)?D.createPortal(a.children,s.valueNode):null]})});cu.displayName=su;var lu=`SelectItemIndicator`,uu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return au(lu,n).isSelected?(0,O.jsx)(k.span,{"aria-hidden":!0,...r,ref:t}):null});uu.displayName=lu;var du=`SelectScrollUpButton`,fu=o.forwardRef((e,t)=>{let n=zl(du,e.__scopeSelect),r=Jl(du,e.__scopeSelect),[i,a]=o.useState(!1),s=l(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(hu,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});fu.displayName=du;var pu=`SelectScrollDownButton`,mu=o.forwardRef((e,t)=>{let n=zl(pu,e.__scopeSelect),r=Jl(pu,e.__scopeSelect),[i,a]=o.useState(!1),s=l(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(hu,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});mu.displayName=pu;var hu=o.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=zl(`SelectScrollButton`,n),s=o.useRef(null),c=pl(n),l=o.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return o.useEffect(()=>()=>l(),[l]),V(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),(0,O.jsx)(k.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:L(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:L(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:L(i.onPointerLeave,()=>{l()})})}),gu=`SelectSeparator`,_u=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,O.jsx)(k.div,{"aria-hidden":!0,...r,ref:t})});_u.displayName=gu;var vu=`SelectArrow`,yu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=_l(n);return zl(vu,n).position===`popper`?(0,O.jsx)(Zn,{...i,...r,ref:t}):null});yu.displayName=vu;var bu=`SelectBubbleInput`,xu=o.forwardRef(({__scopeSelect:e,...t},n)=>{let r=yl(bu,e),{value:i,onValueChange:a,required:s,disabled:c,name:u,autoComplete:d,form:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=o.useRef(null),g=l(n,h),_=i??``,v=cl(_),y=Array.from(p).some(e=>(e.props.value??``)===``);return o.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,O.jsxs)(k.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:d,disabled:c,form:f,onChange:e=>a(e.target.value),...t,style:{...lr,...t.style},ref:g,defaultValue:_,children:[Cu(i)&&!y?(0,O.jsx)(`option`,{value:``}):null,Array.from(p)]},m)});xu.displayName=bu;function Su(e){return typeof e==`function`}function Cu(e){return e===``||e===void 0}function wu(e){let t=B(e),n=o.useRef(``),r=o.useRef(0),i=o.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=o.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Tu(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Eu(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Eu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Du=1,Ou=.9,ku=.8,Au=.17,ju=.1,Mu=.999,Nu=.9999,Pu=.99,Fu=/[\\\/_+.#"@\[\(\{&]/,Iu=/[\\\/_+.#"@\[\(\{&]/g,Lu=/[\s-]/,Ru=/[\s-]/g;function zu(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Du:Pu;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=zu(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Du:Fu.test(e.charAt(l-1))?(d*=ku,p=e.slice(i,l-1).match(Iu),p&&i>0&&(d*=Mu**+p.length)):Lu.test(e.charAt(l-1))?(d*=Ou,m=e.slice(i,l-1).match(Ru),m&&i>0&&(d*=Mu**+m.length)):(d*=Au,i>0&&(d*=Mu**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Nu)),(d<ju&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=zu(e,t,n,r,l+1,a+2,o),f*ju>d&&(d=f*ju)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Bu(e){return e.toLowerCase().replace(Ru,` `)}function Vu(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,zu(e,t,Bu(e),Bu(t),0,0,{})}var Hu=`[cmdk-group=""]`,Uu=`[cmdk-group-items=""]`,Wu=`[cmdk-group-heading=""]`,Gu=`[cmdk-item=""]`,Ku=`${Gu}:not([aria-disabled="true"])`,qu=`cmdk-item-select`,Ju=`data-value`,Yu=(e,t,n)=>Vu(e,t,n),Xu=o.createContext(void 0),Zu=()=>o.useContext(Xu),Qu=o.createContext(void 0),$u=()=>o.useContext(Qu),ed=o.createContext(void 0),td=o.forwardRef((e,t)=>{let n=hd(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=hd(()=>new Set),i=hd(()=>new Map),a=hd(()=>new Map),s=hd(()=>new Set),c=pd(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=H(),b=H(),x=H(),S=o.useRef(null),C=vd();md(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),md(()=>{C(6,j)},[]);let w=o.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=M()?.id,w.emit()}),r||C(5,j),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),T=o.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{A(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();C(4,()=>{A(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=c.current?.filter??Yu;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Uu);t?t.appendChild(e.parentElement===t?e:e.closest(`${Uu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Uu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${Hu}[${Ju}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Ju);w.setState(`value`,e||void 0)}function A(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Hu)?.querySelector(Wu))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return S.current?.querySelector(`${Gu}[aria-selected="true"]`)}function N(){return Array.from(S.current?.querySelectorAll(Ku)||[])}function P(e){let t=N()[e];t&&w.setState(`value`,t.getAttribute(Ju))}function F(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(Ju))}function I(e){let t=M()?.closest(Hu),n;for(;t&&!n;)t=e>0?dd(t,Hu):fd(t,Hu),n=t?.querySelector(Ku);n?w.setState(`value`,n.getAttribute(Ju)):F(e)}let L=()=>P(N().length-1),R=e=>{e.preventDefault(),e.metaKey?L():e.altKey?I(1):F(1)},z=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?I(-1):F(-1)};return o.createElement(k.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&R(e);break;case`ArrowDown`:R(e);break;case`p`:case`k`:_&&e.ctrlKey&&z(e);break;case`ArrowUp`:z(e);break;case`Home`:e.preventDefault(),P(0);break;case`End`:e.preventDefault(),L();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(qu);t.dispatchEvent(e)}}}}},o.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:xd},l),bd(e,e=>o.createElement(Qu.Provider,{value:w},o.createElement(Xu.Provider,{value:T},e))))}),nd=o.forwardRef((e,t)=>{let n=H(),r=o.useRef(null),i=o.useContext(ed),a=Zu(),s=pd(e),l=s.current?.forceMount??i?.forceMount;md(()=>{if(!l)return a.item(n,i?.id)},[l]);let u=_d(n,r,[e.value,e.children,r],e.keywords),d=$u(),f=gd(e=>e.value&&e.value===u.current),p=gd(e=>l||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);o.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(qu,m),()=>t.removeEventListener(qu,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=s.current).onSelect)==null||t.call(e,u.current)}function h(){d.setState(`value`,u.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return o.createElement(k.div,{ref:c(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||a.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),rd=o.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,s=H(),l=o.useRef(null),u=o.useRef(null),d=H(),f=Zu(),p=gd(e=>i||f.filter()===!1?!0:!e.search||e.filtered.groups.has(s));md(()=>f.group(s),[]),_d(s,l,[e.value,e.heading,u]);let m=o.useMemo(()=>({id:s,forceMount:i}),[i]);return o.createElement(k.div,{ref:c(l,t),...a,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},n&&o.createElement(`div`,{ref:u,"cmdk-group-heading":``,"aria-hidden":!0,id:d},n),bd(e,e=>o.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?d:void 0},o.createElement(ed.Provider,{value:m},e))))}),id=o.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=o.useRef(null),a=gd(e=>!e.search);return!n&&!a?null:o.createElement(k.div,{ref:c(i,t),...r,"cmdk-separator":``,role:`separator`})}),ad=o.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=$u(),s=gd(e=>e.search),c=gd(e=>e.selectedItemId),l=Zu();return o.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),o.createElement(k.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),od=o.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=o.useRef(null),s=o.useRef(null),l=gd(e=>e.selectedItemId),u=Zu();return o.useEffect(()=>{if(s.current&&a.current){let e=s.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),o.createElement(k.div,{ref:c(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},bd(e,e=>o.createElement(`div`,{ref:c(s,u.listInnerRef),"cmdk-list-sizer":``},e)))}),sd=o.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:s,...c}=e;return o.createElement(Va,{open:n,onOpenChange:r},o.createElement(qa,{container:s},o.createElement(Ya,{"cmdk-overlay":``,className:i}),o.createElement($a,{"aria-label":e.label,"cmdk-dialog":``,className:a},o.createElement(td,{ref:t,...c}))))}),cd=o.forwardRef((e,t)=>gd(e=>e.filtered.count===0)?o.createElement(k.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),ld=o.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return o.createElement(k.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bd(e,e=>o.createElement(`div`,{"aria-hidden":!0},e)))}),ud=Object.assign(td,{List:od,Item:nd,Input:ad,Group:rd,Separator:id,Dialog:sd,Empty:cd,Loading:ld});function dd(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function fd(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function pd(e){let t=o.useRef(e);return md(()=>{t.current=e}),t}var md=typeof window>`u`?o.useEffect:o.useLayoutEffect;function hd(e){let t=o.useRef();return t.current===void 0&&(t.current=e()),t}function gd(e){let t=$u(),n=()=>e(t.snapshot());return o.useSyncExternalStore(t.subscribe,n,n)}function _d(e,t,n,r=[]){let i=o.useRef(),a=Zu();return md(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Ju,s),i.current=s}),i}var vd=()=>{let[e,t]=o.useState(),n=hd(()=>new Map);return md(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function yd(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function bd({asChild:e,children:t},n){return e&&o.isValidElement(t)?o.cloneElement(yd(t),{ref:t.ref},n(t.props.children)):n(t)}var xd={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Sd=`Tabs`,[Cd,wd]=R(Sd,[Do]),Td=Do(),[Ed,Dd]=Cd(Sd),Od=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=po(s),[d,f]=J({prop:r,onChange:i,defaultProp:a??``,caller:Sd});return(0,O.jsx)(Ed,{scope:n,baseId:H(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,O.jsx)(k.div,{dir:u,"data-orientation":o,...l,ref:t})})});Od.displayName=Sd;var kd=`TabsList`,Ad=o.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Dd(kd,n),o=Td(n);return(0,O.jsx)(zo,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,O.jsx)(k.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Ad.displayName=kd;var jd=`TabsTrigger`,Md=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Dd(jd,n),s=Td(n),c=Fd(o.baseId,r),l=Id(o.baseId,r),u=r===o.value;return(0,O.jsx)(Bo,{asChild:!0,...s,focusable:!i,active:u,children:(0,O.jsx)(k.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:L(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:L(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:L(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Md.displayName=jd;var Nd=`TabsContent`,Pd=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=Dd(Nd,n),l=Fd(c.baseId,r),u=Id(c.baseId,r),d=r===c.value,f=o.useRef(d);return o.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,O.jsx)(q,{present:i||d,children:({present:n})=>(0,O.jsx)(k.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})});Pd.displayName=Nd;function Fd(e,t){return`${e}-trigger-${t}`}function Id(e,t){return`${e}-content-${t}`}var Ld=Od,Rd=Ad,zd=Md,Bd=Pd,Vd=`Collapsible`,[Hd,Ud]=R(Vd),[Wd,Gd]=Hd(Vd),Kd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:s,...c}=e,[l,u]=J({prop:r,defaultProp:i??!1,onChange:s,caller:Vd});return(0,O.jsx)(Wd,{scope:n,disabled:a,contentId:H(),open:l,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:(0,O.jsx)(k.div,{"data-state":Qd(l),"data-disabled":a?``:void 0,...c,ref:t})})});Kd.displayName=Vd;var qd=`CollapsibleTrigger`,Jd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Gd(qd,n);return(0,O.jsx)(k.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Qd(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:L(e.onClick,i.onOpenToggle)})});Jd.displayName=qd;var Yd=`CollapsibleContent`,Xd=o.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Gd(Yd,e.__scopeCollapsible);return(0,O.jsx)(q,{present:n||i.open,children:({present:e})=>(0,O.jsx)(Zd,{...r,ref:t,present:e})})});Xd.displayName=Yd;var Zd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,s=Gd(Yd,n),[c,u]=o.useState(r),d=o.useRef(null),f=l(t,d),p=o.useRef(0),m=p.current,h=o.useRef(0),g=h.current,_=s.open||c,v=o.useRef(_),y=o.useRef(void 0);return o.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),V(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(r)}},[s.open,r]),(0,O.jsx)(k.div,{"data-state":Qd(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!_,...a,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:_&&i})});function Qd(e){return e?`open`:`closed`}var $d=Kd,ef=Jd,tf=Xd,nf=`Checkbox`,[rf,af]=R(nf),[of,sf]=rf(nf);function cf(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:c,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=J({prop:n,defaultProp:i??!1,onChange:l,caller:nf}),[h,g]=o.useState(null),[_,v]=o.useState(null),y=o.useRef(!1),b=!h||!!s||!!h.closest(`form`),x={checked:p,disabled:a,setChecked:m,control:h,setControl:g,name:c,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:!_f(i)&&i,isFormControl:b,bubbleInput:_,setBubbleInput:v};return(0,O.jsx)(of,{scope:t,...x,children:gf(f)?f(x):r})}var lf=`CheckboxTrigger`,uf=o.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:s,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:g}=sf(lf,e),_=l(i,f),v=o.useRef(u);return o.useEffect(()=>{let e=a?.form;if(e){let t=()=>p(v.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,p]),(0,O.jsx)(k.button,{type:`button`,role:`checkbox`,"aria-checked":_f(u)?`mixed`:u,"aria-required":d,"data-state":vf(u),"data-disabled":c?``:void 0,disabled:c,value:s,...r,ref:_,onKeyDown:L(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:L(n,e=>{p(e=>_f(e)?!0:!e),g&&h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})});uf.displayName=lf;var df=o.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,O.jsx)(cf,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(uf,{...d,ref:t,__scopeCheckbox:n}),e&&(0,O.jsx)(hf,{__scopeCheckbox:n})]})})});df.displayName=nf;var ff=`CheckboxIndicator`,pf=o.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=sf(ff,n);return(0,O.jsx)(q,{present:r||_f(a.checked)||a.checked===!0,children:(0,O.jsx)(k.span,{"data-state":vf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});pf.displayName=ff;var mf=`CheckboxBubbleInput`,hf=o.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=sf(mf,e),g=l(n,h),_=cl(a),v=kn(r);o.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(_!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=_f(a),n.call(e,!_f(a)&&a),e.dispatchEvent(t)}},[m,_,a,i]);let y=o.useRef(!_f(a)&&a);return(0,O.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});hf.displayName=mf;function gf(e){return typeof e==`function`}function _f(e){return e===`indeterminate`}function vf(e){return _f(e)?`indeterminate`:e?`checked`:`unchecked`}var yf=`AlertDialog`,[bf,xf]=R(yf,[za]),Sf=za(),Cf=e=>{let{__scopeAlertDialog:t,...n}=e,r=Sf(t);return(0,O.jsx)(Va,{...r,...n,modal:!0})};Cf.displayName=yf;var wf=`AlertDialogTrigger`,Tf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(Ua,{...i,...r,ref:t})});Tf.displayName=wf;var Ef=`AlertDialogPortal`,Df=e=>{let{__scopeAlertDialog:t,...n}=e,r=Sf(t);return(0,O.jsx)(qa,{...r,...n})};Df.displayName=Ef;var Of=`AlertDialogOverlay`,kf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(Ya,{...i,...r,ref:t})});kf.displayName=Of;var Af=`AlertDialogContent`,[jf,Mf]=bf(Af),Nf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Sf(n),s=l(t,o.useRef(null)),c=o.useRef(null);return(0,O.jsx)(jf,{scope:n,cancelRef:c,children:(0,O.jsx)($a,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:L(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});Nf.displayName=Af;var Pf=`AlertDialogTitle`,Ff=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(io,{...i,...r,ref:t})});Ff.displayName=Pf;var If=`AlertDialogDescription`,Lf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(oo,{...i,...r,ref:t})});Lf.displayName=If;var Rf=`AlertDialogAction`,zf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(co,{...i,...r,ref:t})});zf.displayName=Rf;var Bf=`AlertDialogCancel`,Vf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Mf(Bf,n),a=Sf(n),o=l(t,i);return(0,O.jsx)(co,{...a,...r,ref:o})});Vf.displayName=Bf;var Hf=Cf,Uf=Df,Wf=kf,Gf=Nf,Kf=zf,qf=Vf,Jf=Ff,Yf=Lf,Xf=`Popover`,[Zf,Qf]=R(Xf,[Mn]),$f=Mn(),[ep,tp]=Zf(Xf),np=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=$f(t),l=o.useRef(null),[u,d]=o.useState(!1),[f,p]=J({prop:r,defaultProp:i??!1,onChange:a,caller:Xf});return(0,O.jsx)(Jn,{...c,children:(0,O.jsx)(ep,{scope:t,contentId:H(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback(()=>d(!0),[]),onCustomAnchorRemove:o.useCallback(()=>d(!1),[]),modal:s,children:n})})};np.displayName=Xf;var rp=`PopoverAnchor`,ip=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(rp,n),a=$f(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=i;return o.useEffect(()=>(s(),()=>c()),[s,c]),(0,O.jsx)(Yn,{...a,...r,ref:t})});ip.displayName=rp;var ap=`PopoverTrigger`,op=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(ap,n),a=$f(n),o=l(t,i.triggerRef),s=(0,O.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xp(i.open),...r,ref:o,onClick:L(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,O.jsx)(Yn,{asChild:!0,...a,children:s})});op.displayName=ap;var sp=`PopoverPortal`,[cp,lp]=Zf(sp,{forceMount:void 0}),up=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=tp(sp,t);return(0,O.jsx)(cp,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};up.displayName=sp;var dp=`PopoverContent`,fp=o.forwardRef((e,t)=>{let n=lp(dp,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=tp(dp,e.__scopePopover);return(0,O.jsx)(q,{present:r||a.open,children:a.modal?(0,O.jsx)(mp,{...i,ref:t}):(0,O.jsx)(hp,{...i,ref:t})})});fp.displayName=dp;var pp=u(`PopoverContent.RemoveScroll`),mp=o.forwardRef((e,t)=>{let n=tp(dp,e.__scopePopover),r=o.useRef(null),i=l(t,r),a=o.useRef(!1);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(Da,{as:pp,allowPinchZoom:!0,children:(0,O.jsx)(gp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),hp=o.forwardRef((e,t)=>{let n=tp(dp,e.__scopePopover),r=o.useRef(!1),i=o.useRef(!1);return(0,O.jsx)(gp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),gp=o.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=tp(dp,n),p=$f(n);return _i(),(0,O.jsx)(ri,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,O.jsx)(Xn,{"data-state":xp(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),_p=`PopoverClose`,vp=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(_p,n);return(0,O.jsx)(k.button,{type:`button`,...r,ref:t,onClick:L(e.onClick,()=>i.onOpenChange(!1))})});vp.displayName=_p;var yp=`PopoverArrow`,bp=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$f(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});bp.displayName=yp;function xp(e){return e?`open`:`closed`}var Sp=np,Cp=op,wp=up,Tp=fp,Ep,Dp=`HoverCard`,[Op,kp]=R(Dp,[Mn]),Ap=Mn(),[jp,Mp]=Op(Dp),Np=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:c=300}=e,l=Ap(t),u=o.useRef(0),d=o.useRef(0),f=o.useRef(!1),p=o.useRef(!1),[m,h]=J({prop:r,defaultProp:i??!1,onChange:a,caller:Dp}),g=o.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),s)},[s,h]),_=o.useCallback(()=>{clearTimeout(u.current),!f.current&&!p.current&&(d.current=window.setTimeout(()=>h(!1),c))},[c,h]),v=o.useCallback(()=>h(!1),[h]);return o.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,O.jsx)(jp,{scope:t,open:m,onOpenChange:h,onOpen:g,onClose:_,onDismiss:v,hasSelectionRef:f,isPointerDownOnContentRef:p,children:(0,O.jsx)(Jn,{...l,children:n})})};Np.displayName=Dp;var Pp=`HoverCardTrigger`,Fp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Mp(Pp,n),a=Ap(n);return(0,O.jsx)(Yn,{asChild:!0,...a,children:(0,O.jsx)(k.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:L(e.onPointerEnter,Gp(i.onOpen)),onPointerLeave:L(e.onPointerLeave,Gp(i.onClose)),onFocus:L(e.onFocus,i.onOpen),onBlur:L(e.onBlur,i.onClose),onTouchStart:L(e.onTouchStart,e=>e.preventDefault())})})});Fp.displayName=Pp;var Ip=`HoverCardPortal`,[Lp,Rp]=Op(Ip,{forceMount:void 0}),zp=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Mp(Ip,t);return(0,O.jsx)(Lp,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};zp.displayName=Ip;var Bp=`HoverCardContent`,Vp=o.forwardRef((e,t)=>{let n=Rp(Bp,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Mp(Bp,e.__scopeHoverCard);return(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Hp,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:L(e.onPointerEnter,Gp(a.onOpen)),onPointerLeave:L(e.onPointerLeave,Gp(a.onClose)),ref:t})})});Vp.displayName=Bp;var Hp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,...c}=e,u=Mp(Bp,n),d=Ap(n),f=o.useRef(null),p=l(t,f),[m,h]=o.useState(!1);return o.useEffect(()=>{if(m){let e=document.body;return Ep=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Ep,e.style.webkitUserSelect=Ep}}},[m]),o.useEffect(()=>{if(f.current){let e=()=>{h(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(u.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),o.useEffect(()=>{f.current&&Kp(f.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:L(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:(0,O.jsx)(Xn,{...d,...c,onPointerDown:L(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),Up=`HoverCardArrow`,Wp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Ap(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});Wp.displayName=Up;function Gp(e){return t=>t.pointerType===`touch`?void 0:e()}function Kp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var qp=Vp;function $(...e){return a(r(e))}var Jp=E(`inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border border-input bg-background shadow-xs hover:bg-muted/60 hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-muted/60 hover:text-foreground dark:hover:bg-muted/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),Yp=o.forwardRef(({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i},a)=>(0,O.jsx)(r?d:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:$(Jp({variant:t,size:n,className:e})),ref:a,...i}));Yp.displayName=`Button`;var Xp=E(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function Zp({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,O.jsx)(n?d:`span`,{"data-slot":`badge`,"data-variant":t,className:$(Xp({variant:t}),e),...r})}var Qp=o.forwardRef(({className:e,type:t,...n},r)=>(0,O.jsx)(`input`,{type:t,"data-slot":`input`,className:$(`h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),ref:r,...n}));Qp.displayName=`Input`;var $p=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`textarea`,{"data-slot":`textarea`,className:$(`min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),ref:n,...t}));$p.displayName=`Textarea`;var em=o.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,O.jsx)(I,{ref:i,"data-slot":`separator`,decorative:n,orientation:t,className:$(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r}));em.displayName=I.displayName;function tm({delayDuration:e=0,...t}){return(0,O.jsx)(qr,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function nm({...e}){return(0,O.jsx)(Jr,{"data-slot":`tooltip`,...e})}function rm({...e}){return(0,O.jsx)(Yr,{"data-slot":`tooltip-trigger`,...e})}function im({className:e,sideOffset:t=0,children:n,...r}){return(0,O.jsx)(Xr,{children:(0,O.jsxs)(Zr,{"data-slot":`tooltip-content`,sideOffset:t,className:$(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,O.jsx)(Qr,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}function am({...e}){return(0,O.jsx)(Va,{"data-slot":`dialog`,...e})}function om({...e}){return(0,O.jsx)(qa,{"data-slot":`dialog-portal`,...e})}function sm({className:e,...t}){return(0,O.jsx)(Ya,{"data-slot":`dialog-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function cm({className:e,children:t,showCloseButton:n=!0,overlayClassName:r,...i}){return(0,O.jsxs)(om,{"data-slot":`dialog-portal`,children:[(0,O.jsx)(sm,{className:r}),(0,O.jsxs)($a,{"data-slot":`dialog-content`,className:$(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...i,children:[t,n&&(0,O.jsxs)(co,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 inline-flex size-6 items-center justify-center rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-base leading-none`,children:`×`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function lm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`dialog-header`,className:$(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function um({className:e,...t}){return(0,O.jsx)(io,{"data-slot":`dialog-title`,className:$(`text-lg leading-none font-semibold`,e),...t})}function dm({className:e,...t}){return(0,O.jsx)(oo,{"data-slot":`dialog-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function fm({...e}){return(0,O.jsx)(tl,{"data-slot":`dropdown-menu`,...e})}function pm({...e}){return(0,O.jsx)(nl,{"data-slot":`dropdown-menu-trigger`,...e})}function mm({className:e,sideOffset:t=4,...n}){return(0,O.jsx)(rl,{children:(0,O.jsx)(il,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:$(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function hm({className:e,inset:t,variant:n=`default`,...r}){return(0,O.jsx)(al,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:$(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function gm({className:e,...t}){return(0,O.jsx)(ol,{"data-slot":`dropdown-menu-separator`,className:$(`-mx-1 my-1 h-px bg-border`,e),...t})}function _m({...e}){return(0,O.jsx)(wl,{"data-slot":`select`,...e})}function vm({...e}){return(0,O.jsx)(Ol,{"data-slot":`select-value`,...e})}function ym({className:e,size:t=`default`,children:n,...r}){return(0,O.jsxs)(El,{"data-slot":`select-trigger`,"data-size":t,className:$(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,O.jsx)(Al,{asChild:!0,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs opacity-50`,children:`⌄`})})]})}function bm({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,O.jsx)(Pl,{children:(0,O.jsxs)(Il,{"data-slot":`select-content`,className:$(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,O.jsx)(Sm,{}),(0,O.jsx)(Xl,{className:$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,O.jsx)(Cm,{})]})})}function xm({className:e,children:t,...n}){return(0,O.jsxs)(ou,{"data-slot":`select-item`,className:$(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,O.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(uu,{children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`✓`})})}),(0,O.jsx)(cu,{children:t})]})}function Sm({className:e,...t}){return(0,O.jsx)(fu,{"data-slot":`select-scroll-up-button`,className:$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`⌃`})})}function Cm({className:e,...t}){return(0,O.jsx)(mu,{"data-slot":`select-scroll-down-button`,className:$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`⌄`})})}function wm({className:e,...t}){return(0,O.jsx)(ud,{"data-slot":`command`,className:$(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function Tm({className:e,...t}){return(0,O.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-sm opacity-50`,children:`⌕`}),(0,O.jsx)(ud.Input,{"data-slot":`command-input`,className:$(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Em({className:e,...t}){return(0,O.jsx)(ud.List,{"data-slot":`command-list`,className:$(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Dm({...e}){return(0,O.jsx)(ud.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Om({className:e,...t}){return(0,O.jsx)(ud.Group,{"data-slot":`command-group`,className:$(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function km({className:e,...t}){return(0,O.jsx)(ud.Item,{"data-slot":`command-item`,className:$(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function Am({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`command-shortcut`,className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}function jm({className:e,orientation:t=`horizontal`,...n}){return(0,O.jsx)(Ld,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:$(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var Mm=E(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Nm({className:e,variant:t=`default`,...n}){return(0,O.jsx)(Rd,{"data-slot":`tabs-list`,"data-variant":t,className:$(Mm({variant:t}),e),...n})}function Pm({className:e,...t}){return(0,O.jsx)(zd,{"data-slot":`tabs-trigger`,className:$(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function Fm({className:e,...t}){return(0,O.jsx)(Bd,{"data-slot":`tabs-content`,className:$(`flex-1 outline-none`,e),...t})}var Im=o.forwardRef(({size:e=`icon-sm`,...t},n)=>(0,O.jsx)(Yp,{ref:n,size:e,...t}));Im.displayName=`IconButton`;function Lm({className:e,...t}){return(0,O.jsx)(`kbd`,{"data-slot":`kbd`,className:$(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1 font-mono text-[10px] font-medium text-muted-foreground shadow-xs`,e),...t})}function Rm({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`spinner`,"aria-hidden":`true`,className:$(`inline-block size-4 animate-spin rounded-full border-2 border-current border-t-transparent`,e),...t})}function zm({className:e,title:t,description:n,icon:r,actions:i,children:a,...o}){return(0,O.jsxs)(`div`,{"data-slot":`empty-state`,className:$(`flex min-h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed p-8 text-center`,e),...o,children:[r&&(0,O.jsx)(`div`,{"data-slot":`empty-state-icon`,className:`text-muted-foreground`,children:r}),(t||n)&&(0,O.jsxs)(`div`,{className:`space-y-1`,children:[t&&(0,O.jsx)(`h3`,{"data-slot":`empty-state-title`,className:`text-sm font-medium text-foreground`,children:t}),n&&(0,O.jsx)(`p`,{"data-slot":`empty-state-description`,className:`text-sm text-muted-foreground`,children:n})]}),a,i&&(0,O.jsx)(`div`,{"data-slot":`empty-state-actions`,className:`flex items-center justify-center gap-2`,children:i})]})}function Bm({className:e,title:t=`Something went wrong`,description:n,details:r,actions:i,children:a,...o}){return(0,O.jsx)(`div`,{"data-slot":`error-state`,className:$(`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-destructive-foreground`,e),...o,children:(0,O.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,O.jsx)(`h2`,{"data-slot":`error-state-title`,className:`text-base font-semibold text-destructive`,children:t}),n&&(0,O.jsx)(`p`,{"data-slot":`error-state-description`,className:`text-sm text-foreground`,children:n}),a,r&&(0,O.jsx)(`pre`,{"data-slot":`error-state-details`,className:`max-h-48 overflow-auto rounded-md bg-background p-3 text-xs text-muted-foreground`,children:r}),i&&(0,O.jsx)(`div`,{"data-slot":`error-state-actions`,className:`flex flex-wrap gap-2 pt-2`,children:i})]})})}function Vm({className:e,...t}){return(0,O.jsx)(`section`,{"data-slot":`pane`,className:$(`flex min-h-0 flex-col rounded-lg border bg-card text-card-foreground`,e),...t})}function Hm({className:e,...t}){return(0,O.jsx)(`header`,{"data-slot":`pane-header`,className:$(`flex min-h-11 items-center justify-between gap-3 border-b px-3`,e),...t})}function Um({className:e,...t}){return(0,O.jsx)(`h2`,{"data-slot":`pane-title`,className:$(`truncate text-sm font-semibold`,e),...t})}function Wm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`pane-body`,className:$(`min-h-0 flex-1 overflow-auto p-3`,e),...t})}function Gm({className:e,...t}){return(0,O.jsx)(`footer`,{"data-slot":`pane-footer`,className:$(`flex items-center justify-end gap-2 border-t px-3 py-2`,e),...t})}function Km({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`field`,className:$(`grid gap-2`,e),...t})}function qm({className:e,...t}){return(0,O.jsx)(`label`,{"data-slot":`field-label`,className:$(`text-sm font-medium leading-none`,e),...t})}function Jm({className:e,...t}){return(0,O.jsx)(`p`,{"data-slot":`field-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function Ym({className:e,...t}){return(0,O.jsx)(`p`,{"data-slot":`field-error`,className:$(`text-sm text-destructive`,e),...t})}var Xm={info:`border-border bg-muted/20 text-foreground [&_[data-slot=notice-icon]]:text-muted-foreground`,success:`border-success/35 bg-[color:var(--success-soft)] text-success [&_[data-slot=notice-description]]:text-foreground`,warning:`border-warning/35 bg-[color:var(--warning-soft,var(--accent-soft))] text-foreground [&_[data-slot=notice-icon]]:text-[color:var(--warning,var(--accent))]`,error:`border-destructive/40 bg-destructive/10 text-destructive [&_[data-slot=notice-description]]:text-foreground`,accent:`border-accent/40 bg-[color:var(--accent-soft)] text-foreground [&_[data-slot=notice-icon]]:text-[color:var(--accent)]`,destructive:`border-destructive/50 bg-destructive/10 text-destructive [&_[data-slot=notice-description]]:text-foreground`};function Zm({className:e,tone:t=`info`,title:n,description:r,icon:i,actions:a,children:o,...s}){return(0,O.jsxs)(`div`,{"data-slot":`notice`,"data-tone":t,className:$(`flex items-start gap-3 rounded-md border px-3 py-2 text-sm`,Xm[t],e),...s,children:[i&&(0,O.jsx)(`div`,{"data-slot":`notice-icon`,className:`mt-0.5 shrink-0`,children:i}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[n&&(0,O.jsx)(`div`,{"data-slot":`notice-title`,className:`font-medium leading-snug`,children:n}),r&&(0,O.jsx)(`div`,{"data-slot":`notice-description`,className:$(`text-muted-foreground`,n&&`mt-0.5`),children:r}),o]}),a&&(0,O.jsx)(`div`,{"data-slot":`notice-actions`,className:`flex shrink-0 items-center gap-2`,children:a})]})}function Qm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`skeleton`,"aria-hidden":`true`,className:$(`animate-pulse rounded-md bg-muted`,e),...t})}function $m({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar`,role:`toolbar`,className:$(`flex items-center gap-1 overflow-x-auto whitespace-nowrap [&::-webkit-scrollbar]:hidden`,e),...t})}function eh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar-group`,className:$(`flex items-center gap-0.5`,e),...t})}function th({className:e,variant:t=`ghost`,size:n=`icon-sm`,...r}){return(0,O.jsx)(Yp,{"data-slot":`toolbar-button`,variant:t,size:n,className:$(`shrink-0`,e),...r})}function nh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar-separator`,"aria-hidden":`true`,className:$(`mx-1 h-4 w-px shrink-0 bg-border/60`,e),...t})}var rh=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(tf,{ref:n,"data-slot":`disclosure-content`,className:$(`overflow-hidden data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}));rh.displayName=`DisclosureContent`;var ih=o.forwardRef(({className:e,children:t,chevron:n,variant:r=`ghost`,size:i=`sm`,...a},o)=>(0,O.jsx)(ef,{asChild:!0,children:(0,O.jsxs)(Yp,{ref:o,"data-slot":`disclosure-trigger`,variant:r,size:i,className:$(`group/disclosure justify-start gap-2`,e),...a,children:[n??(0,O.jsx)(ah,{}),t]})}));ih.displayName=`DisclosureTrigger`;function ah({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`disclosure-chevron`,"aria-hidden":`true`,className:$(`inline-block text-[11px] text-muted-foreground transition-transform group-data-[state=open]/disclosure:rotate-90`,e),...t,children:`▶`})}function oh({className:e,orientation:t=`vertical`,onResizeStart:n,role:r=`separator`,tabIndex:i=0,...a}){return(0,O.jsx)(`div`,{"data-slot":`resize-handle`,"data-orientation":t,role:r,"aria-orientation":t,tabIndex:i,onPointerDown:n,className:$(`shrink-0 touch-none select-none bg-transparent transition-colors hover:bg-border/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,t===`vertical`?`w-1 cursor-col-resize`:`h-1 cursor-row-resize`,e),...a})}var sh=[],ch=new Set,lh=0;function uh(){for(let e of ch)e(sh)}function dh(e){let t=`t${++lh}`,n={...e,id:t,createdAt:Date.now(),durationMs:e.durationMs??3e3};return sh=[...sh,n],uh(),n.durationMs&&n.durationMs>0&&setTimeout(()=>fh(t),n.durationMs),t}function fh(e){let t=sh.length;sh=sh.filter(t=>t.id!==e),sh.length!==t&&uh()}function ph(e){return ch.add(e),e(sh),()=>ch.delete(e)}function mh(e,t){return typeof e==`string`?{title:e,variant:t}:{variant:t,...e}}var hh=Object.assign(e=>dh(mh(e,`info`)),{success:e=>dh(mh(e,`success`)),error:e=>dh(mh(e,`error`)),info:e=>dh(mh(e,`info`)),dismiss:fh}),gh={success:`border-accent/40 bg-background text-foreground [&_[data-toast-icon]]:text-accent`,error:`border-destructive/50 bg-background text-foreground [&_[data-toast-icon]]:text-destructive`,info:`border-border bg-background text-foreground [&_[data-toast-icon]]:text-foreground/70`},_h={success:`✓`,error:`!`,info:`i`};function vh({position:e=`bottom-right`,className:t}){let[n,r]=o.useState(()=>sh);return o.useEffect(()=>ph(r),[]),typeof document>`u`?null:(0,D.createPortal)((0,O.jsx)(`div`,{role:`region`,"aria-label":`Notifications`,"data-testid":`toaster`,className:$(`pointer-events-none fixed z-[1000] flex w-[340px] max-w-[calc(100vw-2rem)] flex-col gap-2`,e===`bottom-right`&&`bottom-4 right-4 items-end`,e===`bottom-left`&&`bottom-4 left-4 items-start`,e===`top-right`&&`top-4 right-4 items-end`,e===`top-left`&&`top-4 left-4 items-start`,t),children:n.map(e=>{let t=e.variant??`info`;return(0,O.jsxs)(`div`,{role:`status`,"data-testid":`toast`,"data-variant":t,className:$(`pointer-events-auto flex w-full items-start gap-2.5 rounded-md border px-3 py-2 shadow-md`,`animate-in fade-in slide-in-from-bottom-2 duration-150`,gh[t]),children:[(0,O.jsx)(`span`,{"data-toast-icon":!0,className:`mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-[11px] font-semibold leading-none`,children:_h[t]}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.title&&(0,O.jsx)(`div`,{className:`text-sm font-medium leading-snug`,children:e.title}),e.description&&(0,O.jsx)(`div`,{className:$(`text-xs text-muted-foreground`,e.title?`mt-0.5`:`leading-snug`),children:e.description})]}),(0,O.jsx)(Im,{type:`button`,variant:`ghost`,size:`icon-xs`,onClick:()=>fh(e.id),"aria-label":`Dismiss`,className:`shrink-0 text-muted-foreground/70`,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-[13px] leading-none`,children:`×`})})]},e.id)})}),document.body)}function yh({className:e,label:t=`Loading…`,centered:n=!1,children:r,...i}){return(0,O.jsxs)(`div`,{"data-slot":`loading-state`,role:`status`,className:$(`flex items-center gap-2 text-sm text-muted-foreground`,n&&`h-full w-full justify-center`,e),...i,children:[(0,O.jsx)(Rm,{className:`size-3.5`}),(0,O.jsx)(`span`,{children:r??t})]})}function bh({className:e,...t}){return(0,O.jsx)(df,{"data-slot":`checkbox`,className:$(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,O.jsx)(pf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`✓`})})})}var xh=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`input`,{ref:n,type:`radio`,"data-slot":`radio`,className:$(`size-4 shrink-0 rounded-full border border-input accent-primary shadow-xs transition-shadow outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...t}));xh.displayName=`Radio`;function Sh({...e}){return(0,O.jsx)(Hf,{"data-slot":`alert-dialog`,...e})}function Ch({...e}){return(0,O.jsx)(Uf,{"data-slot":`alert-dialog-portal`,...e})}function wh({className:e,...t}){return(0,O.jsx)(Wf,{"data-slot":`alert-dialog-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Th({className:e,size:t=`default`,...n}){return(0,O.jsxs)(Ch,{children:[(0,O.jsx)(wh,{}),(0,O.jsx)(Gf,{"data-slot":`alert-dialog-content`,"data-size":t,className:$(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...n})]})}function Eh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:$(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Dh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:$(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function Oh({className:e,...t}){return(0,O.jsx)(Jf,{"data-slot":`alert-dialog-title`,className:$(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function kh({className:e,...t}){return(0,O.jsx)(Yf,{"data-slot":`alert-dialog-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function Ah({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,O.jsx)(Yp,{variant:t,size:n,asChild:!0,children:(0,O.jsx)(Kf,{"data-slot":`alert-dialog-action`,className:$(e),...r})})}function jh({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,O.jsx)(Yp,{variant:t,size:n,asChild:!0,children:(0,O.jsx)(qf,{"data-slot":`alert-dialog-cancel`,className:$(e),...r})})}function Mh({...e}){return(0,O.jsx)(Sp,{"data-slot":`popover`,...e})}function Nh({...e}){return(0,O.jsx)(Cp,{"data-slot":`popover-trigger`,...e})}function Ph({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,O.jsx)(wp,{children:(0,O.jsx)(Tp,{"data-slot":`popover-content`,align:t,sideOffset:n,className:$(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}function Fh({...e}){return(0,O.jsx)(Va,{"data-slot":`sheet`,...e})}function Ih({...e}){return(0,O.jsx)(qa,{"data-slot":`sheet-portal`,...e})}function Lh({className:e,...t}){return(0,O.jsx)(Ya,{"data-slot":`sheet-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Rh({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,O.jsxs)(Ih,{children:[(0,O.jsx)(Lh,{}),(0,O.jsxs)($a,{"data-slot":`sheet-content`,className:$(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,O.jsxs)(co,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-base leading-none`,children:`×`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function zh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`sheet-header`,className:$(`flex flex-col gap-1.5 p-4`,e),...t})}function Bh({className:e,...t}){return(0,O.jsx)(io,{"data-slot":`sheet-title`,className:$(`font-semibold text-foreground`,e),...t})}function Vh({className:e,...t}){return(0,O.jsx)(oo,{"data-slot":`sheet-description`,className:$(`text-sm text-muted-foreground`,e),...t})}var Hh=o.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,O.jsx)(qp,{ref:i,align:t,sideOffset:n,className:$(`z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r}));Hh.displayName=qp.displayName;var Uh=$d,Wh=Jd,Gh=Xd;function Kh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:$(`group/input-group relative flex h-9 w-full items-center rounded-md border border-[color:oklch(from_var(--border)_l_c_h/0.65)] shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30`,`has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var qh=E(`flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*=size-])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5`,"block-end":`[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5`}},defaultVariants:{align:`inline-start`}});function Jh({className:e,align:t=`inline-start`,...n}){return(0,O.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:$(qh({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var Yh=E(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*=size-])]:size-3.5`,sm:`h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5`,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Xh({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,O.jsx)(Yp,{type:t,"data-size":r,variant:n,className:$(Yh({size:r}),e),...i})}function Zh({className:e,...t}){return(0,O.jsx)($p,{"data-slot":`input-group-control`,className:$(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function Qh({className:e,...t}){return(0,O.jsx)(`fieldset`,{"data-slot":`choice-group`,className:$(`grid gap-2`,e),...t})}function $h({className:e,...t}){return(0,O.jsx)(`legend`,{"data-slot":`choice-group-legend`,className:$(`mb-2 text-sm font-medium leading-5 text-foreground`,e),...t})}function eg({className:e,...t}){return(0,O.jsx)(`label`,{"data-slot":`choice-item`,className:$(`flex items-start gap-3 rounded-md border border-border/70 bg-background px-3 py-2 text-sm text-foreground transition-colors hover:bg-muted/30`,`has-[:checked]:border-ring/60 has-[:checked]:bg-muted/40 has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/50`,`has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50`,e),...t})}function tg({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`choice-item-body`,className:$(`flex flex-col gap-1`,e),...t})}function ng({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`choice-item-title`,className:$(`leading-5`,e),...t})}function rg({className:e,...t}){return(0,O.jsx)(`small`,{"data-slot":`choice-item-description`,className:$(`text-sm leading-5 text-muted-foreground`,e),...t})}var ig=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ag=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),og=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),sg=e=>{let t=og(e);return t.charAt(0).toUpperCase()+t.slice(1)},cg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},lg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ug=(0,o.createContext)({}),dg=()=>(0,o.useContext)(ug),fg=(0,o.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:s,...c},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=dg()??{},h=r??f?Number(n??d)*24/Number(t??u):n??d;return(0,o.createElement)(`svg`,{ref:l,...cg,width:t??u??cg.width,height:t??u??cg.height,stroke:e??p,strokeWidth:h,className:ig(`lucide`,m,i),...!a&&!lg(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),pg=(e,t)=>{let n=(0,o.forwardRef)(({className:n,...r},i)=>(0,o.createElement)(fg,{ref:i,iconNode:t,className:ig(`lucide-${ag(sg(e))}`,`lucide-${e}`,n),...r}));return n.displayName=sg(e),n};export{Zm as $,cm as A,eh as At,Bm as B,J as Bt,Dm as C,Fm as Ct,Em as D,vh as Dt,km as E,$p as Et,mm as F,rm as Ft,Im as G,yn as Gt,Jm as H,Sn as Ht,hm as I,fh as It,Jh as J,_n as Jt,Qp as K,bn as Kt,gm as L,hh as Lt,lm as M,nm as Mt,um as N,im as Nt,Am as O,$m as Ot,fm as P,tm as Pt,yh as Q,pm as R,Ia as Rt,wm as S,jm as St,Tm as T,Pm as Tt,Ym as U,wn as Ut,Km as V,Tn as Vt,qm as W,xn as Wt,Zh as X,Xh as Y,nn as Yt,Lm as Z,rg as _,Vh as _t,Th as a,Mh as at,Gh as b,Qm as bt,Eh as c,xh as ct,Yp as d,bm as dt,Vm as et,bh as f,xm as ft,tg as g,Rh as gt,eg as h,Fh as ht,jh as i,Um as it,dm as j,nh as jt,am as k,th as kt,Oh as l,oh as lt,$h as m,vm as mt,Sh as n,Gm as nt,kh as o,Ph as ot,Qh as p,ym as pt,Kh as q,Cn as qt,Ah as r,Hm as rt,Dh as s,Nh as st,pg as t,Wm as tt,Zp as u,_m as ut,ng as v,zh as vt,Om as w,Nm as wt,Wh as x,Rm as xt,Uh as y,Bh as yt,zm as z,Da as zt};
41
+ `},Sa=0,Ca=[];function wa(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Sa++)[0],a=o.useState(Ki)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=xi([e.lockRef.current],(e.shards||[]).map(ya),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=_a(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ua(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ua(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ga(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!Ca.length||Ca[Ca.length-1]!==a)){var r=`deltaY`in n?va(n):_a(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ba(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(ya).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ta(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=_a(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,va(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,_a(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return Ca.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,aa),document.addEventListener(`touchmove`,l,aa),document.addEventListener(`touchstart`,d,aa),function(){Ca=Ca.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,aa),document.removeEventListener(`touchmove`,l,aa),document.removeEventListener(`touchstart`,d,aa)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:xa(i)}):null,m?o.createElement(na,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ta(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ea=Fi(Ii,wa),Da=o.forwardRef(function(e,t){return o.createElement(Ri,yi({},e,{ref:t,sideCar:Ea}))});Da.classNames=Ri.classNames;var Oa=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ka=new WeakMap,Aa=new WeakMap,ja={},Ma=0,Na=function(e){return e&&(e.host||Na(e.parentNode))},Pa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Na(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Fa=function(e,t,n,r){var i=Pa(t,Array.isArray(e)?e:[e]);ja[n]||(ja[n]=new WeakMap);var a=ja[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ka.get(e)||0)+1,l=(a.get(e)||0)+1;ka.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Aa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ma++,function(){o.forEach(function(e){var t=ka.get(e)-1,i=a.get(e)-1;ka.set(e,t),a.set(e,i),t||(Aa.has(e)||e.removeAttribute(r),Aa.delete(e)),i||e.removeAttribute(n)}),Ma--,Ma||(ka=new WeakMap,ka=new WeakMap,Aa=new WeakMap,ja={})}},Ia=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Oa(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Fa(r,i,n,`aria-hidden`)):function(){return null}},La=`Dialog`,[Ra,za]=R(La),[Ba,Y]=Ra(La),Va=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),l=o.useRef(null),[u,d]=J({prop:r,defaultProp:i??!1,onChange:a,caller:La});return(0,O.jsx)(Ba,{scope:t,triggerRef:c,contentRef:l,contentId:H(),titleId:H(),descriptionId:H(),open:u,onOpenChange:d,onOpenToggle:o.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};Va.displayName=La;var Ha=`DialogTrigger`,Ua=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Ha,n),a=l(t,i.triggerRef);return(0,O.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":lo(i.open),...r,ref:a,onClick:L(e.onClick,i.onOpenToggle)})});Ua.displayName=Ha;var Wa=`DialogPortal`,[Ga,Ka]=Ra(Wa,{forceMount:void 0}),qa=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Y(Wa,t);return(0,O.jsx)(Ga,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:e})}))})};qa.displayName=Wa;var Ja=`DialogOverlay`,Ya=o.forwardRef((e,t)=>{let n=Ka(Ja,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(Ja,e.__scopeDialog);return a.modal?(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Za,{...i,ref:t})}):null});Ya.displayName=Ja;var Xa=u(`DialogOverlay.RemoveScroll`),Za=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Ja,n),a=l(t,le());return(0,O.jsx)(Da,{as:Xa,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(k.div,{"data-state":lo(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),Qa=`DialogContent`,$a=o.forwardRef((e,t)=>{let n=Ka(Qa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(Qa,e.__scopeDialog);return(0,O.jsx)(q,{present:r||a.open,children:a.modal?(0,O.jsx)(eo,{...i,ref:t}):(0,O.jsx)(to,{...i,ref:t})})});$a.displayName=Qa;var eo=o.forwardRef((e,t)=>{let n=Y(Qa,e.__scopeDialog),r=o.useRef(null),i=l(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(no,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault())})}),to=o.forwardRef((e,t)=>{let n=Y(Qa,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,O.jsx)(no,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),no=o.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Y(Qa,n);return _i(),(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(ri,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(oe,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lo(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),ro=`DialogTitle`,io=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(ro,n);return(0,O.jsx)(k.h2,{id:i.titleId,...r,ref:t})});io.displayName=ro;var ao=`DialogDescription`,oo=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(ao,n);return(0,O.jsx)(k.p,{id:i.descriptionId,...r,ref:t})});oo.displayName=ao;var so=`DialogClose`,co=o.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(so,n);return(0,O.jsx)(k.button,{type:`button`,...r,ref:t,onClick:L(e.onClick,()=>i.onOpenChange(!1))})});co.displayName=so;function lo(e){return e?`open`:`closed`}function uo(e){let t=e+`CollectionProvider`,[n,r]=R(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=o.useRef(null),a=o.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};s.displayName=t;let c=e+`CollectionSlot`,d=u(c),f=o.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,a(c,n).collectionRef);return(0,O.jsx)(d,{ref:i,children:r})});f.displayName=c;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=u(p),g=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,s=o.useRef(null),c=l(t,s),u=a(p,n);return o.useEffect(()=>(u.itemMap.set(s,{ref:s,...i}),()=>void u.itemMap.delete(s))),(0,O.jsx)(h,{[m]:``,ref:c,children:r})});g.displayName=p;function _(t){let n=a(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:f,ItemSlot:g},_,r]}var fo=o.createContext(void 0);function po(e){let t=o.useContext(fo);return e||t||`ltr`}var mo=!1;function ho(){let[e,t]=o.useState(mo);return o.useEffect(()=>{mo||(mo=!0,t(!0))},[]),e}var go=o.useSyncExternalStore;function _o(){return()=>{}}function vo(){return go(_o,()=>!0,()=>!1)}var yo=typeof go==`function`?vo:ho,bo=`rovingFocusGroup.onEntryFocus`,xo={bubbles:!1,cancelable:!0},So=`RovingFocusGroup`,[Co,wo,To]=uo(So),[Eo,Do]=R(So,[To]),[Oo,ko]=Eo(So),Ao=o.forwardRef((e,t)=>(0,O.jsx)(Co.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(Co.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(jo,{...e,ref:t})})}));Ao.displayName=So;var jo=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=o.useRef(null),h=l(t,m),g=po(a),[_,v]=J({prop:s,defaultProp:c??null,onChange:u,caller:So}),[y,b]=o.useState(!1),x=B(d),S=wo(n),C=o.useRef(!1),[w,T]=o.useState(0);return o.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(bo,x),()=>e.removeEventListener(bo,x)},[x]),(0,O.jsx)(Oo,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:o.useCallback(e=>v(e),[v]),onItemShiftTab:o.useCallback(()=>b(!0),[]),onFocusableItemAdd:o.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>T(e=>e-1),[]),children:(0,O.jsx)(k.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:L(e.onMouseDown,()=>{C.current=!0}),onFocus:L(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(bo,xo);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Lo([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:L(e.onBlur,()=>b(!1))})})}),Mo=`RovingFocusGroupItem`,No=o.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:s,...c}=e,l=H(),u=a||l,d=ko(Mo,n),f=d.currentTabStopId===u,p=wo(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=yo();return V(()=>{if(!(!_||!r))return m(),()=>h()},[_,r,m,h]),o.useEffect(()=>{if(!(_||!r))return m(),()=>h()},[_,r,m,h]),(0,O.jsx)(Co.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,O.jsx)(k.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:L(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:L(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:L(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Io(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Ro(n,r+1):n.slice(r+1)}setTimeout(()=>Lo(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});No.displayName=Mo;var Po={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Fo(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Io(e,t,n){let r=Fo(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Po[r]}function Lo(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ro(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zo=Ao,Bo=No,Vo=[`Enter`,` `],Ho=[`ArrowDown`,`PageUp`,`Home`],Uo=[`ArrowUp`,`PageDown`,`End`],Wo=[...Ho,...Uo],Go={ltr:[...Vo,`ArrowRight`],rtl:[...Vo,`ArrowLeft`]},Ko={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},qo=`Menu`,[Jo,Yo,Xo]=uo(qo),[Zo,Qo]=R(qo,[Xo,Mn,Do]),$o=Mn(),es=Do(),[ts,ns]=Zo(qo),[rs,is]=Zo(qo),as=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:s=!0}=e,c=$o(t),[l,u]=o.useState(null),d=o.useRef(!1),f=B(a),p=po(i);return o.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),o.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,O.jsx)(Jn,{...c,children:(0,O.jsx)(ts,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,O.jsx)(rs,{scope:t,onClose:o.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};as.displayName=qo;var os=`MenuAnchor`,ss=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=$o(n);return(0,O.jsx)(Yn,{...i,...r,ref:t})});ss.displayName=os;var cs=`MenuPortal`,[ls,us]=Zo(cs,{forceMount:void 0}),ds=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ns(cs,t);return(0,O.jsx)(ls,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};ds.displayName=cs;var X=`MenuContent`,[fs,ps]=Zo(X),ms=o.forwardRef((e,t)=>{let n=us(X,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ns(X,e.__scopeMenu),o=is(X,e.__scopeMenu);return(0,O.jsx)(Jo.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Jo.Slot,{scope:e.__scopeMenu,children:o.modal?(0,O.jsx)(hs,{...i,ref:t}):(0,O.jsx)(gs,{...i,ref:t})})})})}),hs=o.forwardRef((e,t)=>{let n=ns(X,e.__scopeMenu),r=o.useRef(null),i=l(t,r);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(vs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),gs=o.forwardRef((e,t)=>{let n=ns(X,e.__scopeMenu);return(0,O.jsx)(vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_s=u(`MenuContent.ScrollLock`),vs=o.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=ns(X,n),y=is(X,n),b=$o(n),x=es(n),S=Yo(n),[C,w]=o.useState(null),T=o.useRef(null),E=l(t,T,v.onContentChange),D=o.useRef(0),k=o.useRef(``),A=o.useRef(0),j=o.useRef(null),M=o.useRef(`right`),N=o.useRef(0),P=g?Da:o.Fragment,F=g?{as:_s,allowPinchZoom:!0}:void 0,I=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=nc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};o.useEffect(()=>()=>window.clearTimeout(D.current),[]),_i();let R=o.useCallback(e=>M.current===j.current?.side&&ic(e,j.current?.area),[]);return(0,O.jsx)(fs,{scope:n,searchRef:k,onItemEnter:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:o.useCallback(e=>{R(e)||(T.current?.focus(),w(null))},[R]),onTriggerLeave:o.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:A,onPointerGraceIntentChange:o.useCallback(e=>{j.current=e},[]),children:(0,O.jsx)(P,{...F,children:(0,O.jsx)(ri,{asChild:!0,trapped:i,onMountAutoFocus:L(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,O.jsx)(zo,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:L(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(Xn,{role:`menu`,"aria-orientation":`vertical`,"data-state":Zs(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:L(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&I(e.key));let i=T.current;if(e.target!==i||!Wo.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Uo.includes(e.key)&&a.reverse(),ec(a)}),onBlur:L(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),k.current=``)}),onPointerMove:L(e.onPointerMove,ac(e=>{let t=e.target,n=N.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>N.current?`right`:`left`;M.current=t,N.current=e.clientX}}))})})})})})})});ms.displayName=X;var ys=`MenuGroup`,bs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{role:`group`,...r,ref:t})});bs.displayName=ys;var xs=`MenuLabel`,Ss=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{...r,ref:t})});Ss.displayName=xs;var Cs=`MenuItem`,ws=`menu.itemSelect`,Ts=o.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=o.useRef(null),s=is(Cs,e.__scopeMenu),c=ps(Cs,e.__scopeMenu),u=l(t,a),d=o.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ws,{bubbles:!0,cancelable:!0});e.addEventListener(ws,e=>r?.(e),{once:!0}),A(e,t),t.defaultPrevented?d.current=!1:s.onClose()}};return(0,O.jsx)(Es,{...i,ref:u,disabled:n,onClick:L(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:L(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:L(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||Vo.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Ts.displayName=Cs;var Es=o.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,s=ps(Cs,n),c=es(n),u=o.useRef(null),d=l(t,u),[f,p]=o.useState(!1),[m,h]=o.useState(``);return o.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[a.children]),(0,O.jsx)(Jo.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,O.jsx)(Bo,{asChild:!0,...c,focusable:!r,children:(0,O.jsx)(k.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:d,onPointerMove:L(e.onPointerMove,ac(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,ac(e=>s.onItemLeave(e))),onFocus:L(e.onFocus,()=>p(!0)),onBlur:L(e.onBlur,()=>p(!1))})})})}),Ds=`MenuCheckboxItem`,Os=o.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,O.jsx)(Is,{scope:e.__scopeMenu,checked:n,children:(0,O.jsx)(Ts,{role:`menuitemcheckbox`,"aria-checked":Qs(n)?`mixed`:n,...i,ref:t,"data-state":$s(n),onSelect:L(i.onSelect,()=>r?.(Qs(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Os.displayName=Ds;var ks=`MenuRadioGroup`,[As,js]=Zo(ks,{value:void 0,onValueChange:()=>{}}),Ms=o.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=B(r);return(0,O.jsx)(As,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(bs,{...i,ref:t})})});Ms.displayName=ks;var Ns=`MenuRadioItem`,Ps=o.forwardRef((e,t)=>{let{value:n,...r}=e,i=js(Ns,e.__scopeMenu),a=n===i.value;return(0,O.jsx)(Is,{scope:e.__scopeMenu,checked:a,children:(0,O.jsx)(Ts,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":$s(a),onSelect:L(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ps.displayName=Ns;var Fs=`MenuItemIndicator`,[Is,Ls]=Zo(Fs,{checked:!1}),Rs=o.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ls(Fs,n);return(0,O.jsx)(q,{present:r||Qs(a.checked)||a.checked===!0,children:(0,O.jsx)(k.span,{...i,ref:t,"data-state":$s(a.checked)})})});Rs.displayName=Fs;var zs=`MenuSeparator`,Bs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(k.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Bs.displayName=zs;var Vs=`MenuArrow`,Hs=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=$o(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});Hs.displayName=Vs;var Us=`MenuSub`,[Ws,Gs]=Zo(Us),Ks=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ns(Us,t),s=$o(t),[c,l]=o.useState(null),[u,d]=o.useState(null),f=B(i);return o.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,O.jsx)(Jn,{...s,children:(0,O.jsx)(ts,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,O.jsx)(Ws,{scope:t,contentId:H(),triggerId:H(),trigger:c,onTriggerChange:l,children:n})})})};Ks.displayName=Us;var qs=`MenuSubTrigger`,Js=o.forwardRef((e,t)=>{let n=ns(qs,e.__scopeMenu),r=is(qs,e.__scopeMenu),i=Gs(qs,e.__scopeMenu),a=ps(qs,e.__scopeMenu),s=o.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=o.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);o.useEffect(()=>f,[f]),o.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]);let p=l(t,i.onTriggerChange);return(0,O.jsx)(ss,{asChild:!0,...d,children:(0,O.jsx)(Es,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Zs(n.open),...e,ref:p,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,ac(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:L(e.onPointerLeave,ac(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||Go[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Js.displayName=qs;var Ys=`MenuSubContent`,Xs=o.forwardRef((e,t)=>{let n=us(X,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,s=ns(X,e.__scopeMenu),c=is(X,e.__scopeMenu),u=Gs(Ys,e.__scopeMenu),d=o.useRef(null),f=l(t,d);return(0,O.jsx)(Jo.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(q,{present:r||s.open,children:(0,O.jsx)(Jo.Slot,{scope:e.__scopeMenu,children:(0,O.jsx)(vs,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:i,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:L(e.onFocusOutside,e=>{e.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:L(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ko[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});Xs.displayName=Ys;function Zs(e){return e?`open`:`closed`}function Qs(e){return e===`indeterminate`}function $s(e){return Qs(e)?`indeterminate`:e?`checked`:`unchecked`}function ec(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function nc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=tc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function rc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ic(e,t){return t?rc({x:e.clientX,y:e.clientY},t):!1}function ac(e){return t=>t.pointerType===`mouse`?e(t):void 0}var oc=as,sc=ss,cc=ds,lc=ms,uc=bs,dc=Ss,fc=Ts,pc=Os,mc=Ms,hc=Ps,gc=Rs,_c=Bs,vc=Hs,yc=Js,bc=Xs,xc=`DropdownMenu`,[Sc,Cc]=R(xc,[Qo]),Z=Qo(),[wc,Tc]=Sc(xc),Ec=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=Z(t),u=o.useRef(null),[d,f]=J({prop:i,defaultProp:a??!1,onChange:s,caller:xc});return(0,O.jsx)(wc,{scope:t,triggerId:H(),triggerRef:u,contentId:H(),open:d,onOpenChange:f,onOpenToggle:o.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,O.jsx)(oc,{...l,open:d,onOpenChange:f,dir:r,modal:c,children:n})})};Ec.displayName=xc;var Dc=`DropdownMenuTrigger`,Oc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Tc(Dc,n),o=Z(n),s=l(t,a.triggerRef);return(0,O.jsx)(sc,{asChild:!0,...o,children:(0,O.jsx)(k.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:L(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:L(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Oc.displayName=Dc;var kc=`DropdownMenuPortal`,Ac=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Z(t);return(0,O.jsx)(cc,{...r,...n})};Ac.displayName=kc;var jc=`DropdownMenuContent`,Mc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Tc(jc,n),a=Z(n),s=o.useRef(!1);return(0,O.jsx)(lc,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:L(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Mc.displayName=jc;var Nc=`DropdownMenuGroup`,Pc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(uc,{...i,...r,ref:t})});Pc.displayName=Nc;var Fc=`DropdownMenuLabel`,Ic=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(dc,{...i,...r,ref:t})});Ic.displayName=Fc;var Lc=`DropdownMenuItem`,Rc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(fc,{...i,...r,ref:t})});Rc.displayName=Lc;var zc=`DropdownMenuCheckboxItem`,Bc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(pc,{...i,...r,ref:t})});Bc.displayName=zc;var Vc=`DropdownMenuRadioGroup`,Hc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(mc,{...i,...r,ref:t})});Hc.displayName=Vc;var Uc=`DropdownMenuRadioItem`,Wc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(hc,{...i,...r,ref:t})});Wc.displayName=Uc;var Gc=`DropdownMenuItemIndicator`,Kc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(gc,{...i,...r,ref:t})});Kc.displayName=Gc;var qc=`DropdownMenuSeparator`,Jc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(_c,{...i,...r,ref:t})});Jc.displayName=qc;var Yc=`DropdownMenuArrow`,Xc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(vc,{...i,...r,ref:t})});Xc.displayName=Yc;var Zc=`DropdownMenuSubTrigger`,Qc=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(yc,{...i,...r,ref:t})});Qc.displayName=Zc;var $c=`DropdownMenuSubContent`,el=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,O.jsx)(bc,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});el.displayName=$c;var tl=Ec,nl=Oc,rl=Ac,il=Mc,al=Rc,ol=Jc;function sl(e,[t,n]){return Math.min(n,Math.max(t,e))}function cl(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ll=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ul=[` `,`Enter`],dl=`Select`,[fl,pl,ml]=uo(dl),[hl,gl]=R(dl,[ml,Mn]),_l=Mn(),[vl,yl]=hl(dl),[bl,xl]=hl(dl),Sl=`SelectProvider`;function Cl(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=_l(t),[v,y]=o.useState(null),[b,x]=o.useState(null),[S,C]=o.useState(!1),w=po(u),[T,E]=J({prop:r,defaultProp:i??!1,onChange:a,caller:dl}),[D,k]=J({prop:s,defaultProp:c,onChange:l,caller:dl}),A=o.useRef(null),j=o.useRef(D);o.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=()=>k(j.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,k]);let M=!v||!!h||!!v.closest(`form`),[N,P]=o.useState(new Set),F=H(),I=Array.from(N).map(e=>e.props.value).join(`;`),L=o.useCallback(e=>{P(t=>new Set(t).add(e))},[]),R=o.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),z={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:F,value:D,onValueChange:k,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:A,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:N,nativeSelectKey:I,isFormControl:M};return(0,O.jsx)(Jn,{..._,children:(0,O.jsx)(vl,{scope:t,...z,children:(0,O.jsx)(fl.Provider,{scope:t,children:(0,O.jsx)(bl,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:R,children:Su(g)?g(z):n})})})})}Cl.displayName=Sl;var wl=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,O.jsx)(Cl,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[n,e?(0,O.jsx)(xu,{__scopeSelect:t}):null]})})};wl.displayName=dl;var Tl=`SelectTrigger`,El=o.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=_l(n),s=yl(Tl,n),c=s.disabled||r,u=l(t,s.onTriggerChange),d=pl(n),f=o.useRef(`touch`),[p,m,h]=wu(e=>{let t=d().filter(e=>!e.disabled),n=Tu(t,e,t.find(e=>e.value===s.value));n!==void 0&&s.onValueChange(n.value)}),g=e=>{c||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,O.jsx)(Yn,{asChild:!0,...a,children:(0,O.jsx)(k.button,{type:`button`,role:`combobox`,"aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":`none`,dir:s.dir,"data-state":s.open?`open`:`closed`,disabled:c,"data-disabled":c?``:void 0,"data-placeholder":Cu(s.value)?``:void 0,...i,ref:u,onClick:L(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:L(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:L(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&ll.includes(e.key)&&(g(),e.preventDefault())})})})});El.displayName=Tl;var Dl=`SelectValue`,Ol=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:s=``,...c}=e,u=yl(Dl,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=l(t,u.onValueNodeChange);V(()=>{d(f)},[d,f]);let m=Cu(u.value);return(0,O.jsx)(k.span,{...c,asChild:!m&&c.asChild,ref:p,style:{pointerEvents:`none`},children:(0,O.jsx)(o.Fragment,{children:m?s:a},m?`placeholder`:`value`)})});Ol.displayName=Dl;var kl=`SelectIcon`,Al=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(k.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Al.displayName=kl;var jl=`SelectPortal`,[Ml,Nl]=hl(jl,{forceMount:void 0}),Pl=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,O.jsx)(Ml,{scope:e.__scopeSelect,forceMount:n,children:(0,O.jsx)($n,{asChild:!0,...r})})};Pl.displayName=jl;var Fl=`SelectContent`,Il=o.forwardRef((e,t)=>{let n=Nl(Fl,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=yl(Fl,e.__scopeSelect),[s,c]=o.useState();return V(()=>{c(new DocumentFragment)},[]),(0,O.jsx)(q,{present:r||a.open,children:({present:e})=>e?(0,O.jsx)(Hl,{...i,ref:t}):(0,O.jsx)(Ll,{...i,fragment:s})})});Il.displayName=Fl;var Ll=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?D.createPortal((0,O.jsx)(Rl,{scope:n,children:(0,O.jsx)(fl.Slot,{scope:n,children:(0,O.jsx)(`div`,{ref:t,children:r})})}),i):null});Ll.displayName=`SelectContentFragment`;var Q=10,[Rl,zl]=hl(Fl),Bl=`SelectContentImpl`,Vl=u(`SelectContent.RemoveScroll`),Hl=o.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=yl(Fl,n),[x,S]=o.useState(null),[C,w]=o.useState(null),T=l(t,S),[E,D]=o.useState(null),[k,A]=o.useState(null),j=pl(n),[M,N]=o.useState(!1),P=o.useRef(!1);o.useEffect(()=>{if(x)return Ia(x)},[x]),_i();let F=o.useCallback(e=>{let[t,...n]=j().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[j,C]),I=o.useCallback(()=>F([E,x]),[F,E,x]);o.useEffect(()=>{M&&I()},[M,I]);let{onOpenChange:R,triggerPointerDownPosRef:z}=b;o.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||R(!1),document.removeEventListener(`pointermove`,t),z.current=null};return z.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,R,z]),o.useEffect(()=>{let e=()=>R(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[R]);let[B,ee]=wu(e=>{let t=j().filter(e=>!e.disabled),n=Tu(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),te=o.useCallback((e,t,n)=>{let r=!P.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(P.current=!0))},[b.value]),ne=o.useCallback(()=>x?.focus(),[x]),re=o.useCallback((e,t,n)=>{let r=!P.current&&!n;(b.value!==void 0&&b.value===t||r)&&A(e)},[b.value]),ie=r===`popper`?Kl:Wl,ae=ie===Kl?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,O.jsx)(Rl,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:te,selectedItem:E,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:I,selectedItemText:k,position:r,isPositioned:M,searchRef:B,children:(0,O.jsx)(Da,{as:Vl,allowPinchZoom:!0,children:(0,O.jsx)(ri,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:L(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,O.jsx)(ie,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ae,onPlaced:()=>N(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:L(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>F(t)),e.preventDefault()}})})})})})})});Hl.displayName=Bl;var Ul=`SelectItemAlignedPosition`,Wl=o.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=yl(Fl,n),s=zl(Fl,n),[c,u]=o.useState(null),[d,f]=o.useState(null),p=l(t,f),m=pl(n),h=o.useRef(!1),g=o.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=o.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=sl(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=sl(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),b=parseInt(u.paddingBottom,10),x=f+p+l+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,_,v,y,a.dir,r]);V(()=>x(),[x]);let[S,C]=o.useState();return V(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]),(0,O.jsx)(ql,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:o.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]),children:(0,O.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,O.jsx)(k.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Wl.displayName=Ul;var Gl=`SelectPopperPosition`,Kl=o.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=_l(n);return(0,O.jsx)(Xn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Kl.displayName=Gl;var[ql,Jl]=hl(Fl,{}),Yl=`SelectViewport`,Xl=o.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=zl(Yl,n),s=Jl(Yl,n),c=l(t,a.onViewportChange),u=o.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)(fl.Slot,{scope:n,children:(0,O.jsx)(k.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:c,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:L(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Xl.displayName=Yl;var Zl=`SelectGroup`,[Ql,$l]=hl(Zl),eu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=H();return(0,O.jsx)(Ql,{scope:n,id:i,children:(0,O.jsx)(k.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});eu.displayName=Zl;var tu=`SelectLabel`,nu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$l(tu,n);return(0,O.jsx)(k.div,{id:i.id,...r,ref:t})});nu.displayName=tu;var ru=`SelectItem`,[iu,au]=hl(ru),ou=o.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...s}=e,c=yl(ru,n),u=zl(ru,n),d=c.value===r,[f,p]=o.useState(a??``),[m,h]=o.useState(!1),g=l(t,B(e=>u.itemRefCallback?.(e,r,i))),_=H(),v=o.useRef(`touch`),y=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};return(0,O.jsx)(iu,{scope:n,value:r,disabled:i,textId:_,isSelected:d,onItemTextChange:o.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)(fl.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:(0,O.jsx)(k.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:L(s.onFocus,()=>h(!0)),onBlur:L(s.onBlur,()=>h(!1)),onClick:L(s.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:L(s.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:L(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:L(s.onPointerMove,e=>{v.current=e.pointerType,i?u.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:L(s.onKeyDown,e=>{i||e.target!==e.currentTarget||u.searchRef?.current!==``&&e.key===` `||(ul.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});ou.displayName=ru;var su=`SelectItemText`,cu=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,s=yl(su,n),c=zl(su,n),u=au(su,n),d=xl(su,n),[f,p]=o.useState(null),m=B(e=>c.itemTextRefCallback?.(e,u.value,u.disabled)),h=l(t,p,u.onItemTextChange,m),g=f?.textContent,_=o.useMemo(()=>(0,O.jsx)(`option`,{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return V(()=>(v(_),()=>y(_)),[v,y,_]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Cu(s.value)?D.createPortal(a.children,s.valueNode):null]})});cu.displayName=su;var lu=`SelectItemIndicator`,uu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return au(lu,n).isSelected?(0,O.jsx)(k.span,{"aria-hidden":!0,...r,ref:t}):null});uu.displayName=lu;var du=`SelectScrollUpButton`,fu=o.forwardRef((e,t)=>{let n=zl(du,e.__scopeSelect),r=Jl(du,e.__scopeSelect),[i,a]=o.useState(!1),s=l(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(hu,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});fu.displayName=du;var pu=`SelectScrollDownButton`,mu=o.forwardRef((e,t)=>{let n=zl(pu,e.__scopeSelect),r=Jl(pu,e.__scopeSelect),[i,a]=o.useState(!1),s=l(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(hu,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});mu.displayName=pu;var hu=o.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=zl(`SelectScrollButton`,n),s=o.useRef(null),c=pl(n),l=o.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return o.useEffect(()=>()=>l(),[l]),V(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),(0,O.jsx)(k.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:L(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:L(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:L(i.onPointerLeave,()=>{l()})})}),gu=`SelectSeparator`,_u=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,O.jsx)(k.div,{"aria-hidden":!0,...r,ref:t})});_u.displayName=gu;var vu=`SelectArrow`,yu=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=_l(n);return zl(vu,n).position===`popper`?(0,O.jsx)(Zn,{...i,...r,ref:t}):null});yu.displayName=vu;var bu=`SelectBubbleInput`,xu=o.forwardRef(({__scopeSelect:e,...t},n)=>{let r=yl(bu,e),{value:i,onValueChange:a,required:s,disabled:c,name:u,autoComplete:d,form:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=o.useRef(null),g=l(n,h),_=i??``,v=cl(_),y=Array.from(p).some(e=>(e.props.value??``)===``);return o.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,O.jsxs)(k.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:d,disabled:c,form:f,onChange:e=>a(e.target.value),...t,style:{...lr,...t.style},ref:g,defaultValue:_,children:[Cu(i)&&!y?(0,O.jsx)(`option`,{value:``}):null,Array.from(p)]},m)});xu.displayName=bu;function Su(e){return typeof e==`function`}function Cu(e){return e===``||e===void 0}function wu(e){let t=B(e),n=o.useRef(``),r=o.useRef(0),i=o.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=o.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Tu(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Eu(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Eu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Du=1,Ou=.9,ku=.8,Au=.17,ju=.1,Mu=.999,Nu=.9999,Pu=.99,Fu=/[\\\/_+.#"@\[\(\{&]/,Iu=/[\\\/_+.#"@\[\(\{&]/g,Lu=/[\s-]/,Ru=/[\s-]/g;function zu(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Du:Pu;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=zu(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Du:Fu.test(e.charAt(l-1))?(d*=ku,p=e.slice(i,l-1).match(Iu),p&&i>0&&(d*=Mu**+p.length)):Lu.test(e.charAt(l-1))?(d*=Ou,m=e.slice(i,l-1).match(Ru),m&&i>0&&(d*=Mu**+m.length)):(d*=Au,i>0&&(d*=Mu**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Nu)),(d<ju&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=zu(e,t,n,r,l+1,a+2,o),f*ju>d&&(d=f*ju)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Bu(e){return e.toLowerCase().replace(Ru,` `)}function Vu(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,zu(e,t,Bu(e),Bu(t),0,0,{})}var Hu=`[cmdk-group=""]`,Uu=`[cmdk-group-items=""]`,Wu=`[cmdk-group-heading=""]`,Gu=`[cmdk-item=""]`,Ku=`${Gu}:not([aria-disabled="true"])`,qu=`cmdk-item-select`,Ju=`data-value`,Yu=(e,t,n)=>Vu(e,t,n),Xu=o.createContext(void 0),Zu=()=>o.useContext(Xu),Qu=o.createContext(void 0),$u=()=>o.useContext(Qu),ed=o.createContext(void 0),td=o.forwardRef((e,t)=>{let n=hd(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=hd(()=>new Set),i=hd(()=>new Map),a=hd(()=>new Map),s=hd(()=>new Set),c=pd(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=H(),b=H(),x=H(),S=o.useRef(null),C=vd();md(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),md(()=>{C(6,j)},[]);let w=o.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=M()?.id,w.emit()}),r||C(5,j),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),T=o.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{A(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();C(4,()=>{A(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=c.current?.filter??Yu;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Uu);t?t.appendChild(e.parentElement===t?e:e.closest(`${Uu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Uu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${Hu}[${Ju}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Ju);w.setState(`value`,e||void 0)}function A(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Hu)?.querySelector(Wu))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return S.current?.querySelector(`${Gu}[aria-selected="true"]`)}function N(){return Array.from(S.current?.querySelectorAll(Ku)||[])}function P(e){let t=N()[e];t&&w.setState(`value`,t.getAttribute(Ju))}function F(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(Ju))}function I(e){let t=M()?.closest(Hu),n;for(;t&&!n;)t=e>0?dd(t,Hu):fd(t,Hu),n=t?.querySelector(Ku);n?w.setState(`value`,n.getAttribute(Ju)):F(e)}let L=()=>P(N().length-1),R=e=>{e.preventDefault(),e.metaKey?L():e.altKey?I(1):F(1)},z=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?I(-1):F(-1)};return o.createElement(k.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&R(e);break;case`ArrowDown`:R(e);break;case`p`:case`k`:_&&e.ctrlKey&&z(e);break;case`ArrowUp`:z(e);break;case`Home`:e.preventDefault(),P(0);break;case`End`:e.preventDefault(),L();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(qu);t.dispatchEvent(e)}}}}},o.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:xd},l),bd(e,e=>o.createElement(Qu.Provider,{value:w},o.createElement(Xu.Provider,{value:T},e))))}),nd=o.forwardRef((e,t)=>{let n=H(),r=o.useRef(null),i=o.useContext(ed),a=Zu(),s=pd(e),l=s.current?.forceMount??i?.forceMount;md(()=>{if(!l)return a.item(n,i?.id)},[l]);let u=_d(n,r,[e.value,e.children,r],e.keywords),d=$u(),f=gd(e=>e.value&&e.value===u.current),p=gd(e=>l||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);o.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(qu,m),()=>t.removeEventListener(qu,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=s.current).onSelect)==null||t.call(e,u.current)}function h(){d.setState(`value`,u.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return o.createElement(k.div,{ref:c(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||a.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),rd=o.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,s=H(),l=o.useRef(null),u=o.useRef(null),d=H(),f=Zu(),p=gd(e=>i||f.filter()===!1?!0:!e.search||e.filtered.groups.has(s));md(()=>f.group(s),[]),_d(s,l,[e.value,e.heading,u]);let m=o.useMemo(()=>({id:s,forceMount:i}),[i]);return o.createElement(k.div,{ref:c(l,t),...a,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},n&&o.createElement(`div`,{ref:u,"cmdk-group-heading":``,"aria-hidden":!0,id:d},n),bd(e,e=>o.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?d:void 0},o.createElement(ed.Provider,{value:m},e))))}),id=o.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=o.useRef(null),a=gd(e=>!e.search);return!n&&!a?null:o.createElement(k.div,{ref:c(i,t),...r,"cmdk-separator":``,role:`separator`})}),ad=o.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=$u(),s=gd(e=>e.search),c=gd(e=>e.selectedItemId),l=Zu();return o.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),o.createElement(k.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),od=o.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=o.useRef(null),s=o.useRef(null),l=gd(e=>e.selectedItemId),u=Zu();return o.useEffect(()=>{if(s.current&&a.current){let e=s.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),o.createElement(k.div,{ref:c(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},bd(e,e=>o.createElement(`div`,{ref:c(s,u.listInnerRef),"cmdk-list-sizer":``},e)))}),sd=o.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:s,...c}=e;return o.createElement(Va,{open:n,onOpenChange:r},o.createElement(qa,{container:s},o.createElement(Ya,{"cmdk-overlay":``,className:i}),o.createElement($a,{"aria-label":e.label,"cmdk-dialog":``,className:a},o.createElement(td,{ref:t,...c}))))}),cd=o.forwardRef((e,t)=>gd(e=>e.filtered.count===0)?o.createElement(k.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),ld=o.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return o.createElement(k.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bd(e,e=>o.createElement(`div`,{"aria-hidden":!0},e)))}),ud=Object.assign(td,{List:od,Item:nd,Input:ad,Group:rd,Separator:id,Dialog:sd,Empty:cd,Loading:ld});function dd(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function fd(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function pd(e){let t=o.useRef(e);return md(()=>{t.current=e}),t}var md=typeof window>`u`?o.useEffect:o.useLayoutEffect;function hd(e){let t=o.useRef();return t.current===void 0&&(t.current=e()),t}function gd(e){let t=$u(),n=()=>e(t.snapshot());return o.useSyncExternalStore(t.subscribe,n,n)}function _d(e,t,n,r=[]){let i=o.useRef(),a=Zu();return md(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Ju,s),i.current=s}),i}var vd=()=>{let[e,t]=o.useState(),n=hd(()=>new Map);return md(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function yd(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function bd({asChild:e,children:t},n){return e&&o.isValidElement(t)?o.cloneElement(yd(t),{ref:t.ref},n(t.props.children)):n(t)}var xd={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Sd=`Tabs`,[Cd,wd]=R(Sd,[Do]),Td=Do(),[Ed,Dd]=Cd(Sd),Od=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=po(s),[d,f]=J({prop:r,onChange:i,defaultProp:a??``,caller:Sd});return(0,O.jsx)(Ed,{scope:n,baseId:H(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,O.jsx)(k.div,{dir:u,"data-orientation":o,...l,ref:t})})});Od.displayName=Sd;var kd=`TabsList`,Ad=o.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Dd(kd,n),o=Td(n);return(0,O.jsx)(zo,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,O.jsx)(k.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Ad.displayName=kd;var jd=`TabsTrigger`,Md=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Dd(jd,n),s=Td(n),c=Fd(o.baseId,r),l=Id(o.baseId,r),u=r===o.value;return(0,O.jsx)(Bo,{asChild:!0,...s,focusable:!i,active:u,children:(0,O.jsx)(k.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:L(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:L(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:L(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Md.displayName=jd;var Nd=`TabsContent`,Pd=o.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=Dd(Nd,n),l=Fd(c.baseId,r),u=Id(c.baseId,r),d=r===c.value,f=o.useRef(d);return o.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,O.jsx)(q,{present:i||d,children:({present:n})=>(0,O.jsx)(k.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})});Pd.displayName=Nd;function Fd(e,t){return`${e}-trigger-${t}`}function Id(e,t){return`${e}-content-${t}`}var Ld=Od,Rd=Ad,zd=Md,Bd=Pd,Vd=`Collapsible`,[Hd,Ud]=R(Vd),[Wd,Gd]=Hd(Vd),Kd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:s,...c}=e,[l,u]=J({prop:r,defaultProp:i??!1,onChange:s,caller:Vd});return(0,O.jsx)(Wd,{scope:n,disabled:a,contentId:H(),open:l,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:(0,O.jsx)(k.div,{"data-state":Qd(l),"data-disabled":a?``:void 0,...c,ref:t})})});Kd.displayName=Vd;var qd=`CollapsibleTrigger`,Jd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Gd(qd,n);return(0,O.jsx)(k.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Qd(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:L(e.onClick,i.onOpenToggle)})});Jd.displayName=qd;var Yd=`CollapsibleContent`,Xd=o.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Gd(Yd,e.__scopeCollapsible);return(0,O.jsx)(q,{present:n||i.open,children:({present:e})=>(0,O.jsx)(Zd,{...r,ref:t,present:e})})});Xd.displayName=Yd;var Zd=o.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,s=Gd(Yd,n),[c,u]=o.useState(r),d=o.useRef(null),f=l(t,d),p=o.useRef(0),m=p.current,h=o.useRef(0),g=h.current,_=s.open||c,v=o.useRef(_),y=o.useRef(void 0);return o.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),V(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(r)}},[s.open,r]),(0,O.jsx)(k.div,{"data-state":Qd(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!_,...a,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:_&&i})});function Qd(e){return e?`open`:`closed`}var $d=Kd,ef=Jd,tf=Xd,nf=`Checkbox`,[rf,af]=R(nf),[of,sf]=rf(nf);function cf(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:c,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=J({prop:n,defaultProp:i??!1,onChange:l,caller:nf}),[h,g]=o.useState(null),[_,v]=o.useState(null),y=o.useRef(!1),b=!h||!!s||!!h.closest(`form`),x={checked:p,disabled:a,setChecked:m,control:h,setControl:g,name:c,form:s,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:!_f(i)&&i,isFormControl:b,bubbleInput:_,setBubbleInput:v};return(0,O.jsx)(of,{scope:t,...x,children:gf(f)?f(x):r})}var lf=`CheckboxTrigger`,uf=o.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:s,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:g}=sf(lf,e),_=l(i,f),v=o.useRef(u);return o.useEffect(()=>{let e=a?.form;if(e){let t=()=>p(v.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,p]),(0,O.jsx)(k.button,{type:`button`,role:`checkbox`,"aria-checked":_f(u)?`mixed`:u,"aria-required":d,"data-state":vf(u),"data-disabled":c?``:void 0,disabled:c,value:s,...r,ref:_,onKeyDown:L(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:L(n,e=>{p(e=>_f(e)?!0:!e),g&&h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})})});uf.displayName=lf;var df=o.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,O.jsx)(cf,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(uf,{...d,ref:t,__scopeCheckbox:n}),e&&(0,O.jsx)(hf,{__scopeCheckbox:n})]})})});df.displayName=nf;var ff=`CheckboxIndicator`,pf=o.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=sf(ff,n);return(0,O.jsx)(q,{present:r||_f(a.checked)||a.checked===!0,children:(0,O.jsx)(k.span,{"data-state":vf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});pf.displayName=ff;var mf=`CheckboxBubbleInput`,hf=o.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=sf(mf,e),g=l(n,h),_=cl(a),v=kn(r);o.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(_!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=_f(a),n.call(e,!_f(a)&&a),e.dispatchEvent(t)}},[m,_,a,i]);let y=o.useRef(!_f(a)&&a);return(0,O.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});hf.displayName=mf;function gf(e){return typeof e==`function`}function _f(e){return e===`indeterminate`}function vf(e){return _f(e)?`indeterminate`:e?`checked`:`unchecked`}var yf=`AlertDialog`,[bf,xf]=R(yf,[za]),Sf=za(),Cf=e=>{let{__scopeAlertDialog:t,...n}=e,r=Sf(t);return(0,O.jsx)(Va,{...r,...n,modal:!0})};Cf.displayName=yf;var wf=`AlertDialogTrigger`,Tf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(Ua,{...i,...r,ref:t})});Tf.displayName=wf;var Ef=`AlertDialogPortal`,Df=e=>{let{__scopeAlertDialog:t,...n}=e,r=Sf(t);return(0,O.jsx)(qa,{...r,...n})};Df.displayName=Ef;var Of=`AlertDialogOverlay`,kf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(Ya,{...i,...r,ref:t})});kf.displayName=Of;var Af=`AlertDialogContent`,[jf,Mf]=bf(Af),Nf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Sf(n),s=l(t,o.useRef(null)),c=o.useRef(null);return(0,O.jsx)(jf,{scope:n,cancelRef:c,children:(0,O.jsx)($a,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:L(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});Nf.displayName=Af;var Pf=`AlertDialogTitle`,Ff=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(io,{...i,...r,ref:t})});Ff.displayName=Pf;var If=`AlertDialogDescription`,Lf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(oo,{...i,...r,ref:t})});Lf.displayName=If;var Rf=`AlertDialogAction`,zf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Sf(n);return(0,O.jsx)(co,{...i,...r,ref:t})});zf.displayName=Rf;var Bf=`AlertDialogCancel`,Vf=o.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Mf(Bf,n),a=Sf(n),o=l(t,i);return(0,O.jsx)(co,{...a,...r,ref:o})});Vf.displayName=Bf;var Hf=Cf,Uf=Df,Wf=kf,Gf=Nf,Kf=zf,qf=Vf,Jf=Ff,Yf=Lf,Xf=`Popover`,[Zf,Qf]=R(Xf,[Mn]),$f=Mn(),[ep,tp]=Zf(Xf),np=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=$f(t),l=o.useRef(null),[u,d]=o.useState(!1),[f,p]=J({prop:r,defaultProp:i??!1,onChange:a,caller:Xf});return(0,O.jsx)(Jn,{...c,children:(0,O.jsx)(ep,{scope:t,contentId:H(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback(()=>d(!0),[]),onCustomAnchorRemove:o.useCallback(()=>d(!1),[]),modal:s,children:n})})};np.displayName=Xf;var rp=`PopoverAnchor`,ip=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(rp,n),a=$f(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=i;return o.useEffect(()=>(s(),()=>c()),[s,c]),(0,O.jsx)(Yn,{...a,...r,ref:t})});ip.displayName=rp;var ap=`PopoverTrigger`,op=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(ap,n),a=$f(n),o=l(t,i.triggerRef),s=(0,O.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xp(i.open),...r,ref:o,onClick:L(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,O.jsx)(Yn,{asChild:!0,...a,children:s})});op.displayName=ap;var sp=`PopoverPortal`,[cp,lp]=Zf(sp,{forceMount:void 0}),up=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=tp(sp,t);return(0,O.jsx)(cp,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};up.displayName=sp;var dp=`PopoverContent`,fp=o.forwardRef((e,t)=>{let n=lp(dp,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=tp(dp,e.__scopePopover);return(0,O.jsx)(q,{present:r||a.open,children:a.modal?(0,O.jsx)(mp,{...i,ref:t}):(0,O.jsx)(hp,{...i,ref:t})})});fp.displayName=dp;var pp=u(`PopoverContent.RemoveScroll`),mp=o.forwardRef((e,t)=>{let n=tp(dp,e.__scopePopover),r=o.useRef(null),i=l(t,r),a=o.useRef(!1);return o.useEffect(()=>{let e=r.current;if(e)return Ia(e)},[]),(0,O.jsx)(Da,{as:pp,allowPinchZoom:!0,children:(0,O.jsx)(gp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),hp=o.forwardRef((e,t)=>{let n=tp(dp,e.__scopePopover),r=o.useRef(!1),i=o.useRef(!1);return(0,O.jsx)(gp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),gp=o.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=tp(dp,n),p=$f(n);return _i(),(0,O.jsx)(ri,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,O.jsx)(Xn,{"data-state":xp(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),_p=`PopoverClose`,vp=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=tp(_p,n);return(0,O.jsx)(k.button,{type:`button`,...r,ref:t,onClick:L(e.onClick,()=>i.onOpenChange(!1))})});vp.displayName=_p;var yp=`PopoverArrow`,bp=o.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$f(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});bp.displayName=yp;function xp(e){return e?`open`:`closed`}var Sp=np,Cp=op,wp=up,Tp=fp,Ep,Dp=`HoverCard`,[Op,kp]=R(Dp,[Mn]),Ap=Mn(),[jp,Mp]=Op(Dp),Np=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:c=300}=e,l=Ap(t),u=o.useRef(0),d=o.useRef(0),f=o.useRef(!1),p=o.useRef(!1),[m,h]=J({prop:r,defaultProp:i??!1,onChange:a,caller:Dp}),g=o.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),s)},[s,h]),_=o.useCallback(()=>{clearTimeout(u.current),!f.current&&!p.current&&(d.current=window.setTimeout(()=>h(!1),c))},[c,h]),v=o.useCallback(()=>h(!1),[h]);return o.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,O.jsx)(jp,{scope:t,open:m,onOpenChange:h,onOpen:g,onClose:_,onDismiss:v,hasSelectionRef:f,isPointerDownOnContentRef:p,children:(0,O.jsx)(Jn,{...l,children:n})})};Np.displayName=Dp;var Pp=`HoverCardTrigger`,Fp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Mp(Pp,n),a=Ap(n);return(0,O.jsx)(Yn,{asChild:!0,...a,children:(0,O.jsx)(k.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:L(e.onPointerEnter,Gp(i.onOpen)),onPointerLeave:L(e.onPointerLeave,Gp(i.onClose)),onFocus:L(e.onFocus,i.onOpen),onBlur:L(e.onBlur,i.onClose),onTouchStart:L(e.onTouchStart,e=>e.preventDefault())})})});Fp.displayName=Pp;var Ip=`HoverCardPortal`,[Lp,Rp]=Op(Ip,{forceMount:void 0}),zp=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Mp(Ip,t);return(0,O.jsx)(Lp,{scope:t,forceMount:n,children:(0,O.jsx)(q,{present:n||a.open,children:(0,O.jsx)($n,{asChild:!0,container:i,children:r})})})};zp.displayName=Ip;var Bp=`HoverCardContent`,Vp=o.forwardRef((e,t)=>{let n=Rp(Bp,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Mp(Bp,e.__scopeHoverCard);return(0,O.jsx)(q,{present:r||a.open,children:(0,O.jsx)(Hp,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:L(e.onPointerEnter,Gp(a.onOpen)),onPointerLeave:L(e.onPointerLeave,Gp(a.onClose)),ref:t})})});Vp.displayName=Bp;var Hp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,...c}=e,u=Mp(Bp,n),d=Ap(n),f=o.useRef(null),p=l(t,f),[m,h]=o.useState(!1);return o.useEffect(()=>{if(m){let e=document.body;return Ep=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Ep,e.style.webkitUserSelect=Ep}}},[m]),o.useEffect(()=>{if(f.current){let e=()=>{h(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(u.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),o.useEffect(()=>{f.current&&Kp(f.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,O.jsx)(oe,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:L(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:(0,O.jsx)(Xn,{...d,...c,onPointerDown:L(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),Up=`HoverCardArrow`,Wp=o.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Ap(n);return(0,O.jsx)(Zn,{...i,...r,ref:t})});Wp.displayName=Up;function Gp(e){return t=>t.pointerType===`touch`?void 0:e()}function Kp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var qp=Vp;function $(...e){return a(r(e))}var Jp=E(`inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border border-input bg-background shadow-xs hover:bg-muted/60 hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-muted/60 hover:text-foreground dark:hover:bg-muted/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),Yp=o.forwardRef(({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i},a)=>(0,O.jsx)(r?d:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:$(Jp({variant:t,size:n,className:e})),ref:a,...i}));Yp.displayName=`Button`;var Xp=E(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-destructive-foreground focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function Zp({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,O.jsx)(n?d:`span`,{"data-slot":`badge`,"data-variant":t,className:$(Xp({variant:t}),e),...r})}var Qp=o.forwardRef(({className:e,type:t,...n},r)=>(0,O.jsx)(`input`,{type:t,"data-slot":`input`,className:$(`h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),ref:r,...n}));Qp.displayName=`Input`;var $p=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`textarea`,{"data-slot":`textarea`,className:$(`min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),ref:n,...t}));$p.displayName=`Textarea`;var em=o.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,O.jsx)(I,{ref:i,"data-slot":`separator`,decorative:n,orientation:t,className:$(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r}));em.displayName=I.displayName;function tm({delayDuration:e=0,...t}){return(0,O.jsx)(qr,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function nm({...e}){return(0,O.jsx)(Jr,{"data-slot":`tooltip`,...e})}function rm({...e}){return(0,O.jsx)(Yr,{"data-slot":`tooltip-trigger`,...e})}function im({className:e,sideOffset:t=0,children:n,...r}){return(0,O.jsx)(Xr,{children:(0,O.jsxs)(Zr,{"data-slot":`tooltip-content`,sideOffset:t,className:$(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,O.jsx)(Qr,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}function am({...e}){return(0,O.jsx)(Va,{"data-slot":`dialog`,...e})}function om({...e}){return(0,O.jsx)(qa,{"data-slot":`dialog-portal`,...e})}function sm({className:e,...t}){return(0,O.jsx)(Ya,{"data-slot":`dialog-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function cm({className:e,children:t,showCloseButton:n=!0,overlayClassName:r,...i}){return(0,O.jsxs)(om,{"data-slot":`dialog-portal`,children:[(0,O.jsx)(sm,{className:r}),(0,O.jsxs)($a,{"data-slot":`dialog-content`,className:$(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...i,children:[t,n&&(0,O.jsxs)(co,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 inline-flex size-6 items-center justify-center rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-base leading-none`,children:`×`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function lm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`dialog-header`,className:$(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function um({className:e,...t}){return(0,O.jsx)(io,{"data-slot":`dialog-title`,className:$(`text-lg leading-none font-semibold`,e),...t})}function dm({className:e,...t}){return(0,O.jsx)(oo,{"data-slot":`dialog-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function fm({...e}){return(0,O.jsx)(tl,{"data-slot":`dropdown-menu`,...e})}function pm({...e}){return(0,O.jsx)(nl,{"data-slot":`dropdown-menu-trigger`,...e})}function mm({className:e,sideOffset:t=4,...n}){return(0,O.jsx)(rl,{children:(0,O.jsx)(il,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:$(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function hm({className:e,inset:t,variant:n=`default`,...r}){return(0,O.jsx)(al,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:$(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function gm({className:e,...t}){return(0,O.jsx)(ol,{"data-slot":`dropdown-menu-separator`,className:$(`-mx-1 my-1 h-px bg-border`,e),...t})}function _m({...e}){return(0,O.jsx)(wl,{"data-slot":`select`,...e})}function vm({...e}){return(0,O.jsx)(Ol,{"data-slot":`select-value`,...e})}function ym({className:e,size:t=`default`,children:n,...r}){return(0,O.jsxs)(El,{"data-slot":`select-trigger`,"data-size":t,className:$(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,O.jsx)(Al,{asChild:!0,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs opacity-50`,children:`⌄`})})]})}function bm({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,O.jsx)(Pl,{children:(0,O.jsxs)(Il,{"data-slot":`select-content`,className:$(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,O.jsx)(Sm,{}),(0,O.jsx)(Xl,{className:$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,O.jsx)(Cm,{})]})})}function xm({className:e,children:t,...n}){return(0,O.jsxs)(ou,{"data-slot":`select-item`,className:$(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,O.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(uu,{children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`✓`})})}),(0,O.jsx)(cu,{children:t})]})}function Sm({className:e,...t}){return(0,O.jsx)(fu,{"data-slot":`select-scroll-up-button`,className:$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`⌃`})})}function Cm({className:e,...t}){return(0,O.jsx)(mu,{"data-slot":`select-scroll-down-button`,className:$(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`⌄`})})}function wm({className:e,...t}){return(0,O.jsx)(ud,{"data-slot":`command`,className:$(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function Tm({className:e,...t}){return(0,O.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-sm opacity-50`,children:`⌕`}),(0,O.jsx)(ud.Input,{"data-slot":`command-input`,className:$(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Em({className:e,...t}){return(0,O.jsx)(ud.List,{"data-slot":`command-list`,className:$(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Dm({...e}){return(0,O.jsx)(ud.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Om({className:e,...t}){return(0,O.jsx)(ud.Group,{"data-slot":`command-group`,className:$(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function km({className:e,...t}){return(0,O.jsx)(ud.Item,{"data-slot":`command-item`,className:$(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function Am({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`command-shortcut`,className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}function jm({className:e,orientation:t=`horizontal`,...n}){return(0,O.jsx)(Ld,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:$(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var Mm=E(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Nm({className:e,variant:t=`default`,...n}){return(0,O.jsx)(Rd,{"data-slot":`tabs-list`,"data-variant":t,className:$(Mm({variant:t}),e),...n})}function Pm({className:e,...t}){return(0,O.jsx)(zd,{"data-slot":`tabs-trigger`,className:$(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function Fm({className:e,...t}){return(0,O.jsx)(Bd,{"data-slot":`tabs-content`,className:$(`flex-1 outline-none`,e),...t})}var Im=o.forwardRef(({size:e=`icon-sm`,...t},n)=>(0,O.jsx)(Yp,{ref:n,size:e,...t}));Im.displayName=`IconButton`;function Lm({className:e,...t}){return(0,O.jsx)(`kbd`,{"data-slot":`kbd`,className:$(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1 font-mono text-[10px] font-medium text-muted-foreground shadow-xs`,e),...t})}function Rm({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`spinner`,"aria-hidden":`true`,className:$(`inline-block size-4 animate-spin rounded-full border-2 border-current border-t-transparent`,e),...t})}function zm({className:e,title:t,description:n,icon:r,actions:i,children:a,...o}){return(0,O.jsxs)(`div`,{"data-slot":`empty-state`,className:$(`flex min-h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed p-8 text-center`,e),...o,children:[r&&(0,O.jsx)(`div`,{"data-slot":`empty-state-icon`,className:`text-muted-foreground`,children:r}),(t||n)&&(0,O.jsxs)(`div`,{className:`space-y-1`,children:[t&&(0,O.jsx)(`h3`,{"data-slot":`empty-state-title`,className:`text-sm font-medium text-foreground`,children:t}),n&&(0,O.jsx)(`p`,{"data-slot":`empty-state-description`,className:`text-sm text-muted-foreground`,children:n})]}),a,i&&(0,O.jsx)(`div`,{"data-slot":`empty-state-actions`,className:`flex items-center justify-center gap-2`,children:i})]})}function Bm({className:e,title:t=`Something went wrong`,description:n,details:r,actions:i,children:a,...o}){return(0,O.jsx)(`div`,{"data-slot":`error-state`,className:$(`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-destructive-foreground`,e),...o,children:(0,O.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,O.jsx)(`h2`,{"data-slot":`error-state-title`,className:`text-base font-semibold text-destructive`,children:t}),n&&(0,O.jsx)(`p`,{"data-slot":`error-state-description`,className:`text-sm text-foreground`,children:n}),a,r&&(0,O.jsx)(`pre`,{"data-slot":`error-state-details`,className:`max-h-48 overflow-auto rounded-md bg-background p-3 text-xs text-muted-foreground`,children:r}),i&&(0,O.jsx)(`div`,{"data-slot":`error-state-actions`,className:`flex flex-wrap gap-2 pt-2`,children:i})]})})}function Vm({className:e,...t}){return(0,O.jsx)(`section`,{"data-slot":`pane`,className:$(`flex min-h-0 flex-col rounded-lg border bg-card text-card-foreground`,e),...t})}function Hm({className:e,...t}){return(0,O.jsx)(`header`,{"data-slot":`pane-header`,className:$(`flex min-h-11 items-center justify-between gap-3 border-b px-3`,e),...t})}function Um({className:e,...t}){return(0,O.jsx)(`h2`,{"data-slot":`pane-title`,className:$(`truncate text-sm font-semibold`,e),...t})}function Wm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`pane-body`,className:$(`min-h-0 flex-1 overflow-auto p-3`,e),...t})}function Gm({className:e,...t}){return(0,O.jsx)(`footer`,{"data-slot":`pane-footer`,className:$(`flex items-center justify-end gap-2 border-t px-3 py-2`,e),...t})}function Km({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`field`,className:$(`grid gap-2`,e),...t})}function qm({className:e,...t}){return(0,O.jsx)(`label`,{"data-slot":`field-label`,className:$(`text-sm font-medium leading-none`,e),...t})}function Jm({className:e,...t}){return(0,O.jsx)(`p`,{"data-slot":`field-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function Ym({className:e,...t}){return(0,O.jsx)(`p`,{"data-slot":`field-error`,className:$(`text-sm text-destructive`,e),...t})}var Xm={info:`border-border bg-muted/20 text-foreground [&_[data-slot=notice-icon]]:text-muted-foreground`,success:`border-success/35 bg-[color:var(--success-soft)] text-success [&_[data-slot=notice-description]]:text-foreground`,warning:`border-warning/35 bg-[color:var(--warning-soft,var(--accent-soft))] text-foreground [&_[data-slot=notice-icon]]:text-[color:var(--warning,var(--accent))]`,error:`border-destructive/40 bg-destructive/10 text-destructive [&_[data-slot=notice-description]]:text-foreground`,accent:`border-accent/40 bg-[color:var(--accent-soft)] text-foreground [&_[data-slot=notice-icon]]:text-[color:var(--accent)]`,destructive:`border-destructive/50 bg-destructive/10 text-destructive [&_[data-slot=notice-description]]:text-foreground`};function Zm({className:e,tone:t=`info`,title:n,description:r,icon:i,actions:a,children:o,...s}){return(0,O.jsxs)(`div`,{"data-slot":`notice`,"data-tone":t,className:$(`flex items-start gap-3 rounded-md border px-3 py-2 text-sm`,Xm[t],e),...s,children:[i&&(0,O.jsx)(`div`,{"data-slot":`notice-icon`,className:`mt-0.5 shrink-0`,children:i}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[n&&(0,O.jsx)(`div`,{"data-slot":`notice-title`,className:`font-medium leading-snug`,children:n}),r&&(0,O.jsx)(`div`,{"data-slot":`notice-description`,className:$(`text-muted-foreground`,n&&`mt-0.5`),children:r}),o]}),a&&(0,O.jsx)(`div`,{"data-slot":`notice-actions`,className:`flex shrink-0 items-center gap-2`,children:a})]})}function Qm({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`skeleton`,"aria-hidden":`true`,className:$(`animate-pulse rounded-md bg-muted`,e),...t})}function $m({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar`,role:`toolbar`,className:$(`flex items-center gap-1 overflow-x-auto whitespace-nowrap [&::-webkit-scrollbar]:hidden`,e),...t})}function eh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar-group`,className:$(`flex items-center gap-0.5`,e),...t})}function th({className:e,variant:t=`ghost`,size:n=`icon-sm`,...r}){return(0,O.jsx)(Yp,{"data-slot":`toolbar-button`,variant:t,size:n,className:$(`shrink-0`,e),...r})}function nh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`toolbar-separator`,"aria-hidden":`true`,className:$(`mx-1 h-4 w-px shrink-0 bg-border/60`,e),...t})}var rh=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(tf,{ref:n,"data-slot":`disclosure-content`,className:$(`overflow-hidden data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}));rh.displayName=`DisclosureContent`;var ih=o.forwardRef(({className:e,children:t,chevron:n,variant:r=`ghost`,size:i=`sm`,...a},o)=>(0,O.jsx)(ef,{asChild:!0,children:(0,O.jsxs)(Yp,{ref:o,"data-slot":`disclosure-trigger`,variant:r,size:i,className:$(`group/disclosure justify-start gap-2`,e),...a,children:[n??(0,O.jsx)(ah,{}),t]})}));ih.displayName=`DisclosureTrigger`;function ah({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`disclosure-chevron`,"aria-hidden":`true`,className:$(`inline-block text-[11px] text-muted-foreground transition-transform group-data-[state=open]/disclosure:rotate-90`,e),...t,children:`▶`})}function oh({className:e,orientation:t=`vertical`,onResizeStart:n,role:r=`separator`,tabIndex:i=0,...a}){return(0,O.jsx)(`div`,{"data-slot":`resize-handle`,"data-orientation":t,role:r,"aria-orientation":t,tabIndex:i,onPointerDown:n,className:$(`shrink-0 touch-none select-none bg-transparent transition-colors hover:bg-border/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,t===`vertical`?`w-1 cursor-col-resize`:`h-1 cursor-row-resize`,e),...a})}var sh=[],ch=new Set,lh=0;function uh(){for(let e of ch)e(sh)}function dh(e){let t=`t${++lh}`,n={...e,id:t,createdAt:Date.now(),durationMs:e.durationMs??3e3};return sh=[...sh,n],uh(),n.durationMs&&n.durationMs>0&&setTimeout(()=>fh(t),n.durationMs),t}function fh(e){let t=sh.length;sh=sh.filter(t=>t.id!==e),sh.length!==t&&uh()}function ph(e){return ch.add(e),e(sh),()=>ch.delete(e)}function mh(e,t){return typeof e==`string`?{title:e,variant:t}:{variant:t,...e}}var hh=Object.assign(e=>dh(mh(e,`info`)),{success:e=>dh(mh(e,`success`)),error:e=>dh(mh(e,`error`)),info:e=>dh(mh(e,`info`)),dismiss:fh}),gh={success:`border-accent/40 bg-background text-foreground [&_[data-toast-icon]]:text-accent`,error:`border-destructive/50 bg-background text-foreground [&_[data-toast-icon]]:text-destructive`,info:`border-border bg-background text-foreground [&_[data-toast-icon]]:text-foreground/70`},_h={success:`✓`,error:`!`,info:`i`};function vh({position:e=`bottom-right`,className:t}){let[n,r]=o.useState(()=>sh);return o.useEffect(()=>ph(r),[]),typeof document>`u`?null:(0,D.createPortal)((0,O.jsx)(`div`,{role:`region`,"aria-label":`Notifications`,"data-testid":`toaster`,className:$(`pointer-events-none fixed z-[1000] flex w-[340px] max-w-[calc(100vw-2rem)] flex-col gap-2`,e===`bottom-right`&&`bottom-4 right-4 items-end`,e===`bottom-left`&&`bottom-4 left-4 items-start`,e===`top-right`&&`top-4 right-4 items-end`,e===`top-left`&&`top-4 left-4 items-start`,t),children:n.map(e=>{let t=e.variant??`info`;return(0,O.jsxs)(`div`,{role:`status`,"data-testid":`toast`,"data-variant":t,className:$(`pointer-events-auto flex w-full items-start gap-2.5 rounded-md border px-3 py-2 shadow-md`,`animate-in fade-in slide-in-from-bottom-2 duration-150`,gh[t]),children:[(0,O.jsx)(`span`,{"data-toast-icon":!0,className:`mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-[11px] font-semibold leading-none`,children:_h[t]}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.title&&(0,O.jsx)(`div`,{className:`text-sm font-medium leading-snug`,children:e.title}),e.description&&(0,O.jsx)(`div`,{className:$(`text-xs text-muted-foreground`,e.title?`mt-0.5`:`leading-snug`),children:e.description})]}),(0,O.jsx)(Im,{type:`button`,variant:`ghost`,size:`icon-xs`,onClick:()=>fh(e.id),"aria-label":`Dismiss`,className:`shrink-0 text-muted-foreground/70`,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-[13px] leading-none`,children:`×`})})]},e.id)})}),document.body)}function yh({className:e,label:t=`Loading…`,centered:n=!1,children:r,...i}){return(0,O.jsxs)(`div`,{"data-slot":`loading-state`,role:`status`,className:$(`flex items-center gap-2 text-sm text-muted-foreground`,n&&`h-full w-full justify-center`,e),...i,children:[(0,O.jsx)(Rm,{className:`size-3.5`}),(0,O.jsx)(`span`,{children:r??t})]})}function bh({className:e,...t}){return(0,O.jsx)(df,{"data-slot":`checkbox`,className:$(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,O.jsx)(pf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs leading-none`,children:`✓`})})})}var xh=o.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`input`,{ref:n,type:`radio`,"data-slot":`radio`,className:$(`size-4 shrink-0 rounded-full border border-input accent-primary shadow-xs transition-shadow outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...t}));xh.displayName=`Radio`;function Sh({...e}){return(0,O.jsx)(Hf,{"data-slot":`alert-dialog`,...e})}function Ch({...e}){return(0,O.jsx)(Uf,{"data-slot":`alert-dialog-portal`,...e})}function wh({className:e,...t}){return(0,O.jsx)(Wf,{"data-slot":`alert-dialog-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Th({className:e,size:t=`default`,...n}){return(0,O.jsxs)(Ch,{children:[(0,O.jsx)(wh,{}),(0,O.jsx)(Gf,{"data-slot":`alert-dialog-content`,"data-size":t,className:$(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...n})]})}function Eh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:$(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Dh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:$(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function Oh({className:e,...t}){return(0,O.jsx)(Jf,{"data-slot":`alert-dialog-title`,className:$(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function kh({className:e,...t}){return(0,O.jsx)(Yf,{"data-slot":`alert-dialog-description`,className:$(`text-sm text-muted-foreground`,e),...t})}function Ah({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,O.jsx)(Yp,{variant:t,size:n,asChild:!0,children:(0,O.jsx)(Kf,{"data-slot":`alert-dialog-action`,className:$(e),...r})})}function jh({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,O.jsx)(Yp,{variant:t,size:n,asChild:!0,children:(0,O.jsx)(qf,{"data-slot":`alert-dialog-cancel`,className:$(e),...r})})}function Mh({...e}){return(0,O.jsx)(Sp,{"data-slot":`popover`,...e})}function Nh({...e}){return(0,O.jsx)(Cp,{"data-slot":`popover-trigger`,...e})}function Ph({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,O.jsx)(wp,{children:(0,O.jsx)(Tp,{"data-slot":`popover-content`,align:t,sideOffset:n,className:$(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}function Fh({...e}){return(0,O.jsx)(Va,{"data-slot":`sheet`,...e})}function Ih({...e}){return(0,O.jsx)(qa,{"data-slot":`sheet-portal`,...e})}function Lh({className:e,...t}){return(0,O.jsx)(Ya,{"data-slot":`sheet-overlay`,className:$(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Rh({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,O.jsxs)(Ih,{children:[(0,O.jsx)(Lh,{}),(0,O.jsxs)($a,{"data-slot":`sheet-content`,className:$(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,O.jsxs)(co,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,O.jsx)(`span`,{"aria-hidden":`true`,className:`text-base leading-none`,children:`×`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function zh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`sheet-header`,className:$(`flex flex-col gap-1.5 p-4`,e),...t})}function Bh({className:e,...t}){return(0,O.jsx)(io,{"data-slot":`sheet-title`,className:$(`font-semibold text-foreground`,e),...t})}function Vh({className:e,...t}){return(0,O.jsx)(oo,{"data-slot":`sheet-description`,className:$(`text-sm text-muted-foreground`,e),...t})}var Hh=o.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,O.jsx)(qp,{ref:i,align:t,sideOffset:n,className:$(`z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r}));Hh.displayName=qp.displayName;var Uh=$d,Wh=Jd,Gh=Xd;function Kh({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:$(`group/input-group relative flex h-9 w-full items-center rounded-md border border-[color:oklch(from_var(--border)_l_c_h/0.65)] shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30`,`has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var qh=E(`flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*=size-])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5`,"block-end":`[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5`}},defaultVariants:{align:`inline-start`}});function Jh({className:e,align:t=`inline-start`,...n}){return(0,O.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:$(qh({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var Yh=E(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*=size-])]:size-3.5`,sm:`h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5`,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Xh({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,O.jsx)(Yp,{type:t,"data-size":r,variant:n,className:$(Yh({size:r}),e),...i})}function Zh({className:e,...t}){return(0,O.jsx)($p,{"data-slot":`input-group-control`,className:$(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function Qh({className:e,...t}){return(0,O.jsx)(`fieldset`,{"data-slot":`choice-group`,className:$(`grid gap-2`,e),...t})}function $h({className:e,...t}){return(0,O.jsx)(`legend`,{"data-slot":`choice-group-legend`,className:$(`mb-2 text-sm font-medium leading-5 text-foreground`,e),...t})}function eg({className:e,...t}){return(0,O.jsx)(`label`,{"data-slot":`choice-item`,className:$(`flex items-start gap-3 rounded-md border border-border/70 bg-background px-3 py-2 text-sm text-foreground transition-colors hover:bg-muted/30`,`has-[:checked]:border-ring/60 has-[:checked]:bg-muted/40 has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/50`,`has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50`,e),...t})}function tg({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`choice-item-body`,className:$(`flex flex-col gap-1`,e),...t})}function ng({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`choice-item-title`,className:$(`leading-5`,e),...t})}function rg({className:e,...t}){return(0,O.jsx)(`small`,{"data-slot":`choice-item-description`,className:$(`text-sm leading-5 text-muted-foreground`,e),...t})}var ig=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ag=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),og=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),sg=e=>{let t=og(e);return t.charAt(0).toUpperCase()+t.slice(1)},cg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},lg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ug=(0,o.createContext)({}),dg=()=>(0,o.useContext)(ug),fg=(0,o.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:s,...c},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=dg()??{},h=r??f?Number(n??d)*24/Number(t??u):n??d;return(0,o.createElement)(`svg`,{ref:l,...cg,width:t??u??cg.width,height:t??u??cg.height,stroke:e??p,strokeWidth:h,className:ig(`lucide`,m,i),...!a&&!lg(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),pg=(e,t)=>{let n=(0,o.forwardRef)(({className:n,...r},i)=>(0,o.createElement)(fg,{ref:i,iconNode:t,className:ig(`lucide-${ag(sg(e))}`,`lucide-${e}`,n),...r}));return n.displayName=sg(e),n};export{Zm as $,cm as A,eh as At,Bm as B,Da as Bt,Dm as C,Fm as Ct,Em as D,vh as Dt,km as E,$p as Et,mm as F,rm as Ft,Im as G,xn as Gt,Jm as H,Tn as Ht,hm as I,$ as It,Jh as J,Cn as Jt,Qp as K,yn as Kt,gm as L,fh as Lt,lm as M,nm as Mt,um as N,im as Nt,Am as O,$m as Ot,fm as P,tm as Pt,yh as Q,pm as R,hh as Rt,wm as S,jm as St,Tm as T,Pm as Tt,Ym as U,Sn as Ut,Km as V,J as Vt,qm as W,wn as Wt,Zh as X,nn as Xt,Xh as Y,_n as Yt,Lm as Z,rg as _,Vh as _t,Th as a,Mh as at,Gh as b,Qm as bt,Eh as c,xh as ct,Yp as d,bm as dt,Vm as et,bh as f,xm as ft,tg as g,Rh as gt,eg as h,Fh as ht,jh as i,Um as it,dm as j,nh as jt,am as k,th as kt,Oh as l,oh as lt,$h as m,vm as mt,Sh as n,Gm as nt,kh as o,Ph as ot,Qh as p,ym as pt,Kh as q,bn as qt,Ah as r,Hm as rt,Dh as s,Nh as st,pg as t,Wm as tt,Zp as u,_m as ut,ng as v,zh as vt,Om as w,Nm as wt,Wh as x,Rm as xt,Uh as y,Bh as yt,zm as z,Ia as zt};