bazilion 0.26.0 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cli.js +5 -4
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +37 -4
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/{ChatPane-BgW59Bvn.js → ChatPane-DOV_HJg-.js} +1 -1
  6. package/dist/web/client/assets/{ConfigPage-BcjKer-E.js → ConfigPage-Dfu9DzFX.js} +1 -1
  7. package/dist/web/client/assets/{ConfirmDialog-B5BLql5H.js → ConfirmDialog-536ziJ5P.js} +1 -1
  8. package/dist/web/client/assets/{FieldRow-Dr1dDiQ6.js → FieldRow-z1JqCdqn.js} +1 -1
  9. package/dist/web/client/assets/{ResultCard-CDLhGze2.js → ResultCard-X4nTbjYY.js} +1 -1
  10. package/dist/web/client/assets/{SkillFindings-BPmVzjOa.js → SkillFindings-8LX6bYf_.js} +1 -1
  11. package/dist/web/client/assets/{SpawnDialog-CWvaYWBr.js → SpawnDialog-DoZl-yes.js} +1 -1
  12. package/dist/web/client/assets/{SpawnTeamModal-DxU7QH0e.js → SpawnTeamModal-C638hEoN.js} +1 -1
  13. package/dist/web/client/assets/{TeamForm-Bxl3s8yF.js → TeamForm-C-WzvOl4.js} +1 -1
  14. package/dist/web/client/assets/{TeamPolicyEditor-B-ikYl3V.js → TeamPolicyEditor-CSKBx0oK.js} +1 -1
  15. package/dist/web/client/assets/{UnsavedChangesGuard-CmeIPiXp.js → UnsavedChangesGuard-GC-vzw7h.js} +1 -1
  16. package/dist/web/client/assets/{_id-iXED17f-.js → _id-BKLynswT.js} +1 -1
  17. package/dist/web/client/assets/{_id-CNN1ila9.js → _id-BYM_NORr.js} +1 -1
  18. package/dist/web/client/assets/{_id-B-Vo1VkF.js → _id-Cxa98a9m.js} +1 -1
  19. package/dist/web/client/assets/{_id-CrGDqaFa.js → _id-D4hV1U1t.js} +1 -1
  20. package/dist/web/client/assets/{agent-actions-CmkRSxQg.js → agent-actions-CXQCoxKO.js} +1 -1
  21. package/dist/web/client/assets/{agents-KnMSeucP.js → agents-BxPS1_Bp.js} +1 -1
  22. package/dist/web/client/assets/{agents-DwDcKOif.js → agents-GozAWW-l.js} +1 -1
  23. package/dist/web/client/assets/{attention-CLQIHUF6.js → attention-Cz9rZcrr.js} +1 -1
  24. package/dist/web/client/assets/chevron-right-CPAb1zac.js +1 -0
  25. package/dist/web/client/assets/{config-B483VUYj.js → config-9vv9Lipb.js} +2 -2
  26. package/dist/web/client/assets/{inbox-DIXsxGV8.js → inbox-DHLArXxl.js} +1 -1
  27. package/dist/web/client/assets/{index-CKJ3uVR4.js → index-1YXquAq8.js} +2 -2
  28. package/dist/web/client/assets/{learning-DDTz_N6N.js → learning-PvtXm8Ne.js} +1 -1
  29. package/dist/web/client/assets/{login-6S3kA9Yb.js → login-DIJpNQFo.js} +1 -1
  30. package/dist/web/client/assets/{mcp-Dm4DfYI9.js → mcp-pKBL0xIf.js} +1 -1
  31. package/dist/web/client/assets/{members-CD93Kya7.js → members-DHWsgsEs.js} +1 -1
  32. package/dist/web/client/assets/{memory-M28_uFOH.js → memory-CEVppPyU.js} +1 -1
  33. package/dist/web/client/assets/plus-BaIRdB10.js +1 -0
  34. package/dist/web/client/assets/{policy-IKYNTvWX.js → policy-DEh4BLSw.js} +1 -1
  35. package/dist/web/client/assets/{results-CGNpUJ11.js → results-DgJPjEZF.js} +1 -1
  36. package/dist/web/client/assets/{review-BN6V988m.js → review-BbshafTQ.js} +1 -1
  37. package/dist/web/client/assets/{route-DUIeAVZz.js → route-Ccb8v41z.js} +1 -1
  38. package/dist/web/client/assets/{route-V5VM1ufA.js → route-D1d6kCEV.js} +1 -1
  39. package/dist/web/client/assets/{routes-CInZFLoI.js → routes-g7V4ru7T.js} +1 -1
  40. package/dist/web/client/assets/{services-CeB7gfY5.js → services-B2f7e5jV.js} +1 -1
  41. package/dist/web/client/assets/{settings-BWonPTKi.js → settings-B6elpcYm.js} +1 -1
  42. package/dist/web/client/assets/{skills-CgrXwmh8.js → skills-CngE7TF8.js} +1 -1
  43. package/dist/web/client/assets/styles-xUnZ-ep_.css +2 -0
  44. package/dist/web/client/assets/{teams-D-g74z8r.js → teams-BdJZXOan.js} +1 -1
  45. package/dist/web/client/assets/{teams-C98Ww6Xu.js → teams-c496ISsT.js} +1 -1
  46. package/dist/web/client/assets/{telegram-Cc8NJ4Tc.js → telegram-B_-hK6EC.js} +1 -1
  47. package/dist/web/client/assets/{tokens-ZTSxCsD_.js → tokens-CKz8gx4-.js} +1 -1
  48. package/dist/web/client/assets/{triggers-Br8Wk4Yk.js → triggers-DCEPciGW.js} +1 -1
  49. package/dist/web/client/assets/{welcome-C-hJvXWG.js → welcome-D-zVOLGA.js} +1 -1
  50. package/dist/web/client/baziu.svg +176 -7
  51. package/dist/web/server/assets/{_tanstack-start-manifest_v-BUFDfU9j.js → _tanstack-start-manifest_v-B8u80HjK.js} +72 -72
  52. package/dist/web/server/assets/{config-C0lOmAcs.js → config-BNEgu7WG.js} +5 -6
  53. package/dist/web/server/assets/{config-D7Z2wgbk.js → config-C1VB28se.js} +1 -1
  54. package/dist/web/server/assets/{router-vAv1HkV1.js → router-BI9gmY3S.js} +2 -2
  55. package/dist/web/server/server.js +2 -2
  56. package/dist/worker.js +7 -1
  57. package/dist/worker.js.map +1 -1
  58. package/package.json +4 -4
  59. package/dist/web/client/assets/chevron-right-DZFmP-cr.js +0 -1
  60. package/dist/web/client/assets/plus-xCBcVxeD.js +0 -1
  61. package/dist/web/client/assets/styles-d9JiV6N4.css +0 -2
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/welcome-C-hJvXWG.js","assets/jsx-runtime-bzQ4Vb5N.js","assets/login-6S3kA9Yb.js","assets/routes-CInZFLoI.js","assets/preload-helper-eUUcpe2S.js","assets/ConfirmDialog-B5BLql5H.js","assets/SpawnDialog-CWvaYWBr.js","assets/ModelSelect-CvOHjUyB.js","assets/entities-xVoB-p2j.js","assets/SpawnTeamModal-DxU7QH0e.js","assets/TeamForm-Bxl3s8yF.js","assets/ChatPane-BgW59Bvn.js","assets/ResultCard-CDLhGze2.js","assets/agent-actions-CmkRSxQg.js","assets/chevron-right-DZFmP-cr.js","assets/plus-xCBcVxeD.js","assets/teams-D-g74z8r.js","assets/skills-CgrXwmh8.js","assets/SkillFindings-BPmVzjOa.js","assets/Tabs-D0LgBNIk.js","assets/config-B483VUYj.js","assets/ConfigPage-BcjKer-E.js","assets/SectionTabs-DXHzXmmb.js","assets/FieldRow-Dr1dDiQ6.js","assets/attention-CLQIHUF6.js","assets/agents-DwDcKOif.js","assets/AgentAvatar-DWx-bM6n.js","assets/tokens-ZTSxCsD_.js","assets/services-CeB7gfY5.js","assets/mcp-Dm4DfYI9.js","assets/route-DUIeAVZz.js","assets/route-V5VM1ufA.js","assets/teams-C98Ww6Xu.js","assets/agents-KnMSeucP.js","assets/SkillsPicker-Cr87y_W-.js","assets/UnsavedChangesGuard-CmeIPiXp.js","assets/telegram-Cc8NJ4Tc.js","assets/_id-B-Vo1VkF.js","assets/review-BN6V988m.js","assets/results-CGNpUJ11.js","assets/policy-IKYNTvWX.js","assets/TeamPolicyEditor-B-ikYl3V.js","assets/TeamPolicyEditor-DLioOiRN.css","assets/memory-M28_uFOH.js","assets/members-CD93Kya7.js","assets/_id-CrGDqaFa.js","assets/triggers-Br8Wk4Yk.js","assets/settings-BWonPTKi.js","assets/learning-DDTz_N6N.js","assets/inbox-DIXsxGV8.js","assets/_id-iXED17f-.js","assets/_id-CNN1ila9.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/welcome-D-zVOLGA.js","assets/jsx-runtime-bzQ4Vb5N.js","assets/login-DIJpNQFo.js","assets/routes-g7V4ru7T.js","assets/preload-helper-eUUcpe2S.js","assets/ConfirmDialog-536ziJ5P.js","assets/SpawnDialog-DoZl-yes.js","assets/ModelSelect-CvOHjUyB.js","assets/entities-xVoB-p2j.js","assets/SpawnTeamModal-C638hEoN.js","assets/TeamForm-C-WzvOl4.js","assets/ChatPane-DOV_HJg-.js","assets/ResultCard-X4nTbjYY.js","assets/agent-actions-CXQCoxKO.js","assets/chevron-right-CPAb1zac.js","assets/plus-BaIRdB10.js","assets/teams-BdJZXOan.js","assets/skills-CngE7TF8.js","assets/SkillFindings-8LX6bYf_.js","assets/Tabs-D0LgBNIk.js","assets/config-9vv9Lipb.js","assets/ConfigPage-Dfu9DzFX.js","assets/SectionTabs-DXHzXmmb.js","assets/FieldRow-z1JqCdqn.js","assets/attention-Cz9rZcrr.js","assets/agents-GozAWW-l.js","assets/AgentAvatar-DWx-bM6n.js","assets/tokens-CKz8gx4-.js","assets/services-B2f7e5jV.js","assets/mcp-pKBL0xIf.js","assets/route-Ccb8v41z.js","assets/route-D1d6kCEV.js","assets/teams-c496ISsT.js","assets/agents-BxPS1_Bp.js","assets/SkillsPicker-Cr87y_W-.js","assets/UnsavedChangesGuard-GC-vzw7h.js","assets/telegram-B_-hK6EC.js","assets/_id-Cxa98a9m.js","assets/review-BbshafTQ.js","assets/results-DgJPjEZF.js","assets/policy-DEh4BLSw.js","assets/TeamPolicyEditor-CSKBx0oK.js","assets/TeamPolicyEditor-DLioOiRN.css","assets/memory-CEVppPyU.js","assets/members-DHWsgsEs.js","assets/_id-D4hV1U1t.js","assets/triggers-DCEPciGW.js","assets/settings-B6elpcYm.js","assets/learning-PvtXm8Ne.js","assets/inbox-DHLArXxl.js","assets/_id-BKLynswT.js","assets/_id-BYM_NORr.js"])))=>i.map(i=>d[i]);
2
2
  import{i as e,n as t,r as n,t as r}from"./jsx-runtime-bzQ4Vb5N.js";import{$ as i,A as a,B as o,C as s,D as c,E as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,N as v,O as y,P as b,Q as x,R as S,S as C,T as w,U as E,V as ee,W as D,X as te,Y as ne,Z as re,_ as ie,b as ae,c as oe,d as se,f as O,g as k,h as ce,i as le,j as ue,k as de,l as A,m as j,n as M,o as fe,p as pe,q as me,r as N,t as P,v as he,w as ge,x as _e,y as ve,z as ye}from"./preload-helper-eUUcpe2S.js";var be=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,E=-1;function ee(){return g?!0:!(e.unstable_now()-E<w)}function D(){if(g=!1,S){var t=e.unstable_now();E=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(D)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=D,te=function(){re.postMessage(null)}}else te=function(){_(D,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),xe=n(((e,t)=>{t.exports=be()})),Se=n((e=>{var n=xe(),r=t(),a=i();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function l(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(c(e)!==e)throw Error(o(188))}function f(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Symbol.for(`react.client.reference`);function oe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case E:return`SuspenseList`;case te:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var se=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function A(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function j(e,t){ue++,le[ue]=e.current,e.current=t}var M=de(null),fe=de(null),pe=de(null),me=de(null);function N(e,t){switch(j(pe,t),j(fe,e),j(M,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}A(M),j(M,e)}function P(){A(M),A(fe),A(pe)}function he(e){e.memoizedState!==null&&j(me,e);var t=M.current,n=Ud(t,e.type);t!==n&&(j(fe,e),j(M,n))}function ge(e){fe.current===e&&(A(M),A(fe)),me.current===e&&(A(me),$f._currentValue=ce)}var _e,ve;function ye(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``,ve=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+_e+e+ve}var be=!1;function Se(e,t){if(!e||be)return``;be=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -49,4 +49,4 @@ Error generating stack: `+e.message+`
49
49
  `},ef=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},tf=function(){H.useEffect(function(){return document.body.setAttribute(Qd,(ef()+1).toString()),function(){var e=ef()-1;e<=0?document.body.removeAttribute(Qd):document.body.setAttribute(Qd,e.toString())}},[])},nf=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;tf();var a=H.useMemo(function(){return Xd(i)},[i]);return H.createElement(Zd,{styles:$d(a,!t,i,n?``:`!important`)})},rf=!1;if(typeof window<`u`)try{var af=Object.defineProperty({},"passive",{get:function(){return rf=!0,!0}});window.addEventListener(`test`,af,af),window.removeEventListener(`test`,af,af)}catch{rf=!1}var of=rf?{passive:!1}:!1,sf=function(e){return e.tagName===`TEXTAREA`},cf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!sf(e)&&n[t]===`visible`)},lf=function(e){return cf(e,`overflowY`)},uf=function(e){return cf(e,`overflowX`)},df=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),mf(e,r)){var i=hf(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ff=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},pf=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},mf=function(e,t){return e===`v`?lf(t):uf(t)},hf=function(e,t){return e===`v`?ff(t):pf(t)},gf=function(e,t){return e===`h`&&t===`rtl`?-1:1},_f=function(e,t,n,r,i){var a=gf(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=hf(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&mf(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},vf=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yf=function(e){return[e.deltaX,e.deltaY]},bf=function(e){return e&&`current`in e?e.current:e},xf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sf=function(e){return`
50
50
  .block-interactivity-${e} {pointer-events: none;}
51
51
  .allow-interactivity-${e} {pointer-events: all;}
52
- `},Cf=0,wf=[];function Tf(e){var t=H.useRef([]),n=H.useRef([0,0]),r=H.useRef(),i=H.useState(Cf++)[0],a=H.useState(Kd)[0],o=H.useRef(e);H.useEffect(function(){o.current=e},[e]),H.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=xd([e.lockRef.current],(e.shards||[]).map(bf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=H.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=vf(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=df(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=df(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return _f(h,t,e,h===`h`?s:c,!0)},[]),c=H.useCallback(function(e){var n=e;if(!(!wf.length||wf[wf.length-1]!==a)){var r=`deltaY`in n?yf(n):vf(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&xf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(bf).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=H.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ef(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=H.useCallback(function(e){n.current=vf(e),r.current=void 0},[]),d=H.useCallback(function(t){l(t.type,yf(t),t.target,s(t,e.lockRef.current))},[]),f=H.useCallback(function(t){l(t.type,vf(t),t.target,s(t,e.lockRef.current))},[]);H.useEffect(function(){return wf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,of),document.addEventListener(`touchmove`,c,of),document.addEventListener(`touchstart`,u,of),function(){wf=wf.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,of),document.removeEventListener(`touchmove`,c,of),document.removeEventListener(`touchstart`,u,of)}},[]);var p=e.removeScrollBar,m=e.inert;return H.createElement(H.Fragment,null,m?H.createElement(a,{styles:Sf(i)}):null,p?H.createElement(nf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ef(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Df=Fd(Id,Tf),Of=H.forwardRef(function(e,t){return H.createElement(Rd,$({},e,{ref:t,sideCar:Df}))});Of.classNames=Rd.classNames;var kf=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Af=new WeakMap,jf=new WeakMap,Mf={},Nf=0,Pf=function(e){return e&&(e.host||Pf(e.parentNode))},Ff=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Pf(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},If=function(e,t,n,r){var i=Ff(t,Array.isArray(e)?e:[e]);Mf[n]||(Mf[n]=new WeakMap);var a=Mf[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Af.get(e)||0)+1,l=(a.get(e)||0)+1;Af.set(e,c),a.set(e,l),o.push(e),c===1&&i&&jf.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Nf++,function(){o.forEach(function(e){var t=Af.get(e)-1,i=a.get(e)-1;Af.set(e,t),a.set(e,i),t||(jf.has(e)||e.removeAttribute(r),jf.delete(e)),i||e.removeAttribute(n)}),Nf--,Nf||(Af=new WeakMap,Af=new WeakMap,jf=new WeakMap,Mf={})}},Lf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||kf(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),If(r,i,n,`aria-hidden`)):function(){return null}};function Rf(e){let[t,n]=H.useState(void 0);return bu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var zf=[`top`,`right`,`bottom`,`left`],Bf=Math.min,Vf=Math.max,Hf=Math.round,Uf=Math.floor,Wf=e=>({x:e,y:e}),Gf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Kf(e,t,n){return Vf(e,Bf(t,n))}function qf(e,t){return typeof e==`function`?e(t):e}function Jf(e){return e.split(`-`)[0]}function Yf(e){return e.split(`-`)[1]}function Xf(e){return e===`x`?`y`:`x`}function Zf(e){return e===`y`?`height`:`width`}function Qf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $f(e){return Xf(Qf(e))}function ep(e,t,n){n===void 0&&(n=!1);let r=Yf(e),i=$f(e),a=Zf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lp(o)),[o,lp(o)]}function tp(e){let t=lp(e);return[np(e),t,np(t)]}function np(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rp=[`left`,`right`],ip=[`right`,`left`],ap=[`top`,`bottom`],op=[`bottom`,`top`];function sp(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ip:rp:t?rp:ip;case`left`:case`right`:return t?ap:op;default:return[]}}function cp(e,t,n,r){let i=Yf(e),a=sp(Jf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(np)))),a}function lp(e){let t=Jf(e);return Gf[t]+e.slice(t.length)}function up(e){return{top:0,right:0,bottom:0,left:0,...e}}function dp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:up(e)}function fp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pp(e,t,n){let{reference:r,floating:i}=e,a=Qf(t),o=$f(t),s=Zf(o),c=Jf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Yf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function mp(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=qf(t,e),p=dp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var hp=50,gp=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mp},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<hp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=pp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_p=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=qf(e,t)||{};if(l==null)return{};let d=dp(u),f={x:n,y:r},p=$f(i),m=Zf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,ee=Bf(d[_],E),D=Bf(d[v],E),te=ee,ne=C-h[m]-D,re=C/2-h[m]/2+w,ie=Kf(te,re,ne),ae=!c.arrow&&Yf(i)!=null&&re!==ie&&a.reference[m]/2-(re<te?ee:D)-h[m]/2<0,oe=ae?re<te?re-te:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),vp=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=qf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Jf(r),_=Qf(o),v=Jf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[lp(o)]:tp(o)),x=p!==`none`;!d&&x&&b.push(...cp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],E=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ep(r,a,y);w.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Qf(t))||E.every(e=>Qf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=E.filter(e=>{if(x){let t=Qf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bp(e){return zf.some(t=>e[t]>=0)}var xp=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=qf(e,t);switch(i){case`referenceHidden`:{let e=yp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bp(e)}}}case`escaped`:{let e=yp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bp(e)}}}default:return{}}}}},Sp=new Set([`left`,`top`]);async function Cp(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Jf(n),s=Yf(n),c=Qf(n)===`y`,l=Sp.has(o)?-1:1,u=a&&c?-1:1,d=qf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Cp(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Tp=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=qf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Qf(Jf(i)),p=Xf(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Kf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Kf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ep=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=qf(e,t),u={x:n,y:r},d=Qf(i),f=Xf(d),p=u[f],m=u[d],h=qf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sp.has(Jf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Dp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=qf(e,t),u=await o.detectOverflow(t,l),d=Jf(i),f=Yf(i),p=Qf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Bf(h-u[g],v),x=Bf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Vf(u.left,0),t=Vf(u.right,0),n=Vf(u.top,0),r=Vf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Vf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Vf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let E=await o.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function Op(){return typeof window<`u`}function kp(e){return Mp(e)?(e.nodeName||``).toLowerCase():`#document`}function Ap(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jp(e){return((Mp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mp(e){return Op()?e instanceof Node||e instanceof Ap(e).Node:!1}function Np(e){return Op()?e instanceof Element||e instanceof Ap(e).Element:!1}function Pp(e){return Op()?e instanceof HTMLElement||e instanceof Ap(e).HTMLElement:!1}function Fp(e){return!Op()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ap(e).ShadowRoot}function Ip(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lp(e){return/^(table|td|th)$/.test(kp(e))}function Rp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zp=/transform|translate|scale|rotate|perspective|filter/,Bp=/paint|layout|strict|content/,Vp=e=>!!e&&e!==`none`,Hp;function Up(e){let t=Np(e)?qp(e):e;return Vp(t.transform)||Vp(t.translate)||Vp(t.scale)||Vp(t.rotate)||Vp(t.perspective)||!Gp()&&(Vp(t.backdropFilter)||Vp(t.filter))||zp.test(t.willChange||``)||Bp.test(t.contain||``)}function Wp(e){let t=Yp(e);for(;Pp(t)&&!Kp(t);){if(Up(t))return t;if(Rp(t))return null;t=Yp(t)}return null}function Gp(){return Hp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hp}function Kp(e){return/^(html|body|#document)$/.test(kp(e))}function qp(e){return Ap(e).getComputedStyle(e)}function Jp(e){return Np(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yp(e){if(kp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fp(e)&&e.host||jp(e);return Fp(t)?t.host:t}function Xp(e){let t=Yp(e);return Kp(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pp(t)&&Ip(t)?t:Xp(t)}function Zp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xp(e),i=r===e.ownerDocument?.body,a=Ap(r);if(i){let e=Qp(a);return t.concat(a,a.visualViewport||[],Ip(r)?r:[],e&&n?Zp(e):[])}else return t.concat(r,Zp(r,[],n))}function Qp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $p(e){let t=qp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Hf(n)!==a||Hf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function em(e){return Np(e)?e:e.contextElement}function tm(e){let t=em(e);if(!Pp(t))return Wf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$p(t),o=(a?Hf(n.width):n.width)/r,s=(a?Hf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nm=Wf(0);function rm(e){let t=Ap(e);return!Gp()||!t.visualViewport?nm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function im(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ap(e)?!1:t}function am(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=em(e),o=Wf(1);t&&(r?Np(r)&&(o=tm(r)):o=tm(e));let s=im(a,n,r)?rm(a):Wf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ap(a),t=r&&Np(r)?Ap(r):r,n=e,i=Qp(n);for(;i&&r&&t!==n;){let e=tm(i),t=i.getBoundingClientRect(),r=qp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ap(i),i=Qp(n)}}return fp({width:u,height:d,x:c,y:l})}function om(e,t){let n=Jp(e).scrollLeft;return t?t.left+n:am(jp(e)).left+n}function sm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-om(e,n),y:n.top+t.scrollTop}}function cm(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jp(r),s=t?Rp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wf(1),u=Wf(0),d=Pp(r);if((d||!d&&!a)&&((kp(r)!==`body`||Ip(o))&&(c=Jp(r)),d)){let e=am(r);l=tm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sm(o,c):Wf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lm(e){return Array.from(e.getClientRects())}function um(e){let t=jp(e),n=Jp(e),r=e.ownerDocument.body,i=Vf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+om(e),s=-n.scrollTop;return qp(r).direction===`rtl`&&(o+=Vf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var dm=25;function fm(e,t){let n=Ap(e),r=jp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Gp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=om(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=dm&&(a-=o)}else l<=dm&&(a+=l);return{width:a,height:o,x:s,y:c}}function pm(e,t){let n=am(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Pp(e)?tm(e):Wf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mm(e,t,n){let r;if(t===`viewport`)r=fm(e,n);else if(t===`document`)r=um(jp(e));else if(Np(t))r=pm(t,n);else{let n=rm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fp(r)}function hm(e,t){let n=Yp(e);return n===t||!Np(n)||Kp(n)?!1:qp(n).position===`fixed`||hm(n,t)}function gm(e,t){let n=t.get(e);if(n)return n;let r=Zp(e,[],!1).filter(e=>Np(e)&&kp(e)!==`body`),i=null,a=qp(e).position===`fixed`,o=a?Yp(e):e;for(;Np(o)&&!Kp(o);){let t=qp(o),n=Up(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ip(o)&&!n&&hm(e,o))?r=r.filter(e=>e!==o):i=t,o=Yp(o)}return t.set(e,r),r}function _m(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rp(t)?[]:gm(t,this._c):[].concat(n),r],o=mm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=mm(t,a[e],i);s=Vf(n.top,s),c=Bf(n.right,c),l=Bf(n.bottom,l),u=Vf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function vm(e){let{width:t,height:n}=$p(e);return{width:t,height:n}}function ym(e,t,n){let r=Pp(t),i=jp(t),a=n===`fixed`,o=am(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Wf(0);function l(){c.x=om(i)}if(r||!r&&!a)if((kp(t)!==`body`||Ip(i))&&(s=Jp(t)),r){let e=am(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?sm(i,s):Wf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function bm(e){return qp(e).position===`static`}function xm(e,t){if(!Pp(e)||qp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jp(e)===n&&(n=n.ownerDocument.body),n}function Sm(e,t){let n=Ap(e);if(Rp(e))return n;if(!Pp(e)){let t=Yp(e);for(;t&&!Kp(t);){if(Np(t)&&!bm(t))return t;t=Yp(t)}return n}let r=xm(e,t);for(;r&&Lp(r)&&bm(r);)r=xm(r,t);return r&&Kp(r)&&bm(r)&&!Up(r)?n:r||Wp(e)||n}var Cm=async function(e){let t=this.getOffsetParent||Sm,n=this.getDimensions,r=await n(e.floating);return{reference:ym(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wm(e){return qp(e).direction===`rtl`}var Tm={convertOffsetParentRelativeRectToViewportRelativeRect:cm,getDocumentElement:jp,getClippingRect:_m,getOffsetParent:Sm,getElementRects:Cm,getClientRects:lm,getDimensions:vm,getScale:tm,isElement:Np,isRTL:wm};function Em(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dm(e,t){let n=null,r,i=jp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Uf(d),h=Uf(i.clientWidth-(u+f)),g=Uf(i.clientHeight-(d+p)),_=Uf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Vf(0,Bf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Em(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Om(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=em(e),u=i||a?[...l?Zp(l):[],...t?Zp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Dm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?am(e):null;c&&g();function g(){let t=am(e);h&&!Em(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var km=wp,Am=Tp,jm=vp,Mm=Dp,Nm=xp,Pm=_p,Fm=Ep,Im=(e,t,n)=>{let r=new Map,i={platform:Tm,...n},a={...i.platform,_c:r};return gp(e,t,{...i,platform:a})},Lm=typeof document<`u`?H.useLayoutEffect:function(){};function Rm(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,i;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(!Rm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Rm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function zm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bm(e,t){let n=zm(e);return Math.round(t*n)/n}function Vm(e){let t=H.useRef(e);return Lm(()=>{t.current=e}),t}function Hm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=H.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=H.useState(r);Rm(f,r)||p(r);let[m,h]=H.useState(null),[g,_]=H.useState(null),v=H.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=H.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=H.useRef(null),C=H.useRef(null),w=H.useRef(u),E=c!=null,ee=Vm(c),D=Vm(i),te=Vm(l),ne=H.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Im(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!Rm(w.current,t)&&(w.current=t,mu.flushSync(()=>{d(t)}))})},[f,t,n,D,te]);Lm(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=H.useRef(!1);Lm(()=>(re.current=!0,()=>{re.current=!1}),[]),Lm(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,ne);ne()}},[b,x,ne,ee,E]);let ie=H.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ae=H.useMemo(()=>({reference:b,floating:x}),[b,x]),oe=H.useMemo(()=>{let e={position:n,left:0,top:0};if(!ae.floating)return e;let t=Bm(ae.floating,u.x),r=Bm(ae.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...zm(ae.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ae.floating,u.x,u.y]);return H.useMemo(()=>({...u,update:ne,refs:ie,elements:ae,floatingStyles:oe}),[u,ne,ie,ae,oe])}var Um=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Pm({element:r.current,padding:i}).fn(n):r?Pm({element:r,padding:i}).fn(n):{}}}},Wm=(e,t)=>{let n=km(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gm=(e,t)=>{let n=Am(e);return{name:n.name,fn:n.fn,options:[e,t]}},Km=(e,t)=>({fn:Fm(e).fn,options:[e,t]}),qm=(e,t)=>{let n=jm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jm=(e,t)=>{let n=Mm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ym=(e,t)=>{let n=Nm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xm=(e,t)=>{let n=Um(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zm=`Arrow`,Qm=H.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,U.jsx)(hu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,U.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Qm.displayName=Zm;var $m=Qm,eh=`Popper`,[th,nh]=_u(eh),[rh,ih]=th(eh),ah=e=>{let{__scopePopper:t,children:n}=e,[r,i]=H.useState(null),[a,o]=H.useState(void 0);return(0,U.jsx)(rh,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};ah.displayName=eh;var oh=`PopperAnchor`,sh=H.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=ih(oh,n),o=H.useRef(null),s=a.onAnchorChange,c=tu(t,H.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=H.useRef(null);H.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&_h(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,U.jsx)(hu.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});sh.displayName=oh;var ch=`PopperContent`,[lh,uh]=th(ch),dh=H.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=ih(ch,n),[_,v]=H.useState(null),y=tu(t,e=>v(e)),[b,x]=H.useState(null),S=Rf(b),C=S?.width??0,w=S?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],te=D.length>0,ne={padding:ee,boundary:D.filter(hh),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=Hm({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Om(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Wm({mainAxis:i+w,alignmentAxis:o}),c&&Gm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Km():void 0,...ne}),c&&qm({...ne}),Jm({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Xm({element:b,padding:s}),gh({arrowWidth:C,arrowHeight:w}),f&&Ym({strategy:`referenceHidden`,...ne,boundary:te?ne.boundary:void 0})]}),O=g.setPlacementState;bu(()=>(O(ae),()=>{O(void 0)}),[ae,O]);let[k,ce]=_h(ae),le=Lu(m);bu(()=>{oe&&le?.()},[oe,le]);let ue=se.arrow?.x,de=se.arrow?.y,A=se.arrow?.centerOffset!==0,[j,M]=H.useState();return bu(()=>{_&&M(window.getComputedStyle(_).zIndex)},[_]),(0,U.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:j,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)(lh,{scope:n,placedSide:k,placedAlign:ce,onArrowChange:x,arrowX:ue,arrowY:de,shouldHideArrow:A,children:(0,U.jsx)(hu.div,{"data-side":k,"data-align":ce,...h,ref:y,style:{...h.style,animation:oe?void 0:`none`}})})})});dh.displayName=ch;var fh=`PopperArrow`,ph={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mh=H.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=uh(fh,n),a=ph[i.placedSide];return(0,U.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,U.jsx)($m,{...r,ref:t,style:{...r.style,display:`block`}})})});mh.displayName=fh;function hh(e){return e!==null}var gh=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_h(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _h(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vh=ah,yh=sh,bh=dh,xh=mh,Sh=`rovingFocusGroup.onEntryFocus`,Ch={bubbles:!1,cancelable:!0},wh=`RovingFocusGroup`,[Th,Eh,Dh]=yu(wh),[Oh,kh]=_u(wh,[Dh]),[Ah,jh]=Oh(wh),Mh=H.forwardRef((e,t)=>(0,U.jsx)(Th.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(Th.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(Nh,{...e,ref:t})})}));Mh.displayName=wh;var Nh=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=H.useRef(null),p=tu(t,f),m=Iu(a),[h,g]=Su({prop:o,defaultProp:s??null,onChange:c,caller:wh}),[_,v]=H.useState(!1),y=Lu(l),b=Eh(n),x=H.useRef(!1),[S,C]=H.useState(0);return H.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Sh,y),()=>e.removeEventListener(Sh,y)},[y]),(0,U.jsx)(Ah,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:H.useCallback(e=>g(e),[g]),onItemShiftTab:H.useCallback(()=>v(!0),[]),onFocusableItemAdd:H.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:H.useCallback(()=>C(e=>e-1),[]),children:(0,U.jsx)(hu.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Z(e.onMouseDown,()=>{x.current=!0}),onFocus:Z(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Sh,Ch);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);zh([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:Z(e.onBlur,()=>v(!1))})})}),Ph=`RovingFocusGroupItem`,Fh=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Pu(),l=a||c,u=jh(Ph,n),d=u.currentTabStopId===l,f=Eh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return H.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,U.jsx)(Th.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,U.jsx)(hu.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Z(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Rh(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Bh(n,r+1):n.slice(r+1)}setTimeout(()=>zh(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Fh.displayName=Ph;var Ih={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Lh(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Rh(e,t,n){let r=Lh(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ih[r]}function zh(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vh=Mh,Hh=Fh,Uh=[`Enter`,` `],Wh=[`ArrowDown`,`PageUp`,`Home`],Gh=[`ArrowUp`,`PageDown`,`End`],Kh=[...Wh,...Gh],qh={ltr:[...Uh,`ArrowRight`],rtl:[...Uh,`ArrowLeft`]},Jh={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Yh=`Menu`,[Xh,Zh,Qh]=yu(Yh),[$h,eg]=_u(Yh,[Qh,nh,kh]),tg=nh(),ng=kh(),[rg,ig]=$h(Yh),[ag,og]=$h(Yh),sg=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=tg(t),[c,l]=H.useState(null),u=H.useRef(!1),d=Lu(a),f=Iu(i);return H.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),H.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,U.jsx)(vh,{...s,children:(0,U.jsx)(rg,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,U.jsx)(ag,{scope:t,onClose:H.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};sg.displayName=Yh;var cg=`MenuAnchor`,lg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tg(n);return(0,U.jsx)(yh,{...i,...r,ref:t})});lg.displayName=cg;var ug=`MenuPortal`,[dg,fg]=$h(ug,{forceMount:void 0}),pg=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ig(ug,t);return(0,U.jsx)(dg,{scope:t,forceMount:n,children:(0,U.jsx)(Eu,{present:n||a.open,children:(0,U.jsx)(hd,{asChild:!0,container:i,children:r})})})};pg.displayName=ug;var mg=`MenuContent`,[hg,gg]=$h(mg),_g=H.forwardRef((e,t)=>{let n=fg(mg,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ig(mg,e.__scopeMenu),o=og(mg,e.__scopeMenu);return(0,U.jsx)(Xh.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Eu,{present:r||a.open,children:(0,U.jsx)(Xh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,U.jsx)(vg,{...i,ref:t}):(0,U.jsx)(yg,{...i,ref:t})})})})}),vg=H.forwardRef((e,t)=>{let n=ig(mg,e.__scopeMenu),r=H.useRef(null),i=tu(t,r);return H.useEffect(()=>{let e=r.current;if(e)return Lf(e)},[]),(0,U.jsx)(xg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yg=H.forwardRef((e,t)=>{let n=ig(mg,e.__scopeMenu);return(0,U.jsx)(xg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),bg=nu(`MenuContent.ScrollLock`),xg=H.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=ig(mg,n),_=og(mg,n),v=tg(n),y=ng(n),b=Zh(n),[x,S]=H.useState(null),C=H.useRef(null),w=tu(t,C,g.onContentChange),E=H.useRef(0),ee=H.useRef(``),D=H.useRef(0),te=H.useRef(null),ne=H.useRef(`right`),re=H.useRef(0),ie=m?Of:H.Fragment,ae=m?{as:bg,allowPinchZoom:!0}:void 0,oe=e=>{let t=ee.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=a_(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){ee.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};H.useEffect(()=>()=>window.clearTimeout(E.current),[]),vd();let se=H.useCallback(e=>ne.current===te.current?.side&&s_(e,te.current?.area),[]);return(0,U.jsx)(hg,{scope:n,searchRef:ee,onItemEnter:H.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:H.useCallback(e=>{se(e)||(C.current?.focus(),S(null))},[se]),onTriggerLeave:H.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:D,onPointerGraceIntentChange:H.useCallback(e=>{te.current=e},[]),children:(0,U.jsx)(ie,{...ae,children:(0,U.jsx)(nd,{asChild:!0,trapped:i,onMountAutoFocus:Z(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,U.jsx)(Q,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,U.jsx)(Vh,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Z(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(bh,{role:`menu`,"aria-orientation":`vertical`,"data-state":e_(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:Z(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=C.current;if(e.target!==i||!Kh.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Gh.includes(e.key)&&a.reverse(),r_(a)}),onBlur:Z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),ee.current=``)}),onPointerMove:Z(e.onPointerMove,c_(e=>{let t=e.target,n=re.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>re.current?`right`:`left`,re.current=e.clientX)}))})})})})})})});_g.displayName=mg;var Sg=`MenuGroup`,Cg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{role:`group`,...r,ref:t})});Cg.displayName=Sg;var wg=`MenuLabel`,Tg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{...r,ref:t})});Tg.displayName=wg;var Eg=`MenuItem`,Dg=`menu.itemSelect`,Og=H.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=H.useRef(null),o=og(Eg,e.__scopeMenu),s=gg(Eg,e.__scopeMenu),c=tu(t,a),l=H.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Dg,{bubbles:!0,cancelable:!0});e.addEventListener(Dg,e=>r?.(e),{once:!0}),gu(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,U.jsx)(kg,{...i,ref:c,disabled:n,onClick:Z(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Z(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Z(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Uh.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Og.displayName=Eg;var kg=H.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gg(Eg,n),s=ng(n),c=H.useRef(null),l=tu(t,c),[u,d]=H.useState(!1),[f,p]=H.useState(``);return H.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,U.jsx)(Xh.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,U.jsx)(Hh,{asChild:!0,...s,focusable:!r,children:(0,U.jsx)(hu.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Z(e.onPointerMove,c_(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,c_(e=>o.onItemLeave(e))),onFocus:Z(e.onFocus,()=>d(!0)),onBlur:Z(e.onBlur,()=>d(!1))})})})}),Ag=`MenuCheckboxItem`,jg=H.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,U.jsx)(zg,{scope:e.__scopeMenu,checked:n,children:(0,U.jsx)(Og,{role:`menuitemcheckbox`,"aria-checked":t_(n)?`mixed`:n,...i,ref:t,"data-state":n_(n),onSelect:Z(i.onSelect,()=>r?.(t_(n)?!0:!n),{checkForDefaultPrevented:!1})})})});jg.displayName=Ag;var Mg=`MenuRadioGroup`,[Ng,Pg]=$h(Mg,{value:void 0,onValueChange:()=>{}}),Fg=H.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Lu(r);return(0,U.jsx)(Ng,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,U.jsx)(Cg,{...i,ref:t})})});Fg.displayName=Mg;var Ig=`MenuRadioItem`,Lg=H.forwardRef((e,t)=>{let{value:n,...r}=e,i=Pg(Ig,e.__scopeMenu),a=n===i.value;return(0,U.jsx)(zg,{scope:e.__scopeMenu,checked:a,children:(0,U.jsx)(Og,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":n_(a),onSelect:Z(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Lg.displayName=Ig;var Rg=`MenuItemIndicator`,[zg,Bg]=$h(Rg,{checked:!1}),Vg=H.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Bg(Rg,n);return(0,U.jsx)(Eu,{present:r||t_(a.checked)||a.checked===!0,children:(0,U.jsx)(hu.span,{...i,ref:t,"data-state":n_(a.checked)})})});Vg.displayName=Rg;var Hg=`MenuSeparator`,Ug=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Ug.displayName=Hg;var Wg=`MenuArrow`,Gg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tg(n);return(0,U.jsx)(xh,{...i,...r,ref:t})});Gg.displayName=Wg;var Kg=`MenuSub`,[qg,Jg]=$h(Kg),Yg=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ig(Kg,t),o=tg(t),[s,c]=H.useState(null),[l,u]=H.useState(null),d=Lu(i);return H.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,U.jsx)(vh,{...o,children:(0,U.jsx)(rg,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,U.jsx)(qg,{scope:t,contentId:Pu(),triggerId:Pu(),trigger:s,onTriggerChange:c,children:n})})})};Yg.displayName=Kg;var Xg=`MenuSubTrigger`,Zg=H.forwardRef((e,t)=>{let n=ig(Xg,e.__scopeMenu),r=og(Xg,e.__scopeMenu),i=Jg(Xg,e.__scopeMenu),a=gg(Xg,e.__scopeMenu),o=H.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=H.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return H.useEffect(()=>u,[u]),H.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,U.jsx)(lg,{asChild:!0,...l,children:(0,U.jsx)(kg,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":e_(n.open),...e,ref:eu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Z(e.onPointerMove,c_(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Z(e.onPointerLeave,c_(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Z(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||qh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Zg.displayName=Xg;var Qg=`MenuSubContent`,$g=H.forwardRef((e,t)=>{let n=fg(mg,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=ig(mg,e.__scopeMenu),s=og(mg,e.__scopeMenu),c=Jg(Qg,e.__scopeMenu),l=H.useRef(null),u=tu(t,l);return(0,U.jsx)(Xh.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Eu,{present:r||o.open,children:(0,U.jsx)(Xh.Slot,{scope:e.__scopeMenu,children:(0,U.jsx)(xg,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Z(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Z(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Jh[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});$g.displayName=Qg;function e_(e){return e?`open`:`closed`}function t_(e){return e===`indeterminate`}function n_(e){return t_(e)?`indeterminate`:e?`checked`:`unchecked`}function r_(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function i_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function a_(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=i_(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function o_(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function s_(e,t){return t?o_({x:e.clientX,y:e.clientY},t):!1}function c_(e){return t=>t.pointerType===`mouse`?e(t):void 0}var l_=sg,u_=lg,d_=pg,f_=_g,p_=Cg,m_=Tg,h_=Og,g_=jg,__=Fg,v_=Lg,y_=Vg,b_=Ug,x_=Gg,S_=Zg,C_=$g,w_=`DropdownMenu`,[T_,E_]=_u(w_,[eg]),D_=eg(),[O_,k_]=T_(w_),A_=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=D_(t),l=H.useRef(null),[u,d]=Su({prop:i,defaultProp:a??!1,onChange:o,caller:w_});return(0,U.jsx)(O_,{scope:t,triggerId:Pu(),triggerRef:l,contentId:Pu(),open:u,onOpenChange:d,onOpenToggle:H.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,U.jsx)(l_,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};A_.displayName=w_;var j_=`DropdownMenuTrigger`,M_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=k_(j_,n),o=D_(n);return(0,U.jsx)(u_,{asChild:!0,...o,children:(0,U.jsx)(hu.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:eu(t,a.triggerRef),onPointerDown:Z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});M_.displayName=j_;var N_=`DropdownMenuPortal`,P_=e=>{let{__scopeDropdownMenu:t,...n}=e,r=D_(t);return(0,U.jsx)(d_,{...r,...n})};P_.displayName=N_;var F_=`DropdownMenuContent`,I_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=k_(F_,n),a=D_(n),o=H.useRef(!1);return(0,U.jsx)(f_,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});I_.displayName=F_;var L_=`DropdownMenuGroup`,R_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(p_,{...i,...r,ref:t})});R_.displayName=L_;var z_=`DropdownMenuLabel`,B_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(m_,{...i,...r,ref:t})});B_.displayName=z_;var V_=`DropdownMenuItem`,H_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(h_,{...i,...r,ref:t})});H_.displayName=V_;var U_=`DropdownMenuCheckboxItem`,W_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(g_,{...i,...r,ref:t})});W_.displayName=U_;var G_=`DropdownMenuRadioGroup`,K_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(__,{...i,...r,ref:t})});K_.displayName=G_;var q_=`DropdownMenuRadioItem`,J_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(v_,{...i,...r,ref:t})});J_.displayName=q_;var Y_=`DropdownMenuItemIndicator`,X_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(y_,{...i,...r,ref:t})});X_.displayName=Y_;var Z_=`DropdownMenuSeparator`,Q_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(b_,{...i,...r,ref:t})});Q_.displayName=Z_;var $_=`DropdownMenuArrow`,ev=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(x_,{...i,...r,ref:t})});ev.displayName=$_;var tv=`DropdownMenuSubTrigger`,nv=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(S_,{...i,...r,ref:t})});nv.displayName=tv;var rv=`DropdownMenuSubContent`,iv=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(C_,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});iv.displayName=rv;var av=A_,ov=M_,sv=P_,cv=I_,lv=B_,uv=H_,dv=Q_,fv=[`__Host-bz_csrf`,`bz_csrf_dev`];function pv(e,t){let n=[];for(let r of e?.split(`;`)??[]){let e=r.indexOf(`=`);e>0&&r.slice(0,e).trim()===t&&n.push(r.slice(e+1).trim())}return n}function mv(e,t){return pv(e,t)[0]}var hv=class extends Error{status;code;body;constructor(e,t,n,r){super(e),this.status=t,this.code=n,this.body=r}};function gv(){for(let e of fv){let t=mv(document.cookie,e);if(t)return{"x-bazilion-csrf":t}}return{}}async function _v(e){let t=await e.text().catch(()=>``),n={};try{let e=JSON.parse(t);e&&typeof e==`object`&&(n=e)}catch{}let r=typeof n.error==`string`?n.error:t.slice(0,300)||`HTTP ${e.status}`,i=typeof n.code==`string`?n.code:void 0;return new hv(r,e.status,i,n)}async function vv(e,t={}){let n=t.method??(t.body===void 0?`GET`:`POST`),r=n===`GET`?{}:gv(),i;t.body instanceof FormData?i=t.body:t.body!==void 0&&(r[`content-type`]=`application/json`,i=JSON.stringify(t.body));let a=await fetch(e,{method:n,headers:r,body:i,signal:t.signal});if(!a.ok)throw await _v(a);return a}async function yv(e,t={}){let n=await(await vv(e,t)).text();return n?JSON.parse(n):void 0}function bv(e){return e instanceof Error?e.message:String(e)}var xv=`baziu-theme`,Sv={system:ql,light:Zl,dark:Jl},Cv={system:`light`,light:`dark`,dark:`system`};function wv(){if(typeof window>`u`)return`system`;let e=window.localStorage.getItem(xv);return e===`light`||e===`dark`||e===`system`?e:`system`}function Tv(e){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches,n=e===`dark`||e===`system`&&t;document.documentElement.classList.toggle(`dark`,n)}function Ev(){let[e,t]=(0,H.useState)(`system`);(0,H.useEffect)(()=>{t(wv())},[]),(0,H.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Tv(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]);let n=()=>{let n=Cv[e];t(n),window.localStorage.setItem(xv,n),Tv(n)},r=Sv[e],i=`Theme: ${e}. Switch to ${Cv[e]}.`;return(0,U.jsxs)(`button`,{type:`button`,onClick:n,className:`unstyled inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-frost bg-ivory px-2.5 text-mocha shadow-baziu-sm transition-all hover:border-sapphire-light hover:bg-sapphire-glow hover:text-sapphire active:translate-y-px`,title:i,"aria-label":i,children:[(0,U.jsx)(r,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`hidden text-xs font-medium capitalize xl:inline`,children:e})]})}var Dv=[{to:`/`,label:`Chat`,icon:Kl},{to:`/agents`,label:`Agents`,icon:Hl},{to:`/teams`,label:`Teams`,icon:Ql}],Ov=[{href:`/templates`,label:`Templates`,description:`Reusable Agent behavior and Team rosters.`,icon:Wl},{href:`/skills`,label:`Skills`,description:`Prompt skills available to your agents.`,icon:Xl},{href:`/config`,label:`Setup`,description:`Providers, integrations, access, and services.`,icon:Yl}];function kv(){let e=Ss({select:e=>e.location.pathname}),[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(e===`/login`||e===`/welcome`)return;let t=new AbortController;return yv(`/api/attention/summary`,{signal:t.signal}).then(n).catch(()=>{}),()=>t.abort()},[e]);let a=e===`/attention`||e.startsWith(`/attention/`),o=t?.openTotal??0;async function s(){i(null);try{await yv(`/api/logout`,{method:`POST`}),window.location.assign(`/login`)}catch(e){i(bv(e))}}return(0,U.jsxs)(`nav`,{"aria-label":`Primary navigation`,className:`relative mx-auto grid w-full max-w-[1500px] shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-2 border-b border-frost py-3 md:flex md:gap-2 md:py-4`,children:[(0,U.jsxs)(fe,{to:`/`,"aria-label":`Bazilion home`,className:`group flex min-w-0 items-center gap-2 rounded-lg text-charcoal transition-opacity hover:text-charcoal hover:opacity-80`,children:[(0,U.jsx)(jl,{className:`h-8 w-8 shrink-0 transition-transform duration-300 group-hover:rotate-[-8deg] group-hover:scale-[1.08]`}),(0,U.jsx)(`span`,{className:`truncate font-display text-[1.35rem] tracking-[-0.02em]`,children:`bazilion`})]}),(0,U.jsxs)(`div`,{className:`col-span-2 row-start-2 flex min-w-0 items-center gap-1 overflow-x-auto pb-0.5 md:col-auto md:row-auto md:ml-4 md:flex-1 md:overflow-visible md:pb-0`,children:[Dv.map(t=>{let n=t.to===`/`?e===`/`:e===t.to||e.startsWith(`${t.to}/`),r=t.icon;return(0,U.jsxs)(fe,{to:t.to,"aria-current":n?`page`:void 0,className:jv(n),children:[(0,U.jsx)(r,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:t.label})]},t.to)}),(0,U.jsxs)(fe,{to:`/attention`,"aria-current":a?`page`:void 0,className:jv(a),children:[(0,U.jsx)(Vl,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:`Attention`}),o>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-danger sm:hidden`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`hidden min-w-5 items-center justify-center rounded-full bg-danger px-1.5 py-0.5 text-xs font-semibold leading-4 text-primary-foreground sm:inline-flex`,"aria-hidden":`true`,children:o>99?`99+`:o}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[`, `,o,` open items`]})]})]}),(0,U.jsx)(Av,{label:`Manage`,icon:Yl,links:Ov,pathname:e,align:`end`})]}),(0,U.jsxs)(`div`,{className:`col-start-2 row-start-1 flex items-center gap-1 md:col-auto md:row-auto md:ml-auto`,children:[(0,U.jsx)(Ev,{}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>void s(),"aria-label":`Log out`,title:`Log out`,className:`unstyled inline-flex h-9 w-9 items-center justify-center rounded-lg text-mocha hover:bg-ivory hover:text-sapphire`,children:(0,U.jsx)(Gl,{className:`h-4 w-4`,"aria-hidden":`true`})})]}),r&&(0,U.jsx)(`p`,{role:`alert`,className:`col-span-2 m-0 rounded-lg bg-danger/10 px-3 py-2 text-sm text-danger md:absolute md:right-0 md:top-[calc(100%+0.35rem)] md:z-50 md:shadow-baziu-md`,children:r})]})}function Av({label:e,icon:t,links:n,pathname:r,align:i=`start`}){let a=n.some(e=>r===e.href||r.startsWith(`${e.href}/`));return(0,U.jsxs)(av,{children:[(0,U.jsx)(ov,{asChild:!0,children:(0,U.jsxs)(`button`,{type:`button`,className:jv(a),"aria-label":`${e} menu`,children:[(0,U.jsx)(t,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:e}),(0,U.jsx)(Ul,{className:`size-3 shrink-0 text-muted-foreground`,"aria-hidden":`true`})]})}),(0,U.jsx)(sv,{children:(0,U.jsxs)(cv,{align:i,sideOffset:8,collisionPadding:12,className:`z-50 w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,children:[(0,U.jsx)(lv,{className:`px-2.5 pb-1 pt-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground`,children:e}),n.map(e=>{let t=e.icon,n=r===e.href||r.startsWith(`${e.href}/`);return(0,U.jsx)(uv,{asChild:!0,children:(0,U.jsxs)(`a`,{href:e.href,"aria-current":n?`page`:void 0,className:`flex cursor-pointer items-start gap-3 rounded-lg px-2.5 py-2.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground ${n?`bg-accent/70 text-accent-foreground`:`text-foreground`}`,children:[(0,U.jsx)(`span`,{className:`mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,U.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`})}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block text-sm font-semibold`,children:e.label}),(0,U.jsx)(`span`,{className:`mt-0.5 block text-xs leading-5 text-muted-foreground`,children:e.description})]})]})},e.href)})]})})]})}function jv(e){return`unstyled inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-sm font-semibold transition-colors sm:px-2.5 ${e?`border-sapphire-light bg-sapphire-glow text-sapphire shadow-baziu-sm`:`border-transparent text-mocha hover:border-frost hover:bg-ivory hover:text-sapphire`}`}var Mv=W({method:`GET`}).handler(V(`a5d3825fc69573bb55bab6df578c750ebb0240dd394c3acee3adea02918a5dc2`)),Nv=new Set([`/login`]),Pv=[`/welcome`,`/config`];function Fv(e){return Pv.some(t=>e===t||e.startsWith(`${t}/`))}var Iv=`/assets/styles-d9JiV6N4.css`,Lv=`(function(){try{var t=localStorage.getItem('baziu-theme');var sd=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches;var d=t==='dark'||((t===null||t==='system')&&sd);document.documentElement.classList.toggle('dark',d);}catch(e){}})();`,Rv=le({beforeLoad:async({location:e})=>{let t=e.pathname;if(Nv.has(t)||t.startsWith(`/api/`))return;let n=await Mv();if(!n.authed)throw _e({to:`/login`});if(!Fv(t)&&!n.setupComplete)throw _e({to:`/welcome`})},head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`bazilion`}],links:[{rel:`icon`,type:`image/svg+xml`,href:`/baziu.svg`},{rel:`stylesheet`,href:Iv}]}),component:Bv,notFoundComponent:zv});function zv(){let e=Ss({select:e=>e.location.pathname});return(0,U.jsx)(`div`,{className:`mx-auto max-w-2xl`,children:(0,U.jsxs)(`div`,{className:`card`,children:[(0,U.jsx)(`h1`,{children:`Not found`}),(0,U.jsxs)(`p`,{className:`muted my-3`,children:[`Nothing lives at `,(0,U.jsx)(`code`,{children:e}),`.`]}),(0,U.jsx)(fe,{to:`/`,children:`Back to home`})]})})}function Bv(){let e=Ss({select:e=>e.location.pathname}),t=e===`/login`,n=e===`/`;return(0,U.jsxs)(`html`,{lang:`en`,"data-layout":n?`workspace`:`page`,suppressHydrationWarning:!0,children:[(0,U.jsxs)(`head`,{children:[(0,U.jsx)(`script`,{dangerouslySetInnerHTML:{__html:Lv}}),(0,U.jsx)(Ds,{})]}),(0,U.jsxs)(`body`,{"data-layout":n?`workspace`:`page`,children:[!t&&(0,U.jsx)(`a`,{href:`#main-content`,className:`sr-only z-[100] rounded-lg bg-primary px-4 py-2 font-semibold text-primary-foreground focus:not-sr-only focus:fixed focus:left-3 focus:top-3`,children:`Skip to main content`}),t?(0,U.jsx)(ps,{}):n?(0,U.jsxs)(`div`,{className:`flex h-dvh flex-col`,children:[(0,U.jsx)(`div`,{className:`px-3 sm:px-5`,children:(0,U.jsx)(kv,{})}),(0,U.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:`mx-auto min-h-0 w-full max-w-[1600px] flex-1 overflow-hidden px-3 pb-3 sm:px-5 sm:pb-5`,children:(0,U.jsx)(ps,{})})]}):(0,U.jsxs)(`div`,{className:`flex min-h-dvh flex-col`,children:[(0,U.jsx)(`div`,{className:`px-3 sm:px-5`,children:(0,U.jsx)(kv,{})}),(0,U.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:`mx-auto w-full max-w-[1500px] flex-1 px-4 py-9 sm:px-6 sm:py-12`,children:(0,U.jsx)(ps,{})}),(0,U.jsx)(`div`,{className:`px-4 sm:px-6`,children:(0,U.jsx)(Nl,{})})]}),(0,U.jsx)(Os,{})]})]})}var Vv=N(`/welcome`)({beforeLoad:async()=>{if((await Mv()).setupComplete)throw _e({to:`/`})},component:M(()=>P(()=>import(`./welcome-C-hJvXWG.js`),__vite__mapDeps([0,1])),`component`)}),Hv=N(`/login`)({validateSearch:e=>({error:e.error===`token`||e.error===`origin`?e.error:void 0}),component:M(()=>P(()=>import(`./login-6S3kA9Yb.js`),__vite__mapDeps([2,1])),`component`)}),Uv=()=>P(()=>import(`./routes-CInZFLoI.js`),__vite__mapDeps([3,1,4,5,6,7,8,9,10,11,12,13,14,15])),Wv=W({method:`GET`}).handler(V(`aa485ed8b67fcc5a2feedbfdbdf6b41aa7c7aff92f357123818169f62b907ce1`)),Gv=N(`/`)({validateSearch:e=>({agent:typeof e.agent==`string`?e.agent:void 0}),loaderDeps:({search:e})=>({agentId:e.agent}),loader:({deps:e})=>Wv({data:{agentId:e.agentId}}),component:M(Uv,`component`)}),Kv=N(`/templates/`)({beforeLoad:()=>{throw _e({to:`/templates/agents`})}}),qv=()=>P(()=>import(`./teams-D-g74z8r.js`),__vite__mapDeps([16,1,4,5,10])),Jv=W({method:`GET`}).handler(V(`fda651b73911d8ef30f3a6b58894b5d853fdc4997acaf1793c76c06680504b82`)),Yv=N(`/teams/`)({loader:()=>Jv(),component:M(qv,`component`)}),Xv=()=>P(()=>import(`./skills-CgrXwmh8.js`),__vite__mapDeps([17,1,4,5,18,19])),Zv=W({method:`GET`}).handler(V(`ae1d30575b229c1e2622fbaf2252800a9a7acc84afdd68cba025ca890b8d52c5`)),Qv=N(`/skills/`)({loader:()=>Zv(),component:M(Xv,`component`)}),$v=()=>P(()=>import(`./config-B483VUYj.js`),__vite__mapDeps([20,1,4,21,22,5,23,14])),ey=W({method:`GET`}).handler(V(`b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e`)),ty=N(`/config/`)({loader:()=>ey(),component:M($v,`component`)}),ny=()=>P(()=>import(`./attention-CLQIHUF6.js`),__vite__mapDeps([24,1,4])),ry=W({method:`GET`}).handler(V(`883b401299422096ee31ee824f9a24b49d06bdcedce398789778c4c549a92f3a`)),iy=N(`/attention/`)({loader:()=>ry(),component:M(ny,`component`)}),ay=()=>P(()=>import(`./agents-DwDcKOif.js`),__vite__mapDeps([25,1,4,26,5,6,7,8,13])),oy=W({method:`GET`}).handler(V(`f715bab0037380aa3db7e237e7cf1e74168c363f48a960bb1ddfa5560de3a74e`)),sy=N(`/agents/`)({validateSearch:e=>({all:e.all===1?1:void 0}),loaderDeps:({search:e})=>({all:e.all===1}),loader:({deps:e})=>oy({data:{all:e.all}}),component:M(ay,`component`)}),cy=()=>P(()=>import(`./tokens-ZTSxCsD_.js`),__vite__mapDeps([27,1,4,21,22,5])),ly=W({method:`GET`}).handler(V(`46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1`)),uy=N(`/config/tokens`)({validateSearch:e=>({all:e.all===1?1:void 0}),loaderDeps:({search:e})=>({all:e.all===1}),loader:({deps:e})=>ly({data:e}),component:M(cy,`component`)}),dy=()=>P(()=>import(`./services-CeB7gfY5.js`),__vite__mapDeps([28,1,21,22,4,23,5])),fy=W({method:`GET`}).handler(V(`6afd81bef0ee381d6e3641cd8e269968429c874e2f9d56c8f818cc9d180ee477`)),py=N(`/config/services`)({loader:()=>fy(),component:M(dy,`component`)}),my=()=>P(()=>import(`./mcp-Dm4DfYI9.js`),__vite__mapDeps([29,1,4,21,22,5])),hy=W({method:`GET`}).handler(V(`278849457893891c3d22806d15e11a0a42cc3630b30e9e62b74cf2d3b982ded7`)),gy=N(`/config/mcp`)({loader:()=>hy(),component:M(my,`component`)}),_y=()=>P(()=>import(`./route-DUIeAVZz.js`),__vite__mapDeps([30,1,22,4])),vy=W({method:`GET`}).handler(V(`05fb9426fe401894b8c313750d7a9327b4b27ef1950e51e71230c1afa1d6c0e3`)),yy=N(`/teams/$id`)({loader:async({params:e})=>{let t=await vy({data:{id:e.id}});if(!t)throw _e({to:`/teams`});return t},component:M(_y,`component`)}),by=()=>P(()=>import(`./route-V5VM1ufA.js`),__vite__mapDeps([31,1,4,26,5,22,13])),xy=W({method:`GET`}).handler(V(`1fad3d69efc68773472688683a8982dfaf67e4a7443cfabac9bdf7e88a2e1b16`)),Sy=N(`/agents/$id`)({loader:async({params:e})=>{let t=await xy({data:{id:e.id}});if(!t)throw _e({to:`/agents`});return t},component:M(by,`component`)}),Cy=()=>P(()=>import(`./teams-C98Ww6Xu.js`),__vite__mapDeps([32,1,4,22])),wy=W({method:`GET`}).handler(V(`04bb4df13ae68275e2f037ca67976778d2133273183d30d9ac2821f7cc7e85ad`)),Ty=N(`/templates/teams/`)({loader:()=>wy(),component:M(Cy,`component`)}),Ey=()=>P(()=>import(`./agents-KnMSeucP.js`),__vite__mapDeps([33,1,4,5,7,22,34,19,35])),Dy=W({method:`GET`}).handler(V(`bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3`)),Oy=N(`/templates/agents/`)({loader:()=>Dy(),component:M(Ey,`component`)}),ky=()=>P(()=>import(`./telegram-Cc8NJ4Tc.js`),__vite__mapDeps([36,1,4,21,22,5])),Ay=W({method:`GET`}).handler(V(`00a157dd07824e1f126f06646effd1d876f280f6fc64c144d2f6429414a4e58a`)),jy=N(`/config/integrations/telegram`)({loader:()=>Ay(),component:M(ky,`component`)}),My=()=>P(()=>import(`./_id-B-Vo1VkF.js`),__vite__mapDeps([37,1,4,9,5,35])),Ny=W({method:`GET`}).handler(V(`d821ed23cd43821db345683976465a24f170589df68088bb55f750bfe15c26f4`)),Py=N(`/teams/$id/`)({loader:({params:e})=>Ny({data:{id:e.id}}),component:M(My,`component`)}),Fy=()=>P(()=>import(`./review-BN6V988m.js`),__vite__mapDeps([38,1])),Iy=W({method:`GET`}).handler(V(`6659620aa409e12d6be1ba1fb1d9fca44c41efc089d65c643ece70012eec09e0`)),Ly=N(`/teams/$id/review`)({loader:({params:e})=>Iy({data:{id:e.id}}),component:M(Fy,`component`)}),Ry=()=>P(()=>import(`./results-CGNpUJ11.js`),__vite__mapDeps([39,1,5,12])),zy=W({method:`GET`}).handler(V(`b93845a5c9968cbaa021a77eb2c7a87d4126757225ca2cb100306497429a71a9`)),By=N(`/teams/$id/results`)({loader:()=>zy(),component:M(Ry,`component`)}),Vy=()=>P(()=>import(`./policy-IKYNTvWX.js`),__vite__mapDeps([40,1,41,4,5,35,15,8,42])),Hy=W({method:`GET`}).handler(V(`fc940d6dec5305aa64bdb9b9f5f7d4f925b2ba0608cb6d39af854a94872fc867`)),Uy=N(`/teams/$id/policy`)({loader:({params:e})=>Hy({data:{id:e.id}}),component:M(Vy,`component`)}),Wy=()=>P(()=>import(`./memory-M28_uFOH.js`),__vite__mapDeps([43,1,5,35,4])),Gy=W({method:`GET`}).handler(V(`b96a98e3ed6c8a3ab5f6a4ed8458e93da753ffd74e2912ef1724bb6e58030cb5`)),Ky=N(`/teams/$id/memory`)({loader:({params:e})=>Gy({data:{id:e.id}}),component:M(Wy,`component`)}),qy=()=>P(()=>import(`./members-CD93Kya7.js`),__vite__mapDeps([44,1])),Jy=W({method:`GET`}).handler(V(`0a6e766d2b4ea526da34cefed5342a6ecc5ff35ad1ce38fba4129b8c24d8e6e5`)),Yy=N(`/teams/$id/members`)({loader:({params:e})=>Jy({data:{id:e.id}}),component:M(qy,`component`)}),Xy=()=>P(()=>import(`./_id-CrGDqaFa.js`),__vite__mapDeps([45,1,4,11,12])),Zy=W({method:`GET`}).handler(V(`e5f53edbb784a056b79f0f2a7e3c945bef3981e0ce85561ed17c35e47cd45a66`)),Qy=N(`/agents/$id/`)({validateSearch:e=>typeof e.conversation==`string`?{conversation:e.conversation}:{},loader:({params:e})=>Zy({data:{id:e.id}}),component:M(Xy,`component`)}),$y=()=>P(()=>import(`./triggers-Br8Wk4Yk.js`),__vite__mapDeps([46,1,4,5])),eb=W({method:`GET`}).handler(V(`57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d`)),tb=N(`/agents/$id/triggers`)({loader:({params:e})=>eb({data:{id:e.id}}),component:M($y,`component`)}),nb=()=>P(()=>import(`./settings-BWonPTKi.js`),__vite__mapDeps([47,1,4,5,7,18,8])),rb=W({method:`GET`}).handler(V(`0fa2a6b260fc042ad52b696162ea55906f3ccbff079f0bfa26ed337fa369639e`)),ib=N(`/agents/$id/settings`)({loader:()=>rb(),component:M(nb,`component`)}),ab=()=>P(()=>import(`./learning-DDTz_N6N.js`),__vite__mapDeps([48,1,4,5,8])),ob=W({method:`GET`}).handler(V(`fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9`)),sb=N(`/agents/$id/learning`)({loader:({params:e})=>ob({data:{id:e.id}}),component:M(ab,`component`)}),cb=()=>P(()=>import(`./inbox-DIXsxGV8.js`),__vite__mapDeps([49,1,4])),lb=W({method:`GET`}).handler(V(`2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb`)),ub=N(`/agents/$id/inbox`)({validateSearch:e=>({unread:e.unread===1?1:void 0,id:typeof e.id==`string`?e.id:void 0}),loaderDeps:({search:e})=>({unreadOnly:e.unread===1,selectedId:e.id??``}),loader:({params:e,deps:t})=>lb({data:{id:e.id,...t}}),component:M(cb,`component`)}),db=()=>P(()=>import(`./_id-iXED17f-.js`),__vite__mapDeps([50,1,5,22,4,41,35,15,8,42])),fb=W({method:`GET`}).handler(V(`c13d90cf82cd448c86427091165d0361b92843852a3f73a5bf4412dd2adc6bae`)),pb=N(`/templates/teams/$id/`)({loader:({params:e})=>fb({data:{id:e.id}}),component:M(db,`component`)}),mb=()=>P(()=>import(`./_id-CNN1ila9.js`),__vite__mapDeps([51,1,4,7,22,34,19,35,5])),hb=W({method:`GET`}).handler(V(`032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e`)),gb=N(`/templates/agents/$id/`)({loader:async({params:e})=>{let t=await hb({data:{id:e.id}});if(!t)throw _e({to:`/templates/agents`});return t},component:M(mb,`component`)}),_b=Vv.update({id:`/welcome`,path:`/welcome`,getParentRoute:()=>Rv}),vb=Hv.update({id:`/login`,path:`/login`,getParentRoute:()=>Rv}),yb=Gv.update({id:`/`,path:`/`,getParentRoute:()=>Rv}),bb=Kv.update({id:`/templates/`,path:`/templates/`,getParentRoute:()=>Rv}),xb=Yv.update({id:`/teams/`,path:`/teams/`,getParentRoute:()=>Rv}),Sb=Qv.update({id:`/skills/`,path:`/skills/`,getParentRoute:()=>Rv}),Cb=ty.update({id:`/config/`,path:`/config/`,getParentRoute:()=>Rv}),wb=iy.update({id:`/attention/`,path:`/attention/`,getParentRoute:()=>Rv}),Tb=sy.update({id:`/agents/`,path:`/agents/`,getParentRoute:()=>Rv}),Eb=uy.update({id:`/config/tokens`,path:`/config/tokens`,getParentRoute:()=>Rv}),Db=py.update({id:`/config/services`,path:`/config/services`,getParentRoute:()=>Rv}),Ob=gy.update({id:`/config/mcp`,path:`/config/mcp`,getParentRoute:()=>Rv}),kb=yy.update({id:`/teams/$id`,path:`/teams/$id`,getParentRoute:()=>Rv}),Ab=Sy.update({id:`/agents/$id`,path:`/agents/$id`,getParentRoute:()=>Rv}),jb=Ty.update({id:`/templates/teams/`,path:`/templates/teams/`,getParentRoute:()=>Rv}),Mb=Oy.update({id:`/templates/agents/`,path:`/templates/agents/`,getParentRoute:()=>Rv}),Nb=jy.update({id:`/config/integrations/telegram`,path:`/config/integrations/telegram`,getParentRoute:()=>Rv}),Pb=Py.update({id:`/`,path:`/`,getParentRoute:()=>kb}),Fb=Ly.update({id:`/review`,path:`/review`,getParentRoute:()=>kb}),Ib=By.update({id:`/results`,path:`/results`,getParentRoute:()=>kb}),Lb=Uy.update({id:`/policy`,path:`/policy`,getParentRoute:()=>kb}),Rb=Ky.update({id:`/memory`,path:`/memory`,getParentRoute:()=>kb}),zb=Yy.update({id:`/members`,path:`/members`,getParentRoute:()=>kb}),Bb=Qy.update({id:`/`,path:`/`,getParentRoute:()=>Ab}),Vb=tb.update({id:`/triggers`,path:`/triggers`,getParentRoute:()=>Ab}),Hb=ib.update({id:`/settings`,path:`/settings`,getParentRoute:()=>Ab}),Ub=sb.update({id:`/learning`,path:`/learning`,getParentRoute:()=>Ab}),Wb=ub.update({id:`/inbox`,path:`/inbox`,getParentRoute:()=>Ab}),Gb=pb.update({id:`/templates/teams/$id/`,path:`/templates/teams/$id/`,getParentRoute:()=>Rv}),Kb=gb.update({id:`/templates/agents/$id/`,path:`/templates/agents/$id/`,getParentRoute:()=>Rv}),qb={AgentsIdInboxRoute:Wb,AgentsIdLearningRoute:Ub,AgentsIdSettingsRoute:Hb,AgentsIdTriggersRoute:Vb,AgentsIdIndexRoute:Bb},Jb=Ab._addFileChildren(qb),Yb={TeamsIdMembersRoute:zb,TeamsIdMemoryRoute:Rb,TeamsIdPolicyRoute:Lb,TeamsIdResultsRoute:Ib,TeamsIdReviewRoute:Fb,TeamsIdIndexRoute:Pb},Xb={IndexRoute:yb,LoginRoute:vb,WelcomeRoute:_b,AgentsIdRouteRoute:Jb,TeamsIdRouteRoute:kb._addFileChildren(Yb),ConfigMcpRoute:Ob,ConfigServicesRoute:Db,ConfigTokensRoute:Eb,AgentsIndexRoute:Tb,AttentionIndexRoute:wb,ConfigIndexRoute:Cb,SkillsIndexRoute:Sb,TeamsIndexRoute:xb,TemplatesIndexRoute:bb,ConfigIntegrationsTelegramRoute:Nb,TemplatesAgentsIndexRoute:Mb,TemplatesTeamsIndexRoute:jb,TemplatesAgentsIdIndexRoute:Kb,TemplatesTeamsIdIndexRoute:Gb},Zb=Rv._addFileChildren(Xb);function Qb(){return vs({routeTree:Zb,scrollRestoration:!0,defaultPreload:`intent`,defaultErrorComponent:kl,defaultPendingComponent:Al})}async function $b(){let e=await Qb(),t;if(Hs){let n=await Hs.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(To),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await jo(e),e}var ex=$b;async function tx(){let e=await ex();return window.$_TSR?.h(),e}var nx;function rx(){return nx||=tx(),(0,U.jsx)(No,{promise:nx,children:e=>(0,U.jsx)(xs,{router:e})})}var ix=Ce();(0,H.startTransition)(()=>{(0,ix.hydrateRoot)(document,(0,U.jsx)(H.StrictMode,{children:(0,U.jsx)(rx,{})}))});export{hu as $,hv as A,ov as B,iy as C,Gv as D,Yv as E,uv as F,nd as G,Of as H,lv as I,Pu as J,Q as K,sv as L,vv as M,bv as N,Hv as O,cv as P,_u as Q,av as R,sy as S,Qv as T,vd as U,Lf as V,hd as W,Su as X,Eu as Y,Z,Sy as _,Ws as _t,ib as a,Bl as at,py as b,Yy as c,Cl as ct,By as d,xl as dt,nu as et,Ly as f,bl as ft,Ty as g,vl as gt,Oy as h,Tl as ht,sb as i,Hl as it,yv as j,Ev as k,Ky as l,El as lt,jy as m,Ol as mt,pb as n,Ql as nt,tb as o,Ml as ot,Py as p,Sl as pt,qu as q,ub as r,Ul as rt,Qy as s,jl as st,gb as t,tu as tt,Uy as u,Dl as ut,yy as v,ps as vt,ty as w,uy as x,gy as y,dv as z};
52
+ `},Cf=0,wf=[];function Tf(e){var t=H.useRef([]),n=H.useRef([0,0]),r=H.useRef(),i=H.useState(Cf++)[0],a=H.useState(Kd)[0],o=H.useRef(e);H.useEffect(function(){o.current=e},[e]),H.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=xd([e.lockRef.current],(e.shards||[]).map(bf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=H.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=vf(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=df(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=df(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return _f(h,t,e,h===`h`?s:c,!0)},[]),c=H.useCallback(function(e){var n=e;if(!(!wf.length||wf[wf.length-1]!==a)){var r=`deltaY`in n?yf(n):vf(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&xf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(bf).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=H.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ef(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=H.useCallback(function(e){n.current=vf(e),r.current=void 0},[]),d=H.useCallback(function(t){l(t.type,yf(t),t.target,s(t,e.lockRef.current))},[]),f=H.useCallback(function(t){l(t.type,vf(t),t.target,s(t,e.lockRef.current))},[]);H.useEffect(function(){return wf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,of),document.addEventListener(`touchmove`,c,of),document.addEventListener(`touchstart`,u,of),function(){wf=wf.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,of),document.removeEventListener(`touchmove`,c,of),document.removeEventListener(`touchstart`,u,of)}},[]);var p=e.removeScrollBar,m=e.inert;return H.createElement(H.Fragment,null,m?H.createElement(a,{styles:Sf(i)}):null,p?H.createElement(nf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ef(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Df=Fd(Id,Tf),Of=H.forwardRef(function(e,t){return H.createElement(Rd,$({},e,{ref:t,sideCar:Df}))});Of.classNames=Rd.classNames;var kf=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Af=new WeakMap,jf=new WeakMap,Mf={},Nf=0,Pf=function(e){return e&&(e.host||Pf(e.parentNode))},Ff=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Pf(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},If=function(e,t,n,r){var i=Ff(t,Array.isArray(e)?e:[e]);Mf[n]||(Mf[n]=new WeakMap);var a=Mf[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Af.get(e)||0)+1,l=(a.get(e)||0)+1;Af.set(e,c),a.set(e,l),o.push(e),c===1&&i&&jf.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Nf++,function(){o.forEach(function(e){var t=Af.get(e)-1,i=a.get(e)-1;Af.set(e,t),a.set(e,i),t||(jf.has(e)||e.removeAttribute(r),jf.delete(e)),i||e.removeAttribute(n)}),Nf--,Nf||(Af=new WeakMap,Af=new WeakMap,jf=new WeakMap,Mf={})}},Lf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||kf(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),If(r,i,n,`aria-hidden`)):function(){return null}};function Rf(e){let[t,n]=H.useState(void 0);return bu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var zf=[`top`,`right`,`bottom`,`left`],Bf=Math.min,Vf=Math.max,Hf=Math.round,Uf=Math.floor,Wf=e=>({x:e,y:e}),Gf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Kf(e,t,n){return Vf(e,Bf(t,n))}function qf(e,t){return typeof e==`function`?e(t):e}function Jf(e){return e.split(`-`)[0]}function Yf(e){return e.split(`-`)[1]}function Xf(e){return e===`x`?`y`:`x`}function Zf(e){return e===`y`?`height`:`width`}function Qf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $f(e){return Xf(Qf(e))}function ep(e,t,n){n===void 0&&(n=!1);let r=Yf(e),i=$f(e),a=Zf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lp(o)),[o,lp(o)]}function tp(e){let t=lp(e);return[np(e),t,np(t)]}function np(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rp=[`left`,`right`],ip=[`right`,`left`],ap=[`top`,`bottom`],op=[`bottom`,`top`];function sp(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ip:rp:t?rp:ip;case`left`:case`right`:return t?ap:op;default:return[]}}function cp(e,t,n,r){let i=Yf(e),a=sp(Jf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(np)))),a}function lp(e){let t=Jf(e);return Gf[t]+e.slice(t.length)}function up(e){return{top:0,right:0,bottom:0,left:0,...e}}function dp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:up(e)}function fp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pp(e,t,n){let{reference:r,floating:i}=e,a=Qf(t),o=$f(t),s=Zf(o),c=Jf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Yf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function mp(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=qf(t,e),p=dp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var hp=50,gp=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mp},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<hp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=pp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_p=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=qf(e,t)||{};if(l==null)return{};let d=dp(u),f={x:n,y:r},p=$f(i),m=Zf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,ee=Bf(d[_],E),D=Bf(d[v],E),te=ee,ne=C-h[m]-D,re=C/2-h[m]/2+w,ie=Kf(te,re,ne),ae=!c.arrow&&Yf(i)!=null&&re!==ie&&a.reference[m]/2-(re<te?ee:D)-h[m]/2<0,oe=ae?re<te?re-te:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),vp=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=qf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Jf(r),_=Qf(o),v=Jf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[lp(o)]:tp(o)),x=p!==`none`;!d&&x&&b.push(...cp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],E=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ep(r,a,y);w.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Qf(t))||E.every(e=>Qf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=E.filter(e=>{if(x){let t=Qf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bp(e){return zf.some(t=>e[t]>=0)}var xp=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=qf(e,t);switch(i){case`referenceHidden`:{let e=yp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bp(e)}}}case`escaped`:{let e=yp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bp(e)}}}default:return{}}}}},Sp=new Set([`left`,`top`]);async function Cp(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Jf(n),s=Yf(n),c=Qf(n)===`y`,l=Sp.has(o)?-1:1,u=a&&c?-1:1,d=qf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var wp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Cp(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Tp=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=qf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Qf(Jf(i)),p=Xf(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Kf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Kf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ep=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=qf(e,t),u={x:n,y:r},d=Qf(i),f=Xf(d),p=u[f],m=u[d],h=qf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Sp.has(Jf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Dp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=qf(e,t),u=await o.detectOverflow(t,l),d=Jf(i),f=Yf(i),p=Qf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Bf(h-u[g],v),x=Bf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Vf(u.left,0),t=Vf(u.right,0),n=Vf(u.top,0),r=Vf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Vf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Vf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let E=await o.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function Op(){return typeof window<`u`}function kp(e){return Mp(e)?(e.nodeName||``).toLowerCase():`#document`}function Ap(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jp(e){return((Mp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mp(e){return Op()?e instanceof Node||e instanceof Ap(e).Node:!1}function Np(e){return Op()?e instanceof Element||e instanceof Ap(e).Element:!1}function Pp(e){return Op()?e instanceof HTMLElement||e instanceof Ap(e).HTMLElement:!1}function Fp(e){return!Op()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ap(e).ShadowRoot}function Ip(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lp(e){return/^(table|td|th)$/.test(kp(e))}function Rp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zp=/transform|translate|scale|rotate|perspective|filter/,Bp=/paint|layout|strict|content/,Vp=e=>!!e&&e!==`none`,Hp;function Up(e){let t=Np(e)?qp(e):e;return Vp(t.transform)||Vp(t.translate)||Vp(t.scale)||Vp(t.rotate)||Vp(t.perspective)||!Gp()&&(Vp(t.backdropFilter)||Vp(t.filter))||zp.test(t.willChange||``)||Bp.test(t.contain||``)}function Wp(e){let t=Yp(e);for(;Pp(t)&&!Kp(t);){if(Up(t))return t;if(Rp(t))return null;t=Yp(t)}return null}function Gp(){return Hp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hp}function Kp(e){return/^(html|body|#document)$/.test(kp(e))}function qp(e){return Ap(e).getComputedStyle(e)}function Jp(e){return Np(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yp(e){if(kp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fp(e)&&e.host||jp(e);return Fp(t)?t.host:t}function Xp(e){let t=Yp(e);return Kp(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pp(t)&&Ip(t)?t:Xp(t)}function Zp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xp(e),i=r===e.ownerDocument?.body,a=Ap(r);if(i){let e=Qp(a);return t.concat(a,a.visualViewport||[],Ip(r)?r:[],e&&n?Zp(e):[])}else return t.concat(r,Zp(r,[],n))}function Qp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $p(e){let t=qp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Hf(n)!==a||Hf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function em(e){return Np(e)?e:e.contextElement}function tm(e){let t=em(e);if(!Pp(t))return Wf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$p(t),o=(a?Hf(n.width):n.width)/r,s=(a?Hf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nm=Wf(0);function rm(e){let t=Ap(e);return!Gp()||!t.visualViewport?nm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function im(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ap(e)?!1:t}function am(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=em(e),o=Wf(1);t&&(r?Np(r)&&(o=tm(r)):o=tm(e));let s=im(a,n,r)?rm(a):Wf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ap(a),t=r&&Np(r)?Ap(r):r,n=e,i=Qp(n);for(;i&&r&&t!==n;){let e=tm(i),t=i.getBoundingClientRect(),r=qp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ap(i),i=Qp(n)}}return fp({width:u,height:d,x:c,y:l})}function om(e,t){let n=Jp(e).scrollLeft;return t?t.left+n:am(jp(e)).left+n}function sm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-om(e,n),y:n.top+t.scrollTop}}function cm(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jp(r),s=t?Rp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wf(1),u=Wf(0),d=Pp(r);if((d||!d&&!a)&&((kp(r)!==`body`||Ip(o))&&(c=Jp(r)),d)){let e=am(r);l=tm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sm(o,c):Wf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lm(e){return Array.from(e.getClientRects())}function um(e){let t=jp(e),n=Jp(e),r=e.ownerDocument.body,i=Vf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+om(e),s=-n.scrollTop;return qp(r).direction===`rtl`&&(o+=Vf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var dm=25;function fm(e,t){let n=Ap(e),r=jp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Gp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=om(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=dm&&(a-=o)}else l<=dm&&(a+=l);return{width:a,height:o,x:s,y:c}}function pm(e,t){let n=am(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Pp(e)?tm(e):Wf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mm(e,t,n){let r;if(t===`viewport`)r=fm(e,n);else if(t===`document`)r=um(jp(e));else if(Np(t))r=pm(t,n);else{let n=rm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fp(r)}function hm(e,t){let n=Yp(e);return n===t||!Np(n)||Kp(n)?!1:qp(n).position===`fixed`||hm(n,t)}function gm(e,t){let n=t.get(e);if(n)return n;let r=Zp(e,[],!1).filter(e=>Np(e)&&kp(e)!==`body`),i=null,a=qp(e).position===`fixed`,o=a?Yp(e):e;for(;Np(o)&&!Kp(o);){let t=qp(o),n=Up(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ip(o)&&!n&&hm(e,o))?r=r.filter(e=>e!==o):i=t,o=Yp(o)}return t.set(e,r),r}function _m(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rp(t)?[]:gm(t,this._c):[].concat(n),r],o=mm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=mm(t,a[e],i);s=Vf(n.top,s),c=Bf(n.right,c),l=Bf(n.bottom,l),u=Vf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function vm(e){let{width:t,height:n}=$p(e);return{width:t,height:n}}function ym(e,t,n){let r=Pp(t),i=jp(t),a=n===`fixed`,o=am(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Wf(0);function l(){c.x=om(i)}if(r||!r&&!a)if((kp(t)!==`body`||Ip(i))&&(s=Jp(t)),r){let e=am(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?sm(i,s):Wf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function bm(e){return qp(e).position===`static`}function xm(e,t){if(!Pp(e)||qp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jp(e)===n&&(n=n.ownerDocument.body),n}function Sm(e,t){let n=Ap(e);if(Rp(e))return n;if(!Pp(e)){let t=Yp(e);for(;t&&!Kp(t);){if(Np(t)&&!bm(t))return t;t=Yp(t)}return n}let r=xm(e,t);for(;r&&Lp(r)&&bm(r);)r=xm(r,t);return r&&Kp(r)&&bm(r)&&!Up(r)?n:r||Wp(e)||n}var Cm=async function(e){let t=this.getOffsetParent||Sm,n=this.getDimensions,r=await n(e.floating);return{reference:ym(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wm(e){return qp(e).direction===`rtl`}var Tm={convertOffsetParentRelativeRectToViewportRelativeRect:cm,getDocumentElement:jp,getClippingRect:_m,getOffsetParent:Sm,getElementRects:Cm,getClientRects:lm,getDimensions:vm,getScale:tm,isElement:Np,isRTL:wm};function Em(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dm(e,t){let n=null,r,i=jp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Uf(d),h=Uf(i.clientWidth-(u+f)),g=Uf(i.clientHeight-(d+p)),_=Uf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Vf(0,Bf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Em(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Om(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=em(e),u=i||a?[...l?Zp(l):[],...t?Zp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Dm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?am(e):null;c&&g();function g(){let t=am(e);h&&!Em(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var km=wp,Am=Tp,jm=vp,Mm=Dp,Nm=xp,Pm=_p,Fm=Ep,Im=(e,t,n)=>{let r=new Map,i={platform:Tm,...n},a={...i.platform,_c:r};return gp(e,t,{...i,platform:a})},Lm=typeof document<`u`?H.useLayoutEffect:function(){};function Rm(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,i;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(!Rm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Rm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function zm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bm(e,t){let n=zm(e);return Math.round(t*n)/n}function Vm(e){let t=H.useRef(e);return Lm(()=>{t.current=e}),t}function Hm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=H.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=H.useState(r);Rm(f,r)||p(r);let[m,h]=H.useState(null),[g,_]=H.useState(null),v=H.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=H.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=H.useRef(null),C=H.useRef(null),w=H.useRef(u),E=c!=null,ee=Vm(c),D=Vm(i),te=Vm(l),ne=H.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Im(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!Rm(w.current,t)&&(w.current=t,mu.flushSync(()=>{d(t)}))})},[f,t,n,D,te]);Lm(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=H.useRef(!1);Lm(()=>(re.current=!0,()=>{re.current=!1}),[]),Lm(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,ne);ne()}},[b,x,ne,ee,E]);let ie=H.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ae=H.useMemo(()=>({reference:b,floating:x}),[b,x]),oe=H.useMemo(()=>{let e={position:n,left:0,top:0};if(!ae.floating)return e;let t=Bm(ae.floating,u.x),r=Bm(ae.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...zm(ae.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ae.floating,u.x,u.y]);return H.useMemo(()=>({...u,update:ne,refs:ie,elements:ae,floatingStyles:oe}),[u,ne,ie,ae,oe])}var Um=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Pm({element:r.current,padding:i}).fn(n):r?Pm({element:r,padding:i}).fn(n):{}}}},Wm=(e,t)=>{let n=km(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gm=(e,t)=>{let n=Am(e);return{name:n.name,fn:n.fn,options:[e,t]}},Km=(e,t)=>({fn:Fm(e).fn,options:[e,t]}),qm=(e,t)=>{let n=jm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jm=(e,t)=>{let n=Mm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ym=(e,t)=>{let n=Nm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xm=(e,t)=>{let n=Um(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zm=`Arrow`,Qm=H.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,U.jsx)(hu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,U.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Qm.displayName=Zm;var $m=Qm,eh=`Popper`,[th,nh]=_u(eh),[rh,ih]=th(eh),ah=e=>{let{__scopePopper:t,children:n}=e,[r,i]=H.useState(null),[a,o]=H.useState(void 0);return(0,U.jsx)(rh,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};ah.displayName=eh;var oh=`PopperAnchor`,sh=H.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=ih(oh,n),o=H.useRef(null),s=a.onAnchorChange,c=tu(t,H.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=H.useRef(null);H.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&_h(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,U.jsx)(hu.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});sh.displayName=oh;var ch=`PopperContent`,[lh,uh]=th(ch),dh=H.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=ih(ch,n),[_,v]=H.useState(null),y=tu(t,e=>v(e)),[b,x]=H.useState(null),S=Rf(b),C=S?.width??0,w=S?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],te=D.length>0,ne={padding:ee,boundary:D.filter(hh),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=Hm({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Om(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Wm({mainAxis:i+w,alignmentAxis:o}),c&&Gm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Km():void 0,...ne}),c&&qm({...ne}),Jm({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Xm({element:b,padding:s}),gh({arrowWidth:C,arrowHeight:w}),f&&Ym({strategy:`referenceHidden`,...ne,boundary:te?ne.boundary:void 0})]}),O=g.setPlacementState;bu(()=>(O(ae),()=>{O(void 0)}),[ae,O]);let[k,ce]=_h(ae),le=Lu(m);bu(()=>{oe&&le?.()},[oe,le]);let ue=se.arrow?.x,de=se.arrow?.y,A=se.arrow?.centerOffset!==0,[j,M]=H.useState();return bu(()=>{_&&M(window.getComputedStyle(_).zIndex)},[_]),(0,U.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:j,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)(lh,{scope:n,placedSide:k,placedAlign:ce,onArrowChange:x,arrowX:ue,arrowY:de,shouldHideArrow:A,children:(0,U.jsx)(hu.div,{"data-side":k,"data-align":ce,...h,ref:y,style:{...h.style,animation:oe?void 0:`none`}})})})});dh.displayName=ch;var fh=`PopperArrow`,ph={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mh=H.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=uh(fh,n),a=ph[i.placedSide];return(0,U.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,U.jsx)($m,{...r,ref:t,style:{...r.style,display:`block`}})})});mh.displayName=fh;function hh(e){return e!==null}var gh=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_h(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _h(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vh=ah,yh=sh,bh=dh,xh=mh,Sh=`rovingFocusGroup.onEntryFocus`,Ch={bubbles:!1,cancelable:!0},wh=`RovingFocusGroup`,[Th,Eh,Dh]=yu(wh),[Oh,kh]=_u(wh,[Dh]),[Ah,jh]=Oh(wh),Mh=H.forwardRef((e,t)=>(0,U.jsx)(Th.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(Th.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(Nh,{...e,ref:t})})}));Mh.displayName=wh;var Nh=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=H.useRef(null),p=tu(t,f),m=Iu(a),[h,g]=Su({prop:o,defaultProp:s??null,onChange:c,caller:wh}),[_,v]=H.useState(!1),y=Lu(l),b=Eh(n),x=H.useRef(!1),[S,C]=H.useState(0);return H.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Sh,y),()=>e.removeEventListener(Sh,y)},[y]),(0,U.jsx)(Ah,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:H.useCallback(e=>g(e),[g]),onItemShiftTab:H.useCallback(()=>v(!0),[]),onFocusableItemAdd:H.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:H.useCallback(()=>C(e=>e-1),[]),children:(0,U.jsx)(hu.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Z(e.onMouseDown,()=>{x.current=!0}),onFocus:Z(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Sh,Ch);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);zh([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:Z(e.onBlur,()=>v(!1))})})}),Ph=`RovingFocusGroupItem`,Fh=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Pu(),l=a||c,u=jh(Ph,n),d=u.currentTabStopId===l,f=Eh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return H.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,U.jsx)(Th.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,U.jsx)(hu.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Z(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Rh(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Bh(n,r+1):n.slice(r+1)}setTimeout(()=>zh(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Fh.displayName=Ph;var Ih={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Lh(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Rh(e,t,n){let r=Lh(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ih[r]}function zh(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vh=Mh,Hh=Fh,Uh=[`Enter`,` `],Wh=[`ArrowDown`,`PageUp`,`Home`],Gh=[`ArrowUp`,`PageDown`,`End`],Kh=[...Wh,...Gh],qh={ltr:[...Uh,`ArrowRight`],rtl:[...Uh,`ArrowLeft`]},Jh={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Yh=`Menu`,[Xh,Zh,Qh]=yu(Yh),[$h,eg]=_u(Yh,[Qh,nh,kh]),tg=nh(),ng=kh(),[rg,ig]=$h(Yh),[ag,og]=$h(Yh),sg=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=tg(t),[c,l]=H.useState(null),u=H.useRef(!1),d=Lu(a),f=Iu(i);return H.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),H.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,U.jsx)(vh,{...s,children:(0,U.jsx)(rg,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,U.jsx)(ag,{scope:t,onClose:H.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};sg.displayName=Yh;var cg=`MenuAnchor`,lg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tg(n);return(0,U.jsx)(yh,{...i,...r,ref:t})});lg.displayName=cg;var ug=`MenuPortal`,[dg,fg]=$h(ug,{forceMount:void 0}),pg=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ig(ug,t);return(0,U.jsx)(dg,{scope:t,forceMount:n,children:(0,U.jsx)(Eu,{present:n||a.open,children:(0,U.jsx)(hd,{asChild:!0,container:i,children:r})})})};pg.displayName=ug;var mg=`MenuContent`,[hg,gg]=$h(mg),_g=H.forwardRef((e,t)=>{let n=fg(mg,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ig(mg,e.__scopeMenu),o=og(mg,e.__scopeMenu);return(0,U.jsx)(Xh.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Eu,{present:r||a.open,children:(0,U.jsx)(Xh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,U.jsx)(vg,{...i,ref:t}):(0,U.jsx)(yg,{...i,ref:t})})})})}),vg=H.forwardRef((e,t)=>{let n=ig(mg,e.__scopeMenu),r=H.useRef(null),i=tu(t,r);return H.useEffect(()=>{let e=r.current;if(e)return Lf(e)},[]),(0,U.jsx)(xg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yg=H.forwardRef((e,t)=>{let n=ig(mg,e.__scopeMenu);return(0,U.jsx)(xg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),bg=nu(`MenuContent.ScrollLock`),xg=H.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=ig(mg,n),_=og(mg,n),v=tg(n),y=ng(n),b=Zh(n),[x,S]=H.useState(null),C=H.useRef(null),w=tu(t,C,g.onContentChange),E=H.useRef(0),ee=H.useRef(``),D=H.useRef(0),te=H.useRef(null),ne=H.useRef(`right`),re=H.useRef(0),ie=m?Of:H.Fragment,ae=m?{as:bg,allowPinchZoom:!0}:void 0,oe=e=>{let t=ee.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=a_(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){ee.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};H.useEffect(()=>()=>window.clearTimeout(E.current),[]),vd();let se=H.useCallback(e=>ne.current===te.current?.side&&s_(e,te.current?.area),[]);return(0,U.jsx)(hg,{scope:n,searchRef:ee,onItemEnter:H.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:H.useCallback(e=>{se(e)||(C.current?.focus(),S(null))},[se]),onTriggerLeave:H.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:D,onPointerGraceIntentChange:H.useCallback(e=>{te.current=e},[]),children:(0,U.jsx)(ie,{...ae,children:(0,U.jsx)(nd,{asChild:!0,trapped:i,onMountAutoFocus:Z(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,U.jsx)(Q,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,U.jsx)(Vh,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Z(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(bh,{role:`menu`,"aria-orientation":`vertical`,"data-state":e_(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:Z(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=C.current;if(e.target!==i||!Kh.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Gh.includes(e.key)&&a.reverse(),r_(a)}),onBlur:Z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),ee.current=``)}),onPointerMove:Z(e.onPointerMove,c_(e=>{let t=e.target,n=re.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>re.current?`right`:`left`,re.current=e.clientX)}))})})})})})})});_g.displayName=mg;var Sg=`MenuGroup`,Cg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{role:`group`,...r,ref:t})});Cg.displayName=Sg;var wg=`MenuLabel`,Tg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{...r,ref:t})});Tg.displayName=wg;var Eg=`MenuItem`,Dg=`menu.itemSelect`,Og=H.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=H.useRef(null),o=og(Eg,e.__scopeMenu),s=gg(Eg,e.__scopeMenu),c=tu(t,a),l=H.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Dg,{bubbles:!0,cancelable:!0});e.addEventListener(Dg,e=>r?.(e),{once:!0}),gu(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,U.jsx)(kg,{...i,ref:c,disabled:n,onClick:Z(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Z(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Z(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Uh.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Og.displayName=Eg;var kg=H.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gg(Eg,n),s=ng(n),c=H.useRef(null),l=tu(t,c),[u,d]=H.useState(!1),[f,p]=H.useState(``);return H.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,U.jsx)(Xh.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,U.jsx)(Hh,{asChild:!0,...s,focusable:!r,children:(0,U.jsx)(hu.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Z(e.onPointerMove,c_(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,c_(e=>o.onItemLeave(e))),onFocus:Z(e.onFocus,()=>d(!0)),onBlur:Z(e.onBlur,()=>d(!1))})})})}),Ag=`MenuCheckboxItem`,jg=H.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,U.jsx)(zg,{scope:e.__scopeMenu,checked:n,children:(0,U.jsx)(Og,{role:`menuitemcheckbox`,"aria-checked":t_(n)?`mixed`:n,...i,ref:t,"data-state":n_(n),onSelect:Z(i.onSelect,()=>r?.(t_(n)?!0:!n),{checkForDefaultPrevented:!1})})})});jg.displayName=Ag;var Mg=`MenuRadioGroup`,[Ng,Pg]=$h(Mg,{value:void 0,onValueChange:()=>{}}),Fg=H.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Lu(r);return(0,U.jsx)(Ng,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,U.jsx)(Cg,{...i,ref:t})})});Fg.displayName=Mg;var Ig=`MenuRadioItem`,Lg=H.forwardRef((e,t)=>{let{value:n,...r}=e,i=Pg(Ig,e.__scopeMenu),a=n===i.value;return(0,U.jsx)(zg,{scope:e.__scopeMenu,checked:a,children:(0,U.jsx)(Og,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":n_(a),onSelect:Z(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Lg.displayName=Ig;var Rg=`MenuItemIndicator`,[zg,Bg]=$h(Rg,{checked:!1}),Vg=H.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Bg(Rg,n);return(0,U.jsx)(Eu,{present:r||t_(a.checked)||a.checked===!0,children:(0,U.jsx)(hu.span,{...i,ref:t,"data-state":n_(a.checked)})})});Vg.displayName=Rg;var Hg=`MenuSeparator`,Ug=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(hu.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Ug.displayName=Hg;var Wg=`MenuArrow`,Gg=H.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tg(n);return(0,U.jsx)(xh,{...i,...r,ref:t})});Gg.displayName=Wg;var Kg=`MenuSub`,[qg,Jg]=$h(Kg),Yg=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ig(Kg,t),o=tg(t),[s,c]=H.useState(null),[l,u]=H.useState(null),d=Lu(i);return H.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,U.jsx)(vh,{...o,children:(0,U.jsx)(rg,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,U.jsx)(qg,{scope:t,contentId:Pu(),triggerId:Pu(),trigger:s,onTriggerChange:c,children:n})})})};Yg.displayName=Kg;var Xg=`MenuSubTrigger`,Zg=H.forwardRef((e,t)=>{let n=ig(Xg,e.__scopeMenu),r=og(Xg,e.__scopeMenu),i=Jg(Xg,e.__scopeMenu),a=gg(Xg,e.__scopeMenu),o=H.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=H.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return H.useEffect(()=>u,[u]),H.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,U.jsx)(lg,{asChild:!0,...l,children:(0,U.jsx)(kg,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":e_(n.open),...e,ref:eu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Z(e.onPointerMove,c_(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Z(e.onPointerLeave,c_(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Z(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||qh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Zg.displayName=Xg;var Qg=`MenuSubContent`,$g=H.forwardRef((e,t)=>{let n=fg(mg,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=ig(mg,e.__scopeMenu),s=og(mg,e.__scopeMenu),c=Jg(Qg,e.__scopeMenu),l=H.useRef(null),u=tu(t,l);return(0,U.jsx)(Xh.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Eu,{present:r||o.open,children:(0,U.jsx)(Xh.Slot,{scope:e.__scopeMenu,children:(0,U.jsx)(xg,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Z(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Z(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Jh[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});$g.displayName=Qg;function e_(e){return e?`open`:`closed`}function t_(e){return e===`indeterminate`}function n_(e){return t_(e)?`indeterminate`:e?`checked`:`unchecked`}function r_(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function i_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function a_(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=i_(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function o_(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function s_(e,t){return t?o_({x:e.clientX,y:e.clientY},t):!1}function c_(e){return t=>t.pointerType===`mouse`?e(t):void 0}var l_=sg,u_=lg,d_=pg,f_=_g,p_=Cg,m_=Tg,h_=Og,g_=jg,__=Fg,v_=Lg,y_=Vg,b_=Ug,x_=Gg,S_=Zg,C_=$g,w_=`DropdownMenu`,[T_,E_]=_u(w_,[eg]),D_=eg(),[O_,k_]=T_(w_),A_=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=D_(t),l=H.useRef(null),[u,d]=Su({prop:i,defaultProp:a??!1,onChange:o,caller:w_});return(0,U.jsx)(O_,{scope:t,triggerId:Pu(),triggerRef:l,contentId:Pu(),open:u,onOpenChange:d,onOpenToggle:H.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,U.jsx)(l_,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};A_.displayName=w_;var j_=`DropdownMenuTrigger`,M_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=k_(j_,n),o=D_(n);return(0,U.jsx)(u_,{asChild:!0,...o,children:(0,U.jsx)(hu.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:eu(t,a.triggerRef),onPointerDown:Z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});M_.displayName=j_;var N_=`DropdownMenuPortal`,P_=e=>{let{__scopeDropdownMenu:t,...n}=e,r=D_(t);return(0,U.jsx)(d_,{...r,...n})};P_.displayName=N_;var F_=`DropdownMenuContent`,I_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=k_(F_,n),a=D_(n),o=H.useRef(!1);return(0,U.jsx)(f_,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});I_.displayName=F_;var L_=`DropdownMenuGroup`,R_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(p_,{...i,...r,ref:t})});R_.displayName=L_;var z_=`DropdownMenuLabel`,B_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(m_,{...i,...r,ref:t})});B_.displayName=z_;var V_=`DropdownMenuItem`,H_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(h_,{...i,...r,ref:t})});H_.displayName=V_;var U_=`DropdownMenuCheckboxItem`,W_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(g_,{...i,...r,ref:t})});W_.displayName=U_;var G_=`DropdownMenuRadioGroup`,K_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(__,{...i,...r,ref:t})});K_.displayName=G_;var q_=`DropdownMenuRadioItem`,J_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(v_,{...i,...r,ref:t})});J_.displayName=q_;var Y_=`DropdownMenuItemIndicator`,X_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(y_,{...i,...r,ref:t})});X_.displayName=Y_;var Z_=`DropdownMenuSeparator`,Q_=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(b_,{...i,...r,ref:t})});Q_.displayName=Z_;var $_=`DropdownMenuArrow`,ev=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(x_,{...i,...r,ref:t})});ev.displayName=$_;var tv=`DropdownMenuSubTrigger`,nv=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(S_,{...i,...r,ref:t})});nv.displayName=tv;var rv=`DropdownMenuSubContent`,iv=H.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=D_(n);return(0,U.jsx)(C_,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});iv.displayName=rv;var av=A_,ov=M_,sv=P_,cv=I_,lv=B_,uv=H_,dv=Q_,fv=[`__Host-bz_csrf`,`bz_csrf_dev`];function pv(e,t){let n=[];for(let r of e?.split(`;`)??[]){let e=r.indexOf(`=`);e>0&&r.slice(0,e).trim()===t&&n.push(r.slice(e+1).trim())}return n}function mv(e,t){return pv(e,t)[0]}var hv=class extends Error{status;code;body;constructor(e,t,n,r){super(e),this.status=t,this.code=n,this.body=r}};function gv(){for(let e of fv){let t=mv(document.cookie,e);if(t)return{"x-bazilion-csrf":t}}return{}}async function _v(e){let t=await e.text().catch(()=>``),n={};try{let e=JSON.parse(t);e&&typeof e==`object`&&(n=e)}catch{}let r=typeof n.error==`string`?n.error:t.slice(0,300)||`HTTP ${e.status}`,i=typeof n.code==`string`?n.code:void 0;return new hv(r,e.status,i,n)}async function vv(e,t={}){let n=t.method??(t.body===void 0?`GET`:`POST`),r=n===`GET`?{}:gv(),i;t.body instanceof FormData?i=t.body:t.body!==void 0&&(r[`content-type`]=`application/json`,i=JSON.stringify(t.body));let a=await fetch(e,{method:n,headers:r,body:i,signal:t.signal});if(!a.ok)throw await _v(a);return a}async function yv(e,t={}){let n=await(await vv(e,t)).text();return n?JSON.parse(n):void 0}function bv(e){return e instanceof Error?e.message:String(e)}var xv=`baziu-theme`,Sv={system:ql,light:Zl,dark:Jl},Cv={system:`light`,light:`dark`,dark:`system`};function wv(){if(typeof window>`u`)return`system`;let e=window.localStorage.getItem(xv);return e===`light`||e===`dark`||e===`system`?e:`system`}function Tv(e){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches,n=e===`dark`||e===`system`&&t;document.documentElement.classList.toggle(`dark`,n)}function Ev(){let[e,t]=(0,H.useState)(`system`);(0,H.useEffect)(()=>{t(wv())},[]),(0,H.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Tv(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]);let n=()=>{let n=Cv[e];t(n),window.localStorage.setItem(xv,n),Tv(n)},r=Sv[e],i=`Theme: ${e}. Switch to ${Cv[e]}.`;return(0,U.jsxs)(`button`,{type:`button`,onClick:n,className:`unstyled inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-frost bg-ivory px-2.5 text-mocha shadow-baziu-sm transition-all hover:border-sapphire-light hover:bg-sapphire-glow hover:text-sapphire active:translate-y-px`,title:i,"aria-label":i,children:[(0,U.jsx)(r,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`hidden text-xs font-medium capitalize xl:inline`,children:e})]})}var Dv=[{to:`/`,label:`Chat`,icon:Kl},{to:`/agents`,label:`Agents`,icon:Hl},{to:`/teams`,label:`Teams`,icon:Ql}],Ov=[{href:`/templates`,label:`Templates`,description:`Reusable Agent behavior and Team rosters.`,icon:Wl},{href:`/skills`,label:`Skills`,description:`Prompt skills available to your agents.`,icon:Xl},{href:`/config`,label:`Setup`,description:`Providers, integrations, access, and services.`,icon:Yl}];function kv(){let e=Ss({select:e=>e.location.pathname}),[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(e===`/login`||e===`/welcome`)return;let t=new AbortController;return yv(`/api/attention/summary`,{signal:t.signal}).then(n).catch(()=>{}),()=>t.abort()},[e]);let a=e===`/attention`||e.startsWith(`/attention/`),o=t?.openTotal??0;async function s(){i(null);try{await yv(`/api/logout`,{method:`POST`}),window.location.assign(`/login`)}catch(e){i(bv(e))}}return(0,U.jsxs)(`nav`,{"aria-label":`Primary navigation`,className:`relative mx-auto grid w-full max-w-[1500px] shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-2 border-b border-frost py-3 md:flex md:gap-2 md:py-4`,children:[(0,U.jsxs)(fe,{to:`/`,"aria-label":`Bazilion home`,className:`group flex min-w-0 items-center gap-2 rounded-lg text-charcoal transition-opacity hover:text-charcoal hover:opacity-80`,children:[(0,U.jsx)(jl,{className:`h-8 w-8 shrink-0 transition-transform duration-300 group-hover:rotate-[-8deg] group-hover:scale-[1.08]`}),(0,U.jsx)(`span`,{className:`truncate font-display text-[1.35rem] tracking-[-0.02em]`,children:`bazilion`})]}),(0,U.jsxs)(`div`,{className:`col-span-2 row-start-2 flex min-w-0 items-center gap-1 overflow-x-auto pb-0.5 md:col-auto md:row-auto md:ml-4 md:flex-1 md:overflow-visible md:pb-0`,children:[Dv.map(t=>{let n=t.to===`/`?e===`/`:e===t.to||e.startsWith(`${t.to}/`),r=t.icon;return(0,U.jsxs)(fe,{to:t.to,"aria-current":n?`page`:void 0,className:jv(n),children:[(0,U.jsx)(r,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:t.label})]},t.to)}),(0,U.jsxs)(fe,{to:`/attention`,"aria-current":a?`page`:void 0,className:jv(a),children:[(0,U.jsx)(Vl,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:`Attention`}),o>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-danger sm:hidden`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`hidden min-w-5 items-center justify-center rounded-full bg-danger px-1.5 py-0.5 text-xs font-semibold leading-4 text-primary-foreground sm:inline-flex`,"aria-hidden":`true`,children:o>99?`99+`:o}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[`, `,o,` open items`]})]})]}),(0,U.jsx)(Av,{label:`Manage`,icon:Yl,links:Ov,pathname:e,align:`end`})]}),(0,U.jsxs)(`div`,{className:`col-start-2 row-start-1 flex items-center gap-1 md:col-auto md:row-auto md:ml-auto`,children:[(0,U.jsx)(Ev,{}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>void s(),"aria-label":`Log out`,title:`Log out`,className:`unstyled inline-flex h-9 w-9 items-center justify-center rounded-lg text-mocha hover:bg-ivory hover:text-sapphire`,children:(0,U.jsx)(Gl,{className:`h-4 w-4`,"aria-hidden":`true`})})]}),r&&(0,U.jsx)(`p`,{role:`alert`,className:`col-span-2 m-0 rounded-lg bg-danger/10 px-3 py-2 text-sm text-danger md:absolute md:right-0 md:top-[calc(100%+0.35rem)] md:z-50 md:shadow-baziu-md`,children:r})]})}function Av({label:e,icon:t,links:n,pathname:r,align:i=`start`}){let a=n.some(e=>r===e.href||r.startsWith(`${e.href}/`));return(0,U.jsxs)(av,{children:[(0,U.jsx)(ov,{asChild:!0,children:(0,U.jsxs)(`button`,{type:`button`,className:jv(a),"aria-label":`${e} menu`,children:[(0,U.jsx)(t,{className:`hidden size-4 shrink-0 sm:block`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:e}),(0,U.jsx)(Ul,{className:`size-3 shrink-0 text-muted-foreground`,"aria-hidden":`true`})]})}),(0,U.jsx)(sv,{children:(0,U.jsxs)(cv,{align:i,sideOffset:8,collisionPadding:12,className:`z-50 w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,children:[(0,U.jsx)(lv,{className:`px-2.5 pb-1 pt-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground`,children:e}),n.map(e=>{let t=e.icon,n=r===e.href||r.startsWith(`${e.href}/`);return(0,U.jsx)(uv,{asChild:!0,children:(0,U.jsxs)(`a`,{href:e.href,"aria-current":n?`page`:void 0,className:`flex cursor-pointer items-start gap-3 rounded-lg px-2.5 py-2.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground ${n?`bg-accent/70 text-accent-foreground`:`text-foreground`}`,children:[(0,U.jsx)(`span`,{className:`mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,U.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`})}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block text-sm font-semibold`,children:e.label}),(0,U.jsx)(`span`,{className:`mt-0.5 block text-xs leading-5 text-muted-foreground`,children:e.description})]})]})},e.href)})]})})]})}function jv(e){return`unstyled inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-sm font-semibold transition-colors sm:px-2.5 ${e?`border-sapphire-light bg-sapphire-glow text-sapphire shadow-baziu-sm`:`border-transparent text-mocha hover:border-frost hover:bg-ivory hover:text-sapphire`}`}var Mv=W({method:`GET`}).handler(V(`a5d3825fc69573bb55bab6df578c750ebb0240dd394c3acee3adea02918a5dc2`)),Nv=new Set([`/login`]),Pv=[`/welcome`,`/config`];function Fv(e){return Pv.some(t=>e===t||e.startsWith(`${t}/`))}var Iv=`/assets/styles-xUnZ-ep_.css`,Lv=`(function(){try{var t=localStorage.getItem('baziu-theme');var sd=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches;var d=t==='dark'||((t===null||t==='system')&&sd);document.documentElement.classList.toggle('dark',d);}catch(e){}})();`,Rv=le({beforeLoad:async({location:e})=>{let t=e.pathname;if(Nv.has(t)||t.startsWith(`/api/`))return;let n=await Mv();if(!n.authed)throw _e({to:`/login`});if(!Fv(t)&&!n.setupComplete)throw _e({to:`/welcome`})},head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`bazilion`}],links:[{rel:`icon`,type:`image/svg+xml`,href:`/baziu.svg`},{rel:`stylesheet`,href:Iv}]}),component:Bv,notFoundComponent:zv});function zv(){let e=Ss({select:e=>e.location.pathname});return(0,U.jsx)(`div`,{className:`mx-auto max-w-2xl`,children:(0,U.jsxs)(`div`,{className:`card`,children:[(0,U.jsx)(`h1`,{children:`Not found`}),(0,U.jsxs)(`p`,{className:`muted my-3`,children:[`Nothing lives at `,(0,U.jsx)(`code`,{children:e}),`.`]}),(0,U.jsx)(fe,{to:`/`,children:`Back to home`})]})})}function Bv(){let e=Ss({select:e=>e.location.pathname}),t=e===`/login`,n=e===`/`;return(0,U.jsxs)(`html`,{lang:`en`,"data-layout":n?`workspace`:`page`,suppressHydrationWarning:!0,children:[(0,U.jsxs)(`head`,{children:[(0,U.jsx)(`script`,{dangerouslySetInnerHTML:{__html:Lv}}),(0,U.jsx)(Ds,{})]}),(0,U.jsxs)(`body`,{"data-layout":n?`workspace`:`page`,children:[!t&&(0,U.jsx)(`a`,{href:`#main-content`,className:`sr-only z-[100] rounded-lg bg-primary px-4 py-2 font-semibold text-primary-foreground focus:not-sr-only focus:fixed focus:left-3 focus:top-3`,children:`Skip to main content`}),t?(0,U.jsx)(ps,{}):n?(0,U.jsxs)(`div`,{className:`flex h-dvh flex-col`,children:[(0,U.jsx)(`div`,{className:`px-3 sm:px-5`,children:(0,U.jsx)(kv,{})}),(0,U.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:`mx-auto min-h-0 w-full max-w-[1600px] flex-1 overflow-hidden px-3 pb-3 sm:px-5 sm:pb-5`,children:(0,U.jsx)(ps,{})})]}):(0,U.jsxs)(`div`,{className:`flex min-h-dvh flex-col`,children:[(0,U.jsx)(`div`,{className:`px-3 sm:px-5`,children:(0,U.jsx)(kv,{})}),(0,U.jsx)(`main`,{id:`main-content`,tabIndex:-1,className:`mx-auto w-full max-w-[1500px] flex-1 px-4 py-9 sm:px-6 sm:py-12`,children:(0,U.jsx)(ps,{})}),(0,U.jsx)(`div`,{className:`px-4 sm:px-6`,children:(0,U.jsx)(Nl,{})})]}),(0,U.jsx)(Os,{})]})]})}var Vv=N(`/welcome`)({beforeLoad:async()=>{if((await Mv()).setupComplete)throw _e({to:`/`})},component:M(()=>P(()=>import(`./welcome-D-zVOLGA.js`),__vite__mapDeps([0,1])),`component`)}),Hv=N(`/login`)({validateSearch:e=>({error:e.error===`token`||e.error===`origin`?e.error:void 0}),component:M(()=>P(()=>import(`./login-DIJpNQFo.js`),__vite__mapDeps([2,1])),`component`)}),Uv=()=>P(()=>import(`./routes-g7V4ru7T.js`),__vite__mapDeps([3,1,4,5,6,7,8,9,10,11,12,13,14,15])),Wv=W({method:`GET`}).handler(V(`aa485ed8b67fcc5a2feedbfdbdf6b41aa7c7aff92f357123818169f62b907ce1`)),Gv=N(`/`)({validateSearch:e=>({agent:typeof e.agent==`string`?e.agent:void 0}),loaderDeps:({search:e})=>({agentId:e.agent}),loader:({deps:e})=>Wv({data:{agentId:e.agentId}}),component:M(Uv,`component`)}),Kv=N(`/templates/`)({beforeLoad:()=>{throw _e({to:`/templates/agents`})}}),qv=()=>P(()=>import(`./teams-BdJZXOan.js`),__vite__mapDeps([16,1,4,5,10])),Jv=W({method:`GET`}).handler(V(`fda651b73911d8ef30f3a6b58894b5d853fdc4997acaf1793c76c06680504b82`)),Yv=N(`/teams/`)({loader:()=>Jv(),component:M(qv,`component`)}),Xv=()=>P(()=>import(`./skills-CngE7TF8.js`),__vite__mapDeps([17,1,4,5,18,19])),Zv=W({method:`GET`}).handler(V(`ae1d30575b229c1e2622fbaf2252800a9a7acc84afdd68cba025ca890b8d52c5`)),Qv=N(`/skills/`)({loader:()=>Zv(),component:M(Xv,`component`)}),$v=()=>P(()=>import(`./config-9vv9Lipb.js`),__vite__mapDeps([20,1,4,21,22,5,23,14])),ey=W({method:`GET`}).handler(V(`b18a227687dba45b99ea5a2ac7a5bf8efcd9bc54387bc279cd87510fd2f83f7e`)),ty=N(`/config/`)({loader:()=>ey(),component:M($v,`component`)}),ny=()=>P(()=>import(`./attention-Cz9rZcrr.js`),__vite__mapDeps([24,1,4])),ry=W({method:`GET`}).handler(V(`883b401299422096ee31ee824f9a24b49d06bdcedce398789778c4c549a92f3a`)),iy=N(`/attention/`)({loader:()=>ry(),component:M(ny,`component`)}),ay=()=>P(()=>import(`./agents-GozAWW-l.js`),__vite__mapDeps([25,1,4,26,5,6,7,8,13])),oy=W({method:`GET`}).handler(V(`f715bab0037380aa3db7e237e7cf1e74168c363f48a960bb1ddfa5560de3a74e`)),sy=N(`/agents/`)({validateSearch:e=>({all:e.all===1?1:void 0}),loaderDeps:({search:e})=>({all:e.all===1}),loader:({deps:e})=>oy({data:{all:e.all}}),component:M(ay,`component`)}),cy=()=>P(()=>import(`./tokens-CKz8gx4-.js`),__vite__mapDeps([27,1,4,21,22,5])),ly=W({method:`GET`}).handler(V(`46e35c9f1afc79423cb49703b454ef684344db08ec19775efd70a8768c7837f1`)),uy=N(`/config/tokens`)({validateSearch:e=>({all:e.all===1?1:void 0}),loaderDeps:({search:e})=>({all:e.all===1}),loader:({deps:e})=>ly({data:e}),component:M(cy,`component`)}),dy=()=>P(()=>import(`./services-B2f7e5jV.js`),__vite__mapDeps([28,1,21,22,4,23,5])),fy=W({method:`GET`}).handler(V(`6afd81bef0ee381d6e3641cd8e269968429c874e2f9d56c8f818cc9d180ee477`)),py=N(`/config/services`)({loader:()=>fy(),component:M(dy,`component`)}),my=()=>P(()=>import(`./mcp-pKBL0xIf.js`),__vite__mapDeps([29,1,4,21,22,5])),hy=W({method:`GET`}).handler(V(`278849457893891c3d22806d15e11a0a42cc3630b30e9e62b74cf2d3b982ded7`)),gy=N(`/config/mcp`)({loader:()=>hy(),component:M(my,`component`)}),_y=()=>P(()=>import(`./route-Ccb8v41z.js`),__vite__mapDeps([30,1,22,4])),vy=W({method:`GET`}).handler(V(`05fb9426fe401894b8c313750d7a9327b4b27ef1950e51e71230c1afa1d6c0e3`)),yy=N(`/teams/$id`)({loader:async({params:e})=>{let t=await vy({data:{id:e.id}});if(!t)throw _e({to:`/teams`});return t},component:M(_y,`component`)}),by=()=>P(()=>import(`./route-D1d6kCEV.js`),__vite__mapDeps([31,1,4,26,5,22,13])),xy=W({method:`GET`}).handler(V(`1fad3d69efc68773472688683a8982dfaf67e4a7443cfabac9bdf7e88a2e1b16`)),Sy=N(`/agents/$id`)({loader:async({params:e})=>{let t=await xy({data:{id:e.id}});if(!t)throw _e({to:`/agents`});return t},component:M(by,`component`)}),Cy=()=>P(()=>import(`./teams-c496ISsT.js`),__vite__mapDeps([32,1,4,22])),wy=W({method:`GET`}).handler(V(`04bb4df13ae68275e2f037ca67976778d2133273183d30d9ac2821f7cc7e85ad`)),Ty=N(`/templates/teams/`)({loader:()=>wy(),component:M(Cy,`component`)}),Ey=()=>P(()=>import(`./agents-BxPS1_Bp.js`),__vite__mapDeps([33,1,4,5,7,22,34,19,35])),Dy=W({method:`GET`}).handler(V(`bc31355f2be9889a616d03c35062d483ea77c3f967af9432d721626a81078ef3`)),Oy=N(`/templates/agents/`)({loader:()=>Dy(),component:M(Ey,`component`)}),ky=()=>P(()=>import(`./telegram-B_-hK6EC.js`),__vite__mapDeps([36,1,4,21,22,5])),Ay=W({method:`GET`}).handler(V(`00a157dd07824e1f126f06646effd1d876f280f6fc64c144d2f6429414a4e58a`)),jy=N(`/config/integrations/telegram`)({loader:()=>Ay(),component:M(ky,`component`)}),My=()=>P(()=>import(`./_id-Cxa98a9m.js`),__vite__mapDeps([37,1,4,9,5,35])),Ny=W({method:`GET`}).handler(V(`d821ed23cd43821db345683976465a24f170589df68088bb55f750bfe15c26f4`)),Py=N(`/teams/$id/`)({loader:({params:e})=>Ny({data:{id:e.id}}),component:M(My,`component`)}),Fy=()=>P(()=>import(`./review-BbshafTQ.js`),__vite__mapDeps([38,1])),Iy=W({method:`GET`}).handler(V(`6659620aa409e12d6be1ba1fb1d9fca44c41efc089d65c643ece70012eec09e0`)),Ly=N(`/teams/$id/review`)({loader:({params:e})=>Iy({data:{id:e.id}}),component:M(Fy,`component`)}),Ry=()=>P(()=>import(`./results-DgJPjEZF.js`),__vite__mapDeps([39,1,5,12])),zy=W({method:`GET`}).handler(V(`b93845a5c9968cbaa021a77eb2c7a87d4126757225ca2cb100306497429a71a9`)),By=N(`/teams/$id/results`)({loader:()=>zy(),component:M(Ry,`component`)}),Vy=()=>P(()=>import(`./policy-DEh4BLSw.js`),__vite__mapDeps([40,1,41,4,5,35,15,8,42])),Hy=W({method:`GET`}).handler(V(`fc940d6dec5305aa64bdb9b9f5f7d4f925b2ba0608cb6d39af854a94872fc867`)),Uy=N(`/teams/$id/policy`)({loader:({params:e})=>Hy({data:{id:e.id}}),component:M(Vy,`component`)}),Wy=()=>P(()=>import(`./memory-CEVppPyU.js`),__vite__mapDeps([43,1,5,35,4])),Gy=W({method:`GET`}).handler(V(`b96a98e3ed6c8a3ab5f6a4ed8458e93da753ffd74e2912ef1724bb6e58030cb5`)),Ky=N(`/teams/$id/memory`)({loader:({params:e})=>Gy({data:{id:e.id}}),component:M(Wy,`component`)}),qy=()=>P(()=>import(`./members-DHWsgsEs.js`),__vite__mapDeps([44,1])),Jy=W({method:`GET`}).handler(V(`0a6e766d2b4ea526da34cefed5342a6ecc5ff35ad1ce38fba4129b8c24d8e6e5`)),Yy=N(`/teams/$id/members`)({loader:({params:e})=>Jy({data:{id:e.id}}),component:M(qy,`component`)}),Xy=()=>P(()=>import(`./_id-D4hV1U1t.js`),__vite__mapDeps([45,1,4,11,12])),Zy=W({method:`GET`}).handler(V(`e5f53edbb784a056b79f0f2a7e3c945bef3981e0ce85561ed17c35e47cd45a66`)),Qy=N(`/agents/$id/`)({validateSearch:e=>typeof e.conversation==`string`?{conversation:e.conversation}:{},loader:({params:e})=>Zy({data:{id:e.id}}),component:M(Xy,`component`)}),$y=()=>P(()=>import(`./triggers-DCEPciGW.js`),__vite__mapDeps([46,1,4,5])),eb=W({method:`GET`}).handler(V(`57ebf437fdb3fcfc63b176e796a55f04bdfec0b230059673196e98d413d15c4d`)),tb=N(`/agents/$id/triggers`)({loader:({params:e})=>eb({data:{id:e.id}}),component:M($y,`component`)}),nb=()=>P(()=>import(`./settings-B6elpcYm.js`),__vite__mapDeps([47,1,4,5,7,18,8])),rb=W({method:`GET`}).handler(V(`0fa2a6b260fc042ad52b696162ea55906f3ccbff079f0bfa26ed337fa369639e`)),ib=N(`/agents/$id/settings`)({loader:()=>rb(),component:M(nb,`component`)}),ab=()=>P(()=>import(`./learning-PvtXm8Ne.js`),__vite__mapDeps([48,1,4,5,8])),ob=W({method:`GET`}).handler(V(`fcdd0f08b635c7c501caa840d01d1376ace6683e26cc5ac7dead28d7870f98b9`)),sb=N(`/agents/$id/learning`)({loader:({params:e})=>ob({data:{id:e.id}}),component:M(ab,`component`)}),cb=()=>P(()=>import(`./inbox-DHLArXxl.js`),__vite__mapDeps([49,1,4])),lb=W({method:`GET`}).handler(V(`2cd8c6ec40e2e2d9518b5f127a518ecd83a2222d85665cc61d5144bcf59ed4fb`)),ub=N(`/agents/$id/inbox`)({validateSearch:e=>({unread:e.unread===1?1:void 0,id:typeof e.id==`string`?e.id:void 0}),loaderDeps:({search:e})=>({unreadOnly:e.unread===1,selectedId:e.id??``}),loader:({params:e,deps:t})=>lb({data:{id:e.id,...t}}),component:M(cb,`component`)}),db=()=>P(()=>import(`./_id-BKLynswT.js`),__vite__mapDeps([50,1,5,22,4,41,35,15,8,42])),fb=W({method:`GET`}).handler(V(`c13d90cf82cd448c86427091165d0361b92843852a3f73a5bf4412dd2adc6bae`)),pb=N(`/templates/teams/$id/`)({loader:({params:e})=>fb({data:{id:e.id}}),component:M(db,`component`)}),mb=()=>P(()=>import(`./_id-BYM_NORr.js`),__vite__mapDeps([51,1,4,7,22,34,19,35,5])),hb=W({method:`GET`}).handler(V(`032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e`)),gb=N(`/templates/agents/$id/`)({loader:async({params:e})=>{let t=await hb({data:{id:e.id}});if(!t)throw _e({to:`/templates/agents`});return t},component:M(mb,`component`)}),_b=Vv.update({id:`/welcome`,path:`/welcome`,getParentRoute:()=>Rv}),vb=Hv.update({id:`/login`,path:`/login`,getParentRoute:()=>Rv}),yb=Gv.update({id:`/`,path:`/`,getParentRoute:()=>Rv}),bb=Kv.update({id:`/templates/`,path:`/templates/`,getParentRoute:()=>Rv}),xb=Yv.update({id:`/teams/`,path:`/teams/`,getParentRoute:()=>Rv}),Sb=Qv.update({id:`/skills/`,path:`/skills/`,getParentRoute:()=>Rv}),Cb=ty.update({id:`/config/`,path:`/config/`,getParentRoute:()=>Rv}),wb=iy.update({id:`/attention/`,path:`/attention/`,getParentRoute:()=>Rv}),Tb=sy.update({id:`/agents/`,path:`/agents/`,getParentRoute:()=>Rv}),Eb=uy.update({id:`/config/tokens`,path:`/config/tokens`,getParentRoute:()=>Rv}),Db=py.update({id:`/config/services`,path:`/config/services`,getParentRoute:()=>Rv}),Ob=gy.update({id:`/config/mcp`,path:`/config/mcp`,getParentRoute:()=>Rv}),kb=yy.update({id:`/teams/$id`,path:`/teams/$id`,getParentRoute:()=>Rv}),Ab=Sy.update({id:`/agents/$id`,path:`/agents/$id`,getParentRoute:()=>Rv}),jb=Ty.update({id:`/templates/teams/`,path:`/templates/teams/`,getParentRoute:()=>Rv}),Mb=Oy.update({id:`/templates/agents/`,path:`/templates/agents/`,getParentRoute:()=>Rv}),Nb=jy.update({id:`/config/integrations/telegram`,path:`/config/integrations/telegram`,getParentRoute:()=>Rv}),Pb=Py.update({id:`/`,path:`/`,getParentRoute:()=>kb}),Fb=Ly.update({id:`/review`,path:`/review`,getParentRoute:()=>kb}),Ib=By.update({id:`/results`,path:`/results`,getParentRoute:()=>kb}),Lb=Uy.update({id:`/policy`,path:`/policy`,getParentRoute:()=>kb}),Rb=Ky.update({id:`/memory`,path:`/memory`,getParentRoute:()=>kb}),zb=Yy.update({id:`/members`,path:`/members`,getParentRoute:()=>kb}),Bb=Qy.update({id:`/`,path:`/`,getParentRoute:()=>Ab}),Vb=tb.update({id:`/triggers`,path:`/triggers`,getParentRoute:()=>Ab}),Hb=ib.update({id:`/settings`,path:`/settings`,getParentRoute:()=>Ab}),Ub=sb.update({id:`/learning`,path:`/learning`,getParentRoute:()=>Ab}),Wb=ub.update({id:`/inbox`,path:`/inbox`,getParentRoute:()=>Ab}),Gb=pb.update({id:`/templates/teams/$id/`,path:`/templates/teams/$id/`,getParentRoute:()=>Rv}),Kb=gb.update({id:`/templates/agents/$id/`,path:`/templates/agents/$id/`,getParentRoute:()=>Rv}),qb={AgentsIdInboxRoute:Wb,AgentsIdLearningRoute:Ub,AgentsIdSettingsRoute:Hb,AgentsIdTriggersRoute:Vb,AgentsIdIndexRoute:Bb},Jb=Ab._addFileChildren(qb),Yb={TeamsIdMembersRoute:zb,TeamsIdMemoryRoute:Rb,TeamsIdPolicyRoute:Lb,TeamsIdResultsRoute:Ib,TeamsIdReviewRoute:Fb,TeamsIdIndexRoute:Pb},Xb={IndexRoute:yb,LoginRoute:vb,WelcomeRoute:_b,AgentsIdRouteRoute:Jb,TeamsIdRouteRoute:kb._addFileChildren(Yb),ConfigMcpRoute:Ob,ConfigServicesRoute:Db,ConfigTokensRoute:Eb,AgentsIndexRoute:Tb,AttentionIndexRoute:wb,ConfigIndexRoute:Cb,SkillsIndexRoute:Sb,TeamsIndexRoute:xb,TemplatesIndexRoute:bb,ConfigIntegrationsTelegramRoute:Nb,TemplatesAgentsIndexRoute:Mb,TemplatesTeamsIndexRoute:jb,TemplatesAgentsIdIndexRoute:Kb,TemplatesTeamsIdIndexRoute:Gb},Zb=Rv._addFileChildren(Xb);function Qb(){return vs({routeTree:Zb,scrollRestoration:!0,defaultPreload:`intent`,defaultErrorComponent:kl,defaultPendingComponent:Al})}async function $b(){let e=await Qb(),t;if(Hs){let n=await Hs.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(To),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await jo(e),e}var ex=$b;async function tx(){let e=await ex();return window.$_TSR?.h(),e}var nx;function rx(){return nx||=tx(),(0,U.jsx)(No,{promise:nx,children:e=>(0,U.jsx)(xs,{router:e})})}var ix=Ce();(0,H.startTransition)(()=>{(0,ix.hydrateRoot)(document,(0,U.jsx)(H.StrictMode,{children:(0,U.jsx)(rx,{})}))});export{hu as $,hv as A,ov as B,iy as C,Gv as D,Yv as E,uv as F,nd as G,Of as H,lv as I,Pu as J,Q as K,sv as L,vv as M,bv as N,Hv as O,cv as P,_u as Q,av as R,sy as S,Qv as T,vd as U,Lf as V,hd as W,Su as X,Eu as Y,Z,Sy as _,Ws as _t,ib as a,Bl as at,py as b,Yy as c,Cl as ct,By as d,xl as dt,nu as et,Ly as f,bl as ft,Ty as g,vl as gt,Oy as h,Tl as ht,sb as i,Hl as it,yv as j,Ev as k,Ky as l,El as lt,jy as m,Ol as mt,pb as n,Ql as nt,tb as o,Ml as ot,Py as p,Sl as pt,qu as q,ub as r,Ul as rt,Qy as s,jl as st,gb as t,tu as tt,Uy as u,Dl as ut,yy as v,ps as vt,ty as w,uy as x,gy as y,dv as z};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{a as r,f as i}from"./preload-helper-eUUcpe2S.js";import{t as a}from"./ConfirmDialog-B5BLql5H.js";import{N as o,_t as s,i as c,j as l,lt as u,pt as d,ut as f}from"./index-CKJ3uVR4.js";import{i as p}from"./entities-xVoB-p2j.js";var m=e(t()),h=n(),g=r(`/agents/$id`);function _(){let{agent:e}=g.useLoaderData(),{config:t,reviews:n,proposals:r}=c.useLoaderData(),a=i(),[p,_]=(0,m.useState)(null),[b,x]=(0,m.useState)(!1),S=`/api/agents/${encodeURIComponent(e.id)}`,C=async(e,t)=>{_(null),x(!0);try{await l(e,t),await a.invalidate()}catch(e){throw _(o(e)),e}finally{x(!1)}};return(0,h.jsxs)(`div`,{className:`space-y-6`,children:[p&&(0,h.jsx)(`p`,{role:`alert`,className:`err`,children:p}),(0,h.jsxs)(d,{title:`Reviewed learning`,description:(0,h.jsxs)(h.Fragment,{children:[`A review reads at most 8 successful user turns and 40,000 characters with`,` `,t.model??`the Agent model`,` at `,t.reasoningLevel,` reasoning and proposes at most five lessons. Nothing is applied until you approve it.`]}),children:[(0,h.jsx)(v,{config:t,disabled:b,onSave:e=>C(`${S}/review-config`,{method:`PATCH`,body:e})}),(0,h.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-3`,children:[(0,h.jsx)(s,{variant:`primary`,disabled:b||e.status===`archived`,onClick:()=>void C(`${S}/reviews`,{method:`POST`}).catch(()=>{}),children:`Review now`}),!t.enabled&&(0,h.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Periodic review is off; Review now still works.`})]})]}),(0,h.jsx)(d,{title:`Lesson proposals`,children:r.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No proposals yet. A successful review may also produce none.`}):(0,h.jsx)(`div`,{className:`grid gap-3`,children:r.map(e=>(0,h.jsx)(y,{proposal:e,base:`${S}/lesson-proposals/${encodeURIComponent(e.id)}`,busy:b,act:C},e.id))})}),(0,h.jsx)(d,{title:`Review history`,children:n.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No reviews have been queued.`}):(0,h.jsx)(u,{children:n.map(e=>(0,h.jsx)(f,{title:new Date(e.createdAt).toLocaleString(),meta:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`code`,{children:e.status}),(0,h.jsx)(`span`,{children:e.trigger}),(0,h.jsxs)(`span`,{children:[e.turnsReviewed,` turns`]}),(0,h.jsxs)(`span`,{children:[e.proposalCount,` proposals`]})]}),children:e.lastError&&(0,h.jsx)(`p`,{className:`mb-0 mt-1 break-words text-sm text-danger`,children:e.lastError})},e.id))})})]})}function v({config:e,disabled:t,onSave:n}){let[r,i]=(0,m.useState)(e.enabled),[a,o]=(0,m.useState)(e.everyNTurns),[c,l]=(0,m.useState)(e.model??``),[u,d]=(0,m.useState)(e.reasoningLevel);return(0,h.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n({enabled:r,everyNTurns:a,model:c.trim()||null,reasoningLevel:u}).catch(()=>{})},className:`grid items-end gap-x-3 md:grid-cols-4`,children:[(0,h.jsxs)(`label`,{children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),`Periodic review`]}),(0,h.jsxs)(`label`,{children:[`Every N turns`,(0,h.jsx)(`input`,{type:`number`,min:1,max:100,value:a,onChange:e=>o(Number(e.target.value))})]}),(0,h.jsxs)(`label`,{children:[`Model override`,(0,h.jsx)(`input`,{value:c,placeholder:`the Agent model`,onChange:e=>l(e.target.value)})]}),(0,h.jsxs)(`label`,{children:[`Reasoning`,(0,h.jsx)(`select`,{value:u,onChange:e=>d(e.target.value),children:p.map(e=>(0,h.jsx)(`option`,{children:e},e))})]}),(0,h.jsx)(`div`,{className:`md:col-span-4`,children:(0,h.jsx)(s,{variant:`primary`,type:`submit`,disabled:t,children:`Save learning settings`})})]})}function y({proposal:e,base:t,busy:n,act:r}){let[i,o]=(0,m.useState)(e.text),[c,l]=(0,m.useState)(e.scope),[u,d]=(0,m.useState)(null),f={version:e.version},p=e.text.length>54?`${e.text.slice(0,51)}…`:e.text;return(0,h.jsxs)(`article`,{className:`rounded-lg border bg-card p-4`,children:[(0,h.jsxs)(`div`,{className:`mb-2 flex justify-between gap-2`,children:[(0,h.jsx)(`code`,{children:e.status}),(0,h.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,e.version]})]}),e.status===`pending`?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`label`,{children:[`Proposed lesson`,(0,h.jsx)(`textarea`,{rows:3,value:i,onChange:e=>o(e.target.value)})]}),(0,h.jsxs)(`label`,{children:[`Apply the approved lesson to`,(0,h.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),children:[(0,h.jsx)(`option`,{value:`private`,children:`private Agent behavior`}),(0,h.jsx)(`option`,{value:`shared`,children:`shared Team knowledge`})]})]}),c===`shared`&&(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shared lessons become searchable Team memory. Stable facts about you belong in the Team's USER.md instead.`}),(0,h.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,h.jsx)(s,{variant:`ghost`,disabled:n,onClick:()=>void r(t,{method:`PATCH`,body:{...f,text:i,scope:c}}).catch(()=>{}),children:`Save edit`}),(0,h.jsx)(s,{variant:`primary`,disabled:n,onClick:()=>void r(`${t}/approve`,{body:f}).catch(()=>{}),children:`Approve`}),(0,h.jsx)(s,{variant:`danger`,disabled:n,onClick:()=>d(`reject`),children:`Reject`})]})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{children:e.text}),e.status===`approved`&&(0,h.jsx)(`div`,{className:`mt-3`,children:(0,h.jsx)(s,{variant:`danger`,disabled:n,onClick:()=>d(`revoke`),children:`Revoke`})})]}),(0,h.jsxs)(`div`,{className:`mt-3 text-xs text-muted-foreground`,children:[`Evidence:`,` `,e.evidence.length===0?`none`:(0,h.jsx)(`ul`,{className:`mt-1 list-disc pl-5`,children:e.evidence.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsxs)(`code`,{children:[e.sessionId,`:`,e.entryOrdinal]}),e.excerpt?` — ${e.excerpt}`:` — excerpt unavailable`]},`${e.sessionId}:${e.entryOrdinal}`))})]}),u&&(0,h.jsx)(a,{open:!0,title:u===`reject`?`Reject “${p}”?`:`Revoke “${p}”?`,description:u===`reject`?(0,h.jsx)(`p`,{children:`The proposal is marked rejected and never changes the Agent's prompts or Team memory; unsaved edits are discarded. A rejected proposal cannot be edited or approved later.`}):e.scope===`shared`?(0,h.jsx)(`p`,{children:`The lesson note is removed from Team memory, so Team-memory search no longer finds it. The proposal stays in the review history.`}):(0,h.jsx)(`p`,{children:`The lesson is removed from the Agent's future prompts; past conversations are not rewritten. The proposal stays in the review history.`}),confirmLabel:u===`reject`?`Reject proposal`:`Revoke lesson`,onOpenChange:e=>{e||d(null)},onConfirm:()=>r(`${t}/${u}`,{body:f})})]})}export{_ as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{a as r,f as i}from"./preload-helper-eUUcpe2S.js";import{t as a}from"./ConfirmDialog-536ziJ5P.js";import{N as o,_t as s,i as c,j as l,lt as u,pt as d,ut as f}from"./index-1YXquAq8.js";import{i as p}from"./entities-xVoB-p2j.js";var m=e(t()),h=n(),g=r(`/agents/$id`);function _(){let{agent:e}=g.useLoaderData(),{config:t,reviews:n,proposals:r}=c.useLoaderData(),a=i(),[p,_]=(0,m.useState)(null),[b,x]=(0,m.useState)(!1),S=`/api/agents/${encodeURIComponent(e.id)}`,C=async(e,t)=>{_(null),x(!0);try{await l(e,t),await a.invalidate()}catch(e){throw _(o(e)),e}finally{x(!1)}};return(0,h.jsxs)(`div`,{className:`space-y-6`,children:[p&&(0,h.jsx)(`p`,{role:`alert`,className:`err`,children:p}),(0,h.jsxs)(d,{title:`Reviewed learning`,description:(0,h.jsxs)(h.Fragment,{children:[`A review reads at most 8 successful user turns and 40,000 characters with`,` `,t.model??`the Agent model`,` at `,t.reasoningLevel,` reasoning and proposes at most five lessons. Nothing is applied until you approve it.`]}),children:[(0,h.jsx)(v,{config:t,disabled:b,onSave:e=>C(`${S}/review-config`,{method:`PATCH`,body:e})}),(0,h.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-3`,children:[(0,h.jsx)(s,{variant:`primary`,disabled:b||e.status===`archived`,onClick:()=>void C(`${S}/reviews`,{method:`POST`}).catch(()=>{}),children:`Review now`}),!t.enabled&&(0,h.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Periodic review is off; Review now still works.`})]})]}),(0,h.jsx)(d,{title:`Lesson proposals`,children:r.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No proposals yet. A successful review may also produce none.`}):(0,h.jsx)(`div`,{className:`grid gap-3`,children:r.map(e=>(0,h.jsx)(y,{proposal:e,base:`${S}/lesson-proposals/${encodeURIComponent(e.id)}`,busy:b,act:C},e.id))})}),(0,h.jsx)(d,{title:`Review history`,children:n.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No reviews have been queued.`}):(0,h.jsx)(u,{children:n.map(e=>(0,h.jsx)(f,{title:new Date(e.createdAt).toLocaleString(),meta:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`code`,{children:e.status}),(0,h.jsx)(`span`,{children:e.trigger}),(0,h.jsxs)(`span`,{children:[e.turnsReviewed,` turns`]}),(0,h.jsxs)(`span`,{children:[e.proposalCount,` proposals`]})]}),children:e.lastError&&(0,h.jsx)(`p`,{className:`mb-0 mt-1 break-words text-sm text-danger`,children:e.lastError})},e.id))})})]})}function v({config:e,disabled:t,onSave:n}){let[r,i]=(0,m.useState)(e.enabled),[a,o]=(0,m.useState)(e.everyNTurns),[c,l]=(0,m.useState)(e.model??``),[u,d]=(0,m.useState)(e.reasoningLevel);return(0,h.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n({enabled:r,everyNTurns:a,model:c.trim()||null,reasoningLevel:u}).catch(()=>{})},className:`grid items-end gap-x-3 md:grid-cols-4`,children:[(0,h.jsxs)(`label`,{children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),`Periodic review`]}),(0,h.jsxs)(`label`,{children:[`Every N turns`,(0,h.jsx)(`input`,{type:`number`,min:1,max:100,value:a,onChange:e=>o(Number(e.target.value))})]}),(0,h.jsxs)(`label`,{children:[`Model override`,(0,h.jsx)(`input`,{value:c,placeholder:`the Agent model`,onChange:e=>l(e.target.value)})]}),(0,h.jsxs)(`label`,{children:[`Reasoning`,(0,h.jsx)(`select`,{value:u,onChange:e=>d(e.target.value),children:p.map(e=>(0,h.jsx)(`option`,{children:e},e))})]}),(0,h.jsx)(`div`,{className:`md:col-span-4`,children:(0,h.jsx)(s,{variant:`primary`,type:`submit`,disabled:t,children:`Save learning settings`})})]})}function y({proposal:e,base:t,busy:n,act:r}){let[i,o]=(0,m.useState)(e.text),[c,l]=(0,m.useState)(e.scope),[u,d]=(0,m.useState)(null),f={version:e.version},p=e.text.length>54?`${e.text.slice(0,51)}…`:e.text;return(0,h.jsxs)(`article`,{className:`rounded-lg border bg-card p-4`,children:[(0,h.jsxs)(`div`,{className:`mb-2 flex justify-between gap-2`,children:[(0,h.jsx)(`code`,{children:e.status}),(0,h.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,e.version]})]}),e.status===`pending`?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`label`,{children:[`Proposed lesson`,(0,h.jsx)(`textarea`,{rows:3,value:i,onChange:e=>o(e.target.value)})]}),(0,h.jsxs)(`label`,{children:[`Apply the approved lesson to`,(0,h.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),children:[(0,h.jsx)(`option`,{value:`private`,children:`private Agent behavior`}),(0,h.jsx)(`option`,{value:`shared`,children:`shared Team knowledge`})]})]}),c===`shared`&&(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shared lessons become searchable Team memory. Stable facts about you belong in the Team's USER.md instead.`}),(0,h.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,h.jsx)(s,{variant:`ghost`,disabled:n,onClick:()=>void r(t,{method:`PATCH`,body:{...f,text:i,scope:c}}).catch(()=>{}),children:`Save edit`}),(0,h.jsx)(s,{variant:`primary`,disabled:n,onClick:()=>void r(`${t}/approve`,{body:f}).catch(()=>{}),children:`Approve`}),(0,h.jsx)(s,{variant:`danger`,disabled:n,onClick:()=>d(`reject`),children:`Reject`})]})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{children:e.text}),e.status===`approved`&&(0,h.jsx)(`div`,{className:`mt-3`,children:(0,h.jsx)(s,{variant:`danger`,disabled:n,onClick:()=>d(`revoke`),children:`Revoke`})})]}),(0,h.jsxs)(`div`,{className:`mt-3 text-xs text-muted-foreground`,children:[`Evidence:`,` `,e.evidence.length===0?`none`:(0,h.jsx)(`ul`,{className:`mt-1 list-disc pl-5`,children:e.evidence.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsxs)(`code`,{children:[e.sessionId,`:`,e.entryOrdinal]}),e.excerpt?` — ${e.excerpt}`:` — excerpt unavailable`]},`${e.sessionId}:${e.entryOrdinal}`))})]}),u&&(0,h.jsx)(a,{open:!0,title:u===`reject`?`Reject “${p}”?`:`Revoke “${p}”?`,description:u===`reject`?(0,h.jsx)(`p`,{children:`The proposal is marked rejected and never changes the Agent's prompts or Team memory; unsaved edits are discarded. A rejected proposal cannot be edited or approved later.`}):e.scope===`shared`?(0,h.jsx)(`p`,{children:`The lesson note is removed from Team memory, so Team-memory search no longer finds it. The proposal stays in the review history.`}):(0,h.jsx)(`p`,{children:`The lesson is removed from the Agent's future prompts; past conversations are not rewritten. The proposal stays in the review history.`}),confirmLabel:u===`reject`?`Reject proposal`:`Revoke lesson`,onOpenChange:e=>{e||d(null)},onConfirm:()=>r(`${t}/${u}`,{body:f})})]})}export{_ as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-bzQ4Vb5N.js";import{O as t,at as n,k as r,nt as i,ot as a,st as o}from"./index-CKJ3uVR4.js";var s=n(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),c=n(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),l=e();function u(){let{error:e}=t.useSearch();return(0,l.jsxs)(`main`,{className:`relative flex min-h-dvh items-center overflow-hidden bg-cream px-5 py-16 sm:px-8`,children:[(0,l.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0`,style:{background:`radial-gradient(circle at 16% 12%, rgba(61,120,153,0.18), transparent 36rem), radial-gradient(circle at 88% 84%, rgba(196,135,138,0.13), transparent 32rem)`}}),(0,l.jsx)(`div`,{className:`absolute right-4 top-4 z-10 sm:right-6 sm:top-6`,children:(0,l.jsx)(r,{})}),(0,l.jsxs)(`div`,{className:`relative mx-auto grid w-full max-w-5xl items-center gap-10 lg:grid-cols-[minmax(0,1fr)_25rem] lg:gap-20`,children:[(0,l.jsxs)(`section`,{className:`hidden lg:block`,children:[(0,l.jsxs)(`div`,{className:`mb-8 flex items-center gap-3`,children:[(0,l.jsx)(o,{className:`h-12 w-12`}),(0,l.jsx)(`span`,{className:`font-display text-3xl tracking-[-0.03em] text-charcoal`,children:`bazilion`})]}),(0,l.jsx)(`h1`,{className:`max-w-xl text-[3.4rem] leading-[0.98] tracking-[-0.035em]`,children:`Your agents, working as one thoughtful team.`}),(0,l.jsx)(`p`,{className:`mt-6 max-w-lg text-base leading-7 text-mocha`,children:`A private workspace for long-lived agents, shared context, and communication policies you can actually see and control.`}),(0,l.jsxs)(`div`,{className:`mt-8 grid max-w-lg gap-3 sm:grid-cols-2`,children:[(0,l.jsx)(d,{icon:(0,l.jsx)(c,{className:`h-4 w-4`}),label:`Persistent conversations`}),(0,l.jsx)(d,{icon:(0,l.jsx)(i,{className:`h-4 w-4`}),label:`Team-owned context`})]})]}),(0,l.jsxs)(`section`,{className:`w-full rounded-[24px] border border-frost bg-snow/95 p-7 shadow-baziu-lg backdrop-blur sm:p-9`,children:[(0,l.jsxs)(`div`,{className:`mb-6 flex items-center gap-3 lg:hidden`,children:[(0,l.jsx)(o,{className:`h-10 w-10`}),(0,l.jsx)(`span`,{className:`font-display text-2xl text-charcoal`,children:`bazilion`})]}),(0,l.jsx)(`div`,{className:`mb-6 flex h-10 w-10 items-center justify-center rounded-xl bg-sapphire-glow text-sapphire`,children:(0,l.jsx)(s,{className:`h-5 w-5`,"aria-hidden":`true`})}),(0,l.jsx)(`h2`,{className:`font-display text-3xl text-charcoal`,children:`Open Bazilion`}),(0,l.jsxs)(`p`,{className:`mt-2 text-sm leading-6 text-mocha-light`,children:[`Sign in with the bootstrap token from `,(0,l.jsx)(`code`,{children:`auth.json`}),` or a device token.`]}),e===`token`&&(0,l.jsxs)(`div`,{className:`err mt-5`,role:`alert`,children:[`That token was not accepted. Use the bootstrap token from `,(0,l.jsx)(`code`,{children:`auth.json`}),` or an active, unrevoked device token.`]}),e===`origin`&&(0,l.jsx)(`div`,{className:`err mt-5`,role:`alert`,children:`Bazilion blocked the sign-in request because its browser origin was hidden. Reload this page and try again from the configured Bazilion address.`}),(0,l.jsxs)(`form`,{method:`POST`,action:`/api/login`,className:`mt-6 text-left`,children:[(0,l.jsx)(`label`,{htmlFor:`token`,className:`block text-[0.85em] font-semibold text-mocha`,children:`Access token`}),(0,l.jsx)(`input`,{type:`password`,id:`token`,name:`token`,autoFocus:!0,required:!0,placeholder:`Paste your token`,className:`mb-4`}),(0,l.jsx)(`button`,{type:`submit`,className:`w-full`,children:`Open Bazilion`})]}),(0,l.jsxs)(`p`,{className:`mt-5 rounded-xl bg-ivory px-3 py-2.5 text-[0.78em] leading-relaxed text-mocha-light`,children:[`Print the bootstrap token with `,(0,l.jsx)(`code`,{children:`bazilion token show-local`}),`, or mint a device token with `,(0,l.jsx)(`code`,{children:`bazilion token create <label>`}),`. The browser keeps a session that ends after 30 days without use.`]})]})]}),(0,l.jsxs)(`footer`,{className:`absolute bottom-4 left-0 right-0 text-center text-xs text-mocha-light`,children:[`dedicated to Baziu`,(0,l.jsx)(a,{className:`ml-1 inline-block h-3 w-3 align-[-1px] opacity-40`})]})]})}function d({icon:e,label:t}){return(0,l.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border border-frost bg-snow/70 px-3 py-2.5 text-sm font-semibold text-mocha shadow-baziu-sm`,children:[(0,l.jsx)(`span`,{className:`text-sapphire`,children:e}),t]})}export{u as component};
1
+ import{t as e}from"./jsx-runtime-bzQ4Vb5N.js";import{O as t,at as n,k as r,nt as i,ot as a,st as o}from"./index-1YXquAq8.js";var s=n(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),c=n(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),l=e();function u(){let{error:e}=t.useSearch();return(0,l.jsxs)(`main`,{className:`relative flex min-h-dvh items-center overflow-hidden bg-cream px-5 py-16 sm:px-8`,children:[(0,l.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0`,style:{background:`radial-gradient(circle at 16% 12%, rgba(61,120,153,0.18), transparent 36rem), radial-gradient(circle at 88% 84%, rgba(196,135,138,0.13), transparent 32rem)`}}),(0,l.jsx)(`div`,{className:`absolute right-4 top-4 z-10 sm:right-6 sm:top-6`,children:(0,l.jsx)(r,{})}),(0,l.jsxs)(`div`,{className:`relative mx-auto grid w-full max-w-5xl items-center gap-10 lg:grid-cols-[minmax(0,1fr)_25rem] lg:gap-20`,children:[(0,l.jsxs)(`section`,{className:`hidden lg:block`,children:[(0,l.jsxs)(`div`,{className:`mb-8 flex items-center gap-3`,children:[(0,l.jsx)(o,{className:`h-12 w-12`}),(0,l.jsx)(`span`,{className:`font-display text-3xl tracking-[-0.03em] text-charcoal`,children:`bazilion`})]}),(0,l.jsx)(`h1`,{className:`max-w-xl text-[3.4rem] leading-[0.98] tracking-[-0.035em]`,children:`Your agents, working as one thoughtful team.`}),(0,l.jsx)(`p`,{className:`mt-6 max-w-lg text-base leading-7 text-mocha`,children:`A private workspace for long-lived agents, shared context, and communication policies you can actually see and control.`}),(0,l.jsxs)(`div`,{className:`mt-8 grid max-w-lg gap-3 sm:grid-cols-2`,children:[(0,l.jsx)(d,{icon:(0,l.jsx)(c,{className:`h-4 w-4`}),label:`Persistent conversations`}),(0,l.jsx)(d,{icon:(0,l.jsx)(i,{className:`h-4 w-4`}),label:`Team-owned context`})]})]}),(0,l.jsxs)(`section`,{className:`w-full rounded-[24px] border border-frost bg-snow/95 p-7 shadow-baziu-lg backdrop-blur sm:p-9`,children:[(0,l.jsxs)(`div`,{className:`mb-6 flex items-center gap-3 lg:hidden`,children:[(0,l.jsx)(o,{className:`h-10 w-10`}),(0,l.jsx)(`span`,{className:`font-display text-2xl text-charcoal`,children:`bazilion`})]}),(0,l.jsx)(`div`,{className:`mb-6 flex h-10 w-10 items-center justify-center rounded-xl bg-sapphire-glow text-sapphire`,children:(0,l.jsx)(s,{className:`h-5 w-5`,"aria-hidden":`true`})}),(0,l.jsx)(`h2`,{className:`font-display text-3xl text-charcoal`,children:`Open Bazilion`}),(0,l.jsxs)(`p`,{className:`mt-2 text-sm leading-6 text-mocha-light`,children:[`Sign in with the bootstrap token from `,(0,l.jsx)(`code`,{children:`auth.json`}),` or a device token.`]}),e===`token`&&(0,l.jsxs)(`div`,{className:`err mt-5`,role:`alert`,children:[`That token was not accepted. Use the bootstrap token from `,(0,l.jsx)(`code`,{children:`auth.json`}),` or an active, unrevoked device token.`]}),e===`origin`&&(0,l.jsx)(`div`,{className:`err mt-5`,role:`alert`,children:`Bazilion blocked the sign-in request because its browser origin was hidden. Reload this page and try again from the configured Bazilion address.`}),(0,l.jsxs)(`form`,{method:`POST`,action:`/api/login`,className:`mt-6 text-left`,children:[(0,l.jsx)(`label`,{htmlFor:`token`,className:`block text-[0.85em] font-semibold text-mocha`,children:`Access token`}),(0,l.jsx)(`input`,{type:`password`,id:`token`,name:`token`,autoFocus:!0,required:!0,placeholder:`Paste your token`,className:`mb-4`}),(0,l.jsx)(`button`,{type:`submit`,className:`w-full`,children:`Open Bazilion`})]}),(0,l.jsxs)(`p`,{className:`mt-5 rounded-xl bg-ivory px-3 py-2.5 text-[0.78em] leading-relaxed text-mocha-light`,children:[`Print the bootstrap token with `,(0,l.jsx)(`code`,{children:`bazilion token show-local`}),`, or mint a device token with `,(0,l.jsx)(`code`,{children:`bazilion token create <label>`}),`. The browser keeps a session that ends after 30 days without use.`]})]})]}),(0,l.jsxs)(`footer`,{className:`absolute bottom-4 left-0 right-0 text-center text-xs text-mocha-light`,children:[`dedicated to Baziu`,(0,l.jsx)(a,{className:`ml-1 inline-block h-3 w-3 align-[-1px] opacity-40`})]})]})}function d({icon:e,label:t}){return(0,l.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border border-frost bg-snow/70 px-3 py-2.5 text-sm font-semibold text-mocha shadow-baziu-sm`,children:[(0,l.jsx)(`span`,{className:`text-sapphire`,children:e}),t]})}export{u as component};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{f as r}from"./preload-helper-eUUcpe2S.js";import{t as i}from"./ConfirmDialog-B5BLql5H.js";import{N as a,_t as o,ht as s,j as c,lt as l,pt as u,ut as d,y as f}from"./index-CKJ3uVR4.js";import{t as p}from"./ConfigPage-BcjKer-E.js";var m=e(t()),h=n(),g=e=>`/api/mcp-servers/${encodeURIComponent(e)}`;function _(){let{servers:e}=f.useLoaderData(),t=r(),[n,_]=(0,m.useState)(null),[y,b]=(0,m.useState)({}),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)(null);async function T(e){S(e.id),_(null);try{await c(g(e.id),{method:`PATCH`,body:{enabled:!e.enabled}}),await t.invalidate()}catch(e){_(a(e))}finally{S(null)}}async function E(e){b(t=>({...t,[e]:{kind:`pending`,message:`Connecting…`}}));let t;try{let n=await c(`${g(e)}/test`,{method:`POST`}),r=n.tools??[];t=n.ok?{kind:`success`,message:`${r.length} tools: ${r.map(e=>e.name).join(`, `)}`}:{kind:`error`,message:n.error??`Test failed`}}catch(e){t={kind:`error`,message:a(e)}}b(n=>({...n,[e]:t}))}return(0,h.jsxs)(p,{title:`MCP servers`,description:(0,h.jsxs)(h.Fragment,{children:[`Tools from these Model Context Protocol servers are offered to every agent turn as`,` `,(0,h.jsx)(`code`,{className:`font-mono`,children:`mcp__<server>__<tool>`}),`. A stdio server runs as a daemon child process with the configured provider keys and secrets, never Bazilion's own credentials; a Streamable HTTP server can use a bearer token.`]}),children:[(0,h.jsx)(v,{onAdded:()=>t.invalidate()}),n&&(0,h.jsx)(`p`,{role:`alert`,className:`err`,children:n}),(0,h.jsx)(u,{title:`Servers`,children:e.length===0?(0,h.jsx)(`p`,{className:`muted`,children:`No MCP servers yet; add one above.`}):(0,h.jsx)(l,{children:e.map(e=>{let t=y[e.id];return(0,h.jsx)(d,{title:e.name,meta:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s,{variant:e.enabled?`success`:`neutral`,children:e.enabled?`enabled`:`disabled`}),(0,h.jsx)(`span`,{children:e.transport}),e.hasAuthToken&&(0,h.jsx)(`span`,{children:`bearer token`}),(0,h.jsx)(`code`,{className:`break-all`,children:e.transport===`stdio`?`${e.command??``} ${e.args.join(` `)}`.trim():e.url})]}),actions:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(o,{variant:`ghost`,onClick:()=>void E(e.id),children:`Test`}),(0,h.jsx)(o,{variant:`ghost`,disabled:x===e.id,onClick:()=>void T(e),children:x===e.id?`Working…`:e.enabled?`Disable`:`Enable`}),(0,h.jsx)(o,{variant:`danger`,disabled:x===e.id,onClick:()=>w(e),children:`Delete`})]}),children:t&&(0,h.jsx)(`p`,{role:t.kind===`error`?`alert`:`status`,className:`mb-0 mt-2 break-words text-xs ${t.kind===`error`?`text-danger`:t.kind===`success`?`text-success`:`text-muted-foreground`}`,children:t.message})},e.id)})})}),(0,h.jsx)(i,{open:C!==null,title:`Delete MCP server ${C?.name??``}?`,description:(0,h.jsx)(`p`,{children:`This removes the server and its stored bearer token, closes its connection and removes its tools from later Agent turns.`}),confirmLabel:`Delete MCP server`,onConfirm:async()=>{C&&(await c(g(C.id),{method:`DELETE`}),await t.invalidate())},onOpenChange:e=>{e||w(null)}})]})}function v({onAdded:e}){let[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(`stdio`),[s,l]=(0,m.useState)(``),[d,f]=(0,m.useState)(``),[p,g]=(0,m.useState)(``),[_,v]=(0,m.useState)(``),[y,b]=(0,m.useState)(null),[x,S]=(0,m.useState)(!1);async function C(i){i.preventDefault(),b(null),S(!0);try{await c(`/api/mcp-servers`,{body:{name:t,transport:r,command:r===`stdio`?s:null,args:r===`stdio`?d.split(` `).filter(Boolean):[],url:r===`stdio`?null:p,authToken:_||void 0}}),n(``),l(``),f(``),g(``),v(``),await e()}catch(e){b(a(e))}finally{S(!1)}}return(0,h.jsx)(u,{title:`Add a server`,children:(0,h.jsxs)(`form`,{onSubmit:e=>void C(e),children:[(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_12rem]`,children:[(0,h.jsxs)(`label`,{children:[`Name`,(0,h.jsx)(`input`,{type:`text`,value:t,onChange:e=>n(e.target.value),required:!0,placeholder:`playwright`,pattern:`[a-zA-Z0-9_]+`})]}),(0,h.jsxs)(`label`,{children:[`Transport`,(0,h.jsxs)(`select`,{value:r,onChange:e=>i(e.target.value),children:[(0,h.jsx)(`option`,{value:`stdio`,children:`stdio`}),(0,h.jsx)(`option`,{value:`http`,children:`http`})]})]})]}),r===`stdio`?(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[12rem_minmax(0,1fr)]`,children:[(0,h.jsxs)(`label`,{children:[`Command`,(0,h.jsx)(`input`,{type:`text`,value:s,onChange:e=>l(e.target.value),placeholder:`npx`})]}),(0,h.jsxs)(`label`,{children:[`Args (space-separated)`,(0,h.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`-y @modelcontextprotocol/server-filesystem /srv/data`})]})]}):(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_14rem]`,children:[(0,h.jsxs)(`label`,{children:[`URL`,(0,h.jsx)(`input`,{type:`url`,value:p,onChange:e=>g(e.target.value),placeholder:`https://mcp.example.com/mcp`})]}),(0,h.jsxs)(`label`,{children:[`Bearer token (optional)`,(0,h.jsx)(`input`,{type:`password`,value:_,onChange:e=>v(e.target.value),autoComplete:`off`})]})]}),(0,h.jsx)(o,{variant:`primary`,type:`submit`,disabled:x,className:`mt-2`,children:x?`Adding…`:`Add server`}),y&&(0,h.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-danger`,children:y})]})})}export{_ as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{f as r}from"./preload-helper-eUUcpe2S.js";import{t as i}from"./ConfirmDialog-536ziJ5P.js";import{N as a,_t as o,ht as s,j as c,lt as l,pt as u,ut as d,y as f}from"./index-1YXquAq8.js";import{t as p}from"./ConfigPage-Dfu9DzFX.js";var m=e(t()),h=n(),g=e=>`/api/mcp-servers/${encodeURIComponent(e)}`;function _(){let{servers:e}=f.useLoaderData(),t=r(),[n,_]=(0,m.useState)(null),[y,b]=(0,m.useState)({}),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)(null);async function T(e){S(e.id),_(null);try{await c(g(e.id),{method:`PATCH`,body:{enabled:!e.enabled}}),await t.invalidate()}catch(e){_(a(e))}finally{S(null)}}async function E(e){b(t=>({...t,[e]:{kind:`pending`,message:`Connecting…`}}));let t;try{let n=await c(`${g(e)}/test`,{method:`POST`}),r=n.tools??[];t=n.ok?{kind:`success`,message:`${r.length} tools: ${r.map(e=>e.name).join(`, `)}`}:{kind:`error`,message:n.error??`Test failed`}}catch(e){t={kind:`error`,message:a(e)}}b(n=>({...n,[e]:t}))}return(0,h.jsxs)(p,{title:`MCP servers`,description:(0,h.jsxs)(h.Fragment,{children:[`Tools from these Model Context Protocol servers are offered to every agent turn as`,` `,(0,h.jsx)(`code`,{className:`font-mono`,children:`mcp__<server>__<tool>`}),`. A stdio server runs as a daemon child process with the configured provider keys and secrets, never Bazilion's own credentials; a Streamable HTTP server can use a bearer token.`]}),children:[(0,h.jsx)(v,{onAdded:()=>t.invalidate()}),n&&(0,h.jsx)(`p`,{role:`alert`,className:`err`,children:n}),(0,h.jsx)(u,{title:`Servers`,children:e.length===0?(0,h.jsx)(`p`,{className:`muted`,children:`No MCP servers yet; add one above.`}):(0,h.jsx)(l,{children:e.map(e=>{let t=y[e.id];return(0,h.jsx)(d,{title:e.name,meta:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s,{variant:e.enabled?`success`:`neutral`,children:e.enabled?`enabled`:`disabled`}),(0,h.jsx)(`span`,{children:e.transport}),e.hasAuthToken&&(0,h.jsx)(`span`,{children:`bearer token`}),(0,h.jsx)(`code`,{className:`break-all`,children:e.transport===`stdio`?`${e.command??``} ${e.args.join(` `)}`.trim():e.url})]}),actions:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(o,{variant:`ghost`,onClick:()=>void E(e.id),children:`Test`}),(0,h.jsx)(o,{variant:`ghost`,disabled:x===e.id,onClick:()=>void T(e),children:x===e.id?`Working…`:e.enabled?`Disable`:`Enable`}),(0,h.jsx)(o,{variant:`danger`,disabled:x===e.id,onClick:()=>w(e),children:`Delete`})]}),children:t&&(0,h.jsx)(`p`,{role:t.kind===`error`?`alert`:`status`,className:`mb-0 mt-2 break-words text-xs ${t.kind===`error`?`text-danger`:t.kind===`success`?`text-success`:`text-muted-foreground`}`,children:t.message})},e.id)})})}),(0,h.jsx)(i,{open:C!==null,title:`Delete MCP server ${C?.name??``}?`,description:(0,h.jsx)(`p`,{children:`This removes the server and its stored bearer token, closes its connection and removes its tools from later Agent turns.`}),confirmLabel:`Delete MCP server`,onConfirm:async()=>{C&&(await c(g(C.id),{method:`DELETE`}),await t.invalidate())},onOpenChange:e=>{e||w(null)}})]})}function v({onAdded:e}){let[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(`stdio`),[s,l]=(0,m.useState)(``),[d,f]=(0,m.useState)(``),[p,g]=(0,m.useState)(``),[_,v]=(0,m.useState)(``),[y,b]=(0,m.useState)(null),[x,S]=(0,m.useState)(!1);async function C(i){i.preventDefault(),b(null),S(!0);try{await c(`/api/mcp-servers`,{body:{name:t,transport:r,command:r===`stdio`?s:null,args:r===`stdio`?d.split(` `).filter(Boolean):[],url:r===`stdio`?null:p,authToken:_||void 0}}),n(``),l(``),f(``),g(``),v(``),await e()}catch(e){b(a(e))}finally{S(!1)}}return(0,h.jsx)(u,{title:`Add a server`,children:(0,h.jsxs)(`form`,{onSubmit:e=>void C(e),children:[(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_12rem]`,children:[(0,h.jsxs)(`label`,{children:[`Name`,(0,h.jsx)(`input`,{type:`text`,value:t,onChange:e=>n(e.target.value),required:!0,placeholder:`playwright`,pattern:`[a-zA-Z0-9_]+`})]}),(0,h.jsxs)(`label`,{children:[`Transport`,(0,h.jsxs)(`select`,{value:r,onChange:e=>i(e.target.value),children:[(0,h.jsx)(`option`,{value:`stdio`,children:`stdio`}),(0,h.jsx)(`option`,{value:`http`,children:`http`})]})]})]}),r===`stdio`?(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[12rem_minmax(0,1fr)]`,children:[(0,h.jsxs)(`label`,{children:[`Command`,(0,h.jsx)(`input`,{type:`text`,value:s,onChange:e=>l(e.target.value),placeholder:`npx`})]}),(0,h.jsxs)(`label`,{children:[`Args (space-separated)`,(0,h.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`-y @modelcontextprotocol/server-filesystem /srv/data`})]})]}):(0,h.jsxs)(`div`,{className:`grid gap-x-3 sm:grid-cols-[minmax(0,1fr)_14rem]`,children:[(0,h.jsxs)(`label`,{children:[`URL`,(0,h.jsx)(`input`,{type:`url`,value:p,onChange:e=>g(e.target.value),placeholder:`https://mcp.example.com/mcp`})]}),(0,h.jsxs)(`label`,{children:[`Bearer token (optional)`,(0,h.jsx)(`input`,{type:`password`,value:_,onChange:e=>v(e.target.value),autoComplete:`off`})]})]}),(0,h.jsx)(o,{variant:`primary`,type:`submit`,disabled:x,className:`mt-2`,children:x?`Adding…`:`Add server`}),y&&(0,h.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-danger`,children:y})]})})}export{_ as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-bzQ4Vb5N.js";import{c as t,ct as n,ht as r,lt as i,pt as a,ut as o}from"./index-CKJ3uVR4.js";var s=e();function c(){let{members:e}=t.useLoaderData();return e.length===0?(0,s.jsx)(n,{title:`No Team members`,description:`Spawn an Agent into this Team from the Agents page, or spawn a Team template into it.`,actions:(0,s.jsx)(`a`,{href:`/agents`,className:`btn-primary no-underline`,children:`Spawn an Agent`})}):(0,s.jsx)(a,{title:`Members`,description:`Every Agent belongs to exactly one Team.`,children:(0,s.jsx)(i,{children:e.map(e=>(0,s.jsx)(o,{title:(0,s.jsx)(`a`,{href:`/agents/${e.id}`,children:e.name}),meta:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r,{variant:e.status===`archived`?`warning`:`success`,children:e.status}),(0,s.jsxs)(`span`,{children:[`template `,(0,s.jsx)(`code`,{children:e.profileId})]}),(0,s.jsx)(`code`,{children:e.id})]})},e.id))})})}export{c as component};
1
+ import{t as e}from"./jsx-runtime-bzQ4Vb5N.js";import{c as t,ct as n,ht as r,lt as i,pt as a,ut as o}from"./index-1YXquAq8.js";var s=e();function c(){let{members:e}=t.useLoaderData();return e.length===0?(0,s.jsx)(n,{title:`No Team members`,description:`Spawn an Agent into this Team from the Agents page, or spawn a Team template into it.`,actions:(0,s.jsx)(`a`,{href:`/agents`,className:`btn-primary no-underline`,children:`Spawn an Agent`})}):(0,s.jsx)(a,{title:`Members`,description:`Every Agent belongs to exactly one Team.`,children:(0,s.jsx)(i,{children:e.map(e=>(0,s.jsx)(o,{title:(0,s.jsx)(`a`,{href:`/agents/${e.id}`,children:e.name}),meta:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r,{variant:e.status===`archived`?`warning`:`success`,children:e.status}),(0,s.jsxs)(`span`,{children:[`template `,(0,s.jsx)(`code`,{children:e.profileId})]}),(0,s.jsx)(`code`,{children:e.id})]})},e.id))})})}export{c as component};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./UnsavedChangesGuard-CmeIPiXp.js";import{t as i}from"./ConfirmDialog-B5BLql5H.js";import{N as a,_t as o,j as s,l as c}from"./index-CKJ3uVR4.js";var l=e(t()),u=n(),d=e=>({key:e.key,preview:e.content.slice(0,80)});function f(){let e=c.useLoaderData(),{id:t}=c.useParams(),n=`/api/teams/${encodeURIComponent(t)}/memory`,f=e=>`${n}/${e.split(`/`).map(encodeURIComponent).join(`/`)}`,[p,m]=(0,l.useState)(()=>e.map(d)),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(`none`),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(``),[D,O]=(0,l.useState)({key:``,content:``}),[k,A]=(0,l.useState)(null),[j,M]=(0,l.useState)(null),N=x!==`none`&&(C!==D.key||T!==D.content);async function P(e){try{e.trim()?(m((await s(`${n}/search?q=${encodeURIComponent(e)}&limit=50`)).map(e=>({key:e.key,preview:e.snippet,score:e.score}))),g(!0)):(m((await s(n)).map(d)),g(!1))}catch(e){A({message:a(e),error:!0})}}(0,l.useEffect)(()=>{let e=setTimeout(()=>void P(_),200);return()=>clearTimeout(e)},[_]);function F(e,t,n){S(e),b(e===`edit`?t:null),w(t),E(n),O({key:t,content:n})}async function I(e){A({message:`Loading…`,error:!1});try{let t=await s(f(e));F(`edit`,t.key,t.content??``),A(null)}catch(e){A({message:a(e),error:!0})}}function L(e,t){if(!N){e();return}M({title:`Discard unsaved memory changes?`,description:(0,u.jsxs)(`p`,{children:[`Your changes to`,` `,(0,u.jsx)(`code`,{className:`font-mono`,children:y??(C||`the new entry`)}),` will be lost.`]}),confirmLabel:t,onConfirm:e})}async function R(){let e=C.trim();try{await s(f(e),{method:`PUT`,body:{content:T}}),F(`edit`,e,T),A({message:`Saved`,error:!1}),await P(_)}catch(e){A({message:a(e),error:!0})}}async function z(e){await s(f(e),{method:`DELETE`}),F(`none`,``,``),A({message:`${e} deleted`,error:!1}),await P(_)}return(0,u.jsxs)(`div`,{className:`space-y-6`,children:[(0,u.jsx)(r,{when:N,subject:`Team memory draft`}),(0,u.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Notes shared by every Agent in this Team and found by the memory search. Notes about one Agent belong in its own `,(0,u.jsx)(`code`,{className:`font-mono`,children:`IDENTITY.md`}),` instead.`]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[320px_1fr]`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`div`,{className:`overflow-hidden rounded-[16px] border border-frost bg-snow`,children:[(0,u.jsx)(`div`,{className:`border-b border-frost p-2`,children:(0,u.jsx)(`input`,{"aria-label":`Search Team memory`,type:`search`,placeholder:`search (BM25)...`,autoComplete:`off`,value:_,onChange:e=>v(e.target.value)})}),(0,u.jsx)(`div`,{className:`max-h-[520px] overflow-y-auto`,children:p.length===0?(0,u.jsx)(`div`,{className:`p-8 text-center text-mocha-light`,children:`no entries`}):p.map(e=>(0,u.jsxs)(`button`,{type:`button`,onClick:()=>{(x!==`edit`||e.key!==y)&&L(()=>I(e.key),`Discard and open`)},className:`unstyled block w-full cursor-pointer border-b border-frost/50 px-3.5 py-2 text-left font-mono text-[0.84em] transition-colors last:border-b-0 hover:bg-sapphire-glow ${e.key===y?`bg-sapphire-glow font-medium text-sapphire-deep`:``}`,children:[h&&e.score!==void 0&&(0,u.jsx)(`span`,{className:`float-right text-[0.75em] text-sapphire`,children:e.score.toFixed(2)}),e.key,e.preview&&(0,u.jsx)(`span`,{className:`mt-1 block text-[0.9em] font-normal text-mocha-light`,children:e.preview})]},e.key))})]}),(0,u.jsx)(o,{variant:`ghost`,className:`mt-3 w-full`,onClick:()=>L(()=>{F(`new`,``,``),A({message:`New entry: type a key and content, then save.`,error:!1})},`Discard and create new`),children:`+ new entry`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`input`,{"aria-label":`Memory entry key`,type:`text`,placeholder:`key (e.g. prefs/hiking.md)`,value:C,onChange:e=>w(e.target.value),disabled:x!==`new`,className:`mb-3 font-mono`}),(0,u.jsx)(`textarea`,{"aria-label":`Memory entry content`,placeholder:`Select an entry on the left, or create a new one.`,value:T,onChange:e=>E(e.target.value),disabled:x===`none`,className:`min-h-[360px] font-mono text-[0.9em] leading-[1.55]`}),(0,u.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[(0,u.jsx)(o,{variant:`primary`,onClick:()=>void R(),disabled:x===`none`||!C.trim()||!N,children:`Save`}),(0,u.jsx)(o,{variant:`danger`,disabled:x!==`edit`||y===null,onClick:()=>{let e=y;e&&M({title:`Delete ${e}?`,description:(0,u.jsxs)(`p`,{children:[`This permanently deletes `,(0,u.jsx)(`code`,{className:`font-mono`,children:e}),` from the Team's shared memory and its search results.`]}),confirmLabel:`Delete memory entry`,onConfirm:()=>z(e)})},children:`Delete`})]}),k&&(0,u.jsx)(`p`,{role:k.error?`alert`:`status`,className:`mt-2 text-[0.9em] ${k.error?`text-danger`:`text-mocha-light`}`,children:k.message})]})]}),(0,u.jsx)(i,{open:j!==null,title:j?.title??``,description:j?.description??null,confirmLabel:j?.confirmLabel??`Continue`,onConfirm:()=>j?.onConfirm(),onOpenChange:e=>{e||M(null)}})]})}export{f as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./UnsavedChangesGuard-GC-vzw7h.js";import{t as i}from"./ConfirmDialog-536ziJ5P.js";import{N as a,_t as o,j as s,l as c}from"./index-1YXquAq8.js";var l=e(t()),u=n(),d=e=>({key:e.key,preview:e.content.slice(0,80)});function f(){let e=c.useLoaderData(),{id:t}=c.useParams(),n=`/api/teams/${encodeURIComponent(t)}/memory`,f=e=>`${n}/${e.split(`/`).map(encodeURIComponent).join(`/`)}`,[p,m]=(0,l.useState)(()=>e.map(d)),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(`none`),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(``),[D,O]=(0,l.useState)({key:``,content:``}),[k,A]=(0,l.useState)(null),[j,M]=(0,l.useState)(null),N=x!==`none`&&(C!==D.key||T!==D.content);async function P(e){try{e.trim()?(m((await s(`${n}/search?q=${encodeURIComponent(e)}&limit=50`)).map(e=>({key:e.key,preview:e.snippet,score:e.score}))),g(!0)):(m((await s(n)).map(d)),g(!1))}catch(e){A({message:a(e),error:!0})}}(0,l.useEffect)(()=>{let e=setTimeout(()=>void P(_),200);return()=>clearTimeout(e)},[_]);function F(e,t,n){S(e),b(e===`edit`?t:null),w(t),E(n),O({key:t,content:n})}async function I(e){A({message:`Loading…`,error:!1});try{let t=await s(f(e));F(`edit`,t.key,t.content??``),A(null)}catch(e){A({message:a(e),error:!0})}}function L(e,t){if(!N){e();return}M({title:`Discard unsaved memory changes?`,description:(0,u.jsxs)(`p`,{children:[`Your changes to`,` `,(0,u.jsx)(`code`,{className:`font-mono`,children:y??(C||`the new entry`)}),` will be lost.`]}),confirmLabel:t,onConfirm:e})}async function R(){let e=C.trim();try{await s(f(e),{method:`PUT`,body:{content:T}}),F(`edit`,e,T),A({message:`Saved`,error:!1}),await P(_)}catch(e){A({message:a(e),error:!0})}}async function z(e){await s(f(e),{method:`DELETE`}),F(`none`,``,``),A({message:`${e} deleted`,error:!1}),await P(_)}return(0,u.jsxs)(`div`,{className:`space-y-6`,children:[(0,u.jsx)(r,{when:N,subject:`Team memory draft`}),(0,u.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Notes shared by every Agent in this Team and found by the memory search. Notes about one Agent belong in its own `,(0,u.jsx)(`code`,{className:`font-mono`,children:`IDENTITY.md`}),` instead.`]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[320px_1fr]`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`div`,{className:`overflow-hidden rounded-[16px] border border-frost bg-snow`,children:[(0,u.jsx)(`div`,{className:`border-b border-frost p-2`,children:(0,u.jsx)(`input`,{"aria-label":`Search Team memory`,type:`search`,placeholder:`search (BM25)...`,autoComplete:`off`,value:_,onChange:e=>v(e.target.value)})}),(0,u.jsx)(`div`,{className:`max-h-[520px] overflow-y-auto`,children:p.length===0?(0,u.jsx)(`div`,{className:`p-8 text-center text-mocha-light`,children:`no entries`}):p.map(e=>(0,u.jsxs)(`button`,{type:`button`,onClick:()=>{(x!==`edit`||e.key!==y)&&L(()=>I(e.key),`Discard and open`)},className:`unstyled block w-full cursor-pointer border-b border-frost/50 px-3.5 py-2 text-left font-mono text-[0.84em] transition-colors last:border-b-0 hover:bg-sapphire-glow ${e.key===y?`bg-sapphire-glow font-medium text-sapphire-deep`:``}`,children:[h&&e.score!==void 0&&(0,u.jsx)(`span`,{className:`float-right text-[0.75em] text-sapphire`,children:e.score.toFixed(2)}),e.key,e.preview&&(0,u.jsx)(`span`,{className:`mt-1 block text-[0.9em] font-normal text-mocha-light`,children:e.preview})]},e.key))})]}),(0,u.jsx)(o,{variant:`ghost`,className:`mt-3 w-full`,onClick:()=>L(()=>{F(`new`,``,``),A({message:`New entry: type a key and content, then save.`,error:!1})},`Discard and create new`),children:`+ new entry`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`input`,{"aria-label":`Memory entry key`,type:`text`,placeholder:`key (e.g. prefs/hiking.md)`,value:C,onChange:e=>w(e.target.value),disabled:x!==`new`,className:`mb-3 font-mono`}),(0,u.jsx)(`textarea`,{"aria-label":`Memory entry content`,placeholder:`Select an entry on the left, or create a new one.`,value:T,onChange:e=>E(e.target.value),disabled:x===`none`,className:`min-h-[360px] font-mono text-[0.9em] leading-[1.55]`}),(0,u.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[(0,u.jsx)(o,{variant:`primary`,onClick:()=>void R(),disabled:x===`none`||!C.trim()||!N,children:`Save`}),(0,u.jsx)(o,{variant:`danger`,disabled:x!==`edit`||y===null,onClick:()=>{let e=y;e&&M({title:`Delete ${e}?`,description:(0,u.jsxs)(`p`,{children:[`This permanently deletes `,(0,u.jsx)(`code`,{className:`font-mono`,children:e}),` from the Team's shared memory and its search results.`]}),confirmLabel:`Delete memory entry`,onConfirm:()=>z(e)})},children:`Delete`})]}),k&&(0,u.jsx)(`p`,{role:k.error?`alert`:`status`,className:`mt-2 text-[0.9em] ${k.error?`text-danger`:`text-mocha-light`}`,children:k.message})]})]}),(0,u.jsx)(i,{open:j!==null,title:j?.title??``,description:j?.description??null,confirmLabel:j?.confirmLabel??`Continue`,onConfirm:()=>j?.onConfirm(),onOpenChange:e=>{e||M(null)}})]})}export{f as component};
@@ -0,0 +1 @@
1
+ import{at as e}from"./index-1YXquAq8.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r,t as i}from"./TeamPolicyEditor-B-ikYl3V.js";import{N as a,_t as o,j as s,pt as c,u as l}from"./index-CKJ3uVR4.js";var u=e(t()),d=n();function f(){let{policy:e,profiles:t}=l.useLoaderData(),{id:n}=l.useParams();return(0,d.jsxs)(`div`,{className:`space-y-6`,children:[(0,d.jsx)(`p`,{className:`muted`,children:`Who may message whom in this Team. You can always talk to every Agent, and every Agent can always reach you.`}),(0,d.jsx)(i,{source:{kind:`live`,policy:e},profiles:t}),(0,d.jsx)(p,{teamId:n})]})}function p({teamId:e}){let[t,n]=(0,u.useState)(`${e}-template`),[i,l]=(0,u.useState)(`${e} template`),[f,p]=(0,u.useState)(!1),[m,h]=(0,u.useState)(null);async function g(){p(!0),h(null);try{let n=await s(`/api/teams/${encodeURIComponent(e)}/policy/save-as-template`,{body:{id:t.trim(),name:i.trim()}});window.location.assign(`/templates/teams/${encodeURIComponent(n.id)}`)}catch(e){h(a(e)),p(!1)}}return(0,d.jsxs)(c,{title:`Save as Team template`,description:`Copies the members, allow edges, mode and USER.md into a new reusable template.`,children:[(0,d.jsxs)(`div`,{className:`grid items-end gap-x-3 sm:grid-cols-[1fr_1fr_auto]`,children:[(0,d.jsxs)(`label`,{children:[`Template ID`,(0,d.jsx)(`input`,{value:t,onChange:e=>n(e.target.value)})]}),(0,d.jsxs)(`label`,{children:[`Template name`,(0,d.jsx)(`input`,{value:i,onChange:e=>l(e.target.value)})]}),(0,d.jsxs)(o,{variant:`primary`,className:`mb-[0.6rem]`,disabled:f||!t.trim()||!i.trim(),onClick:()=>void g(),children:[(0,d.jsx)(r,{className:`h-4 w-4`}),`Save template`]})]}),m&&(0,d.jsx)(`p`,{role:`alert`,className:`err`,children:m})]})}export{f as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r,t as i}from"./TeamPolicyEditor-CSKBx0oK.js";import{N as a,_t as o,j as s,pt as c,u as l}from"./index-1YXquAq8.js";var u=e(t()),d=n();function f(){let{policy:e,profiles:t}=l.useLoaderData(),{id:n}=l.useParams();return(0,d.jsxs)(`div`,{className:`space-y-6`,children:[(0,d.jsx)(`p`,{className:`muted`,children:`Who may message whom in this Team. You can always talk to every Agent, and every Agent can always reach you.`}),(0,d.jsx)(i,{source:{kind:`live`,policy:e},profiles:t}),(0,d.jsx)(p,{teamId:n})]})}function p({teamId:e}){let[t,n]=(0,u.useState)(`${e}-template`),[i,l]=(0,u.useState)(`${e} template`),[f,p]=(0,u.useState)(!1),[m,h]=(0,u.useState)(null);async function g(){p(!0),h(null);try{let n=await s(`/api/teams/${encodeURIComponent(e)}/policy/save-as-template`,{body:{id:t.trim(),name:i.trim()}});window.location.assign(`/templates/teams/${encodeURIComponent(n.id)}`)}catch(e){h(a(e)),p(!1)}}return(0,d.jsxs)(c,{title:`Save as Team template`,description:`Copies the members, allow edges, mode and USER.md into a new reusable template.`,children:[(0,d.jsxs)(`div`,{className:`grid items-end gap-x-3 sm:grid-cols-[1fr_1fr_auto]`,children:[(0,d.jsxs)(`label`,{children:[`Template ID`,(0,d.jsx)(`input`,{value:t,onChange:e=>n(e.target.value)})]}),(0,d.jsxs)(`label`,{children:[`Template name`,(0,d.jsx)(`input`,{value:i,onChange:e=>l(e.target.value)})]}),(0,d.jsxs)(o,{variant:`primary`,className:`mb-[0.6rem]`,disabled:f||!t.trim()||!i.trim(),onClick:()=>void g(),children:[(0,d.jsx)(r,{className:`h-4 w-4`}),`Save template`]})]}),m&&(0,d.jsx)(`p`,{role:`alert`,className:`err`,children:m})]})}export{f as component};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./ConfirmDialog-B5BLql5H.js";import{N as i,_t as a,d as o,j as s}from"./index-CKJ3uVR4.js";import{t as c}from"./ResultCard-CDLhGze2.js";var l=e(t()),u=n(),d=20;function f(){let e=o.useLoaderData(),{id:t}=o.useParams(),[n,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(0),[y,b]=(0,l.useState)(0),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=new AbortController,n=new URLSearchParams({teamId:t,limit:String(d),offset:String(_)});return h&&n.set(`agentId`,h),f(null),S(``),s(`/api/results?${n}`,{signal:e.signal}).then(e=>{if(_>0&&_>=e.total){v(Math.max(0,Math.floor((e.total-1)/d)*d));return}f(e)}).catch(t=>{e.signal.aborted||S(i(t))}),()=>e.abort()},[t,h,_,y]),(0,u.jsxs)(`div`,{className:`space-y-6`,children:[(0,u.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Files this Team's Agents delivered, saved with their original contents.`}),(0,u.jsxs)(`form`,{className:`flex flex-wrap items-end gap-3`,onSubmit:e=>{e.preventDefault(),v(0),g(p.trim())},children:[(0,u.jsxs)(`label`,{className:`m-0 min-w-0`,children:[`Producing Agent ID`,(0,u.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`All Agents`})]}),(0,u.jsx)(a,{variant:`ghost`,type:`submit`,children:`Filter`}),(0,u.jsx)(a,{variant:`ghost`,onClick:()=>b(e=>e+1),children:`Refresh`})]}),x&&(0,u.jsx)(`p`,{role:`alert`,className:`text-danger`,children:x}),!n&&!x&&(0,u.jsx)(`p`,{role:`status`,children:`Loading results…`}),n&&(0,u.jsxs)(u.Fragment,{children:[n.results.length===0&&(0,u.jsxs)(`p`,{children:[`No saved results`,h?` for this Agent`:` yet`,`.`]}),(0,u.jsx)(`div`,{className:`grid min-w-0 gap-4 md:grid-cols-2`,children:n.results.map(t=>{let n=e[t.agentId];return(0,u.jsxs)(`article`,{className:`min-w-0 rounded-lg border border-fawn p-4`,children:[(0,u.jsx)(c,{resultId:t.id,result:t,showPreview:!0}),(0,u.jsxs)(`p`,{className:`break-all text-sm`,children:[`Agent: `,t.agentId,` (`,n??`deleted`,`)`]}),(0,u.jsxs)(`p`,{className:`text-sm`,children:[`Saved: `,new Date(t.createdAt).toLocaleString()]}),(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[n?(0,u.jsx)(`a`,{className:`ghost-btn`,href:`/agents/${encodeURIComponent(t.agentId)}?conversation=${encodeURIComponent(t.sessionId)}`,children:`Open conversation`}):(0,u.jsx)(`span`,{className:`text-sm text-mocha`,children:`Conversation unavailable`}),(0,u.jsx)(a,{variant:`danger`,onClick:()=>w({id:t.id,name:t.name}),children:`Delete saved file`})]})]},t.id)})}),(0,u.jsxs)(`nav`,{className:`flex flex-wrap items-center gap-3`,"aria-label":`Results pagination`,children:[(0,u.jsx)(a,{variant:`ghost`,disabled:_===0,onClick:()=>v(e=>Math.max(0,e-d)),children:`Previous`}),(0,u.jsx)(`span`,{children:n.total?`${_+1}–${_+n.results.length} of ${n.total}`:`0 results`}),(0,u.jsx)(a,{variant:`ghost`,disabled:_+d>=n.total,onClick:()=>v(e=>e+d),children:`Next`})]})]}),(0,u.jsx)(r,{open:C!==null,title:`Delete saved file?`,description:`Permanently delete the saved file “${C?.name??``}”. The file in the workspace, if any, is unchanged.`,confirmLabel:`Delete saved file`,onOpenChange:e=>{e||w(null)},onConfirm:async()=>{C&&(await s(`/api/results/${encodeURIComponent(C.id)}`,{method:`DELETE`}),v(0),b(e=>e+1))}})]})}export{f as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./ConfirmDialog-536ziJ5P.js";import{N as i,_t as a,d as o,j as s}from"./index-1YXquAq8.js";import{t as c}from"./ResultCard-X4nTbjYY.js";var l=e(t()),u=n(),d=20;function f(){let e=o.useLoaderData(),{id:t}=o.useParams(),[n,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(0),[y,b]=(0,l.useState)(0),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=new AbortController,n=new URLSearchParams({teamId:t,limit:String(d),offset:String(_)});return h&&n.set(`agentId`,h),f(null),S(``),s(`/api/results?${n}`,{signal:e.signal}).then(e=>{if(_>0&&_>=e.total){v(Math.max(0,Math.floor((e.total-1)/d)*d));return}f(e)}).catch(t=>{e.signal.aborted||S(i(t))}),()=>e.abort()},[t,h,_,y]),(0,u.jsxs)(`div`,{className:`space-y-6`,children:[(0,u.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Files this Team's Agents delivered, saved with their original contents.`}),(0,u.jsxs)(`form`,{className:`flex flex-wrap items-end gap-3`,onSubmit:e=>{e.preventDefault(),v(0),g(p.trim())},children:[(0,u.jsxs)(`label`,{className:`m-0 min-w-0`,children:[`Producing Agent ID`,(0,u.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`All Agents`})]}),(0,u.jsx)(a,{variant:`ghost`,type:`submit`,children:`Filter`}),(0,u.jsx)(a,{variant:`ghost`,onClick:()=>b(e=>e+1),children:`Refresh`})]}),x&&(0,u.jsx)(`p`,{role:`alert`,className:`text-danger`,children:x}),!n&&!x&&(0,u.jsx)(`p`,{role:`status`,children:`Loading results…`}),n&&(0,u.jsxs)(u.Fragment,{children:[n.results.length===0&&(0,u.jsxs)(`p`,{children:[`No saved results`,h?` for this Agent`:` yet`,`.`]}),(0,u.jsx)(`div`,{className:`grid min-w-0 gap-4 md:grid-cols-2`,children:n.results.map(t=>{let n=e[t.agentId];return(0,u.jsxs)(`article`,{className:`min-w-0 rounded-lg border border-fawn p-4`,children:[(0,u.jsx)(c,{resultId:t.id,result:t,showPreview:!0}),(0,u.jsxs)(`p`,{className:`break-all text-sm`,children:[`Agent: `,t.agentId,` (`,n??`deleted`,`)`]}),(0,u.jsxs)(`p`,{className:`text-sm`,children:[`Saved: `,new Date(t.createdAt).toLocaleString()]}),(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[n?(0,u.jsx)(`a`,{className:`ghost-btn`,href:`/agents/${encodeURIComponent(t.agentId)}?conversation=${encodeURIComponent(t.sessionId)}`,children:`Open conversation`}):(0,u.jsx)(`span`,{className:`text-sm text-mocha`,children:`Conversation unavailable`}),(0,u.jsx)(a,{variant:`danger`,onClick:()=>w({id:t.id,name:t.name}),children:`Delete saved file`})]})]},t.id)})}),(0,u.jsxs)(`nav`,{className:`flex flex-wrap items-center gap-3`,"aria-label":`Results pagination`,children:[(0,u.jsx)(a,{variant:`ghost`,disabled:_===0,onClick:()=>v(e=>Math.max(0,e-d)),children:`Previous`}),(0,u.jsx)(`span`,{children:n.total?`${_+1}–${_+n.results.length} of ${n.total}`:`0 results`}),(0,u.jsx)(a,{variant:`ghost`,disabled:_+d>=n.total,onClick:()=>v(e=>e+d),children:`Next`})]})]}),(0,u.jsx)(r,{open:C!==null,title:`Delete saved file?`,description:`Permanently delete the saved file “${C?.name??``}”. The file in the workspace, if any, is unchanged.`,confirmLabel:`Delete saved file`,onOpenChange:e=>{e||w(null)},onConfirm:async()=>{C&&(await s(`/api/results/${encodeURIComponent(C.id)}`,{method:`DELETE`}),v(0),b(e=>e+1))}})]})}export{f as component};