@milabench/bujang 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as e, jsxs as n, Fragment as ce } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as n, Fragment as se } from "react/jsx-runtime";
2
2
  import * as Ho from "react";
3
- import je, { useEffect as se, useMemo as Se, useContext as Ln, createContext as qo, useState as k, useRef as ye, Suspense as Jo, useCallback as jn, useId as Do } from "react";
3
+ import je, { useEffect as ae, useMemo as Se, useContext as Ln, createContext as qo, useState as k, useRef as ye, Suspense as Jo, useCallback as jn, useId as Do } from "react";
4
4
  import { useSearchParams as Yt, Link as Ne, useNavigate as $t, useParams as Hr, useLocation as An, Route as Oo } from "react-router-dom";
5
5
  import Ar from "axios";
6
6
  import { LuList as Bo, LuSend as Mo, LuCalendarClock as Pn, LuWorkflow as Ko, LuBot as qr, LuBrush as Jr, LuSettings as Tn, LuFolderPlus as Uo, LuGitCommitHorizontal as Vo, LuStar as Dr, LuCheck as Fn, LuCopy as Pr, LuChevronDown as Wn, LuChevronRight as En, LuPlug as Nn, LuEyeOff as Go, LuEye as ir, LuCircleCheck as Ut, LuCircleX as Qo, LuPlus as ur, LuRefreshCw as ct, LuTimer as Yo, LuTrash2 as Et, LuInfo as hr, LuTriangleAlert as In, LuClock as Or, LuCalendar as Zo, LuLock as Br, LuX as Mr, LuPaperclip as Xo, LuFileText as ei, LuExternalLink as ti, LuDownload as ri, LuArrowLeft as lr, LuPencil as sr, LuPlay as Hn, LuPower as ni, LuCircleAlert as oi, LuLink as ii, LuPlugZap as li, LuTerminal as si, LuKeyRound as ai, LuFolder as ci, LuDatabase as di, LuActivity as ui, LuServer as hi, LuGauge as mi, LuHistory as pi, LuArchive as gi, LuArrowDown as nn, LuArrowUp as fi } from "react-icons/lu";
7
- import { createToaster as bi, Portal as qn, Toaster as vi, Toast as Lt, Spinner as me, Stack as yi, Tooltip as jt, Button as L, Dialog as U, VStack as H, Text as l, Wrap as ar, Badge as W, Field as N, HStack as y, Input as le, Box as v, Heading as ge, Code as ne, IconButton as nt, Link as vt, Table as a, Group as xi, Card as O, Alert as _, NativeSelect as ee, Grid as et, NumberInput as gt, Checkbox as ve, Icon as zr, Tabs as Pe, Accordion as ie, Flex as kt, SegmentGroup as kr, WrapItem as Ue, Textarea as Jn, Spacer as cr } from "@chakra-ui/react";
7
+ import { createToaster as bi, Portal as qn, Toaster as vi, Toast as Lt, Spinner as me, Stack as yi, Tooltip as jt, Button as L, Dialog as U, VStack as H, Text as l, Wrap as ar, Badge as E, Field as N, HStack as y, Input as le, Box as v, Heading as ge, Code as ne, IconButton as nt, Link as vt, Table as a, Group as xi, Card as O, Alert as _, NativeSelect as ee, Grid as et, NumberInput as gt, Checkbox as ve, Icon as zr, Tabs as Pe, Accordion as ie, Flex as kt, SegmentGroup as kr, WrapItem as Ue, Textarea as Jn, Spacer as cr } from "@chakra-ui/react";
8
8
  import { useQueryClient as ke, useQuery as Q, useMutation as de, useQueries as wi } from "@tanstack/react-query";
9
9
  import Si from "@monaco-editor/react";
10
10
  const mr = "/api/slurm", Dn = Ar.create({ timeout: 1e4 });
