@agent-spaces/server 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/adapters/claude-code-runtime/index.js +48 -6
  2. package/dist/adapters/claude-code-runtime/message-format.js +3 -3
  3. package/dist/adapters/git.js +140 -2
  4. package/dist/agents/agent-designer.js +334 -0
  5. package/dist/agents/agent-message-parts.js +8 -0
  6. package/dist/agents/commit-agent.js +9 -2
  7. package/dist/agents/issue-task-controller.js +14 -4
  8. package/dist/app.js +53 -1
  9. package/dist/package.json +1 -1
  10. package/dist/routes/agent-sse.js +4 -1
  11. package/dist/routes/agent.js +15 -0
  12. package/dist/routes/channel.js +1 -1
  13. package/dist/routes/file.js +97 -1
  14. package/dist/routes/git.js +122 -1
  15. package/dist/routes/iframe-bookmarks.js +33 -0
  16. package/dist/routes/speech-recognition.js +80 -0
  17. package/dist/services/agent.js +48 -5
  18. package/dist/services/builtin-tools.js +67 -1
  19. package/dist/services/channel.js +2 -0
  20. package/dist/services/command-process-manager.js +14 -1
  21. package/dist/services/file.js +86 -6
  22. package/dist/services/gitignore.js +65 -0
  23. package/dist/services/issue-retry.js +2 -1
  24. package/dist/services/issue.js +2 -2
  25. package/dist/services/notification-hub/bot-agent.js +9 -1
  26. package/dist/services/persistent-agent-context.js +155 -0
  27. package/dist/services/pty.js +47 -2
  28. package/dist/services/search.js +11 -3
  29. package/dist/services/speech-recognition/base.js +3 -0
  30. package/dist/services/speech-recognition/index.js +16 -0
  31. package/dist/services/speech-recognition/tencent.js +112 -0
  32. package/dist/storage/iframe-bookmarks-store.js +46 -0
  33. package/dist/storage/speech-recognition-store.js +58 -0
  34. package/dist/web/404.html +1 -1
  35. package/dist/web/__next.__PAGE__.txt +4 -4
  36. package/dist/web/__next._full.txt +31 -26
  37. package/dist/web/__next._head.txt +4 -4
  38. package/dist/web/__next._index.txt +17 -13
  39. package/dist/web/__next._tree.txt +2 -2
  40. package/dist/web/_next/static/chunks/0-mtp2au0a0nh.js +189 -0
  41. package/dist/web/_next/static/chunks/00amm3dvu3po9.js +31 -0
  42. package/dist/web/_next/static/chunks/02unyp1obddyn.js +3 -0
  43. package/dist/web/_next/static/chunks/0d.v1csiyl.1~.js +2 -0
  44. package/dist/web/_next/static/chunks/0egot8y~i-ge3.js +1 -0
  45. package/dist/web/_next/static/chunks/0e~0o6v_awcod.js +1 -0
  46. package/dist/web/_next/static/chunks/0fpf.rso9mhc0.js +1 -0
  47. package/dist/web/_next/static/chunks/0glol5jdarfma.js +2 -0
  48. package/dist/web/_next/static/chunks/0m1ud--um8kjh.js +1 -0
  49. package/dist/web/_next/static/chunks/0o6w-uw2p.phy.js +5 -0
  50. package/dist/web/_next/static/chunks/0os7q6w~-tmg7.css +1 -0
  51. package/dist/web/_next/static/chunks/0plreh4_gkxf9.js +1 -0
  52. package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +1 -0
  53. package/dist/web/_next/static/chunks/0vesz93a98px4.js +1 -0
  54. package/dist/web/_next/static/chunks/0w3o.7vi.dlm6.js +1 -0
  55. package/dist/web/_next/static/chunks/0xtmr0y4vo-~p.js +1 -0
  56. package/dist/web/_next/static/chunks/0~3uikgc074il.js +1 -0
  57. package/dist/web/_next/static/chunks/{0y5ipuqgqfrob.js → 0~xn0gfqxa20r.js} +3 -3
  58. package/dist/web/_next/static/chunks/11ozf700niy2z.js +1 -0
  59. package/dist/web/_next/static/chunks/{0jmsjlawtg6oa.js → 145gbwitjxamg.js} +1 -1
  60. package/dist/web/_next/static/chunks/{turbopack-0lxiiw.jhevml.js → turbopack-0kcwat8.leugk.js} +1 -1
  61. package/dist/web/_not-found/__next._full.txt +34 -30
  62. package/dist/web/_not-found/__next._head.txt +4 -4
  63. package/dist/web/_not-found/__next._index.txt +17 -13
  64. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
  65. package/dist/web/_not-found/__next._not-found.txt +3 -3
  66. package/dist/web/_not-found/__next._tree.txt +2 -2
  67. package/dist/web/_not-found.html +1 -1
  68. package/dist/web/_not-found.txt +34 -30
  69. package/dist/web/index.html +1 -1
  70. package/dist/web/index.txt +31 -26
  71. package/dist/web/login/__next._full.txt +35 -29
  72. package/dist/web/login/__next._head.txt +4 -4
  73. package/dist/web/login/__next._index.txt +17 -13
  74. package/dist/web/login/__next._tree.txt +2 -2
  75. package/dist/web/login/__next.login.__PAGE__.txt +4 -4
  76. package/dist/web/login/__next.login.txt +3 -3
  77. package/dist/web/login.html +1 -1
  78. package/dist/web/login.txt +35 -29
  79. package/dist/web/settings/__next._full.txt +36 -34
  80. package/dist/web/settings/__next._head.txt +4 -4
  81. package/dist/web/settings/__next._index.txt +17 -13
  82. package/dist/web/settings/__next._tree.txt +2 -2
  83. package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
  84. package/dist/web/settings/__next.settings.txt +5 -5
  85. package/dist/web/settings/agents/__next._full.txt +38 -35
  86. package/dist/web/settings/agents/__next._head.txt +4 -4
  87. package/dist/web/settings/agents/__next._index.txt +17 -13
  88. package/dist/web/settings/agents/__next._tree.txt +2 -2
  89. package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
  90. package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
  91. package/dist/web/settings/agents/__next.settings.txt +5 -5
  92. package/dist/web/settings/agents.html +1 -1
  93. package/dist/web/settings/agents.txt +38 -35
  94. package/dist/web/settings/mcps/__next._full.txt +38 -35
  95. package/dist/web/settings/mcps/__next._head.txt +4 -4
  96. package/dist/web/settings/mcps/__next._index.txt +17 -13
  97. package/dist/web/settings/mcps/__next._tree.txt +2 -2
  98. package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
  99. package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
  100. package/dist/web/settings/mcps/__next.settings.txt +5 -5
  101. package/dist/web/settings/mcps.html +1 -1
  102. package/dist/web/settings/mcps.txt +38 -35
  103. package/dist/web/settings/models/__next._full.txt +38 -35
  104. package/dist/web/settings/models/__next._head.txt +4 -4
  105. package/dist/web/settings/models/__next._index.txt +17 -13
  106. package/dist/web/settings/models/__next._tree.txt +2 -2
  107. package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
  108. package/dist/web/settings/models/__next.settings.models.txt +3 -3
  109. package/dist/web/settings/models/__next.settings.txt +5 -5
  110. package/dist/web/settings/models.html +1 -1
  111. package/dist/web/settings/models.txt +38 -35
  112. package/dist/web/settings/providers/__next._full.txt +38 -35
  113. package/dist/web/settings/providers/__next._head.txt +4 -4
  114. package/dist/web/settings/providers/__next._index.txt +17 -13
  115. package/dist/web/settings/providers/__next._tree.txt +2 -2
  116. package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
  117. package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
  118. package/dist/web/settings/providers/__next.settings.txt +5 -5
  119. package/dist/web/settings/providers.html +1 -1
  120. package/dist/web/settings/providers.txt +38 -35
  121. package/dist/web/settings/skills/__next._full.txt +38 -35
  122. package/dist/web/settings/skills/__next._head.txt +4 -4
  123. package/dist/web/settings/skills/__next._index.txt +17 -13
  124. package/dist/web/settings/skills/__next._tree.txt +2 -2
  125. package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
  126. package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
  127. package/dist/web/settings/skills/__next.settings.txt +5 -5
  128. package/dist/web/settings/skills.html +1 -1
  129. package/dist/web/settings/skills.txt +38 -35
  130. package/dist/web/settings.html +1 -1
  131. package/dist/web/settings.txt +36 -34
  132. package/dist/web/workflows/__next._full.txt +36 -31
  133. package/dist/web/workflows/__next._head.txt +4 -4
  134. package/dist/web/workflows/__next._index.txt +17 -13
  135. package/dist/web/workflows/__next._tree.txt +2 -2
  136. package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
  137. package/dist/web/workflows/__next.workflows.txt +3 -3
  138. package/dist/web/workflows.html +1 -1
  139. package/dist/web/workflows.txt +36 -31
  140. package/dist/web/workspace/_/__next._full.txt +39 -34
  141. package/dist/web/workspace/_/__next._head.txt +4 -4
  142. package/dist/web/workspace/_/__next._index.txt +17 -13
  143. package/dist/web/workspace/_/__next._tree.txt +2 -2
  144. package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -3
  145. package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
  146. package/dist/web/workspace/_/__next.workspace.txt +3 -3
  147. package/dist/web/workspace/_.html +1 -1
  148. package/dist/web/workspace/_.txt +39 -34
  149. package/dist/web/workspaces/__next._full.txt +35 -30
  150. package/dist/web/workspaces/__next._head.txt +4 -4
  151. package/dist/web/workspaces/__next._index.txt +17 -13
  152. package/dist/web/workspaces/__next._tree.txt +2 -2
  153. package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
  154. package/dist/web/workspaces/__next.workspaces.txt +3 -3
  155. package/dist/web/workspaces.html +1 -1
  156. package/dist/web/workspaces.txt +35 -30
  157. package/dist/ws/agent-prompt.js +48 -18
  158. package/dist/ws/agent-runner.js +4 -1
  159. package/dist/ws/message-parts.js +8 -0
  160. package/dist/ws/terminal-handler.js +1 -1
  161. package/package.json +1 -1
  162. package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
  163. package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
  164. package/dist/web/_next/static/chunks/002-dxhags4dj.js +0 -2
  165. package/dist/web/_next/static/chunks/00fu7sjtftd3f.js +0 -1
  166. package/dist/web/_next/static/chunks/00s_1ft2-qz0r.js +0 -1
  167. package/dist/web/_next/static/chunks/02wkg1tjv~_t2.js +0 -1
  168. package/dist/web/_next/static/chunks/03jy~o.gx._e-.js +0 -3
  169. package/dist/web/_next/static/chunks/07bs5ds68tg38.js +0 -2
  170. package/dist/web/_next/static/chunks/0b1w9_ne4c2ez.js +0 -1
  171. package/dist/web/_next/static/chunks/0bzechrx76-ix.js +0 -1
  172. package/dist/web/_next/static/chunks/0csqa76ud3h4d.js +0 -1
  173. package/dist/web/_next/static/chunks/0fxdvo63ywaa~.js +0 -1
  174. package/dist/web/_next/static/chunks/0k5bmi-es-2nj.js +0 -1
  175. package/dist/web/_next/static/chunks/0pep4mkvt3.rh.js +0 -31
  176. package/dist/web/_next/static/chunks/0tqwdxb-8t_n1.js +0 -1
  177. package/dist/web/_next/static/chunks/0yc41k980zabo.js +0 -1
  178. package/dist/web/_next/static/chunks/0zhhkzv4.0koq.js +0 -183
  179. package/dist/web/_next/static/chunks/0zl19l5tuoppw.js +0 -1
  180. package/dist/web/_next/static/chunks/102lz3yanx8i~.css +0 -1
  181. package/dist/web/_next/static/chunks/13wm9.vry~.lh.js +0 -5
  182. /package/dist/web/_next/static/{XzP71HbFE1fuE_bLT-x7i → 4dBAEZ275uRqcyeaRmXSx}/_buildManifest.js +0 -0
  183. /package/dist/web/_next/static/{XzP71HbFE1fuE_bLT-x7i → 4dBAEZ275uRqcyeaRmXSx}/_clientMiddlewareManifest.js +0 -0
  184. /package/dist/web/_next/static/{XzP71HbFE1fuE_bLT-x7i → 4dBAEZ275uRqcyeaRmXSx}/_ssgManifest.js +0 -0
