db-studio 1.3.25 → 1.3.26

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 (90) hide show
  1. package/README.md +24 -0
  2. package/dist/core-dist/assets/{_baseUniq-CO5fFgqV.js → _baseUniq-Dz8rR54g.js} +1 -1
  3. package/dist/core-dist/assets/_pathlessLayout-byu8LhC4.js +2 -0
  4. package/dist/core-dist/assets/_queryId-tsebZ8Os.js +1 -0
  5. package/dist/core-dist/assets/_table-B9YoPE4g.js +8 -0
  6. package/dist/core-dist/assets/{arc-B_zMY48V.js → arc-DHQDyHbC.js} +1 -1
  7. package/dist/core-dist/assets/{architectureDiagram-VXUJARFQ-C9lykiZH.js → architectureDiagram-VXUJARFQ-Dye73hr2.js} +1 -1
  8. package/dist/core-dist/assets/{blockDiagram-VD42YOAC-DhqK2eyG.js → blockDiagram-VD42YOAC-fyPw9ErW.js} +1 -1
  9. package/dist/core-dist/assets/{c4Diagram-YG6GDRKO-CQrcwS8f.js → c4Diagram-YG6GDRKO-WorBPjZj.js} +1 -1
  10. package/dist/core-dist/assets/{cdoe-editor-C6mx2_AO.js → cdoe-editor-DWalt1Bs.js} +1 -1
  11. package/dist/core-dist/assets/channel-DmNVQLGj.js +1 -0
  12. package/dist/core-dist/assets/{chunk-4BX2VUAB-CdIpYPgB.js → chunk-4BX2VUAB-BWLeAEPx.js} +1 -1
  13. package/dist/core-dist/assets/{chunk-55IACEB6-BDNKe4fa.js → chunk-55IACEB6-Sz82sR_e.js} +1 -1
  14. package/dist/core-dist/assets/{chunk-B4BG7PRW-ZA-ck0YQ.js → chunk-B4BG7PRW-BRJVTFXO.js} +1 -1
  15. package/dist/core-dist/assets/{chunk-DI55MBZ5-CnVVpZE-.js → chunk-DI55MBZ5-DrMehRNo.js} +1 -1
  16. package/dist/core-dist/assets/{chunk-FMBD7UC4-CwwWK8-e.js → chunk-FMBD7UC4-DjrshjUM.js} +1 -1
  17. package/dist/core-dist/assets/{chunk-QN33PNHL-bn39U0qP.js → chunk-QN33PNHL-e_SdNueW.js} +1 -1
  18. package/dist/core-dist/assets/{chunk-QZHKN3VN-D0fSZNMo.js → chunk-QZHKN3VN-BcgeawM9.js} +1 -1
  19. package/dist/core-dist/assets/{chunk-TZMSLE5B-BTA4ulM4.js → chunk-TZMSLE5B-WV20vlP_.js} +1 -1
  20. package/dist/core-dist/assets/classDiagram-2ON5EDUG-BlV3AaHC.js +1 -0
  21. package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-BlV3AaHC.js +1 -0
  22. package/dist/core-dist/assets/clone-BJueq7g1.js +1 -0
  23. package/dist/core-dist/assets/{code-block-IT6T5CEO-BZv7MYo8.js → code-block-IT6T5CEO-CRNu6zPZ.js} +1 -1
  24. package/dist/core-dist/assets/{cose-bilkent-S5V4N54A-DQ5fWUqZ.js → cose-bilkent-S5V4N54A-C6XOe5oC.js} +1 -1
  25. package/dist/core-dist/assets/{dagre-6UL2VRFP-C-VDHjJ-.js → dagre-6UL2VRFP-BnmgBPjC.js} +1 -1
  26. package/dist/core-dist/assets/{diagram-PSM6KHXK-CdPWaSoG.js → diagram-PSM6KHXK-D6r3FA0m.js} +1 -1
  27. package/dist/core-dist/assets/{diagram-QEK2KX5R-CI3rBq3-.js → diagram-QEK2KX5R-CXpMzjrs.js} +1 -1
  28. package/dist/core-dist/assets/{diagram-S2PKOQOG-DrV1l_bS.js → diagram-S2PKOQOG-BolCoLvj.js} +1 -1
  29. package/dist/core-dist/assets/{erDiagram-Q2GNP2WA-DtHpaqwP.js → erDiagram-Q2GNP2WA-CTifgqt1.js} +1 -1
  30. package/dist/core-dist/assets/{flowDiagram-NV44I4VS-CWhbqAOb.js → flowDiagram-NV44I4VS-pbbYcDQW.js} +1 -1
  31. package/dist/core-dist/assets/{ganttDiagram-JELNMOA3-8U2ncuQI.js → ganttDiagram-JELNMOA3-zqJ48H3I.js} +1 -1
  32. package/dist/core-dist/assets/{gitGraphDiagram-NY62KEGX-rJlyYpVT.js → gitGraphDiagram-NY62KEGX-DxNJIXLP.js} +1 -1
  33. package/dist/core-dist/assets/{graph-BhgtEUho.js → graph-CjSaMg-K.js} +1 -1
  34. package/dist/core-dist/assets/icons-D6TH-xEh.js +1 -0
  35. package/dist/core-dist/assets/index-B11inYe0.js +58 -0
  36. package/dist/core-dist/assets/index-B3gSG1Yj.js +1 -0
  37. package/dist/core-dist/assets/index-BVXRwlCM.js +1 -0
  38. package/dist/core-dist/assets/index-BXRBzRx2.css +1 -0
  39. package/dist/core-dist/assets/{index-ejQaUr38.js → index-C4O5Rsq1.js} +1 -1
  40. package/dist/core-dist/assets/index-DelL3Eku.js +1 -0
  41. package/dist/core-dist/assets/{indexes-D8Eqj5x7.js → indexes-DYSIpFSd.js} +1 -1
  42. package/dist/core-dist/assets/infoDiagram-WHAUD3N6-CSNF_W-p.js +2 -0
  43. package/dist/core-dist/assets/{journeyDiagram-XKPGCS4Q-BNSrMmr7.js → journeyDiagram-XKPGCS4Q-BtpTxM-Y.js} +1 -1
  44. package/dist/core-dist/assets/{kanban-definition-3W4ZIXB7-V9L96KTF.js → kanban-definition-3W4ZIXB7-oYV0rhzZ.js} +1 -1
  45. package/dist/core-dist/assets/{layout-DNW_OiWL.js → layout-9jAkTDVb.js} +1 -1
  46. package/dist/core-dist/assets/{linear-DqoQUU19.js → linear-DbUIfB88.js} +1 -1
  47. package/dist/core-dist/assets/logs-CmJ0Xt6u.js +1 -0
  48. package/dist/core-dist/assets/{mermaid-VLURNSYL-F8q0N6Y-.js → mermaid-VLURNSYL-D5uFRwCp.js} +4 -4
  49. package/dist/core-dist/assets/{mermaid.core-Bl5zWzZD.js → mermaid.core-CLOnqD9L.js} +5 -5
  50. package/dist/core-dist/assets/{min-DDiiHzkP.js → min-CCTBSAVO.js} +1 -1
  51. package/dist/core-dist/assets/{mindmap-definition-VGOIOE7T-_ZelwEtb.js → mindmap-definition-VGOIOE7T-CCYjDuu4.js} +1 -1
  52. package/dist/core-dist/assets/{pieDiagram-ADFJNKIX-DlnlOcS9.js → pieDiagram-ADFJNKIX-C7byhore.js} +1 -1
  53. package/dist/core-dist/assets/{quadrantDiagram-AYHSOK5B-CyVFDRyR.js → quadrantDiagram-AYHSOK5B-CuHjSh6D.js} +1 -1
  54. package/dist/core-dist/assets/{queries.store-KdEzteJi.js → queries.store-CNqfnc5k.js} +1 -1
  55. package/dist/core-dist/assets/radix-ui-Cc0cu4Uu.js +51 -0
  56. package/dist/core-dist/assets/{react-dom-BWKcCUTe.js → react-dom-B7--tMaV.js} +1 -1
  57. package/dist/core-dist/assets/{requirementDiagram-UZGBJVZJ-jRbu5Vec.js → requirementDiagram-UZGBJVZJ-DLEPg0BV.js} +1 -1
  58. package/dist/core-dist/assets/{runner-tab-DG4JMrIS.js → runner-tab-BZPeQIxv.js} +3 -3
  59. package/dist/core-dist/assets/{sankeyDiagram-TZEHDZUN-gKjFH72S.js → sankeyDiagram-TZEHDZUN-DKdNm1Qv.js} +1 -1
  60. package/dist/core-dist/assets/{schema-Dig80dgQ.js → schema-C6AUjLib.js} +1 -1
  61. package/dist/core-dist/assets/{scroll-area-BZeWiQjX.js → scroll-area-DdKnqqlw.js} +1 -1
  62. package/dist/core-dist/assets/{sequenceDiagram-WL72ISMW-CAvLlHWG.js → sequenceDiagram-WL72ISMW-Bbo7kvpu.js} +1 -1
  63. package/dist/core-dist/assets/{stateDiagram-FKZM4ZOC-pYmj6Lkv.js → stateDiagram-FKZM4ZOC-Cz5Z-x6B.js} +1 -1
  64. package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-CdjqUuw7.js +1 -0
  65. package/dist/core-dist/assets/{tanstack-I4NcPTsd.js → tanstack-BVOBleBY.js} +2 -2
  66. package/dist/core-dist/assets/{timeline-definition-IT6M3QCI-D9DODJhX.js → timeline-definition-IT6M3QCI-ByEvAs-P.js} +1 -1
  67. package/dist/core-dist/assets/{treemap-KMMF4GRG-ClhjKA5M.js → treemap-KMMF4GRG-C1GKyhAV.js} +1 -1
  68. package/dist/core-dist/assets/{visualizer-CVdpIuSS.js → visualizer-CKiw4rgK.js} +1 -1
  69. package/dist/core-dist/assets/{xychartDiagram-PRI3JC2R-OT9Z40XT.js → xychartDiagram-PRI3JC2R-CS-C2fw-.js} +1 -1
  70. package/dist/core-dist/index.html +6 -6
  71. package/dist/index.js +96 -26
  72. package/dist/index.js.map +1 -1
  73. package/package.json +5 -5
  74. package/dist/core-dist/assets/_pathlessLayout-C3BlW5Hc.js +0 -2
  75. package/dist/core-dist/assets/_queryId-iSqlGQ2Y.js +0 -1
  76. package/dist/core-dist/assets/_table-SO2FYYAw.js +0 -8
  77. package/dist/core-dist/assets/channel-4io835lz.js +0 -1
  78. package/dist/core-dist/assets/classDiagram-2ON5EDUG-DpPeI05m.js +0 -1
  79. package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-DpPeI05m.js +0 -1
  80. package/dist/core-dist/assets/clone-Cu5G1cWz.js +0 -1
  81. package/dist/core-dist/assets/icons-cLYU3CQS.js +0 -1
  82. package/dist/core-dist/assets/index-5l-GokF9.js +0 -1
  83. package/dist/core-dist/assets/index-B-czu-uB.js +0 -1
  84. package/dist/core-dist/assets/index-DM_G5wVs.js +0 -58
  85. package/dist/core-dist/assets/index-Llx5wPe1.css +0 -1
  86. package/dist/core-dist/assets/index-iREZCpeS.js +0 -1
  87. package/dist/core-dist/assets/infoDiagram-WHAUD3N6-RphuT4VC.js +0 -2
  88. package/dist/core-dist/assets/logs-CjN_gOvl.js +0 -1
  89. package/dist/core-dist/assets/radix-ui-BypjIQUF.js +0 -51
  90. package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-BxqBo7RT.js +0 -1