@@ -21,7 +21,7 @@ const F = {
21
21
  post: (t, r, o) => Pt.post(ft + t, r, o),
22
22
  put: (t, r, o) => Pt.put(ft + t, r, o),
23
23
  delete: (t, r) => Pt.delete(ft + t, r)
24
- }, E = (t) => {
24
+ }, W = (t) => {
25
25
  var r, o;
26
26
  if (Ar.isCancel(t))
27
27
  throw t;
@@ -40,44 +40,44 @@ const F = {
40
40
  try {
41
41
  return (await F.get("/jobs")).data;
42
42
  } catch (t) {
43
- return E(t);
43
+ return W(t);
44
44
  }
45
45
  }, zi = async () => {
46
46
  try {
47
47
  return (await F.get("/jobs/persited")).data;
48
48
  } catch (t) {
49
- return E(t);
49
+ return W(t);
50
50
  }
51
51
  }, ki = async () => {
52
52
  try {
53
53
  return (await F.get("/status")).data;
54
54
  } catch (t) {
55
- return E(t);
55
+ return W(t);
56
56
  }
57
57
  }, On = async (t) => {
58
58
  try {
59
59
  return (await F.post(`/cancel/${t}`)).data;
60
60
  } catch (r) {
61
- return E(r);
61
+ return W(r);
62
62
  }
63
63
  }, Bn = async (t, r) => {
64
64
  try {
65
65
  const o = r ? `/jobs/${t}/info/${r}` : `/jobs/${t}/info`;
66
66
  return (await F.get(o)).data;
67
67
  } catch (o) {
68
- return E(o);
68
+ return W(o);
69
69
  }
70
70
  }, _i = async (t) => {
71
71
  try {
72
72
  return (await F.get(`/jobs/${t}/stdout/tail`)).data;
73
73
  } catch (r) {
74
- return E(r);
74
+ return W(r);
75
75
  }
76
76
  }, Ri = async (t) => {
77
77
  try {
78
78
  return (await F.get(`/jobs/${t}/stderr/tail`)).data;
79
79
  } catch (r) {
80
- return E(r);
80
+ return W(r);
81
81
  }
82
82
  }, $i = async (t) => {
83
83
  try {
@@ -86,7 +86,7 @@ const F = {
86
86
  throw new Error("Invalid size response from server");
87
87
  return o;
88
88
  } catch (r) {
89
- return E(r);
89
+ return W(r);
90
90
  }
91
91
  }, Li = async (t) => {
92
92
  try {
@@ -95,7 +95,7 @@ const F = {
95
95
  throw new Error("Invalid size response from server");
96
96
  return o;
97
97
  } catch (r) {
98
- return E(r);
98
+ return W(r);
99
99
  }
100
100
  }, ji = async (t, r, o) => {
101
101
  try {
@@ -104,7 +104,7 @@ const F = {
104
104
  const s = await F.get(i);
105
105
  return typeof s.data == "object" && "data" in s.data ? s.data.data : s.data;
106
106
  } catch (i) {
107
- return E(i);
107
+ return W(i);
108
108
  }
109
109
  }, Ai = async (t, r, o) => {
110
110
  try {
@@ -113,103 +113,103 @@ const F = {
113
113
  const s = await F.get(i);
114
114
  return typeof s.data == "object" && "data" in s.data ? s.data.data : s.data;
115
115
  } catch (i) {
116
- return E(i);
116
+ return W(i);
117
117
  }
118
118
  }, Va = async (t) => {
119
119
  try {
120
120
  return (await F.get(`/jobs/${t}`)).data;
121
121
  } catch (r) {
122
- return E(r);
122
+ return W(r);
123
123
  }
124
124
  }, Pi = async (t, r) => {
125
125
  try {
126
126
  return (await F.get(`/jobs/${t}/acc/${r}`)).data;
127
127
  } catch (o) {
128
- return E(o);
128
+ return W(o);
129
129
  }
130
130
  }, Ga = async () => {
131
131
  try {
132
132
  return (await F.get("/cluster")).data;
133
133
  } catch (t) {
134
- return E(t);
134
+ return W(t);
135
135
  }
136
136
  }, pr = async () => {
137
137
  try {
138
138
  return (await F.get("/templates")).data;
139
139
  } catch (t) {
140
- return E(t);
140
+ return W(t);
141
141
  }
142
142
  }, Mn = async (t) => {
143
143
  try {
144
144
  return (await F.get(`/templates/${t}`)).data.content;
145
145
  } catch (r) {
146
- return E(r);
146
+ return W(r);
147
147
  }
148
148
  }, Kn = async (t) => {
149
149
  try {
150
150
  return (await F.post("/save-template", t)).data;
151
151
  } catch (r) {
152
- return E(r);
152
+ return W(r);
153
153
  }
154
154
  }, Ur = async () => {
155
155
  try {
156
156
  return (await F.get("/profiles")).data;
157
157
  } catch (t) {
158
- return E(t);
158
+ return W(t);
159
159
  }
160
160
  }, Ti = async () => {
161
161
  try {
162
162
  return (await F.get("/clusters")).data;
163
163
  } catch (t) {
164
- return E(t);
164
+ return W(t);
165
165
  }
166
166
  }, Un = async (t) => {
167
167
  try {
168
168
  return (await F.post("/save-profile", t)).data;
169
169
  } catch (r) {
170
- return E(r);
170
+ return W(r);
171
171
  }
172
172
  }, Fi = async (t) => {
173
173
  try {
174
174
  return (await F.post("/submit", t)).data;
175
175
  } catch (r) {
176
- return E(r);
176
+ return W(r);
177
177
  }
178
178
  }, Wi = async (t) => {
179
179
  try {
180
180
  return (await F.get(`/jobs/${t}/cluster`)).data;
181
181
  } catch (r) {
182
- return E(r);
182
+ return W(r);
183
183
  }
184
184
  }, Ei = async (t) => {
185
185
  try {
186
186
  return (await F.get(`/jobs/${t}/script`)).data;
187
187
  } catch (r) {
188
- return E(r);
188
+ return W(r);
189
189
  }
190
190
  }, Vn = async (t) => {
191
191
  try {
192
192
  return (await F.get(`/rerun/${t}`)).data;
193
193
  } catch (r) {
194
- return E(r);
194
+ return W(r);
195
195
  }
196
196
  }, Ni = async (t) => {
197
197
  try {
198
198
  return (await F.get(`/jobs/${encodeURIComponent(t)}/marks`)).data;
199
199
  } catch (r) {
200
- return E(r);
200
+ return W(r);
201
201
  }
202
202
  }, Gn = async (t, r) => {
203
203
  try {
204
204
  return (await F.post(`/jobs/${encodeURIComponent(t)}/marks`, r)).data;
205
205
  } catch (o) {
206
- return E(o);
206
+ return W(o);
207
207
  }
208
208
  }, Ii = async (t, r) => {
209
209
  try {
210
210
  return (await F.get(`/job/save/${t}/${encodeURIComponent(r)}`)).data;
211
211
  } catch (o) {
212
- return E(o);
212
+ return W(o);
213
213
  }
214
214
  }, Hi = async (t) => {
215
215
  try {
@@ -227,37 +227,37 @@ const F = {
227
227
  try {
228
228
  return (await F.post("/secrets/set", { key: t, value: r })).data;
229
229
  } catch (o) {
230
- return E(o);
230
+ return W(o);
231
231
  }
232
232
  }, Ji = async (t) => {
233
233
  try {
234
234
  return (await F.delete(`/secrets/delete/${encodeURIComponent(t)}`)).data;
235
235
  } catch (r) {
236
- return E(r);
236
+ return W(r);
237
237
  }
238
238
  }, Qn = async () => {
239
239
  try {
240
240
  return (await F.get("/settings")).data;
241
241
  } catch (t) {
242
- return E(t);
242
+ return W(t);
243
243
  }
244
244
  }, Yn = async (t) => {
245
245
  try {
246
246
  return (await F.put("/settings", t)).data;
247
247
  } catch (r) {
248
- return E(r);
248
+ return W(r);
249
249
  }
250
250
  }, Di = async (t) => {
251
251
  try {
252
252
  return (await F.get(`/jobs/${encodeURIComponent(t)}/artifacts`, { timeout: 3e4 })).data;
253
253
  } catch (r) {
254
- return E(r);
254
+ return W(r);
255
255
  }
256
256
  }, Oi = (t, r) => `${ft}/jobs/${encodeURIComponent(t)}/artifacts/${r.split("/").map(encodeURIComponent).join("/")}`, Bi = async (t) => {
257
257
  try {
258
258
  return (await F.get(`/jobs/${encodeURIComponent(t)}/data`, { timeout: 6e4 })).data;
259
259
  } catch (r) {
260
- return E(r);
260
+ return W(r);
261
261
  }
262
262
  }, Zn = (t) => {
263
263
  var o, i, s, d;
@@ -267,218 +267,218 @@ const F = {
267
267
  try {
268
268
  return (await F.get(`/jobs/${encodeURIComponent(t)}/data/rows?${Zn(r)}`, { timeout: 12e4 })).data;
269
269
  } catch (o) {
270
- return E(o);
270
+ return W(o);
271
271
  }
272
272
  }, Ki = (t, r) => `${ft}/jobs/${encodeURIComponent(t)}/data/rows?${Zn(r)}`, Ui = async () => {
273
273
  try {
274
274
  return (await F.get("/sync")).data;
275
275
  } catch (t) {
276
- return E(t);
276
+ return W(t);
277
277
  }
278
278
  }, Vi = async () => {
279
279
  try {
280
280
  return (await F.post("/sync", {}, { timeout: 12e4 })).data;
281
281
  } catch (t) {
282
- return E(t);
282
+ return W(t);
283
283
  }
284
284
  }, Gi = async () => {
285
285
  try {
286
286
  return (await F.get("/organizers")).data;
287
287
  } catch (t) {
288
- return E(t);
288
+ return W(t);
289
289
  }
290
290
  }, Ya = async (t = !1) => {
291
291
  try {
292
292
  return (await F.get("/update", { params: { force: t ? 1 : void 0 } })).data;
293
293
  } catch (r) {
294
- return E(r);
294
+ return W(r);
295
295
  }
296
296
  }, Za = async () => {
297
297
  try {
298
298
  return (await F.post("/update", {}, { timeout: 66e4 })).data;
299
299
  } catch (t) {
300
- return E(t);
300
+ return W(t);
301
301
  }
302
302
  }, Qi = async () => {
303
303
  try {
304
304
  return (await F.get("/settings/secrets")).data;
305
305
  } catch (t) {
306
- return E(t);
306
+ return W(t);
307
307
  }
308
308
  }, Yi = async (t) => {
309
309
  try {
310
310
  return (await F.get("/settings/ssh", { params: { file: t || void 0 } })).data;
311
311
  } catch (r) {
312
- return E(r);
312
+ return W(r);
313
313
  }
314
314
  }, Zi = async (t) => {
315
315
  try {
316
316
  return (await F.post("/settings/ssh/plan", t)).data;
317
317
  } catch (r) {
318
- return E(r);
318
+ return W(r);
319
319
  }
320
320
  }, Xi = async (t) => {
321
321
  try {
322
322
  return (await F.post("/settings/ssh/install", t)).data;
323
323
  } catch (r) {
324
- return E(r);
324
+ return W(r);
325
325
  }
326
326
  }, el = async (t) => {
327
327
  try {
328
328
  return (await F.post("/settings/ssh/remove", t)).data;
329
329
  } catch (r) {
330
- return E(r);
330
+ return W(r);
331
331
  }
332
332
  }, tl = async (t = {}) => {
333
333
  const r = t.timeout ?? 10;
334
334
  try {
335
335
  return (await F.post("/settings/ssh/test", t, { timeout: (3 * (r + 5) + 10) * 1e3 })).data;
336
336
  } catch (o) {
337
- return E(o);
337
+ return W(o);
338
338
  }
339
339
  }, Vr = async (t) => {
340
340
  try {
341
341
  return (await F.get("/ssh/connections", { params: { cluster: t || void 0 } })).data;
342
342
  } catch (r) {
343
- return E(r);
343
+ return W(r);
344
344
  }
345
345
  }, rl = async (t) => {
346
346
  try {
347
347
  return (await F.post("/ssh/login", t)).data;
348
348
  } catch (r) {
349
- return E(r);
349
+ return W(r);
350
350
  }
351
351
  }, nl = async (t) => {
352
352
  try {
353
353
  return (await F.get(`/ssh/login/${encodeURIComponent(t)}`)).data;
354
354
  } catch (r) {
355
- return E(r);
355
+ return W(r);
356
356
  }
357
357
  }, ol = async (t, r) => {
358
358
  try {
359
359
  return (await F.post(`/ssh/login/${encodeURIComponent(t)}/answer`, { answer: r })).data;
360
360
  } catch (o) {
361
- return E(o);
361
+ return W(o);
362
362
  }
363
363
  }, on = async (t) => {
364
364
  try {
365
365
  return (await F.post(`/ssh/login/${encodeURIComponent(t)}/cancel`, {})).data;
366
366
  } catch (r) {
367
- return E(r);
367
+ return W(r);
368
368
  }
369
369
  }, il = async () => {
370
370
  try {
371
371
  return (await F.get("/pipeline/template/list")).data;
372
372
  } catch (t) {
373
- return E(t);
373
+ return W(t);
374
374
  }
375
375
  }, ll = async (t) => {
376
376
  try {
377
377
  return (await F.post("/pipeline/template/save", t)).data;
378
378
  } catch (r) {
379
- return E(r);
379
+ return W(r);
380
380
  }
381
381
  }, sl = async (t) => {
382
382
  try {
383
383
  return (await F.post(`/pipeline/run/${encodeURIComponent(t)}`, { context: {} })).data;
384
384
  } catch (r) {
385
- return E(r);
385
+ return W(r);
386
386
  }
387
387
  }, al = async () => {
388
388
  try {
389
389
  return (await F.get("/pipeline/runs")).data;
390
390
  } catch (t) {
391
- return E(t);
391
+ return W(t);
392
392
  }
393
393
  }, Xn = async (t) => {
394
394
  try {
395
395
  return (await F.get(`/pipeline/runs/${encodeURIComponent(t)}`, { timeout: 6e4 })).data;
396
396
  } catch (r) {
397
- return E(r);
397
+ return W(r);
398
398
  }
399
399
  }, eo = async (t) => {
400
400
  try {
401
401
  return (await F.get(`/pipeline/template/load/${t}`)).data;
402
402
  } catch (r) {
403
- return E(r);
403
+ return W(r);
404
404
  }
405
405
  }, cl = async (t) => {
406
406
  try {
407
407
  return (await F.get(`/jobs/${t}/ssh/status`, { timeout: 3e4 })).data;
408
408
  } catch (r) {
409
- return E(r);
409
+ return W(r);
410
410
  }
411
411
  }, dl = async (t, r) => {
412
412
  try {
413
413
  return (await F.get(`/jobs/${t}/status/${r}`)).data;
414
414
  } catch (o) {
415
- return E(o);
415
+ return W(o);
416
416
  }
417
417
  }, ul = async (t, r) => {
418
418
  try {
419
419
  return (await F.get(`/jobs/${t}/earlysync/${r}`)).data;
420
420
  } catch (o) {
421
- return E(o);
421
+ return W(o);
422
422
  }
423
423
  }, hl = async () => {
424
424
  try {
425
425
  return (await F.get("/scheduled/list")).data;
426
426
  } catch (t) {
427
- return E(t);
427
+ return W(t);
428
428
  }
429
429
  }, ml = async (t) => {
430
430
  try {
431
431
  return (await F.post("/scheduled/create", t)).data;
432
432
  } catch (r) {
433
- return E(r);
433
+ return W(r);
434
434
  }
435
435
  }, pl = async (t, r) => {
436
436
  try {
437
437
  return (await F.put(`/scheduled/${t}`, r)).data;
438
438
  } catch (o) {
439
- return E(o);
439
+ return W(o);
440
440
  }
441
441
  }, gl = async (t) => {
442
442
  try {
443
443
  return (await F.delete(`/scheduled/${t}`)).data;
444
444
  } catch (r) {
445
- return E(r);
445
+ return W(r);
446
446
  }
447
447
  }, fl = async (t) => {
448
448
  try {
449
449
  return (await F.post(`/scheduled/${t}/toggle`)).data;
450
450
  } catch (r) {
451
- return E(r);
451
+ return W(r);
452
452
  }
453
453
  }, bl = async (t) => {
454
454
  try {
455
455
  return (await F.post(`/scheduled/${t}/run-now`)).data;
456
456
  } catch (r) {
457
- return E(r);
457
+ return W(r);
458
458
  }
459
459
  }, vl = async (t) => {
460
460
  try {
461
461
  return (await F.get(`/scheduled/${t}/runs`)).data;
462
462
  } catch (r) {
463
- return E(r);
463
+ return W(r);
464
464
  }
465
465
  }, yl = async (t) => {
466
466
  try {
467
467
  return (await F.get(`/scheduled/${t}/template-diff`)).data;
468
468
  } catch (r) {
469
- return E(r);
469
+ return W(r);
470
470
  }
471
471
  }, xl = async (t) => {
472
472
  try {
473
473
  return (await F.post(`/scheduled/${t}/sync-template`)).data;
474
474
  } catch (r) {
475
- return E(r);
475
+ return W(r);
476
476
  }
477
477
  }, wl = async () => {
478
478
  try {
479
479
  return (await F.get("/agent/sessions")).data;
480
480
  } catch (t) {
481
- return E(t);
481
+ return W(t);
482
482
  }
483
483
  }, Sl = async (t = {}) => {
484
484
  try {
@@ -490,7 +490,7 @@ const F = {
490
490
  }
491
491
  })).data;
492
492
  } catch (r) {
493
- return E(r);
493
+ return W(r);
494
494
  }
495
495
  }, Cl = (t, r = t.name) => new Promise((o, i) => {
496
496
  const s = new FileReader();
@@ -502,37 +502,37 @@ const F = {
502
502
  try {
503
503
  return (await F.get("/janitor")).data;
504
504
  } catch (t) {
505
- return E(t);
505
+ return W(t);
506
506
  }
507
507
  }, kl = async (t = {}) => {
508
508
  try {
509
509
  return (await F.get("/janitor/history", { params: t })).data;
510
510
  } catch (r) {
511
- return E(r);
511
+ return W(r);
512
512
  }
513
513
  }, _l = async () => {
514
514
  try {
515
515
  return (await F.get("/janitor/cleanup")).data;
516
516
  } catch (t) {
517
- return E(t);
517
+ return W(t);
518
518
  }
519
519
  }, ln = async (t) => {
520
520
  try {
521
521
  return (await F.post("/janitor/archive", t)).data;
522
522
  } catch (r) {
523
- return E(r);
523
+ return W(r);
524
524
  }
525
525
  }, sn = async (t) => {
526
526
  try {
527
527
  return (await F.post("/janitor/remove-stale", t)).data;
528
528
  } catch (r) {
529
- return E(r);
529
+ return W(r);
530
530
  }
531
531
  }, Rl = async () => {
532
532
  try {
533
533
  return (await F.post("/janitor/prune")).data;
534
534
  } catch (t) {
535
- return E(t);
535
+ return W(t);
536
536
  }
537
537
  }, an = {
538
538
  jobs: "/jobs",
@@ -613,7 +613,7 @@ function ec({
613
613
  mcpUrl: u,
614
614
  children: g
615
615
  }) {
616
- _r({ apiBase: t, axios: r }), Rr(s), se(() => (_r({ apiBase: t, axios: r }), Rr(s), () => {
616
+ _r({ apiBase: t, axios: r }), Rr(s), ae(() => (_r({ apiBase: t, axios: r }), Rr(s), () => {
617
617
  _r(), Rr(void 0);
618
618
  }), [t, r, s]);
619
619
  const p = Se(() => ({
@@ -698,7 +698,7 @@ const he = Ho.forwardRef(
698
698
  );
699
699
  }, Al = ({ jrJobId: t }) => {
700
700
  const { marks: r, update: o, isUpdating: i } = io(t), [s, d] = k(!1), [h, c] = k([]), [u, g] = k(""), [p, m] = k(""), [x, C] = k(!1);
701
- se(() => {
701
+ ae(() => {
702
702
  s && r && (c(r.groups), g(""), m(""));
703
703
  }, [s, r]);
704
704
  const f = Object.keys((r == null ? void 0 : r.all_groups) || {}), S = [.../* @__PURE__ */ new Set([...f, ...h])].sort(), R = (z) => c((Y) => Y.includes(z) ? Y.filter((oe) => oe !== z) : [...Y, z]), A = () => {
@@ -721,7 +721,7 @@ const he = Ho.forwardRef(
721
721
  }
722
722
  }
723
723
  }, te = (r == null ? void 0 : r.groups.length) || 0;
724
- return /* @__PURE__ */ n(ce, { children: [
724
+ return /* @__PURE__ */ n(se, { children: [
725
725
  /* @__PURE__ */ n(L, { variant: "outline", colorPalette: "purple", onClick: () => d(!0), disabled: !r, title: "Add the job to groups", children: [
726
726
  /* @__PURE__ */ e(Uo, {}),
727
727
  "Groups",
@@ -751,7 +751,7 @@ const he = Ho.forwardRef(
751
751
  onClick: () => R(z),
752
752
  children: [
753
753
  z,
754
- !!(r != null && r.all_groups[z]) && /* @__PURE__ */ e(W, { size: "xs", variant: "subtle", title: "jobs in this group", children: r.all_groups[z] })
754
+ !!(r != null && r.all_groups[z]) && /* @__PURE__ */ e(E, { size: "xs", variant: "subtle", title: "jobs in this group", children: r.all_groups[z] })
755
755
  ]
756
756
  },
757
757
  z
@@ -835,7 +835,7 @@ const he = Ho.forwardRef(
835
835
  );
836
836
  };
837
837
  function Tl(t, r) {
838
- se(() => {
838
+ ae(() => {
839
839
  if (t === null) return;
840
840
  const o = document.title;
841
841
  return document.title = t ? `${t} - ${r}` : r, () => {
@@ -866,7 +866,7 @@ function lo(t, r, o) {
866
866
  }
867
867
  const un = ({ tag: t }) => {
868
868
  const r = De();
869
- return t ? /* @__PURE__ */ e(he, { content: t.reason ? `${t.agent}: ${t.reason}` : t.agent, showArrow: !0, children: /* @__PURE__ */ e(Ne, { to: r.agent(t.session), children: /* @__PURE__ */ n(W, { colorPalette: "purple", variant: "subtle", ml: 2, children: [
869
+ return t ? /* @__PURE__ */ e(he, { content: t.reason ? `${t.agent}: ${t.reason}` : t.agent, showArrow: !0, children: /* @__PURE__ */ e(Ne, { to: r.agent(t.session), children: /* @__PURE__ */ n(E, { colorPalette: "purple", variant: "subtle", ml: 2, children: [
870
870
  /* @__PURE__ */ e(qr, {}),
871
871
  " ",
872
872
  t.agent
@@ -965,23 +965,23 @@ const Il = () => {
965
965
  ] }),
966
966
  /* @__PURE__ */ e(l, { fontFamily: "mono", fontSize: "xs", color: "var(--color-text-muted)", children: t.session }),
967
967
  /* @__PURE__ */ n(y, { gap: 1, mt: 1, wrap: "wrap", children: [
968
- /* @__PURE__ */ n(W, { size: "sm", children: [
968
+ /* @__PURE__ */ n(E, { size: "sm", children: [
969
969
  t.calls,
970
970
  " calls"
971
971
  ] }),
972
- t.writes > 0 && /* @__PURE__ */ n(W, { size: "sm", colorPalette: "blue", children: [
972
+ t.writes > 0 && /* @__PURE__ */ n(E, { size: "sm", colorPalette: "blue", children: [
973
973
  t.writes,
974
974
  " actions"
975
975
  ] }),
976
- t.jobs.length > 0 && /* @__PURE__ */ n(W, { size: "sm", colorPalette: "purple", children: [
976
+ t.jobs.length > 0 && /* @__PURE__ */ n(E, { size: "sm", colorPalette: "purple", children: [
977
977
  t.jobs.length,
978
978
  " jobs"
979
979
  ] }),
980
- t.pipelines.length > 0 && /* @__PURE__ */ n(W, { size: "sm", colorPalette: "purple", children: [
980
+ t.pipelines.length > 0 && /* @__PURE__ */ n(E, { size: "sm", colorPalette: "purple", children: [
981
981
  t.pipelines.length,
982
982
  " pipelines"
983
983
  ] }),
984
- t.errors > 0 && /* @__PURE__ */ n(W, { size: "sm", colorPalette: "red", children: [
984
+ t.errors > 0 && /* @__PURE__ */ n(E, { size: "sm", colorPalette: "red", children: [
985
985
  t.errors,
986
986
  " errors"
987
987
  ] })
@@ -993,7 +993,7 @@ const Il = () => {
993
993
  const r = De();
994
994
  if (!t) return null;
995
995
  const o = t.jr_job_id, i = t.run_id, s = t.template ?? t.name;
996
- return /* @__PURE__ */ n(ce, { children: [
996
+ return /* @__PURE__ */ n(se, { children: [
997
997
  o && /* @__PURE__ */ e(vt, { asChild: !0, color: "var(--color-link, #3182ce)", fontFamily: "mono", fontSize: "sm", children: /* @__PURE__ */ n(Ne, { to: lo(r, o, t.job_id), children: [
998
998
  o,
999
999
  t.job_id ? ` (${String(t.job_id)})` : ""
@@ -1010,7 +1010,7 @@ const Il = () => {
1010
1010
  const c = Fl[t.level || "info"] || "gray";
1011
1011
  return /* @__PURE__ */ n(v, { p: 3, borderLeftWidth: "4px", borderLeftColor: `${c}.400`, bg: "var(--color-bg-stripe)", borderRadius: "sm", children: [
1012
1012
  /* @__PURE__ */ n(y, { gap: 2, mb: 1, children: [
1013
- /* @__PURE__ */ e(W, { colorPalette: c, children: t.level || "note" }),
1013
+ /* @__PURE__ */ e(E, { colorPalette: c, children: t.level || "note" }),
1014
1014
  /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", children: dn(t.ts) }),
1015
1015
  r && /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", children: t.agent })
1016
1016
  ] }),
@@ -1031,7 +1031,7 @@ const Il = () => {
1031
1031
  children: [
1032
1032
  /* @__PURE__ */ n(y, { gap: 2, wrap: "wrap", children: [
1033
1033
  d ? /* @__PURE__ */ e(L, { size: "xs", variant: "ghost", onClick: () => i(!o), px: 1, children: o ? /* @__PURE__ */ e(Wn, {}) : /* @__PURE__ */ e(En, {}) }) : /* @__PURE__ */ e(v, { w: "24px" }),
1034
- /* @__PURE__ */ e(W, { colorPalette: t.ok ? t.write ? "blue" : "gray" : "red", children: t.tool || t.method }),
1034
+ /* @__PURE__ */ e(E, { colorPalette: t.ok ? t.write ? "blue" : "gray" : "red", children: t.tool || t.method }),
1035
1035
  /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", children: dn(t.ts) }),
1036
1036
  r && /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", children: t.agent }),
1037
1037
  /* @__PURE__ */ n(ne, { fontSize: "xs", children: [
@@ -1108,13 +1108,13 @@ const Il = () => {
1108
1108
  bg: "var(--color-input-bg)",
1109
1109
  borderColor: "var(--color-input-border)",
1110
1110
  color: "var(--color-text)"
1111
- }, Bl = ({ master: t }) => t === "open" ? /* @__PURE__ */ e(W, { colorPalette: "green", variant: "subtle", children: "connected" }) : t === "none" ? /* @__PURE__ */ e(W, { colorPalette: "gray", variant: "subtle", title: "The ssh config keeps no shared connection (ControlMaster) for this host: each ssh connects on its own", children: "no shared connection" }) : /* @__PURE__ */ e(W, { colorPalette: "orange", variant: "subtle", children: "not connected" }), Ml = ({ login: t, onRetry: r, onCancel: o }) => {
1111
+ }, Bl = ({ master: t }) => t === "open" ? /* @__PURE__ */ e(E, { colorPalette: "green", variant: "subtle", children: "connected" }) : t === "none" ? /* @__PURE__ */ e(E, { colorPalette: "gray", variant: "subtle", title: "The ssh config keeps no shared connection (ControlMaster) for this host: each ssh connects on its own", children: "no shared connection" }) : /* @__PURE__ */ e(E, { colorPalette: "orange", variant: "subtle", children: "not connected" }), Ml = ({ login: t, onRetry: r, onCancel: o }) => {
1112
1112
  const [i, s] = k(""), [d, h] = k(!1), c = ye(null), u = de({
1113
1113
  mutationFn: (m) => ol(t.id, m),
1114
1114
  onSuccess: () => s(""),
1115
1115
  onError: (m) => I.create({ title: "Could not send the answer", description: Wr(m), type: "error" })
1116
1116
  });
1117
- se(() => {
1117
+ ae(() => {
1118
1118
  var m;
1119
1119
  t.state === "prompt" && ((m = c.current) == null || m.focus());
1120
1120
  }, [t.state, t.prompts]);
@@ -1212,11 +1212,11 @@ const Il = () => {
1212
1212
  },
1213
1213
  onError: (j) => I.create({ title: "Could not start the ssh login", description: Wr(j), type: "error" })
1214
1214
  });
1215
- se(() => {
1215
+ ae(() => {
1216
1216
  t && o && !c.current && (c.current = !0, x.mutate({ cluster: o })), t || (c.current = !1, h(null));
1217
1217
  }, [t, o]);
1218
1218
  const C = ye(null);
1219
- se(() => {
1219
+ ae(() => {
1220
1220
  !m || m.state === C.current || (C.current = m.state, Tt.includes(m.state) || s.invalidateQueries({ queryKey: Fr }), m.state === "ok" && o && m.cluster === o && i && i());
1221
1221
  }, [m, o, i, s]);
1222
1222
  const f = () => {
@@ -1260,7 +1260,7 @@ const Il = () => {
1260
1260
  /* @__PURE__ */ e(a.Cell, { children: j.cluster }),
1261
1261
  /* @__PURE__ */ n(a.Cell, { fontFamily: "mono", fontSize: "xs", children: [
1262
1262
  j.host,
1263
- !j.login_node && /* @__PURE__ */ e(W, { ml: 2, size: "xs", variant: "outline", children: "data mover" })
1263
+ !j.login_node && /* @__PURE__ */ e(E, { ml: 2, size: "xs", variant: "outline", children: "data mover" })
1264
1264
  ] }),
1265
1265
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(Bl, { master: j.master }) }),
1266
1266
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: /* @__PURE__ */ n(
@@ -1293,8 +1293,8 @@ const Il = () => {
1293
1293
  refetchOnWindowFocus: !1,
1294
1294
  retry: !1
1295
1295
  }), s = ((o == null ? void 0 : o.hosts) || []).filter((c) => c.login_node).filter((c) => c.master !== "none"), d = s.filter((c) => c.master === "open").length, h = s.length - d;
1296
- return /* @__PURE__ */ n(ce, { children: [
1297
- /* @__PURE__ */ n(
1296
+ return /* @__PURE__ */ n(se, { children: [
1297
+ /* @__PURE__ */ e(
1298
1298
  L,
1299
1299
  {
1300
1300
  size: "sm",
@@ -1302,11 +1302,24 @@ const Il = () => {
1302
1302
  borderRadius: "full",
1303
1303
  onClick: () => r(!0),
1304
1304
  title: o ? `${d} of ${s.length} clusters connected${h ? ": log in to the others" : ""}` : "Open the ssh connections of the clusters",
1305
- children: [
1305
+ children: d > 0 ? /* @__PURE__ */ n(se, { children: [
1306
+ /* @__PURE__ */ e(
1307
+ v,
1308
+ {
1309
+ as: "span",
1310
+ w: "8px",
1311
+ h: "8px",
1312
+ borderRadius: "full",
1313
+ flexShrink: 0,
1314
+ bg: "var(--color-status-running, #22c55e)"
1315
+ }
1316
+ ),
1317
+ d,
1318
+ " connected"
1319
+ ] }) : /* @__PURE__ */ n(se, { children: [
1306
1320
  /* @__PURE__ */ e(Nn, {}),
1307
- "Connect",
1308
- d > 0 && /* @__PURE__ */ e(W, { colorPalette: "green", variant: "solid", size: "xs", ml: 1, children: d })
1309
- ]
1321
+ "Connect"
1322
+ ] })
1310
1323
  }
1311
1324
  ),
1312
1325
  /* @__PURE__ */ e(so, { open: t, onClose: () => r(!1) })
@@ -1660,7 +1673,7 @@ const Yl = (t, r) => {
1660
1673
  children: /* @__PURE__ */ n(y, { justify: "space-between", align: "center", children: [
1661
1674
  /* @__PURE__ */ e(ge, { size: "md", fontWeight: "semibold", color: "var(--color-text)", children: "Active Jobs" }),
1662
1675
  /* @__PURE__ */ e(
1663
- W,
1676
+ E,
1664
1677
  {
1665
1678
  colorScheme: "blue",
1666
1679
  variant: "subtle",
@@ -1713,7 +1726,7 @@ const Yl = (t, r) => {
1713
1726
  ] }) }),
1714
1727
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ n(y, { gap: 2, children: [
1715
1728
  mn(((J = b.job_state) == null ? void 0 : J[0]) || ""),
1716
- /* @__PURE__ */ e(W, { colorScheme: hn(((M = b.job_state) == null ? void 0 : M[0]) || ""), children: ((X = b.job_state) == null ? void 0 : X[0]) || ao })
1729
+ /* @__PURE__ */ e(E, { colorScheme: hn(((M = b.job_state) == null ? void 0 : M[0]) || ""), children: ((X = b.job_state) == null ? void 0 : X[0]) || ao })
1717
1730
  ] }) }),
1718
1731
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(l, { color: "var(--color-text)", fontSize: "sm", children: "mila" }) }),
1719
1732
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(l, { color: "var(--color-text)", children: b.partition || "N/A" }) }),
@@ -1796,7 +1809,7 @@ const Yl = (t, r) => {
1796
1809
  children: /* @__PURE__ */ n(y, { justify: "space-between", align: "center", children: [
1797
1810
  /* @__PURE__ */ e(ge, { size: "md", fontWeight: "semibold", color: "var(--color-text)", children: "Persisted Jobs" }),
1798
1811
  /* @__PURE__ */ e(
1799
- W,
1812
+ E,
1800
1813
  {
1801
1814
  colorScheme: "purple",
1802
1815
  variant: "subtle",
@@ -1818,7 +1831,7 @@ const Yl = (t, r) => {
1818
1831
  ] }) : f ? /* @__PURE__ */ n(v, { textAlign: "center", py: 12, children: [
1819
1832
  /* @__PURE__ */ e(me, { size: "lg", color: "var(--color-primary)" }),
1820
1833
  /* @__PURE__ */ e(l, { mt: 4, color: "var(--color-text-muted)", fontSize: "sm", children: "Loading persisted jobs..." })
1821
- ] }) : /* @__PURE__ */ e(ce, { children: $e.length === 0 ? /* @__PURE__ */ n(v, { textAlign: "center", py: 12, children: [
1834
+ ] }) : /* @__PURE__ */ e(se, { children: $e.length === 0 ? /* @__PURE__ */ n(v, { textAlign: "center", py: 12, children: [
1822
1835
  /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", fontSize: "md", children: "No persisted jobs found" }),
1823
1836
  /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", fontSize: "sm", mt: 2, children: "Completed jobs will appear here" })
1824
1837
  ] }) : /* @__PURE__ */ n(a.Root, { variant: "line", size: "md", stickyHeader: !0, children: [
@@ -1838,11 +1851,11 @@ const Yl = (t, r) => {
1838
1851
  const J = b.info, M = b.acc, X = b.name, ue = ((Be = M == null ? void 0 : M.job_id) == null ? void 0 : Be.toString()) || J.job_id || "-", Oe = (M == null ? void 0 : M.name) || J.name || J.job_name || "Persisted Job", Ae = ((St = (wt = M == null ? void 0 : M.state) == null ? void 0 : wt.current) == null ? void 0 : St[0]) || ((tt = J.job_state) == null ? void 0 : tt[0]) || "PENDING", Le = (M == null ? void 0 : M.partition) || J.partition || "N/A", We = (M == null ? void 0 : M.user) || J.user_name || J.user || "N/A", Ge = 336 * 60 * 60, Qe = Math.min(b.freshness / Ge, 1), Ye = (Ce) => {
1839
1852
  if (Ce <= 0) return i;
1840
1853
  if (Ce >= 1) return s;
1841
- const P = d(i), ae = d(s), be = Math.round(P[0] + (ae[0] - P[0]) * Ce), qe = Math.round(P[1] + (ae[1] - P[1]) * Ce), it = Math.round(P[2] + (ae[2] - P[2]) * Ce);
1854
+ const P = d(i), ce = d(s), be = Math.round(P[0] + (ce[0] - P[0]) * Ce), qe = Math.round(P[1] + (ce[1] - P[1]) * Ce), it = Math.round(P[2] + (ce[2] - P[2]) * Ce);
1842
1855
  return `rgb(${be}, ${qe}, ${it})`;
1843
1856
  }, Ze = (Ce) => {
1844
- const P = Math.floor(Ce / 86400), ae = Math.floor(Ce % (1440 * 60) / 3600), be = Math.floor(Ce % 3600 / 60);
1845
- return P > 0 ? `${P}d ${ae}h ${be}m ago` : ae > 0 ? `${ae}h ${be}m ago` : `${be}m ago`;
1857
+ const P = Math.floor(Ce / 86400), ce = Math.floor(Ce % (1440 * 60) / 3600), be = Math.floor(Ce % 3600 / 60);
1858
+ return P > 0 ? `${P}d ${ce}h ${be}m ago` : ce > 0 ? `${ce}h ${be}m ago` : `${be}m ago`;
1846
1859
  };
1847
1860
  let Ie = "N/A";
1848
1861
  return (dt = (Ct = M == null ? void 0 : M.time) == null ? void 0 : Ct.limit) != null && dt.number ? Ie = `${M.time.limit.number}min` : typeof J.time_limit == "string" ? Ie = J.time_limit : (ut = J.time_limit) != null && ut.number && (Ie = `${J.time_limit.number}min`), /* @__PURE__ */ n(
@@ -1881,7 +1894,7 @@ const Yl = (t, r) => {
1881
1894
  /* @__PURE__ */ e(un, { tag: b.agent })
1882
1895
  ] }),
1883
1896
  (b.groups || []).map((Ce) => /* @__PURE__ */ e(
1884
- W,
1897
+ E,
1885
1898
  {
1886
1899
  size: "sm",
1887
1900
  variant: "subtle",
@@ -1896,7 +1909,7 @@ const Yl = (t, r) => {
1896
1909
  ] }) }),
1897
1910
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ n(y, { gap: 2, children: [
1898
1911
  mn(Ae),
1899
- /* @__PURE__ */ e(W, { colorScheme: hn(Ae), children: Ae })
1912
+ /* @__PURE__ */ e(E, { colorScheme: hn(Ae), children: Ae })
1900
1913
  ] }) }),
1901
1914
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(l, { color: "var(--color-text)", fontSize: "sm", children: b.cluster || "mila" }) }),
1902
1915
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(l, { color: "var(--color-text)", children: Le }) }),
@@ -1961,7 +1974,7 @@ const Yl = (t, r) => {
1961
1974
  };
1962
1975
  function Yr() {
1963
1976
  const { colorMode: t } = gr(), [r, o] = k($r);
1964
- return se(() => {
1977
+ return ae(() => {
1965
1978
  if (t || typeof MutationObserver > "u") return;
1966
1979
  const i = new MutationObserver(() => o($r()));
1967
1980
  return i.observe(document.documentElement, {
@@ -2083,14 +2096,14 @@ const fr = ({ value: t, onChange: r, onMount: o, height: i = "400px", language:
2083
2096
  renderSuggestion: g
2084
2097
  }) => {
2085
2098
  const [p, m] = k(t), [x, C] = k(!1), [f, S] = k(-1), R = ye(null);
2086
- se(() => {
2099
+ ae(() => {
2087
2100
  const q = (D) => {
2088
2101
  R.current && !R.current.contains(D.target) && (C(!1), S(-1));
2089
2102
  };
2090
2103
  return document.addEventListener("mousedown", q), () => {
2091
2104
  document.removeEventListener("mousedown", q);
2092
2105
  };
2093
- }, []), se(() => {
2106
+ }, []), ae(() => {
2094
2107
  m(t);
2095
2108
  }, [t]);
2096
2109
  const A = (q, D) => {
@@ -2109,7 +2122,7 @@ const fr = ({ value: t, onChange: r, onMount: o, height: i = "400px", language:
2109
2122
  suggestion: q,
2110
2123
  score: A(p, q)
2111
2124
  })).filter((q) => q.score > 0).sort((q, D) => D.score - q.score).map((q) => q.suggestion) : o, [p, o]);
2112
- se(() => {
2125
+ ae(() => {
2113
2126
  S(-1);
2114
2127
  }, [j]);
2115
2128
  const $ = (q) => {
@@ -2426,7 +2439,7 @@ const ho = ({
2426
2439
  T && (T.cluster && R(T.cluster), We.current && (We.current.value = T.parsed_args.job_name || ""), Ge.current && (Ge.current.value = T.parsed_args.partition || ""), j(((B = T.parsed_args.nodes) == null ? void 0 : B.toString()) || ""), te(((G = T.parsed_args.ntasks) == null ? void 0 : G.toString()) || ""), Y(((Z = T.parsed_args.cpus_per_task) == null ? void 0 : Z.toString()) || ""), K(((pe = T.parsed_args.ntasks_per_node) == null ? void 0 : pe.toString()) || ""), Qe.current && (Qe.current.value = T.parsed_args.mem || ""), Ye.current && (Ye.current.value = T.parsed_args.time_limit || ""), Ze.current && (Ze.current.value = T.parsed_args.gpus_per_task || ""), D(T.parsed_args.exclusive || !1), fe((T.parsed_args.extra || []).join(" ")), Ie.current && (Ie.current.value = T.parsed_args.export || ""), Be.current && (Be.current.value = T.parsed_args.nodelist || ""));
2427
2440
  }, ut = (w) => {
2428
2441
  f(w), w && (t != null && t.includes(w)) && X.mutate(w);
2429
- }, Ce = ye(!1), P = ye(!1), ae = () => {
2442
+ }, Ce = ye(!1), P = ye(!1), ce = () => {
2430
2443
  var rt, pt, zt, Nt, It, Ht, qt;
2431
2444
  const w = m.trim();
2432
2445
  if (!w) {
@@ -2531,7 +2544,7 @@ const ho = ({
2531
2544
  source_template: t != null && t.includes(B) ? B : null
2532
2545
  });
2533
2546
  }, er = ye(!1);
2534
- se(() => {
2547
+ ae(() => {
2535
2548
  if (d) {
2536
2549
  if (er.current) return;
2537
2550
  if (er.current = !0, d.job_name && We.current && (We.current.value = d.job_name), d.sbatch_args) {
@@ -2566,7 +2579,7 @@ const ho = ({
2566
2579
  }
2567
2580
  const w = p.profile ?? "", T = p.template ?? "";
2568
2581
  !Ce.current && tt.some((B) => B.name === w) && !m && (dt(w), Ce.current = !0), !P.current && (t != null && t.includes(T)) && !C && (ut(T), P.current = !0);
2569
- }, [d, r, t]), se(() => {
2582
+ }, [d, r, t]), ae(() => {
2570
2583
  if (!h) return;
2571
2584
  g((B) => {
2572
2585
  const G = new URLSearchParams(B), Z = (pe, ze) => ze ? G.set(pe, ze) : G.delete(pe);
@@ -2576,7 +2589,7 @@ const ho = ({
2576
2589
  w || T || is({ cluster: S, profile: m, template: C });
2577
2590
  }, [h, S, m, C, g]);
2578
2591
  const [ht, Wo] = je.useState({}), [Eo, Sr] = k({});
2579
- se(() => {
2592
+ ae(() => {
2580
2593
  const w = [];
2581
2594
  for (const G of Object.values(ht)) {
2582
2595
  const Z = bn(G);
@@ -2752,7 +2765,7 @@ const ho = ({
2752
2765
  L,
2753
2766
  {
2754
2767
  variant: "outline",
2755
- onClick: ae,
2768
+ onClick: ce,
2756
2769
  loading: ue.isPending,
2757
2770
  size: "md",
2758
2771
  fontWeight: "medium",
@@ -3215,7 +3228,7 @@ const ho = ({
3215
3228
  children: i.path
3216
3229
  }
3217
3230
  ),
3218
- i.report && /* @__PURE__ */ e(W, { size: "sm", colorPalette: "blue", children: "report" })
3231
+ i.report && /* @__PURE__ */ e(E, { size: "sm", colorPalette: "blue", children: "report" })
3219
3232
  ] }) }),
3220
3233
  /* @__PURE__ */ e(a.Cell, { borderColor: "var(--color-border)", color: "var(--color-text-muted)", fontSize: "xs", whiteSpace: "nowrap", children: ss(i.size) }),
3221
3234
  /* @__PURE__ */ e(a.Cell, { borderColor: "var(--color-border)", color: "var(--color-text-muted)", fontSize: "xs", whiteSpace: "nowrap", children: new Date(i.mtime * 1e3).toLocaleString() }),
@@ -3348,7 +3361,7 @@ const ho = ({
3348
3361
  /* @__PURE__ */ e(ge, { size: "md", children: "Job Summary" }),
3349
3362
  /* @__PURE__ */ n(y, { children: [
3350
3363
  cs(((Y = u == null ? void 0 : u.job_state) == null ? void 0 : Y[0]) || ((oe = c == null ? void 0 : c.job_state) == null ? void 0 : oe[0]) || ""),
3351
- /* @__PURE__ */ e(W, { colorScheme: mo(((K = u == null ? void 0 : u.job_state) == null ? void 0 : K[0]) || ((q = c == null ? void 0 : c.job_state) == null ? void 0 : q[0]) || ""), children: ((D = u == null ? void 0 : u.job_state) == null ? void 0 : D[0]) || ((re = c == null ? void 0 : c.job_state) == null ? void 0 : re[0]) || ot })
3364
+ /* @__PURE__ */ e(E, { colorScheme: mo(((K = u == null ? void 0 : u.job_state) == null ? void 0 : K[0]) || ((q = c == null ? void 0 : c.job_state) == null ? void 0 : q[0]) || ""), children: ((D = u == null ? void 0 : u.job_state) == null ? void 0 : D[0]) || ((re = c == null ? void 0 : c.job_state) == null ? void 0 : re[0]) || ot })
3352
3365
  ] })
3353
3366
  ] }) }),
3354
3367
  /* @__PURE__ */ e(O.Body, { children: /* @__PURE__ */ n(et, { templateColumns: "repeat(2, 1fr)", gap: 4, children: [
@@ -3443,7 +3456,7 @@ const ho = ({
3443
3456
  ] }),
3444
3457
  /* @__PURE__ */ n(v, { children: [
3445
3458
  /* @__PURE__ */ e(l, { fontWeight: "bold", children: "Status" }),
3446
- /* @__PURE__ */ e(W, { colorScheme: mo(((m = t.job_state) == null ? void 0 : m[0]) || ""), children: ((x = t.job_state) == null ? void 0 : x[0]) || ao })
3459
+ /* @__PURE__ */ e(E, { colorScheme: mo(((m = t.job_state) == null ? void 0 : m[0]) || ""), children: ((x = t.job_state) == null ? void 0 : x[0]) || ao })
3447
3460
  ] }),
3448
3461
  /* @__PURE__ */ n(v, { children: [
3449
3462
  /* @__PURE__ */ e(l, { fontWeight: "bold", children: "Partition" }),
@@ -3672,24 +3685,24 @@ const ho = ({
3672
3685
  // Disable refresh if job is finished
3673
3686
  refetchIntervalInBackground: !0
3674
3687
  });
3675
- return se(() => {
3688
+ return ae(() => {
3676
3689
  !p && o && (console.log(`Job finished, performing final ${t} refresh`), setTimeout(() => {
3677
3690
  Y();
3678
3691
  }, 2e3)), m(o);
3679
- }, [o, p, Y, t]), se(() => {
3692
+ }, [o, p, Y, t]), ae(() => {
3680
3693
  $ && x.current && (x.current.scrollTop = x.current.scrollHeight);
3681
3694
  }, [$]), /* @__PURE__ */ n(O.Root, { bg: "var(--color-bg-card)", padding: "10px", border: "1px solid", borderColor: "var(--color-border)", className: "logview", flex: 1, minH: 0, display: "flex", flexDirection: "column", children: [
3682
3695
  /* @__PURE__ */ e(O.Header, { paddingBottom: "5px", flexShrink: 0, children: /* @__PURE__ */ n(y, { justify: "space-between", children: [
3683
3696
  /* @__PURE__ */ e(ge, { size: "md", children: C }),
3684
3697
  /* @__PURE__ */ n(y, { justify: "space-between", children: [
3685
- h && u && /* @__PURE__ */ n(W, { colorScheme: "orange", children: [
3698
+ h && u && /* @__PURE__ */ n(E, { colorScheme: "orange", children: [
3686
3699
  "Truncated (",
3687
3700
  i(A),
3688
3701
  "/",
3689
3702
  i(u),
3690
3703
  ")"
3691
3704
  ] }),
3692
- /* @__PURE__ */ e(W, { colorScheme: o ? "gray" : "green", children: o ? "Manual refresh" : "Auto-refresh" })
3705
+ /* @__PURE__ */ e(E, { colorScheme: o ? "gray" : "green", children: o ? "Manual refresh" : "Auto-refresh" })
3693
3706
  ] })
3694
3707
  ] }) }),
3695
3708
  /* @__PURE__ */ e(O.Body, { flex: "1", minH: 0, display: "flex", flexDirection: "column", children: z ? /* @__PURE__ */ n(_.Root, { status: "error", children: [
@@ -3795,7 +3808,7 @@ const ho = ({
3795
3808
  return r;
3796
3809
  }, vs = () => typeof document < "u" && (document.documentElement.classList.contains("dark") || document.documentElement.dataset.theme === "dark"), ys = ({ spec: t, rows: r }) => {
3797
3810
  const o = ye(null), [i, s] = k(null), { colorMode: d } = Yr();
3798
- return se(() => {
3811
+ return ae(() => {
3799
3812
  let h = !1, c;
3800
3813
  return s(null), import("vega-embed").then(async ({ default: u }) => {
3801
3814
  if (h || !o.current) return;
@@ -3879,7 +3892,7 @@ const ho = ({
3879
3892
  }
3880
3893
  ), [...b.values()];
3881
3894
  }, [g, C]), S = Se(() => new Map([...f, ...xn].map((b) => [b.name, b])), [f]), R = Se(() => [...f, ...xn], [f]), [A, j] = k(go), $ = `${C}|${g.map((b) => b.path).join(",")}`, te = ye("");
3882
- se(() => {
3895
+ ae(() => {
3883
3896
  f.length && te.current !== $ && (te.current = $, j(bs(f, g.length > 1)));
3884
3897
  }, [$, f, g.length]);
3885
3898
  const z = Se(() => fs(A, S), [A, S]), [Y, oe] = k(null), { spec: K, specError: q } = Se(() => {
@@ -3890,7 +3903,7 @@ const ho = ({
3890
3903
  return { spec: null, specError: b instanceof Error ? b.message : String(b) };
3891
3904
  }
3892
3905
  }, [Y, z]), [D, re] = k(null);
3893
- se(() => {
3906
+ ae(() => {
3894
3907
  K && re(K);
3895
3908
  }, [K]);
3896
3909
  const fe = Se(() => {
@@ -4006,7 +4019,7 @@ chart`;
4006
4019
  children: [
4007
4020
  b || "(records)",
4008
4021
  " ",
4009
- /* @__PURE__ */ e(W, { size: "xs", variant: "subtle", children: V })
4022
+ /* @__PURE__ */ e(E, { size: "xs", variant: "subtle", children: V })
4010
4023
  ]
4011
4024
  },
4012
4025
  b || "(none)"
@@ -4066,7 +4079,7 @@ chart`;
4066
4079
  xe.length >= yn ? "+ (first rows only)" : "",
4067
4080
  " rows"
4068
4081
  ] }),
4069
- Y !== null && /* @__PURE__ */ e(W, { size: "xs", colorPalette: "orange", children: "spec edited by hand" })
4082
+ Y !== null && /* @__PURE__ */ e(E, { size: "xs", colorPalette: "orange", children: "spec edited by hand" })
4070
4083
  ] }),
4071
4084
  Re && /* @__PURE__ */ n(_.Root, { status: "error", mb: 2, children: [
4072
4085
  /* @__PURE__ */ e(_.Indicator, {}),
@@ -4187,18 +4200,18 @@ function Cs(t) {
4187
4200
  const zs = () => {
4188
4201
  var Ct, dt, ut, Ce;
4189
4202
  const t = Hr(), r = t.slurmJobId, o = t.jrJobId, [i, s] = k(r), [d, h] = k(null), [c, u] = k(!1), [g, p] = k(!0), [m, x] = k(30), [C, f] = k(0);
4190
- se(() => {
4203
+ ae(() => {
4191
4204
  r !== i && (console.log("URL parameter changed, updating slurmJobId from", i, "to", r), s(r), h(null), u(!1), p(!0), f(0));
4192
4205
  }, [r, i]), xt(`Job Logs - ${i || "Unknown"}`);
4193
4206
  const [S, R] = Yt(), A = S.get("tab") === "overview" ? "overview" : "logs", j = (P) => {
4194
- R((ae) => {
4195
- const be = new URLSearchParams(ae);
4207
+ R((ce) => {
4208
+ const be = new URLSearchParams(ce);
4196
4209
  return P === "overview" ? be.set("tab", "overview") : be.delete("tab"), be;
4197
4210
  }, { replace: !0 });
4198
4211
  }, $ = $t(), { paths: te } = gr(), z = ke(), [Y, oe] = k(!1), [K, q] = k(!1), [D, re] = k(!1), [fe, xe] = k(!1), [_e, Re] = k(void 0), [$e, Te] = k(!1), Ve = (P) => {
4199
4212
  if (P === 0) return "0 B";
4200
- const ae = 1024, be = ["B", "KB", "MB", "GB"], qe = Math.floor(Math.log(P) / Math.log(ae));
4201
- return parseFloat((P / Math.pow(ae, qe)).toFixed(1)) + " " + be[qe];
4213
+ const ce = 1024, be = ["B", "KB", "MB", "GB"], qe = Math.floor(Math.log(P) / Math.log(ce));
4214
+ return parseFloat((P / Math.pow(ce, qe)).toFixed(1)) + " " + be[qe];
4202
4215
  }, {
4203
4216
  data: we,
4204
4217
  isLoading: Fe,
@@ -4218,10 +4231,10 @@ const zs = () => {
4218
4231
  staleTime: 5e3
4219
4232
  // Consider data fresh for 5 seconds to avoid excessive requests
4220
4233
  });
4221
- se(() => {
4234
+ ae(() => {
4222
4235
  if (we != null && we.status) {
4223
- const P = we.status, ae = c, be = Cs(P);
4224
- h(P), u(be), !ae && be && d !== null ? (p(!1), I.create({
4236
+ const P = we.status, ce = c, be = Cs(P);
4237
+ h(P), u(be), !ce && be && d !== null ? (p(!1), I.create({
4225
4238
  title: "Job Finished",
4226
4239
  description: `Job status changed to ${P}. Logs will perform final refresh in 2 seconds.`,
4227
4240
  type: "info",
@@ -4266,11 +4279,11 @@ const zs = () => {
4266
4279
  refetchOnWindowFocus: !1
4267
4280
  }), Oe = (P) => {
4268
4281
  if (!P) return !1;
4269
- const ae = P.toLowerCase();
4270
- return ae === "running" || ae === "pending" || ae === "r" || ae === "pd";
4282
+ const ce = P.toLowerCase();
4283
+ return ce === "running" || ce === "pending" || ce === "r" || ce === "pd";
4271
4284
  }, Ae = (P) => {
4272
- const ae = Math.floor(P / 86400), be = Math.floor(P % 86400 / 3600), qe = Math.floor(P % 3600 / 60), it = P % 60;
4273
- return ae > 0 ? `${ae}-${be.toString().padStart(2, "0")}:${qe.toString().padStart(2, "0")}:${it.toString().padStart(2, "0")}` : `${be.toString().padStart(2, "0")}:${qe.toString().padStart(2, "0")}:${it.toString().padStart(2, "0")}`;
4285
+ const ce = Math.floor(P / 86400), be = Math.floor(P % 86400 / 3600), qe = Math.floor(P % 3600 / 60), it = P % 60;
4286
+ return ce > 0 ? `${ce}-${be.toString().padStart(2, "0")}:${qe.toString().padStart(2, "0")}:${it.toString().padStart(2, "0")}` : `${be.toString().padStart(2, "0")}:${qe.toString().padStart(2, "0")}:${it.toString().padStart(2, "0")}`;
4274
4287
  }, Le = jn((P) => {
4275
4288
  var be, qe, it;
4276
4289
  if (!P) return "Unknown";
@@ -4278,32 +4291,32 @@ const zs = () => {
4278
4291
  return Ae(ue.time.elapsed);
4279
4292
  if (P.elapsed)
4280
4293
  return P.elapsed;
4281
- const ae = Math.floor(Date.now() / 1e3);
4294
+ const ce = Math.floor(Date.now() / 1e3);
4282
4295
  if ((qe = P.start_time) != null && qe.set && P.start_time.number > 0) {
4283
4296
  const wr = P.start_time.number;
4284
- let Xt = ae;
4297
+ let Xt = ce;
4285
4298
  c && ((it = P.end_time) != null && it.set) && P.end_time.number > 0 && (Xt = P.end_time.number);
4286
4299
  const er = Xt - wr;
4287
4300
  return Ae(er);
4288
4301
  }
4289
4302
  return (d == null ? void 0 : d.toLowerCase()) === "pending" || (d == null ? void 0 : d.toLowerCase()) === "pd" ? "Pending (not started)" : P.time ? P.time : "Not started";
4290
4303
  }, [c, ue, d]), We = Se(() => Le(J), [J, Le, C]);
4291
- se(() => {
4304
+ ae(() => {
4292
4305
  if (!g) {
4293
4306
  x(0);
4294
4307
  return;
4295
4308
  }
4296
4309
  const P = setInterval(() => {
4297
- x((ae) => ae <= 1 ? 30 : ae - 1);
4310
+ x((ce) => ce <= 1 ? 30 : ce - 1);
4298
4311
  }, 1e3);
4299
4312
  return () => clearInterval(P);
4300
- }, [g]), se(() => {
4313
+ }, [g]), ae(() => {
4301
4314
  if (!(d && !c && !["pending", "pd"].includes(d.toLowerCase())))
4302
4315
  return;
4303
- const ae = setInterval(() => {
4316
+ const ce = setInterval(() => {
4304
4317
  f((be) => be + 1);
4305
4318
  }, 1e3);
4306
- return () => clearInterval(ae);
4319
+ return () => clearInterval(ce);
4307
4320
  }, [d, c]);
4308
4321
  const Ge = () => {
4309
4322
  $(-1);
@@ -4422,7 +4435,7 @@ const zs = () => {
4422
4435
  queryFn: Ur,
4423
4436
  enabled: fe,
4424
4437
  // ssh profiles (data movers) only run as pipeline steps
4425
- select: (P) => P.filter((ae) => ae.executor !== "ssh"),
4438
+ select: (P) => P.filter((ce) => ce.executor !== "ssh"),
4426
4439
  refetchOnWindowFocus: !1,
4427
4440
  staleTime: 3e5
4428
4441
  }), St = async () => {
@@ -4492,7 +4505,7 @@ const zs = () => {
4492
4505
  {
4493
4506
  content: `Logs may be stale - cluster is offline${X.reason ? `: ${X.reason}` : ""}`,
4494
4507
  children: /* @__PURE__ */ e(
4495
- W,
4508
+ E,
4496
4509
  {
4497
4510
  colorScheme: "orange",
4498
4511
  variant: "solid",
@@ -4599,7 +4612,7 @@ const zs = () => {
4599
4612
  ] })
4600
4613
  ] }),
4601
4614
  /* @__PURE__ */ e(O.Root, { bg: "var(--color-bg-card)", padding: "10px", border: "1px solid", borderColor: "var(--color-border)", children: /* @__PURE__ */ e(O.Body, { children: /* @__PURE__ */ n(ar, { gap: 4, rowGap: 2, align: "center", children: [
4602
- (V == null ? void 0 : V.cluster) && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(W, { colorPalette: "blue", title: V.login, children: V.cluster }) }),
4615
+ (V == null ? void 0 : V.cluster) && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(E, { colorPalette: "blue", title: V.login, children: V.cluster }) }),
4603
4616
  /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text)", children: [
4604
4617
  /* @__PURE__ */ e("strong", { children: "ID:" }),
4605
4618
  " ",
@@ -4613,7 +4626,7 @@ const zs = () => {
4613
4626
  /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text)", children: [
4614
4627
  /* @__PURE__ */ e("strong", { children: "Job Duration:" }),
4615
4628
  " ",
4616
- M ? /* @__PURE__ */ n(ce, { children: [
4629
+ M ? /* @__PURE__ */ n(se, { children: [
4617
4630
  /* @__PURE__ */ e(me, { size: "xs", mr: 1 }),
4618
4631
  "Loading..."
4619
4632
  ] }) : We
@@ -4639,12 +4652,12 @@ const zs = () => {
4639
4652
  " ",
4640
4653
  J.nodes
4641
4654
  ] }) }),
4642
- d && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(W, { colorScheme: Ss(d), children: d }) }),
4643
- Fe && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ n(W, { colorScheme: "gray", children: [
4655
+ d && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(E, { colorScheme: Ss(d), children: d }) }),
4656
+ Fe && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ n(E, { colorScheme: "gray", children: [
4644
4657
  /* @__PURE__ */ e(me, { size: "xs", mr: 1 }),
4645
4658
  "Checking Status..."
4646
4659
  ] }) }),
4647
- He && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(W, { colorScheme: "red", children: "Status Error" }) }),
4660
+ He && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(E, { colorScheme: "red", children: "Status Error" }) }),
4648
4661
  g && m > 0 && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ n(l, { fontSize: "xs", color: "var(--color-text-muted)", children: [
4649
4662
  "Next refresh in ",
4650
4663
  m,
@@ -4833,7 +4846,7 @@ async function js(t) {
4833
4846
  }
4834
4847
  const As = ({ definition: t, states: r }) => {
4835
4848
  const { colorMode: o } = Yr(), i = o === "dark", s = Se(() => $s(t, r, i), [t, r, i]), d = Do().replace(/[^A-Za-z0-9]/g, ""), [h, c] = k(null), [u, g] = k(null);
4836
- return se(() => {
4849
+ return ae(() => {
4837
4850
  let p = !1;
4838
4851
  return (async () => {
4839
4852
  try {
@@ -4916,7 +4929,7 @@ const As = ({ definition: t, states: r }) => {
4916
4929
  /* @__PURE__ */ e(ee.Indicator, { boxSize: "3" })
4917
4930
  ] }), yo = ({ node: t, path: r, marker: o, selected: i, onSelect: s, onType: d, onDelete: h, onAdd: c, root: u, hover: g, onHover: p, sweepKey: m }) => {
4918
4931
  const x = r.length, C = Fs(i, r), f = t.type === "job" ? fo(t.env, m) : void 0, S = f ?? Ws(t), R = Vt(t) || m, A = Js(g, r, u), j = (g == null ? void 0 : g.mode) === "delete" && !!A;
4919
- return /* @__PURE__ */ n(ce, { children: [
4932
+ return /* @__PURE__ */ n(se, { children: [
4920
4933
  /* @__PURE__ */ n(
4921
4934
  y,
4922
4935
  {
@@ -4974,7 +4987,7 @@ const As = ({ definition: t, states: r }) => {
4974
4987
  ]
4975
4988
  }
4976
4989
  ),
4977
- t.type !== "job" && /* @__PURE__ */ n(ce, { children: [
4990
+ t.type !== "job" && /* @__PURE__ */ n(se, { children: [
4978
4991
  t.jobs.map(($, te) => /* @__PURE__ */ e(
4979
4992
  yo,
4980
4993
  {
@@ -5103,7 +5116,7 @@ const As = ({ definition: t, states: r }) => {
5103
5116
  }, Ks = ({ job: t, profile: r, onChange: o }) => {
5104
5117
  const i = ke(), [s, d] = k(((r == null ? void 0 : r.sbatch_args) ?? []).join(`
5105
5118
  `)), [h, c] = k(r != null && r.node ? `${r.name}-custom` : (r == null ? void 0 : r.name) ?? "");
5106
- se(() => {
5119
+ ae(() => {
5107
5120
  d(((r == null ? void 0 : r.sbatch_args) ?? []).join(`
5108
5121
  `)), c(r != null && r.node ? `${r.name}-custom` : (r == null ? void 0 : r.name) ?? "");
5109
5122
  }, [r]);
@@ -5162,7 +5175,7 @@ const As = ({ definition: t, states: r }) => {
5162
5175
  ] });
5163
5176
  }, Us = ({ script: t, content: r, usedBy: o }) => {
5164
5177
  const i = ke(), [s, d] = k(r ?? "");
5165
- se(() => {
5178
+ ae(() => {
5166
5179
  d(r ?? "");
5167
5180
  }, [r, t]);
5168
5181
  const h = de({
@@ -5242,7 +5255,7 @@ const As = ({ definition: t, states: r }) => {
5242
5255
  ] }),
5243
5256
  d && d.sbatch_args.length > 0 && /* @__PURE__ */ n(y, { gap: 1, flexWrap: "wrap", children: [
5244
5257
  d.sbatch_args.map((m) => /* @__PURE__ */ e(ne, { size: "sm", children: m }, m)),
5245
- t.proxy !== void 0 && /* @__PURE__ */ n(W, { size: "sm", variant: "outline", children: [
5258
+ t.proxy !== void 0 && /* @__PURE__ */ n(E, { size: "sm", variant: "outline", children: [
5246
5259
  "proxy: ",
5247
5260
  String(t.proxy)
5248
5261
  ] })
@@ -5302,7 +5315,7 @@ const As = ({ definition: t, states: r }) => {
5302
5315
  ] })
5303
5316
  ] }), xo = (t, r) => t.type === "job" ? +(t.script === r) : t.jobs.reduce((o, i) => o + xo(i, r), 0), Qs = { type: "sequential", name: "main", jobs: [] }, Ys = ({ isOpen: t, onClose: r, profiles: o, templates: i, loadedTemplateData: s, onSaveTemplate: d }) => {
5304
5317
  const [h, c] = k((s == null ? void 0 : s.name) || (s == null ? void 0 : s.pipelineName) || ""), [u, g] = k((s == null ? void 0 : s.description) || ""), [p, m] = k((s == null ? void 0 : s.definition) ?? Qs), [x, C] = k([]), [f, S] = k(null);
5305
- se(() => {
5318
+ ae(() => {
5306
5319
  s && (c(s.name || s.pipelineName || ""), g(s.description || ""), s.definition && m(s.definition));
5307
5320
  }, [s]);
5308
5321
  const R = x ? or(p, x) : void 0, A = Se(() => vo(p), [p]), j = (K) => {
@@ -5474,7 +5487,7 @@ const As = ({ definition: t, states: r }) => {
5474
5487
  }
5475
5488
  }, _n = ({ jobId: t, slurmJobId: r, children: o }) => {
5476
5489
  const i = De();
5477
- return t ? /* @__PURE__ */ e(vt, { asChild: !0, colorPalette: "blue", variant: "underline", children: /* @__PURE__ */ e(Ne, { to: i.jobLogs(r || ot, t), children: o }) }) : /* @__PURE__ */ e(ce, { children: o });
5490
+ return t ? /* @__PURE__ */ e(vt, { asChild: !0, colorPalette: "blue", variant: "underline", children: /* @__PURE__ */ e(Ne, { to: i.jobLogs(r || ot, t), children: o }) }) : /* @__PURE__ */ e(se, { children: o });
5478
5491
  }, Rn = (t) => !!t && (t.status === "failed" || t.state === "completed" || t.state === "failed"), Xs = ({ runId: t }) => {
5479
5492
  const { data: r, error: o, dataUpdatedAt: i, isFetching: s } = Q({
5480
5493
  queryKey: ["pipeline-run", t],
@@ -5506,7 +5519,7 @@ const As = ({ definition: t, states: r }) => {
5506
5519
  return /* @__PURE__ */ n(H, { align: "stretch", gap: 4, children: [
5507
5520
  /* @__PURE__ */ n(y, { gap: 3, flexWrap: "wrap", children: [
5508
5521
  /* @__PURE__ */ e(ge, { size: "md", color: "var(--color-text)", children: r.name || t }),
5509
- /* @__PURE__ */ e(W, { colorPalette: Zr(r.status, r.state), size: "lg", children: c }),
5522
+ /* @__PURE__ */ e(E, { colorPalette: Zr(r.status, r.state), size: "lg", children: c }),
5510
5523
  /* @__PURE__ */ e(l, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text-muted)", children: t }),
5511
5524
  /* @__PURE__ */ e(cr, {}),
5512
5525
  /* @__PURE__ */ n(l, { fontSize: "xs", color: "var(--color-text-muted)", children: [
@@ -5534,7 +5547,7 @@ const As = ({ definition: t, states: r }) => {
5534
5547
  ] }) }),
5535
5548
  /* @__PURE__ */ e(a.Body, { children: r.steps.map((u) => /* @__PURE__ */ n(a.Row, { borderColor: "var(--color-border)", children: [
5536
5549
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: /* @__PURE__ */ e(_n, { jobId: u.job_id, slurmJobId: u.executor === "ssh" ? null : u.slurm_jobid, children: u.step }) }),
5537
- d.length > 0 && /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: u.sweep ? /* @__PURE__ */ n(ce, { children: [
5550
+ d.length > 0 && /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: u.sweep ? /* @__PURE__ */ n(se, { children: [
5538
5551
  u.sweep,
5539
5552
  d.length > 1 && /* @__PURE__ */ n(l, { as: "span", color: "var(--color-text-muted)", children: [
5540
5553
  " (",
@@ -5551,7 +5564,7 @@ const As = ({ definition: t, states: r }) => {
5551
5564
  ] })
5552
5565
  ] }),
5553
5566
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text-muted)", borderColor: "var(--color-border)", children: u.after && u.after.length > 0 ? u.after.join(", ") : "-" }),
5554
- /* @__PURE__ */ e(a.Cell, { borderColor: "var(--color-border)", children: /* @__PURE__ */ e(W, { colorPalette: Zs(u.state), children: u.state || "UNKNOWN" }) }),
5567
+ /* @__PURE__ */ e(a.Cell, { borderColor: "var(--color-border)", children: /* @__PURE__ */ e(E, { colorPalette: Zs(u.state), children: u.state || "UNKNOWN" }) }),
5555
5568
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", color: "var(--color-text-muted)", borderColor: "var(--color-border)", children: /* @__PURE__ */ e(_n, { jobId: u.job_id, slurmJobId: u.executor === "ssh" ? null : u.slurm_jobid, children: u.job_id }) })
5556
5569
  ] }, u.job_id || u.step)) })
5557
5570
  ] }),
@@ -5705,7 +5718,7 @@ const As = ({ definition: t, states: r }) => {
5705
5718
  /* @__PURE__ */ e(a.Cell, { fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: m != null && m.definition ? zo(m.definition) : "-" }),
5706
5719
  /* @__PURE__ */ e(a.Cell, { fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", whiteSpace: "nowrap", children: x ? /* @__PURE__ */ n(y, { gap: 2, children: [
5707
5720
  /* @__PURE__ */ e(l, { children: wo(x.started) }),
5708
- x.status !== "submitted" && /* @__PURE__ */ e(W, { colorPalette: Zr(x.status), children: x.status })
5721
+ x.status !== "submitted" && /* @__PURE__ */ e(E, { colorPalette: Zr(x.status), children: x.status })
5709
5722
  ] }) : /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "never" }) }),
5710
5723
  /* @__PURE__ */ e(a.Cell, { borderColor: "var(--color-border)", pr: 4, textAlign: "end", children: /* @__PURE__ */ e(_o, { name: g, size: "xs", onStarted: (f) => r(t.pipelineDetails(g, f.run_id)) }) })
5711
5724
  ]
@@ -5746,7 +5759,7 @@ const As = ({ definition: t, states: r }) => {
5746
5759
  /* @__PURE__ */ n(kt, { align: "center", flexWrap: "wrap", gap: 4, children: [
5747
5760
  /* @__PURE__ */ e(ge, { size: "lg", color: "var(--color-text)", children: t }),
5748
5761
  /* @__PURE__ */ e(cr, {}),
5749
- c && /* @__PURE__ */ n(ce, { children: [
5762
+ c && /* @__PURE__ */ n(se, { children: [
5750
5763
  /* @__PURE__ */ n(
5751
5764
  L,
5752
5765
  {
@@ -5802,11 +5815,11 @@ const As = ({ definition: t, states: r }) => {
5802
5815
  children: [
5803
5816
  /* @__PURE__ */ n(a.Cell, { fontFamily: "mono", fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: [
5804
5817
  j.run_id,
5805
- j.run_id === x && /* @__PURE__ */ e(W, { ml: 2, size: "sm", variant: "outline", children: "shown" })
5818
+ j.run_id === x && /* @__PURE__ */ e(E, { ml: 2, size: "sm", variant: "outline", children: "shown" })
5806
5819
  ] }),
5807
5820
  /* @__PURE__ */ e(a.Cell, { fontSize: "sm", color: "var(--color-text)", borderColor: "var(--color-border)", children: wo(j.started) }),
5808
5821
  /* @__PURE__ */ n(a.Cell, { borderColor: "var(--color-border)", children: [
5809
- /* @__PURE__ */ e(W, { colorPalette: Zr(j.status), children: j.status }),
5822
+ /* @__PURE__ */ e(E, { colorPalette: Zr(j.status), children: j.status }),
5810
5823
  j.error && /* @__PURE__ */ e(l, { as: "span", fontSize: "xs", color: "var(--color-text-muted)", ml: 2, children: j.error })
5811
5824
  ] })
5812
5825
  ]
@@ -5856,7 +5869,7 @@ const oa = ({ jobId: t }) => {
5856
5869
  ] }) }),
5857
5870
  /* @__PURE__ */ e(a.Body, { children: o.map((s) => /* @__PURE__ */ n(a.Row, { children: [
5858
5871
  /* @__PURE__ */ e(a.Cell, { children: Kt(s.submitted_at) }),
5859
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { colorPalette: s.status === "submitted" ? "green" : "red", variant: "subtle", children: s.status }) }),
5872
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { colorPalette: s.status === "submitted" ? "green" : "red", variant: "subtle", children: s.status }) }),
5860
5873
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", fontFamily: "mono", children: s.jr_job_id && s.slurm_job_id ? /* @__PURE__ */ e(vt, { asChild: !0, colorPalette: "blue", children: /* @__PURE__ */ e(Ne, { to: r.jobLogs(s.slurm_job_id, s.jr_job_id), children: s.jr_job_id }) }) : s.jr_job_id || "—" }),
5861
5874
  /* @__PURE__ */ e(a.Cell, { children: s.error ? /* @__PURE__ */ e(
5862
5875
  he,
@@ -5927,7 +5940,7 @@ const oa = ({ jobId: t }) => {
5927
5940
  /* @__PURE__ */ n(U.Body, { flex: "1", overflow: "hidden", display: "flex", flexDirection: "column", gap: 3, children: [
5928
5941
  s && /* @__PURE__ */ e(me, {}),
5929
5942
  d && /* @__PURE__ */ e(l, { color: "red.500", children: (d == null ? void 0 : d.message) || "Failed to load diff" }),
5930
- i && /* @__PURE__ */ n(ce, { children: [
5943
+ i && /* @__PURE__ */ n(se, { children: [
5931
5944
  /* @__PURE__ */ e(l, { fontSize: "sm", color: "var(--color-text-muted)", children: "The template file has changed since this job's script was last loaded. Review the new content below, then update to apply it." }),
5932
5945
  /* @__PURE__ */ n(et, { templateColumns: "1fr 1fr", gap: 4, flex: "1", minH: "0", children: [
5933
5946
  /* @__PURE__ */ n(v, { display: "flex", flexDirection: "column", minH: "0", children: [
@@ -6003,7 +6016,7 @@ const oa = ({ jobId: t }) => {
6003
6016
  queryFn: pr,
6004
6017
  enabled: t != null
6005
6018
  });
6006
- se(() => {
6019
+ ae(() => {
6007
6020
  if (!t) return;
6008
6021
  s(t.name);
6009
6022
  const z = Nr.find((Y) => Y.cron === t.cron_expression);
@@ -6112,7 +6125,7 @@ const oa = ({ jobId: t }) => {
6112
6125
  /* @__PURE__ */ n(N.Root, { w: "220px", children: [
6113
6126
  /* @__PURE__ */ n(N.Label, { children: [
6114
6127
  "Source template",
6115
- (t == null ? void 0 : t.template_missing) && /* @__PURE__ */ e(W, { colorPalette: "red", variant: "subtle", ml: 2, children: "missing" })
6128
+ (t == null ? void 0 : t.template_missing) && /* @__PURE__ */ e(E, { colorPalette: "red", variant: "subtle", ml: 2, children: "missing" })
6116
6129
  ] }),
6117
6130
  /* @__PURE__ */ e(ee.Root, { children: /* @__PURE__ */ n(
6118
6131
  ee.Field,
@@ -6221,15 +6234,15 @@ const oa = ({ jobId: t }) => {
6221
6234
  /* @__PURE__ */ e(a.Cell, { children: r === f._id ? /* @__PURE__ */ e(Wn, {}) : /* @__PURE__ */ e(En, {}) }),
6222
6235
  /* @__PURE__ */ e(a.Cell, { fontWeight: "medium", children: /* @__PURE__ */ n(y, { gap: 2, children: [
6223
6236
  /* @__PURE__ */ e(l, { children: f.name }),
6224
- f.outdated && /* @__PURE__ */ e(he, { content: `Template "${f.source_template}" has changed since this job's script was loaded.`, showArrow: !0, children: /* @__PURE__ */ e(W, { colorPalette: "orange", variant: "solid", children: "Outdated" }) }),
6225
- f.template_missing && /* @__PURE__ */ e(he, { content: `Source template "${f.source_template}" no longer exists.`, showArrow: !0, children: /* @__PURE__ */ e(W, { colorPalette: "red", variant: "subtle", children: "Template missing" }) })
6237
+ f.outdated && /* @__PURE__ */ e(he, { content: `Template "${f.source_template}" has changed since this job's script was loaded.`, showArrow: !0, children: /* @__PURE__ */ e(E, { colorPalette: "orange", variant: "solid", children: "Outdated" }) }),
6238
+ f.template_missing && /* @__PURE__ */ e(he, { content: `Source template "${f.source_template}" no longer exists.`, showArrow: !0, children: /* @__PURE__ */ e(E, { colorPalette: "red", variant: "subtle", children: "Template missing" }) })
6226
6239
  ] }) }),
6227
6240
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ n(H, { align: "start", gap: 0, children: [
6228
6241
  /* @__PURE__ */ e(l, { fontSize: "sm", children: na(f.cron_expression) }),
6229
6242
  /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", fontFamily: "mono", children: f.cron_expression })
6230
6243
  ] }) }),
6231
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { variant: "outline", children: f.cluster }) }),
6232
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { colorPalette: f.enabled ? "green" : "gray", variant: "subtle", children: f.enabled ? "Enabled" : "Disabled" }) }),
6244
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { variant: "outline", children: f.cluster }) }),
6245
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { colorPalette: f.enabled ? "green" : "gray", variant: "subtle", children: f.enabled ? "Enabled" : "Disabled" }) }),
6233
6246
  /* @__PURE__ */ e(a.Cell, { fontSize: "sm", children: Kt(f.last_run_time) }),
6234
6247
  /* @__PURE__ */ e(a.Cell, { fontSize: "sm", children: f.enabled ? Kt(f.next_run_time) : "—" }),
6235
6248
  /* @__PURE__ */ e(a.Cell, { textAlign: "right", children: /* @__PURE__ */ n(y, { gap: 1, justify: "flex-end", onClick: (S) => S.stopPropagation(), children: [
@@ -6328,7 +6341,7 @@ const oa = ({ jobId: t }) => {
6328
6341
  ] }),
6329
6342
  f.sbatch_args && f.sbatch_args.length > 0 && /* @__PURE__ */ n(H, { align: "start", gap: 1, children: [
6330
6343
  /* @__PURE__ */ e(l, { fontSize: "xs", color: "var(--color-text-muted)", children: "Sbatch Arguments" }),
6331
- /* @__PURE__ */ e(y, { gap: 1, flexWrap: "wrap", children: f.sbatch_args.map((S, R) => /* @__PURE__ */ e(W, { variant: "outline", fontFamily: "mono", fontSize: "xs", children: S }, R)) })
6344
+ /* @__PURE__ */ e(y, { gap: 1, flexWrap: "wrap", children: f.sbatch_args.map((S, R) => /* @__PURE__ */ e(E, { variant: "outline", fontFamily: "mono", fontSize: "xs", children: S }, R)) })
6332
6345
  ] }),
6333
6346
  /* @__PURE__ */ n(H, { align: "start", gap: 1, children: [
6334
6347
  /* @__PURE__ */ n(y, { justify: "space-between", w: "100%", children: [
@@ -6381,7 +6394,7 @@ const oa = ({ jobId: t }) => {
6381
6394
  };
6382
6395
  function Ro(t = !0) {
6383
6396
  const { hash: r } = An();
6384
- se(() => {
6397
+ ae(() => {
6385
6398
  if (!t || !r) return;
6386
6399
  const o = decodeURIComponent(r.slice(1)), i = window.setTimeout(() => {
6387
6400
  var s;
@@ -6486,7 +6499,7 @@ const _t = ({ id: t, icon: r, title: o, subtitle: i, actions: s, children: d })
6486
6499
  /* @__PURE__ */ e(a.Body, { children: t.map((r) => /* @__PURE__ */ n(a.Row, { children: [
6487
6500
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: r.name }),
6488
6501
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", color: "var(--color-text-muted)", children: r.description || "—" }),
6489
- /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: r.exists ? r.rows ?? "?" : /* @__PURE__ */ e(W, { size: "sm", children: "not created" }) })
6502
+ /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: r.exists ? r.rows ?? "?" : /* @__PURE__ */ e(E, { size: "sm", children: "not created" }) })
6490
6503
  ] }, r.name)) })
6491
6504
  ] }), yr = ({ rows: t }) => /* @__PURE__ */ e(et, { templateColumns: { base: "1fr", md: "200px 1fr" }, columnGap: 4, rowGap: 2, children: t.map(([r, o]) => /* @__PURE__ */ n(je.Fragment, { children: [
6492
6505
  /* @__PURE__ */ e(l, { fontSize: "sm", fontWeight: "semibold", color: "var(--color-text-muted)", children: r }),
@@ -6513,16 +6526,16 @@ function $o(t) {
6513
6526
  }
6514
6527
  }
6515
6528
  const Lo = ({ origin: t }) => {
6516
- const r = t.kind === "env" ? "orange" : t.kind === "plugin" ? "purple" : t.kind === "user" ? "blue" : "gray", o = /* @__PURE__ */ e(W, { size: "sm", colorPalette: r, variant: "subtle", children: $o(t) });
6529
+ const r = t.kind === "env" ? "orange" : t.kind === "plugin" ? "purple" : t.kind === "user" ? "blue" : "gray", o = /* @__PURE__ */ e(E, { size: "sm", colorPalette: r, variant: "subtle", children: $o(t) });
6517
6530
  return t.path ? /* @__PURE__ */ e(he, { content: t.path, showArrow: !0, children: o }) : o;
6518
6531
  }, jo = ({ field: t }) => /* @__PURE__ */ n(y, { gap: 1, wrap: "wrap", children: [
6519
6532
  /* @__PURE__ */ e(Lo, { origin: t.origin }),
6520
- t.env && /* @__PURE__ */ e(he, { content: `${t.env} is set: it wins over the user file`, showArrow: !0, children: /* @__PURE__ */ n(W, { size: "sm", colorPalette: "orange", children: [
6533
+ t.env && /* @__PURE__ */ e(he, { content: `${t.env} is set: it wins over the user file`, showArrow: !0, children: /* @__PURE__ */ n(E, { size: "sm", colorPalette: "orange", children: [
6521
6534
  t.env,
6522
6535
  " overrides the file"
6523
6536
  ] }) }),
6524
- t.restart && /* @__PURE__ */ e(W, { size: "sm", variant: "outline", children: "applies at startup" }),
6525
- t.pending && /* @__PURE__ */ e(W, { size: "sm", colorPalette: "yellow", children: "restart needed" })
6537
+ t.restart && /* @__PURE__ */ e(E, { size: "sm", variant: "outline", children: "applies at startup" }),
6538
+ t.pending && /* @__PURE__ */ e(E, { size: "sm", colorPalette: "yellow", children: "restart needed" })
6526
6539
  ] }), ua = ({ reason: t }) => /* @__PURE__ */ n(_.Root, { status: "info", variant: "subtle", borderRadius: "md", children: [
6527
6540
  /* @__PURE__ */ e(_.Indicator, { children: /* @__PURE__ */ e(Br, {}) }),
6528
6541
  /* @__PURE__ */ n(_.Content, { children: [
@@ -6550,7 +6563,7 @@ const Lo = ({ origin: t }) => {
6550
6563
  ["bujang version", /* @__PURE__ */ e(Ee, { children: r.version }, "v")],
6551
6564
  [
6552
6565
  "Plugins",
6553
- r.plugins.length ? /* @__PURE__ */ e(y, { gap: 1, wrap: "wrap", children: r.plugins.map((s) => /* @__PURE__ */ n(W, { colorPalette: "purple", variant: "subtle", children: [
6566
+ r.plugins.length ? /* @__PURE__ */ e(y, { gap: 1, wrap: "wrap", children: r.plugins.map((s) => /* @__PURE__ */ n(E, { colorPalette: "purple", variant: "subtle", children: [
6554
6567
  s.name,
6555
6568
  s.version ? ` ${s.version}` : "",
6556
6569
  s.ssh_config ? " · ssh config" : ""
@@ -6574,7 +6587,7 @@ const Lo = ({ origin: t }) => {
6574
6587
  () => ({ local_cache: o.file ?? o.value ?? "", workdir: i.file ?? i.value ?? "" }),
6575
6588
  [o, i]
6576
6589
  ), [d, h] = k(s);
6577
- se(() => h(s), [s]);
6590
+ ae(() => h(s), [s]);
6578
6591
  const c = de({
6579
6592
  mutationFn: () => {
6580
6593
  const m = {};
@@ -6610,12 +6623,12 @@ const Lo = ({ origin: t }) => {
6610
6623
  ),
6611
6624
  /* @__PURE__ */ n(N.HelperText, { color: "var(--color-text-muted)", children: [
6612
6625
  C,
6613
- f.file !== null && f.file !== f.value && /* @__PURE__ */ n(ce, { children: [
6626
+ f.file !== null && f.file !== f.value && /* @__PURE__ */ n(se, { children: [
6614
6627
  " Running with ",
6615
6628
  /* @__PURE__ */ e(Ee, { children: f.value }),
6616
6629
  "."
6617
6630
  ] }),
6618
- f.overridden && f.origin.kind !== "env" && /* @__PURE__ */ n(ce, { children: [
6631
+ f.overridden && f.origin.kind !== "env" && /* @__PURE__ */ n(se, { children: [
6619
6632
  " The user file has no effect: ",
6620
6633
  $o(f.origin),
6621
6634
  " sets it."
@@ -6629,7 +6642,7 @@ const Lo = ({ origin: t }) => {
6629
6642
  id: "folders",
6630
6643
  icon: /* @__PURE__ */ e(ci, {}),
6631
6644
  title: "Folders",
6632
- subtitle: /* @__PURE__ */ n(ce, { children: [
6645
+ subtitle: /* @__PURE__ */ n(se, { children: [
6633
6646
  "Saved to the user file, like ",
6634
6647
  /* @__PURE__ */ e(ne, { fontSize: "xs", children: "bujang init" }),
6635
6648
  "."
@@ -6649,7 +6662,7 @@ const Lo = ({ origin: t }) => {
6649
6662
  "User config file",
6650
6663
  t.user_file.path ? /* @__PURE__ */ n(y, { gap: 2, wrap: "wrap", children: [
6651
6664
  /* @__PURE__ */ e(Ee, { children: t.user_file.path }),
6652
- !t.user_file.exists && /* @__PURE__ */ e(W, { size: "sm", children: "not created yet" })
6665
+ !t.user_file.exists && /* @__PURE__ */ e(E, { size: "sm", children: "not created yet" })
6653
6666
  ] }) : /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "turned off (user_config_dir is empty)" })
6654
6667
  ],
6655
6668
  ["Secrets file", /* @__PURE__ */ e(Ee, { children: t.secrets_file }, "s")]
@@ -6677,7 +6690,7 @@ const Lo = ({ origin: t }) => {
6677
6690
  /* @__PURE__ */ n(v, { children: [
6678
6691
  /* @__PURE__ */ e(Wt, { children: "Config sources (merge order, later wins)" }),
6679
6692
  /* @__PURE__ */ e(H, { align: "stretch", gap: 1, mt: 2, children: t.sources.sources.map((m, x) => /* @__PURE__ */ n(y, { gap: 2, fontSize: "sm", minW: 0, children: [
6680
- /* @__PURE__ */ e(W, { size: "sm", variant: "subtle", colorPalette: m.kind === "plugin" ? "purple" : m.kind === "user" ? "blue" : "gray", children: m.kind }),
6693
+ /* @__PURE__ */ e(E, { size: "sm", variant: "subtle", colorPalette: m.kind === "plugin" ? "purple" : m.kind === "user" ? "blue" : "gray", children: m.kind }),
6681
6694
  /* @__PURE__ */ e(l, { color: "var(--color-text)", flexShrink: 0, children: m.name }),
6682
6695
  m.path && /* @__PURE__ */ e(l, { fontFamily: "mono", fontSize: "xs", color: "var(--color-text-muted)", truncate: !0, children: m.path })
6683
6696
  ] }, `${m.name}-${x}`)) })
@@ -6687,7 +6700,7 @@ const Lo = ({ origin: t }) => {
6687
6700
  );
6688
6701
  }, pa = ({ info: t }) => {
6689
6702
  const r = ke(), o = t.database, i = t.fields.database_url, s = i.file ?? "", [d, h] = k(s);
6690
- se(() => h(s), [s]);
6703
+ ae(() => h(s), [s]);
6691
6704
  const c = de({
6692
6705
  mutationFn: (p) => Yn({ database_url: p }),
6693
6706
  onSuccess: (p) => {
@@ -6703,11 +6716,11 @@ const Lo = ({ origin: t }) => {
6703
6716
  /* @__PURE__ */ e(Ee, { children: o.sqlite_path || ":memory:" })
6704
6717
  ] }) : o.backend ? /* @__PURE__ */ n(l, { children: [
6705
6718
  o.backend,
6706
- o.host ? /* @__PURE__ */ n(ce, { children: [
6719
+ o.host ? /* @__PURE__ */ n(se, { children: [
6707
6720
  " on ",
6708
6721
  /* @__PURE__ */ e(Ee, { children: o.host })
6709
6722
  ] }) : null,
6710
- o.name ? /* @__PURE__ */ n(ce, { children: [
6723
+ o.name ? /* @__PURE__ */ n(se, { children: [
6711
6724
  ", database ",
6712
6725
  /* @__PURE__ */ e(Ee, { children: o.name })
6713
6726
  ] }) : null
@@ -6718,7 +6731,7 @@ const Lo = ({ origin: t }) => {
6718
6731
  id: "database",
6719
6732
  icon: /* @__PURE__ */ e(di, {}),
6720
6733
  title: "Database",
6721
- subtitle: /* @__PURE__ */ n(ce, { children: [
6734
+ subtitle: /* @__PURE__ */ n(se, { children: [
6722
6735
  "The scheduled jobs live in the database below (SQLAlchemy: ",
6723
6736
  /* @__PURE__ */ e(ne, { fontSize: "xs", children: "database_url" }),
6724
6737
  " or the host's); everything else bujang keeps in the SQLite files of the job folder. The job folders do not depend on either: delete ",
@@ -6736,7 +6749,7 @@ const Lo = ({ origin: t }) => {
6736
6749
  [
6737
6750
  "Provided by",
6738
6751
  o.host_provided ? /* @__PURE__ */ n(y, { gap: 2, children: [
6739
- /* @__PURE__ */ e(W, { colorPalette: "purple", children: "host app" }),
6752
+ /* @__PURE__ */ e(E, { colorPalette: "purple", children: "host app" }),
6740
6753
  /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text-muted)", children: [
6741
6754
  "passed in code (",
6742
6755
  o.kind,
@@ -6764,7 +6777,7 @@ const Lo = ({ origin: t }) => {
6764
6777
  onChange: (p) => h(p.target.value)
6765
6778
  }
6766
6779
  ),
6767
- u && /* @__PURE__ */ n(ce, { children: [
6780
+ u && /* @__PURE__ */ n(se, { children: [
6768
6781
  /* @__PURE__ */ e(
6769
6782
  L,
6770
6783
  {
@@ -6784,7 +6797,7 @@ const Lo = ({ origin: t }) => {
6784
6797
  (o.local || []).map((p) => /* @__PURE__ */ n(v, { borderTopWidth: "1px", borderColor: "var(--color-border)", pt: 4, children: [
6785
6798
  /* @__PURE__ */ n(y, { gap: 2, wrap: "wrap", mb: 1, children: [
6786
6799
  /* @__PURE__ */ e(Wt, { children: p.name }),
6787
- p.exists ? /* @__PURE__ */ e(W, { size: "sm", variant: "subtle", children: da(p.size) }) : /* @__PURE__ */ e(W, { size: "sm", children: "not created yet" })
6800
+ p.exists ? /* @__PURE__ */ e(E, { size: "sm", variant: "subtle", children: da(p.size) }) : /* @__PURE__ */ e(E, { size: "sm", children: "not created yet" })
6788
6801
  ] }),
6789
6802
  /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text-muted)", mb: 2, children: [
6790
6803
  "SQLite, ",
@@ -6822,7 +6835,7 @@ const Lo = ({ origin: t }) => {
6822
6835
  }
6823
6836
  ), fa = ({ plugin: t, file: r, writable: o, onChanged: i }) => {
6824
6837
  const [s, d] = k(t.values), [h, c] = k(!1), [u, g] = k(null);
6825
- se(() => {
6838
+ ae(() => {
6826
6839
  d(t.values), g(null);
6827
6840
  }, [t, r]);
6828
6841
  const p = (S) => ({
@@ -6849,14 +6862,14 @@ const Lo = ({ origin: t }) => {
6849
6862
  }), C = t.placeholders.filter((S) => {
6850
6863
  var R;
6851
6864
  return !((R = s[S]) != null && R.trim());
6852
- }), f = t.installed ? t.up_to_date ? /* @__PURE__ */ n(W, { colorPalette: "green", children: [
6865
+ }), f = t.installed ? t.up_to_date ? /* @__PURE__ */ n(E, { colorPalette: "green", children: [
6853
6866
  "installed ",
6854
6867
  t.installed_version
6855
- ] }) : /* @__PURE__ */ n(W, { colorPalette: "yellow", children: [
6868
+ ] }) : /* @__PURE__ */ n(E, { colorPalette: "yellow", children: [
6856
6869
  "installed ",
6857
6870
  t.installed_version,
6858
6871
  ", update available"
6859
- ] }) : /* @__PURE__ */ e(W, { children: "not installed" });
6872
+ ] }) : /* @__PURE__ */ e(E, { children: "not installed" });
6860
6873
  return /* @__PURE__ */ e(v, { borderWidth: "1px", borderColor: "var(--color-border)", borderRadius: "md", p: 4, children: /* @__PURE__ */ n(H, { align: "stretch", gap: 3, children: [
6861
6874
  /* @__PURE__ */ n(y, { justify: "space-between", wrap: "wrap", gap: 2, children: [
6862
6875
  /* @__PURE__ */ n(y, { gap: 2, children: [
@@ -6979,7 +6992,7 @@ const Lo = ({ origin: t }) => {
6979
6992
  /* @__PURE__ */ n(a.Row, { children: [
6980
6993
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: r.host }),
6981
6994
  /* @__PURE__ */ e(a.Cell, { children: r.cluster }),
6982
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { colorPalette: ba[r.ssh] || "red", children: r.ssh }) }),
6995
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { colorPalette: ba[r.ssh] || "red", children: r.ssh }) }),
6983
6996
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", children: r.master }),
6984
6997
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", children: r.slurm }),
6985
6998
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", children: r.workdir }),
@@ -6998,7 +7011,7 @@ const Lo = ({ origin: t }) => {
6998
7011
  queryKey: ["bujang-settings-ssh", i],
6999
7012
  queryFn: () => Yi(i || void 0)
7000
7013
  });
7001
- se(() => {
7014
+ ae(() => {
7002
7015
  g && !r && o(g.file);
7003
7016
  }, [g, r]);
7004
7017
  const C = de({
@@ -7011,7 +7024,7 @@ const Lo = ({ origin: t }) => {
7011
7024
  id: "ssh",
7012
7025
  icon: /* @__PURE__ */ e(si, {}),
7013
7026
  title: "SSH",
7014
- subtitle: /* @__PURE__ */ n(ce, { children: [
7027
+ subtitle: /* @__PURE__ */ n(se, { children: [
7015
7028
  "The ssh config entries the plugins ship, like ",
7016
7029
  /* @__PURE__ */ e(ne, { fontSize: "xs", children: "bujang ssh" }),
7017
7030
  "."
@@ -7023,11 +7036,11 @@ const Lo = ({ origin: t }) => {
7023
7036
  steps: [
7024
7037
  {
7025
7038
  title: "Fill in your values",
7026
- body: /* @__PURE__ */ e(ce, { children: "In each plugin below, give the values it asks for (your cluster username, ...)." })
7039
+ body: /* @__PURE__ */ e(se, { children: "In each plugin below, give the values it asks for (your cluster username, ...)." })
7027
7040
  },
7028
7041
  {
7029
7042
  title: "Preview, then apply",
7030
- body: /* @__PURE__ */ n(ce, { children: [
7043
+ body: /* @__PURE__ */ n(se, { children: [
7031
7044
  /* @__PURE__ */ e("b", { children: "Preview install" }),
7032
7045
  " shows what changes in your ssh config, ",
7033
7046
  /* @__PURE__ */ e("b", { children: "Apply install" }),
@@ -7036,7 +7049,7 @@ const Lo = ({ origin: t }) => {
7036
7049
  },
7037
7050
  {
7038
7051
  title: "Log in once from a terminal",
7039
- body: /* @__PURE__ */ n(ce, { children: [
7052
+ body: /* @__PURE__ */ n(se, { children: [
7040
7053
  "On clusters with two-factor authentication, run ",
7041
7054
  /* @__PURE__ */ e(ne, { fontSize: "xs", children: "ssh <host>" }),
7042
7055
  " once and approve the prompt: bujang reuses that connection and never prompts."
@@ -7044,7 +7057,7 @@ const Lo = ({ origin: t }) => {
7044
7057
  },
7045
7058
  {
7046
7059
  title: "Test the connections",
7047
- body: /* @__PURE__ */ n(ce, { children: [
7060
+ body: /* @__PURE__ */ n(se, { children: [
7048
7061
  /* @__PURE__ */ e("b", { children: "Test" }),
7049
7062
  " at the bottom of this card checks ssh, Slurm and the remote folder of each cluster; each failure comes with a hint."
7050
7063
  ] })
@@ -7152,7 +7165,7 @@ const Lo = ({ origin: t }) => {
7152
7165
  id: "secrets",
7153
7166
  icon: /* @__PURE__ */ e(ai, {}),
7154
7167
  title: "Secrets",
7155
- subtitle: /* @__PURE__ */ n(ce, { children: [
7168
+ subtitle: /* @__PURE__ */ n(se, { children: [
7156
7169
  "Used in job scripts as ",
7157
7170
  /* @__PURE__ */ e(ne, { fontSize: "xs", children: "{{ secrets.NAME }}" }),
7158
7171
  ". Values are never shown."
@@ -7161,7 +7174,7 @@ const Lo = ({ origin: t }) => {
7161
7174
  i && /* @__PURE__ */ e(me, {}),
7162
7175
  s && /* @__PURE__ */ e(l, { fontSize: "sm", color: "var(--color-status-failed)", children: vr(s) }),
7163
7176
  o && !t && o.editable && /* @__PURE__ */ e(l, { fontSize: "sm", color: "var(--color-text-muted)", children: "Secrets stay editable on a read-only server: they use the /secrets routes the host already serves." }),
7164
- o && /* @__PURE__ */ n(ce, { children: [
7177
+ o && /* @__PURE__ */ n(se, { children: [
7165
7178
  /* @__PURE__ */ e(
7166
7179
  yr,
7167
7180
  {
@@ -7169,7 +7182,7 @@ const Lo = ({ origin: t }) => {
7169
7182
  ["File", o.file ? /* @__PURE__ */ e(Ee, { children: o.file }) : /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "secrets.toml (edit it by hand)" })],
7170
7183
  [
7171
7184
  "Lookup order",
7172
- /* @__PURE__ */ e(y, { gap: 1, wrap: "wrap", children: o.providers.map((R) => /* @__PURE__ */ e(W, { size: "sm", variant: R.available ? "subtle" : "outline", children: R.kind }, R.name)) }, "p")
7185
+ /* @__PURE__ */ e(y, { gap: 1, wrap: "wrap", children: o.providers.map((R) => /* @__PURE__ */ e(E, { size: "sm", variant: R.available ? "subtle" : "outline", children: R.kind }, R.name)) }, "p")
7173
7186
  ]
7174
7187
  ]
7175
7188
  }
@@ -7183,8 +7196,8 @@ const Lo = ({ origin: t }) => {
7183
7196
  /* @__PURE__ */ e(a.Body, { children: o.secrets.map((R) => /* @__PURE__ */ n(a.Row, { children: [
7184
7197
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: R.name }),
7185
7198
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ n(y, { gap: 1, children: [
7186
- /* @__PURE__ */ e(W, { size: "sm", variant: "subtle", children: R.source }),
7187
- R.env_shadowed && /* @__PURE__ */ e(he, { content: `The environment variable ${R.name} is set: it wins over the file`, showArrow: !0, children: /* @__PURE__ */ e(W, { size: "sm", colorPalette: "orange", children: "env shadows it" }) })
7199
+ /* @__PURE__ */ e(E, { size: "sm", variant: "subtle", children: R.source }),
7200
+ R.env_shadowed && /* @__PURE__ */ e(he, { content: `The environment variable ${R.name} is set: it wins over the file`, showArrow: !0, children: /* @__PURE__ */ e(E, { size: "sm", colorPalette: "orange", children: "env shadows it" }) })
7188
7201
  ] }) }),
7189
7202
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: o.editable && R.source === "file" && (g === R.name ? /* @__PURE__ */ n(y, { gap: 1, justify: "end", children: [
7190
7203
  /* @__PURE__ */ e(L, { size: "xs", colorPalette: "red", loading: C.isPending, onClick: () => C.mutate(R.name), children: "Delete" }),
@@ -7242,13 +7255,13 @@ const Lo = ({ origin: t }) => {
7242
7255
  /* @__PURE__ */ n(y, { mb: 2, gap: 3, color: "var(--color-text)", children: [
7243
7256
  /* @__PURE__ */ e(Tn, { size: 24 }),
7244
7257
  /* @__PURE__ */ e(ge, { size: "lg", children: "Settings" }),
7245
- r && (r.writable ? /* @__PURE__ */ e(W, { colorPalette: "green", variant: "subtle", children: "editable" }) : /* @__PURE__ */ n(W, { variant: "outline", children: [
7258
+ r && (r.writable ? /* @__PURE__ */ e(E, { colorPalette: "green", variant: "subtle", children: "editable" }) : /* @__PURE__ */ n(E, { variant: "outline", children: [
7246
7259
  /* @__PURE__ */ e(Br, {}),
7247
7260
  " read-only"
7248
7261
  ] }))
7249
7262
  ] }),
7250
7263
  /* @__PURE__ */ e(l, { mb: 3, color: "var(--color-text-muted)", children: "Where bujang keeps the jobs, its database, the ssh setup of the clusters and the secrets of the scripts." }),
7251
- /* @__PURE__ */ e(y, { mb: 6, gap: 2, wrap: "wrap", fontSize: "sm", children: ca.map((s) => /* @__PURE__ */ e(Ne, { to: t.settings(s.id), children: /* @__PURE__ */ e(W, { variant: "outline", cursor: "pointer", children: s.label }) }, s.id)) }),
7264
+ /* @__PURE__ */ e(y, { mb: 6, gap: 2, wrap: "wrap", fontSize: "sm", children: ca.map((s) => /* @__PURE__ */ e(Ne, { to: t.settings(s.id), children: /* @__PURE__ */ e(E, { variant: "outline", cursor: "pointer", children: s.label }) }, s.id)) }),
7252
7265
  o && /* @__PURE__ */ e(me, {}),
7253
7266
  i && /* @__PURE__ */ e(l, { color: "var(--color-status-failed)", children: vr(i) }),
7254
7267
  r && /* @__PURE__ */ n(H, { align: "stretch", gap: 6, children: [
@@ -7282,22 +7295,22 @@ function Qt(t, r = Date.now() / 1e3) {
7282
7295
  }
7283
7296
  const dr = (t) => t ? new Date(t * 1e3).toLocaleString() : "—", za = { ok: "green", failed: "red", timeout: "orange", skipped: "gray" }, tn = ({ status: t, error: r }) => {
7284
7297
  if (!t) return /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "—" });
7285
- const o = /* @__PURE__ */ e(W, { size: "sm", colorPalette: za[t] || "gray", children: t });
7298
+ const o = /* @__PURE__ */ e(E, { size: "sm", colorPalette: za[t] || "gray", children: t });
7286
7299
  return r ? /* @__PURE__ */ e(he, { content: r, showArrow: !0, children: o }) : o;
7287
- }, ka = ({ direction: t, node: r }) => t === "pull" && r ? /* @__PURE__ */ e(he, { content: `early sync: compute node ${String(r)} → this machine`, showArrow: !0, children: /* @__PURE__ */ n(W, { size: "sm", variant: "subtle", colorPalette: "teal", children: [
7300
+ }, ka = ({ direction: t, node: r }) => t === "pull" && r ? /* @__PURE__ */ e(he, { content: `early sync: compute node ${String(r)} → this machine`, showArrow: !0, children: /* @__PURE__ */ n(E, { size: "sm", variant: "subtle", colorPalette: "teal", children: [
7288
7301
  /* @__PURE__ */ e(nn, {}),
7289
7302
  " pull ← ",
7290
7303
  String(r).split(".")[0]
7291
- ] }) }) : t === "pull" ? /* @__PURE__ */ e(he, { content: "pull: cluster → this machine", showArrow: !0, children: /* @__PURE__ */ n(W, { size: "sm", variant: "subtle", children: [
7304
+ ] }) }) : t === "pull" ? /* @__PURE__ */ e(he, { content: "pull: cluster → this machine", showArrow: !0, children: /* @__PURE__ */ n(E, { size: "sm", variant: "subtle", children: [
7292
7305
  /* @__PURE__ */ e(nn, {}),
7293
7306
  " pull"
7294
- ] }) }) : t === "push" ? /* @__PURE__ */ e(he, { content: "push: this machine → cluster", showArrow: !0, children: /* @__PURE__ */ n(W, { size: "sm", variant: "subtle", colorPalette: "purple", children: [
7307
+ ] }) }) : t === "push" ? /* @__PURE__ */ e(he, { content: "push: this machine → cluster", showArrow: !0, children: /* @__PURE__ */ n(E, { size: "sm", variant: "subtle", colorPalette: "purple", children: [
7295
7308
  /* @__PURE__ */ e(fi, {}),
7296
7309
  " push"
7297
7310
  ] }) }) : /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "—" }), yt = ({ children: t }) => /* @__PURE__ */ e(l, { fontSize: "sm", color: "var(--color-text-muted)", fontStyle: "italic", children: t }), rn = ({ children: t }) => /* @__PURE__ */ e(l, { fontSize: "sm", fontWeight: "semibold", color: "var(--color-text)", children: t });
7298
7311
  function _a() {
7299
7312
  const [t, r] = k(Date.now() / 1e3);
7300
- return se(() => {
7313
+ return ae(() => {
7301
7314
  const o = window.setInterval(() => r(Date.now() / 1e3), 1e3);
7302
7315
  return () => window.clearInterval(o);
7303
7316
  }, []), t;
@@ -7318,7 +7331,7 @@ const Ra = ({ data: t }) => {
7318
7331
  var i;
7319
7332
  return /* @__PURE__ */ n(a.Row, { children: [
7320
7333
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: /* @__PURE__ */ e(he, { content: String(((i = o.detail) == null ? void 0 : i.command) ?? "") || o.name, showArrow: !0, children: /* @__PURE__ */ e("span", { children: o.name }) }) }),
7321
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { size: "sm", variant: "subtle", children: o.kind }) }),
7334
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { size: "sm", variant: "subtle", children: o.kind }) }),
7322
7335
  /* @__PURE__ */ e(a.Cell, { children: o.cluster || "—" }),
7323
7336
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", children: dr(o.started) }),
7324
7337
  /* @__PURE__ */ e(a.Cell, { children: Je(r - o.started) }),
@@ -7334,10 +7347,10 @@ const Ra = ({ data: t }) => {
7334
7347
  /* @__PURE__ */ e(a.Body, { children: t.queue.map((o) => /* @__PURE__ */ n(a.Row, { children: [
7335
7348
  /* @__PURE__ */ e(a.Cell, { children: o.cluster }),
7336
7349
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: o.what || "—" }),
7337
- /* @__PURE__ */ e(a.Cell, { children: o.started ? /* @__PURE__ */ n(W, { size: "sm", colorPalette: "blue", children: [
7350
+ /* @__PURE__ */ e(a.Cell, { children: o.started ? /* @__PURE__ */ n(E, { size: "sm", colorPalette: "blue", children: [
7338
7351
  "running ",
7339
7352
  Je(r - o.started)
7340
- ] }) : /* @__PURE__ */ e(W, { size: "sm", colorPalette: "yellow", children: "waiting" }) }),
7353
+ ] }) : /* @__PURE__ */ e(E, { size: "sm", colorPalette: "yellow", children: "waiting" }) }),
7341
7354
  /* @__PURE__ */ e(a.Cell, { fontSize: "xs", children: Qt(o.queued, r) })
7342
7355
  ] }, o.id)) })
7343
7356
  ] })
@@ -7346,7 +7359,7 @@ const Ra = ({ data: t }) => {
7346
7359
  }
7347
7360
  );
7348
7361
  }, Ir = {
7349
- "job sync": "pulls the job folders of the clusters that have unfinished jobs (rsync), then updates the index of the jobs page for what changed. Not a database sync.",
7362
+ "full sync": "pulls the job folders of the clusters that have unfinished jobs (rsync), then updates the index of the jobs page for what changed. Not a database sync.",
7350
7363
  book_keeping: "hourly: full rsync of each cluster, accounting of the finished jobs, then removal of their folders on the cluster",
7351
7364
  scheduled_check: "submits the scheduled jobs that are due",
7352
7365
  janitor_prune: "removes the history older than the retention",
@@ -7378,12 +7391,12 @@ function rr(t) {
7378
7391
  return `${o.toFixed(o < 10 ? 1 : 0)} ${r[i]}`;
7379
7392
  }
7380
7393
  const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE__ */ e(l, { color: "var(--color-text-muted)", children: "—" }) : /* @__PURE__ */ e(he, { content: `received ${rr(t ?? 0)}, sent ${rr(r ?? 0)}`, showArrow: !0, children: /* @__PURE__ */ n(l, { as: "span", whiteSpace: "nowrap", children: [
7381
- t ? /* @__PURE__ */ n(ce, { children: [
7394
+ t ? /* @__PURE__ */ n(se, { children: [
7382
7395
  "↓ ",
7383
7396
  rr(t)
7384
7397
  ] }) : null,
7385
7398
  t && r ? " " : null,
7386
- r ? /* @__PURE__ */ n(ce, { children: [
7399
+ r ? /* @__PURE__ */ n(se, { children: [
7387
7400
  "↑ ",
7388
7401
  rr(r)
7389
7402
  ] }) : null,
@@ -7433,7 +7446,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7433
7446
  /* @__PURE__ */ e(a.Cell, { children: Je(i.seconds) }),
7434
7447
  /* @__PURE__ */ e(a.Cell, { children: Je(i.waited) }),
7435
7448
  /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(xr, { bytesIn: i.bytes_in, bytesOut: i.bytes_out }) }),
7436
- /* @__PURE__ */ e(a.Cell, { children: i.failures ? /* @__PURE__ */ e(W, { size: "sm", colorPalette: "red", children: i.failures }) : 0 })
7449
+ /* @__PURE__ */ e(a.Cell, { children: i.failures ? /* @__PURE__ */ e(E, { size: "sm", colorPalette: "red", children: i.failures }) : 0 })
7437
7450
  ] }, o)) })
7438
7451
  ] })
7439
7452
  }
@@ -7465,14 +7478,14 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7465
7478
  },
7466
7479
  onError: Gt("Could not prune the history")
7467
7480
  }), j = ($) => `${$.name}|${$.kind}|${$.cluster}`;
7468
- return /* @__PURE__ */ n(ce, { children: [
7481
+ return /* @__PURE__ */ n(se, { children: [
7469
7482
  /* @__PURE__ */ n(
7470
7483
  _t,
7471
7484
  {
7472
7485
  id: "tasks",
7473
7486
  icon: /* @__PURE__ */ e(mi, {}),
7474
7487
  title: "Tasks",
7475
- subtitle: /* @__PURE__ */ e(ce, { children: "The totals per background task, slowest in total first. Requests slower than a second are here too. Click a row to see its runs below." }),
7488
+ subtitle: /* @__PURE__ */ e(se, { children: "The totals per background task, slowest in total first. Requests slower than a second are here too. Click a row to see its runs below." }),
7476
7489
  children: [
7477
7490
  /* @__PURE__ */ n(y, { gap: 2, wrap: "wrap", children: [
7478
7491
  /* @__PURE__ */ e(Ft, { value: o, onChange: ($) => i($), options: [["day", "Last 24 hours"], ["week", "Last 7 days"]], w: "150px" }),
@@ -7495,10 +7508,10 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7495
7508
  onClick: () => m(te ? null : $),
7496
7509
  children: [
7497
7510
  /* @__PURE__ */ e(a.Cell, { fontFamily: "mono", fontSize: "xs", children: /* @__PURE__ */ e(he, { content: Ir[$.name] || $.name, showArrow: !0, children: /* @__PURE__ */ e("span", { children: $.name }) }) }),
7498
- /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(W, { size: "sm", variant: "subtle", children: $.kind }) }),
7511
+ /* @__PURE__ */ e(a.Cell, { children: /* @__PURE__ */ e(E, { size: "sm", variant: "subtle", children: $.kind }) }),
7499
7512
  /* @__PURE__ */ e(a.Cell, { children: $.cluster || "—" }),
7500
7513
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: $.runs }),
7501
- /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: $.failures ? /* @__PURE__ */ e(W, { size: "sm", colorPalette: "red", children: $.failures }) : 0 }),
7514
+ /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: $.failures ? /* @__PURE__ */ e(E, { size: "sm", colorPalette: "red", children: $.failures }) : 0 }),
7502
7515
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: Je($.mean) }),
7503
7516
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: Je($.p95) }),
7504
7517
  /* @__PURE__ */ e(a.Cell, { textAlign: "end", children: Je($.max) }),
@@ -7520,7 +7533,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7520
7533
  id: "runs",
7521
7534
  icon: /* @__PURE__ */ e(pi, {}),
7522
7535
  title: p ? `Runs of ${p.name}${p.cluster ? ` on ${p.cluster}` : ""}` : "Runs",
7523
- subtitle: /* @__PURE__ */ n(ce, { children: [
7536
+ subtitle: /* @__PURE__ */ n(se, { children: [
7524
7537
  "Every run, most recent first",
7525
7538
  p ? "" : ", with the kind and cluster chosen in Tasks",
7526
7539
  ". Kept",
@@ -7558,7 +7571,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7558
7571
  }, Ta = () => {
7559
7572
  var C;
7560
7573
  const t = ke(), r = De(), { data: o } = Q({ queryKey: ["bujang-janitor-cleanup"], queryFn: _l }), [i, s] = k("experiments"), [d, h] = k(""), [c, u] = k(null), g = (o == null ? void 0 : o.organizers) ?? [], p = ((C = g.find((f) => f.name === i)) == null ? void 0 : C.values) ?? [];
7561
- se(() => {
7574
+ ae(() => {
7562
7575
  g.length && !g.some((f) => f.name === i) && s(g[0].name);
7563
7576
  }, [g, i]);
7564
7577
  const m = de({
@@ -7612,7 +7625,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7612
7625
  /* @__PURE__ */ e(L, { size: "sm", variant: "outline", colorPalette: "blue", loading: m.isPending, onClick: () => m.mutate(), children: "Preview" })
7613
7626
  ] }),
7614
7627
  c && /* @__PURE__ */ n(H, { align: "stretch", gap: 2, mt: 3, children: [
7615
- (c.would_move ?? []).length === 0 ? /* @__PURE__ */ e(yt, { children: "Nothing to move." }) : /* @__PURE__ */ n(ce, { children: [
7628
+ (c.would_move ?? []).length === 0 ? /* @__PURE__ */ e(yt, { children: "Nothing to move." }) : /* @__PURE__ */ n(se, { children: [
7616
7629
  /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text)", children: [
7617
7630
  c.would_move.length,
7618
7631
  " job folders move:"
@@ -7683,7 +7696,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7683
7696
  /* @__PURE__ */ e(L, { size: "sm", variant: "outline", colorPalette: "blue", loading: d.isPending, onClick: () => d.mutate(), children: "Preview" })
7684
7697
  ] }),
7685
7698
  i && /* @__PURE__ */ n(H, { align: "stretch", gap: 2, mt: 3, children: [
7686
- (i.would_remove ?? []).length === 0 ? /* @__PURE__ */ e(yt, { children: "Nothing to remove." }) : /* @__PURE__ */ n(ce, { children: [
7699
+ (i.would_remove ?? []).length === 0 ? /* @__PURE__ */ e(yt, { children: "Nothing to remove." }) : /* @__PURE__ */ n(se, { children: [
7687
7700
  /* @__PURE__ */ n(l, { fontSize: "sm", color: "var(--color-text)", children: [
7688
7701
  i.would_remove.length,
7689
7702
  " job folders go:"
@@ -7738,7 +7751,7 @@ const xr = ({ bytesIn: t, bytesOut: r }) => t == null && r == null ? /* @__PURE_
7738
7751
  ] })
7739
7752
  ] }),
7740
7753
  /* @__PURE__ */ e(l, { mb: 3, color: "var(--color-text-muted)", children: "What bujang does in the background, how long it takes and how hard it uses the clusters, and the cleanups that keep it fast." }),
7741
- /* @__PURE__ */ e(y, { mb: 6, gap: 2, wrap: "wrap", children: Ca.map((h) => /* @__PURE__ */ e(Ne, { to: t.janitor(h.id), children: /* @__PURE__ */ e(W, { variant: "outline", cursor: "pointer", children: h.label }) }, h.id)) }),
7754
+ /* @__PURE__ */ e(y, { mb: 6, gap: 2, wrap: "wrap", children: Ca.map((h) => /* @__PURE__ */ e(Ne, { to: t.janitor(h.id), children: /* @__PURE__ */ e(E, { variant: "outline", cursor: "pointer", children: h.label }) }, h.id)) }),
7742
7755
  o && /* @__PURE__ */ e(me, {}),
7743
7756
  i && /* @__PURE__ */ e(l, { color: "var(--color-status-failed)", children: To(i) }),
7744
7757
  r && /* @__PURE__ */ n(H, { align: "stretch", gap: 6, children: [