@voltro/devtools 0.82.0 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +361 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1299 -1067
- package/dist/styles.css +45 -10
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Component as e, createContext as t, useCallback as n, useContext as r, useEffect as i, useId as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
|
|
2
2
|
import { addSink as d } from "@voltro/logger";
|
|
3
3
|
import { getRouteSnapshot as f, getStatuses as p, subscribeConsoleCalls as m, subscribeRouteSnapshot as h, subscribeStatuses as g, useAppUpdate as _, useInstallPrompt as v, useOfflineStatus as y } from "@voltro/web";
|
|
4
|
-
import { clearStoreHistory as b, definedStores as x, getMutations as S, readPairing as C, storeHistory as w, subscribeMutations as T, subscribeStoreHistory as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
4
|
+
import { clearStoreHistory as b, definedStores as x, getMutations as S, readPairing as C, storeHistory as w, subscribeMutations as T, subscribeStoreHistory as ee, travelToStoreState as E, useConnectionStatus as D, useFrameworkRuntimes as O, usePlatform as k, useShellExtension as te, useWorkflow as A } from "@voltro/client";
|
|
5
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as ne } from "react-dom";
|
|
7
7
|
//#region src/consoleBridge.ts
|
|
8
|
-
var
|
|
8
|
+
var P = (e) => e === "warn" || e === "error", F = (e) => {
|
|
9
9
|
if (typeof e == "string") return e;
|
|
10
10
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
11
11
|
if (e === void 0) return "undefined";
|
|
@@ -39,7 +39,7 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
39
39
|
fields: {},
|
|
40
40
|
...r === void 0 ? {} : { cause: r }
|
|
41
41
|
};
|
|
42
|
-
}, R = Symbol.for("voltro.devtools.consoleBridge"),
|
|
42
|
+
}, R = Symbol.for("voltro.devtools.consoleBridge"), z = (e, t = m) => {
|
|
43
43
|
let n = globalThis, r = n[R];
|
|
44
44
|
if (r !== void 0) return r;
|
|
45
45
|
let i = [], a = !1, o = () => {
|
|
@@ -60,7 +60,7 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}, l = t((e) => {
|
|
63
|
-
if (
|
|
63
|
+
if (P(e.level)) try {
|
|
64
64
|
s(I(e.level, e.args, new Date(e.ts)));
|
|
65
65
|
} catch {}
|
|
66
66
|
}), u = (t) => {
|
|
@@ -76,23 +76,23 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
return n[R] = p, p;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
for (let e of
|
|
79
|
+
}, B = 500, re = [], V = /* @__PURE__ */ new Set(), ie = [], ae = () => {
|
|
80
|
+
ie = re.slice();
|
|
81
|
+
}, oe = () => {
|
|
82
|
+
ae();
|
|
83
|
+
for (let e of V) try {
|
|
84
84
|
e();
|
|
85
85
|
} catch {}
|
|
86
|
-
},
|
|
86
|
+
}, se = typeof window < "u" ? z(ce) : null;
|
|
87
87
|
d((e) => {
|
|
88
|
-
|
|
88
|
+
se?.noteLoggerRecord(e), ce(e);
|
|
89
89
|
});
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function ce(e) {
|
|
91
|
+
re.unshift(e), re.length > B && (re.length = B), oe();
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
}),
|
|
93
|
+
var le = () => ie, ue = (e) => (V.add(e), () => {
|
|
94
|
+
V.delete(e);
|
|
95
|
+
}), H = (e) => ({ className: t }) => /* @__PURE__ */ M("svg", {
|
|
96
96
|
viewBox: "0 0 24 24",
|
|
97
97
|
fill: "none",
|
|
98
98
|
stroke: "currentColor",
|
|
@@ -102,217 +102,221 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
102
102
|
className: t ?? "vdt:w-4 vdt:h-4",
|
|
103
103
|
"aria-hidden": "true",
|
|
104
104
|
children: e
|
|
105
|
-
}),
|
|
105
|
+
}), de = ({ className: e }) => {
|
|
106
106
|
let t = a(), n = `vdtBoltFront-${t}`, r = `vdtBoltBack-${t}`;
|
|
107
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ N("svg", {
|
|
108
108
|
viewBox: "0 0 48 48",
|
|
109
109
|
fill: "none",
|
|
110
110
|
className: e,
|
|
111
111
|
"aria-hidden": "true",
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ N("defs", { children: [/* @__PURE__ */ N("linearGradient", {
|
|
114
114
|
id: n,
|
|
115
115
|
x1: "13",
|
|
116
116
|
y1: "5",
|
|
117
117
|
x2: "33",
|
|
118
118
|
y2: "43",
|
|
119
119
|
gradientUnits: "userSpaceOnUse",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ M("stop", { stopColor: "#C4A6FF" }), /* @__PURE__ */ M("stop", {
|
|
121
121
|
offset: "1",
|
|
122
122
|
stopColor: "#9D5BFF"
|
|
123
123
|
})]
|
|
124
|
-
}), /* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ N("linearGradient", {
|
|
125
125
|
id: r,
|
|
126
126
|
x1: "22",
|
|
127
127
|
y1: "5",
|
|
128
128
|
x2: "35",
|
|
129
129
|
y2: "43",
|
|
130
130
|
gradientUnits: "userSpaceOnUse",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ M("stop", { stopColor: "#9D5BFF" }), /* @__PURE__ */ M("stop", {
|
|
132
132
|
offset: "1",
|
|
133
133
|
stopColor: "#7C3AED"
|
|
134
134
|
})]
|
|
135
135
|
})] }),
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ M("path", {
|
|
137
137
|
d: "M28 5 13 27 22 26 20 43Z",
|
|
138
138
|
fill: `url(#${n})`
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ M("path", {
|
|
141
141
|
d: "M28 5 20 43 35 21 26 22Z",
|
|
142
142
|
fill: `url(#${r})`
|
|
143
143
|
})
|
|
144
144
|
]
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, fe = H(/* @__PURE__ */ M("polyline", { points: "6 9 12 15 18 9" })), pe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("line", {
|
|
147
147
|
x1: "18",
|
|
148
148
|
y1: "6",
|
|
149
149
|
x2: "6",
|
|
150
150
|
y2: "18"
|
|
151
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ M("line", {
|
|
152
152
|
x1: "6",
|
|
153
153
|
y1: "6",
|
|
154
154
|
x2: "18",
|
|
155
155
|
y2: "18"
|
|
156
|
-
})] })),
|
|
157
|
-
/* @__PURE__ */
|
|
156
|
+
})] })), me = H(/* @__PURE__ */ M("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })), he = H(/* @__PURE__ */ N(j, { children: [
|
|
157
|
+
/* @__PURE__ */ M("ellipse", {
|
|
158
158
|
cx: "12",
|
|
159
159
|
cy: "5",
|
|
160
160
|
rx: "9",
|
|
161
161
|
ry: "3"
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
] })),
|
|
163
|
+
/* @__PURE__ */ M("path", { d: "M3 5 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 V5" }),
|
|
164
|
+
/* @__PURE__ */ M("path", { d: "M3 11 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 v-6" })
|
|
165
|
+
] })), ge = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("circle", {
|
|
166
166
|
cx: "12",
|
|
167
167
|
cy: "12",
|
|
168
168
|
r: "10"
|
|
169
|
-
}), /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] })),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
] })),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
] })),
|
|
184
|
-
/* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ M("polygon", { points: "16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" })] })), _e = H(/* @__PURE__ */ N(j, { children: [
|
|
170
|
+
/* @__PURE__ */ M("path", { d: "M12 22 v-5" }),
|
|
171
|
+
/* @__PURE__ */ M("path", { d: "M9 8 V2" }),
|
|
172
|
+
/* @__PURE__ */ M("path", { d: "M15 8 V2" }),
|
|
173
|
+
/* @__PURE__ */ M("path", { d: "M18 8 v4 a6 6 0 0 1 -12 0 V8 z" })
|
|
174
|
+
] })), ve = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("polyline", { points: "17 11 12 6 7 11" }), /* @__PURE__ */ M("polyline", { points: "17 17 12 22 7 17" })] })), ye = H(/* @__PURE__ */ N(j, { children: [
|
|
175
|
+
/* @__PURE__ */ M("polyline", { points: "3 6 5 6 21 6" }),
|
|
176
|
+
/* @__PURE__ */ M("path", { d: "M19 6 l-1 14 c-.05 1.1 -.96 2 -2 2 H8 c-1.04 0 -1.95 -.9 -2 -2 L5 6" }),
|
|
177
|
+
/* @__PURE__ */ M("path", { d: "M10 11 v6" }),
|
|
178
|
+
/* @__PURE__ */ M("path", { d: "M14 11 v6" })
|
|
179
|
+
] })), be = H(/* @__PURE__ */ N(j, { children: [
|
|
180
|
+
/* @__PURE__ */ M("path", { d: "M18 16.98 h-5.99 c-1.1 0 -1.95 .94 -2.48 1.9 A4 4 0 0 1 2 17 c0 -1.42 .76 -2.66 1.9 -3.34" }),
|
|
181
|
+
/* @__PURE__ */ M("path", { d: "M6 17 l3.13 -5.78 c.53 -.97 .43 -2.22 -.26 -3.07 A4 4 0 1 1 17 7" }),
|
|
182
|
+
/* @__PURE__ */ M("path", { d: "M16 6.78 a4 4 0 1 1 5 6.31 c-.84 .6 -1.36 1.59 -1.36 2.61" })
|
|
183
|
+
] })), xe = H(/* @__PURE__ */ N(j, { children: [
|
|
184
|
+
/* @__PURE__ */ M("rect", {
|
|
185
185
|
x: "3",
|
|
186
186
|
y: "3",
|
|
187
187
|
width: "6",
|
|
188
188
|
height: "6",
|
|
189
189
|
rx: "1"
|
|
190
190
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ M("rect", {
|
|
192
192
|
x: "15",
|
|
193
193
|
y: "15",
|
|
194
194
|
width: "6",
|
|
195
195
|
height: "6",
|
|
196
196
|
rx: "1"
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
] })),
|
|
201
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ M("path", { d: "M9 6h3a3 3 0 0 1 3 3v3" }),
|
|
199
|
+
/* @__PURE__ */ M("path", { d: "M15 18h-3a3 3 0 0 1-3-3v-3" })
|
|
200
|
+
] })), Se = H(/* @__PURE__ */ N(j, { children: [
|
|
201
|
+
/* @__PURE__ */ M("line", {
|
|
202
202
|
x1: "6",
|
|
203
203
|
y1: "3",
|
|
204
204
|
x2: "6",
|
|
205
205
|
y2: "15"
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ M("circle", {
|
|
208
208
|
cx: "18",
|
|
209
209
|
cy: "6",
|
|
210
210
|
r: "3"
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ M("circle", {
|
|
213
213
|
cx: "6",
|
|
214
214
|
cy: "18",
|
|
215
215
|
r: "3"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
] })),
|
|
217
|
+
/* @__PURE__ */ M("path", { d: "M18 9 a9 9 0 0 1 -9 9" })
|
|
218
|
+
] })), Ce = H(/* @__PURE__ */ M("path", { d: "m13 2-9 12h7l-1 8 10-12h-7l1-8z" })), we = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("circle", {
|
|
219
219
|
cx: "11",
|
|
220
220
|
cy: "11",
|
|
221
221
|
r: "7"
|
|
222
|
-
}), /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ M("path", { d: "m20 20-3.5-3.5" })] })), Te = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("path", { d: "M4 12h12M12 6l6 6-6 6" }), /* @__PURE__ */ M("path", { d: "M4 4v16" })] })), Ee = H(/* @__PURE__ */ N(j, { children: [
|
|
223
|
+
/* @__PURE__ */ M("path", { d: "M4 6h16M4 12h10M4 18h6" }),
|
|
224
|
+
/* @__PURE__ */ M("circle", {
|
|
225
225
|
cx: "18",
|
|
226
226
|
cy: "17",
|
|
227
227
|
r: "3"
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
] })),
|
|
229
|
+
/* @__PURE__ */ M("path", { d: "m20.5 19.5 2 2" })
|
|
230
|
+
] })), De = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("path", { d: "M5 4h14v16H5z" }), /* @__PURE__ */ M("path", { d: "M8 8h8M8 12h8M8 16h5" })] })), Oe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
231
231
|
x: "3",
|
|
232
232
|
y: "4",
|
|
233
233
|
width: "18",
|
|
234
234
|
height: "12",
|
|
235
235
|
rx: "2"
|
|
236
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ M("path", { d: "M8 20h8M12 16v4" })] })), ke = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
237
237
|
x: "3",
|
|
238
238
|
y: "4",
|
|
239
239
|
width: "18",
|
|
240
240
|
height: "16",
|
|
241
241
|
rx: "2"
|
|
242
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ M("path", { d: "M3 14h18" })] })), Ae = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
243
243
|
x: "3",
|
|
244
244
|
y: "4",
|
|
245
245
|
width: "18",
|
|
246
246
|
height: "16",
|
|
247
247
|
rx: "2"
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ M("path", { d: "M3 10h18" })] })), je = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
249
249
|
x: "3",
|
|
250
250
|
y: "4",
|
|
251
251
|
width: "18",
|
|
252
252
|
height: "16",
|
|
253
253
|
rx: "2"
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ M("path", { d: "M9 4v16" })] })), Me = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
255
255
|
x: "3",
|
|
256
256
|
y: "4",
|
|
257
257
|
width: "18",
|
|
258
258
|
height: "16",
|
|
259
259
|
rx: "2"
|
|
260
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ M("path", { d: "M15 4v16" })] })), Ne = H(/* @__PURE__ */ N(j, { children: [
|
|
261
|
+
/* @__PURE__ */ M("path", { d: "M14 4h6v6" }),
|
|
262
|
+
/* @__PURE__ */ M("path", { d: "M20 4l-8 8" }),
|
|
263
|
+
/* @__PURE__ */ M("path", { d: "M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4" })
|
|
264
|
+
] })), Pe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
261
265
|
x: "7",
|
|
262
266
|
y: "8",
|
|
263
267
|
width: "14",
|
|
264
268
|
height: "12",
|
|
265
269
|
rx: "2"
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ M("path", { d: "M3 14V6a2 2 0 0 1 2-2h8" })] })), Fe = H(/* @__PURE__ */ N(j, { children: [
|
|
271
|
+
/* @__PURE__ */ M("circle", {
|
|
268
272
|
cx: "9",
|
|
269
273
|
cy: "6",
|
|
270
274
|
r: "1",
|
|
271
275
|
fill: "currentColor"
|
|
272
276
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ M("circle", {
|
|
274
278
|
cx: "15",
|
|
275
279
|
cy: "6",
|
|
276
280
|
r: "1",
|
|
277
281
|
fill: "currentColor"
|
|
278
282
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ M("circle", {
|
|
280
284
|
cx: "9",
|
|
281
285
|
cy: "12",
|
|
282
286
|
r: "1",
|
|
283
287
|
fill: "currentColor"
|
|
284
288
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ M("circle", {
|
|
286
290
|
cx: "15",
|
|
287
291
|
cy: "12",
|
|
288
292
|
r: "1",
|
|
289
293
|
fill: "currentColor"
|
|
290
294
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ M("circle", {
|
|
292
296
|
cx: "9",
|
|
293
297
|
cy: "18",
|
|
294
298
|
r: "1",
|
|
295
299
|
fill: "currentColor"
|
|
296
300
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ M("circle", {
|
|
298
302
|
cx: "15",
|
|
299
303
|
cy: "18",
|
|
300
304
|
r: "1",
|
|
301
305
|
fill: "currentColor"
|
|
302
306
|
})
|
|
303
|
-
] })), Ie = ({ className: e }) => /* @__PURE__ */
|
|
307
|
+
] })), Ie = ({ className: e }) => /* @__PURE__ */ N("svg", {
|
|
304
308
|
viewBox: "0 0 24 24",
|
|
305
309
|
fill: "none",
|
|
306
310
|
className: e,
|
|
307
311
|
"aria-hidden": "true",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ M("circle", {
|
|
309
313
|
cx: "12",
|
|
310
314
|
cy: "12",
|
|
311
315
|
r: "9",
|
|
312
316
|
stroke: "currentColor",
|
|
313
317
|
strokeOpacity: "0.2",
|
|
314
318
|
strokeWidth: "2.5"
|
|
315
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ M("path", {
|
|
316
320
|
d: "M21 12 a9 9 0 0 0 -9 -9",
|
|
317
321
|
stroke: "currentColor",
|
|
318
322
|
strokeWidth: "2.5",
|
|
@@ -324,7 +328,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
324
328
|
brandWord: "Voltro",
|
|
325
329
|
kicker: "Devtools",
|
|
326
330
|
openLabel: "Open Voltro Devtools",
|
|
327
|
-
openTitle: "Open Voltro Devtools (Alt+V)",
|
|
331
|
+
openTitle: "Open Voltro Devtools (Alt+V) · drag to move",
|
|
328
332
|
closeTitle: "Close (Alt+V)",
|
|
329
333
|
searchPlaceholder: "Search subscriptions, mutations, actions, traces, logs…",
|
|
330
334
|
searchLabel: "Search",
|
|
@@ -333,9 +337,11 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
333
337
|
dockTop: "Dock to top",
|
|
334
338
|
dockLeft: "Dock to left",
|
|
335
339
|
dockRight: "Dock to right",
|
|
336
|
-
dockWindow: "
|
|
340
|
+
dockWindow: "Floating window",
|
|
341
|
+
dockExternal: "Own browser window",
|
|
342
|
+
externalBlocked: "The browser blocked the console window — allow pop-ups for this page, or click the capsule to try again.",
|
|
337
343
|
pushPage: "Push the page",
|
|
338
|
-
pushPageHint: "
|
|
344
|
+
pushPageHint: "Lays the page out beside the console, dialogs included. 100vw and media queries still see the full window.",
|
|
339
345
|
resizeLabel: "Resize",
|
|
340
346
|
moveTitle: "Drag to move",
|
|
341
347
|
scopeAll: "All",
|
|
@@ -378,7 +384,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
378
384
|
inspect: {
|
|
379
385
|
refusedTitle: (e, t) => `The inspect surface of \`${e}\` refused the devtools (HTTP ${t}).`,
|
|
380
386
|
unreachableTitle: (e) => `The inspect surface of \`${e}\` could not be read.`,
|
|
381
|
-
unreachableHint: "The browser gave no status. An api on another origin looks exactly like this when it refuses the request — the browser hides the reason. Read it through the web server instead: drop `apis.<name>.url` and point `VOLTRO_API_ORIGIN_<NAME>` at the api, so the overlay fetches `/_voltro/api/<name>` on this origin.",
|
|
387
|
+
unreachableHint: "The browser gave no status. An api on another origin looks exactly like this when it refuses the request — the browser hides the reason. The api answers a cross-origin read only for a page on `localhost`, so from a deployed host that path cannot work with or without a token. Read it through the web server instead: drop `apis.<name>.url` and point `VOLTRO_API_ORIGIN_<NAME>` at the api, so the overlay fetches `/_voltro/api/<name>` on this origin. The web server lends the api's credential only to its own machine, to a session signed in with `VOLTRO_DASHBOARD_TOKEN`, or to a client network listed in `VOLTRO_INSPECT_TRUSTED_CLIENTS` (behind the proxies in `VOLTRO_TRUSTED_PROXIES`).",
|
|
382
388
|
fixLabel: "Fix:",
|
|
383
389
|
paused: "Inspect reads for this api are paused until you reopen the console.",
|
|
384
390
|
tokenLabel: "Devtools token (VOLTRO_DASHBOARD_TOKEN)",
|
|
@@ -539,7 +545,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
539
545
|
collapse: "collapse",
|
|
540
546
|
expand: "expand",
|
|
541
547
|
noLoaderTitle: "No loader data for this route.",
|
|
542
|
-
noLoaderHint: (e) => /* @__PURE__ */
|
|
548
|
+
noLoaderHint: (e) => /* @__PURE__ */ N(j, { children: [
|
|
543
549
|
"Pages with an exported `loader` see their resolved data here. UI-only apps (no ",
|
|
544
550
|
e,
|
|
545
551
|
") don't surface loader state at all."
|
|
@@ -561,7 +567,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
561
567
|
noApi: "No API connected. Traces appear once a `useMutation` / `useSubscription` call runs.",
|
|
562
568
|
noneCaptured: (e) => `${e} — no traces captured yet. Trigger an action.`,
|
|
563
569
|
proxiedTitle: "Traces aren't fetchable from this browser — the API is reached over a proxied socket, so there's no direct inspect origin for this panel.",
|
|
564
|
-
proxiedHint: (e) => /* @__PURE__ */
|
|
570
|
+
proxiedHint: (e) => /* @__PURE__ */ N(j, { children: [
|
|
565
571
|
"They're still recorded server-side. Use ",
|
|
566
572
|
e,
|
|
567
573
|
" or open the app's",
|
|
@@ -634,12 +640,12 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
634
640
|
});
|
|
635
641
|
function Be(e) {
|
|
636
642
|
let t = r(Re), n = s(() => ze(t, e.strings), [t, e.strings]);
|
|
637
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ M(Re.Provider, {
|
|
638
644
|
value: n,
|
|
639
645
|
children: e.children
|
|
640
646
|
});
|
|
641
647
|
}
|
|
642
|
-
var
|
|
648
|
+
var U = (e) => {
|
|
643
649
|
let t = r(Re);
|
|
644
650
|
return s(() => e ? ze(t, e) : t, [t, e]);
|
|
645
651
|
}, Ve = {
|
|
@@ -651,7 +657,7 @@ var H = (e) => {
|
|
|
651
657
|
}, He = {
|
|
652
658
|
sm: "vdt:text-xs vdt:px-2 vdt:py-1 vdt:rounded-sm",
|
|
653
659
|
md: "vdt:text-sm vdt:px-3 vdt:py-1.5 vdt:rounded-md"
|
|
654
|
-
},
|
|
660
|
+
}, W = ({ variant: e = "default", size: t = "md", onClick: n, disabled: r, children: i, className: a, title: o }) => /* @__PURE__ */ M("button", {
|
|
655
661
|
onClick: n,
|
|
656
662
|
disabled: r,
|
|
657
663
|
title: o,
|
|
@@ -670,7 +676,7 @@ var H = (e) => {
|
|
|
670
676
|
danger: "vdt:bg-danger/15 vdt:text-danger vdt:border vdt:border-danger/30",
|
|
671
677
|
info: "vdt:bg-info/15 vdt:text-info vdt:border vdt:border-info/30",
|
|
672
678
|
accent: "vdt:bg-accent/15 vdt:text-accent vdt:border vdt:border-accent/30"
|
|
673
|
-
},
|
|
679
|
+
}, G = ({ tone: e = "neutral", children: t, className: n }) => /* @__PURE__ */ M("span", {
|
|
674
680
|
className: [
|
|
675
681
|
"vdt:inline-flex vdt:items-center vdt:gap-1 vdt:px-1.5 vdt:py-0.5",
|
|
676
682
|
"vdt:rounded-sm vdt:text-[10px] vdt:font-medium vdt:uppercase vdt:tracking-wider",
|
|
@@ -678,36 +684,36 @@ var H = (e) => {
|
|
|
678
684
|
n ?? ""
|
|
679
685
|
].join(" "),
|
|
680
686
|
children: t
|
|
681
|
-
}),
|
|
687
|
+
}), K = ({ children: e, className: t }) => /* @__PURE__ */ M("div", {
|
|
682
688
|
className: ["vdt:bg-background-elevated vdt:border vdt:border-border vdt:rounded-md", t ?? ""].join(" "),
|
|
683
689
|
children: e
|
|
684
|
-
}), We = ({ children: e, className: t }) => /* @__PURE__ */
|
|
690
|
+
}), We = ({ children: e, className: t }) => /* @__PURE__ */ M("div", {
|
|
685
691
|
className: ["vdt-card-body", t ?? ""].join(" "),
|
|
686
692
|
children: e
|
|
687
|
-
}),
|
|
693
|
+
}), q = ({ children: e, right: t, Icon: n }) => /* @__PURE__ */ N("div", {
|
|
688
694
|
className: "vdt:flex vdt:items-center vdt:justify-between vdt:px-3 vdt:py-2 vdt:border-b vdt:border-border",
|
|
689
|
-
children: [/* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ N("div", {
|
|
690
696
|
className: "vdt:flex vdt:items-center vdt:gap-1.5",
|
|
691
|
-
children: [n ? /* @__PURE__ */
|
|
697
|
+
children: [n ? /* @__PURE__ */ M(n, { className: "vdt:w-3 vdt:h-3 vdt:text-foreground-muted" }) : null, /* @__PURE__ */ M("span", {
|
|
692
698
|
className: "vdt:text-[10px] vdt:font-semibold vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted",
|
|
693
699
|
children: e
|
|
694
700
|
})]
|
|
695
701
|
}), t ?? null]
|
|
696
|
-
}),
|
|
702
|
+
}), J = ({ entries: e }) => /* @__PURE__ */ M("dl", {
|
|
697
703
|
className: "vdt:grid vdt:grid-cols-[auto_1fr] vdt:gap-x-3 vdt:gap-y-1 vdt:px-3 vdt:py-2 vdt:text-xs",
|
|
698
|
-
children: e.map((e) => /* @__PURE__ */
|
|
704
|
+
children: e.map((e) => /* @__PURE__ */ N("div", {
|
|
699
705
|
className: "vdt:contents",
|
|
700
|
-
children: [/* @__PURE__ */
|
|
706
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
701
707
|
className: "vdt:text-foreground-muted vdt:font-medium",
|
|
702
708
|
children: e.key
|
|
703
|
-
}), /* @__PURE__ */
|
|
709
|
+
}), /* @__PURE__ */ M("dd", {
|
|
704
710
|
className: "vdt:font-mono vdt:text-foreground vdt:break-all",
|
|
705
711
|
children: e.value
|
|
706
712
|
})]
|
|
707
713
|
}, e.key))
|
|
708
|
-
}),
|
|
714
|
+
}), Y = ({ children: e }) => /* @__PURE__ */ M("div", {
|
|
709
715
|
className: "vdt:flex vdt:items-center vdt:justify-center vdt:py-12 vdt:px-6 vdt:text-center",
|
|
710
|
-
children: /* @__PURE__ */
|
|
716
|
+
children: /* @__PURE__ */ M("div", {
|
|
711
717
|
className: "vdt:text-xs vdt:text-foreground-subtle vdt:max-w-xs",
|
|
712
718
|
children: e
|
|
713
719
|
})
|
|
@@ -726,13 +732,13 @@ var H = (e) => {
|
|
|
726
732
|
return t(), () => clearInterval(i);
|
|
727
733
|
}, [e]), t;
|
|
728
734
|
}, Je = () => {
|
|
729
|
-
let e =
|
|
735
|
+
let e = O();
|
|
730
736
|
return e.names.map((t) => ({
|
|
731
737
|
name: t,
|
|
732
738
|
entries: e.get(t).cache.peekAll()
|
|
733
739
|
}));
|
|
734
740
|
}, Ye = () => {
|
|
735
|
-
let e =
|
|
741
|
+
let e = O();
|
|
736
742
|
return qe((e.names[0] ? e.get(e.names[0]) : null)?.cache ?? null), Je();
|
|
737
743
|
}, Xe = (e) => {
|
|
738
744
|
if (e instanceof Error) {
|
|
@@ -758,9 +764,9 @@ var H = (e) => {
|
|
|
758
764
|
}
|
|
759
765
|
} catch {}
|
|
760
766
|
return e;
|
|
761
|
-
}, Qe = ({ entry: e }) => /* @__PURE__ */
|
|
767
|
+
}, Qe = ({ entry: e }) => /* @__PURE__ */ N("div", {
|
|
762
768
|
className: "vdt:bg-background/60",
|
|
763
|
-
children: [/* @__PURE__ */
|
|
769
|
+
children: [/* @__PURE__ */ M(J, { entries: [
|
|
764
770
|
{
|
|
765
771
|
key: "tag",
|
|
766
772
|
value: e.tag ?? "—"
|
|
@@ -817,12 +823,12 @@ var H = (e) => {
|
|
|
817
823
|
key: "error",
|
|
818
824
|
value: e.snapshot.error === void 0 ? "—" : Xe(e.snapshot.error)
|
|
819
825
|
}
|
|
820
|
-
] }), /* @__PURE__ */
|
|
826
|
+
] }), /* @__PURE__ */ N("details", {
|
|
821
827
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
823
829
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
824
830
|
children: "Data"
|
|
825
|
-
}), /* @__PURE__ */
|
|
831
|
+
}), /* @__PURE__ */ M("pre", {
|
|
826
832
|
className: "vdt:mt-2 vdt:text-[11px] vdt:text-foreground vdt:max-h-64 vdt:overflow-auto vdt:font-mono",
|
|
827
833
|
children: (() => {
|
|
828
834
|
try {
|
|
@@ -833,15 +839,15 @@ var H = (e) => {
|
|
|
833
839
|
})()
|
|
834
840
|
})]
|
|
835
841
|
})]
|
|
836
|
-
}), $e = () => Ye().reduce((e, t) => e + t.entries.length, 0), et = (e) => e === "compiling" || e === "loading" || e === "reconnecting", tt = () => u(
|
|
837
|
-
let t =
|
|
838
|
-
return /* @__PURE__ */
|
|
842
|
+
}), $e = () => Ye().reduce((e, t) => e + t.entries.length, 0), et = (e) => e === "compiling" || e === "loading" || e === "reconnecting", tt = () => u(ue, le, le), nt = ({ name: e }) => {
|
|
843
|
+
let t = D(e).status;
|
|
844
|
+
return /* @__PURE__ */ N("span", {
|
|
839
845
|
className: "vdt-chip",
|
|
840
846
|
"data-status": t,
|
|
841
|
-
children: [/* @__PURE__ */
|
|
847
|
+
children: [/* @__PURE__ */ M("span", {
|
|
842
848
|
className: `vdt-dot vdt-dot-${t === "connected" ? "ok" : t === "recovering" ? "warn" : "err"}`,
|
|
843
849
|
"aria-hidden": "true"
|
|
844
|
-
}), /* @__PURE__ */
|
|
850
|
+
}), /* @__PURE__ */ M("b", { children: e })]
|
|
845
851
|
});
|
|
846
852
|
}, rt = 260, it = "cubic-bezier(0.2, 0.8, 0.2, 1)", at = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, ot = (e, t) => {
|
|
847
853
|
let r = c(null), a = c(null), s = c(null), l = c(e), u = n((e) => {
|
|
@@ -875,119 +881,185 @@ var H = (e) => {
|
|
|
875
881
|
};
|
|
876
882
|
o.addEventListener("finish", c), o.addEventListener("cancel", c);
|
|
877
883
|
}, [e]), u;
|
|
878
|
-
}, st = ({ status: e, onOpen: t, buttonRef: n }) => {
|
|
879
|
-
let
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
ref:
|
|
884
|
+
}, st = ({ status: e, onOpen: t, buttonRef: n, style: r, dragging: i = !1, onPointerDown: a }) => {
|
|
885
|
+
let o = U().shell, s = O(), c = $e(), l = u(T, S, S), d = tt(), f = l.filter((e) => e.status === "pending").length, p = l.filter((e) => e.status === "error").length, m = d.filter((e) => e.level === "error" || e.level === "fatal").length, h = d.filter((e) => e.level === "warn").length, g = e !== null, _ = e?.kind ?? "idle", v = e === null ? "" : et(_) ? e.label.replace(/[…\.\s]+$/, "") : e.label, y = g ? `${_}:${v}` : "chips", b = ot(y, n);
|
|
886
|
+
return /* @__PURE__ */ N("button", {
|
|
887
|
+
ref: b,
|
|
882
888
|
type: "button",
|
|
883
889
|
className: "vdt-capsule",
|
|
884
|
-
"data-busy":
|
|
885
|
-
"data-kind":
|
|
890
|
+
"data-busy": g ? "true" : "false",
|
|
891
|
+
"data-kind": _,
|
|
892
|
+
"data-dragging": i ? "true" : void 0,
|
|
893
|
+
style: r,
|
|
886
894
|
onClick: t,
|
|
887
|
-
|
|
888
|
-
|
|
895
|
+
onPointerDown: a,
|
|
896
|
+
title: o.openTitle,
|
|
897
|
+
"aria-label": o.openLabel,
|
|
889
898
|
children: [
|
|
890
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ M("span", {
|
|
891
900
|
className: "vdt-capsule-halo vdt-capsule-aura",
|
|
892
901
|
"aria-hidden": "true"
|
|
893
902
|
}),
|
|
894
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ M("span", {
|
|
895
904
|
className: "vdt-capsule-halo",
|
|
896
905
|
"aria-hidden": "true"
|
|
897
906
|
}),
|
|
898
|
-
|
|
899
|
-
|
|
907
|
+
g ? /* @__PURE__ */ M(Ie, { className: "vdt-capsule-mark vdt-spinner" }) : /* @__PURE__ */ M(de, { className: "vdt-capsule-mark" }),
|
|
908
|
+
g ? /* @__PURE__ */ N("span", {
|
|
900
909
|
className: "vdt-capsule-status",
|
|
901
|
-
children: [
|
|
910
|
+
children: [v, et(_) ? /* @__PURE__ */ N("span", {
|
|
902
911
|
className: "vdt-dots",
|
|
903
912
|
"aria-hidden": "true",
|
|
904
913
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ M("span", {}),
|
|
915
|
+
/* @__PURE__ */ M("span", {}),
|
|
916
|
+
/* @__PURE__ */ M("span", {})
|
|
908
917
|
]
|
|
909
918
|
}) : null]
|
|
910
|
-
},
|
|
919
|
+
}, y) : /* @__PURE__ */ N("span", {
|
|
911
920
|
className: "vdt-capsule-chips",
|
|
912
921
|
children: [
|
|
913
|
-
|
|
914
|
-
/* @__PURE__ */
|
|
922
|
+
s.names.map((e) => /* @__PURE__ */ M(nt, { name: e }, e)),
|
|
923
|
+
/* @__PURE__ */ N("span", {
|
|
915
924
|
className: "vdt-chip",
|
|
916
925
|
"data-chip": "live",
|
|
917
926
|
children: [
|
|
918
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ M("b", { children: c }),
|
|
919
928
|
" ",
|
|
920
|
-
|
|
929
|
+
o.live
|
|
921
930
|
]
|
|
922
931
|
}),
|
|
923
|
-
|
|
932
|
+
f > 0 ? /* @__PURE__ */ N("span", {
|
|
924
933
|
className: "vdt-chip vdt-chip-info",
|
|
925
934
|
"data-chip": "pending",
|
|
926
935
|
children: [
|
|
927
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ M("span", {
|
|
928
937
|
className: "vdt-dot vdt-dot-info",
|
|
929
938
|
"aria-hidden": "true"
|
|
930
939
|
}),
|
|
931
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ M("b", { children: f }),
|
|
932
941
|
" ",
|
|
933
|
-
|
|
942
|
+
o.pending
|
|
934
943
|
]
|
|
935
944
|
}) : null,
|
|
936
|
-
|
|
945
|
+
p > 0 ? /* @__PURE__ */ N("span", {
|
|
937
946
|
className: "vdt-chip vdt-chip-err",
|
|
938
947
|
"data-chip": "failed",
|
|
939
948
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ M("span", {
|
|
941
950
|
className: "vdt-dot vdt-dot-err",
|
|
942
951
|
"aria-hidden": "true"
|
|
943
952
|
}),
|
|
944
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ M("b", { children: p }),
|
|
945
954
|
" ",
|
|
946
|
-
|
|
955
|
+
o.failed
|
|
947
956
|
]
|
|
948
957
|
}) : null,
|
|
949
|
-
|
|
958
|
+
m > 0 ? /* @__PURE__ */ N("span", {
|
|
950
959
|
className: "vdt-chip vdt-chip-err",
|
|
951
960
|
"data-chip": "errors",
|
|
952
961
|
children: [
|
|
953
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ M("b", { children: m }),
|
|
954
963
|
" ",
|
|
955
|
-
|
|
964
|
+
o.errorsWord(m)
|
|
956
965
|
]
|
|
957
966
|
}) : null,
|
|
958
|
-
|
|
967
|
+
m === 0 && h > 0 ? /* @__PURE__ */ N("span", {
|
|
959
968
|
className: "vdt-chip vdt-chip-warn",
|
|
960
969
|
"data-chip": "warnings",
|
|
961
970
|
children: [
|
|
962
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ M("b", { children: h }),
|
|
963
972
|
" ",
|
|
964
|
-
|
|
973
|
+
o.warningsWord(h)
|
|
965
974
|
]
|
|
966
975
|
}) : null
|
|
967
976
|
]
|
|
968
977
|
})
|
|
969
978
|
]
|
|
970
979
|
});
|
|
971
|
-
}, ct =
|
|
980
|
+
}, ct = {
|
|
981
|
+
x: .5,
|
|
982
|
+
y: 1
|
|
983
|
+
}, lt = [
|
|
984
|
+
{
|
|
985
|
+
x: 0,
|
|
986
|
+
y: 0
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
x: .5,
|
|
990
|
+
y: 0
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
x: 1,
|
|
994
|
+
y: 0
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
x: 0,
|
|
998
|
+
y: .5
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
x: 1,
|
|
1002
|
+
y: .5
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
x: 0,
|
|
1006
|
+
y: 1
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
x: .5,
|
|
1010
|
+
y: 1
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
x: 1,
|
|
1014
|
+
y: 1
|
|
1015
|
+
}
|
|
1016
|
+
], ut = (e) => Math.min(1, Math.max(0, e)), dt = (e, t) => ({
|
|
1017
|
+
x: Math.max(0, t.width - 36 - e.w),
|
|
1018
|
+
y: Math.max(0, t.height - 36 - e.h)
|
|
1019
|
+
}), ft = (e, t) => e.x === t.x && e.y === t.y, pt = (e, t, n) => {
|
|
1020
|
+
let r = dt(t, n), i = null, a = 48;
|
|
1021
|
+
for (let t of lt) {
|
|
1022
|
+
let n = Math.hypot((e.x - t.x) * r.x, (e.y - t.y) * r.y);
|
|
1023
|
+
n <= a && (i = t, a = n);
|
|
1024
|
+
}
|
|
1025
|
+
return i === null ? e : {
|
|
1026
|
+
x: r.x > 0 ? i.x : e.x,
|
|
1027
|
+
y: r.y > 0 ? i.y : e.y
|
|
1028
|
+
};
|
|
1029
|
+
}, mt = (e, t, n, r, i) => {
|
|
1030
|
+
let a = dt(t, n);
|
|
1031
|
+
return pt({
|
|
1032
|
+
x: a.x > 0 ? ut((e.x * a.x + r) / a.x) : e.x,
|
|
1033
|
+
y: a.y > 0 ? ut((e.y * a.y + i) / a.y) : e.y
|
|
1034
|
+
}, t, n);
|
|
1035
|
+
}, ht = (e) => typeof e == "number" && Number.isFinite(e), gt = (e) => {
|
|
1036
|
+
if (typeof e != "object" || !e) return ct;
|
|
1037
|
+
let t = e;
|
|
1038
|
+
return {
|
|
1039
|
+
x: ht(t.x) ? ut(t.x) : ct.x,
|
|
1040
|
+
y: ht(t.y) ? ut(t.y) : ct.y
|
|
1041
|
+
};
|
|
1042
|
+
}, _t = [
|
|
972
1043
|
"bottom",
|
|
973
1044
|
"top",
|
|
974
1045
|
"left",
|
|
975
1046
|
"right",
|
|
976
|
-
"window"
|
|
977
|
-
|
|
1047
|
+
"window",
|
|
1048
|
+
"external"
|
|
1049
|
+
], vt = [
|
|
978
1050
|
"bottom",
|
|
979
1051
|
"top",
|
|
980
1052
|
"left",
|
|
981
1053
|
"right"
|
|
982
|
-
],
|
|
1054
|
+
], yt = (e) => typeof e == "string" && _t.includes(e), bt = (e) => e !== "window" && e !== "external", xt = {
|
|
983
1055
|
bottom: 240,
|
|
984
1056
|
top: 240,
|
|
985
1057
|
left: 320,
|
|
986
1058
|
right: 320
|
|
987
|
-
},
|
|
1059
|
+
}, St = {
|
|
988
1060
|
w: 480,
|
|
989
1061
|
h: 320
|
|
990
|
-
},
|
|
1062
|
+
}, Ct = 64, wt = {
|
|
991
1063
|
dock: "bottom",
|
|
992
1064
|
sizes: {
|
|
993
1065
|
bottom: 400,
|
|
@@ -1001,99 +1073,101 @@ var H = (e) => {
|
|
|
1001
1073
|
w: 860,
|
|
1002
1074
|
h: 560
|
|
1003
1075
|
},
|
|
1004
|
-
push: !1
|
|
1005
|
-
|
|
1076
|
+
push: !1,
|
|
1077
|
+
capsule: ct
|
|
1078
|
+
}, Tt = "voltro:devtools:dock", Et = (e) => typeof e == "number" && Number.isFinite(e), Dt = (e, t) => {
|
|
1006
1079
|
let n = {
|
|
1007
|
-
...
|
|
1080
|
+
...wt,
|
|
1008
1081
|
dock: t
|
|
1009
1082
|
};
|
|
1010
1083
|
if (typeof e != "object" || !e) return n;
|
|
1011
|
-
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...
|
|
1012
|
-
for (let e of
|
|
1084
|
+
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...wt.sizes };
|
|
1085
|
+
for (let e of vt) {
|
|
1013
1086
|
let t = i[e];
|
|
1014
|
-
|
|
1087
|
+
Et(t) && t >= xt[e] && (a[e] = Math.round(t));
|
|
1015
1088
|
}
|
|
1016
1089
|
let o = typeof r.window == "object" && r.window !== null ? r.window : {}, s = {
|
|
1017
|
-
x:
|
|
1018
|
-
y:
|
|
1019
|
-
w:
|
|
1020
|
-
h:
|
|
1090
|
+
x: Et(o.x) ? Math.round(o.x) : n.window.x,
|
|
1091
|
+
y: Et(o.y) ? Math.round(o.y) : n.window.y,
|
|
1092
|
+
w: Et(o.w) && o.w >= St.w ? Math.round(o.w) : n.window.w,
|
|
1093
|
+
h: Et(o.h) && o.h >= St.h ? Math.round(o.h) : n.window.h
|
|
1021
1094
|
};
|
|
1022
1095
|
return {
|
|
1023
|
-
dock:
|
|
1096
|
+
dock: yt(r.dock) ? r.dock : t,
|
|
1024
1097
|
sizes: a,
|
|
1025
1098
|
window: s,
|
|
1026
|
-
push: r.push === !0
|
|
1099
|
+
push: r.push === !0,
|
|
1100
|
+
capsule: gt(r.capsule)
|
|
1027
1101
|
};
|
|
1028
|
-
},
|
|
1102
|
+
}, Ot = (e) => {
|
|
1029
1103
|
if (typeof window > "u") return {
|
|
1030
|
-
...
|
|
1104
|
+
...wt,
|
|
1031
1105
|
dock: e
|
|
1032
1106
|
};
|
|
1033
1107
|
try {
|
|
1034
|
-
let t = window.localStorage.getItem(
|
|
1108
|
+
let t = window.localStorage.getItem(Tt);
|
|
1035
1109
|
return t === null ? {
|
|
1036
|
-
...
|
|
1110
|
+
...wt,
|
|
1037
1111
|
dock: e
|
|
1038
|
-
} :
|
|
1112
|
+
} : Dt(JSON.parse(t), e);
|
|
1039
1113
|
} catch {
|
|
1040
1114
|
return {
|
|
1041
|
-
...
|
|
1115
|
+
...wt,
|
|
1042
1116
|
dock: e
|
|
1043
1117
|
};
|
|
1044
1118
|
}
|
|
1045
|
-
},
|
|
1119
|
+
}, kt = (e) => {
|
|
1046
1120
|
if (!(typeof window > "u")) try {
|
|
1047
|
-
window.localStorage.setItem(
|
|
1121
|
+
window.localStorage.setItem(Tt, JSON.stringify(e));
|
|
1048
1122
|
} catch {}
|
|
1049
|
-
},
|
|
1123
|
+
}, At = () => typeof window > "u" ? {
|
|
1050
1124
|
width: 1440,
|
|
1051
1125
|
height: 900
|
|
1052
1126
|
} : {
|
|
1053
1127
|
width: window.innerWidth,
|
|
1054
1128
|
height: window.innerHeight
|
|
1055
|
-
},
|
|
1056
|
-
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(
|
|
1057
|
-
return Math.round(Math.min(i, Math.max(
|
|
1058
|
-
},
|
|
1059
|
-
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(
|
|
1129
|
+
}, jt = (e, t, n = At()) => {
|
|
1130
|
+
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(xt[e], r - Ct);
|
|
1131
|
+
return Math.round(Math.min(i, Math.max(xt[e], t)));
|
|
1132
|
+
}, Mt = (e, t = At()) => {
|
|
1133
|
+
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(St.w, n), e.w), n)), a = Math.round(Math.min(Math.max(Math.min(St.h, r), e.h), r));
|
|
1060
1134
|
return {
|
|
1061
1135
|
x: Math.round(Math.min(Math.max(8, e.x), Math.max(8, t.width - i - 8))),
|
|
1062
1136
|
y: Math.round(Math.min(Math.max(8, e.y), Math.max(8, t.height - a - 8))),
|
|
1063
1137
|
w: i,
|
|
1064
1138
|
h: a
|
|
1065
1139
|
};
|
|
1066
|
-
},
|
|
1140
|
+
}, Nt = (e, t) => {
|
|
1067
1141
|
let n = { ...e.sizes }, r = !1;
|
|
1068
|
-
for (let e of
|
|
1069
|
-
let i =
|
|
1142
|
+
for (let e of vt) {
|
|
1143
|
+
let i = jt(e, n[e], t);
|
|
1070
1144
|
i !== n[e] && (n[e] = i, r = !0);
|
|
1071
1145
|
}
|
|
1072
|
-
let i =
|
|
1146
|
+
let i = Mt(e.window, t), a = i.x !== e.window.x || i.y !== e.window.y || i.w !== e.window.w || i.h !== e.window.h;
|
|
1073
1147
|
return !r && !a ? e : {
|
|
1074
1148
|
...e,
|
|
1075
1149
|
sizes: n,
|
|
1076
1150
|
window: i
|
|
1077
1151
|
};
|
|
1078
|
-
},
|
|
1152
|
+
}, Pt = (e) => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), Ft = {
|
|
1079
1153
|
width: 0,
|
|
1080
1154
|
height: 0
|
|
1081
|
-
},
|
|
1155
|
+
}, It = () => {
|
|
1082
1156
|
let e = window.innerWidth, t = window.innerHeight;
|
|
1083
|
-
return (
|
|
1157
|
+
return (Ft.width !== e || Ft.height !== t) && (Ft = {
|
|
1084
1158
|
width: e,
|
|
1085
1159
|
height: t
|
|
1086
|
-
}),
|
|
1087
|
-
},
|
|
1160
|
+
}), Ft;
|
|
1161
|
+
}, Lt = {
|
|
1088
1162
|
width: 1440,
|
|
1089
1163
|
height: 900
|
|
1090
|
-
},
|
|
1091
|
-
let [t, r] = l(() =>
|
|
1164
|
+
}, Rt = () => Lt, zt = () => u(Pt, It, Rt), Bt = (e = "bottom") => {
|
|
1165
|
+
let [t, r] = l(() => Ot(e));
|
|
1092
1166
|
i(() => {
|
|
1093
1167
|
if (typeof window > "u") return;
|
|
1094
1168
|
let t = (t) => {
|
|
1095
|
-
if (t.key ===
|
|
1096
|
-
r(
|
|
1169
|
+
if (t.key === Tt && t.newValue !== null) try {
|
|
1170
|
+
r(Dt(JSON.parse(t.newValue), e));
|
|
1097
1171
|
} catch {}
|
|
1098
1172
|
};
|
|
1099
1173
|
return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
|
|
@@ -1101,7 +1175,7 @@ var H = (e) => {
|
|
|
1101
1175
|
let a = n((e) => {
|
|
1102
1176
|
r((t) => {
|
|
1103
1177
|
let n = e(t);
|
|
1104
|
-
return
|
|
1178
|
+
return kt(n), n;
|
|
1105
1179
|
});
|
|
1106
1180
|
}, []);
|
|
1107
1181
|
return [t, {
|
|
@@ -1110,7 +1184,7 @@ var H = (e) => {
|
|
|
1110
1184
|
dock: e
|
|
1111
1185
|
}), [a]),
|
|
1112
1186
|
setEdgeSize: n((e, t) => a((n) => {
|
|
1113
|
-
let r =
|
|
1187
|
+
let r = jt(e, t);
|
|
1114
1188
|
return n.sizes[e] === r ? n : {
|
|
1115
1189
|
...n,
|
|
1116
1190
|
sizes: {
|
|
@@ -1121,14 +1195,18 @@ var H = (e) => {
|
|
|
1121
1195
|
}), [a]),
|
|
1122
1196
|
setWindowRect: n((e) => a((t) => ({
|
|
1123
1197
|
...t,
|
|
1124
|
-
window:
|
|
1198
|
+
window: Mt(e)
|
|
1125
1199
|
})), [a]),
|
|
1126
1200
|
setPush: n((e) => a((t) => t.push === e ? t : {
|
|
1127
1201
|
...t,
|
|
1128
1202
|
push: e
|
|
1203
|
+
}), [a]),
|
|
1204
|
+
setCapsule: n((e) => a((t) => ft(t.capsule, e) ? t : {
|
|
1205
|
+
...t,
|
|
1206
|
+
capsule: e
|
|
1129
1207
|
}), [a])
|
|
1130
1208
|
}];
|
|
1131
|
-
},
|
|
1209
|
+
}, Vt = (e) => {
|
|
1132
1210
|
switch (e) {
|
|
1133
1211
|
case "ArrowDown": return "bottom";
|
|
1134
1212
|
case "ArrowUp": return "top";
|
|
@@ -1136,35 +1214,37 @@ var H = (e) => {
|
|
|
1136
1214
|
case "ArrowRight": return "right";
|
|
1137
1215
|
default: return null;
|
|
1138
1216
|
}
|
|
1139
|
-
},
|
|
1140
|
-
bottom:
|
|
1141
|
-
top:
|
|
1142
|
-
left:
|
|
1143
|
-
right:
|
|
1144
|
-
window: Pe
|
|
1145
|
-
|
|
1146
|
-
|
|
1217
|
+
}, Ht = {
|
|
1218
|
+
bottom: ke,
|
|
1219
|
+
top: Ae,
|
|
1220
|
+
left: je,
|
|
1221
|
+
right: Me,
|
|
1222
|
+
window: Pe,
|
|
1223
|
+
external: Ne
|
|
1224
|
+
}, Ut = ({ dock: e, push: t, onDock: n, onPush: r }) => {
|
|
1225
|
+
let a = U().shell, [o, s] = l(!1), u = c(null), d = {
|
|
1147
1226
|
bottom: a.dockBottom,
|
|
1148
1227
|
top: a.dockTop,
|
|
1149
1228
|
left: a.dockLeft,
|
|
1150
1229
|
right: a.dockRight,
|
|
1151
|
-
window: a.dockWindow
|
|
1230
|
+
window: a.dockWindow,
|
|
1231
|
+
external: a.dockExternal
|
|
1152
1232
|
};
|
|
1153
1233
|
i(() => {
|
|
1154
1234
|
if (!o) return;
|
|
1155
|
-
let e = (e) => {
|
|
1235
|
+
let e = u.current?.ownerDocument ?? document, t = (e) => {
|
|
1156
1236
|
u.current !== null && !e.composedPath().includes(u.current) && s(!1);
|
|
1157
|
-
},
|
|
1237
|
+
}, n = (e) => {
|
|
1158
1238
|
e.key === "Escape" && s(!1);
|
|
1159
1239
|
};
|
|
1160
|
-
return
|
|
1161
|
-
|
|
1240
|
+
return e.addEventListener("mousedown", t), e.addEventListener("keydown", n), () => {
|
|
1241
|
+
e.removeEventListener("mousedown", t), e.removeEventListener("keydown", n);
|
|
1162
1242
|
};
|
|
1163
1243
|
}, [o]);
|
|
1164
1244
|
let f = c([]);
|
|
1165
1245
|
i(() => {
|
|
1166
1246
|
if (!o) return;
|
|
1167
|
-
let t =
|
|
1247
|
+
let t = _t.indexOf(e);
|
|
1168
1248
|
f.current[t === -1 ? 0 : t]?.focus();
|
|
1169
1249
|
}, [o, e]);
|
|
1170
1250
|
let p = (e) => {
|
|
@@ -1189,11 +1269,11 @@ var H = (e) => {
|
|
|
1189
1269
|
default: return;
|
|
1190
1270
|
}
|
|
1191
1271
|
e.preventDefault(), t[r]?.focus();
|
|
1192
|
-
}, m =
|
|
1193
|
-
return /* @__PURE__ */
|
|
1272
|
+
}, m = Ht[e];
|
|
1273
|
+
return /* @__PURE__ */ N("div", {
|
|
1194
1274
|
ref: u,
|
|
1195
1275
|
className: "vdt-dockmenu",
|
|
1196
|
-
children: [/* @__PURE__ */
|
|
1276
|
+
children: [/* @__PURE__ */ M("button", {
|
|
1197
1277
|
type: "button",
|
|
1198
1278
|
className: `vdt-iconbtn${o ? " vdt-iconbtn-on" : ""}`,
|
|
1199
1279
|
title: a.dockMenuTitle,
|
|
@@ -1201,17 +1281,17 @@ var H = (e) => {
|
|
|
1201
1281
|
"aria-haspopup": "menu",
|
|
1202
1282
|
"aria-expanded": o,
|
|
1203
1283
|
onClick: () => s((e) => !e),
|
|
1204
|
-
children: /* @__PURE__ */
|
|
1205
|
-
}), o ? /* @__PURE__ */
|
|
1284
|
+
children: /* @__PURE__ */ M(m, { className: "vdt:w-4 vdt:h-4" })
|
|
1285
|
+
}), o ? /* @__PURE__ */ N("div", {
|
|
1206
1286
|
role: "menu",
|
|
1207
1287
|
"aria-label": a.dockMenuTitle,
|
|
1208
1288
|
className: "vdt-dockmenu-pop",
|
|
1209
|
-
children: [/* @__PURE__ */
|
|
1289
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1210
1290
|
className: "vdt-dockmenu-row",
|
|
1211
1291
|
onKeyDown: p,
|
|
1212
|
-
children:
|
|
1213
|
-
let i =
|
|
1214
|
-
return /* @__PURE__ */
|
|
1292
|
+
children: _t.map((t, r) => {
|
|
1293
|
+
let i = Ht[t], a = t === e;
|
|
1294
|
+
return /* @__PURE__ */ M("button", {
|
|
1215
1295
|
ref: (e) => {
|
|
1216
1296
|
f.current[r] = e;
|
|
1217
1297
|
},
|
|
@@ -1224,58 +1304,58 @@ var H = (e) => {
|
|
|
1224
1304
|
onClick: () => {
|
|
1225
1305
|
n(t), s(!1);
|
|
1226
1306
|
},
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1307
|
+
children: /* @__PURE__ */ M(i, { className: "vdt:w-4 vdt:h-4" })
|
|
1228
1308
|
}, t);
|
|
1229
1309
|
})
|
|
1230
|
-
}), /* @__PURE__ */
|
|
1231
|
-
className: `vdt-dockmenu-push${e
|
|
1232
|
-
children: [/* @__PURE__ */
|
|
1310
|
+
}), /* @__PURE__ */ N("label", {
|
|
1311
|
+
className: `vdt-dockmenu-push${bt(e) ? "" : " vdt-dockmenu-push-off"}`,
|
|
1312
|
+
children: [/* @__PURE__ */ M("input", {
|
|
1233
1313
|
type: "checkbox",
|
|
1234
1314
|
role: "menuitemcheckbox",
|
|
1235
1315
|
"aria-checked": t,
|
|
1236
1316
|
checked: t,
|
|
1237
|
-
disabled: e
|
|
1317
|
+
disabled: !bt(e),
|
|
1238
1318
|
onChange: (e) => r(e.target.checked)
|
|
1239
|
-
}), /* @__PURE__ */
|
|
1319
|
+
}), /* @__PURE__ */ N("span", { children: [/* @__PURE__ */ M("span", {
|
|
1240
1320
|
className: "vdt-dockmenu-push-label",
|
|
1241
1321
|
children: a.pushPage
|
|
1242
|
-
}), /* @__PURE__ */
|
|
1322
|
+
}), /* @__PURE__ */ M("span", {
|
|
1243
1323
|
className: "vdt-dockmenu-push-hint",
|
|
1244
1324
|
children: a.pushPageHint
|
|
1245
1325
|
})] })]
|
|
1246
1326
|
})]
|
|
1247
1327
|
}) : null]
|
|
1248
1328
|
});
|
|
1249
|
-
},
|
|
1250
|
-
|
|
1251
|
-
for (let e of
|
|
1252
|
-
},
|
|
1329
|
+
}, Wt = 2e3, Gt = 6e4, X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), Kt = /* @__PURE__ */ new Set(), qt = [], Jt = () => {
|
|
1330
|
+
qt = Array.from(X.values());
|
|
1331
|
+
for (let e of Kt) e();
|
|
1332
|
+
}, Yt = (e) => {
|
|
1253
1333
|
let t = e.indexOf("/_voltro/inspect");
|
|
1254
1334
|
return t === -1 ? e : e.slice(0, t);
|
|
1255
|
-
},
|
|
1256
|
-
if (
|
|
1257
|
-
let n =
|
|
1335
|
+
}, Xt = (e) => X.get(e), Zt = (e, t = Date.now()) => {
|
|
1336
|
+
if (X.has(e)) return !1;
|
|
1337
|
+
let n = Z.get(e);
|
|
1258
1338
|
return n === void 0 || t >= n.retryAt;
|
|
1259
|
-
},
|
|
1260
|
-
|
|
1261
|
-
},
|
|
1262
|
-
let r = (
|
|
1339
|
+
}, Qt = (e) => {
|
|
1340
|
+
Z.delete(e.baseUrl), X.set(e.baseUrl, e), Jt();
|
|
1341
|
+
}, $t = (e, t, n = Date.now()) => {
|
|
1342
|
+
let r = (Z.get(e)?.count ?? 0) + 1;
|
|
1263
1343
|
if (t && r >= 3) {
|
|
1264
|
-
|
|
1344
|
+
Qt({
|
|
1265
1345
|
baseUrl: e,
|
|
1266
1346
|
status: 0
|
|
1267
1347
|
});
|
|
1268
1348
|
return;
|
|
1269
1349
|
}
|
|
1270
|
-
|
|
1350
|
+
Z.set(e, {
|
|
1271
1351
|
count: r,
|
|
1272
|
-
retryAt: n + Math.min(
|
|
1352
|
+
retryAt: n + Math.min(Gt, Wt * 2 ** r)
|
|
1273
1353
|
});
|
|
1274
|
-
},
|
|
1275
|
-
|
|
1276
|
-
},
|
|
1277
|
-
|
|
1278
|
-
},
|
|
1354
|
+
}, en = (e) => {
|
|
1355
|
+
Z.delete(e);
|
|
1356
|
+
}, tn = () => {
|
|
1357
|
+
Z.clear(), X.size !== 0 && (X.clear(), Jt());
|
|
1358
|
+
}, nn = (e) => e === 401 || e === 403, rn = async (e, t) => {
|
|
1279
1359
|
let n = await t.json().catch(() => null), r = (e) => {
|
|
1280
1360
|
let t = typeof n == "object" && n ? n[e] : void 0;
|
|
1281
1361
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
@@ -1289,16 +1369,16 @@ var H = (e) => {
|
|
|
1289
1369
|
...i ? { locked: !0 } : {},
|
|
1290
1370
|
...c === void 0 ? {} : { login: c }
|
|
1291
1371
|
};
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
}),
|
|
1372
|
+
}, an = (e) => (Kt.add(e), () => {
|
|
1373
|
+
Kt.delete(e);
|
|
1374
|
+
}), on = () => u(an, () => qt, () => qt), sn = (e) => {
|
|
1295
1375
|
if (e.login !== void 0) try {
|
|
1296
1376
|
return new URL(e.login, new URL(e.baseUrl, window.location.href)).href;
|
|
1297
1377
|
} catch {
|
|
1298
1378
|
return;
|
|
1299
1379
|
}
|
|
1300
|
-
},
|
|
1301
|
-
let t =
|
|
1380
|
+
}, cn = ({ url: e }) => {
|
|
1381
|
+
let t = U().inspect, [n, r] = l(""), [i, a] = l(null), o = async (t) => {
|
|
1302
1382
|
t.preventDefault(), a(null);
|
|
1303
1383
|
try {
|
|
1304
1384
|
let t = await fetch(e, {
|
|
@@ -1308,7 +1388,7 @@ var H = (e) => {
|
|
|
1308
1388
|
body: JSON.stringify({ token: n })
|
|
1309
1389
|
});
|
|
1310
1390
|
if (t.ok) {
|
|
1311
|
-
r(""),
|
|
1391
|
+
r(""), tn();
|
|
1312
1392
|
return;
|
|
1313
1393
|
}
|
|
1314
1394
|
let i = await t.json().catch(() => null), o = typeof i == "object" && i && typeof i.reason == "string" ? i.reason : `HTTP ${t.status}`;
|
|
@@ -1317,53 +1397,53 @@ var H = (e) => {
|
|
|
1317
1397
|
a(e instanceof Error ? e.message : String(e));
|
|
1318
1398
|
}
|
|
1319
1399
|
};
|
|
1320
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ N("form", {
|
|
1321
1401
|
className: "vdt-refusal-signin",
|
|
1322
1402
|
onSubmit: (e) => {
|
|
1323
1403
|
o(e);
|
|
1324
1404
|
},
|
|
1325
1405
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ N("label", { children: [/* @__PURE__ */ M("span", { children: t.tokenLabel }), /* @__PURE__ */ M("input", {
|
|
1327
1407
|
type: "password",
|
|
1328
1408
|
autoComplete: "off",
|
|
1329
1409
|
value: n,
|
|
1330
1410
|
onChange: (e) => r(e.target.value)
|
|
1331
1411
|
})] }),
|
|
1332
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ M("button", {
|
|
1333
1413
|
type: "submit",
|
|
1334
1414
|
disabled: n === "",
|
|
1335
1415
|
children: t.signIn
|
|
1336
1416
|
}),
|
|
1337
|
-
i === null ? null : /* @__PURE__ */
|
|
1417
|
+
i === null ? null : /* @__PURE__ */ M("span", {
|
|
1338
1418
|
className: "vdt-refusal-failed",
|
|
1339
1419
|
children: t.signInFailed(i)
|
|
1340
1420
|
})
|
|
1341
1421
|
]
|
|
1342
1422
|
});
|
|
1343
|
-
},
|
|
1344
|
-
let e =
|
|
1423
|
+
}, ln = () => {
|
|
1424
|
+
let e = on(), t = O(), n = U().inspect;
|
|
1345
1425
|
if (e.length === 0) return null;
|
|
1346
1426
|
let r = (e) => t.names.find((n) => t.get(n).inspectBaseUrl === e) ?? e;
|
|
1347
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ M("div", {
|
|
1348
1428
|
className: "vdt-refusals",
|
|
1349
1429
|
role: "status",
|
|
1350
1430
|
children: e.map((e) => {
|
|
1351
|
-
let t = e.locked === !0 ?
|
|
1352
|
-
return /* @__PURE__ */
|
|
1431
|
+
let t = e.locked === !0 ? sn(e) : void 0;
|
|
1432
|
+
return /* @__PURE__ */ N("div", {
|
|
1353
1433
|
className: "vdt-refusal",
|
|
1354
1434
|
children: [
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
e.status === 0 ? /* @__PURE__ */
|
|
1357
|
-
e.fix === void 0 ? null : /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ M("strong", { children: e.status === 0 ? n.unreachableTitle(r(e.baseUrl)) : n.refusedTitle(r(e.baseUrl), e.status) }),
|
|
1436
|
+
e.status === 0 ? /* @__PURE__ */ M("p", { children: n.unreachableHint }) : /* @__PURE__ */ M("p", { children: [e.error, e.reason].filter((e) => e !== void 0).join(" — ") }),
|
|
1437
|
+
e.fix === void 0 ? null : /* @__PURE__ */ N("p", { children: [
|
|
1438
|
+
/* @__PURE__ */ M("span", {
|
|
1359
1439
|
className: "vdt-refusal-label",
|
|
1360
1440
|
children: n.fixLabel
|
|
1361
1441
|
}),
|
|
1362
1442
|
" ",
|
|
1363
1443
|
e.fix
|
|
1364
1444
|
] }),
|
|
1365
|
-
t === void 0 ? null : /* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1445
|
+
t === void 0 ? null : /* @__PURE__ */ M(cn, { url: t }),
|
|
1446
|
+
/* @__PURE__ */ M("p", {
|
|
1367
1447
|
className: "vdt-refusal-paused",
|
|
1368
1448
|
children: n.paused
|
|
1369
1449
|
})
|
|
@@ -1371,20 +1451,20 @@ var H = (e) => {
|
|
|
1371
1451
|
}, e.baseUrl);
|
|
1372
1452
|
})
|
|
1373
1453
|
});
|
|
1374
|
-
},
|
|
1375
|
-
function
|
|
1376
|
-
return /* @__PURE__ */
|
|
1454
|
+
}, un = t(null);
|
|
1455
|
+
function dn(e) {
|
|
1456
|
+
return /* @__PURE__ */ M(un.Provider, {
|
|
1377
1457
|
value: e.token,
|
|
1378
1458
|
children: e.children
|
|
1379
1459
|
});
|
|
1380
1460
|
}
|
|
1381
|
-
var
|
|
1461
|
+
var Q = () => r(un), fn = (e, t) => {
|
|
1382
1462
|
let n = { ...t ?? {} };
|
|
1383
1463
|
return e !== null && e !== "" && (n.authorization = `Bearer ${e}`), n;
|
|
1384
|
-
},
|
|
1464
|
+
}, pn = (e) => e !== void 0 && e !== "" ? e : null, mn = (e) => typeof e == "object" && !!e && "data" in e, hn = (e) => mn(e) ? e.data : null, gn = async (e, t, n) => {
|
|
1385
1465
|
let r = await fetch(e, {
|
|
1386
1466
|
method: "POST",
|
|
1387
|
-
headers:
|
|
1467
|
+
headers: fn(t, {
|
|
1388
1468
|
accept: "application/json",
|
|
1389
1469
|
"content-type": "application/json"
|
|
1390
1470
|
}),
|
|
@@ -1394,32 +1474,39 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1394
1474
|
let e = typeof i == "object" && i ? i : void 0, t = typeof e?.message == "string" ? e.message : typeof e?.error == "string" ? e.error : `HTTP ${r.status}`;
|
|
1395
1475
|
throw Error(t);
|
|
1396
1476
|
}
|
|
1397
|
-
let a =
|
|
1477
|
+
let a = hn(i);
|
|
1398
1478
|
if (a === null) throw Error("the api answered without an observation");
|
|
1399
1479
|
return a;
|
|
1400
|
-
},
|
|
1401
|
-
let n =
|
|
1402
|
-
if (
|
|
1480
|
+
}, _n = (e, t) => {
|
|
1481
|
+
let n = `${e}\u0000${t ?? ""}`, r = vn.get(n);
|
|
1482
|
+
if (r !== void 0) return r;
|
|
1483
|
+
let i = yn(e, t).finally(() => {
|
|
1484
|
+
vn.delete(n);
|
|
1485
|
+
});
|
|
1486
|
+
return vn.set(n, i), i;
|
|
1487
|
+
}, vn = /* @__PURE__ */ new Map(), yn = async (e, t) => {
|
|
1488
|
+
let n = Yt(e);
|
|
1489
|
+
if (!Zt(n)) return null;
|
|
1403
1490
|
let r;
|
|
1404
1491
|
try {
|
|
1405
|
-
r = await fetch(e, { headers:
|
|
1492
|
+
r = await fetch(e, { headers: fn(t, { accept: "application/json" }) });
|
|
1406
1493
|
} catch {
|
|
1407
|
-
return
|
|
1494
|
+
return $t(n, !0), null;
|
|
1408
1495
|
}
|
|
1409
|
-
if (
|
|
1410
|
-
if (!r.ok) return
|
|
1411
|
-
|
|
1496
|
+
if (nn(r.status)) return Qt(await rn(n, r)), null;
|
|
1497
|
+
if (!r.ok) return $t(n, !1), null;
|
|
1498
|
+
en(n);
|
|
1412
1499
|
try {
|
|
1413
|
-
return
|
|
1500
|
+
return hn(await r.json());
|
|
1414
1501
|
} catch {
|
|
1415
1502
|
return null;
|
|
1416
1503
|
}
|
|
1417
|
-
},
|
|
1504
|
+
}, bn = (e) => typeof document > "u" ? () => {} : (document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e)), xn = () => typeof document > "u" || !document.hidden, Sn = () => !0, $ = () => u(bn, xn, Sn), Cn = 5e3, wn = async (e, t) => {
|
|
1418
1505
|
if (e === "") return null;
|
|
1419
|
-
let n = await
|
|
1506
|
+
let n = await _n(`${e}/_voltro/inspect/subscriptions`, t);
|
|
1420
1507
|
return n !== null && Array.isArray(n.subscriptions) ? n : null;
|
|
1421
|
-
},
|
|
1422
|
-
let t =
|
|
1508
|
+
}, Tn = (e) => {
|
|
1509
|
+
let t = O(), n = $(), r = Q(), a = t.names, o = e && n, [s, c] = l(() => a.map((e) => ({
|
|
1423
1510
|
name: e,
|
|
1424
1511
|
response: null,
|
|
1425
1512
|
live: !1
|
|
@@ -1431,46 +1518,46 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1431
1518
|
...e,
|
|
1432
1519
|
...n
|
|
1433
1520
|
} : e));
|
|
1434
|
-
}, i = a.map((
|
|
1435
|
-
let
|
|
1436
|
-
if (
|
|
1437
|
-
let
|
|
1438
|
-
|
|
1439
|
-
},
|
|
1440
|
-
if (
|
|
1441
|
-
let
|
|
1442
|
-
let
|
|
1443
|
-
|
|
1444
|
-
response:
|
|
1521
|
+
}, i = a.map((i) => {
|
|
1522
|
+
let a = t.get(i).inspectBaseUrl;
|
|
1523
|
+
if (a === "") return { teardown: () => {} };
|
|
1524
|
+
let o = null, s = null, c, l = () => {
|
|
1525
|
+
s !== null && clearInterval(s), s = null;
|
|
1526
|
+
}, u = () => Xt(a) !== void 0, d = () => {
|
|
1527
|
+
if (s !== null || u()) return;
|
|
1528
|
+
let e = async () => {
|
|
1529
|
+
let e = await wn(a, r);
|
|
1530
|
+
e !== null && n(i, {
|
|
1531
|
+
response: e,
|
|
1445
1532
|
live: !1
|
|
1446
|
-
}),
|
|
1533
|
+
}), u() && (l(), o?.close());
|
|
1447
1534
|
};
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
},
|
|
1535
|
+
e(), s = setInterval(() => {
|
|
1536
|
+
e();
|
|
1537
|
+
}, Cn);
|
|
1451
1538
|
};
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
}), c
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1539
|
+
return wn(a, r).then((e) => {
|
|
1540
|
+
e !== null && n(i, { response: e }), u() && (l(), o?.close());
|
|
1541
|
+
}), c = setTimeout(() => {
|
|
1542
|
+
if (!(u() || e)) try {
|
|
1543
|
+
o = new EventSource(`${a}/_voltro/inspect/stream`), o.addEventListener("subscriptions", (e) => {
|
|
1544
|
+
try {
|
|
1545
|
+
let t = JSON.parse(e.data).payload;
|
|
1546
|
+
t && typeof t == "object" && n(i, {
|
|
1547
|
+
response: t,
|
|
1548
|
+
live: !0
|
|
1549
|
+
});
|
|
1550
|
+
} catch {}
|
|
1551
|
+
}), o.addEventListener("open", () => {
|
|
1552
|
+
n(i, { live: !0 }), l();
|
|
1553
|
+
}), o.addEventListener("error", () => {
|
|
1554
|
+
n(i, { live: !1 }), d();
|
|
1555
|
+
});
|
|
1556
|
+
} catch {
|
|
1557
|
+
d();
|
|
1558
|
+
}
|
|
1559
|
+
}, 0), { teardown: () => {
|
|
1560
|
+
clearTimeout(c), o?.close(), l();
|
|
1474
1561
|
} };
|
|
1475
1562
|
});
|
|
1476
1563
|
return () => {
|
|
@@ -1483,139 +1570,139 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1483
1570
|
a,
|
|
1484
1571
|
r
|
|
1485
1572
|
]), s;
|
|
1486
|
-
},
|
|
1573
|
+
}, En = (e) => {
|
|
1487
1574
|
if (typeof e != "object" || !e) return !1;
|
|
1488
1575
|
let t = e;
|
|
1489
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1490
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1576
|
+
if (Array.isArray(t.and)) return t.and.some(En);
|
|
1577
|
+
if (Array.isArray(t.or)) return t.or.some(En);
|
|
1491
1578
|
let n = t.op;
|
|
1492
1579
|
return n === "gt" || n === "gte" || n === "lt" || n === "lte";
|
|
1493
|
-
},
|
|
1580
|
+
}, Dn = (e) => {
|
|
1494
1581
|
if (typeof e != "object" || !e) return !1;
|
|
1495
1582
|
let t = e;
|
|
1496
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1497
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1583
|
+
if (Array.isArray(t.and)) return t.and.some(Dn);
|
|
1584
|
+
if (Array.isArray(t.or)) return t.or.some(Dn);
|
|
1498
1585
|
let n = t.op;
|
|
1499
1586
|
return n === "eq" || n === "in";
|
|
1500
|
-
},
|
|
1587
|
+
}, On = (e) => e.usingIndex !== void 0 && e.usingIndex.fields.every((t) => e.conjunctiveColumns.includes(t)) ? "tuple" : Dn(e.predicate) ? "column" : En(e.predicate) ? "range" : "unindexed", kn = (e) => e === "tuple" ? "success" : e === "column" ? "info" : e === "range" ? "neutral" : "warning", An = (e) => e === "tuple" ? "tuple" : e === "column" ? "column" : e === "range" ? "range" : "UNINDEXED", jn = (e) => e == null ? "null" : typeof e == "string" ? `'${e}'` : Array.isArray(e) ? `[${e.map(jn).join(", ")}]` : String(e), Mn = (e) => e.op === "isNull" ? `${e.column} IS NULL` : e.op === "isNotNull" ? `${e.column} IS NOT NULL` : `${e.column} ${e.op} ${jn(e.value)}`, Nn = (e, t = 0) => {
|
|
1501
1588
|
if (typeof e != "object" || !e) return String(e);
|
|
1502
1589
|
let n = e;
|
|
1503
|
-
if (Array.isArray(n.and)) return n.and.map((e) =>
|
|
1590
|
+
if (Array.isArray(n.and)) return n.and.map((e) => Nn(e, t + 1)).join(" AND ");
|
|
1504
1591
|
if (Array.isArray(n.or)) {
|
|
1505
|
-
let e = n.or.map((e) =>
|
|
1592
|
+
let e = n.or.map((e) => Nn(e, t + 1)).join(" OR ");
|
|
1506
1593
|
return t > 0 ? `(${e})` : e;
|
|
1507
1594
|
}
|
|
1508
|
-
return typeof n.column == "string" && typeof n.op == "string" ?
|
|
1509
|
-
},
|
|
1510
|
-
let e =
|
|
1511
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1595
|
+
return typeof n.column == "string" && typeof n.op == "string" ? Mn(n) : JSON.stringify(e);
|
|
1596
|
+
}, Pn = () => {
|
|
1597
|
+
let e = Tn(!0), t = U().indexes, n = e.filter((e) => e.response !== null).length;
|
|
1598
|
+
return e.length === 0 ? /* @__PURE__ */ M(Y, { children: t.noApis }) : n === 0 ? /* @__PURE__ */ N(Y, { children: [t.unreachableTitle, /* @__PURE__ */ M("div", {
|
|
1512
1599
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
1513
1600
|
children: t.unreachableHint
|
|
1514
|
-
})] }) : /* @__PURE__ */
|
|
1601
|
+
})] }) : /* @__PURE__ */ M("div", {
|
|
1515
1602
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
1516
|
-
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */
|
|
1517
|
-
Icon:
|
|
1603
|
+
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
1604
|
+
Icon: me,
|
|
1518
1605
|
children: e
|
|
1519
|
-
}), /* @__PURE__ */
|
|
1606
|
+
}), /* @__PURE__ */ M(We, {
|
|
1520
1607
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1521
1608
|
children: t.offline
|
|
1522
|
-
})] }, e) : /* @__PURE__ */
|
|
1609
|
+
})] }, e) : /* @__PURE__ */ M(Fn, {
|
|
1523
1610
|
apiName: e,
|
|
1524
1611
|
response: n,
|
|
1525
1612
|
live: r
|
|
1526
1613
|
}, e))
|
|
1527
1614
|
});
|
|
1528
|
-
},
|
|
1529
|
-
let r =
|
|
1530
|
-
return /* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
Icon:
|
|
1533
|
-
right: /* @__PURE__ */
|
|
1615
|
+
}, Fn = ({ apiName: e, response: t, live: n }) => {
|
|
1616
|
+
let r = U().indexes, i = [...t.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
|
|
1617
|
+
return /* @__PURE__ */ N(K, { children: [
|
|
1618
|
+
/* @__PURE__ */ M(q, {
|
|
1619
|
+
Icon: me,
|
|
1620
|
+
right: /* @__PURE__ */ N("div", {
|
|
1534
1621
|
className: "vdt:flex vdt:items-center vdt:gap-1",
|
|
1535
|
-
children: [/* @__PURE__ */
|
|
1622
|
+
children: [/* @__PURE__ */ M(G, {
|
|
1536
1623
|
tone: "info",
|
|
1537
1624
|
children: r.subsBadge(t.subscriptions.length)
|
|
1538
|
-
}), /* @__PURE__ */
|
|
1625
|
+
}), /* @__PURE__ */ M(G, {
|
|
1539
1626
|
tone: n ? "success" : "neutral",
|
|
1540
1627
|
children: n ? r.live : r.poll
|
|
1541
1628
|
})]
|
|
1542
1629
|
}),
|
|
1543
1630
|
children: e
|
|
1544
1631
|
}),
|
|
1545
|
-
t.matcherStats.length > 0 && /* @__PURE__ */
|
|
1632
|
+
t.matcherStats.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
1546
1633
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1547
1634
|
children: r.tables
|
|
1548
|
-
}), /* @__PURE__ */
|
|
1635
|
+
}), /* @__PURE__ */ M("div", {
|
|
1549
1636
|
className: "vdt:flex vdt:flex-col vdt:gap-1",
|
|
1550
|
-
children: t.matcherStats.map((e) => /* @__PURE__ */
|
|
1637
|
+
children: t.matcherStats.map((e) => /* @__PURE__ */ N("div", {
|
|
1551
1638
|
className: "vdt:flex vdt:items-baseline vdt:gap-3 vdt:text-xs",
|
|
1552
1639
|
children: [
|
|
1553
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ M("span", {
|
|
1554
1641
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1555
1642
|
children: e.tableName
|
|
1556
1643
|
}),
|
|
1557
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ N("span", {
|
|
1558
1645
|
className: "vdt:text-foreground-subtle",
|
|
1559
1646
|
children: [e.tupleRouted + e.columnBucketed + e.rangeBucketed + e.unindexedFallback, " subs"]
|
|
1560
1647
|
}),
|
|
1561
|
-
e.tupleRouted > 0 && /* @__PURE__ */
|
|
1648
|
+
e.tupleRouted > 0 && /* @__PURE__ */ M(G, {
|
|
1562
1649
|
tone: "success",
|
|
1563
1650
|
children: `${e.tupleRouted} tuple`
|
|
1564
1651
|
}),
|
|
1565
|
-
e.columnBucketed > 0 && /* @__PURE__ */
|
|
1652
|
+
e.columnBucketed > 0 && /* @__PURE__ */ M(G, {
|
|
1566
1653
|
tone: "info",
|
|
1567
1654
|
children: `${e.columnBucketed} column`
|
|
1568
1655
|
}),
|
|
1569
|
-
e.rangeBucketed > 0 && /* @__PURE__ */
|
|
1656
|
+
e.rangeBucketed > 0 && /* @__PURE__ */ M(G, {
|
|
1570
1657
|
tone: "neutral",
|
|
1571
1658
|
children: `${e.rangeBucketed} range`
|
|
1572
1659
|
}),
|
|
1573
|
-
e.unindexedFallback > 0 && /* @__PURE__ */
|
|
1660
|
+
e.unindexedFallback > 0 && /* @__PURE__ */ M(G, {
|
|
1574
1661
|
tone: "warning",
|
|
1575
1662
|
children: `${e.unindexedFallback} unindexed`
|
|
1576
1663
|
}),
|
|
1577
|
-
e.distinctTupleKeys > 0 && /* @__PURE__ */
|
|
1664
|
+
e.distinctTupleKeys > 0 && /* @__PURE__ */ N("span", {
|
|
1578
1665
|
className: "vdt:text-foreground-subtle",
|
|
1579
1666
|
children: [e.distinctTupleKeys, " tuple keys"]
|
|
1580
1667
|
})
|
|
1581
1668
|
]
|
|
1582
1669
|
}, e.tableName))
|
|
1583
1670
|
})] }),
|
|
1584
|
-
i.length > 0 && /* @__PURE__ */
|
|
1671
|
+
i.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
1585
1672
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1586
1673
|
children: r.subscriptionsSection
|
|
1587
|
-
}), /* @__PURE__ */
|
|
1674
|
+
}), /* @__PURE__ */ M("div", {
|
|
1588
1675
|
className: "vdt:flex vdt:flex-col vdt:gap-2",
|
|
1589
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1676
|
+
children: i.map((e) => /* @__PURE__ */ M(In, { sub: e }, e.fingerprint))
|
|
1590
1677
|
})] })
|
|
1591
1678
|
] });
|
|
1592
|
-
},
|
|
1593
|
-
let t =
|
|
1594
|
-
return /* @__PURE__ */
|
|
1679
|
+
}, In = ({ sub: e }) => {
|
|
1680
|
+
let t = U().indexes, n = On(e);
|
|
1681
|
+
return /* @__PURE__ */ N("div", {
|
|
1595
1682
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5 vdt:px-2 vdt:py-1 vdt:rounded-sm vdt:bg-muted/40",
|
|
1596
|
-
children: [/* @__PURE__ */
|
|
1683
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1597
1684
|
className: "vdt:flex vdt:items-baseline vdt:gap-2 vdt:text-xs",
|
|
1598
1685
|
children: [
|
|
1599
|
-
/* @__PURE__ */
|
|
1686
|
+
/* @__PURE__ */ M("span", {
|
|
1600
1687
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1601
1688
|
children: e.table
|
|
1602
1689
|
}),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
tone:
|
|
1605
|
-
children:
|
|
1690
|
+
/* @__PURE__ */ M(G, {
|
|
1691
|
+
tone: kn(n),
|
|
1692
|
+
children: An(n)
|
|
1606
1693
|
}),
|
|
1607
|
-
e.usingIndex && /* @__PURE__ */
|
|
1694
|
+
e.usingIndex && /* @__PURE__ */ N("span", {
|
|
1608
1695
|
className: "vdt:text-foreground-subtle",
|
|
1609
1696
|
children: [
|
|
1610
1697
|
t.via,
|
|
1611
1698
|
" ",
|
|
1612
|
-
/* @__PURE__ */
|
|
1699
|
+
/* @__PURE__ */ M("span", {
|
|
1613
1700
|
className: "vdt:font-mono",
|
|
1614
1701
|
children: e.usingIndex.name
|
|
1615
1702
|
})
|
|
1616
1703
|
]
|
|
1617
1704
|
}),
|
|
1618
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ N("span", {
|
|
1619
1706
|
className: "vdt:text-foreground-subtle vdt:ml-auto",
|
|
1620
1707
|
children: [
|
|
1621
1708
|
e.subscriberCount,
|
|
@@ -1624,34 +1711,34 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1624
1711
|
]
|
|
1625
1712
|
})
|
|
1626
1713
|
]
|
|
1627
|
-
}), /* @__PURE__ */
|
|
1714
|
+
}), /* @__PURE__ */ M("div", {
|
|
1628
1715
|
className: "vdt:text-[11px] vdt:font-mono vdt:text-foreground-subtle vdt:break-all",
|
|
1629
|
-
children:
|
|
1716
|
+
children: Nn(e.predicate)
|
|
1630
1717
|
})]
|
|
1631
1718
|
});
|
|
1632
|
-
},
|
|
1633
|
-
let t =
|
|
1719
|
+
}, Ln = (e) => {
|
|
1720
|
+
let t = Tn(e), n = 0;
|
|
1634
1721
|
for (let e of t) n += e.response?.subscriptions.length ?? 0;
|
|
1635
1722
|
return n;
|
|
1636
|
-
},
|
|
1723
|
+
}, Rn = {
|
|
1637
1724
|
outgoing: [],
|
|
1638
1725
|
incoming: [],
|
|
1639
1726
|
targets: [],
|
|
1640
1727
|
deliveries: []
|
|
1641
|
-
},
|
|
1728
|
+
}, zn = 4e3, Bn = async (e, t) => {
|
|
1642
1729
|
if (e === "") return null;
|
|
1643
|
-
let n = await
|
|
1730
|
+
let n = await _n(`${e}/_voltro/inspect/webhooks`, t);
|
|
1644
1731
|
return n !== null && Array.isArray(n.outgoing) && Array.isArray(n.incoming) ? n : null;
|
|
1645
|
-
},
|
|
1646
|
-
let n = $(), r =
|
|
1732
|
+
}, Vn = (e, t = !0) => {
|
|
1733
|
+
let n = $(), r = Q(), a = t && n && e !== "", [o, s] = l(Rn);
|
|
1647
1734
|
return i(() => {
|
|
1648
1735
|
if (!a) return;
|
|
1649
1736
|
let t = !1, n = async () => {
|
|
1650
|
-
let n = await
|
|
1737
|
+
let n = await Bn(e, r);
|
|
1651
1738
|
t || n === null || s(n);
|
|
1652
1739
|
};
|
|
1653
1740
|
n();
|
|
1654
|
-
let i = setInterval(n,
|
|
1741
|
+
let i = setInterval(n, zn);
|
|
1655
1742
|
return () => {
|
|
1656
1743
|
t = !0, clearInterval(i);
|
|
1657
1744
|
};
|
|
@@ -1660,17 +1747,17 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1660
1747
|
a,
|
|
1661
1748
|
r
|
|
1662
1749
|
]), o;
|
|
1663
|
-
},
|
|
1750
|
+
}, Hn = {
|
|
1664
1751
|
pending: "neutral",
|
|
1665
1752
|
inFlight: "info",
|
|
1666
1753
|
succeeded: "success",
|
|
1667
1754
|
failed: "danger",
|
|
1668
1755
|
retryScheduled: "warning"
|
|
1669
|
-
},
|
|
1756
|
+
}, Un = (e) => {
|
|
1670
1757
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1671
1758
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1672
|
-
},
|
|
1673
|
-
let t =
|
|
1759
|
+
}, Wn = (e) => {
|
|
1760
|
+
let t = O(), n = $(), r = Q(), a = t.names.join(","), [o, s] = l(0), c = e && n;
|
|
1674
1761
|
return i(() => {
|
|
1675
1762
|
if (!c) {
|
|
1676
1763
|
s(0);
|
|
@@ -1682,11 +1769,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1682
1769
|
return;
|
|
1683
1770
|
}
|
|
1684
1771
|
let n = !1, i = async () => {
|
|
1685
|
-
let t = await Promise.all(e.map((e) =>
|
|
1772
|
+
let t = await Promise.all(e.map((e) => Bn(e, r)));
|
|
1686
1773
|
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.outgoing.length + t.incoming.length + t.targets.length), 0));
|
|
1687
1774
|
};
|
|
1688
1775
|
i();
|
|
1689
|
-
let o = setInterval(i,
|
|
1776
|
+
let o = setInterval(i, zn);
|
|
1690
1777
|
return () => {
|
|
1691
1778
|
n = !0, clearInterval(o);
|
|
1692
1779
|
};
|
|
@@ -1696,33 +1783,33 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1696
1783
|
c,
|
|
1697
1784
|
r
|
|
1698
1785
|
]), o;
|
|
1699
|
-
},
|
|
1700
|
-
let n =
|
|
1701
|
-
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1786
|
+
}, Gn = ({ apiName: e, baseUrl: t }) => {
|
|
1787
|
+
let n = Vn(t), r = U().webhooks;
|
|
1788
|
+
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */ M("div", {
|
|
1702
1789
|
className: "vdt:space-y-4",
|
|
1703
|
-
children: /* @__PURE__ */
|
|
1704
|
-
Icon:
|
|
1790
|
+
children: /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
1791
|
+
Icon: be,
|
|
1705
1792
|
children: e
|
|
1706
|
-
}), /* @__PURE__ */
|
|
1707
|
-
n.outgoing.length > 0 ? /* @__PURE__ */
|
|
1793
|
+
}), /* @__PURE__ */ N(We, { children: [
|
|
1794
|
+
n.outgoing.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1708
1795
|
className: "vdt:mb-4",
|
|
1709
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1710
1797
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1711
1798
|
children: r.outgoing(n.outgoing.length)
|
|
1712
|
-
}), /* @__PURE__ */
|
|
1799
|
+
}), /* @__PURE__ */ M("div", {
|
|
1713
1800
|
className: "vdt:space-y-1",
|
|
1714
|
-
children: n.outgoing.map((e) => /* @__PURE__ */
|
|
1801
|
+
children: n.outgoing.map((e) => /* @__PURE__ */ N("div", {
|
|
1715
1802
|
className: "vdt-record-row vdt:text-sm",
|
|
1716
1803
|
children: [
|
|
1717
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ M("code", {
|
|
1718
1805
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1719
1806
|
children: e.id
|
|
1720
1807
|
}),
|
|
1721
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ N(G, {
|
|
1722
1809
|
tone: "neutral",
|
|
1723
1810
|
children: ["v", e.version]
|
|
1724
1811
|
}),
|
|
1725
|
-
e.description ? /* @__PURE__ */
|
|
1812
|
+
e.description ? /* @__PURE__ */ M("span", {
|
|
1726
1813
|
className: "vdt-record-description vdt:text-foreground-muted vdt:text-xs",
|
|
1727
1814
|
children: e.description
|
|
1728
1815
|
}) : null
|
|
@@ -1730,28 +1817,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1730
1817
|
}, e.id))
|
|
1731
1818
|
})]
|
|
1732
1819
|
}) : null,
|
|
1733
|
-
n.incoming.length > 0 ? /* @__PURE__ */
|
|
1820
|
+
n.incoming.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1734
1821
|
className: "vdt:mb-4",
|
|
1735
|
-
children: [/* @__PURE__ */
|
|
1822
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1736
1823
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1737
1824
|
children: r.incoming(n.incoming.length)
|
|
1738
|
-
}), /* @__PURE__ */
|
|
1825
|
+
}), /* @__PURE__ */ M("div", {
|
|
1739
1826
|
className: "vdt:space-y-1",
|
|
1740
|
-
children: n.incoming.map((e) => /* @__PURE__ */
|
|
1827
|
+
children: n.incoming.map((e) => /* @__PURE__ */ N("div", {
|
|
1741
1828
|
className: "vdt-record-row vdt:text-sm",
|
|
1742
1829
|
children: [
|
|
1743
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ M("code", {
|
|
1744
1831
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1745
1832
|
children: e.path
|
|
1746
1833
|
}),
|
|
1747
|
-
e.provider ? /* @__PURE__ */
|
|
1834
|
+
e.provider ? /* @__PURE__ */ M(G, {
|
|
1748
1835
|
tone: "info",
|
|
1749
1836
|
children: e.provider
|
|
1750
1837
|
}) : null,
|
|
1751
|
-
e.signatureConfigured ? /* @__PURE__ */
|
|
1838
|
+
e.signatureConfigured ? /* @__PURE__ */ M(G, {
|
|
1752
1839
|
tone: "success",
|
|
1753
1840
|
children: r.signed
|
|
1754
|
-
}) : /* @__PURE__ */
|
|
1841
|
+
}) : /* @__PURE__ */ M(G, {
|
|
1755
1842
|
tone: "warning",
|
|
1756
1843
|
children: r.unsigned
|
|
1757
1844
|
})
|
|
@@ -1759,41 +1846,41 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1759
1846
|
}, e.id))
|
|
1760
1847
|
})]
|
|
1761
1848
|
}) : null,
|
|
1762
|
-
n.targets.length > 0 ? /* @__PURE__ */
|
|
1849
|
+
n.targets.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1763
1850
|
className: "vdt:mb-4",
|
|
1764
|
-
children: [/* @__PURE__ */
|
|
1851
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1765
1852
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1766
1853
|
children: r.targets(n.targets.length)
|
|
1767
|
-
}), /* @__PURE__ */
|
|
1854
|
+
}), /* @__PURE__ */ M("div", {
|
|
1768
1855
|
className: "vdt:space-y-1",
|
|
1769
1856
|
children: n.targets.map((e) => {
|
|
1770
1857
|
let t = n.outgoing.find((t) => t.id === e.event)?.version ?? e.payloadVersion, i = e.payloadVersion === t ? "current" : e.payloadVersion < t ? "behind" : "ahead";
|
|
1771
|
-
return /* @__PURE__ */
|
|
1858
|
+
return /* @__PURE__ */ N("div", {
|
|
1772
1859
|
className: "vdt-record-row vdt:text-sm",
|
|
1773
1860
|
children: [
|
|
1774
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ M("code", {
|
|
1775
1862
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1776
1863
|
children: e.event
|
|
1777
1864
|
}),
|
|
1778
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ M("span", {
|
|
1779
1866
|
className: "vdt:text-foreground-muted",
|
|
1780
1867
|
children: "→"
|
|
1781
1868
|
}),
|
|
1782
|
-
/* @__PURE__ */
|
|
1869
|
+
/* @__PURE__ */ M("span", {
|
|
1783
1870
|
className: "vdt:text-foreground vdt:text-xs vdt:truncate vdt:max-w-72",
|
|
1784
1871
|
children: e.url
|
|
1785
1872
|
}),
|
|
1786
|
-
e.active ? /* @__PURE__ */
|
|
1873
|
+
e.active ? /* @__PURE__ */ M(G, {
|
|
1787
1874
|
tone: "success",
|
|
1788
1875
|
children: r.active
|
|
1789
|
-
}) : /* @__PURE__ */
|
|
1876
|
+
}) : /* @__PURE__ */ M(G, {
|
|
1790
1877
|
tone: "warning",
|
|
1791
1878
|
children: r.paused
|
|
1792
1879
|
}),
|
|
1793
|
-
i === "current" ? /* @__PURE__ */
|
|
1880
|
+
i === "current" ? /* @__PURE__ */ N(G, {
|
|
1794
1881
|
tone: "neutral",
|
|
1795
1882
|
children: ["v", e.payloadVersion]
|
|
1796
|
-
}) : i === "behind" ? /* @__PURE__ */
|
|
1883
|
+
}) : i === "behind" ? /* @__PURE__ */ N(G, {
|
|
1797
1884
|
tone: "warning",
|
|
1798
1885
|
children: [
|
|
1799
1886
|
"v",
|
|
@@ -1801,7 +1888,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1801
1888
|
" ← current v",
|
|
1802
1889
|
t
|
|
1803
1890
|
]
|
|
1804
|
-
}) : /* @__PURE__ */
|
|
1891
|
+
}) : /* @__PURE__ */ N(G, {
|
|
1805
1892
|
tone: "danger",
|
|
1806
1893
|
children: [
|
|
1807
1894
|
"v",
|
|
@@ -1815,39 +1902,39 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1815
1902
|
})
|
|
1816
1903
|
})]
|
|
1817
1904
|
}) : null,
|
|
1818
|
-
n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1905
|
+
n.deliveries.length > 0 ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
1819
1906
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1820
1907
|
children: r.deliveries(n.deliveries.length)
|
|
1821
|
-
}), /* @__PURE__ */
|
|
1908
|
+
}), /* @__PURE__ */ M("div", {
|
|
1822
1909
|
className: "vdt:space-y-0.5 vdt:font-mono vdt:text-xs",
|
|
1823
|
-
children: n.deliveries.map((e) => /* @__PURE__ */
|
|
1910
|
+
children: n.deliveries.map((e) => /* @__PURE__ */ N("div", {
|
|
1824
1911
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1825
1912
|
children: [
|
|
1826
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ M("span", {
|
|
1827
1914
|
className: "vdt:text-foreground-subtle",
|
|
1828
|
-
children:
|
|
1915
|
+
children: Un(e.scheduledAt)
|
|
1829
1916
|
}),
|
|
1830
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ M("span", {
|
|
1831
1918
|
className: "vdt:text-foreground vdt:min-w-32 vdt:truncate",
|
|
1832
1919
|
children: e.event
|
|
1833
1920
|
}),
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
tone:
|
|
1921
|
+
/* @__PURE__ */ M(G, {
|
|
1922
|
+
tone: Hn[e.status],
|
|
1836
1923
|
children: e.status
|
|
1837
1924
|
}),
|
|
1838
|
-
e.responseStatus === null ? null : /* @__PURE__ */
|
|
1925
|
+
e.responseStatus === null ? null : /* @__PURE__ */ M("span", {
|
|
1839
1926
|
className: "vdt:text-foreground-muted",
|
|
1840
1927
|
children: e.responseStatus
|
|
1841
1928
|
}),
|
|
1842
|
-
e.latencyMs === null ? null : /* @__PURE__ */
|
|
1929
|
+
e.latencyMs === null ? null : /* @__PURE__ */ N("span", {
|
|
1843
1930
|
className: "vdt:text-foreground-subtle",
|
|
1844
1931
|
children: [e.latencyMs, "ms"]
|
|
1845
1932
|
}),
|
|
1846
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ M("span", {
|
|
1847
1934
|
className: "vdt:text-foreground-subtle",
|
|
1848
1935
|
children: r.attempt(e.attempt)
|
|
1849
1936
|
}),
|
|
1850
|
-
e.errorMessage ? /* @__PURE__ */
|
|
1937
|
+
e.errorMessage ? /* @__PURE__ */ M("span", {
|
|
1851
1938
|
className: "vdt:text-danger vdt:truncate vdt:max-w-64",
|
|
1852
1939
|
children: e.errorMessage
|
|
1853
1940
|
}) : null
|
|
@@ -1856,22 +1943,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1856
1943
|
})] }) : null
|
|
1857
1944
|
] })] })
|
|
1858
1945
|
}) : null;
|
|
1859
|
-
},
|
|
1860
|
-
let e =
|
|
1861
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
1946
|
+
}, Kn = () => {
|
|
1947
|
+
let e = O(), t = U().webhooks;
|
|
1948
|
+
return e.names.length === 0 ? /* @__PURE__ */ M(Y, { children: t.empty }) : /* @__PURE__ */ M("div", {
|
|
1862
1949
|
className: "vdt:space-y-4 vdt:p-3",
|
|
1863
1950
|
children: e.names.map((t) => {
|
|
1864
1951
|
let n = e.get(t);
|
|
1865
|
-
return /* @__PURE__ */
|
|
1952
|
+
return /* @__PURE__ */ M(Gn, {
|
|
1866
1953
|
apiName: t,
|
|
1867
1954
|
baseUrl: n.inspectBaseUrl
|
|
1868
1955
|
}, t);
|
|
1869
1956
|
})
|
|
1870
1957
|
});
|
|
1871
|
-
},
|
|
1958
|
+
}, qn = (e, t) => {
|
|
1872
1959
|
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i = !1, a = 0, o, s, c = async () => {
|
|
1873
1960
|
if (r) return;
|
|
1874
|
-
if (
|
|
1961
|
+
if (Xt(e) !== void 0) {
|
|
1875
1962
|
i = !0;
|
|
1876
1963
|
return;
|
|
1877
1964
|
}
|
|
@@ -1879,10 +1966,10 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1879
1966
|
let l;
|
|
1880
1967
|
try {
|
|
1881
1968
|
let s = await fetch(n, {
|
|
1882
|
-
headers:
|
|
1969
|
+
headers: fn(t.token, { accept: "text/event-stream" }),
|
|
1883
1970
|
signal: o.signal
|
|
1884
1971
|
});
|
|
1885
|
-
if (
|
|
1972
|
+
if (nn(s.status)) throw Qt(await rn(e, s)), i = !0, Error(`inspect stream refused (HTTP ${s.status})`);
|
|
1886
1973
|
if (!s.ok || s.body === null) throw Error(`inspect stream HTTP ${s.status}`);
|
|
1887
1974
|
if (r) {
|
|
1888
1975
|
await s.body.cancel();
|
|
@@ -1922,14 +2009,16 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1922
2009
|
}, e);
|
|
1923
2010
|
}
|
|
1924
2011
|
};
|
|
1925
|
-
return
|
|
2012
|
+
return s = setTimeout(() => {
|
|
2013
|
+
c();
|
|
2014
|
+
}, 0), { close: () => {
|
|
1926
2015
|
r = !0, clearTimeout(s), o?.abort();
|
|
1927
2016
|
} };
|
|
1928
|
-
},
|
|
2017
|
+
}, Jn = (e, t, n, r = 250) => {
|
|
1929
2018
|
let [a, o] = l(0), s = t.join(",");
|
|
1930
2019
|
return i(() => {
|
|
1931
2020
|
if (!n || e === "") return;
|
|
1932
|
-
let t = new Set(s.split(",")), i, a = !1, c =
|
|
2021
|
+
let t = new Set(s.split(",")), i, a = !1, c = qn(e, {
|
|
1933
2022
|
channels: s.split(","),
|
|
1934
2023
|
token: null,
|
|
1935
2024
|
onEvent: (e) => {
|
|
@@ -1947,7 +2036,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1947
2036
|
n,
|
|
1948
2037
|
r
|
|
1949
2038
|
]), a;
|
|
1950
|
-
},
|
|
2039
|
+
}, Yn = {
|
|
1951
2040
|
queued: "neutral",
|
|
1952
2041
|
running: "info",
|
|
1953
2042
|
succeeded: "success",
|
|
@@ -1955,36 +2044,36 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1955
2044
|
cancelled: "warning",
|
|
1956
2045
|
paused: "accent",
|
|
1957
2046
|
suspended: "accent"
|
|
1958
|
-
},
|
|
2047
|
+
}, Xn = {
|
|
1959
2048
|
running: "info",
|
|
1960
2049
|
succeeded: "success",
|
|
1961
2050
|
failed: "danger"
|
|
1962
|
-
},
|
|
2051
|
+
}, Zn = 50, Qn = 1e4, $n = (e) => e == null ? "—" : e < 1e3 ? `${Math.round(e)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(e < 1e4 ? 2 : 1)}s` : `${Math.floor(e / 6e4)}m ${Math.floor(e % 6e4 / 1e3)}s`, er = (e) => {
|
|
1963
2052
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1964
2053
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1965
|
-
},
|
|
2054
|
+
}, tr = (e) => {
|
|
1966
2055
|
try {
|
|
1967
2056
|
return JSON.stringify(e, null, 2);
|
|
1968
2057
|
} catch {
|
|
1969
2058
|
return String(e);
|
|
1970
2059
|
}
|
|
1971
|
-
},
|
|
2060
|
+
}, nr = (e) => e === "running" || e === "queued", rr = (e, t) => e.durationMs ?? (nr(e.status) ? t - new Date(e.startedAt).getTime() : null), ir = (e) => {
|
|
1972
2061
|
let t = /* @__PURE__ */ new Set();
|
|
1973
2062
|
for (let n of e) {
|
|
1974
2063
|
let e = n.payload?.signalName;
|
|
1975
2064
|
typeof e == "string" && (n.eventType === "signal-awaited" && t.add(e), n.eventType === "signal-received" && t.delete(e));
|
|
1976
2065
|
}
|
|
1977
2066
|
return [...t];
|
|
1978
|
-
},
|
|
2067
|
+
}, ar = async (e, t) => {
|
|
1979
2068
|
if (e === "") return null;
|
|
1980
|
-
let n = await
|
|
2069
|
+
let n = await _n(`${e}/_voltro/inspect/workflows/runs?limit=${Zn}`, t);
|
|
1981
2070
|
return n !== null && Array.isArray(n.runs) ? n.runs : null;
|
|
1982
|
-
},
|
|
1983
|
-
let t = $(), n =
|
|
2071
|
+
}, or = (e) => {
|
|
2072
|
+
let t = $(), n = Q(), r = t && e !== "", a = Jn(e, ["workflowRuns"], r), [o, s] = l([]), [c, u] = l(!1);
|
|
1984
2073
|
return i(() => {
|
|
1985
2074
|
if (!r) return;
|
|
1986
2075
|
let t = !1, i = async () => {
|
|
1987
|
-
let r = await
|
|
2076
|
+
let r = await ar(e, n);
|
|
1988
2077
|
if (!t) {
|
|
1989
2078
|
if (r === null) {
|
|
1990
2079
|
u(!0);
|
|
@@ -1994,7 +2083,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1994
2083
|
}
|
|
1995
2084
|
};
|
|
1996
2085
|
i();
|
|
1997
|
-
let a = setInterval(i,
|
|
2086
|
+
let a = setInterval(i, Qn);
|
|
1998
2087
|
return () => {
|
|
1999
2088
|
t = !0, clearInterval(a);
|
|
2000
2089
|
};
|
|
@@ -2007,16 +2096,16 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2007
2096
|
runs: o,
|
|
2008
2097
|
failed: c
|
|
2009
2098
|
};
|
|
2010
|
-
},
|
|
2011
|
-
let n = $(), r =
|
|
2099
|
+
}, sr = (e, t) => {
|
|
2100
|
+
let n = $(), r = Q(), a = Jn(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [o, s] = l([]), [c, u] = l([]);
|
|
2012
2101
|
return i(() => {
|
|
2013
2102
|
if (!n || e === "") return;
|
|
2014
2103
|
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
|
|
2015
|
-
let [e, t] = await Promise.all([
|
|
2104
|
+
let [e, t] = await Promise.all([_n(`${a}/steps`, r), _n(`${a}/events`, r)]);
|
|
2016
2105
|
i || (e !== null && Array.isArray(e.steps) && s(e.steps), t !== null && Array.isArray(t.events) && u(t.events));
|
|
2017
2106
|
};
|
|
2018
2107
|
o();
|
|
2019
|
-
let c = setInterval(o,
|
|
2108
|
+
let c = setInterval(o, Qn);
|
|
2020
2109
|
return () => {
|
|
2021
2110
|
i = !0, clearInterval(c);
|
|
2022
2111
|
};
|
|
@@ -2030,8 +2119,8 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2030
2119
|
steps: o,
|
|
2031
2120
|
events: c
|
|
2032
2121
|
};
|
|
2033
|
-
},
|
|
2034
|
-
let t =
|
|
2122
|
+
}, cr = (e) => {
|
|
2123
|
+
let t = O(), n = $(), r = Q(), a = t.names.join(","), [o, s] = l(0), c = e && n, u = Jn(a === "" ? "" : t.get(a.split(",")[0]).inspectBaseUrl ?? "", ["workflowRuns"], c);
|
|
2035
2124
|
return i(() => {
|
|
2036
2125
|
if (!c) {
|
|
2037
2126
|
s(0);
|
|
@@ -2043,11 +2132,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2043
2132
|
return;
|
|
2044
2133
|
}
|
|
2045
2134
|
let n = !1, i = async () => {
|
|
2046
|
-
let t = await Promise.all(e.map((e) =>
|
|
2047
|
-
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) =>
|
|
2135
|
+
let t = await Promise.all(e.map((e) => ar(e, r)));
|
|
2136
|
+
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => nr(e.status)).length), 0));
|
|
2048
2137
|
};
|
|
2049
2138
|
i();
|
|
2050
|
-
let o = setInterval(i,
|
|
2139
|
+
let o = setInterval(i, Qn);
|
|
2051
2140
|
return () => {
|
|
2052
2141
|
n = !0, clearInterval(o);
|
|
2053
2142
|
};
|
|
@@ -2058,87 +2147,87 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2058
2147
|
r,
|
|
2059
2148
|
u
|
|
2060
2149
|
]), o;
|
|
2061
|
-
},
|
|
2062
|
-
let e =
|
|
2063
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
2150
|
+
}, lr = () => {
|
|
2151
|
+
let e = O(), t = U().workflows;
|
|
2152
|
+
return e.names.length === 0 ? /* @__PURE__ */ M(Y, { children: t.noApi }) : /* @__PURE__ */ M("div", {
|
|
2064
2153
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2065
|
-
children: e.names.map((e) => /* @__PURE__ */
|
|
2154
|
+
children: e.names.map((e) => /* @__PURE__ */ M(ur, { apiName: e }, e))
|
|
2066
2155
|
});
|
|
2067
|
-
},
|
|
2068
|
-
let t =
|
|
2156
|
+
}, ur = ({ apiName: e }) => {
|
|
2157
|
+
let t = O(), n = U().workflows, r = t.get(e), a = r.inspectBaseUrl, o = s(() => Object.entries(r.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [r.descriptors]), { runs: c, failed: u } = or(a), d = c.filter((e) => nr(e.status)).length, [f, p] = l(null), [m, h] = l(() => Date.now());
|
|
2069
2158
|
return i(() => {
|
|
2070
2159
|
if (d === 0) return;
|
|
2071
2160
|
let e = setInterval(() => h(Date.now()), 1e3);
|
|
2072
2161
|
return () => clearInterval(e);
|
|
2073
|
-
}, [d]), /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
Icon:
|
|
2076
|
-
right: d > 0 ? /* @__PURE__ */
|
|
2162
|
+
}, [d]), /* @__PURE__ */ N(K, { children: [
|
|
2163
|
+
/* @__PURE__ */ M(q, {
|
|
2164
|
+
Icon: xe,
|
|
2165
|
+
right: d > 0 ? /* @__PURE__ */ M(G, {
|
|
2077
2166
|
tone: "info",
|
|
2078
2167
|
children: n.runningBadge(d)
|
|
2079
|
-
}) : /* @__PURE__ */
|
|
2168
|
+
}) : /* @__PURE__ */ M(G, {
|
|
2080
2169
|
tone: "neutral",
|
|
2081
2170
|
children: n.runsBadge(c.length)
|
|
2082
2171
|
}),
|
|
2083
2172
|
children: e
|
|
2084
2173
|
}),
|
|
2085
|
-
/* @__PURE__ */
|
|
2174
|
+
/* @__PURE__ */ M(dr, {
|
|
2086
2175
|
apiName: e,
|
|
2087
2176
|
definitions: o,
|
|
2088
2177
|
runs: c
|
|
2089
2178
|
}),
|
|
2090
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ N("div", {
|
|
2091
2180
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2092
|
-
children: [/* @__PURE__ */
|
|
2181
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2093
2182
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
|
|
2094
2183
|
children: n.runs(c.length)
|
|
2095
|
-
}), u ? /* @__PURE__ */
|
|
2184
|
+
}), u ? /* @__PURE__ */ M("div", {
|
|
2096
2185
|
className: "vdt:text-xs vdt:text-danger",
|
|
2097
2186
|
children: n.runsUnavailable
|
|
2098
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
2187
|
+
}) : c.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2099
2188
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
2100
2189
|
children: o.length === 0 ? n.noDefinitions : n.noRuns
|
|
2101
|
-
}) : /* @__PURE__ */
|
|
2190
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2102
2191
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2103
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2192
|
+
children: c.map((e) => /* @__PURE__ */ N("div", {
|
|
2104
2193
|
"data-run-id": e.id,
|
|
2105
2194
|
"data-run-status": e.status,
|
|
2106
|
-
children: [/* @__PURE__ */
|
|
2195
|
+
children: [/* @__PURE__ */ N("button", {
|
|
2107
2196
|
type: "button",
|
|
2108
2197
|
"aria-expanded": f === e.id,
|
|
2109
2198
|
onClick: () => p(f === e.id ? null : e.id),
|
|
2110
2199
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:text-xs vdt:px-1.5 vdt:py-1 vdt:rounded-sm vdt:hover:bg-muted",
|
|
2111
2200
|
children: [
|
|
2112
|
-
/* @__PURE__ */
|
|
2201
|
+
/* @__PURE__ */ M("span", {
|
|
2113
2202
|
className: "vdt:text-foreground-subtle vdt:w-2",
|
|
2114
2203
|
children: f === e.id ? "▾" : "▸"
|
|
2115
2204
|
}),
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
tone:
|
|
2205
|
+
/* @__PURE__ */ M(G, {
|
|
2206
|
+
tone: Yn[e.status] ?? "neutral",
|
|
2118
2207
|
children: e.status
|
|
2119
2208
|
}),
|
|
2120
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ M("code", {
|
|
2121
2210
|
className: "vdt:font-mono vdt:text-foreground vdt:truncate",
|
|
2122
2211
|
children: e.tag
|
|
2123
2212
|
}),
|
|
2124
|
-
e.parentExecutionId === null ? null : /* @__PURE__ */
|
|
2213
|
+
e.parentExecutionId === null ? null : /* @__PURE__ */ M(G, {
|
|
2125
2214
|
tone: "neutral",
|
|
2126
2215
|
children: n.child
|
|
2127
2216
|
}),
|
|
2128
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2217
|
+
e.errorMessage === null ? null : /* @__PURE__ */ N("span", {
|
|
2129
2218
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2130
2219
|
children: [e.errorTag === null ? "" : `${e.errorTag} · `, e.errorMessage]
|
|
2131
2220
|
}),
|
|
2132
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ M("span", {
|
|
2133
2222
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
|
|
2134
|
-
children:
|
|
2223
|
+
children: $n(rr(e, m))
|
|
2135
2224
|
}),
|
|
2136
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ M("span", {
|
|
2137
2226
|
className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
|
|
2138
|
-
children:
|
|
2227
|
+
children: er(e.startedAt)
|
|
2139
2228
|
})
|
|
2140
2229
|
]
|
|
2141
|
-
}), f === e.id ? /* @__PURE__ */
|
|
2230
|
+
}), f === e.id ? /* @__PURE__ */ M(fr, {
|
|
2142
2231
|
baseUrl: a,
|
|
2143
2232
|
run: e
|
|
2144
2233
|
}) : null]
|
|
@@ -2146,19 +2235,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2146
2235
|
})]
|
|
2147
2236
|
})
|
|
2148
2237
|
] });
|
|
2149
|
-
},
|
|
2150
|
-
let r =
|
|
2238
|
+
}, dr = ({ apiName: e, definitions: t, runs: n }) => {
|
|
2239
|
+
let r = U().workflows, [a, o] = l(t[0] ?? "");
|
|
2151
2240
|
i(() => {
|
|
2152
2241
|
a === "" && t.length > 0 && o(t[0]);
|
|
2153
2242
|
}, [t, a]);
|
|
2154
2243
|
let c = s(() => {
|
|
2155
2244
|
let e = n.find((e) => e.tag === a);
|
|
2156
|
-
return e === void 0 ? "{}" :
|
|
2245
|
+
return e === void 0 ? "{}" : tr(e.payload);
|
|
2157
2246
|
}, [n, a]), [u, d] = l(c), [f, p] = l(!1);
|
|
2158
2247
|
i(() => {
|
|
2159
2248
|
f || d(c);
|
|
2160
2249
|
}, [c, f]);
|
|
2161
|
-
let [m, h] = l(null), g =
|
|
2250
|
+
let [m, h] = l(null), g = A(e, a === "" ? "__voltro.devtools.none" : a);
|
|
2162
2251
|
if (t.length === 0) return null;
|
|
2163
2252
|
let _ = async () => {
|
|
2164
2253
|
let e;
|
|
@@ -2185,30 +2274,30 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2185
2274
|
});
|
|
2186
2275
|
}
|
|
2187
2276
|
};
|
|
2188
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ N("div", {
|
|
2189
2278
|
className: "vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-1.5",
|
|
2190
2279
|
children: [
|
|
2191
|
-
/* @__PURE__ */
|
|
2280
|
+
/* @__PURE__ */ N("div", {
|
|
2192
2281
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
2193
2282
|
children: [
|
|
2194
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ M("span", {
|
|
2195
2284
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
|
|
2196
2285
|
children: r.start
|
|
2197
2286
|
}),
|
|
2198
|
-
/* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ M("select", {
|
|
2199
2288
|
"aria-label": r.workflowLabel,
|
|
2200
2289
|
value: a,
|
|
2201
2290
|
onChange: (e) => {
|
|
2202
2291
|
o(e.target.value), p(!1), h(null);
|
|
2203
2292
|
},
|
|
2204
2293
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
2205
|
-
children: t.map((e) => /* @__PURE__ */
|
|
2294
|
+
children: t.map((e) => /* @__PURE__ */ M("option", {
|
|
2206
2295
|
value: e,
|
|
2207
2296
|
children: e
|
|
2208
2297
|
}, e))
|
|
2209
2298
|
}),
|
|
2210
|
-
/* @__PURE__ */
|
|
2211
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ M("span", { className: "vdt:sp" }),
|
|
2300
|
+
/* @__PURE__ */ M(W, {
|
|
2212
2301
|
onClick: () => {
|
|
2213
2302
|
_();
|
|
2214
2303
|
},
|
|
@@ -2217,7 +2306,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2217
2306
|
})
|
|
2218
2307
|
]
|
|
2219
2308
|
}),
|
|
2220
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ M("textarea", {
|
|
2221
2310
|
"aria-label": r.payloadLabel,
|
|
2222
2311
|
value: u,
|
|
2223
2312
|
onChange: (e) => {
|
|
@@ -2227,19 +2316,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2227
2316
|
rows: Math.min(8, Math.max(2, u.split("\n").length)),
|
|
2228
2317
|
className: "vdt:w-full vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-2 vdt:py-1 vdt:text-foreground vdt:resize-y"
|
|
2229
2318
|
}),
|
|
2230
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ M("div", {
|
|
2231
2320
|
className: "vdt:text-[10px] vdt:text-foreground-subtle",
|
|
2232
2321
|
children: r.payloadHint
|
|
2233
2322
|
}),
|
|
2234
|
-
m === null ? null : /* @__PURE__ */
|
|
2323
|
+
m === null ? null : /* @__PURE__ */ M("div", {
|
|
2235
2324
|
role: m.tone === "danger" ? "alert" : "status",
|
|
2236
2325
|
className: `vdt:text-xs ${m.tone === "danger" ? "vdt:text-danger" : "vdt:text-success"}`,
|
|
2237
2326
|
children: m.text
|
|
2238
2327
|
})
|
|
2239
2328
|
]
|
|
2240
2329
|
});
|
|
2241
|
-
},
|
|
2242
|
-
let n =
|
|
2330
|
+
}, fr = ({ baseUrl: e, run: t }) => {
|
|
2331
|
+
let n = U().workflows, r = Q(), { steps: a, events: o } = sr(e, t.id), c = s(() => ir(o), [o]), [u, d] = l(""), [f, p] = l("{}"), [m, h] = l(!1), [g, _] = l(null);
|
|
2243
2332
|
i(() => {
|
|
2244
2333
|
u === "" && c.length > 0 && d(c[0]);
|
|
2245
2334
|
}, [c, u]);
|
|
@@ -2259,7 +2348,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2259
2348
|
h(!1);
|
|
2260
2349
|
}
|
|
2261
2350
|
}, C = () => S(n.cancel, async () => {
|
|
2262
|
-
let e = await
|
|
2351
|
+
let e = await gn(`${x}/cancel`, r, {});
|
|
2263
2352
|
return n.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
|
|
2264
2353
|
}), w = () => S(n.sendSignal, async () => {
|
|
2265
2354
|
let e;
|
|
@@ -2268,20 +2357,20 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2268
2357
|
} catch (e) {
|
|
2269
2358
|
throw Error(n.invalidJson(e instanceof Error ? e.message : String(e)));
|
|
2270
2359
|
}
|
|
2271
|
-
return await
|
|
2360
|
+
return await gn(`${x}/signal`, r, e === void 0 ? { signalName: u } : {
|
|
2272
2361
|
signalName: u,
|
|
2273
2362
|
payload: e
|
|
2274
2363
|
}), n.signalSent(u);
|
|
2275
2364
|
});
|
|
2276
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ N("div", {
|
|
2277
2366
|
className: "vdt:ml-4 vdt:pl-2 vdt:border-l vdt:border-border vdt:py-1 vdt:flex vdt:flex-col vdt:gap-2 vdt:text-xs",
|
|
2278
2367
|
children: [
|
|
2279
|
-
/* @__PURE__ */
|
|
2368
|
+
/* @__PURE__ */ N("div", {
|
|
2280
2369
|
className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
|
|
2281
|
-
children: [/* @__PURE__ */
|
|
2370
|
+
children: [/* @__PURE__ */ M(pr, {
|
|
2282
2371
|
label: n.payloadLabel,
|
|
2283
2372
|
value: t.payload
|
|
2284
|
-
}), /* @__PURE__ */
|
|
2373
|
+
}), /* @__PURE__ */ M(pr, {
|
|
2285
2374
|
label: t.status === "failed" ? n.error : n.output,
|
|
2286
2375
|
value: t.status === "failed" ? {
|
|
2287
2376
|
tag: t.errorTag,
|
|
@@ -2289,46 +2378,46 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2289
2378
|
} : t.output
|
|
2290
2379
|
})]
|
|
2291
2380
|
}),
|
|
2292
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
2293
2382
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2294
2383
|
children: n.steps(a.length)
|
|
2295
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
2384
|
+
}), a.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2296
2385
|
className: "vdt:text-foreground-subtle",
|
|
2297
2386
|
children: n.noSteps
|
|
2298
|
-
}) : /* @__PURE__ */
|
|
2387
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2299
2388
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2300
|
-
children: a.map((e) => /* @__PURE__ */
|
|
2389
|
+
children: a.map((e) => /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("button", {
|
|
2301
2390
|
type: "button",
|
|
2302
2391
|
onClick: () => y(v === e.id ? null : e.id),
|
|
2303
2392
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:px-1 vdt:py-0.5 vdt:rounded-sm vdt:hover:bg-muted",
|
|
2304
2393
|
children: [
|
|
2305
|
-
/* @__PURE__ */
|
|
2306
|
-
tone:
|
|
2394
|
+
/* @__PURE__ */ M(G, {
|
|
2395
|
+
tone: Xn[e.status] ?? "info",
|
|
2307
2396
|
children: e.status
|
|
2308
2397
|
}),
|
|
2309
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ M("code", {
|
|
2310
2399
|
className: "vdt:font-mono vdt:text-foreground",
|
|
2311
2400
|
children: e.stepName
|
|
2312
2401
|
}),
|
|
2313
|
-
e.attempt > 1 ? /* @__PURE__ */
|
|
2402
|
+
e.attempt > 1 ? /* @__PURE__ */ M("span", {
|
|
2314
2403
|
className: "vdt:text-warning",
|
|
2315
2404
|
children: n.attempt(e.attempt)
|
|
2316
2405
|
}) : null,
|
|
2317
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2406
|
+
e.errorMessage === null ? null : /* @__PURE__ */ M("span", {
|
|
2318
2407
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2319
2408
|
children: e.errorMessage
|
|
2320
2409
|
}),
|
|
2321
|
-
/* @__PURE__ */
|
|
2410
|
+
/* @__PURE__ */ M("span", {
|
|
2322
2411
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
|
|
2323
|
-
children:
|
|
2412
|
+
children: $n(e.durationMs)
|
|
2324
2413
|
})
|
|
2325
2414
|
]
|
|
2326
|
-
}), v === e.id ? /* @__PURE__ */
|
|
2415
|
+
}), v === e.id ? /* @__PURE__ */ N("div", {
|
|
2327
2416
|
className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
|
|
2328
|
-
children: [/* @__PURE__ */
|
|
2417
|
+
children: [/* @__PURE__ */ M(pr, {
|
|
2329
2418
|
label: n.input,
|
|
2330
2419
|
value: e.input
|
|
2331
|
-
}), /* @__PURE__ */
|
|
2420
|
+
}), /* @__PURE__ */ M(pr, {
|
|
2332
2421
|
label: e.status === "failed" ? n.error : n.output,
|
|
2333
2422
|
value: e.status === "failed" ? e.errorCause ?? {
|
|
2334
2423
|
tag: e.errorTag,
|
|
@@ -2337,50 +2426,50 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2337
2426
|
})]
|
|
2338
2427
|
}) : null] }, e.id))
|
|
2339
2428
|
})] }),
|
|
2340
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2429
|
+
o.length > 0 ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
2341
2430
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2342
2431
|
children: n.events(o.length)
|
|
2343
|
-
}), /* @__PURE__ */
|
|
2432
|
+
}), /* @__PURE__ */ M("div", {
|
|
2344
2433
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1",
|
|
2345
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2346
|
-
title:
|
|
2434
|
+
children: o.map((e) => /* @__PURE__ */ N("span", {
|
|
2435
|
+
title: er(e.occurredAt),
|
|
2347
2436
|
className: "vdt:inline-flex vdt:items-center vdt:gap-1 vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted vdt:border vdt:border-border vdt:rounded-sm vdt:px-1",
|
|
2348
2437
|
children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
|
|
2349
2438
|
}, e.id))
|
|
2350
2439
|
})] }) : null,
|
|
2351
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ N("div", {
|
|
2352
2441
|
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
2353
2442
|
children: [
|
|
2354
|
-
b ? /* @__PURE__ */
|
|
2443
|
+
b ? /* @__PURE__ */ M(W, {
|
|
2355
2444
|
onClick: () => {
|
|
2356
2445
|
C();
|
|
2357
2446
|
},
|
|
2358
2447
|
disabled: m,
|
|
2359
2448
|
children: n.cancel
|
|
2360
2449
|
}) : null,
|
|
2361
|
-
c.length > 0 && t.status === "running" ? /* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */
|
|
2450
|
+
c.length > 0 && t.status === "running" ? /* @__PURE__ */ N(j, { children: [
|
|
2451
|
+
/* @__PURE__ */ M("span", {
|
|
2363
2452
|
className: "vdt:text-foreground-muted",
|
|
2364
2453
|
children: n.awaiting
|
|
2365
2454
|
}),
|
|
2366
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ M("select", {
|
|
2367
2456
|
"aria-label": n.signalName,
|
|
2368
2457
|
value: u,
|
|
2369
2458
|
onChange: (e) => d(e.target.value),
|
|
2370
2459
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
2371
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2460
|
+
children: c.map((e) => /* @__PURE__ */ M("option", {
|
|
2372
2461
|
value: e,
|
|
2373
2462
|
children: e
|
|
2374
2463
|
}, e))
|
|
2375
2464
|
}),
|
|
2376
|
-
/* @__PURE__ */
|
|
2465
|
+
/* @__PURE__ */ M("input", {
|
|
2377
2466
|
"aria-label": n.signalPayload,
|
|
2378
2467
|
value: f,
|
|
2379
2468
|
onChange: (e) => p(e.target.value),
|
|
2380
2469
|
spellCheck: !1,
|
|
2381
2470
|
className: "vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground vdt:min-w-32"
|
|
2382
2471
|
}),
|
|
2383
|
-
/* @__PURE__ */
|
|
2472
|
+
/* @__PURE__ */ M(W, {
|
|
2384
2473
|
onClick: () => {
|
|
2385
2474
|
w();
|
|
2386
2475
|
},
|
|
@@ -2388,7 +2477,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2388
2477
|
children: n.sendSignal
|
|
2389
2478
|
})
|
|
2390
2479
|
] }) : null,
|
|
2391
|
-
t.traceId === null ? null : /* @__PURE__ */
|
|
2480
|
+
t.traceId === null ? null : /* @__PURE__ */ N("span", {
|
|
2392
2481
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
|
|
2393
2482
|
children: [
|
|
2394
2483
|
n.trace,
|
|
@@ -2398,32 +2487,32 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2398
2487
|
})
|
|
2399
2488
|
]
|
|
2400
2489
|
}),
|
|
2401
|
-
g === null ? null : /* @__PURE__ */
|
|
2490
|
+
g === null ? null : /* @__PURE__ */ M("div", {
|
|
2402
2491
|
role: g.tone === "danger" ? "alert" : "status",
|
|
2403
2492
|
className: g.tone === "danger" ? "vdt:text-danger" : "vdt:text-success",
|
|
2404
2493
|
children: g.text
|
|
2405
2494
|
})
|
|
2406
2495
|
]
|
|
2407
2496
|
});
|
|
2408
|
-
},
|
|
2497
|
+
}, pr = ({ label: e, value: t }) => /* @__PURE__ */ N("div", {
|
|
2409
2498
|
className: "vdt:min-w-0",
|
|
2410
|
-
children: [/* @__PURE__ */
|
|
2499
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2411
2500
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-0.5",
|
|
2412
2501
|
children: e
|
|
2413
|
-
}), t == null ? /* @__PURE__ */
|
|
2502
|
+
}), t == null ? /* @__PURE__ */ M("div", {
|
|
2414
2503
|
className: "vdt:text-foreground-subtle",
|
|
2415
2504
|
children: "—"
|
|
2416
|
-
}) : /* @__PURE__ */
|
|
2505
|
+
}) : /* @__PURE__ */ M("pre", {
|
|
2417
2506
|
className: "vdt:overflow-x-auto vdt:text-[11px] vdt:font-mono vdt:p-1.5 vdt:rounded-sm vdt:bg-background vdt:border vdt:border-border vdt:text-foreground vdt:whitespace-pre-wrap vdt:break-all",
|
|
2418
|
-
children:
|
|
2507
|
+
children: tr(t)
|
|
2419
2508
|
})]
|
|
2420
|
-
}),
|
|
2509
|
+
}), mr = (e) => {
|
|
2421
2510
|
try {
|
|
2422
2511
|
return JSON.stringify(e, null, 2);
|
|
2423
2512
|
} catch {
|
|
2424
2513
|
return String(e);
|
|
2425
2514
|
}
|
|
2426
|
-
},
|
|
2515
|
+
}, hr = () => u(h, f, f), gr = () => {
|
|
2427
2516
|
let [e, t] = l(() => typeof window > "u" ? "/" : window.location.pathname);
|
|
2428
2517
|
return i(() => {
|
|
2429
2518
|
if (typeof window > "u") return;
|
|
@@ -2434,49 +2523,49 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2434
2523
|
window.removeEventListener("popstate", e), clearInterval(n);
|
|
2435
2524
|
};
|
|
2436
2525
|
}, []), e;
|
|
2437
|
-
},
|
|
2438
|
-
let e =
|
|
2526
|
+
}, _r = () => {
|
|
2527
|
+
let e = hr(), t = gr(), n = U().routes, [r, i] = l(!0), a = e.pathname === "/" && Object.keys(e.params).length === 0 && e.loaderData === void 0 && t !== "/" ? t : e.pathname, o = Object.entries(e.params).map(([e, t]) => ({
|
|
2439
2528
|
key: e,
|
|
2440
2529
|
value: String(t)
|
|
2441
2530
|
}));
|
|
2442
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ N("div", {
|
|
2443
2532
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2444
|
-
children: [/* @__PURE__ */
|
|
2445
|
-
/* @__PURE__ */
|
|
2446
|
-
Icon:
|
|
2533
|
+
children: [/* @__PURE__ */ N(K, { children: [
|
|
2534
|
+
/* @__PURE__ */ M(q, {
|
|
2535
|
+
Icon: ge,
|
|
2447
2536
|
children: n.currentRoute
|
|
2448
2537
|
}),
|
|
2449
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ M(J, { entries: [{
|
|
2450
2539
|
key: "pathname",
|
|
2451
2540
|
value: a
|
|
2452
2541
|
}, {
|
|
2453
2542
|
key: "params",
|
|
2454
2543
|
value: o.length === 0 ? "—" : ""
|
|
2455
2544
|
}] }),
|
|
2456
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2545
|
+
o.length > 0 ? /* @__PURE__ */ M("div", {
|
|
2457
2546
|
className: "vdt:px-3 vdt:pb-3",
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2547
|
+
children: /* @__PURE__ */ M(J, { entries: o })
|
|
2459
2548
|
}) : null
|
|
2460
|
-
] }), /* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2462
|
-
Icon:
|
|
2549
|
+
] }), /* @__PURE__ */ N(K, { children: [
|
|
2550
|
+
/* @__PURE__ */ M(q, {
|
|
2551
|
+
Icon: ge,
|
|
2463
2552
|
children: n.loaderData
|
|
2464
2553
|
}),
|
|
2465
|
-
/* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ M("button", {
|
|
2466
2555
|
onClick: () => i((e) => !e),
|
|
2467
2556
|
className: "vdt:px-3 vdt:py-1.5 vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:hover:text-foreground",
|
|
2468
2557
|
children: r ? n.collapse : n.expand
|
|
2469
2558
|
}),
|
|
2470
|
-
r ? e.loaderData === void 0 ? /* @__PURE__ */
|
|
2559
|
+
r ? e.loaderData === void 0 ? /* @__PURE__ */ N(Y, { children: [n.noLoaderTitle, /* @__PURE__ */ M("div", {
|
|
2471
2560
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2472
|
-
children: n.noLoaderHint(/* @__PURE__ */
|
|
2473
|
-
})] }) : /* @__PURE__ */
|
|
2561
|
+
children: n.noLoaderHint(/* @__PURE__ */ M("code", { children: "<Router>" }))
|
|
2562
|
+
})] }) : /* @__PURE__ */ M("pre", {
|
|
2474
2563
|
className: "vdt:px-3 vdt:pb-3 vdt:text-[11px] vdt:max-h-80 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2475
|
-
children:
|
|
2564
|
+
children: mr(e.loaderData)
|
|
2476
2565
|
}) : null
|
|
2477
2566
|
] })]
|
|
2478
2567
|
});
|
|
2479
|
-
},
|
|
2568
|
+
}, vr = (e) => {
|
|
2480
2569
|
let t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
2481
2570
|
for (let o of Object.values(e)) o.kind === "query" && (t += 1), o.kind === "mutation" && (n += 1), o.kind === "action" && (r += 1), o.kind === "stream" && (i += 1), o.kind === "workflow" && (a += 1);
|
|
2482
2571
|
return {
|
|
@@ -2486,23 +2575,23 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2486
2575
|
streams: i,
|
|
2487
2576
|
workflows: a
|
|
2488
2577
|
};
|
|
2489
|
-
},
|
|
2490
|
-
let e =
|
|
2491
|
-
return n.length === 0 ? /* @__PURE__ */
|
|
2578
|
+
}, yr = () => {
|
|
2579
|
+
let e = O(), t = U().runtimes, n = e.names;
|
|
2580
|
+
return n.length === 0 ? /* @__PURE__ */ N(Y, { children: [t.emptyTitle, /* @__PURE__ */ M("div", {
|
|
2492
2581
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2493
2582
|
children: t.emptyHint
|
|
2494
|
-
})] }) : /* @__PURE__ */
|
|
2583
|
+
})] }) : /* @__PURE__ */ M("div", {
|
|
2495
2584
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2496
2585
|
children: n.map((n) => {
|
|
2497
|
-
let r = e.get(n), i =
|
|
2498
|
-
return /* @__PURE__ */
|
|
2499
|
-
Icon:
|
|
2500
|
-
right: /* @__PURE__ */
|
|
2586
|
+
let r = e.get(n), i = vr(r.descriptors);
|
|
2587
|
+
return /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2588
|
+
Icon: _e,
|
|
2589
|
+
right: /* @__PURE__ */ M(G, {
|
|
2501
2590
|
tone: "success",
|
|
2502
2591
|
children: t.live
|
|
2503
2592
|
}),
|
|
2504
2593
|
children: n
|
|
2505
|
-
}), /* @__PURE__ */
|
|
2594
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2506
2595
|
{
|
|
2507
2596
|
key: "queries",
|
|
2508
2597
|
value: String(i.queries)
|
|
@@ -2534,7 +2623,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2534
2623
|
] })] }, n);
|
|
2535
2624
|
})
|
|
2536
2625
|
});
|
|
2537
|
-
},
|
|
2626
|
+
}, br = (e, t) => ({
|
|
2538
2627
|
supported: t,
|
|
2539
2628
|
scope: e?.scope ?? null,
|
|
2540
2629
|
scriptUrl: e?.active?.scriptURL ?? e?.waiting?.scriptURL ?? e?.installing?.scriptURL ?? null,
|
|
@@ -2542,14 +2631,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2542
2631
|
waiting: e?.waiting?.state ?? null,
|
|
2543
2632
|
active: e?.active?.state ?? null,
|
|
2544
2633
|
backgroundSync: e != null && "sync" in e && e.sync !== void 0
|
|
2545
|
-
}),
|
|
2634
|
+
}), xr = (e) => e.filter((e) => e.startsWith("voltro-")).sort(), Sr = (e) => {
|
|
2546
2635
|
try {
|
|
2547
2636
|
return new URL(e).host;
|
|
2548
2637
|
} catch {
|
|
2549
2638
|
return "(unparseable endpoint)";
|
|
2550
2639
|
}
|
|
2551
|
-
},
|
|
2552
|
-
let e = typeof navigator > "u" ? void 0 : navigator, t = e?.serviceWorker !== void 0, n = t ? await e.serviceWorker.getRegistration().catch(() => void 0) : void 0, r =
|
|
2640
|
+
}, Cr = async () => {
|
|
2641
|
+
let e = typeof navigator > "u" ? void 0 : navigator, t = e?.serviceWorker !== void 0, n = t ? await e.serviceWorker.getRegistration().catch(() => void 0) : void 0, r = br(n ?? null, t), i = globalThis.caches, a = i ? xr(await i.keys().catch(() => [])) : [], o = [];
|
|
2553
2642
|
for (let e of a) {
|
|
2554
2643
|
let t = i ? await i.open(e).then((e) => e.keys()).then((e) => e.length).catch(() => 0) : 0;
|
|
2555
2644
|
o.push({
|
|
@@ -2560,7 +2649,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2560
2649
|
let s = globalThis.Notification, c = null;
|
|
2561
2650
|
if (n?.pushManager) {
|
|
2562
2651
|
let e = await n.pushManager.getSubscription().catch(() => null);
|
|
2563
|
-
c = e ?
|
|
2652
|
+
c = e ? Sr(e.endpoint) : null;
|
|
2564
2653
|
}
|
|
2565
2654
|
return {
|
|
2566
2655
|
worker: r,
|
|
@@ -2568,9 +2657,9 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2568
2657
|
pushPermission: s?.permission ?? null,
|
|
2569
2658
|
pushEndpointHost: c
|
|
2570
2659
|
};
|
|
2571
|
-
},
|
|
2572
|
-
let e =
|
|
2573
|
-
|
|
2660
|
+
}, wr = (e) => e === "activated" ? "success" : e === null ? "neutral" : "warning", Tr = () => {
|
|
2661
|
+
let e = U().pwa, t = _(), r = v(), a = y(), o = k(), [s, c] = l(null), u = n(() => {
|
|
2662
|
+
Cr().then(c);
|
|
2574
2663
|
}, []);
|
|
2575
2664
|
if (i(() => {
|
|
2576
2665
|
u();
|
|
@@ -2578,21 +2667,21 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2578
2667
|
return e?.serviceWorker?.addEventListener?.("controllerchange", u), () => {
|
|
2579
2668
|
e?.serviceWorker?.removeEventListener?.("controllerchange", u);
|
|
2580
2669
|
};
|
|
2581
|
-
}, [u]), s === null) return /* @__PURE__ */
|
|
2582
|
-
if (!s.worker.supported) return /* @__PURE__ */
|
|
2670
|
+
}, [u]), s === null) return /* @__PURE__ */ M(Y, { children: e.loading });
|
|
2671
|
+
if (!s.worker.supported) return /* @__PURE__ */ M(Y, { children: e.unsupported });
|
|
2583
2672
|
let d = s.worker;
|
|
2584
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ N("div", {
|
|
2585
2674
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2586
2675
|
children: [
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
Icon:
|
|
2589
|
-
right: /* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2677
|
+
Icon: _e,
|
|
2678
|
+
right: /* @__PURE__ */ M(W, {
|
|
2590
2679
|
size: "sm",
|
|
2591
2680
|
onClick: u,
|
|
2592
2681
|
children: e.refresh
|
|
2593
2682
|
}),
|
|
2594
2683
|
children: e.worker
|
|
2595
|
-
}), /* @__PURE__ */
|
|
2684
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2596
2685
|
{
|
|
2597
2686
|
key: e.scope,
|
|
2598
2687
|
value: d.scope ?? e.none
|
|
@@ -2603,22 +2692,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2603
2692
|
},
|
|
2604
2693
|
{
|
|
2605
2694
|
key: "installing",
|
|
2606
|
-
value: /* @__PURE__ */
|
|
2607
|
-
tone:
|
|
2695
|
+
value: /* @__PURE__ */ M(G, {
|
|
2696
|
+
tone: wr(d.installing),
|
|
2608
2697
|
children: d.installing ?? e.none
|
|
2609
2698
|
})
|
|
2610
2699
|
},
|
|
2611
2700
|
{
|
|
2612
2701
|
key: "waiting",
|
|
2613
|
-
value: /* @__PURE__ */
|
|
2614
|
-
tone:
|
|
2702
|
+
value: /* @__PURE__ */ M(G, {
|
|
2703
|
+
tone: wr(d.waiting),
|
|
2615
2704
|
children: d.waiting ?? e.none
|
|
2616
2705
|
})
|
|
2617
2706
|
},
|
|
2618
2707
|
{
|
|
2619
2708
|
key: "active",
|
|
2620
|
-
value: /* @__PURE__ */
|
|
2621
|
-
tone:
|
|
2709
|
+
value: /* @__PURE__ */ M(G, {
|
|
2710
|
+
tone: wr(d.active),
|
|
2622
2711
|
children: d.active ?? e.none
|
|
2623
2712
|
})
|
|
2624
2713
|
},
|
|
@@ -2627,14 +2716,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2627
2716
|
value: d.backgroundSync ? e.yes : e.no
|
|
2628
2717
|
}
|
|
2629
2718
|
] })] }),
|
|
2630
|
-
/* @__PURE__ */
|
|
2631
|
-
right: /* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2720
|
+
right: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(W, {
|
|
2632
2721
|
size: "sm",
|
|
2633
2722
|
onClick: () => {
|
|
2634
2723
|
t.check();
|
|
2635
2724
|
},
|
|
2636
2725
|
children: e.checkNow
|
|
2637
|
-
}), /* @__PURE__ */
|
|
2726
|
+
}), /* @__PURE__ */ M(W, {
|
|
2638
2727
|
size: "sm",
|
|
2639
2728
|
variant: "accent",
|
|
2640
2729
|
disabled: !t.updateAvailable,
|
|
@@ -2644,7 +2733,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2644
2733
|
children: e.forceUpdate
|
|
2645
2734
|
})] }),
|
|
2646
2735
|
children: e.update
|
|
2647
|
-
}), /* @__PURE__ */
|
|
2736
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2648
2737
|
{
|
|
2649
2738
|
key: e.currentBuild,
|
|
2650
2739
|
value: o.platform.appVersion ?? e.unknown
|
|
@@ -2658,15 +2747,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2658
2747
|
value: a.online ? e.yes : e.no
|
|
2659
2748
|
}
|
|
2660
2749
|
] })] }),
|
|
2661
|
-
/* @__PURE__ */
|
|
2750
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.precache }), s.caches.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2662
2751
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2663
2752
|
children: e.noCaches
|
|
2664
|
-
}) : /* @__PURE__ */
|
|
2753
|
+
}) : /* @__PURE__ */ M(J, { entries: s.caches.map((t) => ({
|
|
2665
2754
|
key: t.name,
|
|
2666
2755
|
value: e.entries(t.entries)
|
|
2667
2756
|
})) })] }),
|
|
2668
|
-
/* @__PURE__ */
|
|
2669
|
-
right: r.canInstall ? /* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2758
|
+
right: r.canInstall ? /* @__PURE__ */ M(W, {
|
|
2670
2759
|
size: "sm",
|
|
2671
2760
|
onClick: () => {
|
|
2672
2761
|
r.install();
|
|
@@ -2674,7 +2763,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2674
2763
|
children: e.install
|
|
2675
2764
|
}) : void 0,
|
|
2676
2765
|
children: e.installAndPush
|
|
2677
|
-
}), /* @__PURE__ */
|
|
2766
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2678
2767
|
{
|
|
2679
2768
|
key: e.installed,
|
|
2680
2769
|
value: r.installed ? e.yes : e.no
|
|
@@ -2694,8 +2783,8 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2694
2783
|
] })] })
|
|
2695
2784
|
]
|
|
2696
2785
|
});
|
|
2697
|
-
},
|
|
2698
|
-
let e =
|
|
2786
|
+
}, Er = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) => e).sort(), Dr = (e) => [e.fullscreen ? "fullscreen" : e.maximized ? "maximized" : "windowed", e.focused ? "focused" : "unfocused"].join(", "), Or = () => {
|
|
2787
|
+
let e = U().desktop, t = k(), r = te("desktop"), [a, o] = l(0), [s, c] = l(null), [u, d] = l(null), f = n(() => o((e) => e + 1), []);
|
|
2699
2788
|
if (i(() => {
|
|
2700
2789
|
if (!r) return;
|
|
2701
2790
|
let e = r.window.subscribe(f), t = r.os.onThemeChange(f);
|
|
@@ -2709,23 +2798,23 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2709
2798
|
return;
|
|
2710
2799
|
}
|
|
2711
2800
|
C(e).then(d);
|
|
2712
|
-
}, [t, a]), !r) return /* @__PURE__ */
|
|
2713
|
-
let p =
|
|
2714
|
-
return /* @__PURE__ */
|
|
2801
|
+
}, [t, a]), !r) return /* @__PURE__ */ M(Y, { children: e.notDesktop });
|
|
2802
|
+
let p = Er(t.capabilities);
|
|
2803
|
+
return /* @__PURE__ */ N("div", {
|
|
2715
2804
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2716
2805
|
children: [
|
|
2717
|
-
/* @__PURE__ */
|
|
2718
|
-
Icon:
|
|
2719
|
-
right: /* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2807
|
+
Icon: Oe,
|
|
2808
|
+
right: /* @__PURE__ */ M(W, {
|
|
2720
2809
|
size: "sm",
|
|
2721
2810
|
onClick: f,
|
|
2722
2811
|
children: e.refresh
|
|
2723
2812
|
}),
|
|
2724
2813
|
children: e.shell
|
|
2725
|
-
}), /* @__PURE__ */
|
|
2814
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2726
2815
|
{
|
|
2727
2816
|
key: e.kind,
|
|
2728
|
-
value: /* @__PURE__ */
|
|
2817
|
+
value: /* @__PURE__ */ M(G, {
|
|
2729
2818
|
tone: "info",
|
|
2730
2819
|
children: r.kind
|
|
2731
2820
|
})
|
|
@@ -2740,15 +2829,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2740
2829
|
},
|
|
2741
2830
|
{
|
|
2742
2831
|
key: e.window,
|
|
2743
|
-
value:
|
|
2832
|
+
value: Dr(r.window.read())
|
|
2744
2833
|
},
|
|
2745
2834
|
{
|
|
2746
2835
|
key: e.appVersion,
|
|
2747
2836
|
value: t.platform.appVersion ?? e.unknown
|
|
2748
2837
|
}
|
|
2749
2838
|
] })] }),
|
|
2750
|
-
/* @__PURE__ */
|
|
2751
|
-
right: t.updates ? /* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2840
|
+
right: t.updates ? /* @__PURE__ */ M(W, {
|
|
2752
2841
|
size: "sm",
|
|
2753
2842
|
onClick: () => {
|
|
2754
2843
|
t.updates.check().then(c);
|
|
@@ -2756,14 +2845,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2756
2845
|
children: e.checkNow
|
|
2757
2846
|
}) : void 0,
|
|
2758
2847
|
children: e.updater
|
|
2759
|
-
}), /* @__PURE__ */
|
|
2848
|
+
}), /* @__PURE__ */ M(J, { entries: [{
|
|
2760
2849
|
key: e.updaterPort,
|
|
2761
2850
|
value: t.updates ? e.yes : e.no
|
|
2762
2851
|
}, {
|
|
2763
2852
|
key: e.waitingVersion,
|
|
2764
2853
|
value: s?.version ?? e.none
|
|
2765
2854
|
}] })] }),
|
|
2766
|
-
/* @__PURE__ */
|
|
2855
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.localStack }), /* @__PURE__ */ M(J, { entries: [
|
|
2767
2856
|
{
|
|
2768
2857
|
key: e.sidecarPort,
|
|
2769
2858
|
value: r.sidecar === void 0 ? e.no : e.yes
|
|
@@ -2777,19 +2866,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2777
2866
|
value: u?.name ?? e.none
|
|
2778
2867
|
}
|
|
2779
2868
|
] })] }),
|
|
2780
|
-
/* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.capabilities }), p.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2781
2870
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2782
2871
|
children: e.noCapabilities
|
|
2783
|
-
}) : /* @__PURE__ */
|
|
2872
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2784
2873
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1 vdt:px-3 vdt:py-2",
|
|
2785
|
-
children: p.map((e) => /* @__PURE__ */
|
|
2874
|
+
children: p.map((e) => /* @__PURE__ */ M(G, {
|
|
2786
2875
|
tone: "neutral",
|
|
2787
2876
|
children: e
|
|
2788
2877
|
}, e))
|
|
2789
2878
|
})] })
|
|
2790
2879
|
]
|
|
2791
2880
|
});
|
|
2792
|
-
},
|
|
2881
|
+
}, kr = () => u(ee, w, w), Ar = (e, t = 90) => {
|
|
2793
2882
|
let n;
|
|
2794
2883
|
try {
|
|
2795
2884
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2797,36 +2886,36 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2797
2886
|
n = String(e);
|
|
2798
2887
|
}
|
|
2799
2888
|
return n.length > t ? `${n.slice(0, t)}…` : n;
|
|
2800
|
-
},
|
|
2889
|
+
}, jr = (e, t) => typeof e != "object" || typeof t != "object" || e === null || t === null ? [] : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].filter((n) => !Object.is(e[n], t[n])), Mr = ({ label: e, state: t }) => {
|
|
2801
2890
|
let [n, r] = l(!1);
|
|
2802
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ N("div", {
|
|
2803
2892
|
className: "vdt:border-t vdt:border-border",
|
|
2804
|
-
children: [/* @__PURE__ */
|
|
2893
|
+
children: [/* @__PURE__ */ N("button", {
|
|
2805
2894
|
type: "button",
|
|
2806
2895
|
className: "vdt:flex vdt:w-full vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2 vdt:text-left vdt:hover:bg-muted",
|
|
2807
2896
|
onClick: () => r((e) => !e),
|
|
2808
|
-
children: [/* @__PURE__ */
|
|
2897
|
+
children: [/* @__PURE__ */ M(G, {
|
|
2809
2898
|
tone: "neutral",
|
|
2810
2899
|
children: e
|
|
2811
|
-
}), /* @__PURE__ */
|
|
2900
|
+
}), /* @__PURE__ */ M("span", {
|
|
2812
2901
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2813
|
-
children:
|
|
2902
|
+
children: Ar(t)
|
|
2814
2903
|
})]
|
|
2815
|
-
}), n ? /* @__PURE__ */
|
|
2904
|
+
}), n ? /* @__PURE__ */ M(J, { entries: Object.entries(t).map(([e, t]) => ({
|
|
2816
2905
|
key: e,
|
|
2817
|
-
value:
|
|
2906
|
+
value: Ar(t, 200)
|
|
2818
2907
|
})) }) : null]
|
|
2819
2908
|
});
|
|
2820
|
-
},
|
|
2821
|
-
let e =
|
|
2822
|
-
return /* @__PURE__ */
|
|
2823
|
-
/* @__PURE__ */
|
|
2824
|
-
Icon:
|
|
2825
|
-
right: /* @__PURE__ */
|
|
2909
|
+
}, Nr = () => {
|
|
2910
|
+
let e = kr(), [t, n] = l(null), r = x(), i = t ?? e.length;
|
|
2911
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
2912
|
+
/* @__PURE__ */ N(q, {
|
|
2913
|
+
Icon: he,
|
|
2914
|
+
right: /* @__PURE__ */ N(W, {
|
|
2826
2915
|
onClick: () => {
|
|
2827
2916
|
b(), n(null);
|
|
2828
2917
|
},
|
|
2829
|
-
children: [/* @__PURE__ */
|
|
2918
|
+
children: [/* @__PURE__ */ M(ye, {}), "Clear"]
|
|
2830
2919
|
}),
|
|
2831
2920
|
children: [
|
|
2832
2921
|
"Stores (",
|
|
@@ -2834,28 +2923,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2834
2923
|
")"
|
|
2835
2924
|
]
|
|
2836
2925
|
}),
|
|
2837
|
-
r.length === 0 ? /* @__PURE__ */
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2926
|
+
r.length === 0 ? /* @__PURE__ */ M(Y, { children: "No stores defined. `defineStore(name, () => state)` in a *.store.ts file." }) : r.map((e) => /* @__PURE__ */ N(K, { children: [
|
|
2927
|
+
/* @__PURE__ */ M(q, { children: e.name }),
|
|
2928
|
+
/* @__PURE__ */ M(Mr, {
|
|
2840
2929
|
label: "global",
|
|
2841
2930
|
state: e.get()
|
|
2842
2931
|
}),
|
|
2843
|
-
e.keys().map((t) => /* @__PURE__ */
|
|
2932
|
+
e.keys().map((t) => /* @__PURE__ */ M(Mr, {
|
|
2844
2933
|
label: t,
|
|
2845
2934
|
state: e.get(t)
|
|
2846
2935
|
}, t))
|
|
2847
2936
|
] }, e.name)),
|
|
2848
|
-
/* @__PURE__ */
|
|
2849
|
-
Icon:
|
|
2850
|
-
right: /* @__PURE__ */
|
|
2937
|
+
/* @__PURE__ */ N(q, {
|
|
2938
|
+
Icon: ve,
|
|
2939
|
+
right: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(W, {
|
|
2851
2940
|
onClick: () => {
|
|
2852
|
-
i <= 0 ||
|
|
2941
|
+
i <= 0 || E(i - 1, "before") && n(i - 1);
|
|
2853
2942
|
},
|
|
2854
2943
|
disabled: i <= 0,
|
|
2855
2944
|
children: "◀ Back"
|
|
2856
|
-
}), /* @__PURE__ */
|
|
2945
|
+
}), /* @__PURE__ */ M(W, {
|
|
2857
2946
|
onClick: () => {
|
|
2858
|
-
t === null || i >= e.length ||
|
|
2947
|
+
t === null || i >= e.length || E(i, "after") && n(i + 1);
|
|
2859
2948
|
},
|
|
2860
2949
|
disabled: t === null || i >= e.length,
|
|
2861
2950
|
children: "Forward ▶"
|
|
@@ -2867,54 +2956,54 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2867
2956
|
t === null ? "" : ` — travelled to ${i}/${e.length}`
|
|
2868
2957
|
]
|
|
2869
2958
|
}),
|
|
2870
|
-
e.length === 0 ? /* @__PURE__ */
|
|
2871
|
-
let a = e.length - 1 - r, o =
|
|
2872
|
-
return /* @__PURE__ */
|
|
2959
|
+
e.length === 0 ? /* @__PURE__ */ M(Y, { children: "No writes yet. Every `set()` lands here, labelled if you pass one." }) : [...e].reverse().map((n, r) => {
|
|
2960
|
+
let a = e.length - 1 - r, o = jr(n.prev, n.next);
|
|
2961
|
+
return /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ N("div", {
|
|
2873
2962
|
className: "vdt:flex vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2",
|
|
2874
2963
|
children: [
|
|
2875
|
-
/* @__PURE__ */
|
|
2964
|
+
/* @__PURE__ */ M(G, {
|
|
2876
2965
|
tone: n.isUndo === !0 ? "warning" : "neutral",
|
|
2877
2966
|
children: n.store
|
|
2878
2967
|
}),
|
|
2879
|
-
n.key === void 0 ? null : /* @__PURE__ */
|
|
2968
|
+
n.key === void 0 ? null : /* @__PURE__ */ M(G, {
|
|
2880
2969
|
tone: "neutral",
|
|
2881
2970
|
children: n.key
|
|
2882
2971
|
}),
|
|
2883
|
-
n.label === void 0 ? null : /* @__PURE__ */
|
|
2972
|
+
n.label === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
2884
2973
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2885
2974
|
children: n.label
|
|
2886
2975
|
}),
|
|
2887
|
-
t !== null && a === i ? /* @__PURE__ */
|
|
2976
|
+
t !== null && a === i ? /* @__PURE__ */ M(G, {
|
|
2888
2977
|
tone: "info",
|
|
2889
2978
|
children: "here"
|
|
2890
2979
|
}) : null
|
|
2891
2980
|
]
|
|
2892
|
-
}), /* @__PURE__ */
|
|
2981
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2893
2982
|
{
|
|
2894
2983
|
key: "changed",
|
|
2895
2984
|
value: o.length > 0 ? o.join(", ") : "(no field diff)"
|
|
2896
2985
|
},
|
|
2897
2986
|
{
|
|
2898
2987
|
key: "before",
|
|
2899
|
-
value:
|
|
2988
|
+
value: Ar(n.prev)
|
|
2900
2989
|
},
|
|
2901
2990
|
{
|
|
2902
2991
|
key: "after",
|
|
2903
|
-
value:
|
|
2992
|
+
value: Ar(n.next)
|
|
2904
2993
|
}
|
|
2905
2994
|
] })] }, `${n.at}-${a}`);
|
|
2906
2995
|
})
|
|
2907
2996
|
] });
|
|
2908
|
-
},
|
|
2997
|
+
}, Pr = (e) => typeof e == "number" ? e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(1)}s` : "—", Fr = (e) => {
|
|
2909
2998
|
try {
|
|
2910
2999
|
return JSON.stringify(e, null, 2);
|
|
2911
3000
|
} catch {
|
|
2912
3001
|
return String(e);
|
|
2913
3002
|
}
|
|
2914
|
-
},
|
|
3003
|
+
}, Ir = ({ mutation: e }) => /* @__PURE__ */ N("div", {
|
|
2915
3004
|
className: "vdt:bg-background/60",
|
|
2916
3005
|
children: [
|
|
2917
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ M(J, { entries: [
|
|
2918
3007
|
{
|
|
2919
3008
|
key: "id",
|
|
2920
3009
|
value: e.id
|
|
@@ -2941,101 +3030,101 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2941
3030
|
},
|
|
2942
3031
|
{
|
|
2943
3032
|
key: "duration",
|
|
2944
|
-
value:
|
|
3033
|
+
value: Pr(e.durationMs)
|
|
2945
3034
|
}
|
|
2946
3035
|
] }),
|
|
2947
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ N("details", {
|
|
2948
3037
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2949
3038
|
open: !0,
|
|
2950
|
-
children: [/* @__PURE__ */
|
|
3039
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2951
3040
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2952
3041
|
children: "Input"
|
|
2953
|
-
}), /* @__PURE__ */
|
|
3042
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2954
3043
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2955
|
-
children:
|
|
3044
|
+
children: Fr(e.input)
|
|
2956
3045
|
})]
|
|
2957
3046
|
}),
|
|
2958
|
-
e.status === "success" ? /* @__PURE__ */
|
|
3047
|
+
e.status === "success" ? /* @__PURE__ */ N("details", {
|
|
2959
3048
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2960
3049
|
open: !0,
|
|
2961
|
-
children: [/* @__PURE__ */
|
|
3050
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2962
3051
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2963
3052
|
children: "Output"
|
|
2964
|
-
}), /* @__PURE__ */
|
|
3053
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2965
3054
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2966
|
-
children:
|
|
3055
|
+
children: Fr(e.output)
|
|
2967
3056
|
})]
|
|
2968
3057
|
}) : null,
|
|
2969
|
-
e.status === "error" ? /* @__PURE__ */
|
|
3058
|
+
e.status === "error" ? /* @__PURE__ */ N("details", {
|
|
2970
3059
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2971
3060
|
open: !0,
|
|
2972
|
-
children: [/* @__PURE__ */
|
|
3061
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2973
3062
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-danger vdt:cursor-pointer",
|
|
2974
3063
|
children: "Error"
|
|
2975
|
-
}), /* @__PURE__ */
|
|
3064
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2976
3065
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
2977
|
-
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` :
|
|
3066
|
+
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` : Fr(e.error)
|
|
2978
3067
|
})]
|
|
2979
3068
|
}) : null
|
|
2980
3069
|
]
|
|
2981
|
-
}),
|
|
3070
|
+
}), Lr = {
|
|
2982
3071
|
trace: "vdt:text-foreground-subtle",
|
|
2983
3072
|
debug: "vdt:text-info",
|
|
2984
3073
|
info: "vdt:text-foreground",
|
|
2985
3074
|
warn: "vdt:text-warning",
|
|
2986
3075
|
error: "vdt:text-danger",
|
|
2987
3076
|
fatal: "vdt:text-danger vdt:font-bold"
|
|
2988
|
-
},
|
|
3077
|
+
}, Rr = (e) => {
|
|
2989
3078
|
if (Object.keys(e).length === 0) return "";
|
|
2990
3079
|
try {
|
|
2991
3080
|
return JSON.stringify(e, null, 2);
|
|
2992
3081
|
} catch {
|
|
2993
3082
|
return String(e);
|
|
2994
3083
|
}
|
|
2995
|
-
},
|
|
3084
|
+
}, zr = (e) => {
|
|
2996
3085
|
let t = (e) => e < 10 ? `0${e}` : String(e);
|
|
2997
3086
|
return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}.${((e) => e < 100 ? e < 10 ? `00${e}` : `0${e}` : String(e))(e.getMilliseconds())}`;
|
|
2998
|
-
},
|
|
2999
|
-
let t =
|
|
3000
|
-
return /* @__PURE__ */
|
|
3087
|
+
}, Br = ({ record: e }) => {
|
|
3088
|
+
let t = Rr(e.fields);
|
|
3089
|
+
return /* @__PURE__ */ N("div", {
|
|
3001
3090
|
className: "vdt:bg-background/60 vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-2",
|
|
3002
3091
|
children: [
|
|
3003
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ N("div", {
|
|
3004
3093
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
3005
3094
|
children: [
|
|
3006
|
-
|
|
3095
|
+
zr(e.ts),
|
|
3007
3096
|
e.scope ? ` · ${e.scope}` : "",
|
|
3008
3097
|
" · ",
|
|
3009
3098
|
e.level
|
|
3010
3099
|
]
|
|
3011
3100
|
}),
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
className: ["vdt:text-xs vdt:break-words",
|
|
3101
|
+
/* @__PURE__ */ M("div", {
|
|
3102
|
+
className: ["vdt:text-xs vdt:break-words", Lr[e.level]].join(" "),
|
|
3014
3103
|
children: e.message
|
|
3015
3104
|
}),
|
|
3016
|
-
e.fiberId ? /* @__PURE__ */
|
|
3105
|
+
e.fiberId ? /* @__PURE__ */ N("div", {
|
|
3017
3106
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
3018
3107
|
children: ["fiber: ", e.fiberId]
|
|
3019
3108
|
}) : null,
|
|
3020
|
-
t ? /* @__PURE__ */
|
|
3109
|
+
t ? /* @__PURE__ */ M("pre", {
|
|
3021
3110
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
3022
3111
|
children: t
|
|
3023
3112
|
}) : null,
|
|
3024
|
-
e.cause === void 0 ? null : /* @__PURE__ */
|
|
3113
|
+
e.cause === void 0 ? null : /* @__PURE__ */ M("pre", {
|
|
3025
3114
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
3026
3115
|
children: e.cause instanceof Error ? e.cause.stack ?? `${e.cause.name}: ${e.cause.message}` : String(e.cause)
|
|
3027
3116
|
})
|
|
3028
3117
|
]
|
|
3029
3118
|
});
|
|
3030
|
-
},
|
|
3119
|
+
}, Vr = 4e3, Hr = async (e, t, n = !1) => {
|
|
3031
3120
|
if (e === "") return null;
|
|
3032
|
-
let r = await
|
|
3121
|
+
let r = await _n(`${e}/_voltro/inspect/traces${n ? "?includeBackground=1" : ""}`, t);
|
|
3033
3122
|
return r !== null && Array.isArray(r.traces) ? r : null;
|
|
3034
|
-
},
|
|
3035
|
-
let n =
|
|
3123
|
+
}, Ur = [], Wr = (e, t = !1) => {
|
|
3124
|
+
let n = O(), r = $(), a = Q(), o = n.names.join(","), [s, c] = l(Ur), u = e && r;
|
|
3036
3125
|
return i(() => {
|
|
3037
3126
|
if (!u) {
|
|
3038
|
-
c(
|
|
3127
|
+
c(Ur);
|
|
3039
3128
|
return;
|
|
3040
3129
|
}
|
|
3041
3130
|
let e = o === "" ? [] : o.split(",").map((e) => ({
|
|
@@ -3043,11 +3132,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3043
3132
|
baseUrl: n.get(e).inspectBaseUrl
|
|
3044
3133
|
})).filter((e) => e.baseUrl !== "");
|
|
3045
3134
|
if (e.length === 0) {
|
|
3046
|
-
c(
|
|
3135
|
+
c(Ur);
|
|
3047
3136
|
return;
|
|
3048
3137
|
}
|
|
3049
3138
|
let r = !1, i = async () => {
|
|
3050
|
-
let n = await Promise.all(e.map((e) =>
|
|
3139
|
+
let n = await Promise.all(e.map((e) => Hr(e.baseUrl, a, t)));
|
|
3051
3140
|
if (r) return;
|
|
3052
3141
|
let i = [];
|
|
3053
3142
|
n.forEach((t, n) => {
|
|
@@ -3058,7 +3147,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3058
3147
|
}), c(i);
|
|
3059
3148
|
};
|
|
3060
3149
|
i();
|
|
3061
|
-
let s = setInterval(i,
|
|
3150
|
+
let s = setInterval(i, Vr);
|
|
3062
3151
|
return () => {
|
|
3063
3152
|
r = !0, clearInterval(s);
|
|
3064
3153
|
};
|
|
@@ -3069,7 +3158,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3069
3158
|
a,
|
|
3070
3159
|
t
|
|
3071
3160
|
]), s;
|
|
3072
|
-
},
|
|
3161
|
+
}, Gr = (e) => e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(2)}s`, Kr = (e) => {
|
|
3073
3162
|
let t = new Map(e.map((e) => [e.spanId, e])), n = /* @__PURE__ */ new Map(), r = (e, i) => {
|
|
3074
3163
|
if (n.has(e.spanId)) return n.get(e.spanId);
|
|
3075
3164
|
if (i > 64 || e.parentSpanId === null) return n.set(e.spanId, 0), 0;
|
|
@@ -3078,94 +3167,94 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3078
3167
|
};
|
|
3079
3168
|
for (let t of e) r(t, 0);
|
|
3080
3169
|
return n;
|
|
3081
|
-
},
|
|
3170
|
+
}, qr = (e) => {
|
|
3082
3171
|
if (typeof e == "string") return e;
|
|
3083
3172
|
try {
|
|
3084
3173
|
return JSON.stringify(e, null, 2) ?? String(e);
|
|
3085
3174
|
} catch {
|
|
3086
3175
|
return String(e);
|
|
3087
3176
|
}
|
|
3088
|
-
},
|
|
3089
|
-
let t =
|
|
3090
|
-
return /* @__PURE__ */
|
|
3177
|
+
}, Jr = ({ trace: e }) => {
|
|
3178
|
+
let t = U().traces, n = Kr(e.spans), r = new Set(e.spans.map((e) => e.spanId)), i = e.spans.some((e) => e.parentSpanId !== null && !r.has(e.parentSpanId)), a = e.spans.length > 0 && e.spans.every((e) => e.name.startsWith("sql.")), o = e.durationMs > 0 ? e.durationMs : 1;
|
|
3179
|
+
return /* @__PURE__ */ N("div", {
|
|
3091
3180
|
className: "vdt-trace-detail",
|
|
3092
3181
|
children: [
|
|
3093
|
-
/* @__PURE__ */
|
|
3182
|
+
/* @__PURE__ */ N("div", {
|
|
3094
3183
|
className: "vdt-trace-summary",
|
|
3095
|
-
children: [/* @__PURE__ */
|
|
3184
|
+
children: [/* @__PURE__ */ M("span", { children: t.spans(e.spanCount) }), e.kind === "subscription" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("span", { children: [
|
|
3096
3185
|
e.deliveryCount ?? 0,
|
|
3097
3186
|
" ",
|
|
3098
3187
|
t.delivery(e.deliveryCount ?? 0)
|
|
3099
|
-
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */
|
|
3188
|
+
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */ N("span", { children: [
|
|
3100
3189
|
t.lastDelivery,
|
|
3101
3190
|
": ",
|
|
3102
|
-
/* @__PURE__ */
|
|
3103
|
-
] })] }) : /* @__PURE__ */
|
|
3191
|
+
/* @__PURE__ */ M("strong", { children: Gr(e.lastDeliveryMs) })
|
|
3192
|
+
] })] }) : /* @__PURE__ */ N("span", { children: [
|
|
3104
3193
|
t.duration,
|
|
3105
3194
|
": ",
|
|
3106
|
-
/* @__PURE__ */
|
|
3195
|
+
/* @__PURE__ */ M("strong", { children: Gr(e.durationMs) })
|
|
3107
3196
|
] })]
|
|
3108
3197
|
}),
|
|
3109
|
-
/* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ N("code", {
|
|
3110
3199
|
className: "vdt-trace-id",
|
|
3111
3200
|
children: ["trace ", e.traceId]
|
|
3112
3201
|
}),
|
|
3113
|
-
i || a ? /* @__PURE__ */
|
|
3202
|
+
i || a ? /* @__PURE__ */ M("p", {
|
|
3114
3203
|
className: "vdt-trace-context",
|
|
3115
3204
|
children: i ? t.missingParents : t.sqlWithoutCaller
|
|
3116
3205
|
}) : null,
|
|
3117
3206
|
e.spans.map((r) => {
|
|
3118
3207
|
let i = Math.min(n.get(r.spanId) ?? 0, 8), a = Math.max(0, Math.min(100, (r.startMs - e.startMs) / o * 100)), s = Math.max(0, Math.min(100 - a, Math.max(1.5, r.durationMs / o * 100))), c = Object.entries(r.attributes);
|
|
3119
|
-
return /* @__PURE__ */
|
|
3208
|
+
return /* @__PURE__ */ N("details", {
|
|
3120
3209
|
className: "vdt-trace-span",
|
|
3121
3210
|
open: r.status === "error",
|
|
3122
3211
|
"data-status": r.status,
|
|
3123
|
-
children: [/* @__PURE__ */
|
|
3212
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
3124
3213
|
className: "vdt-trace-span-head",
|
|
3125
3214
|
style: { paddingLeft: 8 + i * 8 },
|
|
3126
3215
|
children: [
|
|
3127
|
-
/* @__PURE__ */
|
|
3216
|
+
/* @__PURE__ */ N("span", {
|
|
3128
3217
|
className: "vdt-trace-span-label",
|
|
3129
|
-
children: [/* @__PURE__ */
|
|
3218
|
+
children: [/* @__PURE__ */ M(fe, { className: "vdt-trace-chevron" }), /* @__PURE__ */ M("code", {
|
|
3130
3219
|
className: "vdt-trace-span-name",
|
|
3131
3220
|
children: r.name
|
|
3132
3221
|
})]
|
|
3133
3222
|
}),
|
|
3134
|
-
/* @__PURE__ */
|
|
3223
|
+
/* @__PURE__ */ M("span", {
|
|
3135
3224
|
className: "vdt-trace-span-duration",
|
|
3136
|
-
children:
|
|
3225
|
+
children: Gr(r.durationMs)
|
|
3137
3226
|
}),
|
|
3138
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ M("span", {
|
|
3139
3228
|
className: "vdt-trace-span-bar",
|
|
3140
3229
|
"aria-hidden": "true",
|
|
3141
|
-
children: /* @__PURE__ */
|
|
3230
|
+
children: /* @__PURE__ */ M("span", { style: {
|
|
3142
3231
|
left: `${a}%`,
|
|
3143
3232
|
width: `${s}%`
|
|
3144
3233
|
} })
|
|
3145
3234
|
})
|
|
3146
3235
|
]
|
|
3147
|
-
}), /* @__PURE__ */
|
|
3236
|
+
}), /* @__PURE__ */ N("div", {
|
|
3148
3237
|
className: "vdt-trace-span-body",
|
|
3149
3238
|
children: [
|
|
3150
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ N("div", {
|
|
3151
3240
|
className: "vdt-trace-span-meta",
|
|
3152
3241
|
children: [
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3155
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ M("span", { children: r.kind }),
|
|
3243
|
+
/* @__PURE__ */ M("span", { children: r.status }),
|
|
3244
|
+
/* @__PURE__ */ M("code", { children: r.spanId })
|
|
3156
3245
|
]
|
|
3157
3246
|
}),
|
|
3158
|
-
r.statusMessage ? /* @__PURE__ */
|
|
3247
|
+
r.statusMessage ? /* @__PURE__ */ M("p", {
|
|
3159
3248
|
className: "vdt-trace-span-message",
|
|
3160
3249
|
children: r.statusMessage
|
|
3161
3250
|
}) : null,
|
|
3162
|
-
c.length > 0 ? /* @__PURE__ */
|
|
3251
|
+
c.length > 0 ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
3163
3252
|
className: "vdt-trace-attributes-label",
|
|
3164
3253
|
children: t.attributes
|
|
3165
|
-
}), /* @__PURE__ */
|
|
3254
|
+
}), /* @__PURE__ */ M("dl", {
|
|
3166
3255
|
className: "vdt-trace-attributes",
|
|
3167
|
-
children: c.map(([e, t]) => /* @__PURE__ */
|
|
3168
|
-
})] }) : /* @__PURE__ */
|
|
3256
|
+
children: c.map(([e, t]) => /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", { children: e }), /* @__PURE__ */ M("dd", { children: /* @__PURE__ */ M("pre", { children: qr(t) }) })] }, e))
|
|
3257
|
+
})] }) : /* @__PURE__ */ M("p", {
|
|
3169
3258
|
className: "vdt-trace-no-attributes",
|
|
3170
3259
|
children: t.noAttributes
|
|
3171
3260
|
})
|
|
@@ -3175,14 +3264,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3175
3264
|
})
|
|
3176
3265
|
]
|
|
3177
3266
|
});
|
|
3178
|
-
},
|
|
3267
|
+
}, Yr = [
|
|
3179
3268
|
"all",
|
|
3180
3269
|
"subscription",
|
|
3181
3270
|
"mutation",
|
|
3182
3271
|
"action",
|
|
3183
3272
|
"trace",
|
|
3184
3273
|
"log"
|
|
3185
|
-
],
|
|
3274
|
+
], Xr = [
|
|
3186
3275
|
"workflows",
|
|
3187
3276
|
"stores",
|
|
3188
3277
|
"indexes",
|
|
@@ -3191,28 +3280,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3191
3280
|
"runtimes",
|
|
3192
3281
|
"pwa",
|
|
3193
3282
|
"desktop"
|
|
3194
|
-
],
|
|
3283
|
+
], Zr = [...Yr, ...Xr], Qr = (e) => Yr.includes(e), $r = (e) => {
|
|
3195
3284
|
let t = [], n = /"([^"]*)"|(\S+)/g, r;
|
|
3196
3285
|
for (; (r = n.exec(e)) !== null;) {
|
|
3197
3286
|
let e = (r[1] ?? r[2] ?? "").toLowerCase();
|
|
3198
3287
|
e !== "" && t.push(e);
|
|
3199
3288
|
}
|
|
3200
3289
|
return t;
|
|
3201
|
-
},
|
|
3290
|
+
}, ei = (e, t) => t.every((t) => e.includes(t)), ti = {
|
|
3202
3291
|
subscription: 0,
|
|
3203
3292
|
mutation: 1,
|
|
3204
3293
|
action: 1,
|
|
3205
3294
|
trace: 1,
|
|
3206
3295
|
log: 1
|
|
3207
|
-
},
|
|
3208
|
-
let r =
|
|
3209
|
-
return [...r.length === 0 ? i : i.filter((e) =>
|
|
3210
|
-
let n = Number(
|
|
3296
|
+
}, ni = (e) => (e.source === "mutation" || e.source === "action") && e.status === "pending", ri = (e, t, n) => {
|
|
3297
|
+
let r = $r(t), i = n === "all" ? e : e.filter((e) => e.source === n);
|
|
3298
|
+
return [...r.length === 0 ? i : i.filter((e) => ei(e.haystack, r))].sort((e, t) => {
|
|
3299
|
+
let n = Number(ni(t)) - Number(ni(e));
|
|
3211
3300
|
if (n !== 0) return n;
|
|
3212
|
-
let r =
|
|
3301
|
+
let r = ti[e.source] - ti[t.source];
|
|
3213
3302
|
return r === 0 ? t.at - e.at : r;
|
|
3214
3303
|
});
|
|
3215
|
-
},
|
|
3304
|
+
}, ii = (e) => {
|
|
3216
3305
|
let t = {
|
|
3217
3306
|
subscription: 0,
|
|
3218
3307
|
mutation: 0,
|
|
@@ -3222,7 +3311,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3222
3311
|
};
|
|
3223
3312
|
for (let n of e) t[n.source]++;
|
|
3224
3313
|
return t;
|
|
3225
|
-
},
|
|
3314
|
+
}, ai = (e, t = 400) => {
|
|
3226
3315
|
let n;
|
|
3227
3316
|
try {
|
|
3228
3317
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -3230,11 +3319,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3230
3319
|
n = String(e);
|
|
3231
3320
|
}
|
|
3232
3321
|
return n.length > t ? n.slice(0, t) : n;
|
|
3233
|
-
},
|
|
3322
|
+
}, oi = (e, t, n) => {
|
|
3234
3323
|
if (e.length === 0) return null;
|
|
3235
3324
|
let r = t === null ? -1 : e.indexOf(t);
|
|
3236
3325
|
return r === -1 ? n === 1 ? e[0] : e[e.length - 1] : e[(r + n + e.length) % e.length];
|
|
3237
|
-
},
|
|
3326
|
+
}, si = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.recovery.phase !== "steady" || e.snapshot.pendingPatches > 0 ? "warn" : e.snapshot.revision >= 0 ? "ok" : e.hasFiber ? "info" : "idle", ci = (e, t) => {
|
|
3238
3327
|
let n = Ze(t.key), r = [];
|
|
3239
3328
|
t.subscriberCount > 0 && r.push(`${t.subscriberCount} sub${t.subscriberCount === 1 ? "" : "s"}`), t.snapshot.revision >= 0 && r.push(`r${t.snapshot.revision}`), t.snapshot.pendingPatches > 0 && r.push(`+${t.snapshot.pendingPatches} pending`), t.evicting && r.push("evicting");
|
|
3240
3329
|
let i = t.snapshot.error ? "error" : t.recovery.phase === "steady" ? void 0 : t.recovery.phase;
|
|
@@ -3245,7 +3334,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3245
3334
|
name: n,
|
|
3246
3335
|
summary: r.join(" · "),
|
|
3247
3336
|
...i === void 0 ? {} : { status: i },
|
|
3248
|
-
tone:
|
|
3337
|
+
tone: si(t),
|
|
3249
3338
|
at: 0,
|
|
3250
3339
|
haystack: `${e} ${t.key} ${t.tag ?? ""} ${t.source ?? ""} ${i ?? ""}`.toLowerCase(),
|
|
3251
3340
|
detail: {
|
|
@@ -3254,16 +3343,16 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3254
3343
|
entry: t
|
|
3255
3344
|
}
|
|
3256
3345
|
};
|
|
3257
|
-
},
|
|
3258
|
-
let t = e.kind === "action" ? "action" : "mutation", n =
|
|
3346
|
+
}, li = (e) => e.status === "pending" ? "info" : e.status === "success" ? "ok" : "err", ui = (e) => e.status === "error" ? e.error instanceof Error && e.error.name !== "Error" ? e.error.name : "error" : e.status, di = (e) => {
|
|
3347
|
+
let t = e.kind === "action" ? "action" : "mutation", n = ai(e.input, 160), r = e.status === "error" ? e.error instanceof Error ? `${e.error.name} ${e.error.message}` : ai(e.error, 200) : "";
|
|
3259
3348
|
return {
|
|
3260
3349
|
id: `mut:${e.id}`,
|
|
3261
3350
|
source: t,
|
|
3262
3351
|
apiName: e.apiName,
|
|
3263
3352
|
name: e.tag,
|
|
3264
3353
|
summary: n,
|
|
3265
|
-
status:
|
|
3266
|
-
tone:
|
|
3354
|
+
status: ui(e),
|
|
3355
|
+
tone: li(e),
|
|
3267
3356
|
at: e.startedAt,
|
|
3268
3357
|
haystack: `${t} ${e.apiName} ${e.tag} ${e.status} ${n} ${r}`.toLowerCase(),
|
|
3269
3358
|
detail: {
|
|
@@ -3271,7 +3360,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3271
3360
|
mutation: e
|
|
3272
3361
|
}
|
|
3273
3362
|
};
|
|
3274
|
-
},
|
|
3363
|
+
}, fi = (e) => {
|
|
3275
3364
|
switch (e.level) {
|
|
3276
3365
|
case "error":
|
|
3277
3366
|
case "fatal": return "err";
|
|
@@ -3279,22 +3368,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3279
3368
|
case "info": return "info";
|
|
3280
3369
|
default: return "idle";
|
|
3281
3370
|
}
|
|
3282
|
-
},
|
|
3371
|
+
}, pi = (e, t) => ({
|
|
3283
3372
|
id: `log:${e.ts.getTime()}:${t}`,
|
|
3284
3373
|
source: "log",
|
|
3285
3374
|
name: e.scope ?? "log",
|
|
3286
3375
|
summary: e.message,
|
|
3287
3376
|
status: e.level,
|
|
3288
|
-
tone:
|
|
3377
|
+
tone: fi(e),
|
|
3289
3378
|
at: e.ts.getTime(),
|
|
3290
|
-
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${
|
|
3379
|
+
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${ai(e.fields, 300)}`.toLowerCase(),
|
|
3291
3380
|
detail: {
|
|
3292
3381
|
source: "log",
|
|
3293
3382
|
record: e
|
|
3294
3383
|
}
|
|
3295
|
-
}),
|
|
3384
|
+
}), mi = (e, t, n = Le.traces) => {
|
|
3296
3385
|
let r = t.spans.map((e) => e.attributes["db.operation.name"] ?? e.attributes["db.operation"]).find((e) => typeof e == "string"), i = t.spans.filter((e) => e.name !== t.rootName).slice(0, 3).map((e) => e.name).join(" → "), a = t.kind === "subscription" ? `${t.deliveryCount ?? 0} ${n.delivery(t.deliveryCount ?? 0)}` : [
|
|
3297
|
-
|
|
3386
|
+
Gr(t.durationMs),
|
|
3298
3387
|
n.spans(t.spanCount),
|
|
3299
3388
|
r ?? i
|
|
3300
3389
|
].filter(Boolean).join(" · "), o = t.spans.filter((e) => e.status === "error").map((e) => `${e.name} ${e.statusMessage ?? ""}`).join(" ");
|
|
@@ -3314,14 +3403,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3314
3403
|
trace: t
|
|
3315
3404
|
}
|
|
3316
3405
|
};
|
|
3317
|
-
},
|
|
3318
|
-
let n =
|
|
3406
|
+
}, hi = () => u(T, S, S), gi = () => u(ue, le, le), _i = (e, t = !1) => {
|
|
3407
|
+
let n = U().traces, r = Ye(), i = hi(), a = gi(), o = Wr(e, t);
|
|
3319
3408
|
return s(() => {
|
|
3320
3409
|
let e = [];
|
|
3321
|
-
for (let t of r) for (let n of t.entries) e.push(
|
|
3322
|
-
for (let t of i) e.push(
|
|
3323
|
-
for (let t of o) e.push(
|
|
3324
|
-
return a.forEach((t, n) => e.push(
|
|
3410
|
+
for (let t of r) for (let n of t.entries) e.push(ci(t.name, n));
|
|
3411
|
+
for (let t of i) e.push(di(t));
|
|
3412
|
+
for (let t of o) e.push(mi(t.apiName, t.trace, n));
|
|
3413
|
+
return a.forEach((t, n) => e.push(pi(t, n))), e;
|
|
3325
3414
|
}, [
|
|
3326
3415
|
r,
|
|
3327
3416
|
i,
|
|
@@ -3329,22 +3418,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3329
3418
|
o,
|
|
3330
3419
|
n
|
|
3331
3420
|
]);
|
|
3332
|
-
},
|
|
3421
|
+
}, vi = {
|
|
3333
3422
|
all: null,
|
|
3334
|
-
subscription:
|
|
3335
|
-
mutation:
|
|
3336
|
-
action:
|
|
3337
|
-
trace:
|
|
3338
|
-
log:
|
|
3339
|
-
workflows:
|
|
3340
|
-
stores:
|
|
3341
|
-
indexes:
|
|
3342
|
-
webhooks:
|
|
3343
|
-
routes:
|
|
3344
|
-
runtimes:
|
|
3345
|
-
pwa:
|
|
3346
|
-
desktop:
|
|
3347
|
-
},
|
|
3423
|
+
subscription: me,
|
|
3424
|
+
mutation: Te,
|
|
3425
|
+
action: Ce,
|
|
3426
|
+
trace: Se,
|
|
3427
|
+
log: De,
|
|
3428
|
+
workflows: xe,
|
|
3429
|
+
stores: he,
|
|
3430
|
+
indexes: Ee,
|
|
3431
|
+
webhooks: be,
|
|
3432
|
+
routes: ge,
|
|
3433
|
+
runtimes: Oe,
|
|
3434
|
+
pwa: Oe,
|
|
3435
|
+
desktop: Oe
|
|
3436
|
+
}, yi = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent) ? {
|
|
3348
3437
|
search: "⌘K",
|
|
3349
3438
|
alt: "⌥",
|
|
3350
3439
|
shift: "⇧"
|
|
@@ -3352,7 +3441,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3352
3441
|
search: "Ctrl K",
|
|
3353
3442
|
alt: "Alt",
|
|
3354
3443
|
shift: "Shift"
|
|
3355
|
-
},
|
|
3444
|
+
}, bi = (e, t, n) => {
|
|
3356
3445
|
if (n.trim() !== "") return {
|
|
3357
3446
|
title: e.noResults,
|
|
3358
3447
|
hint: e.noResultsHint
|
|
@@ -3383,14 +3472,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3383
3472
|
hint: e.emptyAllHint
|
|
3384
3473
|
};
|
|
3385
3474
|
}
|
|
3386
|
-
},
|
|
3475
|
+
}, xi = (e) => {
|
|
3387
3476
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
3388
3477
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
3389
|
-
},
|
|
3478
|
+
}, Si = ({ item: e, selected: t, onSelect: n }) => {
|
|
3390
3479
|
let r = c(null);
|
|
3391
3480
|
return i(() => {
|
|
3392
3481
|
t && r.current !== null && typeof r.current.scrollIntoView == "function" && r.current.scrollIntoView({ block: "nearest" });
|
|
3393
|
-
}, [t]), /* @__PURE__ */
|
|
3482
|
+
}, [t]), /* @__PURE__ */ N("button", {
|
|
3394
3483
|
ref: r,
|
|
3395
3484
|
type: "button",
|
|
3396
3485
|
role: "option",
|
|
@@ -3399,106 +3488,106 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3399
3488
|
className: `vdt-row${t ? " vdt-row-sel" : ""}`,
|
|
3400
3489
|
onClick: n,
|
|
3401
3490
|
children: [
|
|
3402
|
-
/* @__PURE__ */
|
|
3491
|
+
/* @__PURE__ */ M("span", {
|
|
3403
3492
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
3404
3493
|
"aria-hidden": "true"
|
|
3405
3494
|
}),
|
|
3406
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ M("span", {
|
|
3407
3496
|
className: "vdt-row-src",
|
|
3408
3497
|
children: e.source
|
|
3409
3498
|
}),
|
|
3410
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ N("span", {
|
|
3411
3500
|
className: "vdt-row-main",
|
|
3412
|
-
children: [/* @__PURE__ */
|
|
3501
|
+
children: [/* @__PURE__ */ M("code", {
|
|
3413
3502
|
className: "vdt-row-name",
|
|
3414
3503
|
children: e.name
|
|
3415
|
-
}), /* @__PURE__ */
|
|
3504
|
+
}), /* @__PURE__ */ M("span", {
|
|
3416
3505
|
className: "vdt-row-summary",
|
|
3417
3506
|
children: e.summary
|
|
3418
3507
|
})]
|
|
3419
3508
|
}),
|
|
3420
|
-
/* @__PURE__ */
|
|
3509
|
+
/* @__PURE__ */ N("span", {
|
|
3421
3510
|
className: "vdt-row-meta",
|
|
3422
3511
|
children: [
|
|
3423
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3512
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3424
3513
|
className: "vdt-row-api",
|
|
3425
3514
|
children: e.apiName
|
|
3426
3515
|
}),
|
|
3427
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3516
|
+
e.status === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3428
3517
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
3429
3518
|
children: e.status
|
|
3430
3519
|
}),
|
|
3431
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3520
|
+
e.at > 0 ? /* @__PURE__ */ M("span", {
|
|
3432
3521
|
className: "vdt-row-time",
|
|
3433
|
-
children:
|
|
3522
|
+
children: xi(e.at)
|
|
3434
3523
|
}) : null
|
|
3435
3524
|
]
|
|
3436
3525
|
})
|
|
3437
3526
|
]
|
|
3438
3527
|
});
|
|
3439
|
-
},
|
|
3440
|
-
let n = e.detail, r =
|
|
3441
|
-
return /* @__PURE__ */
|
|
3528
|
+
}, Ci = ({ item: e, retained: t }) => {
|
|
3529
|
+
let n = e.detail, r = U().shell;
|
|
3530
|
+
return /* @__PURE__ */ N("div", {
|
|
3442
3531
|
className: "vdt-detail",
|
|
3443
|
-
children: [/* @__PURE__ */
|
|
3532
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3444
3533
|
className: "vdt-detail-head",
|
|
3445
3534
|
children: [
|
|
3446
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ M("span", {
|
|
3447
3536
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
3448
3537
|
"aria-hidden": "true"
|
|
3449
3538
|
}),
|
|
3450
|
-
/* @__PURE__ */
|
|
3539
|
+
/* @__PURE__ */ M("span", {
|
|
3451
3540
|
className: "vdt-row-src",
|
|
3452
3541
|
children: e.source
|
|
3453
3542
|
}),
|
|
3454
|
-
/* @__PURE__ */
|
|
3543
|
+
/* @__PURE__ */ M("code", {
|
|
3455
3544
|
className: "vdt-detail-name",
|
|
3456
3545
|
children: e.name
|
|
3457
3546
|
}),
|
|
3458
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3547
|
+
e.status === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3459
3548
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
3460
3549
|
children: e.status
|
|
3461
3550
|
}),
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3552
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3464
3553
|
className: "vdt-row-api",
|
|
3465
3554
|
children: e.apiName
|
|
3466
3555
|
}),
|
|
3467
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3556
|
+
e.at > 0 ? /* @__PURE__ */ M("span", {
|
|
3468
3557
|
className: "vdt-row-time",
|
|
3469
|
-
children:
|
|
3558
|
+
children: xi(e.at)
|
|
3470
3559
|
}) : null
|
|
3471
3560
|
]
|
|
3472
|
-
}), /* @__PURE__ */
|
|
3561
|
+
}), /* @__PURE__ */ N("div", {
|
|
3473
3562
|
className: "vdt-detail-body",
|
|
3474
3563
|
children: [
|
|
3475
|
-
t ? /* @__PURE__ */
|
|
3564
|
+
t ? /* @__PURE__ */ M("p", {
|
|
3476
3565
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-muted",
|
|
3477
3566
|
role: "status",
|
|
3478
3567
|
children: r.retainedSelection
|
|
3479
3568
|
}) : null,
|
|
3480
|
-
n.source === "subscription" ? /* @__PURE__ */
|
|
3481
|
-
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */
|
|
3482
|
-
n.source === "trace" ? /* @__PURE__ */
|
|
3483
|
-
n.source === "log" ? /* @__PURE__ */
|
|
3569
|
+
n.source === "subscription" ? /* @__PURE__ */ M(Qe, { entry: n.entry }) : null,
|
|
3570
|
+
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */ M(Ir, { mutation: n.mutation }) : null,
|
|
3571
|
+
n.source === "trace" ? /* @__PURE__ */ M(Jr, { trace: n.trace }) : null,
|
|
3572
|
+
n.source === "log" ? /* @__PURE__ */ M(Br, { record: n.record }) : null
|
|
3484
3573
|
]
|
|
3485
3574
|
})]
|
|
3486
3575
|
});
|
|
3487
|
-
},
|
|
3488
|
-
let t =
|
|
3489
|
-
return /* @__PURE__ */
|
|
3576
|
+
}, wi = ({ name: e }) => {
|
|
3577
|
+
let t = U().shell, n = D(e).status, r = n === "connected" ? "ok" : n === "recovering" ? "warn" : "err", i = n === "connected" ? t.connected : n === "recovering" ? t.recovering : n === "degraded" ? t.degraded : t.offline;
|
|
3578
|
+
return /* @__PURE__ */ N("span", {
|
|
3490
3579
|
className: "vdt-chip",
|
|
3491
3580
|
"data-status": n,
|
|
3492
3581
|
children: [
|
|
3493
|
-
/* @__PURE__ */
|
|
3582
|
+
/* @__PURE__ */ M("span", {
|
|
3494
3583
|
className: `vdt-dot vdt-dot-${r}`,
|
|
3495
3584
|
"aria-hidden": "true"
|
|
3496
3585
|
}),
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ M("b", { children: e }),
|
|
3587
|
+
/* @__PURE__ */ M("span", { children: i })
|
|
3499
3588
|
]
|
|
3500
3589
|
});
|
|
3501
|
-
},
|
|
3590
|
+
}, Ti = () => u(h, () => f().pathname ?? "", () => ""), Ei = (e) => {
|
|
3502
3591
|
let t = e.detail;
|
|
3503
3592
|
switch (t.source) {
|
|
3504
3593
|
case "subscription": return t.entry;
|
|
@@ -3507,25 +3596,25 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3507
3596
|
case "trace": return t.trace;
|
|
3508
3597
|
case "log": return t.record;
|
|
3509
3598
|
}
|
|
3510
|
-
},
|
|
3511
|
-
let f =
|
|
3599
|
+
}, Di = ({ dock: e, push: t, onDock: n, onPush: r, onClose: a, scope: o, onScope: c, searchRef: u, onHeaderPointerDown: d }) => {
|
|
3600
|
+
let f = U(), p = f.shell, m = f.tabs, h = O(), [g, _] = l(!1), v = _i(!0, g), y = Ln(!0), b = Wn(!0), x = cr(!0), S = Ti(), [C, w] = l(""), [T, ee] = l(!1), [E, D] = l(null), k = E?.id ?? null;
|
|
3512
3601
|
i(() => {
|
|
3513
|
-
if (
|
|
3514
|
-
let e = v.find((e) => e.id ===
|
|
3515
|
-
e !== void 0 &&
|
|
3516
|
-
}, [v,
|
|
3517
|
-
let
|
|
3518
|
-
let e = F ?? (I ?
|
|
3519
|
-
return e !== null &&
|
|
3602
|
+
if (E === null || E.source === "subscription") return;
|
|
3603
|
+
let e = v.find((e) => e.id === E.id);
|
|
3604
|
+
e !== void 0 && Ei(e) !== Ei(E) && D(e);
|
|
3605
|
+
}, [v, E]);
|
|
3606
|
+
let te = Qr(o), A = s(() => ii(v), [v]), ne = s(() => v.filter((e) => e.source === "trace" && e.tone === "err").length, [v]), P = s(() => v.filter(ni).length, [v]), F = E === null ? null : v.find((e) => e.id === E.id) ?? null, I = E !== null && E.source !== "subscription" && F === null, L = s(() => {
|
|
3607
|
+
let e = F ?? (I ? E : null);
|
|
3608
|
+
return e !== null && ri([e], C, o).length > 0 ? e : null;
|
|
3520
3609
|
}, [
|
|
3521
3610
|
F,
|
|
3522
3611
|
I,
|
|
3523
|
-
|
|
3612
|
+
E,
|
|
3524
3613
|
C,
|
|
3525
3614
|
o
|
|
3526
3615
|
]), R = s(() => {
|
|
3527
3616
|
let e = I && L !== null ? [...v, L] : v;
|
|
3528
|
-
return
|
|
3617
|
+
return ri(T ? e.filter(ni) : e, C, o);
|
|
3529
3618
|
}, [
|
|
3530
3619
|
v,
|
|
3531
3620
|
C,
|
|
@@ -3533,30 +3622,30 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3533
3622
|
T,
|
|
3534
3623
|
I,
|
|
3535
3624
|
L
|
|
3536
|
-
]),
|
|
3625
|
+
]), z = s(() => T && C.trim() === "" ? {
|
|
3537
3626
|
title: p.emptyPending,
|
|
3538
3627
|
hint: p.emptyPendingHint
|
|
3539
|
-
} :
|
|
3628
|
+
} : bi(p, o, C), [
|
|
3540
3629
|
p,
|
|
3541
3630
|
o,
|
|
3542
3631
|
C,
|
|
3543
3632
|
T
|
|
3544
|
-
]),
|
|
3545
|
-
|
|
3546
|
-
},
|
|
3633
|
+
]), B = (e) => {
|
|
3634
|
+
D(e === null ? null : R.find((t) => t.id === e) ?? null);
|
|
3635
|
+
}, re = (e) => {
|
|
3547
3636
|
switch (e) {
|
|
3548
3637
|
case "all": return v.length;
|
|
3549
|
-
case "subscription": return
|
|
3550
|
-
case "mutation": return
|
|
3551
|
-
case "action": return
|
|
3552
|
-
case "trace": return
|
|
3553
|
-
case "log": return
|
|
3638
|
+
case "subscription": return A.subscription;
|
|
3639
|
+
case "mutation": return A.mutation;
|
|
3640
|
+
case "action": return A.action;
|
|
3641
|
+
case "trace": return A.trace;
|
|
3642
|
+
case "log": return A.log;
|
|
3554
3643
|
case "indexes": return y;
|
|
3555
3644
|
case "webhooks": return b;
|
|
3556
3645
|
case "workflows": return x;
|
|
3557
3646
|
default: return null;
|
|
3558
3647
|
}
|
|
3559
|
-
},
|
|
3648
|
+
}, V = (e) => {
|
|
3560
3649
|
switch (e) {
|
|
3561
3650
|
case "all": return p.scopeAll;
|
|
3562
3651
|
case "subscription": return m.subscriptions;
|
|
@@ -3574,232 +3663,232 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3574
3663
|
case "desktop": return m.desktop;
|
|
3575
3664
|
}
|
|
3576
3665
|
};
|
|
3577
|
-
return /* @__PURE__ */
|
|
3578
|
-
/* @__PURE__ */
|
|
3666
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
3667
|
+
/* @__PURE__ */ N("header", {
|
|
3579
3668
|
className: "vdt-bar",
|
|
3580
3669
|
onPointerDown: d,
|
|
3581
3670
|
children: [
|
|
3582
|
-
e === "window" ? /* @__PURE__ */
|
|
3671
|
+
e === "window" ? /* @__PURE__ */ M("span", {
|
|
3583
3672
|
className: "vdt-win-handle",
|
|
3584
3673
|
title: p.moveTitle,
|
|
3585
3674
|
"aria-hidden": "true",
|
|
3586
|
-
children: /* @__PURE__ */
|
|
3675
|
+
children: /* @__PURE__ */ M(Fe, { className: "vdt:w-4 vdt:h-4" })
|
|
3587
3676
|
}) : null,
|
|
3588
|
-
/* @__PURE__ */
|
|
3589
|
-
|
|
3677
|
+
/* @__PURE__ */ M(de, { className: "vdt-bar-mark" }),
|
|
3678
|
+
te ? /* @__PURE__ */ N("label", {
|
|
3590
3679
|
className: "vdt-search",
|
|
3591
3680
|
children: [
|
|
3592
|
-
/* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3681
|
+
/* @__PURE__ */ M(we, { className: "vdt:w-3.5 vdt:h-3.5" }),
|
|
3682
|
+
/* @__PURE__ */ M("input", {
|
|
3594
3683
|
ref: u,
|
|
3595
3684
|
type: "search",
|
|
3596
3685
|
value: C,
|
|
3597
3686
|
onChange: (e) => w(e.target.value),
|
|
3598
3687
|
onKeyDown: (e) => {
|
|
3599
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3688
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), B(oi(R.map((e) => e.id), k, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" ? C === "" ? a() : (e.preventDefault(), w("")) : e.key === "Enter" && L === null && R.length > 0 && B(R[0].id);
|
|
3600
3689
|
},
|
|
3601
3690
|
placeholder: p.searchPlaceholder,
|
|
3602
3691
|
"aria-label": p.searchLabel,
|
|
3603
3692
|
autoComplete: "off",
|
|
3604
3693
|
spellCheck: !1
|
|
3605
3694
|
}),
|
|
3606
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ M("kbd", {
|
|
3607
3696
|
className: "vdt-kbd",
|
|
3608
|
-
children:
|
|
3697
|
+
children: yi.search
|
|
3609
3698
|
})
|
|
3610
3699
|
]
|
|
3611
|
-
}) : /* @__PURE__ */
|
|
3700
|
+
}) : /* @__PURE__ */ N("span", {
|
|
3612
3701
|
className: "vdt-bar-title",
|
|
3613
|
-
children: [/* @__PURE__ */
|
|
3702
|
+
children: [/* @__PURE__ */ M("span", {
|
|
3614
3703
|
className: "vdt-bar-brand",
|
|
3615
3704
|
children: p.brandWord
|
|
3616
|
-
}), /* @__PURE__ */
|
|
3705
|
+
}), /* @__PURE__ */ M("span", {
|
|
3617
3706
|
className: "vdt-bar-kicker",
|
|
3618
3707
|
children: p.kicker
|
|
3619
3708
|
})]
|
|
3620
3709
|
}),
|
|
3621
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ M("div", {
|
|
3622
3711
|
role: "tablist",
|
|
3623
3712
|
"aria-label": p.brand,
|
|
3624
3713
|
className: "vdt-scopes",
|
|
3625
|
-
children:
|
|
3626
|
-
let n =
|
|
3627
|
-
return /* @__PURE__ */
|
|
3714
|
+
children: Zr.map((e, t) => {
|
|
3715
|
+
let n = vi[e], r = re(e), i = e === o;
|
|
3716
|
+
return /* @__PURE__ */ N("button", {
|
|
3628
3717
|
type: "button",
|
|
3629
3718
|
role: "tab",
|
|
3630
|
-
"aria-label": r !== null && r > 0 ? `${
|
|
3719
|
+
"aria-label": r !== null && r > 0 ? `${V(e)} (${r})` : V(e),
|
|
3631
3720
|
"aria-selected": i,
|
|
3632
3721
|
"data-scope": e,
|
|
3633
|
-
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t ===
|
|
3722
|
+
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t === Yr.length ? " vdt-scope-sep" : ""}`,
|
|
3634
3723
|
onClick: () => {
|
|
3635
|
-
c(e),
|
|
3724
|
+
c(e), B(null), ee(!1), Qr(e) && requestAnimationFrame(() => {
|
|
3636
3725
|
let e = u.current;
|
|
3637
3726
|
e !== null && e.getRootNode().activeElement !== e && e.focus();
|
|
3638
3727
|
});
|
|
3639
3728
|
},
|
|
3640
3729
|
children: [
|
|
3641
|
-
n ? /* @__PURE__ */
|
|
3642
|
-
/* @__PURE__ */
|
|
3730
|
+
n ? /* @__PURE__ */ M(n, { className: "vdt:w-3.5 vdt:h-3.5" }) : null,
|
|
3731
|
+
/* @__PURE__ */ M("span", {
|
|
3643
3732
|
className: "vdt-scope-label",
|
|
3644
|
-
children:
|
|
3733
|
+
children: V(e)
|
|
3645
3734
|
}),
|
|
3646
|
-
r !== null && r > 0 ? /* @__PURE__ */
|
|
3647
|
-
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" &&
|
|
3735
|
+
r !== null && r > 0 ? /* @__PURE__ */ M("span", {
|
|
3736
|
+
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" && ne > 0 ? " vdt-badge-err" : ""}`,
|
|
3648
3737
|
children: r
|
|
3649
3738
|
}) : null
|
|
3650
3739
|
]
|
|
3651
3740
|
}, e);
|
|
3652
3741
|
})
|
|
3653
3742
|
}),
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */
|
|
3743
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3744
|
+
/* @__PURE__ */ M(Ut, {
|
|
3656
3745
|
dock: e,
|
|
3657
3746
|
push: t,
|
|
3658
3747
|
onDock: n,
|
|
3659
3748
|
onPush: r
|
|
3660
3749
|
}),
|
|
3661
|
-
/* @__PURE__ */
|
|
3750
|
+
/* @__PURE__ */ M("button", {
|
|
3662
3751
|
type: "button",
|
|
3663
3752
|
className: "vdt-iconbtn",
|
|
3664
3753
|
title: p.closeTitle,
|
|
3665
3754
|
"aria-label": p.closeTitle,
|
|
3666
3755
|
onClick: a,
|
|
3667
|
-
children: /* @__PURE__ */
|
|
3756
|
+
children: /* @__PURE__ */ M(pe, { className: "vdt:w-4 vdt:h-4" })
|
|
3668
3757
|
})
|
|
3669
3758
|
]
|
|
3670
3759
|
}),
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
|
|
3760
|
+
/* @__PURE__ */ M(ln, {}),
|
|
3761
|
+
te ? /* @__PURE__ */ N("div", {
|
|
3673
3762
|
className: "vdt-body",
|
|
3674
3763
|
"data-empty": R.length === 0 && L === null ? "true" : "false",
|
|
3675
|
-
children: [/* @__PURE__ */
|
|
3764
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3676
3765
|
role: "listbox",
|
|
3677
3766
|
"aria-label": p.results(R.length),
|
|
3678
3767
|
tabIndex: 0,
|
|
3679
3768
|
className: "vdt-results",
|
|
3680
3769
|
onKeyDown: (e) => {
|
|
3681
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3770
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), B(oi(R.map((e) => e.id), k, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" && a();
|
|
3682
3771
|
},
|
|
3683
|
-
children: R.length === 0 ? /* @__PURE__ */
|
|
3772
|
+
children: R.length === 0 ? /* @__PURE__ */ N("div", {
|
|
3684
3773
|
className: "vdt-empty",
|
|
3685
|
-
children: [/* @__PURE__ */
|
|
3774
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3686
3775
|
className: "vdt-empty-title",
|
|
3687
|
-
children:
|
|
3688
|
-
}), /* @__PURE__ */
|
|
3776
|
+
children: z.title
|
|
3777
|
+
}), /* @__PURE__ */ M("div", {
|
|
3689
3778
|
className: "vdt-empty-hint",
|
|
3690
|
-
children:
|
|
3779
|
+
children: z.hint
|
|
3691
3780
|
})]
|
|
3692
|
-
}) : R.map((e) => /* @__PURE__ */
|
|
3781
|
+
}) : R.map((e) => /* @__PURE__ */ M(Si, {
|
|
3693
3782
|
item: e,
|
|
3694
|
-
selected: e.id ===
|
|
3695
|
-
onSelect: () =>
|
|
3783
|
+
selected: e.id === k,
|
|
3784
|
+
onSelect: () => B(e.id === k ? null : e.id)
|
|
3696
3785
|
}, e.id))
|
|
3697
|
-
}), /* @__PURE__ */
|
|
3786
|
+
}), /* @__PURE__ */ M("aside", {
|
|
3698
3787
|
className: "vdt-side",
|
|
3699
3788
|
"aria-live": "polite",
|
|
3700
|
-
children: L === null ? /* @__PURE__ */
|
|
3789
|
+
children: L === null ? /* @__PURE__ */ M("div", {
|
|
3701
3790
|
className: "vdt-empty vdt-empty-side",
|
|
3702
|
-
children: /* @__PURE__ */
|
|
3791
|
+
children: /* @__PURE__ */ M("div", {
|
|
3703
3792
|
className: "vdt-empty-hint",
|
|
3704
3793
|
children: p.selectHint
|
|
3705
3794
|
})
|
|
3706
|
-
}) : /* @__PURE__ */
|
|
3795
|
+
}) : /* @__PURE__ */ M(Ci, {
|
|
3707
3796
|
item: L,
|
|
3708
3797
|
retained: I
|
|
3709
3798
|
})
|
|
3710
3799
|
})]
|
|
3711
|
-
}) : /* @__PURE__ */
|
|
3800
|
+
}) : /* @__PURE__ */ N("div", {
|
|
3712
3801
|
className: "vdt-body vdt-body-panel",
|
|
3713
3802
|
children: [
|
|
3714
|
-
o === "workflows" ? /* @__PURE__ */
|
|
3715
|
-
o === "stores" ? /* @__PURE__ */
|
|
3716
|
-
o === "indexes" ? /* @__PURE__ */
|
|
3717
|
-
o === "webhooks" ? /* @__PURE__ */
|
|
3718
|
-
o === "routes" ? /* @__PURE__ */
|
|
3719
|
-
o === "runtimes" ? /* @__PURE__ */
|
|
3720
|
-
o === "pwa" ? /* @__PURE__ */
|
|
3721
|
-
o === "desktop" ? /* @__PURE__ */
|
|
3803
|
+
o === "workflows" ? /* @__PURE__ */ M(lr, {}) : null,
|
|
3804
|
+
o === "stores" ? /* @__PURE__ */ M(Nr, {}) : null,
|
|
3805
|
+
o === "indexes" ? /* @__PURE__ */ M(Pn, {}) : null,
|
|
3806
|
+
o === "webhooks" ? /* @__PURE__ */ M(Kn, {}) : null,
|
|
3807
|
+
o === "routes" ? /* @__PURE__ */ M(_r, {}) : null,
|
|
3808
|
+
o === "runtimes" ? /* @__PURE__ */ M(yr, {}) : null,
|
|
3809
|
+
o === "pwa" ? /* @__PURE__ */ M(Tr, {}) : null,
|
|
3810
|
+
o === "desktop" ? /* @__PURE__ */ M(Or, {}) : null
|
|
3722
3811
|
]
|
|
3723
3812
|
}),
|
|
3724
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ N("footer", {
|
|
3725
3814
|
className: "vdt-foot",
|
|
3726
3815
|
children: [
|
|
3727
|
-
o === "trace" ? /* @__PURE__ */
|
|
3816
|
+
o === "trace" ? /* @__PURE__ */ M("button", {
|
|
3728
3817
|
type: "button",
|
|
3729
3818
|
className: "vdt-chip vdt-background-filter",
|
|
3730
3819
|
"aria-pressed": g,
|
|
3731
3820
|
onClick: () => _(!g),
|
|
3732
3821
|
children: f.traces.includeBackground
|
|
3733
3822
|
}) : null,
|
|
3734
|
-
|
|
3823
|
+
P > 0 || T ? /* @__PURE__ */ N("button", {
|
|
3735
3824
|
type: "button",
|
|
3736
3825
|
className: "vdt-chip vdt-chip-info vdt-pending-filter",
|
|
3737
3826
|
"data-chip": "pending",
|
|
3738
|
-
"aria-label": p.pendingInvocations(
|
|
3827
|
+
"aria-label": p.pendingInvocations(P),
|
|
3739
3828
|
"aria-pressed": T,
|
|
3740
3829
|
onClick: () => {
|
|
3741
|
-
|
|
3830
|
+
ee(!T), c("all"), w(""), B(null);
|
|
3742
3831
|
},
|
|
3743
3832
|
children: [
|
|
3744
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ M("span", {
|
|
3745
3834
|
className: "vdt-dot vdt-dot-info",
|
|
3746
3835
|
"aria-hidden": "true"
|
|
3747
3836
|
}),
|
|
3748
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ M("b", { children: P }),
|
|
3749
3838
|
" ",
|
|
3750
3839
|
p.pending
|
|
3751
3840
|
]
|
|
3752
3841
|
}) : null,
|
|
3753
|
-
h.names.map((e) => /* @__PURE__ */
|
|
3754
|
-
S === "" ? null : /* @__PURE__ */
|
|
3842
|
+
h.names.map((e) => /* @__PURE__ */ M(wi, { name: e }, e)),
|
|
3843
|
+
S === "" ? null : /* @__PURE__ */ M("span", {
|
|
3755
3844
|
className: "vdt-foot-route",
|
|
3756
|
-
children: /* @__PURE__ */
|
|
3845
|
+
children: /* @__PURE__ */ M("code", { children: S })
|
|
3757
3846
|
}),
|
|
3758
|
-
/* @__PURE__ */
|
|
3759
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3848
|
+
/* @__PURE__ */ N("span", {
|
|
3760
3849
|
className: "vdt-hints",
|
|
3761
3850
|
children: [
|
|
3762
|
-
/* @__PURE__ */
|
|
3763
|
-
/* @__PURE__ */
|
|
3851
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3852
|
+
/* @__PURE__ */ M("kbd", {
|
|
3764
3853
|
className: "vdt-kbd",
|
|
3765
3854
|
children: "↑↓"
|
|
3766
3855
|
}),
|
|
3767
3856
|
" ",
|
|
3768
3857
|
p.hintNavigate
|
|
3769
3858
|
] }),
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3859
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3860
|
+
/* @__PURE__ */ M("kbd", {
|
|
3772
3861
|
className: "vdt-kbd",
|
|
3773
3862
|
children: "↵"
|
|
3774
3863
|
}),
|
|
3775
3864
|
" ",
|
|
3776
3865
|
p.hintOpen
|
|
3777
3866
|
] }),
|
|
3778
|
-
/* @__PURE__ */
|
|
3779
|
-
/* @__PURE__ */
|
|
3867
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3868
|
+
/* @__PURE__ */ M("kbd", {
|
|
3780
3869
|
className: "vdt-kbd",
|
|
3781
|
-
children:
|
|
3870
|
+
children: yi.alt
|
|
3782
3871
|
}),
|
|
3783
3872
|
"+",
|
|
3784
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ M("kbd", {
|
|
3785
3874
|
className: "vdt-kbd",
|
|
3786
3875
|
children: "V"
|
|
3787
3876
|
}),
|
|
3788
3877
|
" ",
|
|
3789
3878
|
p.hintToggle
|
|
3790
3879
|
] }),
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
3880
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3881
|
+
/* @__PURE__ */ M("kbd", {
|
|
3793
3882
|
className: "vdt-kbd",
|
|
3794
|
-
children:
|
|
3883
|
+
children: yi.alt
|
|
3795
3884
|
}),
|
|
3796
3885
|
"+",
|
|
3797
|
-
/* @__PURE__ */
|
|
3886
|
+
/* @__PURE__ */ M("kbd", {
|
|
3798
3887
|
className: "vdt-kbd",
|
|
3799
|
-
children:
|
|
3888
|
+
children: yi.shift
|
|
3800
3889
|
}),
|
|
3801
3890
|
"+",
|
|
3802
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ M("kbd", {
|
|
3803
3892
|
className: "vdt-kbd",
|
|
3804
3893
|
children: "←↑↓→"
|
|
3805
3894
|
}),
|
|
@@ -3811,17 +3900,17 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3811
3900
|
]
|
|
3812
3901
|
})
|
|
3813
3902
|
] });
|
|
3814
|
-
},
|
|
3815
|
-
let n =
|
|
3816
|
-
return /* @__PURE__ */
|
|
3903
|
+
}, Oi = ({ error: e, onReset: t }) => {
|
|
3904
|
+
let n = U().shell;
|
|
3905
|
+
return /* @__PURE__ */ N("div", {
|
|
3817
3906
|
role: "alert",
|
|
3818
3907
|
className: "vdt-crash",
|
|
3819
3908
|
children: [
|
|
3820
|
-
/* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ M("div", {
|
|
3821
3910
|
className: "vdt-crash-title",
|
|
3822
3911
|
children: n.crashTitle
|
|
3823
3912
|
}),
|
|
3824
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ N("pre", {
|
|
3825
3914
|
className: "vdt-crash-message",
|
|
3826
3915
|
children: [
|
|
3827
3916
|
e.name,
|
|
@@ -3829,7 +3918,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3829
3918
|
e.message
|
|
3830
3919
|
]
|
|
3831
3920
|
}),
|
|
3832
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ M("button", {
|
|
3833
3922
|
type: "button",
|
|
3834
3923
|
className: "vdt-crash-reset",
|
|
3835
3924
|
onClick: t,
|
|
@@ -3837,7 +3926,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3837
3926
|
})
|
|
3838
3927
|
]
|
|
3839
3928
|
});
|
|
3840
|
-
},
|
|
3929
|
+
}, ki = class extends e {
|
|
3841
3930
|
state = { error: null };
|
|
3842
3931
|
static getDerivedStateFromError(e) {
|
|
3843
3932
|
return { error: e };
|
|
@@ -3846,15 +3935,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3846
3935
|
this.props.onError?.(e, t);
|
|
3847
3936
|
}
|
|
3848
3937
|
render() {
|
|
3849
|
-
return this.state.error === null ? this.props.children : /* @__PURE__ */
|
|
3938
|
+
return this.state.error === null ? this.props.children : /* @__PURE__ */ M(Oi, {
|
|
3850
3939
|
error: this.state.error,
|
|
3851
3940
|
onReset: () => this.setState({ error: null })
|
|
3852
3941
|
});
|
|
3853
3942
|
}
|
|
3854
|
-
},
|
|
3943
|
+
}, Ai = /vdt/, ji = (e, t) => {
|
|
3855
3944
|
for (let n of Array.from(e)) {
|
|
3856
3945
|
if (n instanceof CSSStyleRule) {
|
|
3857
|
-
|
|
3946
|
+
(Ai.test(n.selectorText) || Array.from(n.style).some((e) => e.startsWith("--vdt-"))) && t.push(n.cssText);
|
|
3858
3947
|
continue;
|
|
3859
3948
|
}
|
|
3860
3949
|
if (n instanceof CSSKeyframesRule) {
|
|
@@ -3863,14 +3952,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3863
3952
|
}
|
|
3864
3953
|
if (n instanceof CSSGroupingRule || n instanceof CSSLayerBlockRule) {
|
|
3865
3954
|
let e = [];
|
|
3866
|
-
if (
|
|
3955
|
+
if (ji(n.cssRules, e), e.length === 0) continue;
|
|
3867
3956
|
let r = n.cssText, i = r.slice(0, r.indexOf("{")).trim();
|
|
3868
3957
|
t.push(`${i} {\n${e.join("\n")}\n}`);
|
|
3869
3958
|
continue;
|
|
3870
3959
|
}
|
|
3871
|
-
n.constructor.name === "CSSPropertyRule" &&
|
|
3960
|
+
n.constructor.name === "CSSPropertyRule" && Ai.test(n.cssText) && t.push(n.cssText), n.constructor.name === "CSSLayerStatementRule" && t.push(n.cssText);
|
|
3961
|
+
}
|
|
3962
|
+
}, Mi = (e) => {
|
|
3963
|
+
let t = [], n = (e) => {
|
|
3964
|
+
for (let r of Array.from(e)) r.constructor.name === "CSSPropertyRule" && /@property\s+--(tw|vdt)-/.test(r.cssText) ? t.push(r.cssText) : (r instanceof CSSGroupingRule || r instanceof CSSLayerBlockRule) && n(r.cssRules);
|
|
3965
|
+
};
|
|
3966
|
+
for (let t of Array.from(e.styleSheets)) {
|
|
3967
|
+
let e;
|
|
3968
|
+
try {
|
|
3969
|
+
e = t.cssRules;
|
|
3970
|
+
} catch {
|
|
3971
|
+
continue;
|
|
3972
|
+
}
|
|
3973
|
+
n(e);
|
|
3872
3974
|
}
|
|
3873
|
-
|
|
3975
|
+
return t.join("\n");
|
|
3976
|
+
}, Ni = (e) => {
|
|
3874
3977
|
let t = [];
|
|
3875
3978
|
for (let n of Array.from(e.styleSheets)) {
|
|
3876
3979
|
let e;
|
|
@@ -3879,66 +3982,107 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3879
3982
|
} catch {
|
|
3880
3983
|
continue;
|
|
3881
3984
|
}
|
|
3882
|
-
|
|
3985
|
+
ji(e, t);
|
|
3883
3986
|
}
|
|
3884
3987
|
return t.join("\n");
|
|
3885
|
-
},
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3988
|
+
}, Pi = (e, t) => {
|
|
3989
|
+
let n = e.ownerDocument.defaultView?.CSSStyleSheet;
|
|
3990
|
+
if (n !== void 0 && "replaceSync" in n.prototype && "adoptedStyleSheets" in e) {
|
|
3991
|
+
let r = new n();
|
|
3992
|
+
r.replaceSync(t), e.adoptedStyleSheets = [r];
|
|
3889
3993
|
return;
|
|
3890
3994
|
}
|
|
3891
|
-
let
|
|
3892
|
-
|
|
3893
|
-
},
|
|
3894
|
-
let
|
|
3995
|
+
let r = e.querySelector("style[data-vdt]");
|
|
3996
|
+
r === null && (r = e.ownerDocument.createElement("style"), r.setAttribute("data-vdt", ""), e.prepend(r)), r.textContent = t;
|
|
3997
|
+
}, Fi = ({ children: e, target: t }) => {
|
|
3998
|
+
let [n, r] = l(null);
|
|
3895
3999
|
return o(() => {
|
|
3896
|
-
let e = t.
|
|
3897
|
-
|
|
3898
|
-
let
|
|
3899
|
-
|
|
3900
|
-
let
|
|
3901
|
-
|
|
3902
|
-
|
|
4000
|
+
let e = document, n = t ?? e, i = n.createElement("div");
|
|
4001
|
+
i.className = "vdt-root", i.setAttribute("data-voltro-devtools", ""), n.documentElement.append(i);
|
|
4002
|
+
let a = i.attachShadow({ mode: "open" }), o = n.createElement("div");
|
|
4003
|
+
o.setAttribute("data-vdt-mount", ""), a.append(o);
|
|
4004
|
+
let s = n === e ? null : n.createElement("style");
|
|
4005
|
+
s !== null && (s.setAttribute("data-vdt-properties", ""), n.head.append(s));
|
|
4006
|
+
let c = "", l = () => {
|
|
4007
|
+
if (s !== null) {
|
|
4008
|
+
let t = Mi(e);
|
|
4009
|
+
s.textContent !== t && (s.textContent = t);
|
|
4010
|
+
}
|
|
4011
|
+
let t = Ni(e);
|
|
4012
|
+
t !== c && (c = t, Pi(a, t));
|
|
3903
4013
|
};
|
|
3904
|
-
|
|
3905
|
-
let
|
|
3906
|
-
return
|
|
4014
|
+
l();
|
|
4015
|
+
let u = typeof MutationObserver > "u" ? null : new MutationObserver(() => l());
|
|
4016
|
+
return u?.observe(e.head, {
|
|
3907
4017
|
childList: !0,
|
|
3908
4018
|
subtree: !0,
|
|
3909
4019
|
characterData: !0
|
|
3910
|
-
}), r(
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
4020
|
+
}), r(o), () => {
|
|
4021
|
+
u?.disconnect(), i.remove(), s?.remove(), r(null);
|
|
4022
|
+
};
|
|
4023
|
+
}, [t]), n === null ? null : ne(e, n);
|
|
4024
|
+
}, Ii = () => u(g, p, p), Li = ["overflow"], Ri = [
|
|
4025
|
+
"position",
|
|
4026
|
+
"top",
|
|
4027
|
+
"right",
|
|
4028
|
+
"bottom",
|
|
4029
|
+
"left",
|
|
4030
|
+
"overflow",
|
|
4031
|
+
"contain"
|
|
4032
|
+
], zi = (e, t) => t.map((t) => [
|
|
4033
|
+
t,
|
|
4034
|
+
e.getPropertyValue(t),
|
|
4035
|
+
e.getPropertyPriority(t)
|
|
4036
|
+
]), Bi = (e, t) => {
|
|
4037
|
+
for (let [n, r, i] of t) r === "" ? e.removeProperty(n) : e.setProperty(n, r, i);
|
|
4038
|
+
}, Vi = (e, t, n = document) => {
|
|
4039
|
+
let r = n.documentElement, i = n.body, a = n.defaultView, o = zi(r.style, Li), s = zi(i.style, Ri), c = a?.scrollX ?? 0, l = a?.scrollY ?? 0;
|
|
4040
|
+
r.style.setProperty("overflow", "hidden"), i.style.setProperty("position", "fixed");
|
|
4041
|
+
for (let e of [
|
|
4042
|
+
"top",
|
|
4043
|
+
"right",
|
|
4044
|
+
"bottom",
|
|
4045
|
+
"left"
|
|
4046
|
+
]) i.style.setProperty(e, "0px");
|
|
4047
|
+
return i.style.setProperty(e, `${t}px`), i.style.setProperty("overflow", "auto"), i.style.setProperty("contain", "layout paint"), i.scrollTop = l, i.scrollLeft = c, {
|
|
4048
|
+
resize: (t) => {
|
|
4049
|
+
i.style.setProperty(e, `${t}px`);
|
|
4050
|
+
},
|
|
4051
|
+
release: () => {
|
|
4052
|
+
let e = i.scrollTop, t = i.scrollLeft;
|
|
4053
|
+
Bi(i.style, s), Bi(r.style, o), a?.scrollTo(t, e);
|
|
4054
|
+
}
|
|
4055
|
+
};
|
|
4056
|
+
}, Hi = (e, t) => {
|
|
4057
|
+
let n = window.open("", `voltro-devtools-${Date.now().toString(36)}`, `popup,width=${Math.round(e.w)},height=${Math.round(e.h)}`);
|
|
4058
|
+
if (n === null) return null;
|
|
4059
|
+
let r = n.document;
|
|
4060
|
+
return r.title = t, r.documentElement.style.setProperty("color-scheme", "dark"), r.documentElement.style.setProperty("background", "#100c19"), r.body.style.setProperty("margin", "0"), n;
|
|
4061
|
+
}, Ui = "voltro:devtools:open", Wi = (e) => {
|
|
3918
4062
|
if (typeof window > "u") return e;
|
|
3919
4063
|
try {
|
|
3920
|
-
let t = window.localStorage.getItem(
|
|
4064
|
+
let t = window.localStorage.getItem(Ui);
|
|
3921
4065
|
return t === null ? e : t === "1";
|
|
3922
4066
|
} catch {
|
|
3923
4067
|
return e;
|
|
3924
4068
|
}
|
|
3925
|
-
},
|
|
4069
|
+
}, Gi = (e) => {
|
|
3926
4070
|
if (!(typeof window > "u")) try {
|
|
3927
|
-
window.localStorage.setItem(
|
|
4071
|
+
window.localStorage.setItem(Ui, e ? "1" : "0");
|
|
3928
4072
|
} catch {}
|
|
3929
|
-
},
|
|
3930
|
-
let i =
|
|
3931
|
-
return /* @__PURE__ */
|
|
4073
|
+
}, Ki = ({ initialIsOpen: e = !1, initialDock: t = "bottom", strings: n, inspectToken: r } = {}) => {
|
|
4074
|
+
let i = pn(r);
|
|
4075
|
+
return /* @__PURE__ */ M(dn, {
|
|
3932
4076
|
token: i,
|
|
3933
|
-
children: /* @__PURE__ */
|
|
4077
|
+
children: /* @__PURE__ */ M(Be, {
|
|
3934
4078
|
strings: n ?? {},
|
|
3935
|
-
children: /* @__PURE__ */
|
|
4079
|
+
children: /* @__PURE__ */ M(ea, {
|
|
3936
4080
|
initialIsOpen: e,
|
|
3937
4081
|
initialDock: t
|
|
3938
4082
|
})
|
|
3939
4083
|
})
|
|
3940
4084
|
});
|
|
3941
|
-
},
|
|
4085
|
+
}, qi = (e) => {
|
|
3942
4086
|
switch (e.dock) {
|
|
3943
4087
|
case "bottom":
|
|
3944
4088
|
case "top": return { height: e.sizes[e.dock] };
|
|
@@ -3950,35 +4094,42 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3950
4094
|
width: e.window.w,
|
|
3951
4095
|
height: e.window.h
|
|
3952
4096
|
};
|
|
4097
|
+
case "external": return {};
|
|
3953
4098
|
}
|
|
3954
|
-
},
|
|
4099
|
+
}, Ji = (e, t) => {
|
|
4100
|
+
let n = {
|
|
4101
|
+
"--vdt-capsule-x": e.x,
|
|
4102
|
+
"--vdt-capsule-y": e.y
|
|
4103
|
+
};
|
|
4104
|
+
return t !== void 0 && (n.width = t.w, n.height = t.h), n;
|
|
4105
|
+
}, Yi = (e, t, n, r) => {
|
|
3955
4106
|
switch (e) {
|
|
3956
4107
|
case "bottom": return t - r;
|
|
3957
4108
|
case "top": return t + r;
|
|
3958
4109
|
case "left": return t + n;
|
|
3959
4110
|
case "right": return t - n;
|
|
3960
4111
|
}
|
|
3961
|
-
},
|
|
4112
|
+
}, Xi = (e) => {
|
|
3962
4113
|
console.error("[voltro devtools] the overlay hit an error and was contained:", e);
|
|
3963
|
-
},
|
|
4114
|
+
}, Zi = (e) => {
|
|
3964
4115
|
let t = document.body.style;
|
|
3965
4116
|
e !== null && t.setProperty("cursor", e), t.setProperty("user-select", "none"), t.setProperty("-webkit-user-select", "none");
|
|
3966
|
-
},
|
|
4117
|
+
}, Qi = () => {
|
|
3967
4118
|
let e = document.body.style;
|
|
3968
4119
|
e.removeProperty("cursor"), e.removeProperty("user-select"), e.removeProperty("-webkit-user-select");
|
|
3969
|
-
},
|
|
3970
|
-
let r =
|
|
4120
|
+
}, $i = (e) => e instanceof Element && e.closest("button, input, a, [role=\"menu\"], [role=\"tablist\"], label") !== null, ea = ({ initialIsOpen: e, initialDock: t }) => {
|
|
4121
|
+
let r = U().shell, [a, o] = Bt(t), [u, d] = l(() => Wi(e) && a.dock !== "external"), [f, p] = l("all"), m = c(null), [h, g] = l(0), _ = Ii(), v = _.length > 0 ? _[_.length - 1] : null;
|
|
3971
4122
|
i(() => {
|
|
3972
|
-
|
|
3973
|
-
}, [
|
|
3974
|
-
|
|
3975
|
-
}, [
|
|
3976
|
-
let { dock: y, push: b } =
|
|
3977
|
-
|
|
3978
|
-
let k = D && !
|
|
4123
|
+
Gi(u);
|
|
4124
|
+
}, [u]), i(() => {
|
|
4125
|
+
u || tn();
|
|
4126
|
+
}, [u]);
|
|
4127
|
+
let { dock: y, push: b } = a, { setDock: x, setEdgeSize: S, setWindowRect: C, setPush: w, setCapsule: T } = o, ee = zt(), E = s(() => Nt(a, ee), [a, ee]), [D, O] = l(u);
|
|
4128
|
+
u && !D && O(!0);
|
|
4129
|
+
let k = D && !u, te = c(null);
|
|
3979
4130
|
i(() => {
|
|
3980
4131
|
if (!k) return;
|
|
3981
|
-
let e =
|
|
4132
|
+
let e = te.current?.getAnimations?.() ?? [];
|
|
3982
4133
|
if (e.length === 0) {
|
|
3983
4134
|
O(!1);
|
|
3984
4135
|
return;
|
|
@@ -3990,85 +4141,111 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3990
4141
|
t = !0;
|
|
3991
4142
|
};
|
|
3992
4143
|
}, [k]);
|
|
3993
|
-
let
|
|
4144
|
+
let A = c(null), ne = c(!1);
|
|
3994
4145
|
i(() => {
|
|
3995
4146
|
if (D) {
|
|
3996
|
-
|
|
4147
|
+
ne.current = !0;
|
|
3997
4148
|
return;
|
|
3998
4149
|
}
|
|
3999
|
-
|
|
4000
|
-
}, [D])
|
|
4150
|
+
ne.current && A.current?.focus();
|
|
4151
|
+
}, [D]);
|
|
4152
|
+
let [P, F] = l(null), I = u && y === "external";
|
|
4153
|
+
i(() => {
|
|
4154
|
+
if (!I || typeof window > "u") return;
|
|
4155
|
+
let e = Hi(a.window, r.brand);
|
|
4156
|
+
if (e === null) {
|
|
4157
|
+
console.warn(`[voltro devtools] ${r.externalBlocked}`), d(!1);
|
|
4158
|
+
return;
|
|
4159
|
+
}
|
|
4160
|
+
F(e), e.focus();
|
|
4161
|
+
let t = window.setInterval(() => {
|
|
4162
|
+
e.closed && d(!1);
|
|
4163
|
+
}, 400), n = () => {
|
|
4164
|
+
e.close();
|
|
4165
|
+
};
|
|
4166
|
+
return window.addEventListener("pagehide", n), () => {
|
|
4167
|
+
window.clearInterval(t), window.removeEventListener("pagehide", n), F(null), e.close();
|
|
4168
|
+
};
|
|
4169
|
+
}, [I]), i(() => {
|
|
4001
4170
|
if (typeof window > "u") return;
|
|
4002
4171
|
let e = (e, t, n) => e.code === t || e.key.toLowerCase() === n, t = (t) => {
|
|
4003
4172
|
if (t.altKey && !t.shiftKey && !t.metaKey && !t.ctrlKey && e(t, "KeyV", "v")) {
|
|
4004
|
-
t.preventDefault(),
|
|
4173
|
+
t.preventDefault(), d((e) => !e);
|
|
4005
4174
|
return;
|
|
4006
4175
|
}
|
|
4007
4176
|
if ((t.metaKey || t.ctrlKey) && !t.altKey && e(t, "KeyK", "k")) {
|
|
4008
|
-
t.preventDefault(),
|
|
4177
|
+
t.preventDefault(), d(!0), p((e) => e === "stores" || e === "indexes" || e === "webhooks" || e === "routes" || e === "runtimes" || e === "pwa" || e === "desktop" ? "all" : e), g((e) => e + 1);
|
|
4009
4178
|
return;
|
|
4010
4179
|
}
|
|
4011
4180
|
if (t.altKey && t.shiftKey) {
|
|
4012
|
-
let e =
|
|
4013
|
-
e !== null && (t.preventDefault(),
|
|
4181
|
+
let e = Vt(t.key);
|
|
4182
|
+
e !== null && (t.preventDefault(), d(!0), x(e));
|
|
4014
4183
|
}
|
|
4184
|
+
}, n = P === null ? [window] : [window, P];
|
|
4185
|
+
for (let e of n) e.addEventListener("keydown", t);
|
|
4186
|
+
return () => {
|
|
4187
|
+
for (let e of n) e.removeEventListener("keydown", t);
|
|
4015
4188
|
};
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
if (!a) return;
|
|
4189
|
+
}, [x, P]), i(() => {
|
|
4190
|
+
if (!u) return;
|
|
4019
4191
|
let e = requestAnimationFrame(() => m.current?.focus());
|
|
4020
4192
|
return () => cancelAnimationFrame(e);
|
|
4021
|
-
}, [a, h]), i(() => {
|
|
4022
|
-
if (typeof document > "u" || !D || !b || !dt(y)) return;
|
|
4023
|
-
let e = document.documentElement, t = Oi(y);
|
|
4024
|
-
return e.style.setProperty(t, `${E.sizes[y]}px`), () => {
|
|
4025
|
-
e.style.removeProperty(t);
|
|
4026
|
-
};
|
|
4027
4193
|
}, [
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
E.sizes
|
|
4194
|
+
u,
|
|
4195
|
+
h,
|
|
4196
|
+
P
|
|
4032
4197
|
]);
|
|
4033
|
-
let
|
|
4034
|
-
|
|
4198
|
+
let L = D && b && bt(y) ? y : null, R = c(null);
|
|
4199
|
+
i(() => {
|
|
4200
|
+
if (typeof document > "u" || L === null) return;
|
|
4201
|
+
let e = Vi(L, E.sizes[L]);
|
|
4202
|
+
return R.current = e, () => {
|
|
4203
|
+
R.current = null, e.release();
|
|
4204
|
+
};
|
|
4205
|
+
}, [L]);
|
|
4206
|
+
let z = L === null ? null : E.sizes[L];
|
|
4207
|
+
i(() => {
|
|
4208
|
+
z !== null && R.current?.resize(z);
|
|
4209
|
+
}, [z]);
|
|
4210
|
+
let B = n((e) => {
|
|
4211
|
+
if (!bt(y)) return;
|
|
4035
4212
|
e.preventDefault();
|
|
4036
4213
|
let t = y, n = {
|
|
4037
4214
|
x: e.clientX,
|
|
4038
4215
|
y: e.clientY,
|
|
4039
4216
|
size: E.sizes[t]
|
|
4040
4217
|
}, r = (e) => {
|
|
4041
|
-
S(t,
|
|
4218
|
+
S(t, jt(t, Yi(t, n.size, e.clientX - n.x, e.clientY - n.y)));
|
|
4042
4219
|
}, i = () => {
|
|
4043
|
-
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i),
|
|
4220
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), Qi();
|
|
4044
4221
|
};
|
|
4045
|
-
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i),
|
|
4222
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), Zi(t === "left" || t === "right" ? "col-resize" : "row-resize");
|
|
4046
4223
|
}, [
|
|
4047
4224
|
y,
|
|
4048
4225
|
E.sizes,
|
|
4049
4226
|
S
|
|
4050
|
-
]),
|
|
4051
|
-
if (y !== "window" ||
|
|
4227
|
+
]), re = n((e) => {
|
|
4228
|
+
if (y !== "window" || $i(e.target)) return;
|
|
4052
4229
|
e.preventDefault();
|
|
4053
4230
|
let t = {
|
|
4054
4231
|
x: e.clientX,
|
|
4055
4232
|
y: e.clientY,
|
|
4056
4233
|
rect: E.window
|
|
4057
4234
|
}, n = (e) => {
|
|
4058
|
-
C(
|
|
4235
|
+
C(Mt({
|
|
4059
4236
|
...t.rect,
|
|
4060
4237
|
x: t.rect.x + (e.clientX - t.x),
|
|
4061
4238
|
y: t.rect.y + (e.clientY - t.y)
|
|
4062
4239
|
}));
|
|
4063
4240
|
}, r = () => {
|
|
4064
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4241
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Qi();
|
|
4065
4242
|
};
|
|
4066
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4243
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Zi(null);
|
|
4067
4244
|
}, [
|
|
4068
4245
|
y,
|
|
4069
4246
|
E.window,
|
|
4070
4247
|
C
|
|
4071
|
-
]),
|
|
4248
|
+
]), V = n((e) => {
|
|
4072
4249
|
if (y !== "window") return;
|
|
4073
4250
|
e.preventDefault();
|
|
4074
4251
|
let t = {
|
|
@@ -4076,75 +4253,130 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
4076
4253
|
y: e.clientY,
|
|
4077
4254
|
rect: E.window
|
|
4078
4255
|
}, n = (e) => {
|
|
4079
|
-
C(
|
|
4256
|
+
C(Mt({
|
|
4080
4257
|
...t.rect,
|
|
4081
4258
|
w: t.rect.w + (e.clientX - t.x),
|
|
4082
4259
|
h: t.rect.h + (e.clientY - t.y)
|
|
4083
4260
|
}));
|
|
4084
4261
|
}, r = () => {
|
|
4085
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4262
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Qi();
|
|
4086
4263
|
};
|
|
4087
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4264
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Zi("nwse-resize");
|
|
4088
4265
|
}, [
|
|
4089
4266
|
y,
|
|
4090
4267
|
E.window,
|
|
4091
4268
|
C
|
|
4092
|
-
]),
|
|
4093
|
-
|
|
4269
|
+
]), [ie, ae] = l(null), oe = c(!1), se = n((e) => {
|
|
4270
|
+
if (e.button !== 0) return;
|
|
4271
|
+
let t = e.currentTarget.getBoundingClientRect(), n = {
|
|
4272
|
+
x: e.clientX,
|
|
4273
|
+
y: e.clientY,
|
|
4274
|
+
placement: a.capsule,
|
|
4275
|
+
size: {
|
|
4276
|
+
w: t.width,
|
|
4277
|
+
h: t.height
|
|
4278
|
+
}
|
|
4279
|
+
}, r = !1, i = (e) => {
|
|
4280
|
+
let t = e.clientX - n.x, i = e.clientY - n.y;
|
|
4281
|
+
if (!r) {
|
|
4282
|
+
if (Math.hypot(t, i) < 4) return;
|
|
4283
|
+
r = !0, oe.current = !0, ae(n.size), Zi("grabbing");
|
|
4284
|
+
}
|
|
4285
|
+
T(mt(n.placement, n.size, {
|
|
4286
|
+
width: window.innerWidth,
|
|
4287
|
+
height: window.innerHeight
|
|
4288
|
+
}, t, i));
|
|
4289
|
+
}, o = () => {
|
|
4290
|
+
window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", o), window.removeEventListener("pointercancel", o), r && (ae(null), Qi(), setTimeout(() => {
|
|
4291
|
+
oe.current = !1;
|
|
4292
|
+
}, 0));
|
|
4293
|
+
};
|
|
4294
|
+
window.addEventListener("pointermove", i), window.addEventListener("pointerup", o), window.addEventListener("pointercancel", o);
|
|
4295
|
+
}, [a.capsule, T]), ce = n(() => d(!1), []), le = n(() => {
|
|
4296
|
+
if (oe.current) {
|
|
4297
|
+
oe.current = !1;
|
|
4298
|
+
return;
|
|
4299
|
+
}
|
|
4300
|
+
d(!0);
|
|
4301
|
+
}, []), ue = y === "external", H = D ? /* @__PURE__ */ N("section", {
|
|
4302
|
+
ref: te,
|
|
4303
|
+
className: "vdt-console",
|
|
4304
|
+
role: "dialog",
|
|
4305
|
+
"aria-label": r.brand,
|
|
4306
|
+
"data-dock": y,
|
|
4307
|
+
"data-closing": k ? "true" : void 0,
|
|
4308
|
+
inert: k,
|
|
4309
|
+
style: qi(E),
|
|
4310
|
+
children: [
|
|
4311
|
+
bt(y) ? /* @__PURE__ */ M("div", {
|
|
4312
|
+
className: "vdt-grip",
|
|
4313
|
+
role: "separator",
|
|
4314
|
+
"aria-label": r.resizeLabel,
|
|
4315
|
+
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
4316
|
+
onPointerDown: B
|
|
4317
|
+
}) : null,
|
|
4318
|
+
/* @__PURE__ */ M(ki, {
|
|
4319
|
+
onError: Xi,
|
|
4320
|
+
children: /* @__PURE__ */ M(Di, {
|
|
4321
|
+
dock: y,
|
|
4322
|
+
push: b,
|
|
4323
|
+
onDock: x,
|
|
4324
|
+
onPush: w,
|
|
4325
|
+
onClose: ce,
|
|
4326
|
+
scope: f,
|
|
4327
|
+
onScope: p,
|
|
4328
|
+
searchRef: m,
|
|
4329
|
+
onHeaderPointerDown: y === "window" ? re : void 0
|
|
4330
|
+
})
|
|
4331
|
+
}),
|
|
4332
|
+
y === "window" ? /* @__PURE__ */ M("div", {
|
|
4333
|
+
className: "vdt-win-resize",
|
|
4334
|
+
role: "separator",
|
|
4335
|
+
"aria-label": r.resizeLabel,
|
|
4336
|
+
onPointerDown: V
|
|
4337
|
+
}) : null
|
|
4338
|
+
]
|
|
4339
|
+
}) : null;
|
|
4340
|
+
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(Fi, { children: /* @__PURE__ */ M("div", {
|
|
4094
4341
|
className: "vdt-host",
|
|
4095
|
-
"data-open":
|
|
4342
|
+
"data-open": u ? "true" : "false",
|
|
4096
4343
|
"data-dock": y,
|
|
4097
|
-
"data-push":
|
|
4098
|
-
children: /* @__PURE__ */
|
|
4344
|
+
"data-push": L === null ? "false" : "true",
|
|
4345
|
+
children: /* @__PURE__ */ M("div", {
|
|
4099
4346
|
className: "vdt-scope",
|
|
4100
|
-
children: D ? /* @__PURE__ */
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
className: "vdt-grip",
|
|
4112
|
-
role: "separator",
|
|
4113
|
-
"aria-label": r.resizeLabel,
|
|
4114
|
-
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
4115
|
-
onPointerDown: M
|
|
4116
|
-
}) : null,
|
|
4117
|
-
/* @__PURE__ */ N(_i, {
|
|
4118
|
-
onError: ji,
|
|
4119
|
-
children: /* @__PURE__ */ N(hi, {
|
|
4120
|
-
dock: y,
|
|
4121
|
-
push: b,
|
|
4122
|
-
onDock: x,
|
|
4123
|
-
onPush: w,
|
|
4124
|
-
onClose: F,
|
|
4125
|
-
scope: f,
|
|
4126
|
-
onScope: p,
|
|
4127
|
-
searchRef: m,
|
|
4128
|
-
onHeaderPointerDown: y === "window" ? te : void 0
|
|
4129
|
-
})
|
|
4130
|
-
}),
|
|
4131
|
-
y === "window" ? /* @__PURE__ */ N("div", {
|
|
4132
|
-
className: "vdt-win-resize",
|
|
4133
|
-
role: "separator",
|
|
4134
|
-
"aria-label": r.resizeLabel,
|
|
4135
|
-
onPointerDown: ne
|
|
4136
|
-
}) : null
|
|
4137
|
-
]
|
|
4138
|
-
}) : /* @__PURE__ */ N(_i, {
|
|
4139
|
-
onError: ji,
|
|
4140
|
-
children: /* @__PURE__ */ N(st, {
|
|
4347
|
+
children: D ? ue ? null : H : /* @__PURE__ */ N(ki, {
|
|
4348
|
+
onError: Xi,
|
|
4349
|
+
children: [ie === null ? null : /* @__PURE__ */ M("div", {
|
|
4350
|
+
className: "vdt-capsule-slots",
|
|
4351
|
+
"aria-hidden": "true",
|
|
4352
|
+
children: lt.map((e) => /* @__PURE__ */ M("span", {
|
|
4353
|
+
className: "vdt-capsule-slot",
|
|
4354
|
+
"data-active": ft(e, a.capsule) ? "true" : void 0,
|
|
4355
|
+
style: Ji(e, ie)
|
|
4356
|
+
}, `${e.x}:${e.y}`))
|
|
4357
|
+
}), /* @__PURE__ */ M(st, {
|
|
4141
4358
|
status: v,
|
|
4142
|
-
onOpen:
|
|
4143
|
-
buttonRef:
|
|
4144
|
-
|
|
4359
|
+
onOpen: le,
|
|
4360
|
+
buttonRef: A,
|
|
4361
|
+
style: Ji(a.capsule),
|
|
4362
|
+
dragging: ie !== null,
|
|
4363
|
+
onPointerDown: se
|
|
4364
|
+
})]
|
|
4365
|
+
})
|
|
4366
|
+
})
|
|
4367
|
+
}) }), ue && P !== null ? /* @__PURE__ */ M(Fi, {
|
|
4368
|
+
target: P.document,
|
|
4369
|
+
children: /* @__PURE__ */ M("div", {
|
|
4370
|
+
className: "vdt-host",
|
|
4371
|
+
"data-open": "true",
|
|
4372
|
+
"data-dock": "external",
|
|
4373
|
+
"data-push": "false",
|
|
4374
|
+
children: /* @__PURE__ */ M("div", {
|
|
4375
|
+
className: "vdt-scope",
|
|
4376
|
+
children: H
|
|
4145
4377
|
})
|
|
4146
4378
|
})
|
|
4147
|
-
}) });
|
|
4379
|
+
}) : null] });
|
|
4148
4380
|
};
|
|
4149
4381
|
//#endregion
|
|
4150
|
-
export { Be as DevtoolsStringsProvider,
|
|
4382
|
+
export { Be as DevtoolsStringsProvider, Ki as VoltroDevtools, Le as defaultDevtoolsStrings, U as useDevtoolsStrings };
|