@burdenoff/microfe-vibecontrols 2026.527.1 → 2026.527.2

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.
@@ -1,36 +1,36 @@
1
1
  import { ConfirmDialog as e } from "../components/shared/ConfirmDialog.js";
2
- import { getQuotaDialogContent as t, isQuotaExhaustedError as n, markQuotaHandledLocally as r } from "../utils/quotaUtils.js";
3
- import { useCreateTargetMutation as ee, useDeleteTargetMutation as te, useGetInstallAgentJobStatusLazyQuery as ne, useInstallAgentOnTargetMutation as re, useListTargetsQuery as ie, useStartTerminalMutation as ae, useTestTargetMutation as oe, useUninstallAgentFromTargetMutation as se, useUpdateTargetMutation as ce } from "../generated/wspace-operations.js";
4
- import { useVibeControls as le, useVibeNavigate as ue } from "../providers/VibeControlsProvider.js";
5
- import de from "../hooks/useCachedInitialData.js";
6
- import { PageHeader as fe } from "../components/shared/PageHeader.js";
7
- import { EntityTagPicker as pe } from "../components/shared/EntityTagPicker.js";
8
- import { useDraftEntityTags as me } from "../hooks/useDraftEntityTags.js";
9
- import { isNative as he, nativeNotify as ge } from "../utils/nativeBridge.js";
10
- import { EmptyState as _e } from "../components/shared/EmptyState.js";
11
- import { SearchInput as ve } from "../components/shared/SearchInput.js";
12
- import { FilterDropdown as ye } from "../components/shared/FilterDropdown.js";
13
- import { AgentSetupBanner as be } from "../components/shared/AgentSetupBanner.js";
14
- import { GetHelpButton as xe } from "../components/shared/GetHelpButton.js";
15
- import { SearchableSelect as Se } from "../components/shared/SearchableSelect.js";
2
+ import { getQuotaDialogContent as t, isQuotaExhaustedError as n, markQuotaHandledLocally as ee } from "../utils/quotaUtils.js";
3
+ import { useCreateTargetMutation as te, useDeleteTargetMutation as ne, useGetInstallAgentJobStatusLazyQuery as re, useInstallAgentOnTargetMutation as ie, useListTargetsQuery as ae, useStartTerminalMutation as oe, useTestTargetMutation as se, useUninstallAgentFromTargetMutation as ce, useUpdateTargetMutation as le } from "../generated/wspace-operations.js";
4
+ import { useVibeControls as ue, useVibeNavigate as de } from "../providers/VibeControlsProvider.js";
5
+ import fe from "../hooks/useCachedInitialData.js";
6
+ import { PageHeader as pe } from "../components/shared/PageHeader.js";
7
+ import { EntityTagPicker as me } from "../components/shared/EntityTagPicker.js";
8
+ import { useDraftEntityTags as he } from "../hooks/useDraftEntityTags.js";
9
+ import { isNative as ge, nativeNotify as _e } from "../utils/nativeBridge.js";
10
+ import { EmptyState as ve } from "../components/shared/EmptyState.js";
11
+ import { SearchInput as ye } from "../components/shared/SearchInput.js";
12
+ import { FilterDropdown as be } from "../components/shared/FilterDropdown.js";
13
+ import { AgentSetupBanner as xe } from "../components/shared/AgentSetupBanner.js";
14
+ import { GetHelpButton as Se } from "../components/shared/GetHelpButton.js";
15
+ import { SearchableSelect as Ce } from "../components/shared/SearchableSelect.js";
16
16
  import "../components/shared/index.js";
17
- import { VIBE_PERMISSIONS as Ce } from "../constants/permissions.js";
18
- import { PageSkeleton as we } from "../components/shared/PageSkeleton.js";
19
- import { TargetCard as Te } from "../components/targets/TargetCard.js";
17
+ import { VIBE_PERMISSIONS as we } from "../constants/permissions.js";
18
+ import { PageSkeleton as Te } from "../components/shared/PageSkeleton.js";
19
+ import { TargetCard as Ee } from "../components/targets/TargetCard.js";
20
20
  import "../components/targets/index.js";
21
- import { useCallback as i, useEffect as Ee, useMemo as a, useState as o } from "react";
22
- import { useI18n as De } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { Check as Oe, CheckCircle as ke, CheckSquare as Ae, Grid as je, List as Me, Loader2 as Ne, Pencil as Pe, Plus as Fe, RefreshCw as Ie, Server as Le, Trash2 as Re, X as s, XCircle as ze, XSquare as Be } from "lucide-react";
24
- import { useSearchParams as Ve } from "react-router-dom";
25
- import { usePermissions as He } from "@burdenoff/fe-libs/shared/providers/shell";
26
- import { AnimatePresence as Ue } from "framer-motion";
27
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
28
- import { MotionItem as We, MotionList as Ge, MotionPage as Ke } from "@burdenoff/fe-libs/shared/motion";
21
+ import { useCallback as r, useEffect as De, useMemo as i, useState as a } from "react";
22
+ import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { Check as ke, CheckCircle as Ae, CheckSquare as je, Grid as Me, List as Ne, Loader2 as Pe, Pencil as Fe, Plus as Ie, RefreshCw as Le, Server as Re, Trash2 as ze, X as o, XCircle as Be, XSquare as Ve } from "lucide-react";
24
+ import { useSearchParams as He } from "react-router-dom";
25
+ import { usePermissions as Ue } from "@burdenoff/fe-libs/shared/providers/shell";
26
+ import { AnimatePresence as We } from "framer-motion";
27
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
28
+ import { MotionItem as Ge, MotionList as Ke, MotionPage as qe } from "@burdenoff/fe-libs/shared/motion";
29
29
  //#region src/pages/TargetsPage.tsx
