@devqubit/ui 0.1.10 → 0.1.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/api/client.d.ts +17 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/components/ExportRunButton/ExportRunButton.d.ts +32 -0
- package/dist/components/ExportRunButton/ExportRunButton.d.ts.map +1 -0
- package/dist/components/ExportRunButton/index.d.ts +6 -0
- package/dist/components/ExportRunButton/index.d.ts.map +1 -0
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/RunsTable/RunsTable.d.ts +2 -1
- package/dist/components/RunsTable/RunsTable.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +2 -2
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/primitives.d.ts +10 -0
- package/dist/components/ui/primitives.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useTheme.d.ts +29 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1726 -1251
- package/dist/pages/ArtifactPage.d.ts.map +1 -1
- package/dist/pages/DiffPage.d.ts.map +1 -1
- package/dist/pages/GroupDetailPage.d.ts.map +1 -1
- package/dist/pages/RunDetailPage.d.ts.map +1 -1
- package/dist/pages/RunsPage.d.ts.map +1 -1
- package/dist/pages/SearchPage.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +36 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useLocation as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var s =
|
|
9
|
-
function
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
for (
|
|
13
|
-
if (i && i.defaultProps) for (
|
|
14
|
-
return { $$typeof:
|
|
1
|
+
import Ps, { useContext as Ze, createContext as es, useState as S, useEffect as ne, useCallback as _e, useRef as Es, forwardRef as ss } from "react";
|
|
2
|
+
import { useLocation as pt, Link as Y, useSearchParams as Be, useParams as ts, useNavigate as gt, Navigate as vt, createBrowserRouter as bt, RouterProvider as Nt } from "react-router-dom";
|
|
3
|
+
var $e = { exports: {} }, be = {};
|
|
4
|
+
var Cs;
|
|
5
|
+
function yt() {
|
|
6
|
+
if (Cs) return be;
|
|
7
|
+
Cs = 1;
|
|
8
|
+
var s = Ps, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
9
|
+
function u(i, f, h) {
|
|
10
|
+
var m, p = {}, y = null, M = null;
|
|
11
|
+
h !== void 0 && (y = "" + h), f.key !== void 0 && (y = "" + f.key), f.ref !== void 0 && (M = f.ref);
|
|
12
|
+
for (m in f) n.call(f, m) && !d.hasOwnProperty(m) && (p[m] = f[m]);
|
|
13
|
+
if (i && i.defaultProps) for (m in f = i.defaultProps, f) p[m] === void 0 && (p[m] = f[m]);
|
|
14
|
+
return { $$typeof: r, type: i, key: y, ref: M, props: p, _owner: o.current };
|
|
15
15
|
}
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
var s =
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
16
|
+
return be.Fragment = a, be.jsx = u, be.jsxs = u, be;
|
|
17
|
+
}
|
|
18
|
+
var Ne = {};
|
|
19
|
+
var Ts;
|
|
20
|
+
function _t() {
|
|
21
|
+
return Ts || (Ts = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
22
|
+
var s = Ps, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), u = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.offscreen"), _ = Symbol.iterator, H = "@@iterator";
|
|
23
|
+
function T(t) {
|
|
24
|
+
if (t === null || typeof t != "object")
|
|
25
25
|
return null;
|
|
26
|
-
var l =
|
|
26
|
+
var l = _ && t[_] || t[H];
|
|
27
27
|
return typeof l == "function" ? l : null;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
function
|
|
29
|
+
var B = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
30
|
+
function k(t) {
|
|
31
31
|
{
|
|
32
|
-
for (var l = arguments.length,
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
for (var l = arguments.length, x = new Array(l > 1 ? l - 1 : 0), g = 1; g < l; g++)
|
|
33
|
+
x[g - 1] = arguments[g];
|
|
34
|
+
te("error", t, x);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function te(t, l, x) {
|
|
38
38
|
{
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
return String(
|
|
39
|
+
var g = B.ReactDebugCurrentFrame, E = g.getStackAddendum();
|
|
40
|
+
E !== "" && (l += "%s", x = x.concat([E]));
|
|
41
|
+
var C = x.map(function(R) {
|
|
42
|
+
return String(R);
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
C.unshift("Warning: " + l), Function.prototype.apply.call(console[t], console, C);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
function
|
|
50
|
-
return !!(typeof
|
|
47
|
+
var ae = !1, J = !1, Z = !1, xe = !1, me = !1, pe;
|
|
48
|
+
pe = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
49
|
+
function qe(t) {
|
|
50
|
+
return !!(typeof t == "string" || typeof t == "function" || t === n || t === d || me || t === o || t === h || t === m || xe || t === M || ae || J || Z || typeof t == "object" && t !== null && (t.$$typeof === y || t.$$typeof === p || t.$$typeof === u || t.$$typeof === i || t.$$typeof === f || // This needs to include all possible module reference object
|
|
51
51
|
// types supported by any Flight configuration anywhere since
|
|
52
52
|
// we don't know which Flight build this will end up being used
|
|
53
53
|
// with.
|
|
54
|
-
|
|
54
|
+
t.$$typeof === pe || t.getModuleId !== void 0));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
60
|
-
var
|
|
61
|
-
return
|
|
56
|
+
function Me(t, l, x) {
|
|
57
|
+
var g = t.displayName;
|
|
58
|
+
if (g)
|
|
59
|
+
return g;
|
|
60
|
+
var E = l.displayName || l.name || "";
|
|
61
|
+
return E !== "" ? x + "(" + E + ")" : x;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function Te(t) {
|
|
64
|
+
return t.displayName || "Context";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
if (
|
|
66
|
+
function ee(t) {
|
|
67
|
+
if (t == null)
|
|
68
68
|
return null;
|
|
69
|
-
if (typeof
|
|
70
|
-
return
|
|
71
|
-
if (typeof
|
|
72
|
-
return
|
|
73
|
-
switch (
|
|
74
|
-
case
|
|
69
|
+
if (typeof t.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
70
|
+
return t.displayName || t.name || null;
|
|
71
|
+
if (typeof t == "string")
|
|
72
|
+
return t;
|
|
73
|
+
switch (t) {
|
|
74
|
+
case n:
|
|
75
75
|
return "Fragment";
|
|
76
|
-
case
|
|
76
|
+
case a:
|
|
77
77
|
return "Portal";
|
|
78
|
-
case h:
|
|
79
|
-
return "Profiler";
|
|
80
78
|
case d:
|
|
81
|
-
return "
|
|
79
|
+
return "Profiler";
|
|
82
80
|
case o:
|
|
81
|
+
return "StrictMode";
|
|
82
|
+
case h:
|
|
83
83
|
return "Suspense";
|
|
84
|
-
case
|
|
84
|
+
case m:
|
|
85
85
|
return "SuspenseList";
|
|
86
86
|
}
|
|
87
|
-
if (typeof
|
|
88
|
-
switch (
|
|
87
|
+
if (typeof t == "object")
|
|
88
|
+
switch (t.$$typeof) {
|
|
89
89
|
case i:
|
|
90
|
-
var l =
|
|
91
|
-
return
|
|
90
|
+
var l = t;
|
|
91
|
+
return Te(l) + ".Consumer";
|
|
92
|
+
case u:
|
|
93
|
+
var x = t;
|
|
94
|
+
return Te(x._context) + ".Provider";
|
|
92
95
|
case f:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return
|
|
97
|
-
case
|
|
98
|
-
var
|
|
99
|
-
return j !== null ? j : W(r.type) || "Memo";
|
|
100
|
-
case _: {
|
|
101
|
-
var y = r, R = y._payload, N = y._init;
|
|
96
|
+
return Me(t, t.render, "ForwardRef");
|
|
97
|
+
case p:
|
|
98
|
+
var g = t.displayName || null;
|
|
99
|
+
return g !== null ? g : ee(t.type) || "Memo";
|
|
100
|
+
case y: {
|
|
101
|
+
var E = t, C = E._payload, R = E._init;
|
|
102
102
|
try {
|
|
103
|
-
return
|
|
103
|
+
return ee(R(C));
|
|
104
104
|
} catch {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
@@ -108,999 +108,1119 @@ function hs() {
|
|
|
108
108
|
}
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var w = Object.assign, P = 0, ke, ge, Se, le, cs, ls, os;
|
|
112
|
+
function ds() {
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
function
|
|
114
|
+
ds.__reactDisabledLog = !0;
|
|
115
|
+
function Gs() {
|
|
116
116
|
{
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
var
|
|
117
|
+
if (P === 0) {
|
|
118
|
+
ke = console.log, ge = console.info, Se = console.warn, le = console.error, cs = console.group, ls = console.groupCollapsed, os = console.groupEnd;
|
|
119
|
+
var t = {
|
|
120
120
|
configurable: !0,
|
|
121
121
|
enumerable: !0,
|
|
122
|
-
value:
|
|
122
|
+
value: ds,
|
|
123
123
|
writable: !0
|
|
124
124
|
};
|
|
125
125
|
Object.defineProperties(console, {
|
|
126
|
-
info:
|
|
127
|
-
log:
|
|
128
|
-
warn:
|
|
129
|
-
error:
|
|
130
|
-
group:
|
|
131
|
-
groupCollapsed:
|
|
132
|
-
groupEnd:
|
|
126
|
+
info: t,
|
|
127
|
+
log: t,
|
|
128
|
+
warn: t,
|
|
129
|
+
error: t,
|
|
130
|
+
group: t,
|
|
131
|
+
groupCollapsed: t,
|
|
132
|
+
groupEnd: t
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
P++;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Vs() {
|
|
139
139
|
{
|
|
140
|
-
if (
|
|
141
|
-
var
|
|
140
|
+
if (P--, P === 0) {
|
|
141
|
+
var t = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
147
|
-
log:
|
|
148
|
-
value:
|
|
147
|
+
log: w({}, t, {
|
|
148
|
+
value: ke
|
|
149
149
|
}),
|
|
150
|
-
info:
|
|
151
|
-
value:
|
|
150
|
+
info: w({}, t, {
|
|
151
|
+
value: ge
|
|
152
152
|
}),
|
|
153
|
-
warn:
|
|
154
|
-
value:
|
|
153
|
+
warn: w({}, t, {
|
|
154
|
+
value: Se
|
|
155
155
|
}),
|
|
156
|
-
error:
|
|
157
|
-
value:
|
|
156
|
+
error: w({}, t, {
|
|
157
|
+
value: le
|
|
158
158
|
}),
|
|
159
|
-
group:
|
|
160
|
-
value:
|
|
159
|
+
group: w({}, t, {
|
|
160
|
+
value: cs
|
|
161
161
|
}),
|
|
162
|
-
groupCollapsed:
|
|
163
|
-
value:
|
|
162
|
+
groupCollapsed: w({}, t, {
|
|
163
|
+
value: ls
|
|
164
164
|
}),
|
|
165
|
-
groupEnd:
|
|
166
|
-
value:
|
|
165
|
+
groupEnd: w({}, t, {
|
|
166
|
+
value: os
|
|
167
167
|
})
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
P < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
var
|
|
174
|
-
function
|
|
173
|
+
var Ue = B.ReactCurrentDispatcher, We;
|
|
174
|
+
function Pe(t, l, x) {
|
|
175
175
|
{
|
|
176
|
-
if (
|
|
176
|
+
if (We === void 0)
|
|
177
177
|
try {
|
|
178
178
|
throw Error();
|
|
179
|
-
} catch (
|
|
180
|
-
var
|
|
181
|
-
|
|
179
|
+
} catch (E) {
|
|
180
|
+
var g = E.stack.trim().match(/\n( *(at )?)/);
|
|
181
|
+
We = g && g[1] || "";
|
|
182
182
|
}
|
|
183
183
|
return `
|
|
184
|
-
` +
|
|
184
|
+
` + We + t;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var Ge = !1, De;
|
|
188
188
|
{
|
|
189
|
-
var
|
|
190
|
-
|
|
189
|
+
var zs = typeof WeakMap == "function" ? WeakMap : Map;
|
|
190
|
+
De = new zs();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
if (!
|
|
192
|
+
function us(t, l) {
|
|
193
|
+
if (!t || Ge)
|
|
194
194
|
return "";
|
|
195
195
|
{
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
196
|
+
var x = De.get(t);
|
|
197
|
+
if (x !== void 0)
|
|
198
|
+
return x;
|
|
199
199
|
}
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
var
|
|
200
|
+
var g;
|
|
201
|
+
Ge = !0;
|
|
202
|
+
var E = Error.prepareStackTrace;
|
|
203
203
|
Error.prepareStackTrace = void 0;
|
|
204
|
-
var
|
|
205
|
-
|
|
204
|
+
var C;
|
|
205
|
+
C = Ue.current, Ue.current = null, Gs();
|
|
206
206
|
try {
|
|
207
207
|
if (l) {
|
|
208
|
-
var
|
|
208
|
+
var R = function() {
|
|
209
209
|
throw Error();
|
|
210
210
|
};
|
|
211
|
-
if (Object.defineProperty(
|
|
211
|
+
if (Object.defineProperty(R.prototype, "props", {
|
|
212
212
|
set: function() {
|
|
213
213
|
throw Error();
|
|
214
214
|
}
|
|
215
215
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
216
216
|
try {
|
|
217
|
-
Reflect.construct(
|
|
218
|
-
} catch (
|
|
219
|
-
|
|
217
|
+
Reflect.construct(R, []);
|
|
218
|
+
} catch (U) {
|
|
219
|
+
g = U;
|
|
220
220
|
}
|
|
221
|
-
Reflect.construct(
|
|
221
|
+
Reflect.construct(t, [], R);
|
|
222
222
|
} else {
|
|
223
223
|
try {
|
|
224
|
-
|
|
225
|
-
} catch (
|
|
226
|
-
|
|
224
|
+
R.call();
|
|
225
|
+
} catch (U) {
|
|
226
|
+
g = U;
|
|
227
227
|
}
|
|
228
|
-
|
|
228
|
+
t.call(R.prototype);
|
|
229
229
|
}
|
|
230
230
|
} else {
|
|
231
231
|
try {
|
|
232
232
|
throw Error();
|
|
233
|
-
} catch (
|
|
234
|
-
|
|
233
|
+
} catch (U) {
|
|
234
|
+
g = U;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
t();
|
|
237
237
|
}
|
|
238
|
-
} catch (
|
|
239
|
-
if (
|
|
240
|
-
for (var
|
|
241
|
-
`),
|
|
242
|
-
`),
|
|
243
|
-
|
|
244
|
-
for (;
|
|
245
|
-
if (
|
|
246
|
-
if (
|
|
238
|
+
} catch (U) {
|
|
239
|
+
if (U && g && typeof U.stack == "string") {
|
|
240
|
+
for (var v = U.stack.split(`
|
|
241
|
+
`), q = g.stack.split(`
|
|
242
|
+
`), A = v.length - 1, F = q.length - 1; A >= 1 && F >= 0 && v[A] !== q[F]; )
|
|
243
|
+
F--;
|
|
244
|
+
for (; A >= 1 && F >= 0; A--, F--)
|
|
245
|
+
if (v[A] !== q[F]) {
|
|
246
|
+
if (A !== 1 || F !== 1)
|
|
247
247
|
do
|
|
248
|
-
if (
|
|
249
|
-
var
|
|
250
|
-
` +
|
|
251
|
-
return
|
|
248
|
+
if (A--, F--, F < 0 || v[A] !== q[F]) {
|
|
249
|
+
var X = `
|
|
250
|
+
` + v[A].replace(" at new ", " at ");
|
|
251
|
+
return t.displayName && X.includes("<anonymous>") && (X = X.replace("<anonymous>", t.displayName)), typeof t == "function" && De.set(t, X), X;
|
|
252
252
|
}
|
|
253
|
-
while (
|
|
253
|
+
while (A >= 1 && F >= 0);
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
} finally {
|
|
258
|
-
|
|
258
|
+
Ge = !1, Ue.current = C, Vs(), Error.prepareStackTrace = E;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
return typeof
|
|
260
|
+
var je = t ? t.displayName || t.name : "", oe = je ? Pe(je) : "";
|
|
261
|
+
return typeof t == "function" && De.set(t, oe), oe;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function Ys(t, l, x) {
|
|
264
|
+
return us(t, !1);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
var l =
|
|
266
|
+
function Ks(t) {
|
|
267
|
+
var l = t.prototype;
|
|
268
268
|
return !!(l && l.isReactComponent);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
if (
|
|
270
|
+
function Ae(t, l, x) {
|
|
271
|
+
if (t == null)
|
|
272
272
|
return "";
|
|
273
|
-
if (typeof
|
|
274
|
-
return
|
|
275
|
-
if (typeof
|
|
276
|
-
return
|
|
277
|
-
switch (
|
|
278
|
-
case
|
|
279
|
-
return
|
|
280
|
-
case
|
|
281
|
-
return
|
|
273
|
+
if (typeof t == "function")
|
|
274
|
+
return us(t, Ks(t));
|
|
275
|
+
if (typeof t == "string")
|
|
276
|
+
return Pe(t);
|
|
277
|
+
switch (t) {
|
|
278
|
+
case h:
|
|
279
|
+
return Pe("Suspense");
|
|
280
|
+
case m:
|
|
281
|
+
return Pe("SuspenseList");
|
|
282
282
|
}
|
|
283
|
-
if (typeof
|
|
284
|
-
switch (
|
|
285
|
-
case
|
|
286
|
-
return
|
|
287
|
-
case
|
|
288
|
-
return
|
|
289
|
-
case
|
|
290
|
-
var
|
|
283
|
+
if (typeof t == "object")
|
|
284
|
+
switch (t.$$typeof) {
|
|
285
|
+
case f:
|
|
286
|
+
return Ys(t.render);
|
|
287
|
+
case p:
|
|
288
|
+
return Ae(t.type, l, x);
|
|
289
|
+
case y: {
|
|
290
|
+
var g = t, E = g._payload, C = g._init;
|
|
291
291
|
try {
|
|
292
|
-
return
|
|
292
|
+
return Ae(C(E), l, x);
|
|
293
293
|
} catch {
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
return "";
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
if (
|
|
302
|
-
var l =
|
|
303
|
-
|
|
299
|
+
var ve = Object.prototype.hasOwnProperty, hs = {}, xs = B.ReactDebugCurrentFrame;
|
|
300
|
+
function Fe(t) {
|
|
301
|
+
if (t) {
|
|
302
|
+
var l = t._owner, x = Ae(t.type, t._source, l ? l.type : null);
|
|
303
|
+
xs.setExtraStackFrame(x);
|
|
304
304
|
} else
|
|
305
|
-
|
|
305
|
+
xs.setExtraStackFrame(null);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Hs(t, l, x, g, E) {
|
|
308
308
|
{
|
|
309
|
-
var
|
|
310
|
-
for (var
|
|
311
|
-
if (
|
|
312
|
-
var
|
|
309
|
+
var C = Function.call.bind(ve);
|
|
310
|
+
for (var R in t)
|
|
311
|
+
if (C(t, R)) {
|
|
312
|
+
var v = void 0;
|
|
313
313
|
try {
|
|
314
|
-
if (typeof
|
|
315
|
-
var
|
|
316
|
-
throw
|
|
314
|
+
if (typeof t[R] != "function") {
|
|
315
|
+
var q = Error((g || "React class") + ": " + x + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
316
|
+
throw q.name = "Invariant Violation", q;
|
|
317
317
|
}
|
|
318
|
-
|
|
319
|
-
} catch (
|
|
320
|
-
|
|
318
|
+
v = t[R](l, R, g, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
319
|
+
} catch (A) {
|
|
320
|
+
v = A;
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
v && !(v instanceof Error) && (Fe(E), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", x, R, typeof v), Fe(null)), v instanceof Error && !(v.message in hs) && (hs[v.message] = !0, Fe(E), k("Failed %s type: %s", x, v.message), Fe(null));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
function
|
|
328
|
-
return
|
|
326
|
+
var Js = Array.isArray;
|
|
327
|
+
function Ve(t) {
|
|
328
|
+
return Js(t);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Xs(t) {
|
|
331
331
|
{
|
|
332
|
-
var l = typeof Symbol == "function" && Symbol.toStringTag,
|
|
333
|
-
return
|
|
332
|
+
var l = typeof Symbol == "function" && Symbol.toStringTag, x = l && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
333
|
+
return x;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Qs(t) {
|
|
337
337
|
try {
|
|
338
|
-
return
|
|
338
|
+
return ms(t), !1;
|
|
339
339
|
} catch {
|
|
340
340
|
return !0;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
return "" +
|
|
343
|
+
function ms(t) {
|
|
344
|
+
return "" + t;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
if (
|
|
348
|
-
return
|
|
346
|
+
function fs(t) {
|
|
347
|
+
if (Qs(t))
|
|
348
|
+
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xs(t)), ms(t);
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var js = B.ReactCurrentOwner, Zs = {
|
|
351
351
|
key: !0,
|
|
352
352
|
ref: !0,
|
|
353
353
|
__self: !0,
|
|
354
354
|
__source: !0
|
|
355
|
-
},
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
358
|
-
var l = Object.getOwnPropertyDescriptor(
|
|
355
|
+
}, ps, gs;
|
|
356
|
+
function et(t) {
|
|
357
|
+
if (ve.call(t, "ref")) {
|
|
358
|
+
var l = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
359
359
|
if (l && l.isReactWarning)
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
|
-
return
|
|
362
|
+
return t.ref !== void 0;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
var l = Object.getOwnPropertyDescriptor(
|
|
364
|
+
function st(t) {
|
|
365
|
+
if (ve.call(t, "key")) {
|
|
366
|
+
var l = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
367
367
|
if (l && l.isReactWarning)
|
|
368
368
|
return !1;
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return t.key !== void 0;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
typeof
|
|
372
|
+
function tt(t, l) {
|
|
373
|
+
typeof t.ref == "string" && js.current;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function rt(t, l) {
|
|
376
376
|
{
|
|
377
|
-
var
|
|
378
|
-
|
|
377
|
+
var x = function() {
|
|
378
|
+
ps || (ps = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
379
379
|
};
|
|
380
|
-
|
|
381
|
-
get:
|
|
380
|
+
x.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
381
|
+
get: x,
|
|
382
382
|
configurable: !0
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function nt(t, l) {
|
|
387
387
|
{
|
|
388
|
-
var
|
|
389
|
-
|
|
388
|
+
var x = function() {
|
|
389
|
+
gs || (gs = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
390
390
|
};
|
|
391
|
-
|
|
392
|
-
get:
|
|
391
|
+
x.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
392
|
+
get: x,
|
|
393
393
|
configurable: !0
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
var
|
|
398
|
-
var
|
|
397
|
+
var at = function(t, l, x, g, E, C, R) {
|
|
398
|
+
var v = {
|
|
399
399
|
// This tag allows us to uniquely identify this as a React Element
|
|
400
|
-
$$typeof:
|
|
400
|
+
$$typeof: r,
|
|
401
401
|
// Built-in properties that belong on the element
|
|
402
|
-
type:
|
|
402
|
+
type: t,
|
|
403
403
|
key: l,
|
|
404
|
-
ref:
|
|
405
|
-
props:
|
|
404
|
+
ref: x,
|
|
405
|
+
props: R,
|
|
406
406
|
// Record the component responsible for creating this element.
|
|
407
|
-
_owner:
|
|
407
|
+
_owner: C
|
|
408
408
|
};
|
|
409
|
-
return
|
|
409
|
+
return v._store = {}, Object.defineProperty(v._store, "validated", {
|
|
410
410
|
configurable: !1,
|
|
411
411
|
enumerable: !1,
|
|
412
412
|
writable: !0,
|
|
413
413
|
value: !1
|
|
414
|
-
}), Object.defineProperty(
|
|
414
|
+
}), Object.defineProperty(v, "_self", {
|
|
415
415
|
configurable: !1,
|
|
416
416
|
enumerable: !1,
|
|
417
417
|
writable: !1,
|
|
418
|
-
value:
|
|
419
|
-
}), Object.defineProperty(
|
|
418
|
+
value: g
|
|
419
|
+
}), Object.defineProperty(v, "_source", {
|
|
420
420
|
configurable: !1,
|
|
421
421
|
enumerable: !1,
|
|
422
422
|
writable: !1,
|
|
423
|
-
value:
|
|
424
|
-
}), Object.freeze && (Object.freeze(
|
|
423
|
+
value: E
|
|
424
|
+
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
|
|
425
425
|
};
|
|
426
|
-
function
|
|
426
|
+
function it(t, l, x, g, E) {
|
|
427
427
|
{
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
for (
|
|
431
|
-
|
|
432
|
-
if (
|
|
433
|
-
var
|
|
434
|
-
for (
|
|
435
|
-
|
|
428
|
+
var C, R = {}, v = null, q = null;
|
|
429
|
+
x !== void 0 && (fs(x), v = "" + x), st(l) && (fs(l.key), v = "" + l.key), et(l) && (q = l.ref, tt(l, E));
|
|
430
|
+
for (C in l)
|
|
431
|
+
ve.call(l, C) && !Zs.hasOwnProperty(C) && (R[C] = l[C]);
|
|
432
|
+
if (t && t.defaultProps) {
|
|
433
|
+
var A = t.defaultProps;
|
|
434
|
+
for (C in A)
|
|
435
|
+
R[C] === void 0 && (R[C] = A[C]);
|
|
436
436
|
}
|
|
437
|
-
if (
|
|
438
|
-
var
|
|
439
|
-
|
|
437
|
+
if (v || q) {
|
|
438
|
+
var F = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
439
|
+
v && rt(R, F), q && nt(R, F);
|
|
440
440
|
}
|
|
441
|
-
return
|
|
441
|
+
return at(t, v, q, E, g, js.current, R);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
var
|
|
445
|
-
function
|
|
446
|
-
if (
|
|
447
|
-
var l =
|
|
448
|
-
|
|
444
|
+
var ze = B.ReactCurrentOwner, vs = B.ReactDebugCurrentFrame;
|
|
445
|
+
function fe(t) {
|
|
446
|
+
if (t) {
|
|
447
|
+
var l = t._owner, x = Ae(t.type, t._source, l ? l.type : null);
|
|
448
|
+
vs.setExtraStackFrame(x);
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
vs.setExtraStackFrame(null);
|
|
451
451
|
}
|
|
452
|
-
var
|
|
453
|
-
|
|
454
|
-
function
|
|
455
|
-
return typeof
|
|
452
|
+
var Ye;
|
|
453
|
+
Ye = !1;
|
|
454
|
+
function Ke(t) {
|
|
455
|
+
return typeof t == "object" && t !== null && t.$$typeof === r;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function bs() {
|
|
458
458
|
{
|
|
459
|
-
if (
|
|
460
|
-
var
|
|
461
|
-
if (
|
|
459
|
+
if (ze.current) {
|
|
460
|
+
var t = ee(ze.current.type);
|
|
461
|
+
if (t)
|
|
462
462
|
return `
|
|
463
463
|
|
|
464
|
-
Check the render method of \`` +
|
|
464
|
+
Check the render method of \`` + t + "`.";
|
|
465
465
|
}
|
|
466
466
|
return "";
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ct(t) {
|
|
470
470
|
return "";
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
472
|
+
var Ns = {};
|
|
473
|
+
function lt(t) {
|
|
474
474
|
{
|
|
475
|
-
var l =
|
|
475
|
+
var l = bs();
|
|
476
476
|
if (!l) {
|
|
477
|
-
var
|
|
478
|
-
|
|
477
|
+
var x = typeof t == "string" ? t : t.displayName || t.name;
|
|
478
|
+
x && (l = `
|
|
479
479
|
|
|
480
|
-
Check the top-level render call using <` +
|
|
480
|
+
Check the top-level render call using <` + x + ">.");
|
|
481
481
|
}
|
|
482
482
|
return l;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function ys(t, l) {
|
|
486
486
|
{
|
|
487
|
-
if (!
|
|
487
|
+
if (!t._store || t._store.validated || t.key != null)
|
|
488
488
|
return;
|
|
489
|
-
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
489
|
+
t._store.validated = !0;
|
|
490
|
+
var x = lt(l);
|
|
491
|
+
if (Ns[x])
|
|
492
492
|
return;
|
|
493
|
-
|
|
494
|
-
var
|
|
495
|
-
|
|
493
|
+
Ns[x] = !0;
|
|
494
|
+
var g = "";
|
|
495
|
+
t && t._owner && t._owner !== ze.current && (g = " It was passed a child from " + ee(t._owner.type) + "."), fe(t), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, g), fe(null);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function _s(t, l) {
|
|
499
499
|
{
|
|
500
|
-
if (typeof
|
|
500
|
+
if (typeof t != "object")
|
|
501
501
|
return;
|
|
502
|
-
if (
|
|
503
|
-
for (var
|
|
504
|
-
var
|
|
505
|
-
|
|
502
|
+
if (Ve(t))
|
|
503
|
+
for (var x = 0; x < t.length; x++) {
|
|
504
|
+
var g = t[x];
|
|
505
|
+
Ke(g) && ys(g, l);
|
|
506
506
|
}
|
|
507
|
-
else if (
|
|
508
|
-
|
|
509
|
-
else if (
|
|
510
|
-
var
|
|
511
|
-
if (typeof
|
|
512
|
-
for (var
|
|
513
|
-
|
|
507
|
+
else if (Ke(t))
|
|
508
|
+
t._store && (t._store.validated = !0);
|
|
509
|
+
else if (t) {
|
|
510
|
+
var E = T(t);
|
|
511
|
+
if (typeof E == "function" && E !== t.entries)
|
|
512
|
+
for (var C = E.call(t), R; !(R = C.next()).done; )
|
|
513
|
+
Ke(R.value) && ys(R.value, l);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ot(t) {
|
|
518
518
|
{
|
|
519
|
-
var l =
|
|
519
|
+
var l = t.type;
|
|
520
520
|
if (l == null || typeof l == "string")
|
|
521
521
|
return;
|
|
522
|
-
var
|
|
522
|
+
var x;
|
|
523
523
|
if (typeof l == "function")
|
|
524
|
-
|
|
525
|
-
else if (typeof l == "object" && (l.$$typeof ===
|
|
524
|
+
x = l.propTypes;
|
|
525
|
+
else if (typeof l == "object" && (l.$$typeof === f || // Note: Memo only checks outer props here.
|
|
526
526
|
// Inner props are checked in the reconciler.
|
|
527
|
-
l.$$typeof ===
|
|
528
|
-
|
|
527
|
+
l.$$typeof === p))
|
|
528
|
+
x = l.propTypes;
|
|
529
529
|
else
|
|
530
530
|
return;
|
|
531
|
-
if (
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
} else if (l.PropTypes !== void 0 && !
|
|
535
|
-
|
|
536
|
-
var
|
|
537
|
-
|
|
531
|
+
if (x) {
|
|
532
|
+
var g = ee(l);
|
|
533
|
+
Hs(x, t.props, "prop", g, t);
|
|
534
|
+
} else if (l.PropTypes !== void 0 && !Ye) {
|
|
535
|
+
Ye = !0;
|
|
536
|
+
var E = ee(l);
|
|
537
|
+
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
538
538
|
}
|
|
539
|
-
typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved &&
|
|
539
|
+
typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function dt(t) {
|
|
543
543
|
{
|
|
544
|
-
for (var l = Object.keys(
|
|
545
|
-
var
|
|
546
|
-
if (
|
|
547
|
-
|
|
544
|
+
for (var l = Object.keys(t.props), x = 0; x < l.length; x++) {
|
|
545
|
+
var g = l[x];
|
|
546
|
+
if (g !== "children" && g !== "key") {
|
|
547
|
+
fe(t), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), fe(null);
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
|
|
551
|
+
t.ref !== null && (fe(t), k("Invalid attribute `ref` supplied to `React.Fragment`."), fe(null));
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
function
|
|
554
|
+
var ws = {};
|
|
555
|
+
function Rs(t, l, x, g, E, C) {
|
|
556
556
|
{
|
|
557
|
-
var
|
|
558
|
-
if (!
|
|
559
|
-
var
|
|
560
|
-
(
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
var
|
|
564
|
-
|
|
557
|
+
var R = qe(t);
|
|
558
|
+
if (!R) {
|
|
559
|
+
var v = "";
|
|
560
|
+
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
561
|
+
var q = ct();
|
|
562
|
+
q ? v += q : v += bs();
|
|
563
|
+
var A;
|
|
564
|
+
t === null ? A = "null" : Ve(t) ? A = "array" : t !== void 0 && t.$$typeof === r ? (A = "<" + (ee(t.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : A = typeof t, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, v);
|
|
565
565
|
}
|
|
566
|
-
var
|
|
567
|
-
if (
|
|
568
|
-
return
|
|
569
|
-
if (
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
if (
|
|
574
|
-
for (var
|
|
575
|
-
|
|
576
|
-
Object.freeze && Object.freeze(
|
|
566
|
+
var F = it(t, l, x, E, C);
|
|
567
|
+
if (F == null)
|
|
568
|
+
return F;
|
|
569
|
+
if (R) {
|
|
570
|
+
var X = l.children;
|
|
571
|
+
if (X !== void 0)
|
|
572
|
+
if (g)
|
|
573
|
+
if (Ve(X)) {
|
|
574
|
+
for (var je = 0; je < X.length; je++)
|
|
575
|
+
_s(X[je], t);
|
|
576
|
+
Object.freeze && Object.freeze(X);
|
|
577
577
|
} else
|
|
578
|
-
|
|
578
|
+
k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
579
579
|
else
|
|
580
|
-
|
|
580
|
+
_s(X, t);
|
|
581
581
|
}
|
|
582
|
-
if (
|
|
583
|
-
var
|
|
584
|
-
return
|
|
585
|
-
}),
|
|
586
|
-
if (!
|
|
587
|
-
var
|
|
588
|
-
|
|
582
|
+
if (ve.call(l, "key")) {
|
|
583
|
+
var oe = ee(t), U = Object.keys(l).filter(function(jt) {
|
|
584
|
+
return jt !== "key";
|
|
585
|
+
}), He = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
586
|
+
if (!ws[oe + He]) {
|
|
587
|
+
var ft = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
|
|
588
|
+
k(`A props object containing a "key" prop is being spread into JSX:
|
|
589
589
|
let props = %s;
|
|
590
590
|
<%s {...props} />
|
|
591
591
|
React keys must be passed directly to JSX without using spread:
|
|
592
592
|
let props = %s;
|
|
593
|
-
<%s key={someKey} {...props} />`,
|
|
593
|
+
<%s key={someKey} {...props} />`, He, oe, ft, oe), ws[oe + He] = !0;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
return
|
|
596
|
+
return t === n ? dt(F) : ot(F), F;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
599
|
+
function ut(t, l, x) {
|
|
600
|
+
return Rs(t, l, x, !0);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
602
|
+
function ht(t, l, x) {
|
|
603
|
+
return Rs(t, l, x, !1);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
})()),
|
|
608
|
-
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
return
|
|
612
|
-
}
|
|
613
|
-
var e =
|
|
614
|
-
class
|
|
615
|
-
constructor(
|
|
616
|
-
super(
|
|
605
|
+
var xt = ht, mt = ut;
|
|
606
|
+
Ne.Fragment = n, Ne.jsx = xt, Ne.jsxs = mt;
|
|
607
|
+
})()), Ne;
|
|
608
|
+
}
|
|
609
|
+
var ks;
|
|
610
|
+
function wt() {
|
|
611
|
+
return ks || (ks = 1, process.env.NODE_ENV === "production" ? $e.exports = yt() : $e.exports = _t()), $e.exports;
|
|
612
|
+
}
|
|
613
|
+
var e = wt();
|
|
614
|
+
class we extends Error {
|
|
615
|
+
constructor(r, a) {
|
|
616
|
+
super(a), this.status = r, this.name = "ApiError";
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class
|
|
619
|
+
class Rt {
|
|
620
620
|
baseUrl;
|
|
621
621
|
headers;
|
|
622
|
-
constructor(
|
|
623
|
-
this.baseUrl =
|
|
622
|
+
constructor(r = {}) {
|
|
623
|
+
this.baseUrl = r.baseUrl ?? "", this.headers = {
|
|
624
624
|
"Content-Type": "application/json",
|
|
625
|
-
...
|
|
625
|
+
...r.headers
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
async request(
|
|
629
|
-
let
|
|
630
|
-
if (
|
|
631
|
-
const
|
|
632
|
-
Object.entries(
|
|
633
|
-
|
|
628
|
+
async request(r, a, n = {}) {
|
|
629
|
+
let o = `${this.baseUrl}${a}`;
|
|
630
|
+
if (n.params) {
|
|
631
|
+
const u = new URLSearchParams();
|
|
632
|
+
Object.entries(n.params).forEach(([f, h]) => {
|
|
633
|
+
h != null && h !== "" && u.set(f, String(h));
|
|
634
634
|
});
|
|
635
|
-
const i =
|
|
636
|
-
i && (
|
|
635
|
+
const i = u.toString();
|
|
636
|
+
i && (o += `?${i}`);
|
|
637
637
|
}
|
|
638
|
-
const
|
|
639
|
-
method:
|
|
638
|
+
const d = await fetch(o, {
|
|
639
|
+
method: r,
|
|
640
640
|
headers: this.headers,
|
|
641
|
-
body:
|
|
641
|
+
body: n.body ? JSON.stringify(n.body) : void 0
|
|
642
642
|
});
|
|
643
|
-
if (!
|
|
644
|
-
const
|
|
645
|
-
throw new
|
|
643
|
+
if (!d.ok) {
|
|
644
|
+
const u = await d.json().catch(() => ({ detail: "Unknown error" }));
|
|
645
|
+
throw new we(d.status, u.detail || d.statusText);
|
|
646
646
|
}
|
|
647
|
-
if (!(
|
|
648
|
-
return
|
|
647
|
+
if (!(d.status === 204 || d.headers.get("content-length") === "0"))
|
|
648
|
+
return d.json();
|
|
649
649
|
}
|
|
650
650
|
async getCapabilities() {
|
|
651
651
|
return this.request("GET", "/api/v1/capabilities");
|
|
652
652
|
}
|
|
653
|
-
async listRuns(
|
|
654
|
-
return this.request("GET", "/api/runs", { params:
|
|
653
|
+
async listRuns(r) {
|
|
654
|
+
return this.request("GET", "/api/runs", { params: r });
|
|
655
655
|
}
|
|
656
|
-
async getRun(
|
|
657
|
-
return this.request("GET", `/api/runs/${
|
|
656
|
+
async getRun(r) {
|
|
657
|
+
return this.request("GET", `/api/runs/${r}`);
|
|
658
658
|
}
|
|
659
|
-
async deleteRun(
|
|
660
|
-
await this.request("DELETE", `/api/runs/${
|
|
659
|
+
async deleteRun(r) {
|
|
660
|
+
await this.request("DELETE", `/api/runs/${r}`);
|
|
661
661
|
}
|
|
662
|
-
async setBaseline(
|
|
663
|
-
return this.request("POST", `/api/projects/${
|
|
662
|
+
async setBaseline(r, a) {
|
|
663
|
+
return this.request("POST", `/api/projects/${r}/baseline/${a}`, {
|
|
664
664
|
params: { redirect: "false" }
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
async listProjects(
|
|
668
|
-
return this.request("GET", "/api/projects", { params:
|
|
667
|
+
async listProjects(r) {
|
|
668
|
+
return this.request("GET", "/api/projects", { params: r });
|
|
669
669
|
}
|
|
670
|
-
async listGroups(
|
|
671
|
-
return this.request("GET", "/api/groups", { params:
|
|
670
|
+
async listGroups(r) {
|
|
671
|
+
return this.request("GET", "/api/groups", { params: r });
|
|
672
672
|
}
|
|
673
|
-
async getGroup(
|
|
674
|
-
return this.request("GET", `/api/groups/${
|
|
673
|
+
async getGroup(r) {
|
|
674
|
+
return this.request("GET", `/api/groups/${r}`);
|
|
675
675
|
}
|
|
676
|
-
async getDiff(
|
|
676
|
+
async getDiff(r, a) {
|
|
677
677
|
return this.request("GET", "/api/diff", {
|
|
678
|
-
params: { a:
|
|
678
|
+
params: { a: r, b: a }
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
|
-
async getArtifact(
|
|
682
|
-
return this.request("GET", `/api/runs/${
|
|
681
|
+
async getArtifact(r, a) {
|
|
682
|
+
return this.request("GET", `/api/runs/${r}/artifacts/${a}`);
|
|
683
|
+
}
|
|
684
|
+
getArtifactDownloadUrl(r, a) {
|
|
685
|
+
return `${this.baseUrl}/api/runs/${r}/artifacts/${a}/raw`;
|
|
686
|
+
}
|
|
687
|
+
async createExport(r) {
|
|
688
|
+
return this.request("POST", `/api/runs/${r}/export`);
|
|
683
689
|
}
|
|
684
|
-
|
|
685
|
-
return
|
|
690
|
+
async getExportInfo(r) {
|
|
691
|
+
return this.request("GET", `/api/runs/${r}/export/info`);
|
|
686
692
|
}
|
|
693
|
+
getExportDownloadUrl(r) {
|
|
694
|
+
return `${this.baseUrl}/api/runs/${r}/export/download`;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
const Et = new Rt();
|
|
698
|
+
function Q(s) {
|
|
699
|
+
return s?.slice(0, 8) ?? "";
|
|
700
|
+
}
|
|
701
|
+
function Xe(s) {
|
|
702
|
+
return s?.slice(0, 12) ?? "N/A";
|
|
703
|
+
}
|
|
704
|
+
function Le(s) {
|
|
705
|
+
const r = new Date(s), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - r.getTime()) / 1e3);
|
|
706
|
+
if (n < 60) return "just now";
|
|
707
|
+
if (n < 3600) {
|
|
708
|
+
const d = Math.floor(n / 60);
|
|
709
|
+
return `${d} minute${d !== 1 ? "s" : ""} ago`;
|
|
710
|
+
}
|
|
711
|
+
if (n < 86400) {
|
|
712
|
+
const d = Math.floor(n / 3600);
|
|
713
|
+
return `${d} hour${d !== 1 ? "s" : ""} ago`;
|
|
714
|
+
}
|
|
715
|
+
if (n < 2592e3) {
|
|
716
|
+
const d = Math.floor(n / 86400);
|
|
717
|
+
return `${d} day${d !== 1 ? "s" : ""} ago`;
|
|
718
|
+
}
|
|
719
|
+
if (n < 31536e3) {
|
|
720
|
+
const d = Math.floor(n / 2592e3);
|
|
721
|
+
return `${d} month${d !== 1 ? "s" : ""} ago`;
|
|
722
|
+
}
|
|
723
|
+
const o = Math.floor(n / 31536e3);
|
|
724
|
+
return `${o} year${o !== 1 ? "s" : ""} ago`;
|
|
725
|
+
}
|
|
726
|
+
function Ct(s, r = 6) {
|
|
727
|
+
return typeof s != "number" || isNaN(s) ? String(s) : Number(s.toPrecision(r)).toString();
|
|
728
|
+
}
|
|
729
|
+
function Oe(s) {
|
|
730
|
+
return s < 1024 ? `${s} bytes` : s < 1048576 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1048576).toFixed(1)} MB`;
|
|
731
|
+
}
|
|
732
|
+
function Tt(s) {
|
|
733
|
+
return JSON.stringify(s, null, 2);
|
|
687
734
|
}
|
|
688
|
-
|
|
689
|
-
|
|
735
|
+
function kt(s, r = 60) {
|
|
736
|
+
return s ? s.length <= r ? s : s.slice(0, r - 3) + "..." : "";
|
|
737
|
+
}
|
|
738
|
+
function ur(s, r) {
|
|
739
|
+
const a = new URLSearchParams();
|
|
740
|
+
Object.entries(r).forEach(([o, d]) => {
|
|
741
|
+
d != null && d !== "" && a.set(o, String(d));
|
|
742
|
+
});
|
|
743
|
+
const n = a.toString();
|
|
744
|
+
return n ? `${s}?${n}` : s;
|
|
745
|
+
}
|
|
746
|
+
function $(...s) {
|
|
747
|
+
return s.filter(Boolean).join(" ");
|
|
748
|
+
}
|
|
749
|
+
function Ds(s, r) {
|
|
750
|
+
const a = new Date(s).getTime(), n = r ? new Date(r).getTime() : Date.now();
|
|
751
|
+
return Math.max(0, Math.floor((n - a) / 1e3));
|
|
752
|
+
}
|
|
753
|
+
function As(s) {
|
|
754
|
+
if (s < 60) return `${s}s`;
|
|
755
|
+
const r = Math.floor(s / 86400), a = Math.floor(s % 86400 / 3600), n = Math.floor(s % 3600 / 60), o = s % 60;
|
|
756
|
+
return r > 0 ? `${r}d ${a}h ${n}m` : a > 0 ? `${a}h ${n}m ${o}s` : `${n}m ${o}s`;
|
|
757
|
+
}
|
|
758
|
+
function rs(s) {
|
|
759
|
+
return s === "FINISHED" || s === "FAILED" || s === "KILLED";
|
|
760
|
+
}
|
|
761
|
+
const Fs = es(null);
|
|
762
|
+
function hr({ children: s }) {
|
|
763
|
+
const r = {
|
|
764
|
+
theme: "light",
|
|
765
|
+
resolvedTheme: "light",
|
|
766
|
+
setTheme: () => {
|
|
767
|
+
},
|
|
768
|
+
toggleTheme: () => {
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
return /* @__PURE__ */ e.jsx(Fs.Provider, { value: r, children: s });
|
|
772
|
+
}
|
|
773
|
+
function St() {
|
|
774
|
+
const s = Ze(Fs);
|
|
775
|
+
return s || {
|
|
776
|
+
theme: "light",
|
|
777
|
+
resolvedTheme: "light",
|
|
778
|
+
setTheme: () => {
|
|
779
|
+
},
|
|
780
|
+
toggleTheme: () => {
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
function xr() {
|
|
785
|
+
return St();
|
|
786
|
+
}
|
|
787
|
+
const $s = 1e3, Os = es(null);
|
|
788
|
+
function Pt({
|
|
690
789
|
children: s,
|
|
691
|
-
api:
|
|
692
|
-
initialWorkspace:
|
|
790
|
+
api: r = Et,
|
|
791
|
+
initialWorkspace: a = null
|
|
693
792
|
}) {
|
|
694
|
-
const [
|
|
695
|
-
return
|
|
696
|
-
|
|
697
|
-
}, [
|
|
793
|
+
const [n, o] = S(null), [d, u] = S(a);
|
|
794
|
+
return ne(() => {
|
|
795
|
+
r.getCapabilities().then(o).catch(console.error);
|
|
796
|
+
}, [r]), /* @__PURE__ */ e.jsx(Os.Provider, { value: { api: r, capabilities: n, currentWorkspace: d, setCurrentWorkspace: u }, children: s });
|
|
698
797
|
}
|
|
699
|
-
function
|
|
700
|
-
const s =
|
|
798
|
+
function z() {
|
|
799
|
+
const s = Ze(Os);
|
|
701
800
|
if (!s) throw new Error("useApp must be used within AppProvider");
|
|
702
801
|
return s;
|
|
703
802
|
}
|
|
704
|
-
function
|
|
705
|
-
const [
|
|
803
|
+
function ue(s, r = []) {
|
|
804
|
+
const [a, n] = S({
|
|
706
805
|
data: null,
|
|
707
806
|
loading: !0,
|
|
708
807
|
error: null
|
|
709
|
-
}),
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
|
|
808
|
+
}), o = Es(!0), d = Es(s);
|
|
809
|
+
d.current = s;
|
|
810
|
+
const u = _e(async () => {
|
|
811
|
+
n((i) => ({ ...i, loading: !0, error: null }));
|
|
713
812
|
try {
|
|
714
|
-
const i = await
|
|
715
|
-
|
|
813
|
+
const i = await d.current();
|
|
814
|
+
o.current && n({ data: i, loading: !1, error: null });
|
|
716
815
|
} catch (i) {
|
|
717
|
-
|
|
816
|
+
o.current && n({
|
|
718
817
|
data: null,
|
|
719
818
|
loading: !1,
|
|
720
|
-
error: i instanceof
|
|
819
|
+
error: i instanceof we ? i : new we(500, String(i))
|
|
721
820
|
});
|
|
722
821
|
}
|
|
723
822
|
}, []);
|
|
724
|
-
return
|
|
725
|
-
|
|
726
|
-
}),
|
|
727
|
-
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
823
|
+
return ne(() => (o.current = !0, u(), () => {
|
|
824
|
+
o.current = !1;
|
|
825
|
+
}), r), { ...a, refetch: u };
|
|
826
|
+
}
|
|
827
|
+
function Ls(s, r, a) {
|
|
828
|
+
ne(() => {
|
|
829
|
+
if (!a) return;
|
|
830
|
+
const n = setInterval(s, r), o = () => {
|
|
831
|
+
document.visibilityState === "visible" && s();
|
|
832
|
+
};
|
|
833
|
+
return document.addEventListener("visibilitychange", o), () => {
|
|
834
|
+
clearInterval(n), document.removeEventListener("visibilitychange", o);
|
|
835
|
+
};
|
|
836
|
+
}, [s, r, a]);
|
|
837
|
+
}
|
|
838
|
+
function Bs(s) {
|
|
839
|
+
const { api: r, currentWorkspace: a } = z(), n = ue(
|
|
840
|
+
() => r.listRuns({ ...s, workspace: a?.id }),
|
|
841
|
+
[r, a?.id, s?.project, s?.status, s?.q, s?.limit]
|
|
733
842
|
);
|
|
843
|
+
return Ls(n.refetch, $s, !0), n;
|
|
734
844
|
}
|
|
735
|
-
function
|
|
736
|
-
const { api:
|
|
737
|
-
return ne(
|
|
845
|
+
function Is(s) {
|
|
846
|
+
const { api: r } = z(), a = ue(
|
|
738
847
|
async () => {
|
|
739
|
-
const { run:
|
|
740
|
-
return
|
|
848
|
+
const { run: o } = await r.getRun(s);
|
|
849
|
+
return o;
|
|
741
850
|
},
|
|
742
|
-
[
|
|
743
|
-
);
|
|
851
|
+
[r, s]
|
|
852
|
+
), n = a.data ? !rs(a.data.status) : !1;
|
|
853
|
+
return Ls(a.refetch, $s, n), a;
|
|
744
854
|
}
|
|
745
|
-
function
|
|
746
|
-
const { api: s, currentWorkspace:
|
|
747
|
-
return
|
|
855
|
+
function Ie() {
|
|
856
|
+
const { api: s, currentWorkspace: r } = z();
|
|
857
|
+
return ue(
|
|
748
858
|
async () => {
|
|
749
|
-
const { projects:
|
|
750
|
-
return
|
|
859
|
+
const { projects: a } = await s.listProjects({ workspace: r?.id });
|
|
860
|
+
return a;
|
|
751
861
|
},
|
|
752
|
-
[s,
|
|
862
|
+
[s, r?.id]
|
|
753
863
|
);
|
|
754
864
|
}
|
|
755
|
-
function
|
|
756
|
-
const { api:
|
|
757
|
-
return
|
|
865
|
+
function Dt(s) {
|
|
866
|
+
const { api: r, currentWorkspace: a } = z();
|
|
867
|
+
return ue(
|
|
758
868
|
async () => {
|
|
759
|
-
const { groups:
|
|
760
|
-
return
|
|
869
|
+
const { groups: n } = await r.listGroups({ ...s, workspace: a?.id });
|
|
870
|
+
return n;
|
|
761
871
|
},
|
|
762
|
-
[
|
|
872
|
+
[r, a?.id, s?.project]
|
|
763
873
|
);
|
|
764
874
|
}
|
|
765
|
-
function
|
|
766
|
-
const { api:
|
|
767
|
-
return
|
|
768
|
-
() =>
|
|
769
|
-
[
|
|
875
|
+
function At(s) {
|
|
876
|
+
const { api: r } = z();
|
|
877
|
+
return ue(
|
|
878
|
+
() => r.getGroup(s),
|
|
879
|
+
[r, s]
|
|
770
880
|
);
|
|
771
881
|
}
|
|
772
|
-
function
|
|
773
|
-
const { api:
|
|
774
|
-
return
|
|
775
|
-
() =>
|
|
776
|
-
[
|
|
882
|
+
function Ft(s, r) {
|
|
883
|
+
const { api: a } = z();
|
|
884
|
+
return ue(
|
|
885
|
+
() => a.getDiff(s, r),
|
|
886
|
+
[a, s, r]
|
|
777
887
|
);
|
|
778
888
|
}
|
|
779
|
-
function
|
|
780
|
-
const { api:
|
|
781
|
-
return
|
|
782
|
-
() =>
|
|
783
|
-
[
|
|
889
|
+
function $t(s, r) {
|
|
890
|
+
const { api: a } = z();
|
|
891
|
+
return ue(
|
|
892
|
+
() => a.getArtifact(s, r),
|
|
893
|
+
[a, s, r]
|
|
784
894
|
);
|
|
785
895
|
}
|
|
786
|
-
function
|
|
787
|
-
const [
|
|
788
|
-
return { mutate:
|
|
789
|
-
|
|
896
|
+
function Re(s) {
|
|
897
|
+
const [r, a] = S(!1), [n, o] = S(null);
|
|
898
|
+
return { mutate: _e(async (...u) => {
|
|
899
|
+
a(!0), o(null);
|
|
790
900
|
try {
|
|
791
|
-
return await s(...
|
|
901
|
+
return await s(...u);
|
|
792
902
|
} catch (i) {
|
|
793
|
-
const
|
|
794
|
-
throw
|
|
903
|
+
const f = i instanceof we ? i : new we(500, String(i));
|
|
904
|
+
throw o(f), f;
|
|
795
905
|
} finally {
|
|
796
|
-
|
|
906
|
+
a(!1);
|
|
797
907
|
}
|
|
798
|
-
}, [s]), loading:
|
|
908
|
+
}, [s]), loading: r, error: n };
|
|
799
909
|
}
|
|
800
|
-
|
|
801
|
-
return s?.slice(0, 8) ?? "";
|
|
802
|
-
}
|
|
803
|
-
function qe(s) {
|
|
804
|
-
return s?.slice(0, 12) ?? "N/A";
|
|
805
|
-
}
|
|
806
|
-
function Te(s) {
|
|
807
|
-
const n = new Date(s), a = Math.floor(((/* @__PURE__ */ new Date()).getTime() - n.getTime()) / 1e3);
|
|
808
|
-
if (a < 60) return "just now";
|
|
809
|
-
if (a < 3600) {
|
|
810
|
-
const h = Math.floor(a / 60);
|
|
811
|
-
return `${h} minute${h !== 1 ? "s" : ""} ago`;
|
|
812
|
-
}
|
|
813
|
-
if (a < 86400) {
|
|
814
|
-
const h = Math.floor(a / 3600);
|
|
815
|
-
return `${h} hour${h !== 1 ? "s" : ""} ago`;
|
|
816
|
-
}
|
|
817
|
-
if (a < 2592e3) {
|
|
818
|
-
const h = Math.floor(a / 86400);
|
|
819
|
-
return `${h} day${h !== 1 ? "s" : ""} ago`;
|
|
820
|
-
}
|
|
821
|
-
if (a < 31536e3) {
|
|
822
|
-
const h = Math.floor(a / 2592e3);
|
|
823
|
-
return `${h} month${h !== 1 ? "s" : ""} ago`;
|
|
824
|
-
}
|
|
825
|
-
const d = Math.floor(a / 31536e3);
|
|
826
|
-
return `${d} year${d !== 1 ? "s" : ""} ago`;
|
|
827
|
-
}
|
|
828
|
-
function Ns(s, n = 6) {
|
|
829
|
-
return typeof s != "number" || isNaN(s) ? String(s) : Number(s.toPrecision(n)).toString();
|
|
830
|
-
}
|
|
831
|
-
function Pe(s) {
|
|
832
|
-
return s < 1024 ? `${s} bytes` : s < 1048576 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1048576).toFixed(1)} MB`;
|
|
833
|
-
}
|
|
834
|
-
function _s(s) {
|
|
835
|
-
return JSON.stringify(s, null, 2);
|
|
836
|
-
}
|
|
837
|
-
function ys(s, n = 60) {
|
|
838
|
-
return s ? s.length <= n ? s : s.slice(0, n - 3) + "..." : "";
|
|
839
|
-
}
|
|
840
|
-
function Ws(s, n) {
|
|
841
|
-
const t = new URLSearchParams();
|
|
842
|
-
Object.entries(n).forEach(([d, h]) => {
|
|
843
|
-
h != null && h !== "" && t.set(d, String(h));
|
|
844
|
-
});
|
|
845
|
-
const a = t.toString();
|
|
846
|
-
return a ? `${s}?${a}` : s;
|
|
847
|
-
}
|
|
848
|
-
function A(...s) {
|
|
849
|
-
return s.filter(Boolean).join(" ");
|
|
850
|
-
}
|
|
851
|
-
const Rs = [
|
|
910
|
+
const Ot = [
|
|
852
911
|
{ href: "/runs", label: "Runs", matchPaths: ["/runs"] },
|
|
853
912
|
{ href: "/projects", label: "Projects", matchPaths: ["/projects"] },
|
|
854
913
|
{ href: "/groups", label: "Groups", matchPaths: ["/groups"] },
|
|
855
914
|
{ href: "/diff", label: "Compare", matchPaths: ["/diff"] },
|
|
856
915
|
{ href: "/search", label: "Search", matchPaths: ["/search"] }
|
|
857
|
-
],
|
|
858
|
-
function
|
|
916
|
+
], qs = es(null);
|
|
917
|
+
function mr({
|
|
859
918
|
config: s,
|
|
860
|
-
children:
|
|
919
|
+
children: r
|
|
861
920
|
}) {
|
|
862
|
-
return /* @__PURE__ */ e.jsx(
|
|
863
|
-
}
|
|
864
|
-
function
|
|
865
|
-
return
|
|
866
|
-
}
|
|
867
|
-
function
|
|
868
|
-
const
|
|
869
|
-
...
|
|
870
|
-
...
|
|
871
|
-
...
|
|
872
|
-
], i =
|
|
873
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "
|
|
874
|
-
/* @__PURE__ */ e.jsx("header", { className: "
|
|
875
|
-
/* @__PURE__ */ e.jsxs("div", { className: "
|
|
876
|
-
/* @__PURE__ */ e.jsxs(
|
|
877
|
-
i.icon && /* @__PURE__ */ e.jsx("span", { children: i.icon }),
|
|
921
|
+
return /* @__PURE__ */ e.jsx(qs.Provider, { value: s, children: r });
|
|
922
|
+
}
|
|
923
|
+
function Lt() {
|
|
924
|
+
return Ze(qs);
|
|
925
|
+
}
|
|
926
|
+
function V({ children: s, config: r }) {
|
|
927
|
+
const a = pt(), o = { ...Lt(), ...r }, d = o?.navLinks ?? Ot, u = [
|
|
928
|
+
...o?.prependNavLinks ?? [],
|
|
929
|
+
...d,
|
|
930
|
+
...o?.appendNavLinks ?? []
|
|
931
|
+
], i = o?.logo ?? { text: "devqubit", icon: "⚛" }, f = (h) => h.matchPaths ? h.matchPaths.some((m) => a.pathname.startsWith(m)) : a.pathname === h.href;
|
|
932
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "dq-layout", children: [
|
|
933
|
+
/* @__PURE__ */ e.jsx("header", { className: "dq-header", children: /* @__PURE__ */ e.jsxs("div", { className: "dq-header-inner", children: [
|
|
934
|
+
/* @__PURE__ */ e.jsxs("div", { className: "dq-header-left", children: [
|
|
935
|
+
/* @__PURE__ */ e.jsxs(Y, { to: "/", className: "dq-logo", children: [
|
|
936
|
+
i.icon && /* @__PURE__ */ e.jsx("span", { className: "dq-logo-icon", children: i.icon }),
|
|
878
937
|
i.text
|
|
879
938
|
] }),
|
|
880
|
-
/* @__PURE__ */ e.jsx("nav", { className: "
|
|
881
|
-
|
|
939
|
+
/* @__PURE__ */ e.jsx("nav", { className: "dq-nav", children: u.map((h) => /* @__PURE__ */ e.jsx(
|
|
940
|
+
Y,
|
|
882
941
|
{
|
|
883
|
-
to:
|
|
884
|
-
className:
|
|
885
|
-
|
|
886
|
-
x(o) ? "text-white bg-primary/20" : "text-gray-400 hover:text-white hover:bg-white/10"
|
|
887
|
-
),
|
|
888
|
-
children: o.label
|
|
942
|
+
to: h.href,
|
|
943
|
+
className: $("dq-nav-link", f(h) && "active"),
|
|
944
|
+
children: h.label
|
|
889
945
|
},
|
|
890
|
-
|
|
946
|
+
h.href
|
|
891
947
|
)) })
|
|
892
948
|
] }),
|
|
893
|
-
/* @__PURE__ */ e.jsx("div", { className: "
|
|
949
|
+
/* @__PURE__ */ e.jsx("div", { className: "dq-header-right", children: o?.headerRight })
|
|
894
950
|
] }) }),
|
|
895
|
-
/* @__PURE__ */ e.jsx("main", { className: "
|
|
951
|
+
/* @__PURE__ */ e.jsx("main", { className: "dq-main fade-in", children: s })
|
|
896
952
|
] });
|
|
897
953
|
}
|
|
898
|
-
function
|
|
899
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "
|
|
954
|
+
function Ee({ title: s, subtitle: r, actions: a }) {
|
|
955
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
|
|
900
956
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
901
|
-
/* @__PURE__ */ e.jsx("h1", { className: "
|
|
902
|
-
|
|
957
|
+
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: s }),
|
|
958
|
+
r && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: r })
|
|
903
959
|
] }),
|
|
904
|
-
|
|
960
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: a })
|
|
905
961
|
] });
|
|
906
962
|
}
|
|
907
|
-
function
|
|
908
|
-
return /* @__PURE__ */ e.jsx("span", { className:
|
|
963
|
+
function K({ variant: s = "gray", className: r, children: a, ...n }) {
|
|
964
|
+
return /* @__PURE__ */ e.jsx("span", { className: $("badge", `badge-${s}`, r), ...n, children: a });
|
|
909
965
|
}
|
|
910
|
-
const
|
|
911
|
-
({ variant: s = "secondary", size:
|
|
966
|
+
const D = ss(
|
|
967
|
+
({ variant: s = "secondary", size: r = "default", loading: a, className: n, children: o, disabled: d, ...u }, i) => /* @__PURE__ */ e.jsxs(
|
|
912
968
|
"button",
|
|
913
969
|
{
|
|
914
970
|
ref: i,
|
|
915
|
-
className:
|
|
971
|
+
className: $(
|
|
916
972
|
"btn",
|
|
917
973
|
s === "ghost-danger" ? "btn-ghost-danger" : `btn-${s}`,
|
|
918
|
-
|
|
919
|
-
|
|
974
|
+
r === "sm" && "btn-sm",
|
|
975
|
+
n
|
|
920
976
|
),
|
|
921
|
-
disabled:
|
|
922
|
-
...
|
|
977
|
+
disabled: d || a,
|
|
978
|
+
...u,
|
|
923
979
|
children: [
|
|
924
|
-
|
|
925
|
-
|
|
980
|
+
a && /* @__PURE__ */ e.jsx(I, {}),
|
|
981
|
+
o
|
|
926
982
|
]
|
|
927
983
|
}
|
|
928
984
|
)
|
|
929
985
|
);
|
|
930
|
-
|
|
931
|
-
function
|
|
932
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
986
|
+
D.displayName = "Button";
|
|
987
|
+
function b({ className: s, children: r, ...a }) {
|
|
988
|
+
return /* @__PURE__ */ e.jsx("div", { className: $("card", s), ...a, children: r });
|
|
933
989
|
}
|
|
934
|
-
function
|
|
935
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
990
|
+
function W({ className: s, children: r, ...a }) {
|
|
991
|
+
return /* @__PURE__ */ e.jsx("div", { className: $("card-header", s), ...a, children: r });
|
|
936
992
|
}
|
|
937
|
-
function
|
|
938
|
-
return /* @__PURE__ */ e.jsx("h3", { className:
|
|
993
|
+
function G({ className: s, children: r, ...a }) {
|
|
994
|
+
return /* @__PURE__ */ e.jsx("h3", { className: $("card-title", s), ...a, children: r });
|
|
939
995
|
}
|
|
940
|
-
function
|
|
941
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
996
|
+
function fr({ variant: s = "info", className: r, children: a, ...n }) {
|
|
997
|
+
return /* @__PURE__ */ e.jsx("div", { className: $("alert", `alert-${s}`, r), ...n, children: a });
|
|
942
998
|
}
|
|
943
|
-
function
|
|
944
|
-
return /* @__PURE__ */ e.jsx("span", { className:
|
|
999
|
+
function I({ className: s, ...r }) {
|
|
1000
|
+
return /* @__PURE__ */ e.jsx("span", { className: $("spinner", s), ...r });
|
|
945
1001
|
}
|
|
946
|
-
function
|
|
947
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1002
|
+
function he({ message: s, hint: r, className: a, ...n }) {
|
|
1003
|
+
return /* @__PURE__ */ e.jsxs("div", { className: $("empty-state", a), ...n, children: [
|
|
948
1004
|
/* @__PURE__ */ e.jsx("p", { children: s }),
|
|
949
|
-
|
|
1005
|
+
r && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: r })
|
|
950
1006
|
] });
|
|
951
1007
|
}
|
|
952
|
-
function
|
|
953
|
-
return /* @__PURE__ */ e.jsx("dl", { className:
|
|
954
|
-
/* @__PURE__ */ e.jsx("dt", { children:
|
|
955
|
-
/* @__PURE__ */ e.jsx("dd", { children:
|
|
956
|
-
] },
|
|
1008
|
+
function Qe({ items: s, className: r, ...a }) {
|
|
1009
|
+
return /* @__PURE__ */ e.jsx("dl", { className: $("kv-list", r), ...a, children: s.map(({ label: n, value: o }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
|
|
1010
|
+
/* @__PURE__ */ e.jsx("dt", { children: n }),
|
|
1011
|
+
/* @__PURE__ */ e.jsx("dd", { children: o })
|
|
1012
|
+
] }, n)) });
|
|
957
1013
|
}
|
|
958
|
-
function
|
|
1014
|
+
function ns({ open: s, onClose: r, title: a, children: n, actions: o }) {
|
|
959
1015
|
return s ? /* @__PURE__ */ e.jsx(
|
|
960
1016
|
"div",
|
|
961
1017
|
{
|
|
962
|
-
className:
|
|
963
|
-
onClick: (
|
|
964
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (
|
|
965
|
-
/* @__PURE__ */ e.jsx("h3", { className: "modal-title", children:
|
|
966
|
-
/* @__PURE__ */ e.jsx("div", { className: "modal-body", children:
|
|
967
|
-
|
|
1018
|
+
className: $("modal-backdrop", s && "active"),
|
|
1019
|
+
onClick: (d) => d.target === d.currentTarget && r(),
|
|
1020
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (d) => d.stopPropagation(), children: [
|
|
1021
|
+
/* @__PURE__ */ e.jsx("h3", { className: "modal-title", children: a }),
|
|
1022
|
+
/* @__PURE__ */ e.jsx("div", { className: "modal-body", children: n }),
|
|
1023
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: o })
|
|
968
1024
|
] })
|
|
969
1025
|
}
|
|
970
1026
|
) : null;
|
|
971
1027
|
}
|
|
972
|
-
function
|
|
973
|
-
if (!
|
|
974
|
-
const
|
|
975
|
-
success: "
|
|
976
|
-
error: "
|
|
977
|
-
info: "
|
|
978
|
-
}[
|
|
979
|
-
|
|
1028
|
+
function Ce({ message: s, variant: r = "info", visible: a, onClose: n }) {
|
|
1029
|
+
if (!a) return null;
|
|
1030
|
+
const o = {
|
|
1031
|
+
success: "✓",
|
|
1032
|
+
error: "✕",
|
|
1033
|
+
info: "i"
|
|
1034
|
+
}[r], d = {
|
|
1035
|
+
success: "text-[#059669]",
|
|
1036
|
+
error: "text-[#DC4A4A]",
|
|
1037
|
+
info: "text-[#2563EB]"
|
|
1038
|
+
}[r];
|
|
1039
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick: n, children: [
|
|
1040
|
+
/* @__PURE__ */ e.jsx("span", { className: $("mr-2 font-bold", d), children: o }),
|
|
1041
|
+
s
|
|
1042
|
+
] });
|
|
980
1043
|
}
|
|
981
|
-
function
|
|
982
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1044
|
+
function se({ children: s, className: r }) {
|
|
1045
|
+
return /* @__PURE__ */ e.jsx("div", { className: $("form-group", r), children: s });
|
|
983
1046
|
}
|
|
984
|
-
function
|
|
985
|
-
return /* @__PURE__ */ e.jsx("label", { className:
|
|
1047
|
+
function ce({ className: s, children: r, ...a }) {
|
|
1048
|
+
return /* @__PURE__ */ e.jsx("label", { className: $("form-label", s), ...a, children: r });
|
|
986
1049
|
}
|
|
987
|
-
const
|
|
988
|
-
({ className: s, ...
|
|
1050
|
+
const as = ss(
|
|
1051
|
+
({ className: s, ...r }, a) => /* @__PURE__ */ e.jsx("input", { ref: a, className: $("form-input", s), ...r })
|
|
989
1052
|
);
|
|
990
|
-
|
|
991
|
-
const
|
|
992
|
-
({ className: s, children:
|
|
1053
|
+
as.displayName = "Input";
|
|
1054
|
+
const de = ss(
|
|
1055
|
+
({ className: s, children: r, ...a }, n) => /* @__PURE__ */ e.jsx("select", { ref: n, className: $("form-input", s), ...a, children: r })
|
|
993
1056
|
);
|
|
994
|
-
|
|
995
|
-
function
|
|
996
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1057
|
+
de.displayName = "Select";
|
|
1058
|
+
function Ms({ children: s, className: r }) {
|
|
1059
|
+
return /* @__PURE__ */ e.jsx("div", { className: $("form-row", r), children: s });
|
|
997
1060
|
}
|
|
998
|
-
function O({ className: s, children:
|
|
999
|
-
return /* @__PURE__ */ e.jsx("table", { className:
|
|
1061
|
+
function O({ className: s, children: r, ...a }) {
|
|
1062
|
+
return /* @__PURE__ */ e.jsx("table", { className: $("table", s), ...a, children: r });
|
|
1000
1063
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return /* @__PURE__ */ e.jsx("thead", { className: s, ...
|
|
1064
|
+
function re({ className: s, children: r, ...a }) {
|
|
1065
|
+
return /* @__PURE__ */ e.jsx("thead", { className: s, ...a, children: r });
|
|
1003
1066
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return /* @__PURE__ */ e.jsx("tbody", { className: s, ...
|
|
1067
|
+
function L({ className: s, children: r, ...a }) {
|
|
1068
|
+
return /* @__PURE__ */ e.jsx("tbody", { className: s, ...a, children: r });
|
|
1006
1069
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return /* @__PURE__ */ e.jsx("tr", { className: s, ...
|
|
1070
|
+
function j({ className: s, children: r, ...a }) {
|
|
1071
|
+
return /* @__PURE__ */ e.jsx("tr", { className: s, ...a, children: r });
|
|
1009
1072
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return /* @__PURE__ */ e.jsx("th", { className: s, ...
|
|
1073
|
+
function N({ className: s, children: r, ...a }) {
|
|
1074
|
+
return /* @__PURE__ */ e.jsx("th", { className: s, ...a, children: r });
|
|
1012
1075
|
}
|
|
1013
|
-
function c({ className: s, children:
|
|
1014
|
-
return /* @__PURE__ */ e.jsx("td", { className: s, ...
|
|
1076
|
+
function c({ className: s, children: r, ...a }) {
|
|
1077
|
+
return /* @__PURE__ */ e.jsx("td", { className: s, ...a, children: r });
|
|
1015
1078
|
}
|
|
1016
|
-
function
|
|
1017
|
-
const
|
|
1079
|
+
function Us({ status: s }) {
|
|
1080
|
+
const r = {
|
|
1018
1081
|
FINISHED: "success",
|
|
1019
1082
|
FAILED: "danger",
|
|
1083
|
+
KILLED: "gray",
|
|
1020
1084
|
RUNNING: "warning",
|
|
1021
1085
|
UNKNOWN: "gray"
|
|
1022
1086
|
}[s];
|
|
1023
|
-
return /* @__PURE__ */ e.jsx(
|
|
1024
|
-
}
|
|
1025
|
-
function
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
/* @__PURE__ */ e.jsx(
|
|
1042
|
-
/* @__PURE__ */ e.jsx(
|
|
1043
|
-
|
|
1044
|
-
|
|
1087
|
+
return /* @__PURE__ */ e.jsx(K, { variant: r, children: s });
|
|
1088
|
+
}
|
|
1089
|
+
function Bt({ createdAt: s, endedAt: r, status: a }) {
|
|
1090
|
+
const n = !rs(a), [o, d] = S(Date.now());
|
|
1091
|
+
ne(() => {
|
|
1092
|
+
if (!n) return;
|
|
1093
|
+
const h = setInterval(() => d(Date.now()), 1e3);
|
|
1094
|
+
return () => clearInterval(h);
|
|
1095
|
+
}, [n]);
|
|
1096
|
+
const i = Ds(s, n ? void 0 : r), f = n ? Math.max(0, Math.floor((o - new Date(s).getTime()) / 1e3)) : i;
|
|
1097
|
+
return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: As(f) });
|
|
1098
|
+
}
|
|
1099
|
+
function is({ runs: s, onDelete: r, loading: a, emptyHint: n, baselineRunId: o }) {
|
|
1100
|
+
const [d, u] = S(null), i = () => {
|
|
1101
|
+
d && r && (r(d.run_id), u(null));
|
|
1102
|
+
};
|
|
1103
|
+
return s.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1104
|
+
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
1105
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1106
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run ID" }),
|
|
1107
|
+
/* @__PURE__ */ e.jsx(N, { children: "Name" }),
|
|
1108
|
+
/* @__PURE__ */ e.jsx(N, { children: "Project" }),
|
|
1109
|
+
/* @__PURE__ */ e.jsx(N, { children: "Status" }),
|
|
1110
|
+
/* @__PURE__ */ e.jsx(N, { children: "Duration" }),
|
|
1111
|
+
/* @__PURE__ */ e.jsx(N, { children: "Created" }),
|
|
1112
|
+
/* @__PURE__ */ e.jsx(N, { children: "Actions" })
|
|
1113
|
+
] }) }),
|
|
1114
|
+
/* @__PURE__ */ e.jsx(L, { children: s.map((f) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1115
|
+
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
1116
|
+
/* @__PURE__ */ e.jsx(Y, { to: `/runs/${f.run_id}`, className: "font-mono", children: Q(f.run_id) }),
|
|
1117
|
+
f.run_id === o && /* @__PURE__ */ e.jsx(K, { variant: "info", className: "ml-2", children: "Baseline" })
|
|
1118
|
+
] }),
|
|
1119
|
+
/* @__PURE__ */ e.jsx(c, { children: f.run_name || "—" }),
|
|
1120
|
+
/* @__PURE__ */ e.jsx(c, { children: f.project }),
|
|
1121
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Us, { status: f.status }) }),
|
|
1122
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: /* @__PURE__ */ e.jsx(
|
|
1123
|
+
Bt,
|
|
1045
1124
|
{
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
confirm(`Delete run ${K(d.run_id)}? This cannot be undone.`) && n(d.run_id);
|
|
1050
|
-
},
|
|
1051
|
-
disabled: t,
|
|
1052
|
-
children: "Delete"
|
|
1125
|
+
createdAt: f.created_at,
|
|
1126
|
+
endedAt: f.ended_at,
|
|
1127
|
+
status: f.status
|
|
1053
1128
|
}
|
|
1054
|
-
)
|
|
1055
|
-
|
|
1056
|
-
|
|
1129
|
+
) }),
|
|
1130
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-muted", children: Le(f.created_at) }),
|
|
1131
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1132
|
+
/* @__PURE__ */ e.jsx(Y, { to: `/runs/${f.run_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
|
|
1133
|
+
r && /* @__PURE__ */ e.jsx(
|
|
1134
|
+
D,
|
|
1135
|
+
{
|
|
1136
|
+
variant: "ghost-danger",
|
|
1137
|
+
size: "sm",
|
|
1138
|
+
onClick: () => u(f),
|
|
1139
|
+
disabled: a,
|
|
1140
|
+
children: "Delete"
|
|
1141
|
+
}
|
|
1142
|
+
)
|
|
1143
|
+
] }) })
|
|
1144
|
+
] }, f.run_id)) })
|
|
1145
|
+
] }),
|
|
1146
|
+
/* @__PURE__ */ e.jsxs(
|
|
1147
|
+
ns,
|
|
1148
|
+
{
|
|
1149
|
+
open: !!d,
|
|
1150
|
+
onClose: () => u(null),
|
|
1151
|
+
title: "Delete Run",
|
|
1152
|
+
actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1153
|
+
/* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => u(null), children: "Cancel" }),
|
|
1154
|
+
/* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: i, disabled: a, children: [
|
|
1155
|
+
a && /* @__PURE__ */ e.jsx(I, {}),
|
|
1156
|
+
"Delete"
|
|
1157
|
+
] })
|
|
1158
|
+
] }),
|
|
1159
|
+
children: [
|
|
1160
|
+
/* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
|
|
1161
|
+
d && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(d.run_id) }),
|
|
1162
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
|
|
1163
|
+
]
|
|
1164
|
+
}
|
|
1165
|
+
)
|
|
1057
1166
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1058
|
-
|
|
1167
|
+
he,
|
|
1059
1168
|
{
|
|
1060
1169
|
message: "No runs found",
|
|
1061
|
-
hint:
|
|
1170
|
+
hint: n ?? "Try adjusting your filters"
|
|
1062
1171
|
}
|
|
1063
1172
|
);
|
|
1064
1173
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const [s,
|
|
1174
|
+
function It() {
|
|
1175
|
+
const [s, r] = Be(), { api: a } = z(), { data: n } = Ie(), [o, d] = S(null), [u, i] = S({
|
|
1067
1176
|
project: s.get("project") || "",
|
|
1068
1177
|
status: s.get("status") || "",
|
|
1069
1178
|
q: s.get("q") || "",
|
|
1070
1179
|
limit: parseInt(s.get("limit") || "25", 10)
|
|
1071
|
-
}), { data: f, loading:
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}, [o
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1180
|
+
}), { data: f, loading: h, refetch: m } = Bs(u), p = Re((_) => a.deleteRun(_));
|
|
1181
|
+
ne(() => {
|
|
1182
|
+
if (o) {
|
|
1183
|
+
const _ = setTimeout(() => d(null), 3e3);
|
|
1184
|
+
return () => clearTimeout(_);
|
|
1185
|
+
}
|
|
1186
|
+
}, [o]);
|
|
1187
|
+
const y = _e((_, H) => {
|
|
1188
|
+
i((B) => ({ ...B, [_]: H }));
|
|
1189
|
+
const T = new URLSearchParams(s);
|
|
1190
|
+
H ? T.set(_, String(H)) : T.delete(_), r(T, { replace: !0 });
|
|
1191
|
+
}, [s, r]), M = _e(async (_) => {
|
|
1192
|
+
try {
|
|
1193
|
+
await p.mutate(_), d({ message: "Run deleted", variant: "success" }), m();
|
|
1194
|
+
} catch {
|
|
1195
|
+
d({ message: "Failed to delete run", variant: "error" });
|
|
1196
|
+
}
|
|
1197
|
+
}, [p, m]);
|
|
1198
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1199
|
+
/* @__PURE__ */ e.jsx(Ee, { title: "Runs" }),
|
|
1200
|
+
/* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
1201
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1202
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "project", children: "Project" }),
|
|
1083
1203
|
/* @__PURE__ */ e.jsxs(
|
|
1084
|
-
|
|
1204
|
+
de,
|
|
1085
1205
|
{
|
|
1086
1206
|
id: "project",
|
|
1087
|
-
value:
|
|
1088
|
-
onChange: (_) =>
|
|
1207
|
+
value: u.project,
|
|
1208
|
+
onChange: (_) => y("project", _.target.value),
|
|
1089
1209
|
children: [
|
|
1090
1210
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
|
|
1091
|
-
|
|
1211
|
+
n?.map((_) => /* @__PURE__ */ e.jsx("option", { value: _.name, children: _.name }, _.name))
|
|
1092
1212
|
]
|
|
1093
1213
|
}
|
|
1094
1214
|
)
|
|
1095
1215
|
] }),
|
|
1096
|
-
/* @__PURE__ */ e.jsxs(
|
|
1097
|
-
/* @__PURE__ */ e.jsx(
|
|
1216
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1217
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "status", children: "Status" }),
|
|
1098
1218
|
/* @__PURE__ */ e.jsxs(
|
|
1099
|
-
|
|
1219
|
+
de,
|
|
1100
1220
|
{
|
|
1101
1221
|
id: "status",
|
|
1102
|
-
value:
|
|
1103
|
-
onChange: (_) =>
|
|
1222
|
+
value: u.status,
|
|
1223
|
+
onChange: (_) => y("status", _.target.value),
|
|
1104
1224
|
children: [
|
|
1105
1225
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All" }),
|
|
1106
1226
|
/* @__PURE__ */ e.jsx("option", { value: "FINISHED", children: "Finished" }),
|
|
@@ -1110,26 +1230,26 @@ function Ps() {
|
|
|
1110
1230
|
}
|
|
1111
1231
|
)
|
|
1112
1232
|
] }),
|
|
1113
|
-
/* @__PURE__ */ e.jsxs(
|
|
1114
|
-
/* @__PURE__ */ e.jsx(
|
|
1233
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1234
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "q", children: "Query" }),
|
|
1115
1235
|
/* @__PURE__ */ e.jsx(
|
|
1116
|
-
|
|
1236
|
+
as,
|
|
1117
1237
|
{
|
|
1118
1238
|
id: "q",
|
|
1119
|
-
value:
|
|
1120
|
-
onChange: (_) =>
|
|
1239
|
+
value: u.q,
|
|
1240
|
+
onChange: (_) => y("q", _.target.value),
|
|
1121
1241
|
placeholder: "metric.fidelity > 0.9"
|
|
1122
1242
|
}
|
|
1123
1243
|
)
|
|
1124
1244
|
] }),
|
|
1125
|
-
/* @__PURE__ */ e.jsxs(
|
|
1126
|
-
/* @__PURE__ */ e.jsx(
|
|
1245
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1246
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "limit", children: "Limit" }),
|
|
1127
1247
|
/* @__PURE__ */ e.jsxs(
|
|
1128
|
-
|
|
1248
|
+
de,
|
|
1129
1249
|
{
|
|
1130
1250
|
id: "limit",
|
|
1131
|
-
value:
|
|
1132
|
-
onChange: (_) =>
|
|
1251
|
+
value: u.limit,
|
|
1252
|
+
onChange: (_) => y("limit", parseInt(_.target.value, 10)),
|
|
1133
1253
|
children: [
|
|
1134
1254
|
/* @__PURE__ */ e.jsx("option", { value: "25", children: "25" }),
|
|
1135
1255
|
/* @__PURE__ */ e.jsx("option", { value: "50", children: "50" }),
|
|
@@ -1138,567 +1258,900 @@ function Ps() {
|
|
|
1138
1258
|
}
|
|
1139
1259
|
)
|
|
1140
1260
|
] }),
|
|
1141
|
-
/* @__PURE__ */ e.jsxs(
|
|
1142
|
-
/* @__PURE__ */ e.jsx(
|
|
1143
|
-
|
|
1261
|
+
/* @__PURE__ */ e.jsxs(se, { className: "flex items-end gap-2", children: [
|
|
1262
|
+
/* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => m(), children: "Filter" }),
|
|
1263
|
+
h && /* @__PURE__ */ e.jsx(I, {})
|
|
1144
1264
|
] })
|
|
1145
1265
|
] }) }),
|
|
1146
|
-
/* @__PURE__ */ e.jsx(
|
|
1147
|
-
|
|
1266
|
+
/* @__PURE__ */ e.jsx(b, { children: h && !f ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(
|
|
1267
|
+
is,
|
|
1148
1268
|
{
|
|
1149
1269
|
runs: f?.runs ?? [],
|
|
1150
|
-
onDelete:
|
|
1151
|
-
loading:
|
|
1270
|
+
onDelete: M,
|
|
1271
|
+
loading: p.loading,
|
|
1272
|
+
baselineRunId: u.project ? n?.find((_) => _.name === u.project)?.baseline?.run_id : void 0
|
|
1152
1273
|
}
|
|
1153
|
-
) })
|
|
1274
|
+
) }),
|
|
1275
|
+
o && /* @__PURE__ */ e.jsx(
|
|
1276
|
+
Ce,
|
|
1277
|
+
{
|
|
1278
|
+
message: o.message,
|
|
1279
|
+
variant: o.variant,
|
|
1280
|
+
visible: !!o,
|
|
1281
|
+
onClose: () => d(null)
|
|
1282
|
+
}
|
|
1283
|
+
)
|
|
1154
1284
|
] });
|
|
1155
1285
|
}
|
|
1156
|
-
function
|
|
1286
|
+
function qt({ projects: s, currentWorkspace: r }) {
|
|
1157
1287
|
if (!s.length)
|
|
1158
1288
|
return /* @__PURE__ */ e.jsx(
|
|
1159
|
-
|
|
1289
|
+
he,
|
|
1160
1290
|
{
|
|
1161
1291
|
message: "No projects yet",
|
|
1162
1292
|
hint: "Projects are created automatically when you log runs"
|
|
1163
1293
|
}
|
|
1164
1294
|
);
|
|
1165
|
-
const
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1295
|
+
const a = (n) => {
|
|
1296
|
+
const o = new URLSearchParams({ project: n });
|
|
1297
|
+
return r && o.set("workspace", r.id), `/runs?${o}`;
|
|
1168
1298
|
};
|
|
1169
1299
|
return /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1170
|
-
/* @__PURE__ */ e.jsx(
|
|
1171
|
-
/* @__PURE__ */ e.jsx(
|
|
1172
|
-
/* @__PURE__ */ e.jsx(
|
|
1173
|
-
/* @__PURE__ */ e.jsx(
|
|
1174
|
-
/* @__PURE__ */ e.jsx(
|
|
1300
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1301
|
+
/* @__PURE__ */ e.jsx(N, { children: "Project" }),
|
|
1302
|
+
/* @__PURE__ */ e.jsx(N, { children: "Runs" }),
|
|
1303
|
+
/* @__PURE__ */ e.jsx(N, { children: "Baseline" }),
|
|
1304
|
+
/* @__PURE__ */ e.jsx(N, {})
|
|
1175
1305
|
] }) }),
|
|
1176
|
-
/* @__PURE__ */ e.jsx(
|
|
1306
|
+
/* @__PURE__ */ e.jsx(L, { children: s.map((n) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1177
1307
|
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
1178
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children:
|
|
1179
|
-
|
|
1308
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: n.name }),
|
|
1309
|
+
n.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: kt(n.description) })
|
|
1180
1310
|
] }),
|
|
1181
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
1182
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1183
|
-
/* @__PURE__ */ e.jsx(
|
|
1184
|
-
|
|
1311
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: n.run_count ?? 0 }) }),
|
|
1312
|
+
/* @__PURE__ */ e.jsx(c, { children: n.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1313
|
+
/* @__PURE__ */ e.jsx(Y, { to: `/runs/${n.baseline.run_id}`, className: "font-mono text-sm", children: Q(n.baseline.run_id) }),
|
|
1314
|
+
n.baseline.run_name && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: n.baseline.run_name })
|
|
1185
1315
|
] }) : /* @__PURE__ */ e.jsx("span", { className: "text-muted", children: "—" }) }),
|
|
1186
|
-
/* @__PURE__ */ e.jsx(c, { className: "text-right", children: /* @__PURE__ */ e.jsx(
|
|
1187
|
-
] },
|
|
1316
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-right", children: /* @__PURE__ */ e.jsx(Y, { to: a(n.name), children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
|
|
1317
|
+
] }, n.name)) })
|
|
1188
1318
|
] });
|
|
1189
1319
|
}
|
|
1190
|
-
function
|
|
1320
|
+
function Mt({ groups: s }) {
|
|
1191
1321
|
return s.length ? /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1192
|
-
/* @__PURE__ */ e.jsx(
|
|
1193
|
-
/* @__PURE__ */ e.jsx(
|
|
1194
|
-
/* @__PURE__ */ e.jsx(
|
|
1195
|
-
/* @__PURE__ */ e.jsx(
|
|
1196
|
-
/* @__PURE__ */ e.jsx(
|
|
1197
|
-
/* @__PURE__ */ e.jsx(
|
|
1322
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1323
|
+
/* @__PURE__ */ e.jsx(N, { children: "Group ID" }),
|
|
1324
|
+
/* @__PURE__ */ e.jsx(N, { children: "Name" }),
|
|
1325
|
+
/* @__PURE__ */ e.jsx(N, { children: "Project" }),
|
|
1326
|
+
/* @__PURE__ */ e.jsx(N, { children: "Runs" }),
|
|
1327
|
+
/* @__PURE__ */ e.jsx(N, { children: "Actions" })
|
|
1198
1328
|
] }) }),
|
|
1199
|
-
/* @__PURE__ */ e.jsx(
|
|
1200
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children:
|
|
1201
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1202
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1203
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
1204
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
1205
|
-
] },
|
|
1329
|
+
/* @__PURE__ */ e.jsx(L, { children: s.map((r) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1330
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: Q(r.group_id) }),
|
|
1331
|
+
/* @__PURE__ */ e.jsx(c, { children: r.group_name || "—" }),
|
|
1332
|
+
/* @__PURE__ */ e.jsx(c, { children: r.project }),
|
|
1333
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: r.run_count }) }),
|
|
1334
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Y, { to: `/groups/${r.group_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
|
|
1335
|
+
] }, r.group_id)) })
|
|
1206
1336
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1207
|
-
|
|
1337
|
+
he,
|
|
1208
1338
|
{
|
|
1209
1339
|
message: "No groups found",
|
|
1210
1340
|
hint: "Groups are created when runs have a group_id set"
|
|
1211
1341
|
}
|
|
1212
1342
|
);
|
|
1213
1343
|
}
|
|
1214
|
-
function
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1344
|
+
function Ut({
|
|
1345
|
+
runId: s,
|
|
1346
|
+
runName: r,
|
|
1347
|
+
variant: a = "secondary",
|
|
1348
|
+
size: n = "sm",
|
|
1349
|
+
className: o = ""
|
|
1350
|
+
}) {
|
|
1351
|
+
const { api: d } = z(), [u, i] = S({ status: "idle" }), [f, h] = S(!1), [m, p] = S(null), y = async () => {
|
|
1352
|
+
i({ status: "preparing", message: "Preparing bundle..." }), h(!0);
|
|
1353
|
+
try {
|
|
1354
|
+
const T = await d.createExport(s);
|
|
1355
|
+
i({
|
|
1356
|
+
status: "packing",
|
|
1357
|
+
message: "Creating bundle...",
|
|
1358
|
+
artifactCount: T.artifact_count,
|
|
1359
|
+
objectCount: T.object_count
|
|
1360
|
+
}), i((xe) => ({
|
|
1361
|
+
...xe,
|
|
1362
|
+
status: "downloading",
|
|
1363
|
+
message: "Downloading bundle..."
|
|
1364
|
+
}));
|
|
1365
|
+
const B = d.getExportDownloadUrl(s), k = await fetch(B, {
|
|
1366
|
+
credentials: "same-origin"
|
|
1367
|
+
});
|
|
1368
|
+
if (!k.ok)
|
|
1369
|
+
throw new Error("Download failed");
|
|
1370
|
+
const te = await k.blob(), ae = r ? `${r.replace(/[^a-zA-Z0-9_-]/g, "_")}_${s.slice(0, 8)}.zip` : `run_${s.slice(0, 8)}.zip`, J = URL.createObjectURL(te), Z = document.createElement("a");
|
|
1371
|
+
Z.href = J, Z.download = ae, document.body.appendChild(Z), Z.click(), document.body.removeChild(Z), URL.revokeObjectURL(J), i({
|
|
1372
|
+
status: "complete",
|
|
1373
|
+
message: "Export complete!",
|
|
1374
|
+
bundleSize: te.size,
|
|
1375
|
+
artifactCount: T.artifact_count,
|
|
1376
|
+
objectCount: T.object_count
|
|
1377
|
+
}), p({ message: "Bundle downloaded successfully", variant: "success" }), setTimeout(() => {
|
|
1378
|
+
h(!1), i({ status: "idle" });
|
|
1379
|
+
}, 2e3);
|
|
1380
|
+
} catch (T) {
|
|
1381
|
+
const B = T instanceof Error ? T.message : "Export failed";
|
|
1382
|
+
i({ status: "error", message: B }), p({ message: B, variant: "error" });
|
|
1383
|
+
}
|
|
1384
|
+
}, M = () => {
|
|
1385
|
+
u.status !== "preparing" && u.status !== "packing" && u.status !== "downloading" && (h(!1), i({ status: "idle" }));
|
|
1386
|
+
}, _ = (T) => T < 1024 ? `${T} B` : T < 1024 * 1024 ? `${(T / 1024).toFixed(1)} KB` : `${(T / (1024 * 1024)).toFixed(1)} MB`, H = ["preparing", "packing", "downloading"].includes(u.status);
|
|
1387
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1388
|
+
/* @__PURE__ */ e.jsxs(
|
|
1389
|
+
D,
|
|
1390
|
+
{
|
|
1391
|
+
variant: a,
|
|
1392
|
+
size: n,
|
|
1393
|
+
onClick: y,
|
|
1394
|
+
disabled: H,
|
|
1395
|
+
className: o,
|
|
1396
|
+
children: [
|
|
1397
|
+
H && /* @__PURE__ */ e.jsx(I, {}),
|
|
1398
|
+
/* @__PURE__ */ e.jsx(Wt, {}),
|
|
1399
|
+
"Export"
|
|
1400
|
+
]
|
|
1401
|
+
}
|
|
1402
|
+
),
|
|
1403
|
+
/* @__PURE__ */ e.jsx(
|
|
1404
|
+
ns,
|
|
1405
|
+
{
|
|
1406
|
+
open: f,
|
|
1407
|
+
onClose: M,
|
|
1408
|
+
title: "Export Run",
|
|
1409
|
+
actions: u.status === "error" || u.status === "complete" ? /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: M, children: "Close" }) : void 0,
|
|
1410
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "py-4", children: [
|
|
1411
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
1412
|
+
u.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Vt, {}) }) : u.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Gt, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(I, {}) }),
|
|
1413
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1414
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-medium", children: u.message }),
|
|
1415
|
+
u.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
|
|
1416
|
+
] })
|
|
1417
|
+
] }),
|
|
1418
|
+
(u.artifactCount !== void 0 || u.objectCount !== void 0 || u.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
|
|
1419
|
+
u.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
|
|
1420
|
+
u.artifactCount,
|
|
1421
|
+
" artifacts"
|
|
1422
|
+
] }),
|
|
1423
|
+
u.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
|
|
1424
|
+
u.objectCount,
|
|
1425
|
+
" objects"
|
|
1426
|
+
] }),
|
|
1427
|
+
u.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(K, { variant: "info", children: _(u.bundleSize) })
|
|
1428
|
+
] }),
|
|
1429
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mt-4 pt-4 border-t border-[var(--dq-border-light)]", children: [
|
|
1430
|
+
/* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
|
|
1431
|
+
"Run ID: ",
|
|
1432
|
+
/* @__PURE__ */ e.jsx("code", { className: "text-xs", children: s })
|
|
1433
|
+
] }),
|
|
1434
|
+
r && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
|
|
1435
|
+
"Name: ",
|
|
1436
|
+
r
|
|
1437
|
+
] })
|
|
1438
|
+
] })
|
|
1439
|
+
] })
|
|
1440
|
+
}
|
|
1441
|
+
),
|
|
1442
|
+
m && /* @__PURE__ */ e.jsx(
|
|
1443
|
+
Ce,
|
|
1444
|
+
{
|
|
1445
|
+
message: m.message,
|
|
1446
|
+
variant: m.variant,
|
|
1447
|
+
visible: !!m,
|
|
1448
|
+
onClose: () => p(null)
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1451
|
+
] });
|
|
1452
|
+
}
|
|
1453
|
+
function Wt() {
|
|
1454
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1455
|
+
"svg",
|
|
1456
|
+
{
|
|
1457
|
+
width: "16",
|
|
1458
|
+
height: "16",
|
|
1459
|
+
viewBox: "0 0 24 24",
|
|
1460
|
+
fill: "none",
|
|
1461
|
+
stroke: "currentColor",
|
|
1462
|
+
strokeWidth: "2",
|
|
1463
|
+
strokeLinecap: "round",
|
|
1464
|
+
strokeLinejoin: "round",
|
|
1465
|
+
children: [
|
|
1466
|
+
/* @__PURE__ */ e.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
1467
|
+
/* @__PURE__ */ e.jsx("polyline", { points: "7 10 12 15 17 10" }),
|
|
1468
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
);
|
|
1472
|
+
}
|
|
1473
|
+
function Gt() {
|
|
1474
|
+
return /* @__PURE__ */ e.jsx(
|
|
1475
|
+
"svg",
|
|
1476
|
+
{
|
|
1477
|
+
width: "20",
|
|
1478
|
+
height: "20",
|
|
1479
|
+
viewBox: "0 0 24 24",
|
|
1480
|
+
fill: "none",
|
|
1481
|
+
stroke: "var(--dq-success)",
|
|
1482
|
+
strokeWidth: "2",
|
|
1483
|
+
strokeLinecap: "round",
|
|
1484
|
+
strokeLinejoin: "round",
|
|
1485
|
+
children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" })
|
|
1486
|
+
}
|
|
1219
1487
|
);
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1488
|
+
}
|
|
1489
|
+
function Vt() {
|
|
1490
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1491
|
+
"svg",
|
|
1492
|
+
{
|
|
1493
|
+
width: "20",
|
|
1494
|
+
height: "20",
|
|
1495
|
+
viewBox: "0 0 24 24",
|
|
1496
|
+
fill: "none",
|
|
1497
|
+
stroke: "var(--dq-danger)",
|
|
1498
|
+
strokeWidth: "2",
|
|
1499
|
+
strokeLinecap: "round",
|
|
1500
|
+
strokeLinejoin: "round",
|
|
1501
|
+
children: [
|
|
1502
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1503
|
+
/* @__PURE__ */ e.jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
1504
|
+
/* @__PURE__ */ e.jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
function zt({ createdAt: s, endedAt: r, status: a }) {
|
|
1510
|
+
const n = !rs(a), [o, d] = S(Date.now());
|
|
1511
|
+
ne(() => {
|
|
1512
|
+
if (!n) return;
|
|
1513
|
+
const i = setInterval(() => d(Date.now()), 1e3);
|
|
1514
|
+
return () => clearInterval(i);
|
|
1515
|
+
}, [n]);
|
|
1516
|
+
const u = n ? Math.max(0, Math.floor((o - new Date(s).getTime()) / 1e3)) : Ds(s, r);
|
|
1517
|
+
return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: As(u) });
|
|
1518
|
+
}
|
|
1519
|
+
function Yt() {
|
|
1520
|
+
const { runId: s } = ts(), r = gt(), { api: a } = z(), { data: n, loading: o, error: d, refetch: u } = Is(s), { data: i, refetch: f } = Ie(), [h, m] = S(!1), [p, y] = S(null), { mutate: M, loading: _ } = Re(
|
|
1521
|
+
() => a.setBaseline(n.project, n.run_id)
|
|
1522
|
+
), { mutate: H, loading: T } = Re(
|
|
1523
|
+
() => a.deleteRun(s)
|
|
1524
|
+
), k = i?.find((w) => w.name === n?.project)?.baseline?.run_id === s;
|
|
1525
|
+
if (ne(() => {
|
|
1526
|
+
if (p) {
|
|
1527
|
+
const w = setTimeout(() => y(null), 3e3);
|
|
1223
1528
|
return () => clearTimeout(w);
|
|
1224
1529
|
}
|
|
1225
|
-
}, [
|
|
1226
|
-
return /* @__PURE__ */ e.jsx(
|
|
1227
|
-
if (
|
|
1228
|
-
return /* @__PURE__ */ e.jsx(
|
|
1229
|
-
|
|
1530
|
+
}, [p]), o)
|
|
1531
|
+
return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) });
|
|
1532
|
+
if (d || !n)
|
|
1533
|
+
return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(
|
|
1534
|
+
he,
|
|
1230
1535
|
{
|
|
1231
1536
|
message: "Run not found",
|
|
1232
|
-
hint:
|
|
1537
|
+
hint: d?.message || `Run ${s} does not exist`
|
|
1233
1538
|
}
|
|
1234
1539
|
) }) });
|
|
1235
|
-
const
|
|
1236
|
-
await $(), f();
|
|
1237
|
-
}, ke = async () => {
|
|
1238
|
-
await G(), n("/runs");
|
|
1239
|
-
}, Ae = async (w) => {
|
|
1540
|
+
const te = n.backend || {}, ae = n.fingerprints || {}, J = n.data?.params || {}, Z = n.data?.metrics || {}, xe = n.data?.tags || {}, me = n.artifacts || [], pe = n.errors || [], qe = async () => {
|
|
1240
1541
|
try {
|
|
1241
|
-
|
|
1242
|
-
if (!Ne.ok) throw new Error("Download failed");
|
|
1243
|
-
const _e = await Ne.blob(), W = document.createElement("a");
|
|
1244
|
-
W.href = URL.createObjectURL(_e), W.download = `artifact-${w}`, W.click(), URL.revokeObjectURL(W.href), p({ message: "Download started", variant: "success" });
|
|
1542
|
+
await M(), await f(), u(), y({ message: "Baseline updated", variant: "success" });
|
|
1245
1543
|
} catch {
|
|
1246
|
-
|
|
1544
|
+
y({ message: "Failed to set baseline", variant: "error" });
|
|
1247
1545
|
}
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1546
|
+
}, Me = async () => {
|
|
1547
|
+
try {
|
|
1548
|
+
await H(), m(!1), y({ message: "Run deleted", variant: "success" }), setTimeout(() => r("/runs"), 1e3);
|
|
1549
|
+
} catch {
|
|
1550
|
+
y({ message: "Failed to delete run", variant: "error" }), m(!1);
|
|
1551
|
+
}
|
|
1552
|
+
}, Te = async (w) => {
|
|
1553
|
+
const P = me[w];
|
|
1554
|
+
try {
|
|
1555
|
+
const ke = a.getArtifactDownloadUrl(n.run_id, w), ge = await fetch(ke);
|
|
1556
|
+
if (!ge.ok) throw new Error("Download failed");
|
|
1557
|
+
const Se = await ge.blob(), le = document.createElement("a");
|
|
1558
|
+
le.href = URL.createObjectURL(Se), le.download = P?.kind || `artifact-${w}`, le.click(), URL.revokeObjectURL(le.href), y({ message: "Download started", variant: "success" });
|
|
1559
|
+
} catch {
|
|
1560
|
+
y({ message: "Download failed", variant: "error" });
|
|
1561
|
+
}
|
|
1562
|
+
}, ee = [
|
|
1563
|
+
{ label: "Project", value: /* @__PURE__ */ e.jsx(Y, { to: `/runs?project=${n.project}`, children: n.project }) },
|
|
1564
|
+
{ label: "Name", value: n.run_name || "—" },
|
|
1565
|
+
{ label: "Adapter", value: n.adapter || "N/A" },
|
|
1566
|
+
{ label: "Status", value: /* @__PURE__ */ e.jsx(Us, { status: n.status }) },
|
|
1567
|
+
{ label: "Created", value: `${n.created_at} (${Le(n.created_at)})` },
|
|
1568
|
+
{
|
|
1569
|
+
label: "Duration",
|
|
1570
|
+
value: /* @__PURE__ */ e.jsx(zt, { createdAt: n.created_at, endedAt: n.ended_at, status: n.status })
|
|
1571
|
+
},
|
|
1572
|
+
...n.ended_at ? [{ label: "Ended", value: `${n.ended_at} (${Le(n.ended_at)})` }] : [],
|
|
1573
|
+
{ label: "Backend", value: te.name || "N/A" },
|
|
1574
|
+
...n.group_id ? [{
|
|
1575
|
+
label: "Group",
|
|
1576
|
+
value: /* @__PURE__ */ e.jsx(Y, { to: `/groups/${n.group_id}`, children: n.group_name || Q(n.group_id) })
|
|
1577
|
+
}] : []
|
|
1578
|
+
];
|
|
1579
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1580
|
+
k && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
|
|
1581
|
+
'This run is the current baseline for project "',
|
|
1582
|
+
n.project,
|
|
1583
|
+
'"'
|
|
1584
|
+
] }),
|
|
1250
1585
|
/* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
|
|
1251
1586
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1252
|
-
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children:
|
|
1253
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children:
|
|
1587
|
+
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: n.run_name || "Unnamed Run" }),
|
|
1588
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children: n.run_id })
|
|
1254
1589
|
] }),
|
|
1255
1590
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1256
|
-
/* @__PURE__ */ e.
|
|
1257
|
-
|
|
1591
|
+
/* @__PURE__ */ e.jsx(Ut, { runId: n.run_id, runName: n.run_name }),
|
|
1592
|
+
!k && /* @__PURE__ */ e.jsxs(D, { variant: "secondary", size: "sm", onClick: qe, disabled: _, children: [
|
|
1593
|
+
_ && /* @__PURE__ */ e.jsx(I, {}),
|
|
1258
1594
|
"Set as Baseline"
|
|
1259
1595
|
] }),
|
|
1260
|
-
/* @__PURE__ */ e.jsx(
|
|
1596
|
+
/* @__PURE__ */ e.jsx(D, { variant: "ghost-danger", size: "sm", onClick: () => m(!0), children: "Delete" })
|
|
1261
1597
|
] })
|
|
1262
1598
|
] }),
|
|
1263
1599
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1264
|
-
/* @__PURE__ */ e.jsxs(
|
|
1265
|
-
/* @__PURE__ */ e.jsx(
|
|
1266
|
-
/* @__PURE__ */ e.jsx(
|
|
1267
|
-
{ label: "Project", value: /* @__PURE__ */ e.jsx(M, { to: `/runs?project=${a.project}`, children: a.project }) },
|
|
1268
|
-
{ label: "Name", value: a.run_name || "—" },
|
|
1269
|
-
{ label: "Adapter", value: a.adapter || "N/A" },
|
|
1270
|
-
{ label: "Status", value: /* @__PURE__ */ e.jsx(Dr, { status: a.status }) },
|
|
1271
|
-
{ label: "Created", value: `${a.created_at} (${Te(a.created_at)})` },
|
|
1272
|
-
{ label: "Backend", value: ce.name || "N/A" },
|
|
1273
|
-
...a.group_id ? [{
|
|
1274
|
-
label: "Group",
|
|
1275
|
-
value: /* @__PURE__ */ e.jsx(M, { to: `/groups/${a.group_id}`, children: a.group_name || K(a.group_id) })
|
|
1276
|
-
}] : []
|
|
1277
|
-
] })
|
|
1600
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1601
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Overview" }) }),
|
|
1602
|
+
/* @__PURE__ */ e.jsx(Qe, { items: ee })
|
|
1278
1603
|
] }),
|
|
1279
|
-
/* @__PURE__ */ e.jsxs(
|
|
1280
|
-
/* @__PURE__ */ e.jsx(
|
|
1281
|
-
/* @__PURE__ */ e.jsx(
|
|
1282
|
-
{ label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children:
|
|
1283
|
-
{ label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children:
|
|
1604
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1605
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Fingerprints" }) }),
|
|
1606
|
+
/* @__PURE__ */ e.jsx(Qe, { items: [
|
|
1607
|
+
{ label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: ae.run || "N/A" }) },
|
|
1608
|
+
{ label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: ae.program || "N/A" }) }
|
|
1284
1609
|
] })
|
|
1285
1610
|
] })
|
|
1286
1611
|
] }),
|
|
1287
1612
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-4", children: [
|
|
1288
|
-
/* @__PURE__ */ e.jsxs(
|
|
1289
|
-
/* @__PURE__ */ e.jsx(
|
|
1290
|
-
Object.keys(
|
|
1613
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1614
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Parameters" }) }),
|
|
1615
|
+
Object.keys(J).length ? /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(L, { children: Object.entries(J).map(([w, P]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1291
1616
|
/* @__PURE__ */ e.jsx(c, { children: w }),
|
|
1292
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(
|
|
1617
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(P) })
|
|
1293
1618
|
] }, w)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
|
|
1294
1619
|
] }),
|
|
1295
|
-
/* @__PURE__ */ e.jsxs(
|
|
1296
|
-
/* @__PURE__ */ e.jsx(
|
|
1297
|
-
Object.keys(
|
|
1620
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1621
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Metrics" }) }),
|
|
1622
|
+
Object.keys(Z).length ? /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(L, { children: Object.entries(Z).map(([w, P]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1298
1623
|
/* @__PURE__ */ e.jsx(c, { children: w }),
|
|
1299
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: typeof
|
|
1624
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: typeof P == "number" ? Ct(P) : String(P) })
|
|
1300
1625
|
] }, w)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
|
|
1301
1626
|
] }),
|
|
1302
|
-
/* @__PURE__ */ e.jsxs(
|
|
1303
|
-
/* @__PURE__ */ e.jsx(
|
|
1304
|
-
Object.keys(
|
|
1627
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1628
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Tags" }) }),
|
|
1629
|
+
Object.keys(xe).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(xe).map(([w, P]) => /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
|
|
1305
1630
|
w,
|
|
1306
1631
|
": ",
|
|
1307
|
-
String(
|
|
1632
|
+
String(P)
|
|
1308
1633
|
] }, w)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
|
|
1309
1634
|
] })
|
|
1310
1635
|
] }),
|
|
1311
|
-
/* @__PURE__ */ e.jsxs(
|
|
1312
|
-
/* @__PURE__ */ e.jsx(
|
|
1636
|
+
/* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
|
|
1637
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsxs(G, { children: [
|
|
1313
1638
|
"Artifacts (",
|
|
1314
|
-
|
|
1639
|
+
me.length,
|
|
1315
1640
|
")"
|
|
1316
1641
|
] }) }),
|
|
1317
|
-
|
|
1318
|
-
/* @__PURE__ */ e.jsx(
|
|
1319
|
-
/* @__PURE__ */ e.jsx(
|
|
1320
|
-
/* @__PURE__ */ e.jsx(
|
|
1321
|
-
/* @__PURE__ */ e.jsx(
|
|
1322
|
-
/* @__PURE__ */ e.jsx(
|
|
1323
|
-
/* @__PURE__ */ e.jsx(
|
|
1324
|
-
/* @__PURE__ */ e.jsx(
|
|
1642
|
+
me.length ? /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1643
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1644
|
+
/* @__PURE__ */ e.jsx(N, { children: "#" }),
|
|
1645
|
+
/* @__PURE__ */ e.jsx(N, { children: "Kind" }),
|
|
1646
|
+
/* @__PURE__ */ e.jsx(N, { children: "Role" }),
|
|
1647
|
+
/* @__PURE__ */ e.jsx(N, { children: "Media Type" }),
|
|
1648
|
+
/* @__PURE__ */ e.jsx(N, { children: "Digest" }),
|
|
1649
|
+
/* @__PURE__ */ e.jsx(N, { children: "Actions" })
|
|
1325
1650
|
] }) }),
|
|
1326
|
-
/* @__PURE__ */ e.jsx(
|
|
1327
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1651
|
+
/* @__PURE__ */ e.jsx(L, { children: me.map((w, P) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1652
|
+
/* @__PURE__ */ e.jsx(c, { children: P }),
|
|
1328
1653
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: w.kind }),
|
|
1329
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
1654
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: w.role }) }),
|
|
1330
1655
|
/* @__PURE__ */ e.jsx(c, { className: "text-muted text-sm", children: w.media_type }),
|
|
1331
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children:
|
|
1656
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Xe(w.digest) }),
|
|
1332
1657
|
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1333
|
-
/* @__PURE__ */ e.jsx(
|
|
1334
|
-
/* @__PURE__ */ e.jsx(
|
|
1658
|
+
/* @__PURE__ */ e.jsx(Y, { to: `/runs/${n.run_id}/artifacts/${P}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
|
|
1659
|
+
/* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", onClick: () => Te(P), children: "Download" })
|
|
1335
1660
|
] }) })
|
|
1336
|
-
] },
|
|
1661
|
+
] }, P)) })
|
|
1337
1662
|
] }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No artifacts" })
|
|
1338
1663
|
] }),
|
|
1339
|
-
|
|
1340
|
-
/* @__PURE__ */ e.jsx(
|
|
1341
|
-
|
|
1664
|
+
pe.length > 0 && /* @__PURE__ */ e.jsxs(b, { children: [
|
|
1665
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { className: "text-danger", children: "Errors" }) }),
|
|
1666
|
+
pe.map((w, P) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
|
|
1342
1667
|
/* @__PURE__ */ e.jsx("strong", { children: w.type }),
|
|
1343
1668
|
": ",
|
|
1344
1669
|
w.message,
|
|
1345
1670
|
w.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: w.traceback })
|
|
1346
|
-
] },
|
|
1671
|
+
] }, P))
|
|
1347
1672
|
] }),
|
|
1348
1673
|
/* @__PURE__ */ e.jsxs(
|
|
1349
|
-
|
|
1674
|
+
ns,
|
|
1350
1675
|
{
|
|
1351
|
-
open:
|
|
1352
|
-
onClose: () =>
|
|
1676
|
+
open: h,
|
|
1677
|
+
onClose: () => m(!1),
|
|
1353
1678
|
title: "Delete Run",
|
|
1354
1679
|
actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1355
|
-
/* @__PURE__ */ e.jsx(
|
|
1356
|
-
/* @__PURE__ */ e.jsxs(
|
|
1357
|
-
|
|
1680
|
+
/* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => m(!1), children: "Cancel" }),
|
|
1681
|
+
/* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: Me, disabled: T, children: [
|
|
1682
|
+
T && /* @__PURE__ */ e.jsx(I, {}),
|
|
1358
1683
|
"Delete"
|
|
1359
1684
|
] })
|
|
1360
1685
|
] }),
|
|
1361
1686
|
children: [
|
|
1362
1687
|
/* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
|
|
1363
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children:
|
|
1688
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(n.run_id) }),
|
|
1364
1689
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
|
|
1365
1690
|
]
|
|
1366
1691
|
}
|
|
1367
1692
|
),
|
|
1368
|
-
|
|
1369
|
-
|
|
1693
|
+
p && /* @__PURE__ */ e.jsx(
|
|
1694
|
+
Ce,
|
|
1370
1695
|
{
|
|
1371
|
-
message:
|
|
1372
|
-
variant:
|
|
1373
|
-
visible: !!
|
|
1374
|
-
onClose: () =>
|
|
1696
|
+
message: p.message,
|
|
1697
|
+
variant: p.variant,
|
|
1698
|
+
visible: !!p,
|
|
1699
|
+
onClose: () => y(null)
|
|
1375
1700
|
}
|
|
1376
1701
|
)
|
|
1377
1702
|
] });
|
|
1378
1703
|
}
|
|
1379
|
-
function
|
|
1380
|
-
const { currentWorkspace: s } =
|
|
1381
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1382
|
-
/* @__PURE__ */ e.jsx(
|
|
1383
|
-
/* @__PURE__ */ e.jsx(
|
|
1704
|
+
function Kt() {
|
|
1705
|
+
const { currentWorkspace: s } = z(), { data: r, loading: a } = Ie();
|
|
1706
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1707
|
+
/* @__PURE__ */ e.jsx(Ee, { title: "Projects" }),
|
|
1708
|
+
/* @__PURE__ */ e.jsx(b, { children: a ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(qt, { projects: r ?? [], currentWorkspace: s }) })
|
|
1384
1709
|
] });
|
|
1385
1710
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const [s,
|
|
1388
|
-
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
}, [s,
|
|
1392
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1393
|
-
/* @__PURE__ */ e.jsx(
|
|
1394
|
-
/* @__PURE__ */ e.jsx(
|
|
1395
|
-
/* @__PURE__ */ e.jsxs(
|
|
1396
|
-
/* @__PURE__ */ e.jsx(
|
|
1711
|
+
function Ht() {
|
|
1712
|
+
const [s, r] = Be(), { data: a } = Ie(), [n, o] = S(s.get("project") || ""), { data: d, loading: u, refetch: i } = Dt({ project: n || void 0 }), f = _e((h) => {
|
|
1713
|
+
o(h);
|
|
1714
|
+
const m = new URLSearchParams(s);
|
|
1715
|
+
h ? m.set("project", h) : m.delete("project"), r(m, { replace: !0 });
|
|
1716
|
+
}, [s, r]);
|
|
1717
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1718
|
+
/* @__PURE__ */ e.jsx(Ee, { title: "Run Groups" }),
|
|
1719
|
+
/* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
1720
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1721
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "project", children: "Project" }),
|
|
1397
1722
|
/* @__PURE__ */ e.jsxs(
|
|
1398
|
-
|
|
1723
|
+
de,
|
|
1399
1724
|
{
|
|
1400
1725
|
id: "project",
|
|
1401
|
-
value:
|
|
1402
|
-
onChange: (
|
|
1726
|
+
value: n,
|
|
1727
|
+
onChange: (h) => f(h.target.value),
|
|
1403
1728
|
children: [
|
|
1404
1729
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
|
|
1405
|
-
|
|
1730
|
+
a?.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.name, children: h.name }, h.name))
|
|
1406
1731
|
]
|
|
1407
1732
|
}
|
|
1408
1733
|
)
|
|
1409
1734
|
] }),
|
|
1410
|
-
/* @__PURE__ */ e.jsxs(
|
|
1411
|
-
/* @__PURE__ */ e.jsx(
|
|
1412
|
-
|
|
1735
|
+
/* @__PURE__ */ e.jsxs(se, { className: "flex items-end gap-2", children: [
|
|
1736
|
+
/* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => i(), children: "Filter" }),
|
|
1737
|
+
u && /* @__PURE__ */ e.jsx(I, {})
|
|
1413
1738
|
] })
|
|
1414
1739
|
] }) }),
|
|
1415
|
-
/* @__PURE__ */ e.jsx(
|
|
1740
|
+
/* @__PURE__ */ e.jsx(b, { children: u && !d ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(Mt, { groups: d ?? [] }) })
|
|
1416
1741
|
] });
|
|
1417
1742
|
}
|
|
1418
|
-
function
|
|
1419
|
-
const { groupId: s } =
|
|
1420
|
-
|
|
1743
|
+
function Jt() {
|
|
1744
|
+
const { groupId: s } = ts(), { api: r } = z(), { data: a, loading: n, error: o, refetch: d } = At(s), [u, i] = S(null), f = Re((m) => r.deleteRun(m));
|
|
1745
|
+
ne(() => {
|
|
1746
|
+
if (u) {
|
|
1747
|
+
const m = setTimeout(() => i(null), 3e3);
|
|
1748
|
+
return () => clearTimeout(m);
|
|
1749
|
+
}
|
|
1750
|
+
}, [u]);
|
|
1751
|
+
const h = async (m) => {
|
|
1752
|
+
try {
|
|
1753
|
+
await f.mutate(m), i({ message: "Run deleted", variant: "success" }), d();
|
|
1754
|
+
} catch {
|
|
1755
|
+
i({ message: "Failed to delete run", variant: "error" });
|
|
1756
|
+
}
|
|
1421
1757
|
};
|
|
1422
|
-
return
|
|
1758
|
+
return n ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) }) : o || !a ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Group not found", hint: o?.message }) }) }) : /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1423
1759
|
/* @__PURE__ */ e.jsx(
|
|
1424
|
-
|
|
1760
|
+
Ee,
|
|
1425
1761
|
{
|
|
1426
1762
|
title: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1427
1763
|
"Group ",
|
|
1428
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-mono", children:
|
|
1764
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono", children: Q(s) })
|
|
1429
1765
|
] }),
|
|
1430
1766
|
subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: s })
|
|
1431
1767
|
}
|
|
1432
1768
|
),
|
|
1433
|
-
/* @__PURE__ */ e.jsxs(
|
|
1434
|
-
/* @__PURE__ */ e.jsx(
|
|
1769
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1770
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsxs(G, { children: [
|
|
1435
1771
|
"Runs in Group (",
|
|
1436
|
-
|
|
1772
|
+
a.runs.length,
|
|
1437
1773
|
")"
|
|
1438
1774
|
] }) }),
|
|
1439
1775
|
/* @__PURE__ */ e.jsx(
|
|
1440
|
-
|
|
1776
|
+
is,
|
|
1441
1777
|
{
|
|
1442
|
-
runs:
|
|
1443
|
-
onDelete:
|
|
1778
|
+
runs: a.runs,
|
|
1779
|
+
onDelete: h,
|
|
1444
1780
|
loading: f.loading
|
|
1445
1781
|
}
|
|
1446
1782
|
)
|
|
1447
|
-
] })
|
|
1783
|
+
] }),
|
|
1784
|
+
u && /* @__PURE__ */ e.jsx(
|
|
1785
|
+
Ce,
|
|
1786
|
+
{
|
|
1787
|
+
message: u.message,
|
|
1788
|
+
variant: u.variant,
|
|
1789
|
+
visible: !!u,
|
|
1790
|
+
onClose: () => i(null)
|
|
1791
|
+
}
|
|
1792
|
+
)
|
|
1793
|
+
] });
|
|
1794
|
+
}
|
|
1795
|
+
function Xt({ className: s = "" }) {
|
|
1796
|
+
return /* @__PURE__ */ e.jsx("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
|
|
1797
|
+
}
|
|
1798
|
+
function Qt({ className: s = "" }) {
|
|
1799
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1800
|
+
/* @__PURE__ */ e.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1801
|
+
/* @__PURE__ */ e.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1802
|
+
] });
|
|
1803
|
+
}
|
|
1804
|
+
function Zt({ className: s = "" }) {
|
|
1805
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1806
|
+
/* @__PURE__ */ e.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
1807
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
1808
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
1448
1809
|
] });
|
|
1449
1810
|
}
|
|
1450
|
-
function
|
|
1451
|
-
return /* @__PURE__ */ e.
|
|
1811
|
+
function Je({ className: s = "" }) {
|
|
1812
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1813
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1814
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
1815
|
+
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
1816
|
+
] });
|
|
1817
|
+
}
|
|
1818
|
+
function ye({ match: s }) {
|
|
1819
|
+
return s ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
|
|
1820
|
+
/* @__PURE__ */ e.jsx(Xt, { className: "flex-shrink-0" }),
|
|
1821
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Match" })
|
|
1822
|
+
] }) : /* @__PURE__ */ e.jsxs("span", { className: "diff-mismatch inline-flex items-center gap-1.5", children: [
|
|
1823
|
+
/* @__PURE__ */ e.jsx(Qt, { className: "flex-shrink-0" }),
|
|
1824
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Different" })
|
|
1825
|
+
] });
|
|
1826
|
+
}
|
|
1827
|
+
function er({ warnings: s }) {
|
|
1828
|
+
return !s || s.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
|
|
1829
|
+
/* @__PURE__ */ e.jsx(Zt, { className: "flex-shrink-0 mt-0.5" }),
|
|
1830
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
1831
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: s.length === 1 ? "Warning" : `${s.length} Warnings` }),
|
|
1832
|
+
/* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: s.map((r, a) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: r }, a)) })
|
|
1833
|
+
] })
|
|
1834
|
+
] }) });
|
|
1835
|
+
}
|
|
1836
|
+
function Ss({
|
|
1837
|
+
label: s,
|
|
1838
|
+
run: r,
|
|
1839
|
+
variant: a
|
|
1840
|
+
}) {
|
|
1841
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1842
|
+
/* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${a === "a" ? "bg-info" : "bg-primary"}` }),
|
|
1843
|
+
/* @__PURE__ */ e.jsxs("div", { className: "pl-4", children: [
|
|
1844
|
+
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${a === "a" ? "text-info" : "text-primary"}`, children: s }),
|
|
1845
|
+
/* @__PURE__ */ e.jsx(Y, { to: `/runs/${r.run_id}`, className: "text-base font-medium hover:underline", children: r.run_name || "Unnamed Run" }),
|
|
1846
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: Q(r.run_id) }),
|
|
1847
|
+
/* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-1 text-muted", children: [
|
|
1848
|
+
r.project,
|
|
1849
|
+
" · ",
|
|
1850
|
+
Le(r.created_at)
|
|
1851
|
+
] })
|
|
1852
|
+
] })
|
|
1853
|
+
] });
|
|
1452
1854
|
}
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1455
|
-
|
|
1855
|
+
function ie({
|
|
1856
|
+
children: s,
|
|
1857
|
+
badge: r
|
|
1858
|
+
}) {
|
|
1859
|
+
return /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1860
|
+
s,
|
|
1861
|
+
r && /* @__PURE__ */ e.jsx(K, { variant: r.variant, children: r.label })
|
|
1862
|
+
] }) }) });
|
|
1863
|
+
}
|
|
1864
|
+
function sr({
|
|
1865
|
+
tvd: s,
|
|
1866
|
+
noiseContext: r
|
|
1867
|
+
}) {
|
|
1868
|
+
if (s === 0)
|
|
1869
|
+
return /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Distributions are identical (TVD = 0)" });
|
|
1870
|
+
if (!r) return null;
|
|
1871
|
+
const { p_value: a, noise_ratio: n } = r;
|
|
1872
|
+
return a != null ? a >= 0.1 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Consistent with sampling noise — difference is not statistically significant" }) : a >= 0.05 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
|
|
1873
|
+
"⚠ Borderline (p=",
|
|
1874
|
+
a.toFixed(2),
|
|
1875
|
+
") — consider increasing shots"
|
|
1876
|
+
] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
|
|
1877
|
+
"✗ Statistically significant difference (p=",
|
|
1878
|
+
a.toFixed(2),
|
|
1879
|
+
") — results show meaningful divergence"
|
|
1880
|
+
] }) : n != null ? n < 1.5 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ TVD is within expected shot noise range" }) : n < 3 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
|
|
1881
|
+
"⚠ Ambiguous (",
|
|
1882
|
+
n.toFixed(1),
|
|
1883
|
+
"× expected noise) — consider increasing shots"
|
|
1884
|
+
] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
|
|
1885
|
+
"✗ TVD exceeds expected noise (",
|
|
1886
|
+
n.toFixed(1),
|
|
1887
|
+
"×) — results show meaningful differences"
|
|
1888
|
+
] }) : null;
|
|
1889
|
+
}
|
|
1890
|
+
function tr() {
|
|
1891
|
+
const [s, r] = Be(), { data: a } = Bs({ limit: 100 }), n = a?.runs ?? [], [o, d] = S(s.get("a") || ""), [u, i] = S(s.get("b") || ""), [f, h] = S(""), m = (p) => {
|
|
1892
|
+
if (p.preventDefault(), !o || !u) {
|
|
1893
|
+
h("Please select both runs to compare");
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
if (o === u) {
|
|
1897
|
+
h("Please select two different runs");
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
h(""), r({ a: o, b: u });
|
|
1456
1901
|
};
|
|
1457
1902
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1458
|
-
/* @__PURE__ */ e.jsx(
|
|
1903
|
+
/* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
|
|
1459
1904
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1460
|
-
/* @__PURE__ */ e.jsxs(
|
|
1461
|
-
/* @__PURE__ */ e.jsx(
|
|
1462
|
-
/* @__PURE__ */ e.jsxs(
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1905
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1906
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "a", children: "Run A (Baseline)" }),
|
|
1907
|
+
/* @__PURE__ */ e.jsxs(
|
|
1908
|
+
de,
|
|
1909
|
+
{
|
|
1910
|
+
id: "a",
|
|
1911
|
+
value: o,
|
|
1912
|
+
onChange: (p) => {
|
|
1913
|
+
d(p.target.value), h("");
|
|
1914
|
+
},
|
|
1915
|
+
children: [
|
|
1916
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
|
|
1917
|
+
n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
|
|
1918
|
+
p.run_name || "Unnamed",
|
|
1919
|
+
" (",
|
|
1920
|
+
Q(p.run_id),
|
|
1921
|
+
") — ",
|
|
1922
|
+
p.project
|
|
1923
|
+
] }, p.run_id))
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
)
|
|
1472
1927
|
] }),
|
|
1473
|
-
/* @__PURE__ */ e.jsxs(
|
|
1474
|
-
/* @__PURE__ */ e.jsx(
|
|
1475
|
-
/* @__PURE__ */ e.jsxs(
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1928
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
1929
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "b", children: "Run B (Candidate)" }),
|
|
1930
|
+
/* @__PURE__ */ e.jsxs(
|
|
1931
|
+
de,
|
|
1932
|
+
{
|
|
1933
|
+
id: "b",
|
|
1934
|
+
value: u,
|
|
1935
|
+
onChange: (p) => {
|
|
1936
|
+
i(p.target.value), h("");
|
|
1937
|
+
},
|
|
1938
|
+
children: [
|
|
1939
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
|
|
1940
|
+
n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
|
|
1941
|
+
p.run_name || "Unnamed",
|
|
1942
|
+
" (",
|
|
1943
|
+
Q(p.run_id),
|
|
1944
|
+
") — ",
|
|
1945
|
+
p.project
|
|
1946
|
+
] }, p.run_id))
|
|
1947
|
+
]
|
|
1948
|
+
}
|
|
1949
|
+
)
|
|
1485
1950
|
] })
|
|
1486
1951
|
] }),
|
|
1487
|
-
/* @__PURE__ */ e.jsx(
|
|
1952
|
+
f && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: f }),
|
|
1953
|
+
/* @__PURE__ */ e.jsx(D, { type: "submit", variant: "primary", children: "Compare" })
|
|
1488
1954
|
] }) }),
|
|
1489
|
-
/* @__PURE__ */ e.jsxs(
|
|
1490
|
-
/* @__PURE__ */ e.jsx(
|
|
1491
|
-
/* @__PURE__ */ e.jsxs("
|
|
1492
|
-
/* @__PURE__ */ e.
|
|
1493
|
-
|
|
1494
|
-
|
|
1955
|
+
/* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
|
|
1956
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "How it works" }) }),
|
|
1957
|
+
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2 text-sm text-muted", children: [
|
|
1958
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1959
|
+
/* @__PURE__ */ e.jsx(Je, { className: "flex-shrink-0 mt-0.5" }),
|
|
1960
|
+
/* @__PURE__ */ e.jsx("span", { children: "Select two runs to compare their parameters, metrics, and artifacts" })
|
|
1961
|
+
] }),
|
|
1962
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1963
|
+
/* @__PURE__ */ e.jsx(Je, { className: "flex-shrink-0 mt-0.5" }),
|
|
1964
|
+
/* @__PURE__ */ e.jsx("span", { children: "The diff shows changed values and computes TVD for result distributions" })
|
|
1965
|
+
] }),
|
|
1966
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1967
|
+
/* @__PURE__ */ e.jsx(Je, { className: "flex-shrink-0 mt-0.5" }),
|
|
1968
|
+
/* @__PURE__ */ e.jsx("span", { children: "You can also compare from the run detail page" })
|
|
1969
|
+
] })
|
|
1495
1970
|
] })
|
|
1496
1971
|
] })
|
|
1497
1972
|
] });
|
|
1498
1973
|
}
|
|
1499
|
-
function
|
|
1500
|
-
const { data:
|
|
1501
|
-
if (
|
|
1502
|
-
|
|
1503
|
-
|
|
1974
|
+
function rr({ runIdA: s, runIdB: r }) {
|
|
1975
|
+
const { data: a, loading: n, error: o } = Ft(s, r);
|
|
1976
|
+
if (n)
|
|
1977
|
+
return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
|
|
1978
|
+
/* @__PURE__ */ e.jsx(I, {}),
|
|
1979
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted", children: "Comparing runs..." })
|
|
1980
|
+
] }) });
|
|
1981
|
+
if (o || !a)
|
|
1982
|
+
return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Failed to load diff", hint: o?.message }) });
|
|
1983
|
+
const { run_a: d, run_b: u, report: i } = a, f = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
|
|
1504
1984
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
/* @__PURE__ */ e.jsx(
|
|
1508
|
-
|
|
1509
|
-
/* @__PURE__ */ e.jsx(v, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
1510
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1511
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm text-muted uppercase tracking-wider mb-1", children: "Run A (Baseline)" }),
|
|
1512
|
-
/* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx(M, { to: `/runs/${h.run_id}`, children: h.run_name || "Unnamed Run" }) }),
|
|
1513
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm text-muted", children: K(h.run_id) }),
|
|
1514
|
-
/* @__PURE__ */ e.jsxs("p", { className: "text-muted text-sm", children: [
|
|
1515
|
-
h.project,
|
|
1516
|
-
" · ",
|
|
1517
|
-
Te(h.created_at)
|
|
1518
|
-
] })
|
|
1519
|
-
] }),
|
|
1520
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1521
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm text-muted uppercase tracking-wider mb-1", children: "Run B (Candidate)" }),
|
|
1522
|
-
/* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx(M, { to: `/runs/${f.run_id}`, children: f.run_name || "Unnamed Run" }) }),
|
|
1523
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm text-muted", children: K(f.run_id) }),
|
|
1524
|
-
/* @__PURE__ */ e.jsxs("p", { className: "text-muted text-sm", children: [
|
|
1525
|
-
f.project,
|
|
1526
|
-
" · ",
|
|
1527
|
-
Te(f.created_at)
|
|
1528
|
-
] })
|
|
1529
|
-
] })
|
|
1985
|
+
/* @__PURE__ */ e.jsx(er, { warnings: i.warnings || [] }),
|
|
1986
|
+
/* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
1987
|
+
/* @__PURE__ */ e.jsx(Ss, { label: "Run A (Baseline)", run: d, variant: "a" }),
|
|
1988
|
+
/* @__PURE__ */ e.jsx(Ss, { label: "Run B (Candidate)", run: u, variant: "b" })
|
|
1530
1989
|
] }) }),
|
|
1531
1990
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1532
|
-
/* @__PURE__ */ e.jsxs(
|
|
1533
|
-
/* @__PURE__ */ e.jsx(
|
|
1534
|
-
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(
|
|
1535
|
-
/* @__PURE__ */ e.jsxs(
|
|
1991
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
1992
|
+
/* @__PURE__ */ e.jsx(ie, { children: "Metadata" }),
|
|
1993
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
1994
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1536
1995
|
/* @__PURE__ */ e.jsx(c, { children: "Project" }),
|
|
1537
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
1996
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(ye, { match: i.metadata.project_match }) })
|
|
1538
1997
|
] }),
|
|
1539
|
-
/* @__PURE__ */ e.jsxs(
|
|
1998
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1540
1999
|
/* @__PURE__ */ e.jsx(c, { children: "Backend" }),
|
|
1541
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
2000
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(ye, { match: i.metadata.backend_match }) })
|
|
1542
2001
|
] }),
|
|
1543
2002
|
!i.metadata.project_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1544
|
-
/* @__PURE__ */ e.jsxs(
|
|
1545
|
-
/* @__PURE__ */ e.jsx(c, { className: "text-
|
|
2003
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2004
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project A" }),
|
|
1546
2005
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
|
|
1547
2006
|
] }),
|
|
1548
|
-
/* @__PURE__ */ e.jsxs(
|
|
1549
|
-
/* @__PURE__ */ e.jsx(c, { className: "text-
|
|
2007
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2008
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project B" }),
|
|
1550
2009
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
|
|
1551
2010
|
] })
|
|
1552
2011
|
] }),
|
|
1553
2012
|
!i.metadata.backend_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1554
|
-
/* @__PURE__ */ e.jsxs(
|
|
1555
|
-
/* @__PURE__ */ e.jsx(c, { className: "text-
|
|
2013
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2014
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend A" }),
|
|
1556
2015
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
|
|
1557
2016
|
] }),
|
|
1558
|
-
/* @__PURE__ */ e.jsxs(
|
|
1559
|
-
/* @__PURE__ */ e.jsx(c, { className: "text-
|
|
2017
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2018
|
+
/* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend B" }),
|
|
1560
2019
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
|
|
1561
2020
|
] })
|
|
1562
2021
|
] })
|
|
1563
2022
|
] }) })
|
|
1564
2023
|
] }),
|
|
1565
|
-
/* @__PURE__ */ e.jsxs(
|
|
1566
|
-
/* @__PURE__ */ e.jsx(
|
|
1567
|
-
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(
|
|
1568
|
-
/* @__PURE__ */ e.jsxs(
|
|
2024
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2025
|
+
/* @__PURE__ */ e.jsx(ie, { children: "Fingerprints" }),
|
|
2026
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
2027
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1569
2028
|
/* @__PURE__ */ e.jsx(c, { children: "Run A" }),
|
|
1570
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children:
|
|
2029
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Xe(i.fingerprints.a) })
|
|
1571
2030
|
] }),
|
|
1572
|
-
/* @__PURE__ */ e.jsxs(
|
|
2031
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1573
2032
|
/* @__PURE__ */ e.jsx(c, { children: "Run B" }),
|
|
1574
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children:
|
|
2033
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Xe(i.fingerprints.b) })
|
|
1575
2034
|
] }),
|
|
1576
|
-
/* @__PURE__ */ e.jsxs(
|
|
2035
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1577
2036
|
/* @__PURE__ */ e.jsx(c, { children: "Match" }),
|
|
1578
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
2037
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(ye, { match: i.fingerprints.a === i.fingerprints.b }) })
|
|
1579
2038
|
] })
|
|
1580
2039
|
] }) })
|
|
1581
2040
|
] })
|
|
1582
2041
|
] }),
|
|
1583
2042
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1584
|
-
/* @__PURE__ */ e.jsxs(
|
|
1585
|
-
/* @__PURE__ */ e.jsx(
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
2043
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2044
|
+
/* @__PURE__ */ e.jsx(
|
|
2045
|
+
ie,
|
|
2046
|
+
{
|
|
2047
|
+
badge: {
|
|
2048
|
+
variant: i.program.exact_match ? "success" : i.program.structural_match ? "info" : "warning",
|
|
2049
|
+
label: i.program.exact_match ? "Exact Match" : i.program.structural_match ? "Structural Match" : "Different"
|
|
2050
|
+
},
|
|
2051
|
+
children: "Program"
|
|
2052
|
+
}
|
|
2053
|
+
),
|
|
2054
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
2055
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1591
2056
|
/* @__PURE__ */ e.jsx(c, { children: "Exact Match" }),
|
|
1592
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
2057
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(ye, { match: i.program.exact_match }) })
|
|
1593
2058
|
] }),
|
|
1594
|
-
/* @__PURE__ */ e.jsxs(
|
|
2059
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1595
2060
|
/* @__PURE__ */ e.jsx(c, { children: "Structural Match" }),
|
|
1596
|
-
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(
|
|
2061
|
+
/* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(ye, { match: i.program.structural_match }) })
|
|
1597
2062
|
] })
|
|
1598
2063
|
] }) })
|
|
1599
2064
|
] }),
|
|
1600
|
-
/* @__PURE__ */ e.jsxs(
|
|
1601
|
-
/* @__PURE__ */ e.jsx(
|
|
1602
|
-
|
|
1603
|
-
i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx(B, { variant: "warning", children: "Drifted" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx(B, { variant: "success", children: "Stable" }) : /* @__PURE__ */ e.jsx(B, { variant: "gray", children: "N/A" })
|
|
1604
|
-
] }) }),
|
|
1605
|
-
i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-warning", children: "⚠ Significant calibration drift detected" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Calibration within acceptable thresholds" }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No calibration data available" })
|
|
2065
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2066
|
+
/* @__PURE__ */ e.jsx(ie, { badge: f, children: "Device Calibration" }),
|
|
2067
|
+
i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-warning", children: "Significant calibration drift detected between runs" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Calibration within acceptable thresholds" }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No calibration data available" })
|
|
1606
2068
|
] })
|
|
1607
2069
|
] }),
|
|
1608
|
-
/* @__PURE__ */ e.jsxs(
|
|
1609
|
-
/* @__PURE__ */ e.jsx(
|
|
1610
|
-
"Parameters ",
|
|
1611
|
-
/* @__PURE__ */ e.jsx(B, { variant: i.params.match ? "success" : "warning", children: i.params.match ? "Match" : "Different" })
|
|
1612
|
-
] }) }),
|
|
2070
|
+
/* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
|
|
2071
|
+
/* @__PURE__ */ e.jsx(ie, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
|
|
1613
2072
|
i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1614
|
-
/* @__PURE__ */ e.jsx(
|
|
1615
|
-
/* @__PURE__ */ e.jsx(
|
|
1616
|
-
/* @__PURE__ */ e.jsx(
|
|
1617
|
-
/* @__PURE__ */ e.jsx(
|
|
2073
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2074
|
+
/* @__PURE__ */ e.jsx(N, { children: "Parameter" }),
|
|
2075
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run A" }),
|
|
2076
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run B" })
|
|
1618
2077
|
] }) }),
|
|
1619
|
-
/* @__PURE__ */ e.jsx(
|
|
1620
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1621
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(
|
|
1622
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(
|
|
1623
|
-
] },
|
|
2078
|
+
/* @__PURE__ */ e.jsx(L, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2079
|
+
/* @__PURE__ */ e.jsx(c, { children: h }),
|
|
2080
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
|
|
2081
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) })
|
|
2082
|
+
] }, h)) })
|
|
1624
2083
|
] }) })
|
|
1625
2084
|
] }),
|
|
1626
|
-
/* @__PURE__ */ e.jsxs(
|
|
1627
|
-
/* @__PURE__ */ e.jsx(
|
|
1628
|
-
"Metrics ",
|
|
1629
|
-
/* @__PURE__ */ e.jsx(B, { variant: i.metrics.match ? "success" : "warning", children: i.metrics.match ? "Match" : "Different" })
|
|
1630
|
-
] }) }),
|
|
2085
|
+
/* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
|
|
2086
|
+
/* @__PURE__ */ e.jsx(ie, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
|
|
1631
2087
|
i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1632
|
-
/* @__PURE__ */ e.jsx(
|
|
1633
|
-
/* @__PURE__ */ e.jsx(
|
|
1634
|
-
/* @__PURE__ */ e.jsx(
|
|
1635
|
-
/* @__PURE__ */ e.jsx(
|
|
2088
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2089
|
+
/* @__PURE__ */ e.jsx(N, { children: "Metric" }),
|
|
2090
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run A" }),
|
|
2091
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run B" })
|
|
1636
2092
|
] }) }),
|
|
1637
|
-
/* @__PURE__ */ e.jsx(
|
|
1638
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1639
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children:
|
|
1640
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children:
|
|
1641
|
-
] },
|
|
2093
|
+
/* @__PURE__ */ e.jsx(L, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2094
|
+
/* @__PURE__ */ e.jsx(c, { children: h }),
|
|
2095
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.a }),
|
|
2096
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.b })
|
|
2097
|
+
] }, h)) })
|
|
1642
2098
|
] }) })
|
|
1643
2099
|
] }),
|
|
1644
|
-
i.circuit_diff && /* @__PURE__ */ e.jsxs(
|
|
1645
|
-
/* @__PURE__ */ e.jsx(
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
i.circuit_diff.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Circuit structure matches" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1650
|
-
i.circuit_diff.changed && Object.keys(i.circuit_diff.changed).length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1651
|
-
/* @__PURE__ */ e.jsx("h4", { className: "text-sm text-muted mb-2", children: "Changed" }),
|
|
2100
|
+
i.circuit_diff && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
|
|
2101
|
+
/* @__PURE__ */ e.jsx(ie, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
|
|
2102
|
+
i.circuit_diff.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Circuit structure matches" }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
2103
|
+
i.circuit_diff.changed && Object.keys(i.circuit_diff.changed).length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2104
|
+
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Changed Properties" }),
|
|
1652
2105
|
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
1653
|
-
/* @__PURE__ */ e.jsx(
|
|
1654
|
-
/* @__PURE__ */ e.jsx(
|
|
1655
|
-
/* @__PURE__ */ e.jsx(
|
|
1656
|
-
/* @__PURE__ */ e.jsx(
|
|
1657
|
-
/* @__PURE__ */ e.jsx(
|
|
2106
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2107
|
+
/* @__PURE__ */ e.jsx(N, { children: "Property" }),
|
|
2108
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run A" }),
|
|
2109
|
+
/* @__PURE__ */ e.jsx(N, { children: "Run B" }),
|
|
2110
|
+
/* @__PURE__ */ e.jsx(N, { children: "Delta" })
|
|
1658
2111
|
] }) }),
|
|
1659
|
-
/* @__PURE__ */ e.jsx(
|
|
1660
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
1661
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(
|
|
1662
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(
|
|
1663
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children:
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2112
|
+
/* @__PURE__ */ e.jsx(L, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2113
|
+
/* @__PURE__ */ e.jsx(c, { children: m.label || h }),
|
|
2114
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
|
|
2115
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) }),
|
|
2116
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
|
|
2117
|
+
m.delta > 0 ? "+" : "",
|
|
2118
|
+
m.delta,
|
|
2119
|
+
m.pct != null && ` (${m.pct > 0 ? "+" : ""}${m.pct.toFixed(1)}%)`
|
|
1667
2120
|
] }) })
|
|
1668
|
-
] },
|
|
2121
|
+
] }, h)) })
|
|
1669
2122
|
] })
|
|
1670
2123
|
] }),
|
|
1671
|
-
i.circuit_diff.is_clifford_changed && /* @__PURE__ */ e.jsxs("div", {
|
|
1672
|
-
/* @__PURE__ */ e.jsx("h4", { className: "text-sm
|
|
1673
|
-
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(
|
|
1674
|
-
/* @__PURE__ */ e.jsxs(
|
|
2124
|
+
i.circuit_diff.is_clifford_changed && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2125
|
+
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Clifford Status" }),
|
|
2126
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
2127
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1675
2128
|
/* @__PURE__ */ e.jsx(c, { children: "Run A" }),
|
|
1676
2129
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
|
|
1677
2130
|
] }),
|
|
1678
|
-
/* @__PURE__ */ e.jsxs(
|
|
2131
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1679
2132
|
/* @__PURE__ */ e.jsx(c, { children: "Run B" }),
|
|
1680
2133
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
|
|
1681
2134
|
] })
|
|
1682
2135
|
] }) })
|
|
1683
2136
|
] }),
|
|
1684
|
-
i.circuit_diff.added_gates && i.circuit_diff.added_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", {
|
|
1685
|
-
/* @__PURE__ */ e.jsx("h4", { className: "text-sm
|
|
1686
|
-
/* @__PURE__ */ e.jsx("
|
|
2137
|
+
i.circuit_diff.added_gates && i.circuit_diff.added_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2138
|
+
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "New Gate Types (in B)" }),
|
|
2139
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(K, { variant: "success", children: h }, h)) })
|
|
1687
2140
|
] }),
|
|
1688
|
-
i.circuit_diff.removed_gates && i.circuit_diff.removed_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", {
|
|
1689
|
-
/* @__PURE__ */ e.jsx("h4", { className: "text-sm
|
|
1690
|
-
/* @__PURE__ */ e.jsx("
|
|
2141
|
+
i.circuit_diff.removed_gates && i.circuit_diff.removed_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2142
|
+
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Removed Gate Types (from A)" }),
|
|
2143
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(K, { variant: "danger", children: h }, h)) })
|
|
1691
2144
|
] })
|
|
1692
2145
|
] })
|
|
1693
2146
|
] }),
|
|
1694
|
-
i.tvd != null && /* @__PURE__ */ e.jsxs(
|
|
1695
|
-
/* @__PURE__ */ e.jsx(
|
|
1696
|
-
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(
|
|
1697
|
-
/* @__PURE__ */ e.jsxs(
|
|
2147
|
+
i.tvd != null && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
|
|
2148
|
+
/* @__PURE__ */ e.jsx(ie, { children: "Results Distribution" }),
|
|
2149
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
2150
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1698
2151
|
/* @__PURE__ */ e.jsx(c, { children: "Total Variation Distance (TVD)" }),
|
|
1699
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.tvd.toFixed(6) })
|
|
2152
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
|
|
1700
2153
|
] }),
|
|
1701
|
-
i.shots && /* @__PURE__ */ e.jsxs(
|
|
2154
|
+
i.shots && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1702
2155
|
/* @__PURE__ */ e.jsx(c, { children: "Total Shots (A / B)" }),
|
|
1703
2156
|
/* @__PURE__ */ e.jsxs(c, { className: "font-mono", children: [
|
|
1704
2157
|
i.shots.a,
|
|
@@ -1706,154 +2159,142 @@ function $s({ runIdA: s, runIdB: n }) {
|
|
|
1706
2159
|
i.shots.b
|
|
1707
2160
|
] })
|
|
1708
2161
|
] }),
|
|
1709
|
-
i.noise_context?.noise_p95 && /* @__PURE__ */ e.jsxs(
|
|
2162
|
+
i.noise_context?.noise_p95 && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1710
2163
|
/* @__PURE__ */ e.jsx(c, { children: "Noise Threshold (p95)" }),
|
|
1711
2164
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
|
|
1712
2165
|
] }),
|
|
1713
|
-
i.noise_context?.p_value != null && /* @__PURE__ */ e.jsxs(
|
|
2166
|
+
i.noise_context?.p_value != null && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1714
2167
|
/* @__PURE__ */ e.jsx(c, { children: "p-value" }),
|
|
1715
|
-
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.p_value.toFixed(
|
|
2168
|
+
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
|
|
1716
2169
|
] })
|
|
1717
2170
|
] }) }),
|
|
1718
|
-
|
|
1719
|
-
"⚠ Borderline (p=",
|
|
1720
|
-
i.noise_context.p_value.toFixed(2),
|
|
1721
|
-
"). Consider increasing shots."
|
|
1722
|
-
] }) : /* @__PURE__ */ e.jsxs("span", { className: "text-danger", children: [
|
|
1723
|
-
"✗ Statistically significant difference (p=",
|
|
1724
|
-
i.noise_context.p_value.toFixed(2),
|
|
1725
|
-
") — results show meaningful divergence."
|
|
1726
|
-
] }) : i.noise_context.noise_ratio != null ? i.noise_context.noise_ratio < 1.5 ? /* @__PURE__ */ e.jsx("span", { className: "text-success", children: "✓ TVD is within expected shot noise range." }) : i.noise_context.noise_ratio < 3 ? /* @__PURE__ */ e.jsxs("span", { className: "text-warning", children: [
|
|
1727
|
-
"⚠ Ambiguous (",
|
|
1728
|
-
i.noise_context.noise_ratio.toFixed(1),
|
|
1729
|
-
"× expected noise). Consider increasing shots."
|
|
1730
|
-
] }) : /* @__PURE__ */ e.jsxs("span", { className: "text-danger", children: [
|
|
1731
|
-
"✗ TVD exceeds expected noise (",
|
|
1732
|
-
i.noise_context.noise_ratio.toFixed(1),
|
|
1733
|
-
"×) — results show meaningful differences."
|
|
1734
|
-
] }) : null })
|
|
2171
|
+
/* @__PURE__ */ e.jsx(sr, { tvd: i.tvd, noiseContext: i.noise_context })
|
|
1735
2172
|
] })
|
|
1736
2173
|
] });
|
|
1737
2174
|
}
|
|
1738
|
-
function
|
|
1739
|
-
const [s] =
|
|
1740
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2175
|
+
function nr() {
|
|
2176
|
+
const [s] = Be(), r = s.get("a"), a = s.get("b"), n = r && a;
|
|
2177
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1741
2178
|
/* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1742
|
-
/* @__PURE__ */ e.
|
|
1743
|
-
|
|
1744
|
-
a && /* @__PURE__ */ e.jsx(B, { variant: "info", children: "Comparing" })
|
|
1745
|
-
] }),
|
|
1746
|
-
a && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: /* @__PURE__ */ e.jsx(M, { to: "/diff", children: "← Select different runs" }) })
|
|
2179
|
+
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Compare Runs" }),
|
|
2180
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(Y, { to: "/diff", children: "← Select different runs" }) })
|
|
1747
2181
|
] }) }),
|
|
1748
|
-
|
|
2182
|
+
n ? /* @__PURE__ */ e.jsx(rr, { runIdA: r, runIdB: a }) : /* @__PURE__ */ e.jsx(tr, {})
|
|
1749
2183
|
] });
|
|
1750
2184
|
}
|
|
1751
|
-
function
|
|
1752
|
-
const { api: s } =
|
|
1753
|
-
const
|
|
1754
|
-
return
|
|
1755
|
-
}),
|
|
1756
|
-
|
|
2185
|
+
function ar() {
|
|
2186
|
+
const { api: s } = z(), [r, a] = S(""), [n, o] = S(null), [d, u] = S(!1), [i, f] = S(""), { mutate: h, loading: m } = Re(async () => {
|
|
2187
|
+
const y = await s.listRuns({ q: r, limit: 100 });
|
|
2188
|
+
return o(y.runs), u(!0), y;
|
|
2189
|
+
}), p = (y) => {
|
|
2190
|
+
if (y.preventDefault(), !r.trim()) {
|
|
2191
|
+
f("Please enter a search query");
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
f(""), h();
|
|
1757
2195
|
};
|
|
1758
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2196
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1759
2197
|
/* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Search Runs" }) }),
|
|
1760
|
-
/* @__PURE__ */ e.jsx(
|
|
1761
|
-
/* @__PURE__ */ e.jsxs(
|
|
1762
|
-
/* @__PURE__ */ e.jsx(
|
|
2198
|
+
/* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
|
|
2199
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
2200
|
+
/* @__PURE__ */ e.jsx(ce, { htmlFor: "q", children: "Query" }),
|
|
1763
2201
|
/* @__PURE__ */ e.jsx(
|
|
1764
|
-
|
|
2202
|
+
as,
|
|
1765
2203
|
{
|
|
1766
2204
|
id: "q",
|
|
1767
2205
|
type: "text",
|
|
1768
|
-
value:
|
|
1769
|
-
onChange: (
|
|
2206
|
+
value: r,
|
|
2207
|
+
onChange: (y) => {
|
|
2208
|
+
a(y.target.value), f("");
|
|
2209
|
+
},
|
|
1770
2210
|
placeholder: "metric.fidelity > 0.95 and params.shots = 1000",
|
|
1771
2211
|
className: "font-mono"
|
|
1772
2212
|
}
|
|
1773
2213
|
)
|
|
1774
2214
|
] }),
|
|
2215
|
+
i && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[#DC4A4A] mb-3", children: i }),
|
|
1775
2216
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
1776
|
-
/* @__PURE__ */ e.jsxs(
|
|
1777
|
-
|
|
2217
|
+
/* @__PURE__ */ e.jsxs(D, { type: "submit", variant: "primary", disabled: m, children: [
|
|
2218
|
+
m && /* @__PURE__ */ e.jsx(I, {}),
|
|
1778
2219
|
"Search"
|
|
1779
2220
|
] }),
|
|
1780
|
-
|
|
2221
|
+
m && /* @__PURE__ */ e.jsx("span", { className: "text-muted text-sm", children: "Searching..." })
|
|
1781
2222
|
] })
|
|
1782
2223
|
] }) }),
|
|
1783
|
-
|
|
2224
|
+
d && n && /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: n.length > 0 ? /* @__PURE__ */ e.jsx(is, { runs: n }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
|
|
1784
2225
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
1785
|
-
/* @__PURE__ */ e.jsxs(
|
|
1786
|
-
/* @__PURE__ */ e.jsx(
|
|
2226
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2227
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Query Syntax" }) }),
|
|
1787
2228
|
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
1788
|
-
/* @__PURE__ */ e.jsx(
|
|
1789
|
-
/* @__PURE__ */ e.jsx(
|
|
1790
|
-
/* @__PURE__ */ e.jsx(
|
|
2229
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2230
|
+
/* @__PURE__ */ e.jsx(N, { children: "Field" }),
|
|
2231
|
+
/* @__PURE__ */ e.jsx(N, { children: "Description" })
|
|
1791
2232
|
] }) }),
|
|
1792
|
-
/* @__PURE__ */ e.jsxs(
|
|
1793
|
-
/* @__PURE__ */ e.jsxs(
|
|
2233
|
+
/* @__PURE__ */ e.jsxs(L, { children: [
|
|
2234
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1794
2235
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.X" }),
|
|
1795
2236
|
/* @__PURE__ */ e.jsx(c, { children: "Parameter value" })
|
|
1796
2237
|
] }),
|
|
1797
|
-
/* @__PURE__ */ e.jsxs(
|
|
2238
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1798
2239
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.X" }),
|
|
1799
2240
|
/* @__PURE__ */ e.jsx(c, { children: "Metric value" })
|
|
1800
2241
|
] }),
|
|
1801
|
-
/* @__PURE__ */ e.jsxs(
|
|
2242
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1802
2243
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.X" }),
|
|
1803
2244
|
/* @__PURE__ */ e.jsx(c, { children: "Tag value" })
|
|
1804
2245
|
] }),
|
|
1805
|
-
/* @__PURE__ */ e.jsxs(
|
|
2246
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1806
2247
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "status" }),
|
|
1807
2248
|
/* @__PURE__ */ e.jsx(c, { children: "Run status" })
|
|
1808
2249
|
] }),
|
|
1809
|
-
/* @__PURE__ */ e.jsxs(
|
|
2250
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1810
2251
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project" }),
|
|
1811
2252
|
/* @__PURE__ */ e.jsx(c, { children: "Project name" })
|
|
1812
2253
|
] }),
|
|
1813
|
-
/* @__PURE__ */ e.jsxs(
|
|
2254
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1814
2255
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "backend" }),
|
|
1815
2256
|
/* @__PURE__ */ e.jsx(c, { children: "Backend name" })
|
|
1816
2257
|
] })
|
|
1817
2258
|
] })
|
|
1818
2259
|
] })
|
|
1819
2260
|
] }),
|
|
1820
|
-
/* @__PURE__ */ e.jsxs(
|
|
1821
|
-
/* @__PURE__ */ e.jsx(
|
|
2261
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2262
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Operators" }) }),
|
|
1822
2263
|
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
1823
|
-
/* @__PURE__ */ e.jsx(
|
|
1824
|
-
/* @__PURE__ */ e.jsx(
|
|
1825
|
-
/* @__PURE__ */ e.jsx(
|
|
2264
|
+
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2265
|
+
/* @__PURE__ */ e.jsx(N, { children: "Operator" }),
|
|
2266
|
+
/* @__PURE__ */ e.jsx(N, { children: "Description" })
|
|
1826
2267
|
] }) }),
|
|
1827
|
-
/* @__PURE__ */ e.jsxs(
|
|
1828
|
-
/* @__PURE__ */ e.jsxs(
|
|
2268
|
+
/* @__PURE__ */ e.jsxs(L, { children: [
|
|
2269
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1829
2270
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "=" }),
|
|
1830
2271
|
/* @__PURE__ */ e.jsx(c, { children: "Equals" })
|
|
1831
2272
|
] }),
|
|
1832
|
-
/* @__PURE__ */ e.jsxs(
|
|
2273
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1833
2274
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "!=" }),
|
|
1834
2275
|
/* @__PURE__ */ e.jsx(c, { children: "Not equals" })
|
|
1835
2276
|
] }),
|
|
1836
|
-
/* @__PURE__ */ e.jsxs(
|
|
2277
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1837
2278
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">" }),
|
|
1838
2279
|
/* @__PURE__ */ e.jsx(c, { children: "Greater than" })
|
|
1839
2280
|
] }),
|
|
1840
|
-
/* @__PURE__ */ e.jsxs(
|
|
2281
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1841
2282
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">=" }),
|
|
1842
2283
|
/* @__PURE__ */ e.jsx(c, { children: "Greater or equal" })
|
|
1843
2284
|
] }),
|
|
1844
|
-
/* @__PURE__ */ e.jsxs(
|
|
2285
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1845
2286
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<" }),
|
|
1846
2287
|
/* @__PURE__ */ e.jsx(c, { children: "Less than" })
|
|
1847
2288
|
] }),
|
|
1848
|
-
/* @__PURE__ */ e.jsxs(
|
|
2289
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1849
2290
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<=" }),
|
|
1850
2291
|
/* @__PURE__ */ e.jsx(c, { children: "Less or equal" })
|
|
1851
2292
|
] }),
|
|
1852
|
-
/* @__PURE__ */ e.jsxs(
|
|
2293
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1853
2294
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "~" }),
|
|
1854
2295
|
/* @__PURE__ */ e.jsx(c, { children: "Contains" })
|
|
1855
2296
|
] }),
|
|
1856
|
-
/* @__PURE__ */ e.jsxs(
|
|
2297
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1857
2298
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "and" }),
|
|
1858
2299
|
/* @__PURE__ */ e.jsx(c, { children: "Combine conditions" })
|
|
1859
2300
|
] })
|
|
@@ -1861,26 +2302,26 @@ function Is() {
|
|
|
1861
2302
|
] })
|
|
1862
2303
|
] })
|
|
1863
2304
|
] }),
|
|
1864
|
-
/* @__PURE__ */ e.jsxs(
|
|
1865
|
-
/* @__PURE__ */ e.jsx(
|
|
1866
|
-
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(
|
|
1867
|
-
/* @__PURE__ */ e.jsxs(
|
|
2305
|
+
/* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
|
|
2306
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Examples" }) }),
|
|
2307
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
2308
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1868
2309
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.fidelity > 0.95" }),
|
|
1869
2310
|
/* @__PURE__ */ e.jsx(c, { children: "High fidelity runs" })
|
|
1870
2311
|
] }),
|
|
1871
|
-
/* @__PURE__ */ e.jsxs(
|
|
2312
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1872
2313
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
|
|
1873
2314
|
/* @__PURE__ */ e.jsx(c, { children: "Finished runs with 1000 shots" })
|
|
1874
2315
|
] }),
|
|
1875
|
-
/* @__PURE__ */ e.jsxs(
|
|
2316
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1876
2317
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.backend ~ ibm" }),
|
|
1877
2318
|
/* @__PURE__ */ e.jsx(c, { children: "Runs with IBM backends" })
|
|
1878
2319
|
] }),
|
|
1879
|
-
/* @__PURE__ */ e.jsxs(
|
|
2320
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1880
2321
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.error < 0.01" }),
|
|
1881
2322
|
/* @__PURE__ */ e.jsx(c, { children: "Low error runs" })
|
|
1882
2323
|
] }),
|
|
1883
|
-
/* @__PURE__ */ e.jsxs(
|
|
2324
|
+
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1884
2325
|
/* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
|
|
1885
2326
|
/* @__PURE__ */ e.jsx(c, { children: "VQE runs with low energy" })
|
|
1886
2327
|
] })
|
|
@@ -1888,144 +2329,178 @@ function Is() {
|
|
|
1888
2329
|
] })
|
|
1889
2330
|
] });
|
|
1890
2331
|
}
|
|
1891
|
-
function
|
|
1892
|
-
const { runId: s, index:
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
2332
|
+
function ir() {
|
|
2333
|
+
const { runId: s, index: r } = ts(), a = parseInt(r, 10), { api: n } = z(), { data: o } = Is(s), { data: d, loading: u, error: i } = $t(s, a), [f, h] = S(null);
|
|
2334
|
+
ne(() => {
|
|
2335
|
+
if (f) {
|
|
2336
|
+
const k = setTimeout(() => h(null), 3e3);
|
|
2337
|
+
return () => clearTimeout(k);
|
|
2338
|
+
}
|
|
2339
|
+
}, [f]);
|
|
2340
|
+
const m = async () => {
|
|
2341
|
+
try {
|
|
2342
|
+
const k = n.getArtifactDownloadUrl(s, a), te = await fetch(k);
|
|
2343
|
+
if (!te.ok) throw new Error("Download failed");
|
|
2344
|
+
const ae = await te.blob(), J = document.createElement("a");
|
|
2345
|
+
J.href = URL.createObjectURL(ae), J.download = p?.kind || `artifact-${a}`, J.click(), URL.revokeObjectURL(J.href), h({ message: "Download started", variant: "success" });
|
|
2346
|
+
} catch {
|
|
2347
|
+
h({ message: "Download failed", variant: "error" });
|
|
2348
|
+
}
|
|
2349
|
+
};
|
|
2350
|
+
if (u)
|
|
2351
|
+
return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) });
|
|
2352
|
+
if (i || !d)
|
|
2353
|
+
return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Artifact not found", hint: i?.message }) }) });
|
|
2354
|
+
const { artifact: p, size: y, content: M, content_json: _, preview_available: H, error: T } = d, B = 10 * 1024 * 1024;
|
|
2355
|
+
return /* @__PURE__ */ e.jsxs(V, { children: [
|
|
1899
2356
|
/* @__PURE__ */ e.jsx(
|
|
1900
|
-
|
|
2357
|
+
Ee,
|
|
1901
2358
|
{
|
|
1902
|
-
title:
|
|
2359
|
+
title: p.kind,
|
|
1903
2360
|
subtitle: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1904
2361
|
"← Back to run ",
|
|
1905
|
-
/* @__PURE__ */ e.jsxs(
|
|
1906
|
-
|
|
1907
|
-
|
|
2362
|
+
/* @__PURE__ */ e.jsxs(Y, { to: `/runs/${s}`, children: [
|
|
2363
|
+
Q(s),
|
|
2364
|
+
o?.run_name && ` — ${o.run_name}`
|
|
1908
2365
|
] })
|
|
1909
2366
|
] }),
|
|
1910
|
-
actions: /* @__PURE__ */ e.jsx(
|
|
2367
|
+
actions: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" })
|
|
1911
2368
|
}
|
|
1912
2369
|
),
|
|
1913
|
-
/* @__PURE__ */ e.jsx(
|
|
1914
|
-
{ label: "Kind", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono", children:
|
|
1915
|
-
{ label: "Role", value: /* @__PURE__ */ e.jsx(
|
|
1916
|
-
{ label: "Media Type", value:
|
|
1917
|
-
{ label: "Digest", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children:
|
|
1918
|
-
{ label: "Size", value:
|
|
2370
|
+
/* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsx(Qe, { items: [
|
|
2371
|
+
{ label: "Kind", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: p.kind }) },
|
|
2372
|
+
{ label: "Role", value: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: p.role }) },
|
|
2373
|
+
{ label: "Media Type", value: p.media_type },
|
|
2374
|
+
{ label: "Digest", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: p.digest }) },
|
|
2375
|
+
{ label: "Size", value: Oe(y) }
|
|
1919
2376
|
] }) }),
|
|
1920
|
-
/* @__PURE__ */ e.jsxs(
|
|
1921
|
-
/* @__PURE__ */ e.jsx(
|
|
1922
|
-
|
|
2377
|
+
/* @__PURE__ */ e.jsxs(b, { children: [
|
|
2378
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Content" }) }),
|
|
2379
|
+
T ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1923
2380
|
/* @__PURE__ */ e.jsxs("p", { className: "text-sm text-danger", children: [
|
|
1924
|
-
"
|
|
1925
|
-
|
|
2381
|
+
"Error loading artifact: ",
|
|
2382
|
+
T
|
|
1926
2383
|
] }),
|
|
1927
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx(
|
|
1928
|
-
] }) :
|
|
2384
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download to view" }) })
|
|
2385
|
+
] }) : H ? _ ? /* @__PURE__ */ e.jsx("pre", { children: Tt(_) }) : M ? /* @__PURE__ */ e.jsx("pre", { children: M }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
|
|
1929
2386
|
"Binary content (",
|
|
1930
|
-
|
|
2387
|
+
Oe(y),
|
|
1931
2388
|
") — download to view"
|
|
1932
2389
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1933
2390
|
/* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
|
|
1934
2391
|
/* @__PURE__ */ e.jsx("strong", { children: "Artifact too large for preview" }),
|
|
1935
2392
|
" (",
|
|
1936
|
-
|
|
2393
|
+
Oe(y),
|
|
1937
2394
|
" exceeds ",
|
|
1938
|
-
|
|
2395
|
+
Oe(B),
|
|
1939
2396
|
" limit)"
|
|
1940
2397
|
] }),
|
|
1941
2398
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: "Download the artifact to view its contents." }),
|
|
1942
|
-
/* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx(
|
|
2399
|
+
/* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" }) })
|
|
1943
2400
|
] })
|
|
1944
|
-
] })
|
|
2401
|
+
] }),
|
|
2402
|
+
f && /* @__PURE__ */ e.jsx(
|
|
2403
|
+
Ce,
|
|
2404
|
+
{
|
|
2405
|
+
message: f.message,
|
|
2406
|
+
variant: f.variant,
|
|
2407
|
+
visible: !!f,
|
|
2408
|
+
onClose: () => h(null)
|
|
2409
|
+
}
|
|
2410
|
+
)
|
|
1945
2411
|
] });
|
|
1946
2412
|
}
|
|
1947
|
-
const
|
|
1948
|
-
{ path: "/", element: /* @__PURE__ */ e.jsx(
|
|
1949
|
-
{ path: "/runs", element: /* @__PURE__ */ e.jsx(
|
|
1950
|
-
{ path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(
|
|
1951
|
-
{ path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(
|
|
1952
|
-
{ path: "/projects", element: /* @__PURE__ */ e.jsx(
|
|
1953
|
-
{ path: "/groups", element: /* @__PURE__ */ e.jsx(
|
|
1954
|
-
{ path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(
|
|
1955
|
-
{ path: "/diff", element: /* @__PURE__ */ e.jsx(
|
|
1956
|
-
{ path: "/search", element: /* @__PURE__ */ e.jsx(
|
|
2413
|
+
const cr = [
|
|
2414
|
+
{ path: "/", element: /* @__PURE__ */ e.jsx(vt, { to: "/runs", replace: !0 }) },
|
|
2415
|
+
{ path: "/runs", element: /* @__PURE__ */ e.jsx(It, {}) },
|
|
2416
|
+
{ path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(Yt, {}) },
|
|
2417
|
+
{ path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(ir, {}) },
|
|
2418
|
+
{ path: "/projects", element: /* @__PURE__ */ e.jsx(Kt, {}) },
|
|
2419
|
+
{ path: "/groups", element: /* @__PURE__ */ e.jsx(Ht, {}) },
|
|
2420
|
+
{ path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(Jt, {}) },
|
|
2421
|
+
{ path: "/diff", element: /* @__PURE__ */ e.jsx(nr, {}) },
|
|
2422
|
+
{ path: "/search", element: /* @__PURE__ */ e.jsx(ar, {}) }
|
|
1957
2423
|
];
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
2424
|
+
function Ws(s = []) {
|
|
2425
|
+
return bt([...cr, ...s]);
|
|
1960
2426
|
}
|
|
1961
|
-
const
|
|
1962
|
-
function
|
|
1963
|
-
const
|
|
1964
|
-
return /* @__PURE__ */ e.jsx(
|
|
2427
|
+
const lr = Ws();
|
|
2428
|
+
function jr({ additionalRoutes: s, ...r }) {
|
|
2429
|
+
const a = s?.length ? Ws(s) : lr;
|
|
2430
|
+
return /* @__PURE__ */ e.jsx(Pt, { ...r, children: /* @__PURE__ */ e.jsx(Nt, { router: a }) });
|
|
1965
2431
|
}
|
|
1966
2432
|
export {
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2433
|
+
fr as Alert,
|
|
2434
|
+
Rt as ApiClient,
|
|
2435
|
+
we as ApiError,
|
|
2436
|
+
jr as App,
|
|
2437
|
+
Pt as AppProvider,
|
|
2438
|
+
ir as ArtifactPage,
|
|
2439
|
+
K as Badge,
|
|
2440
|
+
D as Button,
|
|
2441
|
+
b as Card,
|
|
2442
|
+
W as CardHeader,
|
|
2443
|
+
G as CardTitle,
|
|
2444
|
+
nr as DiffPage,
|
|
2445
|
+
he as EmptyState,
|
|
2446
|
+
Ut as ExportRunButton,
|
|
2447
|
+
se as FormGroup,
|
|
2448
|
+
Ms as FormRow,
|
|
2449
|
+
Jt as GroupDetailPage,
|
|
2450
|
+
Ht as GroupsPage,
|
|
2451
|
+
Mt as GroupsTable,
|
|
2452
|
+
as as Input,
|
|
2453
|
+
Qe as KVList,
|
|
2454
|
+
ce as Label,
|
|
2455
|
+
V as Layout,
|
|
2456
|
+
mr as LayoutConfigProvider,
|
|
2457
|
+
ns as Modal,
|
|
2458
|
+
$s as POLL_INTERVAL,
|
|
2459
|
+
Ee as PageHeader,
|
|
2460
|
+
Kt as ProjectsPage,
|
|
2461
|
+
qt as ProjectsTable,
|
|
2462
|
+
Yt as RunDetailPage,
|
|
2463
|
+
It as RunsPage,
|
|
2464
|
+
is as RunsTable,
|
|
2465
|
+
ar as SearchPage,
|
|
2466
|
+
de as Select,
|
|
2467
|
+
I as Spinner,
|
|
2468
|
+
Us as StatusBadge,
|
|
2001
2469
|
O as Table,
|
|
2002
|
-
|
|
2470
|
+
L as TableBody,
|
|
2003
2471
|
c as TableCell,
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2472
|
+
re as TableHead,
|
|
2473
|
+
N as TableHeader,
|
|
2474
|
+
j as TableRow,
|
|
2475
|
+
hr as ThemeProvider,
|
|
2476
|
+
Ce as Toast,
|
|
2477
|
+
Et as api,
|
|
2478
|
+
ur as buildUrl,
|
|
2479
|
+
$ as cn,
|
|
2480
|
+
cr as coreRoutes,
|
|
2481
|
+
Ws as createRouter,
|
|
2482
|
+
Ds as elapsedSeconds,
|
|
2483
|
+
Oe as formatBytes,
|
|
2484
|
+
As as formatDuration,
|
|
2485
|
+
Ct as formatNumber,
|
|
2486
|
+
rs as isTerminalStatus,
|
|
2487
|
+
Tt as jsonPretty,
|
|
2488
|
+
lr as router,
|
|
2489
|
+
Xe as shortDigest,
|
|
2490
|
+
Q as shortId,
|
|
2491
|
+
Le as timeAgo,
|
|
2492
|
+
kt as truncate,
|
|
2493
|
+
z as useApp,
|
|
2494
|
+
$t as useArtifact,
|
|
2495
|
+
Ft as useDiff,
|
|
2496
|
+
At as useGroup,
|
|
2497
|
+
Dt as useGroups,
|
|
2498
|
+
Lt as useLayoutConfig,
|
|
2499
|
+
Re as useMutation,
|
|
2500
|
+
Ls as usePolling,
|
|
2501
|
+
Ie as useProjects,
|
|
2502
|
+
Is as useRun,
|
|
2503
|
+
Bs as useRuns,
|
|
2504
|
+
St as useTheme,
|
|
2505
|
+
xr as useThemeOptional
|
|
2031
2506
|
};
|