groove-dev 0.27.8 → 0.27.11

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 (124) hide show
  1. package/node_modules/@groove-dev/daemon/src/api.js +460 -25
  2. package/node_modules/@groove-dev/daemon/src/index.js +7 -0
  3. package/node_modules/@groove-dev/daemon/src/introducer.js +72 -4
  4. package/node_modules/@groove-dev/daemon/src/journalist.js +66 -11
  5. package/node_modules/@groove-dev/daemon/src/process.js +67 -7
  6. package/node_modules/@groove-dev/daemon/src/registry.js +1 -1
  7. package/node_modules/@groove-dev/daemon/src/repo-import.js +541 -0
  8. package/node_modules/@groove-dev/daemon/src/rotator.js +28 -1
  9. package/node_modules/@groove-dev/daemon/src/supervisor.js +2 -1
  10. package/node_modules/@groove-dev/daemon/src/tunnel-manager.js +504 -0
  11. package/node_modules/@groove-dev/daemon/src/validate.js +13 -0
  12. package/node_modules/@groove-dev/daemon/test/journalist.test.js +5 -4
  13. package/node_modules/@groove-dev/daemon/test/rotator.test.js +4 -1
  14. package/node_modules/@groove-dev/gui/dist/assets/index-BE6lYcd7.css +1 -0
  15. package/node_modules/@groove-dev/gui/dist/assets/index-zdzOLAZM.js +677 -0
  16. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  17. package/node_modules/@groove-dev/gui/src/app.css +14 -0
  18. package/node_modules/@groove-dev/gui/src/app.jsx +13 -0
  19. package/node_modules/@groove-dev/gui/src/components/agents/agent-config.jsx +130 -1
  20. package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +2 -2
  21. package/node_modules/@groove-dev/gui/src/components/agents/agent-mdfiles.jsx +43 -1
  22. package/node_modules/@groove-dev/gui/src/components/agents/spawn-wizard.jsx +141 -1
  23. package/node_modules/@groove-dev/gui/src/components/dashboard/fleet-panel.jsx +3 -3
  24. package/node_modules/@groove-dev/gui/src/components/dashboard/intel-panel.jsx +4 -4
  25. package/node_modules/@groove-dev/gui/src/components/dashboard/routing-chart.jsx +3 -3
  26. package/node_modules/@groove-dev/gui/src/components/dashboard/team-burn-panel.jsx +1 -1
  27. package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +4 -4
  28. package/node_modules/@groove-dev/gui/src/components/layout/app-shell.jsx +7 -1
  29. package/node_modules/@groove-dev/gui/src/components/layout/breadcrumb-bar.jsx +26 -8
  30. package/node_modules/@groove-dev/gui/src/components/layout/command-palette.jsx +14 -4
  31. package/node_modules/@groove-dev/gui/src/components/layout/status-bar.jsx +46 -11
  32. package/node_modules/@groove-dev/gui/src/components/marketplace/repo-card.jsx +64 -0
  33. package/node_modules/@groove-dev/gui/src/components/marketplace/repo-import.jsx +363 -0
  34. package/node_modules/@groove-dev/gui/src/components/marketplace/repo-nuke-dialog.jsx +68 -0
  35. package/node_modules/@groove-dev/gui/src/components/pro/pro-gate.jsx +22 -0
  36. package/node_modules/@groove-dev/gui/src/components/pro/upgrade-card.jsx +48 -0
  37. package/node_modules/@groove-dev/gui/src/components/settings/quick-connect.jsx +129 -0
  38. package/node_modules/@groove-dev/gui/src/components/settings/remote-server-card.jsx +243 -0
  39. package/node_modules/@groove-dev/gui/src/components/settings/server-dialog.jsx +192 -0
  40. package/node_modules/@groove-dev/gui/src/components/ui/approval-modal.jsx +63 -0
  41. package/node_modules/@groove-dev/gui/src/components/ui/toast.jsx +1 -1
  42. package/node_modules/@groove-dev/gui/src/lib/edition.js +4 -0
  43. package/node_modules/@groove-dev/gui/src/lib/electron.js +17 -0
  44. package/node_modules/@groove-dev/gui/src/lib/status.js +1 -0
  45. package/node_modules/@groove-dev/gui/src/stores/groove.js +139 -6
  46. package/node_modules/@groove-dev/gui/src/views/dashboard.jsx +38 -39
  47. package/node_modules/@groove-dev/gui/src/views/marketplace.jsx +82 -0
  48. package/node_modules/@groove-dev/gui/src/views/settings.jsx +66 -0
  49. package/node_modules/@groove-dev/gui/vite.config.js +3 -0
  50. package/package.json +7 -2
  51. package/packages/daemon/src/api.js +460 -25
  52. package/packages/daemon/src/index.js +7 -0
  53. package/packages/daemon/src/introducer.js +72 -4
  54. package/packages/daemon/src/journalist.js +66 -11
  55. package/packages/daemon/src/process.js +67 -7
  56. package/packages/daemon/src/registry.js +1 -1
  57. package/packages/daemon/src/repo-import.js +541 -0
  58. package/packages/daemon/src/rotator.js +28 -1
  59. package/packages/daemon/src/supervisor.js +2 -1
  60. package/packages/daemon/src/tunnel-manager.js +504 -0
  61. package/packages/daemon/src/validate.js +13 -0
  62. package/packages/gui/dist/assets/index-BE6lYcd7.css +1 -0
  63. package/packages/gui/dist/assets/index-zdzOLAZM.js +677 -0
  64. package/packages/gui/dist/index.html +2 -2
  65. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +3 -3
  66. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +2 -2
  67. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +3 -3
  68. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +5 -5
  69. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +3 -3
  70. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +1 -1
  71. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +5 -5
  72. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +3 -3
  73. package/packages/gui/node_modules/.vite/deps/_metadata.json +53 -53
  74. package/packages/gui/node_modules/.vite/deps/{chunk-WYSQD5ZG.js → chunk-DH7AESXW.js} +2 -2
  75. package/packages/gui/node_modules/.vite/deps/{chunk-KXLIKZFX.js → chunk-GFE3G4IN.js} +133 -133
  76. package/packages/gui/node_modules/.vite/deps/chunk-GFE3G4IN.js.map +7 -0
  77. package/packages/gui/node_modules/.vite/deps/{chunk-3LBP22MX.js → chunk-LKZVMLRH.js} +6 -6
  78. package/packages/gui/node_modules/.vite/deps/{chunk-J6DMOQWP.js → chunk-MCVDVNE5.js} +2 -2
  79. package/packages/gui/node_modules/.vite/deps/{chunk-3Q7HT7ZF.js → chunk-SPKVQGZX.js} +6 -6
  80. package/packages/gui/src/app.css +14 -0
  81. package/packages/gui/src/app.jsx +13 -0
  82. package/packages/gui/src/components/agents/agent-config.jsx +130 -1
  83. package/packages/gui/src/components/agents/agent-feed.jsx +2 -2
  84. package/packages/gui/src/components/agents/agent-mdfiles.jsx +43 -1
  85. package/packages/gui/src/components/agents/spawn-wizard.jsx +141 -1
  86. package/packages/gui/src/components/dashboard/fleet-panel.jsx +3 -3
  87. package/packages/gui/src/components/dashboard/intel-panel.jsx +4 -4
  88. package/packages/gui/src/components/dashboard/routing-chart.jsx +3 -3
  89. package/packages/gui/src/components/dashboard/team-burn-panel.jsx +1 -1
  90. package/packages/gui/src/components/layout/activity-bar.jsx +4 -4
  91. package/packages/gui/src/components/layout/app-shell.jsx +7 -1
  92. package/packages/gui/src/components/layout/breadcrumb-bar.jsx +26 -8
  93. package/packages/gui/src/components/layout/command-palette.jsx +14 -4
  94. package/packages/gui/src/components/layout/status-bar.jsx +46 -11
  95. package/packages/gui/src/components/marketplace/repo-card.jsx +64 -0
  96. package/packages/gui/src/components/marketplace/repo-import.jsx +363 -0
  97. package/packages/gui/src/components/marketplace/repo-nuke-dialog.jsx +68 -0
  98. package/packages/gui/src/components/pro/pro-gate.jsx +22 -0
  99. package/packages/gui/src/components/pro/upgrade-card.jsx +48 -0
  100. package/packages/gui/src/components/settings/quick-connect.jsx +129 -0
  101. package/packages/gui/src/components/settings/remote-server-card.jsx +243 -0
  102. package/packages/gui/src/components/settings/server-dialog.jsx +192 -0
  103. package/packages/gui/src/components/ui/approval-modal.jsx +63 -0
  104. package/packages/gui/src/components/ui/toast.jsx +1 -1
  105. package/packages/gui/src/lib/edition.js +4 -0
  106. package/packages/gui/src/lib/electron.js +17 -0
  107. package/packages/gui/src/lib/status.js +1 -0
  108. package/packages/gui/src/stores/groove.js +139 -6
  109. package/packages/gui/src/views/dashboard.jsx +38 -39
  110. package/packages/gui/src/views/marketplace.jsx +82 -0
  111. package/packages/gui/src/views/settings.jsx +66 -0
  112. package/packages/gui/vite.config.js +3 -0
  113. package/integrations/FEDERATION_PLAN.md +0 -583
  114. package/integrations/VOICE_PLAN.md +0 -232
  115. package/node_modules/@groove-dev/gui/dist/assets/index-CwmR3-HY.css +0 -1
  116. package/node_modules/@groove-dev/gui/dist/assets/index-DiCjVtQL.js +0 -652
  117. package/packages/gui/dist/assets/index-CwmR3-HY.css +0 -1
  118. package/packages/gui/dist/assets/index-DiCjVtQL.js +0 -652
  119. package/packages/gui/node_modules/.vite/deps/chunk-KXLIKZFX.js.map +0 -7
  120. package/test-slack.mjs +0 -28
  121. /package/packages/gui/node_modules/.vite/deps/{chunk-WYSQD5ZG.js.map → chunk-DH7AESXW.js.map} +0 -0
  122. /package/packages/gui/node_modules/.vite/deps/{chunk-3LBP22MX.js.map → chunk-LKZVMLRH.js.map} +0 -0
  123. /package/packages/gui/node_modules/.vite/deps/{chunk-J6DMOQWP.js.map → chunk-MCVDVNE5.js.map} +0 -0
  124. /package/packages/gui/node_modules/.vite/deps/{chunk-3Q7HT7ZF.js.map → chunk-SPKVQGZX.js.map} +0 -0
@@ -0,0 +1,677 @@
1
+ import{r as WQ,c as BQ,a as v,j as s,b as ib,A as Ei,m as qi,R as ua}from"./vendor-C0HXlhrU.js";import{r as IQ,a as ob,R as HQ,H as ha,P as ma,b as FQ,u as KQ,c as JQ,d as ew,i as tw,B as nw}from"./reactflow-BQPfi37R.js";import{P as cb,N as uh,a as Mi,D as sw,b as Ns,T as zn,I as fd,s as fl,t as q,L as al,i as db,c as ub,d as fb,e as Yi,f as Sr,g as aw,h as ir,j as Pc,k as Ol,l as Od,m as lt,E as Or,n as _n,o as xa,p as Ob,q as fh,r as hb,u as lw,v as rw,w as iw,x as EO,y as ow,z as $i,A as cw,B as dw,C as uw,F as mb,G as fw,H as c1,J as Ow,K as hw,M as mw,O as xw,Q as pw,R as gw,S as bw,U as vw,V as yw,W as Sw,X as jw,Y as Qw,Z as ww}from"./codemirror-BBL3i_JW.js";import{D as kw,o as Nw,L as $w}from"./xterm--7_ns2zW.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function l(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=l(o);fetch(o.href,d)}})();var Df={exports:{}},bi={},Lf={exports:{}},Wf={};/**
2
+ * @license React
3
+ * scheduler.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var d1;function Tw(){return d1||(d1=1,(function(e){function n(T,L){var ee=T.length;T.push(L);e:for(;0<ee;){var de=ee-1>>>1,ae=T[de];if(0<o(ae,L))T[de]=L,T[ee]=ae,ee=de;else break e}}function l(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],ee=T.pop();if(ee!==L){T[0]=ee;e:for(var de=0,ae=T.length,ye=ae>>>1;de<ye;){var Se=2*(de+1)-1,ge=T[Se],je=Se+1,ze=T[je];if(0>o(ge,ee))je<ae&&0>o(ze,ge)?(T[de]=ze,T[je]=ee,de=je):(T[de]=ge,T[Se]=ee,de=Se);else if(je<ae&&0>o(ze,ee))T[de]=ze,T[je]=ee,de=je;else break e}}return L}function o(T,L){var ee=T.sortIndex-L.sortIndex;return ee!==0?ee:T.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;e.unstable_now=function(){return d.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],x=[],g=1,p=null,b=3,y=!1,j=!1,w=!1,k=!1,Q=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function R(T){for(var L=l(x);L!==null;){if(L.callback===null)r(x);else if(L.startTime<=T)r(x),L.sortIndex=L.expirationTime,n(h,L);else break;L=l(x)}}function Y(T){if(w=!1,R(T),!j)if(l(h)!==null)j=!0,X||(X=!0,A());else{var L=l(x);L!==null&&V(Y,L.startTime-T)}}var X=!1,z=-1,$=5,F=-1;function Z(){return k?!0:!(e.unstable_now()-F<$)}function J(){if(k=!1,X){var T=e.unstable_now();F=T;var L=!0;try{e:{j=!1,w&&(w=!1,C(z),z=-1),y=!0;var ee=b;try{t:{for(R(T),p=l(h);p!==null&&!(p.expirationTime>T&&Z());){var de=p.callback;if(typeof de=="function"){p.callback=null,b=p.priorityLevel;var ae=de(p.expirationTime<=T);if(T=e.unstable_now(),typeof ae=="function"){p.callback=ae,R(T),L=!0;break t}p===l(h)&&r(h),R(T)}else r(h);p=l(h)}if(p!==null)L=!0;else{var ye=l(x);ye!==null&&V(Y,ye.startTime-T),L=!1}}break e}finally{p=null,b=ee,y=!1}L=void 0}}finally{L?A():X=!1}}}var A;if(typeof P=="function")A=function(){P(J)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,D=U.port2;U.port1.onmessage=J,A=function(){D.postMessage(null)}}else A=function(){Q(J,0)};function V(T,L){z=Q(function(){T(e.unstable_now())},L)}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(T){T.callback=null},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(T){switch(b){case 1:case 2:case 3:var L=3;break;default:L=b}var ee=b;b=L;try{return T()}finally{b=ee}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ee=b;b=T;try{return L()}finally{b=ee}},e.unstable_scheduleCallback=function(T,L,ee){var de=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?de+ee:de):ee=de,T){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=ee+ae,T={id:g++,callback:L,priorityLevel:T,startTime:ee,expirationTime:ae,sortIndex:-1},ee>de?(T.sortIndex=ee,n(x,T),l(h)===null&&T===l(x)&&(w?(C(z),z=-1):w=!0,V(Y,ee-de))):(T.sortIndex=ae,n(h,T),j||y||(j=!0,X||(X=!0,A()))),T},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(T){var L=b;return function(){var ee=b;b=L;try{return T.apply(this,arguments)}finally{b=ee}}}})(Wf)),Wf}var u1;function Pw(){return u1||(u1=1,Lf.exports=Tw()),Lf.exports}/**
10
+ * @license React
11
+ * react-dom-client.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var f1;function Cw(){if(f1)return bi;f1=1;var e=Pw(),n=WQ(),l=IQ();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var a=t,i=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(i=a.return),t=a.return;while(t)}return a.tag===3?i:null}function u(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function h(t){if(d(t)!==t)throw Error(r(188))}function x(t){var a=t.alternate;if(!a){if(a=d(t),a===null)throw Error(r(188));return a!==t?null:t}for(var i=t,c=a;;){var O=i.return;if(O===null)break;var m=O.alternate;if(m===null){if(c=O.return,c!==null){i=c;continue}break}if(O.child===m.child){for(m=O.child;m;){if(m===i)return h(O),t;if(m===c)return h(O),a;m=m.sibling}throw Error(r(188))}if(i.return!==c.return)i=O,c=m;else{for(var S=!1,N=O.child;N;){if(N===i){S=!0,i=O,c=m;break}if(N===c){S=!0,c=O,i=m;break}N=N.sibling}if(!S){for(N=m.child;N;){if(N===i){S=!0,i=m,c=O;break}if(N===c){S=!0,c=m,i=O;break}N=N.sibling}if(!S)throw Error(r(189))}}if(i.alternate!==c)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?t:a}function g(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=g(t),a!==null)return a;t=t.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),P=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function A(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var U=Symbol.for("react.client.reference");function D(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===U?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case Q:return"Profiler";case k:return"StrictMode";case Y:return"Suspense";case X:return"SuspenseList";case F:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case j:return"Portal";case P:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case R:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return a=t.displayName||null,a!==null?a:D(t.type)||"Memo";case $:a=t._payload,t=t._init;try{return D(t(a))}catch{}}return null}var V=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},de=[],ae=-1;function ye(t){return{current:t}}function Se(t){0>ae||(t.current=de[ae],de[ae]=null,ae--)}function ge(t,a){ae++,de[ae]=t.current,t.current=a}var je=ye(null),ze=ye(null),ke=ye(null),it=ye(null);function St(t,a){switch(ge(ke,a),ge(ze,t),ge(je,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?zg(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=zg(a),t=Rg(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Se(je),ge(je,t)}function Ee(){Se(je),Se(ze),Se(ke)}function $t(t){t.memoizedState!==null&&ge(it,t);var a=je.current,i=Rg(a,t.type);a!==i&&(ge(ze,t),ge(je,i))}function tt(t){ze.current===t&&(Se(je),Se(ze)),it.current===t&&(Se(it),mi._currentValue=ee)}var nt,jt;function dt(t){if(nt===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);nt=a&&a[1]||"",jt=-1<i.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+nt+t+jt}var kn=!1;function W(t,a){if(!t||kn)return"";kn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(te){var K=te}Reflect.construct(t,[],ie)}else{try{ie.call()}catch(te){K=te}t.call(ie.prototype)}}else{try{throw Error()}catch(te){K=te}(ie=t())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(te){if(te&&K&&typeof te.stack=="string")return[te.stack,K.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var O=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");O&&O.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),S=m[0],N=m[1];if(S&&N){var _=S.split(`
20
+ `),H=N.split(`
21
+ `);for(O=c=0;c<_.length&&!_[c].includes("DetermineComponentFrameRoot");)c++;for(;O<H.length&&!H[O].includes("DetermineComponentFrameRoot");)O++;if(c===_.length||O===H.length)for(c=_.length-1,O=H.length-1;1<=c&&0<=O&&_[c]!==H[O];)O--;for(;1<=c&&0<=O;c--,O--)if(_[c]!==H[O]){if(c!==1||O!==1)do if(c--,O--,0>O||_[c]!==H[O]){var se=`
22
+ `+_[c].replace(" at new "," at ");return t.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",t.displayName)),se}while(1<=c&&0<=O);break}}}finally{kn=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?dt(i):""}function Oe(t,a){switch(t.tag){case 26:case 27:case 5:return dt(t.type);case 16:return dt("Lazy");case 13:return t.child!==a&&a!==null?dt("Suspense Fallback"):dt("Suspense");case 19:return dt("SuspenseList");case 0:case 15:return W(t.type,!1);case 11:return W(t.type.render,!1);case 1:return W(t.type,!0);case 31:return dt("Activity");default:return""}}function we(t){try{var a="",i=null;do a+=Oe(t,i),i=t,t=t.return;while(t);return a}catch(c){return`
23
+ Error generating stack: `+c.message+`
24
+ `+c.stack}}var Tt=Object.prototype.hasOwnProperty,Mn=e.unstable_scheduleCallback,Ot=e.unstable_cancelCallback,ne=e.unstable_shouldYield,Ne=e.unstable_requestPaint,$e=e.unstable_now,bt=e.unstable_getCurrentPriorityLevel,As=e.unstable_ImmediatePriority,Ca=e.unstable_UserBlockingPriority,_s=e.unstable_NormalPriority,$S=e.unstable_LowPriority,fm=e.unstable_IdlePriority,TS=e.log,PS=e.unstable_setDisableYieldValue,Nr=null,Lt=null;function Xs(t){if(typeof TS=="function"&&PS(t),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Nr,t)}catch{}}var Wt=Math.clz32?Math.clz32:RS,CS=Math.log,zS=Math.LN2;function RS(t){return t>>>=0,t===0?32:31-(CS(t)/zS|0)|0}var Ii=256,Hi=262144,Fi=4194304;function za(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ki(t,a,i){var c=t.pendingLanes;if(c===0)return 0;var O=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var N=c&134217727;return N!==0?(c=N&~m,c!==0?O=za(c):(S&=N,S!==0?O=za(S):i||(i=N&~t,i!==0&&(O=za(i))))):(N=c&~m,N!==0?O=za(N):S!==0?O=za(S):i||(i=c&~t,i!==0&&(O=za(i)))),O===0?0:a!==0&&a!==O&&(a&m)===0&&(m=O&-O,i=a&-a,m>=i||m===32&&(i&4194048)!==0)?a:O}function $r(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function AS(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Om(){var t=Fi;return Fi<<=1,(Fi&62914560)===0&&(Fi=4194304),t}function zd(t){for(var a=[],i=0;31>i;i++)a.push(t);return a}function Tr(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function _S(t,a,i,c,O,m){var S=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var N=t.entanglements,_=t.expirationTimes,H=t.hiddenUpdates;for(i=S&~i;0<i;){var se=31-Wt(i),ie=1<<se;N[se]=0,_[se]=-1;var K=H[se];if(K!==null)for(H[se]=null,se=0;se<K.length;se++){var te=K[se];te!==null&&(te.lane&=-536870913)}i&=~ie}c!==0&&hm(t,c,0),m!==0&&O===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~a))}function hm(t,a,i){t.pendingLanes|=a,t.suspendedLanes&=~a;var c=31-Wt(a);t.entangledLanes|=a,t.entanglements[c]=t.entanglements[c]|1073741824|i&261930}function mm(t,a){var i=t.entangledLanes|=a;for(t=t.entanglements;i;){var c=31-Wt(i),O=1<<c;O&a|t[c]&a&&(t[c]|=a),i&=~O}}function xm(t,a){var i=a&-a;return i=(i&42)!==0?1:Rd(i),(i&(t.suspendedLanes|a))!==0?0:i}function Rd(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ad(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function pm(){var t=L.p;return t!==0?t:(t=window.event,t===void 0?32:n1(t.type))}function gm(t,a){var i=L.p;try{return L.p=t,a()}finally{L.p=i}}var Zs=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Zs,Zt="__reactProps$"+Zs,pl="__reactContainer$"+Zs,_d="__reactEvents$"+Zs,XS="__reactListeners$"+Zs,ZS="__reactHandles$"+Zs,bm="__reactResources$"+Zs,Pr="__reactMarker$"+Zs;function Xd(t){delete t[Pt],delete t[Zt],delete t[_d],delete t[XS],delete t[ZS]}function gl(t){var a=t[Pt];if(a)return a;for(var i=t.parentNode;i;){if(a=i[pl]||i[Pt]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(t=Mg(t);t!==null;){if(i=t[Pt])return i;t=Mg(t)}return a}t=i,i=t.parentNode}return null}function bl(t){if(t=t[Pt]||t[pl]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function Cr(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function vl(t){var a=t[bm];return a||(a=t[bm]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Qt(t){t[Pr]=!0}var vm=new Set,ym={};function Ra(t,a){yl(t,a),yl(t+"Capture",a)}function yl(t,a){for(ym[t]=a,t=0;t<a.length;t++)vm.add(a[t])}var ES=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Sm={},jm={};function qS(t){return Tt.call(jm,t)?!0:Tt.call(Sm,t)?!1:ES.test(t)?jm[t]=!0:(Sm[t]=!0,!1)}function Ji(t,a,i){if(qS(a))if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+i)}}function eo(t,a,i){if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+i)}}function ts(t,a,i,c){if(c===null)t.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(a,i,""+c)}}function on(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Qm(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function MS(t,a,i){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var O=c.get,m=c.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return O.call(this)},set:function(S){i=""+S,m.call(this,S)}}),Object.defineProperty(t,a,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Zd(t){if(!t._valueTracker){var a=Qm(t)?"checked":"value";t._valueTracker=MS(t,a,""+t[a])}}function wm(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var i=a.getValue(),c="";return t&&(c=Qm(t)?t.checked?"true":"false":t.value),t=c,t!==i?(a.setValue(t),!0):!1}function to(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var YS=/[\n"\\]/g;function cn(t){return t.replace(YS,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ed(t,a,i,c,O,m,S,N){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),a!=null?S==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+on(a)):t.value!==""+on(a)&&(t.value=""+on(a)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),a!=null?qd(t,S,on(a)):i!=null?qd(t,S,on(i)):c!=null&&t.removeAttribute("value"),O==null&&m!=null&&(t.defaultChecked=!!m),O!=null&&(t.checked=O&&typeof O!="function"&&typeof O!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.name=""+on(N):t.removeAttribute("name")}function km(t,a,i,c,O,m,S,N){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Zd(t);return}i=i!=null?""+on(i):"",a=a!=null?""+on(a):i,N||a===t.value||(t.value=a),t.defaultValue=a}c=c??O,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=N?t.checked:!!c,t.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),Zd(t)}function qd(t,a,i){a==="number"&&to(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Sl(t,a,i,c){if(t=t.options,a){a={};for(var O=0;O<i.length;O++)a["$"+i[O]]=!0;for(i=0;i<t.length;i++)O=a.hasOwnProperty("$"+t[i].value),t[i].selected!==O&&(t[i].selected=O),O&&c&&(t[i].defaultSelected=!0)}else{for(i=""+on(i),a=null,O=0;O<t.length;O++){if(t[O].value===i){t[O].selected=!0,c&&(t[O].defaultSelected=!0);return}a!==null||t[O].disabled||(a=t[O])}a!==null&&(a.selected=!0)}}function Nm(t,a,i){if(a!=null&&(a=""+on(a),a!==t.value&&(t.value=a),i==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=i!=null?""+on(i):""}function $m(t,a,i,c){if(a==null){if(c!=null){if(i!=null)throw Error(r(92));if(V(c)){if(1<c.length)throw Error(r(93));c=c[0]}i=c}i==null&&(i=""),a=i}i=on(a),t.defaultValue=i,c=t.textContent,c===i&&c!==""&&c!==null&&(t.value=c),Zd(t)}function jl(t,a){if(a){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=a;return}}t.textContent=a}var US=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Tm(t,a,i){var c=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":c?t.setProperty(a,i):typeof i!="number"||i===0||US.has(a)?a==="float"?t.cssFloat=i:t[a]=(""+i).trim():t[a]=i+"px"}function Pm(t,a,i){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,i!=null){for(var c in i)!i.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var O in a)c=a[O],a.hasOwnProperty(O)&&i[O]!==c&&Tm(t,O,c)}else for(var m in a)a.hasOwnProperty(m)&&Tm(t,m,a[m])}function Md(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var VS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),GS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function no(t){return GS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ns(){}var Yd=null;function Ud(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ql=null,wl=null;function Cm(t){var a=bl(t);if(a&&(t=a.stateNode)){var i=t[Zt]||null;e:switch(t=a.stateNode,a.type){case"input":if(Ed(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+cn(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var c=i[a];if(c!==t&&c.form===t.form){var O=c[Zt]||null;if(!O)throw Error(r(90));Ed(c,O.value,O.defaultValue,O.defaultValue,O.checked,O.defaultChecked,O.type,O.name)}}for(a=0;a<i.length;a++)c=i[a],c.form===t.form&&wm(c)}break e;case"textarea":Nm(t,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&Sl(t,!!i.multiple,a,!1)}}}var Vd=!1;function zm(t,a,i){if(Vd)return t(a,i);Vd=!0;try{var c=t(a);return c}finally{if(Vd=!1,(Ql!==null||wl!==null)&&(Go(),Ql&&(a=Ql,t=wl,wl=Ql=null,Cm(a),t)))for(a=0;a<t.length;a++)Cm(t[a])}}function zr(t,a){var i=t.stateNode;if(i===null)return null;var c=i[Zt]||null;if(c===null)return null;i=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(r(231,a,typeof i));return i}var ss=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(ss)try{var Rr={};Object.defineProperty(Rr,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{Gd=!1}var Es=null,Dd=null,so=null;function Rm(){if(so)return so;var t,a=Dd,i=a.length,c,O="value"in Es?Es.value:Es.textContent,m=O.length;for(t=0;t<i&&a[t]===O[t];t++);var S=i-t;for(c=1;c<=S&&a[i-c]===O[m-c];c++);return so=O.slice(t,1<c?1-c:void 0)}function ao(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function lo(){return!0}function Am(){return!1}function Et(t){function a(i,c,O,m,S){this._reactName=i,this._targetInst=O,this.type=c,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var N in t)t.hasOwnProperty(N)&&(i=t[N],this[N]=i?i(m):m[N]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?lo:Am,this.isPropagationStopped=Am,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),a}var Aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=Et(Aa),Ar=p({},Aa,{view:0,detail:0}),DS=Et(Ar),Ld,Wd,_r,io=p({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Id,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==_r&&(_r&&t.type==="mousemove"?(Ld=t.screenX-_r.screenX,Wd=t.screenY-_r.screenY):Wd=Ld=0,_r=t),Ld)},movementY:function(t){return"movementY"in t?t.movementY:Wd}}),_m=Et(io),LS=p({},io,{dataTransfer:0}),WS=Et(LS),BS=p({},Ar,{relatedTarget:0}),Bd=Et(BS),IS=p({},Aa,{animationName:0,elapsedTime:0,pseudoElement:0}),HS=Et(IS),FS=p({},Aa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),KS=Et(FS),JS=p({},Aa,{data:0}),Xm=Et(JS),ej={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sj(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=nj[t])?!!a[t]:!1}function Id(){return sj}var aj=p({},Ar,{key:function(t){if(t.key){var a=ej[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=ao(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?tj[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Id,charCode:function(t){return t.type==="keypress"?ao(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ao(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),lj=Et(aj),rj=p({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zm=Et(rj),ij=p({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Id}),oj=Et(ij),cj=p({},Aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),dj=Et(cj),uj=p({},io,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),fj=Et(uj),Oj=p({},Aa,{newState:0,oldState:0}),hj=Et(Oj),mj=[9,13,27,32],Hd=ss&&"CompositionEvent"in window,Xr=null;ss&&"documentMode"in document&&(Xr=document.documentMode);var xj=ss&&"TextEvent"in window&&!Xr,Em=ss&&(!Hd||Xr&&8<Xr&&11>=Xr),qm=" ",Mm=!1;function Ym(t,a){switch(t){case"keyup":return mj.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Um(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var kl=!1;function pj(t,a){switch(t){case"compositionend":return Um(a);case"keypress":return a.which!==32?null:(Mm=!0,qm);case"textInput":return t=a.data,t===qm&&Mm?null:t;default:return null}}function gj(t,a){if(kl)return t==="compositionend"||!Hd&&Ym(t,a)?(t=Rm(),so=Dd=Es=null,kl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Em&&a.locale!=="ko"?null:a.data;default:return null}}var bj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vm(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!bj[t.type]:a==="textarea"}function Gm(t,a,i,c){Ql?wl?wl.push(c):wl=[c]:Ql=c,a=Fo(a,"onChange"),0<a.length&&(i=new ro("onChange","change",null,i,c),t.push({event:i,listeners:a}))}var Zr=null,Er=null;function vj(t){kg(t,0)}function oo(t){var a=Cr(t);if(wm(a))return t}function Dm(t,a){if(t==="change")return a}var Lm=!1;if(ss){var Fd;if(ss){var Kd="oninput"in document;if(!Kd){var Wm=document.createElement("div");Wm.setAttribute("oninput","return;"),Kd=typeof Wm.oninput=="function"}Fd=Kd}else Fd=!1;Lm=Fd&&(!document.documentMode||9<document.documentMode)}function Bm(){Zr&&(Zr.detachEvent("onpropertychange",Im),Er=Zr=null)}function Im(t){if(t.propertyName==="value"&&oo(Er)){var a=[];Gm(a,Er,t,Ud(t)),zm(vj,a)}}function yj(t,a,i){t==="focusin"?(Bm(),Zr=a,Er=i,Zr.attachEvent("onpropertychange",Im)):t==="focusout"&&Bm()}function Sj(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return oo(Er)}function jj(t,a){if(t==="click")return oo(a)}function Qj(t,a){if(t==="input"||t==="change")return oo(a)}function wj(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var Bt=typeof Object.is=="function"?Object.is:wj;function qr(t,a){if(Bt(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var i=Object.keys(t),c=Object.keys(a);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var O=i[c];if(!Tt.call(a,O)||!Bt(t[O],a[O]))return!1}return!0}function Hm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Fm(t,a){var i=Hm(t);t=0;for(var c;i;){if(i.nodeType===3){if(c=t+i.textContent.length,t<=a&&c>=a)return{node:i,offset:a-t};t=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Hm(i)}}function Km(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Km(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Jm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=to(t.document);a instanceof t.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)t=a.contentWindow;else break;a=to(t.document)}return a}function Jd(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var kj=ss&&"documentMode"in document&&11>=document.documentMode,Nl=null,eu=null,Mr=null,tu=!1;function ex(t,a,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;tu||Nl==null||Nl!==to(c)||(c=Nl,"selectionStart"in c&&Jd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Mr&&qr(Mr,c)||(Mr=c,c=Fo(eu,"onSelect"),0<c.length&&(a=new ro("onSelect","select",null,a,i),t.push({event:a,listeners:c}),a.target=Nl)))}function _a(t,a){var i={};return i[t.toLowerCase()]=a.toLowerCase(),i["Webkit"+t]="webkit"+a,i["Moz"+t]="moz"+a,i}var $l={animationend:_a("Animation","AnimationEnd"),animationiteration:_a("Animation","AnimationIteration"),animationstart:_a("Animation","AnimationStart"),transitionrun:_a("Transition","TransitionRun"),transitionstart:_a("Transition","TransitionStart"),transitioncancel:_a("Transition","TransitionCancel"),transitionend:_a("Transition","TransitionEnd")},nu={},tx={};ss&&(tx=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function Xa(t){if(nu[t])return nu[t];if(!$l[t])return t;var a=$l[t],i;for(i in a)if(a.hasOwnProperty(i)&&i in tx)return nu[t]=a[i];return t}var nx=Xa("animationend"),sx=Xa("animationiteration"),ax=Xa("animationstart"),Nj=Xa("transitionrun"),$j=Xa("transitionstart"),Tj=Xa("transitioncancel"),lx=Xa("transitionend"),rx=new Map,su="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");su.push("scrollEnd");function Nn(t,a){rx.set(t,a),Ra(a,[t])}var co=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},dn=[],Tl=0,au=0;function uo(){for(var t=Tl,a=au=Tl=0;a<t;){var i=dn[a];dn[a++]=null;var c=dn[a];dn[a++]=null;var O=dn[a];dn[a++]=null;var m=dn[a];if(dn[a++]=null,c!==null&&O!==null){var S=c.pending;S===null?O.next=O:(O.next=S.next,S.next=O),c.pending=O}m!==0&&ix(i,O,m)}}function fo(t,a,i,c){dn[Tl++]=t,dn[Tl++]=a,dn[Tl++]=i,dn[Tl++]=c,au|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function lu(t,a,i,c){return fo(t,a,i,c),Oo(t)}function Za(t,a){return fo(t,null,null,a),Oo(t)}function ix(t,a,i){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i);for(var O=!1,m=t.return;m!==null;)m.childLanes|=i,c=m.alternate,c!==null&&(c.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(O=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,O&&a!==null&&(O=31-Wt(i),t=m.hiddenUpdates,c=t[O],c===null?t[O]=[a]:c.push(a),a.lane=i|536870912),m):null}function Oo(t){if(50<oi)throw oi=0,mf=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var Pl={};function Pj(t,a,i,c){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(t,a,i,c){return new Pj(t,a,i,c)}function ru(t){return t=t.prototype,!(!t||!t.isReactComponent)}function as(t,a){var i=t.alternate;return i===null?(i=It(t.tag,a,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=a,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,a=t.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function ox(t,a){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,a=i.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function ho(t,a,i,c,O,m){var S=0;if(c=t,typeof t=="function")ru(t)&&(S=1);else if(typeof t=="string")S=_Q(t,i,je.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case F:return t=It(31,i,a,O),t.elementType=F,t.lanes=m,t;case w:return Ea(i.children,O,m,a);case k:S=8,O|=24;break;case Q:return t=It(12,i,a,O|2),t.elementType=Q,t.lanes=m,t;case Y:return t=It(13,i,a,O),t.elementType=Y,t.lanes=m,t;case X:return t=It(19,i,a,O),t.elementType=X,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case P:S=10;break e;case C:S=9;break e;case R:S=11;break e;case z:S=14;break e;case $:S=16,c=null;break e}S=29,i=Error(r(130,t===null?"null":typeof t,"")),c=null}return a=It(S,i,a,O),a.elementType=t,a.type=c,a.lanes=m,a}function Ea(t,a,i,c){return t=It(7,t,c,a),t.lanes=i,t}function iu(t,a,i){return t=It(6,t,null,a),t.lanes=i,t}function cx(t){var a=It(18,null,null,0);return a.stateNode=t,a}function ou(t,a,i){return a=It(4,t.children!==null?t.children:[],t.key,a),a.lanes=i,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var dx=new WeakMap;function un(t,a){if(typeof t=="object"&&t!==null){var i=dx.get(t);return i!==void 0?i:(a={value:t,source:a,stack:we(a)},dx.set(t,a),a)}return{value:t,source:a,stack:we(a)}}var Cl=[],zl=0,mo=null,Yr=0,fn=[],On=0,qs=null,Yn=1,Un="";function ls(t,a){Cl[zl++]=Yr,Cl[zl++]=mo,mo=t,Yr=a}function ux(t,a,i){fn[On++]=Yn,fn[On++]=Un,fn[On++]=qs,qs=t;var c=Yn;t=Un;var O=32-Wt(c)-1;c&=~(1<<O),i+=1;var m=32-Wt(a)+O;if(30<m){var S=O-O%5;m=(c&(1<<S)-1).toString(32),c>>=S,O-=S,Yn=1<<32-Wt(a)+O|i<<O|c,Un=m+t}else Yn=1<<m|i<<O|c,Un=t}function cu(t){t.return!==null&&(ls(t,1),ux(t,1,0))}function du(t){for(;t===mo;)mo=Cl[--zl],Cl[zl]=null,Yr=Cl[--zl],Cl[zl]=null;for(;t===qs;)qs=fn[--On],fn[On]=null,Un=fn[--On],fn[On]=null,Yn=fn[--On],fn[On]=null}function fx(t,a){fn[On++]=Yn,fn[On++]=Un,fn[On++]=qs,Yn=a.id,Un=a.overflow,qs=t}var Ct=null,Ke=null,qe=!1,Ms=null,hn=!1,uu=Error(r(519));function Ys(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ur(un(a,t)),uu}function Ox(t){var a=t.stateNode,i=t.type,c=t.memoizedProps;switch(a[Pt]=t,a[Zt]=c,i){case"dialog":_e("cancel",a),_e("close",a);break;case"iframe":case"object":case"embed":_e("load",a);break;case"video":case"audio":for(i=0;i<di.length;i++)_e(di[i],a);break;case"source":_e("error",a);break;case"img":case"image":case"link":_e("error",a),_e("load",a);break;case"details":_e("toggle",a);break;case"input":_e("invalid",a),km(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":_e("invalid",a);break;case"textarea":_e("invalid",a),$m(a,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||c.suppressHydrationWarning===!0||Pg(a.textContent,i)?(c.popover!=null&&(_e("beforetoggle",a),_e("toggle",a)),c.onScroll!=null&&_e("scroll",a),c.onScrollEnd!=null&&_e("scrollend",a),c.onClick!=null&&(a.onclick=ns),a=!0):a=!1,a||Ys(t,!0)}function hx(t){for(Ct=t.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:Ct=Ct.return}}function Rl(t){if(t!==Ct)return!1;if(!qe)return hx(t),qe=!0,!1;var a=t.tag,i;if((i=a!==3&&a!==27)&&((i=a===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Pf(t.type,t.memoizedProps)),i=!i),i&&Ke&&Ys(t),hx(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Ke=qg(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Ke=qg(t)}else a===27?(a=Ke,ta(t.type)?(t=_f,_f=null,Ke=t):Ke=a):Ke=Ct?xn(t.stateNode.nextSibling):null;return!0}function qa(){Ke=Ct=null,qe=!1}function fu(){var t=Ms;return t!==null&&(Ut===null?Ut=t:Ut.push.apply(Ut,t),Ms=null),t}function Ur(t){Ms===null?Ms=[t]:Ms.push(t)}var Ou=ye(null),Ma=null,rs=null;function Us(t,a,i){ge(Ou,a._currentValue),a._currentValue=i}function is(t){t._currentValue=Ou.current,Se(Ou)}function hu(t,a,i){for(;t!==null;){var c=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),t===i)break;t=t.return}}function mu(t,a,i,c){var O=t.child;for(O!==null&&(O.return=t);O!==null;){var m=O.dependencies;if(m!==null){var S=O.child;m=m.firstContext;e:for(;m!==null;){var N=m;m=O;for(var _=0;_<a.length;_++)if(N.context===a[_]){m.lanes|=i,N=m.alternate,N!==null&&(N.lanes|=i),hu(m.return,i,t),c||(S=null);break e}m=N.next}}else if(O.tag===18){if(S=O.return,S===null)throw Error(r(341));S.lanes|=i,m=S.alternate,m!==null&&(m.lanes|=i),hu(S,i,t),S=null}else S=O.child;if(S!==null)S.return=O;else for(S=O;S!==null;){if(S===t){S=null;break}if(O=S.sibling,O!==null){O.return=S.return,S=O;break}S=S.return}O=S}}function Al(t,a,i,c){t=null;for(var O=a,m=!1;O!==null;){if(!m){if((O.flags&524288)!==0)m=!0;else if((O.flags&262144)!==0)break}if(O.tag===10){var S=O.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var N=O.type;Bt(O.pendingProps.value,S.value)||(t!==null?t.push(N):t=[N])}}else if(O===it.current){if(S=O.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==O.memoizedState.memoizedState&&(t!==null?t.push(mi):t=[mi])}O=O.return}t!==null&&mu(a,t,i,c),a.flags|=262144}function xo(t){for(t=t.firstContext;t!==null;){if(!Bt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ya(t){Ma=t,rs=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function zt(t){return mx(Ma,t)}function po(t,a){return Ma===null&&Ya(t),mx(t,a)}function mx(t,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},rs===null){if(t===null)throw Error(r(308));rs=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else rs=rs.next=a;return i}var Cj=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(i,c){t.push(c)}};this.abort=function(){a.aborted=!0,t.forEach(function(i){return i()})}},zj=e.unstable_scheduleCallback,Rj=e.unstable_NormalPriority,ht={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xu(){return{controller:new Cj,data:new Map,refCount:0}}function Vr(t){t.refCount--,t.refCount===0&&zj(Rj,function(){t.controller.abort()})}var Gr=null,pu=0,_l=0,Xl=null;function Aj(t,a){if(Gr===null){var i=Gr=[];pu=0,_l=yf(),Xl={status:"pending",value:void 0,then:function(c){i.push(c)}}}return pu++,a.then(xx,xx),a}function xx(){if(--pu===0&&Gr!==null){Xl!==null&&(Xl.status="fulfilled");var t=Gr;Gr=null,_l=0,Xl=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function _j(t,a){var i=[],c={status:"pending",value:null,reason:null,then:function(O){i.push(O)}};return t.then(function(){c.status="fulfilled",c.value=a;for(var O=0;O<i.length;O++)(0,i[O])(a)},function(O){for(c.status="rejected",c.reason=O,O=0;O<i.length;O++)(0,i[O])(void 0)}),c}var px=T.S;T.S=function(t,a){eg=$e(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Aj(t,a),px!==null&&px(t,a)};var Ua=ye(null);function gu(){var t=Ua.current;return t!==null?t:Fe.pooledCache}function go(t,a){a===null?ge(Ua,Ua.current):ge(Ua,a.pool)}function gx(){var t=gu();return t===null?null:{parent:ht._currentValue,pool:t}}var Zl=Error(r(460)),bu=Error(r(474)),bo=Error(r(542)),vo={then:function(){}};function bx(t){return t=t.status,t==="fulfilled"||t==="rejected"}function vx(t,a,i){switch(i=t[i],i===void 0?t.push(a):i!==a&&(a.then(ns,ns),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Sx(t),t;default:if(typeof a.status=="string")a.then(ns,ns);else{if(t=Fe,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=a,t.status="pending",t.then(function(c){if(a.status==="pending"){var O=a;O.status="fulfilled",O.value=c}},function(c){if(a.status==="pending"){var O=a;O.status="rejected",O.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Sx(t),t}throw Ga=a,Zl}}function Va(t){try{var a=t._init;return a(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ga=i,Zl):i}}var Ga=null;function yx(){if(Ga===null)throw Error(r(459));var t=Ga;return Ga=null,t}function Sx(t){if(t===Zl||t===bo)throw Error(r(483))}var El=null,Dr=0;function yo(t){var a=Dr;return Dr+=1,El===null&&(El=[]),vx(El,t,a)}function Lr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function So(t,a){throw a.$$typeof===b?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function jx(t){function a(G,E){if(t){var I=G.deletions;I===null?(G.deletions=[E],G.flags|=16):I.push(E)}}function i(G,E){if(!t)return null;for(;E!==null;)a(G,E),E=E.sibling;return null}function c(G){for(var E=new Map;G!==null;)G.key!==null?E.set(G.key,G):E.set(G.index,G),G=G.sibling;return E}function O(G,E){return G=as(G,E),G.index=0,G.sibling=null,G}function m(G,E,I){return G.index=I,t?(I=G.alternate,I!==null?(I=I.index,I<E?(G.flags|=67108866,E):I):(G.flags|=67108866,E)):(G.flags|=1048576,E)}function S(G){return t&&G.alternate===null&&(G.flags|=67108866),G}function N(G,E,I,re){return E===null||E.tag!==6?(E=iu(I,G.mode,re),E.return=G,E):(E=O(E,I),E.return=G,E)}function _(G,E,I,re){var ve=I.type;return ve===w?se(G,E,I.props.children,re,I.key):E!==null&&(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&Va(ve)===E.type)?(E=O(E,I.props),Lr(E,I),E.return=G,E):(E=ho(I.type,I.key,I.props,null,G.mode,re),Lr(E,I),E.return=G,E)}function H(G,E,I,re){return E===null||E.tag!==4||E.stateNode.containerInfo!==I.containerInfo||E.stateNode.implementation!==I.implementation?(E=ou(I,G.mode,re),E.return=G,E):(E=O(E,I.children||[]),E.return=G,E)}function se(G,E,I,re,ve){return E===null||E.tag!==7?(E=Ea(I,G.mode,re,ve),E.return=G,E):(E=O(E,I),E.return=G,E)}function ie(G,E,I){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=iu(""+E,G.mode,I),E.return=G,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case y:return I=ho(E.type,E.key,E.props,null,G.mode,I),Lr(I,E),I.return=G,I;case j:return E=ou(E,G.mode,I),E.return=G,E;case $:return E=Va(E),ie(G,E,I)}if(V(E)||A(E))return E=Ea(E,G.mode,I,null),E.return=G,E;if(typeof E.then=="function")return ie(G,yo(E),I);if(E.$$typeof===P)return ie(G,po(G,E),I);So(G,E)}return null}function K(G,E,I,re){var ve=E!==null?E.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return ve!==null?null:N(G,E,""+I,re);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case y:return I.key===ve?_(G,E,I,re):null;case j:return I.key===ve?H(G,E,I,re):null;case $:return I=Va(I),K(G,E,I,re)}if(V(I)||A(I))return ve!==null?null:se(G,E,I,re,null);if(typeof I.then=="function")return K(G,E,yo(I),re);if(I.$$typeof===P)return K(G,E,po(G,I),re);So(G,I)}return null}function te(G,E,I,re,ve){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return G=G.get(I)||null,N(E,G,""+re,ve);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return G=G.get(re.key===null?I:re.key)||null,_(E,G,re,ve);case j:return G=G.get(re.key===null?I:re.key)||null,H(E,G,re,ve);case $:return re=Va(re),te(G,E,I,re,ve)}if(V(re)||A(re))return G=G.get(I)||null,se(E,G,re,ve,null);if(typeof re.then=="function")return te(G,E,I,yo(re),ve);if(re.$$typeof===P)return te(G,E,I,po(E,re),ve);So(E,re)}return null}function he(G,E,I,re){for(var ve=null,Ye=null,pe=E,Ce=E=0,Ze=null;pe!==null&&Ce<I.length;Ce++){pe.index>Ce?(Ze=pe,pe=null):Ze=pe.sibling;var Ue=K(G,pe,I[Ce],re);if(Ue===null){pe===null&&(pe=Ze);break}t&&pe&&Ue.alternate===null&&a(G,pe),E=m(Ue,E,Ce),Ye===null?ve=Ue:Ye.sibling=Ue,Ye=Ue,pe=Ze}if(Ce===I.length)return i(G,pe),qe&&ls(G,Ce),ve;if(pe===null){for(;Ce<I.length;Ce++)pe=ie(G,I[Ce],re),pe!==null&&(E=m(pe,E,Ce),Ye===null?ve=pe:Ye.sibling=pe,Ye=pe);return qe&&ls(G,Ce),ve}for(pe=c(pe);Ce<I.length;Ce++)Ze=te(pe,G,Ce,I[Ce],re),Ze!==null&&(t&&Ze.alternate!==null&&pe.delete(Ze.key===null?Ce:Ze.key),E=m(Ze,E,Ce),Ye===null?ve=Ze:Ye.sibling=Ze,Ye=Ze);return t&&pe.forEach(function(ra){return a(G,ra)}),qe&&ls(G,Ce),ve}function Qe(G,E,I,re){if(I==null)throw Error(r(151));for(var ve=null,Ye=null,pe=E,Ce=E=0,Ze=null,Ue=I.next();pe!==null&&!Ue.done;Ce++,Ue=I.next()){pe.index>Ce?(Ze=pe,pe=null):Ze=pe.sibling;var ra=K(G,pe,Ue.value,re);if(ra===null){pe===null&&(pe=Ze);break}t&&pe&&ra.alternate===null&&a(G,pe),E=m(ra,E,Ce),Ye===null?ve=ra:Ye.sibling=ra,Ye=ra,pe=Ze}if(Ue.done)return i(G,pe),qe&&ls(G,Ce),ve;if(pe===null){for(;!Ue.done;Ce++,Ue=I.next())Ue=ie(G,Ue.value,re),Ue!==null&&(E=m(Ue,E,Ce),Ye===null?ve=Ue:Ye.sibling=Ue,Ye=Ue);return qe&&ls(G,Ce),ve}for(pe=c(pe);!Ue.done;Ce++,Ue=I.next())Ue=te(pe,G,Ce,Ue.value,re),Ue!==null&&(t&&Ue.alternate!==null&&pe.delete(Ue.key===null?Ce:Ue.key),E=m(Ue,E,Ce),Ye===null?ve=Ue:Ye.sibling=Ue,Ye=Ue);return t&&pe.forEach(function(LQ){return a(G,LQ)}),qe&&ls(G,Ce),ve}function Ie(G,E,I,re){if(typeof I=="object"&&I!==null&&I.type===w&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case y:e:{for(var ve=I.key;E!==null;){if(E.key===ve){if(ve=I.type,ve===w){if(E.tag===7){i(G,E.sibling),re=O(E,I.props.children),re.return=G,G=re;break e}}else if(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&Va(ve)===E.type){i(G,E.sibling),re=O(E,I.props),Lr(re,I),re.return=G,G=re;break e}i(G,E);break}else a(G,E);E=E.sibling}I.type===w?(re=Ea(I.props.children,G.mode,re,I.key),re.return=G,G=re):(re=ho(I.type,I.key,I.props,null,G.mode,re),Lr(re,I),re.return=G,G=re)}return S(G);case j:e:{for(ve=I.key;E!==null;){if(E.key===ve)if(E.tag===4&&E.stateNode.containerInfo===I.containerInfo&&E.stateNode.implementation===I.implementation){i(G,E.sibling),re=O(E,I.children||[]),re.return=G,G=re;break e}else{i(G,E);break}else a(G,E);E=E.sibling}re=ou(I,G.mode,re),re.return=G,G=re}return S(G);case $:return I=Va(I),Ie(G,E,I,re)}if(V(I))return he(G,E,I,re);if(A(I)){if(ve=A(I),typeof ve!="function")throw Error(r(150));return I=ve.call(I),Qe(G,E,I,re)}if(typeof I.then=="function")return Ie(G,E,yo(I),re);if(I.$$typeof===P)return Ie(G,E,po(G,I),re);So(G,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,E!==null&&E.tag===6?(i(G,E.sibling),re=O(E,I),re.return=G,G=re):(i(G,E),re=iu(I,G.mode,re),re.return=G,G=re),S(G)):i(G,E)}return function(G,E,I,re){try{Dr=0;var ve=Ie(G,E,I,re);return El=null,ve}catch(pe){if(pe===Zl||pe===bo)throw pe;var Ye=It(29,pe,null,G.mode);return Ye.lanes=re,Ye.return=G,Ye}finally{}}}var Da=jx(!0),Qx=jx(!1),Vs=!1;function vu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yu(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gs(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ds(t,a,i){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ve&2)!==0){var O=c.pending;return O===null?a.next=a:(a.next=O.next,O.next=a),c.pending=a,a=Oo(t),ix(t,null,i),a}return fo(t,c,a,i),Oo(t)}function Wr(t,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194048)!==0)){var c=a.lanes;c&=t.pendingLanes,i|=c,a.lanes=i,mm(t,i)}}function Su(t,a){var i=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var O=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?O=m=S:m=m.next=S,i=i.next}while(i!==null);m===null?O=m=a:m=m.next=a}else O=m=a;i={baseState:c.baseState,firstBaseUpdate:O,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=a:t.next=a,i.lastBaseUpdate=a}var ju=!1;function Br(){if(ju){var t=Xl;if(t!==null)throw t}}function Ir(t,a,i,c){ju=!1;var O=t.updateQueue;Vs=!1;var m=O.firstBaseUpdate,S=O.lastBaseUpdate,N=O.shared.pending;if(N!==null){O.shared.pending=null;var _=N,H=_.next;_.next=null,S===null?m=H:S.next=H,S=_;var se=t.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==S&&(N===null?se.firstBaseUpdate=H:N.next=H,se.lastBaseUpdate=_))}if(m!==null){var ie=O.baseState;S=0,se=H=_=null,N=m;do{var K=N.lane&-536870913,te=K!==N.lane;if(te?(Xe&K)===K:(c&K)===K){K!==0&&K===_l&&(ju=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var he=t,Qe=N;K=a;var Ie=i;switch(Qe.tag){case 1:if(he=Qe.payload,typeof he=="function"){ie=he.call(Ie,ie,K);break e}ie=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Qe.payload,K=typeof he=="function"?he.call(Ie,ie,K):he,K==null)break e;ie=p({},ie,K);break e;case 2:Vs=!0}}K=N.callback,K!==null&&(t.flags|=64,te&&(t.flags|=8192),te=O.callbacks,te===null?O.callbacks=[K]:te.push(K))}else te={lane:K,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(H=se=te,_=ie):se=se.next=te,S|=K;if(N=N.next,N===null){if(N=O.shared.pending,N===null)break;te=N,N=te.next,te.next=null,O.lastBaseUpdate=te,O.shared.pending=null}}while(!0);se===null&&(_=ie),O.baseState=_,O.firstBaseUpdate=H,O.lastBaseUpdate=se,m===null&&(O.shared.lanes=0),Hs|=S,t.lanes=S,t.memoizedState=ie}}function wx(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function kx(t,a){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)wx(i[t],a)}var ql=ye(null),jo=ye(0);function Nx(t,a){t=xs,ge(jo,t),ge(ql,a),xs=t|a.baseLanes}function Qu(){ge(jo,xs),ge(ql,ql.current)}function wu(){xs=jo.current,Se(ql),Se(jo)}var Ht=ye(null),mn=null;function Ls(t){var a=t.alternate;ge(ut,ut.current&1),ge(Ht,t),mn===null&&(a===null||ql.current!==null||a.memoizedState!==null)&&(mn=t)}function ku(t){ge(ut,ut.current),ge(Ht,t),mn===null&&(mn=t)}function $x(t){t.tag===22?(ge(ut,ut.current),ge(Ht,t),mn===null&&(mn=t)):Ws()}function Ws(){ge(ut,ut.current),ge(Ht,Ht.current)}function Ft(t){Se(Ht),mn===t&&(mn=null),Se(ut)}var ut=ye(0);function Qo(t){for(var a=t;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Rf(i)||Af(i)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var os=0,Pe=null,We=null,mt=null,wo=!1,Ml=!1,La=!1,ko=0,Hr=0,Yl=null,Xj=0;function ot(){throw Error(r(321))}function Nu(t,a){if(a===null)return!1;for(var i=0;i<a.length&&i<t.length;i++)if(!Bt(t[i],a[i]))return!1;return!0}function $u(t,a,i,c,O,m){return os=m,Pe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,T.H=t===null||t.memoizedState===null?up:Vu,La=!1,m=i(c,O),La=!1,Ml&&(m=Px(a,i,c,O)),Tx(t),m}function Tx(t){T.H=Jr;var a=We!==null&&We.next!==null;if(os=0,mt=We=Pe=null,wo=!1,Hr=0,Yl=null,a)throw Error(r(300));t===null||xt||(t=t.dependencies,t!==null&&xo(t)&&(xt=!0))}function Px(t,a,i,c){Pe=t;var O=0;do{if(Ml&&(Yl=null),Hr=0,Ml=!1,25<=O)throw Error(r(301));if(O+=1,mt=We=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}T.H=fp,m=a(i,c)}while(Ml);return m}function Zj(){var t=T.H,a=t.useState()[0];return a=typeof a.then=="function"?Fr(a):a,t=t.useState()[0],(We!==null?We.memoizedState:null)!==t&&(Pe.flags|=1024),a}function Tu(){var t=ko!==0;return ko=0,t}function Pu(t,a,i){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~i}function Cu(t){if(wo){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}wo=!1}os=0,mt=We=Pe=null,Ml=!1,Hr=ko=0,Yl=null}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Pe.memoizedState=mt=t:mt=mt.next=t,mt}function ft(){if(We===null){var t=Pe.alternate;t=t!==null?t.memoizedState:null}else t=We.next;var a=mt===null?Pe.memoizedState:mt.next;if(a!==null)mt=a,We=t;else{if(t===null)throw Pe.alternate===null?Error(r(467)):Error(r(310));We=t,t={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},mt===null?Pe.memoizedState=mt=t:mt=mt.next=t}return mt}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fr(t){var a=Hr;return Hr+=1,Yl===null&&(Yl=[]),t=vx(Yl,t,a),a=Pe,(mt===null?a.memoizedState:mt.next)===null&&(a=a.alternate,T.H=a===null||a.memoizedState===null?up:Vu),t}function $o(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Fr(t);if(t.$$typeof===P)return zt(t)}throw Error(r(438,String(t)))}function zu(t){var a=null,i=Pe.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var c=Pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(O){return O.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),i===null&&(i=No(),Pe.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(t),c=0;c<t;c++)i[c]=Z;return a.index++,i}function cs(t,a){return typeof a=="function"?a(t):a}function To(t){var a=ft();return Ru(a,We,t)}function Ru(t,a,i){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var O=t.baseQueue,m=c.pending;if(m!==null){if(O!==null){var S=O.next;O.next=m.next,m.next=S}a.baseQueue=O=m,c.pending=null}if(m=t.baseState,O===null)t.memoizedState=m;else{a=O.next;var N=S=null,_=null,H=a,se=!1;do{var ie=H.lane&-536870913;if(ie!==H.lane?(Xe&ie)===ie:(os&ie)===ie){var K=H.revertLane;if(K===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),ie===_l&&(se=!0);else if((os&K)===K){H=H.next,K===_l&&(se=!0);continue}else ie={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(N=_=ie,S=m):_=_.next=ie,Pe.lanes|=K,Hs|=K;ie=H.action,La&&i(m,ie),m=H.hasEagerState?H.eagerState:i(m,ie)}else K={lane:ie,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(N=_=K,S=m):_=_.next=K,Pe.lanes|=ie,Hs|=ie;H=H.next}while(H!==null&&H!==a);if(_===null?S=m:_.next=N,!Bt(m,t.memoizedState)&&(xt=!0,se&&(i=Xl,i!==null)))throw i;t.memoizedState=m,t.baseState=S,t.baseQueue=_,c.lastRenderedState=m}return O===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Au(t){var a=ft(),i=a.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=t;var c=i.dispatch,O=i.pending,m=a.memoizedState;if(O!==null){i.pending=null;var S=O=O.next;do m=t(m,S.action),S=S.next;while(S!==O);Bt(m,a.memoizedState)||(xt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),i.lastRenderedState=m}return[m,c]}function Cx(t,a,i){var c=Pe,O=ft(),m=qe;if(m){if(i===void 0)throw Error(r(407));i=i()}else i=a();var S=!Bt((We||O).memoizedState,i);if(S&&(O.memoizedState=i,xt=!0),O=O.queue,Zu(Ax.bind(null,c,O,t),[t]),O.getSnapshot!==a||S||mt!==null&&mt.memoizedState.tag&1){if(c.flags|=2048,Ul(9,{destroy:void 0},Rx.bind(null,c,O,i,a),null),Fe===null)throw Error(r(349));m||(os&127)!==0||zx(c,a,i)}return i}function zx(t,a,i){t.flags|=16384,t={getSnapshot:a,value:i},a=Pe.updateQueue,a===null?(a=No(),Pe.updateQueue=a,a.stores=[t]):(i=a.stores,i===null?a.stores=[t]:i.push(t))}function Rx(t,a,i,c){a.value=i,a.getSnapshot=c,_x(a)&&Xx(t)}function Ax(t,a,i){return i(function(){_x(a)&&Xx(t)})}function _x(t){var a=t.getSnapshot;t=t.value;try{var i=a();return!Bt(t,i)}catch{return!0}}function Xx(t){var a=Za(t,2);a!==null&&Vt(a,t,2)}function _u(t){var a=Xt();if(typeof t=="function"){var i=t;if(t=i(),La){Xs(!0);try{i()}finally{Xs(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:t},a}function Zx(t,a,i,c){return t.baseState=i,Ru(t,We,typeof c=="function"?c:cs)}function Ej(t,a,i,c,O){if(zo(t))throw Error(r(485));if(t=a.action,t!==null){var m={payload:O,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};T.T!==null?i(!0):m.isTransition=!1,c(m),i=a.pending,i===null?(m.next=a.pending=m,Ex(a,m)):(m.next=i.next,a.pending=i.next=m)}}function Ex(t,a){var i=a.action,c=a.payload,O=t.state;if(a.isTransition){var m=T.T,S={};T.T=S;try{var N=i(O,c),_=T.S;_!==null&&_(S,N),qx(t,a,N)}catch(H){Xu(t,a,H)}finally{m!==null&&S.types!==null&&(m.types=S.types),T.T=m}}else try{m=i(O,c),qx(t,a,m)}catch(H){Xu(t,a,H)}}function qx(t,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){Mx(t,a,c)},function(c){return Xu(t,a,c)}):Mx(t,a,i)}function Mx(t,a,i){a.status="fulfilled",a.value=i,Yx(a),t.state=i,a=t.pending,a!==null&&(i=a.next,i===a?t.pending=null:(i=i.next,a.next=i,Ex(t,i)))}function Xu(t,a,i){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=i,Yx(a),a=a.next;while(a!==c)}t.action=null}function Yx(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Ux(t,a){return a}function Vx(t,a){if(qe){var i=Fe.formState;if(i!==null){e:{var c=Pe;if(qe){if(Ke){t:{for(var O=Ke,m=hn;O.nodeType!==8;){if(!m){O=null;break t}if(O=xn(O.nextSibling),O===null){O=null;break t}}m=O.data,O=m==="F!"||m==="F"?O:null}if(O){Ke=xn(O.nextSibling),c=O.data==="F!";break e}}Ys(c)}c=!1}c&&(a=i[0])}}return i=Xt(),i.memoizedState=i.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ux,lastRenderedState:a},i.queue=c,i=op.bind(null,Pe,c),c.dispatch=i,c=_u(!1),m=Uu.bind(null,Pe,!1,c.queue),c=Xt(),O={state:a,dispatch:null,action:t,pending:null},c.queue=O,i=Ej.bind(null,Pe,O,m,i),O.dispatch=i,c.memoizedState=t,[a,i,!1]}function Gx(t){var a=ft();return Dx(a,We,t)}function Dx(t,a,i){if(a=Ru(t,a,Ux)[0],t=To(cs)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Fr(a)}catch(S){throw S===Zl?bo:S}else c=a;a=ft();var O=a.queue,m=O.dispatch;return i!==a.memoizedState&&(Pe.flags|=2048,Ul(9,{destroy:void 0},qj.bind(null,O,i),null)),[c,m,t]}function qj(t,a){t.action=a}function Lx(t){var a=ft(),i=We;if(i!==null)return Dx(a,i,t);ft(),a=a.memoizedState,i=ft();var c=i.queue.dispatch;return i.memoizedState=t,[a,c,!1]}function Ul(t,a,i,c){return t={tag:t,create:i,deps:c,inst:a,next:null},a=Pe.updateQueue,a===null&&(a=No(),Pe.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=t.next=t:(c=i.next,i.next=t,t.next=c,a.lastEffect=t),t}function Wx(){return ft().memoizedState}function Po(t,a,i,c){var O=Xt();Pe.flags|=t,O.memoizedState=Ul(1|a,{destroy:void 0},i,c===void 0?null:c)}function Co(t,a,i,c){var O=ft();c=c===void 0?null:c;var m=O.memoizedState.inst;We!==null&&c!==null&&Nu(c,We.memoizedState.deps)?O.memoizedState=Ul(a,m,i,c):(Pe.flags|=t,O.memoizedState=Ul(1|a,m,i,c))}function Bx(t,a){Po(8390656,8,t,a)}function Zu(t,a){Co(2048,8,t,a)}function Mj(t){Pe.flags|=4;var a=Pe.updateQueue;if(a===null)a=No(),Pe.updateQueue=a,a.events=[t];else{var i=a.events;i===null?a.events=[t]:i.push(t)}}function Ix(t){var a=ft().memoizedState;return Mj({ref:a,nextImpl:t}),function(){if((Ve&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Hx(t,a){return Co(4,2,t,a)}function Fx(t,a){return Co(4,4,t,a)}function Kx(t,a){if(typeof a=="function"){t=t();var i=a(t);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Jx(t,a,i){i=i!=null?i.concat([t]):null,Co(4,4,Kx.bind(null,a,t),i)}function Eu(){}function ep(t,a){var i=ft();a=a===void 0?null:a;var c=i.memoizedState;return a!==null&&Nu(a,c[1])?c[0]:(i.memoizedState=[t,a],t)}function tp(t,a){var i=ft();a=a===void 0?null:a;var c=i.memoizedState;if(a!==null&&Nu(a,c[1]))return c[0];if(c=t(),La){Xs(!0);try{t()}finally{Xs(!1)}}return i.memoizedState=[c,a],c}function qu(t,a,i){return i===void 0||(os&1073741824)!==0&&(Xe&261930)===0?t.memoizedState=a:(t.memoizedState=i,t=ng(),Pe.lanes|=t,Hs|=t,i)}function np(t,a,i,c){return Bt(i,a)?i:ql.current!==null?(t=qu(t,i,c),Bt(t,a)||(xt=!0),t):(os&42)===0||(os&1073741824)!==0&&(Xe&261930)===0?(xt=!0,t.memoizedState=i):(t=ng(),Pe.lanes|=t,Hs|=t,a)}function sp(t,a,i,c,O){var m=L.p;L.p=m!==0&&8>m?m:8;var S=T.T,N={};T.T=N,Uu(t,!1,a,i);try{var _=O(),H=T.S;if(H!==null&&H(N,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var se=_j(_,c);Kr(t,a,se,en(t))}else Kr(t,a,c,en(t))}catch(ie){Kr(t,a,{then:function(){},status:"rejected",reason:ie},en())}finally{L.p=m,S!==null&&N.types!==null&&(S.types=N.types),T.T=S}}function Yj(){}function Mu(t,a,i,c){if(t.tag!==5)throw Error(r(476));var O=ap(t).queue;sp(t,O,a,ee,i===null?Yj:function(){return lp(t),i(c)})}function ap(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:ee},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:i},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function lp(t){var a=ap(t);a.next===null&&(a=t.alternate.memoizedState),Kr(t,a.next.queue,{},en())}function Yu(){return zt(mi)}function rp(){return ft().memoizedState}function ip(){return ft().memoizedState}function Uj(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var i=en();t=Gs(i);var c=Ds(a,t,i);c!==null&&(Vt(c,a,i),Wr(c,a,i)),a={cache:xu()},t.payload=a;return}a=a.return}}function Vj(t,a,i){var c=en();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},zo(t)?cp(a,i):(i=lu(t,a,i,c),i!==null&&(Vt(i,t,c),dp(i,a,c)))}function op(t,a,i){var c=en();Kr(t,a,i,c)}function Kr(t,a,i,c){var O={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(zo(t))cp(a,O);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var S=a.lastRenderedState,N=m(S,i);if(O.hasEagerState=!0,O.eagerState=N,Bt(N,S))return fo(t,a,O,0),Fe===null&&uo(),!1}catch{}finally{}if(i=lu(t,a,O,c),i!==null)return Vt(i,t,c),dp(i,a,c),!0}return!1}function Uu(t,a,i,c){if(c={lane:2,revertLane:yf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},zo(t)){if(a)throw Error(r(479))}else a=lu(t,i,c,2),a!==null&&Vt(a,t,2)}function zo(t){var a=t.alternate;return t===Pe||a!==null&&a===Pe}function cp(t,a){Ml=wo=!0;var i=t.pending;i===null?a.next=a:(a.next=i.next,i.next=a),t.pending=a}function dp(t,a,i){if((i&4194048)!==0){var c=a.lanes;c&=t.pendingLanes,i|=c,a.lanes=i,mm(t,i)}}var Jr={readContext:zt,use:$o,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Jr.useEffectEvent=ot;var up={readContext:zt,use:$o,useCallback:function(t,a){return Xt().memoizedState=[t,a===void 0?null:a],t},useContext:zt,useEffect:Bx,useImperativeHandle:function(t,a,i){i=i!=null?i.concat([t]):null,Po(4194308,4,Kx.bind(null,a,t),i)},useLayoutEffect:function(t,a){return Po(4194308,4,t,a)},useInsertionEffect:function(t,a){Po(4,2,t,a)},useMemo:function(t,a){var i=Xt();a=a===void 0?null:a;var c=t();if(La){Xs(!0);try{t()}finally{Xs(!1)}}return i.memoizedState=[c,a],c},useReducer:function(t,a,i){var c=Xt();if(i!==void 0){var O=i(a);if(La){Xs(!0);try{i(a)}finally{Xs(!1)}}}else O=a;return c.memoizedState=c.baseState=O,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:O},c.queue=t,t=t.dispatch=Vj.bind(null,Pe,t),[c.memoizedState,t]},useRef:function(t){var a=Xt();return t={current:t},a.memoizedState=t},useState:function(t){t=_u(t);var a=t.queue,i=op.bind(null,Pe,a);return a.dispatch=i,[t.memoizedState,i]},useDebugValue:Eu,useDeferredValue:function(t,a){var i=Xt();return qu(i,t,a)},useTransition:function(){var t=_u(!1);return t=sp.bind(null,Pe,t.queue,!0,!1),Xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,i){var c=Pe,O=Xt();if(qe){if(i===void 0)throw Error(r(407));i=i()}else{if(i=a(),Fe===null)throw Error(r(349));(Xe&127)!==0||zx(c,a,i)}O.memoizedState=i;var m={value:i,getSnapshot:a};return O.queue=m,Bx(Ax.bind(null,c,m,t),[t]),c.flags|=2048,Ul(9,{destroy:void 0},Rx.bind(null,c,m,i,a),null),i},useId:function(){var t=Xt(),a=Fe.identifierPrefix;if(qe){var i=Un,c=Yn;i=(c&~(1<<32-Wt(c)-1)).toString(32)+i,a="_"+a+"R_"+i,i=ko++,0<i&&(a+="H"+i.toString(32)),a+="_"}else i=Xj++,a="_"+a+"r_"+i.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Yu,useFormState:Vx,useActionState:Vx,useOptimistic:function(t){var a=Xt();a.memoizedState=a.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=Uu.bind(null,Pe,!0,i),i.dispatch=a,[t,a]},useMemoCache:zu,useCacheRefresh:function(){return Xt().memoizedState=Uj.bind(null,Pe)},useEffectEvent:function(t){var a=Xt(),i={impl:t};return a.memoizedState=i,function(){if((Ve&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},Vu={readContext:zt,use:$o,useCallback:ep,useContext:zt,useEffect:Zu,useImperativeHandle:Jx,useInsertionEffect:Hx,useLayoutEffect:Fx,useMemo:tp,useReducer:To,useRef:Wx,useState:function(){return To(cs)},useDebugValue:Eu,useDeferredValue:function(t,a){var i=ft();return np(i,We.memoizedState,t,a)},useTransition:function(){var t=To(cs)[0],a=ft().memoizedState;return[typeof t=="boolean"?t:Fr(t),a]},useSyncExternalStore:Cx,useId:rp,useHostTransitionStatus:Yu,useFormState:Gx,useActionState:Gx,useOptimistic:function(t,a){var i=ft();return Zx(i,We,t,a)},useMemoCache:zu,useCacheRefresh:ip};Vu.useEffectEvent=Ix;var fp={readContext:zt,use:$o,useCallback:ep,useContext:zt,useEffect:Zu,useImperativeHandle:Jx,useInsertionEffect:Hx,useLayoutEffect:Fx,useMemo:tp,useReducer:Au,useRef:Wx,useState:function(){return Au(cs)},useDebugValue:Eu,useDeferredValue:function(t,a){var i=ft();return We===null?qu(i,t,a):np(i,We.memoizedState,t,a)},useTransition:function(){var t=Au(cs)[0],a=ft().memoizedState;return[typeof t=="boolean"?t:Fr(t),a]},useSyncExternalStore:Cx,useId:rp,useHostTransitionStatus:Yu,useFormState:Lx,useActionState:Lx,useOptimistic:function(t,a){var i=ft();return We!==null?Zx(i,We,t,a):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:zu,useCacheRefresh:ip};fp.useEffectEvent=Ix;function Gu(t,a,i,c){a=t.memoizedState,i=i(c,a),i=i==null?a:p({},a,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Du={enqueueSetState:function(t,a,i){t=t._reactInternals;var c=en(),O=Gs(c);O.payload=a,i!=null&&(O.callback=i),a=Ds(t,O,c),a!==null&&(Vt(a,t,c),Wr(a,t,c))},enqueueReplaceState:function(t,a,i){t=t._reactInternals;var c=en(),O=Gs(c);O.tag=1,O.payload=a,i!=null&&(O.callback=i),a=Ds(t,O,c),a!==null&&(Vt(a,t,c),Wr(a,t,c))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var i=en(),c=Gs(i);c.tag=2,a!=null&&(c.callback=a),a=Ds(t,c,i),a!==null&&(Vt(a,t,i),Wr(a,t,i))}};function Op(t,a,i,c,O,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,m,S):a.prototype&&a.prototype.isPureReactComponent?!qr(i,c)||!qr(O,m):!0}function hp(t,a,i,c){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,c),a.state!==t&&Du.enqueueReplaceState(a,a.state,null)}function Wa(t,a){var i=a;if("ref"in a){i={};for(var c in a)c!=="ref"&&(i[c]=a[c])}if(t=t.defaultProps){i===a&&(i=p({},i));for(var O in t)i[O]===void 0&&(i[O]=t[O])}return i}function mp(t){co(t)}function xp(t){console.error(t)}function pp(t){co(t)}function Ro(t,a){try{var i=t.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function gp(t,a,i){try{var c=t.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(O){setTimeout(function(){throw O})}}function Lu(t,a,i){return i=Gs(i),i.tag=3,i.payload={element:null},i.callback=function(){Ro(t,a)},i}function bp(t){return t=Gs(t),t.tag=3,t}function vp(t,a,i,c){var O=i.type.getDerivedStateFromError;if(typeof O=="function"){var m=c.value;t.payload=function(){return O(m)},t.callback=function(){gp(a,i,c)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){gp(a,i,c),typeof O!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})})}function Gj(t,a,i,c,O){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=i.alternate,a!==null&&Al(a,i,O,!0),i=Ht.current,i!==null){switch(i.tag){case 31:case 13:return mn===null?Do():i.alternate===null&&ct===0&&(ct=3),i.flags&=-257,i.flags|=65536,i.lanes=O,c===vo?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([c]):a.add(c),gf(t,c,O)),!1;case 22:return i.flags|=65536,c===vo?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([c]):i.add(c)),gf(t,c,O)),!1}throw Error(r(435,i.tag))}return gf(t,c,O),Do(),!1}if(qe)return a=Ht.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=O,c!==uu&&(t=Error(r(422),{cause:c}),Ur(un(t,i)))):(c!==uu&&(a=Error(r(423),{cause:c}),Ur(un(a,i))),t=t.current.alternate,t.flags|=65536,O&=-O,t.lanes|=O,c=un(c,i),O=Lu(t.stateNode,c,O),Su(t,O),ct!==4&&(ct=2)),!1;var m=Error(r(520),{cause:c});if(m=un(m,i),ii===null?ii=[m]:ii.push(m),ct!==4&&(ct=2),a===null)return!0;c=un(c,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,t=O&-O,i.lanes|=t,t=Lu(i.stateNode,c,t),Su(i,t),!1;case 1:if(a=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Fs===null||!Fs.has(m))))return i.flags|=65536,O&=-O,i.lanes|=O,O=bp(O),vp(O,t,i,c),Su(i,O),!1}i=i.return}while(i!==null);return!1}var Wu=Error(r(461)),xt=!1;function Rt(t,a,i,c){a.child=t===null?Qx(a,null,i,c):Da(a,t.child,i,c)}function yp(t,a,i,c,O){i=i.render;var m=a.ref;if("ref"in c){var S={};for(var N in c)N!=="ref"&&(S[N]=c[N])}else S=c;return Ya(a),c=$u(t,a,i,S,m,O),N=Tu(),t!==null&&!xt?(Pu(t,a,O),ds(t,a,O)):(qe&&N&&cu(a),a.flags|=1,Rt(t,a,c,O),a.child)}function Sp(t,a,i,c,O){if(t===null){var m=i.type;return typeof m=="function"&&!ru(m)&&m.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=m,jp(t,a,m,c,O)):(t=ho(i.type,null,c,a,a.mode,O),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!tf(t,O)){var S=m.memoizedProps;if(i=i.compare,i=i!==null?i:qr,i(S,c)&&t.ref===a.ref)return ds(t,a,O)}return a.flags|=1,t=as(m,c),t.ref=a.ref,t.return=a,a.child=t}function jp(t,a,i,c,O){if(t!==null){var m=t.memoizedProps;if(qr(m,c)&&t.ref===a.ref)if(xt=!1,a.pendingProps=c=m,tf(t,O))(t.flags&131072)!==0&&(xt=!0);else return a.lanes=t.lanes,ds(t,a,O)}return Bu(t,a,i,c,O)}function Qp(t,a,i,c){var O=c.children,m=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(c=a.child=t.child,O=0;c!==null;)O=O|c.lanes|c.childLanes,c=c.sibling;c=O&~m}else c=0,a.child=null;return wp(t,a,m,i,c)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&go(a,m!==null?m.cachePool:null),m!==null?Nx(a,m):Qu(),$x(a);else return c=a.lanes=536870912,wp(t,a,m!==null?m.baseLanes|i:i,i,c)}else m!==null?(go(a,m.cachePool),Nx(a,m),Ws(),a.memoizedState=null):(t!==null&&go(a,null),Qu(),Ws());return Rt(t,a,O,i),a.child}function ei(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function wp(t,a,i,c,O){var m=gu();return m=m===null?null:{parent:ht._currentValue,pool:m},a.memoizedState={baseLanes:i,cachePool:m},t!==null&&go(a,null),Qu(),$x(a),t!==null&&Al(t,a,c,!0),a.childLanes=O,null}function Ao(t,a){return a=Xo({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function kp(t,a,i){return Da(a,t.child,null,i),t=Ao(a,a.pendingProps),t.flags|=2,Ft(a),a.memoizedState=null,t}function Dj(t,a,i){var c=a.pendingProps,O=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(qe){if(c.mode==="hidden")return t=Ao(a,c),a.lanes=536870912,ei(null,t);if(ku(a),(t=Ke)?(t=Eg(t,hn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:qs!==null?{id:Yn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=cx(t),i.return=a,a.child=i,Ct=a,Ke=null)):t=null,t===null)throw Ys(a);return a.lanes=536870912,null}return Ao(a,c)}var m=t.memoizedState;if(m!==null){var S=m.dehydrated;if(ku(a),O)if(a.flags&256)a.flags&=-257,a=kp(t,a,i);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(xt||Al(t,a,i,!1),O=(i&t.childLanes)!==0,xt||O){if(c=Fe,c!==null&&(S=xm(c,i),S!==0&&S!==m.retryLane))throw m.retryLane=S,Za(t,S),Vt(c,t,S),Wu;Do(),a=kp(t,a,i)}else t=m.treeContext,Ke=xn(S.nextSibling),Ct=a,qe=!0,Ms=null,hn=!1,t!==null&&fx(a,t),a=Ao(a,c),a.flags|=4096;return a}return t=as(t.child,{mode:c.mode,children:c.children}),t.ref=a.ref,a.child=t,t.return=a,t}function _o(t,a){var i=a.ref;if(i===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(t===null||t.ref!==i)&&(a.flags|=4194816)}}function Bu(t,a,i,c,O){return Ya(a),i=$u(t,a,i,c,void 0,O),c=Tu(),t!==null&&!xt?(Pu(t,a,O),ds(t,a,O)):(qe&&c&&cu(a),a.flags|=1,Rt(t,a,i,O),a.child)}function Np(t,a,i,c,O,m){return Ya(a),a.updateQueue=null,i=Px(a,c,i,O),Tx(t),c=Tu(),t!==null&&!xt?(Pu(t,a,m),ds(t,a,m)):(qe&&c&&cu(a),a.flags|=1,Rt(t,a,i,m),a.child)}function $p(t,a,i,c,O){if(Ya(a),a.stateNode===null){var m=Pl,S=i.contextType;typeof S=="object"&&S!==null&&(m=zt(S)),m=new i(c,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Du,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=c,m.state=a.memoizedState,m.refs={},vu(a),S=i.contextType,m.context=typeof S=="object"&&S!==null?zt(S):Pl,m.state=a.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(Gu(a,i,S,c),m.state=a.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Du.enqueueReplaceState(m,m.state,null),Ir(a,c,m,O),Br(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(t===null){m=a.stateNode;var N=a.memoizedProps,_=Wa(i,N);m.props=_;var H=m.context,se=i.contextType;S=Pl,typeof se=="object"&&se!==null&&(S=zt(se));var ie=i.getDerivedStateFromProps;se=typeof ie=="function"||typeof m.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,se||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(N||H!==S)&&hp(a,m,c,S),Vs=!1;var K=a.memoizedState;m.state=K,Ir(a,c,m,O),Br(),H=a.memoizedState,N||K!==H||Vs?(typeof ie=="function"&&(Gu(a,i,ie,c),H=a.memoizedState),(_=Vs||Op(a,i,_,c,K,H,S))?(se||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=H),m.props=c,m.state=H,m.context=S,c=_):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{m=a.stateNode,yu(t,a),S=a.memoizedProps,se=Wa(i,S),m.props=se,ie=a.pendingProps,K=m.context,H=i.contextType,_=Pl,typeof H=="object"&&H!==null&&(_=zt(H)),N=i.getDerivedStateFromProps,(H=typeof N=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ie||K!==_)&&hp(a,m,c,_),Vs=!1,K=a.memoizedState,m.state=K,Ir(a,c,m,O),Br();var te=a.memoizedState;S!==ie||K!==te||Vs||t!==null&&t.dependencies!==null&&xo(t.dependencies)?(typeof N=="function"&&(Gu(a,i,N,c),te=a.memoizedState),(se=Vs||Op(a,i,se,c,K,te,_)||t!==null&&t.dependencies!==null&&xo(t.dependencies))?(H||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,te,_),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,te,_)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=te),m.props=c,m.state=te,m.context=_,c=se):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(a.flags|=1024),c=!1)}return m=c,_o(t,a),c=(a.flags&128)!==0,m||c?(m=a.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&c?(a.child=Da(a,t.child,null,O),a.child=Da(a,null,i,O)):Rt(t,a,i,O),a.memoizedState=m.state,t=a.child):t=ds(t,a,O),t}function Tp(t,a,i,c){return qa(),a.flags|=256,Rt(t,a,i,c),a.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hu(t){return{baseLanes:t,cachePool:gx()}}function Fu(t,a,i){return t=t!==null?t.childLanes&~i:0,a&&(t|=Jt),t}function Pp(t,a,i){var c=a.pendingProps,O=!1,m=(a.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(ut.current&2)!==0),S&&(O=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,t===null){if(qe){if(O?Ls(a):Ws(),(t=Ke)?(t=Eg(t,hn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:qs!==null?{id:Yn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=cx(t),i.return=a,a.child=i,Ct=a,Ke=null)):t=null,t===null)throw Ys(a);return Af(t)?a.lanes=32:a.lanes=536870912,null}var N=c.children;return c=c.fallback,O?(Ws(),O=a.mode,N=Xo({mode:"hidden",children:N},O),c=Ea(c,O,i,null),N.return=a,c.return=a,N.sibling=c,a.child=N,c=a.child,c.memoizedState=Hu(i),c.childLanes=Fu(t,S,i),a.memoizedState=Iu,ei(null,c)):(Ls(a),Ku(a,N))}var _=t.memoizedState;if(_!==null&&(N=_.dehydrated,N!==null)){if(m)a.flags&256?(Ls(a),a.flags&=-257,a=Ju(t,a,i)):a.memoizedState!==null?(Ws(),a.child=t.child,a.flags|=128,a=null):(Ws(),N=c.fallback,O=a.mode,c=Xo({mode:"visible",children:c.children},O),N=Ea(N,O,i,null),N.flags|=2,c.return=a,N.return=a,c.sibling=N,a.child=c,Da(a,t.child,null,i),c=a.child,c.memoizedState=Hu(i),c.childLanes=Fu(t,S,i),a.memoizedState=Iu,a=ei(null,c));else if(Ls(a),Af(N)){if(S=N.nextSibling&&N.nextSibling.dataset,S)var H=S.dgst;S=H,c=Error(r(419)),c.stack="",c.digest=S,Ur({value:c,source:null,stack:null}),a=Ju(t,a,i)}else if(xt||Al(t,a,i,!1),S=(i&t.childLanes)!==0,xt||S){if(S=Fe,S!==null&&(c=xm(S,i),c!==0&&c!==_.retryLane))throw _.retryLane=c,Za(t,c),Vt(S,t,c),Wu;Rf(N)||Do(),a=Ju(t,a,i)}else Rf(N)?(a.flags|=192,a.child=t.child,a=null):(t=_.treeContext,Ke=xn(N.nextSibling),Ct=a,qe=!0,Ms=null,hn=!1,t!==null&&fx(a,t),a=Ku(a,c.children),a.flags|=4096);return a}return O?(Ws(),N=c.fallback,O=a.mode,_=t.child,H=_.sibling,c=as(_,{mode:"hidden",children:c.children}),c.subtreeFlags=_.subtreeFlags&65011712,H!==null?N=as(H,N):(N=Ea(N,O,i,null),N.flags|=2),N.return=a,c.return=a,c.sibling=N,a.child=c,ei(null,c),c=a.child,N=t.child.memoizedState,N===null?N=Hu(i):(O=N.cachePool,O!==null?(_=ht._currentValue,O=O.parent!==_?{parent:_,pool:_}:O):O=gx(),N={baseLanes:N.baseLanes|i,cachePool:O}),c.memoizedState=N,c.childLanes=Fu(t,S,i),a.memoizedState=Iu,ei(t.child,c)):(Ls(a),i=t.child,t=i.sibling,i=as(i,{mode:"visible",children:c.children}),i.return=a,i.sibling=null,t!==null&&(S=a.deletions,S===null?(a.deletions=[t],a.flags|=16):S.push(t)),a.child=i,a.memoizedState=null,i)}function Ku(t,a){return a=Xo({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Xo(t,a){return t=It(22,t,null,a),t.lanes=0,t}function Ju(t,a,i){return Da(a,t.child,null,i),t=Ku(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Cp(t,a,i){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a),hu(t.return,a,i)}function ef(t,a,i,c,O,m){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:O,treeForkCount:m}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=i,S.tailMode=O,S.treeForkCount=m)}function zp(t,a,i){var c=a.pendingProps,O=c.revealOrder,m=c.tail;c=c.children;var S=ut.current,N=(S&2)!==0;if(N?(S=S&1|2,a.flags|=128):S&=1,ge(ut,S),Rt(t,a,c,i),c=qe?Yr:0,!N&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Cp(t,i,a);else if(t.tag===19)Cp(t,i,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(O){case"forwards":for(i=a.child,O=null;i!==null;)t=i.alternate,t!==null&&Qo(t)===null&&(O=i),i=i.sibling;i=O,i===null?(O=a.child,a.child=null):(O=i.sibling,i.sibling=null),ef(a,!1,O,i,m,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,O=a.child,a.child=null;O!==null;){if(t=O.alternate,t!==null&&Qo(t)===null){a.child=O;break}t=O.sibling,O.sibling=i,i=O,O=t}ef(a,!0,i,null,m,c);break;case"together":ef(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ds(t,a,i){if(t!==null&&(a.dependencies=t.dependencies),Hs|=a.lanes,(i&a.childLanes)===0)if(t!==null){if(Al(t,a,i,!1),(i&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(r(153));if(a.child!==null){for(t=a.child,i=as(t,t.pendingProps),a.child=i,i.return=a;t.sibling!==null;)t=t.sibling,i=i.sibling=as(t,t.pendingProps),i.return=a;i.sibling=null}return a.child}function tf(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&xo(t)))}function Lj(t,a,i){switch(a.tag){case 3:St(a,a.stateNode.containerInfo),Us(a,ht,t.memoizedState.cache),qa();break;case 27:case 5:$t(a);break;case 4:St(a,a.stateNode.containerInfo);break;case 10:Us(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ku(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Ls(a),a.flags|=128,null):(i&a.child.childLanes)!==0?Pp(t,a,i):(Ls(a),t=ds(t,a,i),t!==null?t.sibling:null);Ls(a);break;case 19:var O=(t.flags&128)!==0;if(c=(i&a.childLanes)!==0,c||(Al(t,a,i,!1),c=(i&a.childLanes)!==0),O){if(c)return zp(t,a,i);a.flags|=128}if(O=a.memoizedState,O!==null&&(O.rendering=null,O.tail=null,O.lastEffect=null),ge(ut,ut.current),c)break;return null;case 22:return a.lanes=0,Qp(t,a,i,a.pendingProps);case 24:Us(a,ht,t.memoizedState.cache)}return ds(t,a,i)}function Rp(t,a,i){if(t!==null)if(t.memoizedProps!==a.pendingProps)xt=!0;else{if(!tf(t,i)&&(a.flags&128)===0)return xt=!1,Lj(t,a,i);xt=(t.flags&131072)!==0}else xt=!1,qe&&(a.flags&1048576)!==0&&ux(a,Yr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(t=Va(a.elementType),a.type=t,typeof t=="function")ru(t)?(c=Wa(t,c),a.tag=1,a=$p(null,a,t,c,i)):(a.tag=0,a=Bu(null,a,t,c,i));else{if(t!=null){var O=t.$$typeof;if(O===R){a.tag=11,a=yp(null,a,t,c,i);break e}else if(O===z){a.tag=14,a=Sp(null,a,t,c,i);break e}}throw a=D(t)||t,Error(r(306,a,""))}}return a;case 0:return Bu(t,a,a.type,a.pendingProps,i);case 1:return c=a.type,O=Wa(c,a.pendingProps),$p(t,a,c,O,i);case 3:e:{if(St(a,a.stateNode.containerInfo),t===null)throw Error(r(387));c=a.pendingProps;var m=a.memoizedState;O=m.element,yu(t,a),Ir(a,c,null,i);var S=a.memoizedState;if(c=S.cache,Us(a,ht,c),c!==m.cache&&mu(a,[ht],i,!0),Br(),c=S.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=Tp(t,a,c,i);break e}else if(c!==O){O=un(Error(r(424)),a),Ur(O),a=Tp(t,a,c,i);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Ke=xn(t.firstChild),Ct=a,qe=!0,Ms=null,hn=!0,i=Qx(a,null,c,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(qa(),c===O){a=ds(t,a,i);break e}Rt(t,a,c,i)}a=a.child}return a;case 26:return _o(t,a),t===null?(i=Gg(a.type,null,a.pendingProps,null))?a.memoizedState=i:qe||(i=a.type,t=a.pendingProps,c=Ko(ke.current).createElement(i),c[Pt]=a,c[Zt]=t,At(c,i,t),Qt(c),a.stateNode=c):a.memoizedState=Gg(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return $t(a),t===null&&qe&&(c=a.stateNode=Yg(a.type,a.pendingProps,ke.current),Ct=a,hn=!0,O=Ke,ta(a.type)?(_f=O,Ke=xn(c.firstChild)):Ke=O),Rt(t,a,a.pendingProps.children,i),_o(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&qe&&((O=c=Ke)&&(c=SQ(c,a.type,a.pendingProps,hn),c!==null?(a.stateNode=c,Ct=a,Ke=xn(c.firstChild),hn=!1,O=!0):O=!1),O||Ys(a)),$t(a),O=a.type,m=a.pendingProps,S=t!==null?t.memoizedProps:null,c=m.children,Pf(O,m)?c=null:S!==null&&Pf(O,S)&&(a.flags|=32),a.memoizedState!==null&&(O=$u(t,a,Zj,null,null,i),mi._currentValue=O),_o(t,a),Rt(t,a,c,i),a.child;case 6:return t===null&&qe&&((t=i=Ke)&&(i=jQ(i,a.pendingProps,hn),i!==null?(a.stateNode=i,Ct=a,Ke=null,t=!0):t=!1),t||Ys(a)),null;case 13:return Pp(t,a,i);case 4:return St(a,a.stateNode.containerInfo),c=a.pendingProps,t===null?a.child=Da(a,null,c,i):Rt(t,a,c,i),a.child;case 11:return yp(t,a,a.type,a.pendingProps,i);case 7:return Rt(t,a,a.pendingProps,i),a.child;case 8:return Rt(t,a,a.pendingProps.children,i),a.child;case 12:return Rt(t,a,a.pendingProps.children,i),a.child;case 10:return c=a.pendingProps,Us(a,a.type,c.value),Rt(t,a,c.children,i),a.child;case 9:return O=a.type._context,c=a.pendingProps.children,Ya(a),O=zt(O),c=c(O),a.flags|=1,Rt(t,a,c,i),a.child;case 14:return Sp(t,a,a.type,a.pendingProps,i);case 15:return jp(t,a,a.type,a.pendingProps,i);case 19:return zp(t,a,i);case 31:return Dj(t,a,i);case 22:return Qp(t,a,i,a.pendingProps);case 24:return Ya(a),c=zt(ht),t===null?(O=gu(),O===null&&(O=Fe,m=xu(),O.pooledCache=m,m.refCount++,m!==null&&(O.pooledCacheLanes|=i),O=m),a.memoizedState={parent:c,cache:O},vu(a),Us(a,ht,O)):((t.lanes&i)!==0&&(yu(t,a),Ir(a,null,null,i),Br()),O=t.memoizedState,m=a.memoizedState,O.parent!==c?(O={parent:c,cache:c},a.memoizedState=O,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=O),Us(a,ht,c)):(c=m.cache,Us(a,ht,c),c!==O.cache&&mu(a,[ht],i,!0))),Rt(t,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function us(t){t.flags|=4}function nf(t,a,i,c,O){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(O&335544128)===O)if(t.stateNode.complete)t.flags|=8192;else if(rg())t.flags|=8192;else throw Ga=vo,bu}else t.flags&=-16777217}function Ap(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ig(a))if(rg())t.flags|=8192;else throw Ga=vo,bu}function Zo(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?Om():536870912,t.lanes|=a,Ll|=a)}function ti(t,a){if(!qe)switch(t.tailMode){case"hidden":a=t.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Je(t){var a=t.alternate!==null&&t.alternate.child===t.child,i=0,c=0;if(a)for(var O=t.child;O!==null;)i|=O.lanes|O.childLanes,c|=O.subtreeFlags&65011712,c|=O.flags&65011712,O.return=t,O=O.sibling;else for(O=t.child;O!==null;)i|=O.lanes|O.childLanes,c|=O.subtreeFlags,c|=O.flags,O.return=t,O=O.sibling;return t.subtreeFlags|=c,t.childLanes=i,a}function Wj(t,a,i){var c=a.pendingProps;switch(du(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(a),null;case 1:return Je(a),null;case 3:return i=a.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),is(ht),Ee(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Rl(a)?us(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,fu())),Je(a),null;case 26:var O=a.type,m=a.memoizedState;return t===null?(us(a),m!==null?(Je(a),Ap(a,m)):(Je(a),nf(a,O,null,c,i))):m?m!==t.memoizedState?(us(a),Je(a),Ap(a,m)):(Je(a),a.flags&=-16777217):(t=t.memoizedProps,t!==c&&us(a),Je(a),nf(a,O,t,c,i)),null;case 27:if(tt(a),i=ke.current,O=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&us(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Je(a),null}t=je.current,Rl(a)?Ox(a):(t=Yg(O,c,i),a.stateNode=t,us(a))}return Je(a),null;case 5:if(tt(a),O=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&us(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Je(a),null}if(m=je.current,Rl(a))Ox(a);else{var S=Ko(ke.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",O);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;default:switch(O){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",O);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?S.createElement(O,{is:c.is}):S.createElement(O)}}m[Pt]=a,m[Zt]=c;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=m;e:switch(At(m,O,c),O){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&us(a)}}return Je(a),nf(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,i),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==c&&us(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(r(166));if(t=ke.current,Rl(a)){if(t=a.stateNode,i=a.memoizedProps,c=null,O=Ct,O!==null)switch(O.tag){case 27:case 5:c=O.memoizedProps}t[Pt]=a,t=!!(t.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||Pg(t.nodeValue,i)),t||Ys(a,!0)}else t=Ko(t).createTextNode(c),t[Pt]=a,a.stateNode=t}return Je(a),null;case 31:if(i=a.memoizedState,t===null||t.memoizedState!==null){if(c=Rl(a),i!==null){if(t===null){if(!c)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Pt]=a}else qa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Je(a),t=!1}else i=fu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return a.flags&256?(Ft(a),a):(Ft(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Je(a),null;case 13:if(c=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(O=Rl(a),c!==null&&c.dehydrated!==null){if(t===null){if(!O)throw Error(r(318));if(O=a.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(r(317));O[Pt]=a}else qa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Je(a),O=!1}else O=fu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=O),O=!0;if(!O)return a.flags&256?(Ft(a),a):(Ft(a),null)}return Ft(a),(a.flags&128)!==0?(a.lanes=i,a):(i=c!==null,t=t!==null&&t.memoizedState!==null,i&&(c=a.child,O=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(O=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==O&&(c.flags|=2048)),i!==t&&i&&(a.child.flags|=8192),Zo(a,a.updateQueue),Je(a),null);case 4:return Ee(),t===null&&wf(a.stateNode.containerInfo),Je(a),null;case 10:return is(a.type),Je(a),null;case 19:if(Se(ut),c=a.memoizedState,c===null)return Je(a),null;if(O=(a.flags&128)!==0,m=c.rendering,m===null)if(O)ti(c,!1);else{if(ct!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Qo(t),m!==null){for(a.flags|=128,ti(c,!1),t=m.updateQueue,a.updateQueue=t,Zo(a,t),a.subtreeFlags=0,t=i,i=a.child;i!==null;)ox(i,t),i=i.sibling;return ge(ut,ut.current&1|2),qe&&ls(a,c.treeForkCount),a.child}t=t.sibling}c.tail!==null&&$e()>Uo&&(a.flags|=128,O=!0,ti(c,!1),a.lanes=4194304)}else{if(!O)if(t=Qo(m),t!==null){if(a.flags|=128,O=!0,t=t.updateQueue,a.updateQueue=t,Zo(a,t),ti(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!qe)return Je(a),null}else 2*$e()-c.renderingStartTime>Uo&&i!==536870912&&(a.flags|=128,O=!0,ti(c,!1),a.lanes=4194304);c.isBackwards?(m.sibling=a.child,a.child=m):(t=c.last,t!==null?t.sibling=m:a.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=$e(),t.sibling=null,i=ut.current,ge(ut,O?i&1|2:i&1),qe&&ls(a,c.treeForkCount),t):(Je(a),null);case 22:case 23:return Ft(a),wu(),c=a.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(i&536870912)!==0&&(a.flags&128)===0&&(Je(a),a.subtreeFlags&6&&(a.flags|=8192)):Je(a),i=a.updateQueue,i!==null&&Zo(a,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048),t!==null&&Se(Ua),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),is(ht),Je(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function Bj(t,a){switch(du(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return is(ht),Ee(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return tt(a),null;case 31:if(a.memoizedState!==null){if(Ft(a),a.alternate===null)throw Error(r(340));qa()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(Ft(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));qa()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Se(ut),null;case 4:return Ee(),null;case 10:return is(a.type),null;case 22:case 23:return Ft(a),wu(),t!==null&&Se(Ua),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return is(ht),null;case 25:return null;default:return null}}function _p(t,a){switch(du(a),a.tag){case 3:is(ht),Ee();break;case 26:case 27:case 5:tt(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&Ft(a);break;case 13:Ft(a);break;case 19:Se(ut);break;case 10:is(a.type);break;case 22:case 23:Ft(a),wu(),t!==null&&Se(Ua);break;case 24:is(ht)}}function ni(t,a){try{var i=a.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var O=c.next;i=O;do{if((i.tag&t)===t){c=void 0;var m=i.create,S=i.inst;c=m(),S.destroy=c}i=i.next}while(i!==O)}}catch(N){Le(a,a.return,N)}}function Bs(t,a,i){try{var c=a.updateQueue,O=c!==null?c.lastEffect:null;if(O!==null){var m=O.next;c=m;do{if((c.tag&t)===t){var S=c.inst,N=S.destroy;if(N!==void 0){S.destroy=void 0,O=a;var _=i,H=N;try{H()}catch(se){Le(O,_,se)}}}c=c.next}while(c!==m)}}catch(se){Le(a,a.return,se)}}function Xp(t){var a=t.updateQueue;if(a!==null){var i=t.stateNode;try{kx(a,i)}catch(c){Le(t,t.return,c)}}}function Zp(t,a,i){i.props=Wa(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(c){Le(t,a,c)}}function si(t,a){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof i=="function"?t.refCleanup=i(c):i.current=c}}catch(O){Le(t,a,O)}}function Vn(t,a){var i=t.ref,c=t.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(O){Le(t,a,O)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(O){Le(t,a,O)}else i.current=null}function Ep(t){var a=t.type,i=t.memoizedProps,c=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(O){Le(t,t.return,O)}}function sf(t,a,i){try{var c=t.stateNode;xQ(c,t.type,i,a),c[Zt]=a}catch(O){Le(t,t.return,O)}}function qp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ta(t.type)||t.tag===4}function af(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ta(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function lf(t,a,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,a):(a=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.appendChild(t),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=ns));else if(c!==4&&(c===27&&ta(t.type)&&(i=t.stateNode,a=null),t=t.child,t!==null))for(lf(t,a,i),t=t.sibling;t!==null;)lf(t,a,i),t=t.sibling}function Eo(t,a,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?i.insertBefore(t,a):i.appendChild(t);else if(c!==4&&(c===27&&ta(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Eo(t,a,i),t=t.sibling;t!==null;)Eo(t,a,i),t=t.sibling}function Mp(t){var a=t.stateNode,i=t.memoizedProps;try{for(var c=t.type,O=a.attributes;O.length;)a.removeAttributeNode(O[0]);At(a,c,i),a[Pt]=t,a[Zt]=i}catch(m){Le(t,t.return,m)}}var fs=!1,pt=!1,rf=!1,Yp=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Ij(t,a){if(t=t.containerInfo,$f=lc,t=Jm(t),Jd(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var O=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var S=0,N=-1,_=-1,H=0,se=0,ie=t,K=null;t:for(;;){for(var te;ie!==i||O!==0&&ie.nodeType!==3||(N=S+O),ie!==m||c!==0&&ie.nodeType!==3||(_=S+c),ie.nodeType===3&&(S+=ie.nodeValue.length),(te=ie.firstChild)!==null;)K=ie,ie=te;for(;;){if(ie===t)break t;if(K===i&&++H===O&&(N=S),K===m&&++se===c&&(_=S),(te=ie.nextSibling)!==null)break;ie=K,K=ie.parentNode}ie=te}i=N===-1||_===-1?null:{start:N,end:_}}else i=null}i=i||{start:0,end:0}}else i=null;for(Tf={focusedElem:t,selectionRange:i},lc=!1,wt=a;wt!==null;)if(a=wt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,wt=t;else for(;wt!==null;){switch(a=wt,m=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)O=t[i],O.ref.impl=O.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,i=a,O=m.memoizedProps,m=m.memoizedState,c=i.stateNode;try{var he=Wa(i.type,O);t=c.getSnapshotBeforeUpdate(he,m),c.__reactInternalSnapshotBeforeUpdate=t}catch(Qe){Le(i,i.return,Qe)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,i=t.nodeType,i===9)zf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":zf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=a.sibling,t!==null){t.return=a.return,wt=t;break}wt=a.return}}function Up(t,a,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:hs(t,i),c&4&&ni(5,i);break;case 1:if(hs(t,i),c&4)if(t=i.stateNode,a===null)try{t.componentDidMount()}catch(S){Le(i,i.return,S)}else{var O=Wa(i.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(O,a,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Le(i,i.return,S)}}c&64&&Xp(i),c&512&&si(i,i.return);break;case 3:if(hs(t,i),c&64&&(t=i.updateQueue,t!==null)){if(a=null,i.child!==null)switch(i.child.tag){case 27:case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}try{kx(t,a)}catch(S){Le(i,i.return,S)}}break;case 27:a===null&&c&4&&Mp(i);case 26:case 5:hs(t,i),a===null&&c&4&&Ep(i),c&512&&si(i,i.return);break;case 12:hs(t,i);break;case 31:hs(t,i),c&4&&Dp(t,i);break;case 13:hs(t,i),c&4&&Lp(t,i),c&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=aQ.bind(null,i),QQ(t,i))));break;case 22:if(c=i.memoizedState!==null||fs,!c){a=a!==null&&a.memoizedState!==null||pt,O=fs;var m=pt;fs=c,(pt=a)&&!m?ms(t,i,(i.subtreeFlags&8772)!==0):hs(t,i),fs=O,pt=m}break;case 30:break;default:hs(t,i)}}function Vp(t){var a=t.alternate;a!==null&&(t.alternate=null,Vp(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Xd(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var st=null,qt=!1;function Os(t,a,i){for(i=i.child;i!==null;)Gp(t,a,i),i=i.sibling}function Gp(t,a,i){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Nr,i)}catch{}switch(i.tag){case 26:pt||Vn(i,a),Os(t,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||Vn(i,a);var c=st,O=qt;ta(i.type)&&(st=i.stateNode,qt=!1),Os(t,a,i),fi(i.stateNode),st=c,qt=O;break;case 5:pt||Vn(i,a);case 6:if(c=st,O=qt,st=null,Os(t,a,i),st=c,qt=O,st!==null)if(qt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(i.stateNode)}catch(m){Le(i,a,m)}else try{st.removeChild(i.stateNode)}catch(m){Le(i,a,m)}break;case 18:st!==null&&(qt?(t=st,Xg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),er(t)):Xg(st,i.stateNode));break;case 4:c=st,O=qt,st=i.stateNode.containerInfo,qt=!0,Os(t,a,i),st=c,qt=O;break;case 0:case 11:case 14:case 15:Bs(2,i,a),pt||Bs(4,i,a),Os(t,a,i);break;case 1:pt||(Vn(i,a),c=i.stateNode,typeof c.componentWillUnmount=="function"&&Zp(i,a,c)),Os(t,a,i);break;case 21:Os(t,a,i);break;case 22:pt=(c=pt)||i.memoizedState!==null,Os(t,a,i),pt=c;break;default:Os(t,a,i)}}function Dp(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{er(t)}catch(i){Le(a,a.return,i)}}}function Lp(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{er(t)}catch(i){Le(a,a.return,i)}}function Hj(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Yp),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Yp),a;default:throw Error(r(435,t.tag))}}function qo(t,a){var i=Hj(t);a.forEach(function(c){if(!i.has(c)){i.add(c);var O=lQ.bind(null,t,c);c.then(O,O)}})}function Mt(t,a){var i=a.deletions;if(i!==null)for(var c=0;c<i.length;c++){var O=i[c],m=t,S=a,N=S;e:for(;N!==null;){switch(N.tag){case 27:if(ta(N.type)){st=N.stateNode,qt=!1;break e}break;case 5:st=N.stateNode,qt=!1;break e;case 3:case 4:st=N.stateNode.containerInfo,qt=!0;break e}N=N.return}if(st===null)throw Error(r(160));Gp(m,S,O),st=null,qt=!1,m=O.alternate,m!==null&&(m.return=null),O.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Wp(a,t),a=a.sibling}var $n=null;function Wp(t,a){var i=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Mt(a,t),Yt(t),c&4&&(Bs(3,t,t.return),ni(3,t),Bs(5,t,t.return));break;case 1:Mt(a,t),Yt(t),c&512&&(pt||i===null||Vn(i,i.return)),c&64&&fs&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var O=$n;if(Mt(a,t),Yt(t),c&512&&(pt||i===null||Vn(i,i.return)),c&4){var m=i!==null?i.memoizedState:null;if(c=t.memoizedState,i===null)if(c===null)if(t.stateNode===null){e:{c=t.type,i=t.memoizedProps,O=O.ownerDocument||O;t:switch(c){case"title":m=O.getElementsByTagName("title")[0],(!m||m[Pr]||m[Pt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=O.createElement(c),O.head.insertBefore(m,O.querySelector("head > title"))),At(m,c,i),m[Pt]=t,Qt(m),c=m;break e;case"link":var S=Wg("link","href",O).get(c+(i.href||""));if(S){for(var N=0;N<S.length;N++)if(m=S[N],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(N,1);break t}}m=O.createElement(c),At(m,c,i),O.head.appendChild(m);break;case"meta":if(S=Wg("meta","content",O).get(c+(i.content||""))){for(N=0;N<S.length;N++)if(m=S[N],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(N,1);break t}}m=O.createElement(c),At(m,c,i),O.head.appendChild(m);break;default:throw Error(r(468,c))}m[Pt]=t,Qt(m),c=m}t.stateNode=c}else Bg(O,t.type,t.stateNode);else t.stateNode=Lg(O,c,t.memoizedProps);else m!==c?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,c===null?Bg(O,t.type,t.stateNode):Lg(O,c,t.memoizedProps)):c===null&&t.stateNode!==null&&sf(t,t.memoizedProps,i.memoizedProps)}break;case 27:Mt(a,t),Yt(t),c&512&&(pt||i===null||Vn(i,i.return)),i!==null&&c&4&&sf(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Mt(a,t),Yt(t),c&512&&(pt||i===null||Vn(i,i.return)),t.flags&32){O=t.stateNode;try{jl(O,"")}catch(he){Le(t,t.return,he)}}c&4&&t.stateNode!=null&&(O=t.memoizedProps,sf(t,O,i!==null?i.memoizedProps:O)),c&1024&&(rf=!0);break;case 6:if(Mt(a,t),Yt(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,i=t.stateNode;try{i.nodeValue=c}catch(he){Le(t,t.return,he)}}break;case 3:if(tc=null,O=$n,$n=Jo(a.containerInfo),Mt(a,t),$n=O,Yt(t),c&4&&i!==null&&i.memoizedState.isDehydrated)try{er(a.containerInfo)}catch(he){Le(t,t.return,he)}rf&&(rf=!1,Bp(t));break;case 4:c=$n,$n=Jo(t.stateNode.containerInfo),Mt(a,t),Yt(t),$n=c;break;case 12:Mt(a,t),Yt(t);break;case 31:Mt(a,t),Yt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,qo(t,c)));break;case 13:Mt(a,t),Yt(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Yo=$e()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,qo(t,c)));break;case 22:O=t.memoizedState!==null;var _=i!==null&&i.memoizedState!==null,H=fs,se=pt;if(fs=H||O,pt=se||_,Mt(a,t),pt=se,fs=H,Yt(t),c&8192)e:for(a=t.stateNode,a._visibility=O?a._visibility&-2:a._visibility|1,O&&(i===null||_||fs||pt||Ba(t)),i=null,a=t;;){if(a.tag===5||a.tag===26){if(i===null){_=i=a;try{if(m=_.stateNode,O)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{N=_.stateNode;var ie=_.memoizedProps.style,K=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;N.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(he){Le(_,_.return,he)}}}else if(a.tag===6){if(i===null){_=a;try{_.stateNode.nodeValue=O?"":_.memoizedProps}catch(he){Le(_,_.return,he)}}}else if(a.tag===18){if(i===null){_=a;try{var te=_.stateNode;O?Zg(te,!0):Zg(_.stateNode,!1)}catch(he){Le(_,_.return,he)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=t.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,qo(t,i))));break;case 19:Mt(a,t),Yt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,qo(t,c)));break;case 30:break;case 21:break;default:Mt(a,t),Yt(t)}}function Yt(t){var a=t.flags;if(a&2){try{for(var i,c=t.return;c!==null;){if(qp(c)){i=c;break}c=c.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var O=i.stateNode,m=af(t);Eo(t,m,O);break;case 5:var S=i.stateNode;i.flags&32&&(jl(S,""),i.flags&=-33);var N=af(t);Eo(t,N,S);break;case 3:case 4:var _=i.stateNode.containerInfo,H=af(t);lf(t,H,_);break;default:throw Error(r(161))}}catch(se){Le(t,t.return,se)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Bp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Bp(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function hs(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Up(t,a.alternate,a),a=a.sibling}function Ba(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Bs(4,a,a.return),Ba(a);break;case 1:Vn(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&Zp(a,a.return,i),Ba(a);break;case 27:fi(a.stateNode);case 26:case 5:Vn(a,a.return),Ba(a);break;case 22:a.memoizedState===null&&Ba(a);break;case 30:Ba(a);break;default:Ba(a)}t=t.sibling}}function ms(t,a,i){for(i=i&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,O=t,m=a,S=m.flags;switch(m.tag){case 0:case 11:case 15:ms(O,m,i),ni(4,m);break;case 1:if(ms(O,m,i),c=m,O=c.stateNode,typeof O.componentDidMount=="function")try{O.componentDidMount()}catch(H){Le(c,c.return,H)}if(c=m,O=c.updateQueue,O!==null){var N=c.stateNode;try{var _=O.shared.hiddenCallbacks;if(_!==null)for(O.shared.hiddenCallbacks=null,O=0;O<_.length;O++)wx(_[O],N)}catch(H){Le(c,c.return,H)}}i&&S&64&&Xp(m),si(m,m.return);break;case 27:Mp(m);case 26:case 5:ms(O,m,i),i&&c===null&&S&4&&Ep(m),si(m,m.return);break;case 12:ms(O,m,i);break;case 31:ms(O,m,i),i&&S&4&&Dp(O,m);break;case 13:ms(O,m,i),i&&S&4&&Lp(O,m);break;case 22:m.memoizedState===null&&ms(O,m,i),si(m,m.return);break;case 30:break;default:ms(O,m,i)}a=a.sibling}}function of(t,a){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&Vr(i))}function cf(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Vr(t))}function Tn(t,a,i,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ip(t,a,i,c),a=a.sibling}function Ip(t,a,i,c){var O=a.flags;switch(a.tag){case 0:case 11:case 15:Tn(t,a,i,c),O&2048&&ni(9,a);break;case 1:Tn(t,a,i,c);break;case 3:Tn(t,a,i,c),O&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Vr(t)));break;case 12:if(O&2048){Tn(t,a,i,c),t=a.stateNode;try{var m=a.memoizedProps,S=m.id,N=m.onPostCommit;typeof N=="function"&&N(S,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Le(a,a.return,_)}}else Tn(t,a,i,c);break;case 31:Tn(t,a,i,c);break;case 13:Tn(t,a,i,c);break;case 23:break;case 22:m=a.stateNode,S=a.alternate,a.memoizedState!==null?m._visibility&2?Tn(t,a,i,c):ai(t,a):m._visibility&2?Tn(t,a,i,c):(m._visibility|=2,Vl(t,a,i,c,(a.subtreeFlags&10256)!==0||!1)),O&2048&&of(S,a);break;case 24:Tn(t,a,i,c),O&2048&&cf(a.alternate,a);break;default:Tn(t,a,i,c)}}function Vl(t,a,i,c,O){for(O=O&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=t,S=a,N=i,_=c,H=S.flags;switch(S.tag){case 0:case 11:case 15:Vl(m,S,N,_,O),ni(8,S);break;case 23:break;case 22:var se=S.stateNode;S.memoizedState!==null?se._visibility&2?Vl(m,S,N,_,O):ai(m,S):(se._visibility|=2,Vl(m,S,N,_,O)),O&&H&2048&&of(S.alternate,S);break;case 24:Vl(m,S,N,_,O),O&&H&2048&&cf(S.alternate,S);break;default:Vl(m,S,N,_,O)}a=a.sibling}}function ai(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=t,c=a,O=c.flags;switch(c.tag){case 22:ai(i,c),O&2048&&of(c.alternate,c);break;case 24:ai(i,c),O&2048&&cf(c.alternate,c);break;default:ai(i,c)}a=a.sibling}}var li=8192;function Gl(t,a,i){if(t.subtreeFlags&li)for(t=t.child;t!==null;)Hp(t,a,i),t=t.sibling}function Hp(t,a,i){switch(t.tag){case 26:Gl(t,a,i),t.flags&li&&t.memoizedState!==null&&XQ(i,$n,t.memoizedState,t.memoizedProps);break;case 5:Gl(t,a,i);break;case 3:case 4:var c=$n;$n=Jo(t.stateNode.containerInfo),Gl(t,a,i),$n=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=li,li=16777216,Gl(t,a,i),li=c):Gl(t,a,i));break;default:Gl(t,a,i)}}function Fp(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function ri(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var c=a[i];wt=c,Jp(c,t)}Fp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kp(t),t=t.sibling}function Kp(t){switch(t.tag){case 0:case 11:case 15:ri(t),t.flags&2048&&Bs(9,t,t.return);break;case 3:ri(t);break;case 12:ri(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Mo(t)):ri(t);break;default:ri(t)}}function Mo(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var c=a[i];wt=c,Jp(c,t)}Fp(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Bs(8,a,a.return),Mo(a);break;case 22:i=a.stateNode,i._visibility&2&&(i._visibility&=-3,Mo(a));break;default:Mo(a)}t=t.sibling}}function Jp(t,a){for(;wt!==null;){var i=wt;switch(i.tag){case 0:case 11:case 15:Bs(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Vr(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,wt=c;else e:for(i=t;wt!==null;){c=wt;var O=c.sibling,m=c.return;if(Vp(c),c===i){wt=null;break e}if(O!==null){O.return=m,wt=O;break e}wt=m}}}var Fj={getCacheForType:function(t){var a=zt(ht),i=a.data.get(t);return i===void 0&&(i=t(),a.data.set(t,i)),i},cacheSignal:function(){return zt(ht).controller.signal}},Kj=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Fe=null,Ae=null,Xe=0,De=0,Kt=null,Is=!1,Dl=!1,df=!1,xs=0,ct=0,Hs=0,Ia=0,uf=0,Jt=0,Ll=0,ii=null,Ut=null,ff=!1,Yo=0,eg=0,Uo=1/0,Vo=null,Fs=null,vt=0,Ks=null,Wl=null,ps=0,Of=0,hf=null,tg=null,oi=0,mf=null;function en(){return(Ve&2)!==0&&Xe!==0?Xe&-Xe:T.T!==null?yf():pm()}function ng(){if(Jt===0)if((Xe&536870912)===0||qe){var t=Hi;Hi<<=1,(Hi&3932160)===0&&(Hi=262144),Jt=t}else Jt=536870912;return t=Ht.current,t!==null&&(t.flags|=32),Jt}function Vt(t,a,i){(t===Fe&&(De===2||De===9)||t.cancelPendingCommit!==null)&&(Bl(t,0),Js(t,Xe,Jt,!1)),Tr(t,i),((Ve&2)===0||t!==Fe)&&(t===Fe&&((Ve&2)===0&&(Ia|=i),ct===4&&Js(t,Xe,Jt,!1)),Gn(t))}function sg(t,a,i){if((Ve&6)!==0)throw Error(r(327));var c=!i&&(a&127)===0&&(a&t.expiredLanes)===0||$r(t,a),O=c?tQ(t,a):pf(t,a,!0),m=c;do{if(O===0){Dl&&!c&&Js(t,a,0,!1);break}else{if(i=t.current.alternate,m&&!Jj(i)){O=pf(t,a,!1),m=!1;continue}if(O===2){if(m=a,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var N=t;O=ii;var _=N.current.memoizedState.isDehydrated;if(_&&(Bl(N,S).flags|=256),S=pf(N,S,!1),S!==2){if(df&&!_){N.errorRecoveryDisabledLanes|=m,Ia|=m,O=4;break e}m=Ut,Ut=O,m!==null&&(Ut===null?Ut=m:Ut.push.apply(Ut,m))}O=S}if(m=!1,O!==2)continue}}if(O===1){Bl(t,0),Js(t,a,0,!0);break}e:{switch(c=t,m=O,m){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Js(c,a,Jt,!Is);break e;case 2:Ut=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(O=Yo+300-$e(),10<O)){if(Js(c,a,Jt,!Is),Ki(c,0,!0)!==0)break e;ps=a,c.timeoutHandle=Ag(ag.bind(null,c,i,Ut,Vo,ff,a,Jt,Ia,Ll,Is,m,"Throttled",-0,0),O);break e}ag(c,i,Ut,Vo,ff,a,Jt,Ia,Ll,Is,m,null,-0,0)}}break}while(!0);Gn(t)}function ag(t,a,i,c,O,m,S,N,_,H,se,ie,K,te){if(t.timeoutHandle=-1,ie=a.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ns},Hp(a,m,ie);var he=(m&62914560)===m?Yo-$e():(m&4194048)===m?eg-$e():0;if(he=ZQ(ie,he),he!==null){ps=m,t.cancelPendingCommit=he(fg.bind(null,t,a,m,i,c,O,S,N,_,se,ie,null,K,te)),Js(t,m,S,!H);return}}fg(t,a,m,i,c,O,S,N,_)}function Jj(t){for(var a=t;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var O=i[c],m=O.getSnapshot;O=O.value;try{if(!Bt(m(),O))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Js(t,a,i,c){a&=~uf,a&=~Ia,t.suspendedLanes|=a,t.pingedLanes&=~a,c&&(t.warmLanes|=a),c=t.expirationTimes;for(var O=a;0<O;){var m=31-Wt(O),S=1<<m;c[m]=-1,O&=~S}i!==0&&hm(t,i,a)}function Go(){return(Ve&6)===0?(ci(0),!1):!0}function xf(){if(Ae!==null){if(De===0)var t=Ae.return;else t=Ae,rs=Ma=null,Cu(t),El=null,Dr=0,t=Ae;for(;t!==null;)_p(t.alternate,t),t=t.return;Ae=null}}function Bl(t,a){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,bQ(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),ps=0,xf(),Fe=t,Ae=i=as(t.current,null),Xe=a,De=0,Kt=null,Is=!1,Dl=$r(t,a),df=!1,Ll=Jt=uf=Ia=Hs=ct=0,Ut=ii=null,ff=!1,(a&8)!==0&&(a|=a&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=a;0<c;){var O=31-Wt(c),m=1<<O;a|=t[O],c&=~m}return xs=a,uo(),i}function lg(t,a){Pe=null,T.H=Jr,a===Zl||a===bo?(a=yx(),De=3):a===bu?(a=yx(),De=4):De=a===Wu?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Kt=a,Ae===null&&(ct=1,Ro(t,un(a,t.current)))}function rg(){var t=Ht.current;return t===null?!0:(Xe&4194048)===Xe?mn===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?t===mn:!1}function ig(){var t=T.H;return T.H=Jr,t===null?Jr:t}function og(){var t=T.A;return T.A=Fj,t}function Do(){ct=4,Is||(Xe&4194048)!==Xe&&Ht.current!==null||(Dl=!0),(Hs&134217727)===0&&(Ia&134217727)===0||Fe===null||Js(Fe,Xe,Jt,!1)}function pf(t,a,i){var c=Ve;Ve|=2;var O=ig(),m=og();(Fe!==t||Xe!==a)&&(Vo=null,Bl(t,a)),a=!1;var S=ct;e:do try{if(De!==0&&Ae!==null){var N=Ae,_=Kt;switch(De){case 8:xf(),S=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(a=!0);var H=De;if(De=0,Kt=null,Il(t,N,_,H),i&&Dl){S=0;break e}break;default:H=De,De=0,Kt=null,Il(t,N,_,H)}}eQ(),S=ct;break}catch(se){lg(t,se)}while(!0);return a&&t.shellSuspendCounter++,rs=Ma=null,Ve=c,T.H=O,T.A=m,Ae===null&&(Fe=null,Xe=0,uo()),S}function eQ(){for(;Ae!==null;)cg(Ae)}function tQ(t,a){var i=Ve;Ve|=2;var c=ig(),O=og();Fe!==t||Xe!==a?(Vo=null,Uo=$e()+500,Bl(t,a)):Dl=$r(t,a);e:do try{if(De!==0&&Ae!==null){a=Ae;var m=Kt;t:switch(De){case 1:De=0,Kt=null,Il(t,a,m,1);break;case 2:case 9:if(bx(m)){De=0,Kt=null,dg(a);break}a=function(){De!==2&&De!==9||Fe!==t||(De=7),Gn(t)},m.then(a,a);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:bx(m)?(De=0,Kt=null,dg(a)):(De=0,Kt=null,Il(t,a,m,7));break;case 5:var S=null;switch(Ae.tag){case 26:S=Ae.memoizedState;case 5:case 27:var N=Ae;if(S?Ig(S):N.stateNode.complete){De=0,Kt=null;var _=N.sibling;if(_!==null)Ae=_;else{var H=N.return;H!==null?(Ae=H,Lo(H)):Ae=null}break t}}De=0,Kt=null,Il(t,a,m,5);break;case 6:De=0,Kt=null,Il(t,a,m,6);break;case 8:xf(),ct=6;break e;default:throw Error(r(462))}}nQ();break}catch(se){lg(t,se)}while(!0);return rs=Ma=null,T.H=c,T.A=O,Ve=i,Ae!==null?0:(Fe=null,Xe=0,uo(),ct)}function nQ(){for(;Ae!==null&&!ne();)cg(Ae)}function cg(t){var a=Rp(t.alternate,t,xs);t.memoizedProps=t.pendingProps,a===null?Lo(t):Ae=a}function dg(t){var a=t,i=a.alternate;switch(a.tag){case 15:case 0:a=Np(i,a,a.pendingProps,a.type,void 0,Xe);break;case 11:a=Np(i,a,a.pendingProps,a.type.render,a.ref,Xe);break;case 5:Cu(a);default:_p(i,a),a=Ae=ox(a,xs),a=Rp(i,a,xs)}t.memoizedProps=t.pendingProps,a===null?Lo(t):Ae=a}function Il(t,a,i,c){rs=Ma=null,Cu(a),El=null,Dr=0;var O=a.return;try{if(Gj(t,O,a,i,Xe)){ct=1,Ro(t,un(i,t.current)),Ae=null;return}}catch(m){if(O!==null)throw Ae=O,m;ct=1,Ro(t,un(i,t.current)),Ae=null;return}a.flags&32768?(qe||c===1?t=!0:Dl||(Xe&536870912)!==0?t=!1:(Is=t=!0,(c===2||c===9||c===3||c===6)&&(c=Ht.current,c!==null&&c.tag===13&&(c.flags|=16384))),ug(a,t)):Lo(a)}function Lo(t){var a=t;do{if((a.flags&32768)!==0){ug(a,Is);return}t=a.return;var i=Wj(a.alternate,a,xs);if(i!==null){Ae=i;return}if(a=a.sibling,a!==null){Ae=a;return}Ae=a=t}while(a!==null);ct===0&&(ct=5)}function ug(t,a){do{var i=Bj(t.alternate,t);if(i!==null){i.flags&=32767,Ae=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(t=t.sibling,t!==null)){Ae=t;return}Ae=t=i}while(t!==null);ct=6,Ae=null}function fg(t,a,i,c,O,m,S,N,_){t.cancelPendingCommit=null;do Wo();while(vt!==0);if((Ve&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(m=a.lanes|a.childLanes,m|=au,_S(t,i,m,S,N,_),t===Fe&&(Ae=Fe=null,Xe=0),Wl=a,Ks=t,ps=i,Of=m,hf=O,tg=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,rQ(_s,function(){return pg(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=T.T,T.T=null,O=L.p,L.p=2,S=Ve,Ve|=4;try{Ij(t,a,i)}finally{Ve=S,L.p=O,T.T=c}}vt=1,Og(),hg(),mg()}}function Og(){if(vt===1){vt=0;var t=Ks,a=Wl,i=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||i){i=T.T,T.T=null;var c=L.p;L.p=2;var O=Ve;Ve|=4;try{Wp(a,t);var m=Tf,S=Jm(t.containerInfo),N=m.focusedElem,_=m.selectionRange;if(S!==N&&N&&N.ownerDocument&&Km(N.ownerDocument.documentElement,N)){if(_!==null&&Jd(N)){var H=_.start,se=_.end;if(se===void 0&&(se=H),"selectionStart"in N)N.selectionStart=H,N.selectionEnd=Math.min(se,N.value.length);else{var ie=N.ownerDocument||document,K=ie&&ie.defaultView||window;if(K.getSelection){var te=K.getSelection(),he=N.textContent.length,Qe=Math.min(_.start,he),Ie=_.end===void 0?Qe:Math.min(_.end,he);!te.extend&&Qe>Ie&&(S=Ie,Ie=Qe,Qe=S);var G=Fm(N,Qe),E=Fm(N,Ie);if(G&&E&&(te.rangeCount!==1||te.anchorNode!==G.node||te.anchorOffset!==G.offset||te.focusNode!==E.node||te.focusOffset!==E.offset)){var I=ie.createRange();I.setStart(G.node,G.offset),te.removeAllRanges(),Qe>Ie?(te.addRange(I),te.extend(E.node,E.offset)):(I.setEnd(E.node,E.offset),te.addRange(I))}}}}for(ie=[],te=N;te=te.parentNode;)te.nodeType===1&&ie.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ie.length;N++){var re=ie[N];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}lc=!!$f,Tf=$f=null}finally{Ve=O,L.p=c,T.T=i}}t.current=a,vt=2}}function hg(){if(vt===2){vt=0;var t=Ks,a=Wl,i=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||i){i=T.T,T.T=null;var c=L.p;L.p=2;var O=Ve;Ve|=4;try{Up(t,a.alternate,a)}finally{Ve=O,L.p=c,T.T=i}}vt=3}}function mg(){if(vt===4||vt===3){vt=0,Ne();var t=Ks,a=Wl,i=ps,c=tg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vt=5:(vt=0,Wl=Ks=null,xg(t,t.pendingLanes));var O=t.pendingLanes;if(O===0&&(Fs=null),Ad(i),a=a.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Nr,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=T.T,O=L.p,L.p=2,T.T=null;try{for(var m=t.onRecoverableError,S=0;S<c.length;S++){var N=c[S];m(N.value,{componentStack:N.stack})}}finally{T.T=a,L.p=O}}(ps&3)!==0&&Wo(),Gn(t),O=t.pendingLanes,(i&261930)!==0&&(O&42)!==0?t===mf?oi++:(oi=0,mf=t):oi=0,ci(0)}}function xg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Vr(a)))}function Wo(){return Og(),hg(),mg(),pg()}function pg(){if(vt!==5)return!1;var t=Ks,a=Of;Of=0;var i=Ad(ps),c=T.T,O=L.p;try{L.p=32>i?32:i,T.T=null,i=hf,hf=null;var m=Ks,S=ps;if(vt=0,Wl=Ks=null,ps=0,(Ve&6)!==0)throw Error(r(331));var N=Ve;if(Ve|=4,Kp(m.current),Ip(m,m.current,S,i),Ve=N,ci(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Nr,m)}catch{}return!0}finally{L.p=O,T.T=c,xg(t,a)}}function gg(t,a,i){a=un(i,a),a=Lu(t.stateNode,a,2),t=Ds(t,a,2),t!==null&&(Tr(t,2),Gn(t))}function Le(t,a,i){if(t.tag===3)gg(t,t,i);else for(;a!==null;){if(a.tag===3){gg(a,t,i);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Fs===null||!Fs.has(c))){t=un(i,t),i=bp(2),c=Ds(a,i,2),c!==null&&(vp(i,c,a,t),Tr(c,2),Gn(c));break}}a=a.return}}function gf(t,a,i){var c=t.pingCache;if(c===null){c=t.pingCache=new Kj;var O=new Set;c.set(a,O)}else O=c.get(a),O===void 0&&(O=new Set,c.set(a,O));O.has(i)||(df=!0,O.add(i),t=sQ.bind(null,t,a,i),a.then(t,t))}function sQ(t,a,i){var c=t.pingCache;c!==null&&c.delete(a),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Fe===t&&(Xe&i)===i&&(ct===4||ct===3&&(Xe&62914560)===Xe&&300>$e()-Yo?(Ve&2)===0&&Bl(t,0):uf|=i,Ll===Xe&&(Ll=0)),Gn(t)}function bg(t,a){a===0&&(a=Om()),t=Za(t,a),t!==null&&(Tr(t,a),Gn(t))}function aQ(t){var a=t.memoizedState,i=0;a!==null&&(i=a.retryLane),bg(t,i)}function lQ(t,a){var i=0;switch(t.tag){case 31:case 13:var c=t.stateNode,O=t.memoizedState;O!==null&&(i=O.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(a),bg(t,i)}function rQ(t,a){return Mn(t,a)}var Bo=null,Hl=null,bf=!1,Io=!1,vf=!1,ea=0;function Gn(t){t!==Hl&&t.next===null&&(Hl===null?Bo=Hl=t:Hl=Hl.next=t),Io=!0,bf||(bf=!0,oQ())}function ci(t,a){if(!vf&&Io){vf=!0;do for(var i=!1,c=Bo;c!==null;){if(t!==0){var O=c.pendingLanes;if(O===0)var m=0;else{var S=c.suspendedLanes,N=c.pingedLanes;m=(1<<31-Wt(42|t)+1)-1,m&=O&~(S&~N),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,jg(c,m))}else m=Xe,m=Ki(c,c===Fe?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||$r(c,m)||(i=!0,jg(c,m));c=c.next}while(i);vf=!1}}function iQ(){vg()}function vg(){Io=bf=!1;var t=0;ea!==0&&gQ()&&(t=ea);for(var a=$e(),i=null,c=Bo;c!==null;){var O=c.next,m=yg(c,a);m===0?(c.next=null,i===null?Bo=O:i.next=O,O===null&&(Hl=i)):(i=c,(t!==0||(m&3)!==0)&&(Io=!0)),c=O}vt!==0&&vt!==5||ci(t),ea!==0&&(ea=0)}function yg(t,a){for(var i=t.suspendedLanes,c=t.pingedLanes,O=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-Wt(m),N=1<<S,_=O[S];_===-1?((N&i)===0||(N&c)!==0)&&(O[S]=AS(N,a)):_<=a&&(t.expiredLanes|=N),m&=~N}if(a=Fe,i=Xe,i=Ki(t,t===a?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,i===0||t===a&&(De===2||De===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ot(c),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||$r(t,i)){if(a=i&-i,a===t.callbackPriority)return a;switch(c!==null&&Ot(c),Ad(i)){case 2:case 8:i=Ca;break;case 32:i=_s;break;case 268435456:i=fm;break;default:i=_s}return c=Sg.bind(null,t),i=Mn(i,c),t.callbackPriority=a,t.callbackNode=i,a}return c!==null&&c!==null&&Ot(c),t.callbackPriority=2,t.callbackNode=null,2}function Sg(t,a){if(vt!==0&&vt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Wo()&&t.callbackNode!==i)return null;var c=Xe;return c=Ki(t,t===Fe?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(sg(t,c,a),yg(t,$e()),t.callbackNode!=null&&t.callbackNode===i?Sg.bind(null,t):null)}function jg(t,a){if(Wo())return null;sg(t,a,!0)}function oQ(){vQ(function(){(Ve&6)!==0?Mn(As,iQ):vg()})}function yf(){if(ea===0){var t=_l;t===0&&(t=Ii,Ii<<=1,(Ii&261888)===0&&(Ii=256)),ea=t}return ea}function Qg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:no(""+t)}function wg(t,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,t.id&&i.setAttribute("form",t.id),a.parentNode.insertBefore(i,a),t=new FormData(t),i.parentNode.removeChild(i),t}function cQ(t,a,i,c,O){if(a==="submit"&&i&&i.stateNode===O){var m=Qg((O[Zt]||null).action),S=c.submitter;S&&(a=(a=S[Zt]||null)?Qg(a.formAction):S.getAttribute("formAction"),a!==null&&(m=a,S=null));var N=new ro("action","action",null,c,O);t.push({event:N,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ea!==0){var _=S?wg(O,S):new FormData(O);Mu(i,{pending:!0,data:_,method:O.method,action:m},null,_)}}else typeof m=="function"&&(N.preventDefault(),_=S?wg(O,S):new FormData(O),Mu(i,{pending:!0,data:_,method:O.method,action:m},m,_))},currentTarget:O}]})}}for(var Sf=0;Sf<su.length;Sf++){var jf=su[Sf],dQ=jf.toLowerCase(),uQ=jf[0].toUpperCase()+jf.slice(1);Nn(dQ,"on"+uQ)}Nn(nx,"onAnimationEnd"),Nn(sx,"onAnimationIteration"),Nn(ax,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(Nj,"onTransitionRun"),Nn($j,"onTransitionStart"),Nn(Tj,"onTransitionCancel"),Nn(lx,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),Ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var di="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fQ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(di));function kg(t,a){a=(a&4)!==0;for(var i=0;i<t.length;i++){var c=t[i],O=c.event;c=c.listeners;e:{var m=void 0;if(a)for(var S=c.length-1;0<=S;S--){var N=c[S],_=N.instance,H=N.currentTarget;if(N=N.listener,_!==m&&O.isPropagationStopped())break e;m=N,O.currentTarget=H;try{m(O)}catch(se){co(se)}O.currentTarget=null,m=_}else for(S=0;S<c.length;S++){if(N=c[S],_=N.instance,H=N.currentTarget,N=N.listener,_!==m&&O.isPropagationStopped())break e;m=N,O.currentTarget=H;try{m(O)}catch(se){co(se)}O.currentTarget=null,m=_}}}}function _e(t,a){var i=a[_d];i===void 0&&(i=a[_d]=new Set);var c=t+"__bubble";i.has(c)||(Ng(a,t,2,!1),i.add(c))}function Qf(t,a,i){var c=0;a&&(c|=4),Ng(i,t,c,a)}var Ho="_reactListening"+Math.random().toString(36).slice(2);function wf(t){if(!t[Ho]){t[Ho]=!0,vm.forEach(function(i){i!=="selectionchange"&&(fQ.has(i)||Qf(i,!1,t),Qf(i,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Ho]||(a[Ho]=!0,Qf("selectionchange",!1,a))}}function Ng(t,a,i,c){switch(n1(a)){case 2:var O=MQ;break;case 8:O=YQ;break;default:O=Mf}i=O.bind(null,a,i,t),O=void 0,!Gd||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(O=!0),c?O!==void 0?t.addEventListener(a,i,{capture:!0,passive:O}):t.addEventListener(a,i,!0):O!==void 0?t.addEventListener(a,i,{passive:O}):t.addEventListener(a,i,!1)}function kf(t,a,i,c,O){var m=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var N=c.stateNode.containerInfo;if(N===O)break;if(S===4)for(S=c.return;S!==null;){var _=S.tag;if((_===3||_===4)&&S.stateNode.containerInfo===O)return;S=S.return}for(;N!==null;){if(S=gl(N),S===null)return;if(_=S.tag,_===5||_===6||_===26||_===27){c=m=S;continue e}N=N.parentNode}}c=c.return}zm(function(){var H=m,se=Ud(i),ie=[];e:{var K=rx.get(t);if(K!==void 0){var te=ro,he=t;switch(t){case"keypress":if(ao(i)===0)break e;case"keydown":case"keyup":te=lj;break;case"focusin":he="focus",te=Bd;break;case"focusout":he="blur",te=Bd;break;case"beforeblur":case"afterblur":te=Bd;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=_m;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=WS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=oj;break;case nx:case sx:case ax:te=HS;break;case lx:te=dj;break;case"scroll":case"scrollend":te=DS;break;case"wheel":te=fj;break;case"copy":case"cut":case"paste":te=KS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Zm;break;case"toggle":case"beforetoggle":te=hj}var Qe=(a&4)!==0,Ie=!Qe&&(t==="scroll"||t==="scrollend"),G=Qe?K!==null?K+"Capture":null:K;Qe=[];for(var E=H,I;E!==null;){var re=E;if(I=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||I===null||G===null||(re=zr(E,G),re!=null&&Qe.push(ui(E,re,I))),Ie)break;E=E.return}0<Qe.length&&(K=new te(K,he,null,i,se),ie.push({event:K,listeners:Qe}))}}if((a&7)===0){e:{if(K=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",K&&i!==Yd&&(he=i.relatedTarget||i.fromElement)&&(gl(he)||he[pl]))break e;if((te||K)&&(K=se.window===se?se:(K=se.ownerDocument)?K.defaultView||K.parentWindow:window,te?(he=i.relatedTarget||i.toElement,te=H,he=he?gl(he):null,he!==null&&(Ie=d(he),Qe=he.tag,he!==Ie||Qe!==5&&Qe!==27&&Qe!==6)&&(he=null)):(te=null,he=H),te!==he)){if(Qe=_m,re="onMouseLeave",G="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(Qe=Zm,re="onPointerLeave",G="onPointerEnter",E="pointer"),Ie=te==null?K:Cr(te),I=he==null?K:Cr(he),K=new Qe(re,E+"leave",te,i,se),K.target=Ie,K.relatedTarget=I,re=null,gl(se)===H&&(Qe=new Qe(G,E+"enter",he,i,se),Qe.target=I,Qe.relatedTarget=Ie,re=Qe),Ie=re,te&&he)t:{for(Qe=OQ,G=te,E=he,I=0,re=G;re;re=Qe(re))I++;re=0;for(var ve=E;ve;ve=Qe(ve))re++;for(;0<I-re;)G=Qe(G),I--;for(;0<re-I;)E=Qe(E),re--;for(;I--;){if(G===E||E!==null&&G===E.alternate){Qe=G;break t}G=Qe(G),E=Qe(E)}Qe=null}else Qe=null;te!==null&&$g(ie,K,te,Qe,!1),he!==null&&Ie!==null&&$g(ie,Ie,he,Qe,!0)}}e:{if(K=H?Cr(H):window,te=K.nodeName&&K.nodeName.toLowerCase(),te==="select"||te==="input"&&K.type==="file")var Ye=Dm;else if(Vm(K))if(Lm)Ye=Qj;else{Ye=Sj;var pe=yj}else te=K.nodeName,!te||te.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?H&&Md(H.elementType)&&(Ye=Dm):Ye=jj;if(Ye&&(Ye=Ye(t,H))){Gm(ie,Ye,i,se);break e}pe&&pe(t,K,H),t==="focusout"&&H&&K.type==="number"&&H.memoizedProps.value!=null&&qd(K,"number",K.value)}switch(pe=H?Cr(H):window,t){case"focusin":(Vm(pe)||pe.contentEditable==="true")&&(Nl=pe,eu=H,Mr=null);break;case"focusout":Mr=eu=Nl=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,ex(ie,i,se);break;case"selectionchange":if(kj)break;case"keydown":case"keyup":ex(ie,i,se)}var Ce;if(Hd)e:{switch(t){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else kl?Ym(t,i)&&(Ze="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Ze="onCompositionStart");Ze&&(Em&&i.locale!=="ko"&&(kl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&kl&&(Ce=Rm()):(Es=se,Dd="value"in Es?Es.value:Es.textContent,kl=!0)),pe=Fo(H,Ze),0<pe.length&&(Ze=new Xm(Ze,t,null,i,se),ie.push({event:Ze,listeners:pe}),Ce?Ze.data=Ce:(Ce=Um(i),Ce!==null&&(Ze.data=Ce)))),(Ce=xj?pj(t,i):gj(t,i))&&(Ze=Fo(H,"onBeforeInput"),0<Ze.length&&(pe=new Xm("onBeforeInput","beforeinput",null,i,se),ie.push({event:pe,listeners:Ze}),pe.data=Ce)),cQ(ie,t,H,i,se)}kg(ie,a)})}function ui(t,a,i){return{instance:t,listener:a,currentTarget:i}}function Fo(t,a){for(var i=a+"Capture",c=[];t!==null;){var O=t,m=O.stateNode;if(O=O.tag,O!==5&&O!==26&&O!==27||m===null||(O=zr(t,i),O!=null&&c.unshift(ui(t,O,m)),O=zr(t,a),O!=null&&c.push(ui(t,O,m))),t.tag===3)return c;t=t.return}return[]}function OQ(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $g(t,a,i,c,O){for(var m=a._reactName,S=[];i!==null&&i!==c;){var N=i,_=N.alternate,H=N.stateNode;if(N=N.tag,_!==null&&_===c)break;N!==5&&N!==26&&N!==27||H===null||(_=H,O?(H=zr(i,m),H!=null&&S.unshift(ui(i,H,_))):O||(H=zr(i,m),H!=null&&S.push(ui(i,H,_)))),i=i.return}S.length!==0&&t.push({event:a,listeners:S})}var hQ=/\r\n?/g,mQ=/\u0000|\uFFFD/g;function Tg(t){return(typeof t=="string"?t:""+t).replace(hQ,`
25
+ `).replace(mQ,"")}function Pg(t,a){return a=Tg(a),Tg(t)===a}function Be(t,a,i,c,O,m){switch(i){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||jl(t,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&jl(t,""+c);break;case"className":eo(t,"class",c);break;case"tabIndex":eo(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":eo(t,i,c);break;case"style":Pm(t,c,m);break;case"data":if(a!=="object"){eo(t,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||i!=="href")){t.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=no(""+c),t.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(i==="formAction"?(a!=="input"&&Be(t,a,"name",O.name,O,null),Be(t,a,"formEncType",O.formEncType,O,null),Be(t,a,"formMethod",O.formMethod,O,null),Be(t,a,"formTarget",O.formTarget,O,null)):(Be(t,a,"encType",O.encType,O,null),Be(t,a,"method",O.method,O,null),Be(t,a,"target",O.target,O,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=no(""+c),t.setAttribute(i,c);break;case"onClick":c!=null&&(t.onclick=ns);break;case"onScroll":c!=null&&_e("scroll",t);break;case"onScrollEnd":c!=null&&_e("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(i=c.__html,i!=null){if(O.children!=null)throw Error(r(60));t.innerHTML=i}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}i=no(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,""+c):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":c===!0?t.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,c):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(i,c):t.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(i):t.setAttribute(i,c);break;case"popover":_e("beforetoggle",t),_e("toggle",t),Ji(t,"popover",c);break;case"xlinkActuate":ts(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ts(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ts(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ts(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ts(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ts(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ts(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ts(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ts(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ji(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=VS.get(i)||i,Ji(t,i,c))}}function Nf(t,a,i,c,O,m){switch(i){case"style":Pm(t,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(i=c.__html,i!=null){if(O.children!=null)throw Error(r(60));t.innerHTML=i}}break;case"children":typeof c=="string"?jl(t,c):(typeof c=="number"||typeof c=="bigint")&&jl(t,""+c);break;case"onScroll":c!=null&&_e("scroll",t);break;case"onScrollEnd":c!=null&&_e("scrollend",t);break;case"onClick":c!=null&&(t.onclick=ns);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ym.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(O=i.endsWith("Capture"),a=i.slice(2,O?i.length-7:void 0),m=t[Zt]||null,m=m!=null?m[i]:null,typeof m=="function"&&t.removeEventListener(a,m,O),typeof c=="function")){typeof m!="function"&&m!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(a,c,O);break e}i in t?t[i]=c:c===!0?t.setAttribute(i,""):Ji(t,i,c)}}}function At(t,a,i){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",t),_e("load",t);var c=!1,O=!1,m;for(m in i)if(i.hasOwnProperty(m)){var S=i[m];if(S!=null)switch(m){case"src":c=!0;break;case"srcSet":O=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Be(t,a,m,S,i,null)}}O&&Be(t,a,"srcSet",i.srcSet,i,null),c&&Be(t,a,"src",i.src,i,null);return;case"input":_e("invalid",t);var N=m=S=O=null,_=null,H=null;for(c in i)if(i.hasOwnProperty(c)){var se=i[c];if(se!=null)switch(c){case"name":O=se;break;case"type":S=se;break;case"checked":_=se;break;case"defaultChecked":H=se;break;case"value":m=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,a));break;default:Be(t,a,c,se,i,null)}}km(t,m,N,_,H,S,O,!1);return;case"select":_e("invalid",t),c=S=m=null;for(O in i)if(i.hasOwnProperty(O)&&(N=i[O],N!=null))switch(O){case"value":m=N;break;case"defaultValue":S=N;break;case"multiple":c=N;default:Be(t,a,O,N,i,null)}a=m,i=S,t.multiple=!!c,a!=null?Sl(t,!!c,a,!1):i!=null&&Sl(t,!!c,i,!0);return;case"textarea":_e("invalid",t),m=O=c=null;for(S in i)if(i.hasOwnProperty(S)&&(N=i[S],N!=null))switch(S){case"value":c=N;break;case"defaultValue":O=N;break;case"children":m=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Be(t,a,S,N,i,null)}$m(t,c,O,m);return;case"option":for(_ in i)if(i.hasOwnProperty(_)&&(c=i[_],c!=null))switch(_){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Be(t,a,_,c,i,null)}return;case"dialog":_e("beforetoggle",t),_e("toggle",t),_e("cancel",t),_e("close",t);break;case"iframe":case"object":_e("load",t);break;case"video":case"audio":for(c=0;c<di.length;c++)_e(di[c],t);break;case"image":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"embed":case"source":case"link":_e("error",t),_e("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in i)if(i.hasOwnProperty(H)&&(c=i[H],c!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Be(t,a,H,c,i,null)}return;default:if(Md(a)){for(se in i)i.hasOwnProperty(se)&&(c=i[se],c!==void 0&&Nf(t,a,se,c,i,void 0));return}}for(N in i)i.hasOwnProperty(N)&&(c=i[N],c!=null&&Be(t,a,N,c,i,null))}function xQ(t,a,i,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var O=null,m=null,S=null,N=null,_=null,H=null,se=null;for(te in i){var ie=i[te];if(i.hasOwnProperty(te)&&ie!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":_=ie;default:c.hasOwnProperty(te)||Be(t,a,te,null,c,ie)}}for(var K in c){var te=c[K];if(ie=i[K],c.hasOwnProperty(K)&&(te!=null||ie!=null))switch(K){case"type":m=te;break;case"name":O=te;break;case"checked":H=te;break;case"defaultChecked":se=te;break;case"value":S=te;break;case"defaultValue":N=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,a));break;default:te!==ie&&Be(t,a,K,te,c,ie)}}Ed(t,S,N,_,H,se,m,O);return;case"select":te=S=N=K=null;for(m in i)if(_=i[m],i.hasOwnProperty(m)&&_!=null)switch(m){case"value":break;case"multiple":te=_;default:c.hasOwnProperty(m)||Be(t,a,m,null,c,_)}for(O in c)if(m=c[O],_=i[O],c.hasOwnProperty(O)&&(m!=null||_!=null))switch(O){case"value":K=m;break;case"defaultValue":N=m;break;case"multiple":S=m;default:m!==_&&Be(t,a,O,m,c,_)}a=N,i=S,c=te,K!=null?Sl(t,!!i,K,!1):!!c!=!!i&&(a!=null?Sl(t,!!i,a,!0):Sl(t,!!i,i?[]:"",!1));return;case"textarea":te=K=null;for(N in i)if(O=i[N],i.hasOwnProperty(N)&&O!=null&&!c.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Be(t,a,N,null,c,O)}for(S in c)if(O=c[S],m=i[S],c.hasOwnProperty(S)&&(O!=null||m!=null))switch(S){case"value":K=O;break;case"defaultValue":te=O;break;case"children":break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:O!==m&&Be(t,a,S,O,c,m)}Nm(t,K,te);return;case"option":for(var he in i)if(K=i[he],i.hasOwnProperty(he)&&K!=null&&!c.hasOwnProperty(he))switch(he){case"selected":t.selected=!1;break;default:Be(t,a,he,null,c,K)}for(_ in c)if(K=c[_],te=i[_],c.hasOwnProperty(_)&&K!==te&&(K!=null||te!=null))switch(_){case"selected":t.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:Be(t,a,_,K,c,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Qe in i)K=i[Qe],i.hasOwnProperty(Qe)&&K!=null&&!c.hasOwnProperty(Qe)&&Be(t,a,Qe,null,c,K);for(H in c)if(K=c[H],te=i[H],c.hasOwnProperty(H)&&K!==te&&(K!=null||te!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,a));break;default:Be(t,a,H,K,c,te)}return;default:if(Md(a)){for(var Ie in i)K=i[Ie],i.hasOwnProperty(Ie)&&K!==void 0&&!c.hasOwnProperty(Ie)&&Nf(t,a,Ie,void 0,c,K);for(se in c)K=c[se],te=i[se],!c.hasOwnProperty(se)||K===te||K===void 0&&te===void 0||Nf(t,a,se,K,c,te);return}}for(var G in i)K=i[G],i.hasOwnProperty(G)&&K!=null&&!c.hasOwnProperty(G)&&Be(t,a,G,null,c,K);for(ie in c)K=c[ie],te=i[ie],!c.hasOwnProperty(ie)||K===te||K==null&&te==null||Be(t,a,ie,K,c,te)}function Cg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pQ(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var O=i[c],m=O.transferSize,S=O.initiatorType,N=O.duration;if(m&&N&&Cg(S)){for(S=0,N=O.responseEnd,c+=1;c<i.length;c++){var _=i[c],H=_.startTime;if(H>N)break;var se=_.transferSize,ie=_.initiatorType;se&&Cg(ie)&&(_=_.responseEnd,S+=se*(_<N?1:(N-H)/(_-H)))}if(--c,a+=8*(m+S)/(O.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var $f=null,Tf=null;function Ko(t){return t.nodeType===9?t:t.ownerDocument}function zg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rg(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Pf(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Cf=null;function gQ(){var t=window.event;return t&&t.type==="popstate"?t===Cf?!1:(Cf=t,!0):(Cf=null,!1)}var Ag=typeof setTimeout=="function"?setTimeout:void 0,bQ=typeof clearTimeout=="function"?clearTimeout:void 0,_g=typeof Promise=="function"?Promise:void 0,vQ=typeof queueMicrotask=="function"?queueMicrotask:typeof _g<"u"?function(t){return _g.resolve(null).then(t).catch(yQ)}:Ag;function yQ(t){setTimeout(function(){throw t})}function ta(t){return t==="head"}function Xg(t,a){var i=a,c=0;do{var O=i.nextSibling;if(t.removeChild(i),O&&O.nodeType===8)if(i=O.data,i==="/$"||i==="/&"){if(c===0){t.removeChild(O),er(a);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")fi(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,fi(i);for(var m=i.firstChild;m;){var S=m.nextSibling,N=m.nodeName;m[Pr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=S}}else i==="body"&&fi(t.ownerDocument.body);i=O}while(i);er(a)}function Zg(t,a){var i=t;t=0;do{var c=i.nextSibling;if(i.nodeType===1?a?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(a?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=c}while(i)}function zf(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":zf(i),Xd(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function SQ(t,a,i,c){for(;t.nodeType===1;){var O=i;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Pr])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==O.rel||t.getAttribute("href")!==(O.href==null||O.href===""?null:O.href)||t.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin)||t.getAttribute("title")!==(O.title==null?null:O.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(O.src==null?null:O.src)||t.getAttribute("type")!==(O.type==null?null:O.type)||t.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=O.name==null?null:""+O.name;if(O.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=xn(t.nextSibling),t===null)break}return null}function jQ(t,a,i){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=xn(t.nextSibling),t===null))return null;return t}function Eg(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=xn(t.nextSibling),t===null))return null;return t}function Rf(t){return t.data==="$?"||t.data==="$~"}function Af(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function QQ(t,a){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||i.readyState!=="loading")a();else{var c=function(){a(),i.removeEventListener("DOMContentLoaded",c)};i.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function xn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var _f=null;function qg(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(a===0)return xn(t.nextSibling);a--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||a++}t=t.nextSibling}return null}function Mg(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(a===0)return t;a--}else i!=="/$"&&i!=="/&"||a++}t=t.previousSibling}return null}function Yg(t,a,i){switch(a=Ko(i),t){case"html":if(t=a.documentElement,!t)throw Error(r(452));return t;case"head":if(t=a.head,!t)throw Error(r(453));return t;case"body":if(t=a.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function fi(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Xd(t)}var pn=new Map,Ug=new Set;function Jo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var gs=L.d;L.d={f:wQ,r:kQ,D:NQ,C:$Q,L:TQ,m:PQ,X:zQ,S:CQ,M:RQ};function wQ(){var t=gs.f(),a=Go();return t||a}function kQ(t){var a=bl(t);a!==null&&a.tag===5&&a.type==="form"?lp(a):gs.r(t)}var Fl=typeof document>"u"?null:document;function Vg(t,a,i){var c=Fl;if(c&&typeof a=="string"&&a){var O=cn(a);O='link[rel="'+t+'"][href="'+O+'"]',typeof i=="string"&&(O+='[crossorigin="'+i+'"]'),Ug.has(O)||(Ug.add(O),t={rel:t,crossOrigin:i,href:a},c.querySelector(O)===null&&(a=c.createElement("link"),At(a,"link",t),Qt(a),c.head.appendChild(a)))}}function NQ(t){gs.D(t),Vg("dns-prefetch",t,null)}function $Q(t,a){gs.C(t,a),Vg("preconnect",t,a)}function TQ(t,a,i){gs.L(t,a,i);var c=Fl;if(c&&t&&a){var O='link[rel="preload"][as="'+cn(a)+'"]';a==="image"&&i&&i.imageSrcSet?(O+='[imagesrcset="'+cn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(O+='[imagesizes="'+cn(i.imageSizes)+'"]')):O+='[href="'+cn(t)+'"]';var m=O;switch(a){case"style":m=Kl(t);break;case"script":m=Jl(t)}pn.has(m)||(t=p({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:t,as:a},i),pn.set(m,t),c.querySelector(O)!==null||a==="style"&&c.querySelector(Oi(m))||a==="script"&&c.querySelector(hi(m))||(a=c.createElement("link"),At(a,"link",t),Qt(a),c.head.appendChild(a)))}}function PQ(t,a){gs.m(t,a);var i=Fl;if(i&&t){var c=a&&typeof a.as=="string"?a.as:"script",O='link[rel="modulepreload"][as="'+cn(c)+'"][href="'+cn(t)+'"]',m=O;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Jl(t)}if(!pn.has(m)&&(t=p({rel:"modulepreload",href:t},a),pn.set(m,t),i.querySelector(O)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(hi(m)))return}c=i.createElement("link"),At(c,"link",t),Qt(c),i.head.appendChild(c)}}}function CQ(t,a,i){gs.S(t,a,i);var c=Fl;if(c&&t){var O=vl(c).hoistableStyles,m=Kl(t);a=a||"default";var S=O.get(m);if(!S){var N={loading:0,preload:null};if(S=c.querySelector(Oi(m)))N.loading=5;else{t=p({rel:"stylesheet",href:t,"data-precedence":a},i),(i=pn.get(m))&&Xf(t,i);var _=S=c.createElement("link");Qt(_),At(_,"link",t),_._p=new Promise(function(H,se){_.onload=H,_.onerror=se}),_.addEventListener("load",function(){N.loading|=1}),_.addEventListener("error",function(){N.loading|=2}),N.loading|=4,ec(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:N},O.set(m,S)}}}function zQ(t,a){gs.X(t,a);var i=Fl;if(i&&t){var c=vl(i).hoistableScripts,O=Jl(t),m=c.get(O);m||(m=i.querySelector(hi(O)),m||(t=p({src:t,async:!0},a),(a=pn.get(O))&&Zf(t,a),m=i.createElement("script"),Qt(m),At(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(O,m))}}function RQ(t,a){gs.M(t,a);var i=Fl;if(i&&t){var c=vl(i).hoistableScripts,O=Jl(t),m=c.get(O);m||(m=i.querySelector(hi(O)),m||(t=p({src:t,async:!0,type:"module"},a),(a=pn.get(O))&&Zf(t,a),m=i.createElement("script"),Qt(m),At(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(O,m))}}function Gg(t,a,i,c){var O=(O=ke.current)?Jo(O):null;if(!O)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=Kl(i.href),i=vl(O).hoistableStyles,c=i.get(a),c||(c={type:"style",instance:null,count:0,state:null},i.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=Kl(i.href);var m=vl(O).hoistableStyles,S=m.get(t);if(S||(O=O.ownerDocument||O,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=O.querySelector(Oi(t)))&&!m._p&&(S.instance=m,S.state.loading=5),pn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},pn.set(t,i),m||AQ(O,t,i,S.state))),a&&c===null)throw Error(r(528,""));return S}if(a&&c!==null)throw Error(r(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Jl(i),i=vl(O).hoistableScripts,c=i.get(a),c||(c={type:"script",instance:null,count:0,state:null},i.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Kl(t){return'href="'+cn(t)+'"'}function Oi(t){return'link[rel="stylesheet"]['+t+"]"}function Dg(t){return p({},t,{"data-precedence":t.precedence,precedence:null})}function AQ(t,a,i,c){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=t.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),At(a,"link",i),Qt(a),t.head.appendChild(a))}function Jl(t){return'[src="'+cn(t)+'"]'}function hi(t){return"script[async]"+t}function Lg(t,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var c=t.querySelector('style[data-href~="'+cn(i.href)+'"]');if(c)return a.instance=c,Qt(c),c;var O=p({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),Qt(c),At(c,"style",O),ec(c,i.precedence,t),a.instance=c;case"stylesheet":O=Kl(i.href);var m=t.querySelector(Oi(O));if(m)return a.state.loading|=4,a.instance=m,Qt(m),m;c=Dg(i),(O=pn.get(O))&&Xf(c,O),m=(t.ownerDocument||t).createElement("link"),Qt(m);var S=m;return S._p=new Promise(function(N,_){S.onload=N,S.onerror=_}),At(m,"link",c),a.state.loading|=4,ec(m,i.precedence,t),a.instance=m;case"script":return m=Jl(i.src),(O=t.querySelector(hi(m)))?(a.instance=O,Qt(O),O):(c=i,(O=pn.get(m))&&(c=p({},i),Zf(c,O)),t=t.ownerDocument||t,O=t.createElement("script"),Qt(O),At(O,"link",c),t.head.appendChild(O),a.instance=O);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,ec(c,i.precedence,t));return a.instance}function ec(t,a,i){for(var c=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),O=c.length?c[c.length-1]:null,m=O,S=0;S<c.length;S++){var N=c[S];if(N.dataset.precedence===a)m=N;else if(m!==O)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=i.nodeType===9?i.head:i,a.insertBefore(t,a.firstChild))}function Xf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Zf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var tc=null;function Wg(t,a,i){if(tc===null){var c=new Map,O=tc=new Map;O.set(i,c)}else O=tc,c=O.get(i),c||(c=new Map,O.set(i,c));if(c.has(t))return c;for(c.set(t,null),i=i.getElementsByTagName(t),O=0;O<i.length;O++){var m=i[O];if(!(m[Pr]||m[Pt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(a)||"";S=t+S;var N=c.get(S);N?N.push(m):c.set(S,[m])}}return c}function Bg(t,a,i){t=t.ownerDocument||t,t.head.insertBefore(i,a==="title"?t.querySelector("head > title"):null)}function _Q(t,a,i){if(i===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ig(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function XQ(t,a,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var O=Kl(c.href),m=a.querySelector(Oi(O));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=nc.bind(t),a.then(t,t)),i.state.loading|=4,i.instance=m,Qt(m);return}m=a.ownerDocument||a,c=Dg(c),(O=pn.get(O))&&Xf(c,O),m=m.createElement("link"),Qt(m);var S=m;S._p=new Promise(function(N,_){S.onload=N,S.onerror=_}),At(m,"link",c),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=nc.bind(t),a.addEventListener("load",i),a.addEventListener("error",i))}}var Ef=0;function ZQ(t,a){return t.stylesheets&&t.count===0&&ac(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var c=setTimeout(function(){if(t.stylesheets&&ac(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&Ef===0&&(Ef=62500*pQ());var O=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ac(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Ef?50:800)+a);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(O)}}:null}function nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ac(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var sc=null;function ac(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,sc=new Map,a.forEach(EQ,t),sc=null,nc.call(t))}function EQ(t,a){if(!(a.state.loading&4)){var i=sc.get(t);if(i)var c=i.get(null);else{i=new Map,sc.set(t,i);for(var O=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<O.length;m++){var S=O[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),c=S)}c&&i.set(null,c)}O=a.instance,S=O.getAttribute("data-precedence"),m=i.get(S)||c,m===c&&i.set(null,O),i.set(S,O),this.count++,c=nc.bind(this),O.addEventListener("load",c),O.addEventListener("error",c),m?m.parentNode.insertBefore(O,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(O,t.firstChild)),a.state.loading|=4}}var mi={$$typeof:P,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function qQ(t,a,i,c,O,m,S,N,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zd(0),this.hiddenUpdates=zd(null),this.identifierPrefix=c,this.onUncaughtError=O,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Hg(t,a,i,c,O,m,S,N,_,H,se,ie){return t=new qQ(t,a,i,S,_,H,se,ie,N),a=1,m===!0&&(a|=24),m=It(3,null,null,a),t.current=m,m.stateNode=t,a=xu(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:c,isDehydrated:i,cache:a},vu(m),t}function Fg(t){return t?(t=Pl,t):Pl}function Kg(t,a,i,c,O,m){O=Fg(O),c.context===null?c.context=O:c.pendingContext=O,c=Gs(a),c.payload={element:i},m=m===void 0?null:m,m!==null&&(c.callback=m),i=Ds(t,c,a),i!==null&&(Vt(i,t,a),Wr(i,t,a))}function Jg(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<a?i:a}}function qf(t,a){Jg(t,a),(t=t.alternate)&&Jg(t,a)}function e1(t){if(t.tag===13||t.tag===31){var a=Za(t,67108864);a!==null&&Vt(a,t,67108864),qf(t,67108864)}}function t1(t){if(t.tag===13||t.tag===31){var a=en();a=Rd(a);var i=Za(t,a);i!==null&&Vt(i,t,a),qf(t,a)}}var lc=!0;function MQ(t,a,i,c){var O=T.T;T.T=null;var m=L.p;try{L.p=2,Mf(t,a,i,c)}finally{L.p=m,T.T=O}}function YQ(t,a,i,c){var O=T.T;T.T=null;var m=L.p;try{L.p=8,Mf(t,a,i,c)}finally{L.p=m,T.T=O}}function Mf(t,a,i,c){if(lc){var O=Yf(c);if(O===null)kf(t,a,c,rc,i),s1(t,c);else if(VQ(O,t,a,i,c))c.stopPropagation();else if(s1(t,c),a&4&&-1<UQ.indexOf(t)){for(;O!==null;){var m=bl(O);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=za(m.pendingLanes);if(S!==0){var N=m;for(N.pendingLanes|=2,N.entangledLanes|=2;S;){var _=1<<31-Wt(S);N.entanglements[1]|=_,S&=~_}Gn(m),(Ve&6)===0&&(Uo=$e()+500,ci(0))}}break;case 31:case 13:N=Za(m,2),N!==null&&Vt(N,m,2),Go(),qf(m,2)}if(m=Yf(c),m===null&&kf(t,a,c,rc,i),m===O)break;O=m}O!==null&&c.stopPropagation()}else kf(t,a,c,null,i)}}function Yf(t){return t=Ud(t),Uf(t)}var rc=null;function Uf(t){if(rc=null,t=gl(t),t!==null){var a=d(t);if(a===null)t=null;else{var i=a.tag;if(i===13){if(t=u(a),t!==null)return t;t=null}else if(i===31){if(t=f(a),t!==null)return t;t=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return rc=t,null}function n1(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(bt()){case As:return 2;case Ca:return 8;case _s:case $S:return 32;case fm:return 268435456;default:return 32}default:return 32}}var Vf=!1,na=null,sa=null,aa=null,xi=new Map,pi=new Map,la=[],UQ="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function s1(t,a){switch(t){case"focusin":case"focusout":na=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":xi.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":pi.delete(a.pointerId)}}function gi(t,a,i,c,O,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:i,eventSystemFlags:c,nativeEvent:m,targetContainers:[O]},a!==null&&(a=bl(a),a!==null&&e1(a)),t):(t.eventSystemFlags|=c,a=t.targetContainers,O!==null&&a.indexOf(O)===-1&&a.push(O),t)}function VQ(t,a,i,c,O){switch(a){case"focusin":return na=gi(na,t,a,i,c,O),!0;case"dragenter":return sa=gi(sa,t,a,i,c,O),!0;case"mouseover":return aa=gi(aa,t,a,i,c,O),!0;case"pointerover":var m=O.pointerId;return xi.set(m,gi(xi.get(m)||null,t,a,i,c,O)),!0;case"gotpointercapture":return m=O.pointerId,pi.set(m,gi(pi.get(m)||null,t,a,i,c,O)),!0}return!1}function a1(t){var a=gl(t.target);if(a!==null){var i=d(a);if(i!==null){if(a=i.tag,a===13){if(a=u(i),a!==null){t.blockedOn=a,gm(t.priority,function(){t1(i)});return}}else if(a===31){if(a=f(i),a!==null){t.blockedOn=a,gm(t.priority,function(){t1(i)});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ic(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var i=Yf(t.nativeEvent);if(i===null){i=t.nativeEvent;var c=new i.constructor(i.type,i);Yd=c,i.target.dispatchEvent(c),Yd=null}else return a=bl(i),a!==null&&e1(a),t.blockedOn=i,!1;a.shift()}return!0}function l1(t,a,i){ic(t)&&i.delete(a)}function GQ(){Vf=!1,na!==null&&ic(na)&&(na=null),sa!==null&&ic(sa)&&(sa=null),aa!==null&&ic(aa)&&(aa=null),xi.forEach(l1),pi.forEach(l1)}function oc(t,a){t.blockedOn===a&&(t.blockedOn=null,Vf||(Vf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,GQ)))}var cc=null;function r1(t){cc!==t&&(cc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){cc===t&&(cc=null);for(var a=0;a<t.length;a+=3){var i=t[a],c=t[a+1],O=t[a+2];if(typeof c!="function"){if(Uf(c||i)===null)continue;break}var m=bl(i);m!==null&&(t.splice(a,3),a-=3,Mu(m,{pending:!0,data:O,method:i.method,action:c},c,O))}}))}function er(t){function a(_){return oc(_,t)}na!==null&&oc(na,t),sa!==null&&oc(sa,t),aa!==null&&oc(aa,t),xi.forEach(a),pi.forEach(a);for(var i=0;i<la.length;i++){var c=la[i];c.blockedOn===t&&(c.blockedOn=null)}for(;0<la.length&&(i=la[0],i.blockedOn===null);)a1(i),i.blockedOn===null&&la.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var O=i[c],m=i[c+1],S=O[Zt]||null;if(typeof m=="function")S||r1(i);else if(S){var N=null;if(m&&m.hasAttribute("formAction")){if(O=m,S=m[Zt]||null)N=S.formAction;else if(Uf(O)!==null)continue}else N=S.action;typeof N=="function"?i[c+1]=N:(i.splice(c,3),c-=3),r1(i)}}}function i1(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return O=S})},focusReset:"manual",scroll:"manual"})}function a(){O!==null&&(O(),O=null),c||setTimeout(i,20)}function i(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,O=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(i,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),O!==null&&(O(),O=null)}}}function Gf(t){this._internalRoot=t}dc.prototype.render=Gf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var i=a.current,c=en();Kg(i,c,t,a,null,null)},dc.prototype.unmount=Gf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Kg(t.current,2,null,t,null,null),Go(),a[pl]=null}};function dc(t){this._internalRoot=t}dc.prototype.unstable_scheduleHydration=function(t){if(t){var a=pm();t={blockedOn:null,target:t,priority:a};for(var i=0;i<la.length&&a!==0&&a<la[i].priority;i++);la.splice(i,0,t),i===0&&a1(t)}};var o1=n.version;if(o1!=="19.2.4")throw Error(r(527,o1,"19.2.4"));L.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=x(a),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var DQ={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Nr=uc.inject(DQ),Lt=uc}catch{}}return bi.createRoot=function(t,a){if(!o(t))throw Error(r(299));var i=!1,c="",O=mp,m=xp,S=pp;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(O=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=Hg(t,1,!1,null,null,i,c,null,O,m,S,i1),t[pl]=a.current,wf(t),new Gf(a)},bi.hydrateRoot=function(t,a,i){if(!o(t))throw Error(r(299));var c=!1,O="",m=mp,S=xp,N=pp,_=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(O=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(N=i.onRecoverableError),i.formState!==void 0&&(_=i.formState)),a=Hg(t,1,!0,a,i??null,c,O,_,m,S,N,i1),a.context=Fg(null),i=a.current,c=en(),c=Rd(c),O=Gs(c),O.callback=null,Ds(i,O,c),i=c,a.current.lanes=i,Tr(a,i),Gn(a),t[pl]=a.current,wf(t),new dc(a)},bi.version="19.2.4",bi}var O1;function zw(){if(O1)return Df.exports;O1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Df.exports=Cw(),Df.exports}var Rw=zw();const Aw="/api";class _w extends Error{constructor(n,l,r){super(n),this.name="ApiError",this.status=l,this.body=r}}async function vi(e,n,l){const r=`${Aw}${n}`,o={method:e,headers:{}};l!==void 0&&(o.headers["Content-Type"]="application/json",o.body=JSON.stringify(l));const d=await fetch(r,o),u=await d.text();let f;try{f=JSON.parse(u)}catch{f=u}if(!d.ok)throw new _w((f==null?void 0:f.error)||(f==null?void 0:f.message)||`Request failed: ${d.status}`,d.status,f);return f}const B={get:e=>vi("GET",e),post:(e,n)=>vi("POST",e,n),put:(e,n)=>vi("PUT",e,n),patch:(e,n)=>vi("PATCH",e,n),delete:(e,n)=>vi("DELETE",e,n)},Xw=`ws://${window.location.hostname}:${window.location.port||31415}`;let Zw=0,Dn=null;function Cc(e,n={}){try{return JSON.parse(localStorage.getItem(e)||JSON.stringify(n))}catch{return n}}function Ka(e,n){try{localStorage.setItem(e,JSON.stringify(n))}catch{}}const h1="0.22.27";Cc("groove:storeVersion")!==h1&&(localStorage.removeItem("groove:chatHistory"),localStorage.removeItem("groove:activityLog"),Ka("groove:storeVersion",h1));const M=BQ((e,n)=>({agents:[],connected:!1,hydrated:!1,ws:null,daemonHost:null,tunneled:!1,teams:[],activeTeamId:localStorage.getItem("groove:activeTeamId")||null,gateways:[],activeView:"agents",detailPanel:null,teamDetailPanels:{},commandPaletteOpen:!1,quickConnectOpen:!1,expandedNodes:Cc("groove:expandedNodes"),detailPanelWidth:Number(localStorage.getItem("groove:detailWidth"))||480,terminalVisible:localStorage.getItem("groove:terminalVisible")==="true",terminalHeight:Number(localStorage.getItem("groove:terminalHeight"))||260,terminalFullHeight:!1,activityLog:Cc("groove:activityLog"),chatHistory:Cc("groove:chatHistory"),chatInputs:{},tokenTimeline:{},pendingApprovals:[],resolvedApprovals:[],recommendedTeam:null,journalistStatus:null,marketplaceUser:null,marketplaceAuthenticated:!1,toasts:[],savedTunnels:[],activeTunnelId:null,importedRepos:[],importInProgress:!1,editorFiles:{},editorActiveFile:null,editorOpenTabs:[],editorTreeCache:{},editorChangedFiles:{},editorRecentSaves:{},connect(){if(n().ws)return;const l=new WebSocket(Xw);e({ws:l}),l.onopen=()=>{e({connected:!0}),B.get("/status").then(r=>{const o={};r.host&&r.host!=="127.0.0.1"&&(o.daemonHost=r.host);const d=window.location.port||"80";String(r.port)!==d&&(o.tunneled=!0),Object.keys(o).length>0&&e(o)}).catch(()=>{}),n().fetchTeams(),n().fetchApprovals(),n().checkMarketplaceAuth()},l.onmessage=r=>{var d;const o=JSON.parse(r.data);switch(o.type){case"state":{const u={...n().tokenTimeline},f=Date.now();for(const p of o.data){u[p.id]||(u[p.id]=[]);const b=u[p.id],y=b[b.length-1];(!y||p.tokensUsed!==y.v||f-y.t>5e3)&&(b.push({t:f,v:p.tokensUsed||0}),b.length>200&&(u[p.id]=b.slice(-200)))}const h=n().agents,x=o.data.length!==h.length||o.data.some((p,b)=>{const y=h[b];return!y||y.id!==p.id||y.status!==p.status||y.tokensUsed!==p.tokensUsed||y.contextUsage!==p.contextUsage||y.name!==p.name||y.model!==p.model});e({agents:x?o.data:h,tokenTimeline:u,hydrated:!0});const g=o.data.some(p=>p.role==="planner"&&p.status==="running");g&&!Dn&&!n().recommendedTeam?Dn=setInterval(()=>{if(n().recommendedTeam){clearInterval(Dn),Dn=null;return}n().checkRecommendedTeam()},3e3):(!g||n().recommendedTeam)&&Dn&&(clearInterval(Dn),Dn=null);break}case"agent:output":{const{agentId:u,data:f}=o;let h="",x="";if(typeof f.data=="string"?h=f.data:Array.isArray(f.data)&&(h=f.data.filter(b=>b.type==="text").map(b=>b.text).join(`
26
+ `),x=f.data.filter(b=>b.type==="tool_use").map(b=>{var y,j,w;return`${b.name}: ${typeof b.input=="string"?b.input.slice(0,80):((y=b.input)==null?void 0:y.command)||((j=b.input)==null?void 0:j.path)||((w=b.input)==null?void 0:w.pattern)||JSON.stringify(b.input||"").slice(0,80)}`}).join(`
27
+ `)),f.contextUsage!==void 0||f.tokensUsed!==void 0){const b=n().agents.map(y=>{if(y.id!==u)return y;const j={};return f.contextUsage!==void 0&&(j.contextUsage=f.contextUsage),f.tokensUsed!==void 0&&(j.tokensUsed=f.tokensUsed),{...y,...j}});e({agents:b})}const g=f.subtype==="stream";if(h&&h.trim()&&!g&&(f.subtype==="assistant"||f.subtype==="text"||f.type==="result"||f.type==="activity"&&typeof f.data=="string")){n().thinkingAgents.has(u)&&e(C=>{const P=new Set(C.thinkingAgents);return P.delete(u),{thinkingAgents:P}});const b=h.trim(),y={...n().chatHistory};y[u]||(y[u]=[]);const j=[...y[u]],w=j[j.length-1],k=w&&w.from==="agent"&&Date.now()-w.timestamp<8e3;if(!(k&&(w.text===b||w.text.endsWith(b)))){if(k){const C=f.subtype==="assistant"?`
28
+
29
+ `:" ";j[j.length-1]={...w,text:w.text+C+b,timestamp:Date.now()}}else j.push({from:"agent",text:b,timestamp:Date.now()});y[u]=j.slice(-100),e({chatHistory:y}),Ka("groove:chatHistory",y)}}if(x&&x.trim()){const b={...n().activityLog};b[u]||(b[u]=[]),b[u]=[...b[u].slice(-200),{timestamp:Date.now(),text:x.trim(),type:f.type,subtype:"tool"}],e({activityLog:b}),Ka("groove:activityLog",b)}break}case"agent:exit":{const u=n().agents.find(p=>p.id===o.agentId),f=(u==null?void 0:u.name)||o.agentId,h=o.status==="killed"||o.code===143||o.code===137,x=o.status==="completed"?`${f} completed`:h?`${f} stopped`:`${f} crashed (exit ${o.code})`,g=o.status==="completed"?"success":h?"info":"warning";n().addToast(g,x,o.error?o.error.slice(0,200):void 0),o.error&&o.agentId&&n().addChatMessage(o.agentId,"system",`Crashed: ${o.error}`),(u==null?void 0:u.role)==="planner"&&o.status==="completed"&&setTimeout(()=>n().checkRecommendedTeam(),1e3);break}case"phase2:spawned":n().addToast("info",`QC agent ${o.name} auto-spawned`,"Auditing phase 1 work");break;case"phase2:failed":n().addToast("error","QC agent failed to spawn",o.error||"Unknown error");break;case"rotation:start":break;case"rotation:complete":{if(!o.newAgentId||!o.oldAgentId)break;e(u=>{var j,w,k;const f={...u.chatHistory},h={...u.tokenTimeline},x={...u.activityLog},g={...u.chatInputs};(j=f[o.oldAgentId])!=null&&j.length&&(f[o.newAgentId]=[...f[o.oldAgentId]],delete f[o.oldAgentId]),(w=h[o.oldAgentId])!=null&&w.length&&(h[o.newAgentId]=[...h[o.oldAgentId]],delete h[o.oldAgentId]),(k=x[o.oldAgentId])!=null&&k.length&&(x[o.newAgentId]=[...x[o.oldAgentId]],delete x[o.oldAgentId]),g[o.oldAgentId]&&(g[o.newAgentId]=g[o.oldAgentId],delete g[o.oldAgentId]);const p=u.detailPanel;let b=p,y=u.teamDetailPanels;if((p==null?void 0:p.type)==="agent"&&p.agentId===o.oldAgentId){const Q={type:"agent",agentId:o.newAgentId};b=Q;const C=n().activeTeamId;y={...u.teamDetailPanels,[C]:Q}}try{localStorage.setItem("groove:chatHistory",JSON.stringify(f))}catch{}return{chatHistory:f,tokenTimeline:h,activityLog:x,chatInputs:g,detailPanel:b,teamDetailPanels:y}});break}case"rotation:failed":n().addToast("error","Rotation failed",o.error);break;case"file:changed":{const u=n().editorRecentSaves[o.path];if(u&&Date.now()-u<2e3)break;e(f=>({editorChangedFiles:{...f.editorChangedFiles,[o.path]:o.timestamp}}));break}case"team:created":case"team:deleted":case"team:updated":n().fetchTeams();break;case"approval:request":e(u=>({pendingApprovals:[...u.pendingApprovals,o.data]}));break;case"approval:resolved":{const u=o.data;e(f=>({pendingApprovals:f.pendingApprovals.filter(h=>h.id!==u.id),resolvedApprovals:[u,...f.resolvedApprovals].slice(0,200)}));break}case"conflict:detected":n().addToast("error",`Scope conflict: ${o.agentName||"agent"}`,o.filePath?`File: ${o.filePath}`:void 0);break;case"qc:activated":n().addToast("info","QC agent activated",`${o.agentCount||"4+"} agents running`);break;case"journalist:cycle":e({journalistStatus:o.data||null});break;case"schedule:execute":n().addToast("info",`Scheduled agent spawned: ${o.name||o.role||"agent"}`);break;case"gateway:status":e({gateways:o.data||[]});break;case"tunnel.connected":e({activeTunnelId:((d=o.data)==null?void 0:d.id)||null}),n().fetchTunnels();break;case"tunnel.disconnected":e({activeTunnelId:null}),n().fetchTunnels();break;case"tunnel.health":{const u=n().savedTunnels.map(f=>{var h;return f.id===((h=o.data)==null?void 0:h.id)?{...f,latencyMs:o.data.latencyMs,healthy:o.data.healthy}:f});e({savedTunnels:u});break}}},l.onclose=()=>{Dn&&(clearInterval(Dn),Dn=null),e({connected:!1,hydrated:!1,ws:null,daemonHost:null,tunneled:!1}),setTimeout(()=>n().connect(),2e3)},l.onerror=()=>l.close()},setActiveView(l){e({activeView:l})},async fetchTeams(){try{const l=await B.get("/teams");let r=l.teams||[];const o=l.defaultTeamId;try{const h=JSON.parse(localStorage.getItem("groove:teamOrder")||"[]");if(h.length){const x=Object.fromEntries(r.map(b=>[b.id,b])),g=h.filter(b=>x[b]).map(b=>x[b]),p=r.filter(b=>!h.includes(b.id));r=[...g,...p]}}catch{}const{activeTeamId:d}=n(),f=r.map(h=>h.id).includes(d)?d:o;e({teams:r,activeTeamId:f}),f&&localStorage.setItem("groove:activeTeamId",f)}catch{}},switchTeam(l){const{activeTeamId:r,detailPanel:o,teamDetailPanels:d}=n(),u={...d};r&&(u[r]=o);const f=u[l]||null;e({activeTeamId:l,detailPanel:f,teamDetailPanels:u}),localStorage.setItem("groove:activeTeamId",l)},async createTeam(l,r){try{const o={name:l};r&&(o.workingDir=r);const d=await B.post("/teams",o);return e({activeTeamId:d.id}),localStorage.setItem("groove:activeTeamId",d.id),n().addToast("success",`Team "${l}" created`),d}catch(o){throw n().addToast("error","Failed to create team",o.message),o}},async deleteTeam(l){const r=n().teams.find(o=>o.id===l);if(r!=null&&r.isDefault){n().addToast("warning","Cannot delete the default team");return}try{await B.delete(`/teams/${l}`),n().addToast("info",`Team "${r==null?void 0:r.name}" deleted`)}catch(o){n().addToast("error","Failed to delete team",o.message)}},reorderTeams(l,r){const o=[...n().teams],[d]=o.splice(l,1);o.splice(r,0,d),e({teams:o});try{localStorage.setItem("groove:teamOrder",JSON.stringify(o.map(u=>u.id)))}catch{}},async renameTeam(l,r){try{const o=await B.patch(`/teams/${l}`,{name:r});return e(d=>({teams:d.teams.map(u=>u.id===l?o:u)})),o}catch(o){throw n().addToast("error","Failed to rename team",o.message),o}},openDetail(l){const r=n().activeTeamId;e(o=>({detailPanel:l,teamDetailPanels:{...o.teamDetailPanels,[r]:l}}))},closeDetail(){const l=n().activeTeamId;e(r=>({detailPanel:null,teamDetailPanels:{...r.teamDetailPanels,[l]:null}}))},selectAgent(l){const r=n().activeTeamId,o={type:"agent",agentId:l};e(d=>({detailPanel:o,teamDetailPanels:{...d.teamDetailPanels,[r]:o}}))},clearSelection(){const l=n().activeTeamId;e(r=>({detailPanel:null,teamDetailPanels:{...r.teamDetailPanels,[l]:null}}))},toggleCommandPalette(){e(l=>({commandPaletteOpen:!l.commandPaletteOpen}))},toggleQuickConnect(){e(l=>({quickConnectOpen:!l.quickConnectOpen}))},setDetailPanelWidth(l){e({detailPanelWidth:l}),localStorage.setItem("groove:detailWidth",String(l))},setTerminalVisible(l){e({terminalVisible:l}),localStorage.setItem("groove:terminalVisible",String(l))},setTerminalHeight(l){e({terminalHeight:l}),localStorage.setItem("groove:terminalHeight",String(l))},setTerminalFullHeight(l){e({terminalFullHeight:l})},toggleNodeExpanded(l){const r={...n().expandedNodes};r[l]=!r[l],r[l]||delete r[l],e({expandedNodes:r}),Ka("groove:expandedNodes",r)},addToast(l,r,o){const d=++Zw;e(u=>({toasts:[...u.toasts,{id:d,type:l,message:r,detail:o}]}))},removeToast(l){e(r=>({toasts:r.toasts.filter(o=>o.id!==l)}))},async checkMarketplaceAuth(){try{const l=await B.get("/auth/status");e({marketplaceAuthenticated:l.authenticated||!1,marketplaceUser:l.user||null})}catch{e({marketplaceAuthenticated:!1,marketplaceUser:null})}},async marketplaceLogin(){try{const l=await B.get("/auth/login-url");l.url&&window.open(l.url,"_blank");const r=setInterval(async()=>{var o,d;try{const u=await B.get("/auth/status");u.authenticated&&(clearInterval(r),e({marketplaceAuthenticated:!0,marketplaceUser:u.user}),n().addToast("success",`Signed in as ${((o=u.user)==null?void 0:o.displayName)||((d=u.user)==null?void 0:d.id)||"user"}`))}catch{}},2e3);setTimeout(()=>clearInterval(r),3e5)}catch(l){n().addToast("error","Login failed",l.message)}},async marketplaceLogout(){try{await B.post("/auth/logout"),e({marketplaceAuthenticated:!1,marketplaceUser:null}),n().addToast("info","Signed out of marketplace")}catch(l){n().addToast("error","Logout failed",l.message)}},async marketplaceCheckout(l){try{const r=await B.post("/auth/checkout",{skillId:l});return r.url&&window.open(r.url,"_blank"),r}catch(r){throw n().addToast("error","Checkout failed",r.message),r}},async fetchApprovals(){try{const l=await B.get("/approvals");e({pendingApprovals:l.pending||[],resolvedApprovals:l.resolved||[]})}catch{}},async approveRequest(l){try{await B.post(`/approvals/${l}/approve`),e(r=>({pendingApprovals:r.pendingApprovals.filter(o=>o.id!==l)})),n().addToast("success","Approved")}catch(r){n().addToast("error","Approve failed",r.message)}},async rejectRequest(l,r=""){try{await B.post(`/approvals/${l}/reject`,{reason:r}),e(o=>({pendingApprovals:o.pendingApprovals.filter(d=>d.id!==l)})),n().addToast("info","Rejected")}catch(o){n().addToast("error","Reject failed",o.message)}},async checkRecommendedTeam(){var l;try{const r=await B.get("/recommended-team");if(!r||!((l=r.agents)!=null&&l.length)){e({recommendedTeam:null});return}const o=r.teamId||null;if(o){const d=n().agents.filter(h=>h.teamId===o&&h.role!=="planner"),u=r.agents.filter(h=>!h.phase||h.phase===1).map(h=>h.role);if(u.every(h=>d.some(x=>x.role===h))&&u.length>0){e({recommendedTeam:null});const x=(await B.post("/recommended-team/launch")).agents||[],g=x.map(p=>p.name).join(", ")||"";n().addToast("success","Planner delegated work",g?`→ ${g}`:void 0),x.length>0&&e(p=>({thinkingAgents:new Set([...p.thinkingAgents,...x.map(b=>b.id)])})),B.post("/cleanup").catch(()=>{});return}}e({recommendedTeam:{...r,teamId:r.teamId||null}})}catch{e({recommendedTeam:null})}},async launchRecommendedTeam(l){var r;try{const o=((r=n().recommendedTeam)==null?void 0:r.teamId)||null;e({recommendedTeam:null}),n().addToast("info","Launching team...");const d={...l&&{agents:l},...o&&{teamId:o}},u=await B.post("/recommended-team/launch",d),f=[u.phase2Pending?`${u.phase2Pending} QC queued`:"",u.projectDir?`→ ${u.projectDir}/`:""].filter(Boolean).join(" · ");n().addToast("success",`Launched ${(u.launched||0)+(u.reused||0)} agents`,f||void 0);const h=u.agents||[];return h.length>0&&e(x=>({thinkingAgents:new Set([...x.thinkingAgents,...h.map(g=>g.id)])})),B.post("/cleanup").catch(()=>{}),u}catch(o){throw n().addToast("error","Launch failed",o.message),o}},async fetchImportedRepos(){try{const l=await B.get("/repos/imported");e({importedRepos:l})}catch{}},async previewRepo(l){return B.post("/repos/preview",{repoUrl:l})},async importRepo(l,r,o,d){e({importInProgress:!0});try{const u=await B.post("/repos/import",{repoUrl:l,targetPath:r,createTeam:o,teamName:d});return n().fetchImportedRepos(),u}finally{e({importInProgress:!1})}},async softRemoveRepo(l){await B.delete("/repos/"+l+"/remove"),n().fetchImportedRepos()},async hardNukeRepo(l,r=!0){await B.delete("/repos/"+l+"/nuke?deleteFiles="+r),n().fetchImportedRepos()},async fetchTunnels(){try{const l=await B.get("/tunnels");e({savedTunnels:Array.isArray(l)?l:[]})}catch{}},async saveTunnel(l){const r=await B.post("/tunnels",l);return n().fetchTunnels(),r},async updateTunnel(l,r){const o=await B.patch("/tunnels/"+l,r);return n().fetchTunnels(),o},async deleteTunnel(l){await B.delete("/tunnels/"+l),n().fetchTunnels()},async testTunnel(l){return B.post("/tunnels/"+l+"/test")},async connectTunnel(l){const r=await B.post("/tunnels/"+l+"/connect");return e({activeTunnelId:l}),n().fetchTunnels(),r.url&&window.open(r.url,"_blank"),r},async disconnectTunnel(l){await B.post("/tunnels/"+l+"/disconnect"),e({activeTunnelId:null}),n().fetchTunnels()},async installTunnel(l){return B.post("/tunnels/"+l+"/install")},async startTunnel(l){return B.post("/tunnels/"+l+"/start")},async fetchJournalist(){try{const l=await B.get("/journalist");return e({journalistStatus:l}),l}catch{return null}},async triggerJournalistCycle(){try{const l=await B.post("/journalist/cycle");return n().addToast("success","Synthesis cycle triggered"),e({journalistStatus:l}),l}catch(l){throw n().addToast("error","Synthesis failed",l.message),l}},async spawnAgent(l){try{const r=n().activeTeamId,o=await B.post("/agents",{...l,teamId:r});return n().addToast("success",`Spawned ${o.name}`),o}catch(r){throw n().addToast("error","Spawn failed",r.message),r}},async killAgent(l,r=!1){try{await B.delete(`/agents/${l}?purge=${r}`)}catch(o){n().addToast("error","Kill failed",o.message)}},async rotateAgent(l){try{return await B.post(`/agents/${l}/rotate`)}catch(r){throw n().addToast("error","Rotation failed",r.message),r}},async fetchProviders(){return B.get("/providers")},addChatMessage(l,r,o,d=!1){e(u=>{const f={...u.chatHistory};return f[l]||(f[l]=[]),f[l]=[...f[l].slice(-100),{from:r,text:o,timestamp:Date.now(),isQuery:d}],Ka("groove:chatHistory",f),{chatHistory:f}})},thinkingAgents:new Set,async stopAgent(l){try{await B.post(`/agents/${l}/stop`),e(r=>{const o=new Set(r.thinkingAgents);return o.delete(l),{thinkingAgents:o}}),n().addToast("info","Stopped agent")}catch(r){n().addToast("error","Stop failed",r.message)}},async instructAgent(l,r){var u,f;const o=n().agents.find(h=>h.id===l);if(o&&(o.status==="running"||o.status==="starting")){n().addChatMessage(l,"user",r,!1);try{const h=await B.post(`/agents/${l}/query`,{message:r});return h.status==="pending"||h.response==="Message sent to agent"?(e(x=>({thinkingAgents:new Set([...x.thinkingAgents,l])})),h):(n().addChatMessage(l,"agent",h.response),h)}catch(h){throw n().addChatMessage(l,"system",`failed: ${h.message}`),h}}n().addChatMessage(l,"user",r,!1),e(h=>({thinkingAgents:new Set([...h.thinkingAgents,l])}));try{const h=await B.post(`/agents/${l}/instruct`,{message:r});for(const x of["chatHistory","activityLog","tokenTimeline"]){const g=n()[x][l];g!=null&&g.length&&e(p=>({[x]:{...p[x],[h.id]:[...g]}}))}return e(x=>{const g=new Set(x.thinkingAgents);return g.delete(l),g.add(h.id),{thinkingAgents:g}}),(u=n().chatHistory[l])!=null&&u.length&&Ka("groove:chatHistory",n().chatHistory),(f=n().activityLog[l])!=null&&f.length&&Ka("groove:activityLog",n().activityLog),n().selectAgent(h.id),h}catch(h){throw e(x=>{const g=new Set(x.thinkingAgents);return g.delete(l),{thinkingAgents:g}}),n().addChatMessage(l,"system",`failed: ${h.message}`),h}},async queryAgent(l,r){n().addChatMessage(l,"user",r,!0);try{const o=await B.post(`/agents/${l}/query`,{message:r});return n().addChatMessage(l,"agent",o.response),o}catch(o){throw n().addChatMessage(l,"system",`query failed: ${o.message}`),o}},async openFile(l){var d;if(n().editorFiles[l]||n().editorOpenTabs.includes(l)){e(u=>({editorActiveFile:l,editorOpenTabs:u.editorOpenTabs.includes(l)?u.editorOpenTabs:[...u.editorOpenTabs,l]}));return}const r=(d=l.split(".").pop())==null?void 0:d.toLowerCase();if(["png","jpg","jpeg","gif","svg","webp","ico","bmp","avif","mp4","webm","mov","avi","mkv","ogv"].includes(r)){e(u=>({editorActiveFile:l,editorOpenTabs:[...u.editorOpenTabs,l]}));return}try{const u=await B.get(`/files/read?path=${encodeURIComponent(l)}`);if(u.binary){n().addToast("warning","Binary file — cannot open");return}e(h=>({editorFiles:{...h.editorFiles,[l]:{content:u.content,originalContent:u.content,language:u.language,loadedAt:Date.now()}},editorActiveFile:l,editorOpenTabs:h.editorOpenTabs.includes(l)?h.editorOpenTabs:[...h.editorOpenTabs,l]}));const f=n().ws;(f==null?void 0:f.readyState)===1&&f.send(JSON.stringify({type:"editor:watch",path:l}))}catch(u){n().addToast("error","Failed to open file",u.message)}},closeFile(l){e(o=>{const d=o.editorOpenTabs.filter(x=>x!==l),u={...o.editorFiles};delete u[l];const f={...o.editorChangedFiles};delete f[l];let h=o.editorActiveFile;if(h===l){const x=o.editorOpenTabs.indexOf(l);h=d[Math.min(x,d.length-1)]||null}return{editorOpenTabs:d,editorFiles:u,editorChangedFiles:f,editorActiveFile:h}});const r=n().ws;(r==null?void 0:r.readyState)===1&&r.send(JSON.stringify({type:"editor:unwatch",path:l}))},setActiveFile(l){e({editorActiveFile:l})},updateFileContent(l,r){e(o=>({editorFiles:{...o.editorFiles,[l]:{...o.editorFiles[l],content:r}}}))},async saveFile(l){const r=n().editorFiles[l];if(r)try{await B.post("/files/write",{path:l,content:r.content}),e(o=>({editorFiles:{...o.editorFiles,[l]:{...o.editorFiles[l],originalContent:r.content}},editorChangedFiles:(()=>{const d={...o.editorChangedFiles};return delete d[l],d})(),editorRecentSaves:{...o.editorRecentSaves,[l]:Date.now()}})),n().addToast("success","File saved")}catch(o){n().addToast("error","Save failed",o.message)}},async reloadFile(l){try{const r=await B.get(`/files/read?path=${encodeURIComponent(l)}`);if(r.binary)return;e(o=>({editorFiles:{...o.editorFiles,[l]:{content:r.content,originalContent:r.content,language:r.language,loadedAt:Date.now()}},editorChangedFiles:(()=>{const d={...o.editorChangedFiles};return delete d[l],d})()}))}catch{}},dismissFileChange(l){e(r=>{const o={...r.editorChangedFiles};return delete o[l],{editorChangedFiles:o}})},async fetchTreeDir(l){try{const r=await B.get(`/files/tree?path=${encodeURIComponent(l)}`);e(o=>({editorTreeCache:{...o.editorTreeCache,[l]:r.entries}}))}catch{}},async createFile(l){try{await B.post("/files/create",{path:l});const r=l.includes("/")?l.split("/").slice(0,-1).join("/"):"";return await n().fetchTreeDir(r),n().addToast("success","File created"),!0}catch(r){return n().addToast("error","Create failed",r.message),!1}},async createDir(l){try{await B.post("/files/mkdir",{path:l});const r=l.includes("/")?l.split("/").slice(0,-1).join("/"):"";return await n().fetchTreeDir(r),n().addToast("success","Folder created"),!0}catch(r){return n().addToast("error","Create failed",r.message),!1}},async deleteFile(l){try{await B.delete(`/files/delete?path=${encodeURIComponent(l)}`),n().editorOpenTabs.includes(l)&&n().closeFile(l);const r=l.includes("/")?l.split("/").slice(0,-1).join("/"):"";return await n().fetchTreeDir(r),e(o=>{const d={...o.editorTreeCache};return delete d[l],{editorTreeCache:d}}),n().addToast("success","Deleted"),!0}catch(r){return n().addToast("error","Delete failed",r.message),!1}},async renameFile(l,r){try{await B.post("/files/rename",{oldPath:l,newPath:r}),e(u=>{const f=u.editorOpenTabs.map(g=>g===l?r:g),h={...u.editorFiles};h[l]&&(h[r]=h[l],delete h[l]);const x=u.editorActiveFile===l?r:u.editorActiveFile;return{editorOpenTabs:f,editorFiles:h,editorActiveFile:x}});const o=l.includes("/")?l.split("/").slice(0,-1).join("/"):"",d=r.includes("/")?r.split("/").slice(0,-1).join("/"):"";return await n().fetchTreeDir(o),d!==o&&await n().fetchTreeDir(d),n().addToast("success","Renamed"),!0}catch(o){return n().addToast("error","Rename failed",o.message),!1}}}));function Ew(e){v.useEffect(()=>{function n(l){for(const r of e){const o=r.meta?l.metaKey||l.ctrlKey:!0,d=r.shift?l.shiftKey:!l.shiftKey;if(l.key.toLowerCase()===r.key.toLowerCase()&&o&&d){l.preventDefault(),r.handler();return}}}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e])}function Oh(){return!!(window.groove||navigator.userAgent.includes("Electron"))}function qw(){var e;return((e=window.groove)==null?void 0:e.platform)||"browser"}function qO(e){window.groove?window.groove.openExternal(e):window.open(e,"_blank")}function xb(e){var n,l,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(l=xb(e[n]))&&(r&&(r+=" "),r+=l)}else for(l in e)e[l]&&(r&&(r+=" "),r+=l);return r}function Mw(){for(var e,n,l=0,r="",o=arguments.length;l<o;l++)(e=arguments[l])&&(n=xb(e))&&(r&&(r+=" "),r+=n);return r}const Yw=(e,n)=>{const l=new Array(e.length+n.length);for(let r=0;r<e.length;r++)l[r]=e[r];for(let r=0;r<n.length;r++)l[e.length+r]=n[r];return l},Uw=(e,n)=>({classGroupId:e,validator:n}),pb=(e=new Map,n=null,l)=>({nextPart:e,validators:n,classGroupId:l}),Mc="-",m1=[],Vw="arbitrary..",Gw=e=>{const n=Lw(e),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return Dw(u);const f=u.split(Mc),h=f[0]===""&&f.length>1?1:0;return gb(f,h,n)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=r[u],x=l[u];return h?x?Yw(x,h):h:x||m1}return l[u]||m1}}},gb=(e,n,l)=>{if(e.length-n===0)return l.classGroupId;const o=e[n],d=l.nextPart.get(o);if(d){const x=gb(e,n+1,d);if(x)return x}const u=l.validators;if(u===null)return;const f=n===0?e.join(Mc):e.slice(n).join(Mc),h=u.length;for(let x=0;x<h;x++){const g=u[x];if(g.validator(f))return g.classGroupId}},Dw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),l=n.indexOf(":"),r=n.slice(0,l);return r?Vw+r:void 0})(),Lw=e=>{const{theme:n,classGroups:l}=e;return Ww(l,n)},Ww=(e,n)=>{const l=pb();for(const r in e){const o=e[r];hh(o,l,r,n)}return l},hh=(e,n,l,r)=>{const o=e.length;for(let d=0;d<o;d++){const u=e[d];Bw(u,n,l,r)}},Bw=(e,n,l,r)=>{if(typeof e=="string"){Iw(e,n,l);return}if(typeof e=="function"){Hw(e,n,l,r);return}Fw(e,n,l,r)},Iw=(e,n,l)=>{const r=e===""?n:bb(n,e);r.classGroupId=l},Hw=(e,n,l,r)=>{if(Kw(e)){hh(e(r),n,l,r);return}n.validators===null&&(n.validators=[]),n.validators.push(Uw(l,e))},Fw=(e,n,l,r)=>{const o=Object.entries(e),d=o.length;for(let u=0;u<d;u++){const[f,h]=o[u];hh(h,bb(n,f),l,r)}},bb=(e,n)=>{let l=e;const r=n.split(Mc),o=r.length;for(let d=0;d<o;d++){const u=r[d];let f=l.nextPart.get(u);f||(f=pb(),l.nextPart.set(u,f)),l=f}return l},Kw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,l=Object.create(null),r=Object.create(null);const o=(d,u)=>{l[d]=u,n++,n>e&&(n=0,r=l,l=Object.create(null))};return{get(d){let u=l[d];if(u!==void 0)return u;if((u=r[d])!==void 0)return o(d,u),u},set(d,u){d in l?l[d]=u:o(d,u)}}},MO="!",x1=":",ek=[],p1=(e,n,l,r,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:l,maybePostfixModifierPosition:r,isExternal:o}),tk=e=>{const{prefix:n,experimentalParseClassName:l}=e;let r=o=>{const d=[];let u=0,f=0,h=0,x;const g=o.length;for(let w=0;w<g;w++){const k=o[w];if(u===0&&f===0){if(k===x1){d.push(o.slice(h,w)),h=w+1;continue}if(k==="/"){x=w;continue}}k==="["?u++:k==="]"?u--:k==="("?f++:k===")"&&f--}const p=d.length===0?o:o.slice(h);let b=p,y=!1;p.endsWith(MO)?(b=p.slice(0,-1),y=!0):p.startsWith(MO)&&(b=p.slice(1),y=!0);const j=x&&x>h?x-h:void 0;return p1(d,y,b,j)};if(n){const o=n+x1,d=r;r=u=>u.startsWith(o)?d(u.slice(o.length)):p1(ek,!1,u,void 0,!0)}if(l){const o=r;r=d=>l({className:d,parseClassName:o})}return r},nk=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((l,r)=>{n.set(l,1e6+r)}),l=>{const r=[];let o=[];for(let d=0;d<l.length;d++){const u=l[d],f=u[0]==="[",h=n.has(u);f||h?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(u)):o.push(u)}return o.length>0&&(o.sort(),r.push(...o)),r}},sk=e=>({cache:Jw(e.cacheSize),parseClassName:tk(e),sortModifiers:nk(e),...Gw(e)}),ak=/\s+/,lk=(e,n)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:d}=n,u=[],f=e.trim().split(ak);let h="";for(let x=f.length-1;x>=0;x-=1){const g=f[x],{isExternal:p,modifiers:b,hasImportantModifier:y,baseClassName:j,maybePostfixModifierPosition:w}=l(g);if(p){h=g+(h.length>0?" "+h:h);continue}let k=!!w,Q=r(k?j.substring(0,w):j);if(!Q){if(!k){h=g+(h.length>0?" "+h:h);continue}if(Q=r(j),!Q){h=g+(h.length>0?" "+h:h);continue}k=!1}const C=b.length===0?"":b.length===1?b[0]:d(b).join(":"),P=y?C+MO:C,R=P+Q;if(u.indexOf(R)>-1)continue;u.push(R);const Y=o(Q,k);for(let X=0;X<Y.length;++X){const z=Y[X];u.push(P+z)}h=g+(h.length>0?" "+h:h)}return h},rk=(...e)=>{let n=0,l,r,o="";for(;n<e.length;)(l=e[n++])&&(r=vb(l))&&(o&&(o+=" "),o+=r);return o},vb=e=>{if(typeof e=="string")return e;let n,l="";for(let r=0;r<e.length;r++)e[r]&&(n=vb(e[r]))&&(l&&(l+=" "),l+=n);return l},ik=(e,...n)=>{let l,r,o,d;const u=h=>{const x=n.reduce((g,p)=>p(g),e());return l=sk(x),r=l.cache.get,o=l.cache.set,d=f,f(h)},f=h=>{const x=r(h);if(x)return x;const g=lk(h,l);return o(h,g),g};return d=u,(...h)=>d(rk(...h))},ok=[],yt=e=>{const n=l=>l[e]||ok;return n.isThemeGetter=!0,n},yb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ck=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ok=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ia=e=>ck.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),oa=e=>!!e&&Number.isInteger(Number(e)),Bf=e=>e.endsWith("%")&&Re(e.slice(0,-1)),bs=e=>dk.test(e),jb=()=>!0,mk=e=>uk.test(e)&&!fk.test(e),mh=()=>!1,xk=e=>Ok.test(e),pk=e=>hk.test(e),gk=e=>!me(e)&&!xe(e),bk=e=>ka(e,kb,mh),me=e=>yb.test(e),Ha=e=>ka(e,Nb,mk),g1=e=>ka(e,Nk,Re),vk=e=>ka(e,Tb,jb),yk=e=>ka(e,$b,mh),b1=e=>ka(e,Qb,mh),Sk=e=>ka(e,wb,pk),fc=e=>ka(e,Pb,xk),xe=e=>Sb.test(e),yi=e=>hl(e,Nb),jk=e=>hl(e,$b),v1=e=>hl(e,Qb),Qk=e=>hl(e,kb),wk=e=>hl(e,wb),Oc=e=>hl(e,Pb,!0),kk=e=>hl(e,Tb,!0),ka=(e,n,l)=>{const r=yb.exec(e);return r?r[1]?n(r[1]):l(r[2]):!1},hl=(e,n,l=!1)=>{const r=Sb.exec(e);return r?r[1]?n(r[1]):l:!1},Qb=e=>e==="position"||e==="percentage",wb=e=>e==="image"||e==="url",kb=e=>e==="length"||e==="size"||e==="bg-size",Nb=e=>e==="length",Nk=e=>e==="number",$b=e=>e==="family-name",Tb=e=>e==="number"||e==="weight",Pb=e=>e==="shadow",$k=()=>{const e=yt("color"),n=yt("font"),l=yt("text"),r=yt("font-weight"),o=yt("tracking"),d=yt("leading"),u=yt("breakpoint"),f=yt("container"),h=yt("spacing"),x=yt("radius"),g=yt("shadow"),p=yt("inset-shadow"),b=yt("text-shadow"),y=yt("drop-shadow"),j=yt("blur"),w=yt("perspective"),k=yt("aspect"),Q=yt("ease"),C=yt("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...R(),xe,me],X=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],$=()=>[xe,me,h],F=()=>[ia,"full","auto",...$()],Z=()=>[oa,"none","subgrid",xe,me],J=()=>["auto",{span:["full",oa,xe,me]},oa,xe,me],A=()=>[oa,"auto",xe,me],U=()=>["auto","min","max","fr",xe,me],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...$()],L=()=>[ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],ee=()=>[ia,"screen","full","dvw","lvw","svw","min","max","fit",...$()],de=()=>[ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],ae=()=>[e,xe,me],ye=()=>[...R(),v1,b1,{position:[xe,me]}],Se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ge=()=>["auto","cover","contain",Qk,bk,{size:[xe,me]}],je=()=>[Bf,yi,Ha],ze=()=>["","none","full",x,xe,me],ke=()=>["",Re,yi,Ha],it=()=>["solid","dashed","dotted","double"],St=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[Re,Bf,v1,b1],$t=()=>["","none",j,xe,me],tt=()=>["none",Re,xe,me],nt=()=>["none",Re,xe,me],jt=()=>[Re,xe,me],dt=()=>[ia,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bs],breakpoint:[bs],color:[jb],container:[bs],"drop-shadow":[bs],ease:["in","out","in-out"],font:[gk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bs],shadow:[bs],spacing:["px",Re],text:[bs],"text-shadow":[bs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ia,me,xe,k]}],container:["container"],columns:[{columns:[Re,me,xe,f]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[oa,"auto",xe,me]}],basis:[{basis:[ia,"full","auto",f,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,ia,"auto","initial","none",me]}],grow:[{grow:["",Re,xe,me]}],shrink:[{shrink:["",Re,xe,me]}],order:[{order:[oa,"first","last","none",xe,me]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[f,"screen",...L()]}],"min-w":[{"min-w":[f,"screen","none",...L()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",l,yi,Ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,kk,vk]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bf,me]}],"font-family":[{font:[jk,yk,n]}],"font-features":[{"font-features":[me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,xe,me]}],"line-clamp":[{"line-clamp":[Re,"none",xe,g1]}],leading:[{leading:[d,...$()]}],"list-image":[{"list-image":["none",xe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ae()}],"text-color":[{text:ae()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...it(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",xe,Ha]}],"text-decoration-color":[{decoration:ae()}],"underline-offset":[{"underline-offset":[Re,"auto",xe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:Se()}],"bg-size":[{bg:ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oa,xe,me],radial:["",xe,me],conic:[oa,xe,me]},wk,Sk]}],"bg-color":[{bg:ae()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:ae()}],"gradient-via":[{via:ae()}],"gradient-to":[{to:ae()}],rounded:[{rounded:ze()}],"rounded-s":[{"rounded-s":ze()}],"rounded-e":[{"rounded-e":ze()}],"rounded-t":[{"rounded-t":ze()}],"rounded-r":[{"rounded-r":ze()}],"rounded-b":[{"rounded-b":ze()}],"rounded-l":[{"rounded-l":ze()}],"rounded-ss":[{"rounded-ss":ze()}],"rounded-se":[{"rounded-se":ze()}],"rounded-ee":[{"rounded-ee":ze()}],"rounded-es":[{"rounded-es":ze()}],"rounded-tl":[{"rounded-tl":ze()}],"rounded-tr":[{"rounded-tr":ze()}],"rounded-br":[{"rounded-br":ze()}],"rounded-bl":[{"rounded-bl":ze()}],"border-w":[{border:ke()}],"border-w-x":[{"border-x":ke()}],"border-w-y":[{"border-y":ke()}],"border-w-s":[{"border-s":ke()}],"border-w-e":[{"border-e":ke()}],"border-w-bs":[{"border-bs":ke()}],"border-w-be":[{"border-be":ke()}],"border-w-t":[{"border-t":ke()}],"border-w-r":[{"border-r":ke()}],"border-w-b":[{"border-b":ke()}],"border-w-l":[{"border-l":ke()}],"divide-x":[{"divide-x":ke()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ke()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...it(),"hidden","none"]}],"divide-style":[{divide:[...it(),"hidden","none"]}],"border-color":[{border:ae()}],"border-color-x":[{"border-x":ae()}],"border-color-y":[{"border-y":ae()}],"border-color-s":[{"border-s":ae()}],"border-color-e":[{"border-e":ae()}],"border-color-bs":[{"border-bs":ae()}],"border-color-be":[{"border-be":ae()}],"border-color-t":[{"border-t":ae()}],"border-color-r":[{"border-r":ae()}],"border-color-b":[{"border-b":ae()}],"border-color-l":[{"border-l":ae()}],"divide-color":[{divide:ae()}],"outline-style":[{outline:[...it(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,xe,me]}],"outline-w":[{outline:["",Re,yi,Ha]}],"outline-color":[{outline:ae()}],shadow:[{shadow:["","none",g,Oc,fc]}],"shadow-color":[{shadow:ae()}],"inset-shadow":[{"inset-shadow":["none",p,Oc,fc]}],"inset-shadow-color":[{"inset-shadow":ae()}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ae()}],"ring-offset-w":[{"ring-offset":[Re,Ha]}],"ring-offset-color":[{"ring-offset":ae()}],"inset-ring-w":[{"inset-ring":ke()}],"inset-ring-color":[{"inset-ring":ae()}],"text-shadow":[{"text-shadow":["none",b,Oc,fc]}],"text-shadow-color":[{"text-shadow":ae()}],opacity:[{opacity:[Re,xe,me]}],"mix-blend":[{"mix-blend":[...St(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":St()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":ae()}],"mask-image-linear-to-color":[{"mask-linear-to":ae()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":ae()}],"mask-image-t-to-color":[{"mask-t-to":ae()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":ae()}],"mask-image-r-to-color":[{"mask-r-to":ae()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":ae()}],"mask-image-b-to-color":[{"mask-b-to":ae()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":ae()}],"mask-image-l-to-color":[{"mask-l-to":ae()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":ae()}],"mask-image-x-to-color":[{"mask-x-to":ae()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":ae()}],"mask-image-y-to-color":[{"mask-y-to":ae()}],"mask-image-radial":[{"mask-radial":[xe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":ae()}],"mask-image-radial-to-color":[{"mask-radial-to":ae()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":ae()}],"mask-image-conic-to-color":[{"mask-conic-to":ae()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:Se()}],"mask-size":[{mask:ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,me]}],filter:[{filter:["","none",xe,me]}],blur:[{blur:$t()}],brightness:[{brightness:[Re,xe,me]}],contrast:[{contrast:[Re,xe,me]}],"drop-shadow":[{"drop-shadow":["","none",y,Oc,fc]}],"drop-shadow-color":[{"drop-shadow":ae()}],grayscale:[{grayscale:["",Re,xe,me]}],"hue-rotate":[{"hue-rotate":[Re,xe,me]}],invert:[{invert:["",Re,xe,me]}],saturate:[{saturate:[Re,xe,me]}],sepia:[{sepia:["",Re,xe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,me]}],"backdrop-blur":[{"backdrop-blur":$t()}],"backdrop-brightness":[{"backdrop-brightness":[Re,xe,me]}],"backdrop-contrast":[{"backdrop-contrast":[Re,xe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,xe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,xe,me]}],"backdrop-invert":[{"backdrop-invert":["",Re,xe,me]}],"backdrop-opacity":[{"backdrop-opacity":[Re,xe,me]}],"backdrop-saturate":[{"backdrop-saturate":[Re,xe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,xe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",xe,me]}],ease:[{ease:["linear","initial",Q,xe,me]}],delay:[{delay:[Re,xe,me]}],animate:[{animate:["none",C,xe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,xe,me]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:tt()}],"rotate-x":[{"rotate-x":tt()}],"rotate-y":[{"rotate-y":tt()}],"rotate-z":[{"rotate-z":tt()}],scale:[{scale:nt()}],"scale-x":[{"scale-x":nt()}],"scale-y":[{"scale-y":nt()}],"scale-z":[{"scale-z":nt()}],"scale-3d":["scale-3d"],skew:[{skew:jt()}],"skew-x":[{"skew-x":jt()}],"skew-y":[{"skew-y":jt()}],transform:[{transform:[xe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:dt()}],"translate-x":[{"translate-x":dt()}],"translate-y":[{"translate-y":dt()}],"translate-z":[{"translate-z":dt()}],"translate-none":["translate-none"],accent:[{accent:ae()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ae()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,me]}],fill:[{fill:["none",...ae()]}],"stroke-w":[{stroke:[Re,yi,Ha,g1]}],stroke:[{stroke:["none",...ae()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Tk=ik($k);function le(...e){return Tk(Mw(e))}function Ge(e,n,{checkForDefaultPrevented:l=!0}={}){return function(o){if(e==null||e(o),l===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}function y1(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Cb(...e){return n=>{let l=!1;const r=e.map(o=>{const d=y1(o,n);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let o=0;o<r.length;o++){const d=r[o];typeof d=="function"?d():y1(e[o],null)}}}}function gt(...e){return v.useCallback(Cb(...e),e)}function Pk(e,n){const l=v.createContext(n),r=d=>{const{children:u,...f}=d,h=v.useMemo(()=>f,Object.values(f));return s.jsx(l.Provider,{value:h,children:u})};r.displayName=e+"Provider";function o(d){const u=v.useContext(l);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${d}\` must be used within \`${e}\``)}return[r,o]}function ml(e,n=[]){let l=[];function r(d,u){const f=v.createContext(u),h=l.length;l=[...l,u];const x=p=>{var Q;const{scope:b,children:y,...j}=p,w=((Q=b==null?void 0:b[e])==null?void 0:Q[h])||f,k=v.useMemo(()=>j,Object.values(j));return s.jsx(w.Provider,{value:k,children:y})};x.displayName=d+"Provider";function g(p,b){var w;const y=((w=b==null?void 0:b[e])==null?void 0:w[h])||f,j=v.useContext(y);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${d}\``)}return[x,g]}const o=()=>{const d=l.map(u=>v.createContext(u));return function(f){const h=(f==null?void 0:f[e])||d;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[r,Ck(o,...n)]}function Ck(...e){const n=e[0];if(e.length===1)return n;const l=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(d){const u=r.reduce((f,{useScope:h,scopeName:x})=>{const p=h(d)[`__scope${x}`];return{...f,...p}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return l.scopeName=n.scopeName,l}function Yc(e){const n=zk(e),l=v.forwardRef((r,o)=>{const{children:d,...u}=r,f=v.Children.toArray(d),h=f.find(Ak);if(h){const x=h.props.children,g=f.map(p=>p===h?v.Children.count(x)>1?v.Children.only(null):v.isValidElement(x)?x.props.children:null:p);return s.jsx(n,{...u,ref:o,children:v.isValidElement(x)?v.cloneElement(x,void 0,g):null})}return s.jsx(n,{...u,ref:o,children:d})});return l.displayName=`${e}.Slot`,l}function zk(e){const n=v.forwardRef((l,r)=>{const{children:o,...d}=l;if(v.isValidElement(o)){const u=Xk(o),f=_k(d,o.props);return o.type!==v.Fragment&&(f.ref=r?Cb(r,u):u),v.cloneElement(o,f)}return v.Children.count(o)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var zb=Symbol("radix.slottable");function Rk(e){const n=({children:l})=>s.jsx(s.Fragment,{children:l});return n.displayName=`${e}.Slottable`,n.__radixId=zb,n}function Ak(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zb}function _k(e,n){const l={...n};for(const r in n){const o=e[r],d=n[r];/^on[A-Z]/.test(r)?o&&d?l[r]=(...f)=>{const h=d(...f);return o(...f),h}:o&&(l[r]=o):r==="style"?l[r]={...o,...d}:r==="className"&&(l[r]=[o,d].filter(Boolean).join(" "))}return{...e,...l}}function Xk(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=n&&"isReactWarning"in n&&n.isReactWarning;return l?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,l=n&&"isReactWarning"in n&&n.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var Zk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=Zk.reduce((e,n)=>{const l=Yc(`Primitive.${n}`),r=v.forwardRef((o,d)=>{const{asChild:u,...f}=o,h=u?l:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(h,{...f,ref:d})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function Ek(e,n){e&&ob.flushSync(()=>e.dispatchEvent(n))}function Dt(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...l)=>{var r;return(r=n.current)==null?void 0:r.call(n,...l)},[])}function qk(e,n=globalThis==null?void 0:globalThis.document){const l=Dt(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&l(o)};return n.addEventListener("keydown",r,{capture:!0}),()=>n.removeEventListener("keydown",r,{capture:!0})},[l,n])}var Mk="DismissableLayer",YO="dismissableLayer.update",Yk="dismissableLayer.pointerDownOutside",Uk="dismissableLayer.focusOutside",S1,Rb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xh=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:d,onInteractOutside:u,onDismiss:f,...h}=e,x=v.useContext(Rb),[g,p]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),j=gt(n,z=>p(z)),w=Array.from(x.layers),[k]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),Q=w.indexOf(k),C=g?w.indexOf(g):-1,P=x.layersWithOutsidePointerEventsDisabled.size>0,R=C>=Q,Y=Dk(z=>{const $=z.target,F=[...x.branches].some(Z=>Z.contains($));!R||F||(o==null||o(z),u==null||u(z),z.defaultPrevented||f==null||f())},b),X=Lk(z=>{const $=z.target;[...x.branches].some(Z=>Z.contains($))||(d==null||d(z),u==null||u(z),z.defaultPrevented||f==null||f())},b);return qk(z=>{C===x.layers.size-1&&(r==null||r(z),!z.defaultPrevented&&f&&(z.preventDefault(),f()))},b),v.useEffect(()=>{if(g)return l&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(S1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(g)),x.layers.add(g),j1(),()=>{l&&x.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=S1)}},[g,b,l,x]),v.useEffect(()=>()=>{g&&(x.layers.delete(g),x.layersWithOutsidePointerEventsDisabled.delete(g),j1())},[g,x]),v.useEffect(()=>{const z=()=>y({});return document.addEventListener(YO,z),()=>document.removeEventListener(YO,z)},[]),s.jsx(et.div,{...h,ref:j,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,X.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,X.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,Y.onPointerDownCapture)})});xh.displayName=Mk;var Vk="DismissableLayerBranch",Gk=v.forwardRef((e,n)=>{const l=v.useContext(Rb),r=v.useRef(null),o=gt(n,r);return v.useEffect(()=>{const d=r.current;if(d)return l.branches.add(d),()=>{l.branches.delete(d)}},[l.branches]),s.jsx(et.div,{...e,ref:o})});Gk.displayName=Vk;function Dk(e,n=globalThis==null?void 0:globalThis.document){const l=Dt(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const d=f=>{if(f.target&&!r.current){let h=function(){Ab(Yk,l,x,{discrete:!0})};const x={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=h,n.addEventListener("click",o.current,{once:!0})):h()}else n.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",d),n.removeEventListener("click",o.current)}},[n,l]),{onPointerDownCapture:()=>r.current=!0}}function Lk(e,n=globalThis==null?void 0:globalThis.document){const l=Dt(e),r=v.useRef(!1);return v.useEffect(()=>{const o=d=>{d.target&&!r.current&&Ab(Uk,l,{originalEvent:d},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,l]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function j1(){const e=new CustomEvent(YO);document.dispatchEvent(e)}function Ab(e,n,l,{discrete:r}){const o=l.originalEvent.target,d=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:l});n&&o.addEventListener(e,n,{once:!0}),r?Ek(o,d):o.dispatchEvent(d)}var $s=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Wk=ib[" useId ".trim().toString()]||(()=>{}),Bk=0;function or(e){const[n,l]=v.useState(Wk());return $s(()=>{l(r=>r??String(Bk++))},[e]),n?`radix-${n}`:""}const Ik=["top","right","bottom","left"],ya=Math.min,ln=Math.max,Uc=Math.round,hc=Math.floor,In=e=>({x:e,y:e}),Hk={left:"right",right:"left",bottom:"top",top:"bottom"};function UO(e,n,l){return ln(e,ya(n,l))}function Ts(e,n){return typeof e=="function"?e(n):e}function Ps(e){return e.split("-")[0]}function jr(e){return e.split("-")[1]}function ph(e){return e==="x"?"y":"x"}function gh(e){return e==="y"?"height":"width"}function Bn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function bh(e){return ph(Bn(e))}function Fk(e,n,l){l===void 0&&(l=!1);const r=jr(e),o=bh(e),d=gh(o);let u=o==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[d]>n.floating[d]&&(u=Vc(u)),[u,Vc(u)]}function Kk(e){const n=Vc(e);return[VO(e),n,VO(n)]}function VO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Q1=["left","right"],w1=["right","left"],Jk=["top","bottom"],e5=["bottom","top"];function t5(e,n,l){switch(e){case"top":case"bottom":return l?n?w1:Q1:n?Q1:w1;case"left":case"right":return n?Jk:e5;default:return[]}}function n5(e,n,l,r){const o=jr(e);let d=t5(Ps(e),l==="start",r);return o&&(d=d.map(u=>u+"-"+o),n&&(d=d.concat(d.map(VO)))),d}function Vc(e){const n=Ps(e);return Hk[n]+e.slice(n.length)}function s5(e){return{top:0,right:0,bottom:0,left:0,...e}}function _b(e){return typeof e!="number"?s5(e):{top:e,right:e,bottom:e,left:e}}function Gc(e){const{x:n,y:l,width:r,height:o}=e;return{width:r,height:o,top:l,left:n,right:n+r,bottom:l+o,x:n,y:l}}function k1(e,n,l){let{reference:r,floating:o}=e;const d=Bn(n),u=bh(n),f=gh(u),h=Ps(n),x=d==="y",g=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,b=r[f]/2-o[f]/2;let y;switch(h){case"top":y={x:g,y:r.y-o.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-o.width,y:p};break;default:y={x:r.x,y:r.y}}switch(jr(n)){case"start":y[u]-=b*(l&&x?-1:1);break;case"end":y[u]+=b*(l&&x?-1:1);break}return y}async function a5(e,n){var l;n===void 0&&(n={});const{x:r,y:o,platform:d,rects:u,elements:f,strategy:h}=e,{boundary:x="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:b=!1,padding:y=0}=Ts(n,e),j=_b(y),k=f[b?p==="floating"?"reference":"floating":p],Q=Gc(await d.getClippingRect({element:(l=await(d.isElement==null?void 0:d.isElement(k)))==null||l?k:k.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(f.floating)),boundary:x,rootBoundary:g,strategy:h})),C=p==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,P=await(d.getOffsetParent==null?void 0:d.getOffsetParent(f.floating)),R=await(d.isElement==null?void 0:d.isElement(P))?await(d.getScale==null?void 0:d.getScale(P))||{x:1,y:1}:{x:1,y:1},Y=Gc(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:P,strategy:h}):C);return{top:(Q.top-Y.top+j.top)/R.y,bottom:(Y.bottom-Q.bottom+j.bottom)/R.y,left:(Q.left-Y.left+j.left)/R.x,right:(Y.right-Q.right+j.right)/R.x}}const l5=50,r5=async(e,n,l)=>{const{placement:r="bottom",strategy:o="absolute",middleware:d=[],platform:u}=l,f=u.detectOverflow?u:{...u,detectOverflow:a5},h=await(u.isRTL==null?void 0:u.isRTL(n));let x=await u.getElementRects({reference:e,floating:n,strategy:o}),{x:g,y:p}=k1(x,r,h),b=r,y=0;const j={};for(let w=0;w<d.length;w++){const k=d[w];if(!k)continue;const{name:Q,fn:C}=k,{x:P,y:R,data:Y,reset:X}=await C({x:g,y:p,initialPlacement:r,placement:b,strategy:o,middlewareData:j,rects:x,platform:f,elements:{reference:e,floating:n}});g=P??g,p=R??p,j[Q]={...j[Q],...Y},X&&y<l5&&(y++,typeof X=="object"&&(X.placement&&(b=X.placement),X.rects&&(x=X.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:o}):X.rects),{x:g,y:p}=k1(x,b,h)),w=-1)}return{x:g,y:p,placement:b,strategy:o,middlewareData:j}},i5=e=>({name:"arrow",options:e,async fn(n){const{x:l,y:r,placement:o,rects:d,platform:u,elements:f,middlewareData:h}=n,{element:x,padding:g=0}=Ts(e,n)||{};if(x==null)return{};const p=_b(g),b={x:l,y:r},y=bh(o),j=gh(y),w=await u.getDimensions(x),k=y==="y",Q=k?"top":"left",C=k?"bottom":"right",P=k?"clientHeight":"clientWidth",R=d.reference[j]+d.reference[y]-b[y]-d.floating[j],Y=b[y]-d.reference[y],X=await(u.getOffsetParent==null?void 0:u.getOffsetParent(x));let z=X?X[P]:0;(!z||!await(u.isElement==null?void 0:u.isElement(X)))&&(z=f.floating[P]||d.floating[j]);const $=R/2-Y/2,F=z/2-w[j]/2-1,Z=ya(p[Q],F),J=ya(p[C],F),A=Z,U=z-w[j]-J,D=z/2-w[j]/2+$,V=UO(A,D,U),T=!h.arrow&&jr(o)!=null&&D!==V&&d.reference[j]/2-(D<A?Z:J)-w[j]/2<0,L=T?D<A?D-A:D-U:0;return{[y]:b[y]+L,data:{[y]:V,centerOffset:D-V-L,...T&&{alignmentOffset:L}},reset:T}}}),o5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var l,r;const{placement:o,middlewareData:d,rects:u,initialPlacement:f,platform:h,elements:x}=n,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:w=!0,...k}=Ts(e,n);if((l=d.arrow)!=null&&l.alignmentOffset)return{};const Q=Ps(o),C=Bn(f),P=Ps(f)===f,R=await(h.isRTL==null?void 0:h.isRTL(x.floating)),Y=b||(P||!w?[Vc(f)]:Kk(f)),X=j!=="none";!b&&X&&Y.push(...n5(f,w,j,R));const z=[f,...Y],$=await h.detectOverflow(n,k),F=[];let Z=((r=d.flip)==null?void 0:r.overflows)||[];if(g&&F.push($[Q]),p){const D=Fk(o,u,R);F.push($[D[0]],$[D[1]])}if(Z=[...Z,{placement:o,overflows:F}],!F.every(D=>D<=0)){var J,A;const D=(((J=d.flip)==null?void 0:J.index)||0)+1,V=z[D];if(V&&(!(p==="alignment"?C!==Bn(V):!1)||Z.every(ee=>Bn(ee.placement)===C?ee.overflows[0]>0:!0)))return{data:{index:D,overflows:Z},reset:{placement:V}};let T=(A=Z.filter(L=>L.overflows[0]<=0).sort((L,ee)=>L.overflows[1]-ee.overflows[1])[0])==null?void 0:A.placement;if(!T)switch(y){case"bestFit":{var U;const L=(U=Z.filter(ee=>{if(X){const de=Bn(ee.placement);return de===C||de==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(de=>de>0).reduce((de,ae)=>de+ae,0)]).sort((ee,de)=>ee[1]-de[1])[0])==null?void 0:U[0];L&&(T=L);break}case"initialPlacement":T=f;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function N1(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function $1(e){return Ik.some(n=>e[n]>=0)}const c5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:l,platform:r}=n,{strategy:o="referenceHidden",...d}=Ts(e,n);switch(o){case"referenceHidden":{const u=await r.detectOverflow(n,{...d,elementContext:"reference"}),f=N1(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:$1(f)}}}case"escaped":{const u=await r.detectOverflow(n,{...d,altBoundary:!0}),f=N1(u,l.floating);return{data:{escapedOffsets:f,escaped:$1(f)}}}default:return{}}}}},Xb=new Set(["left","top"]);async function d5(e,n){const{placement:l,platform:r,elements:o}=e,d=await(r.isRTL==null?void 0:r.isRTL(o.floating)),u=Ps(l),f=jr(l),h=Bn(l)==="y",x=Xb.has(u)?-1:1,g=d&&h?-1:1,p=Ts(n,e);let{mainAxis:b,crossAxis:y,alignmentAxis:j}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof j=="number"&&(y=f==="end"?j*-1:j),h?{x:y*g,y:b*x}:{x:b*x,y:y*g}}const u5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var l,r;const{x:o,y:d,placement:u,middlewareData:f}=n,h=await d5(n,e);return u===((l=f.offset)==null?void 0:l.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:o+h.x,y:d+h.y,data:{...h,placement:u}}}}},f5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:l,y:r,placement:o,platform:d}=n,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:Q=>{let{x:C,y:P}=Q;return{x:C,y:P}}},...x}=Ts(e,n),g={x:l,y:r},p=await d.detectOverflow(n,x),b=Bn(Ps(o)),y=ph(b);let j=g[y],w=g[b];if(u){const Q=y==="y"?"top":"left",C=y==="y"?"bottom":"right",P=j+p[Q],R=j-p[C];j=UO(P,j,R)}if(f){const Q=b==="y"?"top":"left",C=b==="y"?"bottom":"right",P=w+p[Q],R=w-p[C];w=UO(P,w,R)}const k=h.fn({...n,[y]:j,[b]:w});return{...k,data:{x:k.x-l,y:k.y-r,enabled:{[y]:u,[b]:f}}}}}},O5=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:l,y:r,placement:o,rects:d,middlewareData:u}=n,{offset:f=0,mainAxis:h=!0,crossAxis:x=!0}=Ts(e,n),g={x:l,y:r},p=Bn(o),b=ph(p);let y=g[b],j=g[p];const w=Ts(f,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(h){const P=b==="y"?"height":"width",R=d.reference[b]-d.floating[P]+k.mainAxis,Y=d.reference[b]+d.reference[P]-k.mainAxis;y<R?y=R:y>Y&&(y=Y)}if(x){var Q,C;const P=b==="y"?"width":"height",R=Xb.has(Ps(o)),Y=d.reference[p]-d.floating[P]+(R&&((Q=u.offset)==null?void 0:Q[p])||0)+(R?0:k.crossAxis),X=d.reference[p]+d.reference[P]+(R?0:((C=u.offset)==null?void 0:C[p])||0)-(R?k.crossAxis:0);j<Y?j=Y:j>X&&(j=X)}return{[b]:y,[p]:j}}}},h5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var l,r;const{placement:o,rects:d,platform:u,elements:f}=n,{apply:h=()=>{},...x}=Ts(e,n),g=await u.detectOverflow(n,x),p=Ps(o),b=jr(o),y=Bn(o)==="y",{width:j,height:w}=d.floating;let k,Q;p==="top"||p==="bottom"?(k=p,Q=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(Q=p,k=b==="end"?"top":"bottom");const C=w-g.top-g.bottom,P=j-g.left-g.right,R=ya(w-g[k],C),Y=ya(j-g[Q],P),X=!n.middlewareData.shift;let z=R,$=Y;if((l=n.middlewareData.shift)!=null&&l.enabled.x&&($=P),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(z=C),X&&!b){const Z=ln(g.left,0),J=ln(g.right,0),A=ln(g.top,0),U=ln(g.bottom,0);y?$=j-2*(Z!==0||J!==0?Z+J:ln(g.left,g.right)):z=w-2*(A!==0||U!==0?A+U:ln(g.top,g.bottom))}await h({...n,availableWidth:$,availableHeight:z});const F=await u.getDimensions(f.floating);return j!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function hd(){return typeof window<"u"}function Qr(e){return Zb(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Kn(e){var n;return(n=(Zb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Zb(e){return hd()?e instanceof Node||e instanceof rn(e).Node:!1}function Rn(e){return hd()?e instanceof Element||e instanceof rn(e).Element:!1}function Rs(e){return hd()?e instanceof HTMLElement||e instanceof rn(e).HTMLElement:!1}function T1(e){return!hd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot}function Ui(e){const{overflow:n,overflowX:l,overflowY:r,display:o}=An(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+l)&&o!=="inline"&&o!=="contents"}function m5(e){return/^(table|td|th)$/.test(Qr(e))}function md(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const x5=/transform|translate|scale|rotate|perspective|filter/,p5=/paint|layout|strict|content/,Fa=e=>!!e&&e!=="none";let If;function vh(e){const n=Rn(e)?An(e):e;return Fa(n.transform)||Fa(n.translate)||Fa(n.scale)||Fa(n.rotate)||Fa(n.perspective)||!yh()&&(Fa(n.backdropFilter)||Fa(n.filter))||x5.test(n.willChange||"")||p5.test(n.contain||"")}function g5(e){let n=Sa(e);for(;Rs(n)&&!hr(n);){if(vh(n))return n;if(md(n))return null;n=Sa(n)}return null}function yh(){return If==null&&(If=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),If}function hr(e){return/^(html|body|#document)$/.test(Qr(e))}function An(e){return rn(e).getComputedStyle(e)}function xd(e){return Rn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sa(e){if(Qr(e)==="html")return e;const n=e.assignedSlot||e.parentNode||T1(e)&&e.host||Kn(e);return T1(n)?n.host:n}function Eb(e){const n=Sa(e);return hr(n)?e.ownerDocument?e.ownerDocument.body:e.body:Rs(n)&&Ui(n)?n:Eb(n)}function Ti(e,n,l){var r;n===void 0&&(n=[]),l===void 0&&(l=!0);const o=Eb(e),d=o===((r=e.ownerDocument)==null?void 0:r.body),u=rn(o);if(d){const f=GO(u);return n.concat(u,u.visualViewport||[],Ui(o)?o:[],f&&l?Ti(f):[])}else return n.concat(o,Ti(o,[],l))}function GO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qb(e){const n=An(e);let l=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=Rs(e),d=o?e.offsetWidth:l,u=o?e.offsetHeight:r,f=Uc(l)!==d||Uc(r)!==u;return f&&(l=d,r=u),{width:l,height:r,$:f}}function Sh(e){return Rn(e)?e:e.contextElement}function cr(e){const n=Sh(e);if(!Rs(n))return In(1);const l=n.getBoundingClientRect(),{width:r,height:o,$:d}=qb(n);let u=(d?Uc(l.width):l.width)/r,f=(d?Uc(l.height):l.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const b5=In(0);function Mb(e){const n=rn(e);return!yh()||!n.visualViewport?b5:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function v5(e,n,l){return n===void 0&&(n=!1),!l||n&&l!==rn(e)?!1:n}function ll(e,n,l,r){n===void 0&&(n=!1),l===void 0&&(l=!1);const o=e.getBoundingClientRect(),d=Sh(e);let u=In(1);n&&(r?Rn(r)&&(u=cr(r)):u=cr(e));const f=v5(d,l,r)?Mb(d):In(0);let h=(o.left+f.x)/u.x,x=(o.top+f.y)/u.y,g=o.width/u.x,p=o.height/u.y;if(d){const b=rn(d),y=r&&Rn(r)?rn(r):r;let j=b,w=GO(j);for(;w&&r&&y!==j;){const k=cr(w),Q=w.getBoundingClientRect(),C=An(w),P=Q.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,R=Q.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;h*=k.x,x*=k.y,g*=k.x,p*=k.y,h+=P,x+=R,j=rn(w),w=GO(j)}}return Gc({width:g,height:p,x:h,y:x})}function pd(e,n){const l=xd(e).scrollLeft;return n?n.left+l:ll(Kn(e)).left+l}function Yb(e,n){const l=e.getBoundingClientRect(),r=l.left+n.scrollLeft-pd(e,l),o=l.top+n.scrollTop;return{x:r,y:o}}function y5(e){let{elements:n,rect:l,offsetParent:r,strategy:o}=e;const d=o==="fixed",u=Kn(r),f=n?md(n.floating):!1;if(r===u||f&&d)return l;let h={scrollLeft:0,scrollTop:0},x=In(1);const g=In(0),p=Rs(r);if((p||!p&&!d)&&((Qr(r)!=="body"||Ui(u))&&(h=xd(r)),p)){const y=ll(r);x=cr(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const b=u&&!p&&!d?Yb(u,h):In(0);return{width:l.width*x.x,height:l.height*x.y,x:l.x*x.x-h.scrollLeft*x.x+g.x+b.x,y:l.y*x.y-h.scrollTop*x.y+g.y+b.y}}function S5(e){return Array.from(e.getClientRects())}function j5(e){const n=Kn(e),l=xd(e),r=e.ownerDocument.body,o=ln(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),d=ln(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let u=-l.scrollLeft+pd(e);const f=-l.scrollTop;return An(r).direction==="rtl"&&(u+=ln(n.clientWidth,r.clientWidth)-o),{width:o,height:d,x:u,y:f}}const P1=25;function Q5(e,n){const l=rn(e),r=Kn(e),o=l.visualViewport;let d=r.clientWidth,u=r.clientHeight,f=0,h=0;if(o){d=o.width,u=o.height;const g=yh();(!g||g&&n==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}const x=pd(r);if(x<=0){const g=r.ownerDocument,p=g.body,b=getComputedStyle(p),y=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,j=Math.abs(r.clientWidth-p.clientWidth-y);j<=P1&&(d-=j)}else x<=P1&&(d+=x);return{width:d,height:u,x:f,y:h}}function w5(e,n){const l=ll(e,!0,n==="fixed"),r=l.top+e.clientTop,o=l.left+e.clientLeft,d=Rs(e)?cr(e):In(1),u=e.clientWidth*d.x,f=e.clientHeight*d.y,h=o*d.x,x=r*d.y;return{width:u,height:f,x:h,y:x}}function C1(e,n,l){let r;if(n==="viewport")r=Q5(e,l);else if(n==="document")r=j5(Kn(e));else if(Rn(n))r=w5(n,l);else{const o=Mb(e);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Gc(r)}function Ub(e,n){const l=Sa(e);return l===n||!Rn(l)||hr(l)?!1:An(l).position==="fixed"||Ub(l,n)}function k5(e,n){const l=n.get(e);if(l)return l;let r=Ti(e,[],!1).filter(f=>Rn(f)&&Qr(f)!=="body"),o=null;const d=An(e).position==="fixed";let u=d?Sa(e):e;for(;Rn(u)&&!hr(u);){const f=An(u),h=vh(u);!h&&f.position==="fixed"&&(o=null),(d?!h&&!o:!h&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ui(u)&&!h&&Ub(e,u))?r=r.filter(g=>g!==u):o=f,u=Sa(u)}return n.set(e,r),r}function N5(e){let{element:n,boundary:l,rootBoundary:r,strategy:o}=e;const u=[...l==="clippingAncestors"?md(n)?[]:k5(n,this._c):[].concat(l),r],f=C1(n,u[0],o);let h=f.top,x=f.right,g=f.bottom,p=f.left;for(let b=1;b<u.length;b++){const y=C1(n,u[b],o);h=ln(y.top,h),x=ya(y.right,x),g=ya(y.bottom,g),p=ln(y.left,p)}return{width:x-p,height:g-h,x:p,y:h}}function $5(e){const{width:n,height:l}=qb(e);return{width:n,height:l}}function T5(e,n,l){const r=Rs(n),o=Kn(n),d=l==="fixed",u=ll(e,!0,d,n);let f={scrollLeft:0,scrollTop:0};const h=In(0);function x(){h.x=pd(o)}if(r||!r&&!d)if((Qr(n)!=="body"||Ui(o))&&(f=xd(n)),r){const y=ll(n,!0,d,n);h.x=y.x+n.clientLeft,h.y=y.y+n.clientTop}else o&&x();d&&!r&&o&&x();const g=o&&!r&&!d?Yb(o,f):In(0),p=u.left+f.scrollLeft-h.x-g.x,b=u.top+f.scrollTop-h.y-g.y;return{x:p,y:b,width:u.width,height:u.height}}function Hf(e){return An(e).position==="static"}function z1(e,n){if(!Rs(e)||An(e).position==="fixed")return null;if(n)return n(e);let l=e.offsetParent;return Kn(e)===l&&(l=l.ownerDocument.body),l}function Vb(e,n){const l=rn(e);if(md(e))return l;if(!Rs(e)){let o=Sa(e);for(;o&&!hr(o);){if(Rn(o)&&!Hf(o))return o;o=Sa(o)}return l}let r=z1(e,n);for(;r&&m5(r)&&Hf(r);)r=z1(r,n);return r&&hr(r)&&Hf(r)&&!vh(r)?l:r||g5(e)||l}const P5=async function(e){const n=this.getOffsetParent||Vb,l=this.getDimensions,r=await l(e.floating);return{reference:T5(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C5(e){return An(e).direction==="rtl"}const z5={convertOffsetParentRelativeRectToViewportRelativeRect:y5,getDocumentElement:Kn,getClippingRect:N5,getOffsetParent:Vb,getElementRects:P5,getClientRects:S5,getDimensions:$5,getScale:cr,isElement:Rn,isRTL:C5};function Gb(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function R5(e,n){let l=null,r;const o=Kn(e);function d(){var f;clearTimeout(r),(f=l)==null||f.disconnect(),l=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),d();const x=e.getBoundingClientRect(),{left:g,top:p,width:b,height:y}=x;if(f||n(),!b||!y)return;const j=hc(p),w=hc(o.clientWidth-(g+b)),k=hc(o.clientHeight-(p+y)),Q=hc(g),P={rootMargin:-j+"px "+-w+"px "+-k+"px "+-Q+"px",threshold:ln(0,ya(1,h))||1};let R=!0;function Y(X){const z=X[0].intersectionRatio;if(z!==h){if(!R)return u();z?u(!1,z):r=setTimeout(()=>{u(!1,1e-7)},1e3)}z===1&&!Gb(x,e.getBoundingClientRect())&&u(),R=!1}try{l=new IntersectionObserver(Y,{...P,root:o.ownerDocument})}catch{l=new IntersectionObserver(Y,P)}l.observe(e)}return u(!0),d}function A5(e,n,l,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:d=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,x=Sh(e),g=o||d?[...x?Ti(x):[],...n?Ti(n):[]]:[];g.forEach(Q=>{o&&Q.addEventListener("scroll",l,{passive:!0}),d&&Q.addEventListener("resize",l)});const p=x&&f?R5(x,l):null;let b=-1,y=null;u&&(y=new ResizeObserver(Q=>{let[C]=Q;C&&C.target===x&&y&&n&&(y.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var P;(P=y)==null||P.observe(n)})),l()}),x&&!h&&y.observe(x),n&&y.observe(n));let j,w=h?ll(e):null;h&&k();function k(){const Q=ll(e);w&&!Gb(w,Q)&&l(),w=Q,j=requestAnimationFrame(k)}return l(),()=>{var Q;g.forEach(C=>{o&&C.removeEventListener("scroll",l),d&&C.removeEventListener("resize",l)}),p==null||p(),(Q=y)==null||Q.disconnect(),y=null,h&&cancelAnimationFrame(j)}}const _5=u5,X5=f5,Z5=o5,E5=h5,q5=c5,R1=i5,M5=O5,Y5=(e,n,l)=>{const r=new Map,o={platform:z5,...l},d={...o.platform,_c:r};return r5(e,n,{...o,platform:d})};var U5=typeof document<"u",V5=function(){},zc=U5?v.useLayoutEffect:V5;function Dc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let l,r,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==n.length)return!1;for(r=l;r--!==0;)if(!Dc(e[r],n[r]))return!1;return!0}if(o=Object.keys(e),l=o.length,l!==Object.keys(n).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=l;r--!==0;){const d=o[r];if(!(d==="_owner"&&e.$$typeof)&&!Dc(e[d],n[d]))return!1}return!0}return e!==e&&n!==n}function Db(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function A1(e,n){const l=Db(e);return Math.round(n*l)/l}function Ff(e){const n=v.useRef(e);return zc(()=>{n.current=e}),n}function G5(e){e===void 0&&(e={});const{placement:n="bottom",strategy:l="absolute",middleware:r=[],platform:o,elements:{reference:d,floating:u}={},transform:f=!0,whileElementsMounted:h,open:x}=e,[g,p]=v.useState({x:0,y:0,strategy:l,placement:n,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);Dc(b,r)||y(r);const[j,w]=v.useState(null),[k,Q]=v.useState(null),C=v.useCallback(ee=>{ee!==X.current&&(X.current=ee,w(ee))},[]),P=v.useCallback(ee=>{ee!==z.current&&(z.current=ee,Q(ee))},[]),R=d||j,Y=u||k,X=v.useRef(null),z=v.useRef(null),$=v.useRef(g),F=h!=null,Z=Ff(h),J=Ff(o),A=Ff(x),U=v.useCallback(()=>{if(!X.current||!z.current)return;const ee={placement:n,strategy:l,middleware:b};J.current&&(ee.platform=J.current),Y5(X.current,z.current,ee).then(de=>{const ae={...de,isPositioned:A.current!==!1};D.current&&!Dc($.current,ae)&&($.current=ae,ob.flushSync(()=>{p(ae)}))})},[b,n,l,J,A]);zc(()=>{x===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(ee=>({...ee,isPositioned:!1})))},[x]);const D=v.useRef(!1);zc(()=>(D.current=!0,()=>{D.current=!1}),[]),zc(()=>{if(R&&(X.current=R),Y&&(z.current=Y),R&&Y){if(Z.current)return Z.current(R,Y,U);U()}},[R,Y,U,Z,F]);const V=v.useMemo(()=>({reference:X,floating:z,setReference:C,setFloating:P}),[C,P]),T=v.useMemo(()=>({reference:R,floating:Y}),[R,Y]),L=v.useMemo(()=>{const ee={position:l,left:0,top:0};if(!T.floating)return ee;const de=A1(T.floating,g.x),ae=A1(T.floating,g.y);return f?{...ee,transform:"translate("+de+"px, "+ae+"px)",...Db(T.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:de,top:ae}},[l,f,T.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:U,refs:V,elements:T,floatingStyles:L}),[g,U,V,T,L])}const D5=e=>{function n(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:e,fn(l){const{element:r,padding:o}=typeof e=="function"?e(l):e;return r&&n(r)?r.current!=null?R1({element:r.current,padding:o}).fn(l):{}:r?R1({element:r,padding:o}).fn(l):{}}}},L5=(e,n)=>{const l=_5(e);return{name:l.name,fn:l.fn,options:[e,n]}},W5=(e,n)=>{const l=X5(e);return{name:l.name,fn:l.fn,options:[e,n]}},B5=(e,n)=>({fn:M5(e).fn,options:[e,n]}),I5=(e,n)=>{const l=Z5(e);return{name:l.name,fn:l.fn,options:[e,n]}},H5=(e,n)=>{const l=E5(e);return{name:l.name,fn:l.fn,options:[e,n]}},F5=(e,n)=>{const l=q5(e);return{name:l.name,fn:l.fn,options:[e,n]}},K5=(e,n)=>{const l=D5(e);return{name:l.name,fn:l.fn,options:[e,n]}};var J5="Arrow",Lb=v.forwardRef((e,n)=>{const{children:l,width:r=10,height:o=5,...d}=e;return s.jsx(et.svg,{...d,ref:n,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?l:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lb.displayName=J5;var eN=Lb;function tN(e){const[n,l]=v.useState(void 0);return $s(()=>{if(e){l({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const d=o[0];let u,f;if("borderBoxSize"in d){const h=d.borderBoxSize,x=Array.isArray(h)?h[0]:h;u=x.inlineSize,f=x.blockSize}else u=e.offsetWidth,f=e.offsetHeight;l({width:u,height:f})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else l(void 0)},[e]),n}var jh="Popper",[Wb,Bb]=ml(jh),[nN,Ib]=Wb(jh),Hb=e=>{const{__scopePopper:n,children:l}=e,[r,o]=v.useState(null);return s.jsx(nN,{scope:n,anchor:r,onAnchorChange:o,children:l})};Hb.displayName=jh;var Fb="PopperAnchor",Kb=v.forwardRef((e,n)=>{const{__scopePopper:l,virtualRef:r,...o}=e,d=Ib(Fb,l),u=v.useRef(null),f=gt(n,u),h=v.useRef(null);return v.useEffect(()=>{const x=h.current;h.current=(r==null?void 0:r.current)||u.current,x!==h.current&&d.onAnchorChange(h.current)}),r?null:s.jsx(et.div,{...o,ref:f})});Kb.displayName=Fb;var Qh="PopperContent",[sN,aN]=Wb(Qh),Jb=v.forwardRef((e,n)=>{var it,St,Ee,$t,tt,nt;const{__scopePopper:l,side:r="bottom",sideOffset:o=0,align:d="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:x=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:j,...w}=e,k=Ib(Qh,l),[Q,C]=v.useState(null),P=gt(n,jt=>C(jt)),[R,Y]=v.useState(null),X=tN(R),z=(X==null?void 0:X.width)??0,$=(X==null?void 0:X.height)??0,F=r+(d!=="center"?"-"+d:""),Z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},J=Array.isArray(x)?x:[x],A=J.length>0,U={padding:Z,boundary:J.filter(rN),altBoundary:A},{refs:D,floatingStyles:V,placement:T,isPositioned:L,middlewareData:ee}=G5({strategy:"fixed",placement:F,whileElementsMounted:(...jt)=>A5(...jt,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[L5({mainAxis:o+$,alignmentAxis:u}),h&&W5({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?B5():void 0,...U}),h&&I5({...U}),H5({...U,apply:({elements:jt,rects:dt,availableWidth:kn,availableHeight:W})=>{const{width:Oe,height:we}=dt.reference,Tt=jt.floating.style;Tt.setProperty("--radix-popper-available-width",`${kn}px`),Tt.setProperty("--radix-popper-available-height",`${W}px`),Tt.setProperty("--radix-popper-anchor-width",`${Oe}px`),Tt.setProperty("--radix-popper-anchor-height",`${we}px`)}}),R&&K5({element:R,padding:f}),iN({arrowWidth:z,arrowHeight:$}),b&&F5({strategy:"referenceHidden",...U})]}),[de,ae]=nv(T),ye=Dt(j);$s(()=>{L&&(ye==null||ye())},[L,ye]);const Se=(it=ee.arrow)==null?void 0:it.x,ge=(St=ee.arrow)==null?void 0:St.y,je=((Ee=ee.arrow)==null?void 0:Ee.centerOffset)!==0,[ze,ke]=v.useState();return $s(()=>{Q&&ke(window.getComputedStyle(Q).zIndex)},[Q]),s.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:L?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ze,"--radix-popper-transform-origin":[($t=ee.transformOrigin)==null?void 0:$t.x,(tt=ee.transformOrigin)==null?void 0:tt.y].join(" "),...((nt=ee.hide)==null?void 0:nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(sN,{scope:l,placedSide:de,onArrowChange:Y,arrowX:Se,arrowY:ge,shouldHideArrow:je,children:s.jsx(et.div,{"data-side":de,"data-align":ae,...w,ref:P,style:{...w.style,animation:L?void 0:"none"}})})})});Jb.displayName=Qh;var ev="PopperArrow",lN={top:"bottom",right:"left",bottom:"top",left:"right"},tv=v.forwardRef(function(n,l){const{__scopePopper:r,...o}=n,d=aN(ev,r),u=lN[d.placedSide];return s.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:s.jsx(eN,{...o,ref:l,style:{...o.style,display:"block"}})})});tv.displayName=ev;function rN(e){return e!==null}var iN=e=>({name:"transformOrigin",options:e,fn(n){var k,Q,C;const{placement:l,rects:r,middlewareData:o}=n,u=((k=o.arrow)==null?void 0:k.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[x,g]=nv(l),p={start:"0%",center:"50%",end:"100%"}[g],b=(((Q=o.arrow)==null?void 0:Q.x)??0)+f/2,y=(((C=o.arrow)==null?void 0:C.y)??0)+h/2;let j="",w="";return x==="bottom"?(j=u?p:`${b}px`,w=`${-h}px`):x==="top"?(j=u?p:`${b}px`,w=`${r.floating.height+h}px`):x==="right"?(j=`${-h}px`,w=u?p:`${y}px`):x==="left"&&(j=`${r.floating.width+h}px`,w=u?p:`${y}px`),{data:{x:j,y:w}}}});function nv(e){const[n,l="center"]=e.split("-");return[n,l]}var oN=Hb,cN=Kb,dN=Jb,uN=tv,fN="Portal",wh=v.forwardRef((e,n)=>{var f;const{container:l,...r}=e,[o,d]=v.useState(!1);$s(()=>d(!0),[]);const u=l||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?HQ.createPortal(s.jsx(et.div,{...r,ref:n}),u):null});wh.displayName=fN;function ON(e,n){return v.useReducer((l,r)=>n[l][r]??l,e)}var Xn=e=>{const{present:n,children:l}=e,r=hN(n),o=typeof l=="function"?l({present:r.isPresent}):v.Children.only(l),d=gt(r.ref,mN(o));return typeof l=="function"||r.isPresent?v.cloneElement(o,{ref:d}):null};Xn.displayName="Presence";function hN(e){const[n,l]=v.useState(),r=v.useRef(null),o=v.useRef(e),d=v.useRef("none"),u=e?"mounted":"unmounted",[f,h]=ON(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const x=mc(r.current);d.current=f==="mounted"?x:"none"},[f]),$s(()=>{const x=r.current,g=o.current;if(g!==e){const b=d.current,y=mc(x);e?h("MOUNT"):y==="none"||(x==null?void 0:x.display)==="none"?h("UNMOUNT"):h(g&&b!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),$s(()=>{if(n){let x;const g=n.ownerDocument.defaultView??window,p=y=>{const w=mc(r.current).includes(CSS.escape(y.animationName));if(y.target===n&&w&&(h("ANIMATION_END"),!o.current)){const k=n.style.animationFillMode;n.style.animationFillMode="forwards",x=g.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=k)})}},b=y=>{y.target===n&&(d.current=mc(r.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",p),n.addEventListener("animationend",p),()=>{g.clearTimeout(x),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",p),n.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[n,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(x=>{r.current=x?getComputedStyle(x):null,l(x)},[])}}function mc(e){return(e==null?void 0:e.animationName)||"none"}function mN(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=n&&"isReactWarning"in n&&n.isReactWarning;return l?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,l=n&&"isReactWarning"in n&&n.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var xN=ib[" useInsertionEffect ".trim().toString()]||$s;function gd({prop:e,defaultProp:n,onChange:l=()=>{},caller:r}){const[o,d,u]=pN({defaultProp:n,onChange:l}),f=e!==void 0,h=f?e:o;{const g=v.useRef(e!==void 0);v.useEffect(()=>{const p=g.current;p!==f&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,r])}const x=v.useCallback(g=>{var p;if(f){const b=gN(g)?g(e):g;b!==e&&((p=u.current)==null||p.call(u,b))}else d(g)},[f,e,d,u]);return[h,x]}function pN({defaultProp:e,onChange:n}){const[l,r]=v.useState(e),o=v.useRef(l),d=v.useRef(n);return xN(()=>{d.current=n},[n]),v.useEffect(()=>{var u;o.current!==l&&((u=d.current)==null||u.call(d,l),o.current=l)},[l,o]),[l,r,d]}function gN(e){return typeof e=="function"}var bN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),vN="VisuallyHidden",sv=v.forwardRef((e,n)=>s.jsx(et.span,{...e,ref:n,style:{...bN,...e.style}}));sv.displayName=vN;var yN=sv,[bd]=ml("Tooltip",[Bb]),vd=Bb(),av="TooltipProvider",SN=700,DO="tooltip.open",[jN,kh]=bd(av),lv=e=>{const{__scopeTooltip:n,delayDuration:l=SN,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:d}=e,u=v.useRef(!0),f=v.useRef(!1),h=v.useRef(0);return v.useEffect(()=>{const x=h.current;return()=>window.clearTimeout(x)},[]),s.jsx(jN,{scope:n,isOpenDelayedRef:u,delayDuration:l,onOpen:v.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(x=>{f.current=x},[]),disableHoverableContent:o,children:d})};lv.displayName=av;var Pi="Tooltip",[QN,Vi]=bd(Pi),rv=e=>{const{__scopeTooltip:n,children:l,open:r,defaultOpen:o,onOpenChange:d,disableHoverableContent:u,delayDuration:f}=e,h=kh(Pi,e.__scopeTooltip),x=vd(n),[g,p]=v.useState(null),b=or(),y=v.useRef(0),j=u??h.disableHoverableContent,w=f??h.delayDuration,k=v.useRef(!1),[Q,C]=gd({prop:r,defaultProp:o??!1,onChange:z=>{z?(h.onOpen(),document.dispatchEvent(new CustomEvent(DO))):h.onClose(),d==null||d(z)},caller:Pi}),P=v.useMemo(()=>Q?k.current?"delayed-open":"instant-open":"closed",[Q]),R=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,C(!0)},[C]),Y=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C(!1)},[C]),X=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,C(!0),y.current=0},w)},[w,C]);return v.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),s.jsx(oN,{...x,children:s.jsx(QN,{scope:n,contentId:b,open:Q,stateAttribute:P,trigger:g,onTriggerChange:p,onTriggerEnter:v.useCallback(()=>{h.isOpenDelayedRef.current?X():R()},[h.isOpenDelayedRef,X,R]),onTriggerLeave:v.useCallback(()=>{j?Y():(window.clearTimeout(y.current),y.current=0)},[Y,j]),onOpen:R,onClose:Y,disableHoverableContent:j,children:l})})};rv.displayName=Pi;var LO="TooltipTrigger",iv=v.forwardRef((e,n)=>{const{__scopeTooltip:l,...r}=e,o=Vi(LO,l),d=kh(LO,l),u=vd(l),f=v.useRef(null),h=gt(n,f,o.onTriggerChange),x=v.useRef(!1),g=v.useRef(!1),p=v.useCallback(()=>x.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(cN,{asChild:!0,...u,children:s.jsx(et.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:h,onPointerMove:Ge(e.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!d.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{o.open&&o.onClose(),x.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ge(e.onFocus,()=>{x.current||o.onOpen()}),onBlur:Ge(e.onBlur,o.onClose),onClick:Ge(e.onClick,o.onClose)})})});iv.displayName=LO;var Nh="TooltipPortal",[wN,kN]=bd(Nh,{forceMount:void 0}),ov=e=>{const{__scopeTooltip:n,forceMount:l,children:r,container:o}=e,d=Vi(Nh,n);return s.jsx(wN,{scope:n,forceMount:l,children:s.jsx(Xn,{present:l||d.open,children:s.jsx(wh,{asChild:!0,container:o,children:r})})})};ov.displayName=Nh;var mr="TooltipContent",cv=v.forwardRef((e,n)=>{const l=kN(mr,e.__scopeTooltip),{forceMount:r=l.forceMount,side:o="top",...d}=e,u=Vi(mr,e.__scopeTooltip);return s.jsx(Xn,{present:r||u.open,children:u.disableHoverableContent?s.jsx(dv,{side:o,...d,ref:n}):s.jsx(NN,{side:o,...d,ref:n})})}),NN=v.forwardRef((e,n)=>{const l=Vi(mr,e.__scopeTooltip),r=kh(mr,e.__scopeTooltip),o=v.useRef(null),d=gt(n,o),[u,f]=v.useState(null),{trigger:h,onClose:x}=l,g=o.current,{onPointerInTransitChange:p}=r,b=v.useCallback(()=>{f(null),p(!1)},[p]),y=v.useCallback((j,w)=>{const k=j.currentTarget,Q={x:j.clientX,y:j.clientY},C=CN(Q,k.getBoundingClientRect()),P=zN(Q,C),R=RN(w.getBoundingClientRect()),Y=_N([...P,...R]);f(Y),p(!0)},[p]);return v.useEffect(()=>()=>b(),[b]),v.useEffect(()=>{if(h&&g){const j=k=>y(k,g),w=k=>y(k,h);return h.addEventListener("pointerleave",j),g.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",j),g.removeEventListener("pointerleave",w)}}},[h,g,y,b]),v.useEffect(()=>{if(u){const j=w=>{const k=w.target,Q={x:w.clientX,y:w.clientY},C=(h==null?void 0:h.contains(k))||(g==null?void 0:g.contains(k)),P=!AN(Q,u);C?b():P&&(b(),x())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[h,g,u,x,b]),s.jsx(dv,{...e,ref:d})}),[$N,TN]=bd(Pi,{isInside:!1}),PN=Rk("TooltipContent"),dv=v.forwardRef((e,n)=>{const{__scopeTooltip:l,children:r,"aria-label":o,onEscapeKeyDown:d,onPointerDownOutside:u,...f}=e,h=Vi(mr,l),x=vd(l),{onClose:g}=h;return v.useEffect(()=>(document.addEventListener(DO,g),()=>document.removeEventListener(DO,g)),[g]),v.useEffect(()=>{if(h.trigger){const p=b=>{const y=b.target;y!=null&&y.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),s.jsx(xh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:s.jsxs(dN,{"data-state":h.stateAttribute,...x,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(PN,{children:r}),s.jsx($N,{scope:l,isInside:!0,children:s.jsx(yN,{id:h.contentId,role:"tooltip",children:o||r})})]})})});cv.displayName=mr;var uv="TooltipArrow",fv=v.forwardRef((e,n)=>{const{__scopeTooltip:l,...r}=e,o=vd(l);return TN(uv,l).isInside?null:s.jsx(uN,{...o,...r,ref:n})});fv.displayName=uv;function CN(e,n){const l=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),d=Math.abs(n.left-e.x);switch(Math.min(l,r,o,d)){case d:return"left";case o:return"right";case l:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zN(e,n,l=5){const r=[];switch(n){case"top":r.push({x:e.x-l,y:e.y+l},{x:e.x+l,y:e.y+l});break;case"bottom":r.push({x:e.x-l,y:e.y-l},{x:e.x+l,y:e.y-l});break;case"left":r.push({x:e.x+l,y:e.y-l},{x:e.x+l,y:e.y+l});break;case"right":r.push({x:e.x-l,y:e.y-l},{x:e.x-l,y:e.y+l});break}return r}function RN(e){const{top:n,right:l,bottom:r,left:o}=e;return[{x:o,y:n},{x:l,y:n},{x:l,y:r},{x:o,y:r}]}function AN(e,n){const{x:l,y:r}=e;let o=!1;for(let d=0,u=n.length-1;d<n.length;u=d++){const f=n[d],h=n[u],x=f.x,g=f.y,p=h.x,b=h.y;g>r!=b>r&&l<(p-x)*(r-g)/(b-g)+x&&(o=!o)}return o}function _N(e){const n=e.slice();return n.sort((l,r)=>l.x<r.x?-1:l.x>r.x?1:l.y<r.y?-1:l.y>r.y?1:0),XN(n)}function XN(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const d=n[n.length-1],u=n[n.length-2];if((d.x-u.x)*(o.y-u.y)>=(d.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}n.pop();const l=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;l.length>=2;){const d=l[l.length-1],u=l[l.length-2];if((d.x-u.x)*(o.y-u.y)>=(d.y-u.y)*(o.x-u.x))l.pop();else break}l.push(o)}return l.pop(),n.length===1&&l.length===1&&n[0].x===l[0].x&&n[0].y===l[0].y?n:n.concat(l)}var ZN=lv,EN=rv,qN=iv,MN=ov,YN=cv,UN=fv;function VN({children:e}){return s.jsx(ZN,{delayDuration:300,children:e})}function Lc({children:e,content:n,side:l="top",className:r}){return n?s.jsxs(EN,{children:[s.jsx(qN,{asChild:!0,children:e}),s.jsx(MN,{children:s.jsxs(YN,{side:l,sideOffset:6,className:le("z-50 px-2.5 py-1.5 text-xs font-sans","bg-surface-4 text-text-0 border border-border rounded-md shadow-lg","animate-in fade-in-0 zoom-in-95",r),children:[n,s.jsx(UN,{className:"fill-surface-4"})]})})]}):e}/**
30
+ * @license lucide-react v1.7.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */const Ov=(...e)=>e.filter((n,l,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===l).join(" ").trim();/**
35
+ * @license lucide-react v1.7.0 - ISC
36
+ *
37
+ * This source code is licensed under the ISC license.
38
+ * See the LICENSE file in the root directory of this source tree.
39
+ */const GN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
40
+ * @license lucide-react v1.7.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */const DN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,l,r)=>r?r.toUpperCase():l.toLowerCase());/**
45
+ * @license lucide-react v1.7.0 - ISC
46
+ *
47
+ * This source code is licensed under the ISC license.
48
+ * See the LICENSE file in the root directory of this source tree.
49
+ */const _1=e=>{const n=DN(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
50
+ * @license lucide-react v1.7.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */var Kf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
55
+ * @license lucide-react v1.7.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */const LN=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},WN=v.createContext({}),BN=()=>v.useContext(WN),IN=v.forwardRef(({color:e,size:n,strokeWidth:l,absoluteStrokeWidth:r,className:o="",children:d,iconNode:u,...f},h)=>{const{size:x=24,strokeWidth:g=2,absoluteStrokeWidth:p=!1,color:b="currentColor",className:y=""}=BN()??{},j=r??p?Number(l??g)*24/Number(n??x):l??g;return v.createElement("svg",{ref:h,...Kf,width:n??x??Kf.width,height:n??x??Kf.height,stroke:e??b,strokeWidth:j,className:Ov("lucide",y,o),...!d&&!LN(f)&&{"aria-hidden":"true"},...f},[...u.map(([w,k])=>v.createElement(w,k)),...Array.isArray(d)?d:[d]])});/**
60
+ * @license lucide-react v1.7.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const oe=(e,n)=>{const l=v.forwardRef(({className:r,...o},d)=>v.createElement(IN,{ref:d,iconNode:n,className:Ov(`lucide-${GN(_1(e))}`,`lucide-${e}`,r),...o}));return l.displayName=_1(e),l};/**
65
+ * @license lucide-react v1.7.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const HN=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ci=oe("activity",HN);/**
70
+ * @license lucide-react v1.7.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const FN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],KN=oe("arrow-left",FN);/**
75
+ * @license lucide-react v1.7.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const JN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],e$=oe("arrow-up",JN);/**
80
+ * @license lucide-react v1.7.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const t$=[["circle",{cx:"11",cy:"13",r:"9",key:"hd149"}],["path",{d:"M14.35 4.65 16.3 2.7a2.41 2.41 0 0 1 3.4 0l1.6 1.6a2.4 2.4 0 0 1 0 3.4l-1.95 1.95",key:"jp4j1b"}],["path",{d:"m22 2-1.5 1.5",key:"ay92ug"}]],n$=oe("bomb",t$);/**
85
+ * @license lucide-react v1.7.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const s$=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],$h=oe("book-open",s$);/**
90
+ * @license lucide-react v1.7.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const a$=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Th=oe("box",a$);/**
95
+ * @license lucide-react v1.7.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const l$=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],r$=oe("brain",l$);/**
100
+ * @license lucide-react v1.7.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const i$=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],o$=oe("calculator",i$);/**
105
+ * @license lucide-react v1.7.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const c$=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Wc=oe("calendar",c$);/**
110
+ * @license lucide-react v1.7.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const d$=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],hv=oe("chart-column",d$);/**
115
+ * @license lucide-react v1.7.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const u$=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],mv=oe("chart-spline",u$);/**
120
+ * @license lucide-react v1.7.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const f$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kt=oe("check",f$);/**
125
+ * @license lucide-react v1.7.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const O$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bn=oe("chevron-down",O$);/**
130
+ * @license lucide-react v1.7.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const h$=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],xv=oe("chevron-left",h$);/**
135
+ * @license lucide-react v1.7.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const m$=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Na=oe("chevron-right",m$);/**
140
+ * @license lucide-react v1.7.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const x$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Cs=oe("circle-alert",x$);/**
145
+ * @license lucide-react v1.7.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const p$=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ja=oe("circle-check-big",p$);/**
150
+ * @license lucide-react v1.7.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const g$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],WO=oe("circle-check",g$);/**
155
+ * @license lucide-react v1.7.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const b$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xr=oe("circle-question-mark",b$);/**
160
+ * @license lucide-react v1.7.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const v$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pv=oe("circle-x",v$);/**
165
+ * @license lucide-react v1.7.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const y$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],BO=oe("clock",y$);/**
170
+ * @license lucide-react v1.7.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const S$=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],j$=oe("cloud",S$);/**
175
+ * @license lucide-react v1.7.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const Q$=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],$a=oe("code-xml",Q$);/**
180
+ * @license lucide-react v1.7.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const w$=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Bc=oe("copy",w$);/**
185
+ * @license lucide-react v1.7.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const k$=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],pr=oe("cpu",k$);/**
190
+ * @license lucide-react v1.7.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const N$=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$$=oe("database",N$);/**
195
+ * @license lucide-react v1.7.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const T$=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],P$=oe("dollar-sign",T$);/**
200
+ * @license lucide-react v1.7.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const C$=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],rl=oe("download",C$);/**
205
+ * @license lucide-react v1.7.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const z$=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Fn=oe("external-link",z$);/**
210
+ * @license lucide-react v1.7.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const R$=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],yd=oe("eye-off",R$);/**
215
+ * @license lucide-react v1.7.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const A$=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xl=oe("eye",A$);/**
220
+ * @license lucide-react v1.7.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const _$=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],X$=oe("file-code",_$);/**
225
+ * @license lucide-react v1.7.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Z$=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],gv=oe("file-pen",Z$);/**
230
+ * @license lucide-react v1.7.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const E$=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],Jf=oe("file-plus",E$);/**
235
+ * @license lucide-react v1.7.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const q$=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ks=oe("file-text",q$);/**
240
+ * @license lucide-react v1.7.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const M$=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Y$=oe("file",M$);/**
245
+ * @license lucide-react v1.7.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const U$=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],V$=oe("flame",U$);/**
250
+ * @license lucide-react v1.7.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const G$=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M2 10h20",key:"1ir3d8"}]],D$=oe("folder-closed",G$);/**
255
+ * @license lucide-react v1.7.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const L$=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],il=oe("folder-open",L$);/**
260
+ * @license lucide-react v1.7.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const W$=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],eO=oe("folder-plus",W$);/**
265
+ * @license lucide-react v1.7.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const B$=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],Ph=oe("folder-search",B$);/**
270
+ * @license lucide-react v1.7.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const I$=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],bv=oe("folder",I$);/**
275
+ * @license lucide-react v1.7.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const H$=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],vv=oe("gauge",H$);/**
280
+ * @license lucide-react v1.7.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const F$=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],dr=oe("git-branch",F$);/**
285
+ * @license lucide-react v1.7.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const K$=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],J$=oe("grip-horizontal",K$);/**
290
+ * @license lucide-react v1.7.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const eT=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],Sd=oe("hard-drive",eT);/**
295
+ * @license lucide-react v1.7.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const tT=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],nT=oe("headphones",tT);/**
300
+ * @license lucide-react v1.7.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const sT=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],aT=oe("heart",sT);/**
305
+ * @license lucide-react v1.7.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const lT=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],rT=oe("house",lT);/**
310
+ * @license lucide-react v1.7.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const iT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],yv=oe("info",iT);/**
315
+ * @license lucide-react v1.7.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const oT=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],ol=oe("key",oT);/**
320
+ * @license lucide-react v1.7.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const cT=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],X1=oe("layers",cT);/**
325
+ * @license lucide-react v1.7.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const dT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],uT=oe("layout-dashboard",dT);/**
330
+ * @license lucide-react v1.7.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const fT=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],OT=oe("list-checks",fT);/**
335
+ * @license lucide-react v1.7.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const hT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],at=oe("loader-circle",hT);/**
340
+ * @license lucide-react v1.7.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const mT=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],xT=oe("lock",mT);/**
345
+ * @license lucide-react v1.7.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const pT=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],jd=oe("log-in",pT);/**
350
+ * @license lucide-react v1.7.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const gT=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Sv=oe("log-out",gT);/**
355
+ * @license lucide-react v1.7.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const bT=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],vT=oe("map",bT);/**
360
+ * @license lucide-react v1.7.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const yT=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],jv=oe("maximize-2",yT);/**
365
+ * @license lucide-react v1.7.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const ST=[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]],jT=oe("memory-stick",ST);/**
370
+ * @license lucide-react v1.7.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const QT=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],wT=oe("megaphone",QT);/**
375
+ * @license lucide-react v1.7.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const kT=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Qd=oe("message-circle",kT);/**
380
+ * @license lucide-react v1.7.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const NT=[["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"}]],Gi=oe("message-square",NT);/**
385
+ * @license lucide-react v1.7.0 - ISC
386
+ *
387
+ * This source code is licensed under the ISC license.
388
+ * See the LICENSE file in the root directory of this source tree.
389
+ */const $T=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],TT=oe("minimize-2",$T);/**
390
+ * @license lucide-react v1.7.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */const PT=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ch=oe("monitor",PT);/**
395
+ * @license lucide-react v1.7.0 - ISC
396
+ *
397
+ * This source code is licensed under the ISC license.
398
+ * See the LICENSE file in the root directory of this source tree.
399
+ */const CT=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Qv=oe("network",CT);/**
400
+ * @license lucide-react v1.7.0 - ISC
401
+ *
402
+ * This source code is licensed under the ISC license.
403
+ * See the LICENSE file in the root directory of this source tree.
404
+ */const zT=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],zi=oe("newspaper",zT);/**
405
+ * @license lucide-react v1.7.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */const RT=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],wv=oe("package",RT);/**
410
+ * @license lucide-react v1.7.0 - ISC
411
+ *
412
+ * This source code is licensed under the ISC license.
413
+ * See the LICENSE file in the root directory of this source tree.
414
+ */const AT=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],_T=oe("paperclip",AT);/**
415
+ * @license lucide-react v1.7.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ */const XT=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],ZT=oe("pause",XT);/**
420
+ * @license lucide-react v1.7.0 - ISC
421
+ *
422
+ * This source code is licensed under the ISC license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */const ET=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],qT=oe("pen-line",ET);/**
425
+ * @license lucide-react v1.7.0 - ISC
426
+ *
427
+ * This source code is licensed under the ISC license.
428
+ * See the LICENSE file in the root directory of this source tree.
429
+ */const MT=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],YT=oe("pen",MT);/**
430
+ * @license lucide-react v1.7.0 - ISC
431
+ *
432
+ * This source code is licensed under the ISC license.
433
+ * See the LICENSE file in the root directory of this source tree.
434
+ */const UT=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Di=oe("pencil",UT);/**
435
+ * @license lucide-react v1.7.0 - ISC
436
+ *
437
+ * This source code is licensed under the ISC license.
438
+ * See the LICENSE file in the root directory of this source tree.
439
+ */const VT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],GT=oe("play",VT);/**
440
+ * @license lucide-react v1.7.0 - ISC
441
+ *
442
+ * This source code is licensed under the ISC license.
443
+ * See the LICENSE file in the root directory of this source tree.
444
+ */const DT=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Ic=oe("plug-zap",DT);/**
445
+ * @license lucide-react v1.7.0 - ISC
446
+ *
447
+ * This source code is licensed under the ISC license.
448
+ * See the LICENSE file in the root directory of this source tree.
449
+ */const LT=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],pa=oe("plug",LT);/**
450
+ * @license lucide-react v1.7.0 - ISC
451
+ *
452
+ * This source code is licensed under the ISC license.
453
+ * See the LICENSE file in the root directory of this source tree.
454
+ */const WT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vn=oe("plus",WT);/**
455
+ * @license lucide-react v1.7.0 - ISC
456
+ *
457
+ * This source code is licensed under the ISC license.
458
+ * See the LICENSE file in the root directory of this source tree.
459
+ */const BT=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],IT=oe("presentation",BT);/**
460
+ * @license lucide-react v1.7.0 - ISC
461
+ *
462
+ * This source code is licensed under the ISC license.
463
+ * See the LICENSE file in the root directory of this source tree.
464
+ */const HT=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],kv=oe("puzzle",HT);/**
465
+ * @license lucide-react v1.7.0 - ISC
466
+ *
467
+ * This source code is licensed under the ISC license.
468
+ * See the LICENSE file in the root directory of this source tree.
469
+ */const FT=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Qa=oe("radio",FT);/**
470
+ * @license lucide-react v1.7.0 - ISC
471
+ *
472
+ * This source code is licensed under the ISC license.
473
+ * See the LICENSE file in the root directory of this source tree.
474
+ */const KT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Zn=oe("refresh-cw",KT);/**
475
+ * @license lucide-react v1.7.0 - ISC
476
+ *
477
+ * This source code is licensed under the ISC license.
478
+ * See the LICENSE file in the root directory of this source tree.
479
+ */const JT=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Nv=oe("rocket",JT);/**
480
+ * @license lucide-react v1.7.0 - ISC
481
+ *
482
+ * This source code is licensed under the ISC license.
483
+ * See the LICENSE file in the root directory of this source tree.
484
+ */const e3=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Li=oe("rotate-cw",e3);/**
485
+ * @license lucide-react v1.7.0 - ISC
486
+ *
487
+ * This source code is licensed under the ISC license.
488
+ * See the LICENSE file in the root directory of this source tree.
489
+ */const t3=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],IO=oe("save",t3);/**
490
+ * @license lucide-react v1.7.0 - ISC
491
+ *
492
+ * This source code is licensed under the ISC license.
493
+ * See the LICENSE file in the root directory of this source tree.
494
+ */const n3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yn=oe("search",n3);/**
495
+ * @license lucide-react v1.7.0 - ISC
496
+ *
497
+ * This source code is licensed under the ISC license.
498
+ * See the LICENSE file in the root directory of this source tree.
499
+ */const s3=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zh=oe("send",s3);/**
500
+ * @license lucide-react v1.7.0 - ISC
501
+ *
502
+ * This source code is licensed under the ISC license.
503
+ * See the LICENSE file in the root directory of this source tree.
504
+ */const a3=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Hc=oe("server",a3);/**
505
+ * @license lucide-react v1.7.0 - ISC
506
+ *
507
+ * This source code is licensed under the ISC license.
508
+ * See the LICENSE file in the root directory of this source tree.
509
+ */const l3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Rh=oe("settings",l3);/**
510
+ * @license lucide-react v1.7.0 - ISC
511
+ *
512
+ * This source code is licensed under the ISC license.
513
+ * See the LICENSE file in the root directory of this source tree.
514
+ */const r3=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ah=oe("shield-check",r3);/**
515
+ * @license lucide-react v1.7.0 - ISC
516
+ *
517
+ * This source code is licensed under the ISC license.
518
+ * See the LICENSE file in the root directory of this source tree.
519
+ */const i3=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],$v=oe("shield-x",i3);/**
520
+ * @license lucide-react v1.7.0 - ISC
521
+ *
522
+ * This source code is licensed under the ISC license.
523
+ * See the LICENSE file in the root directory of this source tree.
524
+ */const o3=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],cl=oe("shield",o3);/**
525
+ * @license lucide-react v1.7.0 - ISC
526
+ *
527
+ * This source code is licensed under the ISC license.
528
+ * See the LICENSE file in the root directory of this source tree.
529
+ */const c3=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],tO=oe("shopping-bag",c3);/**
530
+ * @license lucide-react v1.7.0 - ISC
531
+ *
532
+ * This source code is licensed under the ISC license.
533
+ * See the LICENSE file in the root directory of this source tree.
534
+ */const d3=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],_h=oe("skull",d3);/**
535
+ * @license lucide-react v1.7.0 - ISC
536
+ *
537
+ * This source code is licensed under the ISC license.
538
+ * See the LICENSE file in the root directory of this source tree.
539
+ */const u3=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],tl=oe("sparkles",u3);/**
540
+ * @license lucide-react v1.7.0 - ISC
541
+ *
542
+ * This source code is licensed under the ISC license.
543
+ * See the LICENSE file in the root directory of this source tree.
544
+ */const f3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],O3=oe("square",f3);/**
545
+ * @license lucide-react v1.7.0 - ISC
546
+ *
547
+ * This source code is licensed under the ISC license.
548
+ * See the LICENSE file in the root directory of this source tree.
549
+ */const h3=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Xh=oe("star",h3);/**
550
+ * @license lucide-react v1.7.0 - ISC
551
+ *
552
+ * This source code is licensed under the ISC license.
553
+ * See the LICENSE file in the root directory of this source tree.
554
+ */const m3=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wi=oe("terminal",m3);/**
555
+ * @license lucide-react v1.7.0 - ISC
556
+ *
557
+ * This source code is licensed under the ISC license.
558
+ * See the LICENSE file in the root directory of this source tree.
559
+ */const x3=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Zh=oe("test-tube",x3);/**
560
+ * @license lucide-react v1.7.0 - ISC
561
+ *
562
+ * This source code is licensed under the ISC license.
563
+ * See the LICENSE file in the root directory of this source tree.
564
+ */const p3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sn=oe("trash-2",p3);/**
565
+ * @license lucide-react v1.7.0 - ISC
566
+ *
567
+ * This source code is licensed under the ISC license.
568
+ * See the LICENSE file in the root directory of this source tree.
569
+ */const g3=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ta=oe("triangle-alert",g3);/**
570
+ * @license lucide-react v1.7.0 - ISC
571
+ *
572
+ * This source code is licensed under the ISC license.
573
+ * See the LICENSE file in the root directory of this source tree.
574
+ */const b3=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],v3=oe("upload",b3);/**
575
+ * @license lucide-react v1.7.0 - ISC
576
+ *
577
+ * This source code is licensed under the ISC license.
578
+ * See the LICENSE file in the root directory of this source tree.
579
+ */const y3=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],S3=oe("user-check",y3);/**
580
+ * @license lucide-react v1.7.0 - ISC
581
+ *
582
+ * This source code is licensed under the ISC license.
583
+ * See the LICENSE file in the root directory of this source tree.
584
+ */const j3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Q3=oe("user-plus",j3);/**
585
+ * @license lucide-react v1.7.0 - ISC
586
+ *
587
+ * This source code is licensed under the ISC license.
588
+ * See the LICENSE file in the root directory of this source tree.
589
+ */const w3=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Tv=oe("user",w3);/**
590
+ * @license lucide-react v1.7.0 - ISC
591
+ *
592
+ * This source code is licensed under the ISC license.
593
+ * See the LICENSE file in the root directory of this source tree.
594
+ */const k3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],wr=oe("users",k3);/**
595
+ * @license lucide-react v1.7.0 - ISC
596
+ *
597
+ * This source code is licensed under the ISC license.
598
+ * See the LICENSE file in the root directory of this source tree.
599
+ */const N3=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],$3=oe("wrench",N3);/**
600
+ * @license lucide-react v1.7.0 - ISC
601
+ *
602
+ * This source code is licensed under the ISC license.
603
+ * See the LICENSE file in the root directory of this source tree.
604
+ */const T3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],rt=oe("x",T3);/**
605
+ * @license lucide-react v1.7.0 - ISC
606
+ *
607
+ * This source code is licensed under the ISC license.
608
+ * See the LICENSE file in the root directory of this source tree.
609
+ */const P3=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Jn=oe("zap",P3),C3={success:ja,error:Cs,info:yv,warning:Ta},z3={success:"border-l-success",error:"border-l-danger",info:"border-l-accent",warning:"border-l-warning"},R3={success:"text-success",error:"text-danger",info:"text-accent",warning:"text-warning"},A3={success:3e3,error:0,info:5e3,warning:5e3};function _3({toast:e}){const n=M(o=>o.removeToast),l=C3[e.type]||yv,r=A3[e.type];return v.useEffect(()=>{if(!r)return;const o=setTimeout(()=>n(e.id),r);return()=>clearTimeout(o)},[e.id,r,n]),s.jsxs(qi.div,{layout:!0,initial:{opacity:0,x:80,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:80,scale:.95},transition:{duration:.2},className:le("w-80 rounded-md border border-border bg-surface-1 shadow-xl","border-l-4 flex items-center gap-3 px-4 py-3",z3[e.type]),children:[s.jsx(l,{size:16,className:le("flex-shrink-0",R3[e.type])}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm text-text-0 font-sans",children:e.message}),e.detail&&s.jsx("p",{className:"text-xs text-text-3 font-sans mt-0.5",children:e.detail})]}),s.jsx("button",{onClick:o=>{o.stopPropagation(),n(e.id)},className:"p-1.5 text-text-4 hover:text-text-1 hover:bg-surface-5 rounded transition-colors cursor-pointer flex-shrink-0 z-10",children:s.jsx(rt,{size:14})})]})}function X3(){const e=M(n=>n.toasts);return s.jsx("div",{className:"fixed bottom-10 left-[60px] z-[100] flex flex-col-reverse gap-2",children:s.jsx(Ei,{mode:"popLayout",children:e.slice(-3).map(n=>s.jsx(_3,{toast:n},n.id))})})}const Z3=[{id:"agents",icon:Qv,label:"Agents"},{id:"editor",icon:$a,label:"Editor"},{id:"dashboard",icon:mv,label:"Dashboard"},{id:"marketplace",icon:kv,label:"Marketplace"},{id:"models",icon:Th,label:"Models"},{id:"teams",icon:wr,label:"Teams"}],E3=[{id:"journalist",icon:zi,label:"Journalist",panel:!0},{id:"settings",icon:Rh,label:"Settings",nav:!0}];function q3({activeView:e,detailPanel:n,onNavigate:l,onTogglePanel:r}){return s.jsxs("nav",{className:"w-12 flex-shrink-0 flex flex-col bg-surface-3 border-r border-border",children:[s.jsx("div",{className:"flex flex-col items-center gap-0.5 pt-2",children:Z3.map(o=>s.jsx(Lc,{content:o.label,side:"right",children:s.jsx("button",{onClick:()=>l(o.id),className:le("w-8 h-8 flex items-center justify-center rounded-md transition-colors cursor-pointer",e===o.id?"text-text-0 bg-surface-5":"text-text-3 hover:text-text-1 hover:bg-surface-4"),children:s.jsx(o.icon,{size:16,strokeWidth:e===o.id?2:1.5})})},o.id))}),s.jsx("div",{className:"flex-1"}),s.jsx("div",{className:"flex flex-col items-center gap-0.5 pb-2",children:E3.map(o=>{const d=o.panel?(n==null?void 0:n.type)===o.id:e===o.id;return s.jsx(Lc,{content:o.label,side:"right",children:s.jsx("button",{onClick:()=>o.panel?r(o.id):l(o.id),className:le("w-8 h-8 flex items-center justify-center rounded-md transition-colors cursor-pointer",d?"text-text-0 bg-surface-5":"text-text-3 hover:text-text-1 hover:bg-surface-4"),children:s.jsx(o.icon,{size:16,strokeWidth:d?2:1.5})})},o.id)})})]})}const M3={agents:"Agents",editor:"Editor",dashboard:"Dashboard",marketplace:"Marketplace",teams:"Teams"};function Y3({activeView:e,connected:n,daemonHost:l,editorActiveFile:r,onOpenCommandPalette:o,onSpawn:d}){const u=["Groove",M3[e]||e];e==="editor"&&r&&u.push(r.split("/").pop());const h=Oh()&&qw()==="darwin";return s.jsxs("header",{className:le("h-11 flex-shrink-0 flex items-center gap-3 px-4 bg-surface-3 border-b border-border",h&&"pl-20 electron-drag electron-no-drag-children"),children:[s.jsx("img",{src:"/favicon.png",alt:"Groove",className:"h-7 w-7 rounded-full flex-shrink-0"}),(()=>{const x=new URLSearchParams(window.location.search).get("instance");return x?s.jsx("span",{className:"text-2xs font-mono font-semibold text-accent bg-accent/10 px-1.5 py-0.5 rounded flex-shrink-0",children:x}):l?s.jsx("span",{className:"text-2xs font-mono font-semibold text-text-3 bg-surface-5 px-1.5 py-0.5 rounded flex-shrink-0",children:l}):null})(),s.jsx("div",{className:"flex-1 min-w-4"}),s.jsxs("button",{onClick:o,className:le("flex items-center gap-2.5 h-8 px-4 rounded-full w-full max-w-md","bg-surface-1 border border-border-subtle","text-xs text-text-4 font-sans","hover:border-border hover:text-text-3 transition-colors cursor-pointer"),children:[s.jsx(yn,{size:14,className:"flex-shrink-0"}),s.jsx("span",{className:"flex-1 text-left",children:"Search commands..."}),s.jsx("kbd",{className:"text-2xs font-mono bg-surface-4 px-1.5 py-0.5 rounded-full text-text-4",children:"Cmd+K"})]}),s.jsx("div",{className:"flex-1 min-w-4"}),s.jsx("div",{className:"flex items-center gap-1 text-xs font-sans text-text-3 flex-shrink-0",children:u.map((x,g)=>s.jsxs("span",{className:"flex items-center gap-1",children:[g>0&&s.jsx(Na,{size:11,className:"text-text-4"}),s.jsx("span",{className:le(g===u.length-1?"text-text-2":"text-text-4"),children:x})]},g))}),n&&s.jsxs("button",{onClick:d,className:"ml-1 flex items-center gap-1 h-7 px-3.5 rounded-full bg-accent/15 text-accent text-xs font-semibold font-sans hover:bg-accent/25 transition-colors cursor-pointer select-none flex-shrink-0",children:[s.jsx(vn,{size:14}),"Spawn"]})]})}const U3={running:"var(--color-success)",starting:"var(--color-warning)",stopped:"var(--color-text-3)",crashed:"var(--color-danger)",completed:"var(--color-accent)",killed:"var(--color-text-3)",rotating:"var(--color-purple)"};function Eh(e){return U3[e]||"var(--color-text-3)"}const V3={planner:{bg:"rgba(74, 225, 104, 0.12)",text:"#4ae168",border:"#4ae168"},backend:{bg:"rgba(51, 175, 188, 0.12)",text:"#33afbc",border:"#33afbc"},frontend:{bg:"rgba(229, 192, 123, 0.12)",text:"#e5c07b",border:"#e5c07b"},fullstack:{bg:"rgba(74, 225, 104, 0.12)",text:"#4ae168",border:"#4ae168"},testing:{bg:"rgba(97, 175, 239, 0.12)",text:"#61afef",border:"#61afef"},devops:{bg:"rgba(209, 154, 102, 0.12)",text:"#d19a66",border:"#d19a66"},docs:{bg:"rgba(139, 146, 158, 0.12)",text:"#8b929e",border:"#8b929e"},security:{bg:"rgba(224, 108, 117, 0.12)",text:"#e06c75",border:"#e06c75"},database:{bg:"rgba(198, 120, 221, 0.12)",text:"#c678dd",border:"#c678dd"},cmo:{bg:"rgba(229, 192, 123, 0.12)",text:"#e5c07b",border:"#e5c07b"},cfo:{bg:"rgba(74, 225, 104, 0.12)",text:"#4ae168",border:"#4ae168"},ea:{bg:"rgba(97, 175, 239, 0.12)",text:"#61afef",border:"#61afef"},support:{bg:"rgba(51, 175, 188, 0.12)",text:"#33afbc",border:"#33afbc"},analyst:{bg:"rgba(198, 120, 221, 0.12)",text:"#c678dd",border:"#c678dd"},creative:{bg:"rgba(229, 192, 123, 0.12)",text:"#e5c07b",border:"#e5c07b"},slides:{bg:"rgba(209, 154, 102, 0.12)",text:"#d19a66",border:"#d19a66"},chat:{bg:"rgba(198, 120, 221, 0.12)",text:"#c678dd",border:"#c678dd"}};function ga(e){const n=(e||"").toLowerCase();return V3[n]||{bg:"rgba(139, 146, 158, 0.12)",text:"#8b929e",border:"#8b929e"}}function zs({status:e,size:n="md",className:l}){const r=e==="running"||e==="starting",o=n==="sm"?"w-1.5 h-1.5":n==="lg"?"w-3 h-3":"w-2 h-2";return s.jsx("span",{className:le("rounded-full inline-block flex-shrink-0",r&&"animate-pulse",o,l),style:{background:Eh(e)}})}function He(e){return e==null||isNaN(e)?"0":e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":e>=1e3?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":Math.round(e).toLocaleString()}function Pa(e){return e==null||isNaN(e)?"$0":e>=1e3?"$"+(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":e>=1||e>=.01?"$"+e.toFixed(2):"$"+e.toFixed(3)}function Cn(e){return e==null||isNaN(e)?"0%":Math.round(e)+"%"}function kr(e){if(!e||e<0)return"0s";const n=Math.floor(e/86400),l=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=Math.floor(e%60);return n>0?`${n}d ${l}h`:l>0?`${l}h ${r}m`:r>0?`${r}m ${o}s`:`${o}s`}function Nt(e){if(!e)return"";const n=(Date.now()-new Date(e).getTime())/1e3;return n<5?"just now":n<60?`${Math.floor(n)}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}function G3({connected:e,agentCount:n,runningCount:l,uptime:r,terminalVisible:o,onToggleTerminal:d}){const u=M(x=>x.savedTunnels),f=u.find(x=>x.active),h=Oh();return s.jsxs("footer",{className:"h-6 flex-shrink-0 flex items-center px-3 bg-surface-3 border-t border-border text-2xs font-sans select-none",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(zs,{status:e?"running":"crashed",size:"sm"}),s.jsx("span",{className:e?"text-text-2":"text-danger",children:e?h?"Desktop":"Connected":"Offline"})]}),e&&r>0&&s.jsxs("span",{className:"text-text-4",children:["Up ",kr(r)]}),e&&n>0&&s.jsxs("span",{className:"text-text-4",children:[l,"/",n," agents"]}),f?s.jsxs("button",{onClick:()=>{const x=f.localPort,g=encodeURIComponent(f.name);qO(`http://localhost:${x}?instance=${g}`)},className:"flex items-center gap-1.5 text-text-3 hover:text-text-1 cursor-pointer transition-colors",title:"Open remote GUI",children:[s.jsx(Qa,{size:10,className:"text-success"}),s.jsx("span",{children:f.name}),s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success"}),f.latencyMs!=null&&s.jsxs("span",{className:"text-text-4",children:[f.latencyMs,"ms"]})]}):u.length>0&&s.jsxs("button",{onClick:()=>M.getState().toggleQuickConnect(),className:"flex items-center gap-1.5 text-text-4 hover:text-text-1 cursor-pointer transition-colors",title:"Quick Connect to remote server",children:[s.jsx(pa,{size:10}),s.jsx("span",{children:"Connect"})]})]}),s.jsx("div",{className:"flex-1"}),!h&&s.jsxs("a",{href:"https://docs.groovedev.ai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 px-2 h-full text-text-3 hover:text-text-1 hover:bg-surface-5 transition-colors no-underline",children:[s.jsx($h,{size:12}),s.jsx("span",{children:"Docs"})]}),s.jsxs("button",{onClick:d,className:le("flex items-center gap-1.5 px-2 h-full transition-colors cursor-pointer",o?"text-accent bg-accent/8 hover:bg-accent/12":"text-text-3 hover:text-text-1 hover:bg-surface-5"),children:[s.jsx(Wi,{size:12}),s.jsx("span",{children:"Terminal"}),s.jsx("kbd",{className:"font-mono text-text-4 ml-0.5",children:"Cmd+J"})]})]})}function D3({children:e,width:n,onWidthChange:l,onClose:r,className:o}){const d=v.useRef(!1),u=v.useRef(0),f=v.useRef(0),h=v.useCallback(x=>{x.preventDefault(),d.current=!0,u.current=x.clientX,f.current=n;function g(b){if(!d.current)return;const y=u.current-b.clientX,j=Math.min(Math.max(f.current+y,380),window.innerWidth*.65);l(j)}function p(){d.current=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",p)}document.addEventListener("mousemove",g),document.addEventListener("mouseup",p)},[n,l]);return s.jsxs("aside",{className:le("flex-shrink-0 flex bg-surface-1 border-l border-border relative",o),style:{width:n},children:[s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-accent/30 transition-colors z-10",onMouseDown:h}),s.jsx("button",{onClick:r,className:"absolute top-3 right-3 z-10 p-1 rounded-md text-text-3 hover:text-text-0 hover:bg-surface-5 transition-colors cursor-pointer",children:s.jsx(rt,{size:14})}),s.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:e})]})}const L3=[{id:"nav:agents",label:"Go to Agents",icon:Qv,category:"Navigation",action:e=>{e.setActiveView("agents")}},{id:"nav:editor",label:"Go to Editor",icon:$a,category:"Navigation",action:e=>{e.setActiveView("editor")}},{id:"nav:dashboard",label:"Go to Dashboard",icon:mv,category:"Navigation",action:e=>{e.setActiveView("dashboard")}},{id:"nav:marketplace",label:"Go to Marketplace",icon:kv,category:"Navigation",action:e=>{e.setActiveView("marketplace")}},{id:"nav:teams",label:"Go to Teams",icon:wr,category:"Navigation",action:e=>{e.setActiveView("teams")}},{id:"action:spawn",label:"Spawn Agent",icon:vn,category:"Actions",action:e=>{e.openDetail({type:"spawn"})}},{id:"action:terminal",label:"Toggle Terminal",icon:Wi,category:"Actions",action:e=>{e.setTerminalVisible(!e.terminalVisible)},shortcut:"Cmd+J"},{id:"action:journalist",label:"Toggle Journalist",icon:zi,category:"Actions",action:e=>{var n;((n=e.detailPanel)==null?void 0:n.type)==="journalist"?e.closeDetail():e.openDetail({type:"journalist"})}}];function W3(){const e=M(j=>j.commandPaletteOpen),n=M(j=>j.toggleCommandPalette),l=M(j=>j.agents),r=M(j=>j.savedTunnels),o=M,[d,u]=v.useState(""),[f,h]=v.useState(0),x=v.useRef(null),g=v.useMemo(()=>{const j=l.flatMap(k=>[{id:`chat:${k.id}`,label:`Chat with ${k.name}`,icon:Gi,category:"Agents",action:Q=>{Q.selectAgent(k.id)}},...k.status==="running"?[{id:`rotate:${k.id}`,label:`Rotate ${k.name}`,icon:Li,category:"Agents",action:Q=>{Q.rotateAgent(k.id)}},{id:`kill:${k.id}`,label:`Kill ${k.name}`,icon:_h,category:"Agents",action:Q=>{Q.killAgent(k.id)}}]:[]]),w=[{id:"action:quickconnect",label:"Quick Connect",icon:Qa,category:"Remote",action:k=>{k.toggleQuickConnect()}},...r.map(k=>k.active?{id:`tunnel:open:${k.id}`,label:`Open ${k.name}`,icon:Fn,category:"Remote",action:()=>{window.open(`http://localhost:${k.localPort}?instance=${encodeURIComponent(k.name)}`,"_blank")}}:{id:`tunnel:connect:${k.id}`,label:`Connect to ${k.name}`,icon:Qa,category:"Remote",action:Q=>{Q.connectTunnel(k.id)}})];return[...L3,...j,...w]},[l,r]),p=v.useMemo(()=>{if(!d.trim())return g.slice(0,12);const j=d.toLowerCase();return g.filter(w=>w.label.toLowerCase().includes(j)||w.category.toLowerCase().includes(j)).slice(0,12)},[g,d]);v.useEffect(()=>{e&&(u(""),h(0),setTimeout(()=>{var j;return(j=x.current)==null?void 0:j.focus()},50))},[e]),v.useEffect(()=>{f>=p.length&&h(Math.max(0,p.length-1))},[p.length,f]);function b(j){j.action(o.getState()),n()}function y(j){j.key==="ArrowDown"?(j.preventDefault(),h(w=>Math.min(w+1,p.length-1))):j.key==="ArrowUp"?(j.preventDefault(),h(w=>Math.max(w-1,0))):j.key==="Enter"&&p[f]?(j.preventDefault(),b(p[f])):j.key==="Escape"&&n()}return e?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm",onClick:n}),s.jsx(Ei,{children:s.jsxs(qi.div,{initial:{opacity:0,y:-20,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{duration:.15},className:"fixed top-[15%] left-1/2 -translate-x-1/2 z-50 w-[480px] max-h-[400px] bg-surface-1 border border-border rounded-lg shadow-2xl overflow-hidden",onKeyDown:y,children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border-subtle",children:[s.jsx(yn,{size:16,className:"text-text-3 flex-shrink-0"}),s.jsx("input",{ref:x,value:d,onChange:j=>{u(j.target.value),h(0)},placeholder:"Type a command...",className:"flex-1 bg-transparent text-xs text-text-0 font-sans placeholder:text-text-4 focus:outline-none"})]}),s.jsxs("div",{className:"overflow-y-auto max-h-[320px] py-1",children:[p.length===0&&s.jsx("div",{className:"px-4 py-6 text-sm text-text-3 text-center font-sans",children:"No results"}),p.map((j,w)=>s.jsxs("button",{onClick:()=>b(j),onMouseEnter:()=>h(w),className:le("w-full flex items-center gap-3 px-4 py-2 text-sm font-sans cursor-pointer",w===f?"bg-surface-5 text-text-0":"text-text-1 hover:bg-surface-4"),children:[s.jsx(j.icon,{size:16,className:"text-text-3 flex-shrink-0"}),s.jsx("span",{className:"flex-1 text-left",children:j.label}),s.jsx("span",{className:"text-2xs text-text-4",children:j.category}),j.shortcut&&s.jsx("kbd",{className:"text-2xs font-mono bg-surface-4 px-1 py-0.5 rounded text-text-3 ml-1",children:j.shortcut})]},j.id))]})]})})]}):null}const B3={primary:"bg-accent/20 text-accent border border-accent/25 hover:bg-accent/30 font-medium",secondary:"bg-surface-5/40 text-text-1 border border-border-subtle hover:bg-surface-5/70 hover:text-text-0",ghost:"bg-transparent text-text-2 border border-transparent hover:bg-surface-5/50 hover:text-text-0",danger:"bg-danger/12 text-danger border border-danger/15 hover:bg-danger/20",info:"bg-info/12 text-info border border-info/15 hover:bg-info/20",outline:"bg-transparent text-accent border border-accent/30 hover:bg-accent/10"},I3={sm:"h-7 px-2.5 text-xs gap-1.5 rounded",md:"h-8 px-3 text-sm gap-2 rounded",lg:"h-9 px-4 text-sm gap-2 rounded",icon:"h-8 w-8 rounded"},ue=v.forwardRef(({className:e,variant:n="secondary",size:l="md",children:r,...o},d)=>s.jsx("button",{ref:d,className:le("inline-flex items-center justify-center font-sans transition-colors duration-100","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent","disabled:opacity-40 disabled:pointer-events-none","cursor-pointer select-none",B3[n],I3[l],e),...o,children:r}));ue.displayName="Button";function H3(){const e=M(r=>r.pendingApprovals),n=M(r=>r.approveRequest),l=M(r=>r.rejectRequest);return e!=null&&e.length?s.jsx("div",{className:"fixed bottom-10 left-1/2 -translate-x-1/2 z-50 w-full max-w-md flex flex-col gap-2 px-4",children:s.jsx(Ei,{children:e.map(r=>{var o;return s.jsxs(qi.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},exit:{y:20,opacity:0},transition:{duration:.2},className:"rounded-lg border border-accent/30 bg-surface-2/95 backdrop-blur-md shadow-xl shadow-accent/5 overflow-hidden",children:[s.jsxs("div",{className:"px-4 py-3 flex items-start gap-3",children:[s.jsx(Ta,{size:16,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"text-sm font-semibold text-text-0 font-sans truncate",children:[r.agentName||"Agent"," needs approval"]}),((o=r.action)==null?void 0:o.description)&&s.jsx("p",{className:"text-2xs text-text-3 font-sans mt-0.5 line-clamp-2",children:r.action.description})]})]}),s.jsxs("div",{className:"px-4 py-2.5 border-t border-border-subtle flex items-center justify-end gap-2",children:[s.jsxs(ue,{size:"sm",variant:"ghost",className:"text-danger hover:bg-danger/10",onClick:()=>l(r.id),children:[s.jsx($v,{size:14,className:"mr-1"}),"Reject"]}),s.jsxs(ue,{size:"sm",variant:"accent",onClick:()=>n(r.id),children:[s.jsx(Ah,{size:14,className:"mr-1"}),"Approve"]})]})]},r.id)})})}):null}function F3(){const e=M(f=>f.quickConnectOpen),n=M(f=>f.toggleQuickConnect),l=M(f=>f.savedTunnels),[r,o]=v.useState(null);if(!e)return null;async function d(f){o(f);try{await M.getState().connectTunnel(f),n()}catch{}o(null)}function u(f){const h=f.localPort,x=encodeURIComponent(f.name);window.open(`http://localhost:${h}?instance=${x}`,"_blank"),n()}return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm",onClick:n}),s.jsx(Ei,{children:s.jsxs(qi.div,{initial:{opacity:0,y:-20,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{duration:.15},className:"fixed top-[20%] left-1/2 -translate-x-1/2 z-50 w-[400px] bg-surface-1 border border-border rounded-lg shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Qa,{size:15,className:"text-accent"}),s.jsx("span",{className:"text-sm font-semibold text-text-0 font-sans",children:"Quick Connect"})]}),s.jsx("button",{onClick:n,className:"p-1 text-text-4 hover:text-text-1 cursor-pointer transition-colors",children:s.jsx(rt,{size:14})})]}),s.jsx("div",{className:"overflow-y-auto max-h-[320px] py-1",children:l.length===0?s.jsxs("div",{className:"px-4 py-8 text-center",children:[s.jsx(Hc,{size:24,className:"text-text-4 mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-text-3 font-sans",children:"No saved servers"}),s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-1",children:"Add one in Settings to get started."}),s.jsxs("button",{onClick:()=>{n(),M.getState().setActiveView("settings")},className:"mt-3 inline-flex items-center gap-1.5 text-xs text-accent hover:text-accent/80 font-sans cursor-pointer transition-colors",children:[s.jsx(Rh,{size:12})," Go to Settings"]})]}):l.map(f=>s.jsxs("button",{onClick:()=>f.active?u(f):d(f.id),disabled:r===f.id,className:le("w-full flex items-center gap-3 px-4 py-2.5 text-left cursor-pointer transition-colors","hover:bg-surface-5",r===f.id&&"opacity-60 pointer-events-none"),children:[s.jsx(Hc,{size:15,className:f.active?"text-success":"text-text-4"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-text-0 font-sans truncate",children:f.name}),f.active&&s.jsx(zs,{status:"running",size:"sm"})]}),s.jsxs("span",{className:"text-2xs text-text-4 font-mono",children:[f.user,"@",f.host]})]}),s.jsx("div",{className:"flex-shrink-0",children:r===f.id?s.jsx(at,{size:14,className:"text-text-3 animate-spin"}):f.active?s.jsxs("span",{className:"flex items-center gap-1 text-2xs text-success font-sans",children:[s.jsx(Fn,{size:11})," Open"]}):s.jsx("span",{className:"text-2xs text-text-3 font-sans",children:"Connect"})})]},f.id))}),l.length>0&&s.jsx("div",{className:"px-4 py-2 border-t border-border-subtle",children:s.jsxs("button",{onClick:()=>{n(),M.getState().setActiveView("settings")},className:"flex items-center gap-1.5 text-2xs text-text-4 hover:text-text-2 font-sans cursor-pointer transition-colors",children:[s.jsx(vn,{size:10})," Manage servers in Settings"]})})]})})]})}const Z1=[],K3=/error|crash|fail/i,xc="rgba(51, 175, 188, 0.15)",pc="h-[2px]";function J3(e){if(!e||e==="auto")return"auto";const n=e.match(/^claude-(opus|sonnet|haiku)-(\d+)-(\d+)(?:-\d+)?$/);return n?`${n[1][0].toUpperCase()+n[1].slice(1)} ${n[2]}.${n[3]}`:e.startsWith("gemini-")?e.replace("gemini-","Gemini ").replace("-preview","").replace("-flash-lite"," Flash Lite").replace("-flash"," Flash").replace("-pro"," Pro"):e.startsWith("gpt-")?e.toUpperCase().replace("GPT-","GPT-"):e}function e4(e){if(!e||e.length<2)return null;const n=e.slice(-10),l=(n[n.length-1].t-n[0].t)/6e4;return l<=0?null:(n[n.length-1].v-n[0].v)/l}function t4(e){return e>=70?"var(--color-success)":e>=40?"var(--color-warning)":"var(--color-danger)"}function n4(e){return e>=60?"var(--color-success)":e>=30?"var(--color-warning)":"var(--color-danger)"}const s4={running:"LIVE",starting:"INIT",stopped:"IDLE",crashed:"ERR",completed:"DONE",killed:"KILL",rotating:"ROT"},Pv=v.memo(({data:e,selected:n})=>{const{agent:l}=e,r=l.status==="running"||l.status==="starting",o=Math.round((l.contextUsage||0)*100),d=Eh(l.status),u=l.tokensUsed||0,f=v.useRef(null),h=M(R=>!!R.expandedNodes[l.id]),x=M(R=>R.toggleNodeExpanded);v.useEffect(()=>{var Y;const R=(Y=f.current)==null?void 0:Y.closest(".react-flow__node");R&&(R.style.zIndex=h?"1000":"")},[h]);const g=M(R=>R.activityLog[l.id])||Z1,p=M(R=>R.tokenTimeline[l.id])||Z1,b=e4(p),y=v.useMemo(()=>g.filter(R=>K3.test(R.text)).length,[g]),j=o>75?"var(--color-danger)":o>50?"var(--color-warning)":"var(--color-success)",w=l.qualityScore!=null?Math.round(l.qualityScore):null,k=w!=null?t4(w):null,Q=l.efficiency!=null?l.efficiency:null,C=Q!=null?n4(Q):null,P=l.durationMs?l.durationMs/1e3:l.spawnedAt?(Date.now()-new Date(l.spawnedAt).getTime())/1e3:l.createdAt?(Date.now()-new Date(l.createdAt).getTime())/1e3:0;return s.jsx("div",{ref:f,children:s.jsxs("div",{className:`w-[220px] overflow-hidden rounded-[4px] transition-all duration-200 ease-out bg-[#1c1f26] hover:bg-[#141720] border border-solid ${n?"border-[#2e323a]":"border-[#262a32]"} hover:border-[#2e3640]`,children:[s.jsx(ha,{id:"top",type:"target",position:ma.Top,className:"!w-1 !h-1 !bg-transparent !border-0"}),s.jsx(ha,{id:"bottom",type:"target",position:ma.Bottom,className:"!w-1 !h-1 !bg-transparent !border-0"}),s.jsx(ha,{id:"left",type:"target",position:ma.Left,className:"!w-1 !h-1 !bg-transparent !border-0"}),s.jsx(ha,{id:"right",type:"target",position:ma.Right,className:"!w-1 !h-1 !bg-transparent !border-0"}),r&&s.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",style:{borderRadius:3},children:s.jsx("div",{className:"absolute left-0 right-0 h-px",style:{background:"linear-gradient(90deg, transparent 0%, rgba(97,175,239,0.25) 50%, transparent 100%)",animation:"node-scan 3s ease-in-out infinite"}})}),s.jsxs("div",{className:"px-3 pt-2.5 pb-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"relative flex-shrink-0 w-[6px] h-[6px]",children:[s.jsx("span",{className:"absolute inset-0 rounded-sm",style:{background:d}}),r&&s.jsx("span",{className:"absolute inset-[-2px] rounded-sm",style:{background:d,opacity:.15,animation:"node-pulse-bar 2s ease-in-out infinite"}})]}),s.jsx("span",{className:"text-[12px] font-semibold text-[#e6e6e6] font-sans truncate flex-1 leading-none",children:l.name}),s.jsx("span",{className:"text-[7px] font-mono font-bold uppercase tracking-wider px-1 py-px rounded-sm",style:{color:d,background:d+"12"},children:s4[l.status]||l.status}),s.jsx("button",{className:"text-[#505862] hover:text-[#8b929e] cursor-pointer transition-colors flex-shrink-0",onClick:R=>{R.stopPropagation(),x(l.id)},children:h?s.jsx(rt,{size:10}):s.jsx(jv,{size:10})})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[s.jsx("span",{className:"text-[9px] font-mono text-[#505862] uppercase tracking-[0.05em]",children:l.role}),s.jsx("span",{className:"text-[9px] text-[#2a2e36]",children:"/"}),s.jsx("span",{className:"text-[9px] font-mono text-[#505862]",children:J3(l.model)})]})]}),s.jsxs("div",{className:"px-3 pt-1 pb-2",children:[s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-[14px] font-mono font-medium text-[#bcc2cd] leading-none",children:He(u)}),s.jsx("span",{className:"text-[8px] font-mono text-[#505862]",children:"tok"}),s.jsx("span",{className:"flex-1"}),s.jsxs("span",{className:"text-[9px] font-mono text-[#505862]",children:[o,"%"]})]}),s.jsx("div",{className:`mt-1.5 ${pc} rounded-sm overflow-hidden`,style:{background:xc},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-700",style:{width:`${Math.max(o,1)}%`,background:o>80?"var(--color-danger)":o>60?"var(--color-warning)":"var(--color-accent)"}})})]}),s.jsx("div",{className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:h?"1fr":"0fr"},children:s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("div",{className:"mx-3 border-t border-white/[0.04]"}),s.jsxs("div",{className:"px-3 pt-1.5 pb-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-[#505862] uppercase tracking-wider",children:"Context"}),(l.rotations||0)>0&&s.jsxs("span",{className:"text-[8px] font-mono text-[#606878] bg-white/[0.04] rounded px-1 py-px",children:[l.rotations,"x rot"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`flex-1 ${pc} rounded-sm overflow-hidden`,style:{background:xc},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${Math.max(o,1)}%`,background:j}})}),s.jsxs("span",{className:"text-[9px] font-mono font-medium",style:{color:j},children:[o,"%"]})]})]}),s.jsxs("div",{className:"px-3 pt-1 pb-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-[#505862] uppercase tracking-wider",children:"Quality"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("div",{className:`flex-1 ${pc} rounded-sm overflow-hidden`,style:{background:xc},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${w!=null?Math.max(w,1):0}%`,background:k||"#505862"}})}),s.jsx("span",{className:"text-[9px] font-mono font-medium",style:{color:k||"#505862"},children:w??"—"})]})]}),s.jsxs("div",{className:"px-3 pt-1 pb-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-[#505862] uppercase tracking-wider",children:"Efficiency"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("div",{className:`flex-1 ${pc} rounded-sm overflow-hidden`,style:{background:xc},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${Q!=null?Math.max(Q,1):0}%`,background:C||"#505862"}})}),s.jsx("span",{className:"text-[9px] font-mono font-medium",style:{color:C||"#505862"},children:Q!=null?`${Q}%`:"—"})]})]}),s.jsx("div",{className:"px-3 pt-1 pb-1",children:s.jsxs("div",{className:"grid grid-cols-3 gap-1",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[9px] font-mono font-medium text-[#bcc2cd]",children:Pa(l.costUsd||0)}),s.jsx("div",{className:"text-[7px] font-mono text-[#505862]",children:"cost"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[9px] font-mono font-medium text-[#bcc2cd]",children:b?He(Math.round(b)):"—"}),s.jsx("div",{className:"text-[7px] font-mono text-[#505862]",children:"tok/m"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[9px] font-mono font-medium text-[#bcc2cd]",children:l.turns||0}),s.jsx("div",{className:"text-[7px] font-mono text-[#505862]",children:"turns"})]})]})}),s.jsx("div",{className:"px-3 pt-1 pb-2",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-[#8b929e]",children:kr(Math.max(0,Math.floor(P)))}),s.jsx("span",{className:"text-[7px] font-mono text-[#505862]",children:"up"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[y>0?s.jsx("span",{className:"text-[9px] font-mono text-[var(--color-danger)]",children:y}):s.jsx("span",{className:"text-[9px] font-mono text-[#505862]",children:"0"}),s.jsx("span",{className:"text-[7px] font-mono text-[#505862]",children:"err"})]})]})})]})})]})})});Pv.displayName="AgentNode";const Cv=v.memo(({data:e})=>{const{agentCount:n,runningCount:l}=e,r=l>0,o={background:"transparent",border:0,width:2,height:2};return s.jsxs("div",{className:"relative flex items-center justify-center",style:{width:84,height:84},children:[s.jsx("div",{className:le("absolute inset-0 rounded-full transition-all duration-500",r&&"animate-[spin-slow_30s_linear_infinite]"),style:{border:`1px dashed ${r?"rgba(97,175,239,0.5)":"rgba(97,175,239,0.25)"}`}}),s.jsx("div",{className:"absolute inset-[10px] rounded-full",style:{background:r?"radial-gradient(circle, rgba(97,175,239,0.15) 0%, transparent 70%)":"radial-gradient(circle, rgba(97,175,239,0.05) 0%, transparent 70%)",animation:r?"node-pulse-bar 2.5s ease-in-out infinite":"none"}}),s.jsx("div",{className:le("w-14 h-14 rounded-full flex items-center justify-center relative z-10 transition-all duration-300",r?"bg-[#1c1f26] border-2 border-[#61afef]/35 shadow-[0_0_28px_rgba(97,175,239,0.15)]":"bg-[#1c1f26] border border-[#61afef]/20"),children:s.jsx("img",{src:"/favicon.png",alt:"G",className:le("h-7 w-7 rounded-full transition-opacity",r?"opacity-90":"opacity-60")})}),n>0&&s.jsx("div",{className:le("absolute z-20 min-w-[20px] h-[20px] rounded-sm flex items-center justify-center","text-[10px] font-mono font-bold px-1 transition-all duration-300",r?"bg-[#1c1f26] text-[#61afef] border border-[#61afef]/40":"bg-[#1c1f26] text-[#61afef]/60 border border-[#61afef]/20"),style:{bottom:2,right:2},children:n}),s.jsx(ha,{id:"bottom",type:"source",position:ma.Bottom,style:o}),s.jsx(ha,{id:"right",type:"source",position:ma.Right,style:o}),s.jsx(ha,{id:"left",type:"source",position:ma.Left,style:o}),s.jsx(ha,{id:"top",type:"source",position:ma.Top,style:o})]})});Cv.displayName="RootNode";const a4={default:"bg-surface-4 text-text-2",accent:"bg-accent/12 text-accent",success:"bg-success/12 text-success",warning:"bg-warning/12 text-warning",danger:"bg-danger/12 text-danger",info:"bg-info/12 text-info",purple:"bg-purple/12 text-purple",orange:"bg-orange/12 text-orange"};function Te({children:e,variant:n="default",className:l,dot:r,...o}){return s.jsxs("span",{className:le("inline-flex items-center gap-1 px-1.5 py-0.5","text-2xs font-semibold uppercase tracking-wider rounded","font-sans select-none whitespace-nowrap",a4[n],l),...o,children:[r&&s.jsx("span",{className:le("w-1.5 h-1.5 rounded-full",r==="pulse"&&"animate-pulse"),style:{background:"currentColor"}}),e]})}const l4={agentNode:Pv,rootNode:Cv},nO=220,sO=82,gc=260,bc=130,ca=4,Pn="__groove_root__";function aO(){try{return JSON.parse(localStorage.getItem("groove:nodePositions")||"{}")}catch{return{}}}function r4(e){try{localStorage.setItem("groove:nodePositions",JSON.stringify(e))}catch{}}function zv(){try{return JSON.parse(localStorage.getItem("groove:teamViewports")||"{}")}catch{return{}}}function i4(e,n){try{const l=zv();l[e]=n,localStorage.setItem("groove:teamViewports",JSON.stringify(l))}catch{}}function o4(e,n){const l=e.filter(u=>u.teamId===n);return l.length===0?"idle":l.some(u=>u.status==="running"||u.status==="starting")?"working":l.every(u=>u.status==="completed")?"completed":l.some(u=>u.status==="crashed")?"crashed":"idle"}function c4(){const e=M($=>$.teams),n=M($=>$.activeTeamId),l=M($=>$.agents),r=M($=>$.switchTeam),o=M($=>$.createTeam),d=M($=>$.deleteTeam),u=M($=>$.renameTeam),f=M($=>$.reorderTeams),[h,x]=v.useState(!1),[g,p]=v.useState(""),[b,y]=v.useState(null),[j,w]=v.useState(""),k=v.useRef(!1),[Q,C]=v.useState(null),[P,R]=v.useState(null);function Y(){const $=g.trim();!$||k.current||(k.current=!0,p(""),x(!1),o($).finally(()=>{k.current=!1}))}function X($){y($.id),w($.name)}function z(){const $=j.trim();if(!$||!b){y(null);return}u(b,$),y(null)}return s.jsxs("div",{className:"flex items-end px-0 pt-0 pb-0 bg-surface-1 border-b border-border gap-0 flex-shrink-0",children:[e.map($=>{const F=l.filter(U=>U.teamId===$.id).length,Z=$.id===n,J=b===$.id,A=l.filter(U=>U.teamId===$.id&&(U.status==="running"||U.status==="starting")).length;return s.jsxs("div",{draggable:!J,onDragStart:U=>{C($.id),U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain","")},onDragEnd:()=>{C(null),R(null)},onDragOver:U=>{U.preventDefault(),U.dataTransfer.dropEffect="move",Q&&Q!==$.id&&R($.id)},onDragLeave:()=>{P===$.id&&R(null)},onDrop:U=>{if(U.preventDefault(),!Q||Q===$.id)return;const D=e.findIndex(T=>T.id===Q),V=e.findIndex(T=>T.id===$.id);D!==-1&&V!==-1&&f(D,V),C(null),R(null)},onClick:()=>!J&&r($.id),onDoubleClick:()=>X($),className:le("group relative flex items-center gap-2 px-4 h-9 text-xs font-sans cursor-pointer select-none transition-colors",Z?"text-text-0 font-semibold border-x border-x-border bg-[#242830]":"text-text-3 hover:text-text-1 hover:bg-surface-3/50",Q===$.id&&"opacity-40",P===$.id&&Q!==$.id&&"border-l-2 !border-l-accent"),children:[Z&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-accent",style:{height:"0.5px"}}),(()=>{const U=o4(l,$.id),D=U==="working"||U==="completed"?"text-green-400":U==="crashed"?"text-red-400":Z?"text-accent":"text-text-4";return s.jsxs("span",{className:"relative flex-shrink-0",children:[s.jsx(wr,{size:13,className:le(D,U==="working"&&"animate-pulse")}),U==="working"&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-green-400 animate-pulse"})]})})(),J?s.jsx("input",{value:j,onChange:U=>w(U.target.value),onKeyDown:U=>{U.key==="Enter"&&z(),U.key==="Escape"&&y(null)},onBlur:z,className:"h-5 w-24 px-1.5 text-xs bg-surface-0 border border-accent rounded text-text-0 font-sans focus:outline-none",autoFocus:!0,onClick:U=>U.stopPropagation()}):s.jsx("span",{className:"truncate max-w-[120px]",children:$.name}),F>0&&!J&&s.jsx("span",{className:le("flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full text-2xs font-mono font-semibold",A>0?"bg-accent/15 text-accent":"bg-surface-4 text-text-3"),children:F}),!J&&s.jsxs("div",{className:"flex items-center gap-0.5 ml-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx("button",{onClick:U=>{U.stopPropagation(),X($)},className:"p-0.5 rounded hover:bg-surface-5 text-text-4 hover:text-text-1 cursor-pointer",title:"Rename team",children:s.jsx(Di,{size:10})}),!$.isDefault&&s.jsx("button",{onClick:U=>{U.stopPropagation(),d($.id)},className:"p-0.5 rounded hover:bg-surface-5 text-text-4 hover:text-danger cursor-pointer",title:"Delete team",children:s.jsx(rt,{size:10})})]}),Z&&s.jsx("div",{className:"absolute bottom-[-1px] left-0 right-0 h-px bg-[#242830]"})]},$.id)}),h?s.jsxs("div",{className:"flex items-center gap-1.5 px-3 h-9 bg-surface-3/50",children:[s.jsx("input",{value:g,onChange:$=>p($.target.value),onKeyDown:$=>{$.key==="Enter"&&Y(),$.key==="Escape"&&(x(!1),p(""))},placeholder:"Team name...",className:"h-5 w-28 px-1.5 text-xs bg-surface-0 border border-border-subtle rounded text-text-0 font-sans placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",autoFocus:!0}),s.jsx("button",{onClick:Y,disabled:!g.trim(),className:"p-1 rounded text-accent hover:bg-accent/10 cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",children:s.jsx(kt,{size:12})}),s.jsx("button",{onClick:()=>{x(!1),p("")},className:"p-1 rounded text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:12})})]}):s.jsx("button",{onClick:()=>x(!0),className:"flex items-center justify-center w-9 h-9 text-text-4 hover:text-text-1 hover:bg-surface-3/50 cursor-pointer transition-colors",title:"New team",children:s.jsx(vn,{size:14})})]})}function d4(){const e=M(J=>J.agents),n=M(J=>J.activeTeamId),l=M(J=>J.tokenTimeline),r=M(J=>J.selectAgent),o=M(J=>J.closeDetail),d=v.useMemo(()=>e.filter(J=>J.teamId===n),[e,n]),{fitView:u,setViewport:f}=KQ(),[h,x]=v.useState(0),g=v.useRef(n),p=v.useMemo(()=>{const J=aO(),A=d.filter(ee=>ee.status==="running").length,U=[{id:Pn,type:"rootNode",position:J[Pn]||{x:0,y:0},data:{agentCount:d.length,runningCount:A},draggable:!0,selectable:!1}],D=new Set,V=(ee,de)=>`${Math.round(ee/100)},${Math.round(de/100)}`,T=J[Pn]||{x:0,y:0};D.add(V(T.x,T.y));const L=[];d.forEach((ee,de)=>{const ae=ee.name||ee.id;if(J[ae]){const ye=J[ae];D.add(V(ye.x,ye.y)),U.push({id:ee.id,type:"agentNode",position:ye,data:{agent:ee,timeline:l[ee.id]||[]},draggable:!0,selectable:!0})}else L.push({agent:ee,index:de})});for(const{agent:ee,index:de}of L){const ae=Math.floor(de/ca),ye=de%ca;let je={x:-((Math.min(d.length-ae*ca,ca)-1)*gc)/2+ye*gc,y:bc+ae*bc};for(;D.has(V(je.x,je.y));)je={x:je.x,y:je.y+bc};D.add(V(je.x,je.y)),U.push({id:ee.id,type:"agentNode",position:je,data:{agent:ee,timeline:l[ee.id]||[]},draggable:!0,selectable:!0})}return U},[d,l]),b=v.useMemo(()=>{const J=aO(),A=J[Pn]||{x:0,y:0};return d.map((U,D)=>{const V=U.name||U.id,T=Math.floor(D/ca),L=D%ca,de=-((Math.min(d.length-T*ca,ca)-1)*gc)/2,ae=J[V]||{x:de+L*gc,y:140+T*bc},ye=ae.x+nO/2-A.x,Se=ae.y+sO/2-A.y;let ge,je;return Math.abs(Se)>Math.abs(ye)?(ge=Se>0?"bottom":"top",je=Se>0?"top":"bottom"):(ge=ye>0?"right":"left",je=ye>0?"left":"right"),{id:`e-${Pn}-${U.id}`,source:Pn,target:U.id,sourceHandle:ge,targetHandle:je,type:"default",animated:U.status==="running"}})},[d]),[y,j,w]=JQ(p),[k,Q,C]=ew(b),P=v.useRef(new Set);v.useEffect(()=>{j(J=>{const A=new Map(J.map(U=>[U.id,U]));return new Set(p.map(U=>U.id)),p.map(U=>{const D=A.get(U.id);return D?{...D,data:U.data}:U})})},[p,j]),v.useEffect(()=>{Q(()=>{const J=y.find(U=>U.id===Pn);if(!J)return b;const A=J.position;return b.map(U=>{const D=y.find(de=>de.id===U.target);if(!D)return U;const V=D.position.x+nO/2-A.x,T=D.position.y+sO/2-A.y;let L,ee;return Math.abs(T)>Math.abs(V)?(L=T>0?"bottom":"top",ee=T>0?"top":"bottom"):(L=V>0?"right":"left",ee=V>0?"left":"right"),{...U,sourceHandle:L,targetHandle:ee}})})},[b,y,Q]);const R=d.map(J=>J.id).join(","),Y=v.useRef(null);v.useEffect(()=>{if(g.current!==n){g.current=n,P.current=new Set(d.map(D=>D.id)),x(d.length);const U=zv()[n];U?f(U,{duration:200}):d.length>0&&u({padding:.3,maxZoom:1.2,duration:200});return}const J=new Set(d.map(U=>U.id)),A=d.length>0&&[...J].some(U=>!P.current.has(U));P.current=J,h===0&&d.length>0?u({padding:.3,maxZoom:1.2,duration:0}):A&&(clearTimeout(Y.current),Y.current=setTimeout(()=>u({padding:.3,maxZoom:1.2,duration:300}),500)),x(d.length)},[R,h,u,n,f]);const X=v.useCallback((J,A)=>{i4(n,A)},[n]),z=v.useCallback((J,A)=>{A.id!==Pn&&r(A.id)},[r]),$=v.useCallback(()=>{o()},[o]),F=v.useCallback((J,A)=>{const U=y.find(V=>V.id===Pn);if(!U)return;const D=U.position;Q(V=>V.map(T=>{const L=T.source===A.id,ee=T.target===A.id;if(!L&&!ee)return T;const de=A.position,ae=de.x+nO/2-D.x,ye=de.y+sO/2-D.y;let Se,ge;return Math.abs(ye)>Math.abs(ae)?(Se=ye>0?"bottom":"top",ge=ye>0?"top":"bottom"):(Se=ae>0?"right":"left",ge=ae>0?"left":"right"),{...T,sourceHandle:Se,targetHandle:ge}}))},[y,Q]),Z=v.useCallback((J,A)=>{const U=d.find(T=>T.id===A.id),D=A.id===Pn?Pn:(U==null?void 0:U.name)||A.id,V=aO();V[D]=A.position,r4(V)},[d]);return s.jsx(tw,{nodes:y,edges:k,nodeTypes:l4,onNodesChange:w,onEdgesChange:C,onNodeClick:z,onPaneClick:$,onNodeDrag:F,onNodeDragStop:Z,onMoveEnd:X,defaultViewport:{x:0,y:0,zoom:1.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,className:"bg-surface-2",children:s.jsx(nw,{color:"rgba(97,175,239,0.03)",gap:24,size:1})})}function u4({onPlanner:e,onSpawn:n}){return s.jsx("div",{className:"w-full h-full flex items-center justify-center",children:s.jsxs("div",{className:"max-w-2xl w-full text-center space-y-10 px-8",children:[s.jsxs("div",{className:"relative mx-auto w-20 h-20",children:[s.jsx("div",{className:"absolute inset-0 rounded-full bg-accent/8 animate-pulse"}),s.jsx("div",{className:"absolute inset-1 rounded-full bg-surface-3 border border-border-subtle flex items-center justify-center shadow-lg shadow-accent/5",children:s.jsx("img",{src:"/favicon.png",alt:"Groove",className:"h-10 w-10 rounded-full"})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h1",{className:"text-3xl font-bold text-text-0 font-sans tracking-tight",children:"Welcome to Groove"}),s.jsx("p",{className:"text-base text-text-2 font-sans max-w-md mx-auto leading-relaxed",children:"Your mission control for AI agents. Spawn, orchestrate, and ship faster than ever."})]}),s.jsxs("div",{className:"space-y-3 max-w-xl mx-auto",children:[s.jsxs("button",{onClick:e,className:"w-full flex items-center gap-4 p-5 rounded-lg border border-accent/25 bg-gradient-to-r from-accent/8 to-accent/3 hover:from-accent/14 hover:to-accent/6 hover:border-accent/40 transition-all cursor-pointer group text-left",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg bg-accent/20 flex items-center justify-center group-hover:scale-110 transition-transform flex-shrink-0",children:s.jsx(Jn,{size:24,className:"text-accent"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-base font-semibold text-text-0 font-sans",children:"Start with a Planner"}),s.jsx("div",{className:"text-sm text-text-2 font-sans mt-0.5",children:"Describe what you want to build and let AI plan the perfect team"})]}),s.jsx("div",{className:"text-accent text-xs font-semibold font-sans flex-shrink-0 opacity-60 group-hover:opacity-100 transition-opacity",children:"Recommended"})]}),s.jsxs("button",{onClick:n,className:"w-full flex items-center gap-3 p-4 rounded-lg border border-border bg-surface-1 hover:bg-surface-2 hover:border-border transition-all cursor-pointer group text-left",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-surface-4 flex items-center justify-center group-hover:scale-110 transition-transform flex-shrink-0",children:s.jsx(vn,{size:20,className:"text-text-1"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-semibold text-text-0 font-sans",children:"Spawn Agent"}),s.jsx("div",{className:"text-xs text-text-3 font-sans mt-0.5",children:"Choose a role and configure"})]})]})]}),s.jsxs("p",{className:"text-xs text-text-4 font-sans",children:[s.jsx("kbd",{className:"font-mono bg-surface-4 px-1.5 py-0.5 rounded text-text-3",children:"Cmd+K"}),s.jsx("span",{className:"mx-1.5",children:"command palette"}),s.jsx("span",{className:"text-text-4 mx-1",children:"·"}),s.jsx("kbd",{className:"font-mono bg-surface-4 px-1.5 py-0.5 rounded text-text-3",children:"Cmd+N"}),s.jsx("span",{className:"mx-1.5",children:"spawn"}),s.jsx("span",{className:"text-text-4 mx-1",children:"·"}),s.jsx("kbd",{className:"font-mono bg-surface-4 px-1.5 py-0.5 rounded text-text-3",children:"Cmd+J"}),s.jsx("span",{className:"mx-1.5",children:"terminal"})]})]})})}const f4={backend:Hc,frontend:Ch,fullstack:$a,testing:Zh,security:cl},O4=/^[a-zA-Z0-9_-]{1,64}$/;function h4(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64)}function m4(){var y;const e=M(j=>j.recommendedTeam),n=M(j=>j.launchRecommendedTeam),[l,r]=v.useState(!1),[o,d]=v.useState(null);if(!((y=e==null?void 0:e.agents)!=null&&y.length))return null;const u=e.agents,f=u.filter(j=>!j.phase||j.phase===1),h=u.filter(j=>j.phase===2),x=o??f.map(j=>({...j,name:j.name||""}));function g(j,w){const k=x.map((Q,C)=>C===j?{...Q,name:h4(w)}:Q);d(k)}async function p(){r(!0);try{const j=[...x,...h];await n(j)}catch{}r(!1)}function b(){M.setState({recommendedTeam:null})}return s.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-50 w-full max-w-lg",children:s.jsxs("div",{className:"mx-4 rounded-lg border border-accent/30 bg-surface-2/95 backdrop-blur-md shadow-xl shadow-accent/5 overflow-hidden",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-border-subtle flex items-center gap-2",children:[s.jsx(Nv,{size:16,className:"text-accent"}),s.jsx("span",{className:"text-sm font-semibold text-text-0 font-sans flex-1",children:"Planner Recommends a Team"}),s.jsx("button",{onClick:b,className:"text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:14})})]}),s.jsxs("div",{className:"px-4 py-3 space-y-1.5",children:[x.map((j,w)=>{var C;const k=f4[j.role]||$a,Q=!j.name||O4.test(j.name);return s.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 rounded-md bg-surface-4 border border-border-subtle",children:[s.jsx(k,{size:12,className:"text-text-2 shrink-0"}),s.jsx("input",{type:"text",value:j.name,onChange:P=>g(w,P.target.value),placeholder:j.role,className:le("flex-1 min-w-0 bg-transparent text-xs font-mono text-text-0 outline-none placeholder:text-text-4",!Q&&"text-red-400"),maxLength:64,spellCheck:!1}),((C=j.scope)==null?void 0:C.length)>0&&s.jsxs("span",{className:"text-2xs text-text-4 font-mono shrink-0 truncate max-w-[120px]",children:[j.scope[0],j.scope.length>1?` +${j.scope.length-1}`:""]})]},w)}),e.projectDir&&s.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-text-2 font-mono pt-0.5",children:[s.jsx("span",{className:"text-text-4",children:"Project:"}),s.jsxs("span",{className:"text-accent",children:[e.projectDir,"/"]})]}),h.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-text-3 font-sans",children:[s.jsx(cl,{size:10}),s.jsxs("span",{children:[h.length," QC agent",h.length>1?"s":""," will auto-spawn after builders complete"]})]})]}),s.jsx("div",{className:"px-4 py-3 border-t border-border-subtle",children:s.jsxs(ue,{variant:"primary",size:"md",onClick:p,disabled:l,className:"w-full gap-2",children:[s.jsx(Jn,{size:14}),l?"Launching...":`Launch ${f.length} Agent${f.length>1?"s":""}`]})})]})})}function E1(){const e=M(b=>b.agents),n=M(b=>b.activeTeamId),l=M(b=>b.openDetail),r=M(b=>b.spawnAgent),o=M(b=>b.selectAgent);M(b=>b.recommendedTeam);const d=M(b=>b.checkRecommendedTeam);v.useEffect(()=>{if(!e.some(j=>j.role==="planner"&&(j.status==="running"||j.status==="starting")))return;const y=setInterval(()=>d(),5e3);return()=>clearInterval(y)},[e,d]);async function u(){try{const b=await r({role:"planner"});b!=null&&b.id&&o(b.id)}catch{}}const f=e.filter(b=>b.teamId===n),h=M(b=>b.hydrated),[x,g]=v.useState(!0);v.useEffect(()=>{const b=setTimeout(()=>g(!1),1200);return()=>clearTimeout(b)},[]);const p=x||!h;return s.jsxs("div",{className:"flex flex-col h-full relative",children:[s.jsx("div",{className:"flex-1 min-h-0",children:p?s.jsxs("div",{className:le("flex flex-col items-center justify-center h-full transition-opacity duration-500",!x&&h?"opacity-0":"opacity-100"),children:[s.jsxs("div",{className:"relative w-12 h-12 mb-5",children:[s.jsx("span",{className:"absolute inset-0 rounded-full border-2 border-accent/20 animate-ping",style:{animationDuration:"2s"}}),s.jsx("span",{className:"absolute inset-0 rounded-full border-2 border-transparent border-t-accent animate-spin",style:{animationDuration:"1s"}}),s.jsx("span",{className:"absolute inset-[6px] rounded-full bg-accent/8 flex items-center justify-center",children:s.jsx(Jn,{size:16,className:"text-accent animate-pulse"})})]}),s.jsx("p",{className:"text-sm font-medium text-text-1 font-sans animate-pulse",children:"Connecting to agents"}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:"Syncing with daemon..."})]}):f.length===0?s.jsx(u4,{onPlanner:u,onSpawn:()=>l({type:"spawn"})}):s.jsx(FQ,{children:s.jsx(d4,{})})}),s.jsx(m4,{})]})}function x4({children:e,detailContent:n,terminalContent:l}){const r=M(X=>X.activeView),o=M(X=>X.detailPanel),d=M(X=>X.connected),u=M(X=>X.tunneled),f=M(X=>X.daemonHost),h=M(X=>X.agents),x=M(X=>X.editorActiveFile),g=M(X=>X.detailPanelWidth),p=M(X=>X.terminalVisible),b=M(X=>X.terminalFullHeight),y=M(X=>X.setActiveView),j=M(X=>X.openDetail),w=M(X=>X.closeDetail),k=M(X=>X.setDetailPanelWidth),Q=M(X=>X.setTerminalVisible),C=M(X=>X.toggleCommandPalette),P=v.useMemo(()=>h.filter(X=>X.status==="running").length,[h]),R=v.useMemo(()=>[{key:"k",meta:!0,handler:()=>M.getState().toggleCommandPalette()},{key:"p",meta:!0,shift:!0,handler:()=>M.getState().toggleCommandPalette()},{key:"j",meta:!0,handler:()=>{const X=M.getState();X.setTerminalVisible(!X.terminalVisible)}},{key:"n",meta:!0,handler:()=>M.getState().openDetail({type:"spawn"})},{key:"1",meta:!0,handler:()=>M.getState().setActiveView("agents")},{key:"2",meta:!0,handler:()=>M.getState().setActiveView("editor")},{key:"3",meta:!0,handler:()=>M.getState().setActiveView("dashboard")},{key:"4",meta:!0,handler:()=>M.getState().setActiveView("marketplace")},{key:"5",meta:!0,handler:()=>M.getState().setActiveView("teams")},{key:"Escape",handler:()=>{const X=M.getState();X.commandPaletteOpen?X.toggleCommandPalette():X.detailPanel&&X.closeDetail()}}],[]);Ew(R);const Y=o&&o.type!=="spawn";return s.jsx(VN,{children:s.jsxs("div",{className:le("w-full h-full flex flex-col bg-surface-2 text-text-1 font-sans",Oh()&&"electron-app"),children:[s.jsx(Y3,{activeView:r,connected:d,tunneled:u,daemonHost:f,editorActiveFile:x,onOpenCommandPalette:C,onSpawn:()=>j({type:"spawn"})}),s.jsxs("div",{className:"flex-1 flex min-h-0",children:[s.jsx(q3,{activeView:r,detailPanel:o,onNavigate:y,onTogglePanel:X=>{(o==null?void 0:o.type)===X?w():j({type:X})}}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0",children:[r==="agents"&&s.jsx(c4,{}),s.jsxs("div",{className:"flex-1 flex min-h-0",children:[s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0",children:[!(p&&b)&&s.jsx("main",{className:"flex-1 min-h-0 overflow-hidden relative",children:e}),l]}),Y&&s.jsx(D3,{width:g,onWidthChange:k,onClose:w,children:n})]})]})]}),s.jsx(G3,{connected:d,agentCount:h.length,runningCount:P,terminalVisible:p,onToggleTerminal:()=>Q(!p)}),s.jsx(W3,{}),s.jsx(F3,{}),s.jsx(H3,{}),s.jsx(X3,{})]})})}var p4=v.createContext(void 0);function qh(e){const n=v.useContext(p4);return e||n||"ltr"}function g4(e,[n,l]){return Math.min(l,Math.max(n,e))}function b4(e,n){return v.useReducer((l,r)=>n[l][r]??l,e)}var Mh="ScrollArea",[Rv]=ml(Mh),[v4,jn]=Rv(Mh),Av=v.forwardRef((e,n)=>{const{__scopeScrollArea:l,type:r="hover",dir:o,scrollHideDelay:d=600,...u}=e,[f,h]=v.useState(null),[x,g]=v.useState(null),[p,b]=v.useState(null),[y,j]=v.useState(null),[w,k]=v.useState(null),[Q,C]=v.useState(0),[P,R]=v.useState(0),[Y,X]=v.useState(!1),[z,$]=v.useState(!1),F=gt(n,J=>h(J)),Z=qh(o);return s.jsx(v4,{scope:l,type:r,dir:Z,scrollHideDelay:d,scrollArea:f,viewport:x,onViewportChange:g,content:p,onContentChange:b,scrollbarX:y,onScrollbarXChange:j,scrollbarXEnabled:Y,onScrollbarXEnabledChange:X,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:z,onScrollbarYEnabledChange:$,onCornerWidthChange:C,onCornerHeightChange:R,children:s.jsx(et.div,{dir:Z,...u,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":Q+"px","--radix-scroll-area-corner-height":P+"px",...e.style}})})});Av.displayName=Mh;var _v="ScrollAreaViewport",Xv=v.forwardRef((e,n)=>{const{__scopeScrollArea:l,children:r,nonce:o,...d}=e,u=jn(_v,l),f=v.useRef(null),h=gt(n,f,u.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),s.jsx(et.div,{"data-radix-scroll-area-viewport":"",...d,ref:h,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Xv.displayName=_v;var es="ScrollAreaScrollbar",Zv=v.forwardRef((e,n)=>{const{forceMount:l,...r}=e,o=jn(es,e.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:u}=o,f=e.orientation==="horizontal";return v.useEffect(()=>(f?d(!0):u(!0),()=>{f?d(!1):u(!1)}),[f,d,u]),o.type==="hover"?s.jsx(y4,{...r,ref:n,forceMount:l}):o.type==="scroll"?s.jsx(S4,{...r,ref:n,forceMount:l}):o.type==="auto"?s.jsx(Ev,{...r,ref:n,forceMount:l}):o.type==="always"?s.jsx(Yh,{...r,ref:n}):null});Zv.displayName=es;var y4=v.forwardRef((e,n)=>{const{forceMount:l,...r}=e,o=jn(es,e.__scopeScrollArea),[d,u]=v.useState(!1);return v.useEffect(()=>{const f=o.scrollArea;let h=0;if(f){const x=()=>{window.clearTimeout(h),u(!0)},g=()=>{h=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return f.addEventListener("pointerenter",x),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",x),f.removeEventListener("pointerleave",g)}}},[o.scrollArea,o.scrollHideDelay]),s.jsx(Xn,{present:l||d,children:s.jsx(Ev,{"data-state":d?"visible":"hidden",...r,ref:n})})}),S4=v.forwardRef((e,n)=>{const{forceMount:l,...r}=e,o=jn(es,e.__scopeScrollArea),d=e.orientation==="horizontal",u=kd(()=>h("SCROLL_END"),100),[f,h]=b4("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(f==="idle"){const x=window.setTimeout(()=>h("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(x)}},[f,o.scrollHideDelay,h]),v.useEffect(()=>{const x=o.viewport,g=d?"scrollLeft":"scrollTop";if(x){let p=x[g];const b=()=>{const y=x[g];p!==y&&(h("SCROLL"),u()),p=y};return x.addEventListener("scroll",b),()=>x.removeEventListener("scroll",b)}},[o.viewport,d,h,u]),s.jsx(Xn,{present:l||f!=="hidden",children:s.jsx(Yh,{"data-state":f==="hidden"?"hidden":"visible",...r,ref:n,onPointerEnter:Ge(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),Ev=v.forwardRef((e,n)=>{const l=jn(es,e.__scopeScrollArea),{forceMount:r,...o}=e,[d,u]=v.useState(!1),f=e.orientation==="horizontal",h=kd(()=>{if(l.viewport){const x=l.viewport.offsetWidth<l.viewport.scrollWidth,g=l.viewport.offsetHeight<l.viewport.scrollHeight;u(f?x:g)}},10);return gr(l.viewport,h),gr(l.content,h),s.jsx(Xn,{present:r||d,children:s.jsx(Yh,{"data-state":d?"visible":"hidden",...o,ref:n})})}),Yh=v.forwardRef((e,n)=>{const{orientation:l="vertical",...r}=e,o=jn(es,e.__scopeScrollArea),d=v.useRef(null),u=v.useRef(0),[f,h]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),x=Vv(f.viewport,f.content),g={...r,sizes:f,onSizesChange:h,hasThumb:x>0&&x<1,onThumbChange:b=>d.current=b,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:b=>u.current=b};function p(b,y){return $4(b,u.current,f,y)}return l==="horizontal"?s.jsx(j4,{...g,ref:n,onThumbPositionChange:()=>{if(o.viewport&&d.current){const b=o.viewport.scrollLeft,y=q1(b,f,o.dir);d.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollLeft=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollLeft=p(b,o.dir))}}):l==="vertical"?s.jsx(Q4,{...g,ref:n,onThumbPositionChange:()=>{if(o.viewport&&d.current){const b=o.viewport.scrollTop,y=q1(b,f);d.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:b=>{o.viewport&&(o.viewport.scrollTop=b)},onDragScroll:b=>{o.viewport&&(o.viewport.scrollTop=p(b))}}):null}),j4=v.forwardRef((e,n)=>{const{sizes:l,onSizesChange:r,...o}=e,d=jn(es,e.__scopeScrollArea),[u,f]=v.useState(),h=v.useRef(null),x=gt(n,h,d.onScrollbarXChange);return v.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),s.jsx(Mv,{"data-orientation":"horizontal",...o,ref:x,sizes:l,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":wd(l)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,p)=>{if(d.viewport){const b=d.viewport.scrollLeft+g.deltaX;e.onWheelScroll(b),Dv(b,p)&&g.preventDefault()}},onResize:()=>{h.current&&d.viewport&&u&&r({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Kc(u.paddingLeft),paddingEnd:Kc(u.paddingRight)}})}})}),Q4=v.forwardRef((e,n)=>{const{sizes:l,onSizesChange:r,...o}=e,d=jn(es,e.__scopeScrollArea),[u,f]=v.useState(),h=v.useRef(null),x=gt(n,h,d.onScrollbarYChange);return v.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),s.jsx(Mv,{"data-orientation":"vertical",...o,ref:x,sizes:l,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":wd(l)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,p)=>{if(d.viewport){const b=d.viewport.scrollTop+g.deltaY;e.onWheelScroll(b),Dv(b,p)&&g.preventDefault()}},onResize:()=>{h.current&&d.viewport&&u&&r({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Kc(u.paddingTop),paddingEnd:Kc(u.paddingBottom)}})}})}),[w4,qv]=Rv(es),Mv=v.forwardRef((e,n)=>{const{__scopeScrollArea:l,sizes:r,hasThumb:o,onThumbChange:d,onThumbPointerUp:u,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:x,onWheelScroll:g,onResize:p,...b}=e,y=jn(es,l),[j,w]=v.useState(null),k=gt(n,F=>w(F)),Q=v.useRef(null),C=v.useRef(""),P=y.viewport,R=r.content-r.viewport,Y=Dt(g),X=Dt(h),z=kd(p,10);function $(F){if(Q.current){const Z=F.clientX-Q.current.left,J=F.clientY-Q.current.top;x({x:Z,y:J})}}return v.useEffect(()=>{const F=Z=>{const J=Z.target;(j==null?void 0:j.contains(J))&&Y(Z,R)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[P,j,R,Y]),v.useEffect(X,[r,X]),gr(j,z),gr(y.content,z),s.jsx(w4,{scope:l,scrollbar:j,hasThumb:o,onThumbChange:Dt(d),onThumbPointerUp:Dt(u),onThumbPositionChange:X,onThumbPointerDown:Dt(f),children:s.jsx(et.div,{...b,ref:k,style:{position:"absolute",...b.style},onPointerDown:Ge(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),Q.current=j.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),$(F))}),onPointerMove:Ge(e.onPointerMove,$),onPointerUp:Ge(e.onPointerUp,F=>{const Z=F.target;Z.hasPointerCapture(F.pointerId)&&Z.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=C.current,y.viewport&&(y.viewport.style.scrollBehavior=""),Q.current=null})})})}),Fc="ScrollAreaThumb",Yv=v.forwardRef((e,n)=>{const{forceMount:l,...r}=e,o=qv(Fc,e.__scopeScrollArea);return s.jsx(Xn,{present:l||o.hasThumb,children:s.jsx(k4,{ref:n,...r})})}),k4=v.forwardRef((e,n)=>{const{__scopeScrollArea:l,style:r,...o}=e,d=jn(Fc,l),u=qv(Fc,l),{onThumbPositionChange:f}=u,h=gt(n,p=>u.onThumbChange(p)),x=v.useRef(void 0),g=kd(()=>{x.current&&(x.current(),x.current=void 0)},100);return v.useEffect(()=>{const p=d.viewport;if(p){const b=()=>{if(g(),!x.current){const y=T4(p,f);x.current=y,f()}};return f(),p.addEventListener("scroll",b),()=>p.removeEventListener("scroll",b)}},[d.viewport,g,f]),s.jsx(et.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ge(e.onPointerDownCapture,p=>{const y=p.target.getBoundingClientRect(),j=p.clientX-y.left,w=p.clientY-y.top;u.onThumbPointerDown({x:j,y:w})}),onPointerUp:Ge(e.onPointerUp,u.onThumbPointerUp)})});Yv.displayName=Fc;var Uh="ScrollAreaCorner",Uv=v.forwardRef((e,n)=>{const l=jn(Uh,e.__scopeScrollArea),r=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&r?s.jsx(N4,{...e,ref:n}):null});Uv.displayName=Uh;var N4=v.forwardRef((e,n)=>{const{__scopeScrollArea:l,...r}=e,o=jn(Uh,l),[d,u]=v.useState(0),[f,h]=v.useState(0),x=!!(d&&f);return gr(o.scrollbarX,()=>{var p;const g=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(g),h(g)}),gr(o.scrollbarY,()=>{var p;const g=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(g),u(g)}),x?s.jsx(et.div,{...r,ref:n,style:{width:d,height:f,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Kc(e){return e?parseInt(e,10):0}function Vv(e,n){const l=e/n;return isNaN(l)?0:l}function wd(e){const n=Vv(e.viewport,e.content),l=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-l)*n;return Math.max(r,18)}function $4(e,n,l,r="ltr"){const o=wd(l),d=o/2,u=n||d,f=o-u,h=l.scrollbar.paddingStart+u,x=l.scrollbar.size-l.scrollbar.paddingEnd-f,g=l.content-l.viewport,p=r==="ltr"?[0,g]:[g*-1,0];return Gv([h,x],p)(e)}function q1(e,n,l="ltr"){const r=wd(n),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,d=n.scrollbar.size-o,u=n.content-n.viewport,f=d-r,h=l==="ltr"?[0,u]:[u*-1,0],x=g4(e,h);return Gv([0,u],[0,f])(x)}function Gv(e,n){return l=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const r=(n[1]-n[0])/(e[1]-e[0]);return n[0]+r*(l-e[0])}}function Dv(e,n){return e>0&&e<n}var T4=(e,n=()=>{})=>{let l={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const d={left:e.scrollLeft,top:e.scrollTop},u=l.left!==d.left,f=l.top!==d.top;(u||f)&&n(),l=d,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function kd(e,n){const l=Dt(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(l,n)},[l,n])}function gr(e,n){const l=Dt(n);$s(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(l)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,l])}var P4=Av,C4=Xv,M1=Zv,Y1=Yv,z4=Uv;function En({children:e,className:n,...l}){return s.jsxs(P4,{className:le("overflow-hidden",n),...l,children:[s.jsx(C4,{className:"h-full w-full rounded-[inherit]",children:e}),s.jsx(M1,{orientation:"vertical",className:"flex touch-none select-none p-0.5 transition-colors w-2",children:s.jsx(Y1,{className:"relative flex-1 rounded-full bg-surface-5 hover:bg-surface-6"})}),s.jsx(M1,{orientation:"horizontal",className:"flex touch-none select-none flex-col p-0.5 transition-colors h-2",children:s.jsx(Y1,{className:"relative flex-1 rounded-full bg-surface-5 hover:bg-surface-6"})}),s.jsx(z4,{})]})}const R4={js:"text-warning",jsx:"text-warning",ts:"text-info",tsx:"text-info",css:"text-info",html:"text-orange",json:"text-warning",md:"text-text-2",py:"text-success",rs:"text-orange",go:"text-accent",sh:"text-success",yaml:"text-danger",yml:"text-danger",sql:"text-purple",xml:"text-orange",svg:"text-warning"};function A4(e){var l;const n=(l=e.split(".").pop())==null?void 0:l.toLowerCase();return R4[n]||"text-text-3"}function _4({x:e,y:n,items:l,onClose:r}){const o=v.useRef(null);return v.useEffect(()=>{function d(u){o.current&&!o.current.contains(u.target)&&r()}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[r]),s.jsx("div",{ref:o,className:"fixed z-50 min-w-[160px] py-1 bg-surface-2 border border-border rounded-lg shadow-xl",style:{left:e,top:n},children:l.map((d,u)=>d.separator?s.jsx("div",{className:"h-px bg-border-subtle my-1"},u):s.jsxs("button",{onClick:()=>{d.action(),r()},className:le("w-full flex items-center gap-2.5 px-3 py-1.5 text-xs font-sans text-left cursor-pointer transition-colors",d.danger?"text-danger hover:bg-danger/10":"text-text-1 hover:bg-surface-5"),children:[d.icon&&s.jsx(d.icon,{size:12,className:d.danger?"text-danger":"text-text-3"}),d.label]},u))})}function Jc({defaultValue:e="",placeholder:n,onSubmit:l,onCancel:r,depth:o=0}){const[d,u]=v.useState(e),f=v.useRef(null);v.useEffect(()=>{var x,g;(x=f.current)==null||x.focus(),e&&((g=f.current)==null||g.select())},[e]);function h(x){if(x.key==="Enter"){const g=d.trim();g&&l(g)}x.key==="Escape"&&r()}return s.jsx("div",{className:"flex items-center py-0.5",style:{paddingLeft:o*16+8},children:s.jsx("input",{ref:f,value:d,onChange:x=>u(x.target.value),onKeyDown:h,onBlur:r,placeholder:n,className:"w-full h-5 px-1.5 text-xs bg-surface-0 border border-accent rounded text-text-0 font-sans focus:outline-none"})})}function Lv({entry:e,depth:n=0,activePath:l,onFileClick:r,onDirToggle:o,expanded:d,onContextMenu:u}){const f=e.type==="dir",h=l===e.path,x=d.has(e.path),g=n*16+8;function p(b){b.preventDefault(),b.stopPropagation(),u(b,e)}return s.jsxs("button",{onClick:()=>f?o(e.path):r(e.path),onContextMenu:p,className:le("w-full flex items-center gap-1.5 py-1 text-xs font-sans cursor-pointer","hover:bg-surface-5 transition-colors text-left select-none",h&&"bg-accent/10 text-text-0",!h&&"text-text-1"),style:{paddingLeft:g},children:[f?s.jsxs(s.Fragment,{children:[x?s.jsx(bn,{size:12,className:"text-text-4 flex-shrink-0"}):s.jsx(Na,{size:12,className:"text-text-4 flex-shrink-0"}),x?s.jsx(il,{size:14,className:"text-accent flex-shrink-0"}):s.jsx(bv,{size:14,className:"text-text-3 flex-shrink-0"})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3"}),s.jsx(Y$,{size:14,className:le("flex-shrink-0",A4(e.name))})]}),s.jsx("span",{className:"truncate",children:e.name})]})}function Wv({dirPath:e,depth:n,activePath:l,onFileClick:r,expanded:o,onDirToggle:d,treeCache:u,fetchTreeDir:f,onContextMenu:h,inlineInput:x}){const g=u[e]||[];return v.useEffect(()=>{o.has(e)&&!u[e]&&f(e)},[o,e,u,f]),o.has(e)?s.jsxs(s.Fragment,{children:[(x==null?void 0:x.parentPath)===e&&s.jsx(Jc,{placeholder:x.type==="file"?"filename.ext":"folder-name",onSubmit:x.onSubmit,onCancel:x.onCancel,depth:n}),g.map(p=>s.jsxs("div",{children:[(x==null?void 0:x.renamePath)===p.path?s.jsx(Jc,{defaultValue:p.name,onSubmit:x.onSubmit,onCancel:x.onCancel,depth:n}):s.jsx(Lv,{entry:p,depth:n,activePath:l,onFileClick:r,onDirToggle:d,expanded:o,onContextMenu:h}),p.type==="dir"&&s.jsx(Wv,{dirPath:p.path,depth:n+1,activePath:l,onFileClick:r,expanded:o,onDirToggle:d,treeCache:u,fetchTreeDir:f,onContextMenu:h,inlineInput:x})]},p.path))]}):null}function X4({rootDir:e}){const n=M($=>$.editorTreeCache),l=M($=>$.editorActiveFile),r=M($=>$.openFile),o=M($=>$.fetchTreeDir),d=M($=>$.addToast),[u,f]=v.useState(new Set([""])),[h,x]=v.useState(""),[g,p]=v.useState(null),[b,y]=v.useState(null);v.useEffect(()=>{o("")},[o,e]);function j($){f(F=>{const Z=new Set(F);return Z.has($)?Z.delete($):Z.add($),Z})}function w($,F){p({x:$.clientX,y:$.clientY,entry:F})}function k($){$.preventDefault(),p({x:$.clientX,y:$.clientY,entry:{type:"dir",path:"",name:"root"}})}function Q($){const F=$.split("/");return F.pop(),F.join("/")}async function C($){f(F=>new Set([...F,$])),y({type:"file",parentPath:$,onSubmit:async F=>{const Z=$?`${$}/${F}`:F;try{await B.post("/files/create",{path:Z,content:""}),o($),r(Z),d("success",`Created ${F}`)}catch(J){d("error","Create failed",J.message)}y(null)},onCancel:()=>y(null)})}async function P($){f(F=>new Set([...F,$])),y({type:"folder",parentPath:$,onSubmit:async F=>{const Z=$?`${$}/${F}`:F;try{await B.post("/files/mkdir",{path:Z}),o($),f(J=>new Set([...J,Z])),d("success",`Created ${F}/`)}catch(J){d("error","Create folder failed",J.message)}y(null)},onCancel:()=>y(null)})}async function R($){y({type:"rename",renamePath:$.path,onSubmit:async F=>{const Z=Q($.path),J=Z?`${Z}/${F}`:F;try{await B.post("/files/rename",{oldPath:$.path,newPath:J}),o(Z),d("success",`Renamed to ${F}`)}catch(A){d("error","Rename failed",A.message)}y(null)},onCancel:()=>y(null)})}async function Y($){const F=$.type==="dir"?`folder "${$.name}" and all contents`:`"${$.name}"`;if(window.confirm(`Delete ${F}?`))try{await B.delete(`/files/delete?path=${encodeURIComponent($.path)}`),o(Q($.path)),d("success",`Deleted ${$.name}`)}catch(Z){d("error","Delete failed",Z.message)}}function X($){const F=$.type==="dir",Z=[];return F&&(Z.push({icon:Jf,label:"New File",action:()=>C($.path)}),Z.push({icon:eO,label:"New Folder",action:()=>P($.path)})),$.name!=="root"?(Z.length>0&&Z.push({separator:!0}),Z.push({icon:Di,label:"Rename",action:()=>R($)}),Z.push({icon:Sn,label:"Delete",danger:!0,action:()=>Y($)})):(Z.length=0,Z.push({icon:Jf,label:"New File",action:()=>C("")}),Z.push({icon:eO,label:"New Folder",action:()=>P("")})),Z}const z=n[""]||[];return s.jsxs("div",{className:"flex flex-col h-full bg-surface-1",onContextMenu:k,children:[s.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border-subtle",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(yn,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-text-4"}),s.jsx("input",{value:h,onChange:$=>x($.target.value),placeholder:"Filter...",className:"w-full h-6 pl-6 pr-2 text-xs bg-surface-0 border border-border-subtle rounded text-text-1 placeholder:text-text-4 focus:outline-none focus:border-accent font-sans"})]}),s.jsx("button",{onClick:()=>C(""),className:"p-1 text-text-4 hover:text-text-1 transition-colors cursor-pointer",title:"New file",children:s.jsx(Jf,{size:12})}),s.jsx("button",{onClick:()=>P(""),className:"p-1 text-text-4 hover:text-text-1 transition-colors cursor-pointer",title:"New folder",children:s.jsx(eO,{size:12})}),s.jsx("button",{onClick:()=>o(""),className:"p-1 text-text-4 hover:text-text-1 transition-colors cursor-pointer",title:"Refresh",children:s.jsx(Zn,{size:12})})]}),s.jsx(En,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[(b==null?void 0:b.parentPath)===""&&s.jsx(Jc,{placeholder:b.type==="file"?"filename.ext":"folder-name",onSubmit:b.onSubmit,onCancel:b.onCancel,depth:0}),z.filter($=>!h||$.name.toLowerCase().includes(h.toLowerCase())).map($=>s.jsxs("div",{children:[(b==null?void 0:b.renamePath)===$.path?s.jsx(Jc,{defaultValue:$.name,onSubmit:b.onSubmit,onCancel:b.onCancel,depth:0}):s.jsx(Lv,{entry:$,depth:0,activePath:l,onFileClick:r,onDirToggle:j,expanded:u,onContextMenu:w}),$.type==="dir"&&s.jsx(Wv,{dirPath:$.path,depth:1,activePath:l,onFileClick:r,expanded:u,onDirToggle:j,treeCache:n,fetchTreeDir:o,onContextMenu:w,inlineInput:b})]},$.path))]})}),g&&s.jsx(_4,{x:g.x,y:g.y,items:X(g.entry),onClose:()=>p(null)})]})}function Z4(){const e=M(d=>d.editorOpenTabs),n=M(d=>d.editorActiveFile),l=M(d=>d.editorFiles),r=M(d=>d.setActiveFile),o=M(d=>d.closeFile);return e.length===0?null:s.jsx("div",{className:"flex items-center h-8 bg-surface-3 border-b border-border overflow-x-auto flex-shrink-0",children:e.map(d=>{const u=d===n,f=l[d],h=f&&f.content!==f.originalContent,x=d.split("/").pop();return s.jsxs("div",{className:le("flex items-center gap-1.5 h-full px-3 text-xs font-sans cursor-pointer select-none","border-r border-border-subtle","transition-colors duration-75",u?"bg-surface-2 text-text-0 border-b-2 border-b-accent":"bg-surface-3 text-text-3 hover:text-text-1 hover:bg-surface-4"),onClick:()=>r(d),children:[s.jsx("span",{className:"truncate max-w-[120px]",children:x}),h&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-warning flex-shrink-0"}),s.jsx("button",{onClick:g=>{g.stopPropagation(),o(d)},className:"p-0.5 rounded hover:bg-surface-5 text-text-4 hover:text-text-1 transition-colors cursor-pointer ml-0.5",children:s.jsx(rt,{size:12})})]},d)})})}var U1={};class ed{constructor(n,l,r,o,d,u,f,h,x,g=0,p){this.p=n,this.stack=l,this.state=r,this.reducePos=o,this.pos=d,this.score=u,this.buffer=f,this.bufferBase=h,this.curContext=x,this.lookAhead=g,this.parent=p}toString(){return`[${this.stack.filter((n,l)=>l%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(n,l,r=0){let o=n.parser.context;return new ed(n,[],l,r,r,0,[],0,o?new V1(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(n,l){this.stack.push(this.state,l,this.bufferBase+this.buffer.length),this.state=n}reduce(n){var l;let r=n>>19,o=n&65535,{parser:d}=this.p,u=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),f=d.dynamicPrecedence(o);if(f&&(this.score+=f),r==0){this.pushState(d.getGoto(this.state,o,!0),this.reducePos),o<d.minRepeatTerm&&this.storeNode(o,this.reducePos,this.reducePos,u?8:4,!0),this.reduceContext(o,this.reducePos);return}let h=this.stack.length-(r-1)*3-(n&262144?6:0),x=h?this.stack[h-2]:this.p.ranges[0].from,g=this.reducePos-x;g>=2e3&&!(!((l=this.p.parser.nodeSet.types[o])===null||l===void 0)&&l.isAnonymous)&&(x==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=g):this.p.lastBigReductionSize<g&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=x,this.p.lastBigReductionSize=g));let p=h?this.stack[h-1]:0,b=this.bufferBase+this.buffer.length-p;if(o<d.minRepeatTerm||n&131072){let y=d.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(o,x,y,b+4,!0)}if(n&262144)this.state=this.stack[h];else{let y=this.stack[h-3];this.state=d.getGoto(y,o,!0)}for(;this.stack.length>h;)this.stack.pop();this.reduceContext(o,x)}storeNode(n,l,r,o=4,d=!1){if(n==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let u=this,f=this.buffer.length;if(f==0&&u.parent&&(f=u.bufferBase-u.parent.bufferBase,u=u.parent),f>0&&u.buffer[f-4]==0&&u.buffer[f-1]>-1){if(l==r)return;if(u.buffer[f-2]>=l){u.buffer[f-2]=r;return}}}if(!d||this.pos==r)this.buffer.push(n,l,r,o);else{let u=this.buffer.length;if(u>0&&(this.buffer[u-4]!=0||this.buffer[u-1]<0)){let f=!1;for(let h=u;h>0&&this.buffer[h-2]>r;h-=4)if(this.buffer[h-1]>=0){f=!0;break}if(f)for(;u>0&&this.buffer[u-2]>r;)this.buffer[u]=this.buffer[u-4],this.buffer[u+1]=this.buffer[u-3],this.buffer[u+2]=this.buffer[u-2],this.buffer[u+3]=this.buffer[u-1],u-=4,o>4&&(o-=4)}this.buffer[u]=n,this.buffer[u+1]=l,this.buffer[u+2]=r,this.buffer[u+3]=o}}shift(n,l,r,o){if(n&131072)this.pushState(n&65535,this.pos);else if((n&262144)==0){let d=n,{parser:u}=this.p;this.pos=o;let f=u.stateFlag(d,1);!f&&(o>r||l<=u.maxNode)&&(this.reducePos=o),this.pushState(d,f?r:Math.min(r,this.reducePos)),this.shiftContext(l,r),l<=u.maxNode&&this.buffer.push(l,r,o,4)}else this.pos=o,this.shiftContext(l,r),l<=this.p.parser.maxNode&&this.buffer.push(l,r,o,4)}apply(n,l,r,o){n&65536?this.reduce(n):this.shift(n,l,r,o)}useNode(n,l){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=n)&&(this.p.reused.push(n),r++);let o=this.pos;this.reducePos=this.pos=o+n.length,this.pushState(l,o),this.buffer.push(r,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}split(){let n=this,l=n.buffer.length;for(;l>0&&n.buffer[l-2]>n.reducePos;)l-=4;let r=n.buffer.slice(l),o=n.bufferBase+l;for(;n&&o==n.bufferBase;)n=n.parent;return new ed(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,o,this.curContext,this.lookAhead,n)}recoverByDelete(n,l){let r=n<=this.p.parser.maxNode;r&&this.storeNode(n,this.pos,l,4),this.storeNode(0,this.pos,l,r?8:4),this.pos=this.reducePos=l,this.score-=190}canShift(n){for(let l=new E4(this);;){let r=this.p.parser.stateSlot(l.state,4)||this.p.parser.hasAction(l.state,n);if(r==0)return!1;if((r&65536)==0)return!0;l.reduce(r)}}recoverByInsert(n){if(this.stack.length>=300)return[];let l=this.p.parser.nextStates(this.state);if(l.length>8||this.stack.length>=120){let o=[];for(let d=0,u;d<l.length;d+=2)(u=l[d+1])!=this.state&&this.p.parser.hasAction(u,n)&&o.push(l[d],u);if(this.stack.length<120)for(let d=0;o.length<8&&d<l.length;d+=2){let u=l[d+1];o.some((f,h)=>h&1&&f==u)||o.push(l[d],u)}l=o}let r=[];for(let o=0;o<l.length&&r.length<4;o+=2){let d=l[o+1];if(d==this.state)continue;let u=this.split();u.pushState(d,this.pos),u.storeNode(0,u.pos,u.pos,4,!0),u.shiftContext(l[o],this.pos),u.reducePos=this.pos,u.score-=200,r.push(u)}return r}forceReduce(){let{parser:n}=this.p,l=n.stateSlot(this.state,5);if((l&65536)==0)return!1;if(!n.validAction(this.state,l)){let r=l>>19,o=l&65535,d=this.stack.length-r*3;if(d<0||n.getGoto(this.stack[d],o,!1)<0){let u=this.findForcedReduction();if(u==null)return!1;l=u}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(l),!0}findForcedReduction(){let{parser:n}=this.p,l=[],r=(o,d)=>{if(!l.includes(o))return l.push(o),n.allActions(o,u=>{if(!(u&393216))if(u&65536){let f=(u>>19)-d;if(f>1){let h=u&65535,x=this.stack.length-f*3;if(x>=0&&n.getGoto(this.stack[x],h,!1)>=0)return f<<19|65536|h}}else{let f=r(u,d+1);if(f!=null)return f}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:n}=this.p;return n.data[n.stateSlot(this.state,1)]==65535&&!n.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(let l=0;l<this.stack.length;l+=3)if(this.stack[l]!=n.stack[l])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(n){return this.p.parser.dialect.flags[n]}shiftContext(n,l){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,n,this,this.p.stream.reset(l)))}reduceContext(n,l){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,n,this,this.p.stream.reset(l)))}emitContext(){let n=this.buffer.length-1;(n<0||this.buffer[n]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let n=this.buffer.length-1;(n<0||this.buffer[n]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(n){if(n!=this.curContext.context){let l=new V1(this.curContext.tracker,n);l.hash!=this.curContext.hash&&this.emitContext(),this.curContext=l}}setLookAhead(n){return n<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=n,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class V1{constructor(n,l){this.tracker=n,this.context=l,this.hash=n.strict?n.hash(l):0}}class E4{constructor(n){this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}reduce(n){let l=n&65535,r=n>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let o=this.start.p.parser.getGoto(this.stack[this.base-3],l,!0);this.state=o}}class td{constructor(n,l,r){this.stack=n,this.pos=l,this.index=r,this.buffer=n.buffer,this.index==0&&this.maybeNext()}static create(n,l=n.bufferBase+n.buffer.length){return new td(n,l,l-n.bufferBase)}maybeNext(){let n=this.stack.parent;n!=null&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new td(this.stack,this.pos,this.index)}}function wi(e,n=Uint16Array){if(typeof e!="string")return e;let l=null;for(let r=0,o=0;r<e.length;){let d=0;for(;;){let u=e.charCodeAt(r++),f=!1;if(u==126){d=65535;break}u>=92&&u--,u>=34&&u--;let h=u-32;if(h>=46&&(h-=46,f=!0),d+=h,f)break;d*=46}l?l[o++]=d:l=new n(d)}return l}class Rc{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const G1=new Rc;class q4{constructor(n,l){this.input=n,this.ranges=l,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=G1,this.rangeIndex=0,this.pos=this.chunkPos=l[0].from,this.range=l[0],this.end=l[l.length-1].to,this.readNext()}resolveOffset(n,l){let r=this.range,o=this.rangeIndex,d=this.pos+n;for(;d<r.from;){if(!o)return null;let u=this.ranges[--o];d-=r.from-u.to,r=u}for(;l<0?d>r.to:d>=r.to;){if(o==this.ranges.length-1)return null;let u=this.ranges[++o];d+=u.from-r.to,r=u}return d}clipPos(n){if(n>=this.range.from&&n<this.range.to)return n;for(let l of this.ranges)if(l.to>n)return Math.max(n,l.from);return this.end}peek(n){let l=this.chunkOff+n,r,o;if(l>=0&&l<this.chunk.length)r=this.pos+n,o=this.chunk.charCodeAt(l);else{let d=this.resolveOffset(n,1);if(d==null)return-1;if(r=d,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)o=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let u=this.rangeIndex,f=this.range;for(;f.to<=r;)f=this.ranges[++u];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>f.to&&(this.chunk2=this.chunk2.slice(0,f.to-r)),o=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),o}acceptToken(n,l=0){let r=l?this.resolveOffset(l,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=n,this.token.end=r}acceptTokenTo(n,l){this.token.value=n,this.token.end=l}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:n,chunkPos:l}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=n,this.chunk2Pos=l,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let n=this.input.chunk(this.pos),l=this.pos+n.length;this.chunk=l>this.range.to?n.slice(0,this.range.to-this.pos):n,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(n=1){for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(n,l){if(l?(this.token=l,l.start=n,l.lookAhead=n+1,l.value=l.extended=-1):this.token=G1,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;n>=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n<this.chunkPos+this.chunk.length?this.chunkOff=n-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(n,l){if(n>=this.chunkPos&&l<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,l-this.chunkPos);if(n>=this.chunk2Pos&&l<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,l-this.chunk2Pos);if(n>=this.range.from&&l<=this.range.to)return this.input.read(n,l);let r="";for(let o of this.ranges){if(o.from>=l)break;o.to>n&&(r+=this.input.read(Math.max(o.from,n),Math.min(o.to,l)))}return r}}class ur{constructor(n,l){this.data=n,this.id=l}token(n,l){let{parser:r}=l.p;Bv(this.data,n,l,this.id,r.data,r.tokenPrecTable)}}ur.prototype.contextual=ur.prototype.fallback=ur.prototype.extend=!1;class nd{constructor(n,l,r){this.precTable=l,this.elseToken=r,this.data=typeof n=="string"?wi(n):n}token(n,l){let r=n.pos,o=0;for(;;){let d=n.next<0,u=n.resolveOffset(1,1);if(Bv(this.data,n,l,0,this.data,this.precTable),n.token.value>-1)break;if(this.elseToken==null)return;if(d||o++,u==null)break;n.reset(u,n.token)}o&&(n.reset(r,n.token),n.acceptToken(this.elseToken,o))}}nd.prototype.contextual=ur.prototype.fallback=ur.prototype.extend=!1;class _t{constructor(n,l={}){this.token=n,this.contextual=!!l.contextual,this.fallback=!!l.fallback,this.extend=!!l.extend}}function Bv(e,n,l,r,o,d){let u=0,f=1<<r,{dialect:h}=l.p.parser;e:for(;(f&e[u])!=0;){let x=e[u+1];for(let y=u+3;y<x;y+=2)if((e[y+1]&f)>0){let j=e[y];if(h.allows(j)&&(n.token.value==-1||n.token.value==j||M4(j,n.token.value,o,d))){n.acceptToken(j);break}}let g=n.next,p=0,b=e[u+2];if(n.next<0&&b>p&&e[x+b*3-3]==65535){u=e[x+b*3-1];continue e}for(;p<b;){let y=p+b>>1,j=x+y+(y<<1),w=e[j],k=e[j+1]||65536;if(g<w)b=y;else if(g>=k)p=y+1;else{u=e[j+2],n.advance();continue e}}break}}function D1(e,n,l){for(let r=n,o;(o=e[r])!=65535;r++)if(o==l)return r-n;return-1}function M4(e,n,l,r){let o=D1(l,r,n);return o<0||D1(l,r,e)<o}const tn=typeof process<"u"&&U1&&/\bparse\b/.test(U1.LOG);let lO=null;function L1(e,n,l){let r=e.cursor(fd.IncludeAnonymous);for(r.moveTo(n);;)if(!(l<0?r.childBefore(n):r.childAfter(n)))for(;;){if((l<0?r.to<n:r.from>n)&&!r.type.isError)return l<0?Math.max(0,Math.min(r.to-1,n-25)):Math.min(e.length,Math.max(r.from+1,n+25));if(l<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return l<0?0:e.length}}let Y4=class{constructor(n,l){this.fragments=n,this.nodeSet=l,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?L1(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?L1(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(n){if(n<this.nextStart)return null;for(;this.fragment&&this.safeTo<=n;)this.nextFragment();if(!this.fragment)return null;for(;;){let l=this.trees.length-1;if(l<0)return this.nextFragment(),null;let r=this.trees[l],o=this.index[l];if(o==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let d=r.children[o],u=this.start[l]+r.positions[o];if(u>n)return this.nextStart=u,null;if(d instanceof zn){if(u==n){if(u<this.safeFrom)return null;let f=u+d.length;if(f<=this.safeTo){let h=d.prop(Ns.lookAhead);if(!h||f+h<this.fragment.to)return d}}this.index[l]++,u+d.length>=Math.max(this.safeFrom,n)&&(this.trees.push(d),this.start.push(u),this.index.push(0))}else this.index[l]++,this.nextStart=u+d.length}}};class U4{constructor(n,l){this.stream=l,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(r=>new Rc)}getActions(n){let l=0,r=null,{parser:o}=n.p,{tokenizers:d}=o,u=o.stateSlot(n.state,3),f=n.curContext?n.curContext.hash:0,h=0;for(let x=0;x<d.length;x++){if((1<<x&u)==0)continue;let g=d[x],p=this.tokens[x];if(!(r&&!g.fallback)&&((g.contextual||p.start!=n.pos||p.mask!=u||p.context!=f)&&(this.updateCachedToken(p,g,n),p.mask=u,p.context=f),p.lookAhead>p.end+25&&(h=Math.max(p.lookAhead,h)),p.value!=0)){let b=l;if(p.extended>-1&&(l=this.addActions(n,p.extended,p.end,l)),l=this.addActions(n,p.value,p.end,l),!g.extend&&(r=p,l>b))break}}for(;this.actions.length>l;)this.actions.pop();return h&&n.setLookAhead(h),!r&&n.pos==this.stream.end&&(r=new Rc,r.value=n.p.parser.eofTerm,r.start=r.end=n.pos,l=this.addActions(n,r.value,r.end,l)),this.mainToken=r,this.actions}getMainToken(n){if(this.mainToken)return this.mainToken;let l=new Rc,{pos:r,p:o}=n;return l.start=r,l.end=Math.min(r+1,o.stream.end),l.value=r==o.stream.end?o.parser.eofTerm:0,l}updateCachedToken(n,l,r){let o=this.stream.clipPos(r.pos);if(l.token(this.stream.reset(o,n),r),n.value>-1){let{parser:d}=r.p;for(let u=0;u<d.specialized.length;u++)if(d.specialized[u]==n.value){let f=d.specializers[u](this.stream.read(n.start,n.end),r);if(f>=0&&r.p.parser.dialect.allows(f>>1)){(f&1)==0?n.value=f>>1:n.extended=f>>1;break}}}else n.value=0,n.end=this.stream.clipPos(o+1)}putAction(n,l,r,o){for(let d=0;d<o;d+=3)if(this.actions[d]==n)return o;return this.actions[o++]=n,this.actions[o++]=l,this.actions[o++]=r,o}addActions(n,l,r,o){let{state:d}=n,{parser:u}=n.p,{data:f}=u;for(let h=0;h<2;h++)for(let x=u.stateSlot(d,h?2:1);;x+=3){if(f[x]==65535)if(f[x+1]==1)x=ws(f,x+2);else{o==0&&f[x+1]==2&&(o=this.putAction(ws(f,x+2),l,r,o));break}f[x]==l&&(o=this.putAction(ws(f,x+1),l,r,o))}return o}}class V4{constructor(n,l,r,o){this.parser=n,this.input=l,this.ranges=o,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new q4(l,o),this.tokens=new U4(n,this.stream),this.topTerm=n.top[1];let{from:d}=o[0];this.stacks=[ed.start(this,n.top[0],d)],this.fragments=r.length&&this.stream.end-d>n.bufferLength*4?new Y4(r,n.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let n=this.stacks,l=this.minStackPos,r=this.stacks=[],o,d;if(this.bigReductionCount>300&&n.length==1){let[u]=n;for(;u.forceReduce()&&u.stack.length&&u.stack[u.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let u=0;u<n.length;u++){let f=n[u];for(;;){if(this.tokens.mainToken=null,f.pos>l)r.push(f);else{if(this.advanceStack(f,r,n))continue;{o||(o=[],d=[]),o.push(f);let h=this.tokens.getMainToken(f);d.push(h.value,h.end)}}break}}if(!r.length){let u=o&&D4(o);if(u)return tn&&console.log("Finish with "+this.stackID(u)),this.stackToTree(u);if(this.parser.strict)throw tn&&o&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+l);this.recovering||(this.recovering=5)}if(this.recovering&&o){let u=this.stoppedAt!=null&&o[0].pos>this.stoppedAt?o[0]:this.runRecovery(o,d,r);if(u)return tn&&console.log("Force-finish "+this.stackID(u)),this.stackToTree(u.forceAll())}if(this.recovering){let u=this.recovering==1?1:this.recovering*3;if(r.length>u)for(r.sort((f,h)=>h.score-f.score);r.length>u;)r.pop();r.some(f=>f.reducePos>l)&&this.recovering--}else if(r.length>1){e:for(let u=0;u<r.length-1;u++){let f=r[u];for(let h=u+1;h<r.length;h++){let x=r[h];if(f.sameState(x)||f.buffer.length>500&&x.buffer.length>500)if((f.score-x.score||f.buffer.length-x.buffer.length)>0)r.splice(h--,1);else{r.splice(u--,1);continue e}}}r.length>12&&(r.sort((u,f)=>f.score-u.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let u=1;u<r.length;u++)r[u].pos<this.minStackPos&&(this.minStackPos=r[u].pos);return null}stopAt(n){if(this.stoppedAt!=null&&this.stoppedAt<n)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=n}advanceStack(n,l,r){let o=n.pos,{parser:d}=this,u=tn?this.stackID(n)+" -> ":"";if(this.stoppedAt!=null&&o>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments){let x=n.curContext&&n.curContext.tracker.strict,g=x?n.curContext.hash:0;for(let p=this.fragments.nodeAt(o);p;){let b=this.parser.nodeSet.types[p.type.id]==p.type?d.getGoto(n.state,p.type.id):-1;if(b>-1&&p.length&&(!x||(p.prop(Ns.contextHash)||0)==g))return n.useNode(p,b),tn&&console.log(u+this.stackID(n)+` (via reuse of ${d.getName(p.type.id)})`),!0;if(!(p instanceof zn)||p.children.length==0||p.positions[0]>0)break;let y=p.children[0];if(y instanceof zn&&p.positions[0]==0)p=y;else break}}let f=d.stateSlot(n.state,4);if(f>0)return n.reduce(f),tn&&console.log(u+this.stackID(n)+` (via always-reduce ${d.getName(f&65535)})`),!0;if(n.stack.length>=8400)for(;n.stack.length>6e3&&n.forceReduce(););let h=this.tokens.getActions(n);for(let x=0;x<h.length;){let g=h[x++],p=h[x++],b=h[x++],y=x==h.length||!r,j=y?n:n.split(),w=this.tokens.mainToken;if(j.apply(g,p,w?w.start:j.pos,b),tn&&console.log(u+this.stackID(j)+` (via ${(g&65536)==0?"shift":`reduce of ${d.getName(g&65535)}`} for ${d.getName(p)} @ ${o}${j==n?"":", split"})`),y)return!0;j.pos>o?l.push(j):r.push(j)}return!1}advanceFully(n,l){let r=n.pos;for(;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>r)return W1(n,l),!0}}runRecovery(n,l,r){let o=null,d=!1;for(let u=0;u<n.length;u++){let f=n[u],h=l[u<<1],x=l[(u<<1)+1],g=tn?this.stackID(f)+" -> ":"";if(f.deadEnd&&(d||(d=!0,f.restart(),tn&&console.log(g+this.stackID(f)+" (restarted)"),this.advanceFully(f,r))))continue;let p=f.split(),b=g;for(let y=0;y<10&&p.forceReduce()&&(tn&&console.log(b+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));y++)tn&&(b=this.stackID(p)+" -> ");for(let y of f.recoverByInsert(h))tn&&console.log(g+this.stackID(y)+" (via recover-insert)"),this.advanceFully(y,r);this.stream.end>f.pos?(x==f.pos&&(x++,h=0),f.recoverByDelete(h,x),tn&&console.log(g+this.stackID(f)+` (via recover-delete ${this.parser.getName(h)})`),W1(f,r)):(!o||o.score<p.score)&&(o=p)}return o}stackToTree(n){return n.close(),zn.build({buffer:td.create(n),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:n.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(n){let l=(lO||(lO=new WeakMap)).get(n);return l||lO.set(n,l=String.fromCodePoint(this.nextStackID++)),l+n}}function W1(e,n){for(let l=0;l<n.length;l++){let r=n[l];if(r.pos==e.pos&&r.sameState(e)){n[l].score<e.score&&(n[l]=e);return}}n.push(e)}class G4{constructor(n,l,r){this.source=n,this.flags=l,this.disabled=r}allows(n){return!this.disabled||this.disabled[n]==0}}const rO=e=>e;class Vh{constructor(n){this.start=n.start,this.shift=n.shift||rO,this.reduce=n.reduce||rO,this.reuse=n.reuse||rO,this.hash=n.hash||(()=>0),this.strict=n.strict!==!1}}class wa extends cb{constructor(n){if(super(),this.wrappers=[],n.version!=14)throw new RangeError(`Parser version (${n.version}) doesn't match runtime version (14)`);let l=n.nodeNames.split(" ");this.minRepeatTerm=l.length;for(let f=0;f<n.repeatNodeCount;f++)l.push("");let r=Object.keys(n.topRules).map(f=>n.topRules[f][1]),o=[];for(let f=0;f<l.length;f++)o.push([]);function d(f,h,x){o[f].push([h,h.deserialize(String(x))])}if(n.nodeProps)for(let f of n.nodeProps){let h=f[0];typeof h=="string"&&(h=Ns[h]);for(let x=1;x<f.length;){let g=f[x++];if(g>=0)d(g,h,f[x++]);else{let p=f[x+-g];for(let b=-g;b>0;b--)d(f[x++],h,p);x++}}}this.nodeSet=new uh(l.map((f,h)=>Mi.define({name:h>=this.minRepeatTerm?void 0:f,id:h,props:o[h],top:r.indexOf(h)>-1,error:h==0,skipped:n.skippedNodes&&n.skippedNodes.indexOf(h)>-1}))),n.propSources&&(this.nodeSet=this.nodeSet.extend(...n.propSources)),this.strict=!1,this.bufferLength=sw;let u=wi(n.tokenData);this.context=n.context,this.specializerSpecs=n.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let f=0;f<this.specializerSpecs.length;f++)this.specialized[f]=this.specializerSpecs[f].term;this.specializers=this.specializerSpecs.map(B1),this.states=wi(n.states,Uint32Array),this.data=wi(n.stateData),this.goto=wi(n.goto),this.maxTerm=n.maxTerm,this.tokenizers=n.tokenizers.map(f=>typeof f=="number"?new ur(u,f):f),this.topRules=n.topRules,this.dialects=n.dialects||{},this.dynamicPrecedences=n.dynamicPrecedences||null,this.tokenPrecTable=n.tokenPrec,this.termNames=n.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(n,l,r){let o=new V4(this,n,l,r);for(let d of this.wrappers)o=d(o,n,l,r);return o}getGoto(n,l,r=!1){let o=this.goto;if(l>=o[0])return-1;for(let d=o[l+1];;){let u=o[d++],f=u&1,h=o[d++];if(f&&r)return h;for(let x=d+(u>>1);d<x;d++)if(o[d]==n)return h;if(f)return-1}}hasAction(n,l){let r=this.data;for(let o=0;o<2;o++)for(let d=this.stateSlot(n,o?2:1),u;;d+=3){if((u=r[d])==65535)if(r[d+1]==1)u=r[d=ws(r,d+2)];else{if(r[d+1]==2)return ws(r,d+2);break}if(u==l||u==0)return ws(r,d+1)}return 0}stateSlot(n,l){return this.states[n*6+l]}stateFlag(n,l){return(this.stateSlot(n,0)&l)>0}validAction(n,l){return!!this.allActions(n,r=>r==l?!0:null)}allActions(n,l){let r=this.stateSlot(n,4),o=r?l(r):void 0;for(let d=this.stateSlot(n,1);o==null;d+=3){if(this.data[d]==65535)if(this.data[d+1]==1)d=ws(this.data,d+2);else break;o=l(ws(this.data,d+1))}return o}nextStates(n){let l=[];for(let r=this.stateSlot(n,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=ws(this.data,r+2);else break;if((this.data[r+2]&1)==0){let o=this.data[r+1];l.some((d,u)=>u&1&&d==o)||l.push(this.data[r],o)}}return l}configure(n){let l=Object.assign(Object.create(wa.prototype),this);if(n.props&&(l.nodeSet=this.nodeSet.extend(...n.props)),n.top){let r=this.topRules[n.top];if(!r)throw new RangeError(`Invalid top rule name ${n.top}`);l.top=r}return n.tokenizers&&(l.tokenizers=this.tokenizers.map(r=>{let o=n.tokenizers.find(d=>d.from==r);return o?o.to:r})),n.specializers&&(l.specializers=this.specializers.slice(),l.specializerSpecs=this.specializerSpecs.map((r,o)=>{let d=n.specializers.find(f=>f.from==r.external);if(!d)return r;let u=Object.assign(Object.assign({},r),{external:d.to});return l.specializers[o]=B1(u),u})),n.contextTracker&&(l.context=n.contextTracker),n.dialect&&(l.dialect=this.parseDialect(n.dialect)),n.strict!=null&&(l.strict=n.strict),n.wrap&&(l.wrappers=l.wrappers.concat(n.wrap)),n.bufferLength!=null&&(l.bufferLength=n.bufferLength),l}hasWrappers(){return this.wrappers.length>0}getName(n){return this.termNames?this.termNames[n]:String(n<=this.maxNode&&this.nodeSet.types[n].name||n)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(n){let l=this.dynamicPrecedences;return l==null?0:l[n]||0}parseDialect(n){let l=Object.keys(this.dialects),r=l.map(()=>!1);if(n)for(let d of n.split(" ")){let u=l.indexOf(d);u>=0&&(r[u]=!0)}let o=null;for(let d=0;d<l.length;d++)if(!r[d])for(let u=this.dialects[l[d]],f;(f=this.data[u++])!=65535;)(o||(o=new Uint8Array(this.maxTerm+1)))[f]=1;return new G4(n,r,o)}static deserialize(n){return new wa(n)}}function ws(e,n){return e[n]|e[n+1]<<16}function D4(e){let n=null;for(let l of e){let r=l.p.stoppedAt;(l.pos==l.p.stream.end||r!=null&&l.pos>r)&&l.p.parser.stateFlag(l.state,2)&&(!n||n.score<l.score)&&(n=l)}return n}function B1(e){if(e.external){let n=e.extend?1:0;return(l,r)=>e.external(l,r)<<1|n}return e.get}const L4=316,W4=317,I1=1,B4=2,I4=3,H4=4,F4=318,K4=320,J4=321,eP=5,tP=6,nP=0,HO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Iv=125,sP=59,FO=47,aP=42,lP=43,rP=45,iP=60,oP=44,cP=63,dP=46,uP=91,fP=new Vh({start:!1,shift(e,n){return n==eP||n==tP||n==K4?e:n==J4},strict:!1}),OP=new _t((e,n)=>{let{next:l}=e;(l==Iv||l==-1||n.context)&&e.acceptToken(F4)},{contextual:!0,fallback:!0}),hP=new _t((e,n)=>{let{next:l}=e,r;HO.indexOf(l)>-1||l==FO&&((r=e.peek(1))==FO||r==aP)||l!=Iv&&l!=sP&&l!=-1&&!n.context&&e.acceptToken(L4)},{contextual:!0}),mP=new _t((e,n)=>{e.next==uP&&!n.context&&e.acceptToken(W4)},{contextual:!0}),xP=new _t((e,n)=>{let{next:l}=e;if(l==lP||l==rP){if(e.advance(),l==e.next){e.advance();let r=!n.context&&n.canShift(I1);e.acceptToken(r?I1:B4)}}else l==cP&&e.peek(1)==dP&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(I4))},{contextual:!0});function iO(e,n){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!n&&e>=48&&e<=57}const pP=new _t((e,n)=>{if(e.next!=iP||!n.dialectEnabled(nP)||(e.advance(),e.next==FO))return;let l=0;for(;HO.indexOf(e.next)>-1;)e.advance(),l++;if(iO(e.next,!0)){for(e.advance(),l++;iO(e.next,!1);)e.advance(),l++;for(;HO.indexOf(e.next)>-1;)e.advance(),l++;if(e.next==oP)return;for(let r=0;;r++){if(r==7){if(!iO(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),l++}}e.acceptToken(H4,-l)}),gP=fl({"get set async static":q.modifier,"for while do if else switch try catch finally return throw break continue default case defer":q.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":q.operatorKeyword,"let var const using function class extends":q.definitionKeyword,"import export from":q.moduleKeyword,"with debugger new":q.keyword,TemplateString:q.special(q.string),super:q.atom,BooleanLiteral:q.bool,this:q.self,null:q.null,Star:q.modifier,VariableName:q.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":q.function(q.variableName),VariableDefinition:q.definition(q.variableName),Label:q.labelName,PropertyName:q.propertyName,PrivatePropertyName:q.special(q.propertyName),"CallExpression/MemberExpression/PropertyName":q.function(q.propertyName),"FunctionDeclaration/VariableDefinition":q.function(q.definition(q.variableName)),"ClassDeclaration/VariableDefinition":q.definition(q.className),"NewExpression/VariableName":q.className,PropertyDefinition:q.definition(q.propertyName),PrivatePropertyDefinition:q.definition(q.special(q.propertyName)),UpdateOp:q.updateOperator,"LineComment Hashbang":q.lineComment,BlockComment:q.blockComment,Number:q.number,String:q.string,Escape:q.escape,ArithOp:q.arithmeticOperator,LogicOp:q.logicOperator,BitOp:q.bitwiseOperator,CompareOp:q.compareOperator,RegExp:q.regexp,Equals:q.definitionOperator,Arrow:q.function(q.punctuation),": Spread":q.punctuation,"( )":q.paren,"[ ]":q.squareBracket,"{ }":q.brace,"InterpolationStart InterpolationEnd":q.special(q.brace),".":q.derefOperator,", ;":q.separator,"@":q.meta,TypeName:q.typeName,TypeDefinition:q.definition(q.typeName),"type enum interface implements namespace module declare":q.definitionKeyword,"abstract global Privacy readonly override":q.modifier,"is keyof unique infer asserts":q.operatorKeyword,JSXAttributeValue:q.attributeValue,JSXText:q.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":q.angleBracket,"JSXIdentifier JSXNameSpacedName":q.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":q.attributeName,"JSXBuiltin/JSXIdentifier":q.standard(q.tagName)}),bP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},vP={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},yP={__proto__:null,"<":193},SP=wa.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsO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k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:fP,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[gP],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYE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%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[hP,mP,xP,pP,2,3,4,5,6,7,8,9,10,11,12,13,14,OP,new nd("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new nd("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>bP[e]||-1},{term:343,get:e=>vP[e]||-1},{term:95,get:e=>yP[e]||-1}],tokenPrec:15201}),Hv=[lt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),lt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),lt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),lt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),lt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),lt(`try {
610
+ \${}
611
+ } catch (\${error}) {
612
+ \${}
613
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),lt("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),lt(`if (\${}) {
614
+ \${}
615
+ } else {
616
+ \${}
617
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),lt(`class \${name} {
618
+ constructor(\${params}) {
619
+ \${}
620
+ }
621
+ }`,{label:"class",detail:"definition",type:"keyword"}),lt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),lt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],jP=Hv.concat([lt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),lt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),lt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),H1=new fh,Fv=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Si(e){return(n,l)=>{let r=n.node.getChild("VariableDefinition");return r&&l(r,e),!0}}const QP=["FunctionDeclaration"],wP={FunctionDeclaration:Si("function"),ClassDeclaration:Si("class"),ClassExpression:()=>!0,EnumDeclaration:Si("constant"),TypeAliasDeclaration:Si("type"),NamespaceDeclaration:Si("namespace"),VariableDefinition(e,n){e.matchContext(QP)||n(e,"variable")},TypeDefinition(e,n){n(e,"type")},__proto__:null};function Kv(e,n){let l=H1.get(n);if(l)return l;let r=[],o=!0;function d(u,f){let h=e.sliceString(u.from,u.to);r.push({label:h,type:f})}return n.cursor(fd.IncludeAnonymous).iterate(u=>{if(o)o=!1;else if(u.name){let f=wP[u.name];if(f&&f(u,d)||Fv.has(u.name))return!1}else if(u.to-u.from>8192){for(let f of Kv(e,u.node))r.push(f);return!1}}),H1.set(n,r),r}const F1=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Jv=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function kP(e){let n=_n(e.state).resolveInner(e.pos,-1);if(Jv.indexOf(n.name)>-1)return null;let l=n.name=="VariableName"||n.to-n.from<20&&F1.test(e.state.sliceDoc(n.from,n.to));if(!l&&!e.explicit)return null;let r=[];for(let o=n;o;o=o.parent)Fv.has(o.name)&&(r=r.concat(Kv(e.state.doc,o)));return{options:r,from:l?n.from:e.pos,validFor:F1}}const Hn=Yi.define({name:"javascript",parser:SP.configure({props:[Sr.add({IfStatement:ir({except:/^\s*({|else\b)/}),TryStatement:ir({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:aw,SwitchBody:e=>{let n=e.textAfter,l=/^\s*\}/.test(n),r=/^\s*(case|default)\b/.test(n);return e.baseIndent+(l?0:r?1:2)*e.unit},Block:Pc({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":ir({except:/^\s*{/}),JSXElement(e){let n=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(n?0:e.unit)},JSXEscape(e){let n=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(n?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Ol.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Od,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let n=e.firstChild;if(!n||n.name=="JSXSelfClosingTag")return null;let l=e.lastChild;return{from:n.to,to:l.type.isError?e.to:l.from}},"JSXSelfClosingTag JSXOpenTag"(e){var n;let l=(n=e.firstChild)===null||n===void 0?void 0:n.nextSibling,r=e.lastChild;return!l||l.type.isError?null:{from:l.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),ey={test:e=>/^JSX/.test(e.name),facet:Ob({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ty=Hn.configure({dialect:"ts"},"typescript"),ny=Hn.configure({dialect:"jsx",props:[fb.add(e=>e.isTop?[ey]:void 0)]}),sy=Hn.configure({dialect:"jsx ts",props:[fb.add(e=>e.isTop?[ey]:void 0)]},"typescript");let ay=e=>({label:e,type:"keyword"});const ly="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(ay),NP=ly.concat(["declare","implements","private","protected","public"].map(ay));function KO(e={}){let n=e.jsx?e.typescript?sy:ny:e.typescript?ty:Hn,l=e.typescript?jP.concat(NP):Hv.concat(ly);return new al(n,[Hn.data.of({autocomplete:db(Jv,ub(l))}),Hn.data.of({autocomplete:kP}),e.jsx?PP:[]])}function $P(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function K1(e,n,l=e.length){for(let r=n==null?void 0:n.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,l));return""}const TP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),PP=Or.inputHandler.of((e,n,l,r,o)=>{if((TP?e.composing:e.compositionStarted)||e.state.readOnly||n!=l||r!=">"&&r!="/"||!Hn.isActiveAt(e.state,n,-1))return!1;let d=o(),{state:u}=d,f=u.changeByRange(h=>{var x;let{head:g}=h,p=_n(u).resolveInner(g-1,-1),b;if(p.name=="JSXStartTag"&&(p=p.parent),!(u.doc.sliceString(g-1,g)!=r||p.name=="JSXAttributeValue"&&p.to>g)){if(r==">"&&p.name=="JSXFragmentTag")return{range:h,changes:{from:g,insert:"</>"}};if(r=="/"&&p.name=="JSXStartCloseTag"){let y=p.parent,j=y.parent;if(j&&y.from==g-2&&((b=K1(u.doc,j.firstChild,g))||((x=j.firstChild)===null||x===void 0?void 0:x.name)=="JSXFragmentTag")){let w=`${b}>`;return{range:xa.cursor(g+w.length,-1),changes:{from:g,insert:w}}}}else if(r==">"){let y=$P(p);if(y&&y.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(u.doc.sliceString(g,g+2))&&(b=K1(u.doc,y,g)))return{range:h,changes:{from:g,insert:`</${b}>`}}}}return{range:h}});return f.changes.empty?!1:(e.dispatch([d,u.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),CP=135,J1=1,zP=136,RP=137,ry=2,AP=138,_P=3,XP=4,iy=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ZP=58,EP=40,oy=95,qP=91,Ac=45,MP=46,YP=35,UP=37,VP=38,GP=92,DP=10,LP=42;function Ri(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Gh(e){return e>=48&&e<=57}function e0(e){return Gh(e)||e>=97&&e<=102||e>=65&&e<=70}const cy=(e,n,l)=>(r,o)=>{for(let d=!1,u=0,f=0;;f++){let{next:h}=r;if(Ri(h)||h==Ac||h==oy||d&&Gh(h))!d&&(h!=Ac||f>0)&&(d=!0),u===f&&h==Ac&&u++,r.advance();else if(h==GP&&r.peek(1)!=DP){if(r.advance(),e0(r.next)){do r.advance();while(e0(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();d=!0}else{d&&r.acceptToken(u==2&&o.canShift(ry)?n:h==EP?l:e);break}}},WP=new _t(cy(zP,ry,RP),{contextual:!0}),BP=new _t(cy(AP,_P,XP),{contextual:!0}),IP=new _t(e=>{if(iy.includes(e.peek(-1))){let{next:n}=e;(Ri(n)||n==oy||n==YP||n==MP||n==LP||n==qP||n==ZP&&Ri(e.peek(1))||n==Ac||n==VP)&&e.acceptToken(CP)}}),HP=new _t(e=>{if(!iy.includes(e.peek(-1))){let{next:n}=e;if(n==UP&&(e.advance(),e.acceptToken(J1)),Ri(n)){do e.advance();while(Ri(e.next)||Gh(e.next));e.acceptToken(J1)}}}),FP=fl({"AtKeyword import charset namespace keyframes media supports font-feature-values":q.definitionKeyword,"from to selector scope MatchFlag":q.keyword,NamespaceName:q.namespace,KeyframeName:q.labelName,KeyframeRangeName:q.operatorKeyword,TagName:q.tagName,ClassName:q.className,PseudoClassName:q.constant(q.className),IdName:q.labelName,"FeatureName PropertyName":q.propertyName,AttributeName:q.attributeName,NumberLiteral:q.number,KeywordQuery:q.keyword,UnaryQueryOp:q.operatorKeyword,"CallTag ValueName FontName":q.atom,VariableName:q.variableName,Callee:q.operatorKeyword,Unit:q.unit,"UniversalSelector NestingSelector":q.definitionOperator,"MatchOp CompareOp":q.compareOperator,"ChildOp SiblingOp, LogicOp":q.logicOperator,BinOp:q.arithmeticOperator,Important:q.modifier,Comment:q.blockComment,ColorLiteral:q.color,"ParenthesizedContent StringLiteral":q.string,":":q.punctuation,"PseudoOp #":q.derefOperator,"; , |":q.separator,"( )":q.paren,"[ ]":q.squareBracket,"{ }":q.brace}),KP={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},JP={__proto__:null,or:104,and:104,not:112,only:112,layer:186},eC={__proto__:null,selector:118,layer:182},tC={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},nC={__proto__:null,to:223},sC=wa.deserialize({version:14,states:"IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQd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Selector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[FP],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=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WU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[IP,HP,WP,BP,1,2,3,4,new nd("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:e=>KP[e]||-1},{term:138,get:e=>JP[e]||-1},{term:4,get:e=>eC[e]||-1},{term:28,get:e=>tC[e]||-1},{term:136,get:e=>nC[e]||-1}],tokenPrec:2256});let oO=null;function cO(){if(!oO&&typeof document=="object"&&document.body){let{style:e}=document.body,n=[],l=new Set;for(let r in e)r!="cssText"&&r!="cssFloat"&&typeof e[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,o=>"-"+o.toLowerCase())),l.has(r)||(n.push(r),l.add(r)));oO=n.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return oO||[]}const t0=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),n0=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),aC=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),lC=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),vs=/^(\w[\w-]*|-\w[\w-]*|)$/,rC=/^-(-[\w-]*)?$/;function iC(e,n){var l;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let r=(l=e.parent)===null||l===void 0?void 0:l.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:n.sliceString(r.from,r.to)=="var"}const s0=new fh,oC=["Declaration"];function cC(e){for(let n=e;;){if(n.type.isTop)return n;if(!(n=n.parent))return e}}function dy(e,n,l){if(n.to-n.from>4096){let r=s0.get(n);if(r)return r;let o=[],d=new Set,u=n.cursor(fd.IncludeAnonymous);if(u.firstChild())do for(let f of dy(e,u.node,l))d.has(f.label)||(d.add(f.label),o.push(f));while(u.nextSibling());return s0.set(n,o),o}else{let r=[],o=new Set;return n.cursor().iterate(d=>{var u;if(l(d)&&d.matchContext(oC)&&((u=d.node.nextSibling)===null||u===void 0?void 0:u.name)==":"){let f=e.sliceString(d.from,d.to);o.has(f)||(o.add(f),r.push({label:f,type:"variable"}))}}),r}}const dC=e=>n=>{let{state:l,pos:r}=n,o=_n(l).resolveInner(r,-1),d=o.type.isError&&o.from==o.to-1&&l.doc.sliceString(o.from,o.to)=="-";if(o.name=="PropertyName"||(d||o.name=="TagName")&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:cO(),validFor:vs};if(o.name=="ValueName")return{from:o.from,options:n0,validFor:vs};if(o.name=="PseudoClassName")return{from:o.from,options:t0,validFor:vs};if(e(o)||(n.explicit||d)&&iC(o,l.doc))return{from:e(o)||d?o.from:r,options:dy(l.doc,cC(o),e),validFor:rC};if(o.name=="TagName"){for(let{parent:h}=o;h;h=h.parent)if(h.name=="Block")return{from:o.from,options:cO(),validFor:vs};return{from:o.from,options:aC,validFor:vs}}if(o.name=="AtKeyword")return{from:o.from,options:lC,validFor:vs};if(!n.explicit)return null;let u=o.resolve(r),f=u.childBefore(r);return f&&f.name==":"&&u.name=="PseudoClassSelector"?{from:r,options:t0,validFor:vs}:f&&f.name==":"&&u.name=="Declaration"||u.name=="ArgList"?{from:r,options:n0,validFor:vs}:u.name=="Block"||u.name=="Styles"?{from:r,options:cO(),validFor:vs}:null},uC=dC(e=>e.name=="VariableName"),sd=Yi.define({name:"css",parser:sC.configure({props:[Sr.add({Declaration:ir()}),Ol.add({"Block KeyframeList":Od})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function uy(){return new al(sd,sd.data.of({autocomplete:uC}))}const fC=55,OC=1,hC=56,mC=2,xC=57,pC=3,a0=4,gC=5,Dh=6,fy=7,Oy=8,hy=9,my=10,bC=11,vC=12,yC=13,dO=58,SC=14,jC=15,l0=59,xy=21,QC=23,py=24,wC=25,JO=27,gy=28,kC=29,NC=32,$C=35,TC=37,PC=38,CC=0,zC=1,RC={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},AC={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},r0={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function _C(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let i0=null,o0=null,c0=0;function eh(e,n){let l=e.pos+n;if(c0==l&&o0==e)return i0;let r=e.peek(n),o="";for(;_C(r);)o+=String.fromCharCode(r),r=e.peek(++n);return o0=e,c0=l,i0=o?o.toLowerCase():r==XC||r==ZC?void 0:null}const by=60,ad=62,Lh=47,XC=63,ZC=33,EC=45;function d0(e,n){this.name=e,this.parent=n}const qC=[Dh,my,fy,Oy,hy],MC=new Vh({start:null,shift(e,n,l,r){return qC.indexOf(n)>-1?new d0(eh(r,1)||"",e):e},reduce(e,n){return n==xy&&e?e.parent:e},reuse(e,n,l,r){let o=n.type.id;return o==Dh||o==TC?new d0(eh(r,1)||"",e):e},strict:!1}),YC=new _t((e,n)=>{if(e.next!=by){e.next<0&&n.context&&e.acceptToken(dO);return}e.advance();let l=e.next==Lh;l&&e.advance();let r=eh(e,0);if(r===void 0)return;if(!r)return e.acceptToken(l?jC:SC);let o=n.context?n.context.name:null;if(l){if(r==o)return e.acceptToken(bC);if(o&&AC[o])return e.acceptToken(dO,-2);if(n.dialectEnabled(CC))return e.acceptToken(vC);for(let d=n.context;d;d=d.parent)if(d.name==r)return;e.acceptToken(yC)}else{if(r=="script")return e.acceptToken(fy);if(r=="style")return e.acceptToken(Oy);if(r=="textarea")return e.acceptToken(hy);if(RC.hasOwnProperty(r))return e.acceptToken(my);o&&r0[o]&&r0[o][r]?e.acceptToken(dO,-1):e.acceptToken(Dh)}},{contextual:!0}),UC=new _t(e=>{for(let n=0,l=0;;l++){if(e.next<0){l&&e.acceptToken(l0);break}if(e.next==EC)n++;else if(e.next==ad&&n>=2){l>=3&&e.acceptToken(l0,-2);break}else n=0;e.advance()}});function VC(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const GC=new _t((e,n)=>{if(e.next==Lh&&e.peek(1)==ad){let l=n.dialectEnabled(zC)||VC(n.context);e.acceptToken(l?gC:a0,2)}else e.next==ad&&e.acceptToken(a0,1)});function Wh(e,n,l){let r=2+e.length;return new _t(o=>{for(let d=0,u=0,f=0;;f++){if(o.next<0){f&&o.acceptToken(n);break}if(d==0&&o.next==by||d==1&&o.next==Lh||d>=2&&d<r&&o.next==e.charCodeAt(d-2))d++,u++;else if(d==r&&o.next==ad){f>u?o.acceptToken(n,-u):o.acceptToken(l,-(u-2));break}else if((o.next==10||o.next==13)&&f){o.acceptToken(n,1);break}else d=u=0;o.advance()}})}const DC=Wh("script",fC,OC),LC=Wh("style",hC,mC),WC=Wh("textarea",xC,pC),BC=fl({"Text RawText IncompleteTag IncompleteCloseTag":q.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":q.angleBracket,TagName:q.tagName,"MismatchedCloseTag/TagName":[q.tagName,q.invalid],AttributeName:q.attributeName,"AttributeValue UnquotedAttributeValue":q.attributeValue,Is:q.definitionOperator,"EntityReference CharacterReference":q.character,Comment:q.blockComment,ProcessingInst:q.processingInstruction,DoctypeDecl:q.documentMeta}),IC=wa.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)q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xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:MC,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[BC],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz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w!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[DC,LC,WC,GC,YC,UC,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function vy(e,n){let l=Object.create(null);for(let r of e.getChildren(py)){let o=r.getChild(wC),d=r.getChild(JO)||r.getChild(gy);o&&(l[n.read(o.from,o.to)]=d?d.type.id==JO?n.read(d.from+1,d.to-1):n.read(d.from,d.to):"")}return l}function u0(e,n){let l=e.getChild(QC);return l?n.read(l.from,l.to):" "}function uO(e,n,l){let r;for(let o of l)if(!o.attrs||o.attrs(r||(r=vy(e.node.parent.firstChild,n))))return{parser:o.parser,bracketed:!0};return null}function yy(e=[],n=[]){let l=[],r=[],o=[],d=[];for(let f of e)(f.tag=="script"?l:f.tag=="style"?r:f.tag=="textarea"?o:d).push(f);let u=n.length?Object.create(null):null;for(let f of n)(u[f.name]||(u[f.name]=[])).push(f);return hb((f,h)=>{let x=f.type.id;if(x==kC)return uO(f,h,l);if(x==NC)return uO(f,h,r);if(x==$C)return uO(f,h,o);if(x==xy&&d.length){let g=f.node,p=g.firstChild,b=p&&u0(p,h),y;if(b){for(let j of d)if(j.tag==b&&(!j.attrs||j.attrs(y||(y=vy(p,h))))){let w=g.lastChild,k=w.type.id==PC?w.from:g.to;if(k>p.to)return{parser:j.parser,overlay:[{from:p.to,to:k}]}}}}if(u&&x==py){let g=f.node,p;if(p=g.firstChild){let b=u[h.read(p.from,p.to)];if(b)for(let y of b){if(y.tagName&&y.tagName!=u0(g.parent,h))continue;let j=g.lastChild;if(j.type.id==JO){let w=j.from+1,k=j.lastChild,Q=j.to-(k&&k.isError?0:1);if(Q>w)return{parser:y.parser,overlay:[{from:w,to:Q}],bracketed:!0}}else if(j.type.id==gy)return{parser:y.parser,overlay:[{from:j.from,to:j.to}]}}}}return null})}const ji=["_blank","_self","_top","_parent"],fO=["ascii","utf-8","utf-16","latin1","latin1"],OO=["get","post","put","delete"],hO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],nn=["true","false"],be={},HC={a:{attrs:{href:null,ping:null,type:null,media:null,target:ji,hreflang:null}},abbr:be,address:be,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:be,aside:be,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:be,base:{attrs:{href:null,target:ji}},bdi:be,bdo:be,blockquote:{attrs:{cite:null}},body:be,br:be,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:hO,formmethod:OO,formnovalidate:["novalidate"],formtarget:ji,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:be,center:be,cite:be,code:be,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:be,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:be,div:be,dl:be,dt:be,em:be,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:be,figure:be,footer:be,form:{attrs:{action:null,name:null,"accept-charset":fO,autocomplete:["on","off"],enctype:hO,method:OO,novalidate:["novalidate"],target:ji}},h1:be,h2:be,h3:be,h4:be,h5:be,h6:be,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:be,hgroup:be,hr:be,html:{attrs:{manifest:null}},i:be,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:hO,formmethod:OO,formnovalidate:["novalidate"],formtarget:ji,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:be,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:be,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:be,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:fO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:be,noscript:be,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:be,param:{attrs:{name:null,value:null}},pre:be,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:be,rt:be,ruby:be,samp:be,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:fO}},section:be,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:be,source:{attrs:{src:null,type:null,media:null}},span:be,strong:be,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:be,summary:be,sup:be,table:be,tbody:be,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:be,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:be,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:be,time:{attrs:{datetime:null}},title:be,tr:be,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:be,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:be},Sy={accesskey:null,class:null,contenteditable:nn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:nn,autocorrect:nn,autocapitalize:nn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":nn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":nn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":nn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":nn,"aria-hidden":nn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":nn,"aria-multiselectable":nn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":nn,"aria-relevant":null,"aria-required":nn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},jy="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of jy)Sy[e]=null;class Ai{constructor(n,l){this.tags={...HC,...n},this.globalAttrs={...Sy,...l},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ai.default=new Ai;function br(e,n,l=e.length){if(!n)return"";let r=n.firstChild,o=r&&r.getChild("TagName");return o?e.sliceString(o.from,Math.min(o.to,l)):""}function vr(e,n=!1){for(;e;e=e.parent)if(e.name=="Element")if(n)n=!1;else return e;return null}function Qy(e,n,l){let r=l.tags[br(e,vr(n))];return(r==null?void 0:r.children)||l.allTags}function Bh(e,n){let l=[];for(let r=vr(n);r&&!r.type.isTop;r=vr(r.parent)){let o=br(e,r);if(o&&r.lastChild.name=="CloseTag")break;o&&l.indexOf(o)<0&&(n.name=="EndTag"||n.from>=r.firstChild.to)&&l.push(o)}return l}const wy=/^[:\-\.\w\u00b7-\uffff]*$/;function f0(e,n,l,r,o){let d=/\s*>/.test(e.sliceDoc(o,o+5))?"":">",u=vr(l,l.name=="StartTag"||l.name=="TagName");return{from:r,to:o,options:Qy(e.doc,u,n).map(f=>({label:f,type:"type"})).concat(Bh(e.doc,l).map((f,h)=>({label:"/"+f,apply:"/"+f+d,type:"type",boost:99-h}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function O0(e,n,l,r){let o=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:l,to:r,options:Bh(e.doc,n).map((d,u)=>({label:d,apply:d+o,type:"type",boost:99-u})),validFor:wy}}function FC(e,n,l,r){let o=[],d=0;for(let u of Qy(e.doc,l,n))o.push({label:"<"+u,type:"type"});for(let u of Bh(e.doc,l))o.push({label:"</"+u+">",type:"type",boost:99-d++});return{from:r,to:r,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function KC(e,n,l,r,o){let d=vr(l),u=d?n.tags[br(e.doc,d)]:null,f=u&&u.attrs?Object.keys(u.attrs):[],h=u&&u.globalAttrs===!1?f:f.length?f.concat(n.globalAttrNames):n.globalAttrNames;return{from:r,to:o,options:h.map(x=>({label:x,type:"property"})),validFor:wy}}function JC(e,n,l,r,o){var d;let u=(d=l.parent)===null||d===void 0?void 0:d.getChild("AttributeName"),f=[],h;if(u){let x=e.sliceDoc(u.from,u.to),g=n.globalAttrs[x];if(!g){let p=vr(l),b=p?n.tags[br(e.doc,p)]:null;g=(b==null?void 0:b.attrs)&&b.attrs[x]}if(g){let p=e.sliceDoc(r,o).toLowerCase(),b='"',y='"';/^['"]/.test(p)?(h=p[0]=='"'?/^[^"]*$/:/^[^']*$/,b="",y=e.sliceDoc(o,o+1)==p[0]?"":p[0],p=p.slice(1),r++):h=/^[^\s<>='"]*$/;for(let j of g)f.push({label:j,apply:b+j+y,type:"constant"})}}return{from:r,to:o,options:f,validFor:h}}function ky(e,n){let{state:l,pos:r}=n,o=_n(l).resolveInner(r,-1),d=o.resolve(r);for(let u=r,f;d==o&&(f=o.childBefore(u));){let h=f.lastChild;if(!h||!h.type.isError||h.from<h.to)break;d=o=f,u=h.from}return o.name=="TagName"?o.parent&&/CloseTag$/.test(o.parent.name)?O0(l,o,o.from,r):f0(l,e,o,o.from,r):o.name=="StartTag"||o.name=="IncompleteTag"?f0(l,e,o,r,r):o.name=="StartCloseTag"||o.name=="IncompleteCloseTag"?O0(l,o,r,r):o.name=="OpenTag"||o.name=="SelfClosingTag"||o.name=="AttributeName"?KC(l,e,o,o.name=="AttributeName"?o.from:r,r):o.name=="Is"||o.name=="AttributeValue"||o.name=="UnquotedAttributeValue"?JC(l,e,o,o.name=="Is"?r:o.from,r):n.explicit&&(d.name=="Element"||d.name=="Text"||d.name=="Document")?FC(l,e,o,r):null}function ez(e){return ky(Ai.default,e)}function tz(e){let{extraTags:n,extraGlobalAttributes:l}=e,r=l||n?new Ai(n,l):Ai.default;return o=>ky(r,o)}const nz=Hn.parser.configure({top:"SingleExpression"}),Ny=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:ty.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:ny.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:sy.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:nz},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Hn.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:sd.parser}],$y=[{name:"style",parser:sd.parser.configure({top:"Styles"})}].concat(jy.map(e=>({name:e,parser:Hn.parser}))),Ty=Yi.define({name:"html",parser:IC.configure({props:[Sr.add({Element(e){let n=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+n[0].length?e.continue():e.lineIndent(e.node.from)+(n[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let n=null,l;for(let r=e.node;;){let o=r.lastChild;if(!o||o.name!="Element"||o.to!=r.to)break;n=r=o}return n&&!((l=n.lastChild)&&(l.name=="CloseTag"||l.name=="SelfClosingTag"))?e.lineIndent(n.from)+e.unit:null}}),Ol.add({Element(e){let n=e.firstChild,l=e.lastChild;return!n||n.name!="OpenTag"?null:{from:n.to,to:l.name=="CloseTag"?l.from:e.to}}}),lw.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),_c=Ty.configure({wrap:yy(Ny,$y)});function Py(e={}){let n="",l;e.matchClosingTags===!1&&(n="noMatch"),e.selfClosingTags===!0&&(n=(n?n+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(l=yy((e.nestedLanguages||[]).concat(Ny),(e.nestedAttributes||[]).concat($y)));let r=l?Ty.configure({wrap:l,dialect:n}):n?_c.configure({dialect:n}):_c;return new al(r,[_c.data.of({autocomplete:tz(e)}),e.autoCloseTags!==!1?sz:[],KO().support,uy().support])}const h0=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),sz=Or.inputHandler.of((e,n,l,r,o)=>{if(e.composing||e.state.readOnly||n!=l||r!=">"&&r!="/"||!_c.isActiveAt(e.state,n,-1))return!1;let d=o(),{state:u}=d,f=u.changeByRange(h=>{var x,g,p;let b=u.doc.sliceString(h.from-1,h.to)==r,{head:y}=h,j=_n(u).resolveInner(y,-1),w;if(b&&r==">"&&j.name=="EndTag"){let k=j.parent;if(((g=(x=k.parent)===null||x===void 0?void 0:x.lastChild)===null||g===void 0?void 0:g.name)!="CloseTag"&&(w=br(u.doc,k.parent,y))&&!h0.has(w)){let Q=y+(u.doc.sliceString(y,y+1)===">"?1:0),C=`</${w}>`;return{range:h,changes:{from:y,to:Q,insert:C}}}}else if(b&&r=="/"&&j.name=="IncompleteCloseTag"){let k=j.parent;if(j.from==y-2&&((p=k.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(w=br(u.doc,k,y))&&!h0.has(w)){let Q=y+(u.doc.sliceString(y,y+1)===">"?1:0),C=`${w}>`;return{range:xa.cursor(y+C.length,-1),changes:{from:y,to:Q,insert:C}}}}return{range:h}});return f.changes.empty?!1:(e.dispatch([d,u.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),az=fl({String:q.string,Number:q.number,"True False":q.bool,PropertyName:q.propertyName,Null:q.null,", :":q.separator,"[ ]":q.squareBracket,"{ }":q.brace}),lz=wa.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[az],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),rz=Yi.define({name:"json",parser:lz.configure({props:[Sr.add({Object:ir({except:/^\s*\}/}),Array:ir({except:/^\s*\]/})}),Ol.add({"Object Array":Od})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function iz(){return new al(rz)}class ld{static create(n,l,r,o,d){let u=o+(o<<8)+n+(l<<4)|0;return new ld(n,l,r,u,d,[],[])}constructor(n,l,r,o,d,u,f){this.type=n,this.value=l,this.from=r,this.hash=o,this.end=d,this.children=u,this.positions=f,this.hashProp=[[Ns.contextHash,o]]}addChild(n,l){n.prop(Ns.contextHash)!=this.hash&&(n=new zn(n.type,n.children,n.positions,n.length,this.hashProp)),this.children.push(n),this.positions.push(l)}toTree(n,l=this.end){let r=this.children.length-1;return r>=0&&(l=Math.max(l,this.positions[r]+this.children[r].length+this.from)),new zn(n.types[this.type],this.children,this.positions,l-this.from).balance({makeTree:(o,d,u)=>new zn(Mi.none,o,d,u,this.hashProp)})}}var ce;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(ce||(ce={}));class oz{constructor(n,l){this.start=n,this.content=l,this.marks=[],this.parsers=[]}}class cz{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let n=this.skipSpace(this.basePos);this.indent=this.countIndent(n,this.pos,this.indent),this.pos=n,this.next=n==this.text.length?-1:this.text.charCodeAt(n)}skipSpace(n){return ki(this.text,n)}reset(n){for(this.text=n,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(n){this.basePos=n,this.baseIndent=this.countIndent(n,this.pos,this.indent)}moveBaseColumn(n){this.baseIndent=n,this.basePos=this.findColumn(n)}addMarker(n){this.markers.push(n)}countIndent(n,l=0,r=0){for(let o=l;o<n;o++)r+=this.text.charCodeAt(o)==9?4-r%4:1;return r}findColumn(n){let l=0;for(let r=0;l<this.text.length&&r<n;l++)r+=this.text.charCodeAt(l)==9?4-r%4:1;return l}scrub(){if(!this.baseIndent)return this.text;let n="";for(let l=0;l<this.basePos;l++)n+=" ";return n+this.text.slice(this.basePos)}}function m0(e,n,l){if(l.pos==l.text.length||e!=n.block&&l.indent>=n.stack[l.depth+1].value+l.baseIndent)return!0;if(l.indent>=l.baseIndent+4)return!1;let r=(e.type==ce.OrderedList?Fh:Hh)(l,n,!1);return r>0&&(e.type!=ce.BulletList||Ih(l,n,!1)<0)&&l.text.charCodeAt(l.pos+r-1)==e.value}const Cy={[ce.Blockquote](e,n,l){return l.next!=62?!1:(l.markers.push(Me(ce.QuoteMark,n.lineStart+l.pos,n.lineStart+l.pos+1)),l.moveBase(l.pos+(Qn(l.text.charCodeAt(l.pos+1))?2:1)),e.end=n.lineStart+l.text.length,!0)},[ce.ListItem](e,n,l){return l.indent<l.baseIndent+e.value&&l.next>-1?!1:(l.moveBaseColumn(l.baseIndent+e.value),!0)},[ce.OrderedList]:m0,[ce.BulletList]:m0,[ce.Document](){return!0}};function Qn(e){return e==32||e==9||e==10||e==13}function ki(e,n=0){for(;n<e.length&&Qn(e.charCodeAt(n));)n++;return n}function x0(e,n,l){for(;n>l&&Qn(e.charCodeAt(n-1));)n--;return n}function zy(e){if(e.next!=96&&e.next!=126)return-1;let n=e.pos+1;for(;n<e.text.length&&e.text.charCodeAt(n)==e.next;)n++;if(n<e.pos+3)return-1;if(e.next==96){for(let l=n;l<e.text.length;l++)if(e.text.charCodeAt(l)==96)return-1}return n}function Ry(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function Ih(e,n,l){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let o=e.pos+1;o<e.text.length;o++){let d=e.text.charCodeAt(o);if(d==e.next)r++;else if(!Qn(d))return-1}return l&&e.next==45&&Xy(e)>-1&&e.depth==n.stack.length&&n.parser.leafBlockParsers.indexOf(My.SetextHeading)>-1||r<3?-1:1}function Ay(e,n){for(let l=e.stack.length-1;l>=0;l--)if(e.stack[l].type==n)return!0;return!1}function Hh(e,n,l){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||Qn(e.text.charCodeAt(e.pos+1)))&&(!l||Ay(n,ce.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function Fh(e,n,l){let r=e.pos,o=e.next;for(;o>=48&&o<=57;){r++;if(r==e.text.length)return-1;o=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||o!=46&&o!=41||r<e.text.length-1&&!Qn(e.text.charCodeAt(r+1))||l&&!Ay(n,ce.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function _y(e){if(e.next!=35)return-1;let n=e.pos+1;for(;n<e.text.length&&e.text.charCodeAt(n)==35;)n++;if(n<e.text.length&&e.text.charCodeAt(n)!=32)return-1;let l=n-e.pos;return l>6?-1:l}function Xy(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let n=e.pos+1;for(;n<e.text.length&&e.text.charCodeAt(n)==e.next;)n++;let l=n;for(;n<e.text.length&&Qn(e.text.charCodeAt(n));)n++;return n==e.text.length?l:-1}const th=/^[ \t]*$/,Zy=/-->/,Ey=/\?>/,nh=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Zy],[/^\s*<\?/,Ey],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,th],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,th]];function qy(e,n,l){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let o=0,d=nh.length-(l?1:0);o<d;o++)if(nh[o][0].test(r))return o;return-1}function p0(e,n){let l=e.countIndent(n,e.pos,e.indent),r=e.countIndent(e.skipSpace(n),n,l);return r>=l+5?l+1:r}function da(e,n,l){let r=e.length-1;r>=0&&e[r].to==n&&e[r].type==ce.CodeText?e[r].to=l:e.push(Me(ce.CodeText,n,l))}const vc={LinkReference:void 0,IndentedCode(e,n){let l=n.baseIndent+4;if(n.indent<l)return!1;let r=n.findColumn(l),o=e.lineStart+r,d=e.lineStart+n.text.length,u=[],f=[];for(da(u,o,d);e.nextLine()&&n.depth>=e.stack.length;)if(n.pos==n.text.length){da(f,e.lineStart-1,e.lineStart);for(let h of n.markers)f.push(h)}else{if(n.indent<l)break;{if(f.length){for(let x of f)x.type==ce.CodeText?da(u,x.from,x.to):u.push(x);f=[]}da(u,e.lineStart-1,e.lineStart);for(let x of n.markers)u.push(x);d=e.lineStart+n.text.length;let h=e.lineStart+n.findColumn(n.baseIndent+4);h<d&&da(u,h,d)}}return f.length&&(f=f.filter(h=>h.type!=ce.CodeText),f.length&&(n.markers=f.concat(n.markers))),e.addNode(e.buffer.writeElements(u,-o).finish(ce.CodeBlock,d-o),o),!0},FencedCode(e,n){let l=zy(n);if(l<0)return!1;let r=e.lineStart+n.pos,o=n.next,d=l-n.pos,u=n.skipSpace(l),f=x0(n.text,n.text.length,u),h=[Me(ce.CodeMark,r,r+d)];u<f&&h.push(Me(ce.CodeInfo,e.lineStart+u,e.lineStart+f));for(let x=!0,g=!0,p=!1;e.nextLine()&&n.depth>=e.stack.length;x=!1){let b=n.pos;if(n.indent-n.baseIndent<4)for(;b<n.text.length&&n.text.charCodeAt(b)==o;)b++;if(b-n.pos>=d&&n.skipSpace(b)==n.text.length){for(let y of n.markers)h.push(y);g&&p&&da(h,e.lineStart-1,e.lineStart),h.push(Me(ce.CodeMark,e.lineStart+n.pos,e.lineStart+b)),e.nextLine();break}else{p=!0,x||(da(h,e.lineStart-1,e.lineStart),g=!1);for(let w of n.markers)h.push(w);let y=e.lineStart+n.basePos,j=e.lineStart+n.text.length;y<j&&(da(h,y,j),g=!1)}}return e.addNode(e.buffer.writeElements(h,-r).finish(ce.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,n){let l=Ry(n);return l<0?!1:(e.startContext(ce.Blockquote,n.pos),e.addNode(ce.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1),n.moveBase(n.pos+l),null)},HorizontalRule(e,n){if(Ih(n,e,!1)<0)return!1;let l=e.lineStart+n.pos;return e.nextLine(),e.addNode(ce.HorizontalRule,l),!0},BulletList(e,n){let l=Hh(n,e,!1);if(l<0)return!1;e.block.type!=ce.BulletList&&e.startContext(ce.BulletList,n.basePos,n.next);let r=p0(n,n.pos+1);return e.startContext(ce.ListItem,n.basePos,r-n.baseIndent),e.addNode(ce.ListMark,e.lineStart+n.pos,e.lineStart+n.pos+l),n.moveBaseColumn(r),null},OrderedList(e,n){let l=Fh(n,e,!1);if(l<0)return!1;e.block.type!=ce.OrderedList&&e.startContext(ce.OrderedList,n.basePos,n.text.charCodeAt(n.pos+l-1));let r=p0(n,n.pos+l);return e.startContext(ce.ListItem,n.basePos,r-n.baseIndent),e.addNode(ce.ListMark,e.lineStart+n.pos,e.lineStart+n.pos+l),n.moveBaseColumn(r),null},ATXHeading(e,n){let l=_y(n);if(l<0)return!1;let r=n.pos,o=e.lineStart+r,d=x0(n.text,n.text.length,r),u=d;for(;u>r&&n.text.charCodeAt(u-1)==n.next;)u--;(u==d||u==r||!Qn(n.text.charCodeAt(u-1)))&&(u=n.text.length);let f=e.buffer.write(ce.HeaderMark,0,l).writeElements(e.parser.parseInline(n.text.slice(r+l+1,u),o+l+1),-o);u<n.text.length&&f.write(ce.HeaderMark,u-r,d-r);let h=f.finish(ce.ATXHeading1-1+l,n.text.length-r);return e.nextLine(),e.addNode(h,o),!0},HTMLBlock(e,n){let l=qy(n,e,!1);if(l<0)return!1;let r=e.lineStart+n.pos,o=nh[l][1],d=[],u=o!=th;for(;!o.test(n.text)&&e.nextLine();){if(n.depth<e.stack.length){u=!1;break}for(let x of n.markers)d.push(x)}u&&e.nextLine();let f=o==Zy?ce.CommentBlock:o==Ey?ce.ProcessingInstructionBlock:ce.HTMLBlock,h=e.prevLineEnd();return e.addNode(e.buffer.writeElements(d,-r).finish(f,h-r),r),!0},SetextHeading:void 0};class dz{constructor(n){this.stage=0,this.elts=[],this.pos=0,this.start=n.start,this.advance(n.content)}nextLine(n,l,r){if(this.stage==-1)return!1;let o=r.content+`
622
+ `+l.scrub(),d=this.advance(o);return d>-1&&d<o.length?this.complete(n,r,d):!1}finish(n,l){return(this.stage==2||this.stage==3)&&ki(l.content,this.pos)==l.content.length?this.complete(n,l,l.content.length):!1}complete(n,l,r){return n.addLeafElement(l,Me(ce.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(n){return n?(this.pos=n.to-this.start,this.elts.push(n),this.stage++,!0):(n===!1&&(this.stage=-1),!1)}advance(n){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Iy(n,this.pos,this.start,!0)))return-1;if(n.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Me(ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Wy(n,ki(n,this.pos),this.start)))return-1}else if(this.stage==2){let l=ki(n,this.pos),r=0;if(l>this.pos){let o=By(n,l,this.start);if(o){let d=mO(n,o.to-this.start);d>0&&(this.nextStage(o),r=d)}}return r||(r=mO(n,this.pos)),r>0&&r<n.length?r:-1}else return mO(n,this.pos)}}}function mO(e,n){for(;n<e.length;n++){let l=e.charCodeAt(n);if(l==10)break;if(!Qn(l))return-1}return n}class uz{nextLine(n,l,r){let o=l.depth<n.stack.length?-1:Xy(l),d=l.next;if(o<0)return!1;let u=Me(ce.HeaderMark,n.lineStart+l.pos,n.lineStart+o);return n.nextLine(),n.addLeafElement(r,Me(d==61?ce.SetextHeading1:ce.SetextHeading2,r.start,n.prevLineEnd(),[...n.parser.parseInline(r.content,r.start),u])),!0}finish(){return!1}}const My={LinkReference(e,n){return n.content.charCodeAt(0)==91?new dz(n):null},SetextHeading(){return new uz}},fz=[(e,n)=>_y(n)>=0,(e,n)=>zy(n)>=0,(e,n)=>Ry(n)>=0,(e,n)=>Hh(n,e,!0)>=0,(e,n)=>Fh(n,e,!0)>=0,(e,n)=>Ih(n,e,!0)>=0,(e,n)=>qy(n,e,!0)>=0],Oz={text:"",end:0};class hz{constructor(n,l,r,o){this.parser=n,this.input=l,this.ranges=o,this.line=new cz,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=o[o.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=o[0].from,this.block=ld.create(ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new pz(r,l):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:n}=this;for(;;){for(let r=0;;){let o=n.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<n.markers.length&&(!o||n.markers[r].from<o.end);){let d=n.markers[r++];this.addNode(d.type,d.from,d.to)}if(!o)break;this.finishContext()}if(n.pos<n.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(n.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let o=r(this,n);if(o!=!1){if(o==!0)return null;n.forward();continue e}}break}let l=new oz(this.lineStart+n.pos,n.text.slice(n.pos));for(let r of this.parser.leafBlockParsers)if(r){let o=r(this,l);o&&l.parsers.push(o)}e:for(;this.nextLine()&&n.pos!=n.text.length;){if(n.indent<n.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,n,l))break e}for(let r of l.parsers)if(r.nextLine(this,n,l))return null;l.content+=`
623
+ `+n.scrub();for(let r of n.markers)l.marks.push(r)}return this.finishLeaf(l),null}stopAt(n){if(this.stoppedAt!=null&&this.stoppedAt<n)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=n}reuseFragment(n){if(!this.fragments.moveTo(this.absoluteLineStart+n,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let l=this.fragments.takeNodes(this);return l?(this.absoluteLineStart+=l,this.lineStart=Hy(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(n=this.depth-1){return this.parser.nodeSet.types[this.stack[n].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(n){let l=Oz;if(l.end=n,n>=this.to)l.text="";else if(l.text=this.lineChunkAt(n),l.end+=l.text.length,this.ranges.length>1){let r=this.absoluteLineStart,o=this.rangeI;for(;this.ranges[o].to<l.end;){o++;let d=this.ranges[o].from,u=this.lineChunkAt(d);l.end=d+u.length,l.text=l.text.slice(0,this.ranges[o-1].to-r)+u,r=l.end-l.text.length}}return l}readLine(){let{line:n}=this,{text:l,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,n.reset(l);n.depth<this.stack.length;n.depth++){let o=this.stack[n.depth],d=this.parser.skipContextMarkup[o.type];if(!d)throw new Error("Unhandled block context "+ce[o.type]);let u=this.line.markers.length;if(!d(o,this,n)){this.line.markers.length>u&&(o.end=this.line.markers[this.line.markers.length-1].to),n.forward();break}n.forward()}}lineChunkAt(n){let l=this.input.chunk(n),r;if(this.input.lineChunks)r=l==`
624
+ `?"":l;else{let o=l.indexOf(`
625
+ `);r=o<0?l:l.slice(0,o)}return n+r.length>this.to?r.slice(0,this.to-n):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(n,l,r=0){this.block=ld.create(n,r,this.lineStart+l,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(n,l,r=0){this.startContext(this.parser.getNodeType(n),l,r)}addNode(n,l,r){typeof n=="number"&&(n=new zn(this.parser.nodeSet.types[n],yr,yr,(r??this.prevLineEnd())-l)),this.block.addChild(n,l-this.block.from)}addElement(n){this.block.addChild(n.toTree(this.parser.nodeSet),n.from-this.block.from)}addLeafElement(n,l){this.addNode(this.buffer.writeElements(ah(l.children,n.marks),-l.from).finish(l.type,l.to-l.from),l.from)}finishContext(){let n=this.stack.pop(),l=this.stack[this.stack.length-1];l.addChild(n.toTree(this.parser.nodeSet),n.from-l.from),this.block=l}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(n){return this.ranges.length>1?Yy(this.ranges,0,n.topNode,this.ranges[0].from,this.reusePlaceholders):n}finishLeaf(n){for(let r of n.parsers)if(r.finish(this,n))return;let l=ah(this.parser.parseInline(n.content,n.start),n.marks);this.addNode(this.buffer.writeElements(l,-n.start).finish(ce.Paragraph,n.content.length),n.start)}elt(n,l,r,o){return typeof n=="string"?Me(this.parser.getNodeType(n),l,r,o):new Gy(n,l)}get buffer(){return new Vy(this.parser.nodeSet)}}function Yy(e,n,l,r,o){let d=e[n].to,u=[],f=[],h=l.from+r;function x(g,p){for(;p?g>=d:g>d;){let b=e[n+1].from-d;r+=b,g+=b,n++,d=e[n].to}}for(let g=l.firstChild;g;g=g.nextSibling){x(g.from+r,!0);let p=g.from+r,b,y=o.get(g.tree);y?b=y:g.to+r>d?(b=Yy(e,n,g,r,o),x(g.to+r,!1)):b=g.toTree(),u.push(b),f.push(p-h)}return x(l.to+r,!1),new zn(l.type,u,f,l.to+r-h,l.tree?l.tree.propValues:void 0)}class Nd extends cb{constructor(n,l,r,o,d,u,f,h,x){super(),this.nodeSet=n,this.blockParsers=l,this.leafBlockParsers=r,this.blockNames=o,this.endLeafBlock=d,this.skipContextMarkup=u,this.inlineParsers=f,this.inlineNames=h,this.wrappers=x,this.nodeTypes=Object.create(null);for(let g of n.types)this.nodeTypes[g.name]=g.id}createParse(n,l,r){let o=new hz(this,n,l,r);for(let d of this.wrappers)o=d(o,n,l,r);return o}configure(n){let l=sh(n);if(!l)return this;let{nodeSet:r,skipContextMarkup:o}=this,d=this.blockParsers.slice(),u=this.leafBlockParsers.slice(),f=this.blockNames.slice(),h=this.inlineParsers.slice(),x=this.inlineNames.slice(),g=this.endLeafBlock.slice(),p=this.wrappers;if(Qi(l.defineNodes)){o=Object.assign({},o);let b=r.types.slice(),y;for(let j of l.defineNodes){let{name:w,block:k,composite:Q,style:C}=typeof j=="string"?{name:j}:j;if(b.some(Y=>Y.name==w))continue;Q&&(o[b.length]=(Y,X,z)=>Q(X,z,Y.value));let P=b.length,R=Q?["Block","BlockContext"]:k?P>=ce.ATXHeading1&&P<=ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;b.push(Mi.define({id:P,name:w,props:R&&[[Ns.group,R]]})),C&&(y||(y={}),Array.isArray(C)||C instanceof rw?y[w]=C:Object.assign(y,C))}r=new uh(b),y&&(r=r.extend(fl(y)))}if(Qi(l.props)&&(r=r.extend(...l.props)),Qi(l.remove))for(let b of l.remove){let y=this.blockNames.indexOf(b),j=this.inlineNames.indexOf(b);y>-1&&(d[y]=u[y]=void 0),j>-1&&(h[j]=void 0)}if(Qi(l.parseBlock))for(let b of l.parseBlock){let y=f.indexOf(b.name);if(y>-1)d[y]=b.parse,u[y]=b.leaf;else{let j=b.before?yc(f,b.before):b.after?yc(f,b.after)+1:f.length-1;d.splice(j,0,b.parse),u.splice(j,0,b.leaf),f.splice(j,0,b.name)}b.endLeaf&&g.push(b.endLeaf)}if(Qi(l.parseInline))for(let b of l.parseInline){let y=x.indexOf(b.name);if(y>-1)h[y]=b.parse;else{let j=b.before?yc(x,b.before):b.after?yc(x,b.after)+1:x.length-1;h.splice(j,0,b.parse),x.splice(j,0,b.name)}}return l.wrap&&(p=p.concat(l.wrap)),new Nd(r,d,u,f,g,o,h,x,p)}getNodeType(n){let l=this.nodeTypes[n];if(l==null)throw new RangeError(`Unknown node type '${n}'`);return l}parseInline(n,l){let r=new Kh(this,n,l);e:for(let o=l;o<r.end;){let d=r.char(o);for(let u of this.inlineParsers)if(u){let f=u(r,d,o);if(f>=0){o=f;continue e}}o++}return r.resolveMarkers(0)}}function Qi(e){return e!=null&&e.length>0}function sh(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let n=sh(e[0]);if(e.length==1)return n;let l=sh(e.slice(1));if(!l||!n)return n||l;let r=(u,f)=>(u||yr).concat(f||yr),o=n.wrap,d=l.wrap;return{props:r(n.props,l.props),defineNodes:r(n.defineNodes,l.defineNodes),parseBlock:r(n.parseBlock,l.parseBlock),parseInline:r(n.parseInline,l.parseInline),remove:r(n.remove,l.remove),wrap:o?d?(u,f,h,x)=>o(d(u,f,h,x),f,h,x):o:d}}function yc(e,n){let l=e.indexOf(n);if(l<0)throw new RangeError(`Position specified relative to unknown parser ${n}`);return l}let Uy=[Mi.none];for(let e=1,n;n=ce[e];e++)Uy[e]=Mi.define({id:e,name:n,props:e>=ce.Escape?[]:[[Ns.group,e in Cy?["Block","BlockContext"]:["Block","LeafBlock"]]],top:n=="Document"});const yr=[];class Vy{constructor(n){this.nodeSet=n,this.content=[],this.nodes=[]}write(n,l,r,o=0){return this.content.push(n,l,r,4+o*4),this}writeElements(n,l=0){for(let r of n)r.writeTo(this,l);return this}finish(n,l){return zn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:n,length:l})}}let _i=class{constructor(n,l,r,o=yr){this.type=n,this.from=l,this.to=r,this.children=o}writeTo(n,l){let r=n.content.length;n.writeElements(this.children,l),n.content.push(this.type,this.from+l,this.to+l,n.content.length+4-r)}toTree(n){return new Vy(n).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class Gy{constructor(n,l){this.tree=n,this.from=l}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return yr}writeTo(n,l){n.nodes.push(this.tree),n.content.push(n.nodes.length-1,this.from+l,this.to+l,-1)}toTree(){return this.tree}}function Me(e,n,l,r){return new _i(e,n,l,r)}const Dy={resolve:"Emphasis",mark:"EmphasisMark"},Ly={resolve:"Emphasis",mark:"EmphasisMark"},Ja={},rd={};class an{constructor(n,l,r,o){this.type=n,this.from=l,this.to=r,this.side=o}}const g0="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Xi=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Xi=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const xO={Escape(e,n,l){if(n!=92||l==e.end-1)return-1;let r=e.char(l+1);for(let o=0;o<g0.length;o++)if(g0.charCodeAt(o)==r)return e.append(Me(ce.Escape,l,l+2));return-1},Entity(e,n,l){if(n!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(l+1,l+31));return r?e.append(Me(ce.Entity,l,l+1+r[0].length)):-1},InlineCode(e,n,l){if(n!=96||l&&e.char(l-1)==96)return-1;let r=l+1;for(;r<e.end&&e.char(r)==96;)r++;let o=r-l,d=0;for(;r<e.end;r++)if(e.char(r)==96){if(d++,d==o&&e.char(r+1)!=96)return e.append(Me(ce.InlineCode,l,r+1,[Me(ce.CodeMark,l,l+o),Me(ce.CodeMark,r+1-o,r+1)]))}else d=0;return-1},HTMLTag(e,n,l){if(n!=60||l==e.end-1)return-1;let r=e.slice(l+1,e.end),o=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(o)return e.append(Me(ce.Autolink,l,l+1+o[0].length,[Me(ce.LinkMark,l,l+1),Me(ce.URL,l+1,l+o[0].length),Me(ce.LinkMark,l+o[0].length,l+1+o[0].length)]));let d=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(d)return e.append(Me(ce.Comment,l,l+1+d[0].length));let u=/^\?[^]*?\?>/.exec(r);if(u)return e.append(Me(ce.ProcessingInstruction,l,l+1+u[0].length));let f=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return f?e.append(Me(ce.HTMLTag,l,l+1+f[0].length)):-1},Emphasis(e,n,l){if(n!=95&&n!=42)return-1;let r=l+1;for(;e.char(r)==n;)r++;let o=e.slice(l-1,l),d=e.slice(r,r+1),u=Xi.test(o),f=Xi.test(d),h=/\s|^$/.test(o),x=/\s|^$/.test(d),g=!x&&(!f||h||u),p=!h&&(!u||x||f),b=g&&(n==42||!p||u),y=p&&(n==42||!g||f);return e.append(new an(n==95?Dy:Ly,l,r,(b?1:0)|(y?2:0)))},HardBreak(e,n,l){if(n==92&&e.char(l+1)==10)return e.append(Me(ce.HardBreak,l,l+2));if(n==32){let r=l+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=l+2)return e.append(Me(ce.HardBreak,l,r+1))}return-1},Link(e,n,l){return n==91?e.append(new an(Ja,l,l+1,1)):-1},Image(e,n,l){return n==33&&e.char(l+1)==91?e.append(new an(rd,l,l+2,1)):-1},LinkEnd(e,n,l){if(n!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let o=e.parts[r];if(o instanceof an&&(o.type==Ja||o.type==rd)){if(!o.side||e.skipSpace(o.to)==l&&!/[(\[]/.test(e.slice(l+1,l+2)))return e.parts[r]=null,-1;let d=e.takeContent(r),u=e.parts[r]=mz(e,d,o.type==Ja?ce.Link:ce.Image,o.from,l+1);if(o.type==Ja)for(let f=0;f<r;f++){let h=e.parts[f];h instanceof an&&h.type==Ja&&(h.side=0)}return u.to}}return-1}};function mz(e,n,l,r,o){let{text:d}=e,u=e.char(o),f=o;if(n.unshift(Me(ce.LinkMark,r,r+(l==ce.Image?2:1))),n.push(Me(ce.LinkMark,o-1,o)),u==40){let h=e.skipSpace(o+1),x=Wy(d,h-e.offset,e.offset),g;x&&(h=e.skipSpace(x.to),h!=x.to&&(g=By(d,h-e.offset,e.offset),g&&(h=e.skipSpace(g.to)))),e.char(h)==41&&(n.push(Me(ce.LinkMark,o,o+1)),f=h+1,x&&n.push(x),g&&n.push(g),n.push(Me(ce.LinkMark,h,f)))}else if(u==91){let h=Iy(d,o-e.offset,e.offset,!1);h&&(n.push(h),f=h.to)}return Me(l,r,f,n)}function Wy(e,n,l){if(e.charCodeAt(n)==60){for(let o=n+1;o<e.length;o++){let d=e.charCodeAt(o);if(d==62)return Me(ce.URL,n+l,o+1+l);if(d==60||d==10)return!1}return null}else{let o=0,d=n;for(let u=!1;d<e.length;d++){let f=e.charCodeAt(d);if(Qn(f))break;if(u)u=!1;else if(f==40)o++;else if(f==41){if(!o)break;o--}else f==92&&(u=!0)}return d>n?Me(ce.URL,n+l,d+l):d==e.length?null:!1}}function By(e,n,l){let r=e.charCodeAt(n);if(r!=39&&r!=34&&r!=40)return!1;let o=r==40?41:r;for(let d=n+1,u=!1;d<e.length;d++){let f=e.charCodeAt(d);if(u)u=!1;else{if(f==o)return Me(ce.LinkTitle,n+l,d+1+l);f==92&&(u=!0)}}return null}function Iy(e,n,l,r){for(let o=!1,d=n+1,u=Math.min(e.length,d+999);d<u;d++){let f=e.charCodeAt(d);if(o)o=!1;else{if(f==93)return r?!1:Me(ce.LinkLabel,n+l,d+1+l);if(r&&!Qn(f)&&(r=!1),f==91)return!1;f==92&&(o=!0)}}return null}class Kh{constructor(n,l,r){this.parser=n,this.text=l,this.offset=r,this.parts=[]}char(n){return n>=this.end?-1:this.text.charCodeAt(n-this.offset)}get end(){return this.offset+this.text.length}slice(n,l){return this.text.slice(n-this.offset,l-this.offset)}append(n){return this.parts.push(n),n.to}addDelimiter(n,l,r,o,d){return this.append(new an(n,l,r,(o?1:0)|(d?2:0)))}get hasOpenLink(){for(let n=this.parts.length-1;n>=0;n--){let l=this.parts[n];if(l instanceof an&&(l.type==Ja||l.type==rd))return!0}return!1}addElement(n){return this.append(n)}resolveMarkers(n){for(let r=n;r<this.parts.length;r++){let o=this.parts[r];if(!(o instanceof an&&o.type.resolve&&o.side&2))continue;let d=o.type==Dy||o.type==Ly,u=o.to-o.from,f,h=r-1;for(;h>=n;h--){let w=this.parts[h];if(w instanceof an&&w.side&1&&w.type==o.type&&!(d&&(o.side&1||w.side&2)&&(w.to-w.from+u)%3==0&&((w.to-w.from)%3||u%3))){f=w;break}}if(!f)continue;let x=o.type.resolve,g=[],p=f.from,b=o.to;if(d){let w=Math.min(2,f.to-f.from,u);p=f.to-w,b=o.from+w,x=w==1?"Emphasis":"StrongEmphasis"}f.type.mark&&g.push(this.elt(f.type.mark,p,f.to));for(let w=h+1;w<r;w++)this.parts[w]instanceof _i&&g.push(this.parts[w]),this.parts[w]=null;o.type.mark&&g.push(this.elt(o.type.mark,o.from,b));let y=this.elt(x,p,b,g);this.parts[h]=d&&f.from!=p?new an(f.type,f.from,p,f.side):null,(this.parts[r]=d&&o.to!=b?new an(o.type,b,o.to,o.side):null)?this.parts.splice(r,0,y):this.parts[r]=y}let l=[];for(let r=n;r<this.parts.length;r++){let o=this.parts[r];o instanceof _i&&l.push(o)}return l}findOpeningDelimiter(n){for(let l=this.parts.length-1;l>=0;l--){let r=this.parts[l];if(r instanceof an&&r.type==n&&r.side&1)return l}return null}takeContent(n){let l=this.resolveMarkers(n);return this.parts.length=n,l}getDelimiterAt(n){let l=this.parts[n];return l instanceof an?l:null}skipSpace(n){return ki(this.text,n-this.offset)+this.offset}elt(n,l,r,o){return typeof n=="string"?Me(this.parser.getNodeType(n),l,r,o):new Gy(n,l)}}Kh.linkStart=Ja;Kh.imageStart=rd;function ah(e,n){if(!n.length)return e;if(!e.length)return n;let l=e.slice(),r=0;for(let o of n){for(;r<l.length&&l[r].to<o.to;)r++;if(r<l.length&&l[r].from<o.from){let d=l[r];d instanceof _i&&(l[r]=new _i(d.type,d.from,d.to,ah(d.children,[o])))}else l.splice(r++,0,o)}return l}const xz=[ce.CodeBlock,ce.ListItem,ce.OrderedList,ce.BulletList];class pz{constructor(n,l){this.fragments=n,this.input=l,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,n.length&&(this.fragment=n[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(n,l){for(;this.fragment&&this.fragment.to<=n;)this.nextFragment();if(!this.fragment||this.fragment.from>(n?n-1:0))return!1;if(this.fragmentEnd<0){let d=this.fragment.to;for(;d>0&&this.input.read(d-1,d)!=`
626
+ `;)d--;this.fragmentEnd=d?d-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let o=n+this.fragment.offset;for(;r.to<=o;)if(!r.parent())return!1;for(;;){if(r.from>=o)return this.fragment.from<=l;if(!r.childAfter(o))return!1}}matches(n){let l=this.cursor.tree;return l&&l.prop(Ns.contextHash)==n}takeNodes(n){let l=this.cursor,r=this.fragment.offset,o=this.fragmentEnd-(this.fragment.openEnd?1:0),d=n.absoluteLineStart,u=d,f=n.block.children.length,h=u,x=f;for(;;){if(l.to-r>o){if(l.type.isAnonymous&&l.firstChild())continue;break}let g=Hy(l.from-r,n.ranges);if(l.to-r<=n.ranges[n.rangeI].to)n.addNode(l.tree,g);else{let p=new zn(n.parser.nodeSet.types[ce.Paragraph],[],[],0,n.block.hashProp);n.reusePlaceholders.set(p,l.tree),n.addNode(p,g)}if(l.type.is("Block")&&(xz.indexOf(l.type.id)<0?(u=l.to-r,f=n.block.children.length):(u=h,f=x),h=l.to-r,x=n.block.children.length),!l.nextSibling())break}for(;n.block.children.length>f;)n.block.children.pop(),n.block.positions.pop();return u-d}}function Hy(e,n){let l=e;for(let r=1;r<n.length;r++){let o=n[r-1].to,d=n[r].from;o<e&&(l-=d-o)}return l}const gz=fl({"Blockquote/...":q.quote,HorizontalRule:q.contentSeparator,"ATXHeading1/... SetextHeading1/...":q.heading1,"ATXHeading2/... SetextHeading2/...":q.heading2,"ATXHeading3/...":q.heading3,"ATXHeading4/...":q.heading4,"ATXHeading5/...":q.heading5,"ATXHeading6/...":q.heading6,"Comment CommentBlock":q.comment,Escape:q.escape,Entity:q.character,"Emphasis/...":q.emphasis,"StrongEmphasis/...":q.strong,"Link/... Image/...":q.link,"OrderedList/... BulletList/...":q.list,"BlockQuote/...":q.quote,"InlineCode CodeText":q.monospace,"URL Autolink":q.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":q.processingInstruction,"CodeInfo LinkLabel":q.labelName,LinkTitle:q.string,Paragraph:q.content}),bz=new Nd(new uh(Uy).extend(gz),Object.keys(vc).map(e=>vc[e]),Object.keys(vc).map(e=>My[e]),Object.keys(vc),fz,Cy,Object.keys(xO).map(e=>xO[e]),Object.keys(xO),[]);function vz(e,n,l){let r=[];for(let o=e.firstChild,d=n;;o=o.nextSibling){let u=o?o.from:l;if(u>d&&r.push({from:d,to:u}),!o)break;d=o.to}return r}function yz(e){let{codeParser:n,htmlParser:l}=e;return{wrap:hb((o,d)=>{let u=o.type.id;if(n&&(u==ce.CodeBlock||u==ce.FencedCode)){let f="";if(u==ce.FencedCode){let x=o.node.getChild(ce.CodeInfo);x&&(f=d.read(x.from,x.to))}let h=n(f);if(h)return{parser:h,overlay:x=>x.type.id==ce.CodeText,bracketed:u==ce.FencedCode}}else if(l&&(u==ce.HTMLBlock||u==ce.HTMLTag||u==ce.CommentBlock))return{parser:l,overlay:vz(o.node,o.from,o.to)};return null})}}const Sz={resolve:"Strikethrough",mark:"StrikethroughMark"},jz={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":q.strikethrough}},{name:"StrikethroughMark",style:q.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,n,l){if(n!=126||e.char(l+1)!=126||e.char(l+2)==126)return-1;let r=e.slice(l-1,l),o=e.slice(l+2,l+3),d=/\s|^$/.test(r),u=/\s|^$/.test(o),f=Xi.test(r),h=Xi.test(o);return e.addDelimiter(Sz,l,l+2,!u&&(!h||d||f),!d&&(!f||u||h))},after:"Emphasis"}]};function Ni(e,n,l=0,r,o=0){let d=0,u=!0,f=-1,h=-1,x=!1,g=()=>{r.push(e.elt("TableCell",o+f,o+h,e.parser.parseInline(n.slice(f,h),o+f)))};for(let p=l;p<n.length;p++){let b=n.charCodeAt(p);b==124&&!x?((!u||f>-1)&&d++,u=!1,r&&(f>-1&&g(),r.push(e.elt("TableDelimiter",p+o,p+o+1))),f=h=-1):(x||b!=32&&b!=9)&&(f<0&&(f=p),h=p+1),x=!x&&b==92}return f>-1&&(d++,r&&g()),d}function b0(e,n){for(let l=n;l<e.length;l++){let r=e.charCodeAt(l);if(r==124)return!0;r==92&&l++}return!1}const Fy=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class v0{constructor(){this.rows=null}nextLine(n,l,r){if(this.rows==null){this.rows=!1;let o;if((l.next==45||l.next==58||l.next==124)&&Fy.test(o=l.text.slice(l.pos))){let d=[];Ni(n,r.content,0,d,r.start)==Ni(n,o,l.pos)&&(this.rows=[n.elt("TableHeader",r.start,r.start+r.content.length,d),n.elt("TableDelimiter",n.lineStart+l.pos,n.lineStart+l.text.length)])}}else if(this.rows){let o=[];Ni(n,l.text,l.pos,o,n.lineStart),this.rows.push(n.elt("TableRow",n.lineStart+l.pos,n.lineStart+l.text.length,o))}return!1}finish(n,l){return this.rows?(n.addLeafElement(l,n.elt("Table",l.start,l.start+l.content.length,this.rows)),!0):!1}}const Qz={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":q.heading}},"TableRow",{name:"TableCell",style:q.content},{name:"TableDelimiter",style:q.processingInstruction}],parseBlock:[{name:"Table",leaf(e,n){return b0(n.content,0)?new v0:null},endLeaf(e,n,l){if(l.parsers.some(o=>o instanceof v0)||!b0(n.text,n.basePos))return!1;let r=e.peekLine();return Fy.test(r)&&Ni(e,n.text,n.basePos)==Ni(e,r,n.basePos)},before:"SetextHeading"}]};class wz{nextLine(){return!1}finish(n,l){return n.addLeafElement(l,n.elt("Task",l.start,l.start+l.content.length,[n.elt("TaskMarker",l.start,l.start+3),...n.parser.parseInline(l.content.slice(3),l.start+3)])),!0}}const kz={defineNodes:[{name:"Task",block:!0,style:q.list},{name:"TaskMarker",style:q.atom}],parseBlock:[{name:"TaskList",leaf(e,n){return/^\[[ xX]\][ \t]/.test(n.content)&&e.parentType().name=="ListItem"?new wz:null},after:"SetextHeading"}]},y0=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,S0=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Nz=/[\w-]+\.[\w-]+($|\/)/,j0=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Q0=/\/[a-zA-Z\d@.]+/gy;function w0(e,n,l,r){let o=0;for(let d=n;d<l;d++)e[d]==r&&o++;return o}function $z(e,n){S0.lastIndex=n;let l=S0.exec(e);if(!l||Nz.exec(l[0])[0].indexOf("_")>-1)return-1;let r=n+l[0].length;for(;;){let o=e[r-1],d;if(/[?!.,:*_~]/.test(o)||o==")"&&w0(e,n,r,")")>w0(e,n,r,"("))r--;else if(o==";"&&(d=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(n,r))))r=n+d.index;else break}return r}function k0(e,n){j0.lastIndex=n;let l=j0.exec(e);if(!l)return-1;let r=l[0][l[0].length-1];return r=="_"||r=="-"?-1:n+l[0].length-(r=="."?1:0)}const Tz={parseInline:[{name:"Autolink",parse(e,n,l){let r=l-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;y0.lastIndex=r;let o=y0.exec(e.text),d=-1;if(!o)return-1;if(o[1]||o[2]){if(d=$z(e.text,r+o[0].length),d>-1&&e.hasOpenLink){let u=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,d));d=r+u[0].length}}else o[3]?d=k0(e.text,r):(d=k0(e.text,r+o[0].length),d>-1&&o[0]=="xmpp:"&&(Q0.lastIndex=d,o=Q0.exec(e.text),o&&(d=o.index+o[0].length)));return d<0?-1:(e.addElement(e.elt("URL",l,d+e.offset)),d+e.offset)}}]},Pz=[Qz,kz,jz,Tz];function Ky(e,n,l){return(r,o,d)=>{if(o!=e||r.char(d+1)==e)return-1;let u=[r.elt(l,d,d+1)];for(let f=d+1;f<r.end;f++){let h=r.char(f);if(h==e)return r.addElement(r.elt(n,d,f+1,u.concat(r.elt(l,f,f+1))));if(h==92&&u.push(r.elt("Escape",f,f+++2)),Qn(h))break}return-1}}const Cz={defineNodes:[{name:"Superscript",style:q.special(q.content)},{name:"SuperscriptMark",style:q.processingInstruction}],parseInline:[{name:"Superscript",parse:Ky(94,"Superscript","SuperscriptMark")}]},zz={defineNodes:[{name:"Subscript",style:q.special(q.content)},{name:"SubscriptMark",style:q.processingInstruction}],parseInline:[{name:"Subscript",parse:Ky(126,"Subscript","SubscriptMark")}]},Rz={defineNodes:[{name:"Emoji",style:q.character}],parseInline:[{name:"Emoji",parse(e,n,l){let r;return n!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(l+1,e.end)))?-1:e.addElement(e.elt("Emoji",l,l+1+r[0].length))}}]},Jy=Ob({commentTokens:{block:{open:"<!--",close:"-->"}}}),e2=new Ns,t2=bz.configure({props:[Ol.add(e=>!e.is("Block")||e.is("Document")||lh(e)!=null||Az(e)?void 0:(n,l)=>({from:l.doc.lineAt(n.from).to,to:n.to})),e2.add(lh),Sr.add({Document:()=>null}),fw.add({Document:Jy})]});function lh(e){let n=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return n?+n[1]:void 0}function Az(e){return e.name=="OrderedList"||e.name=="BulletList"}function _z(e,n){let l=e;for(;;){let r=l.nextSibling,o;if(!r||(o=lh(r.type))!=null&&o<=n)break;l=r}return l.to}const Xz=ow.of((e,n,l)=>{for(let r=_n(e).resolveInner(l,-1);r&&!(r.from<n);r=r.parent){let o=r.type.prop(e2);if(o==null)continue;let d=_z(r,o);if(d>l)return{from:l,to:d}}return null});function Jh(e){return new cw(Jy,e,[],"markdown")}const Zz=Jh(t2),Ez=t2.configure([Pz,zz,Cz,Rz,{props:[Ol.add({Table:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})})]}]),id=Jh(Ez);function qz(e,n){return l=>{if(l&&e){let r=null;if(l=/\S*/.exec(l)[0],typeof e=="function"?r=e(l):r=c1.matchLanguageName(e,l,!0),r instanceof c1)return r.support?r.support.language.parser:Ow.getSkippingParser(r.load());if(r)return r.parser}return n?n.parser:null}}let pO=class{constructor(n,l,r,o,d,u,f){this.node=n,this.from=l,this.to=r,this.spaceBefore=o,this.spaceAfter=d,this.type=u,this.item=f}blank(n,l=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(n!=null){for(;r.length<n;)r+=" ";return r}else{for(let o=this.to-this.from-r.length-this.spaceAfter.length;o>0;o--)r+=" ";return r+(l?this.spaceAfter:"")}}marker(n,l){let r=this.node.name=="OrderedList"?String(+s2(this.item,n)[2]+l):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function n2(e,n){let l=[],r=[];for(let o=e;o;o=o.parent){if(o.name=="FencedCode")return r;(o.name=="ListItem"||o.name=="Blockquote")&&l.push(o)}for(let o=l.length-1;o>=0;o--){let d=l[o],u,f=n.lineAt(d.from),h=d.from-f.from;if(d.name=="Blockquote"&&(u=/^ *>( ?)/.exec(f.text.slice(h))))r.push(new pO(d,h,h+u[0].length,"",u[1],">",null));else if(d.name=="ListItem"&&d.parent.name=="OrderedList"&&(u=/^( *)\d+([.)])( *)/.exec(f.text.slice(h)))){let x=u[3],g=u[0].length;x.length>=4&&(x=x.slice(0,x.length-4),g-=4),r.push(new pO(d.parent,h,h+g,u[1],x,u[2],d))}else if(d.name=="ListItem"&&d.parent.name=="BulletList"&&(u=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(f.text.slice(h)))){let x=u[4],g=u[0].length;x.length>4&&(x=x.slice(0,x.length-4),g-=4);let p=u[2];u[3]&&(p+=u[3].replace(/[xX]/," ")),r.push(new pO(d.parent,h,h+g,u[1],x,p,d))}}return r}function s2(e,n){return/^(\s*)(\d+)(?=[.)])/.exec(n.sliceString(e.from,e.from+10))}function gO(e,n,l,r=0){for(let o=-1,d=e;;){if(d.name=="ListItem"){let f=s2(d,n),h=+f[2];if(o>=0){if(h!=o+1)return;l.push({from:d.from+f[1].length,to:d.from+f[0].length,insert:String(o+2+r)})}o=h}let u=d.nextSibling;if(!u)break;d=u}}function em(e,n){let l=/^[ \t]*/.exec(e)[0].length;if(!l||n.facet(dw)!=" ")return e;let r=$i(e,4,l),o="";for(let d=r;d>0;)d>=4?(o+=" ",d-=4):(o+=" ",d--);return o+e.slice(l)}const Mz=(e={})=>({state:n,dispatch:l})=>{let r=_n(n),{doc:o}=n,d=null,u=n.changeByRange(f=>{if(!f.empty||!id.isActiveAt(n,f.from,-1)&&!id.isActiveAt(n,f.from,1))return d={range:f};let h=f.from,x=o.lineAt(h),g=n2(r.resolveInner(h,-1),o);for(;g.length&&g[g.length-1].from>h-x.from;)g.pop();if(!g.length)return d={range:f};let p=g[g.length-1];if(p.to-p.spaceAfter.length>h-x.from)return d={range:f};let b=h>=p.to-p.spaceAfter.length&&!/\S/.test(x.text.slice(p.to));if(p.item&&b){let Q=p.node.firstChild,C=p.node.getChild("ListItem","ListItem");if(Q.to>=h||C&&C.to<h||x.from>0&&!/[^\s>]/.test(o.lineAt(x.from-1).text)||e.nonTightLists===!1){let P=g.length>1?g[g.length-2]:null,R,Y="";P&&P.item?(R=x.from+P.from,Y=P.marker(o,1)):R=x.from+(P?P.to:0);let X=[{from:R,to:h,insert:Y}];return p.node.name=="OrderedList"&&gO(p.item,o,X,-2),P&&P.node.name=="OrderedList"&&gO(P.item,o,X),{range:xa.cursor(R+Y.length),changes:X}}else{let P=$0(g,n,x);return{range:xa.cursor(h+P.length+1),changes:{from:x.from,insert:P+n.lineBreak}}}}if(p.node.name=="Blockquote"&&b&&x.from){let Q=o.lineAt(x.from-1),C=/>\s*$/.exec(Q.text);if(C&&C.index==p.from){let P=n.changes([{from:Q.from+C.index,to:Q.to},{from:x.from+p.from,to:x.to}]);return{range:f.map(P),changes:P}}}let y=[];p.node.name=="OrderedList"&&gO(p.item,o,y);let j=p.item&&p.item.from<x.from,w="";if(!j||/^[\s\d.)\-+*>]*/.exec(x.text)[0].length>=p.to)for(let Q=0,C=g.length-1;Q<=C;Q++)w+=Q==C&&!j?g[Q].marker(o,1):g[Q].blank(Q<C?$i(x.text,4,g[Q+1].from)-w.length:null);let k=h;for(;k>x.from&&/\s/.test(x.text.charAt(k-x.from-1));)k--;return w=em(w,n),Uz(p.node,n.doc)&&(w=$0(g,n,x)+n.lineBreak+w),y.push({from:k,to:h,insert:n.lineBreak+w}),{range:xa.cursor(k+w.length+1),changes:y}});return d?!1:(l(n.update(u,{scrollIntoView:!0,userEvent:"input"})),!0)},Yz=Mz();function N0(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Uz(e,n){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let l=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let o=n.lineAt(l.to),d=n.lineAt(r.from),u=/^[\s>]*$/.test(o.text);return o.number+(u?0:1)<d.number}function $0(e,n,l){let r="";for(let o=0,d=e.length-2;o<=d;o++)r+=e[o].blank(o<d?$i(l.text,4,e[o+1].from)-r.length:null,o<d);return em(r,n)}function Vz(e,n){let l=e.resolveInner(n,-1),r=n;N0(l)&&(r=l.from,l=l.parent);for(let o;o=l.childBefore(r);)if(N0(o))r=o.from;else if(o.name=="OrderedList"||o.name=="BulletList")l=o.lastChild,r=l.to;else break;return l}const Gz=({state:e,dispatch:n})=>{let l=_n(e),r=null,o=e.changeByRange(d=>{let u=d.from,{doc:f}=e;if(d.empty&&id.isActiveAt(e,d.from)){let h=f.lineAt(u),x=n2(Vz(l,u),f);if(x.length){let g=x[x.length-1],p=g.to-g.spaceAfter.length+(g.spaceAfter?1:0);if(u-h.from>p&&!/\S/.test(h.text.slice(p,u-h.from)))return{range:xa.cursor(h.from+p),changes:{from:h.from+p,to:u}};if(u-h.from==p&&(!g.item||h.from<=g.item.from||!/\S/.test(h.text.slice(0,g.to)))){let b=h.from+g.from;if(g.item&&g.node.from<g.item.from&&/\S/.test(h.text.slice(g.from,g.to))){let y=g.blank($i(h.text,4,g.to)-$i(h.text,4,g.from));return b==h.from&&(y=em(y,e)),{range:xa.cursor(b+y.length),changes:{from:b,to:h.from+g.to,insert:y}}}if(b<u)return{range:xa.cursor(b),changes:{from:b,to:u}}}}}return r={range:d}});return r?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"delete"})),!0)},Dz=[{key:"Enter",run:Yz},{key:"Backspace",run:Gz}],a2=Py({matchClosingTags:!1});function Lz(e={}){let{codeLanguages:n,defaultCodeLanguage:l,addKeymap:r=!0,base:{parser:o}=Zz,completeHTMLTags:d=!0,pasteURLAsLink:u=!0,htmlTagLanguage:f=a2}=e;if(!(o instanceof Nd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let h=e.extensions?[e.extensions]:[],x=[f.support,Xz],g;u&&x.push(Hz),l instanceof al?(x.push(l.support),g=l.language):l&&(g=l);let p=n||g?qz(n,g):void 0;h.push(yz({codeParser:p,htmlParser:f.language.parser})),r&&x.push(iw.high(EO.of(Dz)));let b=Jh(o.configure(h));return d&&x.push(b.data.of({autocomplete:Wz})),new al(b,x)}function Wz(e){let{state:n,pos:l}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(n.sliceDoc(l-25,l));if(!r)return null;let o=_n(n).resolveInner(l,-1);for(;o&&!o.type.isTop;){if(o.name=="CodeBlock"||o.name=="FencedCode"||o.name=="ProcessingInstructionBlock"||o.name=="CommentBlock"||o.name=="Link"||o.name=="Image")return null;o=o.parent}return{from:l-r[0].length,to:l,options:Bz(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let bO=null;function Bz(){if(bO)return bO;let e=ez(new uw(mb.create({extensions:a2}),0,!0));return bO=e?e.options:[]}const Iz=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Hz=Or.domEventHandlers({paste:(e,n)=>{var l;let{main:r}=n.state.selection;if(r.empty)return!1;let o=(l=e.clipboardData)===null||l===void 0?void 0:l.getData("text/plain");if(!o||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(o)||(/^www\./.test(o)&&(o="https://"+o),!id.isActiveAt(n.state,r.from,1)))return!1;let d=_n(n.state),u=!1;return d.iterate({from:r.from,to:r.to,enter:f=>{(f.from>r.from||Iz.test(f.name))&&(u=!0)},leave:f=>{f.to<r.to&&(u=!0)}}),u?!1:(n.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${o})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),Fz=1,l2=194,r2=195,Kz=196,T0=197,Jz=198,eR=199,tR=200,nR=2,i2=3,P0=201,sR=24,aR=25,lR=49,rR=50,iR=55,oR=56,cR=57,dR=59,uR=60,fR=61,OR=62,hR=63,mR=65,xR=238,pR=71,gR=241,bR=242,vR=243,yR=244,SR=245,jR=246,QR=247,wR=248,o2=72,kR=249,NR=250,$R=251,TR=252,PR=253,CR=254,zR=255,RR=256,AR=73,_R=77,XR=263,ZR=112,ER=130,qR=151,MR=152,YR=155,dl=10,Zi=13,tm=32,$d=9,nm=35,UR=40,VR=46,rh=123,C0=125,c2=39,d2=34,z0=92,GR=111,DR=120,LR=78,WR=117,BR=85,IR=new Set([aR,lR,rR,XR,mR,ER,oR,cR,xR,OR,hR,o2,AR,_R,uR,fR,qR,MR,YR,ZR]);function vO(e){return e==dl||e==Zi}function yO(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const HR=new _t((e,n)=>{let l;if(e.next<0)e.acceptToken(eR);else if(n.context.flags&Xc)vO(e.next)&&e.acceptToken(Jz,1);else if(((l=e.peek(-1))<0||vO(l))&&n.canShift(T0)){let r=0;for(;e.next==tm||e.next==$d;)e.advance(),r++;(e.next==dl||e.next==Zi||e.next==nm)&&e.acceptToken(T0,-r)}else vO(e.next)&&e.acceptToken(Kz,1)},{contextual:!0}),FR=new _t((e,n)=>{let l=n.context;if(l.flags)return;let r=e.peek(-1);if(r==dl||r==Zi){let o=0,d=0;for(;;){if(e.next==tm)o++;else if(e.next==$d)o+=8-o%8;else break;e.advance(),d++}o!=l.indent&&e.next!=dl&&e.next!=Zi&&e.next!=nm&&(o<l.indent?e.acceptToken(r2,-d):e.acceptToken(l2))}}),Xc=1,u2=2,ys=4,Ss=8,js=16,Qs=32;function Zc(e,n,l){this.parent=e,this.indent=n,this.flags=l,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+l+(l<<6)}const KR=new Zc(null,0,0);function JR(e){let n=0;for(let l=0;l<e.length;l++)n+=e.charCodeAt(l)==$d?8-n%8:1;return n}const R0=new Map([[gR,0],[bR,ys],[vR,Ss],[yR,Ss|ys],[SR,js],[jR,js|ys],[QR,js|Ss],[wR,js|Ss|ys],[kR,Qs],[NR,Qs|ys],[$R,Qs|Ss],[TR,Qs|Ss|ys],[PR,Qs|js],[CR,Qs|js|ys],[zR,Qs|js|Ss],[RR,Qs|js|Ss|ys]].map(([e,n])=>[e,n|u2])),eA=new Vh({start:KR,reduce(e,n,l,r){return e.flags&Xc&&IR.has(n)||(n==pR||n==o2)&&e.flags&u2?e.parent:e},shift(e,n,l,r){return n==l2?new Zc(e,JR(r.read(r.pos,l.pos)),0):n==r2?e.parent:n==sR||n==iR||n==dR||n==i2?new Zc(e,0,Xc):R0.has(n)?new Zc(e,0,R0.get(n)|e.flags&Xc):e},hash(e){return e.hash}}),tA=new _t(e=>{for(let n=0;n<5;n++){if(e.next!="print".charCodeAt(n))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let n=0;;n++){let l=e.peek(n);if(!(l==tm||l==$d)){l!=UR&&l!=VR&&l!=dl&&l!=Zi&&l!=nm&&e.acceptToken(Fz);return}}}),nA=new _t((e,n)=>{let{flags:l}=n.context,r=l&ys?d2:c2,o=(l&Ss)>0,d=!(l&js),u=(l&Qs)>0,f=e.pos;for(;!(e.next<0);)if(u&&e.next==rh)if(e.peek(1)==rh)e.advance(2);else{if(e.pos==f){e.acceptToken(i2,1);return}break}else if(d&&e.next==z0){if(e.pos==f){e.advance();let h=e.next;h>=0&&(e.advance(),sA(e,h)),e.acceptToken(nR);return}break}else if(e.next==z0&&!d&&e.peek(1)>-1)e.advance(2);else if(e.next==r&&(!o||e.peek(1)==r&&e.peek(2)==r)){if(e.pos==f){e.acceptToken(P0,o?3:1);return}break}else if(e.next==dl){if(o)e.advance();else if(e.pos==f){e.acceptToken(P0);return}break}else e.advance();e.pos>f&&e.acceptToken(tR)});function sA(e,n){if(n==GR)for(let l=0;l<2&&e.next>=48&&e.next<=55;l++)e.advance();else if(n==DR)for(let l=0;l<2&&yO(e.next);l++)e.advance();else if(n==WR)for(let l=0;l<4&&yO(e.next);l++)e.advance();else if(n==BR)for(let l=0;l<8&&yO(e.next);l++)e.advance();else if(n==LR&&e.next==rh){for(e.advance();e.next>=0&&e.next!=C0&&e.next!=c2&&e.next!=d2&&e.next!=dl;)e.advance();e.next==C0&&e.advance()}}const aA=fl({'async "*" "**" FormatConversion FormatSpec':q.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":q.controlKeyword,"in not and or is del":q.operatorKeyword,"from def class global nonlocal lambda":q.definitionKeyword,import:q.moduleKeyword,"with as print":q.keyword,Boolean:q.bool,None:q.null,VariableName:q.variableName,"CallExpression/VariableName":q.function(q.variableName),"FunctionDefinition/VariableName":q.function(q.definition(q.variableName)),"ClassDefinition/VariableName":q.definition(q.className),PropertyName:q.propertyName,"CallExpression/MemberExpression/PropertyName":q.function(q.propertyName),Comment:q.lineComment,Number:q.number,String:q.string,FormatString:q.special(q.string),Escape:q.escape,UpdateOp:q.updateOperator,"ArithOp!":q.arithmeticOperator,BitOp:q.bitwiseOperator,CompareOp:q.compareOperator,AssignOp:q.definitionOperator,Ellipsis:q.punctuation,At:q.meta,"( )":q.paren,"[ ]":q.squareBracket,"{ }":q.brace,".":q.derefOperator,", ;":q.separator}),lA={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as: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Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:eA,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"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O%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[tA,FR,HR,nA,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>lA[e]||-1}],tokenPrec:7668}),A0=new fh,f2=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function Sc(e){return(n,l,r)=>{if(r)return!1;let o=n.node.getChild("VariableName");return o&&l(o,e),!0}}const iA={FunctionDefinition:Sc("function"),ClassDefinition:Sc("class"),ForStatement(e,n,l){if(l){for(let r=e.node.firstChild;r;r=r.nextSibling)if(r.name=="VariableName")n(r,"variable");else if(r.name=="in")break}},ImportStatement(e,n){var l,r;let{node:o}=e,d=((l=o.firstChild)===null||l===void 0?void 0:l.name)=="from";for(let u=o.getChild("import");u;u=u.nextSibling)u.name=="VariableName"&&((r=u.nextSibling)===null||r===void 0?void 0:r.name)!="as"&&n(u,d?"variable":"namespace")},AssignStatement(e,n){for(let l=e.node.firstChild;l;l=l.nextSibling)if(l.name=="VariableName")n(l,"variable");else if(l.name==":"||l.name=="AssignOp")break},ParamList(e,n){for(let l=null,r=e.node.firstChild;r;r=r.nextSibling)r.name=="VariableName"&&(!l||!/\*|AssignOp/.test(l.name))&&n(r,"variable"),l=r},CapturePattern:Sc("variable"),AsPattern:Sc("variable"),__proto__:null};function O2(e,n){let l=A0.get(n);if(l)return l;let r=[],o=!0;function d(u,f){let h=e.sliceString(u.from,u.to);r.push({label:h,type:f})}return n.cursor(fd.IncludeAnonymous).iterate(u=>{if(u.name){let f=iA[u.name];if(f&&f(u,d,o)||!o&&f2.has(u.name))return!1;o=!1}else if(u.to-u.from>8192){for(let f of O2(e,u.node))r.push(f);return!1}}),A0.set(n,r),r}const _0=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,h2=["String","FormatString","Comment","PropertyName"];function oA(e){let n=_n(e.state).resolveInner(e.pos,-1);if(h2.indexOf(n.name)>-1)return null;let l=n.name=="VariableName"||n.to-n.from<20&&_0.test(e.state.sliceDoc(n.from,n.to));if(!l&&!e.explicit)return null;let r=[];for(let o=n;o;o=o.parent)f2.has(o.name)&&(r=r.concat(O2(e.state.doc,o)));return{options:r,from:l?n.from:e.pos,validFor:_0}}const cA=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),dA=[lt("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),lt("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),lt("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),lt("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),lt(`if \${}:
627
+
628
+ `,{label:"if",detail:"block",type:"keyword"}),lt("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),lt("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),lt("import ${module}",{label:"import",detail:"statement",type:"keyword"}),lt("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],uA=db(h2,ub(cA.concat(dA)));function SO(e){let{node:n,pos:l}=e,r=e.lineIndent(l,-1),o=null;for(;;){let d=n.childBefore(l);if(d)if(d.name=="Comment")l=d.from;else if(d.name=="Body"||d.name=="MatchBody")e.baseIndentFor(d)+e.unit<=r&&(o=d),n=d;else if(d.name=="MatchClause")n=d;else if(d.type.is("Statement"))n=d;else break;else break}return o}function jO(e,n){let l=e.baseIndentFor(n),r=e.lineAt(e.pos,-1),o=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&e.node.to<o+100&&!/\S/.test(e.state.sliceDoc(o,e.node.to))&&e.lineIndent(e.pos,-1)<=l||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(e.textAfter)&&e.lineIndent(e.pos,-1)>l?null:l+e.unit}const QO=Yi.define({name:"python",parser:rA.configure({props:[Sr.add({Body:e=>{var n;let l=/^\s*(#|$)/.test(e.textAfter)&&SO(e)||e.node;return(n=jO(e,l))!==null&&n!==void 0?n:e.continue()},MatchBody:e=>{var n;let l=SO(e);return(n=jO(e,l||e.node))!==null&&n!==void 0?n:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except[ :]|finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),MatchStatement:e=>/^\s*case /.test(e.textAfter)?e.baseIndent+e.unit:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":Pc({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":Pc({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":Pc({closing:"]"}),MemberExpression:e=>e.baseIndent+e.unit,"String FormatString":()=>null,Script:e=>{var n;let l=SO(e);return(n=l&&jO(e,l))!==null&&n!==void 0?n:e.continue()}}),Ol.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":Od,Body:(e,n)=>({from:e.from+1,to:e.to-(e.to==n.doc.length?0:1)}),"String FormatString":(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function fA(){return new al(QO,[QO.data.of({autocomplete:oA}),QO.data.of({autocomplete:uA})])}const jc={javascript:()=>KO({jsx:!0,typescript:!1}),typescript:()=>KO({jsx:!0,typescript:!0}),css:()=>uy(),html:()=>Py(),json:()=>iz(),markdown:()=>Lz(),python:()=>fA()},OA=Or.theme({"&":{backgroundColor:"#24282f",color:"#bcc2cd",fontFamily:"var(--font-mono)",fontSize:"13px",height:"100%"},".cm-scroller":{overflow:"auto"},".cm-content":{caretColor:"#33afbc"},".cm-cursor":{borderLeftColor:"#33afbc"},".cm-gutters":{backgroundColor:"#24282f",borderRight:"1px solid #2c313a",color:"#505862"},".cm-activeLineGutter":{backgroundColor:"#2c313a"},".cm-activeLine":{backgroundColor:"rgba(44, 49, 58, 0.5)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:"rgba(51, 175, 188, 0.15)"}},{dark:!0});function X0({content:e,language:n,onChange:l,onSave:r}){const o=v.useRef(null),d=v.useRef(null),u=v.useRef(new hw),f=v.useRef(l),h=v.useRef(r);return f.current=l,h.current=r,v.useEffect(()=>{if(!o.current)return;const x=jc[n]||jc.javascript,g=EO.of([{key:"Mod-s",run:()=>{var y;return(y=h.current)==null||y.call(h),!0}}]),p=mb.create({doc:e||"",extensions:[xw(),pw(),gw(),bw(),vw(),yw(),Sw(),EO.of([...jw,...Qw,...ww]),g,mw,OA,u.current.of(x()),Or.updateListener.of(y=>{var j;y.docChanged&&((j=f.current)==null||j.call(f,y.state.doc.toString()))})]}),b=new Or({state:p,parent:o.current});return d.current=b,()=>{b.destroy(),d.current=null}},[]),v.useEffect(()=>{const x=d.current;if(!x)return;const g=x.state.doc.toString();e!==g&&x.dispatch({changes:{from:0,to:g.length,insert:e||""}})},[e]),v.useEffect(()=>{const x=d.current;if(!x)return;const g=jc[n]||jc.javascript;x.dispatch({effects:u.current.reconfigure(g())})},[n]),s.jsx("div",{ref:o,className:"w-full h-full overflow-hidden"})}const hA=["png","jpg","jpeg","gif","svg","webp","ico","bmp","avif"],m2=["mp4","webm","mov","avi","mkv","ogv"];function mA(e){var l;const n=(l=e.split(".").pop())==null?void 0:l.toLowerCase();return hA.includes(n)||m2.includes(n)}function xA({path:e}){var d;const n=(d=e.split(".").pop())==null?void 0:d.toLowerCase(),l=`/api/files/raw?path=${encodeURIComponent(e)}`,r=e.split("/").pop(),o=m2.includes(n);return s.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-surface-0 p-8 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-3 font-sans",children:[s.jsx(Te,{children:n==null?void 0:n.toUpperCase()}),s.jsx("span",{className:"font-mono",children:r}),s.jsx("a",{href:l,target:"_blank",rel:"noopener",className:"text-accent hover:text-accent/80 transition-colors",children:s.jsx(Fn,{size:12})})]}),o?s.jsx("video",{src:l,controls:!0,className:"max-w-full max-h-[70vh] rounded-md border border-border"}):s.jsx("img",{src:l,alt:r,className:"max-w-full max-h-[70vh] rounded-md border border-border object-contain"})]})}function pA(e){var l;const n=(l=e==null?void 0:e.split(".").pop())==null?void 0:l.toLowerCase();return n==="html"||n==="htm"}function gA(){const e=M(Q=>Q.editorActiveFile),n=M(Q=>Q.editorFiles),l=M(Q=>Q.editorChangedFiles),r=M(Q=>Q.updateFileContent),o=M(Q=>Q.saveFile),d=M(Q=>Q.reloadFile),u=M(Q=>Q.dismissFileChange),[f,h]=v.useState(""),[x,g]=v.useState(!1),[p,b]=v.useState(0);v.useEffect(()=>{B.get("/files/root").then(Q=>h(Q.root||"")).catch(()=>{})},[]),v.useEffect(()=>{g(!1)},[e]);const y=e?n[e]:null,j=e&&mA(e),w=e&&pA(e),k=e&&l[e];return s.jsxs("div",{className:"flex h-full",children:[s.jsx("div",{className:"w-60 flex-shrink-0 border-r border-border",children:s.jsx(X4,{rootDir:f})}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[s.jsx(Z4,{}),s.jsxs("div",{className:"flex-1 relative min-h-0",children:[k&&s.jsxs("div",{className:"absolute top-0 left-0 right-0 z-10 flex items-center gap-2 px-4 py-2 bg-warning/10 border-b border-warning/20",children:[s.jsx(Ta,{size:14,className:"text-warning"}),s.jsx("span",{className:"text-xs text-warning font-sans flex-1",children:"File modified externally"}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:()=>d(e),children:[s.jsx(Zn,{size:12})," Reload"]}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:()=>u(e),children:[s.jsx(rt,{size:12})," Dismiss"]})]}),!e&&s.jsx("div",{className:"w-full h-full flex items-center justify-center text-text-4 font-sans",children:s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx($a,{size:32,className:"mx-auto"}),s.jsx("p",{className:"text-sm",children:"Open a file from the tree"})]})}),e&&j&&s.jsx(xA,{path:e}),e&&!j&&w&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"absolute top-0 right-4 z-10 flex items-center gap-0.5 mt-2 bg-surface-2 border border-border-subtle rounded-md p-0.5",children:[s.jsxs("button",{onClick:()=>g(!1),className:le("flex items-center gap-1.5 px-2.5 py-1 text-xs font-sans rounded cursor-pointer transition-colors",x?"text-text-3 hover:text-text-1":"bg-surface-4 text-text-0 font-medium"),children:[s.jsx(X$,{size:12})," Code"]}),s.jsxs("button",{onClick:()=>{g(!0),b(Q=>Q+1)},className:le("flex items-center gap-1.5 px-2.5 py-1 text-xs font-sans rounded cursor-pointer transition-colors",x?"bg-surface-4 text-text-0 font-medium":"text-text-3 hover:text-text-1"),children:[s.jsx(xl,{size:12})," Preview"]})]}),x?s.jsx("iframe",{src:`/api/files/raw?path=${encodeURIComponent(e)}`,className:"w-full h-full border-0",sandbox:"allow-scripts allow-same-origin",title:"HTML Preview"},p):y&&s.jsx(X0,{content:y.content,language:y.language,onChange:Q=>r(e,Q),onSave:()=>o(e)})]}),e&&!j&&!w&&y&&s.jsx(X0,{content:y.content,language:y.language,onChange:Q=>r(e,Q),onSave:()=>o(e)})]})]})]})}function bA(){var P;const e=M(R=>R.connected),n=M(R=>R.agents),[l,r]=v.useState(null),[o,d]=v.useState([]),[u,f]=v.useState({constraints:[],discoveries:[],roles:[],specializations:null}),[h,x]=v.useState(!0),[g,p]=v.useState({tokens:[],cost:[],saved:[],efficiency:[],cache:[],inputOutput:[],agents:[],turns:[]}),b=v.useRef(0);v.useEffect(()=>{if(!e)return;let R=!0;async function Y(){try{const[z,$,F,Z,J,A]=await Promise.all([B.get("/dashboard"),B.get("/tokens/by-team").catch(()=>({teams:[]})),B.get("/memory/constraints").catch(()=>({constraints:[]})),B.get("/memory/discoveries?limit=20").catch(()=>({discoveries:[]})),B.get("/memory/handoff-chain").catch(()=>({roles:[]})),B.get("/memory/specializations").catch(()=>({perAgent:{},perProjectRole:{}}))]);if(!R)return;r(z),d(($==null?void 0:$.teams)||[]),f({constraints:(F==null?void 0:F.constraints)||[],discoveries:(Z==null?void 0:Z.discoveries)||[],roles:(J==null?void 0:J.roles)||[],specializations:A||{perAgent:{},perProjectRole:{}}}),x(!1),b.current=Date.now(),p(U=>{var Se,ge,je,ze,ke,it,St,Ee,$t;const D=Date.now(),V=(tt,nt)=>[...tt.slice(-59),{t:D,v:nt||0}],T=((Se=z.tokens)==null?void 0:Se.totalTokens)||0,L=((ge=z.tokens)==null?void 0:ge.totalInputTokens)||0,ee=((je=z.tokens)==null?void 0:je.totalOutputTokens)||0,ae=(((ze=z.agents)==null?void 0:ze.breakdown)||[]).filter(tt=>{var nt;return((nt=tt.quality)==null?void 0:nt.score)!=null}),ye=ae.length>0?ae.reduce((tt,nt)=>tt+nt.quality.score,0)/ae.length:0;return{tokens:V(U.tokens,T),cost:V(U.cost,(ke=z.tokens)==null?void 0:ke.totalCostUsd),saved:V(U.saved,ye),efficiency:V(U.efficiency,((it=z.rotation)==null?void 0:it.totalRotations)||0),cache:V(U.cache,(St=z.tokens)==null?void 0:St.cacheHitRate),inputOutput:V(U.inputOutput,ee>0?L/ee:0),agents:V(U.agents,((Ee=z.agents)==null?void 0:Ee.running)||0),turns:V(U.turns,($t=z.tokens)==null?void 0:$t.totalTurns)}})}catch{R&&x(!1)}}Y();const X=setInterval(Y,4e3);return()=>{R=!1,clearInterval(X)}},[e]);const y=((P=l==null?void 0:l.agents)==null?void 0:P.breakdown)||[],j=(l==null?void 0:l.routing)||null,w=(l==null?void 0:l.rotation)||null,k=(l==null?void 0:l.adaptive)||[],Q=(l==null?void 0:l.journalist)||null,C=(w==null?void 0:w.rotating)||[];return{data:l,loading:h,agents:n,connected:e,kpiHistory:g,lastFetch:b.current,agentBreakdown:y,routing:j,rotation:w,adaptive:k,journalist:Q,rotating:C,teamBurn:o,memory:u}}const Z0=v.memo(function({connected:n,runningCount:l,totalCount:r,uptime:o,lastFetch:d,activeTeam:u}){return s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 bg-surface-1 border-b border-border",children:[s.jsx("h2",{className:"text-xs font-semibold text-text-0 font-sans tracking-wide uppercase",children:"Command Center"}),u&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-text-4",children:"/"}),s.jsx("span",{className:"text-xs font-mono text-text-2",children:u.name})]}),s.jsx("div",{className:"flex-1"}),n&&s.jsxs("div",{className:"flex items-center gap-3.5 text-xs font-mono text-text-2",children:[s.jsxs("span",{children:[s.jsx("span",{className:"text-text-1",children:l}),s.jsxs("span",{className:"text-text-3",children:["/",r]}),s.jsx("span",{className:"ml-1 text-text-3",children:"agents"})]}),o>0&&s.jsxs("span",{className:"text-text-3",children:["Up ",kr(o)]}),d>0&&s.jsxs("span",{className:"flex items-center gap-1 text-text-4",children:[s.jsx(Zn,{size:9}),s.jsx("span",{children:Nt(d)})]})]}),s.jsx(zs,{status:n?"running":"crashed",size:"sm"})]})});function sn(e,n){const l=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`rgba(${l},${r},${o},${n})`}const fe={surface0:"#1a1e25",surface4:"#2c313a",surface5:"#333842",text0:"#e6e6e6",text1:"#bcc2cd",text2:"#8b929e",text3:"#6e7681",text4:"#505862",accent:"#33afbc",success:"#4ae168",warning:"#e5c07b",danger:"#e06c75",info:"#61afef",purple:"#c678dd",orange:"#d19a66"};function vA({data:e,color:n=fe.accent,width:l=72,height:r=22}){if(!e||e.length<2)return s.jsx("div",{style:{width:l,height:r}});const o=e.map(g=>g.v),d=Math.min(...o),f=Math.max(...o)-d||1,h=e.map((g,p)=>{const b=p/(e.length-1)*l,y=r-(g.v-d)/f*(r-2)-1;return`${b},${y}`}).join(" "),x=`kpi-${n.replace("#","")}`;return s.jsxs("svg",{width:l,height:r,className:"flex-shrink-0",children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:x,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:n,stopOpacity:"0.2"}),s.jsx("stop",{offset:"100%",stopColor:n,stopOpacity:"0"})]})}),s.jsx("polygon",{points:`0,${r} ${h} ${l},${r}`,fill:`url(#${x})`}),s.jsx("polyline",{points:h,fill:"none",stroke:n,strokeWidth:"1.5",strokeLinejoin:"round",strokeOpacity:"0.8"})]})}const yA=v.memo(function({label:n,value:l,sparkData:r,color:o=fe.accent,hint:d,className:u}){return s.jsxs("div",{className:le("flex items-center gap-2.5 px-3 py-2.5 min-w-0","bg-surface-1",u),children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-0.5 truncate flex items-center gap-1",children:[n,d&&s.jsx(Lc,{content:s.jsx("span",{className:"max-w-[220px] block leading-relaxed",children:d}),side:"bottom",children:s.jsx(xr,{size:10,className:"text-text-4 hover:text-text-2 cursor-help flex-shrink-0 transition-colors"})})]}),s.jsx("div",{className:"text-base font-semibold font-mono text-text-0 tabular-nums leading-none",children:l})]}),s.jsx(vA,{data:r,color:o})]})});function SA({kpis:e}){return s.jsx("div",{className:"flex flex-wrap border-b border-border",style:{background:"var(--color-surface-0)"},children:e.map(n=>s.jsx(yA,{label:n.label,value:n.value,sparkData:n.sparkData,color:n.color,hint:n.hint,className:le("flex-1 basis-[12.5%] min-w-[140px]","border-b border-r border-border")},n.label))})}const jA={actual:"ACT",estimated:"EST",local:"LOC"};function QA(e){if(!e||e==="auto"||e==="default")return"default";const n=e.match(/^claude-(opus|sonnet|haiku)-(\d+)-(\d+)/);return n?`${n[1][0].toUpperCase()}${n[1].slice(1)} ${n[2]}.${n[3]}`:e.startsWith("gemini-")?e.replace("gemini-","Gem ").replace("-preview",""):e.length>12?e.slice(0,12)+"...":e}const wA=v.memo(function({agent:n,isRotating:l}){const r=n.status==="running"||n.status==="starting",o=Math.round((n.contextUsage||0)*100),d=l?"#c678dd":Eh(n.status),u=n.quality,f=(u==null?void 0:u.toolSuccessRate)!=null?Math.round(u.toolSuccessRate*100):null,h=n.rotationThreshold?Math.round(n.rotationThreshold*100):null,x=ga(n.role),g=o>80?fe.danger:o>60?fe.warning:fe.accent;return s.jsxs("div",{className:"px-3 pl-6 py-2 hover:bg-[rgba(51,175,188,0.06)] transition-colors space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsxs("span",{className:"relative flex-shrink-0 w-[6px] h-[6px]",children:[s.jsx("span",{className:"absolute inset-0 rounded-sm",style:{background:d}}),r&&s.jsx("span",{className:"absolute inset-[-2px] rounded-sm",style:{background:d,opacity:.15,animation:"node-pulse-bar 2s ease-in-out infinite"}})]}),s.jsx("div",{className:"text-xs font-semibold text-text-0 font-sans truncate leading-none flex-shrink-0 max-w-[80px]",children:n.name}),s.jsx("span",{className:"text-2xs font-mono font-semibold px-1.5 py-px rounded-sm flex-shrink-0 capitalize",style:{background:x.bg,color:x.text},children:(n.role||"").toLowerCase()}),s.jsx("span",{className:"text-2xs font-mono text-text-4 bg-surface-4 px-1 py-px rounded-sm flex-shrink-0 truncate max-w-[72px]",children:QA(n.model)}),s.jsx("div",{className:"flex-1"}),f!=null&&s.jsxs("span",{className:"text-2xs font-mono font-bold px-1 py-px rounded-sm flex-shrink-0",style:{color:f>=90?"#4ae168":f>=70?"#e5c07b":"#e06c75",background:f>=90?"rgba(74,225,104,0.1)":f>=70?"rgba(229,192,123,0.1)":"rgba(224,108,117,0.1)"},children:[f,"%"]}),n.costSource&&n.costSource!=="actual"&&s.jsx("span",{className:"text-2xs font-mono text-text-4 uppercase tracking-wider flex-shrink-0",children:jA[n.costSource]||""}),s.jsxs("div",{className:"text-right flex-shrink-0",children:[s.jsx("div",{className:"text-xs font-mono text-text-1 tabular-nums leading-none",children:He(n.tokens||0)}),(n.costUsd||0)>0&&s.jsx("div",{className:"text-2xs font-mono text-text-3 mt-0.5",children:Pa(n.costUsd)})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"relative flex-1 h-0.5 rounded-sm overflow-visible",style:{background:sn(fe.accent,.12)},children:[s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-sm transition-all duration-700",style:{width:`${Math.max(o,1)}%`,background:g}}),h&&s.jsx("div",{className:"absolute top-[-1px] w-px h-[4px]",style:{left:`${h}%`,background:fe.purple},title:`Rotation at ${h}%`})]}),s.jsxs("span",{className:"text-2xs font-mono text-text-2 tabular-nums flex-shrink-0 w-7 text-right",children:[o,"%"]})]})]})});function kA({team:e,members:n,rotatingSet:l}){const[r,o]=v.useState(!0),d=n.filter(x=>x.status==="running"||x.status==="starting").length,u=d>0,f=n.reduce((x,g)=>x+(g.tokens||0),0),h=n.reduce((x,g)=>x+(g.costUsd||0),0);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>o(x=>!x),className:"w-full flex items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-[rgba(51,175,188,0.08)] bg-[rgba(51,175,188,0.05)]",style:{borderLeft:u?`2px solid ${fe.accent}`:"2px solid transparent"},children:[r?s.jsx(bn,{size:10,className:"text-text-4 flex-shrink-0"}):s.jsx(Na,{size:10,className:"text-text-4 flex-shrink-0"}),s.jsx("span",{className:"text-2xs font-mono font-semibold text-text-2 uppercase tracking-widest flex-1 truncate",children:e}),s.jsx("span",{className:"text-2xs font-mono text-text-3 tabular-nums",children:He(f)}),h>0&&s.jsx("span",{className:"text-2xs font-mono text-text-4 tabular-nums ml-1",children:Pa(h)}),s.jsxs("span",{className:"text-2xs font-mono tabular-nums flex-shrink-0 ml-1.5",style:{color:u?fe.accent:void 0},children:[d,"/",n.length]})]}),r&&n.map(x=>s.jsx(wA,{agent:x,isRotating:l.has(x.id)},x.id))]})}const NA=v.memo(function({agentBreakdown:n,rotating:l=[],teams:r=[]}){if(!(n!=null&&n.length))return s.jsx("div",{className:"flex-1 flex items-center justify-center text-xs text-text-3 font-mono p-4",children:"No agents"});const o={};for(const f of r)o[f.id]=f.name;const d={};for(const f of n){const h=f.teamId||"ungrouped";d[h]||(d[h]=[]),d[h].push(f)}const u=new Set(l);return s.jsx(En,{className:"flex-1",children:s.jsx("div",{className:"py-1",children:Object.entries(d).map(([f,h])=>s.jsx(kA,{team:o[f]||(f==="ungrouped"?"Ungrouped":f),members:h,rotatingSet:u},f))})})}),$A=v.memo(function({data:n}){const l=v.useRef(null),r=v.useRef(null),[o,d]=v.useState({width:0,height:0}),[u,f]=v.useState(null),{width:h,height:x}=o,g={top:28,right:12,bottom:8,left:12},p=Math.max(h-g.left-g.right,0),b=Math.max(x-g.top-g.bottom,0),y=v.useMemo(()=>!n||n.length<2?[]:n.slice(1).map((k,Q)=>{const C=n[Q],P=(k.t-C.t)/6e4,R=Math.max((k.tokens||0)-(C.tokens||0),0);return{burnRate:P>0?Math.round(R/P):0,cacheHitRate:k.cacheHitRate||0,running:k.running||0,agents:k.agents||0,t:k.t}}),[n]);v.useEffect(()=>{const k=l.current;if(!k)return;const Q=new ResizeObserver(C=>{const{width:P,height:R}=C[0].contentRect;P>0&&R>0&&d({width:Math.floor(P),height:Math.floor(R)})});return Q.observe(k),()=>Q.disconnect()},[]);const j=v.useCallback(k=>{const Q=r.current;if(!Q||!y.length||p<=0)return;const C=Q.getBoundingClientRect(),P=k.clientX-C.left-g.left;if(P<0||P>p){f(null);return}const R=Math.round(P/p*(y.length-1));f({x:g.left+R/Math.max(y.length-1,1)*p,index:R})},[y,p,g.left]),w=v.useCallback(()=>f(null),[]);return v.useEffect(()=>{const k=r.current;if(!k||!y.length||h<=0||x<=0||p<=0||b<=0)return;const Q=k.getContext("2d"),C=window.devicePixelRatio||1;k.width=h*C,k.height=x*C,Q.scale(C,C),Q.clearRect(0,0,h,x);const P=y.map(T=>T.burnRate),R=y.map(T=>T.cacheHitRate),Y=y.map(T=>T.running),X=Math.max(...P,100),z=Math.max(...Y,1),$=T=>g.left+T/Math.max(y.length-1,1)*p,F=T=>g.top+b-T/X*b,Z=T=>g.top+b-T*b,J=Math.max(p/y.length-1,2);for(let T=0;T<y.length;T++){const L=Y[T];if(L<=0)continue;const ee=L/z*b*.3,de=$(T)-J/2,ae=g.top+b-ee;Q.fillStyle=sn(fe.surface5,.5),Q.fillRect(de,ae,J,ee)}Q.setLineDash([2,4]),Q.strokeStyle=sn(fe.text4,.2),Q.lineWidth=1;for(let T=1;T<=3;T++){const L=g.top+b/4*T;Q.beginPath(),Q.moveTo(g.left,L),Q.lineTo(g.left+p,L),Q.stroke()}Q.setLineDash([]),Q.font="9px 'JetBrains Mono Variable', monospace",Q.textAlign="left",Q.fillStyle=sn(fe.text3,.5),Q.fillText(`${He(X)}/m`,g.left+4,g.top+10),Q.fillText(`${He(Math.round(X/2))}/m`,g.left+4,g.top+b/2+4),Q.beginPath(),Q.moveTo(g.left,g.top+b);for(let T=0;T<y.length;T++)Q.lineTo($(T),F(P[T]));Q.lineTo($(y.length-1),g.top+b),Q.closePath();const A=Q.createLinearGradient(0,g.top,0,g.top+b);A.addColorStop(0,sn(fe.accent,.2)),A.addColorStop(.7,sn(fe.accent,.04)),A.addColorStop(1,sn(fe.accent,0)),Q.fillStyle=A,Q.fill(),Q.beginPath(),Q.strokeStyle=fe.accent,Q.lineWidth=1.5,Q.lineJoin="round";for(let T=0;T<y.length;T++){const L=$(T),ee=F(P[T]);T===0?Q.moveTo(L,ee):Q.lineTo(L,ee)}Q.stroke();const U=R.some(T=>T>0);if(U){Q.beginPath(),Q.strokeStyle=sn(fe.info,.45),Q.lineWidth=1,Q.lineJoin="round",Q.setLineDash([2,3]);for(let T=0;T<y.length;T++){const L=$(T),ee=Z(R[T]);T===0?Q.moveTo(L,ee):Q.lineTo(L,ee)}Q.stroke(),Q.setLineDash([])}Q.font="9px 'Inter Variable', sans-serif",Q.textAlign="right";let D=h-g.right-4;const V=14;if(U&&(Q.fillStyle=sn(fe.info,.5),Q.fillText("Cache %",D,V),D-=Q.measureText("Cache %").width+4,Q.beginPath(),Q.arc(D,V-3,2.5,0,Math.PI*2),Q.fill(),D-=14),Q.fillStyle=sn(fe.surface5,.7),Q.fillText("Agents",D,V),D-=Q.measureText("Agents").width+4,Q.beginPath(),Q.arc(D,V-3,2.5,0,Math.PI*2),Q.fill(),D-=14,Q.fillStyle=fe.accent,Q.fillText("Burn Rate",D,V),D-=Q.measureText("Burn Rate").width+4,Q.beginPath(),Q.arc(D,V-3,2.5,0,Math.PI*2),Q.fill(),u&&u.index>=0&&u.index<y.length){const T=u.x,L=y[u.index];Q.beginPath(),Q.moveTo(T,g.top),Q.lineTo(T,g.top+b),Q.strokeStyle=sn(fe.text1,.15),Q.lineWidth=1,Q.stroke();const ee=F(L.burnRate);Q.beginPath(),Q.arc(T,ee,3,0,Math.PI*2),Q.fillStyle=fe.accent,Q.fill();const de=[{label:"Burn",value:`${He(L.burnRate)}/m`,color:fe.accent},{label:"Cache",value:Cn(L.cacheHitRate*100),color:fe.info},{label:"Agents",value:`${L.running}/${L.agents}`,color:fe.text2}],ae=104,ye=de.length*16+12;let Se=T+12;Se+ae>h-8&&(Se=T-ae-12);const ge=Math.max(g.top,ee-ye/2);Q.fillStyle=sn(fe.surface0,.92),Q.beginPath(),Q.roundRect(Se,ge,ae,ye,4),Q.fill(),Q.strokeStyle=sn(fe.text4,.2),Q.lineWidth=1,Q.stroke(),Q.textAlign="left",de.forEach((je,ze)=>{const ke=ge+14+ze*16;Q.beginPath(),Q.arc(Se+8,ke-3,2,0,Math.PI*2),Q.fillStyle=je.color,Q.fill(),Q.font="8px 'Inter Variable', sans-serif",Q.fillStyle=fe.text3,Q.fillText(je.label,Se+14,ke),Q.font="9px 'JetBrains Mono Variable', monospace",Q.fillStyle=fe.text0,Q.textAlign="right",Q.fillText(je.value,Se+ae-8,ke),Q.textAlign="left"})}},[y,h,x,u,p,b,g]),s.jsx("div",{ref:l,className:"absolute inset-0",children:h>0&&x>0&&s.jsx("canvas",{ref:r,style:{width:h,height:x},className:"block cursor-crosshair",onMouseMove:j,onMouseLeave:w})})}),TA=v.memo(function({cacheRead:n=0,cacheCreation:l=0,totalInput:r=0,size:o=140}){const d=v.useRef(null),u=n+l,f=u,h=u>0?n/u*100:0;return v.useEffect(()=>{const x=d.current;if(!x)return;const g=window.devicePixelRatio||1;x.width=o*g,x.height=o*g;const p=x.getContext("2d");p.scale(g,g),p.clearRect(0,0,o,o);const b=o/2,y=o/2,j=(o-12)/2,w=5,k=135*Math.PI/180,Q=405*Math.PI/180,C=Q-k;if(p.beginPath(),p.arc(b,y,j,k,Q),p.strokeStyle=fe.surface4,p.lineWidth=w,p.lineCap="round",p.stroke(),f>0){const P=n/f,R=l/f;if(P>0){const Y=k+C*P;p.beginPath(),p.arc(b,y,j,k,Y),p.strokeStyle=fe.accent,p.lineWidth=w,p.lineCap="round",p.stroke()}if(R>0){const Y=k+C*P,X=Y+C*R;p.beginPath(),p.arc(b,y,j,Y,X),p.strokeStyle=fe.purple,p.lineWidth=w,p.lineCap="butt",p.stroke()}}p.textAlign="center",p.textBaseline="middle",p.font=`600 ${o*.2}px 'JetBrains Mono Variable', monospace`,p.fillStyle=fe.text0,p.fillText(`${Math.round(h)}%`,b,y-3),p.font=`500 ${o*.08}px 'JetBrains Mono Variable', monospace`,p.fillStyle=fe.text3,p.fillText("CACHE",b,y+o*.13)},[n,l,r,o,f,h]),s.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-3 py-3",children:[s.jsx("canvas",{ref:d,className:"flex-shrink-0",style:{width:o,height:o}}),s.jsxs("div",{className:"w-full mt-3 space-y-1.5 max-w-[160px]",children:[s.jsx(wO,{color:fe.accent,label:"Read",value:He(n)}),s.jsx(wO,{color:fe.purple,label:"Create",value:He(l)}),s.jsx(wO,{color:fe.surface5,label:"Miss",value:He(Math.max(r-n-l,0))})]})]})});function wO({color:e,label:n,value:l}){return s.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:e}}),s.jsx("span",{className:"text-text-3 uppercase tracking-wider flex-1",children:n}),s.jsx("span",{className:"text-text-1 tabular-nums",children:l})]})}const E0={heavy:fe.danger,medium:fe.warning,light:fe.success},q0={heavy:"Heavy",medium:"Medium",light:"Light"},PA=v.memo(function({routing:n,agentBreakdown:l}){if(!n)return null;const{byTier:r={},totalDecisions:o=0,autoRoutedCount:d=0}=n,u=["heavy","medium","light"],f=u.reduce((p,b)=>p+(r[b]||0),0),h={};for(const p of l||[]){const b=p.model||"default";h[b]||(h[b]={tokens:0,agents:0}),h[b].tokens+=p.tokens||0,h[b].agents+=1}const x=Object.entries(h).sort((p,b)=>b[1].tokens-p[1].tokens),g=x.length>0?x[0][1].tokens:0;return s.jsxs("div",{className:"flex flex-col h-full px-3 py-3 overflow-y-auto",children:[f>0&&s.jsxs("div",{className:"space-y-1.5 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider",children:"Tier Distribution"}),s.jsxs("span",{className:"text-2xs font-mono text-text-4 ml-auto tabular-nums",children:[He(f)," decisions"]})]}),s.jsx("div",{className:"h-0.5 bg-surface-2 rounded-sm overflow-hidden flex",children:u.map(p=>{const b=r[p]||0;if(b===0)return null;const y=b/f*100;return s.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${y}%`,background:E0[p]},title:`${q0[p]}: ${b} (${Math.round(y)}%)`},p)})}),s.jsx("div",{className:"flex items-center gap-3",children:u.map(p=>{const b=r[p]||0;if(b===0)return null;const y=f>0?b/f*100:0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:E0[p]}}),s.jsx("span",{className:"text-2xs font-mono text-text-2",children:q0[p]}),s.jsx("span",{className:"text-2xs font-mono text-text-4 tabular-nums",children:Cn(y)})]},p)})})]}),x.length>0&&s.jsxs("div",{className:"space-y-1.5 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider",children:"Models in Use"}),d>0&&s.jsxs("span",{className:"text-2xs font-mono text-text-4 ml-auto",children:[d," auto"]})]}),s.jsx("div",{className:"space-y-1.5",children:x.map(([p,b])=>{const y=g>0?b.tokens/g*100:0;return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-text-1 flex-1 truncate",children:CA(p)}),s.jsxs("span",{className:"text-2xs font-mono text-text-3 tabular-nums",children:[b.agents," agent",b.agents!==1?"s":""]}),s.jsx("span",{className:"text-xs font-mono text-text-1 tabular-nums",children:He(b.tokens)})]}),s.jsx("div",{className:"h-0.5 bg-surface-4 rounded-sm overflow-hidden",children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${Math.max(y,2)}%`,background:fe.accent}})})]},p)})})]}),f===0&&x.length===0&&s.jsx("div",{className:"flex-1 flex items-center justify-center text-xs text-text-3 font-mono",children:"No routing data"})]})});function CA(e){if(!e||e==="auto"||e==="default")return"Default";const n=e.match(/^claude-(opus|sonnet|haiku)-(\d+)-(\d+)/);return n?`${n[1][0].toUpperCase()}${n[1].slice(1)} ${n[2]}.${n[3]}`:e.startsWith("gemini-")?e.replace("gemini-","Gemini ").replace("-preview",""):e}function zA(e){const n=e+"CollectionProvider",[l,r]=ml(n),[o,d]=l(n,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:k,children:Q}=w,C=ua.useRef(null),P=ua.useRef(new Map).current;return s.jsx(o,{scope:k,itemMap:P,collectionRef:C,children:Q})};u.displayName=n;const f=e+"CollectionSlot",h=Yc(f),x=ua.forwardRef((w,k)=>{const{scope:Q,children:C}=w,P=d(f,Q),R=gt(k,P.collectionRef);return s.jsx(h,{ref:R,children:C})});x.displayName=f;const g=e+"CollectionItemSlot",p="data-radix-collection-item",b=Yc(g),y=ua.forwardRef((w,k)=>{const{scope:Q,children:C,...P}=w,R=ua.useRef(null),Y=gt(k,R),X=d(g,Q);return ua.useEffect(()=>(X.itemMap.set(R,{ref:R,...P}),()=>void X.itemMap.delete(R))),s.jsx(b,{[p]:"",ref:Y,children:C})});y.displayName=g;function j(w){const k=d(e+"CollectionConsumer",w);return ua.useCallback(()=>{const C=k.collectionRef.current;if(!C)return[];const P=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(k.itemMap.values()).sort((X,z)=>P.indexOf(X.ref.current)-P.indexOf(z.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:u,Slot:x,ItemSlot:y},j,r]}var kO="rovingFocusGroup.onEntryFocus",RA={bubbles:!1,cancelable:!0},Bi="RovingFocusGroup",[ih,x2,AA]=zA(Bi),[_A,p2]=ml(Bi,[AA]),[XA,ZA]=_A(Bi),g2=v.forwardRef((e,n)=>s.jsx(ih.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(ih.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(EA,{...e,ref:n})})}));g2.displayName=Bi;var EA=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:l,orientation:r,loop:o=!1,dir:d,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:x,preventScrollOnEntryFocus:g=!1,...p}=e,b=v.useRef(null),y=gt(n,b),j=qh(d),[w,k]=gd({prop:u,defaultProp:f??null,onChange:h,caller:Bi}),[Q,C]=v.useState(!1),P=Dt(x),R=x2(l),Y=v.useRef(!1),[X,z]=v.useState(0);return v.useEffect(()=>{const $=b.current;if($)return $.addEventListener(kO,P),()=>$.removeEventListener(kO,P)},[P]),s.jsx(XA,{scope:l,orientation:r,dir:j,loop:o,currentTabStopId:w,onItemFocus:v.useCallback($=>k($),[k]),onItemShiftTab:v.useCallback(()=>C(!0),[]),onFocusableItemAdd:v.useCallback(()=>z($=>$+1),[]),onFocusableItemRemove:v.useCallback(()=>z($=>$-1),[]),children:s.jsx(et.div,{tabIndex:Q||X===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{Y.current=!0}),onFocus:Ge(e.onFocus,$=>{const F=!Y.current;if($.target===$.currentTarget&&F&&!Q){const Z=new CustomEvent(kO,RA);if($.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const J=R().filter(T=>T.focusable),A=J.find(T=>T.active),U=J.find(T=>T.id===w),V=[A,U,...J].filter(Boolean).map(T=>T.ref.current);y2(V,g)}}Y.current=!1}),onBlur:Ge(e.onBlur,()=>C(!1))})})}),b2="RovingFocusGroupItem",v2=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:l,focusable:r=!0,active:o=!1,tabStopId:d,children:u,...f}=e,h=or(),x=d||h,g=ZA(b2,l),p=g.currentTabStopId===x,b=x2(l),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:w}=g;return v.useEffect(()=>{if(r)return y(),()=>j()},[r,y,j]),s.jsx(ih.ItemSlot,{scope:l,id:x,focusable:r,active:o,children:s.jsx(et.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...f,ref:n,onMouseDown:Ge(e.onMouseDown,k=>{r?g.onItemFocus(x):k.preventDefault()}),onFocus:Ge(e.onFocus,()=>g.onItemFocus(x)),onKeyDown:Ge(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){g.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const Q=YA(k,g.orientation,g.dir);if(Q!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let P=b().filter(R=>R.focusable).map(R=>R.ref.current);if(Q==="last")P.reverse();else if(Q==="prev"||Q==="next"){Q==="prev"&&P.reverse();const R=P.indexOf(k.currentTarget);P=g.loop?UA(P,R+1):P.slice(R+1)}setTimeout(()=>y2(P))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:w!=null}):u})})});v2.displayName=b2;var qA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MA(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function YA(e,n,l){const r=MA(e.key,l);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qA[r]}function y2(e,n=!1){const l=document.activeElement;for(const r of e)if(r===l||(r.focus({preventScroll:n}),document.activeElement!==l))return}function UA(e,n){return e.map((l,r)=>e[(n+r)%e.length])}var VA=g2,GA=v2,Td="Tabs",[DA]=ml(Td,[p2]),S2=p2(),[LA,sm]=DA(Td),j2=v.forwardRef((e,n)=>{const{__scopeTabs:l,value:r,onValueChange:o,defaultValue:d,orientation:u="horizontal",dir:f,activationMode:h="automatic",...x}=e,g=qh(f),[p,b]=gd({prop:r,onChange:o,defaultProp:d??"",caller:Td});return s.jsx(LA,{scope:l,baseId:or(),value:p,onValueChange:b,orientation:u,dir:g,activationMode:h,children:s.jsx(et.div,{dir:g,"data-orientation":u,...x,ref:n})})});j2.displayName=Td;var Q2="TabsList",w2=v.forwardRef((e,n)=>{const{__scopeTabs:l,loop:r=!0,...o}=e,d=sm(Q2,l),u=S2(l);return s.jsx(VA,{asChild:!0,...u,orientation:d.orientation,dir:d.dir,loop:r,children:s.jsx(et.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:n})})});w2.displayName=Q2;var k2="TabsTrigger",N2=v.forwardRef((e,n)=>{const{__scopeTabs:l,value:r,disabled:o=!1,...d}=e,u=sm(k2,l),f=S2(l),h=P2(u.baseId,r),x=C2(u.baseId,r),g=r===u.value;return s.jsx(GA,{asChild:!0,...f,focusable:!o,active:g,children:s.jsx(et.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":x,"data-state":g?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...d,ref:n,onMouseDown:Ge(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?u.onValueChange(r):p.preventDefault()}),onKeyDown:Ge(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&u.onValueChange(r)}),onFocus:Ge(e.onFocus,()=>{const p=u.activationMode!=="manual";!g&&!o&&p&&u.onValueChange(r)})})})});N2.displayName=k2;var $2="TabsContent",T2=v.forwardRef((e,n)=>{const{__scopeTabs:l,value:r,forceMount:o,children:d,...u}=e,f=sm($2,l),h=P2(f.baseId,r),x=C2(f.baseId,r),g=r===f.value,p=v.useRef(g);return v.useEffect(()=>{const b=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(b)},[]),s.jsx(Xn,{present:o||g,children:({present:b})=>s.jsx(et.div,{"data-state":g?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:x,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:p.current?"0s":void 0},children:b&&d})})});T2.displayName=$2;function P2(e,n){return`${e}-trigger-${n}`}function C2(e,n){return`${e}-content-${n}`}var WA=j2,BA=w2,IA=N2,HA=T2;function z2({children:e,...n}){return s.jsx(WA,{...n,children:e})}function R2({children:e,className:n,...l}){return s.jsx(BA,{className:le("flex items-center gap-0 border-b border-border-subtle",n),...l,children:e})}function nl({children:e,className:n,...l}){return s.jsx(IA,{className:le("px-3 py-2 text-sm font-medium font-sans text-text-2","border-b-2 border-transparent","hover:text-text-0 hover:bg-surface-5/50","data-[state=active]:text-text-0 data-[state=active]:border-accent","transition-colors duration-100 cursor-pointer select-none","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",n),...l,children:e})}function sl({children:e,className:n,...l}){return s.jsx(HA,{className:le("flex-1 min-h-0",n),...l,children:e})}function M0({data:e,color:n=fe.accent,width:l=60,height:r=16}){if(!e||e.length<2)return s.jsx("div",{style:{width:l,height:r}});const o=Array.isArray(e[0])?e:e.map(x=>typeof x=="number"?x:x.v),d=Math.min(...o),f=Math.max(...o)-d||1,h=o.map((x,g)=>{const p=g/(o.length-1)*l,b=r-(x-d)/f*(r-2)-1;return`${p},${b}`}).join(" ");return s.jsx("svg",{width:l,height:r,className:"flex-shrink-0",children:s.jsx("polyline",{points:h,fill:"none",stroke:n,strokeWidth:"1",strokeLinejoin:"round",strokeOpacity:"0.7"})})}function Ln({text:e,side:n="bottom"}){return s.jsx(Lc,{content:s.jsx("span",{className:"max-w-[220px] block leading-relaxed",children:e}),side:n,children:s.jsx(xr,{size:10,className:"text-text-4 hover:text-text-2 cursor-help flex-shrink-0 transition-colors inline-block ml-1"})})}function am(e){return e==null?fe.text3:e>=70?"#4ae168":e>=40?"#e5c07b":"#e06c75"}function Oa({label:e,value:n,danger:l}){return n==null||n===0?null:s.jsxs("span",{className:"text-2xs font-mono px-1.5 py-px rounded-sm bg-surface-4 text-text-3",children:[e,": ",s.jsx("span",{style:{color:l?"#e06c75":fe.text1},children:n})]})}function FA({score:e}){const n=Math.max(0,Math.min(100,e||0)),l=am(e);return s.jsx("div",{className:"h-0.5 rounded-sm overflow-hidden flex-1",style:{background:"rgba(51,175,188,0.08)"},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-700",style:{width:`${n}%`,background:l}})})}function NO({label:e,value:n,total:l,color:r}){const o=l>0?n/l*100:0;return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-mono text-text-2",children:e}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs font-mono font-semibold tabular-nums",style:{color:r},children:[o>=1?Math.round(o):o>0?o.toFixed(1):0,"%"]}),s.jsx("span",{className:"text-2xs font-mono text-text-3 tabular-nums w-10 text-right",children:He(n)})]})]}),s.jsx("div",{className:"h-0.5 rounded-sm overflow-hidden",style:{background:"rgba(51,175,188,0.08)"},children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${Math.min(o,100)}%`,background:r}})})]})}function KA({tokens:e,rotation:n,agentBreakdown:l}){var b,y,j;const r=((n==null?void 0:n.history)||[]).slice(-10).reverse(),o=(n==null?void 0:n.liveScores)||{},d=(l||[]).filter(w=>w.status==="running"),u=l||[],f=u.filter(w=>{var k;return((k=w.quality)==null?void 0:k.score)!=null}),h=f.length>0?Math.round(f.reduce((w,k)=>w+k.quality.score,0)/f.length):null,x=u.filter(w=>w.status==="completed"||w.status==="stopped").length,g=u.filter(w=>w.status==="crashed").length,p=x+g>0?Math.round(x/(x+g)*100):100;return s.jsxs("div",{className:"p-3 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Quality",s.jsx(Ln,{text:"Average session quality score (0-100). Based on error rate, tool failures, repetitions, and file churn. Below 40 triggers auto-rotation to prevent wasted tokens."})]}),s.jsx("div",{className:"text-base font-mono font-bold text-text-1 tabular-nums leading-none",children:h??"—"})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Rotations",s.jsx(Ln,{text:"Context rotations: quality-based (q), context threshold (c), and natural compactions (n) from provider-managed context resets. Each rotation preserves progress via a journalist handoff brief."})]}),s.jsx("div",{className:"text-base font-mono font-bold text-text-1 tabular-nums leading-none",children:(n==null?void 0:n.totalRotations)||0}),((n==null?void 0:n.qualityRotations)>0||(n==null?void 0:n.contextRotations)>0||(n==null?void 0:n.naturalCompactions)>0)&&s.jsxs("div",{className:"text-2xs font-mono text-text-4 mt-0.5",children:[n.qualityRotations||0,"q / ",n.contextRotations||0,"c / ",n.naturalCompactions||0,"n"]})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Cache",s.jsx(Ln,{text:"Prompt cache hit rate. Cache reads are ~90% cheaper than regular input tokens. Managed by your AI provider — GROOVE tracks it, doesn't control it."})]}),s.jsx("div",{className:"text-base font-mono font-bold text-text-1 tabular-nums leading-none",children:Cn(((e==null?void 0:e.cacheHitRate)||0)*100)})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Success",s.jsx(Ln,{text:"Agent completion rate. Completed agents vs. crashed agents. High success rate means agents are finishing tasks without errors."})]}),s.jsxs("div",{className:"text-base font-mono font-bold text-text-1 tabular-nums leading-none",children:[p,"%"]})]})]}),d.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2",children:"Live Agent Quality"}),s.jsx("div",{className:"space-y-2",children:d.map(w=>{const k=w.quality||{},Q=o[w.id],C=(Q==null?void 0:Q.score)??k.score,P=ga(w.role);return s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-2xs font-mono font-semibold capitalize px-1.5 py-px rounded-sm",style:{background:P.bg,color:P.text},children:w.role}),s.jsx("span",{className:"text-xs font-mono text-text-1 truncate flex-1",children:w.name}),s.jsx("span",{className:"text-sm font-mono font-bold tabular-nums",style:{color:am(C)},children:C??"—"})]}),s.jsx(FA,{score:C}),s.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:[s.jsx(Oa,{label:"Errors",value:k.errorCount,danger:!0}),s.jsx(Oa,{label:"Reps",value:k.repetitions,danger:!0}),s.jsx(Oa,{label:"Churn",value:k.fileChurn,danger:!0}),s.jsx(Oa,{label:"Tools",value:k.toolCalls}),s.jsx(Oa,{label:"Files",value:k.filesWritten}),k.toolCalls>0&&s.jsxs("span",{className:"text-2xs font-mono px-1.5 py-px rounded-sm bg-surface-4 text-text-3",children:["Success: ",s.jsxs("span",{style:{color:k.toolSuccessRate>=.8?"#4ae168":"#e5c07b"},children:[Math.round(k.toolSuccessRate*100),"%"]})]}),k.eventCount>0&&s.jsxs("span",{className:"text-2xs font-mono px-1.5 py-px rounded-sm bg-surface-4 text-text-3",children:["Events: ",s.jsx("span",{className:"text-text-2",children:k.eventCount})]})]})]},w.id)})})]}),((b=e==null?void 0:e.internalOverhead)==null?void 0:b.tokens)>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider flex items-center",children:["GROOVE Overhead",s.jsx(Ln,{text:"Tokens consumed by GROOVE's own coordination: the Journalist (synthesis), PM (approval gates), Planner, Task Negotiator, Gateway, and user Q&A. Previously invisible — now tracked for honest ROI."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-2xs font-mono text-text-2 tabular-nums",children:[He(e.internalOverhead.tokens)," tokens"]}),s.jsx("span",{className:"text-2xs font-mono text-text-3 tabular-nums",children:Pa(e.internalOverhead.costUsd||0)}),e.totalTokens>0&&s.jsxs("span",{className:"text-2xs font-mono font-semibold tabular-nums",style:{color:fe.purple},children:[Math.round(e.internalOverhead.tokens/e.totalTokens*100),"%"]})]})]}),s.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:Object.entries(e.internalOverhead.components||{}).sort((w,k)=>(k[1].tokens||0)-(w[1].tokens||0)).slice(0,6).map(([w,k])=>{const Q=w.replace(/^__|__$/g,"").replace(/_/g," ");return s.jsxs("div",{className:"bg-surface-0 rounded px-2 py-1.5",children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider truncate",children:Q}),s.jsx("div",{className:"text-xs font-mono text-text-1 tabular-nums font-semibold",children:He(k.tokens||0)})]},w)})})]}),(((y=e==null?void 0:e.savings)==null?void 0:y.total)||0)>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider flex items-center",children:["Coordination Savings",s.jsx(Ln,{text:"Tokens saved vs. uncoordinated agents. Rotation savings are estimated from context degradation (pre/post velocity measurement underway). Conflict prevention and cold-start skip use fixed-overhead models. Compare against GROOVE Overhead above for honest ROI."})]}),s.jsxs("span",{className:"text-2xs font-mono text-text-2 tabular-nums",children:[He(e.savings.total)," tokens"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(NO,{label:"Cold-start skip",value:e.savings.fromColdStartSkip||0,total:e.savings.total||1,color:fe.info}),s.jsxs("div",{className:"text-2xs font-mono text-text-4 pl-2",children:["estimated · ",(((j=e==null?void 0:e.savings)==null?void 0:j.fromColdStartSkip)||0)>0?"fixed overhead per skip":""]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(NO,{label:"Rotation",value:e.savings.fromRotation||0,total:e.savings.total||1,color:fe.accent}),s.jsx("div",{className:"text-2xs font-mono text-text-4 pl-2",children:"estimated · velocity measurement accumulating"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(NO,{label:"Conflict prevention",value:e.savings.fromConflictPrevention||0,total:e.savings.total||1,color:"#4ec9d4"}),s.jsx("div",{className:"text-2xs font-mono text-text-4 pl-2",children:"estimated · fixed overhead per conflict"})]})]})]}),r.length>0?s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2.5",children:"Recent Rotations"}),s.jsx("div",{className:"space-y-0",children:r.map((w,k)=>{var X,z;const Q=w.reason==="quality_degradation",C=w.reason==="natural_compaction",P=w.reason==="token_limit_exceeded",R=w.reason==="runaway_velocity",Y=P?"#e06c75":R?"#ff8c42":Q?"#e5c07b":C?"#c678dd":"#33afbc";return s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[s.jsx("div",{className:"h-1.5"}),s.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:k===0?Y:`${Y}25`,border:`1px solid ${Y}80`,boxShadow:k===0?`0 0 6px ${Y}60`:"none"}}),k<r.length-1&&s.jsx("div",{className:"w-px flex-1 mt-1",style:{background:"rgba(51,175,188,0.15)",minHeight:"12px"}})]}),s.jsx("div",{className:le("flex-1 bg-surface-0 rounded px-2 py-1.5",k<r.length-1&&"mb-2"),children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-text-1 font-medium capitalize truncate flex-1",children:w.agentName||w.role}),P?s.jsxs("span",{className:"text-2xs font-mono font-semibold tabular-nums flex-shrink-0",style:{color:"#e06c75"},title:`Auto-rotated: agent burned ${(X=w.instanceTokens)==null?void 0:X.toLocaleString()} tokens in one session`,children:["T:",Cn((w.instanceTokens||0)/1e6*100).replace("%","M")]}):R?s.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0",children:[s.jsxs("span",{className:"text-2xs font-mono font-semibold tabular-nums",style:{color:"#ff8c42"},title:`Auto-rotated: runaway velocity (${(z=w.velocity)==null?void 0:z.toLocaleString()} tokens in recent window)`,children:["V:",Cn((w.velocity||0)/1e6*100).replace("%","M")]}),w.velocityDelta!=null&&w.velocityDelta>0&&s.jsxs("span",{className:"text-2xs font-mono tabular-nums",style:{color:"#4ae168"},title:`Post-rotation velocity dropped by ${w.velocityDelta.toLocaleString()} tokens — rotation worked`,children:["↓",Cn(w.velocityDelta/1e6*100).replace("%","M")]})]}):Q?s.jsxs("span",{className:"text-2xs font-mono font-semibold tabular-nums flex-shrink-0",style:{color:"#e5c07b"},children:["Q:",w.qualityScore]}):C?s.jsxs("span",{className:"text-2xs font-mono font-semibold tabular-nums flex-shrink-0",style:{color:"#c678dd"},children:[Cn((w.contextUsage||0)*100)," → ",Cn((w.contextAfter||0)*100)]}):s.jsx("span",{className:"text-2xs font-mono font-semibold tabular-nums flex-shrink-0",style:{color:(w.contextUsage||0)>.8?"#e06c75":"#33afbc"},children:Cn((w.contextUsage||0)*100)}),s.jsx("span",{className:"text-2xs font-mono text-text-4 flex-shrink-0",children:Nt(w.timestamp)})]})})]},k)})})]}):s.jsxs("div",{className:"bg-surface-0 rounded p-3 text-center space-y-1.5",children:[s.jsx("div",{className:"text-xs font-mono text-text-2 font-semibold",children:"Monitoring for degradation"}),s.jsx("div",{className:"text-2xs font-mono text-text-3 leading-relaxed",children:"Auto-rotation triggers when session quality drops below 40 (errors, repetitions, file churn) or context exceeds the adaptive threshold."})]})]})}function JA({adaptive:e}){if(!(e!=null&&e.length))return s.jsx("div",{className:"p-3",children:s.jsxs("div",{className:"bg-surface-0 rounded p-4 text-center space-y-2",children:[s.jsx("div",{className:"text-xs font-mono text-text-2 font-semibold",children:"No adaptive profiles yet"}),s.jsx("div",{className:"text-2xs font-mono text-text-3 leading-relaxed",children:"Adaptive thresholds learn when each agent role benefits from rotation. GROOVE tracks quality scores and adjusts rotation triggers automatically — converging to the optimal threshold per role and provider."})]})});function n(l){const r=l.split(":");return{provider:r[0]||l,role:r[1]||""}}return s.jsx("div",{className:"p-3 space-y-3",children:e.map(l=>{var g,p;const{provider:r,role:o}=n(l.key),d=o||r,u=((g=l.thresholdHistory)==null?void 0:g.length)>1,f=((p=l.recentScores)==null?void 0:p.length)>1,h=ga(d),x=l.lastSignals;return s.jsxs("div",{className:"rounded overflow-hidden",style:{background:"rgba(51,175,188,0.04)",borderLeft:l.converged?"2px solid #33afbc":"2px solid rgba(229,192,123,0.35)"},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2.5 pb-1.5",children:[s.jsx("span",{className:"text-xs font-mono font-semibold capitalize px-1.5 py-px rounded-sm",style:{background:h.bg,color:h.text},children:d}),o&&s.jsx("span",{className:"text-2xs font-mono text-text-4 bg-surface-4 px-1.5 py-px rounded-sm",children:r}),s.jsx("div",{className:"flex-1"}),s.jsxs("span",{className:"flex items-center gap-1 text-2xs font-mono font-bold px-2 py-px rounded-full",style:{background:l.converged?"rgba(74,225,104,0.12)":"rgba(229,192,123,0.12)",color:l.converged?"#4ae168":"#e5c07b"},children:[!l.converged&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:"#e5c07b",animation:"node-pulse-bar 1.5s ease-in-out infinite"}}),l.converged?"Converged":"Learning"]})]}),s.jsxs("div",{className:"flex items-end gap-5 px-3 pb-2",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-4 uppercase tracking-wider mb-0.5",children:"Threshold"}),s.jsx("div",{className:"text-3xl font-mono font-bold tabular-nums leading-none",style:{color:l.converged?"#33afbc":"#e5c07b"},children:Cn(l.threshold*100)})]}),s.jsxs("div",{className:"pb-0.5",children:[s.jsx("div",{className:"text-2xs font-mono text-text-4 uppercase tracking-wider mb-0.5",children:"Adj."}),s.jsx("div",{className:"text-lg font-mono font-semibold text-text-1 tabular-nums",children:l.adjustments})]})]}),(u||f)&&s.jsxs("div",{className:"px-3 pb-2 space-y-2 overflow-hidden",children:[u&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-4 mb-0.5",children:"Threshold history"}),s.jsx(M0,{data:l.thresholdHistory.map(b=>b.v),color:l.converged?fe.accent:fe.warning,width:240,height:32})]}),f&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-4 mb-0.5",children:"Quality score"}),s.jsx(M0,{data:l.recentScores,color:fe.warning,width:240,height:24})]})]}),x&&s.jsxs("div",{className:"flex flex-wrap gap-1.5 px-3 pb-2.5",children:[s.jsx(Oa,{label:"Errors",value:x.errorCount,danger:!0}),s.jsx(Oa,{label:"Reps",value:x.repetitions,danger:!0}),s.jsx(Oa,{label:"Churn",value:x.fileChurn,danger:!0}),x.toolSuccessRate!=null&&s.jsxs("span",{className:"text-2xs font-mono px-1.5 py-px rounded-sm bg-surface-4 text-text-3",children:["Tools: ",s.jsxs("span",{className:"text-text-1",children:[Math.round(x.toolSuccessRate*100),"%"]})]})]})]},l.key)})})}function e_({journalist:e}){var n;return e?s.jsxs("div",{className:"p-3 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-0.5",children:"Cycles"}),s.jsx("div",{className:"text-lg font-mono font-semibold text-text-0 tabular-nums leading-none",children:e.cycleCount||0})]}),e.lastCycleAt&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-0.5",children:"Last"}),s.jsx("div",{className:"text-xs font-mono text-text-2",children:Nt(e.lastCycleAt)})]}),e.synthesizing&&s.jsx("span",{className:"text-2xs font-mono font-bold text-accent uppercase tracking-wider animate-pulse",children:"Synthesizing"})]}),e.lastSummary&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1",children:"Summary"}),s.jsx("div",{className:"text-xs font-sans text-text-2 leading-relaxed",children:e.lastSummary})]}),e.projectMap&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1",children:"Project Map"}),s.jsx("div",{className:"text-xs font-mono text-text-2 leading-relaxed whitespace-pre-wrap",children:e.projectMap})]}),e.decisions&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1",children:"Decisions"}),s.jsx("div",{className:"text-xs font-mono text-text-2 leading-relaxed whitespace-pre-wrap",children:e.decisions})]}),((n=e.recentHistory)==null?void 0:n.length)>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1.5",children:"History"}),s.jsx("div",{className:"space-y-1",children:e.recentHistory.slice().reverse().map((l,r)=>s.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono px-2 py-1 bg-surface-0 rounded",children:[s.jsxs("span",{className:"text-text-3",children:["#",l.cycle]}),s.jsxs("span",{className:"text-text-2 flex-1 truncate",children:[l.agentCount," agents"]}),s.jsx("span",{className:"text-text-4",children:Nt(l.timestamp)})]},r))})]})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-xs text-text-3 font-mono p-4",children:"Journalist inactive"})}function t_({memory:e}){var x,g;const n=(e==null?void 0:e.constraints)||[],l=(e==null?void 0:e.discoveries)||[],r=(e==null?void 0:e.roles)||[],o=((x=e==null?void 0:e.specializations)==null?void 0:x.perAgent)||{},d=((g=e==null?void 0:e.specializations)==null?void 0:g.perProjectRole)||{},u=Object.keys(o).length,f=Object.keys(d).length;return n.length+l.length+r.length===0&&u===0?s.jsxs("div",{className:"p-6 text-center text-xs font-mono text-text-3",children:[s.jsx($h,{size:24,className:"mx-auto mb-2 text-text-4"}),s.jsx("div",{children:"No memory accumulated yet"}),s.jsx("div",{className:"text-2xs text-text-4 mt-1",children:"Constraints, handoff chains, and discoveries populate as agents work"})]}):s.jsxs("div",{className:"p-3 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Constraints",s.jsx(Ln,{text:"Project rules discovered by agents or set by the user. Every new agent reads these on spawn to avoid rediscovering them."})]}),s.jsx("div",{className:"text-2xl font-mono font-bold tabular-nums leading-none",style:{color:fe.accent},children:n.length})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Discoveries",s.jsx(Ln,{text:"Error→fix pairs successful agents have recorded. Injected into future agent context so they don't rediscover known solutions."})]}),s.jsx("div",{className:"text-2xl font-mono font-bold tabular-nums leading-none",style:{color:fe.success},children:l.length})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Handoff Chains",s.jsx(Ln,{text:"Cumulative rotation briefs per role. Agent #50 knows what agent #1 struggled with. Each role keeps its last 10 rotation briefs."})]}),s.jsx("div",{className:"text-2xl font-mono font-bold tabular-nums leading-none",style:{color:fe.purple},children:r.length})]}),s.jsxs("div",{className:"bg-surface-0 rounded p-2.5",children:[s.jsxs("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-1 flex items-center",children:["Specializations",s.jsx(Ln,{text:"Per-agent quality profiles: session counts, average quality, file touches, preferred thresholds."})]}),s.jsx("div",{className:"text-2xl font-mono font-bold tabular-nums leading-none",style:{color:fe.info},children:u}),f>0&&s.jsxs("div",{className:"text-2xs font-mono text-text-4 mt-0.5",children:["across ",f," roles"]})]})]}),n.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2",children:"Project Constraints"}),s.jsxs("div",{className:"space-y-1",children:[n.slice(0,10).map(p=>s.jsxs("div",{className:"flex items-start gap-2 bg-surface-0 rounded px-2 py-1.5",children:[s.jsx("span",{className:"text-2xs font-mono px-1.5 py-px rounded-sm bg-surface-4 text-text-3 uppercase tracking-wider flex-shrink-0 mt-0.5",children:p.category}),s.jsx("span",{className:"text-xs font-mono text-text-2 leading-relaxed flex-1",children:p.text})]},p.hash)),n.length>10&&s.jsxs("div",{className:"text-2xs font-mono text-text-4 px-2",children:["+",n.length-10," more"]})]})]}),l.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2",children:"Recent Discoveries"}),s.jsx("div",{className:"space-y-1.5",children:l.slice(0,8).map((p,b)=>{const y=ga(p.role);return s.jsxs("div",{className:"bg-surface-0 rounded px-2 py-1.5 space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-2xs font-mono font-semibold capitalize px-1.5 py-px rounded-sm",style:{background:y.bg,color:y.text},children:p.role}),s.jsx("span",{className:"text-2xs font-mono text-text-4 flex-1",children:Nt(p.ts)})]}),s.jsxs("div",{className:"text-xs font-mono text-text-2 leading-relaxed",children:[s.jsx("span",{className:"text-text-4",children:"When:"})," ",s.jsx("span",{className:"text-text-1",children:p.trigger})]}),s.jsxs("div",{className:"text-xs font-mono text-text-2 leading-relaxed",children:[s.jsx("span",{className:"text-text-4",children:"Fix:"})," ",s.jsx("span",{style:{color:fe.success},children:p.fix})]})]},b)})})]}),r.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2",children:"Active Role Chains"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(p=>{const b=ga(p);return s.jsx("span",{className:"text-2xs font-mono font-semibold capitalize px-2 py-1 rounded",style:{background:b.bg,color:b.text},children:p},p)})})]}),f>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-mono text-text-3 uppercase tracking-wider mb-2",children:"Role Quality Profiles"}),s.jsx("div",{className:"space-y-1",children:Object.entries(d).map(([p,b])=>{const y=ga(p);return s.jsxs("div",{className:"flex items-center gap-2 bg-surface-0 rounded px-2 py-1.5",children:[s.jsx("span",{className:"text-2xs font-mono font-semibold capitalize px-1.5 py-px rounded-sm",style:{background:y.bg,color:y.text},children:p}),s.jsxs("span",{className:"text-xs font-mono text-text-3 flex-1",children:[b.sessionCount," sessions"]}),s.jsxs("span",{className:"text-xs font-mono font-semibold tabular-nums",style:{color:am(b.avgQualityScore)},children:["Q:",b.avgQualityScore]})]},p)})})]})]})}const n_=v.memo(function({tokens:n,rotation:l,adaptive:r,journalist:o,agentBreakdown:d,memory:u}){return s.jsxs(z2,{defaultValue:"health",className:"flex flex-col h-full",children:[s.jsxs(R2,{className:"flex-shrink-0 px-1",children:[s.jsxs(nl,{value:"health",className:"text-xs px-2.5 py-1.5 inline-flex items-center gap-1.5",children:[s.jsx(Ci,{size:11}),"Health"]}),s.jsxs(nl,{value:"memory",className:"text-xs px-2.5 py-1.5 inline-flex items-center gap-1.5",children:[s.jsx($h,{size:11}),"Memory"]}),s.jsxs(nl,{value:"adaptive",className:"text-xs px-2.5 py-1.5 inline-flex items-center gap-1.5",children:[s.jsx(r$,{size:11}),"Adaptive"]}),s.jsxs(nl,{value:"journalist",className:"text-xs px-2.5 py-1.5 inline-flex items-center gap-1.5",children:[s.jsx(Qa,{size:11}),"Journalist"]})]}),s.jsx(sl,{value:"health",className:"flex-1 min-h-0 relative",children:s.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:s.jsx(KA,{tokens:n,rotation:l,agentBreakdown:d})})}),s.jsx(sl,{value:"memory",className:"flex-1 min-h-0 relative",children:s.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:s.jsx(t_,{memory:u})})}),s.jsx(sl,{value:"adaptive",className:"flex-1 min-h-0 relative",children:s.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:s.jsx(JA,{adaptive:r})})}),s.jsx(sl,{value:"journalist",className:"flex-1 min-h-0 relative",children:s.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:s.jsx(e_,{journalist:o})})})]})}),s_=v.memo(function({teams:n=[]}){const l=n.reduce((o,d)=>o+(d.totalTokens||0),0),r=n.reduce((o,d)=>Math.max(o,d.totalTokens||0),0);return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"px-3 pt-2.5 pb-1 flex-shrink-0 flex items-center justify-between",children:[s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-widest",children:"Team Burn"}),s.jsxs("span",{className:"text-2xs font-mono text-text-3",children:[He(l)," total"]})]}),s.jsx(En,{className:"flex-1 min-h-0",children:n.length===0?s.jsx("div",{className:"px-3 py-6 text-center text-xs text-text-3 font-mono",children:"No team activity yet"}):s.jsx("div",{className:"px-3 py-3 space-y-3",children:n.map(o=>{const d=r>0?o.totalTokens/r*100:0;return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:o.teamName}),o.isDefault&&s.jsx("span",{className:"text-[9px] font-mono text-text-3 uppercase tracking-wider",children:"default"}),s.jsxs("span",{className:"text-2xs font-mono text-text-3 flex-shrink-0",children:[o.agentCount," ",o.agentCount===1?"agent":"agents"]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 font-mono text-2xs",children:[s.jsx("span",{className:"text-text-1",children:He(o.totalTokens)}),s.jsx("span",{className:"text-text-3",children:Pa(o.totalCostUsd)})]})]}),s.jsx("div",{className:"h-0.5 bg-surface-2 rounded-sm overflow-hidden",children:s.jsx("div",{className:"h-full rounded-sm transition-all",style:{width:`${d}%`,background:fe.accent}})})]},o.teamId)})})})]})}),a_={spawn:Q3,complete:ja,crash:Ta,kill:pv,rotate:Li,error:_h},l_={spawn:"text-accent",complete:"text-success",crash:"text-danger",kill:"text-text-3",rotate:"text-purple",error:"text-danger"};function r_(e){const n=e.agentName||e.role||"";switch(e.type){case"spawn":return`${n} spawned`;case"complete":return`${n} completed`;case"crash":return`${n} crashed`;case"kill":return`${n} killed`;case"rotate":return`${n} rotated`;default:return e.text||e.type||"event"}}const i_=v.memo(function({events:n=[]}){return n.length?s.jsx("div",{className:"flex items-center gap-3 overflow-x-auto py-2 px-3",children:n.slice(-15).reverse().map((l,r)=>{const o=a_[l.type]||Jn,d=l_[l.type]||"text-text-3",u=r_(l);return s.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[s.jsx(o,{size:11,className:d}),s.jsx("span",{className:"text-xs font-sans text-text-2 whitespace-nowrap",children:u}),s.jsx("span",{className:"text-2xs font-mono text-text-4",children:Nt(l.t||l.timestamp)})]},r)})}):s.jsx("div",{className:"text-xs text-text-3 font-mono py-2.5 text-center",children:"No recent activity"})});function gn({className:e,...n}){return s.jsx("div",{className:le("rounded-md bg-surface-4","bg-gradient-to-r from-surface-4 via-surface-5 to-surface-4","bg-[length:200%_100%] animate-[shimmer_1.5s_ease-in-out_infinite]",e),...n})}function o_(){return s.jsxs("div",{className:"flex-1 grid gap-px p-0",style:{gridTemplateRows:"auto minmax(0, 1fr) minmax(0, 1fr)",gridTemplateColumns:"2fr 2.5fr 1.5fr",background:"#282c34"},children:[s.jsx("div",{className:"col-span-3",children:s.jsx(gn,{className:"h-[72px] rounded-none"})}),s.jsx(gn,{className:"rounded-none"}),s.jsx(gn,{className:"rounded-none"}),s.jsx(gn,{className:"rounded-none"}),s.jsx(gn,{className:"rounded-none"}),s.jsx("div",{className:"col-span-2",children:s.jsx(gn,{className:"h-full rounded-none"})})]})}function c_(){const{data:e,loading:n,agents:l,connected:r,kpiHistory:o,lastFetch:d,agentBreakdown:u,routing:f,rotation:h,adaptive:x,journalist:g,rotating:p,teamBurn:b,memory:y}=bA(),j=M(Z=>Z.teams),w=l.filter(Z=>Z.status==="running").length;if(!r)return s.jsx("div",{className:"w-full h-full flex items-center justify-center",children:s.jsxs("div",{className:"text-center space-y-2 text-text-3 font-mono",children:[s.jsx(hv,{size:28,className:"mx-auto"}),s.jsx("p",{className:"text-xs",children:"Connecting to daemon..."})]})});if(n||!e)return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx(Z0,{connected:r,runningCount:0,totalCount:0,uptime:0,lastFetch:0}),s.jsx(o_,{})]});const k=e.tokens||{},Q={totalTokens:k.totalTokens||0,totalCostUsd:k.totalCostUsd||0,totalInputTokens:k.totalInputTokens||0,totalOutputTokens:k.totalOutputTokens||0,cacheReadTokens:k.cacheReadTokens||0,cacheCreationTokens:k.cacheCreationTokens||0,cacheHitRate:k.cacheHitRate||0,totalTurns:k.totalTurns||0,agentCount:k.agentCount||0,savings:k.savings||{},internalOverhead:k.internalOverhead||{tokens:0,costUsd:0,components:{}}},C=Q.totalOutputTokens>0?(Q.totalInputTokens/Q.totalOutputTokens).toFixed(1):"—",P=(h==null?void 0:h.totalRotations)||0,R=(u||[]).filter(Z=>{var J;return((J=Z.quality)==null?void 0:J.score)!=null}),Y=R.length>0?Math.round(R.reduce((Z,J)=>Z+J.quality.score,0)/R.length):null,X=e.timeline||{},z=X.snapshots||[],$=X.events||e.events||[],F=[{label:"Tokens Used",value:He(Q.totalTokens),sparkData:o.tokens,color:fe.accent,hint:"Total tokens consumed across all agents — input, output, and cache tokens combined."},{label:"Total Cost",value:Pa(Q.totalCostUsd),sparkData:o.cost,color:fe.warning,hint:"Actual cost reported by providers. Claude Code reports real billing; other providers use estimated rates."},{label:"Quality",value:Y!=null?`${Y}`:"—",sparkData:o.saved,color:Y>=70?fe.success:Y>=40?fe.warning:fe.danger,hint:"Average session quality score (0-100) across running agents. Based on error rate, repetitions, file churn, and tool success. Below 40 triggers auto-rotation."},{label:"Cache Rate",value:Cn(Q.cacheHitRate*100),sparkData:o.cache,color:fe.info,hint:"Percentage of input tokens served from prompt cache. Higher = faster responses and lower cost. Managed by your AI provider."},{label:"Rotations",value:`${P}`,sparkData:o.efficiency,color:fe.purple,hint:"Total context rotations — includes quality-based (auto), context threshold, natural compaction (provider-managed), and manual rotations."},{label:"I/O Ratio",value:`${C}:1`,sparkData:o.inputOutput,color:fe.orange,hint:"Ratio of input to output tokens. High ratios mean agents are reading more than writing — common for analysis tasks."},{label:"Agents",value:`${w}/${l.length}`,sparkData:o.agents,color:fe.accent,hint:"Running agents out of total spawned this session (including completed and crashed)."},{label:"Turns",value:He(Q.totalTurns),sparkData:o.turns,color:fe.text2,hint:"Total conversation turns across all agents. Each turn is one request-response cycle with the AI provider."}];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx(Z0,{connected:r,runningCount:w,totalCount:l.length,uptime:e.uptime||0,lastFetch:d,activeTeam:e.activeTeam}),s.jsx(SA,{kpis:F}),s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",style:{background:"#282c34",gap:"1px"},children:[s.jsxs("div",{className:"min-h-0 flex-1 grid",style:{gridTemplateColumns:"3fr 1.5fr 1.5fr",gap:"0 1px"},children:[s.jsx("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 relative",children:s.jsx($A,{data:z})}),s.jsxs("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 flex flex-col border-l border-border",children:[s.jsx("div",{className:"px-3 pt-2.5 pb-1",children:s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-widest",children:"Cache Performance"})}),s.jsx(TA,{cacheRead:Q.cacheReadTokens,cacheCreation:Q.cacheCreationTokens,totalInput:Q.totalInputTokens})]}),s.jsxs("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 flex flex-col border-l border-border",children:[s.jsx("div",{className:"px-3 pt-2.5 pb-1",children:s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-widest",children:"Model Routing"})}),s.jsx(PA,{routing:f,agentBreakdown:u})]})]}),s.jsxs("div",{className:"min-h-0 flex-1 grid",style:{gridTemplateColumns:"2fr 2.5fr 1.5fr",gap:"0 1px"},children:[s.jsxs("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 flex flex-col border-t border-border",children:[s.jsx("div",{className:"px-3 pt-2.5 pb-1 flex-shrink-0",children:s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase tracking-widest",children:"Agent Fleet"})}),s.jsx(NA,{agentBreakdown:u,rotating:p,teams:j})]}),s.jsx("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 flex flex-col border-t border-l border-border",children:s.jsx(n_,{tokens:Q,rotation:h,adaptive:x,journalist:g,agentBreakdown:u,memory:y})}),s.jsx("div",{className:"min-w-0 min-h-0 overflow-hidden bg-surface-1 flex flex-col border-t border-l border-border",children:s.jsx(s_,{teams:b})})]})]}),s.jsx("div",{className:"flex-shrink-0 bg-surface-1 border-t border-border",children:s.jsx(i_,{events:$})})]})}const Y0={sm:12,md:16,lg:20};function d_({fill:e="full",size:n,color:l="#fbbf24",emptyColor:r="rgba(255,255,255,0.4)"}){const o=`star-${Math.random().toString(36).slice(2,8)}`;return s.jsxs("svg",{width:n,height:n,viewBox:"0 0 20 20",fill:"none",children:[e==="half"&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:o,children:[s.jsx("stop",{offset:"50%",stopColor:l}),s.jsx("stop",{offset:"50%",stopColor:r})]})}),s.jsx("path",{d:"M10 1.5l2.47 5.01 5.53.8-4 3.9.94 5.49L10 14.27 5.06 16.7 6 11.21l-4-3.9 5.53-.8L10 1.5z",fill:e==="full"?l:e==="half"?`url(#${o})`:r})]})}function A2({rating:e=0,count:n,size:l="sm"}){const r=Y0[l]||Y0.sm,o=[];for(let d=1;d<=5;d++)e>=d?o.push("full"):e>=d-.5?o.push("half"):o.push("empty");return s.jsxs("span",{className:"inline-flex items-center",style:{gap:1},children:[o.map((d,u)=>s.jsx(d_,{fill:d,size:r},u)),n!=null&&s.jsxs("span",{className:"ml-1 text-[11px] text-[var(--text-dim,#6b7f95)] font-sans",children:["(",n,")"]})]})}const U0={design:{color:"#c678dd",bg:"rgba(198,120,221,0.12)"},quality:{color:"#4ade80",bg:"rgba(74,222,128,0.12)"},devtools:{color:"#33afbc",bg:"rgba(51,175,188,0.14)"},workflow:{color:"#fbbf24",bg:"rgba(251,191,36,0.12)"},security:{color:"#f87171",bg:"rgba(248,113,113,0.12)"},specialized:{color:"#f59e0b",bg:"rgba(245,158,11,0.12)"},verified:{color:"#4ade80",bg:"rgba(74,222,128,0.12)"},anthropic:{color:"#f59e0b",bg:"rgba(245,158,11,0.12)"},published:{color:"#4ade80",bg:"rgba(74,222,128,0.12)"},draft:{color:"#6b7f95",bg:"rgba(255,255,255,0.06)"},review:{color:"#c678dd",bg:"rgba(198,120,221,0.12)"},rejected:{color:"#f87171",bg:"rgba(248,113,113,0.12)"},free:{color:"#4ade80",bg:"rgba(74,222,128,0.12)"}};function _2({label:e,variant:n,className:l}){const r=U0[n]||U0.draft;return s.jsx("span",{className:le("inline-flex items-center whitespace-nowrap font-sans select-none",l),style:{padding:"3px 8px",borderRadius:4,fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.4,color:r.color,background:r.bg},children:e})}function X2({price:e=0,size:n="sm"}){const l=!e||e===0,r={sm:"text-2xs px-2 py-0.5",md:"text-xs px-2.5 py-0.5",lg:"text-xs px-3 py-1"};return s.jsx("span",{className:`inline-flex items-center font-mono font-semibold rounded whitespace-nowrap ${r[n]||r.sm} ${l?"bg-success/12 text-success":"bg-white/8 text-text-1"}`,children:l?"Free":`$${e.toFixed(2)}`})}function Z2({type:e="verified",size:n=12}){const l=e==="claude-official"||e==="anthropic"?"#f59e0b":"#4ade80";return s.jsxs("svg",{width:n,height:n,viewBox:"0 0 20 20",fill:"none",className:"inline-block flex-shrink-0",children:[s.jsx("path",{d:"M10 0l2.36 3.15L16.18 2l.68 3.93L20.8 7.1l-1.87 3.52L20.8 14.14l-3.94 1.17-.68 3.93-3.82-1.15L10 21.24l-2.36-3.15-3.82 1.15-.68-3.93-3.94-1.17 1.87-3.52L-.8 7.1l3.94-1.17.68-3.93 3.82 1.15L10 0z",fill:l}),s.jsx("path",{d:"M7 10.5l2 2 4-4.5",fill:"none",stroke:"#24282f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}const E2="groove_favorites";function lm(){try{return JSON.parse(localStorage.getItem(E2)||"[]")}catch{return[]}}function u_(e){return lm().includes(e)}function f_(e){const n=lm(),l=n.indexOf(e);return l>=0?n.splice(l,1):n.push(e),localStorage.setItem(E2,JSON.stringify(n)),l<0}function O_(e){const n=new Set(lm());return e.map(l=>({...l,favorited:n.has(l.id)}))}function h_({filled:e,size:n=16}){return s.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:e?"#f87171":"none",stroke:e?"#f87171":"rgba(255,255,255,0.3)",strokeWidth:"2",children:s.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}function m_(){return s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),s.jsx("polyline",{points:"7 10 12 15 17 10"}),s.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function x_({skill:e,onClick:n}){var d,u;const[l,r]=v.useState(()=>u_(e.id));function o(f){f.stopPropagation(),r(f_(e.id))}return s.jsxs("div",{onClick:()=>n==null?void 0:n(e),className:le("flex flex-col cursor-pointer group","bg-surface-1 border border-border-subtle rounded-md","hover:border-accent/30 hover:bg-surface-2","transition-all duration-150"),style:{padding:20,minHeight:280},children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0 bg-accent/12 text-[20px]",children:e.icon||((u=(d=e.name)==null?void 0:d[0])==null?void 0:u.toUpperCase())||"?"}),s.jsx("button",{onClick:o,className:"opacity-40 group-hover:opacity-80 hover:!opacity-100 transition-opacity cursor-pointer bg-transparent border-0 p-0",children:s.jsx(h_,{filled:l})})]}),s.jsx("div",{className:"mt-3 text-[15px] font-semibold text-text-0 font-sans line-clamp-2 leading-snug",children:e.name}),s.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-xs text-text-3 font-sans",children:[s.jsxs("span",{children:["by ",e.author||"Community"]}),(e.source==="claude-official"||e.verified)&&s.jsx(Z2,{type:e.source,size:12})]}),s.jsx("div",{className:"mt-2.5 text-xs text-text-2 font-sans line-clamp-3 flex-1 leading-relaxed",children:e.description}),s.jsx("div",{className:"mt-3",children:s.jsx(_2,{label:e.category||"general",variant:e.category||"draft"})}),s.jsx("div",{className:"h-px bg-border-subtle my-3"}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx(A2,{rating:e.rating||0,count:e.rating_count||e.ratingCount||0,size:"sm"}),s.jsxs("span",{className:"flex items-center gap-1 text-xs text-text-3 font-mono",children:[s.jsx(m_,{}),He(e.downloads||0)]}),s.jsx(X2,{price:e.price||0,size:"sm"})]})]})}function q2(){return s.jsxs("div",{className:"bg-surface-1 border border-border-subtle rounded-md animate-pulse",style:{padding:20,minHeight:280},children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-surface-4"}),s.jsx("div",{className:"mt-3 h-4 w-[70%] rounded bg-surface-4"}),s.jsx("div",{className:"mt-2 h-3 w-[40%] rounded bg-surface-4"}),s.jsx("div",{className:"mt-3.5 h-3 w-full rounded bg-surface-4"}),s.jsx("div",{className:"mt-1.5 h-3 w-[90%] rounded bg-surface-4"}),s.jsx("div",{className:"mt-1.5 h-3 w-[60%] rounded bg-surface-4"}),s.jsx("div",{className:"mt-3.5 h-5 w-[50px] rounded bg-surface-4"}),s.jsx("div",{className:"h-px bg-surface-4 my-3"}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("div",{className:"h-3 w-16 rounded bg-surface-4"}),s.jsx("div",{className:"h-3 w-12 rounded bg-surface-4"}),s.jsx("div",{className:"h-3 w-10 rounded bg-surface-4"})]})]})}const p_={"google-workspace":"https://cdn.simpleicons.org/google/white",github:"https://cdn.simpleicons.org/github/white",stripe:"https://cdn.simpleicons.org/stripe/635BFF",gmail:"https://cdn.simpleicons.org/gmail/EA4335","google-calendar":"https://cdn.simpleicons.org/googlecalendar/4285F4","google-drive":"https://cdn.simpleicons.org/googledrive/4285F4","google-docs":"https://cdn.simpleicons.org/googledocs/4285F4","google-sheets":"https://cdn.simpleicons.org/googlesheets/34A853","google-slides":"https://cdn.simpleicons.org/googleslides/FBBC04","google-maps":"https://cdn.simpleicons.org/googlemaps/4285F4",postgres:"https://cdn.simpleicons.org/postgresql/4169E1",notion:"https://cdn.simpleicons.org/notion/white",linear:"https://cdn.simpleicons.org/linear/5E6AD2","brave-search":"https://cdn.simpleicons.org/brave/FB542B","home-assistant":"https://cdn.simpleicons.org/homeassistant/18BCF2",sentry:"https://cdn.simpleicons.org/sentry/362D59",elevenlabs:"https://cdn.simpleicons.org/elevenlabs/white",hubspot:"https://cdn.simpleicons.org/hubspot/FF7A59",jira:"https://cdn.simpleicons.org/jira/0052CC",sendgrid:"https://cdn.simpleicons.org/sendgrid/1A82E2",resend:"https://cdn.simpleicons.org/resend/white",replicate:"https://cdn.simpleicons.org/replicate/white",vercel:"https://cdn.simpleicons.org/vercel/white",supabase:"https://cdn.simpleicons.org/supabase/3FCF8E",mixpanel:"https://cdn.simpleicons.org/mixpanel/7856FF",datadog:"https://cdn.simpleicons.org/datadog/632CA6",airtable:"https://cdn.simpleicons.org/airtable/18BFFF",zendesk:"https://cdn.simpleicons.org/zendesk/03363D",intercom:"https://cdn.simpleicons.org/intercom/6AFDEF",twilio:"https://cdn.simpleicons.org/twilio/F22F46",telnyx:"https://cdn.simpleicons.org/telnyx/00C08B",aws:"https://cdn.simpleicons.org/amazonaws/FF9900",plaid:"https://cdn.simpleicons.org/plaid/white"};function g_({item:e,size:n=40}){const l=p_[e.id];if(l)return s.jsxs("div",{className:"rounded-md bg-surface-4 flex items-center justify-center flex-shrink-0 overflow-hidden",style:{width:n,height:n},children:[s.jsx("img",{src:l,alt:e.name,className:"w-5 h-5",onError:d=>{d.target.style.display="none",d.target.nextSibling.style.display="flex"}}),s.jsx("div",{className:"hidden items-center justify-center w-full h-full text-lg font-bold font-sans text-text-1",children:(e.name||"?")[0]})]});const r=(e.name||"?")[0].toUpperCase(),o=e.name?e.name.charCodeAt(0)*37%360:200;return s.jsx("div",{className:"rounded-md flex items-center justify-center flex-shrink-0 text-lg font-bold font-sans",style:{width:n,height:n,background:`hsl(${o}, 40%, 18%)`,color:`hsl(${o}, 60%, 65%)`},children:r})}function od({item:e,onClick:n,className:l,statusBadge:r}){var d;const o=e.installed;return s.jsxs("button",{onClick:()=>n(e),className:le("flex flex-col p-5 rounded-md border border-border-subtle bg-surface-1 text-left","hover:border-accent/30 hover:bg-surface-2","transition-all duration-150 cursor-pointer group",l),style:{minHeight:200},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx(g_,{item:e,size:36}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-[14px] font-semibold text-text-0 font-sans truncate",children:e.name}),(e.verified||e.verified==="mcp-official")&&s.jsx(ja,{size:11,className:"text-accent flex-shrink-0"})]}),s.jsx("span",{className:"text-2xs text-text-3 font-sans",children:e.author||"Community"})]})]}),s.jsx("p",{className:"text-xs text-text-2 font-sans line-clamp-3 mb-3 flex-1 leading-relaxed",children:e.description}),s.jsx("div",{className:"h-px bg-border-subtle my-2"}),s.jsxs("div",{className:"flex items-center gap-3 text-2xs text-text-3 font-sans",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(rl,{size:10}),He(e.downloads||0)]}),(e.rating||0)>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Xh,{size:10,className:"text-warning",fill:"currentColor"}),(d=e.rating)==null?void 0:d.toFixed(1)]}),s.jsx("span",{className:"flex-1"}),r||o&&s.jsx(Te,{variant:"accent",className:"text-2xs",children:e._installedCount?`${e._installedCount} active`:"Installed"})]})]})}function rm({value:e,onChange:n,placeholder:l="Search skills, tags, authors...",large:r}){const[o,d]=v.useState(e||""),u=v.useRef(null);v.useEffect(()=>{d(e||"")},[e]);function f(h){const x=h.target.value;d(x),clearTimeout(u.current),u.current=setTimeout(()=>n(x),300)}return s.jsxs("div",{className:"relative w-full",children:[s.jsx(yn,{size:16,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-4 pointer-events-none"}),s.jsx("input",{value:o,onChange:f,placeholder:l,className:le("w-full font-sans outline-none","bg-surface-0 border border-border text-text-0 placeholder:text-text-4","focus:border-accent/40 transition-colors",r?"py-3 pl-11 pr-12 text-[15px] rounded-lg":"py-2.5 pl-10 pr-3 text-sm rounded-md")}),r&&s.jsx("kbd",{className:"absolute right-3.5 top-1/2 -translate-y-1/2 bg-surface-4 text-text-4 px-2 py-0.5 rounded text-xs font-mono",children:"/"})]})}const b_=[{id:"",label:"All"},{id:"design",label:"Design"},{id:"quality",label:"Quality"},{id:"devtools",label:"Dev Tools"},{id:"workflow",label:"Workflow"},{id:"security",label:"Security"},{id:"specialized",label:"Specialized"}];function v_({selected:e="",categories:n=b_,onSelect:l}){return s.jsx("div",{className:"flex gap-2 overflow-x-auto",style:{scrollbarWidth:"none"},children:n.map(r=>{const o=e===r.id;return s.jsx("button",{onClick:()=>l(r.id),className:le("whitespace-nowrap font-sans cursor-pointer select-none transition-all text-[13px] rounded-full border",o?"bg-accent text-surface-0 border-accent font-semibold":"bg-surface-1 text-text-3 border-border-subtle hover:text-text-1 hover:border-border font-medium"),style:{padding:"7px 16px"},children:r.label},r.id)})})}function wn(){const e=M(n=>n.addToast);return{success:(n,l)=>e("success",n,l),error:(n,l)=>e("error",n,l),info:(n,l)=>e("info",n,l),warning:(n,l)=>e("warning",n,l)}}var $O="focusScope.autoFocusOnMount",TO="focusScope.autoFocusOnUnmount",V0={bubbles:!1,cancelable:!0},y_="FocusScope",M2=v.forwardRef((e,n)=>{const{loop:l=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:d,...u}=e,[f,h]=v.useState(null),x=Dt(o),g=Dt(d),p=v.useRef(null),b=gt(n,w=>h(w)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let w=function(P){if(y.paused||!f)return;const R=P.target;f.contains(R)?p.current=R:fa(p.current,{select:!0})},k=function(P){if(y.paused||!f)return;const R=P.relatedTarget;R!==null&&(f.contains(R)||fa(p.current,{select:!0}))},Q=function(P){if(document.activeElement===document.body)for(const Y of P)Y.removedNodes.length>0&&fa(f)};document.addEventListener("focusin",w),document.addEventListener("focusout",k);const C=new MutationObserver(Q);return f&&C.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k),C.disconnect()}}},[r,f,y.paused]),v.useEffect(()=>{if(f){D0.add(y);const w=document.activeElement;if(!f.contains(w)){const Q=new CustomEvent($O,V0);f.addEventListener($O,x),f.dispatchEvent(Q),Q.defaultPrevented||(S_(N_(Y2(f)),{select:!0}),document.activeElement===w&&fa(f))}return()=>{f.removeEventListener($O,x),setTimeout(()=>{const Q=new CustomEvent(TO,V0);f.addEventListener(TO,g),f.dispatchEvent(Q),Q.defaultPrevented||fa(w??document.body,{select:!0}),f.removeEventListener(TO,g),D0.remove(y)},0)}}},[f,x,g,y]);const j=v.useCallback(w=>{if(!l&&!r||y.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,Q=document.activeElement;if(k&&Q){const C=w.currentTarget,[P,R]=j_(C);P&&R?!w.shiftKey&&Q===R?(w.preventDefault(),l&&fa(P,{select:!0})):w.shiftKey&&Q===P&&(w.preventDefault(),l&&fa(R,{select:!0})):Q===C&&w.preventDefault()}},[l,r,y.paused]);return s.jsx(et.div,{tabIndex:-1,...u,ref:b,onKeyDown:j})});M2.displayName=y_;function S_(e,{select:n=!1}={}){const l=document.activeElement;for(const r of e)if(fa(r,{select:n}),document.activeElement!==l)return}function j_(e){const n=Y2(e),l=G0(n,e),r=G0(n.reverse(),e);return[l,r]}function Y2(e){const n=[],l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)n.push(l.currentNode);return n}function G0(e,n){for(const l of e)if(!Q_(l,{upTo:n}))return l}function Q_(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function w_(e){return e instanceof HTMLInputElement&&"select"in e}function fa(e,{select:n=!1}={}){if(e&&e.focus){const l=document.activeElement;e.focus({preventScroll:!0}),e!==l&&w_(e)&&n&&e.select()}}var D0=k_();function k_(){let e=[];return{add(n){const l=e[0];n!==l&&(l==null||l.pause()),e=L0(e,n),e.unshift(n)},remove(n){var l;e=L0(e,n),(l=e[0])==null||l.resume()}}}function L0(e,n){const l=[...e],r=l.indexOf(n);return r!==-1&&l.splice(r,1),l}function N_(e){return e.filter(n=>n.tagName!=="A")}var PO=0;function $_(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??W0()),document.body.insertAdjacentElement("beforeend",e[1]??W0()),PO++,()=>{PO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),PO--}},[])}function W0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wn=function(){return Wn=Object.assign||function(n){for(var l,r=1,o=arguments.length;r<o;r++){l=arguments[r];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(n[d]=l[d])}return n},Wn.apply(this,arguments)};function U2(e,n){var l={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(l[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(l[r[o]]=e[r[o]]);return l}function T_(e,n,l){if(l||arguments.length===2)for(var r=0,o=n.length,d;r<o;r++)(d||!(r in n))&&(d||(d=Array.prototype.slice.call(n,0,r)),d[r]=n[r]);return e.concat(d||Array.prototype.slice.call(n))}var Ec="right-scroll-bar-position",qc="width-before-scroll-bar",P_="with-scroll-bars-hidden",C_="--removed-body-scroll-bar-size";function CO(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function z_(e,n){var l=v.useState(function(){return{value:e,callback:n,facade:{get current(){return l.value},set current(r){var o=l.value;o!==r&&(l.value=r,l.callback(r,o))}}}})[0];return l.callback=n,l.facade}var R_=typeof window<"u"?v.useLayoutEffect:v.useEffect,B0=new WeakMap;function A_(e,n){var l=z_(null,function(r){return e.forEach(function(o){return CO(o,r)})});return R_(function(){var r=B0.get(l);if(r){var o=new Set(r),d=new Set(e),u=l.current;o.forEach(function(f){d.has(f)||CO(f,null)}),d.forEach(function(f){o.has(f)||CO(f,u)})}B0.set(l,e)},[e]),l}function __(e){return e}function X_(e,n){n===void 0&&(n=__);var l=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:e},useMedium:function(d){var u=n(d,r);return l.push(u),function(){l=l.filter(function(f){return f!==u})}},assignSyncMedium:function(d){for(r=!0;l.length;){var u=l;l=[],u.forEach(d)}l={push:function(f){return d(f)},filter:function(){return l}}},assignMedium:function(d){r=!0;var u=[];if(l.length){var f=l;l=[],f.forEach(d),u=l}var h=function(){var g=u;u=[],g.forEach(d)},x=function(){return Promise.resolve().then(h)};x(),l={push:function(g){u.push(g),x()},filter:function(g){return u=u.filter(g),l}}}};return o}function Z_(e){e===void 0&&(e={});var n=X_(null);return n.options=Wn({async:!0,ssr:!1},e),n}var V2=function(e){var n=e.sideCar,l=U2(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Wn({},l))};V2.isSideCarExport=!0;function E_(e,n){return e.useMedium(n),V2}var G2=Z_(),zO=function(){},Pd=v.forwardRef(function(e,n){var l=v.useRef(null),r=v.useState({onScrollCapture:zO,onWheelCapture:zO,onTouchMoveCapture:zO}),o=r[0],d=r[1],u=e.forwardProps,f=e.children,h=e.className,x=e.removeScrollBar,g=e.enabled,p=e.shards,b=e.sideCar,y=e.noRelative,j=e.noIsolation,w=e.inert,k=e.allowPinchZoom,Q=e.as,C=Q===void 0?"div":Q,P=e.gapMode,R=U2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Y=b,X=A_([l,n]),z=Wn(Wn({},R),o);return v.createElement(v.Fragment,null,g&&v.createElement(Y,{sideCar:G2,removeScrollBar:x,shards:p,noRelative:y,noIsolation:j,inert:w,setCallbacks:d,allowPinchZoom:!!k,lockRef:l,gapMode:P}),u?v.cloneElement(v.Children.only(f),Wn(Wn({},z),{ref:X})):v.createElement(C,Wn({},z,{className:h,ref:X}),f))});Pd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pd.classNames={fullWidth:qc,zeroRight:Ec};var q_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function M_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=q_();return n&&e.setAttribute("nonce",n),e}function Y_(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function U_(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var V_=function(){var e=0,n=null;return{add:function(l){e==0&&(n=M_())&&(Y_(n,l),U_(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},G_=function(){var e=V_();return function(n,l){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&l])}},D2=function(){var e=G_(),n=function(l){var r=l.styles,o=l.dynamic;return e(r,o),null};return n},D_={left:0,top:0,right:0,gap:0},RO=function(e){return parseInt(e||"",10)||0},L_=function(e){var n=window.getComputedStyle(document.body),l=n[e==="padding"?"paddingLeft":"marginLeft"],r=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[RO(l),RO(r),RO(o)]},W_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return D_;var n=L_(e),l=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-l+n[2]-n[0])}},B_=D2(),fr="data-scroll-locked",I_=function(e,n,l,r){var o=e.left,d=e.top,u=e.right,f=e.gap;return l===void 0&&(l="margin"),`
629
+ .`.concat(P_,` {
630
+ overflow: hidden `).concat(r,`;
631
+ padding-right: `).concat(f,"px ").concat(r,`;
632
+ }
633
+ body[`).concat(fr,`] {
634
+ overflow: hidden `).concat(r,`;
635
+ overscroll-behavior: contain;
636
+ `).concat([n&&"position: relative ".concat(r,";"),l==="margin"&&`
637
+ padding-left: `.concat(o,`px;
638
+ padding-top: `).concat(d,`px;
639
+ padding-right: `).concat(u,`px;
640
+ margin-left:0;
641
+ margin-top:0;
642
+ margin-right: `).concat(f,"px ").concat(r,`;
643
+ `),l==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
644
+ }
645
+
646
+ .`).concat(Ec,` {
647
+ right: `).concat(f,"px ").concat(r,`;
648
+ }
649
+
650
+ .`).concat(qc,` {
651
+ margin-right: `).concat(f,"px ").concat(r,`;
652
+ }
653
+
654
+ .`).concat(Ec," .").concat(Ec,` {
655
+ right: 0 `).concat(r,`;
656
+ }
657
+
658
+ .`).concat(qc," .").concat(qc,` {
659
+ margin-right: 0 `).concat(r,`;
660
+ }
661
+
662
+ body[`).concat(fr,`] {
663
+ `).concat(C_,": ").concat(f,`px;
664
+ }
665
+ `)},I0=function(){var e=parseInt(document.body.getAttribute(fr)||"0",10);return isFinite(e)?e:0},H_=function(){v.useEffect(function(){return document.body.setAttribute(fr,(I0()+1).toString()),function(){var e=I0()-1;e<=0?document.body.removeAttribute(fr):document.body.setAttribute(fr,e.toString())}},[])},F_=function(e){var n=e.noRelative,l=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;H_();var d=v.useMemo(function(){return W_(o)},[o]);return v.createElement(B_,{styles:I_(d,!n,o,l?"":"!important")})},oh=!1;if(typeof window<"u")try{var Qc=Object.defineProperty({},"passive",{get:function(){return oh=!0,!0}});window.addEventListener("test",Qc,Qc),window.removeEventListener("test",Qc,Qc)}catch{oh=!1}var tr=oh?{passive:!1}:!1,K_=function(e){return e.tagName==="TEXTAREA"},L2=function(e,n){if(!(e instanceof Element))return!1;var l=window.getComputedStyle(e);return l[n]!=="hidden"&&!(l.overflowY===l.overflowX&&!K_(e)&&l[n]==="visible")},J_=function(e){return L2(e,"overflowY")},eX=function(e){return L2(e,"overflowX")},H0=function(e,n){var l=n.ownerDocument,r=n;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=W2(e,r);if(o){var d=B2(e,r),u=d[1],f=d[2];if(u>f)return!0}r=r.parentNode}while(r&&r!==l.body);return!1},tX=function(e){var n=e.scrollTop,l=e.scrollHeight,r=e.clientHeight;return[n,l,r]},nX=function(e){var n=e.scrollLeft,l=e.scrollWidth,r=e.clientWidth;return[n,l,r]},W2=function(e,n){return e==="v"?J_(n):eX(n)},B2=function(e,n){return e==="v"?tX(n):nX(n)},sX=function(e,n){return e==="h"&&n==="rtl"?-1:1},aX=function(e,n,l,r,o){var d=sX(e,window.getComputedStyle(n).direction),u=d*r,f=l.target,h=n.contains(f),x=!1,g=u>0,p=0,b=0;do{if(!f)break;var y=B2(e,f),j=y[0],w=y[1],k=y[2],Q=w-k-d*j;(j||Q)&&W2(e,f)&&(p+=Q,b+=j);var C=f.parentNode;f=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!h&&f!==document.body||h&&(n.contains(f)||n===f));return(g&&Math.abs(p)<1||!g&&Math.abs(b)<1)&&(x=!0),x},wc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F0=function(e){return[e.deltaX,e.deltaY]},K0=function(e){return e&&"current"in e?e.current:e},lX=function(e,n){return e[0]===n[0]&&e[1]===n[1]},rX=function(e){return`
666
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
667
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
668
+ `)},iX=0,nr=[];function oX(e){var n=v.useRef([]),l=v.useRef([0,0]),r=v.useRef(),o=v.useState(iX++)[0],d=v.useState(D2)[0],u=v.useRef(e);v.useEffect(function(){u.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=T_([e.lockRef.current],(e.shards||[]).map(K0),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var Q=wc(w),C=l.current,P="deltaX"in w?w.deltaX:C[0]-Q[0],R="deltaY"in w?w.deltaY:C[1]-Q[1],Y,X=w.target,z=Math.abs(P)>Math.abs(R)?"h":"v";if("touches"in w&&z==="h"&&X.type==="range")return!1;var $=window.getSelection(),F=$&&$.anchorNode,Z=F?F===X||F.contains(X):!1;if(Z)return!1;var J=H0(z,X);if(!J)return!0;if(J?Y=z:(Y=z==="v"?"h":"v",J=H0(z,X)),!J)return!1;if(!r.current&&"changedTouches"in w&&(P||R)&&(r.current=Y),!Y)return!0;var A=r.current||Y;return aX(A,k,w,A==="h"?P:R)},[]),h=v.useCallback(function(w){var k=w;if(!(!nr.length||nr[nr.length-1]!==d)){var Q="deltaY"in k?F0(k):wc(k),C=n.current.filter(function(Y){return Y.name===k.type&&(Y.target===k.target||k.target===Y.shadowParent)&&lX(Y.delta,Q)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var P=(u.current.shards||[]).map(K0).filter(Boolean).filter(function(Y){return Y.contains(k.target)}),R=P.length>0?f(k,P[0]):!u.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),x=v.useCallback(function(w,k,Q,C){var P={name:w,delta:k,target:Q,should:C,shadowParent:cX(Q)};n.current.push(P),setTimeout(function(){n.current=n.current.filter(function(R){return R!==P})},1)},[]),g=v.useCallback(function(w){l.current=wc(w),r.current=void 0},[]),p=v.useCallback(function(w){x(w.type,F0(w),w.target,f(w,e.lockRef.current))},[]),b=v.useCallback(function(w){x(w.type,wc(w),w.target,f(w,e.lockRef.current))},[]);v.useEffect(function(){return nr.push(d),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",h,tr),document.addEventListener("touchmove",h,tr),document.addEventListener("touchstart",g,tr),function(){nr=nr.filter(function(w){return w!==d}),document.removeEventListener("wheel",h,tr),document.removeEventListener("touchmove",h,tr),document.removeEventListener("touchstart",g,tr)}},[]);var y=e.removeScrollBar,j=e.inert;return v.createElement(v.Fragment,null,j?v.createElement(d,{styles:rX(o)}):null,y?v.createElement(F_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cX(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const dX=E_(G2,oX);var I2=v.forwardRef(function(e,n){return v.createElement(Pd,Wn({},e,{ref:n,sideCar:dX}))});I2.classNames=Pd.classNames;var uX=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},sr=new WeakMap,kc=new WeakMap,Nc={},AO=0,H2=function(e){return e&&(e.host||H2(e.parentNode))},fX=function(e,n){return n.map(function(l){if(e.contains(l))return l;var r=H2(l);return r&&e.contains(r)?r:(console.error("aria-hidden",l,"in not contained inside",e,". Doing nothing"),null)}).filter(function(l){return!!l})},OX=function(e,n,l,r){var o=fX(n,Array.isArray(e)?e:[e]);Nc[l]||(Nc[l]=new WeakMap);var d=Nc[l],u=[],f=new Set,h=new Set(o),x=function(p){!p||f.has(p)||(f.add(p),x(p.parentNode))};o.forEach(x);var g=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))g(b);else try{var y=b.getAttribute(r),j=y!==null&&y!=="false",w=(sr.get(b)||0)+1,k=(d.get(b)||0)+1;sr.set(b,w),d.set(b,k),u.push(b),w===1&&j&&kc.set(b,!0),k===1&&b.setAttribute(l,"true"),j||b.setAttribute(r,"true")}catch(Q){console.error("aria-hidden: cannot operate on ",b,Q)}})};return g(n),f.clear(),AO++,function(){u.forEach(function(p){var b=sr.get(p)-1,y=d.get(p)-1;sr.set(p,b),d.set(p,y),b||(kc.has(p)||p.removeAttribute(r),kc.delete(p)),y||p.removeAttribute(l)}),AO--,AO||(sr=new WeakMap,sr=new WeakMap,kc=new WeakMap,Nc={})}},hX=function(e,n,l){l===void 0&&(l="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=uX(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),OX(r,o,l,"aria-hidden")):function(){return null}},Cd="Dialog",[F2]=ml(Cd),[mX,qn]=F2(Cd),K2=e=>{const{__scopeDialog:n,children:l,open:r,defaultOpen:o,onOpenChange:d,modal:u=!0}=e,f=v.useRef(null),h=v.useRef(null),[x,g]=gd({prop:r,defaultProp:o??!1,onChange:d,caller:Cd});return s.jsx(mX,{scope:n,triggerRef:f,contentRef:h,contentId:or(),titleId:or(),descriptionId:or(),open:x,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(p=>!p),[g]),modal:u,children:l})};K2.displayName=Cd;var J2="DialogTrigger",xX=v.forwardRef((e,n)=>{const{__scopeDialog:l,...r}=e,o=qn(J2,l),d=gt(n,o.triggerRef);return s.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cm(o.open),...r,ref:d,onClick:Ge(e.onClick,o.onOpenToggle)})});xX.displayName=J2;var im="DialogPortal",[pX,eS]=F2(im,{forceMount:void 0}),tS=e=>{const{__scopeDialog:n,forceMount:l,children:r,container:o}=e,d=qn(im,n);return s.jsx(pX,{scope:n,forceMount:l,children:v.Children.map(r,u=>s.jsx(Xn,{present:l||d.open,children:s.jsx(wh,{asChild:!0,container:o,children:u})}))})};tS.displayName=im;var cd="DialogOverlay",nS=v.forwardRef((e,n)=>{const l=eS(cd,e.__scopeDialog),{forceMount:r=l.forceMount,...o}=e,d=qn(cd,e.__scopeDialog);return d.modal?s.jsx(Xn,{present:r||d.open,children:s.jsx(bX,{...o,ref:n})}):null});nS.displayName=cd;var gX=Yc("DialogOverlay.RemoveScroll"),bX=v.forwardRef((e,n)=>{const{__scopeDialog:l,...r}=e,o=qn(cd,l);return s.jsx(I2,{as:gX,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(et.div,{"data-state":cm(o.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),ul="DialogContent",sS=v.forwardRef((e,n)=>{const l=eS(ul,e.__scopeDialog),{forceMount:r=l.forceMount,...o}=e,d=qn(ul,e.__scopeDialog);return s.jsx(Xn,{present:r||d.open,children:d.modal?s.jsx(vX,{...o,ref:n}):s.jsx(yX,{...o,ref:n})})});sS.displayName=ul;var vX=v.forwardRef((e,n)=>{const l=qn(ul,e.__scopeDialog),r=v.useRef(null),o=gt(n,l.contentRef,r);return v.useEffect(()=>{const d=r.current;if(d)return hX(d)},[]),s.jsx(aS,{...e,ref:o,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,d=>{var u;d.preventDefault(),(u=l.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,d=>{const u=d.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&d.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,d=>d.preventDefault())})}),yX=v.forwardRef((e,n)=>{const l=qn(ul,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return s.jsx(aS,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,d),d.defaultPrevented||(r.current||(f=l.triggerRef.current)==null||f.focus(),d.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:d=>{var h,x;(h=e.onInteractOutside)==null||h.call(e,d),d.defaultPrevented||(r.current=!0,d.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=d.target;((x=l.triggerRef.current)==null?void 0:x.contains(u))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&o.current&&d.preventDefault()}})}),aS=v.forwardRef((e,n)=>{const{__scopeDialog:l,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:d,...u}=e,f=qn(ul,l),h=v.useRef(null),x=gt(n,h);return $_(),s.jsxs(s.Fragment,{children:[s.jsx(M2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:d,children:s.jsx(xh,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":cm(f.open),...u,ref:x,onDismiss:()=>f.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(SX,{titleId:f.titleId}),s.jsx(QX,{contentRef:h,descriptionId:f.descriptionId})]})]})}),om="DialogTitle",lS=v.forwardRef((e,n)=>{const{__scopeDialog:l,...r}=e,o=qn(om,l);return s.jsx(et.h2,{id:o.titleId,...r,ref:n})});lS.displayName=om;var rS="DialogDescription",iS=v.forwardRef((e,n)=>{const{__scopeDialog:l,...r}=e,o=qn(rS,l);return s.jsx(et.p,{id:o.descriptionId,...r,ref:n})});iS.displayName=rS;var oS="DialogClose",cS=v.forwardRef((e,n)=>{const{__scopeDialog:l,...r}=e,o=qn(oS,l);return s.jsx(et.button,{type:"button",...r,ref:n,onClick:Ge(e.onClick,()=>o.onOpenChange(!1))})});cS.displayName=oS;function cm(e){return e?"open":"closed"}var dS="DialogTitleWarning",[uE,uS]=Pk(dS,{contentName:ul,titleName:om,docsSlug:"dialog"}),SX=({titleId:e})=>{const n=uS(dS),l=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
669
+
670
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
671
+
672
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(l))},[l,e]),null},jX="DialogDescriptionWarning",QX=({contentRef:e,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uS(jX).contentName}}.`;return v.useEffect(()=>{var d;const o=(d=e.current)==null?void 0:d.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},fS=K2,OS=tS,hS=nS,mS=sS,xS=lS,pS=iS,gS=cS;function ba({children:e,...n}){return s.jsx(fS,{...n,children:e})}function va({children:e,className:n,title:l,description:r,...o}){return s.jsxs(OS,{children:[s.jsx(hS,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),s.jsxs(mS,{className:le("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full max-w-lg max-h-[85vh] overflow-y-auto","bg-surface-1 border border-border rounded-lg shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n),...o,children:[l&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border-subtle",children:[s.jsx(xS,{className:"text-base font-semibold text-text-0 font-sans",children:l}),s.jsx(gS,{className:"p-1 rounded-md text-text-3 hover:text-text-0 hover:bg-surface-5 transition-colors",children:s.jsx(rt,{size:16})})]}),r&&s.jsx(pS,{className:"sr-only",children:r}),e]})]})}const dd=v.forwardRef(({className:e,label:n,error:l,mono:r,...o},d)=>s.jsxs("div",{className:"flex flex-col gap-1",children:[n&&s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:n}),s.jsx("input",{ref:d,className:le("h-8 w-full rounded-md px-3 text-sm","bg-surface-1 border border-border text-text-0","placeholder:text-text-4","focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent","disabled:opacity-40 disabled:cursor-not-allowed","transition-colors duration-100",r?"font-mono":"font-sans",l&&"border-danger focus:ring-danger",e),...o}),l&&s.jsx("span",{className:"text-2xs text-danger font-sans",children:l})]}));dd.displayName="Input";const wX=v.forwardRef(({className:e,label:n,error:l,mono:r,...o},d)=>s.jsxs("div",{className:"flex flex-col gap-1",children:[n&&s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:n}),s.jsx("textarea",{ref:d,className:le("w-full rounded-md px-3 py-2 text-sm resize-none","bg-surface-1 border border-border text-text-0","placeholder:text-text-4","focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent","disabled:opacity-40 disabled:cursor-not-allowed","transition-colors duration-100",r?"font-mono":"font-sans",l&&"border-danger focus:ring-danger",e),...o}),l&&s.jsx("span",{className:"text-2xs text-danger font-sans",children:l})]}));wX.displayName="Textarea";const kX={slack:"https://cdn.simpleicons.org/slack/E01E5A",github:"https://cdn.simpleicons.org/github/white",stripe:"https://cdn.simpleicons.org/stripe/635BFF",gmail:"https://cdn.simpleicons.org/gmail/EA4335","google-calendar":"https://cdn.simpleicons.org/googlecalendar/4285F4","google-drive":"https://cdn.simpleicons.org/googledrive/4285F4","google-docs":"https://cdn.simpleicons.org/googledocs/4285F4","google-sheets":"https://cdn.simpleicons.org/googlesheets/34A853","google-slides":"https://cdn.simpleicons.org/googleslides/FBBC04","google-maps":"https://cdn.simpleicons.org/googlemaps/4285F4",postgres:"https://cdn.simpleicons.org/postgresql/4169E1",notion:"https://cdn.simpleicons.org/notion/white",discord:"https://cdn.simpleicons.org/discord/5865F2",linear:"https://cdn.simpleicons.org/linear/5E6AD2","brave-search":"https://cdn.simpleicons.org/brave/FB542B","home-assistant":"https://cdn.simpleicons.org/homeassistant/18BCF2"};function dm({item:e,size:n=48}){const l=kX[e.id];if(l)return s.jsx("div",{className:"rounded-lg bg-surface-4 flex items-center justify-center flex-shrink-0 overflow-hidden",style:{width:n,height:n},children:s.jsx("img",{src:l,alt:e.name,className:"w-6 h-6",onError:d=>{d.target.style.display="none"}})});const r=(e.name||"?")[0].toUpperCase(),o=e.name?e.name.charCodeAt(0)*37%360:200;return s.jsx("div",{className:"rounded-lg flex items-center justify-center flex-shrink-0 text-xl font-bold font-sans",style:{width:n,height:n,background:`hsl(${o}, 40%, 18%)`,color:`hsl(${o}, 60%, 65%)`},children:r})}function ch({value:e,onChange:n,placeholder:l,disabled:r}){const[o,d]=v.useState(!1);return s.jsxs("div",{className:"relative",children:[s.jsx(dd,{type:o?"text":"password",value:e,onChange:u=>n(u.target.value),placeholder:l,disabled:r,mono:!0,className:"pr-9"}),s.jsx("button",{type:"button",onClick:()=>d(u=>!u),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded text-text-4 hover:text-text-1 transition-colors cursor-pointer",tabIndex:-1,children:o?s.jsx(yd,{size:14}):s.jsx(xl,{size:14})})]})}function NX({integrationId:e,envKey:n,onSaved:l}){const r=wn(),[o,d]=v.useState(""),[u,f]=v.useState(!1),[h,x]=v.useState(n.set),[g,p]=v.useState(!1);async function b(){if(o.trim()){f(!0);try{await B.post(`/integrations/${e}/credentials`,{key:n.key,value:o.trim()}),x(!0),d(""),r.success(`${n.label} saved`),l==null||l()}catch(j){r.error("Failed to save",j.message)}f(!1)}}async function y(){p(!0);try{await B.delete(`/integrations/${e}/credentials/${n.key}`),x(!1),r.success(`${n.label} removed`),l==null||l()}catch(j){r.error("Failed to remove",j.message)}p(!1)}return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("label",{className:"text-xs font-medium text-text-2 font-sans flex items-center gap-1.5",children:[s.jsx(ol,{size:11,className:"text-text-4"}),n.label,n.required&&s.jsx("span",{className:"text-danger",children:"*"})]}),h&&s.jsxs("span",{className:"flex items-center gap-1 text-2xs text-success font-sans",children:[s.jsx(kt,{size:10})," Set"]})]}),h?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-8 rounded-md px-3 bg-surface-2 border border-border-subtle flex items-center",children:s.jsx("span",{className:"text-xs text-text-4 font-mono tracking-widest",children:"*".repeat(16)})}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:y,disabled:g,className:"text-text-3 hover:text-danger",children:g?s.jsx(at,{size:12,className:"animate-spin"}):s.jsx(Sn,{size:12})})]}):s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsx(ch,{value:o,onChange:d,placeholder:n.placeholder||`Enter ${n.label.toLowerCase()}...`,disabled:u})}),s.jsx(ue,{variant:"primary",size:"sm",onClick:b,disabled:u||!o.trim(),children:u?s.jsx(at,{size:12,className:"animate-spin"}):"Save"})]})]})}function $X({item:e,status:n,installing:l,onInstall:r,onUninstall:o,onNext:d}){var f;const u=n==null?void 0:n.installed;return s.jsxs("div",{className:"px-5 py-5 space-y-5",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(dm,{item:e,size:52}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h2",{className:"text-base font-bold text-text-0 font-sans",children:e.name}),(e.verified==="mcp-official"||e.verified==="verified")&&s.jsxs(Te,{variant:"accent",className:"text-2xs gap-1",children:[s.jsx(cl,{size:9})," Verified"]})]}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-0.5",children:e.author||"Community"}),e.category&&s.jsx(Te,{variant:"default",className:"text-2xs mt-2",children:e.category})]})]}),s.jsx("p",{className:"text-sm text-text-2 font-sans leading-relaxed",children:e.description}),((f=e.tags)==null?void 0:f.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.tags.map(h=>s.jsx("span",{className:"text-2xs text-text-3 font-sans px-2 py-0.5 rounded bg-surface-4",children:h},h))}),s.jsx("div",{className:"h-px bg-border-subtle"}),u?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[s.jsx(ja,{size:16,className:"text-success"}),s.jsx("span",{className:"text-sm font-medium text-success font-sans",children:"Installed"})]}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:o,className:"text-text-3 hover:text-danger gap-1.5",children:[s.jsx(Sn,{size:12})," Uninstall"]}),s.jsxs(ue,{variant:"primary",size:"sm",onClick:d,className:"gap-1",children:["Configure ",s.jsx(Na,{size:12})]})]}):s.jsx(ue,{variant:"primary",size:"lg",onClick:r,disabled:l,className:"w-full gap-2",children:l?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:14,className:"animate-spin"}),"Installing..."]}):"Install"}),l&&s.jsx("p",{className:"text-2xs text-text-4 font-sans text-center",children:"This may take up to 30 seconds..."})]})}const TX={gmail:"Gmail API","google-calendar":"Google Calendar API","google-drive":"Google Drive API","google-docs":"Google Docs API","google-sheets":"Google Sheets API","google-slides":"Google Slides API"};function bS({integrationId:e,onConfigured:n}){const l=wn(),[r,o]=v.useState(""),[d,u]=v.useState(""),[f,h]=v.useState(!1),x=TX[e]||"the relevant Google API";async function g(){if(!(!r.trim()||!d.trim())){h(!0);try{await B.post("/integrations/google-oauth/setup",{clientId:r.trim(),clientSecret:d.trim()}),l.success("Google OAuth credentials saved"),n()}catch(y){l.error("Failed to save",y.message)}h(!1)}}const b=[{text:"Go to the Google Cloud Console and sign in with your Google account",link:{url:"https://console.cloud.google.com",label:"Open Google Cloud Console"}},{text:"Create a new project (or select an existing one). Any name is fine — this is just a container for your credentials."},{text:s.jsxs(s.Fragment,{children:["Enable the ",s.jsx("strong",{children:x})," — search for it in the API Library and click ",s.jsx("strong",{children:"Enable"})]}),link:{url:"https://console.cloud.google.com/apis/library",label:"Open API Library"}},{text:s.jsxs(s.Fragment,{children:["Go to ",s.jsx("strong",{children:"Credentials"})," and click ",s.jsx("strong",{children:"Create Credentials"})," → ",s.jsx("strong",{children:"OAuth client ID"})]}),link:{url:"https://console.cloud.google.com/apis/credentials",label:"Open Credentials page"}},{text:s.jsxs(s.Fragment,{children:["If prompted to configure the consent screen, choose ",s.jsx("strong",{children:"External"}),', fill in an app name (e.g. "Groove"), your email, and save. You can skip optional fields.']})},{text:s.jsxs(s.Fragment,{children:["For Application type, choose ",s.jsx("strong",{children:"Web application"}),". Give it any name."]})},{text:s.jsxs(s.Fragment,{children:["Under ",s.jsx("strong",{children:"Authorized redirect URIs"}),", click ",s.jsx("strong",{children:"Add URI"})," and paste this exact URL:"]}),copyable:"http://localhost:31415/api/integrations/oauth/callback"},{text:s.jsxs(s.Fragment,{children:["Click ",s.jsx("strong",{children:"Create"}),", then copy the ",s.jsx("strong",{children:"Client ID"})," and ",s.jsx("strong",{children:"Client Secret"})," and paste them below."]})}];return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-surface-2 rounded-md px-4 py-3 space-y-3",children:[s.jsx("span",{className:"text-xs font-semibold text-text-1 font-sans",children:"How to get your Google credentials"}),s.jsx("ol",{className:"space-y-2.5",children:b.map((y,j)=>s.jsxs("li",{className:"flex gap-2.5 text-xs text-text-2 font-sans leading-relaxed",children:[s.jsxs("span",{className:"text-accent font-mono font-bold flex-shrink-0 w-4 text-right",children:[j+1,"."]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{children:y.text}),y.link&&s.jsxs("a",{href:y.link.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-2xs text-accent font-sans hover:underline mt-0.5",children:[s.jsx(Fn,{size:9}),y.link.label]}),y.copyable&&s.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[s.jsx("code",{className:"flex-1 min-w-0 text-2xs font-mono text-accent bg-surface-4 px-2.5 py-1.5 rounded select-all break-all",children:y.copyable}),s.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(y.copyable)},className:"flex-shrink-0 p-1.5 rounded text-text-3 hover:text-accent hover:bg-accent/10 transition-colors cursor-pointer",title:"Copy to clipboard",children:s.jsx(Bc,{size:12})})]})]})]},j))})]}),s.jsx("div",{className:"bg-accent/8 border border-accent/15 rounded-md px-4 py-2.5",children:s.jsxs("p",{className:"text-2xs text-text-2 font-sans leading-relaxed",children:[s.jsx("strong",{className:"text-text-1",children:"One-time setup"})," — these same credentials work for Gmail, Calendar, Drive, Docs, Sheets, and Slides. You only need to do this once. For each integration, just enable the matching API in your Google Cloud project."]})}),s.jsx("div",{className:"h-px bg-border-subtle"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-xs font-medium text-text-2 font-sans flex items-center gap-1.5",children:[s.jsx(ol,{size:11,className:"text-text-4"}),"Client ID ",s.jsx("span",{className:"text-danger",children:"*"})]}),s.jsx(ch,{value:r,onChange:o,placeholder:"123456789.apps.googleusercontent.com",disabled:f})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-xs font-medium text-text-2 font-sans flex items-center gap-1.5",children:[s.jsx(ol,{size:11,className:"text-text-4"}),"Client Secret ",s.jsx("span",{className:"text-danger",children:"*"})]}),s.jsx(ch,{value:d,onChange:u,placeholder:"GOCSPX-...",disabled:f})]})]}),s.jsx(ue,{variant:"primary",size:"lg",onClick:g,disabled:f||!r.trim()||!d.trim(),className:"w-full gap-2",children:f?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:14,className:"animate-spin"})," Saving..."]}):"Save Credentials"})]})}function PX({item:e,status:n,onDone:l,onRefreshStatus:r}){var w;const o=wn(),[d,u]=v.useState(!1),[f,h]=v.useState(null),x=e.authType,g=x==="google-autoauth"||x==="oauth-google";v.useEffect(()=>{g&&B.get("/integrations/google-oauth/status").then(k=>h(k.configured)).catch(()=>h(!1))},[g]);async function p(){u(!0);try{const k=await B.post(`/integrations/${e.id}/oauth/start`);k.url&&(window.open(k.url,"_blank","noopener"),o.success("Browser opened — complete sign-in there"))}catch(k){o.error("Sign-in failed",k.message)}u(!1)}const b=(n==null?void 0:n.envKeys)||[],y=b.filter(k=>k.required&&!k.hidden),j=y.length===0||y.every(k=>k.set);return s.jsxs("div",{className:"px-5 py-5 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(dm,{item:e,size:36}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-sm font-bold text-text-0 font-sans",children:["Configure ",e.name]}),s.jsx("p",{className:"text-2xs text-text-3 font-sans",children:"Set up credentials to connect"})]})]}),((w=e.setupSteps)==null?void 0:w.length)>0&&!(g&&f===!1)&&s.jsxs("div",{className:"bg-surface-2 rounded-md px-4 py-3 space-y-2",children:[s.jsx("span",{className:"text-xs font-semibold text-text-1 font-sans",children:"Setup guide"}),s.jsx("ol",{className:"space-y-1.5",children:e.setupSteps.map((k,Q)=>s.jsxs("li",{className:"flex gap-2 text-xs text-text-2 font-sans leading-relaxed",children:[s.jsxs("span",{className:"text-text-4 font-mono flex-shrink-0 w-4 text-right",children:[Q+1,"."]}),s.jsx("span",{children:k})]},Q))}),e.setupUrl&&s.jsxs("a",{href:e.setupUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-accent font-sans hover:underline mt-1",children:[s.jsx(Fn,{size:11}),new URL(e.setupUrl).hostname]})]}),!(g&&f===!1)&&s.jsx("div",{className:"h-px bg-border-subtle"}),x==="api-key"&&s.jsx("div",{className:"space-y-4",children:b.filter(k=>!k.hidden).map(k=>s.jsx(NX,{integrationId:e.id,envKey:k,onSaved:r},k.key))}),g&&f===!1&&s.jsx(bS,{integrationId:e.id,onConfigured:()=>h(!0)}),g&&f&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(ue,{variant:"primary",size:"lg",onClick:p,disabled:d,className:"w-full gap-2",children:d?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:14,className:"animate-spin"}),"Opening browser..."]}):s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"https://cdn.simpleicons.org/google/white",alt:"",className:"w-4 h-4"}),"Sign in with Google"]})}),s.jsxs("p",{className:"text-2xs text-text-4 font-sans text-center",children:["A browser window will open — sign in and allow access to your ",e.name]}),s.jsx("button",{type:"button",onClick:()=>h(!1),className:"w-full text-2xs text-text-4 font-sans hover:text-text-2 transition-colors cursor-pointer py-1",children:"Reconfigure Google OAuth credentials"})]}),g&&f===null&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(at,{size:16,className:"animate-spin text-text-4"})}),s.jsx(ue,{variant:j?"primary":"secondary",size:"lg",onClick:l,className:"w-full gap-1.5",children:j?s.jsxs(s.Fragment,{children:[s.jsx(kt,{size:14}),"Done"]}):"Skip for now"})]})}function CX({item:e,onClose:n}){return s.jsxs("div",{className:"px-5 py-10 flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"w-14 h-14 rounded-full bg-success/15 flex items-center justify-center",children:s.jsx(ja,{size:28,className:"text-success"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-bold text-text-0 font-sans",children:"Integration ready"}),s.jsxs("p",{className:"text-sm text-text-3 font-sans mt-1",children:[e.name," is installed and configured. Agents can now use it."]})]}),s.jsx(ue,{variant:"primary",size:"lg",onClick:n,className:"mt-2",children:"Close"})]})}function vS({integration:e,open:n,onClose:l}){const r=wn(),[o,d]=v.useState("overview"),[u,f]=v.useState(null),[h,x]=v.useState(!1),[g,p]=v.useState(!0),b=e==null?void 0:e.id,y=v.useCallback(async()=>{if(b){try{const C=await B.get(`/integrations/${b}/status`);f(C)}catch{f(null)}p(!1)}},[b]);v.useEffect(()=>{n&&e&&(d("overview"),p(!0),y())},[n,e,y]);async function j(){x(!0);try{await B.post(`/integrations/${e.id}/install`),r.success(`${e.name} installed`),await y(),d("configure")}catch(C){r.error("Install failed",C.message)}x(!1)}async function w(){try{await B.delete(`/integrations/${e.id}`),r.success(`${e.name} uninstalled`),await y()}catch(C){r.error("Uninstall failed",C.message)}}function k(){d("configure")}function Q(){d("done")}return e?s.jsx(ba,{open:n,onOpenChange:C=>{C||l()},children:s.jsx(va,{title:o==="overview"?e.name:o==="configure"?"Configure":"Complete",description:`Setup wizard for ${e.name}`,className:"max-w-md",children:g?s.jsx("div",{className:"px-5 py-10 flex items-center justify-center",children:s.jsx(at,{size:20,className:"animate-spin text-text-4"})}):o==="overview"?s.jsx($X,{item:e,status:u,installing:h,onInstall:j,onUninstall:w,onNext:k}):o==="configure"?s.jsx(PX,{item:e,status:u,onDone:Q,onRefreshStatus:y}):s.jsx(CX,{item:e,onClose:l})})}):null}const zX=["gmail","google-calendar","google-drive","google-docs","google-sheets","google-slides"];function RX({item:e,status:n,onInstall:l,onUninstall:r,busy:o}){const d=n==null?void 0:n.installed,u=n==null?void 0:n.authenticated;return s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md bg-surface-2 border border-border-subtle",children:[s.jsx(dm,{item:e,size:32}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-text-0 font-sans",children:e.name}),s.jsx("div",{className:"text-2xs text-text-3 font-sans truncate",children:e.description})]}),d&&u&&!(n!=null&&n.needsReauth)&&s.jsxs(Te,{variant:"success",className:"text-2xs flex-shrink-0 gap-1",children:[s.jsx(kt,{size:8})," Ready"]}),d&&u&&(n==null?void 0:n.needsReauth)&&s.jsxs(Te,{variant:"warning",className:"text-2xs flex-shrink-0 gap-1",children:[s.jsx(Zn,{size:8})," Update"]}),d&&!u&&s.jsx(Te,{variant:"warning",className:"text-2xs flex-shrink-0",children:"Needs sign-in"}),s.jsx(ue,{variant:d?"ghost":"primary",size:"sm",onClick:()=>d?r(e.id):l(e.id),disabled:o===e.id,className:d?"text-text-3 hover:text-danger":"",children:o===e.id?s.jsx(at,{size:12,className:"animate-spin"}):d?s.jsx(Sn,{size:12}):"Install"})]})}function AX({integrations:e,open:n,onClose:l}){const r=wn(),[o,d]=v.useState(null),[u,f]=v.useState({}),[h,x]=v.useState(null),[g,p]=v.useState(!1),[b,y]=v.useState(!0),j=v.useRef(null),w=e.filter(z=>zX.includes(z.id)),k=v.useCallback(async()=>{const z={};await Promise.all(w.map(async $=>{try{z[$.id]=await B.get(`/integrations/${$.id}/status`)}catch{z[$.id]=null}})),f(z),y(!1)},[w.map(z=>z.id).join(",")]);v.useEffect(()=>(n&&(y(!0),B.get("/integrations/google-oauth/status").then(z=>d(z.configured)).catch(()=>d(!1)),k()),()=>{j.current&&clearInterval(j.current)}),[n]);const Q=Object.entries(u).filter(([,z])=>z==null?void 0:z.installed).map(([z])=>z),C=Q.length>0&&Q.every(z=>{var $;return($=u[z])==null?void 0:$.authenticated});Q.some(z=>{var $;return!(($=u[z])!=null&&$.authenticated)});const P=C&&Q.some(z=>{var $;return($=u[z])==null?void 0:$.needsReauth});async function R(z){var $;x(z);try{await B.post(`/integrations/${z}/install`),r.success(`${($=w.find(F=>F.id===z))==null?void 0:$.name} installed`),await k()}catch(F){r.error("Install failed",F.message)}x(null)}async function Y(z){var $;x(z);try{await B.delete(`/integrations/${z}`),r.success(`${($=w.find(F=>F.id===z))==null?void 0:$.name} removed`),await k()}catch(F){r.error("Uninstall failed",F.message)}x(null)}async function X(){if(!Q.length){r.error("Install at least one service first");return}p(!0);try{const z=await B.post("/integrations/google-workspace/oauth/start",{integrationIds:Q});z.url&&(window.open(z.url,"_blank","noopener"),r.success("Browser opened — complete sign-in there"),j.current&&clearInterval(j.current),j.current=setInterval(async()=>{await k()},3e3),setTimeout(()=>{j.current&&clearInterval(j.current)},18e4))}catch(z){r.error("Sign-in failed",z.message)}p(!1)}return v.useEffect(()=>{C&&j.current&&(clearInterval(j.current),j.current=null)},[C]),n?s.jsx(ba,{open:n,onOpenChange:z=>{z||l()},children:s.jsx(va,{title:"Google Workspace",description:"Connect your Google services",className:"max-w-md",children:s.jsxs("div",{className:"px-5 py-5 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-11 h-11 rounded-lg bg-surface-4 flex items-center justify-center flex-shrink-0",children:s.jsx("img",{src:"https://cdn.simpleicons.org/google/white",alt:"Google",className:"w-6 h-6"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-bold text-text-0 font-sans",children:"Google Workspace"}),s.jsx("p",{className:"text-2xs text-text-3 font-sans",children:"One set of credentials for all Google services"})]})]}),o===!1&&s.jsx(bS,{integrationId:"gmail",onConfigured:()=>d(!0)}),o===null&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(at,{size:16,className:"animate-spin text-text-4"})}),o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-semibold text-text-2 font-sans",children:"Services"}),s.jsx("div",{className:"space-y-1.5",children:b?Array.from({length:4}).map((z,$)=>s.jsx("div",{className:"h-14 rounded-md bg-surface-2 animate-pulse"},$)):w.map(z=>s.jsx(RX,{item:z,status:u[z.id],onInstall:R,onUninstall:Y,busy:h},z.id))})]}),s.jsx("div",{className:"h-px bg-border-subtle"}),Q.length>0&&!C&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(ue,{variant:"primary",size:"lg",onClick:X,disabled:g,className:"w-full gap-2",children:g?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:14,className:"animate-spin"})," Opening browser..."]}):s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"https://cdn.simpleicons.org/google/white",alt:"",className:"w-4 h-4"}),"Sign in with Google"]})}),s.jsxs("p",{className:"text-2xs text-text-4 font-sans text-center",children:["Connects ",Q.length," service",Q.length!==1?"s":""," with one sign-in"]})]}),C&&Q.length>0&&s.jsxs("div",{className:"flex flex-col items-center text-center gap-2 py-2",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-success/15 flex items-center justify-center",children:s.jsx(ja,{size:20,className:"text-success"})}),s.jsx("p",{className:"text-sm font-medium text-success font-sans",children:"All services connected"}),s.jsx("p",{className:"text-2xs text-text-3 font-sans",children:"Your agents can now use these Google integrations."}),P?s.jsxs("div",{className:"w-full space-y-2 pt-2",children:[s.jsx("p",{className:"text-2xs text-warning font-sans",children:"New permissions available — re-authenticate to enable all features."}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:X,disabled:g,className:"w-full gap-2",children:g?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:12,className:"animate-spin"})," Opening browser..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Zn,{size:12})," Re-authenticate"]})})]}):s.jsx("button",{onClick:X,disabled:g,className:"text-2xs text-text-4 hover:text-text-2 font-sans underline underline-offset-2 transition-colors mt-1",children:g?"Opening browser...":"Re-authenticate"})]}),Q.length===0&&!b&&s.jsx("p",{className:"text-xs text-text-4 font-sans text-center py-2",children:"Install at least one service above, then connect with Google."})]}),s.jsx(ue,{variant:"secondary",size:"lg",onClick:l,className:"w-full",children:C&&Q.length>0?"Done":"Close"})]})})}):null}const _O=/github\.com\/([^/]+)\/([^/\s#?]+)/;function _X(){const[e,n]=v.useState("input"),[l,r]=v.useState(""),[o,d]=v.useState(!1),[u,f]=v.useState(null),[h,x]=v.useState("standalone"),[g,p]=v.useState(""),[b,y]=v.useState(!0),[j,w]=v.useState(""),k=M(z=>z.previewRepo),Q=M(z=>z.importRepo),C=M(z=>z.importInProgress),P=wn(),R=v.useCallback(async z=>{const $=z.match(_O);if($){d(!0);try{const F=await k(z);f(F),w(F.name||$[2]),n("preview")}catch(F){P.error("Preview failed",F.message)}finally{d(!1)}}},[k,P]),Y=v.useCallback(z=>{const $=z.target.value;r($),_O.test($)&&e==="input"&&R($)},[e,R]),X=v.useCallback(async()=>{if(!u)return;let z;h==="standalone"?z=`~/Projects/${u.name}`:h==="subdirectory"?z=`./packages/${u.name}`:z=g;try{await Q(l,z,b,j),P.success(`Importing ${u.name}`,"Setup agent will handle the rest"),n("input"),r(""),f(null)}catch($){P.error("Import failed",$.message)}},[u,h,g,l,b,j,Q,P]);if(e==="input")return s.jsxs("div",{className:"relative",children:[s.jsx(yn,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-4 pointer-events-none"}),s.jsx("input",{type:"text",value:l,onChange:Y,placeholder:"Paste a GitHub URL...",className:le("w-full h-9 rounded-lg pl-9 pr-20 text-sm font-sans","bg-surface-1 border border-border text-text-0","placeholder:text-text-4","focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent","transition-colors duration-100")}),s.jsx(ue,{variant:"primary",size:"sm",className:"absolute right-1.5 top-1/2 -translate-y-1/2",onClick:()=>R(l),disabled:!_O.test(l)||o,children:o?s.jsx(at,{size:12,className:"animate-spin"}):"Preview"})]});if(e==="preview"&&u)return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"rounded-lg border border-border-subtle bg-surface-2 p-5",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent/8 flex items-center justify-center flex-shrink-0",children:s.jsx(dr,{size:22,className:"text-accent"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2.5 mb-1",children:[s.jsx("span",{className:"text-lg font-bold text-text-0 font-sans",children:u.name}),s.jsx("span",{className:"text-xs text-text-4 font-sans",children:u.owner})]}),s.jsxs("div",{className:"flex items-center gap-3 text-2xs text-text-3 font-sans",children:[u.language&&s.jsx(Te,{variant:"outline",className:"text-2xs",children:u.language}),u.stars!=null&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Xh,{size:10,className:"text-warning",fill:"currentColor"}),He(u.stars)]}),u.license&&s.jsx("span",{children:u.license})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsxs(ue,{variant:"primary",size:"sm",onClick:()=>n("configure"),className:"h-8 text-xs gap-1.5 px-4",children:[s.jsx(il,{size:13}),"Clone & Setup"]}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:()=>window.open(l.startsWith("http")?l:`https://${l}`,"_blank"),className:"h-8 text-xs gap-1.5",children:[s.jsx(Fn,{size:12}),"GitHub"]}),s.jsx("button",{onClick:()=>{n("input"),f(null)},className:"text-2xs text-text-4 font-sans hover:text-text-2 cursor-pointer bg-transparent border-0 ml-1",children:"Cancel"})]})]})}),u.description&&s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-1 px-5 py-4",children:[s.jsx("h4",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider mb-2",children:"About"}),s.jsx("p",{className:"text-sm text-text-1 font-sans leading-relaxed",children:u.description})]}),u.readmePreview&&s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-1 px-5 py-4",children:[s.jsx("h4",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider mb-3",children:"README"}),s.jsx("div",{className:"text-sm text-text-2 font-sans leading-relaxed whitespace-pre-wrap",children:u.readmePreview})]})]});if(e==="configure"&&u){const z=[{id:"standalone",icon:Sd,title:"Standalone project",description:"Clone to its own directory, separate from this workspace",path:`~/Projects/${u.name}`},{id:"subdirectory",icon:wv,title:"Workspace package",description:"Add as a package inside this project's monorepo",path:`./packages/${u.name}`},{id:"custom",icon:qT,title:"Custom location",description:"Choose your own path",path:null}];return s.jsxs("div",{className:"rounded-xl border border-border-subtle bg-surface-2 overflow-hidden",children:[s.jsx("div",{className:"px-5 py-4 border-b border-border-subtle bg-surface-3/50",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-accent/10 flex items-center justify-center flex-shrink-0",children:s.jsx(rl,{size:16,className:"text-accent"})}),s.jsxs("div",{children:[s.jsxs("h3",{className:"text-sm font-semibold text-text-0 font-sans",children:["Clone ",u.name]}),s.jsxs("p",{className:"text-2xs text-text-4 font-sans mt-0.5",children:[u.owner,"/",u.name," — configure where to install"]})]})]})}),s.jsxs("div",{className:"px-5 py-4 space-y-5",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider mb-2.5 block",children:"Install location"}),s.jsx("div",{className:"space-y-2",children:z.map($=>{const F=$.icon,Z=h===$.id;return s.jsx("button",{onClick:()=>x($.id),className:le("w-full text-left rounded-lg border p-3.5 transition-all duration-150 cursor-pointer",Z?"border-accent bg-accent/5 ring-1 ring-accent/30":"border-border-subtle bg-surface-1 hover:border-border hover:bg-surface-1/80"),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:le("w-8 h-8 rounded-md flex items-center justify-center flex-shrink-0 mt-0.5",Z?"bg-accent/15 text-accent":"bg-surface-3 text-text-4"),children:s.jsx(F,{size:15})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:le("text-xs font-semibold font-sans",Z?"text-text-0":"text-text-2"),children:$.title}),Z&&s.jsx("div",{className:"w-4 h-4 rounded-full bg-accent flex items-center justify-center",children:s.jsx(kt,{size:10,className:"text-white"})})]}),s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-0.5 leading-relaxed",children:$.description}),$.path&&Z&&s.jsx("code",{className:"text-2xs text-accent/80 font-mono mt-1.5 block truncate",children:$.path})]})]})},$.id)})}),h==="custom"&&s.jsx("div",{className:"mt-2.5 ml-11",children:s.jsx("input",{value:g,onChange:$=>p($.target.value),placeholder:"/path/to/clone",autoFocus:!0,className:le("w-full h-9 px-3 text-xs font-mono rounded-md","bg-surface-0 border border-border text-text-0","placeholder:text-text-4","focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent","transition-colors")})})]}),s.jsxs("div",{className:"border-t border-border-subtle pt-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-8 h-8 rounded-md bg-surface-3 flex items-center justify-center",children:s.jsx(wr,{size:14,className:"text-text-4"})}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-semibold text-text-2 font-sans block",children:"Create a team"}),s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:"Organize agents working on this repo into their own team"})]})]}),s.jsx("button",{onClick:()=>y(!b),className:le("w-9 h-5 rounded-full p-0.5 transition-colors cursor-pointer flex-shrink-0",b?"bg-accent":"bg-surface-5"),children:s.jsx("div",{className:le("w-4 h-4 rounded-full bg-white shadow-sm transition-transform",b?"translate-x-4":"translate-x-0")})})]}),b&&s.jsx("div",{className:"mt-2.5 ml-11",children:s.jsx("input",{value:j,onChange:$=>w($.target.value),placeholder:"Team name",className:le("w-full h-9 px-3 text-xs font-sans rounded-md","bg-surface-0 border border-border text-text-0","placeholder:text-text-4","focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent","transition-colors")})})]})]}),s.jsxs("div",{className:"px-5 py-3.5 border-t border-border-subtle bg-surface-3/30 flex items-center justify-between",children:[s.jsxs("button",{onClick:()=>n("preview"),className:"flex items-center gap-1.5 text-2xs text-text-4 font-sans hover:text-text-2 cursor-pointer bg-transparent border-0 transition-colors",children:[s.jsx(KN,{size:11}),"Back"]}),s.jsx(ue,{variant:"primary",size:"sm",onClick:X,disabled:C||h==="custom"&&!g.trim(),className:"h-8 text-xs gap-1.5 px-5",children:C?s.jsxs(s.Fragment,{children:[s.jsx(at,{size:12,className:"animate-spin"})," Importing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(rl,{size:12})," Clone & Setup"]})})]})]})}return null}function XX({repo:e,onRemove:n,onNuke:l,onOpen:r}){return s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-2 p-3 flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:e.repoName||e.name}),s.jsx("span",{className:"text-2xs text-text-3 font-sans",children:e.repoOwner||e.owner})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.language&&s.jsx(Te,{variant:"outline",className:"text-2xs",children:e.language}),s.jsx("span",{className:"text-2xs text-text-4 font-mono truncate max-w-[180px]",children:e.clonedTo||e.path})]}),s.jsx("span",{className:"text-2xs text-text-4 font-sans mt-0.5 block",children:e.clonedAt?`Imported ${Nt(e.clonedAt)}`:e.status||""})]}),s.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[r&&s.jsxs("button",{onClick:()=>r(e),className:le("flex items-center gap-1 px-2 py-1 rounded text-2xs font-sans cursor-pointer","text-accent bg-accent/10 hover:bg-accent/20 border-0 transition-colors"),children:[s.jsx(il,{size:11}),"Open"]}),n&&s.jsxs("button",{onClick:()=>n(e),className:le("flex items-center gap-1 px-2 py-1 rounded text-2xs font-sans cursor-pointer","text-text-3 hover:text-text-1 hover:bg-surface-4 bg-transparent border-0 transition-colors"),children:[s.jsx(Sn,{size:11}),"Remove"]}),l&&s.jsxs("button",{onClick:()=>l(e),className:le("flex items-center gap-1 px-2 py-1 rounded text-2xs font-sans cursor-pointer","text-danger bg-danger/10 hover:bg-danger/20 border-0 transition-colors"),children:[s.jsx(n$,{size:11}),"Nuke"]})]})]})}function ZX({repo:e,open:n,onClose:l,onConfirm:r}){var g,p,b;const[o,d]=v.useState(!0);if(!e)return null;const u=((g=e.agents)==null?void 0:g.length)||0,f=((p=e.processes)==null?void 0:p.length)||0,h=((b=e.credentialKeys)==null?void 0:b.length)||0,x=e.fileCount||0;return s.jsx(ba,{open:n,onOpenChange:y=>{y||l()},children:s.jsx(va,{title:`Nuke ${e.repoName||e.name}?`,description:"Confirm destructive removal of imported repo",children:s.jsxs("div",{className:"px-5 py-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Ta,{size:16,className:"text-danger flex-shrink-0 mt-0.5"}),s.jsx("p",{className:"text-sm text-text-1 font-sans",children:"This cannot be undone."})]}),s.jsxs("div",{className:"space-y-1.5 text-xs text-text-2 font-sans",children:[u>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-success",children:"✓"})," Kill ",u," agent",u!==1?"s":""]}),f>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-success",children:"✓"})," Stop ",f," process",f!==1?"es":""]}),h>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-success",children:"✓"})," Remove ",h," credential",h!==1?"s":""]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-success",children:"✓"}),' Delete team "',e.teamId||e.repoName||e.name,'"']}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-success",children:"✓"})," Clean all .groove state"]})]}),s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:o,onChange:y=>d(y.target.checked),className:"accent-[var(--color-danger)]"}),s.jsxs("span",{className:"text-xs text-text-1 font-sans",children:["Delete repo files",x>0?` (${x} files)`:""]})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(ue,{variant:"danger",size:"sm",onClick:()=>r(o),children:"Nuke Everything"}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:l,children:"Cancel"})]})]})})})}function yS({skill:e,onBack:n}){var Y,X,z;const l=wn(),[r,o]=v.useState(""),[d,u]=v.useState(!1),[f,h]=v.useState(!1),[x,g]=v.useState(!1),[p,b]=v.useState(!1),[y,j]=v.useState(e.installed),[w,k]=v.useState(!0);v.useEffect(()=>{k(!0),B.get(`/skills/${e.id}/content`).then($=>{o($.content||""),u($.requiresPurchase||!1)}).catch(()=>{}).finally(()=>k(!1))},[e.id]);async function Q(){h(!0);try{await B.post(`/skills/${e.id}/install`),j(!0),l.success(`${e.name} installed`)}catch($){l.error("Install failed",$.message)}h(!1)}async function C(){g(!0);try{await B.post(`/skills/${e.id}/update`),l.success(`${e.name} updated to latest`);const $=await B.get(`/skills/${e.id}/content`);$.content&&o($.content)}catch($){l.error("Update failed",$.message)}g(!1)}async function P(){b(!0);try{await B.delete(`/skills/${e.id}`),j(!1),l.success(`${e.name} uninstalled`)}catch($){l.error("Uninstall failed",$.message)}b(!1)}async function R(){const{marketplaceAuthenticated:$,marketplaceLogin:F,marketplaceCheckout:Z}=M.getState();if(!$){F();return}try{await Z(e.id)}catch{}}return s.jsx(En,{className:"h-full",children:s.jsxs("div",{className:"px-6 py-5",children:[s.jsxs("button",{onClick:n,className:"flex items-center gap-1 text-xs text-text-3 font-sans hover:text-text-0 cursor-pointer bg-transparent border-0 mb-4",children:[s.jsx(xv,{size:14})," Back"]}),s.jsxs("div",{className:"flex gap-8",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-11 h-11 rounded-lg flex items-center justify-center flex-shrink-0 bg-accent/10 border border-accent/20 text-[22px]",children:e.icon||((X=(Y=e.name)==null?void 0:Y[0])==null?void 0:X.toUpperCase())}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"text-lg font-bold text-text-0 font-sans",children:e.name}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5 text-xs text-text-3 font-sans",children:[s.jsx("span",{children:e.author||"Community"}),(e.source==="claude-official"||e.verified)&&s.jsx(Z2,{type:e.source,size:13})]})]})]}),s.jsx("p",{className:"mt-3 text-sm text-text-2 font-sans leading-relaxed",children:e.description}),((z=e.tags)==null?void 0:z.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:e.tags.map($=>s.jsx("span",{className:"text-2xs text-text-3 font-sans px-2 py-0.5 rounded bg-surface-4",children:$},$))}),s.jsx("div",{className:"h-px bg-border-subtle my-5"}),w?s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-3 w-48 bg-surface-4 rounded animate-pulse"}),s.jsx("div",{className:"h-3 w-full bg-surface-4 rounded animate-pulse"}),s.jsx("div",{className:"h-3 w-3/4 bg-surface-4 rounded animate-pulse"})]}):r?s.jsxs("div",{className:"text-sm text-text-2 font-sans leading-relaxed",children:[s.jsx("h2",{className:"text-sm font-semibold text-text-0 mb-2",children:"About"}),s.jsx("pre",{className:"whitespace-pre-wrap font-sans",children:r})]}):d?s.jsxs("div",{className:"bg-warning/5 border border-warning/15 rounded-lg px-4 py-3",children:[s.jsx("p",{className:"text-sm text-text-1 font-sans font-medium",children:"Paid skill — purchase to view content"}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:"Sign in and purchase this skill to access its full instructions."})]}):s.jsx("p",{className:"text-xs text-text-4 font-sans",children:"Content loading failed — check your connection."})]}),s.jsx("div",{className:"w-[240px] flex-shrink-0",children:s.jsxs("div",{className:"bg-surface-1 border border-border-subtle rounded-lg p-4 sticky top-4",children:[s.jsx(X2,{price:e.price||0,size:"md"}),d&&!y?s.jsxs("button",{onClick:R,className:"w-full mt-3 py-2 px-3 text-xs font-sans font-semibold rounded cursor-pointer transition-all hover:opacity-85 flex items-center justify-center gap-2 border bg-warning/15 text-warning border-warning/20 hover:bg-warning/25",children:["Buy $",(e.price||0).toFixed(2)]}):y?s.jsxs("div",{className:"mt-3 flex flex-col gap-1.5",children:[s.jsxs("button",{onClick:C,disabled:x,className:"w-full py-2 px-3 text-xs font-sans font-semibold rounded cursor-pointer transition-all hover:opacity-85 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2 border bg-accent/15 text-accent border-accent/20 hover:bg-accent/25",children:[s.jsx(Zn,{size:12,className:x?"animate-spin":""}),x?"Updating...":"Pull Latest"]}),s.jsxs("button",{onClick:P,disabled:p,className:"w-full py-2 px-3 text-xs font-sans font-semibold rounded cursor-pointer transition-all hover:opacity-85 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2 border bg-error/10 text-error border-error/20 hover:bg-error/15",children:[s.jsx(Sn,{size:12}),p?"Removing...":"Uninstall"]})]}):s.jsx("button",{onClick:Q,disabled:f,className:"w-full mt-3 py-2 px-3 text-xs font-sans font-semibold rounded cursor-pointer transition-all hover:opacity-85 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2 border bg-accent/15 text-accent border-accent/20 hover:bg-accent/25",children:f?"Installing...":"Install"}),s.jsx("div",{className:"mt-4 flex flex-col gap-2.5",children:[["Downloads",s.jsx("span",{className:"font-mono text-text-0",children:He(e.downloads||0)},"d")],["Rating",s.jsx(A2,{rating:e.rating||0,count:e.rating_count||e.ratingCount,size:"sm"},"r")],["Version",s.jsx("span",{className:"font-mono text-text-0",children:e.version||"1.0.0"},"v")],["Category",s.jsx(_2,{label:e.category||"general",variant:e.category||"draft"},"c")],["Source",s.jsx("span",{className:"text-text-0",children:e.source==="claude-official"?"Anthropic":"Community"},"s")]].map(([$,F])=>s.jsxs("div",{className:"flex justify-between items-center text-xs font-sans",children:[s.jsx("span",{className:"text-text-3",children:$}),F]},$))})]})})]})]})})}function EX(){const[e,n]=v.useState([]),[l,r]=v.useState(!0),[o,d]=v.useState(""),[u,f]=v.useState(""),[h,x]=v.useState("popular"),[g,p]=v.useState(null);return v.useEffect(()=>{r(!0);const b=new URLSearchParams;o&&b.set("search",o),u&&b.set("category",u),h&&b.set("sort",h),B.get(`/skills/registry?${b}`).then(y=>n(O_(y.skills||y.items||(Array.isArray(y)?y:[])))).catch(()=>n([])).finally(()=>r(!1))},[o,u,h]),g?s.jsx(yS,{skill:g,onBack:()=>p(null)}):s.jsx(En,{className:"h-full",children:s.jsxs("div",{className:"px-5 py-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-72",children:s.jsx(rm,{value:o,onChange:d})}),s.jsx(v_,{selected:u,onSelect:f}),s.jsx("div",{className:"flex-1"}),s.jsxs("div",{className:"relative flex-shrink-0",children:[s.jsxs("select",{value:h,onChange:b=>x(b.target.value),className:"appearance-none font-sans cursor-pointer pr-7 py-2 pl-3 text-xs bg-surface-0 border border-border-subtle rounded text-text-1 focus:outline-none",children:[s.jsx("option",{value:"popular",children:"Popular"}),s.jsx("option",{value:"rating",children:"Top Rated"}),s.jsx("option",{value:"newest",children:"Newest"}),s.jsx("option",{value:"name",children:"A-Z"})]}),s.jsx(bn,{size:12,className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-4 pointer-events-none"})]}),s.jsx("span",{className:"text-2xs text-text-4 font-mono flex-shrink-0",children:e.length})]}),s.jsx("div",{className:"mt-4 grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:l?Array.from({length:8}).map((b,y)=>s.jsx(q2,{},y)):e.map(b=>s.jsx(x_,{skill:b,onClick:p},b.id))}),!l&&e.length===0&&s.jsx("div",{className:"text-center py-16 text-text-4 font-sans text-sm",children:"No skills found."})]})})}const J0=new Set(["gmail","google-calendar","google-drive","google-docs","google-sheets","google-slides"]);function qX(){const[e,n]=v.useState([]),[l,r]=v.useState(!0),[o,d]=v.useState(""),[u,f]=v.useState(null),[h,x]=v.useState(!1),[g,p]=v.useState(!1),b=()=>{r(!0),B.get(`/integrations/registry?search=${encodeURIComponent(o)}`).then(P=>n(P.integrations||P.items||(Array.isArray(P)?P:[]))).catch(()=>n([])).finally(()=>r(!1))};v.useEffect(()=>{b()},[o]);const y=e.filter(P=>J0.has(P.id)),j=e.filter(P=>!J0.has(P.id)),w=y.filter(P=>P.installed).length;function k(P){f(P),x(!0)}function Q(){x(!1),f(null),b()}const C=!o||"google workspace gmail calendar drive docs sheets slides".includes(o.toLowerCase());return s.jsxs(En,{className:"h-full",children:[s.jsxs("div",{className:"px-5 py-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-72",children:s.jsx(rm,{value:o,onChange:d,placeholder:"Search integrations..."})}),s.jsx("div",{className:"flex-1"}),s.jsx("span",{className:"text-2xs text-text-4 font-mono flex-shrink-0",children:j.length+(y.length>0?1:0)})]}),s.jsx("div",{className:"mt-4 grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:l?Array.from({length:6}).map((P,R)=>s.jsx(q2,{},R)):s.jsxs(s.Fragment,{children:[y.length>0&&C&&s.jsx(od,{item:{id:"google-workspace",name:"Google Workspace",description:"Gmail, Calendar, Drive, Docs, Sheets, Slides — one sign-in for all",category:"productivity",tags:["google","email","calendar","drive","docs"],verified:"mcp-official",installed:w>0,_installedCount:w},onClick:()=>p(!0)},"google-workspace"),j.map(P=>s.jsx(od,{item:P,onClick:()=>k(P)},P.id))]})}),!l&&j.length===0&&y.length===0&&s.jsx("div",{className:"text-center py-16 text-text-4 font-sans text-sm",children:"No integrations found."})]}),s.jsx(vS,{integration:u,open:h,onClose:Q}),s.jsx(AX,{integrations:e,open:g,onClose:()=>{p(!1),b()}})]})}function MX(){const e=M(D=>D.marketplaceAuthenticated),n=M(D=>D.marketplaceLogin),[l,r]=v.useState([]),[o,d]=v.useState([]),[u,f]=v.useState([]),[h,x]=v.useState(!0),[g,p]=v.useState("all"),[b,y]=v.useState(""),[j,w]=v.useState(null),[k,Q]=v.useState(null),[C,P]=v.useState(!1),R=wn(),Y=v.useRef(null),X=async()=>{const[D,V]=await Promise.all([B.get("/skills/installed").catch(()=>[]),B.get("/integrations/installed").catch(()=>[])]);d(Array.isArray(D)?D:D.skills||[]),f(Array.isArray(V)?V:V.integrations||[])};v.useEffect(()=>{x(!0),Promise.all([e?B.get("/auth/purchases").then(D=>D.purchases||[]).catch(()=>[]):Promise.resolve([]),B.get("/skills/installed").then(D=>Array.isArray(D)?D:D.skills||[]).catch(()=>[]),B.get("/integrations/installed").then(D=>Array.isArray(D)?D:D.integrations||[]).catch(()=>[])]).then(([D,V,T])=>{r(D),d(V),f(T)}).finally(()=>x(!1))},[e]);async function z(D){var T;const V=(T=D.target.files)==null?void 0:T[0];if(V){try{const L=await V.text(),ee=V.name.replace(/\.md$/i,"");await B.post("/skills/import",{name:ee,content:L}),R.success(`Imported "${ee}"`),await X()}catch(L){R.error("Import failed",L.message)}D.target.value=""}}if(j)return s.jsx(yS,{skill:j,onBack:()=>w(null)});const $=b.toLowerCase(),F=g==="all"||g==="skills"?o.filter(D=>!$||(D.name||D.id||"").toLowerCase().includes($)||(D.description||"").toLowerCase().includes($)):[],Z=g==="all"||g==="integrations"?u.filter(D=>!$||(D.name||D.id||"").toLowerCase().includes($)||(D.description||"").toLowerCase().includes($)):[],J=[...F.map(D=>({...D,_type:"skill"})),...Z.map(D=>({...D,_type:"integration"}))],A=[{id:"all",label:"All"},{id:"skills",label:"Skills"},{id:"integrations",label:"Integrations"}],U={all:"No skills or integrations installed yet. Visit the Marketplace to get started.",skills:"No skills installed.",integrations:"No integrations installed."};return h?s.jsx("div",{className:"p-5 space-y-3",children:[...Array(4)].map((D,V)=>s.jsx(gn,{className:"h-14 rounded-md"},V))}):s.jsxs(En,{className:"h-full",children:[s.jsxs("div",{className:"px-5 py-4 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsx("div",{className:"w-72",children:s.jsx(rm,{value:b,onChange:y,placeholder:"Search library..."})}),s.jsx("div",{className:"flex items-center gap-1",children:A.map(D=>s.jsx("button",{onClick:()=>p(D.id),className:`px-3 py-1.5 text-xs font-semibold font-sans rounded-full cursor-pointer select-none transition-colors ${g===D.id?"bg-accent/15 text-accent border border-accent/25":"text-text-3 hover:text-text-1 border border-transparent hover:border-border-subtle"}`,children:D.label},D.id))}),s.jsx("div",{className:"flex-1"}),s.jsx("input",{ref:Y,type:"file",accept:".md",onChange:z,className:"hidden"}),s.jsxs(ue,{variant:"secondary",size:"md",onClick:()=>{var D;return(D=Y.current)==null?void 0:D.click()},className:"gap-1.5",children:[s.jsx(v3,{size:13}),"Import .md"]}),s.jsx("span",{className:"text-2xs text-text-4 font-mono flex-shrink-0",children:J.length})]}),e&&l.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs font-semibold text-text-2 font-sans uppercase tracking-wider mb-3 flex items-center gap-1.5",children:[s.jsx(tO,{size:12}),"Purchases (",l.length,")"]}),s.jsx("div",{className:"space-y-1.5",children:l.map(D=>{var V,T;return s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md bg-surface-1 border border-border-subtle",children:[s.jsx("div",{className:"w-8 h-8 rounded-md bg-accent/10 flex items-center justify-center text-sm flex-shrink-0",children:D.skill_icon||((T=(V=D.skill_name)==null?void 0:V[0])==null?void 0:T.toUpperCase())||"?"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:D.skill_name||D.skill_id}),s.jsxs("div",{className:"text-2xs text-text-4 font-sans",children:["$",(D.amount||0).toFixed(2)," · ",Nt(D.created_at)]})]}),s.jsx(Te,{variant:"success",className:"text-2xs flex-shrink-0",children:"Owned"})]},D.id||D.skill_id)})})]}),e&&l.length===0&&s.jsxs("div",{className:"bg-surface-1 border border-border-subtle rounded-md px-4 py-6 text-center",children:[s.jsx(tO,{size:20,className:"mx-auto text-text-4 mb-2"}),s.jsx("p",{className:"text-xs text-text-3 font-sans",children:"No purchases yet"})]}),!e&&s.jsxs("div",{className:"bg-surface-1 border border-border-subtle rounded-md px-4 py-6 text-center",children:[s.jsx(tO,{size:20,className:"mx-auto text-text-4 mb-2"}),s.jsx("p",{className:"text-xs text-text-2 font-sans mb-3",children:"Sign in to see your purchases"}),s.jsxs(ue,{variant:"primary",size:"sm",onClick:n,className:"gap-1.5 mx-auto",children:[s.jsx(jd,{size:12})," Sign in"]})]}),J.length>0?s.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:J.map(D=>D._type==="skill"?s.jsx(od,{item:{...D,installed:!0},onClick:()=>w(D)},`skill-${D.id}`):s.jsx(od,{item:{...D,installed:!0},onClick:()=>{Q(D),P(!0)},statusBadge:s.jsx(Te,{variant:D.configured?"success":"warning",className:"text-2xs",children:D.configured?"Active":"Not configured"})},`int-${D.id}`))}):s.jsx("div",{className:"text-center py-16 text-text-4 font-sans text-sm",children:U[g]})]}),s.jsx(vS,{integration:k,open:C,onClose:()=>{P(!1),Q(null),X()}})]})}function YX(){const e=M(o=>o.marketplaceAuthenticated),n=M(o=>o.marketplaceUser),l=M(o=>o.marketplaceLogin),r=M(o=>o.marketplaceLogout);return e?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded bg-surface-3 border border-border-subtle",children:[s.jsx("div",{className:"w-4 h-4 rounded-full bg-accent/20 flex items-center justify-center",children:s.jsx(Tv,{size:9,className:"text-accent"})}),s.jsx("span",{className:"text-xs text-text-0 font-sans font-medium max-w-[120px] truncate",children:(n==null?void 0:n.displayName)||(n==null?void 0:n.id)||"Account"})]}),s.jsx("button",{onClick:r,className:"flex items-center gap-1 px-2 py-1.5 rounded text-xs text-text-3 hover:text-text-0 hover:bg-surface-3 font-sans cursor-pointer transition-colors",children:s.jsx(Sv,{size:11})})]}):s.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold font-sans text-text-0 bg-accent/15 border border-accent/25 rounded hover:bg-accent/25 cursor-pointer transition-colors",children:[s.jsx(jd,{size:12}),"Sign in"]})}function UX(){const e=M(x=>x.importedRepos),n=M(x=>x.fetchImportedRepos),l=M(x=>x.softRemoveRepo),r=M(x=>x.hardNukeRepo),o=wn(),[d,u]=v.useState(null);v.useEffect(()=>{n()},[]);async function f(x){try{await l(x.id),o.success(`Removed ${x.repoName||x.name}`)}catch(g){o.error("Remove failed",g.message)}}async function h(x){if(d){try{x?await r(d.id):await l(d.id),o.success(`${x?"Nuked":"Removed"} ${d.name||d.repo}`)}catch(g){o.error("Nuke failed",g.message)}u(null)}}return s.jsxs(En,{className:"h-full",children:[s.jsxs("div",{className:"px-5 py-4 space-y-5",children:[s.jsx(_X,{}),e.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-semibold text-text-2 font-sans uppercase tracking-wider mb-3",children:"Recently Imported"}),s.jsx("div",{className:"space-y-2",children:(Array.isArray(e)?e:[]).map(x=>s.jsx(XX,{repo:x,onRemove:()=>f(x),onNuke:()=>u(x)},x.id))})]}),e.length===0&&s.jsx("div",{className:"text-center py-16 text-text-4 font-sans text-sm",children:"No repos imported yet. Paste a GitHub URL above to get started."})]}),s.jsx(ZX,{repo:d,open:!!d,onClose:()=>u(null),onConfirm:h})]})}function VX(){const[e,n]=v.useState("skills"),l=[{id:"skills",label:"Skills",icon:tl},{id:"integrations",label:"Integrations",icon:pa},{id:"github",label:"GitHub",icon:dr},{id:"library",label:"My Library",icon:wv}];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"flex-shrink-0 bg-surface-1 border-b border-border-subtle",children:s.jsxs("div",{className:"flex items-center px-5 h-11",children:[s.jsx("div",{className:"flex items-center",children:l.map(r=>{const o=r.icon;return s.jsxs("button",{onClick:()=>n(r.id),className:`flex items-center gap-1.5 px-3 py-2.5 text-xs font-semibold font-sans cursor-pointer select-none border-b-2 -mb-px transition-colors ${e===r.id?"border-accent text-text-0":"border-transparent text-text-3 hover:text-text-1"}`,children:[s.jsx(o,{size:12}),r.label]},r.id)})}),s.jsx("div",{className:"flex-1"}),s.jsx(YX,{})]})}),s.jsxs("div",{className:"flex-1 min-h-0",children:[e==="skills"&&s.jsx(EX,{}),e==="integrations"&&s.jsx(qX,{}),e==="github"&&s.jsx(UX,{}),e==="library"&&s.jsx(MX,{})]})]})}function GX(){const e=M(d=>d.teams),n=M(d=>d.agents),l=M(d=>d.activeTeamId),r=M(d=>d.deleteTeam),o=M(d=>d.addToast);return e.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx(wr,{size:28,className:"mx-auto text-text-4"}),s.jsx("p",{className:"text-xs font-sans text-text-3",children:"No teams yet"}),s.jsx("p",{className:"text-2xs font-sans text-text-4",children:"Teams are created when you spawn agents or launch a planner"})]})}):s.jsx("div",{className:"flex-1 overflow-y-auto",children:s.jsx("div",{className:"p-4 space-y-3",children:e.map(d=>{const u=n.filter(y=>y.teamId===d.id),f=u.filter(y=>y.status==="running"||y.status==="starting"),h=u.filter(y=>y.status==="completed"),x=u.filter(y=>y.status==="crashed"),g=u.reduce((y,j)=>y+(j.tokensUsed||0),0),p=u.reduce((y,j)=>y+(j.costUsd||0),0),b=d.id===l;return s.jsxs("div",{className:le("rounded-md border bg-surface-1 overflow-hidden transition-colors",b?"border-accent/30":"border-border-subtle"),children:[s.jsxs("div",{className:"px-4 py-3 flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-semibold text-text-0 font-sans",children:d.name}),b&&s.jsx(Te,{variant:"accent",className:"text-2xs",children:"Active"})]}),d.workingDir&&s.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[s.jsx(bv,{size:10,className:"text-text-4"}),s.jsx("span",{className:"text-2xs font-mono text-text-3 truncate",children:d.workingDir})]})]}),s.jsx("button",{onClick:()=>{if(u.some(y=>y.status==="running")){o("error","Stop running agents first");return}r(d.id)},className:"p-1.5 text-text-4 hover:text-danger rounded transition-colors cursor-pointer",title:"Delete team",children:s.jsx(Sn,{size:13})})]}),s.jsxs("div",{className:"px-4 py-2.5 border-t border-border-subtle bg-surface-0 flex items-center gap-4",children:[s.jsx(ar,{label:"Agents",value:u.length}),s.jsx(ar,{label:"Running",value:f.length,color:f.length>0?"text-success":void 0}),s.jsx(ar,{label:"Done",value:h.length}),s.jsx(ar,{label:"Crashed",value:x.length,color:x.length>0?"text-danger":void 0}),s.jsx("div",{className:"flex-1"}),s.jsx(ar,{label:"Tokens",value:He(g)}),p>0&&s.jsx(ar,{label:"Cost",value:Pa(p)})]}),u.length>0&&s.jsx("div",{className:"border-t border-border-subtle",children:u.map(y=>s.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 border-b border-border-subtle last:border-b-0",children:[s.jsx(zs,{status:y.status,size:"sm"}),s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:y.name}),s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase",children:y.role}),s.jsx("div",{className:"flex-1"}),s.jsx("span",{className:"text-2xs font-mono text-text-2 tabular-nums",children:He(y.tokensUsed||0)})]},y.id))})]},d.id)})})})}function ar({label:e,value:n,color:l}){return s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:le("text-xs font-mono tabular-nums",l||"text-text-1"),children:n}),s.jsx("div",{className:"text-2xs font-mono text-text-4 uppercase tracking-wider",children:e})]})}function DX(){const e=M(r=>r.pendingApprovals),n=M(r=>r.approveRequest),l=M(r=>r.rejectRequest);return e.length===0?null:s.jsxs("div",{className:"px-4 pt-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Ta,{size:12,className:"text-warning"}),s.jsxs("span",{className:"text-2xs font-mono text-warning uppercase tracking-wider",children:["Pending (",e.length,")"]})]}),e.map(r=>{var o,d,u;return s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-md bg-warning/5 border border-warning/20",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"text-xs text-text-0 font-sans font-medium truncate",children:[r.agentName,": ",((o=r.action)==null?void 0:o.description)||((d=r.action)==null?void 0:d.type)||"action"]}),((u=r.action)==null?void 0:u.filePath)&&s.jsx("div",{className:"text-2xs font-mono text-text-3 truncate mt-0.5",children:r.action.filePath}),s.jsx("div",{className:"text-2xs text-text-4 font-mono mt-0.5",children:Nt(r.requestedAt)})]}),s.jsxs("div",{className:"flex gap-1.5 flex-shrink-0",children:[s.jsxs(ue,{variant:"primary",size:"sm",onClick:()=>n(r.id),className:"h-7 px-2.5 gap-1 text-2xs",children:[s.jsx(Ah,{size:10})," Approve"]}),s.jsxs(ue,{variant:"danger",size:"sm",onClick:()=>l(r.id),className:"h-7 px-2.5 gap-1 text-2xs",children:[s.jsx($v,{size:10})," Reject"]})]})]},r.id)})]})}function LX(){const e=M(h=>h.resolvedApprovals),[n,l]=v.useState([]),[r,o]=v.useState(!0);v.useEffect(()=>{const h=setInterval(d,4e3);return d(),()=>clearInterval(h)},[]);async function d(){try{const h=await B.get("/pm/history");l(h.history||h||[])}catch{}o(!1)}const u=new Set,f=[...e,...n].filter(h=>{const x=h.id||`${h.agentName}-${h.timestamp}`;return u.has(x)?!1:(u.add(x),!0)});return s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s.jsx(DX,{}),s.jsxs("div",{className:"p-4 space-y-1.5",children:[r&&f.length===0&&s.jsx("div",{className:"text-center py-12 text-text-4 font-mono text-xs",children:"Loading..."}),!r&&f.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(ja,{size:24,className:"mx-auto mb-2 text-text-4"}),s.jsx("p",{className:"text-xs font-sans text-text-3",children:"No approval history"}),s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-1",children:"Approvals appear when agents use Auto permission mode"})]}),f.map((h,x)=>{var p;const g=h.status==="approved"||h.verdict==="approved";return s.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2 rounded-md bg-surface-0 border border-border-subtle",children:[g?s.jsx(ja,{size:12,className:"text-success flex-shrink-0"}):s.jsx(pv,{size:12,className:"text-danger flex-shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"text-xs text-text-1 font-sans truncate",children:[s.jsx("span",{className:"font-medium text-text-0",children:h.agentName}),s.jsx("span",{className:"text-text-3 mx-1",children:"·"}),s.jsx("span",{children:((p=h.action)==null?void 0:p.description)||h.action||"action"})]}),h.reason&&s.jsx("div",{className:"text-2xs text-text-3 font-sans truncate mt-0.5",children:h.reason})]}),s.jsx("span",{className:"text-2xs font-mono text-text-4 flex-shrink-0",children:Nt(h.resolvedAt||h.timestamp)})]},h.id||x)})]})]})}function WX(){const[e,n]=v.useState([]),[l,r]=v.useState(!0),o=wn();v.useEffect(()=>{const f=setInterval(d,1e4);return d(),()=>clearInterval(f)},[]);async function d(){try{const f=await B.get("/schedules");n(f.schedules||f||[])}catch{}r(!1)}async function u(f,h){try{await B.post(`/schedules/${f}/${h?"disable":"enable"}`),d()}catch(x){o.error("Failed to toggle schedule",x.message)}}return s.jsx("div",{className:"flex-1 overflow-y-auto",children:s.jsxs("div",{className:"p-4 space-y-2",children:[l&&e.length===0&&s.jsx("div",{className:"text-center py-12 text-text-4 font-mono text-xs",children:"Loading..."}),!l&&e.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Wc,{size:24,className:"mx-auto mb-2 text-text-4"}),s.jsx("p",{className:"text-xs font-sans text-text-3",children:"No schedules configured"}),s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-1",children:"Use the CLI to create agent schedules"})]}),e.map(f=>s.jsxs("div",{className:"rounded-md border border-border-subtle bg-surface-0 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans",children:f.name}),s.jsx(Te,{variant:f.enabled?"success":"default",className:"text-2xs",children:f.enabled?"Active":"Paused"})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"text-2xs font-mono text-text-2",children:f.cron}),s.jsx("span",{className:"text-2xs text-text-4",children:"·"}),s.jsx("span",{className:"text-2xs font-mono text-text-3 uppercase",children:f.role}),f.teamId&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-2xs text-text-4",children:"·"}),s.jsx("span",{className:"text-2xs font-sans text-text-3",children:f.teamName||f.teamId})]})]}),f.prompt&&s.jsx("div",{className:"text-2xs font-sans text-text-4 mt-1 truncate",children:f.prompt})]}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>u(f.id,f.enabled),className:"h-7 px-2.5 gap-1 text-2xs",children:f.enabled?s.jsxs(s.Fragment,{children:[s.jsx(ZT,{size:10})," Pause"]}):s.jsxs(s.Fragment,{children:[s.jsx(GT,{size:10})," Enable"]})})]}),f.lastRunAt&&s.jsxs("div",{className:"px-4 py-1.5 border-t border-border-subtle bg-surface-1 text-2xs font-mono text-text-4",children:["Last run: ",Nt(f.lastRunAt),f.nextRunAt&&s.jsxs("span",{className:"ml-3",children:["Next: ",Nt(f.nextRunAt)]})]})]},f.id))]})})}function BX(){return s.jsxs(z2,{defaultValue:"dashboard",className:"flex flex-col h-full",children:[s.jsxs("div",{className:"px-4 pt-3 bg-surface-1 border-b border-border",children:[s.jsx("div",{className:"flex items-center gap-4 mb-0",children:s.jsx("h2",{className:"text-xs font-semibold text-text-0 font-sans tracking-wide uppercase",children:"Management"})}),s.jsxs(R2,{className:"border-b-0",children:[s.jsxs(nl,{value:"dashboard",className:"inline-flex items-center gap-1.5",children:[s.jsx(uT,{size:12}),"Teams"]}),s.jsxs(nl,{value:"approvals",className:"inline-flex items-center gap-1.5",children:[s.jsx(OT,{size:12}),"Approvals"]}),s.jsxs(nl,{value:"schedules",className:"inline-flex items-center gap-1.5",children:[s.jsx(Wc,{size:12}),"Schedules"]})]})]}),s.jsx(sl,{value:"dashboard",className:"flex-1 min-h-0",children:s.jsx(GX,{})}),s.jsx(sl,{value:"approvals",className:"flex-1 min-h-0",children:s.jsx(LX,{})}),s.jsx(sl,{value:"schedules",className:"flex-1 min-h-0",children:s.jsx(WX,{})})]})}const IX={code:"Code",general:"General"},HX={light:"text-success",medium:"text-accent",heavy:"text-warning"};function FX(e){return e<1?`${Math.round(e*1024)} MB`:`${e} GB`}function SS({hardware:e}){if(!e)return null;const{totalRamGb:n,gpu:l,isAppleSilicon:r}=e;return s.jsxs("div",{className:"flex items-center gap-3 bg-surface-0 rounded-lg border border-border-subtle px-3 py-2.5",children:[s.jsx(Ch,{size:14,className:"text-text-3 flex-shrink-0"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2 text-xs font-sans",children:[s.jsxs("span",{className:"text-text-0 font-semibold",children:[n," GB RAM"]}),l&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-text-4",children:"·"}),s.jsx("span",{className:"text-text-2",children:l.name})]}),r&&s.jsx(Te,{variant:"accent",className:"text-2xs",children:"Unified Memory"})]})})]})}function KX({onRecheck:e}){const[n,l]=v.useState(null),[r,o]=v.useState(!1),[d,u]=v.useState(!1),[f,h]=v.useState(!1),x=M(R=>R.addToast);v.useEffect(()=>{B.post("/providers/ollama/check").then(l).catch(()=>{})},[]);async function g(){o(!0);try{const R=await B.post("/providers/ollama/check");l(R),R.installed&&R.serverRunning?(x("success","Ollama is ready!"),e()):R.installed?x("info","Ollama installed — server needs to start"):x("info","Ollama not found — install and try again")}catch{}o(!1)}async function p(){u(!0);try{if((await B.post("/providers/ollama/serve")).ok){x("success","Ollama server started!");let Y=!1;for(let X=0;X<5;X++){await new Promise($=>setTimeout($,2e3));const z=await B.post("/providers/ollama/check");if(l(z),z.serverRunning){Y=!0;break}}Y&&e()}}catch(R){x("error","Could not start server",R.message)}u(!1)}function b(R){navigator.clipboard.writeText(R),h(!0),setTimeout(()=>h(!1),2e3)}if(!n)return s.jsx("div",{className:"py-4 text-center text-xs text-text-4 font-sans",children:"Loading..."});const{hardware:y,install:j,requirements:w,installed:k,serverRunning:Q}=n,C=y.totalRamGb>=w.minRAM,P=y.recommended;return s.jsxs("div",{className:"space-y-3 p-3",children:[s.jsx(SS,{hardware:y}),C?s.jsxs("div",{className:"flex items-start gap-2 bg-success/8 border border-success/20 rounded-lg px-3 py-2.5",children:[s.jsx(kt,{size:14,className:"text-success flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-xs font-sans",children:[s.jsx("span",{className:"text-success font-semibold",children:"Your system is ready."}),s.jsx("span",{className:"text-text-2 ml-1",children:P.code?`Recommended: ${P.code}`:`${y.totalRamGb} GB RAM available`})]})]}):s.jsxs("div",{className:"flex items-start gap-2 bg-warning/8 border border-warning/20 rounded-lg px-3 py-2.5",children:[s.jsx(Cs,{size:14,className:"text-warning flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-xs font-sans text-text-2",children:[s.jsxs("span",{className:"text-warning font-semibold",children:[y.totalRamGb," GB RAM detected."]})," ","Minimum ",w.minRAM," GB needed. Smallest models may still work."]})]}),k&&!Q&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-start gap-2 bg-warning/8 border border-warning/20 rounded-lg px-3 py-2.5",children:[s.jsx(Cs,{size:14,className:"text-warning flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-xs font-sans text-text-2",children:[s.jsx("span",{className:"text-warning font-semibold",children:"Ollama installed but server not running."})," ","The server needs to be running to pull and use models."]})]}),s.jsxs(ue,{variant:"primary",size:"md",onClick:p,disabled:d,className:"w-full gap-1.5",children:[s.jsx(Jn,{size:12}),d?"Starting...":"Start Ollama Server"]})]}),!k&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:"text-xs font-semibold text-text-1 font-sans",children:"Install Ollama"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"flex-1 bg-surface-0 border border-border-subtle rounded-md px-3 py-2 text-xs font-mono text-text-1 truncate",children:j.command}),s.jsxs(ue,{variant:"secondary",size:"sm",onClick:()=>b(j.command),className:"h-8 px-2.5 gap-1 flex-shrink-0",children:[f?s.jsx(kt,{size:12}):s.jsx(Bc,{size:12}),f?"Copied":"Copy"]})]}),j.alt&&s.jsx("p",{className:"text-2xs text-text-4 font-sans",children:j.alt})]}),s.jsxs(ue,{variant:"secondary",size:"md",onClick:g,disabled:r,className:"w-full gap-1.5",children:[s.jsx(Zn,{size:12,className:r?"animate-spin":""}),r?"Checking...":k?"Check again":"I installed it — check again"]})]})}function JX({model:e,isInstalled:n,isRecommended:l,canRun:r,onPull:o,onDelete:d,pulling:u}){const f=u===e.id;return s.jsxs("div",{className:le("flex items-center gap-2 px-3 py-2 border-t border-border-subtle transition-colors",!r&&"opacity-40"),children:[n?s.jsx(kt,{size:12,className:"text-success flex-shrink-0"}):s.jsx("div",{className:"w-3"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-mono text-text-1 truncate",children:e.name}),l&&s.jsx(Xh,{size:10,className:"text-warning flex-shrink-0"})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[s.jsx("span",{className:le("text-2xs font-semibold font-sans",HX[e.tier]),children:e.tier}),s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:FX(e.sizeGb)}),s.jsxs("span",{className:"text-2xs text-text-4 font-sans",children:["· ",e.ramGb," GB RAM"]})]})]}),n?s.jsx("button",{onClick:()=>d(e.id),className:"p-1.5 text-text-4 hover:text-danger rounded transition-colors cursor-pointer",title:"Remove model",children:s.jsx(Sn,{size:12})}):r?s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>o(e.id),disabled:!!u,className:"h-7 px-2 text-2xs gap-1",children:f?s.jsxs(s.Fragment,{children:[s.jsx(Zn,{size:10,className:"animate-spin"})," Pulling..."]}):s.jsxs(s.Fragment,{children:[s.jsx(rl,{size:10})," Pull"]})}):s.jsxs("span",{className:"text-2xs text-text-4 font-sans",children:["Needs ",e.ramGb," GB"]})]})}function eZ({onStopped:e}){const[n,l]=v.useState(null),r=M(u=>u.addToast);async function o(){l("stopping");try{(await B.post("/providers/ollama/stop")).ok?(r("info","Ollama server stopped"),e&&e()):r("error","Could not stop server")}catch(u){r("error","Stop failed",u.message)}l(null)}async function d(){l("restarting");try{(await B.post("/providers/ollama/restart")).ok?r("success","Ollama server restarted"):r("error","Restart failed")}catch(u){r("error","Restart failed",u.message)}l(null)}return s.jsxs("div",{className:"flex items-center gap-2 bg-success/8 border border-success/20 rounded-lg px-3 py-2",children:[s.jsxs("span",{className:"relative flex-shrink-0 w-[6px] h-[6px]",children:[s.jsx("span",{className:"absolute inset-0 rounded-full bg-success"}),s.jsx("span",{className:"absolute inset-[-2px] rounded-full bg-success opacity-20 animate-pulse"})]}),s.jsx("span",{className:"text-xs font-sans text-success font-semibold",children:"Server Running"}),s.jsx("span",{className:"text-2xs font-mono text-text-4",children:":11434"}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:d,disabled:!!n,className:"flex items-center gap-1 text-2xs font-sans text-text-3 hover:text-accent cursor-pointer transition-colors disabled:opacity-40",children:[s.jsx(Zn,{size:10,className:n==="restarting"?"animate-spin":""}),n==="restarting"?"Restarting...":"Restart"]}),s.jsxs("button",{onClick:o,disabled:!!n,className:"flex items-center gap-1 text-2xs font-sans text-text-3 hover:text-danger cursor-pointer transition-colors disabled:opacity-40",children:[s.jsx(Cs,{size:10}),n==="stopping"?"Stopping...":"Stop"]})]})}function tZ({onModelChange:e}){var $,F;const[n,l]=v.useState(null),[r,o]=v.useState(null),[d,u]=v.useState("code"),[f,h]=v.useState(!1),[x,g]=v.useState(!1),p=M(Z=>Z.addToast),b=v.useRef(!1);function y(){B.get("/providers/ollama/models").then(Z=>{var J;l(Z),!b.current&&((J=Z.installed)==null?void 0:J.length)===0&&(b.current=!0,setTimeout(y,2e3))}).catch(()=>{})}v.useEffect(()=>{y()},[]);async function j(Z){o(Z);try{await B.post("/providers/ollama/pull",{model:Z}),p("success",`Pulled ${Z}`),y(),e&&e()}catch(J){p("error",`Pull failed: ${J.message}`)}o(null)}async function w(Z){try{await B.delete(`/providers/ollama/models/${encodeURIComponent(Z)}`),p("info",`Removed ${Z}`),y(),e&&e()}catch(J){p("error",`Delete failed: ${J.message}`)}}if(!n)return s.jsx("div",{className:"py-4 text-center text-xs text-text-4 font-sans",children:"Loading..."});const{installed:k,catalog:Q,hardware:C}=n,P=new Set(k.map(Z=>Z.id)),R=C.totalRamGb,Y=[($=C.recommended)==null?void 0:$.code,(F=C.recommended)==null?void 0:F.general].filter(Boolean),X=Q.filter(Z=>Z.category===d),z=f?X:X.filter(Z=>Z.ramGb<=R);return x?s.jsxs("div",{className:"space-y-3 p-3",children:[s.jsxs("div",{className:"flex items-center gap-2 bg-warning/8 border border-warning/20 rounded-lg px-3 py-2.5",children:[s.jsx(Cs,{size:14,className:"text-warning flex-shrink-0"}),s.jsxs("span",{className:"text-xs font-sans text-text-2",children:[s.jsx("span",{className:"text-warning font-semibold",children:"Ollama server stopped."})," ","Start it again to pull and use models."]})]}),s.jsxs(ue,{variant:"primary",size:"md",onClick:async()=>{try{(await B.post("/providers/ollama/serve")).ok&&(p("success","Ollama server started!"),g(!1),b.current=!1,setTimeout(y,2e3))}catch(Z){p("error","Could not start server",Z.message)}},className:"w-full gap-1.5",children:[s.jsx(Jn,{size:12}),"Start Ollama Server"]})]}):s.jsxs("div",{className:"space-y-2 p-3",children:[s.jsx(eZ,{onStopped:()=>g(!0)}),s.jsx(SS,{hardware:C}),k.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-sans text-text-2",children:[s.jsx(Sd,{size:12,className:"text-text-3"}),s.jsx("span",{className:"font-semibold",children:k.length})," model",k.length!==1?"s":""," installed"]}),s.jsx("div",{className:"flex bg-surface-0 rounded-lg p-0.5 border border-border-subtle",children:Object.entries(IX).map(([Z,J])=>s.jsx("button",{onClick:()=>u(Z),className:le("flex-1 px-3 py-1.5 text-2xs font-semibold font-sans rounded-md transition-all cursor-pointer",d===Z?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:J},Z))}),s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-0 overflow-hidden",children:[z.map(Z=>s.jsx(JX,{model:Z,isInstalled:P.has(Z.id),isRecommended:Y.includes(Z.id),canRun:Z.ramGb<=R,onPull:j,onDelete:w,pulling:r},Z.id)),z.length===0&&s.jsxs("div",{className:"px-3 py-4 text-center text-xs text-text-4 font-sans",children:["No ",d," models available for your hardware"]})]}),!f&&X.length>z.length&&s.jsxs("button",{onClick:()=>h(!0),className:"flex items-center gap-1 text-2xs text-text-3 hover:text-accent font-sans cursor-pointer transition-colors",children:[s.jsx(bn,{size:10}),"Show ",X.length-z.length," more (exceed your RAM)"]})]})}function jS({isInstalled:e,onModelChange:n}){const[l,r]=v.useState(!1),[o,d]=v.useState(!1);return v.useEffect(()=>{e?B.post("/providers/ollama/check").then(u=>{r(u.installed&&u.serverRunning),d(!0)}).catch(()=>d(!0)):d(!0)},[e]),o?l?s.jsx(tZ,{onModelChange:n}):s.jsx(KX,{onRecheck:()=>{r(!0),n&&n()}}):s.jsx("div",{className:"py-4 text-center text-xs text-text-4 font-sans",children:"Checking Ollama..."})}var eb={};function nZ({path:e,onNavigate:n}){const l=e.split("/").filter(Boolean);return s.jsxs("div",{className:"flex items-center gap-0.5 min-w-0 overflow-x-auto py-1.5 scrollbar-none",children:[s.jsx("button",{onClick:()=>n("/"),className:"flex-shrink-0 p-1 rounded hover:bg-surface-5 cursor-pointer text-text-3 hover:text-text-0 transition-colors",children:s.jsx(Sd,{size:13})}),l.map((r,o)=>{const d="/"+l.slice(0,o+1).join("/"),u=o===l.length-1;return s.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[s.jsx(Na,{size:11,className:"text-text-4"}),s.jsx("button",{onClick:()=>n(d),className:le("px-1.5 py-0.5 rounded text-xs font-mono cursor-pointer transition-colors",u?"text-text-0 bg-surface-4 font-medium":"text-text-3 hover:text-text-0 hover:bg-surface-5"),children:r})]},o)})]})}function um({open:e,onOpenChange:n,currentPath:l,onSelect:r}){const[o,d]=v.useState(l||eb.HOME||"/"),[u,f]=v.useState([]),[h,x]=v.useState(!1),[g,p]=v.useState(null);v.useEffect(()=>{e&&b(l||"/")},[e]);async function b(k){x(!0),p(null);try{const Q=await B.get(`/browse-system?path=${encodeURIComponent(k)}`);d(Q.current||k),f(Q.dirs||[])}catch(Q){p(Q.message),f([])}x(!1)}function y(){const k=o==="/"?"/":o.split("/").slice(0,-1).join("/")||"/";b(k)}function j(){b(eb.HOME||"/Users")}function w(){r(o),n(!1)}return s.jsx(ba,{open:e,onOpenChange:n,children:s.jsx(va,{title:"Select Working Directory",description:"Choose a directory for this agent to work in",className:"max-w-[520px]",children:s.jsxs("div",{className:"px-5 py-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:y,disabled:o==="/",className:"p-1.5 rounded-md bg-surface-4 border border-border text-text-2 hover:text-text-0 hover:bg-surface-5 transition-colors cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed",children:s.jsx(e$,{size:14})}),s.jsx("button",{onClick:j,className:"p-1.5 rounded-md bg-surface-4 border border-border text-text-2 hover:text-text-0 hover:bg-surface-5 transition-colors cursor-pointer",children:s.jsx(rT,{size:14})}),s.jsx("div",{className:"flex-1 min-w-0 bg-surface-0 rounded-md border border-border-subtle px-2",children:s.jsx(nZ,{path:o,onNavigate:b})})]}),s.jsx("div",{className:"bg-surface-0 rounded-lg border border-border-subtle overflow-hidden",children:s.jsxs("div",{className:"max-h-[340px] overflow-y-auto",children:[h&&s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(at,{size:18,className:"text-text-3 animate-spin"})}),g&&s.jsx("div",{className:"px-4 py-6 text-center",children:s.jsx("p",{className:"text-xs text-danger font-sans",children:g})}),!h&&!g&&u.length===0&&s.jsx("div",{className:"px-4 py-6 text-center",children:s.jsx("p",{className:"text-xs text-text-3 font-sans",children:"No subdirectories"})}),!h&&!g&&u.map(k=>s.jsxs("button",{onClick:()=>b(k.path),className:le("w-full flex items-center gap-2.5 px-3.5 py-2 text-left cursor-pointer","hover:bg-surface-4 transition-colors border-b border-border-subtle last:border-0"),children:[k.hasChildren?s.jsx(D$,{size:15,className:"text-warning flex-shrink-0"}):s.jsx(il,{size:15,className:"text-text-3 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-text-0 font-sans truncate flex-1",children:k.name}),k.hasChildren&&s.jsx(Na,{size:12,className:"text-text-4 flex-shrink-0"})]},k.path))]})}),s.jsxs("div",{className:"flex items-center gap-3 bg-surface-4/50 rounded-lg px-3.5 py-2.5 border border-border-subtle",children:[s.jsx(il,{size:16,className:"text-accent flex-shrink-0"}),s.jsx("span",{className:"text-xs font-mono text-text-1 truncate flex-1",children:o})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(ue,{variant:"ghost",size:"md",onClick:()=>n(!1),children:"Cancel"}),s.jsxs(ue,{variant:"primary",size:"md",onClick:w,className:"gap-1.5",children:[s.jsx(kt,{size:14})," Select Folder"]})]})]})})})}function QS({children:e,...n}){return s.jsx(fS,{...n,children:e})}function wS({children:e,className:n,title:l,side:r="right",width:o=400,...d}){return s.jsxs(OS,{children:[s.jsx(hS,{className:"fixed inset-0 z-40 bg-black/30"}),s.jsxs(mS,{className:le("fixed top-0 z-50 h-full overflow-y-auto","bg-surface-1 border-l border-border shadow-2xl","data-[state=open]:animate-in data-[state=closed]:animate-out",r==="right"&&"right-0 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",r==="left"&&"left-0 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",n),style:{width:o},...d,children:[l&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border-subtle sticky top-0 bg-surface-1 z-10",children:[s.jsx(xS,{className:"text-base font-semibold text-text-0 font-sans",children:l}),s.jsx(gS,{className:"p-1 rounded-md text-text-3 hover:text-text-0 hover:bg-surface-5 transition-colors cursor-pointer",children:s.jsx(rt,{size:16})})]}),s.jsx(pS,{className:"sr-only",children:"Panel"}),e]})]})}function sZ({server:e,onEdit:n,onDelete:l,onConnect:r,onDisconnect:o,onTest:d}){const[u,f]=v.useState(null),[h,x]=v.useState(!1),[g,p]=v.useState(!1),[b,y]=v.useState(null);v.useEffect(()=>{function R(X){var z;try{const $=JSON.parse(X.data);$.type==="tunnel.status"&&((z=$.data)==null?void 0:z.id)===e.id&&y($.data.step)}catch{}}const Y=M.getState().ws;return Y&&Y.addEventListener("message",R),()=>{Y&&Y.removeEventListener("message",R)}},[e.id]);async function j(){x(!0),f(null);try{const R=await d();f(R)}catch(R){f({error:R.message||"Test failed"})}x(!1)}async function w(){var R,Y;p(!0),y(null),f(null);try{await r(),y(null)}catch(X){const z=(X==null?void 0:X.testResult)||((R=X==null?void 0:X.body)==null?void 0:R.testResult);f(z||{error:((Y=X==null?void 0:X.body)==null?void 0:Y.error)||(X==null?void 0:X.message)||"Connection failed"}),y(null)}p(!1)}async function k(){p(!0);try{await o()}catch{}p(!1)}function Q(){const R=e.localPort,Y=encodeURIComponent(e.name);window.open(`http://localhost:${R}?instance=${Y}`,"_blank")}const C=b==="installing"?"Installing Groove...":b==="starting"?"Starting daemon...":g?"Connecting...":"Connect",P=e.active&&e.startedAt?Math.floor((Date.now()-new Date(e.startedAt).getTime())/1e3):0;return s.jsxs("div",{className:le("rounded-lg border bg-surface-2 p-4",e.active?"border-success/40":"border-border-subtle"),children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[13px] font-semibold text-text-0 font-sans",children:e.name}),e.active?s.jsxs(Te,{variant:"success",className:"text-2xs gap-1",children:[s.jsx(zs,{status:"running",size:"sm"})," Connected"]}):s.jsx(Te,{variant:"default",className:"text-2xs",children:"Disconnected"})]}),s.jsxs("div",{className:"text-xs text-text-3 font-mono mb-1",children:[e.user,"@",e.host,":",e.port||22]}),e.sshKeyPath&&s.jsxs("div",{className:"text-2xs text-text-4 font-mono truncate mb-2",children:["Key: ",e.sshKeyPath]}),e.active&&s.jsxs("div",{className:"flex items-center gap-3 text-2xs text-text-3 font-sans mb-2",children:[P>0&&s.jsxs("span",{children:["Uptime: ",kr(P)]}),e.latencyMs!=null&&s.jsxs("span",{children:["Latency: ",e.latencyMs,"ms"]}),e.localPort&&s.jsxs("span",{children:["Port: ",e.localPort]})]}),e.active&&s.jsx("div",{className:"text-2xs text-text-4 bg-surface-1 rounded px-2.5 py-1.5 mb-3",children:"Separate Groove instance on your remote server. Local teams are not affected."}),s.jsxs("div",{className:"flex items-center gap-2",children:[e.active?s.jsxs(s.Fragment,{children:[s.jsxs(ue,{variant:"primary",size:"sm",onClick:Q,className:"h-7 text-2xs gap-1",children:[s.jsx(Fn,{size:11}),"Open Remote GUI"]}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:k,disabled:g,className:"h-7 text-2xs text-danger hover:text-danger gap-1",children:[s.jsx(pa,{size:11}),g?"Disconnecting...":"Disconnect"]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(ue,{variant:"primary",size:"sm",onClick:w,disabled:g,className:"h-7 text-2xs gap-1",children:[g?s.jsx(at,{size:11,className:"animate-spin"}):s.jsx(Ic,{size:11}),C]}),s.jsxs(ue,{variant:"ghost",size:"sm",onClick:j,disabled:h||g,className:"h-7 text-2xs text-text-3 gap-1",children:[h?s.jsx(at,{size:11,className:"animate-spin"}):s.jsx(Ic,{size:11}),"Test"]})]}),s.jsx("div",{className:"flex-1"}),!e.active&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>n(e),className:"p-1.5 text-text-4 hover:text-text-1 cursor-pointer transition-colors",title:"Edit",children:s.jsx(Di,{size:12})}),s.jsx("button",{onClick:()=>l(e.id),className:"p-1.5 text-text-4 hover:text-danger cursor-pointer transition-colors",title:"Delete",children:s.jsx(Sn,{size:12})})]})]}),u&&!g&&s.jsxs("div",{className:le("mt-2 px-3 py-2 rounded-md text-2xs font-sans flex items-start gap-2",u.error?"bg-danger/8 border border-danger/20 text-danger":u.reachable?"bg-success/8 border border-success/20 text-success":"bg-warning/8 border border-warning/20 text-warning"),children:[u.error?s.jsxs(s.Fragment,{children:[s.jsx(rt,{size:11,className:"mt-0.5 flex-shrink-0"})," ",u.error]}):u.reachable?s.jsxs(s.Fragment,{children:[s.jsx(kt,{size:11,className:"mt-0.5 flex-shrink-0"}),s.jsxs("span",{children:[u.daemonRunning?"Connected. Groove running.":u.grooveInstalled?"Connected. Groove installed but stopped.":"Connected. Groove not installed.",!u.daemonRunning&&" Click Connect to set up automatically."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ta,{size:11,className:"mt-0.5 flex-shrink-0"})," Host unreachable"]}),s.jsx("button",{onClick:()=>f(null),className:"ml-auto text-text-4 hover:text-text-1 cursor-pointer flex-shrink-0",children:s.jsx(rt,{size:10})})]})]})}function aZ({open:e,onOpenChange:n,server:l,onSave:r}){const[o,d]=v.useState(""),[u,f]=v.useState(""),[h,x]=v.useState(""),[g,p]=v.useState(22),[b,y]=v.useState(""),[j,w]=v.useState(!1),[k,Q]=v.useState(!1),[C,P]=v.useState(!1),[R,Y]=v.useState(!1);v.useEffect(()=>{e&&(l?(d(l.name||""),f(l.host||""),x(l.user||""),p(l.port||22),y(l.sshKeyPath||""),w(l.autoStart||!1),Q(l.autoConnect||!1)):(d(""),f(""),x(""),p(22),y(""),w(!1),Q(!1)))},[e,l]);async function X(){if(!(!o.trim()||!u.trim()||!h.trim())){Y(!0);try{const z={name:o.trim(),host:u.trim(),user:h.trim(),port:g,sshKeyPath:b.trim(),autoStart:j,autoConnect:k};l!=null&&l.id&&(z.id=l.id),await r(z),n(!1)}catch{}Y(!1)}}return s.jsx(ba,{open:e,onOpenChange:n,children:s.jsxs(va,{title:l?`Edit ${l.name}`:"Add Remote Server",description:"Configure SSH connection to a remote server",className:"max-w-[460px]",children:[s.jsxs("div",{className:"px-5 py-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"Name"}),s.jsx("input",{value:o,onChange:z=>d(z.target.value),placeholder:"api-vps",className:"w-full h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-sans placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",autoFocus:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"Host"}),s.jsx("input",{value:u,onChange:z=>f(z.target.value),placeholder:"165.22.180.45 or hostname",className:"w-full h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"User"}),s.jsx("input",{value:h,onChange:z=>x(z.target.value),placeholder:"root",className:"w-full h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsxs("div",{className:"w-24",children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"SSH Port"}),s.jsx("input",{value:g,onChange:z=>p(Number(z.target.value)||22),type:"number",className:"w-full h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"SSH Key"}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("input",{value:b,onChange:z=>y(z.target.value),placeholder:"~/.ssh/id_ed25519",className:"flex-1 h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>P(!0),className:"h-9 px-2.5 flex-shrink-0",children:s.jsx(Ph,{size:13})})]})]}),s.jsxs("div",{className:"space-y-3 pt-1",children:[s.jsxs("label",{className:"flex items-center justify-between cursor-pointer",children:[s.jsx("span",{className:"text-xs text-text-2 font-sans",children:"Auto-start daemon on connect"}),s.jsx(tb,{value:j,onChange:w})]}),s.jsxs("label",{className:"flex items-center justify-between cursor-pointer",children:[s.jsx("span",{className:"text-xs text-text-2 font-sans",children:"Auto-connect on Groove launch"}),s.jsx(tb,{value:k,onChange:Q})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(ue,{variant:"ghost",size:"sm",onClick:()=>n(!1),className:"h-8 text-xs px-4 text-text-3",children:"Cancel"}),s.jsx(ue,{variant:"primary",size:"sm",onClick:X,disabled:!o.trim()||!u.trim()||!h.trim()||R,className:"h-8 text-xs px-4",children:R?"Saving...":"Save"})]})]}),s.jsx(um,{open:C,onOpenChange:P,currentPath:b||"~/.ssh",onSelect:z=>y(z)})]})})}function tb({value:e,onChange:n}){return s.jsx("button",{onClick:()=>n(!e),className:le("w-9 h-5 rounded-full p-0.5 transition-colors cursor-pointer",e?"bg-accent":"bg-surface-5"),children:s.jsx("div",{className:le("w-4 h-4 rounded-full bg-white shadow-sm transition-transform",e?"translate-x-4":"translate-x-0")})})}const nb={community:{heading:"Get Groove Desktop",cta:"Download",icon:rl,action:()=>qO("https://groovedev.ai/download")},"sign-in":{heading:"Sign in to unlock",cta:"Sign in",icon:jd,action:()=>M.getState().marketplaceLogin()},subscribe:{heading:"Upgrade to Pro",cta:"Subscribe",icon:tl,action:()=>qO("https://groovedev.ai/pro")}};function lZ({feature:e,description:n,variant:l="community"}){const r=nb[l]||nb.community,o=r.icon;return s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-1/50 px-5 py-6 text-center",children:[s.jsx("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-purple/10",children:s.jsx(xT,{size:18,className:"text-purple"})}),s.jsx("h3",{className:"text-sm font-semibold text-text-1 font-sans",children:r.heading}),s.jsx("p",{className:"mt-1.5 text-2xs text-text-3 font-sans",children:e}),s.jsx("p",{className:"mt-1 text-2xs text-text-4 font-sans max-w-xs mx-auto",children:n}),s.jsxs("button",{onClick:r.action,className:"mt-4 inline-flex items-center gap-1.5 h-7 px-4 rounded-full bg-purple/15 text-purple text-xs font-semibold font-sans hover:bg-purple/25 transition-colors cursor-pointer",children:[s.jsx(o,{size:13}),r.cta]})]})}function rZ({feature:e,description:n,children:l}){return M(r=>r.marketplaceAuthenticated),M(r=>r.marketplaceUser),s.jsx(lZ,{feature:e,description:n,variant:"community"})}function iZ({value:e,onChange:n}){return s.jsx("button",{onClick:()=>n(!e),className:le("w-9 h-5 rounded-full p-0.5 transition-colors cursor-pointer",e?"bg-accent":"bg-surface-5"),children:s.jsx("div",{className:le("w-4 h-4 rounded-full bg-white shadow-sm transition-transform",e?"translate-x-4":"translate-x-0")})})}function oZ({user:e}){const[n,l]=v.useState(!1),r=(e==null?void 0:e.avatar)||(e==null?void 0:e.picture)||(e==null?void 0:e.photoURL)||(e==null?void 0:e.photo);return r&&!n?s.jsx("img",{src:r,alt:"",className:"w-6 h-6 rounded-full",referrerPolicy:"no-referrer",crossOrigin:"anonymous",onError:()=>l(!0)}):s.jsx("div",{className:"w-6 h-6 rounded-full bg-accent/10 flex items-center justify-center",children:s.jsx(Tv,{size:12,className:"text-accent"})})}function cZ({provider:e,onKeyChange:n}){var k,Q,C;const[l,r]=v.useState(!1),[o,d]=v.useState(""),[u,f]=v.useState(!1),[h,x]=v.useState(!1),g=M(P=>P.addToast),p=e.authType==="local",b=e.authType==="subscription",y=p||b?e.installed:e.hasKey;async function j(){if(o.trim())try{await B.post(`/credentials/${e.id}`,{key:o.trim()}),g("success",`API key set for ${e.name}`),d(""),r(!1),n&&n()}catch(P){g("error","Failed to set key",P.message)}}async function w(){try{await B.delete(`/credentials/${e.id}`),g("info",`Removed ${e.name} key`),n&&n()}catch(P){g("error","Remove failed",P.message)}}if(p){const P=((Q=(k=e.models)==null?void 0:k.filter(Y=>!Y.disabled))==null?void 0:Q.length)||0,R=()=>M.getState().setActiveView("models");return s.jsxs("div",{className:"flex flex-col rounded-lg border border-border-subtle bg-surface-1 overflow-hidden min-w-[220px]",children:[s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border-subtle",children:[s.jsx(zs,{status:y&&P>0?"running":"crashed",size:"sm"}),s.jsx("span",{className:"text-[13px] font-semibold text-text-0 font-sans",children:e.name}),s.jsx("div",{className:"flex-1"}),y&&P>0?s.jsxs(Te,{variant:"success",className:"text-2xs gap-1",children:[s.jsx(kt,{size:8})," ",P," models"]}):y?s.jsx(Te,{variant:"warning",className:"text-2xs",children:"No models pulled"}):s.jsx(Te,{variant:"default",className:"text-2xs",children:"Not set up"})]}),s.jsx("div",{className:"flex-1",children:h?s.jsxs(s.Fragment,{children:[s.jsx(jS,{isInstalled:y,onModelChange:n}),s.jsxs("div",{className:"px-4 py-2 border-t border-border-subtle flex gap-2",children:[s.jsx(ue,{variant:"ghost",size:"sm",onClick:()=>x(!1),className:"flex-1 h-7 text-2xs",children:"Back"}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>{x(!1),R()},className:"flex-1 h-7 text-2xs gap-1",children:"Models Tab"})]})]}):s.jsxs("div",{className:"px-4 py-3 flex flex-col h-full",children:[s.jsx("div",{className:"text-xs text-text-3 font-sans flex-1",children:y&&P>0?"Full agentic runtime — tool calling, context rotation, zero cloud cost":y?"Ollama is running. Pull a model to start using local agents.":"Run any open-source model locally — free, private, fully offline. Requires Ollama."}),s.jsxs("div",{className:"flex gap-2 mt-3",children:[y?s.jsxs(ue,{variant:"primary",size:"sm",onClick:()=>x(!0),className:"flex-1 h-7 text-2xs gap-1.5",children:[s.jsx(pr,{size:11})," ",P>0?"Manage":"Pull Models"]}):s.jsxs(ue,{variant:"primary",size:"sm",onClick:()=>x(!0),className:"flex-1 h-7 text-2xs gap-1.5",children:[s.jsx(pr,{size:11})," Set Up Ollama"]}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:R,className:"flex-1 h-7 text-2xs gap-1.5",children:"Models Tab"})]})]})})]})}return s.jsxs("div",{className:"flex flex-col rounded-lg border border-border-subtle bg-surface-1 overflow-hidden min-w-[220px]",children:[s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border-subtle",children:[s.jsx(zs,{status:y?"running":"crashed",size:"sm"}),s.jsx("span",{className:"text-[13px] font-semibold text-text-0 font-sans",children:e.name}),s.jsx("div",{className:"flex-1"}),y?s.jsxs(Te,{variant:"success",className:"text-2xs gap-1",children:[s.jsx(kt,{size:8})," Ready"]}):s.jsx(Te,{variant:"default",className:"text-2xs",children:b?"Not installed":"No key"})]}),s.jsxs("div",{className:"flex-1 flex flex-col px-4 py-3 min-h-[120px]",children:[((C=e.models)==null?void 0:C.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:e.models.map(P=>s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-surface-4 text-2xs font-mono text-text-3",children:P.name||P.id},P.id))}),b&&y&&!e.hasKey&&!l&&s.jsxs("div",{className:"flex items-center gap-1.5 h-8 px-2.5 bg-accent/8 border border-accent/20 rounded-md text-2xs font-sans text-accent mb-3",children:[s.jsx(kt,{size:10})," Subscription active"]}),e.hasKey&&!l&&s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("div",{className:"flex-1 flex items-center gap-1.5 h-8 px-2.5 bg-success/8 border border-success/20 rounded-md text-2xs font-sans text-success",children:[s.jsx(kt,{size:10})," API Connected"]}),s.jsx("button",{onClick:()=>{r(!0),f(!1),d("")},className:"text-2xs text-text-4 hover:text-accent cursor-pointer font-sans",children:"Edit"}),s.jsx("button",{onClick:w,className:"text-2xs text-text-4 hover:text-danger cursor-pointer font-sans",children:"Remove"})]}),s.jsx("div",{className:"flex-1"}),l&&s.jsxs("div",{className:"space-y-2.5 pt-1",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:e.hasKey?"Update API Key":`${e.name} API Key`}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{value:o,onChange:P=>d(P.target.value),onKeyDown:P=>P.key==="Enter"&&j(),type:u?"text":"password",placeholder:"sk-...",className:"w-full h-9 px-3 pr-9 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",autoFocus:!0}),s.jsx("button",{onClick:()=>f(!u),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-4 hover:text-text-2 cursor-pointer",children:u?s.jsx(yd,{size:12}):s.jsx(xl,{size:12})})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ue,{variant:"primary",size:"sm",onClick:j,disabled:!o.trim(),className:"flex-1 h-8 text-xs",children:"Save Key"}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:()=>{r(!1),d("")},className:"h-8 text-xs px-3",children:"Cancel"})]})]}),!l&&!e.hasKey&&s.jsxs(ue,{variant:b?"secondary":"primary",size:"sm",onClick:()=>{r(!0),f(!1),d("")},className:"w-full h-8 text-2xs gap-1.5 mt-2",children:[s.jsx(ol,{size:11}),b?"Add API key for headless mode":"Add API Key"]})]})]})}function lr({icon:e,label:n,description:l,children:r}){return s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-1 px-4 py-3.5 flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-6 rounded bg-accent/8 flex items-center justify-center flex-shrink-0",children:s.jsx(e,{size:12,className:"text-accent"})}),s.jsx("div",{className:"text-[13px] font-medium text-text-0 font-sans leading-tight",children:n})]}),s.jsx("div",{className:"text-2xs text-text-4 font-sans leading-relaxed",children:l}),s.jsx("div",{className:"mt-auto pt-1",children:r})]})}const kS={telegram:zh,discord:Gi,slack:Qd},el={telegram:"Telegram",discord:"Discord",slack:"Slack"},dZ={telegram:"Bot token from @BotFather",discord:"Bot token from Developer Portal",slack:"Bot token (xoxb-...)"},uZ=["critical","lifecycle","all"];function fZ({type:e,open:n,onOpenChange:l}){if(!e)return null;const o={telegram:{title:"Set Up Telegram",icon:zh,intro:"Create a Telegram bot and connect it to Groove in under 2 minutes. No dependencies required.",sections:[{title:"Create Your Bot",steps:[{text:"Open Telegram on any device and search for",link:"https://t.me/BotFather",linkText:"@BotFather"},{text:"Send /newbot to start the setup"},{text:"Choose a display name — we suggest GroovePilot"},{text:'Choose a username (must end in "bot") — e.g. GroovePilot_bot'},{text:"BotFather will reply with your bot token — copy it"}]},{title:"Connect to Groove",steps:[{text:"In Groove Settings > Gateways, click Set Token on the Telegram card"},{text:"Paste your bot token and click Save"},{text:"The gateway will connect automatically"}]},{title:"Link a Chat",steps:[{text:"Open a chat with your new bot in Telegram"},{text:'Send any message (e.g. "hello") — Groove captures the chat ID automatically'},{text:"Click Test in the gateway card to verify"}]},{title:"Commands",note:"All commands use / prefix in Telegram:",commands:["/instruct <team> <msg>","/query <team> <question>","/plan <description>","/log <team>","/brief","/tokens","/status","/agents","/help"]}]},discord:{title:"Set Up Discord",icon:Gi,intro:"Create a Discord bot and add it to your server. Requires discord.js (installed automatically with Groove).",sections:[{title:"Create the Application",steps:[{text:"Go to the",link:"https://discord.com/developers/applications",linkText:"Discord Developer Portal"},{text:"Click New Application and name it GroovePilot"},{text:"Go to the Bot tab in the left sidebar"},{text:"Click Reset Token and copy the bot token"}]},{title:"Set Permissions & Invite",steps:[{text:"Go to OAuth2 > URL Generator"},{text:"Under Scopes, check bot"},{text:"Under Bot Permissions, check:"}],scopes:["Send Messages","Read Message History","Embed Links","Use External Emojis"],after:[{text:"Copy the generated URL at the bottom and open it in your browser"},{text:"Select your server and click Authorize"}]},{title:"Enable Message Content Intent",steps:[{text:"Go back to the Bot tab in the Developer Portal"},{text:"Scroll to Privileged Gateway Intents"},{text:"Enable Message Content Intent — required for the bot to read commands"},{text:"Click Save Changes"}]},{title:"Connect to Groove",steps:[{text:"In Groove Settings > Gateways, click Set Token on the Discord card"},{text:"Paste your bot token and click Save"},{text:"Send a message in any channel where the bot is — Groove captures the channel automatically"}]},{title:"Commands",note:"All commands use / prefix in Discord:",commands:["/instruct <team> <msg>","/query <team> <question>","/plan <description>","/log <team>","/brief","/tokens","/status","/agents","/help"]}]},slack:{title:"Set Up Slack",icon:Qd,intro:"Create a Slack app with Socket Mode — no public URL needed. Requires @slack/bolt (installed automatically with Groove).",sections:[{title:"Create the App",steps:[{text:"Go to",link:"https://api.slack.com/apps",linkText:"api.slack.com/apps"},{text:"Click Create New App > From scratch"},{text:"Name it GroovePilot and select your workspace"}]},{title:"Enable Socket Mode",steps:[{text:"In the left sidebar, go to Settings > Socket Mode"},{text:"Toggle Enable Socket Mode to on"},{text:"It will ask you to create an App-Level Token"},{text:'Name it "groove", add the connections:write scope'},{text:"Click Generate — copy the xapp-... token (this is your App Token)"}],important:"Save this token now — you can't view it again after closing the dialog."},{title:"Set Bot Token Scopes",steps:[{text:"Go to Features > OAuth & Permissions"},{text:"Scroll to Bot Token Scopes and add all of these:"}],scopes:["chat:write","channels:read","channels:history","groups:read","groups:history","im:history","app_mentions:read"],after:[{text:"Scroll up and click Install to Workspace"},{text:"Click Allow to grant permissions"},{text:"Copy the Bot User OAuth Token (xoxb-...) — this is your Bot Token"}]},{title:"Enable Events",steps:[{text:"Go to Features > Event Subscriptions"},{text:"Toggle Enable Events to on"},{text:"Under Subscribe to bot events, add:"}],scopes:["message.channels","message.im","app_mention"],after:[{text:"Click Save Changes at the bottom"}]},{title:"Connect to Groove",steps:[{text:"In Groove Settings > Gateways, click Set Token on the Slack card"},{text:"Paste your Bot Token (xoxb-...) in the first field"},{text:"Paste your App Token (xapp-...) in the second field"},{text:"Click Save — Groove will auto-connect"}]},{title:"Link a Channel",steps:[{text:"Invite the bot to a channel: /invite @GroovePilot"},{text:"Select the channel from the dropdown in the gateway card"},{text:"Or @mention the bot — it will auto-capture the channel"},{text:"Click Test to verify"}],important:"For private channels, make sure you added the groups:read scope."},{title:"Commands",note:"In Slack, use plain text commands (no / prefix) or @mention the bot:",commands:["instruct <team> <msg>","query <team> <question>","plan <description>","log <team>","brief","tokens","status","agents","help","@GroovePilot status"]}]}}[e];if(!o)return null;const d=o.icon;return s.jsx(QS,{open:n,onOpenChange:l,children:s.jsx(wS,{title:o.title,width:480,children:s.jsxs("div",{className:"px-5 py-4 space-y-5",children:[s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-accent/5 border border-accent/15 rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:s.jsx(d,{size:16,className:"text-accent"})}),s.jsx("p",{className:"text-xs text-text-2 font-sans leading-relaxed",children:o.intro})]}),o.sections.map((u,f)=>{var h;return s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs font-semibold text-text-0 font-sans mb-2.5 flex items-center gap-2",children:[s.jsx("span",{className:"w-5 h-5 rounded-full bg-accent/10 flex items-center justify-center text-2xs font-bold text-accent",children:f+1}),u.title]}),u.note&&s.jsx("p",{className:"text-2xs text-text-3 font-sans mb-2",children:u.note}),u.steps&&s.jsx("ol",{className:"space-y-2 mb-2",children:u.steps.map((x,g)=>s.jsxs("li",{className:"flex gap-2 text-2xs text-text-2 font-sans leading-relaxed",children:[s.jsxs("span",{className:"text-text-4 font-mono w-4 flex-shrink-0 pt-px",children:[g+1,"."]}),s.jsxs("span",{children:[x.text,x.link&&s.jsxs(s.Fragment,{children:[" ",s.jsxs("a",{href:x.link,target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline inline-flex items-center gap-0.5 font-medium",children:[x.linkText,s.jsx(Fn,{size:9})]})]})]})]},g))}),u.scopes&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2 ml-6",children:u.scopes.map(x=>s.jsx("code",{className:"px-2 py-0.5 rounded bg-surface-4 text-2xs font-mono text-accent",children:x},x))}),u.after&&s.jsx("ol",{className:"space-y-2 mb-2",start:(((h=u.steps)==null?void 0:h.length)||0)+1,children:u.after.map((x,g)=>{var p;return s.jsxs("li",{className:"flex gap-2 text-2xs text-text-2 font-sans leading-relaxed",children:[s.jsxs("span",{className:"text-text-4 font-mono w-4 flex-shrink-0 pt-px",children:[(((p=u.steps)==null?void 0:p.length)||0)+g+1,"."]}),s.jsx("span",{children:x.text})]},g)})}),u.important&&s.jsx("div",{className:"ml-6 p-2 bg-warning/8 border border-warning/20 rounded-md text-2xs text-warning font-sans",children:u.important}),u.commands&&s.jsx("div",{className:"ml-6 p-2.5 bg-surface-0 border border-border-subtle rounded-md space-y-1",children:u.commands.map(x=>s.jsx("code",{className:"block text-2xs font-mono text-text-1",children:x},x))})]},f)}),s.jsxs("a",{href:"https://docs.groovedev.ai/guide/gateways",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-2xs text-accent hover:text-accent/80 font-sans font-medium mt-2",children:[s.jsx(Fn,{size:10}),"Full documentation at docs.groovedev.ai"]})]})})})}function OZ({gateway:e,onRefresh:n}){var U,D;const[l,r]=v.useState(!1),[o,d]=v.useState(""),[u,f]=v.useState(""),[h,x]=v.useState(!1),[g,p]=v.useState(!1),[b,y]=v.useState(!1),[j,w]=v.useState([]),[k,Q]=v.useState(!1),C=M(V=>V.addToast);v.useEffect(()=>{e.connected&&!e.chatId&&e.type==="slack"&&B.get(`/gateways/${e.id}/channels`).then(V=>w(Array.isArray(V)?V:[])).catch(()=>{})},[e.connected,e.chatId,e.id,e.type]);const P=kS[e.type]||Qa,R=e.type==="slack";async function Y(){if(o.trim())try{await B.post(`/gateways/${e.id}/credentials`,{key:"bot_token",value:o.trim()}),R&&u.trim()&&await B.post(`/gateways/${e.id}/credentials`,{key:"app_token",value:u.trim()}),C("success","Token saved — connecting..."),d(""),f(""),r(!1);try{await B.post(`/gateways/${e.id}/connect`),C("success",`${el[e.type]} connected!`)}catch(V){C("error","Token saved but connect failed",V.message)}n()}catch(V){C("error","Failed to save token",V.message)}}async function X(){p(!0);try{await B.post(`/gateways/${e.id}/test`),C("success","Test message sent!")}catch(V){C("error","Test failed",V.message)}p(!1)}async function z(){y(!0);try{e.connected?(await B.post(`/gateways/${e.id}/disconnect`),C("info",`${el[e.type]} disconnected`)):(await B.post(`/gateways/${e.id}/connect`),C("success",`${el[e.type]} connected!`)),n()}catch(V){C("error",e.connected?"Disconnect failed":"Connect failed",V.message)}y(!1)}async function $(V){try{await B.patch(`/gateways/${e.id}`,{enabled:V}),n()}catch(T){C("error","Update failed",T.message)}}async function F(V){try{await B.patch(`/gateways/${e.id}`,{notifications:{preset:V}}),n()}catch(T){C("error","Update failed",T.message)}}async function Z(V){try{await B.patch(`/gateways/${e.id}`,{commandPermission:V}),n()}catch(T){C("error","Update failed",T.message)}}async function J(){try{await B.delete(`/gateways/${e.id}`),C("info",`${el[e.type]} gateway removed`),n()}catch(V){C("error","Delete failed",V.message)}}const A=((U=e.notifications)==null?void 0:U.preset)||"critical";return s.jsxs("div",{className:"flex flex-col rounded-lg border border-border-subtle bg-surface-1 overflow-hidden min-w-[220px]",children:[s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border-subtle",children:[s.jsx(zs,{status:e.connected?"running":"crashed",size:"sm"}),s.jsx(P,{size:13,className:"text-text-2"}),s.jsx("span",{className:"text-[13px] font-semibold text-text-0 font-sans",children:el[e.type]}),s.jsx("div",{className:"flex-1"}),e.connected?s.jsxs(Te,{variant:"success",className:"text-2xs gap-1",children:[s.jsx(Ic,{size:8})," Connected"]}):e.enabled?s.jsx(Te,{variant:"warning",className:"text-2xs",children:"Disconnected"}):s.jsx(Te,{variant:"default",className:"text-2xs",children:"Disabled"})]}),s.jsxs("div",{className:"flex-1 flex flex-col px-4 py-3 min-h-[140px]",children:[e.connected&&!l&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 h-8 px-2.5 bg-success/8 border border-success/20 rounded-md text-2xs font-sans text-success mb-3",children:[s.jsx(kt,{size:10})," Gateway active",e.botUsername&&s.jsxs("span",{className:"text-text-4 ml-1",children:["@",e.botUsername]}),e.botTag&&s.jsx("span",{className:"text-text-4 ml-1",children:e.botTag})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"text-2xs font-semibold text-text-3 font-sans mb-1.5 block",children:e.type==="slack"?"Channel":"Chat ID"}),e.chatId?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"flex-1 flex items-center h-7 px-2 bg-surface-0 border border-border-subtle rounded-md text-2xs font-mono text-text-2",children:e.type==="slack"&&j.length>0?`#${((D=j.find(V=>V.id===e.chatId))==null?void 0:D.name)||e.chatId}`:e.chatId}),s.jsx("button",{onClick:async()=>{try{await B.patch(`/gateways/${e.id}`,{chatId:null}),n()}catch(V){C("error","Failed",V.message)}},className:"text-2xs text-text-4 hover:text-text-1 cursor-pointer font-sans",children:"Change"})]}):e.type==="slack"&&j.length>0?s.jsxs("select",{onChange:async V=>{if(V.target.value)try{await B.patch(`/gateways/${e.id}`,{chatId:V.target.value}),n()}catch(T){C("error","Failed to set channel",T.message)}},className:"w-full h-7 px-2 text-2xs bg-surface-0 border border-border-subtle rounded-md text-text-0 font-sans focus:outline-none focus:ring-1 focus:ring-accent cursor-pointer",defaultValue:"",children:[s.jsx("option",{value:"",disabled:!0,children:"Select a channel..."}),j.map(V=>s.jsxs("option",{value:V.id,children:["#",V.name]},V.id))]}):s.jsxs("div",{className:"text-2xs text-warning font-sans",children:[e.type==="slack"?"No channels found — invite the bot to a channel first.":"Send a message to the bot to auto-capture, or enter manually:",s.jsx("input",{placeholder:e.type==="slack"?"C0123456789":"Chat ID",className:"mt-1 w-full h-7 px-2 text-2xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",onKeyDown:async V=>{if(V.key==="Enter"&&V.target.value.trim())try{await B.patch(`/gateways/${e.id}`,{chatId:V.target.value.trim()}),n()}catch(T){C("error","Failed to set channel",T.message)}}})]})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"text-2xs font-semibold text-text-3 font-sans mb-1.5 block",children:"Notifications"}),s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:uZ.map(V=>s.jsx("button",{onClick:()=>F(V),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer capitalize",A===V?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:V},V))})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"text-2xs font-semibold text-text-3 font-sans mb-1.5 block",children:"Commands"}),s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:["full","read-only"].map(V=>s.jsx("button",{onClick:()=>Z(V),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer capitalize",(e.commandPermission||"full")===V?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:V==="full"?"Full Access":"Read Only"},V))})]})]}),!e.connected&&!l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-xs text-text-3 font-sans mb-2",children:e.enabled?e.hasCredentials?"Tokens saved — click Connect.":"Configure bot token to connect.":"Gateway is disabled."}),!e.hasCredentials&&s.jsxs("button",{onClick:()=>Q(!0),className:"flex items-center gap-1.5 text-2xs text-accent hover:text-accent/80 font-sans font-medium cursor-pointer mb-2",children:[s.jsx(xr,{size:11}),"How to set up",s.jsx(Fn,{size:9})]})]}),s.jsx(fZ,{type:e.type,open:k,onOpenChange:Q}),s.jsx("div",{className:"flex-1"}),l&&s.jsxs("div",{className:"space-y-2.5 pt-1",children:[s.jsxs("button",{onClick:()=>Q(!0),className:"flex items-center gap-1.5 text-2xs text-accent hover:text-accent/80 font-sans font-medium cursor-pointer",children:[s.jsx(xr,{size:11}),"Where do I get these?"]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"Bot Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{value:o,onChange:V=>d(V.target.value),onKeyDown:V=>V.key==="Enter"&&!R&&Y(),type:h?"text":"password",placeholder:dZ[e.type],className:"w-full h-9 px-3 pr-9 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",autoFocus:!0}),s.jsx("button",{onClick:()=>x(!h),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-4 hover:text-text-2 cursor-pointer",children:h?s.jsx(yd,{size:12}):s.jsx(xl,{size:12})})]})]}),R&&s.jsxs("div",{children:[s.jsx("label",{className:"text-2xs font-semibold text-text-2 font-sans mb-1.5 block",children:"App Token (Socket Mode)"}),s.jsx("input",{value:u,onChange:V=>f(V.target.value),onKeyDown:V=>V.key==="Enter"&&Y(),type:h?"text":"password",placeholder:"xapp-...",className:"w-full h-9 px-3 text-xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ue,{variant:"primary",size:"sm",onClick:Y,disabled:!o.trim(),className:"flex-1 h-8 text-xs",children:"Save Token"}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:()=>{r(!1),d(""),f("")},className:"h-8 text-xs px-3",children:"Cancel"})]})]}),!l&&s.jsxs("div",{className:"flex gap-2 mt-2",children:[!e.connected&&s.jsxs(ue,{variant:"primary",size:"sm",onClick:()=>r(!0),className:"flex-1 h-7 text-2xs gap-1.5",children:[s.jsx(ol,{size:11}),e.enabled?"Set Token":"Configure"]}),e.connected&&s.jsxs(s.Fragment,{children:[s.jsxs(ue,{variant:"secondary",size:"sm",onClick:X,disabled:g,className:"flex-1 h-7 text-2xs gap-1.5",children:[s.jsx(Zh,{size:11}),g?"Sending...":"Test"]}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>r(!0),className:"h-7 text-2xs px-2.5",children:s.jsx(ol,{size:11})})]}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:z,disabled:b,className:"h-7 text-2xs px-2.5",title:e.connected?"Disconnect":"Connect",children:e.connected?s.jsx(pa,{size:11}):s.jsx(Ic,{size:11})}),s.jsx(iZ,{value:e.enabled,onChange:$}),s.jsx("button",{onClick:J,className:"text-text-4 hover:text-danger cursor-pointer p-1",title:"Remove gateway",children:s.jsx(Sn,{size:11})})]})]})]})}function hZ({existingTypes:e,onAdd:n}){const[l,r]=v.useState(!1),o=["telegram","discord","slack"].filter(d=>!e.includes(d));return o.length===0?null:l?s.jsxs("div",{className:"flex flex-col rounded-lg border border-accent/30 bg-surface-1 overflow-hidden min-w-[220px]",children:[s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border-subtle",children:[s.jsx(Qa,{size:13,className:"text-accent"}),s.jsx("span",{className:"text-[13px] font-semibold text-text-0 font-sans",children:"Add Gateway"}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:()=>r(!1),className:"text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:12})})]}),s.jsx("div",{className:"p-3 space-y-2",children:o.map(d=>{const u=kS[d];return s.jsxs("button",{onClick:()=>{n(d),r(!1)},className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-md bg-surface-0 hover:bg-accent/8 border border-border-subtle hover:border-accent/20 cursor-pointer transition-all group",children:[s.jsx(u,{size:14,className:"text-text-3 group-hover:text-accent"}),s.jsx("span",{className:"text-xs font-medium text-text-1 group-hover:text-accent font-sans",children:el[d]})]},d)})})]}):s.jsxs("button",{onClick:()=>r(!0),className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border-subtle bg-surface-1/50 hover:bg-surface-1 hover:border-accent/30 min-h-[140px] min-w-[220px] cursor-pointer transition-all group",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/8 group-hover:bg-accent/15 flex items-center justify-center mb-2 transition-colors",children:s.jsx(vn,{size:14,className:"text-accent"})}),s.jsx("span",{className:"text-2xs font-semibold text-text-3 group-hover:text-text-1 font-sans transition-colors",children:"Add Gateway"})]})}function mZ(){const[e,n]=v.useState([]),[l,r]=v.useState(null),[o,d]=v.useState(null),[u,f]=v.useState([]),[h,x]=v.useState(!0),[g,p]=v.useState(!1),[b,y]=v.useState(!1),[j,w]=v.useState(null),k=M(A=>A.savedTunnels),Q=M(A=>A.addToast),C=M(A=>A.marketplaceUser),P=M(A=>A.marketplaceAuthenticated),R=M(A=>A.marketplaceLogin),Y=M(A=>A.marketplaceLogout);function X(){B.get("/providers").then(A=>n(Array.isArray(A)?A:[])).catch(()=>{})}function z(){B.get("/gateways").then(A=>f(Array.isArray(A)?A:[])).catch(()=>{})}v.useEffect(()=>{Promise.all([B.get("/providers"),B.get("/config"),B.get("/status"),B.get("/gateways")]).then(([A,U,D,V])=>{n(Array.isArray(A)?A:[]),r(U),d(D),f(Array.isArray(V)?V:[]),x(!1)}).catch(()=>x(!1)),M.getState().fetchTunnels()},[]);async function $(A){try{await B.post("/gateways",{type:A}),Q("success",`${el[A]} gateway added`),z()}catch(U){Q("error","Failed to add gateway",U.message)}}async function F(A,U){try{const D=await B.patch("/config",{[A]:U});r(D)}catch(D){Q("error","Update failed",D.message)}}if(h)return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"h-12 bg-surface-1 border-b border-border"}),s.jsxs("div",{className:"flex-1 p-4 space-y-4",children:[s.jsx("div",{className:"grid grid-cols-4 gap-3",children:[...Array(4)].map((A,U)=>s.jsx(gn,{className:"h-40 rounded-lg"},U))}),s.jsx("div",{className:"grid grid-cols-3 gap-3",children:[...Array(6)].map((A,U)=>s.jsx(gn,{className:"h-28 rounded-lg"},U))})]})]});const Z=e.filter(A=>A.authType==="local"||A.authType==="subscription"?A.installed:A.hasKey).length,J=(l==null?void 0:l.rotationThreshold)||0;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2.5 bg-surface-1 border-b border-border flex-shrink-0",children:[s.jsx("h2",{className:"text-sm font-semibold text-text-0 font-sans",children:"Settings"}),s.jsx("div",{className:"flex-1"}),s.jsxs("div",{className:"flex items-center gap-4 text-2xs text-text-3 font-sans",children:[(o==null?void 0:o.version)&&s.jsxs("span",{children:["v",o.version]}),(o==null?void 0:o.port)&&s.jsxs("span",{children:[":",o.port]}),(o==null?void 0:o.uptime)>0&&s.jsxs("span",{children:["Up ",kr(o.uptime)]})]}),s.jsx("div",{className:"w-px h-4 bg-border-subtle"}),P?s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx(oZ,{user:C}),s.jsx("span",{className:"text-xs font-medium text-text-0 font-sans",children:(C==null?void 0:C.displayName)||"User"}),s.jsxs("button",{onClick:Y,className:"text-2xs text-text-4 hover:text-text-1 cursor-pointer font-sans flex items-center gap-1",children:[s.jsx(Sv,{size:10})," Sign out"]})]}):s.jsxs(ue,{variant:"ghost",size:"sm",onClick:R,className:"h-7 text-2xs gap-1.5 text-text-3",children:[s.jsx(jd,{size:11})," Sign in"]}),s.jsx(zs,{status:"running",size:"sm"})]}),s.jsx(En,{className:"flex-1",children:s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2.5 px-0.5",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider",children:"Providers"}),s.jsx("div",{className:"flex-1 h-px bg-border-subtle"}),s.jsxs("span",{className:"text-2xs text-text-4 font-sans",children:[Z,"/",e.length," connected"]})]}),s.jsx("div",{className:"grid grid-cols-4 gap-3",children:e.map(A=>s.jsx(cZ,{provider:A,onKeyChange:X},A.id))})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2.5 px-0.5",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider",children:"Gateways"}),s.jsx("div",{className:"flex-1 h-px bg-border-subtle"}),s.jsxs("span",{className:"text-2xs text-text-4 font-sans",children:[u.filter(A=>A.connected).length,"/",u.length," connected"]})]}),s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[u.map(A=>s.jsx(OZ,{gateway:A,onRefresh:z},A.id)),s.jsx(hZ,{existingTypes:u.map(A=>A.type),onAdd:$})]})]}),l&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2.5 px-0.5",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider",children:"Configuration"}),s.jsx("div",{className:"flex-1 h-px bg-border-subtle"}),s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:"Auto-saves"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(lr,{icon:pr,label:"Default Provider",description:"Provider used when spawning new agents.",children:s.jsx("select",{value:l.defaultProvider||"claude-code",onChange:A=>F("defaultProvider",A.target.value),className:"w-full h-8 px-2.5 text-xs bg-surface-0 border border-border-subtle rounded-md text-text-0 font-mono focus:outline-none focus:ring-1 focus:ring-accent cursor-pointer",children:e.filter(A=>A.installed||A.hasKey).map(A=>s.jsx("option",{value:A.id,children:A.name},A.id))})}),s.jsx(lr,{icon:il,label:"Working Directory",description:"Default root directory for new agents.",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("code",{className:"flex-1 h-8 px-2 flex items-center bg-surface-0 border border-border-subtle rounded-md text-2xs font-mono text-text-2 truncate min-w-0",children:l.defaultWorkingDir||"Project root"}),s.jsx(ue,{variant:"secondary",size:"sm",onClick:()=>p(!0),className:"h-8 px-2 flex-shrink-0",children:s.jsx(Ph,{size:12})})]})}),s.jsx(lr,{icon:vv,label:"Rotation Threshold",description:"Context usage that triggers auto-rotation.",children:s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:["auto","50%","65%","75%","85%"].map(A=>{const U=A==="auto"?0:parseInt(A,10)/100,D=J===U;return s.jsx("button",{onClick:()=>F("rotationThreshold",U),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer",D?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:A==="auto"?"Auto":A},A)})})}),s.jsx(lr,{icon:Ah,label:"QC Threshold",description:"Running agents count that triggers auto-QC.",children:s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:[2,3,4,6,8].map(A=>{const U=(l.qcThreshold||2)===A;return s.jsx("button",{onClick:()=>F("qcThreshold",A),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer",U?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:A},A)})})}),s.jsx(lr,{icon:wr,label:"Max Agents",description:"Concurrent agent limit. 0 = unlimited.",children:s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:[0,4,8,12,20].map(A=>{const U=(l.maxAgents||0)===A;return s.jsx("button",{onClick:()=>F("maxAgents",A),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer",U?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:A===0?"∞":A},A)})})}),s.jsx(lr,{icon:zi,label:"Journalist Interval",description:"Seconds between synthesis cycles.",children:s.jsx("div",{className:"flex bg-surface-0 rounded-md p-0.5 border border-border-subtle",children:[60,120,300,600].map(A=>{const U=(l.journalistInterval||120)===A,D=A<60?`${A}s`:`${A/60}m`;return s.jsx("button",{onClick:()=>F("journalistInterval",A),className:le("flex-1 px-2 py-1.5 text-2xs font-semibold font-sans rounded transition-all cursor-pointer",U?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:D},A)})})})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2.5 px-0.5",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider",children:"Remote Servers"}),s.jsx("div",{className:"flex-1 h-px bg-border-subtle"})]}),s.jsx(rZ,{feature:"Remote Access",description:"Connect to remote servers via SSH tunnel and manage agents across machines",children:s.jsxs("div",{children:[s.jsx("div",{className:"flex justify-end mb-2.5",children:s.jsxs(ue,{variant:"ghost",size:"sm",onClick:()=>{w(null),y(!0)},className:"h-6 text-2xs gap-1 text-text-3 hover:text-accent",children:[s.jsx(vn,{size:11})," Add Server"]})}),k.length===0?s.jsxs("div",{className:"rounded-lg border border-dashed border-border-subtle bg-surface-1/50 px-4 py-6 text-center",children:[s.jsx(Qa,{size:20,className:"text-text-4 mx-auto mb-2"}),s.jsx("p",{className:"text-xs text-text-3 font-sans",children:"No remote servers configured."}),s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-1",children:"Add one to connect to a VPS or remote machine."})]}):s.jsx("div",{className:"grid grid-cols-2 gap-3",children:k.map(A=>s.jsx(sZ,{server:A,onConnect:()=>M.getState().connectTunnel(A.id),onDisconnect:()=>M.getState().disconnectTunnel(A.id),onTest:()=>M.getState().testTunnel(A.id),onEdit:U=>{w(U),y(!0)},onDelete:U=>M.getState().deleteTunnel(U)},A.id))})]})})]})]})}),s.jsx(aZ,{open:b,onOpenChange:y,server:j,onSave:async A=>{A.id?await M.getState().updateTunnel(A.id,A):await M.getState().saveTunnel(A),Q("success",A.id?"Server updated":"Server added")}}),s.jsx(um,{open:g,onOpenChange:p,currentPath:(l==null?void 0:l.defaultWorkingDir)||"/",onSelect:A=>F("defaultWorkingDir",A)})]})}function ud(e){return e?e<1024*1024?`${(e/1024).toFixed(0)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`:"—"}function xZ(e){return e?e<1024*1024?`${(e/1024).toFixed(0)} KB/s`:`${(e/(1024*1024)).toFixed(1)} MB/s`:""}function pZ({hardware:e}){var n;return e?s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2.5 bg-surface-1 border border-border-subtle rounded-lg text-xs font-sans text-text-2",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(jT,{size:14,className:"text-text-3"}),s.jsxs("span",{children:[e.totalRamGb," GB RAM"]})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(pr,{size:14,className:"text-text-3"}),s.jsxs("span",{children:[e.cores," cores"]})]}),e.gpu&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Sd,{size:14,className:"text-text-3"}),s.jsxs("span",{children:[e.gpu.name,e.gpu.vram?` (${e.gpu.vram} GB)`:""]})]}),((n=e.recommended)==null?void 0:n.code)&&s.jsxs("div",{className:"ml-auto text-accent",children:["Recommended: ",e.recommended.code]})]}):null}function gZ({download:e}){const n=Math.round((e.percent||0)*100);return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between text-2xs font-sans text-text-3",children:[s.jsx("span",{children:e.filename}),s.jsxs("span",{children:[n,"% ",xZ(e.speed)]})]}),s.jsx("div",{className:"h-1.5 bg-surface-3 rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-accent rounded-full transition-all",style:{width:`${n}%`}})}),s.jsxs("div",{className:"text-2xs text-text-4",children:[ud(e.downloaded)," / ",ud(e.totalBytes)]})]})}function bZ({model:e,onDelete:n}){const[l,r]=v.useState(!1),o={light:"text-green-400",medium:"text-blue-400",heavy:"text-orange-400"};return s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-surface-1 border border-border-subtle rounded-lg",children:[s.jsx(Th,{size:18,className:"text-accent flex-shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-mono font-bold text-text-0 truncate",children:e.id}),e.quantization&&s.jsx(Te,{variant:"subtle",className:"text-2xs",children:e.quantization}),e.parameters&&s.jsx(Te,{variant:"subtle",className:"text-2xs",children:e.parameters}),s.jsx("span",{className:le("text-2xs font-medium capitalize",o[e.tier]||"text-text-3"),children:e.tier})]}),s.jsxs("div",{className:"text-2xs text-text-3 font-sans mt-0.5",children:[ud(e.sizeBytes)," · ctx ",(e.contextWindow||0).toLocaleString()," · ",e.category,e.repoId&&s.jsxs("span",{className:"text-text-4",children:[" · ",e.repoId]})]})]}),s.jsx("button",{onClick:async()=>{r(!0),await n(e.id),r(!1)},disabled:l,className:"p-1.5 rounded-md text-text-4 hover:text-red-400 hover:bg-red-400/10 transition-colors",children:l?s.jsx(at,{size:14,className:"animate-spin"}):s.jsx(Sn,{size:14})})]})}function vZ({result:e,onExpand:n,expanded:l}){var r;return s.jsxs("button",{onClick:()=>n(l?null:e.id),className:"w-full text-left px-4 py-3 bg-surface-1 border border-border-subtle rounded-lg hover:border-accent/30 transition-colors cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-mono font-bold text-text-0 truncate flex-1",children:e.name}),s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:e.author}),l?s.jsx(bn,{size:14,className:"text-text-3"}):s.jsx(Na,{size:14,className:"text-text-3"})]}),s.jsxs("div",{className:"text-2xs text-text-3 font-sans mt-0.5 flex gap-3",children:[s.jsxs("span",{children:[(r=e.downloads)==null?void 0:r.toLocaleString()," downloads"]}),s.jsxs("span",{children:[e.likes," likes"]})]})]})}function yZ({repoId:e,onDownload:n,systemRamGb:l}){const[r,o]=v.useState(null),[d,u]=v.useState(!0),[f,h]=v.useState(null),x=wn();v.useEffect(()=>{u(!0),B.get(`/models/${e}/files`).then(p=>o(p.files||[])).catch(()=>x.error("Failed to load model files")).finally(()=>u(!1))},[e]);async function g(p){h(p.filename);try{await B.post("/models/download",{repoId:e,filename:p.filename}),x.success(`Downloading ${p.filename}`),n==null||n(p.filename)}catch(b){x.error(b.message)}h(null)}return d?s.jsx("div",{className:"py-3 px-4 text-2xs text-text-4 font-sans",children:"Loading quantization variants..."}):r!=null&&r.length?s.jsx("div",{className:"pl-6 pr-4 pb-2 space-y-1.5",children:r.map(p=>{const b=!p.estimatedRamGb||!l||p.estimatedRamGb<=l,y=p.estimatedRamGb&&l&&p.estimatedRamGb>l*.8&&b;return s.jsxs("div",{className:le("flex items-center gap-2 py-1.5 px-3 rounded-md text-xs font-sans",b?"bg-surface-2":"bg-red-500/5 border border-red-500/15"),children:[s.jsx("span",{className:"font-mono text-text-1 truncate flex-1",children:p.filename}),p.quantization&&s.jsx(Te,{variant:"subtle",className:"text-2xs",children:p.quantization}),s.jsx("span",{className:"text-text-2 text-2xs w-16 text-right",children:ud(p.size)}),p.estimatedRamGb&&s.jsxs("span",{className:le("text-2xs w-20 text-right font-medium",b?y?"text-yellow-400":"text-green-400":"text-red-400"),children:["~",p.estimatedRamGb," GB RAM"]}),!b&&s.jsx("span",{className:"text-2xs text-red-400 font-medium",children:"too large"}),s.jsx("button",{onClick:()=>g(p),disabled:f===p.filename||!b,className:le("p-1 rounded transition-colors",b?"text-accent hover:bg-accent/10":"text-text-4 cursor-not-allowed","disabled:opacity-40"),children:f===p.filename?s.jsx(at,{size:13,className:"animate-spin"}):s.jsx(rl,{size:13})})]},p.filename)})}):s.jsx("div",{className:"py-3 px-4 text-2xs text-text-4 font-sans",children:"No GGUF files found in this repo."})}function SZ({model:e,systemRamGb:n,onPull:l,pulling:r,isInstalled:o}){const d={light:"text-green-400",medium:"text-blue-400",heavy:"text-orange-400"},u={code:"{}",general:"AI"},f=n?Math.round((1-e.ramGb/n)*100):null;return s.jsxs("div",{className:le("flex items-center gap-3 px-4 py-3 border rounded-lg transition-colors",o?"bg-success/5 border-success/20":"bg-surface-1 border-border-subtle hover:border-accent/20"),children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-surface-3 flex items-center justify-center text-xs font-mono text-text-2 flex-shrink-0",children:u[e.category]||"AI"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-mono font-bold text-text-0 truncate",children:e.name}),s.jsx("span",{className:le("text-2xs font-semibold capitalize",d[e.tier]),children:e.tier}),o&&s.jsxs(Te,{variant:"success",className:"text-2xs gap-1",children:[s.jsx(kt,{size:8})," Installed"]})]}),s.jsx("div",{className:"text-2xs text-text-3 font-sans mt-0.5",children:e.description}),s.jsxs("div",{className:"flex items-center gap-3 mt-1 text-2xs font-sans",children:[s.jsxs("span",{className:"text-text-2",children:[e.sizeGb," GB download"]}),s.jsxs("span",{className:"text-green-400 font-medium",children:[e.ramGb," GB RAM"]}),f!==null&&s.jsxs("span",{className:"text-text-4",children:[f,"% headroom"]})]})]}),o?s.jsx("span",{className:"text-xs text-success font-sans font-medium px-3 py-1.5",children:"Ready"}):s.jsxs("button",{onClick:()=>l(e.id),disabled:r===e.id,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-sans font-medium bg-accent/10 text-accent hover:bg-accent/20 transition-colors cursor-pointer disabled:opacity-40",children:[r===e.id?s.jsx(at,{size:12,className:"animate-spin"}):s.jsx(rl,{size:12}),"Pull"]})]})}function jZ(){const[e,n]=v.useState("recommended"),[l,r]=v.useState(""),[o,d]=v.useState([]),[u,f]=v.useState(!1),[h,x]=v.useState([]),[g,p]=v.useState([]),[b,y]=v.useState([]),[j,w]=v.useState(null),[k,Q]=v.useState(null),[C,P]=v.useState(null),[R,Y]=v.useState([]),X=wn(),z=v.useCallback(()=>{B.get("/models/installed").then(A=>{x(A.models||[])}).catch(()=>{})},[]),$=v.useCallback(()=>{B.get("/providers/ollama/models").then(A=>{Y((A.installed||[]).map(U=>U.id))}).catch(()=>{})},[]);v.useEffect(()=>{B.get("/providers/ollama/hardware").then(w).catch(()=>{}),B.get("/models/recommended").then(A=>{p(A.models||[]),!j&&A.hardware&&w(A.hardware)}).catch(()=>{}),z(),$()},[z,$]);async function F(A){P(A);try{await B.post("/providers/ollama/pull",{model:A}),X.success(`${A} ready to use`),z(),$(),Y(U=>[...U,A])}catch(U){X.error(`Pull failed: ${U.message}`)}P(null)}v.useEffect(()=>{const A=M.subscribe((D,V)=>{}),U=setInterval(()=>{B.get("/models/downloads").then(y).catch(()=>{})},2e3);return()=>{A(),clearInterval(U)}},[]),v.useEffect(()=>{function A(D){try{const V=JSON.parse(D.data);V.type==="model:download:progress"&&y(T=>{const L=T.findIndex(ee=>ee.filename===V.data.filename);if(L>=0){const ee=[...T];return ee[L]=V.data,ee}return[...T,V.data]}),V.type==="model:download:complete"&&(y(T=>T.filter(L=>L.filename!==V.data.filename)),z(),X.success(`${V.data.filename} downloaded`)),V.type==="model:download:error"&&(y(T=>T.filter(L=>L.filename!==V.data.filename)),X.error(`Download failed: ${V.data.error}`))}catch{}}const U=M.getState()._ws;return U&&U.addEventListener("message",A),()=>{U&&U.removeEventListener("message",A)}},[z,X]);async function Z(){if(l.trim()){f(!0),n("search");try{const A=await B.get(`/models/search?q=${encodeURIComponent(l.trim())}`);d(A)}catch(A){X.error(A.message)}f(!1)}}async function J(A){try{await B.delete(`/models/${A}`),x(U=>U.filter(D=>D.id!==A)),X.success("Model deleted")}catch(U){X.error(U.message)}}return s.jsxs("div",{className:"h-full flex flex-col bg-surface-0",children:[s.jsxs("div",{className:"flex-shrink-0 px-5 pt-4 pb-3 border-b border-border space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-base font-bold font-sans text-text-0",children:"Local Models"}),s.jsxs(Te,{variant:"subtle",className:"text-2xs",children:[h.length," installed"]})]}),s.jsx(pZ,{hardware:j}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(yn,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-4"}),s.jsx("input",{value:l,onChange:A=>r(A.target.value),onKeyDown:A=>A.key==="Enter"&&Z(),placeholder:"Search HuggingFace for GGUF models...",className:"w-full h-8 pl-9 pr-3 text-sm rounded-md bg-surface-1 border border-border text-text-0 font-sans placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsx(ue,{onClick:Z,disabled:u,size:"sm",variant:"accent",children:u?s.jsx(at,{size:14,className:"animate-spin"}):"Search"})]}),s.jsx("div",{className:"flex gap-1",children:[{id:"recommended",label:`Recommended (${g.length})`},{id:"installed",label:`Installed (${h.length})`},{id:"search",label:`Search (${o.length})`}].map(A=>s.jsx("button",{onClick:()=>n(A.id),className:le("px-3 py-1 rounded-md text-xs font-sans font-medium transition-colors cursor-pointer",e===A.id?"bg-accent/12 text-accent":"text-text-3 hover:text-text-1 hover:bg-surface-3"),children:A.label},A.id))})]}),b.length>0&&s.jsxs("div",{className:"px-5 py-3 border-b border-border space-y-2",children:[s.jsx("div",{className:"text-xs font-sans font-semibold text-text-2",children:"Downloading"}),b.map(A=>s.jsx(gZ,{download:A},A.filename))]}),s.jsx(En,{className:"flex-1",children:s.jsxs("div",{className:"px-5 py-4 space-y-2",children:[e==="recommended"&&s.jsx(s.Fragment,{children:g.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(pr,{size:40,className:"mx-auto text-text-4 mb-3"}),s.jsx("p",{className:"text-sm text-text-2 font-sans font-medium",children:"Detecting hardware..."}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:"Make sure Ollama is installed so we can check your system."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-xs text-text-3 font-sans mb-2",children:["Top models for your system (",(j==null?void 0:j.totalRamGb)||"?"," GB RAM). Click Pull to download via Ollama."]}),g.map(A=>{const U=A.id.split(":")[0],D=R.some(V=>V===A.id||V.startsWith(U+":")||V===U);return s.jsx(SZ,{model:A,systemRamGb:j==null?void 0:j.totalRamGb,onPull:F,pulling:C,isInstalled:D},A.id)})]})}),e==="installed"&&s.jsx(s.Fragment,{children:h.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Th,{size:40,className:"mx-auto text-text-4 mb-3"}),s.jsx("p",{className:"text-sm text-text-2 font-sans font-medium",children:"No local models yet"}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:"Search HuggingFace to download GGUF models, or pull models via Ollama."})]}):h.map(A=>s.jsx(bZ,{model:A,onDelete:J},A.id))}),e==="search"&&s.jsx(s.Fragment,{children:u?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(at,{size:24,className:"mx-auto text-accent animate-spin mb-3"}),s.jsx("p",{className:"text-sm text-text-3 font-sans",children:"Searching HuggingFace..."})]}):o.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(yn,{size:40,className:"mx-auto text-text-4 mb-3"}),s.jsx("p",{className:"text-sm text-text-2 font-sans font-medium",children:"Search for GGUF models"}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:'Try "qwen coder", "deepseek", "codestral", "llama"'})]}):o.map(A=>s.jsxs("div",{className:"space-y-1",children:[s.jsx(vZ,{result:A,expanded:k===A.id,onExpand:Q}),k===A.id&&s.jsx(yZ,{repoId:A.id,onDownload:()=>z(),systemRamGb:j==null?void 0:j.totalRamGb})]},A.id))})]})})]})}const sb=["Reading through the codebase...","Thinking through your request...","Planning the approach...","Running tool calls...","Working through the problem...","Reasoning step by step...","Reviewing context...","Considering options...","Analyzing the code...","Making progress..."];function QZ({agent:e,className:n}){const[l,r]=v.useState(0),[o,d]=v.useState(!0);return v.useEffect(()=>{const u=setInterval(()=>{d(!1),setTimeout(()=>{r(f=>(f+1)%sb.length),d(!0)},250)},2800);return()=>clearInterval(u)},[]),s.jsxs("div",{className:`${n||""}`,children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-1 font-sans",children:(e==null?void 0:e.name)||"Agent"}),s.jsx("span",{className:"text-2xs text-accent font-mono",children:"thinking"})]}),s.jsxs("div",{className:"border-l border-accent/40 pl-3.5 py-1 flex items-center gap-2.5",children:[s.jsx("div",{className:"relative w-3.5 h-3.5 flex-shrink-0",children:s.jsx("span",{className:"absolute inset-0 rounded-full border border-transparent border-t-accent animate-spin",style:{animationDuration:"0.9s"}})}),s.jsx("span",{className:"text-[12px] font-sans text-text-3 transition-opacity duration-[250ms]",style:{opacity:o?1:0},children:sb[l]})]})]})}const dh=[];function NS(e){const n=(e||"").toLowerCase();return n.includes("reading")||n.includes("read ")?{icon:xl,color:"text-info",label:"Reading"}:n.includes("editing")||n.includes("wrote")||n.includes("writing")||n.includes("edit ")?{icon:gv,color:"text-warning",label:"Editing"}:n.includes("searching")||n.includes("search")||n.includes("grep")||n.includes("glob")?{icon:yn,color:"text-purple",label:"Searching"}:n.includes("running")||n.includes("bash")||n.includes("command")||n.includes("exec")?{icon:Wi,color:"text-orange",label:"Running"}:n.includes("test")||n.includes("pass")?{icon:WO,color:"text-success",label:"Testing"}:n.includes("error")||n.includes("fail")||n.includes("crash")?{icon:Cs,color:"text-danger",label:"Error"}:n.includes("rotat")?{icon:Li,color:"text-accent",label:"Rotating"}:n.includes("spawn")||n.includes("start")?{icon:Jn,color:"text-success",label:"Spawned"}:n.includes("tool")||n.includes("function")?{icon:$3,color:"text-text-2",label:"Tool"}:n.includes("complet")||n.includes("done")||n.includes("finish")?{icon:WO,color:"text-success",label:"Done"}:{icon:$a,color:"text-text-3",label:"Activity"}}function rr({text:e}){return e?e.split(/(\*\*[^*]+\*\*|`[^`]+`)/g).map((n,l)=>n.startsWith("**")&&n.endsWith("**")?s.jsx("strong",{className:"font-semibold text-text-0",children:n.slice(2,-2)},l):n.startsWith("`")&&n.endsWith("`")?s.jsx("code",{className:"px-1 py-px rounded bg-accent/8 text-[11px] font-mono text-accent",children:n.slice(1,-1)},l):s.jsx("span",{children:n},l)):null}function wZ({text:e}){if(!e)return null;const n=[],l=e.split(`
673
+ `);let r=0;for(;r<l.length;){const o=l[r];if(o.trimStart().startsWith("```")){const u=[],f=o.trim().slice(3);for(r++;r<l.length&&!l[r].trimStart().startsWith("```");)u.push(l[r]),r++;r++,n.push({type:"code",content:u.join(`
674
+ `),lang:f});continue}if(/^#{1,3}\s/.test(o)||/^\*\*[^*]+:\*\*\s*$/.test(o.trim())){const u=o.replace(/^#+\s*/,"").replace(/^\*\*/,"").replace(/:\*\*\s*$/,":").trim();n.push({type:"heading",content:u}),r++;continue}if(/^\s*[-*]\s/.test(o)){const u=[];for(;r<l.length&&/^\s*[-*]\s/.test(l[r]);)u.push(l[r].replace(/^\s*[-*]\s+/,"").trim()),r++;n.push({type:"list",items:u});continue}if(/^\s*\d+[\.)]\s/.test(o)){const u=[];for(;r<l.length&&/^\s*\d+[\.)]\s/.test(l[r]);)u.push(l[r].replace(/^\s*\d+[\.)]\s+/,"").trim()),r++;n.push({type:"numbered",items:u});continue}if(!o.trim()){r++;continue}if(/^(Note|Warning|Important|IMPORTANT|TODO):/i.test(o.trim())){n.push({type:"note",content:o.trim()}),r++;continue}const d=[];for(;r<l.length&&l[r].trim()&&!/^#{1,3}\s/.test(l[r])&&!/^\s*[-*]\s/.test(l[r])&&!/^\s*\d+[\.)]\s/.test(l[r])&&!l[r].trimStart().startsWith("```");)d.push(l[r].trim()),r++;d.length>0&&n.push({type:"para",content:d.join(" ")})}return s.jsx("div",{className:"space-y-2",children:n.map((o,d)=>{switch(o.type){case"heading":return s.jsxs("div",{className:"flex items-center gap-1.5 pt-1.5 first:pt-0",children:[s.jsx("div",{className:"w-1 h-3.5 rounded-full bg-accent/40 flex-shrink-0"}),s.jsx("span",{className:"text-[12px] font-semibold text-text-0 font-sans",children:s.jsx(rr,{text:o.content})})]},d);case"list":return s.jsx("div",{className:"space-y-1 pl-2",children:o.items.map((u,f)=>s.jsxs("div",{className:"flex gap-2 text-[12px] text-text-0 font-sans leading-relaxed",children:[s.jsx("span",{className:"text-accent/50 mt-0.5 flex-shrink-0",children:"-"}),s.jsx("span",{className:"min-w-0",children:s.jsx(rr,{text:u})})]},f))},d);case"numbered":return s.jsx("div",{className:"space-y-1 pl-2",children:o.items.map((u,f)=>s.jsxs("div",{className:"flex gap-2 text-[12px] text-text-0 font-sans leading-relaxed",children:[s.jsxs("span",{className:"text-text-4 font-mono w-4 text-right flex-shrink-0",children:[f+1,"."]}),s.jsx("span",{className:"min-w-0",children:s.jsx(rr,{text:u})})]},f))},d);case"code":return s.jsx("pre",{className:"p-2.5 rounded-md bg-[#0d1117] text-[11px] font-mono text-[#c9d1d9] overflow-x-auto whitespace-pre-wrap border border-white/[0.06] leading-relaxed",children:o.content},d);case"note":return s.jsxs("div",{className:"flex items-start gap-1.5 px-2.5 py-1.5 rounded-md bg-warning/6 border border-warning/12",children:[s.jsx(Cs,{size:10,className:"text-warning mt-0.5 flex-shrink-0"}),s.jsx("span",{className:"text-[11px] text-warning/80 font-sans",children:s.jsx(rr,{text:o.content})})]},d);case"para":default:return s.jsx("p",{className:"text-[12px] text-text-0 font-sans leading-relaxed",children:s.jsx(rr,{text:o.content})},d)}})})}function kZ({text:e}){if(!e)return null;const n=e.split(/(```[\s\S]*?```)/g);return s.jsx("span",{children:n.map((l,r)=>{if(l.startsWith("```")&&l.endsWith("```")){const o=l.slice(3,-3).replace(/^\w+\n/,"");return s.jsx("pre",{className:"my-1.5 p-2 rounded-md bg-[#0d1117] text-[11px] font-mono text-[#c9d1d9] overflow-x-auto whitespace-pre-wrap border border-white/[0.06]",children:o},r)}return s.jsx("span",{children:s.jsx(rr,{text:l})},r)})})}function NZ({msg:e}){const n=e.isQuery;return s.jsx("div",{className:"flex justify-end pl-8",children:s.jsxs("div",{className:"max-w-[90%]",children:[n&&s.jsxs("div",{className:"flex items-center justify-end gap-1 mb-1",children:[s.jsx(xr,{size:9,className:"text-info"}),s.jsx("span",{className:"text-2xs text-info font-sans font-medium",children:"Query"})]}),s.jsx("div",{className:le("px-3.5 py-2.5 rounded-lg border","bg-info/10 border-info/25"),children:s.jsx("div",{className:"text-[12px] font-sans whitespace-pre-wrap break-words leading-relaxed text-text-0",children:s.jsx(kZ,{text:e.text})})}),s.jsx("div",{className:"text-[10px] text-text-4 font-sans mt-1 text-right",children:Nt(e.timestamp)})]})})}function $Z({msg:e,agent:n}){var d,u;const[l,r]=v.useState(((d=e.text)==null?void 0:d.length)>600),o=((u=e.text)==null?void 0:u.length)>600;return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-1 font-sans",children:(n==null?void 0:n.name)||"Agent"}),s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:n==null?void 0:n.role}),s.jsx("span",{className:"text-[10px] text-text-4 font-sans ml-auto",children:Nt(e.timestamp)})]}),s.jsx("div",{className:"border-l border-accent pl-3.5 py-1",children:s.jsx(wZ,{text:l?e.text.slice(0,600)+"...":e.text})}),l&&s.jsxs("button",{onClick:()=>r(!1),className:"ml-3.5 mt-1.5 flex items-center gap-1.5 text-[11px] text-accent/70 hover:text-accent font-sans font-medium cursor-pointer transition-colors",children:[s.jsx(bn,{size:11}),"Show full response"]}),o&&!l&&s.jsxs("button",{onClick:()=>r(!0),className:"ml-3.5 mt-1.5 flex items-center gap-1.5 text-[11px] text-accent/70 hover:text-accent font-sans font-medium cursor-pointer transition-colors",children:[s.jsx(bn,{size:11,className:"rotate-180"}),"Collapse"]})]})}function TZ({msg:e}){return s.jsxs("div",{className:"flex items-center gap-3 py-2",children:[s.jsx("div",{className:"flex-1 h-px bg-border-subtle"}),s.jsx("span",{className:"text-[10px] text-text-4 font-sans flex-shrink-0 uppercase tracking-wide",children:e.text}),s.jsx("div",{className:"flex-1 h-px bg-border-subtle"})]})}function PZ({entries:e,isLive:n}){var u;const[l,r]=v.useState(0);if(v.useEffect(()=>{if(!n||e.length<=1)return;const f=setInterval(()=>r(h=>(h+1)%e.length),1500);return()=>clearInterval(f)},[e.length,n]),!n){const f=e[e.length-1],x=NS(f.text).icon;return s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 text-[10px] text-text-4 font-mono",children:[s.jsx(x,{size:10,className:"opacity-50"}),s.jsxs("span",{children:[e.length," tool call",e.length!==1?"s":""]})]})}const o=e[Math.min(l,e.length-1)],d=((u=o.text)==null?void 0:u.length)>60?o.text.slice(0,60)+"...":o.text;return s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 max-w-[280px] rounded-md bg-surface-3/50 border border-border-subtle/30",children:[s.jsx(at,{size:11,className:"text-accent animate-spin flex-shrink-0"}),s.jsx("span",{className:"text-[11px] text-text-2 font-mono truncate transition-opacity duration-300",children:d}),e.length>1&&s.jsx("span",{className:"text-[10px] text-text-4 font-mono flex-shrink-0",children:e.length})]})}function CZ({agent:e}){const n=M(h=>h.activityLog[e.id])||dh,l=n[n.length-1],r=l?NS(l.text):null,o=(r==null?void 0:r.icon)||$a,d=l&&Date.now()-l.timestamp<1e4,u=d&&l.text?l.text.length>60?l.text.slice(0,60)+"...":l.text:null,f=Math.round((e.contextUsage||0)*100);return s.jsxs("div",{className:"flex items-center gap-3 px-4 h-8 border-b border-border-subtle bg-surface-1/80 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[s.jsxs("div",{className:"relative flex items-center justify-center w-4 h-4",children:[s.jsx("span",{className:"absolute inset-0 rounded-full bg-accent/15 animate-ping",style:{animationDuration:"2s"}}),s.jsx("span",{className:"relative w-1.5 h-1.5 rounded-full bg-accent"})]}),d?s.jsxs(s.Fragment,{children:[s.jsx(o,{size:10,className:le(r.color,"flex-shrink-0")}),s.jsx("span",{className:"text-[11px] text-text-2 font-sans truncate",children:u})]}):s.jsx("span",{className:"text-[11px] text-text-3 font-sans",children:"Working..."})]}),s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[s.jsx("span",{className:"text-[10px] text-text-4 font-mono",children:zZ(e.tokensUsed)}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-14 h-0.5 rounded-sm bg-surface-4 overflow-hidden",children:s.jsx("div",{className:"h-full rounded-sm transition-all duration-500",style:{width:`${f}%`,background:f>=75?"var(--color-danger)":f>=50?"var(--color-warning)":"var(--color-accent)"}})}),s.jsxs("span",{className:"text-[10px] text-text-4 font-mono w-7 text-right",children:[f,"%"]})]})]})]})}function zZ(e){return e?e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e):"0"}function RZ({agent:e}){const[n,l]=v.useState([]),r=[{text:`Initializing ${e.name}`,delay:0},{text:`Role: ${e.role}`,delay:400},{text:`Provider: ${e.provider||"claude-code"}`,delay:700},{text:"Loading workspace context",delay:1e3},{text:"Scanning project structure",delay:1400},{text:"Session active",delay:1900}];return v.useEffect(()=>{const o=r.map((d,u)=>setTimeout(()=>l(f=>[...f,u]),d.delay));return()=>o.forEach(clearTimeout)},[]),s.jsxs("div",{className:"flex flex-col px-4 pt-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[s.jsxs("div",{className:"relative w-9 h-9",children:[s.jsx("span",{className:"absolute inset-0 rounded-full border-2 border-accent/20 animate-ping",style:{animationDuration:"2s"}}),s.jsx("span",{className:"absolute inset-0 rounded-full border-2 border-transparent border-t-accent animate-spin",style:{animationDuration:"1s"}}),s.jsx("span",{className:"absolute inset-[5px] rounded-full bg-accent/8"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-bold text-text-0 font-sans",children:e.name}),s.jsx("p",{className:"text-2xs text-accent font-mono",children:"starting up"})]})]}),s.jsx("div",{className:"space-y-2 pl-3 border-l border-accent/15",children:r.map((o,d)=>{const u=n.includes(d),f=d===r.length-1;return s.jsxs("div",{className:le("flex items-center gap-2.5 transition-all duration-300",u?"opacity-100 translate-x-0":"opacity-0 -translate-x-2"),children:[s.jsx("span",{className:le("w-1 h-1 rounded-full flex-shrink-0",f&&u?"bg-accent":u?"bg-text-3":"bg-transparent")}),s.jsx("span",{className:le("text-[11px] font-mono",f&&u?"text-accent":"text-text-3"),children:o.text}),f&&u&&s.jsxs("span",{className:"flex gap-0.5 ml-1",children:[s.jsx("span",{className:"w-1 h-1 rounded-full bg-accent animate-pulse",style:{animationDelay:"0ms"}}),s.jsx("span",{className:"w-1 h-1 rounded-full bg-accent animate-pulse",style:{animationDelay:"200ms"}}),s.jsx("span",{className:"w-1 h-1 rounded-full bg-accent animate-pulse",style:{animationDelay:"400ms"}})]})]},d)})})]})}function AZ({agent:e}){const n=M(Z=>Z.chatHistory[e.id])||dh,l=M(Z=>Z.activityLog[e.id])||dh,r=M(Z=>Z.instructAgent),o=M(Z=>Z.queryAgent),d=M(Z=>{var J;return(J=Z.thinkingAgents)==null?void 0:J.has(e.id)}),u=M(Z=>Z.chatInputs[e.id]||""),f=Z=>M.setState(J=>({chatInputs:{...J.chatInputs,[e.id]:Z}})),h=u,x=f,[g,p]=v.useState("instruct"),[b,y]=v.useState(!1),[j,w]=v.useState(36),k=v.useRef(null),Q=v.useRef(null),C=v.useRef(null),P=v.useRef(null),R=v.useCallback(Z=>{Z.preventDefault();const J=Z.clientY,A=j,U=V=>w(Math.min(Math.max(36,A-(V.clientY-J)),280)),D=()=>{window.removeEventListener("mousemove",U),window.removeEventListener("mouseup",D)};window.addEventListener("mousemove",U),window.addEventListener("mouseup",D)},[j]),Y=v.useMemo(()=>{var T;const Z=[],J=new Set;for(const L of n){const ee=`${L.from}:${(T=L.text)==null?void 0:T.slice(0,100)}`;Z.find(ae=>{var ye;return ae.kind==="chat"&&`${ae.from}:${(ye=ae.text)==null?void 0:ye.slice(0,100)}`===ee&&Math.abs(ae.ts-L.timestamp)<5e3})||(Z.push({...L,kind:"chat",ts:L.timestamp}),J.add(L.text))}const A=J,U=l.slice(-30);for(const L of U)(L.text||"").trim()&&!A.has(L.text)&&Z.push({...L,kind:"activity",ts:L.timestamp});Z.sort((L,ee)=>L.ts-ee.ts);const D=[];let V=[];for(const L of Z)L.kind==="activity"?V.push(L):(V.length>0&&(D.push({kind:"activity-group",entries:V}),V=[]),D.push(L));return V.length>0&&D.push({kind:"activity-group",entries:V}),D},[n,l]);v.useEffect(()=>{Q.current&&requestAnimationFrame(()=>{Q.current&&(Q.current.scrollTop=Q.current.scrollHeight)})},[Y.length]);async function X(Z){var D;const J=Array.from(Z.target.files||[]);if(J.length===0)return;const A=M.getState().addToast,U=[];for(const V of J)try{const T=await new Promise((L,ee)=>{const de=new FileReader;de.onload=()=>L(de.result.split(",")[1]),de.onerror=ee,de.readAsDataURL(V)});await B.post(`/agents/${e.id}/upload`,{filename:V.name,content:T}),U.push(V.name)}catch(T){A("error",`Upload failed: ${V.name}`,T.message)}if(U.length>0){const V=U.join(", ");x(T=>(T?T+`
675
+ `:"")+`[Uploaded: ${V}] — I've uploaded these files to your working directory. Read them and use their content.`),A("success",`Uploaded ${U.length} file${U.length>1?"s":""}`)}Z.target.value="",(D=C.current)==null||D.focus()}async function z(){var J;const Z=h.trim();if(!(!Z||b)){if(Z==="/rotate"){const A=M.getState().rotateAgent;x("");try{await A(e.id)}catch{}return}x(""),y(!0);try{g==="query"?await o(e.id,Z):await r(e.id,Z)}catch{}y(!1),(J=C.current)==null||J.focus()}}function $(Z){Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),z())}const F=e.status==="running"||e.status==="starting";return s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[F&&s.jsx(CZ,{agent:e}),s.jsxs("div",{ref:Q,className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[!Y.some(Z=>Z.from==="agent"||Z.kind==="activity-group")&&(F?s.jsx(RZ,{agent:e}):s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center py-8",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-surface-3 flex items-center justify-center mb-3",children:s.jsx(Gi,{size:18,className:"text-text-4"})}),s.jsx("p",{className:"text-sm font-semibold text-text-0 font-sans",children:e.name}),s.jsx("p",{className:"text-xs text-text-3 font-sans mt-1",children:"Session complete — send a message to continue"})]})),Y.map((Z,J)=>{if(Z.kind==="activity-group"){const A=!Y.slice(J+1).some(U=>U.kind==="activity-group"||U.from==="agent");return s.jsx("div",{children:s.jsx(PZ,{entries:Z.entries,isLive:F&&A})},`grp-${J}`)}return Z.from==="user"?s.jsx(NZ,{msg:Z},`msg-${J}`):Z.from==="system"?s.jsx(TZ,{msg:Z},`msg-${J}`):s.jsx($Z,{msg:Z,agent:e},`msg-${J}`)}),s.jsx(Ei,{children:(b||d)&&s.jsx(qi.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.25,ease:"easeOut"},children:s.jsx(QZ,{agent:e})},"thinking")})]}),s.jsxs("div",{className:"bg-surface-1/50 flex-shrink-0",children:[s.jsx("div",{ref:k,onMouseDown:R,className:"flex items-center justify-center h-5 cursor-row-resize border-t border-border hover:bg-surface-3/50 transition-colors group",children:s.jsx(J$,{size:12,className:"text-text-4 group-hover:text-text-2 transition-colors"})}),s.jsxs("div",{className:"px-4 pb-3",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[s.jsxs("button",{onClick:()=>p("instruct"),className:le("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-sans font-medium transition-colors cursor-pointer",g==="instruct"?"bg-accent/12 text-accent border border-accent/20":"text-text-3 hover:text-text-1 hover:bg-surface-3"),children:[s.jsx(Di,{size:10}),"Instruct"]}),s.jsxs("button",{onClick:()=>p("query"),className:le("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-sans font-medium transition-colors cursor-pointer",g==="query"?"bg-info/12 text-info border border-info/20":"text-text-3 hover:text-text-1 hover:bg-surface-3"),children:[s.jsx(xr,{size:10}),"Query"]}),s.jsx("span",{className:"text-[10px] text-text-4 font-sans ml-auto",children:g==="query"?"Read-only — agent keeps working":F?"Directs the agent":"Continues the session"})]}),s.jsxs("div",{className:le("flex items-end gap-1 rounded-xl border bg-surface-0 p-1 transition-colors",g==="query"?"border-info/20 focus-within:border-info/40":"border-border-subtle focus-within:border-accent/30"),children:[s.jsx("input",{ref:P,type:"file",multiple:!0,accept:".pdf,.png,.jpg,.jpeg,.gif,.svg,.csv,.txt,.md,.json,.yaml,.yml,.docx,.pptx,.xlsx",onChange:X,className:"hidden"}),s.jsx("button",{onClick:()=>{var Z;return(Z=P.current)==null?void 0:Z.click()},className:"w-9 h-9 flex items-center justify-center rounded-lg text-text-4 hover:text-text-1 hover:bg-surface-3 transition-colors cursor-pointer flex-shrink-0 mb-px",title:"Attach file",children:s.jsx(_T,{size:14})}),s.jsx("textarea",{ref:C,value:h,onChange:Z=>x(Z.target.value),onKeyDown:$,placeholder:g==="query"?"Ask about this agent's work...":F?"Send an instruction...":"Continue this session...",rows:1,className:le("flex-1 resize-none px-3 py-2 text-[13px]","bg-transparent text-text-0 font-sans","placeholder:text-text-4","focus:outline-none"),style:{height:j}}),d?s.jsx("button",{onClick:()=>M.getState().stopAgent(e.id),title:"Stop agent",className:"w-9 h-9 flex items-center justify-center rounded-lg border border-danger/30 bg-danger/12 text-danger hover:bg-danger/20 transition-all cursor-pointer flex-shrink-0 mb-px",children:s.jsx(O3,{size:13,fill:"currentColor"})}):s.jsx("button",{onClick:z,disabled:!h.trim()||b,className:le("w-9 h-9 flex items-center justify-center rounded-lg transition-all cursor-pointer flex-shrink-0 mb-px","disabled:opacity-15 disabled:cursor-not-allowed",h.trim()?g==="query"?"bg-info text-white hover:bg-info/85":"bg-accent text-white hover:bg-accent/85":"bg-transparent text-text-4"),children:b?s.jsx(at,{size:15,className:"animate-spin"}):s.jsx(zh,{size:15})})]})]})]})]})}function $c({options:e,value:n,onChange:l}){return s.jsx("div",{className:"flex bg-surface-0 rounded-lg p-0.5 border border-border-subtle",children:e.map(r=>s.jsx("button",{onClick:()=>l(r.value),className:le("flex-1 px-3 py-1.5 text-2xs font-semibold font-sans rounded-md transition-all cursor-pointer",n===r.value?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:r.label},r.value))})}function Gt({label:e,icon:n,children:l,description:r}){return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{children:[s.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-semibold text-text-1 font-sans",children:[n&&s.jsx(n,{size:13,className:"text-text-3"}),e]}),r&&s.jsx("p",{className:"text-2xs text-text-4 font-sans mt-0.5",children:r})]}),l]})}function _Z({agent:e}){const n=M(j=>j.killAgent),l=M(j=>j.rotateAgent),r=M(j=>j.spawnAgent),o=M(j=>j.closeDetail),d=M(j=>j.addToast),[u,f]=v.useState(null),[h,x]=v.useState(!1),g=e.status==="running"||e.status==="starting";async function p(){f("rotate");try{await l(e.id)}catch{}f(null)}async function b(){if(!h){x(!0),setTimeout(()=>x(!1),3e3);return}f("kill");try{await n(e.id),o()}catch{}f(null),x(!1)}async function y(){f("clone");try{await r({role:e.role,provider:e.provider,model:e.model,name:`${e.name}-clone`,scope:e.scope,workingDir:e.workingDir}),d("success",`Cloned ${e.name}`)}catch{}f(null)}return g?s.jsx("div",{className:"space-y-2",children:s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsxs(ue,{variant:"primary",size:"md",onClick:p,disabled:u==="rotate",className:"gap-1.5",children:[s.jsx(Li,{size:12,className:u==="rotate"?"animate-spin":""}),"Rotate"]}),s.jsxs(ue,{variant:"info",size:"md",onClick:y,disabled:!!u,className:"gap-1.5",children:[s.jsx(Bc,{size:12})," Clone"]}),s.jsxs(ue,{variant:"danger",size:"md",onClick:b,disabled:u==="kill",className:"gap-1.5",children:[s.jsx(_h,{size:12}),h?"Confirm":"Kill"]})]})}):s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs(ue,{variant:"info",size:"md",onClick:y,disabled:!!u,className:"gap-1.5",children:[s.jsx(Bc,{size:12})," Clone"]}),s.jsxs(ue,{variant:"danger",size:"md",onClick:b,disabled:u==="kill",className:"gap-1.5",children:[s.jsx(Sn,{size:12}),h?"Confirm":"Remove"]})]})}function XZ({agent:e}){var dt,kn;const n=M(W=>W.addToast),[l,r]=v.useState([]),[o,d]=v.useState(e.model||""),[u,f]=v.useState(""),[h,x]=v.useState(e.effort||"default"),[g,p]=v.useState(!1),[b,y]=v.useState(""),[j,w]=v.useState(null),[k,Q]=v.useState(!1),[C,P]=v.useState(null),[R,Y]=v.useState(e.routingMode||"auto"),[X,z]=v.useState([]),[$,F]=v.useState([]),[Z,J]=v.useState("hr"),[A,U]=v.useState("1"),[D,V]=v.useState(!1),[T,L]=v.useState(""),[ee,de]=v.useState(!1),[ae,ye]=v.useState([]),[Se,ge]=v.useState(!1),je=e.status==="running"||e.status==="starting";v.useEffect(()=>{ze(),B.get("/skills/installed").then(Oe=>z(Array.isArray(Oe)?Oe:Oe.skills||[])).catch(()=>{}),B.get("/repos/imported").then(Oe=>F((Array.isArray(Oe)?Oe:[]).filter(we=>we.status==="active"))).catch(()=>{});function W(){ze()}return window.addEventListener("groove:providers-changed",W),()=>window.removeEventListener("groove:providers-changed",W)},[]);function ze(){B.get("/providers").then(W=>r(Array.isArray(W)?W:[])).catch(()=>{})}v.useEffect(()=>{d(e.model||""),B.get(`/agents/${e.id}/routing/recommend`).then(W=>{Y((W==null?void 0:W.mode)||"fixed")}).catch(()=>{})},[e.id,e.model]),v.useEffect(()=>{de(!1),B.get(`/personalities/${e.name}`).then(W=>{L((W==null?void 0:W.content)||""),de(!0)}).catch(()=>{L(""),de(!0)}),B.get("/personalities").then(W=>{ye(Array.isArray(W)?W:W.personalities||[])}).catch(()=>{})},[e.id,e.name]);const ke=l.find(W=>W.id===e.provider);async function it(W,Oe){d(Oe);try{const we={model:Oe};W&&W!==e.provider&&(we.provider=W),await B.patch(`/agents/${e.id}`,we),n("success",`Model → ${Oe}${we.provider?` (${W})`:""}`)}catch(we){n("error","Model swap failed",we.message)}}async function St(W){try{await B.patch(`/agents/${e.id}`,{workingDir:W}),n("success",`Working dir → ${W.split("/").pop()||W}`)}catch(Oe){n("error","Update failed",Oe.message)}}async function Ee(W){x(W);try{await B.patch(`/agents/${e.id}`,{effort:W}),n("success",`Effort → ${W}`)}catch(Oe){n("error","Update failed",Oe.message)}}async function $t(W){if(!W.trim())return;const Oe=[...e.scope||[],W.trim()];try{await B.patch(`/agents/${e.id}`,{scope:Oe}),f("")}catch(we){n("error","Scope update failed",we.message)}}async function tt(W){const Oe=(e.scope||[]).filter((we,Tt)=>Tt!==W);try{await B.patch(`/agents/${e.id}`,{scope:Oe})}catch(we){n("error","Scope update failed",we.message)}}async function nt(W){if(b.trim())try{await B.post(`/credentials/${W}`,{key:b.trim()}),n("success",`API key set for ${W}`),y(""),w(null),ze(),window.dispatchEvent(new CustomEvent("groove:providers-changed"))}catch(Oe){n("error","Failed to set key",Oe.message)}}const jt=e.spawnedAt||e.createdAt;return s.jsxs("div",{className:"px-5 py-5 space-y-6 overflow-y-auto h-full",children:[s.jsx(Gt,{label:"Active Model",icon:pr,children:s.jsxs("div",{className:"bg-surface-0 rounded-lg border border-border-subtle px-3.5 py-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-bold font-mono text-text-0",children:e.model||"auto"}),s.jsx("div",{className:"text-2xs text-text-3 font-sans mt-0.5",children:(ke==null?void 0:ke.name)||e.provider})]}),(ke==null?void 0:ke.canHotSwap)&&je&&s.jsxs(Te,{variant:"accent",className:"text-2xs gap-1",children:[s.jsx(Jn,{size:8})," Hot-swap"]})]}),((dt=ke==null?void 0:ke.models)==null?void 0:dt.length)>1&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3 pt-3 border-t border-border-subtle",children:ke.models.filter(W=>!W.disabled).map(W=>{const Oe=W.id===e.model;return s.jsx("button",{onClick:()=>it(e.provider,W.id),disabled:!1,className:le("px-2.5 py-1 rounded-md text-xs font-mono transition-all","cursor-pointer",Oe?"bg-accent/15 text-accent font-semibold":"bg-surface-4 text-text-2 hover:bg-surface-5 hover:text-text-0"),children:W.name||W.id},W.id)})})]})}),s.jsx(_Z,{agent:e}),s.jsxs(Gt,{label:"Providers",icon:X1,description:"Click a provider to see its models and connection status.",children:[s.jsx("div",{className:"space-y-1.5",children:l.map(W=>{const Oe=W.id===e.provider,we=W.installed||W.hasKey,Tt=C===W.id,Mn=W.models||[];return s.jsxs("div",{className:"rounded-lg border border-border-subtle bg-surface-0 overflow-hidden",children:[s.jsxs("button",{onClick:()=>P(Tt?null:W.id),className:"w-full flex items-center gap-2.5 px-3 py-2 cursor-pointer hover:bg-surface-4/50 transition-colors",children:[s.jsx("div",{className:le("w-2 h-2 rounded-full flex-shrink-0",we?"bg-success":"bg-text-4")}),s.jsx("span",{className:le("text-xs font-semibold font-sans flex-1 text-left",we?"text-text-0":"text-text-3"),children:W.name||W.id}),Oe&&s.jsx(Te,{variant:"accent",className:"text-2xs",children:"Active"}),!we&&s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:W.authType==="local"?"Not installed":"No key"}),s.jsx(bn,{size:12,className:le("text-text-4 transition-transform",Tt&&"rotate-180")})]}),Tt&&W.authType==="local"&&s.jsx("div",{className:"border-t border-border-subtle",children:s.jsx(jS,{isInstalled:we,onModelChange:ze})}),Tt&&W.authType!=="local"&&s.jsxs("div",{className:"border-t border-border-subtle",children:[(!we||W.hasKey)&&s.jsx("div",{className:"px-3 py-2 bg-surface-1/50",children:j===W.id?s.jsxs("div",{className:"flex gap-1.5",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx("input",{value:b,onChange:Ot=>y(Ot.target.value),onKeyDown:Ot=>Ot.key==="Enter"&&nt(W.id),type:k?"text":"password",placeholder:`${W.name||W.id} API key...`,className:"w-full h-7 px-2.5 pr-7 text-2xs bg-surface-0 border border-border rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent",autoFocus:!0}),s.jsx("button",{onClick:()=>Q(!k),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-4 hover:text-text-2 cursor-pointer",children:k?s.jsx(yd,{size:10}):s.jsx(xl,{size:10})})]}),s.jsx(ue,{variant:"primary",size:"sm",onClick:()=>nt(W.id),disabled:!b.trim(),className:"h-7 px-2 text-2xs",children:"Save"}),s.jsx(ue,{variant:"ghost",size:"sm",onClick:()=>{w(null),y("")},className:"h-7 px-2 text-2xs",children:"Cancel"})]}):s.jsxs("button",{onClick:()=>{w(W.id),y(""),Q(!1)},className:"flex items-center gap-1.5 text-2xs text-text-3 hover:text-accent font-sans cursor-pointer transition-colors",children:[s.jsx(ol,{size:10}),we?"Update API key":"Add API key to enable"]})}),we&&Mn.filter(Ot=>!Ot.disabled).length>0&&Mn.filter(Ot=>!Ot.disabled).map(Ot=>{const ne=W.id===e.provider&&Ot.id===e.model;return s.jsxs("button",{onClick:()=>it(W.id,Ot.id),disabled:!1,className:le("w-full flex items-center gap-2 px-3 py-2 text-left text-xs font-sans transition-colors","border-t border-border-subtle","cursor-pointer hover:bg-surface-4/50",ne?"text-accent":"text-text-2"),children:[ne?s.jsx(kt,{size:11,className:"text-accent flex-shrink-0"}):s.jsx("div",{className:"w-[11px]"}),s.jsx("span",{className:"font-mono flex-1 truncate",children:Ot.name||Ot.id}),s.jsx(Te,{variant:ne?"accent":"default",className:"text-2xs",children:Ot.tier})]},Ot.id)})]})]},W.id)})}),je&&s.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-text-3 font-sans mt-1.5",children:[s.jsx(Cs,{size:10}),s.jsx("span",{children:"Model changes apply on next rotation or respawn."})]})]}),s.jsx(Gt,{label:"Working Directory",icon:il,description:"The root directory this agent operates in.",children:s.jsxs("div",{className:"flex gap-2",children:[s.jsx("div",{className:"flex-1 bg-surface-0 rounded-lg px-3 py-2.5 text-sm font-mono text-text-1 border border-border-subtle truncate min-w-0",children:e.workingDir||"Project root"}),s.jsxs(ue,{variant:"secondary",size:"md",onClick:()=>p(!0),className:"gap-1.5 flex-shrink-0",children:[s.jsx(Ph,{size:14})," Browse"]})]})}),s.jsx(Gt,{label:"Permission Mode",icon:cl,description:"Full Send = no approvals. Agent Approve = Fullstack Manager reviews risky operations.",children:s.jsx($c,{options:[{value:"full",label:"Full Send"},{value:"auto",label:"Agent Approve"}],value:e.permission||"full",onChange:async W=>{try{await B.patch(`/agents/${e.id}`,{permission:W}),n("success",`Permission → ${W==="full"?"Full Send":"Agent Approve"}`)}catch(Oe){n("error","Update failed",Oe.message)}}})}),((kn=e.integrations)==null?void 0:kn.length)>0&&s.jsx(Gt,{label:"Integration Approvals",icon:pa,description:"Manual = you approve dangerous actions. Auto = agent acts freely.",children:s.jsx($c,{options:[{value:"manual",label:"Manual"},{value:"auto",label:"Auto"}],value:e.integrationApproval||"manual",onChange:async W=>{try{await B.patch(`/agents/${e.id}`,{integrationApproval:W}),n("success",`Integration approvals → ${W==="auto"?"Auto":"Manual"}`)}catch(Oe){n("error","Update failed",Oe.message)}}})}),s.jsxs(Gt,{label:"Model Routing",icon:Ci,description:"How Groove selects models for this agent's tasks.",children:[s.jsx($c,{options:[{value:"fixed",label:"Fixed"},{value:"auto",label:"Auto"},{value:"auto-floor",label:"Auto + Floor"}],value:R,onChange:async W=>{Y(W);try{await B.post(`/agents/${e.id}/routing`,{mode:W}),n("success",`Routing → ${W}`)}catch(Oe){n("error","Update failed",Oe.message)}}}),s.jsxs("div",{className:"text-2xs text-text-4 font-sans mt-1",children:[R==="fixed"&&"Uses the selected model for all tasks.",R==="auto"&&"Groove picks Opus/Sonnet/Haiku based on task complexity.",R==="auto-floor"&&"Auto-routes but never drops below Sonnet."]})]}),s.jsx(Gt,{label:"File Scope",icon:cl,description:"Restrict which files this agent can access. Empty = unrestricted.",children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[(e.scope||[]).map((W,Oe)=>s.jsxs(Te,{variant:"default",className:"font-mono text-xs gap-1.5 px-2.5 py-1",children:[W,s.jsx("button",{onClick:()=>tt(Oe),className:"hover:text-danger cursor-pointer",children:s.jsx(rt,{size:10})})]},Oe)),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("input",{value:u,onChange:W=>f(W.target.value),onKeyDown:W=>W.key==="Enter"&&$t(u),placeholder:"e.g. src/**",className:"w-28 h-7 px-2.5 text-xs bg-surface-0 border border-border-subtle rounded-md text-text-0 font-mono placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"}),s.jsx("button",{onClick:()=>$t(u),disabled:!u.trim(),className:"w-7 h-7 flex items-center justify-center rounded-md bg-surface-4 border border-border-subtle text-text-3 hover:text-accent cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:s.jsx(vn,{size:12})})]})]})}),s.jsx(Gt,{label:"Effort Level",icon:vv,description:"Controls how deep the agent reasons. Higher = more tokens but better results.",children:s.jsx($c,{options:[{value:"min",label:"Min"},{value:"low",label:"Low"},{value:"default",label:"Default"},{value:"high",label:"High"},{value:"max",label:"Max"}],value:h,onChange:Ee})}),s.jsx(Gt,{label:"Agent Details",icon:X1,children:s.jsxs("div",{className:"bg-surface-0 rounded-lg border border-border-subtle divide-y divide-border-subtle",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"ID"}),s.jsx("span",{className:"text-xs text-text-1 font-mono",children:e.id})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Role"}),s.jsx("span",{className:"text-xs text-text-1 font-sans capitalize",children:e.role})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Provider"}),s.jsx("span",{className:"text-xs text-text-1 font-mono",children:e.provider})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Model"}),s.jsx("span",{className:"text-xs text-text-1 font-mono",children:e.model||"auto"})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Status"}),s.jsx("span",{className:"text-xs text-text-1 font-sans capitalize",children:e.status})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Spawned"}),s.jsx("span",{className:"text-xs text-text-1 font-sans",children:jt?Nt(jt):"—"})]}),e.sessionId&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs text-text-3 font-sans",children:"Session"}),s.jsxs("span",{className:"text-xs text-text-1 font-mono",children:[e.sessionId.slice(0,16),"..."]})]})]})}),s.jsx(Gt,{label:"Skills",icon:tl,description:"Attach installed skills to this agent's context.",children:s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[(e.skills||[]).map(W=>s.jsxs(Te,{variant:"accent",className:"font-mono text-xs gap-1.5 px-2.5 py-1",children:[W,s.jsx("button",{onClick:async()=>{try{await B.delete(`/agents/${e.id}/skills/${W}`),n("success",`Detached ${W}`)}catch(Oe){n("error","Detach failed",Oe.message)}},className:"hover:text-danger cursor-pointer",children:s.jsx(rt,{size:10})})]},W)),X.filter(W=>!(e.skills||[]).includes(W.id)).length>0&&s.jsxs("div",{className:"relative group",children:[s.jsx("button",{className:"w-7 h-7 flex items-center justify-center rounded-md bg-surface-4 border border-border-subtle text-text-3 hover:text-accent cursor-pointer transition-colors",children:s.jsx(vn,{size:12})}),s.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 hidden group-hover:block bg-surface-2 border border-border-subtle rounded-lg shadow-xl py-1 min-w-[160px]",children:X.filter(W=>!(e.skills||[]).includes(W.id)).map(W=>s.jsx("button",{onClick:async()=>{try{await B.post(`/agents/${e.id}/skills/${W.id}`),n("success",`Attached ${W.name||W.id}`)}catch(Oe){n("error","Attach failed",Oe.message)}},className:"w-full text-left px-3 py-1.5 text-xs font-sans text-text-1 hover:bg-surface-4 cursor-pointer transition-colors",children:W.name||W.id},W.id))})]}),(e.skills||[]).length===0&&X.length===0&&s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:"No skills installed — browse the Marketplace"})]})}),$.length>0&&s.jsx(Gt,{label:"Repos",icon:dr,description:"Attach imported repos so this agent knows where they are.",children:s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[(e.repos||[]).map(W=>{const Oe=$.find(we=>we.id===W);return s.jsxs(Te,{variant:"accent",className:"font-mono text-xs gap-1.5 px-2.5 py-1",children:[(Oe==null?void 0:Oe.name)||W,s.jsx("button",{onClick:async()=>{try{await B.delete(`/agents/${e.id}/repos/${W}`),n("success",`Detached ${(Oe==null?void 0:Oe.name)||W}`)}catch(we){n("error","Detach failed",we.message)}},className:"hover:text-danger cursor-pointer",children:s.jsx(rt,{size:10})})]},W)}),$.filter(W=>!(e.repos||[]).includes(W.id)).length>0&&s.jsxs("div",{className:"relative group",children:[s.jsx("button",{className:"w-7 h-7 flex items-center justify-center rounded-md bg-surface-4 border border-border-subtle text-text-3 hover:text-accent cursor-pointer transition-colors",children:s.jsx(vn,{size:12})}),s.jsx("div",{className:"absolute top-full left-0 mt-1 z-20 hidden group-hover:block bg-surface-2 border border-border-subtle rounded-lg shadow-xl py-1 min-w-[200px]",children:$.filter(W=>!(e.repos||[]).includes(W.id)).map(W=>s.jsxs("button",{onClick:async()=>{try{await B.post(`/agents/${e.id}/repos/${W.id}`),n("success",`Attached ${W.name||W.id}`)}catch(Oe){n("error","Attach failed",Oe.message)}},className:"w-full text-left px-3 py-1.5 text-xs font-sans text-text-1 hover:bg-surface-4 cursor-pointer transition-colors",children:[s.jsx("div",{className:"font-semibold",children:W.name||W.repo}),s.jsx("div",{className:"text-2xs text-text-4 font-mono truncate",children:W.clonedTo})]},W.id))})]}),(e.repos||[]).length===0&&s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:"No repos attached — import one from the Marketplace"})]})}),s.jsx(Gt,{label:"Schedule",icon:Wc,description:"Run this agent on a recurring schedule.",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-text-2 font-sans",children:"Every"}),s.jsx("input",{value:A,onChange:W=>U(W.target.value.replace(/\D/g,"").slice(0,3)),className:"w-12 h-7 px-2 text-xs text-center bg-surface-0 border border-border-subtle rounded-md text-text-0 font-mono focus:outline-none focus:ring-1 focus:ring-accent",placeholder:"1"}),s.jsx("div",{className:"flex bg-surface-0 rounded-lg p-0.5 border border-border-subtle",children:[{value:"min",label:"Min"},{value:"hr",label:"Hr"},{value:"day",label:"Day"},{value:"wk",label:"Wk"},{value:"mo",label:"Mo"}].map(W=>s.jsx("button",{onClick:()=>J(W.value),className:le("px-2 py-1 text-2xs font-semibold font-sans rounded-md transition-all cursor-pointer",Z===W.value?"bg-accent/15 text-accent shadow-sm":"text-text-3 hover:text-text-1"),children:W.label},W.value))}),s.jsxs(ue,{variant:"primary",size:"sm",disabled:D||!A||parseInt(A,10)<1,onClick:async()=>{const W=parseInt(A,10);if(!W||W<1)return;const Oe={min:W===1?"* * * * *":`*/${W} * * * *`,hr:W===1?"0 * * * *":`0 */${W} * * *`,day:W===1?"0 0 * * *":`0 0 */${W} * *`,wk:`0 0 * * ${W===1?"1":"*"}`,mo:`0 0 ${W===1?"1":W} * *`};V(!0);try{await B.post("/schedules",{name:`${e.name} schedule`,cron:Oe[Z],agentConfig:{role:e.role,provider:e.provider,model:e.model,scope:e.scope,workingDir:e.workingDir,prompt:e.prompt}}),n("success",`Scheduled every ${W} ${Z}`)}catch(we){n("error","Schedule failed",we.message)}V(!1)},className:"h-7 px-3 text-2xs gap-1",children:[s.jsx(Wc,{size:10}),D?"...":"Set"]})]})}),s.jsxs(Gt,{label:"Personality",icon:Qd,description:"Injected into every prompt. Changes apply on next spawn or rotation.",children:[s.jsx("textarea",{value:T,onChange:W=>L(W.target.value),placeholder:ee?"Describe this agent's personality, tone, and behavior...":"Loading...",rows:4,className:"w-full min-h-[4rem] max-h-[10rem] resize-y bg-surface-0 border border-border-subtle rounded-md p-2 text-xs font-mono text-text-1 placeholder:text-text-4 focus:outline-none focus:ring-1 focus:ring-accent"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(ue,{variant:"primary",size:"sm",disabled:Se,onClick:async()=>{ge(!0);try{await B.put(`/personalities/${e.name}`,{content:T}),n("success","Personality saved")}catch(W){n("error","Save failed",W.message)}ge(!1)},className:"h-7 px-3 text-2xs gap-1",children:[s.jsx(IO,{size:10}),Se?"Saving...":"Save"]}),ae.length>0&&s.jsxs("div",{className:"relative",children:[s.jsxs("select",{value:"",onChange:W=>{if(!W.target.value)return;const Oe=ae.find(we=>(we.name||we)===W.target.value);Oe&&B.get(`/personalities/${Oe.name||Oe}`).then(we=>{we!=null&&we.content&&L(we.content)}).catch(()=>{})},className:"h-7 px-2 pr-7 text-2xs rounded-md bg-surface-1 border border-border-subtle text-text-2 font-sans appearance-none cursor-pointer focus:outline-none focus:ring-1 focus:ring-accent",children:[s.jsx("option",{value:"",children:"Clone from..."}),ae.filter(W=>(W.name||W)!==e.name).map(W=>s.jsx("option",{value:W.name||W,children:W.name||W},W.name||W))]}),s.jsx(bn,{size:10,className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-4 pointer-events-none"})]})]})]}),e.prompt&&s.jsx(Gt,{label:"Original Prompt",icon:Ci,children:s.jsx("div",{className:"bg-surface-0 rounded-lg border border-border-subtle px-3 py-3 text-xs text-text-2 font-sans leading-relaxed max-h-40 overflow-y-auto",children:e.prompt})}),s.jsx(um,{open:g,onOpenChange:p,currentPath:e.workingDir||"/",onSelect:St})]})}const ab=[];function ZZ({data:e,isAlive:n,height:l=48}){const r=v.useRef(null);return v.useEffect(()=>{const o=r.current;if(!o||!e.length)return;const d=o.getContext("2d"),u=window.devicePixelRatio||1,f=o.clientWidth,h=o.clientHeight;o.width=f*u,o.height=h*u,d.scale(u,u),d.clearRect(0,0,f,h);const x=e.map(j=>j.v),g=Math.min(...x),b=Math.max(...x,1)-g||1;d.beginPath(),d.moveTo(0,h),e.forEach((j,w)=>{const k=w/(e.length-1)*f,Q=h-(j.v-g)/b*(h-4)-2;d.lineTo(k,Q)}),d.lineTo(f,h),d.closePath();const y=d.createLinearGradient(0,0,0,h);if(y.addColorStop(0,n?"rgba(51,175,188,0.15)":"rgba(110,118,129,0.08)"),y.addColorStop(1,"rgba(0,0,0,0)"),d.fillStyle=y,d.fill(),d.beginPath(),d.strokeStyle=n?fe.accent:fe.text3,d.lineWidth=1.5,e.forEach((j,w)=>{const k=w/(e.length-1)*f,Q=h-(j.v-g)/b*(h-4)-2;w===0?d.moveTo(k,Q):d.lineTo(k,Q)}),d.stroke(),e.length>1&&n){const j=e[e.length-1],w=f-1,k=h-(j.v-g)/b*(h-4)-2;d.beginPath(),d.arc(w,k,5,0,Math.PI*2),d.fillStyle="rgba(51,175,188,0.3)",d.fill(),d.beginPath(),d.arc(w,k,2.5,0,Math.PI*2),d.fillStyle=fe.accent,d.fill()}},[e,n]),s.jsx("div",{className:"w-full rounded-lg bg-surface-0 overflow-hidden border border-border-subtle",style:{height:l},children:s.jsx("canvas",{ref:r,className:"w-full h-full"})})}function Tc({icon:e,label:n,value:l,color:r,sub:o}){return s.jsxs("div",{className:"bg-surface-0 rounded-lg px-3 py-2.5 border border-border-subtle",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(e,{size:12,className:r||"text-text-3"}),s.jsx("span",{className:"text-2xs text-text-4 font-sans uppercase tracking-wider",children:n})]}),s.jsx("div",{className:le("text-lg font-bold font-mono tabular-nums",r||"text-text-0"),children:l}),o&&s.jsx("div",{className:"text-2xs text-text-4 font-sans mt-0.5",children:o})]})}function EZ({score:e}){const n=Math.min(Math.max(e,0),100);let l=fe.success,r="Healthy";return n<40?(l=fe.danger,r="Degraded"):n<70&&(l=fe.warning,r="Fair"),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsxs("span",{className:"text-2xs text-text-3 font-sans flex items-center gap-1.5",children:[s.jsx(aT,{size:11}),"Session Health"]}),s.jsxs("span",{className:"text-xs font-bold font-mono",style:{color:l},children:[n,"/100"]})]}),s.jsx("div",{className:"h-2 bg-surface-0 rounded-full overflow-hidden border border-border-subtle",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${n}%`,background:l}})}),s.jsx("span",{className:"text-2xs font-sans mt-1 block",style:{color:l},children:r})]})}function qZ(e){const n=(e||"").toLowerCase();return n.includes("edit")||n.includes("writ")?{icon:gv,color:"text-warning"}:n.includes("read")||n.includes("view")?{icon:xl,color:"text-info"}:n.includes("search")||n.includes("grep")||n.includes("glob")?{icon:yn,color:"text-purple"}:n.includes("bash")||n.includes("command")||n.includes("terminal")?{icon:Wi,color:"text-orange"}:n.includes("error")||n.includes("fail")?{icon:Cs,color:"text-danger"}:n.includes("spawn")||n.includes("start")?{icon:Jn,color:"text-success"}:n.includes("complet")||n.includes("done")?{icon:WO,color:"text-success"}:{icon:BO,color:"text-text-4"}}function MZ({agent:e}){const n=M(u=>u.tokenTimeline[e.id])||ab,l=M(u=>u.activityLog[e.id])||ab,r=e.status==="running"||e.status==="starting",o=v.useMemo(()=>{if(n.length<2)return 0;const u=n.slice(-10),f=(u[u.length-1].t-u[0].t)/6e4,h=u[u.length-1].v-u[0].v;return f>0?Math.round(h/f):0},[n]),d=v.useMemo(()=>{const u=e.contextUsage||0;let f=100;return u>90?f-=50:u>70?f-=25:u>50&&(f-=10),o>5e3?f-=15:o>3e3&&(f-=8),e.status==="crashed"&&(f=10),e.status==="completed"&&(f=95),Math.max(0,Math.min(100,f))},[e.contextUsage,e.status,o]);return s.jsxs("div",{className:"px-5 py-5 space-y-5 overflow-y-auto h-full",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider",children:"Token Burn"}),r&&s.jsx("span",{className:"text-2xs text-accent font-mono animate-pulse",children:"LIVE"})]}),s.jsx(ZZ,{data:n,isAlive:r,height:56})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(Tc,{icon:V$,label:"Burn Rate",value:o>0?`${He(o)}/m`:"—",color:o>5e3?"text-danger":o>2e3?"text-warning":"text-text-0"}),s.jsx(Tc,{icon:P$,label:"Cost",value:Pa(e.costUsd||0),color:"text-text-0"}),s.jsx(Tc,{icon:Li,label:"Rotations",value:e.rotations||"0",color:"text-text-0"}),s.jsx(Tc,{icon:Jn,label:"Turns",value:e.turns||"0",color:"text-text-0"})]}),s.jsx(EZ,{score:d}),e.prompt&&s.jsxs("div",{children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider block mb-1.5",children:"Task"}),s.jsx("div",{className:"bg-surface-0 rounded-lg px-3 py-2.5 text-xs text-text-2 font-sans leading-relaxed max-h-28 overflow-y-auto border border-border-subtle",children:e.prompt})]}),l.length>0&&s.jsxs("div",{children:[s.jsx("span",{className:"text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider block mb-2",children:"Activity"}),s.jsxs("div",{className:"space-y-0 relative",children:[s.jsx("div",{className:"absolute left-[9px] top-2 bottom-2 w-px bg-border-subtle"}),l.slice(-12).reverse().map((u,f)=>{const h=qZ(u.text),x=h.icon;return s.jsxs("div",{className:"flex items-start gap-3 py-1.5 relative",children:[s.jsx("div",{className:le("w-[18px] h-[18px] rounded-full flex items-center justify-center flex-shrink-0 z-10","bg-surface-1 border border-border-subtle"),children:s.jsx(x,{size:9,className:h.color})}),s.jsx("span",{className:"text-2xs text-text-2 font-sans flex-1 line-clamp-1 pt-0.5",children:u.text}),s.jsx("span",{className:"text-2xs text-text-4 font-mono flex-shrink-0 pt-0.5",children:Nt(u.timestamp)})]},f)})]})]})]})}function YZ({agent:e}){const n=M(z=>z.addToast),[l,r]=v.useState([]),[o,d]=v.useState(""),[u,f]=v.useState(null),[h,x]=v.useState(""),[g,p]=v.useState(""),[b,y]=v.useState(!1),[j,w]=v.useState(!1),[k,Q]=v.useState("");async function C(){try{const z=await B.get(`/agents/${e.id}/mdfiles`);r(z.files||[]),d(z.workingDir||"")}catch{}}v.useEffect(()=>{C()},[e.id]);async function P(z){try{const $=await B.get(`/agents/${e.id}/mdfiles/read?path=${encodeURIComponent(z)}`);x($.content||""),p($.content||""),f(z)}catch($){n("error","Failed to read file",$.message)}}async function R(){if(u){y(!0);try{await B.put(`/agents/${e.id}/mdfiles/write`,{path:u,content:h}),p(h),n("success",`Saved ${u}`)}catch(z){n("error","Save failed",z.message)}y(!1)}}async function Y(){const z=k.trim();if(z)try{await B.post(`/agents/${e.id}/mdfiles/create`,{name:z}),Q(""),w(!1),n("success",`Created ${z}.md`),C()}catch($){n("error","Create failed",$.message)}}const X=h!==g;return u?s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border-subtle",children:[s.jsx("button",{onClick:()=>{f(null),x(""),p("")},className:"p-1 text-text-3 hover:text-text-0 cursor-pointer",children:s.jsx(xv,{size:14})}),s.jsx(ks,{size:12,className:"text-accent"}),s.jsx("span",{className:"text-xs text-text-0 font-sans font-medium flex-1 truncate",children:u}),X&&s.jsx("span",{className:"text-[10px] text-warning font-sans",children:"unsaved"}),s.jsxs("button",{onClick:R,disabled:!X||b,className:le("flex items-center gap-1 px-2.5 py-1 rounded text-2xs font-sans font-medium cursor-pointer transition-colors",X?"bg-accent/15 text-accent hover:bg-accent/25":"text-text-4 opacity-50 cursor-not-allowed"),children:[s.jsx(IO,{size:10}),b?"Saving...":"Save"]})]}),s.jsx("textarea",{value:h,onChange:z=>x(z.target.value),className:"flex-1 w-full px-4 py-3 bg-surface-0 text-[12px] font-mono text-text-1 leading-relaxed resize-none focus:outline-none",spellCheck:!1})]}):s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-border-subtle",children:[s.jsx(ks,{size:12,className:"text-text-3"}),s.jsx("span",{className:"text-2xs font-semibold text-text-2 font-sans uppercase tracking-wider flex-1",children:"Markdown Files"}),s.jsx("button",{onClick:()=>w(!0),className:"p-1 text-text-4 hover:text-accent cursor-pointer",title:"Create file",children:s.jsx(vn,{size:12})}),s.jsx("button",{onClick:C,className:"p-1 text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(Zn,{size:11})})]}),o&&s.jsx("div",{className:"px-4 py-1.5 text-[10px] text-text-4 font-mono truncate border-b border-border-subtle/50",children:o}),j&&s.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-2 border-b border-border-subtle bg-surface-0",children:[s.jsx(ks,{size:11,className:"text-accent flex-shrink-0"}),s.jsx("input",{autoFocus:!0,value:k,onChange:z=>Q(z.target.value),onKeyDown:z=>{z.key==="Enter"&&Y(),z.key==="Escape"&&(w(!1),Q(""))},placeholder:"filename",className:"flex-1 bg-transparent text-xs text-text-0 font-mono outline-none placeholder:text-text-4"}),s.jsx("span",{className:"text-[10px] text-text-4 font-mono",children:".md"}),s.jsx("button",{onClick:Y,className:"p-0.5 text-accent hover:text-accent/80 cursor-pointer",children:s.jsx(IO,{size:11})}),s.jsx("button",{onClick:()=>{w(!1),Q("")},className:"p-0.5 text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:11})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[s.jsx(ks,{size:20,className:"text-text-4 mb-2"}),s.jsx("p",{className:"text-xs text-text-3 font-sans",children:"No markdown files found"}),s.jsx("p",{className:"text-[10px] text-text-4 font-sans mt-1",children:"MD files in the agent's working directory will appear here"})]}):s.jsx("div",{className:"py-1",children:l.map(z=>s.jsxs("button",{onClick:()=>P(z.path),className:"w-full flex items-center gap-2.5 px-4 py-2 text-left hover:bg-surface-5 transition-colors cursor-pointer",children:[s.jsx(ks,{size:13,className:"text-accent flex-shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-text-0 font-sans block truncate",children:z.name}),s.jsx("span",{className:"text-[10px] text-text-4 font-mono",children:z.path})]}),s.jsx("span",{className:"text-[10px] text-text-4 font-mono flex-shrink-0",children:z.size>1024?`${(z.size/1024).toFixed(1)}K`:`${z.size}B`}),z.source==="personality"&&s.jsx("span",{className:"text-[9px] font-mono text-purple bg-purple/10 px-1 py-px rounded flex-shrink-0",children:"personality"}),z.source==="user"&&s.jsx("span",{className:"text-[9px] font-mono text-accent bg-accent/10 px-1 py-px rounded flex-shrink-0",children:"custom"})]},z.path))})})]})}const UZ={running:"success",starting:"warning",stopped:"default",crashed:"danger",completed:"accent",killed:"default",rotating:"purple"},VZ={running:"Running",starting:"Starting",stopped:"Stopped",crashed:"Crashed",completed:"Done",killed:"Killed",rotating:"Rotating"},GZ=[{id:"command",label:"Chat",icon:Gi},{id:"config",label:"Config",icon:Rh},{id:"telemetry",label:"Monitor",icon:Ci},{id:"mdfiles",label:"Files",icon:ks}];function DZ({agent:e}){const n=M(h=>h.addToast),[l,r]=v.useState(!1),[o,d]=v.useState(e.name),u=v.useRef(null);async function f(){const h=o.trim();if(!h||h===e.name){r(!1);return}try{await B.patch(`/agents/${e.id}`,{name:h.replace(/\s+/g,"-")}),n("success",`Renamed → ${h}`)}catch(x){n("error","Rename failed",x.message),d(e.name)}r(!1)}return l?s.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0",children:[s.jsx("input",{ref:u,value:o,onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&f(),h.key==="Escape"&&(d(e.name),r(!1))},className:"flex-1 min-w-0 h-6 px-1.5 text-sm font-bold bg-surface-0 border border-accent/30 rounded text-text-0 font-sans focus:outline-none focus:ring-1 focus:ring-accent/40",autoFocus:!0}),s.jsx("button",{onClick:f,className:"p-0.5 text-accent hover:text-accent/80 cursor-pointer",children:s.jsx(kt,{size:12})}),s.jsx("button",{onClick:()=>{d(e.name),r(!1)},className:"p-0.5 text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:12})})]}):s.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0 group",children:[s.jsx("h2",{className:"text-sm font-bold text-text-0 font-sans truncate",children:e.name}),s.jsx("button",{onClick:()=>{d(e.name),r(!0)},className:"p-0.5 text-text-4 opacity-0 group-hover:opacity-100 hover:text-text-1 cursor-pointer transition-opacity",children:s.jsx(Di,{size:10})})]})}function LZ(){const e=M(x=>x.detailPanel),n=M(x=>x.agents),[l,r]=v.useState("command");if((e==null?void 0:e.type)!=="agent")return null;const o=n.find(x=>x.id===e.agentId);if(!o)return null;const d=o.status==="running"||o.status==="starting",u=Math.round((o.contextUsage||0)*100),f=o.spawnedAt||o.createdAt,h=f?Math.floor((Date.now()-new Date(f).getTime())/1e3):0;return ga(o.role),s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex-shrink-0",children:[s.jsxs("div",{className:"pl-4 pr-10 pt-3 pb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(DZ,{agent:o}),s.jsx(Te,{variant:UZ[o.status]||"default",dot:d?"pulse":void 0,className:"text-2xs flex-shrink-0",children:VZ[o.status]||o.status})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1 text-2xs text-text-3 font-mono",children:[s.jsx("span",{className:"capitalize",children:o.role}),s.jsx("span",{className:"text-text-4",children:"·"}),s.jsxs("span",{children:[o.provider,":",o.model||"auto"]}),s.jsx("span",{className:"text-text-4",children:"·"}),s.jsxs("span",{children:[He(o.tokensUsed||0)," tok"]}),u>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-text-4",children:"·"}),s.jsxs("span",{className:le(u>80?"text-danger":u>60?"text-warning":"text-text-3"),children:[u,"% ctx"]})]}),s.jsx("span",{className:"text-text-4",children:"·"}),s.jsx("span",{children:kr(h)})]})]}),s.jsx("div",{className:"flex items-center px-4 border-b border-border-subtle",children:GZ.map(x=>{const g=x.icon,p=l===x.id;return s.jsxs("button",{onClick:()=>r(x.id),className:le("flex items-center gap-1.5 px-3 py-2 text-2xs font-semibold font-sans transition-all cursor-pointer select-none border-b-2 -mb-px",p?"border-accent text-text-0":"border-transparent text-text-3 hover:text-text-1"),children:[s.jsx(g,{size:11}),x.label]},x.id)})})]}),s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[l==="command"&&s.jsx(AZ,{agent:o}),l==="config"&&s.jsx(XZ,{agent:o}),l==="telemetry"&&s.jsx(MZ,{agent:o}),l==="mdfiles"&&s.jsx(YZ,{agent:o})]})]})}const lb={"google-workspace":"https://cdn.simpleicons.org/google/white",github:"https://cdn.simpleicons.org/github/white",stripe:"https://cdn.simpleicons.org/stripe/635BFF",gmail:"https://cdn.simpleicons.org/gmail/EA4335","google-calendar":"https://cdn.simpleicons.org/googlecalendar/4285F4","google-drive":"https://cdn.simpleicons.org/googledrive/4285F4","google-docs":"https://cdn.simpleicons.org/googledocs/4285F4","google-sheets":"https://cdn.simpleicons.org/googlesheets/34A853","google-slides":"https://cdn.simpleicons.org/googleslides/FBBC04","google-maps":"https://cdn.simpleicons.org/googlemaps/4285F4",postgres:"https://cdn.simpleicons.org/postgresql/4169E1",notion:"https://cdn.simpleicons.org/notion/white",linear:"https://cdn.simpleicons.org/linear/5E6AD2","brave-search":"https://cdn.simpleicons.org/brave/FB542B","home-assistant":"https://cdn.simpleicons.org/homeassistant/18BCF2",sentry:"https://cdn.simpleicons.org/sentry/362D59",elevenlabs:"https://cdn.simpleicons.org/elevenlabs/white",hubspot:"https://cdn.simpleicons.org/hubspot/FF7A59",jira:"https://cdn.simpleicons.org/jira/0052CC",sendgrid:"https://cdn.simpleicons.org/sendgrid/1A82E2",resend:"https://cdn.simpleicons.org/resend/white",replicate:"https://cdn.simpleicons.org/replicate/white",vercel:"https://cdn.simpleicons.org/vercel/white",supabase:"https://cdn.simpleicons.org/supabase/3FCF8E",mixpanel:"https://cdn.simpleicons.org/mixpanel/7856FF",datadog:"https://cdn.simpleicons.org/datadog/632CA6",airtable:"https://cdn.simpleicons.org/airtable/18BFFF",zendesk:"https://cdn.simpleicons.org/zendesk/03363D",intercom:"https://cdn.simpleicons.org/intercom/6AFDEF",twilio:"https://cdn.simpleicons.org/twilio/F22F46",telnyx:"https://cdn.simpleicons.org/telnyx/00C08B",aws:"https://cdn.simpleicons.org/amazonaws/FF9900",plaid:"https://cdn.simpleicons.org/plaid/white"},WZ=[{id:"chat",label:"Chat",desc:"Companion, assistant, conversation",icon:Qd,tier:"Medium"},{id:"planner",label:"Planner",desc:"Plans the team and tasks",icon:Nv,tier:"Heavy"},{id:"backend",label:"Backend",desc:"APIs, services, databases",icon:Hc,tier:"Medium"},{id:"frontend",label:"Frontend",desc:"UI, components, styling",icon:Ch,tier:"Medium"},{id:"fullstack",label:"Fullstack",desc:"End-to-end implementation",icon:$a,tier:"Heavy"},{id:"testing",label:"Testing",desc:"Tests, coverage, QA",icon:Zh,tier:"Medium"},{id:"devops",label:"DevOps",desc:"CI/CD, infra, deployment",icon:j$,tier:"Medium"},{id:"docs",label:"Docs",desc:"Documentation, guides",icon:ks,tier:"Light"},{id:"security",label:"Security",desc:"Audits, vulnerabilities",icon:cl,tier:"Medium"},{id:"database",label:"Database",desc:"Schema, migrations, queries",icon:$$,tier:"Medium"},{id:"cmo",label:"CMO",desc:"Marketing, content, growth",icon:wT,tier:"Medium"},{id:"cfo",label:"CFO",desc:"Finance, metrics, forecasting",icon:o$,tier:"Medium"},{id:"ea",label:"EA",desc:"Executive assistant, scheduling",icon:S3,tier:"Light"},{id:"support",label:"Support",desc:"Customer support, FAQs",icon:nT,tier:"Medium"},{id:"analyst",label:"Analyst",desc:"Data analysis, insights",icon:hv,tier:"Medium"},{id:"creative",label:"Writer",desc:"Copy, articles, proposals",icon:YT,tier:"Heavy",skillHint:!0},{id:"slides",label:"Slides",desc:"Pitch decks, presentations",icon:IT,tier:"Heavy",skillHint:!0}];function XO(){return s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",className:"text-accent flex-shrink-0",children:[s.jsx("circle",{cx:"7",cy:"7",r:"6",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"1"}),s.jsx("path",{d:"M4.5 7 L6.5 9 L9.5 5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function BZ(){const e=M(ne=>ne.detailPanel),n=M(ne=>ne.closeDetail),l=M(ne=>ne.spawnAgent),r=M(ne=>ne.fetchProviders),o=(e==null?void 0:e.type)==="spawn",[d,u]=v.useState(""),[f,h]=v.useState(""),[x,g]=v.useState(""),[p,b]=v.useState(""),[y,j]=v.useState(""),[w,k]=v.useState(""),[Q,C]=v.useState([]),[P,R]=v.useState([]),[Y,X]=v.useState([]),[z,$]=v.useState(!1),[F,Z]=v.useState(""),[J,A]=v.useState([]),[U,D]=v.useState([]),[V,T]=v.useState(!1),[L,ee]=v.useState(""),[de,ae]=v.useState("manual"),[ye,Se]=v.useState([]),[ge,je]=v.useState([]),[ze,ke]=v.useState(!1),[it,St]=v.useState(""),[Ee,$t]=v.useState([]),[tt,nt]=v.useState(""),[jt,dt]=v.useState(!1),[kn,W]=v.useState(!1);v.useEffect(()=>{o&&(r().then(ne=>{const Ne=Array.isArray(ne)?ne:ne.providers||[];C(Ne);const $e=Ne.filter(bt=>bt.installed);if($e.length>0&&!p){const As=["claude-code","gemini","codex","ollama"].find(Ca=>$e.some(_s=>_s.id===Ca))||$e[0].id;b(As)}}).catch(()=>{}),B.get("/skills/installed").then(ne=>{R(Array.isArray(ne)?ne:[])}).catch(()=>{}),B.get("/integrations/installed").then(ne=>{A(Array.isArray(ne)?ne:[])}).catch(()=>{}),B.get("/repos/imported").then(ne=>{Se((Array.isArray(ne)?ne:[]).filter(Ne=>Ne.status==="active"))}).catch(()=>{}),B.get("/personalities").then(ne=>{$t(Array.isArray(ne)?ne:ne.personalities||[])}).catch(()=>{}),u(""),h(""),g(""),b(""),j(""),k(""),X([]),D([]),ae("manual"),je([]),nt(""),dt(!1))},[o,r]);const Oe=d||f,we=Q.find(ne=>ne.id===p),Tt=(we==null?void 0:we.models)||[],Mn=Q.filter(ne=>ne.installed);async function Ot(){if(Oe){W(!0);try{const ne={role:Oe,...x&&{name:x.replace(/\s+/g,"-")},...p&&{provider:p},...y&&{model:y},...w&&{prompt:w},...Y.length>0&&{skills:Y},...U.length>0&&{integrations:U},...U.length>0&&{integrationApproval:de},...ge.length>0&&{repos:ge},...tt&&{personality:tt}};await l(ne),n()}catch{}W(!1)}}return s.jsx(QS,{open:o,onOpenChange:ne=>{ne||n()},children:s.jsx(wS,{title:"Spawn Agent",width:480,children:s.jsxs("div",{className:"flex flex-col h-[calc(100%-57px)]",children:[s.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-semibold text-text-2 font-sans uppercase tracking-wider block mb-3",children:"Choose Role"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:WZ.map(ne=>{const Ne=ga(ne.id),$e=d===ne.id;return s.jsxs("button",{onClick:()=>{u(ne.id),h("")},className:le("flex items-center gap-2.5 p-3 rounded-md border text-left transition-all cursor-pointer",$e?"border-accent bg-accent/5":"border-border-subtle bg-surface-1 hover:border-border hover:bg-surface-2"),children:[s.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center flex-shrink-0",style:{background:Ne.bg},children:s.jsx(ne.icon,{size:16,style:{color:Ne.text}})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans",children:ne.label}),ne.skillHint&&s.jsx("span",{className:"text-2xs font-mono text-warning/70 bg-warning/8 px-1 py-px rounded",children:"skill"})]}),s.jsx("div",{className:"text-2xs text-text-3 font-sans truncate",children:ne.desc})]})]},ne.id)})}),s.jsx("div",{className:"mt-3",children:s.jsx(dd,{placeholder:"or type a custom role (e.g. chat-agent)...",value:f,onChange:ne=>{h(ne.target.value.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9_-]/g,"").slice(0,50)),u("")},className:"text-xs"})})]}),Oe&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("label",{className:"text-xs font-semibold text-text-2 font-sans uppercase tracking-wider block",children:"Configuration"}),s.jsx(dd,{label:"Name (optional)",value:x,onChange:ne=>g(ne.target.value),placeholder:`${Oe}-1`}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Provider"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{value:p,onChange:ne=>{b(ne.target.value),j("")},className:"w-full h-8 px-3 pr-8 text-sm rounded-md bg-surface-1 border border-border text-text-0 font-sans appearance-none cursor-pointer focus:outline-none focus:ring-1 focus:ring-accent",children:[s.jsx("option",{value:"",children:"Auto"}),Q.map(ne=>s.jsxs("option",{value:ne.id,disabled:!ne.installed,children:[ne.name,ne.installed?"":" (not installed)"]},ne.id))]}),s.jsx(bn,{size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-3 pointer-events-none"})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Model"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{value:y,onChange:ne=>j(ne.target.value),disabled:!p,className:"w-full h-8 px-3 pr-8 text-sm rounded-md bg-surface-1 border border-border text-text-0 font-sans appearance-none cursor-pointer focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-40",children:[s.jsx("option",{value:"",children:"Auto"}),Tt.map(ne=>s.jsx("option",{value:ne.id,children:ne.name},ne.id))]}),s.jsx(bn,{size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-3 pointer-events-none"})]})]})]}),p&&we&&s.jsx("div",{className:"text-2xs text-text-3 font-sans flex items-center gap-2",children:we.authType==="local"?s.jsx(Te,{variant:"success",children:"Local"}):we.authType==="subscription"?s.jsx(Te,{variant:"accent",children:"Subscription"}):we.hasKey?s.jsx(Te,{variant:"success",children:"API key set"}):s.jsxs(Te,{variant:"warning",children:["No API key — set with: groove set-key ",p," YOUR_KEY"]})}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Skills"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[Y.map(ne=>{const Ne=P.find($e=>$e.id===ne);return s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded bg-accent/12 text-accent border border-accent/25 text-2xs font-sans",children:[s.jsx(tl,{size:9}),(Ne==null?void 0:Ne.name)||ne,s.jsx("button",{onClick:()=>X($e=>$e.filter(bt=>bt!==ne)),className:"ml-0.5 hover:text-text-0 cursor-pointer",children:s.jsx(rt,{size:9})})]},ne)}),s.jsxs("button",{onClick:()=>{$(!0),Z("")},className:le("inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-2xs font-sans transition-colors cursor-pointer","bg-surface-0 text-text-2 border border-border-subtle hover:border-border hover:text-text-0"),children:[s.jsx(tl,{size:10}),Y.length>0?"Add skill":"Attach skill"]})]})]}),s.jsx(ba,{open:z,onOpenChange:$,children:s.jsx(va,{title:"Select Skill",className:"max-w-sm",children:s.jsxs("div",{className:"space-y-3 p-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(yn,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-text-4"}),s.jsx("input",{value:F,onChange:ne=>Z(ne.target.value),placeholder:"Search skills...",autoFocus:!0,className:"w-full h-8 pl-8 pr-3 text-xs rounded-md bg-surface-0 border border-border text-text-0 font-sans focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsxs("div",{className:"max-h-64 overflow-y-auto space-y-1",children:[P.filter(ne=>{if(!F)return!0;const Ne=F.toLowerCase();return(ne.name||ne.id).toLowerCase().includes(Ne)||(ne.description||"").toLowerCase().includes(Ne)}).map(ne=>{const Ne=Y.includes(ne.id);return s.jsxs("button",{onClick:()=>{X($e=>Ne?$e.filter(bt=>bt!==ne.id):[...$e,ne.id])},className:le("w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors cursor-pointer",Ne?"bg-accent/10 border border-accent/25":"hover:bg-surface-3 border border-transparent"),children:[s.jsx(tl,{size:12,className:Ne?"text-accent":"text-text-3"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:ne.name||ne.id}),ne.description&&s.jsx("div",{className:"text-2xs text-text-3 font-sans truncate",children:ne.description})]}),Ne&&s.jsx(XO,{})]},ne.id)}),P.length===0&&s.jsx("div",{className:"text-center py-6 text-xs text-text-3 font-sans",children:"No skills installed. Visit the Marketplace to install skills."})]})]})})}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Integrations"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[U.map(ne=>{const Ne=J.find(bt=>bt.id===ne),$e=lb[ne];return s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded bg-accent/12 text-accent border border-accent/25 text-2xs font-sans",children:[$e?s.jsx("img",{src:$e,alt:"",className:"w-2.5 h-2.5"}):s.jsx(pa,{size:9}),(Ne==null?void 0:Ne.name)||ne,s.jsx("button",{onClick:()=>D(bt=>bt.filter(As=>As!==ne)),className:"ml-0.5 hover:text-text-0 cursor-pointer",children:s.jsx(rt,{size:9})})]},ne)}),s.jsxs("button",{onClick:()=>{T(!0),ee("")},className:le("inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-2xs font-sans transition-colors cursor-pointer","bg-surface-0 text-text-2 border border-border-subtle hover:border-border hover:text-text-0"),children:[s.jsx(pa,{size:10}),U.length>0?"Add integration":"Attach integration"]})]})]}),s.jsx(ba,{open:V,onOpenChange:T,children:s.jsx(va,{title:"Select Integration",className:"max-w-sm",children:s.jsxs("div",{className:"space-y-3 p-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(yn,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-text-4"}),s.jsx("input",{value:L,onChange:ne=>ee(ne.target.value),placeholder:"Search integrations...",autoFocus:!0,className:"w-full h-8 pl-8 pr-3 text-xs rounded-md bg-surface-0 border border-border text-text-0 font-sans focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsxs("div",{className:"max-h-64 overflow-y-auto space-y-1",children:[J.filter(ne=>{if(!L)return!0;const Ne=L.toLowerCase();return(ne.name||ne.id).toLowerCase().includes(Ne)||(ne.description||"").toLowerCase().includes(Ne)}).map(ne=>{const Ne=U.includes(ne.id),$e=ne.configured!==!1,bt=lb[ne.id],As=Oe&&Array.isArray(ne.roles)&&ne.roles.includes(Oe);return s.jsxs("button",{onClick:()=>{$e&&D(Ca=>Ne?Ca.filter(_s=>_s!==ne.id):[...Ca,ne.id])},disabled:!$e,className:le("w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors",$e?"cursor-pointer":"opacity-40 cursor-not-allowed",Ne?"bg-accent/10 border border-accent/25":$e?"hover:bg-surface-3 border border-transparent":"border border-transparent"),children:[bt?s.jsx("img",{src:bt,alt:"",className:"w-4 h-4 flex-shrink-0"}):s.jsx(pa,{size:12,className:Ne?"text-accent":"text-text-3"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:ne.name||ne.id}),!$e&&s.jsx("span",{className:"text-2xs text-text-4 font-sans",children:"(not configured)"}),$e&&As&&s.jsx("span",{className:"text-2xs font-mono text-accent/70 bg-accent/8 px-1 py-px rounded",children:"rec"})]}),ne.description&&s.jsx("div",{className:"text-2xs text-text-3 font-sans truncate",children:ne.description}),!$e&&s.jsx("div",{className:"text-2xs text-text-4 font-sans",children:"Configure in Marketplace"})]}),Ne&&s.jsx(XO,{})]},ne.id)}),J.length===0&&s.jsx("div",{className:"text-center py-6 text-xs text-text-3 font-sans",children:"No integrations installed. Visit the Marketplace to install integrations."})]})]})})}),U.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Integration Approvals"}),s.jsxs("div",{className:"flex gap-1.5",children:[s.jsxs("button",{onClick:()=>ae("manual"),className:le("flex-1 flex items-center gap-2 px-3 py-2 rounded-md border text-left transition-all cursor-pointer",de==="manual"?"border-accent bg-accent/5":"border-border-subtle bg-surface-1 hover:border-border"),children:[s.jsx(cl,{size:13,className:de==="manual"?"text-accent":"text-text-3"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-semibold text-text-0 font-sans",children:"Manual"}),s.jsx("div",{className:"text-2xs text-text-3 font-sans",children:"You approve each action"})]})]}),s.jsxs("button",{onClick:()=>ae("auto"),className:le("flex-1 flex items-center gap-2 px-3 py-2 rounded-md border text-left transition-all cursor-pointer",de==="auto"?"border-warning bg-warning/5":"border-border-subtle bg-surface-1 hover:border-border"),children:[s.jsx(tl,{size:13,className:de==="auto"?"text-warning":"text-text-3"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-2xs font-semibold text-text-0 font-sans",children:"Auto"}),s.jsx("div",{className:"text-2xs text-text-3 font-sans",children:"Agent acts without asking"})]})]})]})]}),ye.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Repos"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[ge.map(ne=>{const Ne=ye.find($e=>$e.id===ne);return s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded bg-accent/12 text-accent border border-accent/25 text-2xs font-sans",children:[s.jsx(dr,{size:9}),(Ne==null?void 0:Ne.name)||ne,s.jsx("button",{onClick:()=>je($e=>$e.filter(bt=>bt!==ne)),className:"ml-0.5 hover:text-text-0 cursor-pointer",children:s.jsx(rt,{size:9})})]},ne)}),s.jsxs("button",{onClick:()=>{ke(!0),St("")},className:le("inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-2xs font-sans transition-colors cursor-pointer","bg-surface-0 text-text-2 border border-border-subtle hover:border-border hover:text-text-0"),children:[s.jsx(dr,{size:10}),ge.length>0?"Add repo":"Attach repo"]})]})]}),s.jsx(ba,{open:ze,onOpenChange:ke,children:s.jsx(va,{title:"Select Repository",className:"max-w-sm",children:s.jsxs("div",{className:"space-y-3 p-4",children:[ye.length>1&&s.jsxs("div",{className:"relative",children:[s.jsx(yn,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-text-4"}),s.jsx("input",{value:it,onChange:ne=>St(ne.target.value),placeholder:"Search repos...",autoFocus:!0,className:"w-full h-8 pl-8 pr-3 text-xs rounded-md bg-surface-0 border border-border text-text-0 font-sans focus:outline-none focus:ring-1 focus:ring-accent"})]}),s.jsx("div",{className:"max-h-64 overflow-y-auto space-y-1",children:ye.filter(ne=>{if(!it)return!0;const Ne=it.toLowerCase();return(ne.name||ne.repo||ne.id).toLowerCase().includes(Ne)}).map(ne=>{const Ne=ge.includes(ne.id);return s.jsxs("button",{onClick:()=>{je($e=>Ne?$e.filter(bt=>bt!==ne.id):[...$e,ne.id])},className:le("w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors cursor-pointer",Ne?"bg-accent/10 border border-accent/25":"hover:bg-surface-3 border border-transparent"),children:[s.jsx(dr,{size:12,className:Ne?"text-accent":"text-text-3"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-text-0 font-sans truncate",children:ne.name||ne.repo}),s.jsx("div",{className:"text-2xs text-text-4 font-mono truncate",children:ne.clonedTo})]}),Ne&&s.jsx(XO,{})]},ne.id)})})]})})}),(d==="chat"||jt)&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-text-2 font-sans",children:"Personality"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{value:tt,onChange:ne=>nt(ne.target.value),className:"w-full h-8 px-3 pr-8 text-sm rounded-md bg-surface-1 border border-border text-text-0 font-sans appearance-none cursor-pointer focus:outline-none focus:ring-1 focus:ring-accent",children:[s.jsx("option",{value:"",children:"None (blank)"}),Ee.map(ne=>s.jsx("option",{value:ne.name||ne,children:ne.name||ne},ne.name||ne))]}),s.jsx(bn,{size:14,className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-3 pointer-events-none"})]}),s.jsx("p",{className:"text-2xs text-text-4 font-sans",children:"Personality is injected into every prompt for this agent."})]}),d!=="chat"&&!jt&&s.jsx("button",{onClick:()=>dt(!0),className:"text-2xs text-text-3 hover:text-accent font-sans transition-colors cursor-pointer",children:"+ Advanced options"})]})]}),s.jsxs("div",{className:"border-t border-border-subtle px-5 py-4 bg-surface-1",children:[Mn.length===0&&Q.length>0&&s.jsxs("div",{className:"flex items-center gap-2 mb-3 px-3 py-2 rounded-md bg-warning/8 border border-warning/20",children:[s.jsx(Ta,{size:13,className:"text-warning flex-shrink-0"}),s.jsx("span",{className:"text-2xs font-sans text-text-2",children:"No AI providers installed. Install Claude Code, Gemini CLI, Codex, or Ollama to spawn agents."})]}),Oe&&Mn.length>0&&s.jsxs("div",{className:"flex items-center gap-2 mb-3 text-xs text-text-3 font-sans",children:[s.jsx("span",{children:"Spawning"}),s.jsx(Te,{variant:"accent",children:Oe}),p&&s.jsxs("span",{children:["on ",(we==null?void 0:we.name)||p]}),x&&s.jsxs("span",{children:["as ",x.replace(/\s+/g,"-")]})]}),s.jsx(ue,{variant:"primary",size:"lg",onClick:Ot,disabled:!Oe||kn||Mn.length===0,className:"w-full",children:kn?"Spawning...":"Spawn Agent"})]})]})})})}function rb({title:e,icon:n,defaultOpen:l=!1,badge:r,children:o,className:d}){const[u,f]=v.useState(l);return s.jsxs("div",{className:le("border-t border-border-subtle",d),children:[s.jsxs("button",{onClick:()=>f(!u),className:"w-full flex items-center gap-2 px-5 py-3 text-left cursor-pointer hover:bg-surface-5/30 transition-colors group",children:[s.jsx(Na,{size:12,className:le("text-text-4 transition-transform duration-200 flex-shrink-0",u&&"rotate-90")}),n&&s.jsx(n,{size:13,className:"text-text-3 flex-shrink-0"}),s.jsx("span",{className:"text-xs font-semibold text-text-2 font-sans uppercase tracking-wider flex-1",children:e}),r&&s.jsx("span",{className:"text-2xs font-mono text-text-4 bg-surface-4 px-1.5 py-0.5 rounded",children:r})]}),u&&s.jsx("div",{className:"px-5 pb-4",children:o})]})}function IZ(){const e=M(p=>p.journalistStatus),n=M(p=>p.fetchJournalist),l=M(p=>p.triggerJournalistCycle),[r,o]=v.useState(!0),[d,u]=v.useState(!1);v.useEffect(()=>{n().then(()=>o(!1));const p=setInterval(n,1e4);return()=>clearInterval(p)},[n]);async function f(){u(!0);try{await l()}catch{}u(!1)}if(r)return s.jsxs("div",{className:"p-5 space-y-4",children:[s.jsx(gn,{className:"h-6 w-32 rounded"}),s.jsx(gn,{className:"h-20 rounded-md"}),s.jsx(gn,{className:"h-20 rounded-md"})]});const h=e||{},x=h.lastSynthesis,g=h.history||[];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"px-5 py-4 border-b border-border-subtle flex items-center gap-2",children:[s.jsx(zi,{size:16,className:"text-accent"}),s.jsx("h3",{className:"text-sm font-semibold text-text-0 font-sans flex-1",children:"Journalist"}),s.jsxs(ue,{variant:"secondary",size:"sm",onClick:f,disabled:d,className:"gap-1.5 text-2xs",children:[s.jsx(Zn,{size:11,className:d?"animate-spin":""}),d?"Running...":"Run Synthesis"]})]}),s.jsx(En,{className:"flex-1",children:s.jsxs("div",{className:"px-5 py-4 space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-3 text-2xs text-text-3 font-sans",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ci,{size:10}),s.jsxs("span",{children:[h.cycleCount||0," cycles"]})]}),h.lastCycleTime&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(BO,{size:10}),s.jsxs("span",{children:["Last: ",Nt(h.lastCycleTime)]})]}),s.jsx(Te,{variant:h.cycleCount>0?"success":"default",className:"text-2xs",children:h.cycleCount>0?"Active":"Idle"})]}),(x==null?void 0:x.summary)&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold text-text-1 font-sans flex items-center gap-1.5",children:[s.jsx(ks,{size:12,className:"text-text-3"}),"Latest Summary"]}),s.jsx("div",{className:"bg-surface-0 rounded-lg border border-border-subtle px-3.5 py-3 text-xs text-text-2 font-sans leading-relaxed",children:x.summary})]}),(x==null?void 0:x.projectMap)&&s.jsx(rb,{title:"Project Map",icon:vT,children:s.jsx("div",{className:"bg-surface-0 rounded-lg border border-border-subtle px-3.5 py-3 text-xs text-text-2 font-mono leading-relaxed max-h-64 overflow-y-auto whitespace-pre-wrap",children:x.projectMap})}),(x==null?void 0:x.decisions)&&s.jsx(rb,{title:"Decisions Log",icon:ks,children:s.jsx("div",{className:"bg-surface-0 rounded-lg border border-border-subtle px-3.5 py-3 text-xs text-text-2 font-mono leading-relaxed max-h-64 overflow-y-auto whitespace-pre-wrap",children:x.decisions})}),g.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold text-text-1 font-sans flex items-center gap-1.5",children:[s.jsx(BO,{size:12,className:"text-text-3"}),"History (",g.length,")"]}),s.jsx("div",{className:"space-y-1.5",children:g.slice().reverse().slice(0,20).map((p,b)=>s.jsxs("div",{className:"bg-surface-0 rounded-md border border-border-subtle px-3 py-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-2xs",children:[s.jsxs(Te,{variant:"default",className:"text-2xs",children:["Cycle ",p.cycle]}),s.jsxs("span",{className:"text-text-4 font-sans",children:[p.agentCount," agent",p.agentCount!==1?"s":""]}),s.jsx("span",{className:"text-text-4 font-sans ml-auto",children:Nt(p.timestamp)})]}),p.summary&&s.jsx("p",{className:"text-xs text-text-2 font-sans mt-1 leading-relaxed",children:p.summary})]},b))})]}),!x&&g.length===0&&s.jsxs("div",{className:"text-center py-8 text-text-4 font-sans",children:[s.jsx(zi,{size:28,className:"mx-auto mb-2"}),s.jsx("p",{className:"text-sm",children:"No synthesis data yet"}),s.jsx("p",{className:"text-2xs mt-1",children:"The journalist runs automatically when agents are active, or trigger manually above"})]})]})})]})}function HZ({children:e,height:n,onHeightChange:l,visible:r,fullHeight:o,tabs:d,activeTab:u,onSelectTab:f,onAddTab:h,onCloseTab:x,onToggleFullHeight:g,onMinimize:p}){const b=v.useRef(!1),y=v.useRef(0),j=v.useRef(0),w=v.useCallback(Q=>{if(o)return;Q.preventDefault(),b.current=!0,y.current=Q.clientY,j.current=n;function C(R){if(!b.current)return;const Y=y.current-R.clientY,X=Math.min(Math.max(j.current+Y,120),600);l(X)}function P(){b.current=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",P)}document.addEventListener("mousemove",C),document.addEventListener("mouseup",P)},[n,l,o]);if(!r)return null;const k=d||[{id:"default",label:"Terminal"}];return s.jsxs("div",{className:"flex flex-col border-t border-border bg-surface-0 relative",style:o?{flex:1,minHeight:0}:{height:n,flexShrink:0},children:[!o&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-1 cursor-row-resize hover:bg-accent/30 transition-colors z-10",onMouseDown:w}),s.jsxs("div",{className:"flex items-center h-9 bg-surface-1 border-b border-border-subtle flex-shrink-0 pl-3 pr-1.5",children:[s.jsxs("div",{className:"flex items-center gap-0 flex-1 min-w-0 overflow-x-auto scrollbar-none",children:[k.map(Q=>s.jsxs("button",{onClick:()=>f==null?void 0:f(Q.id),className:le("flex items-center gap-1.5 pl-2.5 pr-1 h-7 text-2xs font-sans cursor-pointer select-none transition-colors flex-shrink-0 rounded-t",Q.id===u?"text-text-0 bg-surface-0":"text-text-3 hover:text-text-1 hover:bg-surface-0/50"),children:[s.jsx(Wi,{size:10}),s.jsx("span",{className:"truncate max-w-[80px]",children:Q.label}),k.length>1&&s.jsx("button",{onClick:C=>{C.stopPropagation(),x==null||x(Q.id)},className:"ml-0.5 p-0.5 rounded hover:bg-surface-5 text-text-4 hover:text-text-1 cursor-pointer",children:s.jsx(rt,{size:9})})]},Q.id)),s.jsx("button",{onClick:h,className:"flex items-center justify-center w-6 h-6 text-text-4 hover:text-text-1 hover:bg-surface-0/50 rounded cursor-pointer transition-colors flex-shrink-0 ml-0.5",title:"New terminal",children:s.jsx(vn,{size:11})})]}),s.jsx("div",{className:"flex items-center gap-0.5 flex-shrink-0 ml-2",children:o?s.jsx("button",{onClick:p,className:"p-1.5 rounded text-text-3 hover:text-text-0 hover:bg-surface-5 cursor-pointer transition-colors",title:"Restore",children:s.jsx(TT,{size:12})}):s.jsx("button",{onClick:g,className:"p-1.5 rounded text-text-3 hover:text-text-0 hover:bg-surface-5 cursor-pointer transition-colors",title:"Maximize",children:s.jsx(jv,{size:12})})})]}),s.jsx("div",{className:"flex-1 min-h-0 p-2",children:e})]})}const FZ={background:"#1a1e25",foreground:"#bcc2cd",cursor:"#33afbc",cursorAccent:"#1a1e25",selectionBackground:"rgba(51, 175, 188, 0.25)",black:"#1a1e25",red:"#e06c75",green:"#4ae168",yellow:"#e5c07b",blue:"#61afef",magenta:"#c678dd",cyan:"#33afbc",white:"#bcc2cd",brightBlack:"#505862",brightRed:"#e06c75",brightGreen:"#4ae168",brightYellow:"#e5c07b",brightBlue:"#61afef",brightMagenta:"#c678dd",brightCyan:"#33afbc",brightWhite:"#e6e6e6"};let ZO=0;function KZ({tabId:e,visible:n}){const l=v.useRef(null),r=v.useRef(null),o=v.useRef(null),d=v.useRef(null),u=v.useRef(!1);return v.useEffect(()=>{if(!l.current||u.current)return;u.current=!0;const f=new kw({theme:FZ,fontFamily:"'JetBrains Mono Variable', 'SF Mono', monospace",fontSize:13,lineHeight:1.4,cursorBlink:!0,cursorStyle:"bar",scrollback:5e3,allowProposedApi:!0}),h=new Nw;f.loadAddon(h),f.loadAddon(new $w),f.open(l.current),r.current=f,requestAnimationFrame(()=>h.fit());function x(){const p=M.getState().ws;if(!p||p.readyState!==WebSocket.OPEN){setTimeout(x,500);return}p.send(JSON.stringify({type:"terminal:spawn",cols:f.cols,rows:f.rows}));function b(y){let j;try{j=JSON.parse(y.data)}catch{return}j.type==="terminal:spawned"&&!o.current?o.current=j.id:j.type==="terminal:output"&&j.id===o.current?f.write(j.data):j.type==="terminal:exit"&&j.id===o.current&&(f.write(`\r
676
+ \x1B[90m[session ended]\x1B[0m\r
677
+ `),o.current=null)}p.addEventListener("message",b),d.current={ws:p,handler:b},f.onData(y=>{const j=M.getState().ws;(j==null?void 0:j.readyState)===WebSocket.OPEN&&o.current&&j.send(JSON.stringify({type:"terminal:input",id:o.current,data:y}))}),f.onResize(({cols:y,rows:j})=>{const w=M.getState().ws;(w==null?void 0:w.readyState)===WebSocket.OPEN&&o.current&&w.send(JSON.stringify({type:"terminal:resize",id:o.current,rows:j,cols:y}))})}x();const g=new ResizeObserver(()=>{requestAnimationFrame(()=>{try{h.fit()}catch{}})});return g.observe(l.current),()=>{g.disconnect();const p=M.getState().ws;(p==null?void 0:p.readyState)===WebSocket.OPEN&&o.current&&p.send(JSON.stringify({type:"terminal:kill",id:o.current})),d.current&&d.current.ws.removeEventListener("message",d.current.handler),f.dispose(),u.current=!1}},[]),v.useEffect(()=>{n&&r.current&&requestAnimationFrame(()=>{var f,h,x,g,p;try{(p=(g=(x=(h=(f=r.current._addonManager)==null?void 0:f._addons)==null?void 0:h[0])==null?void 0:x.instance)==null?void 0:g.fit)==null||p.call(g)}catch{}})},[n]),s.jsx("div",{ref:l,className:"w-full h-full",style:{display:n?"block":"none"}})}function JZ(){const e=M(b=>b.terminalVisible),n=M(b=>b.terminalHeight),l=M(b=>b.setTerminalVisible),r=M(b=>b.setTerminalHeight),o=M(b=>b.terminalFullHeight),d=M(b=>b.setTerminalFullHeight),[u,f]=v.useState([{id:"term-0",label:"Terminal"}]),[h,x]=v.useState("term-0"),g=v.useCallback(()=>{ZO++;const b=`term-${ZO}`;f(y=>[...y,{id:b,label:`Terminal ${ZO+1}`}]),x(b)},[]),p=v.useCallback(b=>{f(y=>{const j=y.filter(w=>w.id!==b);if(j.length===0)return l(!1),y;if(h===b){const w=y.findIndex(Q=>Q.id===b),k=j[Math.min(w,j.length-1)];x(k.id)}return j})},[h,l]);return s.jsx(HZ,{visible:e,height:n,onHeightChange:r,fullHeight:o,tabs:u,activeTab:h,onSelectTab:x,onAddTab:g,onCloseTab:p,onToggleFullHeight:()=>d(!0),onMinimize:()=>d(!1),children:u.map(b=>s.jsx(KZ,{tabId:b.id,visible:b.id===h},b.id))})}class eE extends ua.Component{constructor(n){super(n),this.state={error:null}}static getDerivedStateFromError(n){return{error:n}}render(){return this.state.error?s.jsxs("div",{className:"h-screen bg-surface-0 p-10 font-sans",children:[s.jsx("h2",{className:"text-lg font-semibold text-text-0 mb-4",children:"Groove — Render Error"}),s.jsx("pre",{className:"text-sm text-danger whitespace-pre-wrap mb-4",children:this.state.error.message}),s.jsx("pre",{className:"text-xs text-text-3 whitespace-pre-wrap",children:this.state.error.stack}),s.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-6 px-4 py-2 bg-accent text-surface-0 rounded-md font-medium text-sm cursor-pointer",children:"Try Again"})]}):this.props.children}}function tE(){const e=M(o=>o.activeView),n=M(o=>o.detailPanel);let l;switch(e){case"agents":l=s.jsx(E1,{});break;case"editor":l=s.jsx(gA,{});break;case"dashboard":l=s.jsx(c_,{});break;case"marketplace":l=s.jsx(VX,{});break;case"teams":l=s.jsx(BX,{});break;case"models":l=s.jsx(jZ,{});break;case"settings":l=s.jsx(mZ,{});break;default:l=s.jsx(E1,{})}let r=null;if(n)switch(n.type){case"agent":r=s.jsx(LZ,{});break;case"journalist":r=s.jsx(IZ,{});break;case"spawn":r=null;break}return s.jsxs(x4,{detailContent:r,terminalContent:s.jsx(JZ,{}),children:[l,s.jsx(BZ,{})]})}function nE(){return s.jsxs("div",{className:"h-screen bg-surface-0 flex flex-col items-center justify-center gap-4",children:[s.jsx("img",{src:"/favicon.png",alt:"",className:"w-10 h-10 opacity-60 animate-pulse"}),s.jsx("p",{className:"text-sm text-text-3 font-sans",children:"Connecting..."})]})}function sE(){const e=M(r=>r.connect),n=M(r=>r.hydrated),l=M(r=>r.tunneled);return v.useEffect(()=>{e()},[e]),v.useEffect(()=>{const o=new URLSearchParams(window.location.search).get("instance");o?document.title=`${o} — Groove`:l?document.title="Remote — Groove":document.title="Groove"},[l]),n?s.jsx(eE,{children:s.jsx(tE,{})}):s.jsx(nE,{})}Rw.createRoot(document.getElementById("root")).render(s.jsx(v.StrictMode,{children:s.jsx(sE,{})}));