@@ -0,0 +1,2 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,837121,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},989484,905724,e=>{"use strict";let t=(0,e.i(433721).default)("file-text",[["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"}]]);e.s(["default",0,t],905724),e.s(["FileText",0,t],989484)},267624,e=>{"use strict";let t=(0,e.i(433721).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",0,t],267624)},100694,e=>{"use strict";var t,s,a,i,n;function l(e,t,s,a){if("a"===s&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(e):a?a.value:t.get(e)}function r(e,t,s,a,i){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,s):i?i.value=s:t.set(e,s),s}"function"==typeof SuppressedError&&SuppressedError;let o="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class d{constructor(e){t.set(this,void 0),s.set(this,0),a.set(this,[]),i.set(this,void 0),r(this,t,e||(()=>{}),"f"),this.id=c(e=>{let n=e.index;if("end"in e)return void(n==l(this,s,"f")?this.cleanupCallback():r(this,i,n,"f"));let o=e.message;if(n==l(this,s,"f")){for(l(this,t,"f").call(this,o),r(this,s,l(this,s,"f")+1,"f");l(this,s,"f")in l(this,a,"f");){let e=l(this,a,"f")[l(this,s,"f")];l(this,t,"f").call(this,e),delete l(this,a,"f")[l(this,s,"f")],r(this,s,l(this,s,"f")+1,"f")}l(this,s,"f")===l(this,i,"f")&&this.cleanupCallback()}else l(this,a,"f")[n]=o})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){r(this,t,e,"f")}get onmessage(){return l(this,t,"f")}[(t=new WeakMap,s=new WeakMap,a=new WeakMap,i=new WeakMap,o)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[o]()}}class m{constructor(e,t,s){this.plugin=e,this.event=t,this.channelId=s}async unregister(){return x(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function u(e,t,s){let a=new d(s);try{return await x(`plugin:${e}|register_listener`,{event:t,handler:a}),new m(e,t,a.id)}catch{return await x(`plugin:${e}|registerListener`,{event:t,handler:a}),new m(e,t,a.id)}}async function x(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}n=new WeakMap,e.s(["Resource",0,class{get rid(){return l(this,n,"f")}constructor(e){n.set(this,void 0),r(this,n,e,"f")}async close(){return x("plugin:resources|close",{rid:this.rid})}},"SERIALIZE_TO_IPC_FN",0,o,"addPluginListener",0,u,"invoke",0,x,"transformCallback",0,c],100694)},757106,e=>{"use strict";let t=(0,e.i(433721).default)("brain",[["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"}]]);e.s(["default",0,t])},990336,e=>{"use strict";var t=e.i(757106);e.s(["Brain",()=>t.default])},307858,e=>{"use strict";let t=(0,e.i(433721).default)("external-link",[["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"}]]);e.s(["ExternalLink",0,t],307858)},100559,e=>{"use strict";let t=(0,e.i(433721).default)("server",[["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"}]]);e.s(["Server",0,t],100559)},549705,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(209988),n=e.i(260218),l=e.i(681622),r=e.i(562918),o=e.i(767467),c=e.i(100559),d=e.i(953700),m=e.i(137340),u=e.i(990336),x=e.i(307858),h=e.i(368942);let p={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"};function f({providers:e,providerModels:s,onEdit:i,onDelete:l,onAddModel:o}){let d=(0,a.useTranslations)("providers");return(0,t.jsxs)("div",{className:"flex flex-col p-2",children:[e.map(e=>{let a=s.find(t=>t.id===e.id),h=a?.models??[];return(0,t.jsxs)("div",{className:"group rounded-lg px-3 py-2.5 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>i(e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex size-8 items-center justify-center rounded-lg bg-primary/10",children:(0,t.jsx)(c.Server,{className:"size-4 text-primary"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.apiBase||d("list.noApiBase")})]}),(0,t.jsxs)(r.Badge,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:[h.length," ",d("list.modelsCount")]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),l(e.id)},children:(0,t.jsx)(m.Trash2,{className:"size-3 text-destructive"})})]}),h.length>0&&(0,t.jsx)("div",{className:"mt-2 ml-11 flex flex-wrap gap-1",children:h.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[11px] text-muted-foreground",children:[(0,t.jsx)(u.Brain,{className:"size-3"}),e.name,["vision","reasoning","embedding"].map(s=>e[s]?(0,t.jsx)("span",{className:`inline-block rounded px-1 text-[9px] font-medium border ${p[s]}`,children:s[0].toUpperCase()},s):null)]},e.id))}),(0,t.jsxs)(n.Button,{variant:"ghost",size:"xs",className:"mt-1 ml-11 h-6 text-[11px] text-muted-foreground",onClick:t=>{t.stopPropagation(),o(e.name)},children:[(0,t.jsx)(x.ExternalLink,{className:"size-3"}),d("list.addModel")]})]},e.id)}),0===e.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(c.Server,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:d("list.empty")})]})]})}function g({draft:e,onChange:s}){let i=(0,a.useTranslations)("providers");return(0,t.jsx)("div",{className:"flex flex-col gap-5 p-5",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:i("form.connection")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.name")}),(0,t.jsx)(l.Input,{value:e.name||"",onChange:e=>s("name",e.target.value),placeholder:i("form.namePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.apiBase")}),(0,t.jsx)(l.Input,{value:e.apiBase||"",onChange:e=>s("apiBase",e.target.value),placeholder:i("form.apiBasePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.apiKey")}),(0,t.jsx)(l.Input,{type:"password",value:e.apiKey||"",onChange:e=>s("apiKey",e.target.value),placeholder:i("form.apiKeyPlaceholder")})]})]})})}e.s(["ProvidersDialog",0,function({open:e,onOpenChange:l,onAddModel:r,standalone:c}){let m=(0,a.useTranslations)("providers"),u=(0,a.useTranslations)("common"),{models:x,providers:p,ensure:j,addProvider:v,updateProvider:N,removeProvider:y}=(0,h.useLLMStore)(),[b,k]=(0,s.useState)(null),[w,C]=(0,s.useState)(null),[S,T]=(0,s.useState)(!1),[z,D]=(0,s.useState)(!1),[I,P]=(0,s.useState)(null);(0,s.useEffect)(()=>{e&&(T(!0),P(null),j().finally(()=>T(!1)))},[e,j]);let $=()=>{k(null),C(null)},M=()=>{k(null),C({name:"",apiBase:"",apiKey:""})},A=async()=>{if(w&&w.name){D(!0),P(null);try{let e=!b,t=await fetch(e?"/api/providers":`/api/providers/${b.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(!t.ok)throw Error();let s=await t.json();e?v(s):N(s),$()}catch{P(m("error.saveFailed"))}finally{D(!1)}}},E=async e=>{if(confirm(m("confirm.delete"))){D(!0);try{if(!(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok)throw Error();y(e),b?.id===e&&$()}catch{P(m("error.deleteFailed"))}finally{D(!1)}}},B=(0,t.jsxs)(t.Fragment,{children:[!c&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[w&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:$,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(i.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(i.DialogTitle,{className:"text-base",children:w?b?m("dialog.editTitle"):m("dialog.addTitle"):m("dialog.title")}),(0,t.jsx)(i.DialogDescription,{className:"text-xs",children:w?m("dialog.editDescription"):m("dialog.listDescription")})]}),!w&&(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:M,className:"mr-6",children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),m("dialog.add")]})]}),c&&!w&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:M,children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),m("dialog.add")]})}),c&&w&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:$,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:b?m("dialog.editTitle"):m("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:m("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[I&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:I}),S?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:m("dialog.loading")}):w?(0,t.jsx)(g,{draft:w,onChange:(e,t)=>{C(s=>s?{...s,[e]:t}:s)}}):(0,t.jsx)(f,{providers:p,providerModels:p.map(e=>{let t;return{id:e.id,models:(t=e.name,x.filter(e=>e.provider===t))}}),onEdit:e=>{k(e),C({...e})},onDelete:E,onAddModel:e=>{c||l(!1),r(e)}})]}),w&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:$,disabled:z,children:u("cancel")}),(0,t.jsx)(n.Button,{size:"sm",onClick:A,disabled:z||!w.name,children:u(z?"saving":"save")})]})]});return c?(0,t.jsx)("div",{className:"h-full flex flex-col",children:B}):(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||$(),l(e)},children:(0,t.jsx)(i.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:B})})}])},86477,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(209988),n=e.i(260218),l=e.i(681622),r=e.i(607452),o=e.i(562918),c=e.i(226624),d=e.i(767467),m=e.i(990336),u=e.i(953700),x=e.i(137340),h=e.i(368942);let p={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"},f=[{label:"8K",value:8192},{label:"16K",value:16384},{label:"32K",value:32768},{label:"64K",value:65536},{label:"128K",value:128e3},{label:"200K",value:2e5},{label:"256K",value:256e3},{label:"1M",value:1e6}],g=["low","medium","high"];function j({groups:e,providerNames:s,onEdit:i,onDelete:l}){let r=(0,a.useTranslations)("models"),c=s.length>0?s:["Other"],d=Object.keys(e).sort((e,t)=>{let s=c.indexOf(e),a=c.indexOf(t);return s>=0&&a>=0?s-a:s>=0?-1:a>=0?1:e.localeCompare(t)});return(0,t.jsxs)("div",{className:"flex flex-col p-4 gap-4",children:[d.map(s=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2 px-1",children:s}),(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:e[s].map(e=>{var s;return(0,t.jsxs)("div",{className:"group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>i(e),children:[(0,t.jsx)(m.Brain,{className:"size-4 text-muted-foreground shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground font-mono ml-2",children:e.modelId}),e.cost?(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-muted-foreground font-mono",children:["$",y(e.cost.inputPerMillion),"/$",y(e.cost.outputPerMillion)]}):null,e.maxContextTokens?(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-muted-foreground font-mono",children:[(s=e.maxContextTokens,new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(s))," ",r("list.contextAbbr")]}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:["vision","reasoning","embedding"].map(s=>e[s]?(0,t.jsx)(o.Badge,{variant:"outline",className:`text-[10px] h-5 px-1.5 ${p[s]}`,children:r(`capability.${s}`)},s):null)}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),l(e.id)},children:(0,t.jsx)(x.Trash2,{className:"size-3 text-destructive"})})]},e.id)})})]},s)),0===d.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(m.Brain,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:r("list.empty")})]})]})}function v({draft:e,providerNames:i,onChange:n}){let o=(0,a.useTranslations)("models"),d=(0,s.useRef)(!1),[m,u]=(0,s.useState)(()=>(function(e){if(!e)return f.length;let t=f.findIndex(t=>t.value===e);return t>=0?t:f.length})(e.maxContextTokens)),x=i.length>0?i:["Other"];return(0,t.jsxs)("div",{className:"flex flex-col gap-5 p-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.details")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.modelId")}),(0,t.jsx)(l.Input,{value:e.modelId||"",onChange:e=>{let t=e.target.value;n("modelId",t),d.current||n("name",t)},placeholder:o("form.modelIdPlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.displayName")}),(0,t.jsx)(l.Input,{value:e.name||"",onChange:e=>{d.current=!0,n("name",e.target.value)},placeholder:o("form.displayNamePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.provider")}),(0,t.jsx)("select",{value:e.provider||"Other",onChange:e=>n("provider",e.target.value),className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none focus-visible:border-ring dark:bg-input/30",children:x.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.context")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.maxContextTokens")}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(r.Slider,{min:0,max:f.length,step:1,value:m,onValueChange:e=>{u(e),e<f.length&&n("maxContextTokens",f[e].value)},className:"flex-1"}),m<f.length?(0,t.jsx)("span",{className:"text-sm tabular-nums min-w-[3.5rem] text-right",children:f[m].label}):(0,t.jsx)(l.Input,{type:"number",min:"1",step:"1",value:e.maxContextTokens??"",onChange:e=>n("maxContextTokens",function(e){if(!e.trim())return;let t=Number(e);return Number.isFinite(t)&&t>0?Math.floor(t):void 0}(e.target.value)),placeholder:o("form.customContextPlaceholder"),className:"h-7 w-24 text-sm tabular-nums"})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.thinking")}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-input px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:o("form.enableThinking")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("form.enableThinkingHelper")})]}),(0,t.jsx)(c.Switch,{checked:e.thinkingEnabled??!0,onCheckedChange:e=>n("thinkingEnabled",e)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.effort")}),(0,t.jsx)("select",{value:e.thinkingEffort||"medium",onChange:e=>n("thinkingEffort",e.target.value),disabled:!(e.thinkingEnabled??!0),className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",children:g.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.cost")}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.inputPerMillion")}),(0,t.jsx)(l.Input,{type:"number",min:"0",step:"0.0001",value:e.cost?.inputPerMillion??0,onChange:t=>n("cost",{inputPerMillion:N(t.target.value),outputPerMillion:e.cost?.outputPerMillion??0}),placeholder:o("form.costPlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.outputPerMillion")}),(0,t.jsx)(l.Input,{type:"number",min:"0",step:"0.0001",value:e.cost?.outputPerMillion??0,onChange:t=>n("cost",{inputPerMillion:e.cost?.inputPerMillion??0,outputPerMillion:N(t.target.value)}),placeholder:o("form.costPlaceholder")})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.capabilities")}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:["vision","reasoning","embedding"].map(s=>{let a=!!e[s];return(0,t.jsx)("button",{type:"button",onClick:()=>n(s,!a),className:`rounded-md border px-2 py-1 text-xs font-medium transition-colors cursor-pointer
2
+ ${a?p[s]:"text-muted-foreground border-input hover:bg-muted/50"}`,children:o(`capability.${s}`)},s)})})]})]})}function N(e){let t=Number(e);return Number.isFinite(t)&&t>=0?t:0}function y(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:4}).format(e)}e.s(["ModelsDialog",0,function({open:e,onOpenChange:l,initialProvider:r,standalone:o}){let c=(0,a.useTranslations)("models"),m=(0,a.useTranslations)("common"),{models:x,providers:p,ensure:f,addModel:g,updateModel:N,removeModel:y}=(0,h.useLLMStore)(),b=p.map(e=>e.name),[k,w]=(0,s.useState)(null),[C,S]=(0,s.useState)(null),[T,z]=(0,s.useState)(!1),[D,I]=(0,s.useState)(!1),[P,$]=(0,s.useState)(null),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!e){M.current=!1;return}queueMicrotask(()=>{z(!0),$(null)}),f().finally(()=>z(!1))},[e,f]),(0,s.useEffect)(()=>{e&&r&&!C&&!M.current&&(M.current=!0,queueMicrotask(()=>{w(null),S({modelId:"",name:"",provider:r,cost:{inputPerMillion:0,outputPerMillion:0},maxContextTokens:128e3,thinkingEnabled:!0,thinkingEffort:"medium",vision:!1,reasoning:!1,embedding:!1})}))},[e,r,C]);let A=()=>{w(null),S(null)},E=()=>{w(null),S({modelId:"",name:"",provider:"Other",cost:{inputPerMillion:0,outputPerMillion:0},maxContextTokens:128e3,thinkingEnabled:!0,thinkingEffort:"medium",vision:!1,reasoning:!1,embedding:!1})},B=async()=>{if(C&&C.modelId&&C.name){I(!0),$(null);try{let e=!k,t=await fetch(e?"/api/models":`/api/models/${k.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)});if(!t.ok)throw Error();let s=await t.json();e?g(s):N(s),A()}catch{$(c("error.saveFailed"))}finally{I(!1)}}},O=async e=>{if(confirm(c("confirm.delete"))){I(!0);try{if(!(await fetch(`/api/models/${e}`,{method:"DELETE"})).ok)throw Error();y(e),k?.id===e&&A()}catch{$(c("error.deleteFailed"))}finally{I(!1)}}},L=function(e){let t={};for(let s of e){let e=s.provider||"Other";(t[e]??=[]).push(s)}return t}(x),U=(0,t.jsxs)(t.Fragment,{children:[!o&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[C&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:A,children:(0,t.jsx)(d.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(i.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(i.DialogTitle,{className:"text-base",children:C?k?c("dialog.editTitle"):c("dialog.addTitle"):c("dialog.title")}),(0,t.jsx)(i.DialogDescription,{className:"text-xs",children:C?c("dialog.editDescription"):c("dialog.listDescription")})]}),!C&&(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:E,className:"mr-6",children:[(0,t.jsx)(u.Plus,{className:"size-3.5"}),c("dialog.add")]})]}),o&&!C&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:E,children:[(0,t.jsx)(u.Plus,{className:"size-3.5"}),c("dialog.add")]})}),o&&C&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:A,children:(0,t.jsx)(d.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:k?c("dialog.editTitle"):c("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[P&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:P}),T?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:c("dialog.loading")}):C?(0,t.jsx)(v,{draft:C,providerNames:b,onChange:(e,t)=>{S(s=>s?{...s,[e]:t}:s)}}):(0,t.jsx)(j,{groups:L,providerNames:b,onEdit:e=>{w(e),S({...e,thinkingEnabled:e.thinkingEnabled??!0,thinkingEffort:e.thinkingEffort??"medium"})},onDelete:O})]}),C&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:A,disabled:D,children:m("cancel")}),(0,t.jsx)(n.Button,{size:"sm",onClick:B,disabled:D||!C.modelId||!C.name,children:m(D?"saving":"save")})]})]});return o?(0,t.jsx)("div",{className:"h-full flex flex-col",children:U}):(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||A(),l(e)},children:(0,t.jsx)(i.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:U})})}])},515104,e=>{"use strict";function t(){return"tauri.localhost"===window.location.hostname||"__TAURI_INTERNALS__"in window}async function s(){return t()?r():"Notification"in window?l(Notification.permission):"unsupported"}async function a(){return t()?o():n()}async function i(e,s){var a,i;return t()?c(e,s):(a=e,i=s,void("Notification"in window&&"granted"===Notification.permission&&new Notification(a,{body:i,icon:"/favicon.ico"})))}async function n(){return"Notification"in window?l(await Notification.requestPermission()):"unsupported"}function l(e){switch(e){case"granted":return"granted";case"denied":return"denied";default:return"default"}}async function r(){try{let{isPermissionGranted:t}=await e.A(678001);return await t()?"granted":"default"}catch{return"unsupported"}}async function o(){try{let{requestPermission:t,isPermissionGranted:s}=await e.A(678001),a=await t();if("granted"===a||await s())return"granted";return"denied"}catch{return"unsupported"}}async function c(t,s){try{let{sendNotification:a,isPermissionGranted:i}=await e.A(678001);if(!await i())return;a({title:t,body:s})}catch{}}e.s(["getNotificationPermission",0,s,"isTauriEnvironment",0,t,"requestNotificationPermission",0,a,"sendNativeNotification",0,i])},437122,233297,286117,e=>{"use strict";var t=e.i(523592);function s(e){let[t,s=""]=e.split("#",2),[a,i=""]=t.split("?",2);if(!a.startsWith("/")||a.startsWith("/api/"))return e;if("/"===a)return`/${i?`?${i}`:""}${s?`#${s}`:""}`;if(a.startsWith("/workspace/")){let e=a.slice(11).split("/")[0],t=new URLSearchParams(i);return t.set("workspaceId",e),`/workspace/_.html${t.toString()?`?${t.toString()}`:""}${s?`#${s}`:""}`}let n=a.endsWith(".html")?a:`${a}.html`;return`${n}${i?`?${i}`:""}${s?`#${s}`:""}`}function a(e){return"/index.html"===e?"/":e.endsWith(".html")?e.slice(0,-5):e}function i(e){return"/login"===a(e)}e.i(8890),e.i(515104),e.s(["tauriNavigate",0,function(e,t,a=!1){t=s(t),a?window.location.replace(t):window.location.href=t},"toStaticHref",0,s],233297),e.s(["isLoginPath",0,i,"isWorkspacePath",0,function(e){return a(e).startsWith("/workspace/")},"workspaceIdFromLocation",0,function(e,t){let s=new URLSearchParams(t).get("workspaceId");if(s)return s;let i=a(e).match(/^\/workspace\/([^/]+)/);return i?.[1]??null}],286117);let n="agent-spaces-token",l="agent-spaces-auth-verified";function r(){let e=localStorage.getItem(n);if(null!==e)return e;let s=(0,t.getActiveServer)()?.secret;return void 0!==s?s:null}function o(){localStorage.removeItem(n),localStorage.removeItem(l)}function c(){let e=r();return null===e?{}:{Authorization:`Bearer ${e}`}}async function d(e,a){let n=function(e){if("string"!=typeof e||e.startsWith("http"))return e;let s=(0,t.getActiveServerUrl)();return s?`${s}${e.startsWith("/")?"":"/"}${e}`:e}(e),l={...c(),...a?.headers},r=await fetch(n,{...a,headers:l});return(401===r.status||403===r.status)&&(o(),i(window.location.pathname)||window.location.replace(s("/login"))),r}e.s(["authHeaders",0,c,"fetchWithAuth",0,d,"getToken",0,r,"isAuthenticated",0,function(){return"1"===localStorage.getItem(l)},"removeToken",0,o,"setToken",0,function(e){localStorage.setItem(n,e),localStorage.setItem(l,"1")}],437122)},962562,995684,e=>{"use strict";let t=(0,e.i(433721).default)("pencil",[["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"}]]);e.s(["default",0,t],995684),e.s(["Pencil",0,t],962562)},210,e=>{"use strict";let t=(0,e.i(433721).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],210)},894920,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(209988),i=e.i(260218),n=e.i(681622),l=e.i(788010),r=e.i(344118),o=e.i(962562),c=e.i(953700),d=e.i(100559),m=e.i(137340);let u=(0,e.i(433721).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var x=e.i(244073);e.s(["ServerManagerDialog",0,function({open:e,onOpenChange:h,servers:p,activeId:f,onUpdate:g,onRemove:j,onSwitch:v}){let N=(0,x.useTranslations)("sidebar"),y=(0,x.useTranslations)("common"),[b,k]=s.useState(null),[w,C]=s.useState(""),[S,T]=s.useState(""),[z,D]=s.useState(""),[I,P]=s.useState(""),[$,M]=s.useState(""),[A,E]=s.useState(""),[B,O]=s.useState(""),[L,U]=s.useState(null),_=()=>{k(null),C(""),T(""),D("")},F=()=>{if(!w.trim()||!S.trim())return;let e=S.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g(p.map(t=>t.id===b?{...t,name:w.trim(),url:e,secret:z.trim()||void 0}:t)),_()},R=s.useCallback(e=>{console.log(`[server-diagnostic] ${e}`),O(t=>`${t}${t?"\n":""}${e}`)},[]),H=async e=>{U(e.id),O("");let t=e.url.replace(/\/$/,""),s=`${t}/api/health`,a=new URL("/ws",t);a.protocol="https:"===a.protocol?"wss:":"ws:",a.searchParams.set("workspaceId","__diagnostic__"),a.searchParams.set("token",e.secret||"__diagnostic__"),R(`time: ${new Date().toISOString()}`),R(`window.origin: ${window.location.origin}`),R(`window.href: ${window.location.href}`),R(`navigator.onLine: ${navigator.onLine}`),R(`target: ${t}`),R(`health: ${s}`);let i=performance.now();try{let e=new AbortController,t=window.setTimeout(()=>e.abort(),1e4),a=await fetch(s,{method:"GET",cache:"no-store",mode:"cors",signal:e.signal});window.clearTimeout(t);let n=await a.text();R(`fetch /api/health: OK ${a.status} ${a.statusText} (${Math.round(performance.now()-i)}ms)`),R(`fetch response: ${n.slice(0,500)||"<empty>"}`)}catch(t){let e=t instanceof Error?t:Error(String(t));R(`fetch /api/health: FAILED ${e.name}: ${e.message} (${Math.round(performance.now()-i)}ms)`)}R(`websocket: ${a.toString()}`),await new Promise(e=>{let t=performance.now(),s=!1,i=(a,i)=>{if(!s){s=!0,R(`${a} (${Math.round(performance.now()-t)}ms)`);try{i?.close()}catch{}e()}};try{let e=new WebSocket(a.toString()),t=window.setTimeout(()=>i("websocket: TIMEOUT",e),1e4);e.onopen=()=>{window.clearTimeout(t),i("websocket: OPEN",e)},e.onerror=()=>{window.clearTimeout(t),i("websocket: ERROR",e)},e.onclose=s=>{window.clearTimeout(t),i(`websocket: CLOSE code=${s.code} reason=${s.reason||"<empty>"}`,e)}}catch(t){let e=t instanceof Error?t:Error(String(t));i(`websocket: FAILED ${e.name}: ${e.message}`)}}),U(null)};return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{h(e),e||_()},children:(0,t.jsxs)(a.DialogContent,{className:"max-w-md",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:N("server.manageServers")}),(0,t.jsx)(a.DialogDescription,{children:N("server.manageDescription")})]}),(0,t.jsx)("div",{className:"space-y-1",children:p.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[(0,t.jsx)(d.Server,{className:"size-4 shrink-0 text-muted-foreground"}),b===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Input,{className:"h-7 text-sm flex-1",value:w,onChange:e=>C(e.target.value),placeholder:"Name",autoFocus:!0}),(0,t.jsx)(n.Input,{className:"h-7 text-sm flex-[1.5]",value:S,onChange:e=>T(e.target.value),placeholder:"http://...",onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:F,className:"h-7 px-2",children:y("save")}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:_,className:"h-7 px-2",children:y("cancel")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>{e.id!==f&&v(e)},children:[(0,t.jsx)("div",{className:"text-sm font-medium truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.url})]}),e.id===f?(0,t.jsx)(r.Check,{className:"size-4 shrink-0 text-primary"}):(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:()=>v(e),className:"h-7 px-2 text-xs shrink-0",children:N("server.switch")}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>H(e)}),(0,t.jsx)(o.Pencil,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>{k(e.id),C(e.name),T(e.url),D(e.secret||"")}}),"default"!==e.id&&(0,t.jsx)(m.Trash2,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-destructive",onClick:()=>j(e.id)})]})]})]},e.id))}),null===b&&(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:N("server.newServer")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{className:"h-8 text-sm",value:I,onChange:e=>P(e.target.value),placeholder:"Name"}),(0,t.jsx)(i.Button,{size:"sm",onClick:()=>{if(!I.trim()||!$.trim())return;let e=$.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g([...p,{id:Date.now().toString(),name:I.trim(),url:e,secret:A.trim()||void 0}]),P(""),M(""),E("")},disabled:!I.trim()||!$.trim(),children:(0,t.jsx)(c.Plus,{className:"size-4"})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(n.Input,{className:"h-8 text-sm flex-1",value:$,onChange:e=>M(e.target.value),placeholder:"http://..."})}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(n.Input,{className:"h-8 text-sm flex-1",type:"password",value:A,onChange:e=>E(e.target.value),placeholder:N("server.secretOptionalPlaceholder"),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})})]}),(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Network diagnostics"}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:!p.find(e=>e.id===f)||null!==L,onClick:()=>{let e=p.find(e=>e.id===f);e&&H(e)},children:L?"Testing...":"Test active"})]}),(0,t.jsx)(l.Textarea,{readOnly:!0,value:B||"Tap the Wi-Fi icon next to a server, or use Test active.",className:"h-36 resize-none font-mono text-[11px]"})]})]})})}],894920)},111343,e=>{"use strict";let t=(0,e.i(433721).default)("save",[["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"}]]);e.s(["Save",0,t],111343)},255742,973767,401058,977694,e=>{"use strict";var t=e.i(433721);let s=(0,t.default)("star",[["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"}]]);e.s(["Star",0,s],255742);let a=(0,t.default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["StarOff",0,a],973767);let i=(0,t.default)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);e.s(["MoreVertical",0,i],401058);let n=(0,t.default)("rocket",[["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"}]]);e.s(["Rocket",0,n],977694)},22906,191202,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(887836),n=e.i(209988),l=e.i(260218),r=e.i(681622),o=e.i(788010),c=e.i(191118),d=e.i(917955),m=e.i(996652),u=e.i(188815),x=e.i(611176),h=e.i(255742),p=e.i(973767),f=e.i(129981),g=e.i(887354);let j=(0,e.i(433721).default)("plug",[["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"}]]);e.s(["Plug",0,j],191202);var v=e.i(972846),N=e.i(401058),y=e.i(137340),b=e.i(977694),k=e.i(111343),w=e.i(465458);e.i(462506);let C=(0,i.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["McpsDialog",0,function({open:e,onOpenChange:i,standalone:S}){let T=(0,a.useTranslations)("mcps"),z=(0,a.useTranslations)("common"),[D,I]=(0,s.useState)([]),[P,$]=(0,s.useState)([]),[M,A]=(0,s.useState)(!1),[E,B]=(0,s.useState)(""),[O,L]=(0,s.useState)("all"),[U,_]=(0,s.useState)(""),[F,R]=(0,s.useState)(!1),[H,W]=(0,s.useState)(""),[K,J]=(0,s.useState)(""),[q,V]=(0,s.useState)(null),[G,X]=(0,s.useState)([]),[Y,Z]=(0,s.useState)(null),[Q,ee]=(0,s.useState)(""),et=(0,s.useCallback)(async()=>{A(!0);try{let e=await fetch("/api/mcps");e.ok&&I(await e.json())}catch{}A(!1)},[]),es=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();$(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,s.useEffect)(()=>{(e||S)&&(et(),es())},[e,S,et,es]);let ea=async e=>{try{let t=await fetch(`/api/mcps/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:s}=await t.json();I(t=>t.map(t=>t.name===e.name?{...t,favorited:s}:t))}}catch{}},ei=async()=>{J("");try{JSON.parse(H)}catch{J(T("importInvalidJson"));return}try{let e=await fetch("/api/mcps/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonText:H})});if(e.ok)W(""),R(!1),et();else{let t=await e.json();J(t.error||T("importFailed"))}}catch{J(T("importFailed"))}},en=async()=>{let e;if(Y){try{e=JSON.parse(Q)}catch{return}try{(await fetch(`/api/mcps/${encodeURIComponent(Y.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})})).ok&&(I(t=>t.map(t=>t.name===Y.name?{...t,config:e}:t)),Z(null))}catch{}}},el=async e=>{try{(await fetch(`/api/mcps/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&I(t=>t.filter(t=>t.name!==e.name))}catch{}},er=async()=>{if(q){for(let e of P){let t=q.boundAgents.some(t=>t.id===e.id),s=G.includes(e.id);if(t&&!s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=s.mcps||{},i={...a.mcpServers||{}};delete i[q.name],await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,mcps:{...a,mcpServers:i}})})}else if(!t&&s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=s.mcps||{},i={...a.mcpServers||{}};q.name in i||(i[q.name]=q.config,await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,mcps:{...a,mcpServers:i}})}))}}V(null),et()}},eo=e=>{X(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ec=D.filter(e=>{if(E){let t=E.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.description.toLowerCase().includes(t))return!1}return("favorites"!==O||!!e.favorited)&&("agent"!==O||!U||!!e.boundAgents.some(e=>e.id===U))}),ed=(S||e)&&!q&&!Y,em=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end pr-8 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[S?(0,t.jsx)("h2",{className:"text-base font-semibold",children:T("title")}):(0,t.jsx)(n.DialogTitle,{children:T("title")}),S?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("description")}):(0,t.jsx)(n.DialogDescription,{children:T("description")})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsxs)(m.Popover,{open:F,onOpenChange:R,children:[(0,t.jsx)(m.PopoverTrigger,{render:(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(f.Upload,{className:"size-3.5 mr-1"}),T("import")]})}),(0,t.jsx)(m.PopoverContent,{className:"w-96",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:T("importTitle")}),(0,t.jsx)(o.Textarea,{value:H,onChange:e=>{W(e.target.value),J("")},placeholder:'{\n "mcpServers": {\n "server-name": {\n "command": "npx",\n "args": ["-y", "package"],\n "env": {}\n }\n }\n}',className:"font-mono text-xs min-h-[180px] resize-none"}),K&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:K}),(0,t.jsx)(l.Button,{size:"sm",onClick:ei,disabled:!H.trim(),className:"w-full",children:T("importConfirm")})]})})]})})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(l.Button,{variant:"all"===O?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("all"),_("")},children:[(0,t.jsx)(j,{className:"size-3.5 mr-1.5"}),T("filterAll")]}),(0,t.jsxs)(l.Button,{variant:"favorites"===O?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("favorites"),_("")},children:[(0,t.jsx)(h.Star,{className:"size-3.5 mr-1.5"}),T("filterFavorites")]})]}),P.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:T("filterByAgent")}),(0,t.jsx)(c.ScrollArea,{className:"max-h-48",children:P.map(e=>(0,t.jsxs)(l.Button,{variant:"agent"===O&&U===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("agent"),_(e.id)},children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:E,onChange:e=>B(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,w.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===O?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("all"),_("")},children:T("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,w.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===O?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("favorites"),_("")},children:[(0,t.jsx)(h.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),T("filterFavorites")]})]}),P.length>0&&(0,t.jsx)(u.SearchSelect,{value:"agent"===O?U:"",onChange:e=>{e?(L("agent"),_(e)):(L("all"),_(""))},options:P.map(e=>({value:e.id,label:e.name})),placeholder:T("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:E,onChange:e=>B(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsx)(c.ScrollArea,{className:"flex-1",children:M?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:z("loading")}):0===ec.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:ec.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Z(e),ee(JSON.stringify(e.config,null,2))},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(j,{className:"size-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent",onClick:t=>{t.stopPropagation(),ea(e)},children:e.favorited?(0,t.jsx)(h.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(p.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.config.command||e.config.url||JSON.stringify(e.config).slice(0,100)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>{V(e),X(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(b.Rocket,{className:"size-3.5 mr-1"}),T("apply")]}),(0,t.jsxs)(d.DropdownMenu,{children:[(0,t.jsx)(d.DropdownMenuTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(N.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(d.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(d.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>el(e),children:[(0,t.jsx)(y.Trash2,{className:"size-3.5 mr-1.5"}),T("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[S&&ed&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:em}),!S&&(0,t.jsx)(n.Dialog,{open:ed,onOpenChange:i,children:(0,t.jsx)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:em})}),(0,t.jsx)(n.Dialog,{open:!!Y,onOpenChange:e=>{e||Z(null)},children:(0,t.jsxs)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.DialogTitle,{children:T("editTitle",{name:Y?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:T("editDescription")})]}),(0,t.jsxs)(l.Button,{size:"sm",onClick:en,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),z("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(C,{height:"100%",language:"json",value:Q,onChange:e=>ee(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on",formatOnPaste:!0}})})]})}),(0,t.jsx)(n.Dialog,{open:!!q,onOpenChange:e=>{e||V(null)},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:T("bindTitle",{name:q?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:T("bindDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsx)("div",{className:"max-h-52 overflow-y-auto space-y-0.5",children:P.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>eo(e.id),className:(0,w.cn)("flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors"),children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.name}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:(0,w.cn)("flex items-center justify-center size-4 rounded border shrink-0",G.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input")})]},e.id))}),G.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:G.map(e=>{let s=P.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:[(0,t.jsx)(x.AgentIcon,{agentId:e,name:s?.name,className:"size-3.5 rounded-full"}),s?.name||e,(0,t.jsx)("button",{type:"button",onClick:()=>eo(e),className:"hover:text-destructive",children:(0,t.jsx)(v.X,{className:"size-3"})})]},e)})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>V(null),children:z("cancel")}),(0,t.jsx)(l.Button,{onClick:er,children:z("confirm")})]})]})]})})]})}],22906)},625873,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(887836),n=e.i(209988),l=e.i(260218),r=e.i(681622),o=e.i(191118),c=e.i(917955),d=e.i(996652),m=e.i(460578),u=e.i(188815),x=e.i(611176),h=e.i(255742),p=e.i(973767),f=e.i(129981),g=e.i(887354),j=e.i(989484),v=e.i(972846),N=e.i(401058),y=e.i(137340),b=e.i(977694),k=e.i(111343),w=e.i(601039),C=e.i(465458);e.i(462506);let S=(0,i.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["SkillsDialog",0,function({open:e,onOpenChange:i,standalone:T}){let z=(0,a.useTranslations)("skills"),D=(0,a.useTranslations)("common"),[I,P]=(0,s.useState)([]),[$,M]=(0,s.useState)([]),[A,E]=(0,s.useState)(!1),[B,O]=(0,s.useState)(""),[L,U]=(0,s.useState)("all"),[_,F]=(0,s.useState)(""),[R,H]=(0,s.useState)(!1),[W,K]=(0,s.useState)([]),[J,q]=(0,s.useState)(null),[V,G]=(0,s.useState)([]),[X,Y]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(""),[ee,et]=(0,s.useState)([]),[es,ea]=(0,s.useState)(new Set),[ei,en]=(0,s.useState)(!1),[el,er]=(0,s.useState)(!1),eo=(0,s.useCallback)(async()=>{E(!0);try{let e=await fetch("/api/skills");e.ok&&P(await e.json())}catch{}E(!1)},[]),ec=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();M(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,s.useEffect)(()=>{(e||T)&&(eo(),ec())},[e,T,eo,ec]);let ed=async e=>{try{let t=await fetch(`/api/skills/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:s}=await t.json();P(t=>t.map(t=>t.name===e.name?{...t,favorited:s}:t))}}catch{}},em=async()=>{for(let e of W){let t=await e.file.text();await fetch("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:e.file.name,content:t})})}K([]),H(!1),eo()},eu=async()=>{if(X)try{(await fetch(`/api/skills/${encodeURIComponent(X.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:Z})})).ok&&(P(e=>e.map(e=>e.name===X.name?{...e,content:Z}:e)),Y(null))}catch{}},ex=async e=>{try{(await fetch(`/api/skills/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&P(t=>t.filter(t=>t.name!==e.name))}catch{}},eh=async()=>{if(J){for(let e of $){let t=J.boundAgents.some(t=>t.id===e.id),s=V.includes(e.id);if(t&&!s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=(s.skills||[]).filter(e=>e.replace(/\.md$/i,"")!==J.name);console.log("[skills] remove skill",J.name,"from agent",e.name,"updatedSkills:",a),await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,skills:a})})}else if(!t&&s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json();if(!(s.skills||[]).map(e=>e.replace(/\.md$/i,"")).includes(J.name)){let t=[...s.skills||[],`${J.name}.md`];console.log("[skills] add skill",J.name,"to agent",e.name,"updatedSkills:",t),await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,skills:t})})}}}q(null),eo()}},ep=e=>{G(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ef=async()=>{er(!0);try{let e=await fetch("/api/skills/sync-check");if(e.ok){let t=await e.json();et(t),ea(new Set(t.map(e=>`${e.agentId}::${e.skillName}`))),en(!0)}}catch{}er(!1)},eg=async()=>{let e=ee.filter(e=>es.has(`${e.agentId}::${e.skillName}`));if(0!==e.length)try{(await fetch("/api/skills/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:e.map(e=>({agentId:e.agentId,skillName:e.skillName}))})})).ok&&(en(!1),eo())}catch{}},ej=I.filter(e=>{if(B){let t=B.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.content.toLowerCase().includes(t))return!1}return("favorites"!==L||!!e.favorited)&&("agent"!==L||!_||!!e.boundAgents.some(e=>e.id===_))}),ev=(T||e)&&!J&&!X,eN=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[T?(0,t.jsx)("h2",{className:"text-base font-semibold",children:z("title")}):(0,t.jsx)(n.DialogTitle,{children:z("title")}),T?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:z("description")}):(0,t.jsx)(n.DialogDescription,{children:z("description")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto shrink-0 pt-2",children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:ef,disabled:el,children:[(0,t.jsx)(w.RefreshCw,{className:(0,C.cn)("size-3.5 mr-1",el&&"animate-spin")}),z("syncToAgents")]}),(0,t.jsxs)(d.Popover,{open:R,onOpenChange:H,children:[(0,t.jsx)(d.PopoverTrigger,{render:(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(f.Upload,{className:"size-3.5 mr-1"}),z("import")]})}),(0,t.jsx)(d.PopoverContent,{className:"w-80",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:z("importTitle")}),(0,t.jsx)(m.FileUpload,{value:W,onChange:K,accept:{"text/markdown":[".md"],"":[".md"]},placeholder:z("importPlaceholder"),maxFiles:10}),(0,t.jsx)(l.Button,{size:"sm",onClick:em,disabled:0===W.length,className:"w-full",children:z("importConfirm")})]})})]})]})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(l.Button,{variant:"all"===L?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("all"),F("")},children:[(0,t.jsx)(j.FileText,{className:"size-3.5 mr-1.5"}),z("filterAll")]}),(0,t.jsxs)(l.Button,{variant:"favorites"===L?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("favorites"),F("")},children:[(0,t.jsx)(h.Star,{className:"size-3.5 mr-1.5"}),z("filterFavorites")]})]}),$.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:z("filterByAgent")}),(0,t.jsx)(o.ScrollArea,{className:"max-h-48",children:$.map(e=>(0,t.jsxs)(l.Button,{variant:"agent"===L&&_===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("agent"),F(e.id)},children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:B,onChange:e=>O(e.target.value),placeholder:z("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,C.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===L?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{U("all"),F("")},children:z("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,C.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===L?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{U("favorites"),F("")},children:[(0,t.jsx)(h.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),z("filterFavorites")]})]}),$.length>0&&(0,t.jsx)(u.SearchSelect,{value:"agent"===L?_:"",onChange:e=>{e?(U("agent"),F(e)):(U("all"),F(""))},options:$.map(e=>({value:e.id,label:e.name})),placeholder:z("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:B,onChange:e=>O(e.target.value),placeholder:z("search"),className:"pl-8"})]}),(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:A?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:D("loading")}):0===ej.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:z("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:ej.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Y(e),Q(e.content)},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent",onClick:t=>{t.stopPropagation(),ed(e)},children:e.favorited?(0,t.jsx)(h.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(p.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.content.slice(0,120).replace(/^#\s+/,"")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>{q(e),G(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(b.Rocket,{className:"size-3.5 mr-1"}),z("apply")]}),(0,t.jsxs)(c.DropdownMenu,{children:[(0,t.jsx)(c.DropdownMenuTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(N.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(c.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(c.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>ex(e),children:[(0,t.jsx)(y.Trash2,{className:"size-3.5 mr-1.5"}),z("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[T&&ev&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:eN}),!T&&(0,t.jsx)(n.Dialog,{open:ev,onOpenChange:i,children:(0,t.jsx)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:eN})}),(0,t.jsx)(n.Dialog,{open:!!X,onOpenChange:e=>{e||Y(null)},children:(0,t.jsxs)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.DialogTitle,{children:z("editTitle",{name:X?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:z("editDescription")})]}),(0,t.jsxs)(l.Button,{size:"sm",onClick:eu,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),D("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(S,{height:"100%",language:"markdown",value:Z,onChange:e=>Q(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on"}})})]})}),(0,t.jsx)(n.Dialog,{open:!!J,onOpenChange:e=>{e||q(null)},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:z("bindTitle",{name:J?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:z("bindDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsx)("div",{className:"max-h-52 overflow-y-auto space-y-0.5",children:$.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>ep(e.id),className:(0,C.cn)("flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors"),children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.name}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:(0,C.cn)("flex items-center justify-center size-4 rounded border shrink-0",V.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input")})]},e.id))}),V.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:V.map(e=>{let s=$.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:[(0,t.jsx)(x.AgentIcon,{agentId:e,name:s?.name,className:"size-3.5 rounded-full"}),s?.name||e,(0,t.jsx)("button",{type:"button",onClick:()=>ep(e),className:"hover:text-destructive",children:(0,t.jsx)(v.X,{className:"size-3"})})]},e)})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>q(null),children:D("cancel")}),(0,t.jsx)(l.Button,{onClick:eh,children:D("confirm")})]})]})]})}),(0,t.jsx)(n.Dialog,{open:ei,onOpenChange:en,children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-lg",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:z("syncTitle")}),(0,t.jsx)(n.DialogDescription,{children:z("syncDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[0===ee.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-sm",children:z("syncEmpty")}):(0,t.jsx)(o.ScrollArea,{className:"max-h-72",children:(0,t.jsx)("div",{className:"space-y-1",children:ee.map(e=>{let s=`${e.agentId}::${e.skillName}`;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t,s;let a;return t=e.agentId,s=e.skillName,a=`${t}::${s}`,void ea(e=>{let t=new Set(e);return t.has(a)?t.delete(a):t.add(a),t})},className:"flex items-center gap-3 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors",children:[(0,t.jsx)("div",{className:(0,C.cn)("flex items-center justify-center size-4 rounded border shrink-0",es.has(s)?"bg-primary border-primary text-primary-foreground":"border-input")}),(0,t.jsx)(x.AgentIcon,{agentId:e.agentId,name:e.agentName,className:"size-5 rounded-full"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.agentName}),(0,t.jsxs)("span",{className:"text-muted-foreground text-xs shrink-0",children:[e.skillName,".md"]})]},s)})})}),ee.length>0&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>en(!1),children:D("cancel")}),(0,t.jsx)(l.Button,{onClick:eg,disabled:0===es.size,children:z("syncConfirm")})]})]})]})})]})}])},678001,e=>{e.v(t=>Promise.all(["static/chunks/0vesz93a98px4.js"].map(t=>e.l(t))).then(()=>t(228394)))},863812,e=>{e.v(t=>Promise.all(["static/chunks/168ojsxhm7ypc.js"].map(t=>e.l(t))).then(()=>t(158480)))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,799543,(e,t,n)=>{t.exports=e.r(233331)},953700,e=>{"use strict";let t=(0,e.i(433721).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],953700)},137340,288556,e=>{"use strict";let t=(0,e.i(433721).default)("trash-2",[["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"}]]);e.s(["default",0,t],288556),e.s(["Trash2",0,t],137340)},816709,e=>{"use strict";var t=e.i(764556);let n=e=>{let t,n=new Set,o=(e,o)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=o?o:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,i={setState:o,getState:r,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(o,r,i);return i},o=e=>{let o=e?n(e):n,r=e=>(function(e,n=e=>e){let o=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>n(e.getState()),[e,n]),t.default.useCallback(()=>n(e.getInitialState()),[e,n]));return t.default.useDebugValue(o),o})(o,e);return Object.assign(r,o),r};e.s(["create",0,e=>e?o(e):o],816709)},996652,e=>{"use strict";var t,n=e.i(344180);e.s([],739605),e.i(739605);var o=e.i(764556),r=e.i(166392),i=e.i(538501),a=e.i(427396),s=e.i(974578),l=e.i(389124),u=e.i(107164);e.i(8890);var d=e.i(267805);let c=o.createContext(void 0);function p(e){let t=o.useContext(c);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var g=e.i(106206),f=e.i(493696),h=e.i(332976),S=e.i(232449),v=e.i(549154),m=e.i(130522),C=e.i(742665),x=e.i(695011),R=e.i(561213),y=e.i(576487);let b={...x.popupStoreSelectors,disabled:(0,h.createSelector)(e=>e.disabled),instantType:(0,h.createSelector)(e=>e.instantType),openMethod:(0,h.createSelector)(e=>e.openMethod),openChangeReason:(0,h.createSelector)(e=>e.openChangeReason),modal:(0,h.createSelector)(e=>e.modal),focusManagerModal:(0,h.createSelector)(e=>e.focusManagerModal),stickIfOpen:(0,h.createSelector)(e=>e.stickIfOpen),titleElementId:(0,h.createSelector)(e=>e.titleElementId),descriptionElementId:(0,h.createSelector)(e=>e.descriptionElementId),openOnHover:(0,h.createSelector)(e=>e.openOnHover),closeDelay:(0,h.createSelector)(e=>e.closeDelay),hasViewport:(0,h.createSelector)(e=>e.hasViewport)};class O extends f.ReactStore{constructor(e){const t={...(0,x.createInitialPopupStoreState)(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:o.createRef(),backdropRef:o.createRef(),internalBackdropRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:o.createRef(),beforeContentFocusGuardRef:o.createRef(),stickIfOpenTimeout:new S.Timeout,triggerElements:new R.PopupTriggerMap},b)}setOpen=(e,t)=>{let n=t.reason===C.REASONS.triggerHover,o=t.reason===C.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===C.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let i=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(y.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),g.flushSync(i)):i(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===C.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,v.useRefWithInit)(()=>new O(t)).current,o=e??n;return(0,m.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var E=e.i(602453),T=e.i(279501),P=e.i(564846);function I({props:e}){let{children:t,open:d,defaultOpen:p=!1,onOpenChange:g,onOpenChangeComplete:f,modal:h=!1,handle:S,triggerId:v,defaultTriggerId:m=null}=e,x=O.useStore(S?.store,{modal:h,open:p,openProp:d,activeTriggerId:m,triggerIdProp:v});(0,r.useOnFirstRender)(()=>{void 0===d&&!1===x.state.open&&!0===p&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp("openProp",d),x.useControlledProp("triggerIdProp",v);let R=x.useState("open"),y=x.useState("payload");x.useContextCallback("onOpenChange",g),x.useContextCallback("onOpenChangeComplete",f);let{openMethod:b,triggerProps:M}=(0,P.useOpenInteractionType)(R);(0,T.useImplicitActiveTrigger)(x);let{forceUnmount:w}=(0,T.useOpenStateTransitions)(R,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});o.useEffect(()=>{R||x.context.stickIfOpenTimeout.clear()},[x,R]);let k=o.useCallback(()=>{x.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.imperativeAction))},[x]);o.useImperativeHandle(e.actionsRef,()=>({unmount:w,close:k}),[w,k]);let A=(0,u.useSyncedFloatingRootContext)({popupStore:x,onOpenChange:x.setOpen}),j=(0,i.useDismiss)(A,{outsidePressEvent:{mouse:"trap-focus"===h?"sloppy":"intentional",touch:"sloppy"}}),D=(0,s.useRole)(A),{getReferenceProps:F,getFloatingProps:N,getTriggerProps:H}=(0,a.useInteractions)([j,D]),V=o.useMemo(()=>F(M),[F,M]),L=o.useMemo(()=>H(M),[H,M]),B=o.useMemo(()=>N(),[N]);x.useSyncedValues({modal:h,openMethod:b,activeTriggerProps:V,inactiveTriggerProps:L,popupProps:B,floatingRootContext:A,nested:null!=(0,l.useFloatingParentNodeId)()});let z=o.useMemo(()=>({store:x}),[x]);return(0,n.jsx)(c.Provider,{value:z,children:"function"==typeof t?t({payload:y}):t})}var M=e.i(931709),w=e.i(817955),k=e.i(969490),A=e.i(499198),j=e.i(934940),D=e.i(480283),F=e.i(139236),N=e.i(601957),H=e.i(660079);let V=o.forwardRef(function(e,t){let{render:r,className:i,disabled:s=!1,nativeButton:l=!0,handle:u,payload:c,openOnHover:g=!1,delay:f=300,closeDelay:h=0,id:S,style:v,...m}=e,x=p(!0),R=u?.store??x?.store;if(!R)throw Error((0,d.default)(74));let b=(0,F.useBaseUiId)(S),O=R.useState("isTriggerActive",b),E=R.useState("floatingRootContext"),P=R.useState("isOpenedByTrigger",b),I=o.useRef(null),{registerTrigger:V,isMountedByThisTrigger:L}=(0,T.useTriggerDataForwarding)(b,I,R,{payload:c,disabled:s,openOnHover:g,closeDelay:h}),B=R.useState("openChangeReason"),z=R.useState("stickIfOpen"),U=R.useState("openMethod"),G=R.useState("focusManagerModal"),_=(0,D.useHoverReferenceInteraction)(E,{enabled:null!=E&&g&&("touch"!==U||B!==C.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,A.safePolygon)(),restMs:f,delay:{close:h},triggerElementRef:I,isActiveTrigger:O,isClosing:()=>"ending"===R.select("transitionStatus")}),K=(0,j.useClick)(E,{enabled:null!=E,stickIfOpen:z}),W=(0,a.useInteractions)([K]),X=R.useState("triggerProps",L),{getButtonProps:Y,buttonRef:q}=(0,M.useButton)({disabled:s,native:l}),J=o.useMemo(()=>({open:e=>e&&B===C.REASONS.triggerPress?w.pressableTriggerOpenStateMapping.open(e):w.triggerOpenStateMapping.open(e)}),[B]),Q=(0,k.useRenderElement)("button",e,{state:{disabled:s,open:P},ref:[q,t,V,I],props:[W.getReferenceProps(),_,X,{[y.CLICK_TRIGGER_IDENTIFIER]:"",id:b},m,Y],stateAttributesMapping:J}),{preFocusGuardRef:Z,handlePreFocusGuardFocus:$,handleFocusTargetFocus:ee}=(0,H.useTriggerFocusGuards)(R,I);return O&&!G?(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(N.FocusGuard,{ref:Z,onFocus:$}),(0,n.jsx)(o.Fragment,{children:Q},b),(0,n.jsx)(N.FocusGuard,{ref:R.context.triggerFocusTargetRef,onFocus:ee})]}):(0,n.jsx)(o.Fragment,{children:Q},b)});var L=e.i(128108);let B=o.createContext(void 0),z=o.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=p();return i.useState("mounted")||o?(0,n.jsx)(B.Provider,{value:o,children:(0,n.jsx)(L.FloatingPortal,{ref:t,...r})}):null});var U=e.i(677822),G=e.i(277642);let _=o.createContext(void 0);function K(){let e=o.useContext(_);if(!e)throw Error((0,d.default)(46));return e}var W=e.i(576557),X=e.i(251817),Y=e.i(427708),q=e.i(909852),J=e.i(263635),Q=e.i(900587);let Z=o.forwardRef(function(e,t){let{render:r,className:i,anchor:a,positionMethod:s="absolute",side:u="bottom",align:c="center",sideOffset:g=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:S=5,arrowPadding:v=5,sticky:m=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=y.POPUP_COLLISION_AVOIDANCE,style:b,...O}=e,{store:E}=p(),T=function(){let e=o.useContext(B);if(void 0===e)throw Error((0,d.default)(45));return e}(),P=(0,l.useFloatingNodeId)(),I=E.useState("floatingRootContext"),M=E.useState("mounted"),w=E.useState("open"),k=E.useState("openChangeReason"),A=E.useState("activeTriggerElement"),j=E.useState("modal"),D=E.useState("openMethod"),F=E.useState("positionerElement"),N=E.useState("instantType"),H=E.useState("transitionStatus"),V=E.useState("hasViewport"),L=o.useRef(null),z=(0,Y.useAnimationsFinished)(F,!1,!1),K=(0,W.useAnchorPositioning)({anchor:a,floatingRootContext:I,positionMethod:s,mounted:M,side:u,sideOffset:g,align:c,alignOffset:f,arrowPadding:v,collisionBoundary:h,collisionPadding:S,sticky:m,disableAnchorTracking:x,keepMounted:T,nodeId:P,collisionAvoidance:R,adaptiveOrigin:V?q.adaptiveOrigin:void 0}),Z=I.useState("domReferenceElement");(0,G.useIsoLayoutEffect)(()=>{let e=L.current;if(Z&&(L.current=Z),e&&Z&&Z!==e){E.set("instantType",void 0);let e=new AbortController;return z(()=>{E.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Z,z,E]);let $={open:w,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:N};(0,Q.useAnchoredPopupScrollLock)(w&&!0===j&&k!==C.REASONS.triggerHover,"touch"===D,F,A);let ee=o.useCallback(e=>{E.set("positionerElement",e)},[E]),et=(0,J.usePositioner)(e,$,{styles:K.positionerStyles,transitionStatus:H,props:O,refs:[t,ee],hidden:!M,inert:!w});return(0,n.jsxs)(_.Provider,{value:K,children:[M&&!0===j&&k!==C.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:E.context.internalBackdropRef,inert:(0,U.inertValue)(!w),cutout:A}),(0,n.jsx)(l.FloatingNode,{id:P,children:et})]})});var $=e.i(92615),ee=e.i(583289),et=e.i(795914),en=e.i(282458),eo=e.i(273598),er=e.i(100229),ei=e.i(971109),ea=e.i(328657),es=e.i(29905);let el=o.createContext(void 0);function eu(e){let{value:t,children:o}=e;return(0,n.jsx)(el.Provider,{value:t,children:o})}let ed={...w.popupStateMapping,...en.transitionStatusMapping},ec=o.forwardRef(function(e,t){let{className:r,render:i,initialFocus:a,finalFocus:s,style:l,...u}=e,{store:d}=p(),c=K(),g=null!=(0,ei.useToolbarRootContext)(!0),{context:f,hasClosePart:h}=function(){let[e,t]=o.useState(0),n=(0,es.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:o.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=d.useState("open"),v=d.useState("openMethod"),m=d.useState("instantType"),x=d.useState("transitionStatus"),R=d.useState("popupProps"),y=d.useState("titleElementId"),b=d.useState("descriptionElementId"),O=d.useState("modal"),E=d.useState("mounted"),T=d.useState("openChangeReason"),P=d.useState("activeTriggerElement"),I=d.useState("floatingRootContext");(0,eo.useOpenChangeComplete)({open:S,ref:d.context.popupRef,onComplete(){S&&d.context.onOpenChangeComplete?.(!0)}});let M=d.useState("disabled"),w=d.useState("openOnHover"),A=d.useState("closeDelay");(0,et.useHoverFloatingInteraction)(I,{enabled:w&&!M,closeDelay:A});let j=void 0===a?function(e){return"touch"!==e||d.context.popupRef.current}:a,D={open:S,side:c.side,align:c.align,instant:m,transitionStatus:x},F=!1!==O&&h;d.useSyncedValue("focusManagerModal",F);let N=o.useCallback(e=>{d.set("popupElement",e)},[d]),H=(0,k.useRenderElement)("div",e,{state:D,ref:[t,d.context.popupRef,N],props:[R,{"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){g&&er.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ea.getDisabledMountTransitionStyles)(x),u],stateAttributesMapping:ed});return(0,n.jsx)(ee.FloatingFocusManager,{context:I,openInteractionType:v,modal:F,disabled:!E||T===C.REASONS.triggerHover,initialFocus:j,returnFocus:s,restoreFocus:"popup",previousFocusableElement:(0,$.isHTMLElement)(P)?P:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:(0,n.jsx)(eu,{value:f,children:H})})}),ep=o.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,{store:a}=p(),s=a.useState("open"),{arrowRef:l,side:u,align:d,arrowUncentered:c,arrowStyles:g}=K();return(0,k.useRenderElement)("div",e,{state:{open:s,side:u,align:d,uncentered:c},ref:[t,l],props:[{style:g,"aria-hidden":!0},i],stateAttributesMapping:w.popupStateMapping})}),eg={...w.popupStateMapping,...en.transitionStatusMapping},ef=o.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,{store:a}=p(),s=a.useState("open"),l=a.useState("mounted"),u=a.useState("transitionStatus"),d=a.useState("openChangeReason");return(0,k.useRenderElement)("div",e,{state:{open:s,transitionStatus:u},ref:[a.context.backdropRef,t],props:[{role:"presentation",hidden:!l,style:{pointerEvents:d===C.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:eg})}),eh=o.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:a}=p(),s=(0,F.useBaseUiId)(i.id);return(0,G.useIsoLayoutEffect)(()=>(a.set("titleElementId",s),()=>{a.set("titleElementId",void 0)}),[a,s]),(0,k.useRenderElement)("h2",e,{ref:t,props:[{id:s},i]})}),eS=o.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:a}=p(),s=(0,F.useBaseUiId)(i.id);return(0,G.useIsoLayoutEffect)(()=>(a.set("descriptionElementId",s),()=>{a.set("descriptionElementId",void 0)}),[a,s]),(0,k.useRenderElement)("p",e,{ref:t,props:[{id:s},i]})}),ev=o.forwardRef(function(e,t){let n,{render:r,className:i,disabled:a=!1,nativeButton:s=!0,style:l,...u}=e,{buttonRef:d,getButtonProps:c}=(0,M.useButton)({disabled:a,focusableWhenDisabled:!1,native:s}),{store:g}=p();return n=o.useContext(el),(0,G.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,k.useRenderElement)("button",e,{ref:[t,d],props:[{onClick(e){g.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.closePress,e.nativeEvent,e.currentTarget))}},u,c]})}),em=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eC=e.i(3310);let ex={activationDirection:e=>e?{"data-activation-direction":e}:null},eR=o.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...a}=e,{store:s}=p(),{side:l}=K(),u=s.useState("instantType"),{children:d,state:c}=(0,eC.usePopupViewport)({store:s,side:l,cssVars:em,children:i}),g={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:u};return(0,k.useRenderElement)("div",e,{state:g,ref:t,props:[a,{children:d}],stateAttributesMapping:ex})});class ey{constructor(){this.store=new O}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,d.default)(80,e));this.store.setOpen(!0,(0,E.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ep,"Backdrop",0,ef,"Close",0,ev,"Description",0,eS,"Handle",0,ey,"Popup",0,ec,"Portal",0,z,"Positioner",0,Z,"Root",0,function(e){return p(!0)?(0,n.jsx)(I,{props:e}):(0,n.jsx)(l.FloatingTree,{children:(0,n.jsx)(I,{props:e})})},"Title",0,eh,"Trigger",0,V,"Viewport",0,eR,"createHandle",0,function(){return new ey}],631858);var eb=e.i(631858),eb=eb,eO=e.i(465458);e.s(["Popover",0,function({...e}){return(0,n.jsx)(eb.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:o=0,side:r="bottom",sideOffset:i=4,...a}){return(0,n.jsx)(eb.Portal,{children:(0,n.jsx)(eb.Positioner,{align:t,alignOffset:o,side:r,sideOffset:i,className:"isolate z-50",children:(0,n.jsx)(eb.Popup,{"data-slot":"popover-content",className:(0,eO.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eb.Trigger,{"data-slot":"popover-trigger",...e})}],996652)},144988,e=>{"use strict";let t=(0,e.i(433721).default)("file",[["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"}]]);e.s(["default",0,t])},601039,e=>{"use strict";let t=(0,e.i(433721).default)("refresh-cw",[["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"}]]);e.s(["RefreshCw",0,t],601039)},842809,203922,e=>{"use strict";let t=new Map;function n(e,n,o){return null==e?"":(function(e,n){let o=JSON.stringify({locale:e,options:n}),r=t.get(o);if(r)return r;let i=new Intl.NumberFormat(e,n);return t.set(o,i),i})(n,o).format(e)}e.s(["formatNumber",0,n,"formatNumberValue",0,function(e,t,o){return null==e?"":o?n(e,t,o):n(e/100,t,{style:"percent"})}],842809),e.s(["valueToPercent",0,function(e,t,n){return(e-t)*100/(n-t)}],203922)},817854,e=>{"use strict";var t=e.i(344180),n=e.i(465458);e.s(["Label",0,function({className:e,...o}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...o})}])},935002,514312,641294,61895,278282,475162,827187,213761,e=>{"use strict";e.s([],935002),e.i(8890);var t,n=e.i(764556),o=e.i(155461),r=e.i(166392),i=e.i(277642),a=e.i(267805);let s=n.createContext(void 0);function l(e){let t=n.useContext(s);if(void 0===t&&!e)throw Error((0,a.default)(72));return t}e.s(["TooltipRootContext",0,s,"useTooltipRootContext",0,l],514312);var u=e.i(92615),d=e.i(422561),c=e.i(29905),p=e.i(410421),g=e.i(150129);function f(e){return null!=e&&null!=e.clientX}var h=e.i(538501),S=e.i(427396),v=e.i(602453),m=e.i(279501),C=e.i(106206),x=e.i(332976),R=e.i(493696),y=e.i(549154),b=e.i(107164),O=e.i(742665),E=e.i(695011),T=e.i(561213);let P={...E.popupStoreSelectors,disabled:(0,x.createSelector)(e=>e.disabled),instantType:(0,x.createSelector)(e=>e.instantType),isInstantPhase:(0,x.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,x.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,x.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,x.createSelector)(e=>e.openChangeReason),closeOnClick:(0,x.createSelector)(e=>e.closeOnClick),closeDelay:(0,x.createSelector)(e=>e.closeDelay),hasViewport:(0,x.createSelector)(e=>e.hasViewport)};class I extends R.ReactStore{constructor(e){super({...(0,E.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new T.PopupTriggerMap},P)}setOpen=(e,t)=>{let n=t.reason,o=n===O.REASONS.triggerHover,r=e&&n===O.REASONS.triggerFocus,i=!e&&(n===O.REASONS.triggerPress||n===O.REASONS.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a=()=>{let o={open:e,openChangeReason:n};r?o.instantType="focus":i?o.instantType="dismiss":n===O.REASONS.triggerHover&&(o.instantType=void 0);let a=t.trigger?.id??null;(a||e)&&(o.activeTriggerId=a,o.activeTriggerElement=t.trigger??null),this.update(o)};o?C.flushSync(a):a()};static useStore(e,t){let n=(0,y.useRefWithInit)(()=>new I(t)).current,o=e??n,r=(0,b.useSyncedFloatingRootContext)({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=r,o}}e.s(["TooltipStore",0,I],641294);var M=e.i(344180);let w=(0,o.fastComponent)(function(e){let{disabled:t=!1,defaultOpen:o=!1,open:a,disableHoverablePopup:l=!1,trackCursorAxis:C="none",actionsRef:x,onOpenChange:R,onOpenChangeComplete:y,handle:b,triggerId:E,defaultTriggerId:T=null,children:P}=e,w=I.useStore(b?.store,{open:o,openProp:a,activeTriggerId:T,triggerIdProp:E});(0,r.useOnFirstRender)(()=>{void 0===a&&!1===w.state.open&&!0===o&&w.update({open:!0,activeTriggerId:T})}),w.useControlledProp("openProp",a),w.useControlledProp("triggerIdProp",E),w.useContextCallback("onOpenChange",R),w.useContextCallback("onOpenChangeComplete",y);let k=w.useState("open"),A=!t&&k,j=w.useState("activeTriggerId"),D=w.useState("payload");w.useSyncedValues({trackCursorAxis:C,disableHoverablePopup:l}),(0,i.useIsoLayoutEffect)(()=>{k&&t&&w.setOpen(!1,(0,v.createChangeEventDetails)(O.REASONS.disabled))},[k,t,w]),w.useSyncedValue("disabled",t),(0,m.useImplicitActiveTrigger)(w);let{forceUnmount:F,transitionStatus:N}=(0,m.useOpenStateTransitions)(A,w),H=w.select("floatingRootContext"),V=w.useState("isInstantPhase"),L=w.useState("instantType"),B=w.useState("lastOpenChangeReason"),z=n.useRef(null);(0,i.useIsoLayoutEffect)(()=>{"ending"===N&&B===O.REASONS.none||"ending"!==N&&V?("delay"!==L&&(z.current=L),w.set("instantType","delay")):null!==z.current&&(w.set("instantType",z.current),z.current=null)},[N,V,B,L,w]),(0,i.useIsoLayoutEffect)(()=>{A&&null==j&&w.set("payload",void 0)},[w,j,A]);let U=n.useCallback(()=>{w.setOpen(!1,(0,v.createChangeEventDetails)(O.REASONS.imperativeAction))},[w]);n.useImperativeHandle(x,()=>({unmount:F,close:U}),[F,U]);let G=(0,h.useDismiss)(H,{enabled:!t,referencePress:()=>w.select("closeOnClick")}),_=function(e,t={}){let o="rootStore"in e?e.rootStore:e,r=o.useState("open"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),s=o.context.dataRef,{enabled:l=!0,axis:h="both"}=t,S=n.useRef(!1),v=n.useRef(null),[m,C]=n.useState(),[x,R]=n.useState([]),y=(0,c.useStableCallback)((e,t,n)=>{if(!S.current&&(!s.current.openEvent||f(s.current.openEvent))){var r,i;let l,u,d;o.set("positionReference",(r=n??a,i={x:e,y:t,axis:h,dataRef:s,pointerType:m},l=null,u=null,d=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===i.axis||"both"===i.axis,n="y"===i.axis||"both"===i.axis,o=["mouseenter","mousemove"].includes(i.dataRef.current.openEvent?.type||"")&&"touch"!==i.pointerType,a=e.width,s=e.height,c=e.x,p=e.y;return null==l&&i.x&&t&&(l=e.x-i.x),null==u&&i.y&&n&&(u=e.y-i.y),c-=l||0,p-=u||0,a=0,s=0,!d||o?(a="y"===i.axis?e.width:0,s="x"===i.axis?e.height:0,c=t&&null!=i.x?i.x:c,p=n&&null!=i.y?i.y:p):d&&!o&&(s="x"===i.axis?e.height:s,a="y"===i.axis?e.width:a),d=!0,{width:a,height:s,x:c,y:p,top:p,right:c+a,bottom:p+s,left:c}}}))}}),b=(0,c.useStableCallback)(e=>{r?v.current||R([]):y(e.clientX,e.clientY,e.currentTarget)}),O=(0,g.isMouseLikePointerType)(m)?i:r,E=n.useCallback(()=>{if(!O||!l)return;let e=(0,u.getWindow)(i);if(!s.current.openEvent||f(s.current.openEvent))return v.current=(0,d.addEventListener)(e,"mousemove",function(e){let t=(0,p.getTarget)(e);(0,p.contains)(i,t)?(v.current?.(),v.current=null):y(e.clientX,e.clientY)}),()=>{v.current?.(),v.current=null};o.set("positionReference",a)},[O,l,i,s,a,o,y]);n.useEffect(()=>E(),[E,x]),n.useEffect(()=>{l&&!i&&(S.current=!1)},[l,i]),n.useEffect(()=>{!l&&r&&(S.current=!0)},[l,r]);let T=n.useMemo(()=>{function e(e){C(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:b,onMouseEnter:b}},[b]);return n.useMemo(()=>l?{reference:T,trigger:T}:{},[l,T])}(H,{enabled:!t&&"none"!==C,axis:"none"===C?void 0:C}),{getReferenceProps:K,getFloatingProps:W,getTriggerProps:X}=(0,S.useInteractions)([G,_]),Y=n.useMemo(()=>K(),[K]),q=n.useMemo(()=>X(),[X]),J=n.useMemo(()=>W(),[W]);return w.useSyncedValues({activeTriggerProps:Y,inactiveTriggerProps:q,popupProps:J}),(0,M.jsx)(s.Provider,{value:w,children:"function"==typeof P?P({payload:D}):P})});e.s(["TooltipRoot",0,w],61895);var k=e.i(817955),A=e.i(969490),j=e.i(139236);let D=n.createContext(void 0);function F(){return n.useContext(D)}e.s(["TooltipProviderContext",0,D,"useTooltipProviderContext",0,F],278282);var N=e.i(499198),H=e.i(232449),V=e.i(49863);let L=n.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new H.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function B(e,t={open:!1}){let o="rootStore"in e?e.rootStore:e,r=o.useState("floatingId"),{open:a}=t,{currentIdRef:s,delayRef:l,timeoutMs:u,initialDelayRef:d,currentContextRef:c,hasProvider:p,timeout:g}=n.useContext(L),[f,h]=n.useState(!1);return(0,i.useIsoLayoutEffect)(()=>{function e(){h(!1),c.current?.setIsInstantPhase(!1),s.current=null,c.current=null,l.current=d.current}if(s.current&&!a&&s.current===r){if(h(!1),u)return g.start(u,()=>{o.select("open")||s.current&&s.current!==r||e()}),()=>{g.clear()};e()}},[a,r,s,l,u,d,c,g,o]),(0,i.useIsoLayoutEffect)(()=>{if(!a)return;let e=c.current,t=s.current;g.clear(),c.current={onOpenChange:o.setOpen,setIsInstantPhase:h},s.current=r,l.current={open:0,close:(0,V.getDelay)(d.current,"close")},null!==t&&t!==r?(h(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,v.createChangeEventDetails)(O.REASONS.none))):(h(!1),e?.setIsInstantPhase(!1))},[a,r,o,s,l,u,d,c,g]),(0,i.useIsoLayoutEffect)(()=>()=>{c.current=null},[c]),n.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:f}),[p,l,f])}e.s(["FloatingDelayGroup",0,function(e){let{children:t,delay:o,timeoutMs:r=0}=e,i=n.useRef(o),a=n.useRef(o),s=n.useRef(null),l=n.useRef(null),u=(0,H.useTimeout)();return(0,M.jsx)(L.Provider,{value:n.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:s,timeoutMs:r,currentContextRef:l,timeout:u}),[r,u]),children:t})},"useDelayGroup",0,B],475162);var z=e.i(604921),U=e.i(480283);let G=((t={})[t.popupOpen=k.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t),_=(0,o.fastComponentRef)(function(e,t){let{className:o,render:r,handle:i,payload:s,disabled:u,delay:d,closeOnClick:c=!0,closeDelay:p,id:g,style:f,...h}=e,S=l(!0),v=i?.store??S;if(!v)throw Error((0,a.default)(82));let C=(0,j.useBaseUiId)(g),x=v.useState("isTriggerActive",C),R=v.useState("isOpenedByTrigger",C),y=v.useState("floatingRootContext"),b=n.useRef(null),O=d??600,E=p??0,{registerTrigger:T,isMountedByThisTrigger:P}=(0,m.useTriggerDataForwarding)(C,b,v,{payload:s,closeOnClick:c,closeDelay:E}),I=F(),{delayRef:M,isInstantPhase:w,hasProvider:D}=B(y,{open:R});v.useSyncedValue("isInstantPhase",w);let H=v.useState("disabled"),V=u??H,L=v.useState("trackCursorAxis"),_=v.useState("disableHoverablePopup"),K=(0,U.useHoverReferenceInteraction)(y,{enabled:!V,mouseOnly:!0,move:!1,handleClose:_||"both"===L?null:(0,N.safePolygon)(),restMs(){let e=I?.delay,t="object"==typeof M.current?M.current.open:void 0,n=O;return D&&(n=0!==t?d??e??O:0),n},delay(){let e="object"==typeof M.current?M.current.close:void 0,t=E;return null==p&&D&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:x,isClosing:()=>"ending"===v.select("transitionStatus")}),W=(0,z.useFocus)(y,{enabled:!V}).reference,X=v.useState("triggerProps",P);return(0,A.useRenderElement)("button",e,{state:{open:R},ref:[t,T,b],props:[K,W,X,{onPointerDown(){v.set("closeOnClick",c)},id:C,[G.triggerDisabled]:V?"":void 0},h],stateAttributesMapping:k.triggerOpenStateMapping})});e.s(["TooltipTrigger",0,_],827187);let K=n.createContext(void 0);e.s(["TooltipPortalContext",0,K,"useTooltipPortalContext",0,function(){let e=n.useContext(K);if(void 0===e)throw Error((0,a.default)(70));return e}],213761)},384389,e=>{"use strict";var t=e.i(764556),n=e.i(106206),o=e.i(128108),r=e.i(344180);let i=t.forwardRef(function(e,i){let{children:a,container:s,className:l,render:u,style:d,...c}=e,{portalNode:p,portalSubtree:g}=(0,o.useFloatingPortalNode)({container:s,ref:i,componentProps:e,elementProps:c});return g||p?(0,r.jsxs)(t.Fragment,{children:[g,p&&n.createPortal(a,p)]}):null});e.s(["FloatingPortalLite",0,i])},638322,e=>{"use strict";var t,n=e.i(344180);e.i(935002);var o=e.i(61895),r=e.i(827187);e.i(8890);var i=e.i(764556),a=e.i(514312),s=e.i(213761),l=e.i(384389);let u=i.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e;return(0,a.useTooltipRootContext)().useState("mounted")||o?(0,n.jsx)(s.TooltipPortalContext.Provider,{value:o,children:(0,n.jsx)(l.FloatingPortalLite,{ref:t,...r})}):null});var d=e.i(267805);let c=i.createContext(void 0);function p(){let e=i.useContext(c);if(void 0===e)throw Error((0,d.default)(71));return e}var g=e.i(576557),f=e.i(576487),h=e.i(909852),S=e.i(263635);let v=i.forwardRef(function(e,t){let{render:o,className:r,anchor:l,positionMethod:u="absolute",side:d="top",align:p="center",sideOffset:v=0,alignOffset:m=0,collisionBoundary:C="clipping-ancestors",collisionPadding:x=5,arrowPadding:R=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:O=f.POPUP_COLLISION_AVOIDANCE,style:E,...T}=e,P=(0,a.useTooltipRootContext)(),I=(0,s.useTooltipPortalContext)(),M=P.useState("open"),w=P.useState("mounted"),k=P.useState("trackCursorAxis"),A=P.useState("disableHoverablePopup"),j=P.useState("floatingRootContext"),D=P.useState("instantType"),F=P.useState("transitionStatus"),N=P.useState("hasViewport"),H=(0,g.useAnchorPositioning)({anchor:l,positionMethod:u,floatingRootContext:j,mounted:w,side:d,sideOffset:v,align:p,alignOffset:m,collisionBoundary:C,collisionPadding:x,sticky:y,arrowPadding:R,disableAnchorTracking:b,keepMounted:I,collisionAvoidance:O,adaptiveOrigin:N?h.adaptiveOrigin:void 0}),V=i.useMemo(()=>({open:M,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:"none"!==k?"tracking-cursor":D}),[M,H.side,H.align,H.anchorHidden,k,D]),L=(0,S.usePositioner)(e,V,{styles:H.positionerStyles,transitionStatus:F,props:T,refs:[t,P.useStateSetter("positionerElement")],hidden:!w,inert:!M||"both"===k||A});return(0,n.jsx)(c.Provider,{value:H,children:L})});var m=e.i(817955),C=e.i(282458),x=e.i(273598),R=e.i(969490),y=e.i(328657),b=e.i(795914);let O={...m.popupStateMapping,...C.transitionStatusMapping},E=i.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,s=(0,a.useTooltipRootContext)(),{side:l,align:u}=p(),d=s.useState("open"),c=s.useState("instantType"),g=s.useState("transitionStatus"),f=s.useState("popupProps"),h=s.useState("floatingRootContext");(0,x.useOpenChangeComplete)({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}});let S=s.useState("disabled"),v=s.useState("closeDelay");return(0,b.useHoverFloatingInteraction)(h,{enabled:!S,closeDelay:v}),(0,R.useRenderElement)("div",e,{state:{open:d,side:l,align:u,instant:c,transitionStatus:g},ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],props:[f,(0,y.getDisabledMountTransitionStyles)(g),i],stateAttributesMapping:O})}),T=i.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,s=(0,a.useTooltipRootContext)(),l=s.useState("open"),u=s.useState("instantType"),{arrowRef:d,side:c,align:g,arrowUncentered:f,arrowStyles:h}=p();return(0,R.useRenderElement)("div",e,{state:{open:l,side:c,align:g,uncentered:f,instant:u},ref:[t,d],props:[{style:h,"aria-hidden":!0},i],stateAttributesMapping:m.popupStateMapping})});var P=e.i(475162),I=e.i(278282);let M=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var w=e.i(3310);let k={activationDirection:e=>e?{"data-activation-direction":e}:null},A=i.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...s}=e,l=(0,a.useTooltipRootContext)(),u=p(),d=l.useState("instantType"),{children:c,state:g}=(0,w.usePopupViewport)({store:l,side:u.side,cssVars:M,children:i}),f={activationDirection:g.activationDirection,transitioning:g.transitioning,instant:d};return(0,R.useRenderElement)("div",e,{state:f,ref:t,props:[s,{children:c}],stateAttributesMapping:k})});var j=e.i(641294),D=e.i(602453),F=e.i(742665);class N{constructor(){this.store=new j.TooltipStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,d.default)(81,e));this.store.setOpen(!0,(0,D.createChangeEventDetails)(F.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,D.createChangeEventDetails)(F.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,T,"Handle",0,N,"Popup",0,E,"Portal",0,u,"Positioner",0,v,"Provider",0,function(e){let{delay:t,closeDelay:o,timeout:r=400}=e,a=i.useMemo(()=>({delay:t,closeDelay:o}),[t,o]),s=i.useMemo(()=>({open:t,close:o}),[t,o]);return(0,n.jsx)(I.TooltipProviderContext.Provider,{value:a,children:(0,n.jsx)(P.FloatingDelayGroup,{delay:s,timeoutMs:r,children:e.children})})},"Root",()=>o.TooltipRoot,"Trigger",()=>r.TooltipTrigger,"Viewport",0,A,"createHandle",0,function(){return new N}],638295);var H=e.i(638295),H=H,V=e.i(465458);e.s(["Tooltip",0,function({...e}){return(0,n.jsx)(H.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:o=4,align:r="center",alignOffset:i=0,children:a,...s}){return(0,n.jsx)(H.Portal,{children:(0,n.jsx)(H.Positioner,{align:r,alignOffset:i,side:t,sideOffset:o,className:"isolate z-50",children:(0,n.jsxs)(H.Popup,{"data-slot":"tooltip-content",className:(0,V.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s,children:[a,(0,n.jsx)(H.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,n.jsx)(H.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,n.jsx)(H.Trigger,{"data-slot":"tooltip-trigger",...e})}],638322)},226651,e=>{"use strict";let t=(0,e.i(433721).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])}]);