@@ -1,51 +0,0 @@
1
- import{r as a,R as hn,a as U}from"./icons-cLYU3CQS.js";import{r as mn,R as ic,u as lc,o as uc,s as dc,f as fc,a as pc,b as vc,h as hc,l as mc,c as gc}from"./react-dom-BWKcCUTe.js";var zt={exports:{}},Ue={};var Yn;function xc(){if(Yn)return Ue;Yn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var c=null;if(s!==void 0&&(c=""+s),r.key!==void 0&&(c=""+r.key),"key"in r){s={};for(var i in r)i!=="key"&&(s[i]=r[i])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:c,ref:r!==void 0?r:null,props:s}}return Ue.Fragment=t,Ue.jsx=n,Ue.jsxs=n,Ue}var Xn;function Cc(){return Xn||(Xn=1,zt.exports=xc()),zt.exports}var l=Cc();function qn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qe(...e){return t=>{let n=!1;const o=e.map(r=>{const s=qn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():qn(e[r],null)}}}}function A(...e){return a.useCallback(qe(...e),e)}var wc=Symbol.for("react.lazy"),pt=hn[" use ".trim().toString()];function bc(e){return typeof e=="object"&&e!==null&&"then"in e}function vo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wc&&"_payload"in e&&bc(e._payload)}function yc(e){const t=Sc(e),n=a.forwardRef((o,r)=>{let{children:s,...c}=o;vo(s)&&typeof pt=="function"&&(s=pt(s._payload));const i=a.Children.toArray(s),u=i.find(Pc);if(u){const f=u.props.children,d=i.map(p=>p===u?a.Children.count(f)>1?a.Children.only(null):a.isValidElement(f)?f.props.children:null:p);return l.jsx(t,{...c,ref:r,children:a.isValidElement(f)?a.cloneElement(f,void 0,d):null})}return l.jsx(t,{...c,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var jf=yc("Slot");function Sc(e){const t=a.forwardRef((n,o)=>{let{children:r,...s}=n;if(vo(r)&&typeof pt=="function"&&(r=pt(r._payload)),a.isValidElement(r)){const c=_c(r),i=Rc(s,r.props);return r.type!==a.Fragment&&(i.ref=o?qe(o,c):c),a.cloneElement(r,i)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ec=Symbol("radix.slottable");function Pc(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ec}function Rc(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function _c(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Tc(e,t){const n=a.createContext(t),o=s=>{const{children:c,...i}=s,u=a.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:c})};o.displayName=e+"Provider";function r(s){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Y(e,t=[]){let n=[];function o(s,c){const i=a.createContext(c),u=n.length;n=[...n,c];const f=p=>{const{scope:v,children:m,...w}=p,h=v?.[e]?.[u]||i,g=a.useMemo(()=>w,Object.values(w));return l.jsx(h.Provider,{value:g,children:m})};f.displayName=s+"Provider";function d(p,v){const m=v?.[e]?.[u]||i,w=a.useContext(m);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,d]}const r=()=>{const s=n.map(c=>a.createContext(c));return function(i){const u=i?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Ac(r,...t)]}function Ac(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((i,{useScope:u,scopeName:f})=>{const p=u(s)[`__scope${f}`];return{...i,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var K=globalThis?.document?a.useLayoutEffect:()=>{},Mc=hn[" useId ".trim().toString()]||(()=>{}),Ic=0;function oe(e){const[t,n]=a.useState(Mc());return K(()=>{n(o=>o??String(Ic++))},[e]),t?`radix-${t}`:""}var Nc=hn[" useInsertionEffect ".trim().toString()]||K;function te({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,c]=Dc({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r;{const d=a.useRef(e!==void 0);a.useEffect(()=>{const p=d.current;p!==i&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,o])}const f=a.useCallback(d=>{if(i){const p=Oc(d)?d(e):d;p!==e&&c.current?.(p)}else s(d)},[i,e,s,c]);return[u,f]}function Dc({defaultProp:e,onChange:t}){const[n,o]=a.useState(e),r=a.useRef(n),s=a.useRef(t);return Nc(()=>{s.current=t},[t]),a.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Oc(e){return typeof e=="function"}function Pe(e){const t=jc(e),n=a.forwardRef((o,r)=>{const{children:s,...c}=o,i=a.Children.toArray(s),u=i.find(kc);if(u){const f=u.props.children,d=i.map(p=>p===u?a.Children.count(f)>1?a.Children.only(null):a.isValidElement(f)?f.props.children:null:p);return l.jsx(t,{...c,ref:r,children:a.isValidElement(f)?a.cloneElement(f,void 0,d):null})}return l.jsx(t,{...c,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function jc(e){const t=a.forwardRef((n,o)=>{const{children:r,...s}=n;if(a.isValidElement(r)){const c=Fc(r),i=Lc(s,r.props);return r.type!==a.Fragment&&(i.ref=o?qe(o,c):c),a.cloneElement(r,i)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ho=Symbol("radix.slottable");function mo(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ho,t}function kc(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ho}function Lc(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Fc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],R=$c.reduce((e,t)=>{const n=Pe(`Primitive.${t}`),o=a.forwardRef((r,s)=>{const{asChild:c,...i}=r,u=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function go(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}function V(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Bc(e,t=globalThis?.document){const n=V(e);a.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Gc="DismissableLayer",nn="dismissableLayer.update",Wc="dismissableLayer.pointerDownOutside",Hc="dismissableLayer.focusOutside",Zn,xo=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$e=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:i,...u}=e,f=a.useContext(xo),[d,p]=a.useState(null),v=d?.ownerDocument??globalThis?.document,[,m]=a.useState({}),w=A(t,E=>p(E)),h=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(g),x=d?h.indexOf(d):-1,b=f.layersWithOutsidePointerEventsDisabled.size>0,S=x>=C,_=Kc(E=>{const I=E.target,M=[...f.branches].some(D=>D.contains(I));!S||M||(r?.(E),c?.(E),E.defaultPrevented||i?.())},v),N=zc(E=>{const I=E.target;[...f.branches].some(D=>D.contains(I))||(s?.(E),c?.(E),E.defaultPrevented||i?.())},v);return Bc(E=>{x===f.layers.size-1&&(o?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},v),a.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Zn=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Jn(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Zn)}},[d,v,n,f]),a.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Jn())},[d,f]),a.useEffect(()=>{const E=()=>m({});return document.addEventListener(nn,E),()=>document.removeEventListener(nn,E)},[]),l.jsx(R.div,{...u,ref:w,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:y(e.onFocusCapture,N.onFocusCapture),onBlurCapture:y(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:y(e.onPointerDownCapture,_.onPointerDownCapture)})});$e.displayName=Gc;var Uc="DismissableLayerBranch",Vc=a.forwardRef((e,t)=>{const n=a.useContext(xo),o=a.useRef(null),r=A(t,o);return a.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(R.div,{...e,ref:r})});Vc.displayName=Uc;function Kc(e,t=globalThis?.document){const n=V(e),o=a.useRef(!1),r=a.useRef(()=>{});return a.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let u=function(){Co(Wc,n,f,{discrete:!0})};const f={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function zc(e,t=globalThis?.document){const n=V(e),o=a.useRef(!1);return a.useEffect(()=>{const r=s=>{s.target&&!o.current&&Co(Hc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Jn(){const e=new CustomEvent(nn);document.dispatchEvent(e)}function Co(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?go(r,s):r.dispatchEvent(s)}var Yt="focusScope.autoFocusOnMount",Xt="focusScope.autoFocusOnUnmount",Qn={bubbles:!1,cancelable:!0},Yc="FocusScope",Ze=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[i,u]=a.useState(null),f=V(r),d=V(s),p=a.useRef(null),v=A(t,h=>u(h)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(o){let h=function(b){if(m.paused||!i)return;const S=b.target;i.contains(S)?p.current=S:ge(p.current,{select:!0})},g=function(b){if(m.paused||!i)return;const S=b.relatedTarget;S!==null&&(i.contains(S)||ge(p.current,{select:!0}))},C=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&ge(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const x=new MutationObserver(C);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),x.disconnect()}}},[o,i,m.paused]),a.useEffect(()=>{if(i){to.add(m);const h=document.activeElement;if(!i.contains(h)){const C=new CustomEvent(Yt,Qn);i.addEventListener(Yt,f),i.dispatchEvent(C),C.defaultPrevented||(Xc(ei(wo(i)),{select:!0}),document.activeElement===h&&ge(i))}return()=>{i.removeEventListener(Yt,f),setTimeout(()=>{const C=new CustomEvent(Xt,Qn);i.addEventListener(Xt,d),i.dispatchEvent(C),C.defaultPrevented||ge(h??document.body,{select:!0}),i.removeEventListener(Xt,d),to.remove(m)},0)}}},[i,f,d,m]);const w=a.useCallback(h=>{if(!n&&!o||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,C=document.activeElement;if(g&&C){const x=h.currentTarget,[b,S]=qc(x);b&&S?!h.shiftKey&&C===S?(h.preventDefault(),n&&ge(b,{select:!0})):h.shiftKey&&C===b&&(h.preventDefault(),n&&ge(S,{select:!0})):C===x&&h.preventDefault()}},[n,o,m.paused]);return l.jsx(R.div,{tabIndex:-1,...c,ref:v,onKeyDown:w})});Ze.displayName=Yc;function Xc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ge(o,{select:t}),document.activeElement!==n)return}function qc(e){const t=wo(e),n=eo(t,e),o=eo(t.reverse(),e);return[n,o]}function wo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eo(e,t){for(const n of e)if(!Zc(n,{upTo:t}))return n}function Zc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Jc(e){return e instanceof HTMLInputElement&&"select"in e}function ge(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jc(e)&&t&&e.select()}}var to=Qc();function Qc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=no(e,t),e.unshift(t)},remove(t){e=no(e,t),e[0]?.resume()}}}function no(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ei(e){return e.filter(t=>t.tagName!=="A")}var ti="Portal",Be=a.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=a.useState(!1);K(()=>s(!0),[]);const c=n||r&&globalThis?.document?.body;return c?ic.createPortal(l.jsx(R.div,{...o,ref:t}),c):null});Be.displayName=ti;function ni(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var W=e=>{const{present:t,children:n}=e,o=oi(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),s=A(o.ref,ri(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:s}):null};W.displayName="Presence";function oi(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),s=a.useRef("none"),c=e?"mounted":"unmounted",[i,u]=ni(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const f=at(o.current);s.current=i==="mounted"?f:"none"},[i]),K(()=>{const f=o.current,d=r.current;if(d!==e){const v=s.current,m=at(f);e?u("MOUNT"):m==="none"||f?.display==="none"?u("UNMOUNT"):u(d&&v!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),K(()=>{if(t){let f;const d=t.ownerDocument.defaultView??window,p=m=>{const h=at(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",f=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(s.current=at(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(f=>{o.current=f?getComputedStyle(f):null,n(f)},[])}}function at(e){return e?.animationName||"none"}function ri(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qt=0;function bt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oo()),document.body.insertAdjacentElement("beforeend",e[1]??oo()),qt++,()=>{qt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qt--}},[])}function oo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fe=function(){return fe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},fe.apply(this,arguments)};function bo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function ai(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var dt="right-scroll-bar-position",ft="width-before-scroll-bar",si="with-scroll-bars-hidden",ci="--removed-body-scroll-bar-size";function Zt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ii(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var li=typeof window<"u"?a.useLayoutEffect:a.useEffect,ro=new WeakMap;function ui(e,t){var n=ii(null,function(o){return e.forEach(function(r){return Zt(r,o)})});return li(function(){var o=ro.get(n);if(o){var r=new Set(o),s=new Set(e),c=n.current;r.forEach(function(i){s.has(i)||Zt(i,null)}),s.forEach(function(i){r.has(i)||Zt(i,c)})}ro.set(n,e)},[e]),n}function di(e){return e}function fi(e,t){t===void 0&&(t=di);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,o);return n.push(c),function(){n=n.filter(function(i){return i!==c})}},assignSyncMedium:function(s){for(o=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var c=[];if(n.length){var i=n;n=[],i.forEach(s),c=n}var u=function(){var d=c;c=[],d.forEach(s)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(d){c.push(d),f()},filter:function(d){return c=c.filter(d),n}}}};return r}function pi(e){e===void 0&&(e={});var t=fi(null);return t.options=fe({async:!0,ssr:!1},e),t}var yo=function(e){var t=e.sideCar,n=bo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return a.createElement(o,fe({},n))};yo.isSideCarExport=!0;function vi(e,t){return e.useMedium(t),yo}var So=pi(),Jt=function(){},yt=a.forwardRef(function(e,t){var n=a.useRef(null),o=a.useState({onScrollCapture:Jt,onWheelCapture:Jt,onTouchMoveCapture:Jt}),r=o[0],s=o[1],c=e.forwardProps,i=e.children,u=e.className,f=e.removeScrollBar,d=e.enabled,p=e.shards,v=e.sideCar,m=e.noRelative,w=e.noIsolation,h=e.inert,g=e.allowPinchZoom,C=e.as,x=C===void 0?"div":C,b=e.gapMode,S=bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,N=ui([n,t]),E=fe(fe({},S),r);return a.createElement(a.Fragment,null,d&&a.createElement(_,{sideCar:So,removeScrollBar:f,shards:p,noRelative:m,noIsolation:w,inert:h,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),c?a.cloneElement(a.Children.only(i),fe(fe({},E),{ref:N})):a.createElement(x,fe({},E,{className:u,ref:N}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:ft,zeroRight:dt};var hi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hi();return t&&e.setAttribute("nonce",t),e}function gi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ci=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mi())&&(gi(t,n),xi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wi=function(){var e=Ci();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Eo=function(){var e=wi(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},bi={left:0,top:0,right:0,gap:0},Qt=function(e){return parseInt(e||"",10)||0},yi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Qt(n),Qt(o),Qt(r)]},Si=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bi;var t=yi(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Ei=Eo(),Oe="data-scroll-locked",Pi=function(e,t,n,o){var r=e.left,s=e.top,c=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(si,` {
3
- overflow: hidden `).concat(o,`;
4
- padding-right: `).concat(i,"px ").concat(o,`;
5
- }
6
- body[`).concat(Oe,`] {
7
- overflow: hidden `).concat(o,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
10
- padding-left: `.concat(r,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(c,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(i,"px ").concat(o,`;
16
- `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(dt,` {
20
- right: `).concat(i,"px ").concat(o,`;
21
- }
22
-
23
- .`).concat(ft,` {
24
- margin-right: `).concat(i,"px ").concat(o,`;
25
- }
26
-
27
- .`).concat(dt," .").concat(dt,` {
28
- right: 0 `).concat(o,`;
29
- }
30
-
31
- .`).concat(ft," .").concat(ft,` {
32
- margin-right: 0 `).concat(o,`;
33
- }
34
-
35
- body[`).concat(Oe,`] {
36
- `).concat(ci,": ").concat(i,`px;
37
- }
38
- `)},ao=function(){var e=parseInt(document.body.getAttribute(Oe)||"0",10);return isFinite(e)?e:0},Ri=function(){a.useEffect(function(){return document.body.setAttribute(Oe,(ao()+1).toString()),function(){var e=ao()-1;e<=0?document.body.removeAttribute(Oe):document.body.setAttribute(Oe,e.toString())}},[])},_i=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ri();var s=a.useMemo(function(){return Si(r)},[r]);return a.createElement(Ei,{styles:Pi(s,!t,r,n?"":"!important")})},on=!1;if(typeof window<"u")try{var st=Object.defineProperty({},"passive",{get:function(){return on=!0,!0}});window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{on=!1}var Ie=on?{passive:!1}:!1,Ti=function(e){return e.tagName==="TEXTAREA"},Po=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ti(e)&&n[t]==="visible")},Ai=function(e){return Po(e,"overflowY")},Mi=function(e){return Po(e,"overflowX")},so=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Ro(e,o);if(r){var s=_o(e,o),c=s[1],i=s[2];if(c>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Ii=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Ni=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Ro=function(e,t){return e==="v"?Ai(t):Mi(t)},_o=function(e,t){return e==="v"?Ii(t):Ni(t)},Di=function(e,t){return e==="h"&&t==="rtl"?-1:1},Oi=function(e,t,n,o,r){var s=Di(e,window.getComputedStyle(t).direction),c=s*o,i=n.target,u=t.contains(i),f=!1,d=c>0,p=0,v=0;do{if(!i)break;var m=_o(e,i),w=m[0],h=m[1],g=m[2],C=h-g-s*w;(w||C)&&Ro(e,i)&&(p+=C,v+=w);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(d&&Math.abs(p)<1||!d&&Math.abs(v)<1)&&(f=!0),f},ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},co=function(e){return[e.deltaX,e.deltaY]},io=function(e){return e&&"current"in e?e.current:e},ji=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ki=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Li=0,Ne=[];function Fi(e){var t=a.useRef([]),n=a.useRef([0,0]),o=a.useRef(),r=a.useState(Li++)[0],s=a.useState(Eo)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=ai([e.lockRef.current],(e.shards||[]).map(io),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!c.current.allowPinchZoom;var C=ct(h),x=n.current,b="deltaX"in h?h.deltaX:x[0]-C[0],S="deltaY"in h?h.deltaY:x[1]-C[1],_,N=h.target,E=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&N.type==="range")return!1;var I=window.getSelection(),M=I&&I.anchorNode,D=M?M===N||M.contains(N):!1;if(D)return!1;var O=so(E,N);if(!O)return!0;if(O?_=E:(_=E==="v"?"h":"v",O=so(E,N)),!O)return!1;if(!o.current&&"changedTouches"in h&&(b||S)&&(o.current=_),!_)return!0;var B=o.current||_;return Oi(B,g,h,B==="h"?b:S)},[]),u=a.useCallback(function(h){var g=h;if(!(!Ne.length||Ne[Ne.length-1]!==s)){var C="deltaY"in g?co(g):ct(g),x=t.current.filter(function(_){return _.name===g.type&&(_.target===g.target||g.target===_.shadowParent)&&ji(_.delta,C)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(c.current.shards||[]).map(io).filter(Boolean).filter(function(_){return _.contains(g.target)}),S=b.length>0?i(g,b[0]):!c.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),f=a.useCallback(function(h,g,C,x){var b={name:h,delta:g,target:C,should:x,shadowParent:$i(C)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=a.useCallback(function(h){n.current=ct(h),o.current=void 0},[]),p=a.useCallback(function(h){f(h.type,co(h),h.target,i(h,e.lockRef.current))},[]),v=a.useCallback(function(h){f(h.type,ct(h),h.target,i(h,e.lockRef.current))},[]);a.useEffect(function(){return Ne.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ie),document.addEventListener("touchmove",u,Ie),document.addEventListener("touchstart",d,Ie),function(){Ne=Ne.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,Ie),document.removeEventListener("touchmove",u,Ie),document.removeEventListener("touchstart",d,Ie)}},[]);var m=e.removeScrollBar,w=e.inert;return a.createElement(a.Fragment,null,w?a.createElement(s,{styles:ki(r)}):null,m?a.createElement(_i,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $i(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bi=vi(So,Fi);var Je=a.forwardRef(function(e,t){return a.createElement(yt,fe({},e,{ref:t,sideCar:Bi}))});Je.classNames=yt.classNames;var Gi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},De=new WeakMap,it=new WeakMap,lt={},en=0,To=function(e){return e&&(e.host||To(e.parentNode))},Wi=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=To(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Hi=function(e,t,n,o){var r=Wi(t,Array.isArray(e)?e:[e]);lt[n]||(lt[n]=new WeakMap);var s=lt[n],c=[],i=new Set,u=new Set(r),f=function(p){!p||i.has(p)||(i.add(p),f(p.parentNode))};r.forEach(f);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(v){if(i.has(v))d(v);else try{var m=v.getAttribute(o),w=m!==null&&m!=="false",h=(De.get(v)||0)+1,g=(s.get(v)||0)+1;De.set(v,h),s.set(v,g),c.push(v),h===1&&w&&it.set(v,!0),g===1&&v.setAttribute(n,"true"),w||v.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return d(t),i.clear(),en++,function(){c.forEach(function(p){var v=De.get(p)-1,m=s.get(p)-1;De.set(p,v),s.set(p,m),v||(it.has(p)||p.removeAttribute(o),it.delete(p)),m||p.removeAttribute(n)}),en--,en||(De=new WeakMap,De=new WeakMap,it=new WeakMap,lt={})}},St=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Gi(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Hi(o,r,n,"aria-hidden")):function(){return null}},Et="Dialog",[Ao,Mo]=Y(Et),[Ui,de]=Ao(Et),Io=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,i=a.useRef(null),u=a.useRef(null),[f,d]=te({prop:o,defaultProp:r??!1,onChange:s,caller:Et});return l.jsx(Ui,{scope:t,triggerRef:i,contentRef:u,contentId:oe(),titleId:oe(),descriptionId:oe(),open:f,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(p=>!p),[d]),modal:c,children:n})};Io.displayName=Et;var No="DialogTrigger",Do=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=de(No,n),s=A(t,r.triggerRef);return l.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Cn(r.open),...o,ref:s,onClick:y(e.onClick,r.onOpenToggle)})});Do.displayName=No;var gn="DialogPortal",[Vi,Oo]=Ao(gn,{forceMount:void 0}),jo=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=de(gn,t);return l.jsx(Vi,{scope:t,forceMount:n,children:a.Children.map(o,c=>l.jsx(W,{present:n||s.open,children:l.jsx(Be,{asChild:!0,container:r,children:c})}))})};jo.displayName=gn;var vt="DialogOverlay",ko=a.forwardRef((e,t)=>{const n=Oo(vt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=de(vt,e.__scopeDialog);return s.modal?l.jsx(W,{present:o||s.open,children:l.jsx(zi,{...r,ref:t})}):null});ko.displayName=vt;var Ki=Pe("DialogOverlay.RemoveScroll"),zi=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=de(vt,n);return l.jsx(Je,{as:Ki,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(R.div,{"data-state":Cn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Re="DialogContent",Lo=a.forwardRef((e,t)=>{const n=Oo(Re,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=de(Re,e.__scopeDialog);return l.jsx(W,{present:o||s.open,children:s.modal?l.jsx(Yi,{...r,ref:t}):l.jsx(Xi,{...r,ref:t})})});Lo.displayName=Re;var Yi=a.forwardRef((e,t)=>{const n=de(Re,e.__scopeDialog),o=a.useRef(null),r=A(t,n.contentRef,o);return a.useEffect(()=>{const s=o.current;if(s)return St(s)},[]),l.jsx(Fo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:y(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,i=c.button===0&&c.ctrlKey===!0;(c.button===2||i)&&s.preventDefault()}),onFocusOutside:y(e.onFocusOutside,s=>s.preventDefault())})}),Xi=a.forwardRef((e,t)=>{const n=de(Re,e.__scopeDialog),o=a.useRef(!1),r=a.useRef(!1);return l.jsx(Fo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Fo=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,i=de(Re,n),u=a.useRef(null),f=A(t,u);return bt(),l.jsxs(l.Fragment,{children:[l.jsx(Ze,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx($e,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Cn(i.open),...c,ref:f,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Zi,{titleId:i.titleId}),l.jsx(Qi,{contentRef:u,descriptionId:i.descriptionId})]})]})}),xn="DialogTitle",$o=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=de(xn,n);return l.jsx(R.h2,{id:r.titleId,...o,ref:t})});$o.displayName=xn;var Bo="DialogDescription",Go=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=de(Bo,n);return l.jsx(R.p,{id:r.descriptionId,...o,ref:t})});Go.displayName=Bo;var Wo="DialogClose",Ho=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=de(Wo,n);return l.jsx(R.button,{type:"button",...o,ref:t,onClick:y(e.onClick,()=>r.onOpenChange(!1))})});Ho.displayName=Wo;function Cn(e){return e?"open":"closed"}var Uo="DialogTitleWarning",[qi,Vo]=Tc(Uo,{contentName:Re,titleName:xn,docsSlug:"dialog"}),Zi=({titleId:e})=>{const t=Vo(Uo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ji="DialogDescriptionWarning",Qi=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vo(Ji).contentName}}.`;return a.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},el=Io,tl=Do,nl=jo,ol=ko,rl=Lo,al=$o,sl=Go,Ko=Ho,cl="Label",zo=a.forwardRef((e,t)=>l.jsx(R.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));zo.displayName=cl;var kf=zo;function rn(e,[t,n]){return Math.min(n,Math.max(t,e))}function wn(e){const t=e+"CollectionProvider",[n,o]=Y(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=h=>{const{scope:g,children:C}=h,x=U.useRef(null),b=U.useRef(new Map).current;return l.jsx(r,{scope:g,itemMap:b,collectionRef:x,children:C})};c.displayName=t;const i=e+"CollectionSlot",u=Pe(i),f=U.forwardRef((h,g)=>{const{scope:C,children:x}=h,b=s(i,C),S=A(g,b.collectionRef);return l.jsx(u,{ref:S,children:x})});f.displayName=i;const d=e+"CollectionItemSlot",p="data-radix-collection-item",v=Pe(d),m=U.forwardRef((h,g)=>{const{scope:C,children:x,...b}=h,S=U.useRef(null),_=A(g,S),N=s(d,C);return U.useEffect(()=>(N.itemMap.set(S,{ref:S,...b}),()=>{N.itemMap.delete(S)})),l.jsx(v,{[p]:"",ref:_,children:x})});m.displayName=d;function w(h){const g=s(e+"CollectionConsumer",h);return U.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(g.itemMap.values()).sort((N,E)=>b.indexOf(N.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:f,ItemSlot:m},w,o]}var il=a.createContext(void 0);function Ge(e){const t=a.useContext(il);return e||t||"ltr"}var ll="Arrow",Yo=a.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(R.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yo.displayName=ll;var ul=Yo;function bn(e){const[t,n]=a.useState(void 0);return K(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,i;if("borderBoxSize"in s){const u=s.borderBoxSize,f=Array.isArray(u)?u[0]:u;c=f.inlineSize,i=f.blockSize}else c=e.offsetWidth,i=e.offsetHeight;n({width:c,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var yn="Popper",[Xo,Ce]=Y(yn),[dl,qo]=Xo(yn),Zo=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null);return l.jsx(dl,{scope:t,anchor:o,onAnchorChange:r,children:n})};Zo.displayName=yn;var Jo="PopperAnchor",Qo=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=qo(Jo,n),c=a.useRef(null),i=A(t,c),u=a.useRef(null);return a.useEffect(()=>{const f=u.current;u.current=o?.current||c.current,f!==u.current&&s.onAnchorChange(u.current)}),o?null:l.jsx(R.div,{...r,ref:i})});Qo.displayName=Jo;var Sn="PopperContent",[fl,pl]=Xo(Sn),er=a.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:w,...h}=e,g=qo(Sn,n),[C,x]=a.useState(null),b=A(t,P=>x(P)),[S,_]=a.useState(null),N=bn(S),E=N?.width??0,I=N?.height??0,M=o+(s!=="center"?"-"+s:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(f)?f:[f],B=O.length>0,H={padding:D,boundary:O.filter(hl),altBoundary:B},{refs:X,floatingStyles:q,placement:j,isPositioned:z,middlewareData:$}=lc({strategy:"fixed",placement:M,whileElementsMounted:(...P)=>gc(...P,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[uc({mainAxis:r+I,alignmentAxis:c}),u&&dc({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?mc():void 0,...H}),u&&fc({...H}),pc({...H,apply:({elements:P,rects:k,availableWidth:J,availableHeight:L})=>{const{width:F,height:G}=k.reference,se=P.floating.style;se.setProperty("--radix-popper-available-width",`${J}px`),se.setProperty("--radix-popper-available-height",`${L}px`),se.setProperty("--radix-popper-anchor-width",`${F}px`),se.setProperty("--radix-popper-anchor-height",`${G}px`)}}),S&&vc({element:S,padding:i}),ml({arrowWidth:E,arrowHeight:I}),v&&hc({strategy:"referenceHidden",...H})]}),[T,re]=or(j),Z=V(w);K(()=>{z&&Z?.()},[z,Z]);const le=$.arrow?.x,ve=$.arrow?.y,ae=$.arrow?.centerOffset!==0,[he,ne]=a.useState();return K(()=>{C&&ne(window.getComputedStyle(C).zIndex)},[C]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(fl,{scope:n,placedSide:T,onArrowChange:_,arrowX:le,arrowY:ve,shouldHideArrow:ae,children:l.jsx(R.div,{"data-side":T,"data-align":re,...h,ref:b,style:{...h.style,animation:z?void 0:"none"}})})})});er.displayName=Sn;var tr="PopperArrow",vl={top:"bottom",right:"left",bottom:"top",left:"right"},nr=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=pl(tr,o),c=vl[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(ul,{...r,ref:n,style:{...r.style,display:"block"}})})});nr.displayName=tr;function hl(e){return e!==null}var ml=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,c=r.arrow?.centerOffset!==0,i=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[f,d]=or(n),p={start:"0%",center:"50%",end:"100%"}[d],v=(r.arrow?.x??0)+i/2,m=(r.arrow?.y??0)+u/2;let w="",h="";return f==="bottom"?(w=c?p:`${v}px`,h=`${-u}px`):f==="top"?(w=c?p:`${v}px`,h=`${o.floating.height+u}px`):f==="right"?(w=`${-u}px`,h=c?p:`${m}px`):f==="left"&&(w=`${o.floating.width+u}px`,h=c?p:`${m}px`),{data:{x:w,y:h}}}});function or(e){const[t,n="center"]=e.split("-");return[t,n]}var Pt=Zo,Qe=Qo,Rt=er,_t=nr;function En(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rr=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gl="VisuallyHidden",ar=a.forwardRef((e,t)=>l.jsx(R.span,{...e,ref:t,style:{...rr,...e.style}}));ar.displayName=gl;var xl=ar,Cl=[" ","Enter","ArrowUp","ArrowDown"],wl=[" ","Enter"],_e="Select",[Tt,At,bl]=wn(_e),[We]=Y(_e,[bl,Ce]),Mt=Ce(),[yl,we]=We(_e),[Sl,El]=We(_e),sr=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:c,defaultValue:i,onValueChange:u,dir:f,name:d,autoComplete:p,disabled:v,required:m,form:w}=e,h=Mt(t),[g,C]=a.useState(null),[x,b]=a.useState(null),[S,_]=a.useState(!1),N=Ge(f),[E,I]=te({prop:o,defaultProp:r??!1,onChange:s,caller:_e}),[M,D]=te({prop:c,defaultProp:i,onChange:u,caller:_e}),O=a.useRef(null),B=g?w||!!g.closest("form"):!0,[H,X]=a.useState(new Set),q=Array.from(H).map(j=>j.props.value).join(";");return l.jsx(Pt,{...h,children:l.jsxs(yl,{required:m,scope:t,trigger:g,onTriggerChange:C,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:oe(),value:M,onValueChange:D,open:E,onOpenChange:I,dir:N,triggerPointerDownPosRef:O,disabled:v,children:[l.jsx(Tt.Provider,{scope:t,children:l.jsx(Sl,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(j=>{X(z=>new Set(z).add(j))},[]),onNativeOptionRemove:a.useCallback(j=>{X(z=>{const $=new Set(z);return $.delete(j),$})},[]),children:n})}),B?l.jsxs(Tr,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:p,value:M,onChange:j=>D(j.target.value),disabled:v,form:w,children:[M===void 0?l.jsx("option",{value:""}):null,Array.from(H)]},q):null]})})};sr.displayName=_e;var cr="SelectTrigger",ir=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=Mt(n),c=we(cr,n),i=c.disabled||o,u=A(t,c.onTriggerChange),f=At(n),d=a.useRef("touch"),[p,v,m]=Mr(h=>{const g=f().filter(b=>!b.disabled),C=g.find(b=>b.value===c.value),x=Ir(g,h,C);x!==void 0&&c.onValueChange(x.value)}),w=h=>{i||(c.onOpenChange(!0),m()),h&&(c.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return l.jsx(Qe,{asChild:!0,...s,children:l.jsx(R.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Ar(c.value)?"":void 0,...r,ref:u,onClick:y(r.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:y(r.onPointerDown,h=>{d.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:y(r.onKeyDown,h=>{const g=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&v(h.key),!(g&&h.key===" ")&&Cl.includes(h.key)&&(w(),h.preventDefault())})})})});ir.displayName=cr;var lr="SelectValue",ur=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:c="",...i}=e,u=we(lr,n),{onValueNodeHasChildrenChange:f}=u,d=s!==void 0,p=A(t,u.onValueNodeChange);return K(()=>{f(d)},[f,d]),l.jsx(R.span,{...i,ref:p,style:{pointerEvents:"none"},children:Ar(u.value)?l.jsx(l.Fragment,{children:c}):s})});ur.displayName=lr;var Pl="SelectIcon",dr=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(R.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});dr.displayName=Pl;var Rl="SelectPortal",fr=e=>l.jsx(Be,{asChild:!0,...e});fr.displayName=Rl;var Te="SelectContent",pr=a.forwardRef((e,t)=>{const n=we(Te,e.__scopeSelect),[o,r]=a.useState();if(K(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?mn.createPortal(l.jsx(vr,{scope:e.__scopeSelect,children:l.jsx(Tt.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(hr,{...e,ref:t})});pr.displayName=Te;var ue=10,[vr,be]=We(Te),_l="SelectContentImpl",Tl=Pe("SelectContent.RemoveScroll"),hr=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:c,side:i,sideOffset:u,align:f,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:w,hideWhenDetached:h,avoidCollisions:g,...C}=e,x=we(Te,n),[b,S]=a.useState(null),[_,N]=a.useState(null),E=A(t,P=>S(P)),[I,M]=a.useState(null),[D,O]=a.useState(null),B=At(n),[H,X]=a.useState(!1),q=a.useRef(!1);a.useEffect(()=>{if(b)return St(b)},[b]),bt();const j=a.useCallback(P=>{const[k,...J]=B().map(G=>G.ref.current),[L]=J.slice(-1),F=document.activeElement;for(const G of P)if(G===F||(G?.scrollIntoView({block:"nearest"}),G===k&&_&&(_.scrollTop=0),G===L&&_&&(_.scrollTop=_.scrollHeight),G?.focus(),document.activeElement!==F))return},[B,_]),z=a.useCallback(()=>j([I,b]),[j,I,b]);a.useEffect(()=>{H&&z()},[H,z]);const{onOpenChange:$,triggerPointerDownPosRef:T}=x;a.useEffect(()=>{if(b){let P={x:0,y:0};const k=L=>{P={x:Math.abs(Math.round(L.pageX)-(T.current?.x??0)),y:Math.abs(Math.round(L.pageY)-(T.current?.y??0))}},J=L=>{P.x<=10&&P.y<=10?L.preventDefault():b.contains(L.target)||$(!1),document.removeEventListener("pointermove",k),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",J,{capture:!0})}}},[b,$,T]),a.useEffect(()=>{const P=()=>$(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[$]);const[re,Z]=Mr(P=>{const k=B().filter(F=>!F.disabled),J=k.find(F=>F.ref.current===document.activeElement),L=Ir(k,P,J);L&&setTimeout(()=>L.ref.current.focus())}),le=a.useCallback((P,k,J)=>{const L=!q.current&&!J;(x.value!==void 0&&x.value===k||L)&&(M(P),L&&(q.current=!0))},[x.value]),ve=a.useCallback(()=>b?.focus(),[b]),ae=a.useCallback((P,k,J)=>{const L=!q.current&&!J;(x.value!==void 0&&x.value===k||L)&&O(P)},[x.value]),he=o==="popper"?an:mr,ne=he===an?{side:i,sideOffset:u,align:f,alignOffset:d,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:w,hideWhenDetached:h,avoidCollisions:g}:{};return l.jsx(vr,{scope:n,content:b,viewport:_,onViewportChange:N,itemRefCallback:le,selectedItem:I,onItemLeave:ve,itemTextRefCallback:ae,focusSelectedItem:z,selectedItemText:D,position:o,isPositioned:H,searchRef:re,children:l.jsx(Je,{as:Tl,allowPinchZoom:!0,children:l.jsx(Ze,{asChild:!0,trapped:x.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:y(r,P=>{x.trigger?.focus({preventScroll:!0}),P.preventDefault()}),children:l.jsx($e,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(he,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:P=>P.preventDefault(),...C,...ne,onPlaced:()=>X(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:y(C.onKeyDown,P=>{const k=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!k&&P.key.length===1&&Z(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let L=B().filter(F=>!F.disabled).map(F=>F.ref.current);if(["ArrowUp","End"].includes(P.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const F=P.target,G=L.indexOf(F);L=L.slice(G+1)}setTimeout(()=>j(L)),P.preventDefault()}})})})})})})});hr.displayName=_l;var Al="SelectItemAlignedPosition",mr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=we(Te,n),c=be(Te,n),[i,u]=a.useState(null),[f,d]=a.useState(null),p=A(t,E=>d(E)),v=At(n),m=a.useRef(!1),w=a.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:C,focusSelectedItem:x}=c,b=a.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&f&&h&&g&&C){const E=s.trigger.getBoundingClientRect(),I=f.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),D=C.getBoundingClientRect();if(s.dir!=="rtl"){const F=D.left-I.left,G=M.left-F,se=E.left-G,Ee=E.width+se,Ut=Math.max(Ee,I.width),Vt=window.innerWidth-ue,Kt=rn(G,[ue,Math.max(ue,Vt-Ut)]);i.style.minWidth=Ee+"px",i.style.left=Kt+"px"}else{const F=I.right-D.right,G=window.innerWidth-M.right-F,se=window.innerWidth-E.right-G,Ee=E.width+se,Ut=Math.max(Ee,I.width),Vt=window.innerWidth-ue,Kt=rn(G,[ue,Math.max(ue,Vt-Ut)]);i.style.minWidth=Ee+"px",i.style.right=Kt+"px"}const O=v(),B=window.innerHeight-ue*2,H=h.scrollHeight,X=window.getComputedStyle(f),q=parseInt(X.borderTopWidth,10),j=parseInt(X.paddingTop,10),z=parseInt(X.borderBottomWidth,10),$=parseInt(X.paddingBottom,10),T=q+j+H+$+z,re=Math.min(g.offsetHeight*5,T),Z=window.getComputedStyle(h),le=parseInt(Z.paddingTop,10),ve=parseInt(Z.paddingBottom,10),ae=E.top+E.height/2-ue,he=B-ae,ne=g.offsetHeight/2,P=g.offsetTop+ne,k=q+j+P,J=T-k;if(k<=ae){const F=O.length>0&&g===O[O.length-1].ref.current;i.style.bottom="0px";const G=f.clientHeight-h.offsetTop-h.offsetHeight,se=Math.max(he,ne+(F?ve:0)+G+z),Ee=k+se;i.style.height=Ee+"px"}else{const F=O.length>0&&g===O[0].ref.current;i.style.top="0px";const se=Math.max(ae,q+h.offsetTop+(F?le:0)+ne)+J;i.style.height=se+"px",h.scrollTop=k-ae+h.offsetTop}i.style.margin=`${ue}px 0`,i.style.minHeight=re+"px",i.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[v,s.trigger,s.valueNode,i,f,h,g,C,s.dir,o]);K(()=>b(),[b]);const[S,_]=a.useState();K(()=>{f&&_(window.getComputedStyle(f).zIndex)},[f]);const N=a.useCallback(E=>{E&&w.current===!0&&(b(),x?.(),w.current=!1)},[b,x]);return l.jsx(Il,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(R.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});mr.displayName=Al;var Ml="SelectPopperPosition",an=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=ue,...s}=e,c=Mt(n);return l.jsx(Rt,{...c,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});an.displayName=Ml;var[Il,Pn]=We(Te,{}),sn="SelectViewport",gr=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=be(sn,n),c=Pn(sn,n),i=A(t,s.onViewportChange),u=a.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Tt.Slot,{scope:n,children:l.jsx(R.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:y(r.onScroll,f=>{const d=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=c;if(v?.current&&p){const m=Math.abs(u.current-d.scrollTop);if(m>0){const w=window.innerHeight-ue*2,h=parseFloat(p.style.minHeight),g=parseFloat(p.style.height),C=Math.max(h,g);if(C<w){const x=C+m,b=Math.min(w,x),S=x-b;p.style.height=b+"px",p.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});gr.displayName=sn;var xr="SelectGroup",[Nl,Dl]=We(xr),Ol=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=oe();return l.jsx(Nl,{scope:n,id:r,children:l.jsx(R.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Ol.displayName=xr;var Cr="SelectLabel",jl=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Dl(Cr,n);return l.jsx(R.div,{id:r.id,...o,ref:t})});jl.displayName=Cr;var ht="SelectItem",[kl,wr]=We(ht),br=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...c}=e,i=we(ht,n),u=be(ht,n),f=i.value===o,[d,p]=a.useState(s??""),[v,m]=a.useState(!1),w=A(t,x=>u.itemRefCallback?.(x,o,r)),h=oe(),g=a.useRef("touch"),C=()=>{r||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(kl,{scope:n,value:o,disabled:r,textId:h,isSelected:f,onItemTextChange:a.useCallback(x=>{p(b=>b||(x?.textContent??"").trim())},[]),children:l.jsx(Tt.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:l.jsx(R.div,{role:"option","aria-labelledby":h,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...c,ref:w,onFocus:y(c.onFocus,()=>m(!0)),onBlur:y(c.onBlur,()=>m(!1)),onClick:y(c.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:y(c.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:y(c.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:y(c.onPointerMove,x=>{g.current=x.pointerType,r?u.onItemLeave?.():g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:y(c.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:y(c.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(wl.includes(x.key)&&C(),x.key===" "&&x.preventDefault())})})})})});br.displayName=ht;var Ve="SelectItemText",yr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,c=we(Ve,n),i=be(Ve,n),u=wr(Ve,n),f=El(Ve,n),[d,p]=a.useState(null),v=A(t,C=>p(C),u.onItemTextChange,C=>i.itemTextRefCallback?.(C,u.value,u.disabled)),m=d?.textContent,w=a.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=f;return K(()=>(h(w),()=>g(w)),[h,g,w]),l.jsxs(l.Fragment,{children:[l.jsx(R.span,{id:u.textId,...s,ref:v}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?mn.createPortal(s.children,c.valueNode):null]})});yr.displayName=Ve;var Sr="SelectItemIndicator",Er=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return wr(Sr,n).isSelected?l.jsx(R.span,{"aria-hidden":!0,...o,ref:t}):null});Er.displayName=Sr;var cn="SelectScrollUpButton",Pr=a.forwardRef((e,t)=>{const n=be(cn,e.__scopeSelect),o=Pn(cn,e.__scopeSelect),[r,s]=a.useState(!1),c=A(t,o.onScrollButtonChange);return K(()=>{if(n.viewport&&n.isPositioned){let i=function(){const f=u.scrollTop>0;s(f)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(_r,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Pr.displayName=cn;var ln="SelectScrollDownButton",Rr=a.forwardRef((e,t)=>{const n=be(ln,e.__scopeSelect),o=Pn(ln,e.__scopeSelect),[r,s]=a.useState(!1),c=A(t,o.onScrollButtonChange);return K(()=>{if(n.viewport&&n.isPositioned){let i=function(){const f=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<f;s(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(_r,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Rr.displayName=ln;var _r=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=be("SelectScrollButton",n),c=a.useRef(null),i=At(n),u=a.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return a.useEffect(()=>()=>u(),[u]),K(()=>{i().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(R.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:y(r.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:y(r.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:y(r.onPointerLeave,()=>{u()})})}),Ll="SelectSeparator",Fl=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(R.div,{"aria-hidden":!0,...o,ref:t})});Fl.displayName=Ll;var un="SelectArrow",$l=a.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Mt(n),s=we(un,n),c=be(un,n);return s.open&&c.position==="popper"?l.jsx(_t,{...r,...o,ref:t}):null});$l.displayName=un;var Bl="SelectBubbleInput",Tr=a.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=a.useRef(null),s=A(o,r),c=En(t);return a.useEffect(()=>{const i=r.current;if(!i)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&d){const p=new Event("change",{bubbles:!0});d.call(i,t),i.dispatchEvent(p)}},[c,t]),l.jsx(R.select,{...n,style:{...rr,...n.style},ref:s,defaultValue:t})});Tr.displayName=Bl;function Ar(e){return e===""||e===void 0}function Mr(e){const t=V(e),n=a.useRef(""),o=a.useRef(0),r=a.useCallback(c=>{const i=n.current+c;t(i),(function u(f){n.current=f,window.clearTimeout(o.current),f!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(i)},[t]),s=a.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ir(e,t,n){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Gl(e,Math.max(s,0));r.length===1&&(c=c.filter(f=>f!==n));const u=c.find(f=>f.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Gl(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Lf=sr,Ff=ir,$f=ur,Bf=dr,Gf=fr,Wf=pr,Hf=gr,Uf=br,Vf=yr,Kf=Er,zf=Pr,Yf=Rr,It="Popover",[Nr]=Y(It,[Ce]),et=Ce(),[Wl,ye]=Nr(It),Dr=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!1}=e,i=et(t),u=a.useRef(null),[f,d]=a.useState(!1),[p,v]=te({prop:o,defaultProp:r??!1,onChange:s,caller:It});return l.jsx(Pt,{...i,children:l.jsx(Wl,{scope:t,contentId:oe(),triggerRef:u,open:p,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:f,onCustomAnchorAdd:a.useCallback(()=>d(!0),[]),onCustomAnchorRemove:a.useCallback(()=>d(!1),[]),modal:c,children:n})})};Dr.displayName=It;var Or="PopoverAnchor",jr=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ye(Or,n),s=et(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=r;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(Qe,{...s,...o,ref:t})});jr.displayName=Or;var kr="PopoverTrigger",Lr=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ye(kr,n),s=et(n),c=A(t,r.triggerRef),i=l.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Wr(r.open),...o,ref:c,onClick:y(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:l.jsx(Qe,{asChild:!0,...s,children:i})});Lr.displayName=kr;var Rn="PopoverPortal",[Hl,Ul]=Nr(Rn,{forceMount:void 0}),Fr=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=ye(Rn,t);return l.jsx(Hl,{scope:t,forceMount:n,children:l.jsx(W,{present:n||s.open,children:l.jsx(Be,{asChild:!0,container:r,children:o})})})};Fr.displayName=Rn;var ke="PopoverContent",$r=a.forwardRef((e,t)=>{const n=Ul(ke,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=ye(ke,e.__scopePopover);return l.jsx(W,{present:o||s.open,children:s.modal?l.jsx(Kl,{...r,ref:t}):l.jsx(zl,{...r,ref:t})})});$r.displayName=ke;var Vl=Pe("PopoverContent.RemoveScroll"),Kl=a.forwardRef((e,t)=>{const n=ye(ke,e.__scopePopover),o=a.useRef(null),r=A(t,o),s=a.useRef(!1);return a.useEffect(()=>{const c=o.current;if(c)return St(c)},[]),l.jsx(Je,{as:Vl,allowPinchZoom:!0,children:l.jsx(Br,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(e.onCloseAutoFocus,c=>{c.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:y(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:y(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),zl=a.forwardRef((e,t)=>{const n=ye(ke,e.__scopePopover),o=a.useRef(!1),r=a.useRef(!1);return l.jsx(Br,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Br=a.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,...p}=e,v=ye(ke,n),m=et(n);return bt(),l.jsx(Ze,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx($e,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(Rt,{"data-state":Wr(v.open),role:"dialog",id:v.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Gr="PopoverClose",Yl=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=ye(Gr,n);return l.jsx(R.button,{type:"button",...o,ref:t,onClick:y(e.onClick,()=>r.onOpenChange(!1))})});Yl.displayName=Gr;var Xl="PopoverArrow",ql=a.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=et(n);return l.jsx(_t,{...r,...o,ref:t})});ql.displayName=Xl;function Wr(e){return e?"open":"closed"}var Xf=Dr,qf=jr,Zf=Lr,Jf=Fr,Qf=$r,Nt="Checkbox",[Zl]=Y(Nt),[Jl,_n]=Zl(Nt);function Ql(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:c,name:i,onCheckedChange:u,required:f,value:d="on",internal_do_not_use_render:p}=e,[v,m]=te({prop:n,defaultProp:r??!1,onChange:u,caller:Nt}),[w,h]=a.useState(null),[g,C]=a.useState(null),x=a.useRef(!1),b=w?!!c||!!w.closest("form"):!0,S={checked:v,disabled:s,setChecked:m,control:w,setControl:h,name:i,form:c,value:d,hasConsumerStoppedPropagationRef:x,required:f,defaultChecked:xe(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:C};return l.jsx(Jl,{scope:t,...S,children:nu(p)?p(S):o})}var Hr="CheckboxTrigger",Ur=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:c,disabled:i,checked:u,required:f,setControl:d,setChecked:p,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:w}=_n(Hr,e),h=A(r,d),g=a.useRef(u);return a.useEffect(()=>{const C=s?.form;if(C){const x=()=>p(g.current);return C.addEventListener("reset",x),()=>C.removeEventListener("reset",x)}},[s,p]),l.jsx(R.button,{type:"button",role:"checkbox","aria-checked":xe(u)?"mixed":u,"aria-required":f,"data-state":Yr(u),"data-disabled":i?"":void 0,disabled:i,value:c,...o,ref:h,onKeyDown:y(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:y(n,C=>{p(x=>xe(x)?!0:!x),w&&m&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})})});Ur.displayName=Hr;var eu=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:c,disabled:i,value:u,onCheckedChange:f,form:d,...p}=e;return l.jsx(Ql,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:i,required:c,onCheckedChange:f,name:o,form:d,value:u,internal_do_not_use_render:({isFormControl:v})=>l.jsxs(l.Fragment,{children:[l.jsx(Ur,{...p,ref:t,__scopeCheckbox:n}),v&&l.jsx(zr,{__scopeCheckbox:n})]})})});eu.displayName=Nt;var Vr="CheckboxIndicator",tu=a.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=_n(Vr,n);return l.jsx(W,{present:o||xe(s.checked)||s.checked===!0,children:l.jsx(R.span,{"data-state":Yr(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});tu.displayName=Vr;var Kr="CheckboxBubbleInput",zr=a.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:c,required:i,disabled:u,name:f,value:d,form:p,bubbleInput:v,setBubbleInput:m}=_n(Kr,e),w=A(n,m),h=En(s),g=bn(o);a.useEffect(()=>{const x=v;if(!x)return;const b=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(b,"checked").set,N=!r.current;if(h!==s&&_){const E=new Event("click",{bubbles:N});x.indeterminate=xe(s),_.call(x,xe(s)?!1:s),x.dispatchEvent(E)}},[v,h,s,r]);const C=a.useRef(xe(s)?!1:s);return l.jsx(R.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??C.current,required:i,disabled:u,name:f,value:d,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});zr.displayName=Kr;function nu(e){return typeof e=="function"}function xe(e){return e==="indeterminate"}function Yr(e){return xe(e)?"indeterminate":e?"checked":"unchecked"}var tn="rovingFocusGroup.onEntryFocus",ou={bubbles:!1,cancelable:!0},tt="RovingFocusGroup",[dn,Xr,ru]=wn(tt),[au,He]=Y(tt,[ru]),[su,cu]=au(tt),qr=a.forwardRef((e,t)=>l.jsx(dn.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(dn.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(iu,{...e,ref:t})})}));qr.displayName=tt;var iu=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...p}=e,v=a.useRef(null),m=A(t,v),w=Ge(s),[h,g]=te({prop:c,defaultProp:i??null,onChange:u,caller:tt}),[C,x]=a.useState(!1),b=V(f),S=Xr(n),_=a.useRef(!1),[N,E]=a.useState(0);return a.useEffect(()=>{const I=v.current;if(I)return I.addEventListener(tn,b),()=>I.removeEventListener(tn,b)},[b]),l.jsx(su,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:h,onItemFocus:a.useCallback(I=>g(I),[g]),onItemShiftTab:a.useCallback(()=>x(!0),[]),onFocusableItemAdd:a.useCallback(()=>E(I=>I+1),[]),onFocusableItemRemove:a.useCallback(()=>E(I=>I-1),[]),children:l.jsx(R.div,{tabIndex:C||N===0?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:y(e.onMouseDown,()=>{_.current=!0}),onFocus:y(e.onFocus,I=>{const M=!_.current;if(I.target===I.currentTarget&&M&&!C){const D=new CustomEvent(tn,ou);if(I.currentTarget.dispatchEvent(D),!D.defaultPrevented){const O=S().filter(j=>j.focusable),B=O.find(j=>j.active),H=O.find(j=>j.id===h),q=[B,H,...O].filter(Boolean).map(j=>j.ref.current);Qr(q,d)}}_.current=!1}),onBlur:y(e.onBlur,()=>x(!1))})})}),Zr="RovingFocusGroupItem",Jr=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:c,...i}=e,u=oe(),f=s||u,d=cu(Zr,n),p=d.currentTabStopId===f,v=Xr(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:h}=d;return a.useEffect(()=>{if(o)return m(),()=>w()},[o,m,w]),l.jsx(dn.ItemSlot,{scope:n,id:f,focusable:o,active:r,children:l.jsx(R.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:y(e.onMouseDown,g=>{o?d.onItemFocus(f):g.preventDefault()}),onFocus:y(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:y(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const C=du(g,d.orientation,d.dir);if(C!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=v().filter(S=>S.focusable).map(S=>S.ref.current);if(C==="last")b.reverse();else if(C==="prev"||C==="next"){C==="prev"&&b.reverse();const S=b.indexOf(g.currentTarget);b=d.loop?fu(b,S+1):b.slice(S+1)}setTimeout(()=>Qr(b))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:h!=null}):c})})});Jr.displayName=Zr;var lu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uu(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function du(e,t,n){const o=uu(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return lu[o]}function Qr(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function fu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Tn=qr,An=Jr,fn=["Enter"," "],pu=["ArrowDown","PageUp","Home"],ea=["ArrowUp","PageDown","End"],vu=[...pu,...ea],hu={ltr:[...fn,"ArrowRight"],rtl:[...fn,"ArrowLeft"]},mu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nt="Menu",[ze,gu,xu]=wn(nt),[Ae,Dt]=Y(nt,[xu,Ce,He]),Ot=Ce(),ta=He(),[Cu,Me]=Ae(nt),[wu,ot]=Ae(nt),na=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:c=!0}=e,i=Ot(t),[u,f]=a.useState(null),d=a.useRef(!1),p=V(s),v=Ge(r);return a.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(Pt,{...i,children:l.jsx(Cu,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:f,children:l.jsx(wu,{scope:t,onClose:a.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:v,modal:c,children:o})})})};na.displayName=nt;var bu="MenuAnchor",Mn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ot(n);return l.jsx(Qe,{...r,...o,ref:t})});Mn.displayName=bu;var In="MenuPortal",[yu,oa]=Ae(In,{forceMount:void 0}),ra=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Me(In,t);return l.jsx(yu,{scope:t,forceMount:n,children:l.jsx(W,{present:n||s.open,children:l.jsx(Be,{asChild:!0,container:r,children:o})})})};ra.displayName=In;var ce="MenuContent",[Su,Nn]=Ae(ce),aa=a.forwardRef((e,t)=>{const n=oa(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Me(ce,e.__scopeMenu),c=ot(ce,e.__scopeMenu);return l.jsx(ze.Provider,{scope:e.__scopeMenu,children:l.jsx(W,{present:o||s.open,children:l.jsx(ze.Slot,{scope:e.__scopeMenu,children:c.modal?l.jsx(Eu,{...r,ref:t}):l.jsx(Pu,{...r,ref:t})})})})}),Eu=a.forwardRef((e,t)=>{const n=Me(ce,e.__scopeMenu),o=a.useRef(null),r=A(t,o);return a.useEffect(()=>{const s=o.current;if(s)return St(s)},[]),l.jsx(Dn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:y(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Pu=a.forwardRef((e,t)=>{const n=Me(ce,e.__scopeMenu);return l.jsx(Dn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ru=Pe("MenuContent.ScrollLock"),Dn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,disableOutsideScroll:w,...h}=e,g=Me(ce,n),C=ot(ce,n),x=Ot(n),b=ta(n),S=gu(n),[_,N]=a.useState(null),E=a.useRef(null),I=A(t,E,g.onContentChange),M=a.useRef(0),D=a.useRef(""),O=a.useRef(0),B=a.useRef(null),H=a.useRef("right"),X=a.useRef(0),q=w?Je:a.Fragment,j=w?{as:Ru,allowPinchZoom:!0}:void 0,z=T=>{const re=D.current+T,Z=S().filter(P=>!P.disabled),le=document.activeElement,ve=Z.find(P=>P.ref.current===le)?.textValue,ae=Z.map(P=>P.textValue),he=Fu(ae,re,ve),ne=Z.find(P=>P.textValue===he)?.ref.current;(function P(k){D.current=k,window.clearTimeout(M.current),k!==""&&(M.current=window.setTimeout(()=>P(""),1e3))})(re),ne&&setTimeout(()=>ne.focus())};a.useEffect(()=>()=>window.clearTimeout(M.current),[]),bt();const $=a.useCallback(T=>H.current===B.current?.side&&Bu(T,B.current?.area),[]);return l.jsx(Su,{scope:n,searchRef:D,onItemEnter:a.useCallback(T=>{$(T)&&T.preventDefault()},[$]),onItemLeave:a.useCallback(T=>{$(T)||(E.current?.focus(),N(null))},[$]),onTriggerLeave:a.useCallback(T=>{$(T)&&T.preventDefault()},[$]),pointerGraceTimerRef:O,onPointerGraceIntentChange:a.useCallback(T=>{B.current=T},[]),children:l.jsx(q,{...j,children:l.jsx(Ze,{asChild:!0,trapped:r,onMountAutoFocus:y(s,T=>{T.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:l.jsx($e,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:v,onDismiss:m,children:l.jsx(Tn,{asChild:!0,...b,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:N,onEntryFocus:y(u,T=>{C.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Rt,{role:"menu","aria-orientation":"vertical","data-state":ba(g.open),"data-radix-menu-content":"",dir:C.dir,...x,...h,ref:I,style:{outline:"none",...h.style},onKeyDown:y(h.onKeyDown,T=>{const Z=T.target.closest("[data-radix-menu-content]")===T.currentTarget,le=T.ctrlKey||T.altKey||T.metaKey,ve=T.key.length===1;Z&&(T.key==="Tab"&&T.preventDefault(),!le&&ve&&z(T.key));const ae=E.current;if(T.target!==ae||!vu.includes(T.key))return;T.preventDefault();const ne=S().filter(P=>!P.disabled).map(P=>P.ref.current);ea.includes(T.key)&&ne.reverse(),ku(ne)}),onBlur:y(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(M.current),D.current="")}),onPointerMove:y(e.onPointerMove,Ye(T=>{const re=T.target,Z=X.current!==T.clientX;if(T.currentTarget.contains(re)&&Z){const le=T.clientX>X.current?"right":"left";H.current=le,X.current=T.clientX}}))})})})})})})});aa.displayName=ce;var _u="MenuGroup",On=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(R.div,{role:"group",...o,ref:t})});On.displayName=_u;var Tu="MenuLabel",sa=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(R.div,{...o,ref:t})});sa.displayName=Tu;var mt="MenuItem",lo="menu.itemSelect",jt=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=a.useRef(null),c=ot(mt,e.__scopeMenu),i=Nn(mt,e.__scopeMenu),u=A(t,s),f=a.useRef(!1),d=()=>{const p=s.current;if(!n&&p){const v=new CustomEvent(lo,{bubbles:!0,cancelable:!0});p.addEventListener(lo,m=>o?.(m),{once:!0}),go(p,v),v.defaultPrevented?f.current=!1:c.onClose()}};return l.jsx(ca,{...r,ref:u,disabled:n,onClick:y(e.onClick,d),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:y(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:y(e.onKeyDown,p=>{const v=i.searchRef.current!=="";n||v&&p.key===" "||fn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});jt.displayName=mt;var ca=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,c=Nn(mt,n),i=ta(n),u=a.useRef(null),f=A(t,u),[d,p]=a.useState(!1),[v,m]=a.useState("");return a.useEffect(()=>{const w=u.current;w&&m((w.textContent??"").trim())},[s.children]),l.jsx(ze.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:l.jsx(An,{asChild:!0,...i,focusable:!o,children:l.jsx(R.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:f,onPointerMove:y(e.onPointerMove,Ye(w=>{o?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:y(e.onPointerLeave,Ye(w=>c.onItemLeave(w))),onFocus:y(e.onFocus,()=>p(!0)),onBlur:y(e.onBlur,()=>p(!1))})})})}),Au="MenuCheckboxItem",ia=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(pa,{scope:e.__scopeMenu,checked:n,children:l.jsx(jt,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":kn(n),onSelect:y(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ia.displayName=Au;var la="MenuRadioGroup",[Mu,Iu]=Ae(la,{value:void 0,onValueChange:()=>{}}),ua=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=V(o);return l.jsx(Mu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(On,{...r,ref:t})})});ua.displayName=la;var da="MenuRadioItem",fa=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=Iu(da,e.__scopeMenu),s=n===r.value;return l.jsx(pa,{scope:e.__scopeMenu,checked:s,children:l.jsx(jt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":kn(s),onSelect:y(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});fa.displayName=da;var jn="MenuItemIndicator",[pa,Nu]=Ae(jn,{checked:!1}),va=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Nu(jn,n);return l.jsx(W,{present:o||gt(s.checked)||s.checked===!0,children:l.jsx(R.span,{...r,ref:t,"data-state":kn(s.checked)})})});va.displayName=jn;var Du="MenuSeparator",ha=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(R.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ha.displayName=Du;var Ou="MenuArrow",ma=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ot(n);return l.jsx(_t,{...r,...o,ref:t})});ma.displayName=Ou;var ju="MenuSub",[ep,ga]=Ae(ju),Ke="MenuSubTrigger",xa=a.forwardRef((e,t)=>{const n=Me(Ke,e.__scopeMenu),o=ot(Ke,e.__scopeMenu),r=ga(Ke,e.__scopeMenu),s=Nn(Ke,e.__scopeMenu),c=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,f={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const p=i.current;return()=>{window.clearTimeout(p),u(null)}},[i,u]),l.jsx(Mn,{asChild:!0,...f,children:l.jsx(ca,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ba(n.open),...e,ref:qe(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:y(e.onPointerMove,Ye(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:y(e.onPointerLeave,Ye(p=>{d();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,w=m==="right",h=w?-5:5,g=v[w?"left":"right"],C=v[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+h,y:p.clientY},{x:g,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x:g,y:v.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:y(e.onKeyDown,p=>{const v=s.searchRef.current!=="";e.disabled||v&&p.key===" "||hu[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});xa.displayName=Ke;var Ca="MenuSubContent",wa=a.forwardRef((e,t)=>{const n=oa(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Me(ce,e.__scopeMenu),c=ot(ce,e.__scopeMenu),i=ga(Ca,e.__scopeMenu),u=a.useRef(null),f=A(t,u);return l.jsx(ze.Provider,{scope:e.__scopeMenu,children:l.jsx(W,{present:o||s.open,children:l.jsx(ze.Slot,{scope:e.__scopeMenu,children:l.jsx(Dn,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:f,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{c.isUsingKeyboardRef.current&&u.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:y(e.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:y(e.onEscapeKeyDown,d=>{c.onClose(),d.preventDefault()}),onKeyDown:y(e.onKeyDown,d=>{const p=d.currentTarget.contains(d.target),v=mu[c.dir].includes(d.key);p&&v&&(s.onOpenChange(!1),i.trigger?.focus(),d.preventDefault())})})})})})});wa.displayName=Ca;function ba(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function kn(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function ku(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Lu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Fu(e,t,n){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Lu(e,Math.max(s,0));r.length===1&&(c=c.filter(f=>f!==n));const u=c.find(f=>f.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function $u(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const i=t[s],u=t[c],f=i.x,d=i.y,p=u.x,v=u.y;d>o!=v>o&&n<(p-f)*(o-d)/(v-d)+f&&(r=!r)}return r}function Bu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $u(n,t)}function Ye(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ya=na,Sa=Mn,Ea=ra,Pa=aa,Ra=On,_a=sa,Ta=jt,Aa=ia,Ma=ua,Ia=fa,Na=va,Da=ha,Oa=ma,ja=xa,ka=wa,kt="DropdownMenu",[Gu]=Y(kt,[Dt]),Q=Dt(),[Wu,La]=Gu(kt),Fa=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:c,modal:i=!0}=e,u=Q(t),f=a.useRef(null),[d,p]=te({prop:r,defaultProp:s??!1,onChange:c,caller:kt});return l.jsx(Wu,{scope:t,triggerId:oe(),triggerRef:f,contentId:oe(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(v=>!v),[p]),modal:i,children:l.jsx(ya,{...u,open:d,onOpenChange:p,dir:o,modal:i,children:n})})};Fa.displayName=kt;var $a="DropdownMenuTrigger",Ba=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=La($a,n),c=Q(n);return l.jsx(Sa,{asChild:!0,...c,children:l.jsx(R.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:qe(t,s.triggerRef),onPointerDown:y(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:y(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Ba.displayName=$a;var Hu="DropdownMenuPortal",Ga=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Q(t);return l.jsx(Ea,{...o,...n})};Ga.displayName=Hu;var Wa="DropdownMenuContent",Ha=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=La(Wa,n),s=Q(n),c=a.useRef(!1);return l.jsx(Pa,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:y(e.onCloseAutoFocus,i=>{c.current||r.triggerRef.current?.focus(),c.current=!1,i.preventDefault()}),onInteractOutside:y(e.onInteractOutside,i=>{const u=i.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,d=u.button===2||f;(!r.modal||d)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ha.displayName=Wa;var Uu="DropdownMenuGroup",Ua=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Ra,{...r,...o,ref:t})});Ua.displayName=Uu;var Vu="DropdownMenuLabel",Ku=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(_a,{...r,...o,ref:t})});Ku.displayName=Vu;var zu="DropdownMenuItem",Va=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Ta,{...r,...o,ref:t})});Va.displayName=zu;var Yu="DropdownMenuCheckboxItem",Xu=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Aa,{...r,...o,ref:t})});Xu.displayName=Yu;var qu="DropdownMenuRadioGroup",Zu=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Ma,{...r,...o,ref:t})});Zu.displayName=qu;var Ju="DropdownMenuRadioItem",Qu=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Ia,{...r,...o,ref:t})});Qu.displayName=Ju;var ed="DropdownMenuItemIndicator",td=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Na,{...r,...o,ref:t})});td.displayName=ed;var nd="DropdownMenuSeparator",Ka=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Da,{...r,...o,ref:t})});Ka.displayName=nd;var od="DropdownMenuArrow",rd=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(Oa,{...r,...o,ref:t})});rd.displayName=od;var ad="DropdownMenuSubTrigger",sd=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(ja,{...r,...o,ref:t})});sd.displayName=ad;var cd="DropdownMenuSubContent",id=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Q(n);return l.jsx(ka,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});id.displayName=cd;var tp=Fa,np=Ba,op=Ga,rp=Ha,ap=Ua,sp=Va,cp=Ka,ld="Separator",uo="horizontal",ud=["horizontal","vertical"],za=a.forwardRef((e,t)=>{const{decorative:n,orientation:o=uo,...r}=e,s=dd(o)?o:uo,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(R.div,{"data-orientation":s,...i,...r,ref:t})});za.displayName=ld;function dd(e){return ud.includes(e)}var ip=za,[Lt]=Y("Tooltip",[Ce]),Ft=Ce(),Ya="TooltipProvider",fd=700,pn="tooltip.open",[pd,Ln]=Lt(Ya),Xa=e=>{const{__scopeTooltip:t,delayDuration:n=fd,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,c=a.useRef(!0),i=a.useRef(!1),u=a.useRef(0);return a.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),l.jsx(pd,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:a.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:i,onPointerInTransitChange:a.useCallback(f=>{i.current=f},[]),disableHoverableContent:r,children:s})};Xa.displayName=Ya;var Xe="Tooltip",[vd,rt]=Lt(Xe),qa=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:c,delayDuration:i}=e,u=Ln(Xe,e.__scopeTooltip),f=Ft(t),[d,p]=a.useState(null),v=oe(),m=a.useRef(0),w=c??u.disableHoverableContent,h=i??u.delayDuration,g=a.useRef(!1),[C,x]=te({prop:o,defaultProp:r??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(pn))):u.onClose(),s?.(E)},caller:Xe}),b=a.useMemo(()=>C?g.current?"delayed-open":"instant-open":"closed",[C]),S=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,x(!0)},[x]),_=a.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),N=a.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,x(!0),m.current=0},h)},[h,x]);return a.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),l.jsx(Pt,{...f,children:l.jsx(vd,{scope:t,contentId:v,open:C,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:a.useCallback(()=>{u.isOpenDelayedRef.current?N():S()},[u.isOpenDelayedRef,N,S]),onTriggerLeave:a.useCallback(()=>{w?_():(window.clearTimeout(m.current),m.current=0)},[_,w]),onOpen:S,onClose:_,disableHoverableContent:w,children:n})})};qa.displayName=Xe;var vn="TooltipTrigger",Za=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=rt(vn,n),s=Ln(vn,n),c=Ft(n),i=a.useRef(null),u=A(t,i,r.onTriggerChange),f=a.useRef(!1),d=a.useRef(!1),p=a.useCallback(()=>f.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(Qe,{asChild:!0,...c,children:l.jsx(R.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:y(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:y(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:y(e.onPointerDown,()=>{r.open&&r.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:y(e.onFocus,()=>{f.current||r.onOpen()}),onBlur:y(e.onBlur,r.onClose),onClick:y(e.onClick,r.onClose)})})});Za.displayName=vn;var Fn="TooltipPortal",[hd,md]=Lt(Fn,{forceMount:void 0}),Ja=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=rt(Fn,t);return l.jsx(hd,{scope:t,forceMount:n,children:l.jsx(W,{present:n||s.open,children:l.jsx(Be,{asChild:!0,container:r,children:o})})})};Ja.displayName=Fn;var Le="TooltipContent",Qa=a.forwardRef((e,t)=>{const n=md(Le,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,c=rt(Le,e.__scopeTooltip);return l.jsx(W,{present:o||c.open,children:c.disableHoverableContent?l.jsx(es,{side:r,...s,ref:t}):l.jsx(gd,{side:r,...s,ref:t})})}),gd=a.forwardRef((e,t)=>{const n=rt(Le,e.__scopeTooltip),o=Ln(Le,e.__scopeTooltip),r=a.useRef(null),s=A(t,r),[c,i]=a.useState(null),{trigger:u,onClose:f}=n,d=r.current,{onPointerInTransitChange:p}=o,v=a.useCallback(()=>{i(null),p(!1)},[p]),m=a.useCallback((w,h)=>{const g=w.currentTarget,C={x:w.clientX,y:w.clientY},x=bd(C,g.getBoundingClientRect()),b=yd(C,x),S=Sd(h.getBoundingClientRect()),_=Pd([...b,...S]);i(_),p(!0)},[p]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(u&&d){const w=g=>m(g,d),h=g=>m(g,u);return u.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[u,d,m,v]),a.useEffect(()=>{if(c){const w=h=>{const g=h.target,C={x:h.clientX,y:h.clientY},x=u?.contains(g)||d?.contains(g),b=!Ed(C,c);x?v():b&&(v(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,d,c,f,v]),l.jsx(es,{...e,ref:s})}),[xd,Cd]=Lt(Xe,{isInside:!1}),wd=mo("TooltipContent"),es=a.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:c,...i}=e,u=rt(Le,n),f=Ft(n),{onClose:d}=u;return a.useEffect(()=>(document.addEventListener(pn,d),()=>document.removeEventListener(pn,d)),[d]),a.useEffect(()=>{if(u.trigger){const p=v=>{v.target?.contains(u.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,d]),l.jsx($e,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:l.jsxs(Rt,{"data-state":u.stateAttribute,...f,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(wd,{children:o}),l.jsx(xd,{scope:n,isInside:!0,children:l.jsx(xl,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Qa.displayName=Le;var ts="TooltipArrow",ns=a.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ft(n);return Cd(ts,n).isInside?null:l.jsx(_t,{...r,...o,ref:t})});ns.displayName=ts;function bd(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function yd(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Sd(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Ed(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const i=t[s],u=t[c],f=i.x,d=i.y,p=u.x,v=u.y;d>o!=v>o&&n<(p-f)*(o-d)/(v-d)+f&&(r=!r)}return r}function Pd(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Rd(t)}function Rd(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var lp=Xa,up=qa,dp=Za,fp=Ja,pp=Qa,vp=ns,os="AlertDialog",[_d]=Y(os,[Mo]),me=Mo(),rs=e=>{const{__scopeAlertDialog:t,...n}=e,o=me(t);return l.jsx(el,{...o,...n,modal:!0})};rs.displayName=os;var Td="AlertDialogTrigger",Ad=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=me(n);return l.jsx(tl,{...r,...o,ref:t})});Ad.displayName=Td;var Md="AlertDialogPortal",as=e=>{const{__scopeAlertDialog:t,...n}=e,o=me(t);return l.jsx(nl,{...o,...n})};as.displayName=Md;var Id="AlertDialogOverlay",ss=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=me(n);return l.jsx(ol,{...r,...o,ref:t})});ss.displayName=Id;var je="AlertDialogContent",[Nd,Dd]=_d(je),Od=mo("AlertDialogContent"),cs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=me(n),c=a.useRef(null),i=A(t,c),u=a.useRef(null);return l.jsx(qi,{contentName:je,titleName:is,docsSlug:"alert-dialog",children:l.jsx(Nd,{scope:n,cancelRef:u,children:l.jsxs(rl,{role:"alertdialog",...s,...r,ref:i,onOpenAutoFocus:y(r.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[l.jsx(Od,{children:o}),l.jsx(kd,{contentRef:c})]})})})});cs.displayName=je;var is="AlertDialogTitle",ls=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=me(n);return l.jsx(al,{...r,...o,ref:t})});ls.displayName=is;var us="AlertDialogDescription",ds=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=me(n);return l.jsx(sl,{...r,...o,ref:t})});ds.displayName=us;var jd="AlertDialogAction",fs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=me(n);return l.jsx(Ko,{...r,...o,ref:t})});fs.displayName=jd;var ps="AlertDialogCancel",vs=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=Dd(ps,n),s=me(n),c=A(t,r);return l.jsx(Ko,{...s,...o,ref:c})});vs.displayName=ps;var kd=({contentRef:e})=>{const t=`\`${je}\` requires a description for the component to be accessible for screen reader users.
46
-
47
- You can add a description to the \`${je}\` by passing a \`${us}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
-
49
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${je}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
50
-
51
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},hp=rs,mp=as,gp=ss,xp=cs,Cp=fs,wp=vs,bp=ls,yp=ds,$n="ContextMenu",[Ld]=Y($n,[Dt]),ee=Dt(),[Fd,hs]=Ld($n),ms=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,dir:r,modal:s=!0}=e,[c,i]=a.useState(!1),u=ee(t),f=V(o),d=a.useCallback(p=>{i(p),f(p)},[f]);return l.jsx(Fd,{scope:t,open:c,onOpenChange:d,modal:s,children:l.jsx(ya,{...u,dir:r,open:c,onOpenChange:d,modal:s,children:n})})};ms.displayName=$n;var gs="ContextMenuTrigger",xs=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:o=!1,...r}=e,s=hs(gs,n),c=ee(n),i=a.useRef({x:0,y:0}),u=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),f=a.useRef(0),d=a.useCallback(()=>window.clearTimeout(f.current),[]),p=v=>{i.current={x:v.clientX,y:v.clientY},s.onOpenChange(!0)};return a.useEffect(()=>d,[d]),a.useEffect(()=>{o&&d()},[o,d]),l.jsxs(l.Fragment,{children:[l.jsx(Sa,{...c,virtualRef:u}),l.jsx(R.span,{"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,...r,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:y(e.onContextMenu,v=>{d(),p(v),v.preventDefault()}),onPointerDown:o?e.onPointerDown:y(e.onPointerDown,ut(v=>{d(),f.current=window.setTimeout(()=>p(v),700)})),onPointerMove:o?e.onPointerMove:y(e.onPointerMove,ut(d)),onPointerCancel:o?e.onPointerCancel:y(e.onPointerCancel,ut(d)),onPointerUp:o?e.onPointerUp:y(e.onPointerUp,ut(d))})]})});xs.displayName=gs;var $d="ContextMenuPortal",Cs=e=>{const{__scopeContextMenu:t,...n}=e,o=ee(t);return l.jsx(Ea,{...o,...n})};Cs.displayName=$d;var ws="ContextMenuContent",bs=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=hs(ws,n),s=ee(n),c=a.useRef(!1);return l.jsx(Pa,{...s,...o,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),!i.defaultPrevented&&c.current&&i.preventDefault(),c.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),!i.defaultPrevented&&!r.modal&&(c.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bs.displayName=ws;var Bd="ContextMenuGroup",Gd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Ra,{...r,...o,ref:t})});Gd.displayName=Bd;var Wd="ContextMenuLabel",Hd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(_a,{...r,...o,ref:t})});Hd.displayName=Wd;var Ud="ContextMenuItem",ys=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Ta,{...r,...o,ref:t})});ys.displayName=Ud;var Vd="ContextMenuCheckboxItem",Kd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Aa,{...r,...o,ref:t})});Kd.displayName=Vd;var zd="ContextMenuRadioGroup",Yd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Ma,{...r,...o,ref:t})});Yd.displayName=zd;var Xd="ContextMenuRadioItem",qd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Ia,{...r,...o,ref:t})});qd.displayName=Xd;var Zd="ContextMenuItemIndicator",Jd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Na,{...r,...o,ref:t})});Jd.displayName=Zd;var Qd="ContextMenuSeparator",Ss=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Da,{...r,...o,ref:t})});Ss.displayName=Qd;var ef="ContextMenuArrow",tf=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(Oa,{...r,...o,ref:t})});tf.displayName=ef;var nf="ContextMenuSubTrigger",of=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(ja,{...r,...o,ref:t})});of.displayName=nf;var rf="ContextMenuSubContent",af=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ee(n);return l.jsx(ka,{...r,...o,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});af.displayName=rf;function ut(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Sp=ms,Ep=xs,Pp=Cs,Rp=bs,_p=ys,Tp=Ss;function sf(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var Bn="ScrollArea",[Es]=Y(Bn),[cf,ie]=Es(Bn),Ps=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...c}=e,[i,u]=a.useState(null),[f,d]=a.useState(null),[p,v]=a.useState(null),[m,w]=a.useState(null),[h,g]=a.useState(null),[C,x]=a.useState(0),[b,S]=a.useState(0),[_,N]=a.useState(!1),[E,I]=a.useState(!1),M=A(t,O=>u(O)),D=Ge(r);return l.jsx(cf,{scope:n,type:o,dir:D,scrollHideDelay:s,scrollArea:i,viewport:f,onViewportChange:d,content:p,onContentChange:v,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:_,onScrollbarXEnabledChange:N,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:I,onCornerWidthChange:x,onCornerHeightChange:S,children:l.jsx(R.div,{dir:D,...c,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});Ps.displayName=Bn;var Rs="ScrollAreaViewport",_s=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,c=ie(Rs,n),i=a.useRef(null),u=A(t,i,c.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(R.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});_s.displayName=Rs;var pe="ScrollAreaScrollbar",lf=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ie(pe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=r,i=e.orientation==="horizontal";return a.useEffect(()=>(i?s(!0):c(!0),()=>{i?s(!1):c(!1)}),[i,s,c]),r.type==="hover"?l.jsx(uf,{...o,ref:t,forceMount:n}):r.type==="scroll"?l.jsx(df,{...o,ref:t,forceMount:n}):r.type==="auto"?l.jsx(Ts,{...o,ref:t,forceMount:n}):r.type==="always"?l.jsx(Gn,{...o,ref:t}):null});lf.displayName=pe;var uf=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ie(pe,e.__scopeScrollArea),[s,c]=a.useState(!1);return a.useEffect(()=>{const i=r.scrollArea;let u=0;if(i){const f=()=>{window.clearTimeout(u),c(!0)},d=()=>{u=window.setTimeout(()=>c(!1),r.scrollHideDelay)};return i.addEventListener("pointerenter",f),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),i.removeEventListener("pointerenter",f),i.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),l.jsx(W,{present:n||s,children:l.jsx(Ts,{"data-state":s?"visible":"hidden",...o,ref:t})})}),df=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ie(pe,e.__scopeScrollArea),s=e.orientation==="horizontal",c=Bt(()=>u("SCROLL_END"),100),[i,u]=sf("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(i==="idle"){const f=window.setTimeout(()=>u("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(f)}},[i,r.scrollHideDelay,u]),a.useEffect(()=>{const f=r.viewport,d=s?"scrollLeft":"scrollTop";if(f){let p=f[d];const v=()=>{const m=f[d];p!==m&&(u("SCROLL"),c()),p=m};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[r.viewport,s,u,c]),l.jsx(W,{present:n||i!=="hidden",children:l.jsx(Gn,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:y(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:y(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Ts=a.forwardRef((e,t)=>{const n=ie(pe,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,c]=a.useState(!1),i=e.orientation==="horizontal",u=Bt(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;c(i?f:d)}},10);return Fe(n.viewport,u),Fe(n.content,u),l.jsx(W,{present:o||s,children:l.jsx(Gn,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Gn=a.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ie(pe,e.__scopeScrollArea),s=a.useRef(null),c=a.useRef(0),[i,u]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=Ns(i.viewport,i.content),d={...o,sizes:i,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function p(v,m){return xf(v,c.current,i,m)}return n==="horizontal"?l.jsx(ff,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollLeft,m=fo(v,i,r.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollLeft=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollLeft=p(v,r.dir))}}):n==="vertical"?l.jsx(pf,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const v=r.viewport.scrollTop,m=fo(v,i);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{r.viewport&&(r.viewport.scrollTop=v)},onDragScroll:v=>{r.viewport&&(r.viewport.scrollTop=p(v))}}):null}),ff=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ie(pe,e.__scopeScrollArea),[c,i]=a.useState(),u=a.useRef(null),f=A(t,u,s.onScrollbarXChange);return a.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),l.jsx(Ms,{"data-orientation":"horizontal",...r,ref:f,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$t(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Os(v,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Ct(c.paddingLeft),paddingEnd:Ct(c.paddingRight)}})}})}),pf=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ie(pe,e.__scopeScrollArea),[c,i]=a.useState(),u=a.useRef(null),f=A(t,u,s.onScrollbarYChange);return a.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),l.jsx(Ms,{"data-orientation":"vertical",...r,ref:f,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$t(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(s.viewport){const v=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Os(v,p)&&d.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Ct(c.paddingTop),paddingEnd:Ct(c.paddingBottom)}})}})}),[vf,As]=Es(pe),Ms=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:i,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:d,onResize:p,...v}=e,m=ie(pe,n),[w,h]=a.useState(null),g=A(t,M=>h(M)),C=a.useRef(null),x=a.useRef(""),b=m.viewport,S=o.content-o.viewport,_=V(d),N=V(u),E=Bt(p,10);function I(M){if(C.current){const D=M.clientX-C.current.left,O=M.clientY-C.current.top;f({x:D,y:O})}}return a.useEffect(()=>{const M=D=>{const O=D.target;w?.contains(O)&&_(D,S)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[b,w,S,_]),a.useEffect(N,[o,N]),Fe(w,E),Fe(m.content,E),l.jsx(vf,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:V(s),onThumbPointerUp:V(c),onThumbPositionChange:N,onThumbPointerDown:V(i),children:l.jsx(R.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:y(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),C.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),I(M))}),onPointerMove:y(e.onPointerMove,I),onPointerUp:y(e.onPointerUp,M=>{const D=M.target;D.hasPointerCapture(M.pointerId)&&D.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),C.current=null})})})}),xt="ScrollAreaThumb",hf=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=As(xt,e.__scopeScrollArea);return l.jsx(W,{present:n||r.hasThumb,children:l.jsx(mf,{ref:t,...o})})}),mf=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ie(xt,n),c=As(xt,n),{onThumbPositionChange:i}=c,u=A(t,p=>c.onThumbChange(p)),f=a.useRef(void 0),d=Bt(()=>{f.current&&(f.current(),f.current=void 0)},100);return a.useEffect(()=>{const p=s.viewport;if(p){const v=()=>{if(d(),!f.current){const m=Cf(p,i);f.current=m,i()}};return i(),p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[s.viewport,d,i]),l.jsx(R.div,{"data-state":c.hasThumb?"visible":"hidden",...r,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:y(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),w=p.clientX-m.left,h=p.clientY-m.top;c.onThumbPointerDown({x:w,y:h})}),onPointerUp:y(e.onPointerUp,c.onThumbPointerUp)})});hf.displayName=xt;var Wn="ScrollAreaCorner",Is=a.forwardRef((e,t)=>{const n=ie(Wn,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?l.jsx(gf,{...e,ref:t}):null});Is.displayName=Wn;var gf=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ie(Wn,n),[s,c]=a.useState(0),[i,u]=a.useState(0),f=!!(s&&i);return Fe(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),u(d)}),Fe(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),c(d)}),f?l.jsx(R.div,{...o,ref:t,style:{width:s,height:i,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ct(e){return e?parseInt(e,10):0}function Ns(e,t){const n=e/t;return isNaN(n)?0:n}function $t(e){const t=Ns(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function xf(e,t,n,o="ltr"){const r=$t(n),s=r/2,c=t||s,i=r-c,u=n.scrollbar.paddingStart+c,f=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,p=o==="ltr"?[0,d]:[d*-1,0];return Ds([u,f],p)(e)}function fo(e,t,n="ltr"){const o=$t(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,c=t.content-t.viewport,i=s-o,u=n==="ltr"?[0,c]:[c*-1,0],f=rn(e,u);return Ds([0,c],[0,i])(f)}function Ds(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Os(e,t){return e>0&&e<t}var Cf=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},c=n.left!==s.left,i=n.top!==s.top;(c||i)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function Bt(e,t){const n=V(e),o=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(o.current),[]),a.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function Fe(e,t){const n=V(t);K(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var Ap=Ps,Mp=_s,Ip=Is,js="Toggle",ks=a.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o,onPressedChange:r,...s}=e,[c,i]=te({prop:n,onChange:r,defaultProp:o??!1,caller:js});return l.jsx(R.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:y(e.onClick,()=>{e.disabled||i(!c)})})});ks.displayName=js;var Se="ToggleGroup",[Ls]=Y(Se,[He]),Fs=He(),Hn=U.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return l.jsx(wf,{...r,ref:t})}if(n==="multiple"){const r=o;return l.jsx(bf,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Se}\``)});Hn.displayName=Se;var[$s,Bs]=Ls(Se),wf=U.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[c,i]=te({prop:n,defaultProp:o??"",onChange:r,caller:Se});return l.jsx($s,{scope:e.__scopeToggleGroup,type:"single",value:U.useMemo(()=>c?[c]:[],[c]),onItemActivate:i,onItemDeactivate:U.useCallback(()=>i(""),[i]),children:l.jsx(Gs,{...s,ref:t})})}),bf=U.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[c,i]=te({prop:n,defaultProp:o??[],onChange:r,caller:Se}),u=U.useCallback(d=>i((p=[])=>[...p,d]),[i]),f=U.useCallback(d=>i((p=[])=>p.filter(v=>v!==d)),[i]);return l.jsx($s,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:u,onItemDeactivate:f,children:l.jsx(Gs,{...s,ref:t})})});Hn.displayName=Se;var[yf,Sf]=Ls(Se),Gs=U.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:s,dir:c,loop:i=!0,...u}=e,f=Fs(n),d=Ge(c),p={role:"group",dir:d,...u};return l.jsx(yf,{scope:n,rovingFocus:r,disabled:o,children:r?l.jsx(Tn,{asChild:!0,...f,orientation:s,dir:d,loop:i,children:l.jsx(R.div,{...p,ref:t})}):l.jsx(R.div,{...p,ref:t})})}),wt="ToggleGroupItem",Ws=U.forwardRef((e,t)=>{const n=Bs(wt,e.__scopeToggleGroup),o=Sf(wt,e.__scopeToggleGroup),r=Fs(e.__scopeToggleGroup),s=n.value.includes(e.value),c=o.disabled||e.disabled,i={...e,pressed:s,disabled:c},u=U.useRef(null);return o.rovingFocus?l.jsx(An,{asChild:!0,...r,focusable:!c,active:s,ref:u,children:l.jsx(po,{...i,ref:t})}):l.jsx(po,{...i,ref:t})});Ws.displayName=wt;var po=U.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,s=Bs(wt,n),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?c:void 0;return l.jsx(ks,{...i,...r,ref:t,onPressedChange:u=>{u?s.onItemActivate(o):s.onItemDeactivate(o)}})}),Np=Hn,Dp=Ws,Gt="Switch",[Ef]=Y(Gt),[Pf,Rf]=Ef(Gt),Hs=a.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:c,disabled:i,value:u="on",onCheckedChange:f,form:d,...p}=e,[v,m]=a.useState(null),w=A(t,b=>m(b)),h=a.useRef(!1),g=v?d||!!v.closest("form"):!0,[C,x]=te({prop:r,defaultProp:s??!1,onChange:f,caller:Gt});return l.jsxs(Pf,{scope:n,checked:C,disabled:i,children:[l.jsx(R.button,{type:"button",role:"switch","aria-checked":C,"aria-required":c,"data-state":zs(C),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:w,onClick:y(e.onClick,b=>{x(S=>!S),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&l.jsx(Ks,{control:v,bubbles:!h.current,name:o,value:u,checked:C,required:c,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Hs.displayName=Gt;var Us="SwitchThumb",Vs=a.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Rf(Us,n);return l.jsx(R.span,{"data-state":zs(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});Vs.displayName=Us;var _f="SwitchBubbleInput",Ks=a.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const c=a.useRef(null),i=A(c,s),u=En(n),f=bn(t);return a.useEffect(()=>{const d=c.current;if(!d)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&m){const w=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(w)}},[u,n,o]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:i,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ks.displayName=_f;function zs(e){return e?"checked":"unchecked"}var Op=Hs,jp=Vs,Wt="Tabs",[Tf]=Y(Wt,[He]),Ys=He(),[Af,Un]=Tf(Wt),Xs=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:c="horizontal",dir:i,activationMode:u="automatic",...f}=e,d=Ge(i),[p,v]=te({prop:o,onChange:r,defaultProp:s??"",caller:Wt});return l.jsx(Af,{scope:n,baseId:oe(),value:p,onValueChange:v,orientation:c,dir:d,activationMode:u,children:l.jsx(R.div,{dir:d,"data-orientation":c,...f,ref:t})})});Xs.displayName=Wt;var qs="TabsList",Zs=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=Un(qs,n),c=Ys(n);return l.jsx(Tn,{asChild:!0,...c,orientation:s.orientation,dir:s.dir,loop:o,children:l.jsx(R.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});Zs.displayName=qs;var Js="TabsTrigger",Qs=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,c=Un(Js,n),i=Ys(n),u=nc(c.baseId,o),f=oc(c.baseId,o),d=o===c.value;return l.jsx(An,{asChild:!0,...i,focusable:!r,active:d,children:l.jsx(R.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":f,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...s,ref:t,onMouseDown:y(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?c.onValueChange(o):p.preventDefault()}),onKeyDown:y(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&c.onValueChange(o)}),onFocus:y(e.onFocus,()=>{const p=c.activationMode!=="manual";!d&&!r&&p&&c.onValueChange(o)})})})});Qs.displayName=Js;var ec="TabsContent",tc=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...c}=e,i=Un(ec,n),u=nc(i.baseId,o),f=oc(i.baseId,o),d=o===i.value,p=a.useRef(d);return a.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(W,{present:r||d,children:({present:v})=>l.jsx(R.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:f,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&s})})});tc.displayName=ec;function nc(e,t){return`${e}-trigger-${t}`}function oc(e,t){return`${e}-content-${t}`}var kp=Xs,Lp=Zs,Fp=Qs,$p=tc,Ht="Collapsible",[Mf]=Y(Ht),[If,Vn]=Mf(Ht),rc=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:c,...i}=e,[u,f]=te({prop:o,defaultProp:r??!1,onChange:c,caller:Ht});return l.jsx(If,{scope:n,disabled:s,contentId:oe(),open:u,onOpenToggle:a.useCallback(()=>f(d=>!d),[f]),children:l.jsx(R.div,{"data-state":zn(u),"data-disabled":s?"":void 0,...i,ref:t})})});rc.displayName=Ht;var ac="CollapsibleTrigger",sc=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=Vn(ac,n);return l.jsx(R.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":zn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:y(e.onClick,r.onOpenToggle)})});sc.displayName=ac;var Kn="CollapsibleContent",cc=a.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Vn(Kn,e.__scopeCollapsible);return l.jsx(W,{present:n||r.open,children:({present:s})=>l.jsx(Nf,{...o,ref:t,present:s})})});cc.displayName=Kn;var Nf=a.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,c=Vn(Kn,n),[i,u]=a.useState(o),f=a.useRef(null),d=A(t,f),p=a.useRef(0),v=p.current,m=a.useRef(0),w=m.current,h=c.open||i,g=a.useRef(h),C=a.useRef(void 0);return a.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),K(()=>{const x=f.current;if(x){C.current=C.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();p.current=b.height,m.current=b.width,g.current||(x.style.transitionDuration=C.current.transitionDuration,x.style.animationName=C.current.animationName),u(o)}},[c.open,o]),l.jsx(R.div,{"data-state":zn(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:h&&r})});function zn(e){return e?"open":"closed"}var Bp=rc,Gp=sc,Wp=cc;export{qe as $,vp as A,jf as B,pp as C,sl as D,tl as E,kf as F,Lf as G,Ff as H,_p as I,Bf as J,$f as K,Gf as L,Wf as M,Hf as N,ol as O,fp as P,Uf as Q,up as R,lf as S,dp as T,Kf as U,Mp as V,Vf as W,zf as X,Yf as Y,oe as Z,R as _,lp as a,Xf as a0,qf as a1,Jf as a2,Qf as a3,Zf as a4,eu as a5,tu as a6,tp as a7,np as a8,op as a9,rp as aa,sp as ab,ap as ac,cp as ad,Op as ae,jp as af,kp as ag,Lp as ah,Fp as ai,$p as aj,Bp as ak,Gp as al,Wp as am,te as an,el as b,rl as c,Ko as d,al as e,nl as f,hp as g,xp as h,bp as i,l as j,yp as k,wp as l,Cp as m,mp as n,gp as o,Ap as p,Ip as q,hf as r,ip as s,Sp as t,Ep as u,Pp as v,Rp as w,Tp as x,Np as y,Dp as z};
@@ -1 +0,0 @@
1
- import{s as r,b as e,a,S as i}from"./chunk-DI55MBZ5-CnVVpZE-.js";import{_ as o}from"./mermaid.core-Bl5zWzZD.js";import"./chunk-55IACEB6-BDNKe4fa.js";import"./chunk-QN33PNHL-bn39U0qP.js";import"./monaco-editor-BMj4E99D.js";import"./icons-cLYU3CQS.js";import"./mermaid-VLURNSYL-F8q0N6Y-.js";import"./radix-ui-BypjIQUF.js";import"./react-dom-BWKcCUTe.js";import"./tanstack-I4NcPTsd.js";import"./index-DM_G5wVs.js";import"./scroll-area-BZeWiQjX.js";import"./index-ejQaUr38.js";import"./_pathlessLayout-C3BlW5Hc.js";import"./queries.store-KdEzteJi.js";var A={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{A as diagram};