30
- function qe(e) {
30
+ function Je(e) {
31
31
  return e === "connected" ? "connected" : e === "disconnected" ? "disconnected" : "unknown";
32
32
  }
33
- var Je = {
33
+ var Ye = {
34
34
  connect: "Connecting to server",
35
35
  detect_os: "Detecting OS",
36
36
  install_bun: "Installing Bun runtime",
@@ -40,26 +40,26 @@ var Je = {
40
40
  verify: "Verifying health",
41
41
  retrieve: "Retrieving agent details",
42
42
  register: "Registering with backend"
43
- }, Ye = {
43
+ }, Xe = {
44
44
  connected: { label: "Connected" },
45
45
  disconnected: { label: "Disconnected" },
46
46
  unknown: { label: "Unknown" }
47
- }, Xe = {
47
+ }, Ze = {
48
48
  DIRECT: "bg-action-primary-bg/10 text-action-primary-bg",
49
49
  SSH: "bg-status-success-bg-subtle text-status-success-text"
50
- }, Ze = {
50
+ }, Qe = {
51
51
  connected: "bg-status-success-bg-subtle text-status-success-text",
52
52
  disconnected: "bg-status-error-bg-subtle text-status-error-text",
53
53
  unknown: "bg-bg-sunken text-text-secondary"
54
54
  };
55
- function Qe(e) {
55
+ function $e(e) {
56
56
  return e.agents.length > 0;
57
57
  }
58
- function $e() {
59
- let { t: $e } = De(), { workspaceId: d } = le(), f = ue(), { hasPermission: et, isLoading: tt } = He(), [nt] = Ve(), p = nt.get("selectedTargetId"), [m, rt] = o(""), [h, it] = o(null), [g, at] = o("all"), [_, ot] = o("all"), [st, ct] = o("grid"), [lt, v] = o(!1), [y, b] = o(null), [ut, dt] = o(!1), [x, S] = o(/* @__PURE__ */ new Set()), [C, ft] = o(null), [pt, w] = o(!1), T = i((e, t) => {
60
- let n = $e(e);
58
+ function u() {
59
+ let { t: u } = Oe(), { workspaceId: d } = ue(), f = de(), { hasPermission: et, isLoading: tt } = Ue(), [nt] = He(), p = nt.get("selectedTargetId"), [m, rt] = a(""), [h, it] = a(null), [g, at] = a("all"), [_, ot] = a("all"), [st, ct] = a("grid"), [lt, v] = a(!1), [y, b] = a(null), [ut, dt] = a(!1), [x, S] = a(/* @__PURE__ */ new Set()), [C, w] = a(null), [ft, T] = a(!1), E = r((e, t) => {
60
+ let n = u(e);
61
61
  return n === e ? t : n;
62
- }, [$e]), [E, mt] = o(null), [D, ht] = o(null), [gt, _t] = o(null), [O, k] = o(null), [A, vt] = o(!1), [yt, j] = o(null), [M, bt] = o(""), [xt, St] = o(""), [Ct, wt] = o(""), [Tt, Et] = o(22), [Dt, Ot] = o(""), [N, P] = o("key"), [F, kt] = o(""), [I, At] = o(""), [L, jt] = o(""), [R, Mt] = o("DIRECT"), [z, Nt] = o(""), [B, Pt] = o(""), [V, Ft] = o(""), [H, It] = o(""), [U, Lt] = o(22), [W, Rt] = o(""), [G, zt] = o("key"), [Bt, Vt] = o(""), [Ht, Ut] = o(""), [Wt, Gt] = o(""), [K, Kt] = o(""), { data: qt, loading: q, refetch: J } = ie({
62
+ }, [u]), [D, pt] = a(null), [O, mt] = a(null), [ht, k] = a(null), [A, j] = a(null), [M, gt] = a(!1), [_t, N] = a(null), [P, vt] = a(""), [yt, bt] = a(""), [xt, St] = a(""), [Ct, wt] = a(22), [Tt, Et] = a(""), [F, Dt] = a("key"), [I, Ot] = a(""), [L, kt] = a(""), [R, At] = a(""), [z, jt] = a("DIRECT"), [B, Mt] = a(""), [V, Nt] = a(""), [H, Pt] = a(""), [U, Ft] = a(""), [It, Lt] = a(22), [W, Rt] = a(""), [G, zt] = a("key"), [Bt, Vt] = a(""), [Ht, Ut] = a(""), [Wt, Gt] = a(""), [K, Kt] = a(""), { data: qt, loading: q, refetch: J } = ae({
63
63
  variables: {
64
64
  workspaceId: d || "",
65
65
  limit: 50,
@@ -67,10 +67,10 @@ function $e() {
67
67
  },
68
68
  skip: !d,
69
69
  fetchPolicy: "cache-first"
70
- }), { agents: Jt, refetch: Yt } = de(), [Xt] = ee({
70
+ }), { agents: Jt, refetch: Yt } = fe(), [Xt] = te({
71
71
  refetchQueries: ["VibeControlsInitialData", "ListTargets"],
72
72
  awaitRefetchQueries: !0
73
- }), { setDraftTagIds: Zt, flushTags: Qt } = me("VIBECONTROLS_TARGET"), [$t] = ce(), [en] = oe(), [tn] = ae(), [Y] = te(), [nn] = re(), [rn] = se(), [an] = ne({ fetchPolicy: "network-only" }), X = a(() => (qt?.targets?.items ?? []).map((e) => ({
73
+ }), { setDraftTagIds: Zt, flushTags: Qt } = he("VIBECONTROLS_TARGET"), [$t] = le(), [en] = se(), [tn] = oe(), [Y] = ne(), [nn] = ie(), [rn] = ce(), [an] = re({ fetchPolicy: "network-only" }), X = i(() => (qt?.targets?.items ?? []).map((e) => ({
74
74
  id: e.id,
75
75
  type: e.type || "DIRECT",
76
76
  name: e.name,
@@ -78,7 +78,7 @@ function $e() {
78
78
  host: e.host || null,
79
79
  port: e.port || null,
80
80
  username: e.username || null,
81
- status: qe(e.status),
81
+ status: Je(e.status),
82
82
  connectionId: e.connectionId || null,
83
83
  tags: e.tags,
84
84
  metadata: e.metadata ?? null,
@@ -89,13 +89,13 @@ function $e() {
89
89
  version: e.version,
90
90
  isActive: e.isActive
91
91
  }))
92
- })), [qt]), Z = a(() => Jt.map((e) => ({
92
+ })), [qt]), Z = i(() => Jt.map((e) => ({
93
93
  id: e.id,
94
94
  name: e.name,
95
95
  isActive: e.isActive,
96
96
  tunnelUrl: e.tunnelUrl ?? null,
97
97
  agentApiKey: null
98
- })), [Jt]), Q = a(() => {
98
+ })), [Jt]), Q = i(() => {
99
99
  let e = X;
100
100
  if (m) {
101
101
  let t = m.toLowerCase();
@@ -109,7 +109,7 @@ function $e() {
109
109
  g,
110
110
  _
111
111
  ]);
112
- Ee(() => {
112
+ De(() => {
113
113
  if (!p || !Q.find((e) => e.id === p)) return;
114
114
  let e = window.setTimeout(() => {
115
115
  document.getElementById(`target-row-${p}`)?.scrollIntoView({
@@ -120,16 +120,16 @@ function $e() {
120
120
  return () => window.clearTimeout(e);
121
121
  }, [Q, p]);
122
122
  let on = X.filter((e) => e.status === "connected").length, sn = Q.length > 0 && Q.every((e) => x.has(e.id)), cn = x.size > 0;
123
- Ee(() => {
124
- if (!gt || !E) return;
123
+ De(() => {
124
+ if (!ht || !D) return;
125
125
  let e = !1, t = () => {
126
126
  an({ variables: {
127
- targetId: E.id,
128
- jobId: gt
127
+ targetId: D.id,
128
+ jobId: ht
129
129
  } }).then((t) => {
130
130
  if (e) return;
131
131
  let n = t.data?.installAgentJobStatus;
132
- n && (n.steps ||= [], ht({
132
+ n && (n.steps ||= [], mt({
133
133
  id: n.jobId,
134
134
  status: n.status,
135
135
  currentStep: n.currentStep ?? 0,
@@ -145,83 +145,100 @@ function $e() {
145
145
  e = !0, clearInterval(n);
146
146
  };
147
147
  }, [
148
- gt,
149
- E,
148
+ ht,
149
+ D,
150
150
  an,
151
151
  J
152
152
  ]);
153
- let ln = i(async () => {
154
- if (!(!z || !d) && !(R !== "DIRECT" && (!V || !H || !W))) try {
155
- let e = (await Xt({ variables: {
153
+ let ln = r(async () => {
154
+ if (!(!B || !d) && !(z !== "DIRECT" && (!H || !U || !W))) try {
155
+ let e = await Xt({ variables: {
156
156
  workspaceId: d,
157
157
  input: {
158
- type: R,
159
- name: z,
160
- sourceAgentId: R === "DIRECT" ? void 0 : V,
161
- host: R === "DIRECT" ? void 0 : H,
162
- port: R === "DIRECT" ? void 0 : U,
163
- username: R === "DIRECT" ? void 0 : W,
164
- password: R === "SSH" && G === "password" ? Bt : void 0,
165
- privateKeyPath: R === "SSH" && G === "key" ? Ht : void 0,
158
+ type: z,
159
+ name: B,
160
+ sourceAgentId: z === "DIRECT" ? void 0 : H,
161
+ host: z === "DIRECT" ? void 0 : U,
162
+ port: z === "DIRECT" ? void 0 : It,
163
+ username: z === "DIRECT" ? void 0 : W,
164
+ password: z === "SSH" && G === "password" ? Bt : void 0,
165
+ privateKeyPath: z === "SSH" && G === "key" ? Ht : void 0,
166
166
  label: Wt || void 0,
167
167
  tags: K ? K.split(",").map((e) => e.trim()) : void 0,
168
- metadata: B ? { description: B } : void 0
168
+ metadata: V ? { description: V } : void 0
169
+ }
170
+ } });
171
+ if (e.error) {
172
+ if (n(e.error)) {
173
+ v(!1), T(!0);
174
+ return;
169
175
  }
170
- } })).data?.createTarget?.id;
171
- v(!1), Nt(""), It(""), Rt(""), Vt(""), Ut(""), Gt(""), Kt(""), e && await Qt(e), J(), Yt();
176
+ w({
177
+ id: "create",
178
+ success: !1,
179
+ message: e.error.message || "Failed to create target"
180
+ }), setTimeout(() => w(null), 5e3);
181
+ return;
182
+ }
183
+ let t = e.data?.createTarget?.id;
184
+ v(!1), Mt(""), Ft(""), Rt(""), Vt(""), Ut(""), Gt(""), Kt(""), t && await Qt(t), J(), Yt();
172
185
  } catch (e) {
173
186
  if (n(e)) {
174
- v(!1), r(), w(!0);
187
+ v(!1), ee(), T(!0);
175
188
  return;
176
189
  }
177
- throw e;
190
+ w({
191
+ id: "create",
192
+ success: !1,
193
+ message: e instanceof Error ? e.message : "Failed to create target"
194
+ }), setTimeout(() => w(null), 5e3);
178
195
  }
179
196
  }, [
180
- z,
181
- V,
197
+ B,
182
198
  H,
183
199
  U,
200
+ It,
184
201
  W,
185
202
  G,
186
203
  Bt,
187
204
  Ht,
188
205
  Wt,
189
206
  K,
190
- B,
191
- R,
207
+ V,
208
+ z,
192
209
  d,
193
210
  Xt,
194
211
  Qt,
195
212
  J
196
- ]), un = i(async (e) => {
213
+ ]), un = r(async (e) => {
197
214
  let t = (await en({ variables: { id: e } })).data?.testTarget;
198
- t && (ft({
215
+ t && (w({
199
216
  id: e,
200
217
  success: t.success,
201
218
  message: t.message || ""
202
- }), setTimeout(() => ft(null), 5e3), J());
203
- }, [en, J]), dn = i(async (e) => {
219
+ }), setTimeout(() => w(null), 5e3), J());
220
+ }, [en, J]), dn = r(async (e) => {
204
221
  try {
205
222
  let t = await tn({ variables: { targetId: e } });
206
223
  if (t.error && n(t.error)) {
207
- r(), w(!0);
224
+ ee(), T(!0);
208
225
  return;
209
226
  }
210
- let ee = t.data?.startTerminal;
211
- ee?.sessionId && f(`/sessions/${ee.sessionId}`);
227
+ let te = t.data?.startTerminal;
228
+ te?.sessionId && f(`/sessions/${te.sessionId}`);
212
229
  } catch (e) {
213
230
  if (n(e)) {
214
- r(), w(!0);
231
+ ee(), T(!0);
215
232
  return;
216
233
  }
217
234
  throw e;
218
235
  }
219
- }, [tn, f]), fn = i(async () => {
236
+ }, [tn, f]), fn = r(async () => {
220
237
  if (y) {
221
238
  try {
222
- await Y({ variables: { id: y } }), he() && ge("success");
239
+ await Y({ variables: { id: y } }), ge() && _e("success");
223
240
  } catch (e) {
224
- throw he() && ge("error"), e;
241
+ throw ge() && _e("error"), e;
225
242
  }
226
243
  b(null), S((e) => {
227
244
  let t = new Set(e);
@@ -232,69 +249,74 @@ function $e() {
232
249
  y,
233
250
  Y,
234
251
  J
235
- ]), pn = i(async () => {
252
+ ]), pn = r(async () => {
236
253
  let e = Array.from(x);
237
254
  await Promise.all(e.map((e) => Y({ variables: { id: e } }))), S(/* @__PURE__ */ new Set()), dt(!1), J();
238
255
  }, [
239
256
  x,
240
257
  Y,
241
258
  J
242
- ]), mn = i(async (e) => {
243
- mt(e), ht(null), _t(null);
259
+ ]), mn = r(async (e) => {
260
+ pt(e), mt(null), k(null);
244
261
  let t = Z.find((e) => e.isActive);
245
262
  if (!t) return;
246
263
  let n = (await nn({ variables: {
247
264
  targetId: e.id,
248
265
  sourceAgentId: t.id
249
266
  } })).data?.installAgentOnTarget;
250
- n?.jobId && _t(n.jobId);
251
- }, [nn, Z]), hn = i(async (e) => {
267
+ n?.jobId && k(n.jobId);
268
+ }, [nn, Z]), hn = r(async (e) => {
252
269
  await rn({ variables: { targetId: e.id } }), J();
253
- }, [rn, J]), gn = i((e) => {
254
- k(e), bt(e.name), St(e.label ?? ""), wt(e.host ?? ""), Et(e.port ?? 22), Ot(e.username ?? ""), P("key"), kt(""), At(""), jt(e.tags.join(", ")), j(null);
255
- }, []), _n = i(async () => {
256
- if (O) {
257
- if (!M.trim()) {
258
- j("Name is required");
270
+ }, [rn, J]), gn = r((e) => {
271
+ j(e), vt(e.name), bt(e.label ?? ""), St(e.host ?? ""), wt(e.port ?? 22), Et(e.username ?? ""), Dt("key"), Ot(""), kt(""), At(e.tags.join(", ")), N(null);
272
+ }, []), _n = r(async () => {
273
+ if (A) {
274
+ if (!P.trim()) {
275
+ N("Name is required");
259
276
  return;
260
277
  }
261
- vt(!0), j(null);
278
+ gt(!0), N(null);
262
279
  try {
263
- await $t({ variables: {
264
- id: O.id,
280
+ let e = await $t({ variables: {
281
+ id: A.id,
265
282
  input: {
266
- name: M.trim(),
267
- label: xt.trim() || null,
268
- host: Ct.trim() || void 0,
269
- port: Tt || void 0,
270
- username: Dt.trim() || void 0,
271
- password: O.type === "SSH" && N === "password" && F ? F : void 0,
272
- privateKeyPath: O.type === "SSH" && N === "key" && I ? I : void 0,
273
- tags: L ? L.split(",").map((e) => e.trim()).filter(Boolean) : []
283
+ name: P.trim(),
284
+ label: yt.trim() || null,
285
+ host: xt.trim() || void 0,
286
+ port: Ct || void 0,
287
+ username: Tt.trim() || void 0,
288
+ password: A.type === "SSH" && F === "password" && I ? I : void 0,
289
+ privateKeyPath: A.type === "SSH" && F === "key" && L ? L : void 0,
290
+ tags: R ? R.split(",").map((e) => e.trim()).filter(Boolean) : []
274
291
  }
275
- } }), k(null), J();
292
+ } });
293
+ if (e.error) {
294
+ N(e.error.message || "Failed to update target");
295
+ return;
296
+ }
297
+ j(null), J();
276
298
  } catch (e) {
277
- j(e instanceof Error ? e.message : "Failed to update target");
299
+ N(e instanceof Error ? e.message : "Failed to update target");
278
300
  } finally {
279
- vt(!1);
301
+ gt(!1);
280
302
  }
281
303
  }
282
304
  }, [
283
- O,
284
- M,
305
+ A,
306
+ P,
307
+ yt,
285
308
  xt,
286
309
  Ct,
287
310
  Tt,
288
- Dt,
289
- N,
290
311
  F,
291
312
  I,
292
313
  L,
314
+ R,
293
315
  $t,
294
316
  J
295
- ]), vn = i(() => {
296
- mt(null), ht(null), _t(null);
297
- }, []), yn = i(() => {
317
+ ]), vn = r(() => {
318
+ pt(null), mt(null), k(null);
319
+ }, []), yn = r(() => {
298
320
  S(sn ? (e) => {
299
321
  let t = new Set(e);
300
322
  return Q.forEach((e) => t.delete(e.id)), t;
@@ -302,7 +324,7 @@ function $e() {
302
324
  let t = new Set(e);
303
325
  return Q.forEach((e) => t.add(e.id)), t;
304
326
  });
305
- }, [sn, Q]), bn = i((e) => {
327
+ }, [sn, Q]), bn = r((e) => {
306
328
  S((t) => {
307
329
  let n = new Set(t);
308
330
  return n.has(e) ? n.delete(e) : n.add(e), n;
@@ -310,122 +332,122 @@ function $e() {
310
332
  }, []), xn = {
311
333
  total: X.length,
312
334
  connected: on
313
- }, Sn = a(() => [
335
+ }, Sn = i(() => [
314
336
  {
315
337
  value: "all",
316
- label: T("targets.filterTypeAll", "All Types")
338
+ label: E("targets.filterTypeAll", "All Types")
317
339
  },
318
340
  {
319
341
  value: "DIRECT",
320
- label: T("targets.typeDirect", "Direct")
342
+ label: E("targets.typeDirect", "Direct")
321
343
  },
322
344
  {
323
345
  value: "SSH",
324
346
  label: "SSH"
325
347
  }
326
- ], [T]), Cn = a(() => [
348
+ ], [E]), Cn = i(() => [
327
349
  {
328
350
  value: "all",
329
- label: T("targets.filterStatusAll", "All Statuses")
351
+ label: E("targets.filterStatusAll", "All Statuses")
330
352
  },
331
353
  {
332
354
  value: "connected",
333
- label: T("targets.connected", "Connected")
355
+ label: E("targets.connected", "Connected")
334
356
  },
335
357
  {
336
358
  value: "disconnected",
337
- label: T("targets.disconnected", "Disconnected")
359
+ label: E("targets.disconnected", "Disconnected")
338
360
  },
339
361
  {
340
362
  value: "unknown",
341
- label: T("targets.unknown", "Unknown")
363
+ label: E("targets.unknown", "Unknown")
342
364
  }
343
- ], [T]), $ = m || h || g !== "all" || _ !== "all";
344
- return tt ? /* @__PURE__ */ l("div", {
365
+ ], [E]), $ = m || h || g !== "all" || _ !== "all";
366
+ return tt ? /* @__PURE__ */ c("div", {
345
367
  className: "flex items-center justify-center min-h-[400px]",
346
- children: /* @__PURE__ */ l("p", {
368
+ children: /* @__PURE__ */ c("p", {
347
369
  className: "text-text-secondary",
348
370
  children: "Loading permissions..."
349
371
  })
350
- }) : et(Ce.TARGET_LIST) ? /* @__PURE__ */ u(Ke, {
372
+ }) : et(we.TARGET_LIST) ? /* @__PURE__ */ l(qe, {
351
373
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
352
374
  children: [
353
- C && /* @__PURE__ */ u("div", {
354
- className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm ${C.success ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
375
+ C && /* @__PURE__ */ l("div", {
376
+ className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm max-w-md ${C.success ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
355
377
  children: [
356
- C.success ? T("targets.connectionSuccessful", "Connection successful") : T("targets.connectionFailed", "Connection failed"),
378
+ C.success ? E("targets.connectionSuccessful", "Connection successful") : C.id === "create" ? E("targets.createFailed", "Failed to create target") : E("targets.connectionFailed", "Connection failed"),
357
379
  ": ",
358
380
  C.message
359
381
  ]
360
382
  }),
361
- /* @__PURE__ */ l(fe, {
362
- title: T("nav.targets", "Targets"),
383
+ /* @__PURE__ */ c(pe, {
384
+ title: E("nav.targets", "Targets"),
363
385
  description: `${xn.connected} of ${xn.total} targets online`,
364
- actions: /* @__PURE__ */ u("div", {
386
+ actions: /* @__PURE__ */ l("div", {
365
387
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
366
- children: [/* @__PURE__ */ l("button", {
388
+ children: [/* @__PURE__ */ c("button", {
367
389
  onClick: () => void J(),
368
390
  disabled: q,
369
391
  className: "flex items-center justify-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
370
- title: T("targets.refreshTitle", "Refresh targets"),
371
- children: /* @__PURE__ */ l(Ie, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
372
- }), /* @__PURE__ */ u("button", {
392
+ title: E("targets.refreshTitle", "Refresh targets"),
393
+ children: /* @__PURE__ */ c(Le, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
394
+ }), /* @__PURE__ */ l("button", {
373
395
  onClick: () => v(!0),
374
396
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
375
- children: [/* @__PURE__ */ l(Fe, { className: "w-4 h-4" }), T("targets.addTarget", "Add Target")]
397
+ children: [/* @__PURE__ */ c(Ie, { className: "w-4 h-4" }), E("targets.addTarget", "Add Target")]
376
398
  })]
377
399
  })
378
400
  }),
379
- Z.length === 0 && !q && /* @__PURE__ */ l(be, {
401
+ Z.length === 0 && !q && /* @__PURE__ */ c(xe, {
380
402
  variant: "full",
381
403
  dismissKey: "vibecontrols-targets-setup-banner"
382
404
  }),
383
- /* @__PURE__ */ u("div", {
405
+ /* @__PURE__ */ l("div", {
384
406
  className: "space-y-3",
385
- children: [/* @__PURE__ */ u("div", {
407
+ children: [/* @__PURE__ */ l("div", {
386
408
  className: "flex items-center gap-2",
387
- children: [/* @__PURE__ */ l(ve, {
409
+ children: [/* @__PURE__ */ c(ye, {
388
410
  value: m,
389
411
  onChange: rt,
390
- placeholder: T("targets.searchPlaceholder", "Search targets..."),
412
+ placeholder: E("targets.searchPlaceholder", "Search targets..."),
391
413
  className: "flex-1 sm:w-64 sm:flex-none"
392
- }), /* @__PURE__ */ u("div", {
414
+ }), /* @__PURE__ */ l("div", {
393
415
  className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
394
- children: [/* @__PURE__ */ l("button", {
416
+ children: [/* @__PURE__ */ c("button", {
395
417
  onClick: () => ct("grid"),
396
418
  className: `p-1.5 sm:p-2 rounded ${st === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
397
- title: T("targets.gridViewTitle", "Grid view"),
398
- children: /* @__PURE__ */ l(je, { className: "w-4 h-4 text-text-secondary" })
399
- }), /* @__PURE__ */ l("button", {
419
+ title: E("targets.gridViewTitle", "Grid view"),
420
+ children: /* @__PURE__ */ c(Me, { className: "w-4 h-4 text-text-secondary" })
421
+ }), /* @__PURE__ */ c("button", {
400
422
  onClick: () => ct("list"),
401
423
  className: `p-1.5 sm:p-2 rounded ${st === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
402
- title: T("targets.listViewTitle", "List view"),
403
- children: /* @__PURE__ */ l(Me, { className: "w-4 h-4 text-text-secondary" })
424
+ title: E("targets.listViewTitle", "List view"),
425
+ children: /* @__PURE__ */ c(Ne, { className: "w-4 h-4 text-text-secondary" })
404
426
  })]
405
427
  })]
406
- }), /* @__PURE__ */ u("div", {
428
+ }), /* @__PURE__ */ l("div", {
407
429
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
408
430
  children: [
409
- /* @__PURE__ */ l(ye, {
410
- label: T("sessions.filterType", "Type"),
431
+ /* @__PURE__ */ c(be, {
432
+ label: E("sessions.filterType", "Type"),
411
433
  value: g,
412
434
  options: Sn,
413
435
  onChange: at
414
436
  }),
415
- /* @__PURE__ */ l(ye, {
416
- label: T("sessions.filterStatus", "Status"),
437
+ /* @__PURE__ */ c(be, {
438
+ label: E("sessions.filterStatus", "Status"),
417
439
  value: _,
418
440
  options: Cn,
419
441
  onChange: ot
420
442
  }),
421
- /* @__PURE__ */ l(Se, {
443
+ /* @__PURE__ */ c(Ce, {
422
444
  value: h ?? "",
423
445
  onChange: (e) => it(e || null),
424
446
  options: Z.map((e) => ({
425
447
  value: e.id,
426
448
  label: e.name
427
449
  })),
428
- placeholder: T("targets.allAgents", "All agents"),
450
+ placeholder: E("targets.allAgents", "All agents"),
429
451
  className: "w-full sm:min-w-[180px] sm:w-auto",
430
452
  dropdownAlign: "left",
431
453
  clearable: !0
@@ -433,72 +455,72 @@ function $e() {
433
455
  ]
434
456
  })]
435
457
  }),
436
- Q.length > 0 && /* @__PURE__ */ l("div", {
458
+ Q.length > 0 && /* @__PURE__ */ c("div", {
437
459
  className: "flex items-center gap-2 flex-wrap",
438
- children: /* @__PURE__ */ l("div", {
460
+ children: /* @__PURE__ */ c("div", {
439
461
  className: "ml-auto flex items-center gap-2",
440
- children: /* @__PURE__ */ u("button", {
462
+ children: /* @__PURE__ */ l("button", {
441
463
  onClick: yn,
442
464
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
443
- children: [/* @__PURE__ */ l(Ae, { className: "w-3.5 h-3.5" }), sn ? T("targets.deselectAll", "Deselect All") : T("targets.selectAll", "Select All")]
465
+ children: [/* @__PURE__ */ c(je, { className: "w-3.5 h-3.5" }), sn ? E("targets.deselectAll", "Deselect All") : E("targets.selectAll", "Select All")]
444
466
  })
445
467
  })
446
468
  }),
447
- cn && /* @__PURE__ */ u("div", {
469
+ cn && /* @__PURE__ */ l("div", {
448
470
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 bg-action-primary-bg/10 border border-action-primary-bg/20 rounded-lg",
449
- children: [/* @__PURE__ */ u("span", {
471
+ children: [/* @__PURE__ */ l("span", {
450
472
  className: "text-sm font-medium text-text-primary",
451
473
  children: [
452
474
  x.size,
453
475
  " ",
454
- T("nav.targets", "target"),
476
+ E("nav.targets", "target"),
455
477
  x.size === 1 ? "" : "s",
456
478
  " ",
457
- T("sessions.selected", "selected")
479
+ E("sessions.selected", "selected")
458
480
  ]
459
- }), /* @__PURE__ */ u("div", {
481
+ }), /* @__PURE__ */ l("div", {
460
482
  className: "flex items-center gap-1.5 sm:ml-auto",
461
- children: [/* @__PURE__ */ u("button", {
483
+ children: [/* @__PURE__ */ l("button", {
462
484
  onClick: () => dt(!0),
463
485
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg border border-status-error-text/20 rounded-md hover:bg-status-error-bg/80 transition-colors",
464
486
  children: [
465
- /* @__PURE__ */ l(Re, { className: "w-3 h-3" }),
487
+ /* @__PURE__ */ c(ze, { className: "w-3 h-3" }),
466
488
  " ",
467
- T("common.delete", "Delete")
489
+ E("common.delete", "Delete")
468
490
  ]
469
- }), /* @__PURE__ */ u("button", {
491
+ }), /* @__PURE__ */ l("button", {
470
492
  onClick: () => S(/* @__PURE__ */ new Set()),
471
493
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
472
494
  children: [
473
- /* @__PURE__ */ l(Be, { className: "w-3 h-3" }),
495
+ /* @__PURE__ */ c(Ve, { className: "w-3 h-3" }),
474
496
  " ",
475
- T("sessions.deselect", "Deselect")
497
+ E("sessions.deselect", "Deselect")
476
498
  ]
477
499
  })]
478
500
  })]
479
501
  }),
480
- $ ? /* @__PURE__ */ u("p", {
502
+ $ ? /* @__PURE__ */ l("p", {
481
503
  className: "text-sm text-text-secondary",
482
- children: [T("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ u("span", {
504
+ children: [E("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ l("span", {
483
505
  className: "ml-2 text-text-muted",
484
506
  children: [
485
507
  "(",
486
- T("sessions.refreshing", "refreshing..."),
508
+ E("sessions.refreshing", "refreshing..."),
487
509
  ")"
488
510
  ]
489
511
  })]
490
512
  }) : null,
491
- q && X.length === 0 ? /* @__PURE__ */ l(we, {
513
+ q && X.length === 0 ? /* @__PURE__ */ c(Te, {
492
514
  variant: "rows",
493
515
  count: 6
494
- }) : Q.length > 0 ? /* @__PURE__ */ l(Ue, {
516
+ }) : Q.length > 0 ? /* @__PURE__ */ c(We, {
495
517
  mode: "wait",
496
- children: st === "grid" ? /* @__PURE__ */ l(Ge, {
518
+ children: st === "grid" ? /* @__PURE__ */ c(Ke, {
497
519
  stagger: .04,
498
520
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
499
- children: Q.map((e) => /* @__PURE__ */ l(We, {
521
+ children: Q.map((e) => /* @__PURE__ */ c(Ge, {
500
522
  className: "h-full",
501
- children: /* @__PURE__ */ l(Te, {
523
+ children: /* @__PURE__ */ c(Ee, {
502
524
  target: e,
503
525
  onTest: (e) => void un(e),
504
526
  onTerminal: (e) => void dn(e),
@@ -512,75 +534,75 @@ function $e() {
512
534
  highlighted: p === e.id
513
535
  })
514
536
  }, e.id))
515
- }, "grid-view") : /* @__PURE__ */ l(Ge, {
537
+ }, "grid-view") : /* @__PURE__ */ c(Ke, {
516
538
  stagger: .04,
517
539
  className: "space-y-2",
518
540
  children: Q.map((e) => {
519
- let t = Qe(e), n = p === e.id;
520
- return /* @__PURE__ */ l(We, {
541
+ let t = $e(e), n = p === e.id;
542
+ return /* @__PURE__ */ c(Ge, {
521
543
  variant: "fadeRight",
522
- children: /* @__PURE__ */ u("div", {
544
+ children: /* @__PURE__ */ l("div", {
523
545
  id: `target-row-${e.id}`,
524
546
  className: `p-4 rounded-lg border transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/5 shadow-sm" : "border-border-default hover:bg-bg-sunken/30"}`,
525
- children: [/* @__PURE__ */ u("div", {
547
+ children: [/* @__PURE__ */ l("div", {
526
548
  className: "flex items-start gap-3",
527
- children: [/* @__PURE__ */ l("input", {
549
+ children: [/* @__PURE__ */ c("input", {
528
550
  type: "checkbox",
529
551
  checked: x.has(e.id),
530
552
  onChange: () => bn(e.id),
531
553
  className: "rounded border-border-default mt-1"
532
- }), /* @__PURE__ */ u("div", {
554
+ }), /* @__PURE__ */ l("div", {
533
555
  className: "flex min-w-0 flex-1 flex-wrap items-start gap-2",
534
556
  children: [
535
- /* @__PURE__ */ l("span", {
536
- className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Xe[e.type]}`,
557
+ /* @__PURE__ */ c("span", {
558
+ className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Ze[e.type]}`,
537
559
  children: e.type
538
560
  }),
539
- /* @__PURE__ */ l("span", {
540
- className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Ze[e.status]}`,
541
- children: T(`targets.status.${e.status}`, Ye[e.status].label)
561
+ /* @__PURE__ */ c("span", {
562
+ className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Qe[e.status]}`,
563
+ children: E(`targets.status.${e.status}`, Xe[e.status].label)
542
564
  }),
543
- /* @__PURE__ */ u("div", {
565
+ /* @__PURE__ */ l("div", {
544
566
  className: "min-w-0 basis-full",
545
567
  children: [
546
- /* @__PURE__ */ u("div", {
568
+ /* @__PURE__ */ l("div", {
547
569
  className: "flex items-center gap-2 flex-wrap",
548
570
  children: [
549
- /* @__PURE__ */ l("span", {
571
+ /* @__PURE__ */ c("span", {
550
572
  className: "font-medium",
551
573
  children: e.name
552
574
  }),
553
- e.label && /* @__PURE__ */ l("span", {
575
+ e.label && /* @__PURE__ */ c("span", {
554
576
  className: "text-text-secondary text-sm",
555
577
  children: e.label
556
578
  }),
557
- t && /* @__PURE__ */ u("span", {
579
+ t && /* @__PURE__ */ l("span", {
558
580
  className: "inline-flex items-center gap-1 rounded-full border border-status-success-border px-2 py-0.5 text-xs bg-status-success-bg-subtle text-status-success-text",
559
- children: [/* @__PURE__ */ l(ke, { size: 10 }), T("targets.agentInstalled", "Agent Installed")]
581
+ children: [/* @__PURE__ */ c(Ae, { size: 10 }), E("targets.agentInstalled", "Agent Installed")]
560
582
  })
561
583
  ]
562
584
  }),
563
- /* @__PURE__ */ u("div", {
585
+ /* @__PURE__ */ l("div", {
564
586
  className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-text-secondary sm:gap-3",
565
- children: [e.host && /* @__PURE__ */ u("code", {
587
+ children: [e.host && /* @__PURE__ */ l("code", {
566
588
  className: "text-xs",
567
589
  children: [
568
590
  e.username ? `${e.username}@` : "",
569
591
  e.host,
570
592
  e.port ? `:${e.port}` : ""
571
593
  ]
572
- }), e.agents.length > 0 && /* @__PURE__ */ u("span", {
594
+ }), e.agents.length > 0 && /* @__PURE__ */ l("span", {
573
595
  className: "text-text-tertiary",
574
596
  children: [
575
- T("targets.via", "via"),
597
+ E("targets.via", "via"),
576
598
  " ",
577
599
  e.agents[0].name
578
600
  ]
579
601
  })]
580
602
  }),
581
- e.tags.length > 0 && /* @__PURE__ */ l("div", {
603
+ e.tags.length > 0 && /* @__PURE__ */ c("div", {
582
604
  className: "mt-1.5 flex flex-wrap gap-1",
583
- children: e.tags.map((e) => /* @__PURE__ */ l("span", {
605
+ children: e.tags.map((e) => /* @__PURE__ */ c("span", {
584
606
  className: "px-1.5 py-0.5 text-xs bg-bg-sunken text-text-secondary rounded",
585
607
  children: e
586
608
  }, e))
@@ -589,45 +611,45 @@ function $e() {
589
611
  })
590
612
  ]
591
613
  })]
592
- }), /* @__PURE__ */ u("div", {
614
+ }), /* @__PURE__ */ l("div", {
593
615
  className: "mt-3 flex flex-wrap items-center gap-2 pl-0 sm:pl-7",
594
616
  children: [
595
- /* @__PURE__ */ l("button", {
617
+ /* @__PURE__ */ c("button", {
596
618
  onClick: () => void un(e.id),
597
- title: T("targets.testConnectivity", "Test connectivity"),
619
+ title: E("targets.testConnectivity", "Test connectivity"),
598
620
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors",
599
- children: T("targets.test", "Test")
621
+ children: E("targets.test", "Test")
600
622
  }),
601
- /* @__PURE__ */ l("button", {
623
+ /* @__PURE__ */ c("button", {
602
624
  onClick: () => void dn(e.id),
603
- title: T("targets.openTerminal", "Open terminal"),
625
+ title: E("targets.openTerminal", "Open terminal"),
604
626
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors",
605
- children: T("targets.terminal", "Terminal")
627
+ children: E("targets.terminal", "Terminal")
606
628
  }),
607
- /* @__PURE__ */ u("button", {
629
+ /* @__PURE__ */ l("button", {
608
630
  onClick: () => gn(e),
609
631
  title: "Edit target configuration",
610
632
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors",
611
- children: [/* @__PURE__ */ l(Pe, { size: 14 }), "Edit"]
633
+ children: [/* @__PURE__ */ c(Fe, { size: 14 }), "Edit"]
612
634
  }),
613
- e.type !== "DIRECT" && !t && /* @__PURE__ */ l("button", {
635
+ e.type !== "DIRECT" && !t && /* @__PURE__ */ c("button", {
614
636
  onClick: () => void mn(e),
615
- title: T("targets.installAgent", "Install agent"),
637
+ title: E("targets.installAgent", "Install agent"),
616
638
  className: "flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
617
- children: T("targets.installAgent", "Install Agent")
639
+ children: E("targets.installAgent", "Install Agent")
618
640
  }),
619
- e.type !== "DIRECT" && t && /* @__PURE__ */ l("button", {
641
+ e.type !== "DIRECT" && t && /* @__PURE__ */ c("button", {
620
642
  onClick: () => void hn(e),
621
- title: T("targets.uninstallAgent", "Uninstall agent"),
643
+ title: E("targets.uninstallAgent", "Uninstall agent"),
622
644
  className: "flex items-center gap-1.5 rounded-md border border-status-error-text/20 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/80 transition-colors",
623
- children: T("targets.uninstall", "Uninstall")
645
+ children: E("targets.uninstall", "Uninstall")
624
646
  }),
625
- /* @__PURE__ */ l("div", { className: "hidden flex-1 sm:block" }),
626
- /* @__PURE__ */ u("button", {
647
+ /* @__PURE__ */ c("div", { className: "hidden flex-1 sm:block" }),
648
+ /* @__PURE__ */ l("button", {
627
649
  onClick: () => b(e.id),
628
- title: T("targets.deleteTarget", "Delete target"),
650
+ title: E("targets.deleteTarget", "Delete target"),
629
651
  className: "flex items-center gap-1.5 rounded-md border border-status-error-border px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/80 transition-colors",
630
- children: [/* @__PURE__ */ l(s, { size: 14 }), T("common.delete", "Delete")]
652
+ children: [/* @__PURE__ */ c(o, { size: 14 }), E("common.delete", "Delete")]
631
653
  })
632
654
  ]
633
655
  })]
@@ -635,473 +657,473 @@ function $e() {
635
657
  }, e.id);
636
658
  })
637
659
  }, "list-view")
638
- }) : /* @__PURE__ */ l(_e, {
639
- icon: /* @__PURE__ */ l(Le, { className: "w-8 h-8 text-text-secondary" }),
640
- title: $ ? T("targets.emptyNoTargetsFound", "No targets found") : T("targets.emptyNoTargetsConfigured", "No targets configured"),
641
- description: $ ? T("targets.emptyAdjustSearch", "Try adjusting your search or filters") : T("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
642
- action: $ ? void 0 : /* @__PURE__ */ u("div", {
660
+ }) : /* @__PURE__ */ c(ve, {
661
+ icon: /* @__PURE__ */ c(Re, { className: "w-8 h-8 text-text-secondary" }),
662
+ title: $ ? E("targets.emptyNoTargetsFound", "No targets found") : E("targets.emptyNoTargetsConfigured", "No targets configured"),
663
+ description: $ ? E("targets.emptyAdjustSearch", "Try adjusting your search or filters") : E("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
664
+ action: $ ? void 0 : /* @__PURE__ */ l("div", {
643
665
  className: "flex items-center gap-2",
644
- children: [/* @__PURE__ */ u("button", {
666
+ children: [/* @__PURE__ */ l("button", {
645
667
  onClick: () => v(!0),
646
668
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
647
- children: [/* @__PURE__ */ l(Fe, { className: "w-4 h-4" }), T("targets.addTarget", "Add Target")]
648
- }), /* @__PURE__ */ l(xe, { prompt: "What is a Target in VibeControls and how do I create one?" })]
669
+ children: [/* @__PURE__ */ c(Ie, { className: "w-4 h-4" }), E("targets.addTarget", "Add Target")]
670
+ }), /* @__PURE__ */ c(Se, { prompt: "What is a Target in VibeControls and how do I create one?" })]
649
671
  })
650
672
  }),
651
- lt && /* @__PURE__ */ u("div", {
673
+ lt && /* @__PURE__ */ l("div", {
652
674
  className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
653
- children: [/* @__PURE__ */ l("div", {
675
+ children: [/* @__PURE__ */ c("div", {
654
676
  className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
655
677
  onClick: () => v(!1)
656
- }), /* @__PURE__ */ u("div", {
678
+ }), /* @__PURE__ */ l("div", {
657
679
  className: "relative bg-bg-elevated rounded-xl shadow-2xl border border-border-default max-w-lg w-full mx-4 p-6 space-y-4 mb-8",
658
680
  onClick: (e) => e.stopPropagation(),
659
681
  children: [
660
- /* @__PURE__ */ u("div", {
682
+ /* @__PURE__ */ l("div", {
661
683
  className: "flex items-start justify-between gap-3",
662
- children: [/* @__PURE__ */ l("h2", {
684
+ children: [/* @__PURE__ */ c("h2", {
663
685
  className: "text-lg font-semibold",
664
- children: T("targets.addTarget", "Add Target")
665
- }), /* @__PURE__ */ l("button", {
686
+ children: E("targets.addTarget", "Add Target")
687
+ }), /* @__PURE__ */ c("button", {
666
688
  onClick: () => v(!1),
667
689
  className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors",
668
- children: /* @__PURE__ */ l(s, { size: 18 })
690
+ children: /* @__PURE__ */ c(o, { size: 18 })
669
691
  })]
670
692
  }),
671
- /* @__PURE__ */ u("div", {
693
+ /* @__PURE__ */ l("div", {
672
694
  className: "space-y-4",
673
695
  children: [
674
- /* @__PURE__ */ u("div", { children: [
675
- /* @__PURE__ */ l("label", {
696
+ /* @__PURE__ */ l("div", { children: [
697
+ /* @__PURE__ */ c("label", {
676
698
  className: "text-sm font-medium block mb-1.5",
677
- children: T("targets.targetType", "Target Type")
699
+ children: E("targets.targetType", "Target Type")
678
700
  }),
679
- /* @__PURE__ */ l("div", {
701
+ /* @__PURE__ */ c("div", {
680
702
  className: "grid grid-cols-2 gap-2",
681
- children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ l("button", {
682
- onClick: () => Mt(e),
683
- className: `px-3 py-2 text-sm font-medium rounded-lg border transition-colors ${R === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
703
+ children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ c("button", {
704
+ onClick: () => jt(e),
705
+ className: `px-3 py-2 text-sm font-medium rounded-lg border transition-colors ${z === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
684
706
  children: e
685
707
  }, e))
686
708
  }),
687
- /* @__PURE__ */ l("p", {
709
+ /* @__PURE__ */ c("p", {
688
710
  className: "text-xs text-text-tertiary mt-1",
689
- children: R === "DIRECT" ? T("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : T("targets.targetTypeSshHint", "A remote server accessible via SSH.")
711
+ children: z === "DIRECT" ? E("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : E("targets.targetTypeSshHint", "A remote server accessible via SSH.")
690
712
  })
691
713
  ] }),
692
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
714
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
693
715
  className: "text-sm font-medium",
694
- children: T("webhooks.name", "Name")
695
- }), /* @__PURE__ */ l("input", {
696
- value: z,
697
- onChange: (e) => Nt(e.target.value),
716
+ children: E("webhooks.name", "Name")
717
+ }), /* @__PURE__ */ c("input", {
718
+ value: B,
719
+ onChange: (e) => Mt(e.target.value),
698
720
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
699
- placeholder: R === "DIRECT" ? T("targets.namePlaceholderDirect", "My Laptop") : T("targets.namePlaceholderServer", "Production Server")
721
+ placeholder: z === "DIRECT" ? E("targets.namePlaceholderDirect", "My Laptop") : E("targets.namePlaceholderServer", "Production Server")
700
722
  })] }),
701
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
723
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
702
724
  className: "text-sm font-medium",
703
- children: T("targets.descriptionOptional", "Description (optional)")
704
- }), /* @__PURE__ */ l("input", {
705
- value: B,
706
- onChange: (e) => Pt(e.target.value),
725
+ children: E("targets.descriptionOptional", "Description (optional)")
726
+ }), /* @__PURE__ */ c("input", {
727
+ value: V,
728
+ onChange: (e) => Nt(e.target.value),
707
729
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
708
- placeholder: T("targets.descriptionPlaceholder", "Brief description of this target")
730
+ placeholder: E("targets.descriptionPlaceholder", "Brief description of this target")
709
731
  })] }),
710
- R !== "DIRECT" && /* @__PURE__ */ u(c, { children: [
711
- /* @__PURE__ */ u("div", { children: [
712
- /* @__PURE__ */ l("label", {
732
+ z !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
733
+ /* @__PURE__ */ l("div", { children: [
734
+ /* @__PURE__ */ c("label", {
713
735
  className: "text-sm font-medium",
714
- children: T("targets.sourceAgent", "Source Agent")
736
+ children: E("targets.sourceAgent", "Source Agent")
715
737
  }),
716
- /* @__PURE__ */ u("select", {
717
- value: V,
718
- onChange: (e) => Ft(e.target.value),
738
+ /* @__PURE__ */ l("select", {
739
+ value: H,
740
+ onChange: (e) => Pt(e.target.value),
719
741
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
720
- children: [/* @__PURE__ */ l("option", {
742
+ children: [/* @__PURE__ */ c("option", {
721
743
  value: "",
722
- children: T("targets.selectAgentConnectFrom", "Select an agent to connect from")
723
- }), Z.map((e) => /* @__PURE__ */ l("option", {
744
+ children: E("targets.selectAgentConnectFrom", "Select an agent to connect from")
745
+ }), Z.map((e) => /* @__PURE__ */ c("option", {
724
746
  value: e.id,
725
747
  children: e.name
726
748
  }, e.id))]
727
749
  }),
728
- /* @__PURE__ */ u("p", {
750
+ /* @__PURE__ */ l("p", {
729
751
  className: "text-xs text-text-tertiary mt-0.5",
730
752
  children: [
731
- T("targets.agentConnectionHintPrefix", "The agent that will establish the"),
753
+ E("targets.agentConnectionHintPrefix", "The agent that will establish the"),
732
754
  " ",
733
- R,
755
+ z,
734
756
  " ",
735
- T("targets.agentConnectionHintSuffix", "connection to this target.")
757
+ E("targets.agentConnectionHintSuffix", "connection to this target.")
736
758
  ]
737
759
  })
738
760
  ] }),
739
- /* @__PURE__ */ u("div", {
761
+ /* @__PURE__ */ l("div", {
740
762
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
741
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
763
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
742
764
  className: "text-sm font-medium",
743
- children: T("targets.host", "Host")
744
- }), /* @__PURE__ */ l("input", {
745
- value: H,
746
- onChange: (e) => It(e.target.value),
765
+ children: E("targets.host", "Host")
766
+ }), /* @__PURE__ */ c("input", {
767
+ value: U,
768
+ onChange: (e) => Ft(e.target.value),
747
769
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
748
- placeholder: T("targets.hostPlaceholder", "192.168.1.100")
749
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
770
+ placeholder: E("targets.hostPlaceholder", "192.168.1.100")
771
+ })] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
750
772
  className: "text-sm font-medium",
751
- children: T("tunnels.port", "Port")
752
- }), /* @__PURE__ */ l("input", {
773
+ children: E("tunnels.port", "Port")
774
+ }), /* @__PURE__ */ c("input", {
753
775
  type: "number",
754
- value: U,
776
+ value: It,
755
777
  onChange: (e) => Lt(Number(e.target.value)),
756
778
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
757
779
  })] })]
758
780
  }),
759
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
781
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
760
782
  className: "text-sm font-medium",
761
- children: T("targets.username", "Username")
762
- }), /* @__PURE__ */ l("input", {
783
+ children: E("targets.username", "Username")
784
+ }), /* @__PURE__ */ c("input", {
763
785
  value: W,
764
786
  onChange: (e) => Rt(e.target.value),
765
787
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
766
- placeholder: T("targets.usernamePlaceholder", "root")
788
+ placeholder: E("targets.usernamePlaceholder", "root")
767
789
  })] }),
768
- R === "SSH" && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
790
+ z === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
769
791
  className: "text-sm font-medium",
770
- children: T("targets.authentication", "Authentication")
771
- }), /* @__PURE__ */ u("div", {
792
+ children: E("targets.authentication", "Authentication")
793
+ }), /* @__PURE__ */ l("div", {
772
794
  className: "flex gap-4 mt-1",
773
- children: [/* @__PURE__ */ u("label", {
795
+ children: [/* @__PURE__ */ l("label", {
774
796
  className: "flex items-center gap-2 cursor-pointer text-sm",
775
- children: [/* @__PURE__ */ l("input", {
797
+ children: [/* @__PURE__ */ c("input", {
776
798
  type: "radio",
777
799
  checked: G === "password",
778
800
  onChange: () => zt("password")
779
- }), T("targets.password", "Password")]
780
- }), /* @__PURE__ */ u("label", {
801
+ }), E("targets.password", "Password")]
802
+ }), /* @__PURE__ */ l("label", {
781
803
  className: "flex items-center gap-2 cursor-pointer text-sm",
782
- children: [/* @__PURE__ */ l("input", {
804
+ children: [/* @__PURE__ */ c("input", {
783
805
  type: "radio",
784
806
  checked: G === "key",
785
807
  onChange: () => zt("key")
786
- }), T("targets.privateKey", "Private Key")]
808
+ }), E("targets.privateKey", "Private Key")]
787
809
  })]
788
- })] }), G === "password" ? /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
810
+ })] }), G === "password" ? /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
789
811
  className: "text-sm font-medium",
790
- children: T("targets.password", "Password")
791
- }), /* @__PURE__ */ l("input", {
812
+ children: E("targets.password", "Password")
813
+ }), /* @__PURE__ */ c("input", {
792
814
  type: "password",
793
815
  value: Bt,
794
816
  onChange: (e) => Vt(e.target.value),
795
817
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
796
- })] }) : /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
818
+ })] }) : /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
797
819
  className: "text-sm font-medium",
798
- children: T("targets.privateKeyPath", "Private Key Path")
799
- }), /* @__PURE__ */ l("input", {
820
+ children: E("targets.privateKeyPath", "Private Key Path")
821
+ }), /* @__PURE__ */ c("input", {
800
822
  value: Ht,
801
823
  onChange: (e) => Ut(e.target.value),
802
824
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
803
- placeholder: T("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
825
+ placeholder: E("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
804
826
  })] })] })
805
827
  ] }),
806
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
828
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
807
829
  className: "text-sm font-medium",
808
- children: T("targets.labelOptional", "Label (optional)")
809
- }), /* @__PURE__ */ l("input", {
830
+ children: E("targets.labelOptional", "Label (optional)")
831
+ }), /* @__PURE__ */ c("input", {
810
832
  value: Wt,
811
833
  onChange: (e) => Gt(e.target.value),
812
834
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
813
- placeholder: T("targets.labelPlaceholder", "web-server-01")
835
+ placeholder: E("targets.labelPlaceholder", "web-server-01")
814
836
  })] }),
815
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
837
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
816
838
  className: "text-sm font-medium",
817
- children: T("targets.tagsCommaSeparated", "Tags (comma-separated)")
818
- }), /* @__PURE__ */ l("input", {
839
+ children: E("targets.tagsCommaSeparated", "Tags (comma-separated)")
840
+ }), /* @__PURE__ */ c("input", {
819
841
  value: K,
820
842
  onChange: (e) => Kt(e.target.value),
821
843
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
822
- placeholder: T("targets.tagsPlaceholder", "production, web")
844
+ placeholder: E("targets.tagsPlaceholder", "production, web")
823
845
  })] })
824
846
  ]
825
847
  }),
826
- /* @__PURE__ */ u("div", {
848
+ /* @__PURE__ */ l("div", {
827
849
  className: "border-t border-border-default pt-3",
828
- children: [/* @__PURE__ */ l("h3", {
850
+ children: [/* @__PURE__ */ c("h3", {
829
851
  className: "text-sm font-medium text-text-secondary mb-2",
830
- children: T("targets.tags", "Tags")
831
- }), /* @__PURE__ */ l(pe, {
852
+ children: E("targets.tags", "Tags")
853
+ }), /* @__PURE__ */ c(me, {
832
854
  entityType: "VIBECONTROLS_TARGET",
833
855
  onDraftChange: Zt
834
856
  })]
835
857
  }),
836
- /* @__PURE__ */ u("div", {
858
+ /* @__PURE__ */ l("div", {
837
859
  className: "flex justify-end gap-2 pt-2 border-t border-border-default",
838
- children: [/* @__PURE__ */ l("button", {
860
+ children: [/* @__PURE__ */ c("button", {
839
861
  onClick: () => v(!1),
840
862
  className: "px-4 py-2 text-sm rounded-md border border-border-default hover:bg-bg-sunken transition-colors",
841
- children: T("common.cancel", "Cancel")
842
- }), /* @__PURE__ */ l("button", {
863
+ children: E("common.cancel", "Cancel")
864
+ }), /* @__PURE__ */ c("button", {
843
865
  onClick: () => void ln(),
844
866
  className: "px-4 py-2 text-sm rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
845
- children: T("targets.addTarget", "Add Target")
867
+ children: E("targets.addTarget", "Add Target")
846
868
  })]
847
869
  })
848
870
  ]
849
871
  })]
850
872
  }),
851
- O && /* @__PURE__ */ u("div", {
873
+ A && /* @__PURE__ */ l("div", {
852
874
  className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
853
- children: [/* @__PURE__ */ l("div", {
875
+ children: [/* @__PURE__ */ c("div", {
854
876
  className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
855
- onClick: () => !A && k(null)
856
- }), /* @__PURE__ */ u("div", {
877
+ onClick: () => !M && j(null)
878
+ }), /* @__PURE__ */ l("div", {
857
879
  className: "relative bg-bg-elevated rounded-xl shadow-2xl border border-border-default max-w-lg w-full mx-4 p-6 space-y-4 mb-8",
858
880
  onClick: (e) => e.stopPropagation(),
859
881
  children: [
860
- /* @__PURE__ */ u("div", {
882
+ /* @__PURE__ */ l("div", {
861
883
  className: "flex items-start justify-between gap-3",
862
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h2", {
884
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h2", {
863
885
  className: "text-lg font-semibold",
864
886
  children: "Edit Target"
865
- }), /* @__PURE__ */ l("p", {
887
+ }), /* @__PURE__ */ c("p", {
866
888
  className: "text-sm text-text-secondary mt-0.5",
867
- children: O.name
868
- })] }), /* @__PURE__ */ l("button", {
869
- onClick: () => k(null),
870
- disabled: A,
889
+ children: A.name
890
+ })] }), /* @__PURE__ */ c("button", {
891
+ onClick: () => j(null),
892
+ disabled: M,
871
893
  className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-50",
872
- children: /* @__PURE__ */ l(s, { size: 18 })
894
+ children: /* @__PURE__ */ c(o, { size: 18 })
873
895
  })]
874
896
  }),
875
- yt && /* @__PURE__ */ l("div", {
897
+ _t && /* @__PURE__ */ c("div", {
876
898
  className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
877
- children: yt
899
+ children: _t
878
900
  }),
879
- /* @__PURE__ */ u("div", {
901
+ /* @__PURE__ */ l("div", {
880
902
  className: "space-y-4",
881
903
  children: [
882
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
904
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
883
905
  className: "text-sm font-medium",
884
906
  children: "Name"
885
- }), /* @__PURE__ */ l("input", {
886
- value: M,
887
- onChange: (e) => bt(e.target.value),
907
+ }), /* @__PURE__ */ c("input", {
908
+ value: P,
909
+ onChange: (e) => vt(e.target.value),
888
910
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
889
911
  placeholder: "Production Server"
890
912
  })] }),
891
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
913
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
892
914
  className: "text-sm font-medium",
893
915
  children: "Label (optional)"
894
- }), /* @__PURE__ */ l("input", {
895
- value: xt,
896
- onChange: (e) => St(e.target.value),
916
+ }), /* @__PURE__ */ c("input", {
917
+ value: yt,
918
+ onChange: (e) => bt(e.target.value),
897
919
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
898
920
  placeholder: "web-server-01"
899
921
  })] }),
900
- O.type !== "DIRECT" && /* @__PURE__ */ u(c, { children: [
901
- /* @__PURE__ */ u("div", {
922
+ A.type !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
923
+ /* @__PURE__ */ l("div", {
902
924
  className: "grid grid-cols-2 gap-3",
903
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
925
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
904
926
  className: "text-sm font-medium",
905
927
  children: "Host"
906
- }), /* @__PURE__ */ l("input", {
907
- value: Ct,
908
- onChange: (e) => wt(e.target.value),
928
+ }), /* @__PURE__ */ c("input", {
929
+ value: xt,
930
+ onChange: (e) => St(e.target.value),
909
931
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
910
932
  placeholder: "192.168.1.100"
911
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
933
+ })] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
912
934
  className: "text-sm font-medium",
913
935
  children: "Port"
914
- }), /* @__PURE__ */ l("input", {
936
+ }), /* @__PURE__ */ c("input", {
915
937
  type: "number",
916
- value: Tt,
917
- onChange: (e) => Et(Number(e.target.value)),
938
+ value: Ct,
939
+ onChange: (e) => wt(Number(e.target.value)),
918
940
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
919
941
  })] })]
920
942
  }),
921
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
943
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
922
944
  className: "text-sm font-medium",
923
945
  children: "Username"
924
- }), /* @__PURE__ */ l("input", {
925
- value: Dt,
926
- onChange: (e) => Ot(e.target.value),
946
+ }), /* @__PURE__ */ c("input", {
947
+ value: Tt,
948
+ onChange: (e) => Et(e.target.value),
927
949
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
928
950
  placeholder: "root"
929
951
  })] }),
930
- O.type === "SSH" && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("div", { children: [
931
- /* @__PURE__ */ l("label", {
952
+ A.type === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [
953
+ /* @__PURE__ */ c("label", {
932
954
  className: "text-sm font-medium",
933
955
  children: "Update credentials (optional)"
934
956
  }),
935
- /* @__PURE__ */ u("div", {
957
+ /* @__PURE__ */ l("div", {
936
958
  className: "flex gap-4 mt-1",
937
- children: [/* @__PURE__ */ u("label", {
959
+ children: [/* @__PURE__ */ l("label", {
938
960
  className: "flex items-center gap-2 cursor-pointer text-sm",
939
- children: [/* @__PURE__ */ l("input", {
961
+ children: [/* @__PURE__ */ c("input", {
940
962
  type: "radio",
941
- checked: N === "password",
942
- onChange: () => P("password")
963
+ checked: F === "password",
964
+ onChange: () => Dt("password")
943
965
  }), "Password"]
944
- }), /* @__PURE__ */ u("label", {
966
+ }), /* @__PURE__ */ l("label", {
945
967
  className: "flex items-center gap-2 cursor-pointer text-sm",
946
- children: [/* @__PURE__ */ l("input", {
968
+ children: [/* @__PURE__ */ c("input", {
947
969
  type: "radio",
948
- checked: N === "key",
949
- onChange: () => P("key")
970
+ checked: F === "key",
971
+ onChange: () => Dt("key")
950
972
  }), "Private Key"]
951
973
  })]
952
974
  }),
953
- /* @__PURE__ */ l("p", {
975
+ /* @__PURE__ */ c("p", {
954
976
  className: "text-xs text-text-tertiary mt-0.5",
955
977
  children: "Leave blank to keep existing credentials."
956
978
  })
957
- ] }), N === "password" ? /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
979
+ ] }), F === "password" ? /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
958
980
  className: "text-sm font-medium",
959
981
  children: "New Password"
960
- }), /* @__PURE__ */ l("input", {
982
+ }), /* @__PURE__ */ c("input", {
961
983
  type: "password",
962
- value: F,
963
- onChange: (e) => kt(e.target.value),
984
+ value: I,
985
+ onChange: (e) => Ot(e.target.value),
964
986
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
965
987
  placeholder: "Leave blank to keep current"
966
- })] }) : /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
988
+ })] }) : /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
967
989
  className: "text-sm font-medium",
968
990
  children: "New Private Key Path"
969
- }), /* @__PURE__ */ l("input", {
970
- value: I,
971
- onChange: (e) => At(e.target.value),
991
+ }), /* @__PURE__ */ c("input", {
992
+ value: L,
993
+ onChange: (e) => kt(e.target.value),
972
994
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
973
995
  placeholder: "Leave blank to keep current (~/.ssh/id_rsa)"
974
996
  })] })] })
975
997
  ] }),
976
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
998
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
977
999
  className: "text-sm font-medium",
978
1000
  children: "Tags (comma-separated)"
979
- }), /* @__PURE__ */ l("input", {
980
- value: L,
981
- onChange: (e) => jt(e.target.value),
1001
+ }), /* @__PURE__ */ c("input", {
1002
+ value: R,
1003
+ onChange: (e) => At(e.target.value),
982
1004
  className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
983
1005
  placeholder: "production, web"
984
1006
  })] })
985
1007
  ]
986
1008
  }),
987
- /* @__PURE__ */ u("div", {
1009
+ /* @__PURE__ */ l("div", {
988
1010
  className: "flex justify-end gap-2 pt-2 border-t border-border-default",
989
- children: [/* @__PURE__ */ l("button", {
990
- onClick: () => k(null),
991
- disabled: A,
1011
+ children: [/* @__PURE__ */ c("button", {
1012
+ onClick: () => j(null),
1013
+ disabled: M,
992
1014
  className: "px-4 py-2 text-sm rounded-lg border border-border-default hover:bg-bg-sunken transition-colors disabled:opacity-50",
993
1015
  children: "Cancel"
994
- }), /* @__PURE__ */ l("button", {
1016
+ }), /* @__PURE__ */ c("button", {
995
1017
  onClick: () => void _n(),
996
- disabled: A,
1018
+ disabled: M,
997
1019
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm text-action-primary-text transition-colors hover:bg-action-primary-bg-hover disabled:opacity-50",
998
- children: A ? "Saving..." : "Save Changes"
1020
+ children: M ? "Saving..." : "Save Changes"
999
1021
  })]
1000
1022
  })
1001
1023
  ]
1002
1024
  })]
1003
1025
  }),
1004
- /* @__PURE__ */ l(e, {
1026
+ /* @__PURE__ */ c(e, {
1005
1027
  isOpen: !!y,
1006
1028
  onClose: () => b(null),
1007
1029
  onConfirm: () => void fn(),
1008
- title: T("targets.deleteTarget", "Delete Target"),
1009
- message: T("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
1010
- confirmLabel: T("common.delete", "Delete"),
1030
+ title: E("targets.deleteTarget", "Delete Target"),
1031
+ message: E("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
1032
+ confirmLabel: E("common.delete", "Delete"),
1011
1033
  variant: "danger"
1012
1034
  }),
1013
- /* @__PURE__ */ l(e, {
1035
+ /* @__PURE__ */ c(e, {
1014
1036
  isOpen: ut,
1015
1037
  onClose: () => dt(!1),
1016
1038
  onConfirm: () => void pn(),
1017
- title: T("targets.deleteSelectedTargets", "Delete Selected Targets"),
1018
- message: `${T("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${x.size} ${T("nav.targets", "target")}${x.size === 1 ? "" : "s"}? ${T("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
1019
- confirmLabel: T("targets.deleteAll", "Delete All"),
1039
+ title: E("targets.deleteSelectedTargets", "Delete Selected Targets"),
1040
+ message: `${E("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${x.size} ${E("nav.targets", "target")}${x.size === 1 ? "" : "s"}? ${E("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
1041
+ confirmLabel: E("targets.deleteAll", "Delete All"),
1020
1042
  variant: "danger"
1021
1043
  }),
1022
- E && /* @__PURE__ */ l("div", {
1044
+ D && /* @__PURE__ */ c("div", {
1023
1045
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50",
1024
- children: /* @__PURE__ */ u("div", {
1046
+ children: /* @__PURE__ */ l("div", {
1025
1047
  className: "bg-bg-elevated rounded-xl shadow-xl max-w-md w-full mx-4 p-6",
1026
1048
  children: [
1027
- /* @__PURE__ */ u("div", {
1049
+ /* @__PURE__ */ l("div", {
1028
1050
  className: "flex items-start justify-between gap-3",
1029
- children: [/* @__PURE__ */ u("h2", {
1051
+ children: [/* @__PURE__ */ l("h2", {
1030
1052
  className: "text-lg font-semibold break-words",
1031
1053
  children: [
1032
- T("targets.installingAgentOn", "Installing Agent on"),
1054
+ E("targets.installingAgentOn", "Installing Agent on"),
1033
1055
  " ",
1034
- E.name
1056
+ D.name
1035
1057
  ]
1036
- }), D?.status !== "running" && /* @__PURE__ */ l("button", {
1058
+ }), O?.status !== "running" && /* @__PURE__ */ c("button", {
1037
1059
  onClick: vn,
1038
1060
  className: "p-1 rounded hover:bg-bg-sunken",
1039
- children: /* @__PURE__ */ l(s, { size: 16 })
1061
+ children: /* @__PURE__ */ c(o, { size: 16 })
1040
1062
  })]
1041
1063
  }),
1042
- /* @__PURE__ */ l("div", {
1064
+ /* @__PURE__ */ c("div", {
1043
1065
  className: "space-y-2 mt-4",
1044
- children: D && D.steps ? D.steps.map((e, t) => /* @__PURE__ */ u("div", {
1066
+ children: O && O.steps ? O.steps.map((e, t) => /* @__PURE__ */ l("div", {
1045
1067
  className: "flex items-center gap-3",
1046
1068
  children: [
1047
- e.status === "running" && /* @__PURE__ */ l(Ne, {
1069
+ e.status === "running" && /* @__PURE__ */ c(Pe, {
1048
1070
  className: "animate-spin text-action-primary-bg",
1049
1071
  size: 16
1050
1072
  }),
1051
- e.status === "completed" && /* @__PURE__ */ l(ke, {
1073
+ e.status === "completed" && /* @__PURE__ */ c(Ae, {
1052
1074
  className: "text-status-success-text",
1053
1075
  size: 16
1054
1076
  }),
1055
- e.status === "failed" && /* @__PURE__ */ l(ze, {
1077
+ e.status === "failed" && /* @__PURE__ */ c(Be, {
1056
1078
  className: "text-status-error-text",
1057
1079
  size: 16
1058
1080
  }),
1059
- e.status === "skipped" && /* @__PURE__ */ l(Oe, {
1081
+ e.status === "skipped" && /* @__PURE__ */ c(ke, {
1060
1082
  className: "text-text-tertiary",
1061
1083
  size: 16
1062
1084
  }),
1063
- e.status === "pending" && /* @__PURE__ */ l("div", { className: "w-4 h-4 rounded-full border-2 border-border-default" }),
1064
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("div", {
1085
+ e.status === "pending" && /* @__PURE__ */ c("div", { className: "w-4 h-4 rounded-full border-2 border-border-default" }),
1086
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("div", {
1065
1087
  className: "text-sm font-medium",
1066
- children: T(`targets.installStep.${e.name}`, Je[e.name] ?? e.name)
1067
- }), e.message && /* @__PURE__ */ l("div", {
1088
+ children: E(`targets.installStep.${e.name}`, Ye[e.name] ?? e.name)
1089
+ }), e.message && /* @__PURE__ */ c("div", {
1068
1090
  className: "text-xs text-text-tertiary",
1069
1091
  children: e.message
1070
1092
  })] })
1071
1093
  ]
1072
- }, t)) : /* @__PURE__ */ u("div", {
1094
+ }, t)) : /* @__PURE__ */ l("div", {
1073
1095
  className: "flex items-center gap-3",
1074
- children: [/* @__PURE__ */ l(Ne, {
1096
+ children: [/* @__PURE__ */ c(Pe, {
1075
1097
  className: "animate-spin text-action-primary-bg",
1076
1098
  size: 16
1077
- }), /* @__PURE__ */ l("span", {
1099
+ }), /* @__PURE__ */ c("span", {
1078
1100
  className: "text-sm",
1079
- children: T("targets.startingInstallJob", "Starting install job...")
1101
+ children: E("targets.startingInstallJob", "Starting install job...")
1080
1102
  })]
1081
1103
  })
1082
1104
  }),
1083
- D?.status === "completed" && /* @__PURE__ */ l("div", {
1105
+ O?.status === "completed" && /* @__PURE__ */ c("div", {
1084
1106
  className: "mt-4 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
1085
- children: T("targets.agentInstalledSuccess", "Agent installed successfully!")
1107
+ children: E("targets.agentInstalledSuccess", "Agent installed successfully!")
1086
1108
  }),
1087
- D?.status === "failed" && /* @__PURE__ */ l("div", {
1109
+ O?.status === "failed" && /* @__PURE__ */ c("div", {
1088
1110
  className: "mt-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
1089
- children: D.error ?? T("targets.installationFailed", "Installation failed.")
1111
+ children: O.error ?? E("targets.installationFailed", "Installation failed.")
1090
1112
  }),
1091
- /* @__PURE__ */ l("button", {
1113
+ /* @__PURE__ */ c("button", {
1092
1114
  onClick: vn,
1093
- disabled: D?.status === "running",
1115
+ disabled: O?.status === "running",
1094
1116
  className: "mt-4 w-full px-4 py-2 rounded-md border border-border-default hover:bg-bg-sunken transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",
1095
- children: !D || D.status === "running" ? T("targets.installing", "Installing...") : T("common.close", "Close")
1117
+ children: !O || O.status === "running" ? E("targets.installing", "Installing...") : E("common.close", "Close")
1096
1118
  })
1097
1119
  ]
1098
1120
  })
1099
1121
  }),
1100
- /* @__PURE__ */ l(e, {
1101
- isOpen: pt,
1102
- onClose: () => w(!1),
1122
+ /* @__PURE__ */ c(e, {
1123
+ isOpen: ft,
1124
+ onClose: () => T(!1),
1103
1125
  onConfirm: () => {
1104
- w(!1), f("/billing");
1126
+ T(!1), f("/billing");
1105
1127
  },
1106
1128
  title: t("environment").title,
1107
1129
  message: t("environment").message,
@@ -1110,14 +1132,14 @@ function $e() {
1110
1132
  variant: "warning"
1111
1133
  })
1112
1134
  ]
1113
- }) : /* @__PURE__ */ l("div", {
1135
+ }) : /* @__PURE__ */ c("div", {
1114
1136
  className: "flex items-center justify-center min-h-[400px]",
1115
- children: /* @__PURE__ */ u("div", {
1137
+ children: /* @__PURE__ */ l("div", {
1116
1138
  className: "text-center space-y-2",
1117
- children: [/* @__PURE__ */ l("h2", {
1139
+ children: [/* @__PURE__ */ c("h2", {
1118
1140
  className: "text-lg font-semibold text-foreground",
1119
1141
  children: "Access Denied"
1120
- }), /* @__PURE__ */ l("p", {
1142
+ }), /* @__PURE__ */ c("p", {
1121
1143
  className: "text-sm text-text-secondary",
1122
1144
  children: "You don't have permission to access this page."
1123
1145
  })]
@@ -1125,6 +1147,6 @@ function $e() {
1125
1147
  });
1126
1148
  }
1127
1149
  //#endregion
1128
- export { $e as TargetsPage };
1150
+ export { u as TargetsPage };
1129
1151
 
1130
1152
  //# sourceMappingURL=TargetsPage.js.map