db-studio 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +75 -75
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/{_pathlessLayout-aKKQKRJX.js → _pathlessLayout-CUDS1e28.js} +1 -1
- package/dist/web-dist/assets/_pathlessLayout-WZkezfN7.js +2 -0
- package/dist/web-dist/assets/{_queryId-DnPgn-AJ.js → _queryId-CEJb62Vl.js} +1 -1
- package/dist/web-dist/assets/{_table-DIbpzW3q.js → _table-6SZEx92j.js} +1 -1
- package/dist/web-dist/assets/_table-BUNHOVIK.js +1 -0
- package/dist/web-dist/assets/_table-CwyP_2EP.js +1 -0
- package/dist/web-dist/assets/{abap-DQayJW6v.js → abap-B-HzHdT_.js} +1 -1
- package/dist/web-dist/assets/{apex-Djzlm7in.js → apex-t5VcK3BF.js} +1 -1
- package/dist/web-dist/assets/{azcli-Bbikkqe4.js → azcli-Ce3iuV2p.js} +1 -1
- package/dist/web-dist/assets/{badge-HtbO9hWg.js → badge-COF6gx-2.js} +1 -1
- package/dist/web-dist/assets/{bat-BUFda2RT.js → bat-bOBZcLbK.js} +1 -1
- package/dist/web-dist/assets/{bicep-CuUgDHWX.js → bicep-TSicgsnM.js} +1 -1
- package/dist/web-dist/assets/{browser-B6gU7HWo.js → browser-B-fV6CZb.js} +1 -1
- package/dist/web-dist/assets/{bundle-mjs-DEMZsBkP.js → bundle-mjs-CZwf2xtr.js} +1 -1
- package/dist/web-dist/assets/{cameligo-DITobApP.js → cameligo-D-9xpPXV.js} +1 -1
- package/dist/web-dist/assets/{chat-sidebar-Cr2fVFDF.js → chat-sidebar-DwzCElBd.js} +5 -5
- package/dist/web-dist/assets/{clojure-DTFcSI8F.js → clojure-9X3x3csE.js} +1 -1
- package/dist/web-dist/assets/{code-editor-BpsclD2u.js → code-editor-tPwHd3zF.js} +4 -4
- package/dist/web-dist/assets/{coffee-CmIRg0oP.js → coffee-anOch8Z-.js} +1 -1
- package/dist/web-dist/assets/{connect-BM4hZPnz.js → connect-l3LjAClZ.js} +1 -1
- package/dist/web-dist/assets/{constants-BBxXyYPa.js → constants-CKAehpPm.js} +3 -3
- package/dist/web-dist/assets/{cpp-BwBWpZT1.js → cpp-oW293AoF.js} +1 -1
- package/dist/web-dist/assets/{csharp-BnWK75m3.js → csharp-BOXMgm5k.js} +1 -1
- package/dist/web-dist/assets/{csp-Dohj3XYI.js → csp-D67JhNKT.js} +1 -1
- package/dist/web-dist/assets/{css-DN4GbnxY.js → css-Bk6H7_K_.js} +1 -1
- package/dist/web-dist/assets/{cssMode-CiAtMuTk.js → cssMode-G6latsS7.js} +1 -1
- package/dist/web-dist/assets/{cypher-CKAK8eD4.js → cypher-DB0LBjic.js} +1 -1
- package/dist/web-dist/assets/{dart-imWXBTLy.js → dart-CS3MbwLP.js} +1 -1
- package/dist/web-dist/assets/{database.store-73Wsz2L5.js → database.store-BuqVJMY6.js} +7 -7
- package/dist/web-dist/assets/{dist-DwRWhVwY.js → dist-Bz0qAN0x.js} +1 -1
- package/dist/web-dist/assets/{dist-D4HUXaJv.js → dist-Cf0L32Jd.js} +1 -1
- package/dist/web-dist/assets/{dockerfile-CXOK4zpC.js → dockerfile-BGz3qsmk.js} +1 -1
- package/dist/web-dist/assets/{ecl-lOrW9o9k.js → ecl-lt3qcklx.js} +1 -1
- package/dist/web-dist/assets/{editor.api-DSevzNN8.js → editor.api-BTIrAcm5.js} +1 -1
- package/dist/web-dist/assets/{elixir-DgvzEwPU.js → elixir-cMyUafed.js} +1 -1
- package/dist/web-dist/assets/{esm-DC8GK2En.js → esm-B-4Q6MuQ.js} +1 -1
- package/dist/web-dist/assets/{flow9-l3BJy5NQ.js → flow9-BI9V6TuS.js} +1 -1
- package/dist/web-dist/assets/{format-cell-value-CuhjnBNV.js → format-cell-value-CgUtYv8B.js} +1 -1
- package/dist/web-dist/assets/{freemarker2-73G2DeCz.js → freemarker2-mnCFA3xV.js} +1 -1
- package/dist/web-dist/assets/{fsharp-sfou20I_.js → fsharp-I1kqnt0E.js} +1 -1
- package/dist/web-dist/assets/{go-DnjkNg4Q.js → go-Cg4qMFVj.js} +1 -1
- package/dist/web-dist/assets/{graphql-BJFXvNDL.js → graphql-CvtHcP49.js} +1 -1
- package/dist/web-dist/assets/{handlebars-DXg2L0KG.js → handlebars-BUcE6Uyy.js} +1 -1
- package/dist/web-dist/assets/{hcl-B4FYtDde.js → hcl-BkvCdKNu.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-t8UIAZOZ.js +1 -0
- package/dist/web-dist/assets/{html-BvAUQUXw.js → html-BBqcfykD.js} +1 -1
- package/dist/web-dist/assets/{htmlMode-hZ3EloXT.js → htmlMode-D8je66Rk.js} +1 -1
- package/dist/web-dist/assets/icons-DxFtdMXW.js +1 -0
- package/dist/web-dist/assets/index-QVi4Lb9U.css +2 -0
- package/dist/web-dist/assets/index-WFVurGCI.js +34 -0
- package/dist/web-dist/assets/{indexes-BYqaS45O.js → indexes-C3Qddb5L.js} +1 -1
- package/dist/web-dist/assets/{ini-H3EW14Oa.js → ini-CPc8BCWu.js} +1 -1
- package/dist/web-dist/assets/{java-Cu5qHMXc.js → java-C9Yie4SH.js} +1 -1
- package/dist/web-dist/assets/{javascript-bJHYh6Or.js → javascript-CuGq5ydO.js} +1 -1
- package/dist/web-dist/assets/{json-editor-ZcSS1MRc.js → json-editor-Dc1E8Fc-.js} +1 -1
- package/dist/web-dist/assets/{jsonMode-CDMOUPss.js → jsonMode-BgdTmYik.js} +1 -1
- package/dist/web-dist/assets/{julia-CZ0npMib.js → julia--qJGRfN8.js} +1 -1
- package/dist/web-dist/assets/{keys-By5o7bPm.js → keys-Bs0DRbCB.js} +1 -1
- package/dist/web-dist/assets/{kotlin-BpW0qHIt.js → kotlin-C3MSe-0N.js} +1 -1
- package/dist/web-dist/assets/{label-C93T1BbF.js → label-DzHJlGAx.js} +1 -1
- package/dist/web-dist/assets/{less-DTBM-Kxp.js → less-DOBYgWSY.js} +1 -1
- package/dist/web-dist/assets/{lexon-CLOvNp8v.js → lexon-Djd2rGvJ.js} +1 -1
- package/dist/web-dist/assets/{liquid-IpfBCIUY.js → liquid-DXfHmR66.js} +1 -1
- package/dist/web-dist/assets/{logs-CnLvqVtL.js → logs-BortjBc-.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-CnYZSn_O.js → lspLanguageFeatures-C7-iyD6G.js} +1 -1
- package/dist/web-dist/assets/{lua-BERpVknn.js → lua-Ck8vNcPw.js} +1 -1
- package/dist/web-dist/assets/{m3-B_gILjHh.js → m3-a6Kl4TV0.js} +1 -1
- package/dist/web-dist/assets/{markdown-DamaZSqy.js → markdown-DkcRBwO0.js} +1 -1
- package/dist/web-dist/assets/{mdx-BTw_ghf-.js → mdx-QI5o45qz.js} +1 -1
- package/dist/web-dist/assets/{mermaid-GHXKKRXX-B7fOqMvZ.js → mermaid-GHXKKRXX-D35eppUc.js} +1 -1
- package/dist/web-dist/assets/{middleware-DKaxoFZs.js → middleware-CXk7SlTF.js} +1 -1
- package/dist/web-dist/assets/{mips-BkjI-_01.js → mips-Cc1YVI2p.js} +1 -1
- package/dist/web-dist/assets/{module-BbdCXsK0.js → module-D_kjbMCc.js} +1 -1
- package/dist/web-dist/assets/{monaco-theme-DkPj5STI.js → monaco-theme-C2k_taVU.js} +4 -4
- package/dist/web-dist/assets/{msdax-5OSOIuww.js → msdax-Bh41xUoQ.js} +1 -1
- package/dist/web-dist/assets/{mysql-CMtxQW5J.js → mysql-BZTZMxPa.js} +1 -1
- package/dist/web-dist/assets/{objective-c-CoW52So-.js → objective-c-CxZIMOHQ.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-BL-3zX6X.js → overlay.store-DsUdwZjE.js} +1 -1
- package/dist/web-dist/assets/{pascal-BxyU4sPJ.js → pascal-I-WmLkmD.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-C63_040U.js → pascaligo-DEZ-6bwf.js} +1 -1
- package/dist/web-dist/assets/{perl-ayfptt23.js → perl-DfeHQJxJ.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-BIr71Re8.js → personal-preferences.store-DXSnKmVN.js} +1 -1
- package/dist/web-dist/assets/{pgsql-CPGqMVI3.js → pgsql-OdOoQYPW.js} +1 -1
- package/dist/web-dist/assets/{php-DA-YJ6wI.js → php-CF1bUutw.js} +1 -1
- package/dist/web-dist/assets/{pla-DesDCKWW.js → pla-BHZr0GrY.js} +1 -1
- package/dist/web-dist/assets/{postiats-B8yhii_n.js → postiats-BSB6a63H.js} +1 -1
- package/dist/web-dist/assets/{powerquery-CG8tCOct.js → powerquery-Bu0p84Ye.js} +1 -1
- package/dist/web-dist/assets/{powershell-C68aZHza.js → powershell-Dcq3YM6T.js} +1 -1
- package/dist/web-dist/assets/{preload-helper-DZhPwQp1.js → preload-helper-DF7hIgef.js} +1 -1
- package/dist/web-dist/assets/{protobuf-OaVxpJrs.js → protobuf-CsWrQxqX.js} +1 -1
- package/dist/web-dist/assets/{pug-0lOSC2rA.js → pug-DLQiv3Bp.js} +1 -1
- package/dist/web-dist/assets/{python-C8ab8TeJ.js → python-BvKEpyP9.js} +1 -1
- package/dist/web-dist/assets/{qsharp-BmHeDwNl.js → qsharp-D8nrRUNu.js} +1 -1
- package/dist/web-dist/assets/{queries.store-Dwdw-Gej.js → queries.store-BaeyNA64.js} +1 -1
- package/dist/web-dist/assets/query-runner-f473QQSD.js +17 -0
- package/dist/web-dist/assets/{r-DoHxhOJg.js → r-xhyKpGTk.js} +1 -1
- package/dist/web-dist/assets/{radix-ui-ByvuE8TW.js → radix-ui-CxCv--D1.js} +2 -2
- package/dist/web-dist/assets/{razor-DynaHCXX.js → razor-Ceb9S1Rz.js} +1 -1
- package/dist/web-dist/assets/react-DEQ0BgTL.js +1 -0
- package/dist/web-dist/assets/{react-dom-DQQG0g0D.js → react-dom-ITw3Lqwx.js} +1 -1
- package/dist/web-dist/assets/{redis-CSL-jfR-.js → redis-BnpkEvbr.js} +1 -1
- package/dist/web-dist/assets/redis-value-DMk0-Zuc.js +1 -0
- package/dist/web-dist/assets/{redshift-Cb-LWZ8f.js → redshift-BpxVXjAI.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-DTqnvYsu.js → restructuredtext-5afXtW7D.js} +1 -1
- package/dist/web-dist/assets/{rolldown-runtime-0wqQW3ea.js → rolldown-runtime-fzu9RN21.js} +1 -1
- package/dist/web-dist/assets/{ruby-DbgDuslH.js → ruby-CHaoWUHT.js} +1 -1
- package/dist/web-dist/assets/{runner-DFzqBXp0.js → runner-NsYjzIZs.js} +1 -1
- package/dist/web-dist/assets/{rust-CWzrsIL_.js → rust-Bw0WVsLy.js} +1 -1
- package/dist/web-dist/assets/{sb-BghszYt-.js → sb-CEjXmIyG.js} +1 -1
- package/dist/web-dist/assets/{scala-Cw9RU1Qz.js → scala-BuaCSaU6.js} +1 -1
- package/dist/web-dist/assets/{schema-B_EtHxTf.js → schema-CE1yGygf.js} +1 -1
- package/dist/web-dist/assets/{schema-iTfBKwXl.js → schema-rxLBue8Q.js} +1 -1
- package/dist/web-dist/assets/{scheme-DeYmvmAH.js → scheme-DIKzlmFG.js} +1 -1
- package/dist/web-dist/assets/{scss-D_S6B2H1.js → scss-C2_UsWzg.js} +1 -1
- package/dist/web-dist/assets/{select-DU0HoKZ4.js → select-C-nrz7Tx.js} +1 -1
- package/dist/web-dist/assets/{separator-CZgXYjVQ.js → separator-DnB61XAO.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-KvxY47ZZ.js → sheet-sidebar-BGxJGRbd.js} +1 -1
- package/dist/web-dist/assets/{shell-B59ItoUV.js → shell-2aEL2EVH.js} +1 -1
- package/dist/web-dist/assets/{solidity-De0h6YhL.js → solidity-D-5XfYE1.js} +1 -1
- package/dist/web-dist/assets/{sophia-DWmKHYE0.js → sophia-s4MFSvUF.js} +1 -1
- package/dist/web-dist/assets/{sparql-0sKQlAae.js → sparql-Dkv46wS5.js} +1 -1
- package/dist/web-dist/assets/{spinner-FJ-tXoFX.js → spinner-CNnB5r0X.js} +1 -1
- package/dist/web-dist/assets/{sql-Cafrv7gm.js → sql-Dz9Xhs8s.js} +1 -1
- package/dist/web-dist/assets/{st-qkFqcB41.js → st-Cbo0XVmr.js} +1 -1
- package/dist/web-dist/assets/{swift-CDPKFfVs.js → swift-B66X97nW.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-rjtBmhAJ.js → systemverilog-gGKga8Gf.js} +1 -1
- package/dist/web-dist/assets/{table-DmoKTp5U.js → table-C8WK3uAc.js} +1 -1
- package/dist/web-dist/assets/tables-D98Kbmcb.js +16 -0
- package/dist/web-dist/assets/{tanstack-Cb7WFPRi.js → tanstack-RwHFfmqj.js} +4 -4
- package/dist/web-dist/assets/{tcl-C0NrUCCP.js → tcl-BtbeJsUN.js} +1 -1
- package/dist/web-dist/assets/{tsMode-C2yuf0pi.js → tsMode-BgtcNcpl.js} +1 -1
- package/dist/web-dist/assets/{twig-RBrBABOf.js → twig-0_nXiuYs.js} +1 -1
- package/dist/web-dist/assets/{typescript-DWkZjHjp.js → typescript-Cy_CzC_-.js} +1 -1
- package/dist/web-dist/assets/{typespec-DfQiGud4.js → typespec-DBO6_WMJ.js} +1 -1
- package/dist/web-dist/assets/{use-database-engine-Mwmv8X7V.js → use-database-engine-DZZj7-4J.js} +1 -1
- package/dist/web-dist/assets/{use-theme-BLw5dtZV.js → use-theme-DBhPknw6.js} +1 -1
- package/dist/web-dist/assets/{utils-awMbhLwX.js → utils-EJLOIroS.js} +1 -1
- package/dist/web-dist/assets/{vb-BslxQW9i.js → vb-DFJjBsW2.js} +1 -1
- package/dist/web-dist/assets/{visualizer-LoD_yU5U.js → visualizer-CgYlDJ_-.js} +1 -1
- package/dist/web-dist/assets/{vscode-Ba8jYSS7.js → vscode-wuSgCuZI.js} +1 -1
- package/dist/web-dist/assets/{wgsl-Bq67ZIFU.js → wgsl-U3RBM2M0.js} +1 -1
- package/dist/web-dist/assets/{workers-rMl5Xrk2.js → workers-ClRH6A2w.js} +1 -1
- package/dist/web-dist/assets/{xml-PfDqoe6w.js → xml-D11j3J2_.js} +1 -1
- package/dist/web-dist/assets/{yaml-CIuY3cB5.js → yaml-D7Z_4mnx.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +1 -1
- package/dist/web-dist/assets/_pathlessLayout-s6cwJxH6.js +0 -2
- package/dist/web-dist/assets/_table-Bgt0zJ9m.js +0 -1
- package/dist/web-dist/assets/_table-CU8PHZQE.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-Bi4CQl8I.js +0 -1
- package/dist/web-dist/assets/icons-CheF8KGp.js +0 -1
- package/dist/web-dist/assets/index-YCx2RIFq.js +0 -34
- package/dist/web-dist/assets/index-mbFBVmHb.css +0 -2
- package/dist/web-dist/assets/query-runner-C430BH5I.js +0 -17
- package/dist/web-dist/assets/react-CKF1H7h0.js +0 -1
- package/dist/web-dist/assets/redis-value-Bf0tOet0.js +0 -1
- package/dist/web-dist/assets/tables-By-PTDwU.js +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as lo,t as zt}from"./rolldown-runtime-0wqQW3ea.js";import{It as uo}from"./icons-CheF8KGp.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e1130cf5-1b8f-47dd-b377-81f364042435",e._sentryDebugIdIdentifier="sentry-dbid-e1130cf5-1b8f-47dd-b377-81f364042435")}catch{}})();var Pc=zt((e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:t,type:o,key:c,ref:a!==void 0?a:null,props:i}}e.Fragment=n,e.jsx=r,e.jsxs=r})),_c=zt(((e,t)=>{t.exports=Pc()})),Tc=zt((e=>{var t=uo();function n(d){var l="https://react.dev/errors/"+d;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+d+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:d,containerInfo:l,implementation:f}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,l){if(d==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(d,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(n(299));return i(d,l,null,f)},e.flushSync=function(d){var l=c.T,f=o.p;try{if(c.T=null,o.p=2,d)return d()}finally{c.T=l,o.p=f,o.d.f()}},e.preconnect=function(d,l){typeof d=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,o.d.C(d,l))},e.prefetchDNS=function(d){typeof d=="string"&&o.d.D(d)},e.preinit=function(d,l){if(typeof d=="string"&&l&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin),m=typeof l.integrity=="string"?l.integrity:void 0,x=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;f==="style"?o.d.S(d,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:v,integrity:m,fetchPriority:x}):f==="script"&&o.d.X(d,{crossOrigin:v,integrity:m,fetchPriority:x,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},e.preinitModule=function(d,l){if(typeof d=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var f=u(l.as,l.crossOrigin);o.d.M(d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l??o.d.M(d)},e.preload=function(d,l){if(typeof d=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin);o.d.L(d,f,{crossOrigin:v,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},e.preloadModule=function(d,l){if(typeof d=="string")if(l){var f=u(l.as,l.crossOrigin);o.d.m(d,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else o.d.m(d)},e.requestFormReset=function(d){o.d.r(d)},e.unstable_batchedUpdates=function(d,l){return d(l)},e.useFormState=function(d,l,f){return c.H.useFormState(d,l,f)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.5"})),Ac=zt(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}n(),t.exports=Tc()})),s=lo(uo(),1),Hv=!!(typeof window<"u"&&window.document&&window.document.createElement);function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Dr(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Dr(e[o],null)}}}}function D(...e){return s.useCallback(ft(...e),e)}var p=_c();function Mc(e,t){const n=s.createContext(t),r=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return(0,p.jsx)(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function q(e,t=[]){let n=[];function r(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:v,children:m,...x}=f,h=v?.[e]?.[u]||c,g=s.useMemo(()=>x,Object.values(x));return(0,p.jsx)(h.Provider,{value:g,children:m})};d.displayName=a+"Provider";function l(f,v){const m=v?.[e]?.[u]||c,x=s.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,l]}const o=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Oc(o,...t)]}function Oc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const l=u(a)[`__scope${d}`];return{...c,...l}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var pt=lo(Ac(),1);function ke(e){const t=Nc(e),n=s.forwardRef((r,o)=>{const{children:a,...i}=r,c=s.Children.toArray(a),u=c.find(Ic);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Nc(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const i=jc(o),c=Dc(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fo=Symbol("radix.slottable");function po(e){const t=({children:n})=>(0,p.jsx)(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=fo,t}function Ic(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fo}function Dc(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jc(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 T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=ke(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vo(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}function K(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function Lc(e,t=globalThis?.document){const n=K(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kc="DismissableLayer",Dn="dismissableLayer.update",Fc="dismissableLayer.pointerDownOutside",$c="dismissableLayer.focusOutside",jr,ho=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(ho),[l,f]=s.useState(null),v=l?.ownerDocument??globalThis?.document,[,m]=s.useState({}),x=D(t,E=>f(E)),h=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),w=l?h.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,P=Hc(E=>{const M=E.target,A=[...d.branches].some(O=>O.contains(M));!b||A||(o?.(E),i?.(E),E.defaultPrevented||c?.())},v),R=Gc(E=>{const M=E.target;[...d.branches].some(A=>A.contains(M))||(a?.(E),i?.(E),E.defaultPrevented||c?.())},v);return Lc(E=>{w===d.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),s.useEffect(()=>{if(l)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),Lr(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jr)}},[l,v,n,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),Lr())},[l,d]),s.useEffect(()=>{const E=()=>m({});return document.addEventListener(Dn,E),()=>document.removeEventListener(Dn,E)},[]),(0,p.jsx)(T.div,{...u,ref:x,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,R.onFocusCapture),onBlurCapture:S(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,P.onPointerDownCapture)})});Qe.displayName=kc;var Bc="DismissableLayerBranch",Wc=s.forwardRef((e,t)=>{const n=s.useContext(ho),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,p.jsx)(T.div,{...e,ref:o})});Wc.displayName=Bc;function Hc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let u=function(){mo(Fc,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&mo($c,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lr(){const e=new CustomEvent(Dn);document.dispatchEvent(e)}function mo(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vo(o,a):o.dispatchEvent(a)}var Y=globalThis?.document?s.useLayoutEffect:()=>{},Uc=s[" useId ".trim().toString()]||(()=>{}),Vc=0;function re(e){const[t,n]=s.useState(Uc());return Y(()=>{e||n(r=>r??String(Vc++))},[e]),e||(t?`radix-${t}`:"")}var Kc=["top","right","bottom","left"],Te=Math.min,se=Math.max,jt=Math.round,Rt=Math.floor,xe=e=>({x:e,y:e}),zc={left:"right",right:"left",bottom:"top",top:"bottom"};function jn(e,t,n){return se(e,Te(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(ge(e))}function Yc(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Zn(e),a=qn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lt(i)),[i,Lt(i)]}function Xc(e){const t=Lt(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var kr=["left","right"],Fr=["right","left"],qc=["top","bottom"],Zc=["bottom","top"];function Qc(e,t,n){switch(e){case"top":case"bottom":return n?t?Fr:kr:t?kr:Fr;case"left":case"right":return t?qc:Zc;default:return[]}}function Jc(e,t,n,r){const o=Je(e);let a=Qc(Se(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Ln)))),a}function Lt(e){const t=Se(e);return zc[t]+e.slice(t.length)}function el(e){return{top:0,right:0,bottom:0,left:0,...e}}function go(e){return typeof e!="number"?el(e):{top:e,right:e,bottom:e,left:e}}function kt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $r(e,t,n){let{reference:r,floating:o}=e;const a=ge(t),i=Zn(t),c=qn(i),u=Se(t),d=a==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,v=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:l,y:r.y-o.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Je(t)){case"start":m[i]-=v*(n&&d?-1:1);break;case"end":m[i]+=v*(n&&d?-1:1)}return m}async function tl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:v=!1,padding:m=0}=be(t,e),x=go(m),h=c[v?f==="floating"?"reference":"floating":f],g=kt(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},b=kt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:w,strategy:u}):y);return{top:(g.top-b.top+x.top)/C.y,bottom:(b.bottom-g.bottom+x.bottom)/C.y,left:(g.left-b.left+x.left)/C.x,right:(b.right-g.right+x.right)/C.x}}var nl=50,rl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:tl},u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=$r(d,r,u),v=r,m=0;const x={};for(let h=0;h<a.length;h++){const g=a[h];if(!g)continue;const{name:y,fn:w}=g,{x:C,y:b,data:P,reset:R}=await w({x:l,y:f,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:d,platform:c,elements:{reference:e,floating:t}});l=C??l,f=b??f,x[y]={...x[y],...P},R&&m<nl&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:l,y:f}=$r(d,v,u)),h=-1)}return{x:l,y:f,placement:v,strategy:o,middlewareData:x}},ol=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:l=0}=be(e,t)||{};if(d==null)return{};const f=go(l),v={x:n,y:r},m=Zn(o),x=qn(m),h=await i.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=a.reference[x]+a.reference[m]-v[m]-a.floating[x],P=v[m]-a.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=R?R[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=c.floating[C]||a.floating[x]);const M=b/2-P/2,A=E/2-h[x]/2-1,O=Te(f[y],A),j=Te(f[w],A),L=O,W=E-h[x]-j,F=E/2-h[x]/2+M,H=jn(L,F,W),k=!u.arrow&&Je(o)!=null&&F!==H&&a.reference[x]/2-(F<L?O:j)-h[x]/2<0,$=k?F<L?F-L:F-W:0;return{[m]:v[m]+$,data:{[m]:H,centerOffset:F-H-$,...k&&{alignmentOffset:$}},reset:k}}}),al=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=be(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(o),w=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=v||(C||!h?[Lt(c)]:Xc(c)),R=x!=="none";!v&&R&&P.push(...Jc(c,h,x,b));const E=[c,...P],M=await u.detectOverflow(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(l&&A.push(M[y]),f){const F=Yc(o,i,b);A.push(M[F[0]],M[F[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(F=>F<=0)){var j,L;const F=(((j=a.flip)==null?void 0:j.index)||0)+1,H=E[F];if(H&&(!(f==="alignment"&&w!==ge(H))||O.every($=>ge($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:H}};let k=(L=O.filter($=>$.overflows[0]<=0).sort(($,I)=>$.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!k)switch(m){case"bestFit":{var W;const $=(W=O.filter(I=>{if(R){const _=ge(I.placement);return _===w||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=c}if(o!==k)return{reset:{placement:k}}}return{}}}};function Br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wr(e){return Kc.some(t=>e[t]>=0)}var sl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=be(e,t);switch(o){case"referenceHidden":{const i=Br(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wr(i)}}}case"escaped":{const i=Br(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:Wr(i)}}}default:return{}}}}},xo=new Set(["left","top"]);async function il(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Se(n),c=Je(n),u=ge(n)==="y",d=xo.has(i)?-1:1,l=a&&u?-1:1,f=be(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof x=="number"&&(m=c==="end"?x*-1:x),u?{x:m*l,y:v*d}:{x:v*d,y:m*l}}var cl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,u=await il(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},ll=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...d}=be(e,t),l={x:n,y:r},f=await a.detectOverflow(t,d),v=ge(Se(o)),m=Xn(v);let x=l[m],h=l[v];if(i){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=x+f[y],b=x-f[w];x=jn(C,x,b)}if(c){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",C=h+f[y],b=h-f[w];h=jn(C,h,b)}const g=u.fn({...t,[m]:x,[v]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[v]:c}}}}}},ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=be(e,t),l={x:n,y:r},f=ge(o),v=Xn(f);let m=l[v],x=l[f];const h=be(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=v==="y"?"height":"width",b=a.reference[v]-a.floating[C]+g.mainAxis,P=a.reference[v]+a.reference[C]-g.mainAxis;m<b?m=b:m>P&&(m=P)}if(d){var y,w;const C=v==="y"?"width":"height",b=xo.has(Se(o)),P=a.reference[f]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),R=a.reference[f]+a.reference[C]+(b?0:((w=i.offset)==null?void 0:w[f])||0)-(b?g.crossAxis:0);x<P?x=P:x>R&&(x=R)}return{[v]:m,[f]:x}}}},dl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=be(e,t),l=await i.detectOverflow(t,d),f=Se(o),v=Je(o),m=ge(o)==="y",{width:x,height:h}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=v==="end"?"top":"bottom");const w=h-l.top-l.bottom,C=x-l.left-l.right,b=Te(h-l[g],w),P=Te(x-l[y],C),R=!t.middlewareData.shift;let E=b,M=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),R&&!v){const O=se(l.left,0),j=se(l.right,0),L=se(l.top,0),W=se(l.bottom,0);m?M=x-2*(O!==0||j!==0?O+j:se(l.left,l.right)):E=h-2*(L!==0||W!==0?L+W:se(l.top,l.bottom))}await u({...t,availableWidth:M,availableHeight:E});const A=await i.getDimensions(c.floating);return x!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function et(e){return wo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(wo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wo(e){return Yt()?e instanceof Node||e instanceof ie(e).Node:!1}function fe(e){return Yt()?e instanceof Element||e instanceof ie(e).Element:!1}function Ee(e){return Yt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Hr(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function vt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function fl(e){return/^(table|td|th)$/.test(et(e))}function Xt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var pl=/transform|translate|scale|rotate|perspective|filter/,vl=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none",Sn;function Qn(e){const t=fe(e)?pe(e):e;return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!Jn()&&(Le(t.backdropFilter)||Le(t.filter))||pl.test(t.willChange||"")||vl.test(t.contain||"")}function hl(e){let t=Ae(e);for(;Ee(t)&&!Ye(t);){if(Qn(t))return t;if(Xt(t))return null;t=Ae(t)}return null}function Jn(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function Ye(e){return/^(html|body|#document)$/.test(et(e))}function pe(e){return ie(e).getComputedStyle(e)}function qt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||we(e);return Hr(t)?t.host:t}function yo(e){const t=Ae(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&vt(t)?t:yo(t)}function ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yo(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(a){const c=kn(i);return t.concat(i,i.visualViewport||[],vt(o)?o:[],c&&n?ct(c):[])}else return t.concat(o,ct(o,[],n))}function kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Co(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=jt(n)!==a||jt(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function er(e){return fe(e)?e:e.contextElement}function Ke(e){const t=er(e);if(!Ee(t))return xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Co(t);let i=(a?jt(n.width):n.width)/r,c=(a?jt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var ml=xe(0);function bo(e){const t=ie(e);return!Jn()||!t.visualViewport?ml:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=er(e);let i=xe(1);t&&(r?fe(r)&&(i=Ke(r)):i=Ke(e));const c=gl(a,n,r)?bo(a):xe(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(a){const v=ie(a),m=r&&fe(r)?ie(r):r;let x=v,h=kn(x);for(;h&&r&&m!==x;){const g=Ke(h),y=h.getBoundingClientRect(),w=pe(h),C=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=y.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,l*=g.x,f*=g.y,u+=C,d+=b,x=ie(h),h=kn(x)}}return kt({width:l,height:f,x:u,y:d})}function Zt(e,t){const n=qt(e).scrollLeft;return t?t.left+n:Fe(we(e)).left+n}function So(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zt(e,n),y:n.top+t.scrollTop}}function xl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=we(r),c=t?Xt(t.floating):!1;if(r===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=xe(1);const l=xe(0),f=Ee(r);if((f||!f&&!a)&&((et(r)!=="body"||vt(i))&&(u=qt(r)),f)){const m=Fe(r);d=Ke(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}const v=i&&!f&&!a?So(i,u):xe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-u.scrollTop*d.y+l.y+v.y}}function wl(e){return Array.from(e.getClientRects())}function yl(e){const t=we(e),n=qt(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Zt(e);const c=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}var Gr=25;function Cl(e,t){const n=ie(e),r=we(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){a=o.width,i=o.height;const l=Jn();(!l||l&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=Zt(r);if(d<=0){const l=r.ownerDocument,f=l.body,v=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-m);x<=Gr&&(a-=x)}else d<=Gr&&(a+=d);return{width:a,height:i,x:c,y:u}}function bl(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ee(e)?Ke(e):xe(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function Ur(e,t,n){let r;if(t==="viewport")r=Cl(e,n);else if(t==="document")r=yl(we(e));else if(fe(t))r=bl(t,n);else{const o=bo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return kt(r)}function Eo(e,t){const n=Ae(e);return n===t||!fe(n)||Ye(n)?!1:pe(n).position==="fixed"||Eo(n,t)}function Sl(e,t){const n=t.get(e);if(n)return n;let r=ct(e,[],!1).filter(c=>fe(c)&&et(c)!=="body"),o=null;const a=pe(e).position==="fixed";let i=a?Ae(e):e;for(;fe(i)&&!Ye(i);){const c=pe(i),u=Qn(i);!u&&c.position==="fixed"&&(o=null),(a?!u&&!o:!u&&c.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||vt(i)&&!u&&Eo(e,i))?r=r.filter(d=>d!==i):o=c,i=Ae(i)}return t.set(e,r),r}function El(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Xt(t)?[]:Sl(t,this._c):[].concat(n),r],i=Ur(t,a[0],o);let c=i.top,u=i.right,d=i.bottom,l=i.left;for(let f=1;f<a.length;f++){const v=Ur(t,a[f],o);c=se(v.top,c),u=Te(v.right,u),d=Te(v.bottom,d),l=se(v.left,l)}return{width:u-l,height:d-c,x:l,y:c}}function Rl(e){const{width:t,height:n}=Co(e);return{width:t,height:n}}function Pl(e,t,n){const r=Ee(t),o=we(t),a=n==="fixed",i=Fe(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=xe(0);function d(){u.x=Zt(o)}if(r||!r&&!a)if((et(t)!=="body"||vt(o))&&(c=qt(t)),r){const f=Fe(t,!0,a,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else o&&d();a&&!r&&o&&d();const l=o&&!r&&!a?So(o,c):xe(0);return{x:i.left+c.scrollLeft-u.x-l.x,y:i.top+c.scrollTop-u.y-l.y,width:i.width,height:i.height}}function En(e){return pe(e).position==="static"}function Vr(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function Ro(e,t){const n=ie(e);if(Xt(e))return n;if(!Ee(e)){let o=Ae(e);for(;o&&!Ye(o);){if(fe(o)&&!En(o))return o;o=Ae(o)}return n}let r=Vr(e,t);for(;r&&fl(r)&&En(r);)r=Vr(r,t);return r&&Ye(r)&&En(r)&&!Qn(r)?n:r||hl(e)||n}var _l=async function(e){const t=this.getOffsetParent||Ro,n=this.getDimensions,r=await n(e.floating);return{reference:Pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tl(e){return pe(e).direction==="rtl"}var Al={convertOffsetParentRelativeRectToViewportRelativeRect:xl,getDocumentElement:we,getClippingRect:El,getOffsetParent:Ro,getElementRects:_l,getClientRects:wl,getDimensions:Rl,getScale:Ke,isElement:fe,isRTL:Tl};function Po(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ml(e,t){let n=null,r;const o=we(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:l,top:f,width:v,height:m}=d;if(c||t(),!v||!m)return;const x=Rt(f),h=Rt(o.clientWidth-(l+v)),g=Rt(o.clientHeight-(f+m)),y=Rt(l),w={rootMargin:-x+"px "+-h+"px "+-g+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let C=!0;function b(P){const R=P[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Po(d,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return i(!0),a}function Ol(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=er(e),l=o||a?[...d?ct(d):[],...t?ct(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const f=d&&c?Ml(d,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let x,h=u?Fe(e):null;u&&g();function g(){const y=Fe(e);h&&!Po(h,y)&&n(),h=y,x=requestAnimationFrame(g)}return n(),()=>{var y;l.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(x)}}var Nl=cl,Il=ll,Dl=al,jl=dl,Ll=sl,Kr=ol,kl=ul,Fl=(e,t,n)=>{const r=new Map,o={platform:Al,...n},a={...o.platform,_c:r};return rl(e,t,{...o,platform:a})},Nt=typeof document<"u"?s.useLayoutEffect:function(){};function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ft(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Ft(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _o(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zr(e,t){const n=_o(e);return Math.round(t*n)/n}function Rn(e){const t=s.useRef(e);return Nt(()=>{t.current=e}),t}function $l(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[l,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=s.useState(r);Ft(v,r)||m(r);const[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useCallback(I=>{I!==R.current&&(R.current=I,h(I))},[]),C=s.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),b=a||x,P=i||g,R=s.useRef(null),E=s.useRef(null),M=s.useRef(l),A=u!=null,O=Rn(u),j=Rn(o),L=Rn(d),W=s.useCallback(()=>{if(!R.current||!E.current)return;const I={placement:t,strategy:n,middleware:v};j.current&&(I.platform=j.current),Fl(R.current,E.current,I).then(_=>{const U={..._,isPositioned:L.current!==!1};F.current&&!Ft(M.current,U)&&(M.current=U,pt.flushSync(()=>{f(U)}))})},[v,t,n,j,L]);Nt(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[d]);const F=s.useRef(!1);Nt(()=>(F.current=!0,()=>{F.current=!1}),[]),Nt(()=>{if(b&&(R.current=b),P&&(E.current=P),b&&P){if(O.current)return O.current(b,P,W);W()}},[b,P,W,O,A]);const H=s.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:C}),[w,C]),k=s.useMemo(()=>({reference:b,floating:P}),[b,P]),$=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!k.floating)return I;const _=zr(k.floating,l.x),U=zr(k.floating,l.y);return c?{...I,transform:"translate("+_+"px, "+U+"px)",..._o(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:U}},[n,c,k.floating,l.x,l.y]);return s.useMemo(()=>({...l,update:W,refs:H,elements:k,floatingStyles:$}),[l,W,H,k,$])}var Bl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Kr({element:r.current,padding:o}).fn(n):{}:r?Kr({element:r,padding:o}).fn(n):{}}}},Wl=(e,t)=>{const n=Nl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hl=(e,t)=>{const n=Il(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gl=(e,t)=>({fn:kl(e).fn,options:[e,t]}),Ul=(e,t)=>{const n=Dl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vl=(e,t)=>{const n=jl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kl=(e,t)=>{const n=Ll(e);return{name:n.name,fn:n.fn,options:[e,t]}},zl=(e,t)=>{const n=Bl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yl="Arrow",To=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,p.jsx)(T.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,p.jsx)("polygon",{points:"0,0 30,0 15,10"})})});To.displayName=Yl;var Xl=To;function tr(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nr="Popper",[Ao,Me]=q(nr),[ql,Mo]=Ao(nr),Oo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,p.jsx)(ql,{scope:t,anchor:r,onAnchorChange:o,children:n})};Oo.displayName=nr;var No="PopperAnchor",Io=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Mo(No,n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),r?null:(0,p.jsx)(T.div,{...o,ref:c})});Io.displayName=No;var rr="PopperContent",[Zl,Ql]=Ao(rr),Do=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:x,...h}=e,g=Mo(rr,n),[y,w]=s.useState(null),C=D(t,N=>w(N)),[b,P]=s.useState(null),R=tr(b),E=R?.width??0,M=R?.height??0,A=r+(a!=="center"?"-"+a:""),O=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},j=Array.isArray(d)?d:[d],L=j.length>0,W={padding:O,boundary:j.filter(eu),altBoundary:L},{refs:F,floatingStyles:H,placement:k,isPositioned:$,middlewareData:I}=$l({strategy:"fixed",placement:A,whileElementsMounted:(...N)=>Ol(...N,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Wl({mainAxis:o+M,alignmentAxis:i}),u&&Hl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Gl():void 0,...W}),u&&Ul({...W}),Vl({...W,apply:({elements:N,rects:V,availableWidth:G,availableHeight:B})=>{const{width:Z,height:ne}=V.reference,he=N.floating.style;he.setProperty("--radix-popper-available-width",`${G}px`),he.setProperty("--radix-popper-available-height",`${B}px`),he.setProperty("--radix-popper-anchor-width",`${Z}px`),he.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),b&&zl({element:b,padding:c}),tu({arrowWidth:E,arrowHeight:M}),v&&Kl({strategy:"referenceHidden",...W})]}),[_,U]=ko(k),te=K(x);Y(()=>{$&&te?.()},[$,te]);const ue=I.arrow?.x,Ce=I.arrow?.y,oe=I.arrow?.centerOffset!==0,[ae,X]=s.useState();return Y(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),(0,p.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,p.jsx)(Zl,{scope:n,placedSide:_,onArrowChange:P,arrowX:ue,arrowY:Ce,shouldHideArrow:oe,children:(0,p.jsx)(T.div,{"data-side":_,"data-align":U,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Do.displayName=rr;var jo="PopperArrow",Jl={top:"bottom",right:"left",bottom:"top",left:"right"},Lo=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ql(jo,r),i=Jl[a.placedSide];return(0,p.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,p.jsx)(Xl,{...o,ref:n,style:{...o.style,display:"block"}})})});Lo.displayName=jo;function eu(e){return e!==null}var tu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=ko(n),l={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let m="",x="";return u==="bottom"?(m=a?l:`${f}px`,x=`${-c}px`):u==="top"?(m=a?l:`${f}px`,x=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,x=a?l:`${v}px`):u==="left"&&(m=`${r.floating.width+c}px`,x=a?l:`${v}px`),{data:{x:m,y:x}}}});function ko(e){const[t,n="center"]=e.split("-");return[t,n]}var ht=Oo,mt=Io,Qt=Do,Jt=Lo,nu="Portal",tt=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);Y(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pt.createPortal((0,p.jsx)(T.div,{...r,ref:t}),i):null});tt.displayName=nu;function ru(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var z=e=>{const{present:t,children:n}=e,r=ou(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=D(r.ref,au(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null};z.displayName="Presence";function ou(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[i,c]=ru(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Pt(r.current);a.current=i==="mounted"?u:"none"},[i]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const l=a.current,f=Pt(u);e?c("MOUNT"):f==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&l!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=v=>{const m=Pt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=v=>{v.target===t&&(a.current=Pt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Pt(e){return e?.animationName||"none"}function au(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 su=s[" useInsertionEffect ".trim().toString()]||Y;function Q({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=iu({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const l=d.current;l!==c&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}return[u,s.useCallback(d=>{if(c){const l=cu(d)?d(e):d;l!==e&&i.current?.(l)}else a(d)},[c,e,a,i])]}function iu({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return su(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function cu(e){return typeof e=="function"}var Fo=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"}),lu="VisuallyHidden",$o=s.forwardRef((e,t)=>(0,p.jsx)(T.span,{...e,ref:t,style:{...Fo,...e.style}}));$o.displayName=lu;var uu=$o,[en,Gv]=q("Tooltip",[Me]),tn=Me(),Bo="TooltipProvider",du=700,Fn="tooltip.open",[fu,or]=en(Bo),Wo=e=>{const{__scopeTooltip:t,delayDuration:n=du,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),(0,p.jsx)(fu,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:a})};Wo.displayName=Bo;var lt="Tooltip",[pu,gt]=en(lt),Ho=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=or(lt,e.__scopeTooltip),d=tn(t),[l,f]=s.useState(null),v=re(),m=s.useRef(0),x=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[y,w]=Q({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Fn))):u.onClose(),a?.(E)},caller:lt}),C=s.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),P=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},h)},[h,w]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,p.jsx)(ht,{...d,children:(0,p.jsx)(pu,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():b()},[u.isOpenDelayedRef,R,b]),onTriggerLeave:s.useCallback(()=>{x?P():(window.clearTimeout(m.current),m.current=0)},[P,x]),onOpen:b,onClose:P,disableHoverableContent:x,children:n})})};Ho.displayName=lt;var $n="TooltipTrigger",Go=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gt($n,n),a=or($n,n),i=tn(n),c=s.useRef(null),u=D(t,c,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),(0,p.jsx)(mt,{asChild:!0,...i,children:(0,p.jsx)(T.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:S(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:S(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:S(e.onBlur,o.onClose),onClick:S(e.onClick,o.onClose)})})});Go.displayName=$n;var ar="TooltipPortal",[vu,hu]=en(ar,{forceMount:void 0}),Uo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=gt(ar,t);return(0,p.jsx)(vu,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};Uo.displayName=ar;var Xe="TooltipContent",Vo=s.forwardRef((e,t)=>{const n=hu(Xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=gt(Xe,e.__scopeTooltip);return(0,p.jsx)(z,{present:r||i.open,children:i.disableHoverableContent?(0,p.jsx)(Ko,{side:o,...a,ref:t}):(0,p.jsx)(mu,{side:o,...a,ref:t})})}),mu=s.forwardRef((e,t)=>{const n=gt(Xe,e.__scopeTooltip),r=or(Xe,e.__scopeTooltip),o=s.useRef(null),a=D(t,o),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,l=o.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((x,h)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},w=Cu(y,yu(y,g.getBoundingClientRect())),C=bu(h.getBoundingClientRect()),b=Eu([...w,...C]);c(b),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&l){const x=g=>m(g,l),h=g=>m(g,u);return u.addEventListener("pointerleave",x),l.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",h)}}},[u,l,m,v]),s.useEffect(()=>{if(i){const x=h=>{const g=h.target,y={x:h.clientX,y:h.clientY},w=u?.contains(g)||l?.contains(g),C=!Su(y,i);w?v():C&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,l,i,d,v]),(0,p.jsx)(Ko,{...e,ref:a})}),[gu,xu]=en(lt,{isInside:!1}),wu=po("TooltipContent"),Ko=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=gt(Xe,n),d=tn(n),{onClose:l}=u;return s.useEffect(()=>(document.addEventListener(Fn,l),()=>document.removeEventListener(Fn,l)),[l]),s.useEffect(()=>{if(u.trigger){const f=v=>{v.target?.contains(u.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,l]),(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:(0,p.jsxs)(Qt,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.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:[(0,p.jsx)(wu,{children:r}),(0,p.jsx)(gu,{scope:n,isInside:!0,children:(0,p.jsx)(uu,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Vo.displayName=Xe;var zo="TooltipArrow",Yo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tn(n);return xu(zo,n).isInside?null:(0,p.jsx)(Jt,{...o,...r,ref:t})});Yo.displayName=zo;function yu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Cu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function bu(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Su(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Eu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ru(t)}function Ru(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uv=Wo,Vv=Ho,Kv=Go,zv=Uo,Yv=Vo,Xv=Yo,Pn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Yr={bubbles:!1,cancelable:!0},Pu="FocusScope",xt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=K(o),l=K(a),f=s.useRef(null),v=D(t,h=>u(h)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(C){if(m.paused||!c)return;const b=C.target;c.contains(b)?f.current=b:Pe(f.current,{select:!0})},g=function(C){if(m.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||Pe(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const b of C)b.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),s.useEffect(()=>{if(c){qr.add(m);const h=document.activeElement;if(!c.contains(h)){const g=new CustomEvent(Pn,Yr);c.addEventListener(Pn,d),c.dispatchEvent(g),g.defaultPrevented||(_u(Nu(Xo(c)),{select:!0}),document.activeElement===h&&Pe(c))}return()=>{c.removeEventListener(Pn,d),setTimeout(()=>{const g=new CustomEvent(_n,Yr);c.addEventListener(_n,l),c.dispatchEvent(g),g.defaultPrevented||Pe(h??document.body,{select:!0}),c.removeEventListener(_n,l),qr.remove(m)},0)}}},[c,d,l,m]);const x=s.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const w=h.currentTarget,[C,b]=Tu(w);C&&b?!h.shiftKey&&y===b?(h.preventDefault(),n&&Pe(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),n&&Pe(b,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return(0,p.jsx)(T.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});xt.displayName=Pu;function _u(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}function Tu(e){const t=Xo(e);return[Xr(t,e),Xr(t.reverse(),e)]}function Xo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xr(e,t){for(const n of e)if(!Au(n,{upTo:t}))return n}function Au(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 Mu(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mu(e)&&t&&e.select()}}var qr=Ou();function Ou(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Zr(e,t),e.unshift(t)},remove(t){e=Zr(e,t),e[0]?.resume()}}}function Zr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nu(e){return e.filter(t=>t.tagName!=="A")}var Tn=0;function nn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qr()),document.body.insertAdjacentElement("beforeend",e[1]??Qr()),Tn++,()=>{Tn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tn--}},[])}function Qr(){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 me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},me.apply(this,arguments)};function qo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Iu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var It="right-scroll-bar-position",Dt="width-before-scroll-bar",Du="with-scroll-bars-hidden",ju="--removed-body-scroll-bar-size";function An(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lu(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ku=typeof window<"u"?s.useLayoutEffect:s.useEffect,Jr=new WeakMap;function Fu(e,t){var n=Lu(t||null,function(r){return e.forEach(function(o){return An(o,r)})});return ku(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||An(c,null)}),a.forEach(function(c){o.has(c)||An(c,i)})}Jr.set(n,e)},[e]),n}function $u(e){return e}function Bu(e,t){t===void 0&&(t=$u);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}}}function Wu(e){e===void 0&&(e={});var t=Bu(null);return t.options=me({async:!0,ssr:!1},e),t}var Zo=function(e){var t=e.sideCar,n=qo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};Zo.isSideCarExport=!0;function Hu(e,t){return e.useMedium(t),Zo}var Qo=Wu(),Mn=function(){},rn=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:Mn,onWheelCapture:Mn,onTouchMoveCapture:Mn}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,l=e.enabled,f=e.shards,v=e.sideCar,m=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,b=qo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=v,R=Fu([n,t]),E=me(me({},b),o);return s.createElement(s.Fragment,null,l&&s.createElement(P,{sideCar:Qo,removeScrollBar:d,shards:f,noRelative:m,noIsolation:x,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),me(me({},E),{ref:R})):s.createElement(w,me({},E,{className:u,ref:R}),c))});rn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rn.classNames={fullWidth:Dt,zeroRight:It};var eo,Gu=function(){if(eo)return eo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gu();return t&&e.setAttribute("nonce",t),e}function Vu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ku(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uu())&&(Vu(t,n),Ku(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yu=function(){var e=zu();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jo=function(){var e=Yu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xu={left:0,top:0,right:0,gap:0},On=function(e){return parseInt(e||"",10)||0},qu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[On(n),On(r),On(o)]},Zu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xu;var t=qu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qu=Jo(),it="data-scroll-locked",Ju=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{r as lo,t as zt}from"./rolldown-runtime-fzu9RN21.js";import{zt as uo}from"./icons-DxFtdMXW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.1.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e3278bc5-424f-427e-b347-85a69e221229",e._sentryDebugIdIdentifier="sentry-dbid-e3278bc5-424f-427e-b347-85a69e221229")}catch{}})();var Pc=zt((e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:t,type:o,key:c,ref:a!==void 0?a:null,props:i}}e.Fragment=n,e.jsx=r,e.jsxs=r})),_c=zt(((e,t)=>{t.exports=Pc()})),Tc=zt((e=>{var t=uo();function n(d){var l="https://react.dev/errors/"+d;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+d+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:d,containerInfo:l,implementation:f}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,l){if(d==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(d,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(n(299));return i(d,l,null,f)},e.flushSync=function(d){var l=c.T,f=o.p;try{if(c.T=null,o.p=2,d)return d()}finally{c.T=l,o.p=f,o.d.f()}},e.preconnect=function(d,l){typeof d=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,o.d.C(d,l))},e.prefetchDNS=function(d){typeof d=="string"&&o.d.D(d)},e.preinit=function(d,l){if(typeof d=="string"&&l&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin),m=typeof l.integrity=="string"?l.integrity:void 0,x=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;f==="style"?o.d.S(d,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:v,integrity:m,fetchPriority:x}):f==="script"&&o.d.X(d,{crossOrigin:v,integrity:m,fetchPriority:x,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},e.preinitModule=function(d,l){if(typeof d=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var f=u(l.as,l.crossOrigin);o.d.M(d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l??o.d.M(d)},e.preload=function(d,l){if(typeof d=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin);o.d.L(d,f,{crossOrigin:v,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},e.preloadModule=function(d,l){if(typeof d=="string")if(l){var f=u(l.as,l.crossOrigin);o.d.m(d,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else o.d.m(d)},e.requestFormReset=function(d){o.d.r(d)},e.unstable_batchedUpdates=function(d,l){return d(l)},e.useFormState=function(d,l,f){return c.H.useFormState(d,l,f)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.5"})),Ac=zt(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}n(),t.exports=Tc()})),s=lo(uo(),1),Hv=!!(typeof window<"u"&&window.document&&window.document.createElement);function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Dr(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Dr(e[o],null)}}}}function D(...e){return s.useCallback(ft(...e),e)}var p=_c();function Mc(e,t){const n=s.createContext(t),r=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return(0,p.jsx)(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function q(e,t=[]){let n=[];function r(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:v,children:m,...x}=f,h=v?.[e]?.[u]||c,g=s.useMemo(()=>x,Object.values(x));return(0,p.jsx)(h.Provider,{value:g,children:m})};d.displayName=a+"Provider";function l(f,v){const m=v?.[e]?.[u]||c,x=s.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,l]}const o=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Oc(o,...t)]}function Oc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const l=u(a)[`__scope${d}`];return{...c,...l}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var pt=lo(Ac(),1);function ke(e){const t=Nc(e),n=s.forwardRef((r,o)=>{const{children:a,...i}=r,c=s.Children.toArray(a),u=c.find(Ic);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Nc(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const i=jc(o),c=Dc(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fo=Symbol("radix.slottable");function po(e){const t=({children:n})=>(0,p.jsx)(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=fo,t}function Ic(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fo}function Dc(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jc(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 T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=ke(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vo(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}function K(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function Lc(e,t=globalThis?.document){const n=K(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kc="DismissableLayer",Dn="dismissableLayer.update",Fc="dismissableLayer.pointerDownOutside",$c="dismissableLayer.focusOutside",jr,ho=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(ho),[l,f]=s.useState(null),v=l?.ownerDocument??globalThis?.document,[,m]=s.useState({}),x=D(t,E=>f(E)),h=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),w=l?h.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,P=Hc(E=>{const M=E.target,A=[...d.branches].some(O=>O.contains(M));!b||A||(o?.(E),i?.(E),E.defaultPrevented||c?.())},v),R=Gc(E=>{const M=E.target;[...d.branches].some(A=>A.contains(M))||(a?.(E),i?.(E),E.defaultPrevented||c?.())},v);return Lc(E=>{w===d.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),s.useEffect(()=>{if(l)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),Lr(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jr)}},[l,v,n,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),Lr())},[l,d]),s.useEffect(()=>{const E=()=>m({});return document.addEventListener(Dn,E),()=>document.removeEventListener(Dn,E)},[]),(0,p.jsx)(T.div,{...u,ref:x,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,R.onFocusCapture),onBlurCapture:S(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,P.onPointerDownCapture)})});Qe.displayName=kc;var Bc="DismissableLayerBranch",Wc=s.forwardRef((e,t)=>{const n=s.useContext(ho),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,p.jsx)(T.div,{...e,ref:o})});Wc.displayName=Bc;function Hc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let u=function(){mo(Fc,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&mo($c,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lr(){const e=new CustomEvent(Dn);document.dispatchEvent(e)}function mo(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vo(o,a):o.dispatchEvent(a)}var Y=globalThis?.document?s.useLayoutEffect:()=>{},Uc=s[" useId ".trim().toString()]||(()=>{}),Vc=0;function re(e){const[t,n]=s.useState(Uc());return Y(()=>{e||n(r=>r??String(Vc++))},[e]),e||(t?`radix-${t}`:"")}var Kc=["top","right","bottom","left"],Te=Math.min,se=Math.max,jt=Math.round,Rt=Math.floor,xe=e=>({x:e,y:e}),zc={left:"right",right:"left",bottom:"top",top:"bottom"};function jn(e,t,n){return se(e,Te(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(ge(e))}function Yc(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Zn(e),a=qn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lt(i)),[i,Lt(i)]}function Xc(e){const t=Lt(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var kr=["left","right"],Fr=["right","left"],qc=["top","bottom"],Zc=["bottom","top"];function Qc(e,t,n){switch(e){case"top":case"bottom":return n?t?Fr:kr:t?kr:Fr;case"left":case"right":return t?qc:Zc;default:return[]}}function Jc(e,t,n,r){const o=Je(e);let a=Qc(Se(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Ln)))),a}function Lt(e){const t=Se(e);return zc[t]+e.slice(t.length)}function el(e){return{top:0,right:0,bottom:0,left:0,...e}}function go(e){return typeof e!="number"?el(e):{top:e,right:e,bottom:e,left:e}}function kt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $r(e,t,n){let{reference:r,floating:o}=e;const a=ge(t),i=Zn(t),c=qn(i),u=Se(t),d=a==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,v=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:l,y:r.y-o.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Je(t)){case"start":m[i]-=v*(n&&d?-1:1);break;case"end":m[i]+=v*(n&&d?-1:1)}return m}async function tl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:v=!1,padding:m=0}=be(t,e),x=go(m),h=c[v?f==="floating"?"reference":"floating":f],g=kt(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},b=kt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:w,strategy:u}):y);return{top:(g.top-b.top+x.top)/C.y,bottom:(b.bottom-g.bottom+x.bottom)/C.y,left:(g.left-b.left+x.left)/C.x,right:(b.right-g.right+x.right)/C.x}}var nl=50,rl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:tl},u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=$r(d,r,u),v=r,m=0;const x={};for(let h=0;h<a.length;h++){const g=a[h];if(!g)continue;const{name:y,fn:w}=g,{x:C,y:b,data:P,reset:R}=await w({x:l,y:f,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:d,platform:c,elements:{reference:e,floating:t}});l=C??l,f=b??f,x[y]={...x[y],...P},R&&m<nl&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:l,y:f}=$r(d,v,u)),h=-1)}return{x:l,y:f,placement:v,strategy:o,middlewareData:x}},ol=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:l=0}=be(e,t)||{};if(d==null)return{};const f=go(l),v={x:n,y:r},m=Zn(o),x=qn(m),h=await i.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=a.reference[x]+a.reference[m]-v[m]-a.floating[x],P=v[m]-a.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=R?R[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=c.floating[C]||a.floating[x]);const M=b/2-P/2,A=E/2-h[x]/2-1,O=Te(f[y],A),j=Te(f[w],A),L=O,W=E-h[x]-j,F=E/2-h[x]/2+M,H=jn(L,F,W),k=!u.arrow&&Je(o)!=null&&F!==H&&a.reference[x]/2-(F<L?O:j)-h[x]/2<0,$=k?F<L?F-L:F-W:0;return{[m]:v[m]+$,data:{[m]:H,centerOffset:F-H-$,...k&&{alignmentOffset:$}},reset:k}}}),al=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=be(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(o),w=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=v||(C||!h?[Lt(c)]:Xc(c)),R=x!=="none";!v&&R&&P.push(...Jc(c,h,x,b));const E=[c,...P],M=await u.detectOverflow(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(l&&A.push(M[y]),f){const F=Yc(o,i,b);A.push(M[F[0]],M[F[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(F=>F<=0)){var j,L;const F=(((j=a.flip)==null?void 0:j.index)||0)+1,H=E[F];if(H&&(!(f==="alignment"&&w!==ge(H))||O.every($=>ge($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:H}};let k=(L=O.filter($=>$.overflows[0]<=0).sort(($,I)=>$.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!k)switch(m){case"bestFit":{var W;const $=(W=O.filter(I=>{if(R){const _=ge(I.placement);return _===w||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=c}if(o!==k)return{reset:{placement:k}}}return{}}}};function Br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wr(e){return Kc.some(t=>e[t]>=0)}var sl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=be(e,t);switch(o){case"referenceHidden":{const i=Br(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wr(i)}}}case"escaped":{const i=Br(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:Wr(i)}}}default:return{}}}}},xo=new Set(["left","top"]);async function il(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Se(n),c=Je(n),u=ge(n)==="y",d=xo.has(i)?-1:1,l=a&&u?-1:1,f=be(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof x=="number"&&(m=c==="end"?x*-1:x),u?{x:m*l,y:v*d}:{x:v*d,y:m*l}}var cl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,u=await il(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},ll=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...d}=be(e,t),l={x:n,y:r},f=await a.detectOverflow(t,d),v=ge(Se(o)),m=Xn(v);let x=l[m],h=l[v];if(i){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=x+f[y],b=x-f[w];x=jn(C,x,b)}if(c){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",C=h+f[y],b=h-f[w];h=jn(C,h,b)}const g=u.fn({...t,[m]:x,[v]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[v]:c}}}}}},ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=be(e,t),l={x:n,y:r},f=ge(o),v=Xn(f);let m=l[v],x=l[f];const h=be(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=v==="y"?"height":"width",b=a.reference[v]-a.floating[C]+g.mainAxis,P=a.reference[v]+a.reference[C]-g.mainAxis;m<b?m=b:m>P&&(m=P)}if(d){var y,w;const C=v==="y"?"width":"height",b=xo.has(Se(o)),P=a.reference[f]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),R=a.reference[f]+a.reference[C]+(b?0:((w=i.offset)==null?void 0:w[f])||0)-(b?g.crossAxis:0);x<P?x=P:x>R&&(x=R)}return{[v]:m,[f]:x}}}},dl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=be(e,t),l=await i.detectOverflow(t,d),f=Se(o),v=Je(o),m=ge(o)==="y",{width:x,height:h}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=v==="end"?"top":"bottom");const w=h-l.top-l.bottom,C=x-l.left-l.right,b=Te(h-l[g],w),P=Te(x-l[y],C),R=!t.middlewareData.shift;let E=b,M=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),R&&!v){const O=se(l.left,0),j=se(l.right,0),L=se(l.top,0),W=se(l.bottom,0);m?M=x-2*(O!==0||j!==0?O+j:se(l.left,l.right)):E=h-2*(L!==0||W!==0?L+W:se(l.top,l.bottom))}await u({...t,availableWidth:M,availableHeight:E});const A=await i.getDimensions(c.floating);return x!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function et(e){return wo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(wo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wo(e){return Yt()?e instanceof Node||e instanceof ie(e).Node:!1}function fe(e){return Yt()?e instanceof Element||e instanceof ie(e).Element:!1}function Ee(e){return Yt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Hr(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function vt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function fl(e){return/^(table|td|th)$/.test(et(e))}function Xt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var pl=/transform|translate|scale|rotate|perspective|filter/,vl=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none",Sn;function Qn(e){const t=fe(e)?pe(e):e;return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!Jn()&&(Le(t.backdropFilter)||Le(t.filter))||pl.test(t.willChange||"")||vl.test(t.contain||"")}function hl(e){let t=Ae(e);for(;Ee(t)&&!Ye(t);){if(Qn(t))return t;if(Xt(t))return null;t=Ae(t)}return null}function Jn(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function Ye(e){return/^(html|body|#document)$/.test(et(e))}function pe(e){return ie(e).getComputedStyle(e)}function qt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||we(e);return Hr(t)?t.host:t}function yo(e){const t=Ae(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&vt(t)?t:yo(t)}function ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yo(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(a){const c=kn(i);return t.concat(i,i.visualViewport||[],vt(o)?o:[],c&&n?ct(c):[])}else return t.concat(o,ct(o,[],n))}function kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Co(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=jt(n)!==a||jt(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function er(e){return fe(e)?e:e.contextElement}function Ke(e){const t=er(e);if(!Ee(t))return xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Co(t);let i=(a?jt(n.width):n.width)/r,c=(a?jt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var ml=xe(0);function bo(e){const t=ie(e);return!Jn()||!t.visualViewport?ml:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=er(e);let i=xe(1);t&&(r?fe(r)&&(i=Ke(r)):i=Ke(e));const c=gl(a,n,r)?bo(a):xe(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(a){const v=ie(a),m=r&&fe(r)?ie(r):r;let x=v,h=kn(x);for(;h&&r&&m!==x;){const g=Ke(h),y=h.getBoundingClientRect(),w=pe(h),C=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=y.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,l*=g.x,f*=g.y,u+=C,d+=b,x=ie(h),h=kn(x)}}return kt({width:l,height:f,x:u,y:d})}function Zt(e,t){const n=qt(e).scrollLeft;return t?t.left+n:Fe(we(e)).left+n}function So(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zt(e,n),y:n.top+t.scrollTop}}function xl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=we(r),c=t?Xt(t.floating):!1;if(r===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=xe(1);const l=xe(0),f=Ee(r);if((f||!f&&!a)&&((et(r)!=="body"||vt(i))&&(u=qt(r)),f)){const m=Fe(r);d=Ke(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}const v=i&&!f&&!a?So(i,u):xe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-u.scrollTop*d.y+l.y+v.y}}function wl(e){return Array.from(e.getClientRects())}function yl(e){const t=we(e),n=qt(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Zt(e);const c=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}var Gr=25;function Cl(e,t){const n=ie(e),r=we(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){a=o.width,i=o.height;const l=Jn();(!l||l&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=Zt(r);if(d<=0){const l=r.ownerDocument,f=l.body,v=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-m);x<=Gr&&(a-=x)}else d<=Gr&&(a+=d);return{width:a,height:i,x:c,y:u}}function bl(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ee(e)?Ke(e):xe(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function Ur(e,t,n){let r;if(t==="viewport")r=Cl(e,n);else if(t==="document")r=yl(we(e));else if(fe(t))r=bl(t,n);else{const o=bo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return kt(r)}function Eo(e,t){const n=Ae(e);return n===t||!fe(n)||Ye(n)?!1:pe(n).position==="fixed"||Eo(n,t)}function Sl(e,t){const n=t.get(e);if(n)return n;let r=ct(e,[],!1).filter(c=>fe(c)&&et(c)!=="body"),o=null;const a=pe(e).position==="fixed";let i=a?Ae(e):e;for(;fe(i)&&!Ye(i);){const c=pe(i),u=Qn(i);!u&&c.position==="fixed"&&(o=null),(a?!u&&!o:!u&&c.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||vt(i)&&!u&&Eo(e,i))?r=r.filter(d=>d!==i):o=c,i=Ae(i)}return t.set(e,r),r}function El(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Xt(t)?[]:Sl(t,this._c):[].concat(n),r],i=Ur(t,a[0],o);let c=i.top,u=i.right,d=i.bottom,l=i.left;for(let f=1;f<a.length;f++){const v=Ur(t,a[f],o);c=se(v.top,c),u=Te(v.right,u),d=Te(v.bottom,d),l=se(v.left,l)}return{width:u-l,height:d-c,x:l,y:c}}function Rl(e){const{width:t,height:n}=Co(e);return{width:t,height:n}}function Pl(e,t,n){const r=Ee(t),o=we(t),a=n==="fixed",i=Fe(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=xe(0);function d(){u.x=Zt(o)}if(r||!r&&!a)if((et(t)!=="body"||vt(o))&&(c=qt(t)),r){const f=Fe(t,!0,a,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else o&&d();a&&!r&&o&&d();const l=o&&!r&&!a?So(o,c):xe(0);return{x:i.left+c.scrollLeft-u.x-l.x,y:i.top+c.scrollTop-u.y-l.y,width:i.width,height:i.height}}function En(e){return pe(e).position==="static"}function Vr(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function Ro(e,t){const n=ie(e);if(Xt(e))return n;if(!Ee(e)){let o=Ae(e);for(;o&&!Ye(o);){if(fe(o)&&!En(o))return o;o=Ae(o)}return n}let r=Vr(e,t);for(;r&&fl(r)&&En(r);)r=Vr(r,t);return r&&Ye(r)&&En(r)&&!Qn(r)?n:r||hl(e)||n}var _l=async function(e){const t=this.getOffsetParent||Ro,n=this.getDimensions,r=await n(e.floating);return{reference:Pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tl(e){return pe(e).direction==="rtl"}var Al={convertOffsetParentRelativeRectToViewportRelativeRect:xl,getDocumentElement:we,getClippingRect:El,getOffsetParent:Ro,getElementRects:_l,getClientRects:wl,getDimensions:Rl,getScale:Ke,isElement:fe,isRTL:Tl};function Po(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ml(e,t){let n=null,r;const o=we(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:l,top:f,width:v,height:m}=d;if(c||t(),!v||!m)return;const x=Rt(f),h=Rt(o.clientWidth-(l+v)),g=Rt(o.clientHeight-(f+m)),y=Rt(l),w={rootMargin:-x+"px "+-h+"px "+-g+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let C=!0;function b(P){const R=P[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Po(d,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return i(!0),a}function Ol(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=er(e),l=o||a?[...d?ct(d):[],...t?ct(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const f=d&&c?Ml(d,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let x,h=u?Fe(e):null;u&&g();function g(){const y=Fe(e);h&&!Po(h,y)&&n(),h=y,x=requestAnimationFrame(g)}return n(),()=>{var y;l.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(x)}}var Nl=cl,Il=ll,Dl=al,jl=dl,Ll=sl,Kr=ol,kl=ul,Fl=(e,t,n)=>{const r=new Map,o={platform:Al,...n},a={...o.platform,_c:r};return rl(e,t,{...o,platform:a})},Nt=typeof document<"u"?s.useLayoutEffect:function(){};function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ft(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Ft(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _o(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zr(e,t){const n=_o(e);return Math.round(t*n)/n}function Rn(e){const t=s.useRef(e);return Nt(()=>{t.current=e}),t}function $l(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[l,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=s.useState(r);Ft(v,r)||m(r);const[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useCallback(I=>{I!==R.current&&(R.current=I,h(I))},[]),C=s.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),b=a||x,P=i||g,R=s.useRef(null),E=s.useRef(null),M=s.useRef(l),A=u!=null,O=Rn(u),j=Rn(o),L=Rn(d),W=s.useCallback(()=>{if(!R.current||!E.current)return;const I={placement:t,strategy:n,middleware:v};j.current&&(I.platform=j.current),Fl(R.current,E.current,I).then(_=>{const U={..._,isPositioned:L.current!==!1};F.current&&!Ft(M.current,U)&&(M.current=U,pt.flushSync(()=>{f(U)}))})},[v,t,n,j,L]);Nt(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[d]);const F=s.useRef(!1);Nt(()=>(F.current=!0,()=>{F.current=!1}),[]),Nt(()=>{if(b&&(R.current=b),P&&(E.current=P),b&&P){if(O.current)return O.current(b,P,W);W()}},[b,P,W,O,A]);const H=s.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:C}),[w,C]),k=s.useMemo(()=>({reference:b,floating:P}),[b,P]),$=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!k.floating)return I;const _=zr(k.floating,l.x),U=zr(k.floating,l.y);return c?{...I,transform:"translate("+_+"px, "+U+"px)",..._o(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:U}},[n,c,k.floating,l.x,l.y]);return s.useMemo(()=>({...l,update:W,refs:H,elements:k,floatingStyles:$}),[l,W,H,k,$])}var Bl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Kr({element:r.current,padding:o}).fn(n):{}:r?Kr({element:r,padding:o}).fn(n):{}}}},Wl=(e,t)=>{const n=Nl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hl=(e,t)=>{const n=Il(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gl=(e,t)=>({fn:kl(e).fn,options:[e,t]}),Ul=(e,t)=>{const n=Dl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vl=(e,t)=>{const n=jl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kl=(e,t)=>{const n=Ll(e);return{name:n.name,fn:n.fn,options:[e,t]}},zl=(e,t)=>{const n=Bl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yl="Arrow",To=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,p.jsx)(T.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,p.jsx)("polygon",{points:"0,0 30,0 15,10"})})});To.displayName=Yl;var Xl=To;function tr(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nr="Popper",[Ao,Me]=q(nr),[ql,Mo]=Ao(nr),Oo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,p.jsx)(ql,{scope:t,anchor:r,onAnchorChange:o,children:n})};Oo.displayName=nr;var No="PopperAnchor",Io=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Mo(No,n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),r?null:(0,p.jsx)(T.div,{...o,ref:c})});Io.displayName=No;var rr="PopperContent",[Zl,Ql]=Ao(rr),Do=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:x,...h}=e,g=Mo(rr,n),[y,w]=s.useState(null),C=D(t,N=>w(N)),[b,P]=s.useState(null),R=tr(b),E=R?.width??0,M=R?.height??0,A=r+(a!=="center"?"-"+a:""),O=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},j=Array.isArray(d)?d:[d],L=j.length>0,W={padding:O,boundary:j.filter(eu),altBoundary:L},{refs:F,floatingStyles:H,placement:k,isPositioned:$,middlewareData:I}=$l({strategy:"fixed",placement:A,whileElementsMounted:(...N)=>Ol(...N,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Wl({mainAxis:o+M,alignmentAxis:i}),u&&Hl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Gl():void 0,...W}),u&&Ul({...W}),Vl({...W,apply:({elements:N,rects:V,availableWidth:G,availableHeight:B})=>{const{width:Z,height:ne}=V.reference,he=N.floating.style;he.setProperty("--radix-popper-available-width",`${G}px`),he.setProperty("--radix-popper-available-height",`${B}px`),he.setProperty("--radix-popper-anchor-width",`${Z}px`),he.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),b&&zl({element:b,padding:c}),tu({arrowWidth:E,arrowHeight:M}),v&&Kl({strategy:"referenceHidden",...W})]}),[_,U]=ko(k),te=K(x);Y(()=>{$&&te?.()},[$,te]);const ue=I.arrow?.x,Ce=I.arrow?.y,oe=I.arrow?.centerOffset!==0,[ae,X]=s.useState();return Y(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),(0,p.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,p.jsx)(Zl,{scope:n,placedSide:_,onArrowChange:P,arrowX:ue,arrowY:Ce,shouldHideArrow:oe,children:(0,p.jsx)(T.div,{"data-side":_,"data-align":U,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Do.displayName=rr;var jo="PopperArrow",Jl={top:"bottom",right:"left",bottom:"top",left:"right"},Lo=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ql(jo,r),i=Jl[a.placedSide];return(0,p.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,p.jsx)(Xl,{...o,ref:n,style:{...o.style,display:"block"}})})});Lo.displayName=jo;function eu(e){return e!==null}var tu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=ko(n),l={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let m="",x="";return u==="bottom"?(m=a?l:`${f}px`,x=`${-c}px`):u==="top"?(m=a?l:`${f}px`,x=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,x=a?l:`${v}px`):u==="left"&&(m=`${r.floating.width+c}px`,x=a?l:`${v}px`),{data:{x:m,y:x}}}});function ko(e){const[t,n="center"]=e.split("-");return[t,n]}var ht=Oo,mt=Io,Qt=Do,Jt=Lo,nu="Portal",tt=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);Y(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pt.createPortal((0,p.jsx)(T.div,{...r,ref:t}),i):null});tt.displayName=nu;function ru(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var z=e=>{const{present:t,children:n}=e,r=ou(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=D(r.ref,au(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null};z.displayName="Presence";function ou(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[i,c]=ru(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Pt(r.current);a.current=i==="mounted"?u:"none"},[i]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const l=a.current,f=Pt(u);e?c("MOUNT"):f==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&l!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=v=>{const m=Pt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=v=>{v.target===t&&(a.current=Pt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Pt(e){return e?.animationName||"none"}function au(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 su=s[" useInsertionEffect ".trim().toString()]||Y;function Q({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=iu({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const l=d.current;l!==c&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}return[u,s.useCallback(d=>{if(c){const l=cu(d)?d(e):d;l!==e&&i.current?.(l)}else a(d)},[c,e,a,i])]}function iu({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return su(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function cu(e){return typeof e=="function"}var Fo=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"}),lu="VisuallyHidden",$o=s.forwardRef((e,t)=>(0,p.jsx)(T.span,{...e,ref:t,style:{...Fo,...e.style}}));$o.displayName=lu;var uu=$o,[en,Gv]=q("Tooltip",[Me]),tn=Me(),Bo="TooltipProvider",du=700,Fn="tooltip.open",[fu,or]=en(Bo),Wo=e=>{const{__scopeTooltip:t,delayDuration:n=du,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),(0,p.jsx)(fu,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:a})};Wo.displayName=Bo;var lt="Tooltip",[pu,gt]=en(lt),Ho=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=or(lt,e.__scopeTooltip),d=tn(t),[l,f]=s.useState(null),v=re(),m=s.useRef(0),x=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[y,w]=Q({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Fn))):u.onClose(),a?.(E)},caller:lt}),C=s.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),P=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},h)},[h,w]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,p.jsx)(ht,{...d,children:(0,p.jsx)(pu,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():b()},[u.isOpenDelayedRef,R,b]),onTriggerLeave:s.useCallback(()=>{x?P():(window.clearTimeout(m.current),m.current=0)},[P,x]),onOpen:b,onClose:P,disableHoverableContent:x,children:n})})};Ho.displayName=lt;var $n="TooltipTrigger",Go=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gt($n,n),a=or($n,n),i=tn(n),c=s.useRef(null),u=D(t,c,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),(0,p.jsx)(mt,{asChild:!0,...i,children:(0,p.jsx)(T.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:S(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:S(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:S(e.onBlur,o.onClose),onClick:S(e.onClick,o.onClose)})})});Go.displayName=$n;var ar="TooltipPortal",[vu,hu]=en(ar,{forceMount:void 0}),Uo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=gt(ar,t);return(0,p.jsx)(vu,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};Uo.displayName=ar;var Xe="TooltipContent",Vo=s.forwardRef((e,t)=>{const n=hu(Xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=gt(Xe,e.__scopeTooltip);return(0,p.jsx)(z,{present:r||i.open,children:i.disableHoverableContent?(0,p.jsx)(Ko,{side:o,...a,ref:t}):(0,p.jsx)(mu,{side:o,...a,ref:t})})}),mu=s.forwardRef((e,t)=>{const n=gt(Xe,e.__scopeTooltip),r=or(Xe,e.__scopeTooltip),o=s.useRef(null),a=D(t,o),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,l=o.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((x,h)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},w=Cu(y,yu(y,g.getBoundingClientRect())),C=bu(h.getBoundingClientRect()),b=Eu([...w,...C]);c(b),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&l){const x=g=>m(g,l),h=g=>m(g,u);return u.addEventListener("pointerleave",x),l.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",h)}}},[u,l,m,v]),s.useEffect(()=>{if(i){const x=h=>{const g=h.target,y={x:h.clientX,y:h.clientY},w=u?.contains(g)||l?.contains(g),C=!Su(y,i);w?v():C&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,l,i,d,v]),(0,p.jsx)(Ko,{...e,ref:a})}),[gu,xu]=en(lt,{isInside:!1}),wu=po("TooltipContent"),Ko=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=gt(Xe,n),d=tn(n),{onClose:l}=u;return s.useEffect(()=>(document.addEventListener(Fn,l),()=>document.removeEventListener(Fn,l)),[l]),s.useEffect(()=>{if(u.trigger){const f=v=>{v.target?.contains(u.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,l]),(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:(0,p.jsxs)(Qt,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.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:[(0,p.jsx)(wu,{children:r}),(0,p.jsx)(gu,{scope:n,isInside:!0,children:(0,p.jsx)(uu,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Vo.displayName=Xe;var zo="TooltipArrow",Yo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tn(n);return xu(zo,n).isInside?null:(0,p.jsx)(Jt,{...o,...r,ref:t})});Yo.displayName=zo;function yu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Cu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function bu(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Su(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Eu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ru(t)}function Ru(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uv=Wo,Vv=Ho,Kv=Go,zv=Uo,Yv=Vo,Xv=Yo,Pn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Yr={bubbles:!1,cancelable:!0},Pu="FocusScope",xt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=K(o),l=K(a),f=s.useRef(null),v=D(t,h=>u(h)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(C){if(m.paused||!c)return;const b=C.target;c.contains(b)?f.current=b:Pe(f.current,{select:!0})},g=function(C){if(m.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||Pe(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const b of C)b.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),s.useEffect(()=>{if(c){qr.add(m);const h=document.activeElement;if(!c.contains(h)){const g=new CustomEvent(Pn,Yr);c.addEventListener(Pn,d),c.dispatchEvent(g),g.defaultPrevented||(_u(Nu(Xo(c)),{select:!0}),document.activeElement===h&&Pe(c))}return()=>{c.removeEventListener(Pn,d),setTimeout(()=>{const g=new CustomEvent(_n,Yr);c.addEventListener(_n,l),c.dispatchEvent(g),g.defaultPrevented||Pe(h??document.body,{select:!0}),c.removeEventListener(_n,l),qr.remove(m)},0)}}},[c,d,l,m]);const x=s.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const w=h.currentTarget,[C,b]=Tu(w);C&&b?!h.shiftKey&&y===b?(h.preventDefault(),n&&Pe(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),n&&Pe(b,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return(0,p.jsx)(T.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});xt.displayName=Pu;function _u(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}function Tu(e){const t=Xo(e);return[Xr(t,e),Xr(t.reverse(),e)]}function Xo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xr(e,t){for(const n of e)if(!Au(n,{upTo:t}))return n}function Au(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 Mu(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mu(e)&&t&&e.select()}}var qr=Ou();function Ou(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Zr(e,t),e.unshift(t)},remove(t){e=Zr(e,t),e[0]?.resume()}}}function Zr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nu(e){return e.filter(t=>t.tagName!=="A")}var Tn=0;function nn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qr()),document.body.insertAdjacentElement("beforeend",e[1]??Qr()),Tn++,()=>{Tn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tn--}},[])}function Qr(){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 me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},me.apply(this,arguments)};function qo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Iu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var It="right-scroll-bar-position",Dt="width-before-scroll-bar",Du="with-scroll-bars-hidden",ju="--removed-body-scroll-bar-size";function An(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lu(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ku=typeof window<"u"?s.useLayoutEffect:s.useEffect,Jr=new WeakMap;function Fu(e,t){var n=Lu(t||null,function(r){return e.forEach(function(o){return An(o,r)})});return ku(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||An(c,null)}),a.forEach(function(c){o.has(c)||An(c,i)})}Jr.set(n,e)},[e]),n}function $u(e){return e}function Bu(e,t){t===void 0&&(t=$u);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}}}function Wu(e){e===void 0&&(e={});var t=Bu(null);return t.options=me({async:!0,ssr:!1},e),t}var Zo=function(e){var t=e.sideCar,n=qo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};Zo.isSideCarExport=!0;function Hu(e,t){return e.useMedium(t),Zo}var Qo=Wu(),Mn=function(){},rn=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:Mn,onWheelCapture:Mn,onTouchMoveCapture:Mn}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,l=e.enabled,f=e.shards,v=e.sideCar,m=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,b=qo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=v,R=Fu([n,t]),E=me(me({},b),o);return s.createElement(s.Fragment,null,l&&s.createElement(P,{sideCar:Qo,removeScrollBar:d,shards:f,noRelative:m,noIsolation:x,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),me(me({},E),{ref:R})):s.createElement(w,me({},E,{className:u,ref:R}),c))});rn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rn.classNames={fullWidth:Dt,zeroRight:It};var eo,Gu=function(){if(eo)return eo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gu();return t&&e.setAttribute("nonce",t),e}function Vu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ku(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uu())&&(Vu(t,n),Ku(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yu=function(){var e=zu();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jo=function(){var e=Yu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xu={left:0,top:0,right:0,gap:0},On=function(e){return parseInt(e||"",10)||0},qu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[On(n),On(r),On(o)]},Zu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xu;var t=qu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qu=Jo(),it="data-scroll-locked",Ju=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Du,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
@@ -48,4 +48,4 @@ You can add a description to the \`${ze}\` by passing a \`${as}\` component as a
|
|
|
48
48
|
|
|
49
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 \`${ze}\`. 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
50
|
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},fh=Ja,ph=es,vh=ts,hh=ns,mh=is,gh=ls,xh=os,wh=ss,un="Popover",[us,yh]=q(un,[Me]),yt=Me(),[Ef,Ie]=us(un),ds=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=yt(t),u=s.useRef(null),[d,l]=s.useState(!1),[f,v]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:un});return(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ef,{scope:t,contentId:re(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>l(!0),[]),onCustomAnchorRemove:s.useCallback(()=>l(!1),[]),modal:i,children:n})})};ds.displayName=un;var fs="PopoverAnchor",ps=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(fs,n),a=yt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),(0,p.jsx)(mt,{...a,...r,ref:t})});ps.displayName=fs;var vs="PopoverTrigger",hs=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(vs,n),a=yt(n),i=D(t,o.triggerRef),c=(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ys(o.open),...r,ref:i,onClick:S(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:(0,p.jsx)(mt,{asChild:!0,...a,children:c})});hs.displayName=vs;var fr="PopoverPortal",[Rf,Pf]=us(fr,{forceMount:void 0}),ms=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ie(fr,t);return(0,p.jsx)(Rf,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ms.displayName=fr;var qe="PopoverContent",gs=s.forwardRef((e,t)=>{const n=Pf(qe,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ie(qe,e.__scopePopover);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(Tf,{...o,ref:t}):(0,p.jsx)(Af,{...o,ref:t})})});gs.displayName=qe;var _f=ke("PopoverContent.RemoveScroll"),Tf=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(null),o=D(t,r),a=s.useRef(!1);return s.useEffect(()=>{const i=r.current;if(i)return on(i)},[]),(0,p.jsx)(wt,{as:_f,allowPinchZoom:!0,children:(0,p.jsx)(xs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Af=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(xs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),xs=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:l,...f}=e,v=Ie(qe,n),m=yt(n);return nn(),(0,p.jsx)(xt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:(0,p.jsx)(Qt,{"data-state":ys(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),ws="PopoverClose",Mf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(ws,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});Mf.displayName=ws;var Of="PopoverArrow",Nf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Nf.displayName=Of;function ys(e){return e?"open":"closed"}var Ch=ds,bh=ps,Sh=hs,Eh=ms,Rh=gs,dn="Checkbox",[If,Ph]=q(dn),[Df,pr]=If(dn);function jf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:l="on",internal_do_not_use_render:f}=e,[v,m]=Q({prop:n,defaultProp:o??!1,onChange:u,caller:dn}),[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useRef(!1),C=x?!!i||!!x.closest("form"):!0,b={checked:v,disabled:a,setChecked:m,control:x,setControl:h,name:c,form:i,value:l,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:_e(o)?!1:o,isFormControl:C,bubbleInput:g,setBubbleInput:y};return(0,p.jsx)(Df,{scope:t,...b,children:Ff(f)?f(b):r})}var Cs="CheckboxTrigger",bs=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:x}=pr(Cs,e),h=D(o,l),g=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const w=()=>f(g.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,f]),(0,p.jsx)(T.button,{type:"button",role:"checkbox","aria-checked":_e(u)?"mixed":u,"aria-required":d,"data-state":Ps(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:h,onKeyDown:S(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:S(n,y=>{f(w=>_e(w)?!0:!w),x&&m&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})})});bs.displayName=Cs;var Lf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:l,...f}=e;return(0,p.jsx)(jf,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:r,form:l,value:u,internal_do_not_use_render:({isFormControl:v})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(bs,{...f,ref:t,__scopeCheckbox:n}),v&&(0,p.jsx)(Rs,{__scopeCheckbox:n})]})})});Lf.displayName=dn;var Ss="CheckboxIndicator",kf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=pr(Ss,n);return(0,p.jsx)(z,{present:r||_e(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{"data-state":Ps(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kf.displayName=Ss;var Es="CheckboxBubbleInput",Rs=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:l,form:f,bubbleInput:v,setBubbleInput:m}=pr(Es,e),x=D(n,m),h=ur(a),g=tr(r);s.useEffect(()=>{const w=v;if(!w)return;const C=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(C,"checked").set,P=!o.current;if(h!==a&&b){const R=new Event("click",{bubbles:P});w.indeterminate=_e(a),b.call(w,_e(a)?!1:a),w.dispatchEvent(R)}},[v,h,a,o]);const y=s.useRef(_e(a)?!1:a);return(0,p.jsx)(T.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:l,form:f,...t,tabIndex:-1,ref:x,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Rs.displayName=Es;function Ff(e){return typeof e=="function"}function _e(e){return e==="indeterminate"}function Ps(e){return _e(e)?"indeterminate":e?"checked":"unchecked"}var In="rovingFocusGroup.onEntryFocus",$f={bubbles:!1,cancelable:!0},Ct="RovingFocusGroup",[zn,_s,Bf]=lr(Ct),[Wf,ot]=q(Ct,[Bf]),[Hf,Gf]=Wf(Ct),Ts=s.forwardRef((e,t)=>(0,p.jsx)(zn.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(zn.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(Uf,{...e,ref:t})})}));Ts.displayName=Ct;var Uf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=e,v=s.useRef(null),m=D(t,v),x=nt(a),[h,g]=Q({prop:i,defaultProp:c??null,onChange:u,caller:Ct}),[y,w]=s.useState(!1),C=K(d),b=_s(n),P=s.useRef(!1),[R,E]=s.useState(0);return s.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(In,C),()=>M.removeEventListener(In,C)},[C]),(0,p.jsx)(Hf,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(M=>g(M),[g]),onItemShiftTab:s.useCallback(()=>w(!0),[]),onFocusableItemAdd:s.useCallback(()=>E(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>E(M=>M-1),[]),children:(0,p.jsx)(T.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{P.current=!0}),onFocus:S(e.onFocus,M=>{const A=!P.current;if(M.target===M.currentTarget&&A&&!y){const O=new CustomEvent(In,$f);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const j=b().filter(L=>L.focusable);Os([j.find(L=>L.active),j.find(L=>L.id===h),...j].filter(Boolean).map(L=>L.ref.current),l)}}P.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),As="RovingFocusGroupItem",Ms=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=re(),d=a||u,l=Gf(As,n),f=l.currentTabStopId===d,v=_s(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:h}=l;return s.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),(0,p.jsx)(zn.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:(0,p.jsx)(T.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,g=>{r?l.onItemFocus(d):g.preventDefault()}),onFocus:S(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:S(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=zf(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(g.currentTarget);w=l.loop?Yf(w,C+1):w.slice(C+1)}setTimeout(()=>Os(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});Ms.displayName=As;var Vf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zf(e,t,n){const r=Kf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vf[r]}function Os(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vr=Ts,hr=Ms,Yn=["Enter"," "],Xf=["ArrowDown","PageUp","Home"],Ns=["ArrowUp","PageDown","End"],qf=[...Xf,...Ns],Zf={ltr:[...Yn,"ArrowRight"],rtl:[...Yn,"ArrowLeft"]},Qf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[ut,Jf,ep]=lr(bt),[He,fn]=q(bt,[ep,Me,ot]),St=Me(),Is=ot(),[Ds,De]=He(bt),[tp,Et]=He(bt),js=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,c=St(t),[u,d]=s.useState(null),l=s.useRef(!1),f=K(a),v=nt(o);return s.useEffect(()=>{const m=()=>{l.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>l.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ds,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,p.jsx)(tp,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:l,dir:v,modal:i,children:r})})})};js.displayName=bt;var np="MenuAnchor",mr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(mt,{...o,...r,ref:t})});mr.displayName=np;var gr="MenuPortal",[rp,Ls]=He(gr,{forceMount:void 0}),ks=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=De(gr,t);return(0,p.jsx)(rp,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ks.displayName=gr;var ce="MenuContent",[op,xr]=He(ce),Fs=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:i.modal?(0,p.jsx)(ap,{...o,ref:t}):(0,p.jsx)(sp,{...o,ref:t})})})})}),ap=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return on(a)},[]),(0,p.jsx)(wr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),sp=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu);return(0,p.jsx)(wr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ip=ke("MenuContent.ScrollLock"),wr=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,disableOutsideScroll:x,...h}=e,g=De(ce,n),y=Et(ce,n),w=St(n),C=Is(n),b=Jf(n),[P,R]=s.useState(null),E=s.useRef(null),M=D(t,E,g.onContentChange),A=s.useRef(0),O=s.useRef(""),j=s.useRef(0),L=s.useRef(null),W=s.useRef("right"),F=s.useRef(0),H=x?wt:s.Fragment,k=x?{as:ip,allowPinchZoom:!0}:void 0,$=_=>{const U=O.current+_,te=b().filter(X=>!X.disabled),ue=document.activeElement,Ce=te.find(X=>X.ref.current===ue)?.textValue,oe=wp(te.map(X=>X.textValue),U,Ce),ae=te.find(X=>X.textValue===oe)?.ref.current;(function X(N){O.current=N,window.clearTimeout(A.current),N!==""&&(A.current=window.setTimeout(()=>X(""),1e3))})(U),ae&&setTimeout(()=>ae.focus())};s.useEffect(()=>()=>window.clearTimeout(A.current),[]),nn();const I=s.useCallback(_=>W.current===L.current?.side&&Cp(_,L.current?.area),[]);return(0,p.jsx)(op,{scope:n,searchRef:O,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(E.current?.focus(),R(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:s.useCallback(_=>{L.current=_},[]),children:(0,p.jsx)(H,{...k,children:(0,p.jsx)(xt,{asChild:!0,trapped:o,onMountAutoFocus:S(a,_=>{_.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,children:(0,p.jsx)(vr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:R,onEntryFocus:S(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(Qt,{role:"menu","aria-orientation":"vertical","data-state":ti(g.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,_=>{const U=_.target.closest("[data-radix-menu-content]")===_.currentTarget,te=_.ctrlKey||_.altKey||_.metaKey,ue=_.key.length===1;U&&(_.key==="Tab"&&_.preventDefault(),!te&&ue&&$(_.key));const Ce=E.current;if(_.target!==Ce||!qf.includes(_.key))return;_.preventDefault();const oe=b().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Ns.includes(_.key)&&oe.reverse(),gp(oe)}),onBlur:S(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:S(e.onPointerMove,dt(_=>{const U=_.target,te=F.current!==_.clientX;if(_.currentTarget.contains(U)&&te){const ue=_.clientX>F.current?"right":"left";W.current=ue,F.current=_.clientX}}))})})})})})})});Fs.displayName=ce;var cp="MenuGroup",yr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"group",...r,ref:t})});yr.displayName=cp;var lp="MenuLabel",$s=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{...r,ref:t})});$s.displayName=lp;var Ht="MenuItem",ao="menu.itemSelect",pn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),i=Et(Ht,e.__scopeMenu),c=xr(Ht,e.__scopeMenu),u=D(t,a),d=s.useRef(!1),l=()=>{const f=a.current;if(!n&&f){const v=new CustomEvent(ao,{bubbles:!0,cancelable:!0});f.addEventListener(ao,m=>r?.(m),{once:!0}),vo(f,v),v.defaultPrevented?d.current=!1:i.onClose()}};return(0,p.jsx)(Bs,{...o,ref:u,disabled:n,onClick:S(e.onClick,l),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:S(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,f=>{const v=c.searchRef.current!=="";n||v&&f.key===" "||Yn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});pn.displayName=Ht;var Bs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=xr(Ht,n),c=Is(n),u=s.useRef(null),d=D(t,u),[l,f]=s.useState(!1),[v,m]=s.useState("");return s.useEffect(()=>{const x=u.current;x&&m((x.textContent??"").trim())},[a.children]),(0,p.jsx)(ut.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:(0,p.jsx)(hr,{asChild:!0,...c,focusable:!r,children:(0,p.jsx)(T.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:S(e.onPointerMove,dt(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,dt(x=>i.onItemLeave(x))),onFocus:S(e.onFocus,()=>f(!0)),onBlur:S(e.onBlur,()=>f(!1))})})})}),up="MenuCheckboxItem",Ws=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(pn,{role:"menuitemcheckbox","aria-checked":Gt(n)?"mixed":n,...o,ref:t,"data-state":Sr(n),onSelect:S(o.onSelect,()=>r?.(Gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ws.displayName=up;var Hs="MenuRadioGroup",[dp,fp]=He(Hs,{value:void 0,onValueChange:()=>{}}),Gs=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=K(r);return(0,p.jsx)(dp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(yr,{...o,ref:t})})});Gs.displayName=Hs;var Us="MenuRadioItem",Vs=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=fp(Us,e.__scopeMenu),a=n===o.value;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(pn,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Sr(a),onSelect:S(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Vs.displayName=Us;var Cr="MenuItemIndicator",[Ks,pp]=He(Cr,{checked:!1}),zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=pp(Cr,n);return(0,p.jsx)(z,{present:r||Gt(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{...o,ref:t,"data-state":Sr(a.checked)})})});zs.displayName=Cr;var vp="MenuSeparator",Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ys.displayName=vp;var hp="MenuArrow",Xs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Xs.displayName=hp;var br="MenuSub",[mp,qs]=He(br),Zs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=De(br,t),i=St(t),[c,u]=s.useState(null),[d,l]=s.useState(null),f=K(o);return s.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,p.jsx)(ht,{...i,children:(0,p.jsx)(Ds,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:l,children:(0,p.jsx)(mp,{scope:t,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:u,children:n})})})};Zs.displayName=br;var st="MenuSubTrigger",Qs=s.forwardRef((e,t)=>{const n=De(st,e.__scopeMenu),r=Et(st,e.__scopeMenu),o=qs(st,e.__scopeMenu),a=xr(st,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},l=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>l,[l]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),(0,p.jsx)(mr,{asChild:!0,...d,children:(0,p.jsx)(Bs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ti(n.open),...e,ref:ft(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,dt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:S(e.onPointerLeave,dt(f=>{l();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,x=m==="right",h=x?-5:5,g=v[x?"left":"right"],y=v[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+h,y:f.clientY},{x:g,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:g,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,f=>{const v=a.searchRef.current!=="";e.disabled||v&&f.key===" "||Zf[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Qs.displayName=st;var Js="MenuSubContent",ei=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu),c=qs(Js,e.__scopeMenu),u=s.useRef(null),d=D(t,u);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(wr,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&u.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:S(e.onFocusOutside,l=>{l.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:S(e.onKeyDown,l=>{const f=l.currentTarget.contains(l.target),v=Qf[i.dir].includes(l.key);f&&v&&(a.onOpenChange(!1),c.trigger?.focus(),l.preventDefault())})})})})})});ei.displayName=Js;function ti(e){return e?"open":"closed"}function Gt(e){return e==="indeterminate"}function Sr(e){return Gt(e)?"indeterminate":e?"checked":"unchecked"}function gp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wp(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xp(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function yp(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Cp(e,t){return t?yp({x:e.clientX,y:e.clientY},t):!1}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ni=js,ri=mr,oi=ks,ai=Fs,si=yr,ii=$s,ci=pn,li=Ws,ui=Gs,di=Vs,fi=zs,pi=Ys,vi=Xs,hi=Zs,mi=Qs,gi=ei,vn="DropdownMenu",[bp,_h]=q(vn,[fn]),J=fn(),[Sp,xi]=bp(vn),wi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=J(t),d=s.useRef(null),[l,f]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:vn});return(0,p.jsx)(Sp,{scope:t,triggerId:re(),triggerRef:d,contentId:re(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:c,children:(0,p.jsx)(ni,{...u,open:l,onOpenChange:f,dir:r,modal:c,children:n})})};wi.displayName=vn;var yi="DropdownMenuTrigger",Ci=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=xi(yi,n),i=J(n);return(0,p.jsx)(ri,{asChild:!0,...i,children:(0,p.jsx)(T.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ft(t,a.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ci.displayName=yi;var Ep="DropdownMenuPortal",bi=e=>{const{__scopeDropdownMenu:t,...n}=e,r=J(t);return(0,p.jsx)(oi,{...r,...n})};bi.displayName=Ep;var Si="DropdownMenuContent",Ei=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xi(Si,n),a=J(n),i=s.useRef(!1);return(0,p.jsx)(ai,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!o.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ei.displayName=Si;var Rp="DropdownMenuGroup",Ri=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(si,{...o,...r,ref:t})});Ri.displayName=Rp;var Pp="DropdownMenuLabel",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});_p.displayName=Pp;var Tp="DropdownMenuItem",Pi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Pi.displayName=Tp;var Ap="DropdownMenuCheckboxItem",_i=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(li,{...o,...r,ref:t})});_i.displayName=Ap;var Mp="DropdownMenuRadioGroup",Op=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});Op.displayName=Mp;var Np="DropdownMenuRadioItem",Ip=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(di,{...o,...r,ref:t})});Ip.displayName=Np;var Dp="DropdownMenuItemIndicator",Ti=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ti.displayName=Dp;var jp="DropdownMenuSeparator",Ai=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Ai.displayName=jp;var Lp="DropdownMenuArrow",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});kp.displayName=Lp;var Fp=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=J(t),[c,u]=Q({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})},$p="DropdownMenuSubTrigger",Mi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});Mi.displayName=$p;var Bp="DropdownMenuSubContent",Oi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(gi,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oi.displayName=Bp;var Th=wi,Ah=Ci,Mh=bi,Oh=Ei,Nh=Ri,Ih=Pi,Dh=_i,jh=Ti,Lh=Ai,kh=Fp,Fh=Mi,$h=Oi;function Wp(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var Er="ScrollArea",[Ni,Bh]=q(Er),[Hp,le]=Ni(Er),Ii=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,u]=s.useState(null),[d,l]=s.useState(null),[f,v]=s.useState(null),[m,x]=s.useState(null),[h,g]=s.useState(null),[y,w]=s.useState(0),[C,b]=s.useState(0),[P,R]=s.useState(!1),[E,M]=s.useState(!1),A=D(t,j=>u(j)),O=nt(o);return(0,p.jsx)(Hp,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:l,content:f,onContentChange:v,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:P,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:M,onCornerWidthChange:w,onCornerHeightChange:b,children:(0,p.jsx)(T.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Ii.displayName=Er;var Di="ScrollAreaViewport",ji=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=le(Di,n),c=s.useRef(null),u=D(t,c,i.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.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:o}),(0,p.jsx)(T.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ji.displayName=Di;var ye="ScrollAreaScrollbar",Gp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return s.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?(0,p.jsx)(Up,{...r,ref:t,forceMount:n}):o.type==="scroll"?(0,p.jsx)(Vp,{...r,ref:t,forceMount:n}):o.type==="auto"?(0,p.jsx)(Li,{...r,ref:t,forceMount:n}):o.type==="always"?(0,p.jsx)(Rr,{...r,ref:t}):null});Gp.displayName=ye;var Up=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),[a,i]=s.useState(!1);return s.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const d=()=>{window.clearTimeout(u),i(!0)},l=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",l),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",l)}}},[o.scrollArea,o.scrollHideDelay]),(0,p.jsx)(z,{present:n||a,children:(0,p.jsx)(Li,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Vp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),a=e.orientation==="horizontal",i=mn(()=>u("SCROLL_END"),100),[c,u]=Wp("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 s.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,u]),s.useEffect(()=>{const d=o.viewport,l=a?"scrollLeft":"scrollTop";if(d){let f=d[l];const v=()=>{const m=d[l];f!==m&&(u("SCROLL"),i()),f=m};return d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[o.viewport,a,u,i]),(0,p.jsx)(z,{present:n||c!=="hidden",children:(0,p.jsx)(Rr,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:S(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Li=s.forwardRef((e,t)=>{const n=le(ye,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=s.useState(!1),c=e.orientation==="horizontal",u=mn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,l=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:l)}},10);return Ze(n.viewport,u),Ze(n.content,u),(0,p.jsx)(z,{present:r||a,children:(0,p.jsx)(Rr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Rr=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=le(ye,e.__scopeScrollArea),a=s.useRef(null),i=s.useRef(0),[c,u]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Bi(c.viewport,c.content),l={...r,sizes:c,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:v=>a.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function f(v,m){return Qp(v,i.current,c,m)}return n==="horizontal"?(0,p.jsx)(Kp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollLeft,m=so(v,c,o.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=f(v,o.dir))}}):n==="vertical"?(0,p.jsx)(zp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollTop,m=so(v,c);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=f(v))}}):null}),Kp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarXChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.x),onDragScroll:l=>e.onDragScroll(l.x),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollLeft+l.deltaX;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Vt(i.paddingLeft),paddingEnd:Vt(i.paddingRight)}})}})}),zp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarYChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.y),onDragScroll:l=>e.onDragScroll(l.y),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollTop+l.deltaY;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Vt(i.paddingTop),paddingEnd:Vt(i.paddingBottom)}})}})}),[Yp,ki]=Ni(ye),Fi=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:l,onResize:f,...v}=e,m=le(ye,n),[x,h]=s.useState(null),g=D(t,A=>h(A)),y=s.useRef(null),w=s.useRef(""),C=m.viewport,b=r.content-r.viewport,P=K(l),R=K(u),E=mn(f,10);function M(A){if(y.current){const O=A.clientX-y.current.left,j=A.clientY-y.current.top;d({x:O,y:j})}}return s.useEffect(()=>{const A=O=>{const j=O.target;x?.contains(j)&&P(O,b)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[C,x,b,P]),s.useEffect(R,[r,R]),Ze(x,E),Ze(m.content,E),(0,p.jsx)(Yp,{scope:n,scrollbar:x,hasThumb:o,onThumbChange:K(a),onThumbPointerUp:K(i),onThumbPositionChange:R,onThumbPointerDown:K(c),children:(0,p.jsx)(T.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),M(A))}),onPointerMove:S(e.onPointerMove,M),onPointerUp:S(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Ut="ScrollAreaThumb",Xp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ki(Ut,e.__scopeScrollArea);return(0,p.jsx)(z,{present:n||o.hasThumb,children:(0,p.jsx)(qp,{ref:t,...r})})}),qp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=le(Ut,n),i=ki(Ut,n),{onThumbPositionChange:c}=i,u=D(t,f=>i.onThumbChange(f)),d=s.useRef(void 0),l=mn(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const f=a.viewport;if(f){const v=()=>{if(l(),!d.current){const m=Jp(f,c);d.current=m,c()}};return c(),f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[a.viewport,l,c]),(0,p.jsx)(T.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:S(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),m=f.clientX-v.left,x=f.clientY-v.top;i.onThumbPointerDown({x:m,y:x})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Xp.displayName=Ut;var Pr="ScrollAreaCorner",$i=s.forwardRef((e,t)=>{const n=le(Pr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?(0,p.jsx)(Zp,{...e,ref:t}):null});$i.displayName=Pr;var Zp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=le(Pr,n),[a,i]=s.useState(0),[c,u]=s.useState(0),d=!!(a&&c);return Ze(o.scrollbarX,()=>{const l=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(l),u(l)}),Ze(o.scrollbarY,()=>{const l=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(l),i(l)}),d?(0,p.jsx)(T.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Vt(e){return e?parseInt(e,10):0}function Bi(e,t){const n=e/t;return isNaN(n)?0:n}function hn(e){const t=Bi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Qp(e,t,n,r="ltr"){const o=hn(n),a=o/2,i=t||a,c=o-i,u=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,l=n.content-n.viewport,f=r==="ltr"?[0,l]:[l*-1,0];return Wi([u,d],f)(e)}function so(e,t,n="ltr"){const r=hn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,u=n==="ltr"?[0,i]:[i*-1,0],d=Wn(e,u);return Wi([0,i],[0,c])(d)}function Wi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Hi(e,t){return e>0&&e<t}var Jp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function mn(e,t){const n=K(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ze(e,t){const n=K(t);Y(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Wh=Ii,Hh=ji,Gh=$i,gn="Switch",[ev,Uh]=q(gn),[tv,nv]=ev(gn),Gi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u="on",onCheckedChange:d,form:l,...f}=e,[v,m]=s.useState(null),x=D(t,C=>m(C)),h=s.useRef(!1),g=v?l||!!v.closest("form"):!0,[y,w]=Q({prop:o,defaultProp:a??!1,onChange:d,caller:gn});return(0,p.jsxs)(tv,{scope:n,checked:y,disabled:c,children:[(0,p.jsx)(T.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":zi(y),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:x,onClick:S(e.onClick,C=>{w(b=>!b),g&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),g&&(0,p.jsx)(Ki,{control:v,bubbles:!h.current,name:r,value:u,checked:y,required:i,disabled:c,form:l,style:{transform:"translateX(-100%)"}})]})});Gi.displayName=gn;var Ui="SwitchThumb",Vi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nv(Ui,n);return(0,p.jsx)(T.span,{"data-state":zi(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Vi.displayName=Ui;var rv="SwitchBubbleInput",Ki=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=s.useRef(null),c=D(i,a),u=ur(n),d=tr(t);return s.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&v){const m=new Event("click",{bubbles:r});v.call(l,n),l.dispatchEvent(m)}},[u,n,r]),(0,p.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ki.displayName=rv;function zi(e){return e?"checked":"unchecked"}var Vh=Gi,Kh=Vi,xn="Tabs",[ov,zh]=q(xn,[ot]),Yi=ot(),[av,_r]=ov(xn),Xi=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...d}=e,l=nt(c),[f,v]=Q({prop:r,onChange:o,defaultProp:a??"",caller:xn});return(0,p.jsx)(av,{scope:n,baseId:re(),value:f,onValueChange:v,orientation:i,dir:l,activationMode:u,children:(0,p.jsx)(T.div,{dir:l,"data-orientation":i,...d,ref:t})})});Xi.displayName=xn;var qi="TabsList",Zi=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_r(qi,n),i=Yi(n);return(0,p.jsx)(vr,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,p.jsx)(T.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Zi.displayName=qi;var Qi="TabsTrigger",Ji=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_r(Qi,n),c=Yi(n),u=nc(i.baseId,r),d=rc(i.baseId,r),l=r===i.value;return(0,p.jsx)(hr,{asChild:!0,...c,focusable:!o,active:l,children:(0,p.jsx)(T.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":d,"data-state":l?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:S(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:S(e.onFocus,()=>{const f=i.activationMode!=="manual";!l&&!o&&f&&i.onValueChange(r)})})})});Ji.displayName=Qi;var ec="TabsContent",tc=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=_r(ec,n),u=nc(c.baseId,r),d=rc(c.baseId,r),l=r===c.value,f=s.useRef(l);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),(0,p.jsx)(z,{present:o||l,children:({present:v})=>(0,p.jsx)(T.div,{"data-state":l?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});tc.displayName=ec;function nc(e,t){return`${e}-trigger-${t}`}function rc(e,t){return`${e}-content-${t}`}var Yh=Xi,Xh=Zi,qh=Ji,Zh=tc,sv="Separator",io="horizontal",iv=["horizontal","vertical"],oc=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=io,...o}=e,a=cv(r)?r:io,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p.jsx)(Ea.div,{"data-orientation":a,...i,...o,ref:t})});oc.displayName=sv;function cv(e){return iv.includes(e)}var Qh=oc,ac="Toggle",Tr=s.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,c]=Q({prop:n,onChange:o,defaultProp:r??!1,caller:ac});return(0,p.jsx)(T.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Tr.displayName=ac;var Jh=Tr,je="ToggleGroup",[sc,em]=q(je,[ot]),ic=ot(),Ar=s.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single")return(0,p.jsx)(lv,{...r,ref:t});if(n==="multiple")return(0,p.jsx)(uv,{...r,ref:t});throw new Error(`Missing prop \`type\` expected on \`${je}\``)});Ar.displayName=je;var[cc,lc]=sc(je),lv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??"",onChange:o,caller:je});return(0,p.jsx)(cc,{scope:e.__scopeToggleGroup,type:"single",value:s.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:s.useCallback(()=>c(""),[c]),children:(0,p.jsx)(uc,{...a,ref:t})})}),uv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??[],onChange:o,caller:je}),u=s.useCallback(l=>c((f=[])=>[...f,l]),[c]),d=s.useCallback(l=>c((f=[])=>f.filter(v=>v!==l)),[c]);return(0,p.jsx)(cc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:(0,p.jsx)(uc,{...a,ref:t})})});Ar.displayName=je;var[dv,fv]=sc(je),uc=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:c=!0,...u}=e,d=ic(n),l=nt(i),f={role:"group",dir:l,...u};return(0,p.jsx)(dv,{scope:n,rovingFocus:o,disabled:r,children:o?(0,p.jsx)(vr,{asChild:!0,...d,orientation:a,dir:l,loop:c,children:(0,p.jsx)(T.div,{...f,ref:t})}):(0,p.jsx)(T.div,{...f,ref:t})})}),Kt="ToggleGroupItem",dc=s.forwardRef((e,t)=>{const n=lc(Kt,e.__scopeToggleGroup),r=fv(Kt,e.__scopeToggleGroup),o=ic(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,c={...e,pressed:a,disabled:i},u=s.useRef(null);return r.rovingFocus?(0,p.jsx)(hr,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:(0,p.jsx)(co,{...c,ref:t})}):(0,p.jsx)(co,{...c,ref:t})});dc.displayName=Kt;var co=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=lc(Kt,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=a.type==="single"?i:void 0;return(0,p.jsx)(Tr,{...c,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),tm=Ar,nm=dc,wn="Collapsible",[pv,rm]=q(wn),[vv,Mr]=pv(wn),fc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[u,d]=Q({prop:r,defaultProp:o??!1,onChange:i,caller:wn});return(0,p.jsx)(vv,{scope:n,disabled:a,contentId:re(),open:u,onOpenToggle:s.useCallback(()=>d(l=>!l),[d]),children:(0,p.jsx)(T.div,{"data-state":Nr(u),"data-disabled":a?"":void 0,...c,ref:t})})});fc.displayName=wn;var pc="CollapsibleTrigger",vc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Mr(pc,n);return(0,p.jsx)(T.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Nr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:S(e.onClick,o.onOpenToggle)})});vc.displayName=pc;var Or="CollapsibleContent",hc=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Mr(Or,e.__scopeCollapsible);return(0,p.jsx)(z,{present:n||o.open,children:({present:a})=>(0,p.jsx)(hv,{...r,ref:t,present:a})})});hc.displayName=Or;var hv=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Mr(Or,n),[c,u]=s.useState(r),d=s.useRef(null),l=D(t,d),f=s.useRef(0),v=f.current,m=s.useRef(0),x=m.current,h=i.open||c,g=s.useRef(h),y=s.useRef(void 0);return s.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Y(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,m.current=C.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[i.open,r]),(0,p.jsx)(T.div,{"data-state":Nr(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:l,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:h&&o})});function Nr(e){return e?"open":"closed"}var om=fc,am=vc,sm=hc,Ir="ContextMenu",[mv,im]=q(Ir,[fn]),ee=fn(),[gv,mc]=mv(Ir),gc=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[i,c]=s.useState(!1),u=ee(t),d=K(r),l=s.useCallback(f=>{c(f),d(f)},[d]);return(0,p.jsx)(gv,{scope:t,open:i,onOpenChange:l,modal:a,children:(0,p.jsx)(ni,{...u,dir:o,open:i,onOpenChange:l,modal:a,children:n})})};gc.displayName=Ir;var xc="ContextMenuTrigger",wc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=mc(xc,n),i=ee(n),c=s.useRef({x:0,y:0}),u=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=s.useRef(0),l=s.useCallback(()=>window.clearTimeout(d.current),[]),f=v=>{c.current={x:v.clientX,y:v.clientY},a.onOpenChange(!0)};return s.useEffect(()=>l,[l]),s.useEffect(()=>{r&&l()},[r,l]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ri,{...i,virtualRef:u}),(0,p.jsx)(T.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,v=>{l(),f(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,Ot(v=>{l(),d.current=window.setTimeout(()=>f(v),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,Ot(l)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,Ot(l)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,Ot(l))})]})});wc.displayName=xc;var xv="ContextMenuPortal",yc=e=>{const{__scopeContextMenu:t,...n}=e,r=ee(t);return(0,p.jsx)(oi,{...r,...n})};yc.displayName=xv;var Cc="ContextMenuContent",bc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=mc(Cc,n),a=ee(n),i=s.useRef(!1);return(0,p.jsx)(ai,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&i.current&&c.preventDefault(),i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(i.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)"}})});bc.displayName=Cc;var wv="ContextMenuGroup",yv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(si,{...o,...r,ref:t})});yv.displayName=wv;var Cv="ContextMenuLabel",bv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});bv.displayName=Cv;var Sv="ContextMenuItem",Sc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Sc.displayName=Sv;var Ev="ContextMenuCheckboxItem",Rv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(li,{...o,...r,ref:t})});Rv.displayName=Ev;var Pv="ContextMenuRadioGroup",_v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});_v.displayName=Pv;var Tv="ContextMenuRadioItem",Av=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(di,{...o,...r,ref:t})});Av.displayName=Tv;var Mv="ContextMenuItemIndicator",Ov=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ov.displayName=Mv;var Nv="ContextMenuSeparator",Ec=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Ec.displayName=Nv;var Iv="ContextMenuArrow",Dv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});Dv.displayName=Iv;var Rc="ContextMenuSub",jv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,i=ee(t),[c,u]=Q({prop:o,defaultProp:a??!1,onChange:r,caller:Rc});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})};jv.displayName=Rc;var Lv="ContextMenuSubTrigger",kv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});kv.displayName=Lv;var Fv="ContextMenuSubContent",$v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(gi,{...o,...r,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)"}})});$v.displayName=Fv;function Ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var cm=gc,lm=wc,um=yc,dm=bc,fm=Sc,pm=Ec;export{nh as $,Mh as A,Ac as At,Rh as B,Xp as C,zv as Ct,Nh as D,Q as Dt,Oh as E,Kv as Et,Fh as F,gh as G,Ch as H,Ah as I,vh as J,hh as K,Lf as L,Lh as M,kh as N,Ih as O,re as Ot,$h as P,oh as Q,kf as R,Gp as S,Yv as St,Dh as T,Vv as Tt,Sh as U,Eh as V,mh as W,fh as X,ph as Y,xh as Z,qh as _,Md as _t,pm as a,uh as at,Gh as b,Ad as bt,om as c,th as ct,tm as d,Ea as dt,sh as et,Jh as f,qv as ft,Yh as g,Od as gt,Xh as h,Dd as ht,cm as i,Jv as it,Th as j,_c as jt,jh as k,ft as kt,am as l,ah as lt,Zh as m,Nd as mt,fm as n,ih as nt,lm as o,lh as ot,Qh as p,Ca as pt,wh as q,um as r,rh as rt,sm as s,eh as st,dm as t,ch as tt,nm as u,Zv as ut,Vh as v,Td as vt,Hh as w,Uv as wt,Wh as x,Xv as xt,Kh as y,Id as yt,bh as z};
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},fh=Ja,ph=es,vh=ts,hh=ns,mh=is,gh=ls,xh=os,wh=ss,un="Popover",[us,yh]=q(un,[Me]),yt=Me(),[Ef,Ie]=us(un),ds=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=yt(t),u=s.useRef(null),[d,l]=s.useState(!1),[f,v]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:un});return(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ef,{scope:t,contentId:re(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>l(!0),[]),onCustomAnchorRemove:s.useCallback(()=>l(!1),[]),modal:i,children:n})})};ds.displayName=un;var fs="PopoverAnchor",ps=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(fs,n),a=yt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),(0,p.jsx)(mt,{...a,...r,ref:t})});ps.displayName=fs;var vs="PopoverTrigger",hs=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(vs,n),a=yt(n),i=D(t,o.triggerRef),c=(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ys(o.open),...r,ref:i,onClick:S(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:(0,p.jsx)(mt,{asChild:!0,...a,children:c})});hs.displayName=vs;var fr="PopoverPortal",[Rf,Pf]=us(fr,{forceMount:void 0}),ms=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ie(fr,t);return(0,p.jsx)(Rf,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ms.displayName=fr;var qe="PopoverContent",gs=s.forwardRef((e,t)=>{const n=Pf(qe,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ie(qe,e.__scopePopover);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(Tf,{...o,ref:t}):(0,p.jsx)(Af,{...o,ref:t})})});gs.displayName=qe;var _f=ke("PopoverContent.RemoveScroll"),Tf=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(null),o=D(t,r),a=s.useRef(!1);return s.useEffect(()=>{const i=r.current;if(i)return on(i)},[]),(0,p.jsx)(wt,{as:_f,allowPinchZoom:!0,children:(0,p.jsx)(xs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Af=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(xs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),xs=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:l,...f}=e,v=Ie(qe,n),m=yt(n);return nn(),(0,p.jsx)(xt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:(0,p.jsx)(Qt,{"data-state":ys(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),ws="PopoverClose",Mf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(ws,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});Mf.displayName=ws;var Of="PopoverArrow",Nf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Nf.displayName=Of;function ys(e){return e?"open":"closed"}var Ch=ds,bh=ps,Sh=hs,Eh=ms,Rh=gs,dn="Checkbox",[If,Ph]=q(dn),[Df,pr]=If(dn);function jf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:l="on",internal_do_not_use_render:f}=e,[v,m]=Q({prop:n,defaultProp:o??!1,onChange:u,caller:dn}),[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useRef(!1),C=x?!!i||!!x.closest("form"):!0,b={checked:v,disabled:a,setChecked:m,control:x,setControl:h,name:c,form:i,value:l,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:_e(o)?!1:o,isFormControl:C,bubbleInput:g,setBubbleInput:y};return(0,p.jsx)(Df,{scope:t,...b,children:Ff(f)?f(b):r})}var Cs="CheckboxTrigger",bs=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:x}=pr(Cs,e),h=D(o,l),g=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const w=()=>f(g.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,f]),(0,p.jsx)(T.button,{type:"button",role:"checkbox","aria-checked":_e(u)?"mixed":u,"aria-required":d,"data-state":Ps(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:h,onKeyDown:S(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:S(n,y=>{f(w=>_e(w)?!0:!w),x&&m&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})})});bs.displayName=Cs;var Lf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:l,...f}=e;return(0,p.jsx)(jf,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:r,form:l,value:u,internal_do_not_use_render:({isFormControl:v})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(bs,{...f,ref:t,__scopeCheckbox:n}),v&&(0,p.jsx)(Rs,{__scopeCheckbox:n})]})})});Lf.displayName=dn;var Ss="CheckboxIndicator",kf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=pr(Ss,n);return(0,p.jsx)(z,{present:r||_e(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{"data-state":Ps(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kf.displayName=Ss;var Es="CheckboxBubbleInput",Rs=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:l,form:f,bubbleInput:v,setBubbleInput:m}=pr(Es,e),x=D(n,m),h=ur(a),g=tr(r);s.useEffect(()=>{const w=v;if(!w)return;const C=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(C,"checked").set,P=!o.current;if(h!==a&&b){const R=new Event("click",{bubbles:P});w.indeterminate=_e(a),b.call(w,_e(a)?!1:a),w.dispatchEvent(R)}},[v,h,a,o]);const y=s.useRef(_e(a)?!1:a);return(0,p.jsx)(T.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:l,form:f,...t,tabIndex:-1,ref:x,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Rs.displayName=Es;function Ff(e){return typeof e=="function"}function _e(e){return e==="indeterminate"}function Ps(e){return _e(e)?"indeterminate":e?"checked":"unchecked"}var In="rovingFocusGroup.onEntryFocus",$f={bubbles:!1,cancelable:!0},Ct="RovingFocusGroup",[zn,_s,Bf]=lr(Ct),[Wf,ot]=q(Ct,[Bf]),[Hf,Gf]=Wf(Ct),Ts=s.forwardRef((e,t)=>(0,p.jsx)(zn.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(zn.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(Uf,{...e,ref:t})})}));Ts.displayName=Ct;var Uf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=e,v=s.useRef(null),m=D(t,v),x=nt(a),[h,g]=Q({prop:i,defaultProp:c??null,onChange:u,caller:Ct}),[y,w]=s.useState(!1),C=K(d),b=_s(n),P=s.useRef(!1),[R,E]=s.useState(0);return s.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(In,C),()=>M.removeEventListener(In,C)},[C]),(0,p.jsx)(Hf,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(M=>g(M),[g]),onItemShiftTab:s.useCallback(()=>w(!0),[]),onFocusableItemAdd:s.useCallback(()=>E(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>E(M=>M-1),[]),children:(0,p.jsx)(T.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{P.current=!0}),onFocus:S(e.onFocus,M=>{const A=!P.current;if(M.target===M.currentTarget&&A&&!y){const O=new CustomEvent(In,$f);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const j=b().filter(L=>L.focusable);Os([j.find(L=>L.active),j.find(L=>L.id===h),...j].filter(Boolean).map(L=>L.ref.current),l)}}P.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),As="RovingFocusGroupItem",Ms=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=re(),d=a||u,l=Gf(As,n),f=l.currentTabStopId===d,v=_s(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:h}=l;return s.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),(0,p.jsx)(zn.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:(0,p.jsx)(T.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,g=>{r?l.onItemFocus(d):g.preventDefault()}),onFocus:S(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:S(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=zf(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(g.currentTarget);w=l.loop?Yf(w,C+1):w.slice(C+1)}setTimeout(()=>Os(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});Ms.displayName=As;var Vf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zf(e,t,n){const r=Kf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vf[r]}function Os(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vr=Ts,hr=Ms,Yn=["Enter"," "],Xf=["ArrowDown","PageUp","Home"],Ns=["ArrowUp","PageDown","End"],qf=[...Xf,...Ns],Zf={ltr:[...Yn,"ArrowRight"],rtl:[...Yn,"ArrowLeft"]},Qf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[ut,Jf,ep]=lr(bt),[He,fn]=q(bt,[ep,Me,ot]),St=Me(),Is=ot(),[Ds,De]=He(bt),[tp,Et]=He(bt),js=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,c=St(t),[u,d]=s.useState(null),l=s.useRef(!1),f=K(a),v=nt(o);return s.useEffect(()=>{const m=()=>{l.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>l.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ds,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,p.jsx)(tp,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:l,dir:v,modal:i,children:r})})})};js.displayName=bt;var np="MenuAnchor",mr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(mt,{...o,...r,ref:t})});mr.displayName=np;var gr="MenuPortal",[rp,Ls]=He(gr,{forceMount:void 0}),ks=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=De(gr,t);return(0,p.jsx)(rp,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ks.displayName=gr;var ce="MenuContent",[op,xr]=He(ce),Fs=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:i.modal?(0,p.jsx)(ap,{...o,ref:t}):(0,p.jsx)(sp,{...o,ref:t})})})})}),ap=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return on(a)},[]),(0,p.jsx)(wr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),sp=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu);return(0,p.jsx)(wr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ip=ke("MenuContent.ScrollLock"),wr=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,disableOutsideScroll:x,...h}=e,g=De(ce,n),y=Et(ce,n),w=St(n),C=Is(n),b=Jf(n),[P,R]=s.useState(null),E=s.useRef(null),M=D(t,E,g.onContentChange),A=s.useRef(0),O=s.useRef(""),j=s.useRef(0),L=s.useRef(null),W=s.useRef("right"),F=s.useRef(0),H=x?wt:s.Fragment,k=x?{as:ip,allowPinchZoom:!0}:void 0,$=_=>{const U=O.current+_,te=b().filter(X=>!X.disabled),ue=document.activeElement,Ce=te.find(X=>X.ref.current===ue)?.textValue,oe=wp(te.map(X=>X.textValue),U,Ce),ae=te.find(X=>X.textValue===oe)?.ref.current;(function X(N){O.current=N,window.clearTimeout(A.current),N!==""&&(A.current=window.setTimeout(()=>X(""),1e3))})(U),ae&&setTimeout(()=>ae.focus())};s.useEffect(()=>()=>window.clearTimeout(A.current),[]),nn();const I=s.useCallback(_=>W.current===L.current?.side&&Cp(_,L.current?.area),[]);return(0,p.jsx)(op,{scope:n,searchRef:O,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(E.current?.focus(),R(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:s.useCallback(_=>{L.current=_},[]),children:(0,p.jsx)(H,{...k,children:(0,p.jsx)(xt,{asChild:!0,trapped:o,onMountAutoFocus:S(a,_=>{_.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,children:(0,p.jsx)(vr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:R,onEntryFocus:S(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(Qt,{role:"menu","aria-orientation":"vertical","data-state":ti(g.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,_=>{const U=_.target.closest("[data-radix-menu-content]")===_.currentTarget,te=_.ctrlKey||_.altKey||_.metaKey,ue=_.key.length===1;U&&(_.key==="Tab"&&_.preventDefault(),!te&&ue&&$(_.key));const Ce=E.current;if(_.target!==Ce||!qf.includes(_.key))return;_.preventDefault();const oe=b().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Ns.includes(_.key)&&oe.reverse(),gp(oe)}),onBlur:S(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:S(e.onPointerMove,dt(_=>{const U=_.target,te=F.current!==_.clientX;if(_.currentTarget.contains(U)&&te){const ue=_.clientX>F.current?"right":"left";W.current=ue,F.current=_.clientX}}))})})})})})})});Fs.displayName=ce;var cp="MenuGroup",yr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"group",...r,ref:t})});yr.displayName=cp;var lp="MenuLabel",$s=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{...r,ref:t})});$s.displayName=lp;var Ht="MenuItem",ao="menu.itemSelect",pn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),i=Et(Ht,e.__scopeMenu),c=xr(Ht,e.__scopeMenu),u=D(t,a),d=s.useRef(!1),l=()=>{const f=a.current;if(!n&&f){const v=new CustomEvent(ao,{bubbles:!0,cancelable:!0});f.addEventListener(ao,m=>r?.(m),{once:!0}),vo(f,v),v.defaultPrevented?d.current=!1:i.onClose()}};return(0,p.jsx)(Bs,{...o,ref:u,disabled:n,onClick:S(e.onClick,l),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:S(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,f=>{const v=c.searchRef.current!=="";n||v&&f.key===" "||Yn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});pn.displayName=Ht;var Bs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=xr(Ht,n),c=Is(n),u=s.useRef(null),d=D(t,u),[l,f]=s.useState(!1),[v,m]=s.useState("");return s.useEffect(()=>{const x=u.current;x&&m((x.textContent??"").trim())},[a.children]),(0,p.jsx)(ut.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:(0,p.jsx)(hr,{asChild:!0,...c,focusable:!r,children:(0,p.jsx)(T.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:S(e.onPointerMove,dt(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,dt(x=>i.onItemLeave(x))),onFocus:S(e.onFocus,()=>f(!0)),onBlur:S(e.onBlur,()=>f(!1))})})})}),up="MenuCheckboxItem",Ws=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(pn,{role:"menuitemcheckbox","aria-checked":Gt(n)?"mixed":n,...o,ref:t,"data-state":Sr(n),onSelect:S(o.onSelect,()=>r?.(Gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ws.displayName=up;var Hs="MenuRadioGroup",[dp,fp]=He(Hs,{value:void 0,onValueChange:()=>{}}),Gs=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=K(r);return(0,p.jsx)(dp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(yr,{...o,ref:t})})});Gs.displayName=Hs;var Us="MenuRadioItem",Vs=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=fp(Us,e.__scopeMenu),a=n===o.value;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(pn,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Sr(a),onSelect:S(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Vs.displayName=Us;var Cr="MenuItemIndicator",[Ks,pp]=He(Cr,{checked:!1}),zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=pp(Cr,n);return(0,p.jsx)(z,{present:r||Gt(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{...o,ref:t,"data-state":Sr(a.checked)})})});zs.displayName=Cr;var vp="MenuSeparator",Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ys.displayName=vp;var hp="MenuArrow",Xs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Xs.displayName=hp;var br="MenuSub",[mp,qs]=He(br),Zs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=De(br,t),i=St(t),[c,u]=s.useState(null),[d,l]=s.useState(null),f=K(o);return s.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,p.jsx)(ht,{...i,children:(0,p.jsx)(Ds,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:l,children:(0,p.jsx)(mp,{scope:t,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:u,children:n})})})};Zs.displayName=br;var st="MenuSubTrigger",Qs=s.forwardRef((e,t)=>{const n=De(st,e.__scopeMenu),r=Et(st,e.__scopeMenu),o=qs(st,e.__scopeMenu),a=xr(st,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},l=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>l,[l]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),(0,p.jsx)(mr,{asChild:!0,...d,children:(0,p.jsx)(Bs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ti(n.open),...e,ref:ft(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,dt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:S(e.onPointerLeave,dt(f=>{l();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,x=m==="right",h=x?-5:5,g=v[x?"left":"right"],y=v[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+h,y:f.clientY},{x:g,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:g,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,f=>{const v=a.searchRef.current!=="";e.disabled||v&&f.key===" "||Zf[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Qs.displayName=st;var Js="MenuSubContent",ei=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu),c=qs(Js,e.__scopeMenu),u=s.useRef(null),d=D(t,u);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(wr,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&u.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:S(e.onFocusOutside,l=>{l.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:S(e.onKeyDown,l=>{const f=l.currentTarget.contains(l.target),v=Qf[i.dir].includes(l.key);f&&v&&(a.onOpenChange(!1),c.trigger?.focus(),l.preventDefault())})})})})})});ei.displayName=Js;function ti(e){return e?"open":"closed"}function Gt(e){return e==="indeterminate"}function Sr(e){return Gt(e)?"indeterminate":e?"checked":"unchecked"}function gp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wp(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xp(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function yp(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Cp(e,t){return t?yp({x:e.clientX,y:e.clientY},t):!1}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ni=js,ri=mr,oi=ks,ai=Fs,si=yr,ii=$s,ci=pn,li=Ws,ui=Gs,di=Vs,fi=zs,pi=Ys,vi=Xs,hi=Zs,mi=Qs,gi=ei,vn="DropdownMenu",[bp,_h]=q(vn,[fn]),J=fn(),[Sp,xi]=bp(vn),wi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=J(t),d=s.useRef(null),[l,f]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:vn});return(0,p.jsx)(Sp,{scope:t,triggerId:re(),triggerRef:d,contentId:re(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:c,children:(0,p.jsx)(ni,{...u,open:l,onOpenChange:f,dir:r,modal:c,children:n})})};wi.displayName=vn;var yi="DropdownMenuTrigger",Ci=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=xi(yi,n),i=J(n);return(0,p.jsx)(ri,{asChild:!0,...i,children:(0,p.jsx)(T.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ft(t,a.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ci.displayName=yi;var Ep="DropdownMenuPortal",bi=e=>{const{__scopeDropdownMenu:t,...n}=e,r=J(t);return(0,p.jsx)(oi,{...r,...n})};bi.displayName=Ep;var Si="DropdownMenuContent",Ei=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xi(Si,n),a=J(n),i=s.useRef(!1);return(0,p.jsx)(ai,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!o.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ei.displayName=Si;var Rp="DropdownMenuGroup",Ri=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(si,{...o,...r,ref:t})});Ri.displayName=Rp;var Pp="DropdownMenuLabel",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});_p.displayName=Pp;var Tp="DropdownMenuItem",Pi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Pi.displayName=Tp;var Ap="DropdownMenuCheckboxItem",_i=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(li,{...o,...r,ref:t})});_i.displayName=Ap;var Mp="DropdownMenuRadioGroup",Op=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});Op.displayName=Mp;var Np="DropdownMenuRadioItem",Ip=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(di,{...o,...r,ref:t})});Ip.displayName=Np;var Dp="DropdownMenuItemIndicator",Ti=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ti.displayName=Dp;var jp="DropdownMenuSeparator",Ai=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Ai.displayName=jp;var Lp="DropdownMenuArrow",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});kp.displayName=Lp;var Fp=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=J(t),[c,u]=Q({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})},$p="DropdownMenuSubTrigger",Mi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});Mi.displayName=$p;var Bp="DropdownMenuSubContent",Oi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(gi,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oi.displayName=Bp;var Th=wi,Ah=Ci,Mh=bi,Oh=Ei,Nh=Ri,Ih=Pi,Dh=_i,jh=Ti,Lh=Ai,kh=Fp,Fh=Mi,$h=Oi;function Wp(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var Er="ScrollArea",[Ni,Bh]=q(Er),[Hp,le]=Ni(Er),Ii=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,u]=s.useState(null),[d,l]=s.useState(null),[f,v]=s.useState(null),[m,x]=s.useState(null),[h,g]=s.useState(null),[y,w]=s.useState(0),[C,b]=s.useState(0),[P,R]=s.useState(!1),[E,M]=s.useState(!1),A=D(t,j=>u(j)),O=nt(o);return(0,p.jsx)(Hp,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:l,content:f,onContentChange:v,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:P,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:M,onCornerWidthChange:w,onCornerHeightChange:b,children:(0,p.jsx)(T.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Ii.displayName=Er;var Di="ScrollAreaViewport",ji=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=le(Di,n),c=s.useRef(null),u=D(t,c,i.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.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:o}),(0,p.jsx)(T.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ji.displayName=Di;var ye="ScrollAreaScrollbar",Gp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return s.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?(0,p.jsx)(Up,{...r,ref:t,forceMount:n}):o.type==="scroll"?(0,p.jsx)(Vp,{...r,ref:t,forceMount:n}):o.type==="auto"?(0,p.jsx)(Li,{...r,ref:t,forceMount:n}):o.type==="always"?(0,p.jsx)(Rr,{...r,ref:t}):null});Gp.displayName=ye;var Up=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),[a,i]=s.useState(!1);return s.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const d=()=>{window.clearTimeout(u),i(!0)},l=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",l),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",l)}}},[o.scrollArea,o.scrollHideDelay]),(0,p.jsx)(z,{present:n||a,children:(0,p.jsx)(Li,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Vp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),a=e.orientation==="horizontal",i=mn(()=>u("SCROLL_END"),100),[c,u]=Wp("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 s.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,u]),s.useEffect(()=>{const d=o.viewport,l=a?"scrollLeft":"scrollTop";if(d){let f=d[l];const v=()=>{const m=d[l];f!==m&&(u("SCROLL"),i()),f=m};return d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[o.viewport,a,u,i]),(0,p.jsx)(z,{present:n||c!=="hidden",children:(0,p.jsx)(Rr,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:S(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Li=s.forwardRef((e,t)=>{const n=le(ye,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=s.useState(!1),c=e.orientation==="horizontal",u=mn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,l=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:l)}},10);return Ze(n.viewport,u),Ze(n.content,u),(0,p.jsx)(z,{present:r||a,children:(0,p.jsx)(Rr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Rr=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=le(ye,e.__scopeScrollArea),a=s.useRef(null),i=s.useRef(0),[c,u]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Bi(c.viewport,c.content),l={...r,sizes:c,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:v=>a.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function f(v,m){return Qp(v,i.current,c,m)}return n==="horizontal"?(0,p.jsx)(Kp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollLeft,m=so(v,c,o.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=f(v,o.dir))}}):n==="vertical"?(0,p.jsx)(zp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollTop,m=so(v,c);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=f(v))}}):null}),Kp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarXChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.x),onDragScroll:l=>e.onDragScroll(l.x),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollLeft+l.deltaX;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Vt(i.paddingLeft),paddingEnd:Vt(i.paddingRight)}})}})}),zp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarYChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.y),onDragScroll:l=>e.onDragScroll(l.y),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollTop+l.deltaY;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Vt(i.paddingTop),paddingEnd:Vt(i.paddingBottom)}})}})}),[Yp,ki]=Ni(ye),Fi=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:l,onResize:f,...v}=e,m=le(ye,n),[x,h]=s.useState(null),g=D(t,A=>h(A)),y=s.useRef(null),w=s.useRef(""),C=m.viewport,b=r.content-r.viewport,P=K(l),R=K(u),E=mn(f,10);function M(A){if(y.current){const O=A.clientX-y.current.left,j=A.clientY-y.current.top;d({x:O,y:j})}}return s.useEffect(()=>{const A=O=>{const j=O.target;x?.contains(j)&&P(O,b)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[C,x,b,P]),s.useEffect(R,[r,R]),Ze(x,E),Ze(m.content,E),(0,p.jsx)(Yp,{scope:n,scrollbar:x,hasThumb:o,onThumbChange:K(a),onThumbPointerUp:K(i),onThumbPositionChange:R,onThumbPointerDown:K(c),children:(0,p.jsx)(T.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),M(A))}),onPointerMove:S(e.onPointerMove,M),onPointerUp:S(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Ut="ScrollAreaThumb",Xp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ki(Ut,e.__scopeScrollArea);return(0,p.jsx)(z,{present:n||o.hasThumb,children:(0,p.jsx)(qp,{ref:t,...r})})}),qp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=le(Ut,n),i=ki(Ut,n),{onThumbPositionChange:c}=i,u=D(t,f=>i.onThumbChange(f)),d=s.useRef(void 0),l=mn(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const f=a.viewport;if(f){const v=()=>{if(l(),!d.current){const m=Jp(f,c);d.current=m,c()}};return c(),f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[a.viewport,l,c]),(0,p.jsx)(T.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:S(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),m=f.clientX-v.left,x=f.clientY-v.top;i.onThumbPointerDown({x:m,y:x})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Xp.displayName=Ut;var Pr="ScrollAreaCorner",$i=s.forwardRef((e,t)=>{const n=le(Pr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?(0,p.jsx)(Zp,{...e,ref:t}):null});$i.displayName=Pr;var Zp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=le(Pr,n),[a,i]=s.useState(0),[c,u]=s.useState(0),d=!!(a&&c);return Ze(o.scrollbarX,()=>{const l=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(l),u(l)}),Ze(o.scrollbarY,()=>{const l=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(l),i(l)}),d?(0,p.jsx)(T.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Vt(e){return e?parseInt(e,10):0}function Bi(e,t){const n=e/t;return isNaN(n)?0:n}function hn(e){const t=Bi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Qp(e,t,n,r="ltr"){const o=hn(n),a=o/2,i=t||a,c=o-i,u=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,l=n.content-n.viewport,f=r==="ltr"?[0,l]:[l*-1,0];return Wi([u,d],f)(e)}function so(e,t,n="ltr"){const r=hn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,u=n==="ltr"?[0,i]:[i*-1,0],d=Wn(e,u);return Wi([0,i],[0,c])(d)}function Wi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Hi(e,t){return e>0&&e<t}var Jp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function mn(e,t){const n=K(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ze(e,t){const n=K(t);Y(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Wh=Ii,Hh=ji,Gh=$i,gn="Switch",[ev,Uh]=q(gn),[tv,nv]=ev(gn),Gi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u="on",onCheckedChange:d,form:l,...f}=e,[v,m]=s.useState(null),x=D(t,C=>m(C)),h=s.useRef(!1),g=v?l||!!v.closest("form"):!0,[y,w]=Q({prop:o,defaultProp:a??!1,onChange:d,caller:gn});return(0,p.jsxs)(tv,{scope:n,checked:y,disabled:c,children:[(0,p.jsx)(T.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":zi(y),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:x,onClick:S(e.onClick,C=>{w(b=>!b),g&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),g&&(0,p.jsx)(Ki,{control:v,bubbles:!h.current,name:r,value:u,checked:y,required:i,disabled:c,form:l,style:{transform:"translateX(-100%)"}})]})});Gi.displayName=gn;var Ui="SwitchThumb",Vi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nv(Ui,n);return(0,p.jsx)(T.span,{"data-state":zi(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Vi.displayName=Ui;var rv="SwitchBubbleInput",Ki=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=s.useRef(null),c=D(i,a),u=ur(n),d=tr(t);return s.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&v){const m=new Event("click",{bubbles:r});v.call(l,n),l.dispatchEvent(m)}},[u,n,r]),(0,p.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ki.displayName=rv;function zi(e){return e?"checked":"unchecked"}var Vh=Gi,Kh=Vi,xn="Tabs",[ov,zh]=q(xn,[ot]),Yi=ot(),[av,_r]=ov(xn),Xi=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...d}=e,l=nt(c),[f,v]=Q({prop:r,onChange:o,defaultProp:a??"",caller:xn});return(0,p.jsx)(av,{scope:n,baseId:re(),value:f,onValueChange:v,orientation:i,dir:l,activationMode:u,children:(0,p.jsx)(T.div,{dir:l,"data-orientation":i,...d,ref:t})})});Xi.displayName=xn;var qi="TabsList",Zi=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_r(qi,n),i=Yi(n);return(0,p.jsx)(vr,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,p.jsx)(T.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Zi.displayName=qi;var Qi="TabsTrigger",Ji=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_r(Qi,n),c=Yi(n),u=nc(i.baseId,r),d=rc(i.baseId,r),l=r===i.value;return(0,p.jsx)(hr,{asChild:!0,...c,focusable:!o,active:l,children:(0,p.jsx)(T.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":d,"data-state":l?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:S(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:S(e.onFocus,()=>{const f=i.activationMode!=="manual";!l&&!o&&f&&i.onValueChange(r)})})})});Ji.displayName=Qi;var ec="TabsContent",tc=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=_r(ec,n),u=nc(c.baseId,r),d=rc(c.baseId,r),l=r===c.value,f=s.useRef(l);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),(0,p.jsx)(z,{present:o||l,children:({present:v})=>(0,p.jsx)(T.div,{"data-state":l?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});tc.displayName=ec;function nc(e,t){return`${e}-trigger-${t}`}function rc(e,t){return`${e}-content-${t}`}var Yh=Xi,Xh=Zi,qh=Ji,Zh=tc,sv="Separator",io="horizontal",iv=["horizontal","vertical"],oc=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=io,...o}=e,a=cv(r)?r:io,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p.jsx)(Ea.div,{"data-orientation":a,...i,...o,ref:t})});oc.displayName=sv;function cv(e){return iv.includes(e)}var Qh=oc,Tr="ContextMenu",[lv,Jh]=q(Tr,[fn]),ee=fn(),[uv,ac]=lv(Tr),sc=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[i,c]=s.useState(!1),u=ee(t),d=K(r),l=s.useCallback(f=>{c(f),d(f)},[d]);return(0,p.jsx)(uv,{scope:t,open:i,onOpenChange:l,modal:a,children:(0,p.jsx)(ni,{...u,dir:o,open:i,onOpenChange:l,modal:a,children:n})})};sc.displayName=Tr;var ic="ContextMenuTrigger",cc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=ac(ic,n),i=ee(n),c=s.useRef({x:0,y:0}),u=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=s.useRef(0),l=s.useCallback(()=>window.clearTimeout(d.current),[]),f=v=>{c.current={x:v.clientX,y:v.clientY},a.onOpenChange(!0)};return s.useEffect(()=>l,[l]),s.useEffect(()=>{r&&l()},[r,l]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ri,{...i,virtualRef:u}),(0,p.jsx)(T.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,v=>{l(),f(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,Ot(v=>{l(),d.current=window.setTimeout(()=>f(v),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,Ot(l)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,Ot(l)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,Ot(l))})]})});cc.displayName=ic;var dv="ContextMenuPortal",lc=e=>{const{__scopeContextMenu:t,...n}=e,r=ee(t);return(0,p.jsx)(oi,{...r,...n})};lc.displayName=dv;var uc="ContextMenuContent",dc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ac(uc,n),a=ee(n),i=s.useRef(!1);return(0,p.jsx)(ai,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&i.current&&c.preventDefault(),i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(i.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)"}})});dc.displayName=uc;var fv="ContextMenuGroup",pv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(si,{...o,...r,ref:t})});pv.displayName=fv;var vv="ContextMenuLabel",hv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});hv.displayName=vv;var mv="ContextMenuItem",fc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});fc.displayName=mv;var gv="ContextMenuCheckboxItem",xv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(li,{...o,...r,ref:t})});xv.displayName=gv;var wv="ContextMenuRadioGroup",yv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});yv.displayName=wv;var Cv="ContextMenuRadioItem",bv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(di,{...o,...r,ref:t})});bv.displayName=Cv;var Sv="ContextMenuItemIndicator",Ev=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ev.displayName=Sv;var Rv="ContextMenuSeparator",pc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});pc.displayName=Rv;var Pv="ContextMenuArrow",_v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});_v.displayName=Pv;var vc="ContextMenuSub",Tv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,i=ee(t),[c,u]=Q({prop:o,defaultProp:a??!1,onChange:r,caller:vc});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})};Tv.displayName=vc;var Av="ContextMenuSubTrigger",Mv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});Mv.displayName=Av;var Ov="ContextMenuSubContent",Nv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(gi,{...o,...r,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)"}})});Nv.displayName=Ov;function Ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var em=sc,tm=cc,nm=lc,rm=dc,om=fc,am=pc,hc="Toggle",Ar=s.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,c]=Q({prop:n,onChange:o,defaultProp:r??!1,caller:hc});return(0,p.jsx)(T.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Ar.displayName=hc;var sm=Ar,je="ToggleGroup",[mc,im]=q(je,[ot]),gc=ot(),Mr=s.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single")return(0,p.jsx)(Iv,{...r,ref:t});if(n==="multiple")return(0,p.jsx)(Dv,{...r,ref:t});throw new Error(`Missing prop \`type\` expected on \`${je}\``)});Mr.displayName=je;var[xc,wc]=mc(je),Iv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??"",onChange:o,caller:je});return(0,p.jsx)(xc,{scope:e.__scopeToggleGroup,type:"single",value:s.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:s.useCallback(()=>c(""),[c]),children:(0,p.jsx)(yc,{...a,ref:t})})}),Dv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??[],onChange:o,caller:je}),u=s.useCallback(l=>c((f=[])=>[...f,l]),[c]),d=s.useCallback(l=>c((f=[])=>f.filter(v=>v!==l)),[c]);return(0,p.jsx)(xc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:(0,p.jsx)(yc,{...a,ref:t})})});Mr.displayName=je;var[jv,Lv]=mc(je),yc=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:c=!0,...u}=e,d=gc(n),l=nt(i),f={role:"group",dir:l,...u};return(0,p.jsx)(jv,{scope:n,rovingFocus:o,disabled:r,children:o?(0,p.jsx)(vr,{asChild:!0,...d,orientation:a,dir:l,loop:c,children:(0,p.jsx)(T.div,{...f,ref:t})}):(0,p.jsx)(T.div,{...f,ref:t})})}),Kt="ToggleGroupItem",Cc=s.forwardRef((e,t)=>{const n=wc(Kt,e.__scopeToggleGroup),r=Lv(Kt,e.__scopeToggleGroup),o=gc(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,c={...e,pressed:a,disabled:i},u=s.useRef(null);return r.rovingFocus?(0,p.jsx)(hr,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:(0,p.jsx)(co,{...c,ref:t})}):(0,p.jsx)(co,{...c,ref:t})});Cc.displayName=Kt;var co=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=wc(Kt,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=a.type==="single"?i:void 0;return(0,p.jsx)(Ar,{...c,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),cm=Mr,lm=Cc,wn="Collapsible",[kv,um]=q(wn),[Fv,Or]=kv(wn),bc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[u,d]=Q({prop:r,defaultProp:o??!1,onChange:i,caller:wn});return(0,p.jsx)(Fv,{scope:n,disabled:a,contentId:re(),open:u,onOpenToggle:s.useCallback(()=>d(l=>!l),[d]),children:(0,p.jsx)(T.div,{"data-state":Ir(u),"data-disabled":a?"":void 0,...c,ref:t})})});bc.displayName=wn;var Sc="CollapsibleTrigger",Ec=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Or(Sc,n);return(0,p.jsx)(T.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ir(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:S(e.onClick,o.onOpenToggle)})});Ec.displayName=Sc;var Nr="CollapsibleContent",Rc=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Or(Nr,e.__scopeCollapsible);return(0,p.jsx)(z,{present:n||o.open,children:({present:a})=>(0,p.jsx)($v,{...r,ref:t,present:a})})});Rc.displayName=Nr;var $v=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Or(Nr,n),[c,u]=s.useState(r),d=s.useRef(null),l=D(t,d),f=s.useRef(0),v=f.current,m=s.useRef(0),x=m.current,h=i.open||c,g=s.useRef(h),y=s.useRef(void 0);return s.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Y(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,m.current=C.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[i.open,r]),(0,p.jsx)(T.div,{"data-state":Ir(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:l,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:h&&o})});function Ir(e){return e?"open":"closed"}var dm=bc,fm=Ec,pm=Rc;export{nh as $,Mh as A,Ac as At,Rh as B,Xp as C,zv as Ct,Nh as D,Q as Dt,Oh as E,Kv as Et,Fh as F,gh as G,Ch as H,Ah as I,vh as J,hh as K,Lf as L,Lh as M,kh as N,Ih as O,re as Ot,$h as P,oh as Q,kf as R,Gp as S,Yv as St,Dh as T,Vv as Tt,Sh as U,Eh as V,mh as W,fh as X,ph as Y,xh as Z,qh as _,Md as _t,cm as a,uh as at,Gh as b,Ad as bt,om as c,th as ct,am as d,Ea as dt,sh as et,tm as f,qv as ft,Yh as g,Od as gt,Xh as h,Dd as ht,lm as i,Jv as it,Th as j,_c as jt,jh as k,ft as kt,nm as l,ah as lt,Zh as m,Nd as mt,dm as n,ih as nt,sm as o,lh as ot,Qh as p,Ca as pt,wh as q,fm as r,rh as rt,rm as s,eh as st,pm as t,ch as tt,em as u,Zv as ut,Vh as v,Td as vt,Hh as w,Uv as wt,Wh as x,Xv as xt,Kh as y,Id as yt,bh as z};
|