@omniviewdev/runtime 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +1 -1
- package/dist/api.js +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +15 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +1 -1
- package/dist/hooks/connection/useConnection.d.ts +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.js +653 -641
- package/dist/resource/v2/client.d.ts +2 -2
- package/dist/resource/v2/host.d.ts +5 -0
- package/dist/{service-CiUZ0mis.js → service-D25QhNF2.js} +176 -176
- package/dist/service-MaHvflXn.cjs +1 -0
- package/package.json +1 -1
- package/dist/service-CD-hmd9l.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as P, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import L, { useEffect as
|
|
1
|
+
import { jsx as P, jsxs as ne, Fragment as It } from "react/jsx-runtime";
|
|
2
|
+
import { c as F } from "react/compiler-runtime";
|
|
3
|
+
import L, { useEffect as ve, useContext as Me, createContext as Ze, useSyncExternalStore as Ue, useCallback as Ie, useState as me, useRef as re, createElement as In, useId as Cn, useLayoutEffect as ft, Component as _n } from "react";
|
|
4
4
|
import { W as K, s as Dn } from "./graph-JDqyJC_i.js";
|
|
5
5
|
import { S as Ci } from "./graph-JDqyJC_i.js";
|
|
6
|
-
import { useQueryClient as ie, useQuery as j, useMutation as
|
|
7
|
-
import { G as kn, C as On, V as Tn, O as An, h as Pn, i as xn, S as Ln, j as Fn, k as qn, I as $n, R as Mn, o as Un, p as Wn, q as Ht, r as Qn, L as Kn, t as jn, u as Gn, v as Ct, w as Vt, x as zn, y as Bn, z as Jn, A as Hn, B as Vn, D as Yn, E as Zn, F as Xn, H as er, J as tr, K as nr, M as rr, N as sr, P as or, Q as ir, T as cr, U as ar, W as Lt, X as lr, Y as Yt, Z as ur, _ as dr, $ as Zt, a0 as fr, a1 as pr, a2 as gr, a3 as hr, a4 as Ft, a5 as Xt, a6 as yr, a7 as mr, a8 as vr, a9 as br, aa as wr, ab as Er, ac as Sr, ad as qt, ae as Ir, af as Cr, ag as _r, ah as Dr, ai as Rr } from "./service-
|
|
6
|
+
import { useQueryClient as ie, useQuery as j, useMutation as te, keepPreviousData as Jt, CancelledError as je, skipToken as ce, useIsMutating as Rn, useQueries as Nn, hashKey as pt } from "@tanstack/react-query";
|
|
7
|
+
import { G as kn, C as On, V as Tn, O as An, h as Pn, i as xn, S as Ln, j as Fn, k as qn, I as $n, R as Mn, o as Un, p as Wn, q as Ht, r as Qn, L as Kn, t as jn, u as Gn, v as Ct, w as Vt, x as zn, y as Bn, z as Jn, A as Hn, B as Vn, D as Yn, E as Zn, F as Xn, H as er, J as tr, K as nr, M as rr, N as sr, P as or, Q as ir, T as cr, U as ar, W as Lt, X as lr, Y as Yt, Z as ur, _ as dr, $ as Zt, a0 as fr, a1 as pr, a2 as gr, a3 as hr, a4 as Ft, a5 as Xt, a6 as yr, a7 as mr, a8 as vr, a9 as br, aa as wr, ab as Er, ac as Sr, ad as qt, ae as Ir, af as Cr, ag as _r, ah as Dr, ai as Rr } from "./service-D25QhNF2.js";
|
|
8
8
|
import "./index-zyAgCXOO.js";
|
|
9
|
-
import { O as
|
|
9
|
+
import { O as U, a as en } from "./events-uBheGmqm.js";
|
|
10
10
|
import { Link as Nr, useNavigate as kr, useLocation as Or, createMemoryRouter as Tr } from "react-router";
|
|
11
|
-
import { useToast as Ar, Card as Pr, Toolbar as $t, Text as
|
|
11
|
+
import { useToast as Ar, Card as Pr, Toolbar as $t, Text as De, IconButton as Be, EmptyState as xr, Button as Te, Code as Lr, Spinner as Fr } from "@omniviewdev/base-ui";
|
|
12
12
|
import { P as qr, S as tn, F as $r } from "./models-DNQykdGx.js";
|
|
13
13
|
import { RouterProvider as Mr } from "react-router/dom";
|
|
14
14
|
const _t = L.createContext(void 0), gt = {
|
|
@@ -26,9 +26,9 @@ function Qr(t) {
|
|
|
26
26
|
nn(t, {
|
|
27
27
|
queryKey: i
|
|
28
28
|
});
|
|
29
|
-
}, n = [
|
|
29
|
+
}, n = [U("settings/changed", (s) => {
|
|
30
30
|
r(s.data);
|
|
31
|
-
}),
|
|
31
|
+
}), U("plugin/init_complete", () => r()), U("plugin/inventory_changed", () => r()), U("plugin/dev_reload_complete", () => r()), U("plugin/recovered", () => r()), U("plugin/dev_install_complete", (s) => {
|
|
32
32
|
const i = s.data?.id;
|
|
33
33
|
typeof i == "string" && r({
|
|
34
34
|
kind: "plugin",
|
|
@@ -50,9 +50,9 @@ function Kr(t, e, r) {
|
|
|
50
50
|
return t.kind === "host" ? `${e}.${r}` : r;
|
|
51
51
|
}
|
|
52
52
|
function rn(t) {
|
|
53
|
-
const e =
|
|
53
|
+
const e = F(25), r = ie(), n = t.kind, s = t.pluginId;
|
|
54
54
|
let i, o;
|
|
55
|
-
e[0] !== r ? (i = () => Qr(r), o = [r], e[0] = r, e[1] = i, e[2] = o) : (i = e[1], o = e[2]),
|
|
55
|
+
e[0] !== r ? (i = () => Qr(r), o = [r], e[0] = r, e[1] = i, e[2] = o) : (i = e[1], o = e[2]), ve(i, o);
|
|
56
56
|
let c;
|
|
57
57
|
e[3] !== t ? (c = Ur(t), e[3] = t, e[4] = c) : c = e[4];
|
|
58
58
|
let l;
|
|
@@ -81,7 +81,7 @@ function rn(t) {
|
|
|
81
81
|
}, e[10] = r, e[11] = n, e[12] = s, e[13] = t, e[14] = u) : u = e[14];
|
|
82
82
|
const {
|
|
83
83
|
mutateAsync: f
|
|
84
|
-
} =
|
|
84
|
+
} = te(u);
|
|
85
85
|
let p;
|
|
86
86
|
e[15] !== n || e[16] !== s ? (p = (y, b) => Tn(n === "host" ? gt : {
|
|
87
87
|
kind: n,
|
|
@@ -98,7 +98,7 @@ function rn(t) {
|
|
|
98
98
|
validate: v
|
|
99
99
|
}, e[18] = f, e[19] = d.data, e[20] = d.isPending, e[21] = h, e[22] = g, e[23] = v, e[24] = m) : m = e[24], m;
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const X = {
|
|
102
102
|
// Plugin
|
|
103
103
|
PLUGIN_NOT_FOUND: "omniview:plugin/not-found",
|
|
104
104
|
PLUGIN_NOT_LOADED: "omniview:plugin/not-loaded",
|
|
@@ -161,34 +161,34 @@ function Gr(t) {
|
|
|
161
161
|
Ge(t);
|
|
162
162
|
}
|
|
163
163
|
const Mt = {
|
|
164
|
-
INVALID_REQUEST: [
|
|
165
|
-
UNSUPPORTED: [
|
|
166
|
-
FORBIDDEN: [
|
|
167
|
-
UNAUTHORIZED: [
|
|
168
|
-
NOT_FOUND: [
|
|
169
|
-
CONFLICT: [
|
|
170
|
-
ALREADY_EXISTS: [
|
|
171
|
-
CANCELLED: [
|
|
172
|
-
TIMEOUT: [
|
|
173
|
-
UNAVAILABLE: [
|
|
174
|
-
CONNECTION_ERROR: [
|
|
175
|
-
CERTIFICATE_ERROR: [
|
|
176
|
-
RESOURCE_LIMIT: [
|
|
177
|
-
CONTINUATION_EXPIRED: [
|
|
178
|
-
RESET_REQUIRED: [
|
|
179
|
-
PARTIAL_RESULT: [
|
|
180
|
-
PROVIDER_ERROR: [
|
|
181
|
-
INTERNAL: [
|
|
164
|
+
INVALID_REQUEST: [X.VALIDATION, 400, "correctRequest"],
|
|
165
|
+
UNSUPPORTED: [X.NOT_IMPLEMENTED, 501, "refreshContract"],
|
|
166
|
+
FORBIDDEN: [X.RESOURCE_FORBIDDEN, 403, "none"],
|
|
167
|
+
UNAUTHORIZED: [X.RESOURCE_UNAUTHORIZED, 401, "none"],
|
|
168
|
+
NOT_FOUND: [X.RESOURCE_NOT_FOUND, 404, "none"],
|
|
169
|
+
CONFLICT: [X.RESOURCE_CONFLICT, 409, "refreshContract"],
|
|
170
|
+
ALREADY_EXISTS: [X.RESOURCE_CONFLICT, 409, "refreshContract"],
|
|
171
|
+
CANCELLED: [X.CANCELLED, 499, "none"],
|
|
172
|
+
TIMEOUT: [X.RESOURCE_TIMEOUT, 408, "none"],
|
|
173
|
+
UNAVAILABLE: [X.CONNECTION_FAILED, 503, "reconnect"],
|
|
174
|
+
CONNECTION_ERROR: [X.CONNECTION_FAILED, 503, "reconnect"],
|
|
175
|
+
CERTIFICATE_ERROR: [X.CONNECTION_FAILED, 502, "reconnect"],
|
|
176
|
+
RESOURCE_LIMIT: [X.RESOURCE_LIMIT, 429, "correctRequest"],
|
|
177
|
+
CONTINUATION_EXPIRED: [X.RESOURCE_CONTINUATION_EXPIRED, 410, "restartQuery"],
|
|
178
|
+
RESET_REQUIRED: [X.RESOURCE_RESET_REQUIRED, 409, "restartQuery"],
|
|
179
|
+
PARTIAL_RESULT: [X.RESOURCE_PARTIAL, 422, "none"],
|
|
180
|
+
PROVIDER_ERROR: [X.RESOURCE_PROVIDER_ERROR, 502, "none"],
|
|
181
|
+
INTERNAL: [X.INTERNAL, 500, "none"]
|
|
182
182
|
};
|
|
183
183
|
function rt(t) {
|
|
184
184
|
return typeof t == "object" && t !== null ? t : void 0;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function ye(t, e) {
|
|
187
187
|
return typeof t == "string" && t.length > 0 && t.length <= e;
|
|
188
188
|
}
|
|
189
189
|
function st() {
|
|
190
190
|
return {
|
|
191
|
-
type:
|
|
191
|
+
type: X.CANCELLED,
|
|
192
192
|
code: "CANCELLED",
|
|
193
193
|
title: "Cancelled",
|
|
194
194
|
status: 499,
|
|
@@ -211,16 +211,16 @@ function He(t, e) {
|
|
|
211
211
|
const r = rt(t);
|
|
212
212
|
if (r) {
|
|
213
213
|
if (r.name === "AbortError" || r.name === "CancelError") return st();
|
|
214
|
-
if (
|
|
214
|
+
if (ye(r.type, 256) && ye(r.title, 256) && typeof r.status == "number" && Number.isInteger(r.status) && r.status >= 100 && r.status <= 599 && typeof r.detail == "string" && r.detail.length <= 4096) {
|
|
215
215
|
const n = {
|
|
216
216
|
type: r.type,
|
|
217
217
|
title: r.title,
|
|
218
218
|
status: r.status,
|
|
219
219
|
detail: r.detail
|
|
220
220
|
};
|
|
221
|
-
|
|
221
|
+
ye(r.code, 64) && (n.code = r.code), ye(r.requestId, 256) && (n.requestId = r.requestId), ye(r.instance, 512) && (n.instance = r.instance), Array.isArray(r.suggestions) && (n.suggestions = r.suggestions.filter((i) => ye(i, 512)).slice(0, 8)), Array.isArray(r.actions) && (n.actions = r.actions.filter((i) => {
|
|
222
222
|
const o = rt(i);
|
|
223
|
-
return !!o && ["navigate", "retry", "open-url", "copy"].includes(String(o.type)) &&
|
|
223
|
+
return !!o && ["navigate", "retry", "open-url", "copy"].includes(String(o.type)) && ye(o.label, 256) && (o.target === void 0 || ye(o.target, 4096));
|
|
224
224
|
}).slice(0, 8)), ["correctRequest", "refreshContract", "restartQuery", "reconnect", "none"].includes(String(r.recovery)) && (n.recovery = r.recovery);
|
|
225
225
|
const s = rt(r.location);
|
|
226
226
|
return s?.unit === "utf8-byte" && typeof s.start == "number" && typeof s.end == "number" && Number.isSafeInteger(s.start) && Number.isSafeInteger(s.end) && s.start >= 0 && s.end >= s.start && (n.location = {
|
|
@@ -238,26 +238,26 @@ function He(t, e) {
|
|
|
238
238
|
status: i,
|
|
239
239
|
code: n,
|
|
240
240
|
recovery: o,
|
|
241
|
-
title: c ? n === "FORBIDDEN" ? "Access denied" : n === "UNAUTHORIZED" ? "Authentication required" : "Operation failed" :
|
|
242
|
-
detail: c ? "The operation could not be completed." :
|
|
241
|
+
title: c ? n === "FORBIDDEN" ? "Access denied" : n === "UNAUTHORIZED" ? "Authentication required" : "Operation failed" : ye(r.title, 256) ? r.title : "Operation failed",
|
|
242
|
+
detail: c ? "The operation could not be completed." : ye(r.message, 4096) ? r.message : "The operation could not be completed.",
|
|
243
243
|
...!c && Array.isArray(r.suggestions) ? {
|
|
244
|
-
suggestions: r.suggestions.filter((l) =>
|
|
244
|
+
suggestions: r.suggestions.filter((l) => ye(l, 512)).slice(0, 8)
|
|
245
245
|
} : {}
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
return He(r.message, e + 1) ?? He(r.cause, e + 1);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function be(t) {
|
|
252
252
|
return He(t, 0) ?? {
|
|
253
|
-
type:
|
|
253
|
+
type: X.INTERNAL,
|
|
254
254
|
title: t == null ? "Unknown error" : "Error",
|
|
255
255
|
status: 500,
|
|
256
256
|
detail: t == null ? "An unknown error occurred." : "The operation could not be completed."
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
function Ve(t) {
|
|
260
|
-
return
|
|
260
|
+
return be(t).type === X.CANCELLED;
|
|
261
261
|
}
|
|
262
262
|
function zr(t) {
|
|
263
263
|
switch (t.type) {
|
|
@@ -307,25 +307,25 @@ function on(t, e) {
|
|
|
307
307
|
actions: t.actions?.map(zr)
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Pe(t, e, r) {
|
|
311
311
|
if (Ve(e)) return;
|
|
312
|
-
const n =
|
|
312
|
+
const n = be(e);
|
|
313
313
|
t(on(n, r));
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function oe(t, e) {
|
|
316
316
|
return (r) => {
|
|
317
317
|
if (Ve(r)) return;
|
|
318
|
-
const n =
|
|
318
|
+
const n = be(r);
|
|
319
319
|
t(on(n, n.title !== "Error" ? n.title : e));
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
function mo(t) {
|
|
323
|
-
const e =
|
|
323
|
+
const e = F(2);
|
|
324
324
|
let r;
|
|
325
325
|
return e[0] !== t ? (r = /* @__PURE__ */ P(Br, { ...t }, t.pluginId), e[0] = t, e[1] = r) : r = e[1], r;
|
|
326
326
|
}
|
|
327
327
|
function Br(t) {
|
|
328
|
-
const e =
|
|
328
|
+
const e = F(40), {
|
|
329
329
|
children: r,
|
|
330
330
|
pluginId: n,
|
|
331
331
|
headless: s
|
|
@@ -340,8 +340,8 @@ function Br(t) {
|
|
|
340
340
|
} = rn(o);
|
|
341
341
|
let l;
|
|
342
342
|
e[2] !== c.plugin?.settings || e[3] !== n ? (l = Object.fromEntries(Object.entries(c.plugin?.settings ?? {}).filter(Jr).map((R) => {
|
|
343
|
-
const [
|
|
344
|
-
return [`${n}.${
|
|
343
|
+
const [T, N] = R;
|
|
344
|
+
return [`${n}.${T}`, N.value];
|
|
345
345
|
})), e[2] = c.plugin?.settings, e[3] = n, e[4] = l) : l = e[4];
|
|
346
346
|
const a = l;
|
|
347
347
|
let d;
|
|
@@ -359,15 +359,15 @@ function Br(t) {
|
|
|
359
359
|
return;
|
|
360
360
|
}
|
|
361
361
|
const R = m.current = m.current + 1;
|
|
362
|
-
console.debug(`[PluginContextProvider] fetching meta for "${n}"`), Pn(n).then((
|
|
362
|
+
console.debug(`[PluginContextProvider] fetching meta for "${n}"`), Pn(n).then((T) => {
|
|
363
363
|
R === m.current && (console.debug(`[PluginContextProvider] meta loaded for "${n}"`, {
|
|
364
|
-
name:
|
|
365
|
-
version:
|
|
366
|
-
}), f(
|
|
367
|
-
}).catch((
|
|
364
|
+
name: T?.name,
|
|
365
|
+
version: T?.version
|
|
366
|
+
}), f(T), v(!0));
|
|
367
|
+
}).catch((T) => {
|
|
368
368
|
if (R !== m.current)
|
|
369
369
|
return;
|
|
370
|
-
const N =
|
|
370
|
+
const N = be(T);
|
|
371
371
|
console.error(`[PluginContextProvider] error fetching meta for "${n}":`, N.detail), g(N.detail), v(!1);
|
|
372
372
|
});
|
|
373
373
|
}, e[6] = n, e[7] = y) : y = e[7];
|
|
@@ -378,11 +378,11 @@ function Br(t) {
|
|
|
378
378
|
return;
|
|
379
379
|
const R = () => {
|
|
380
380
|
g(null), b();
|
|
381
|
-
},
|
|
381
|
+
}, T = [U("plugin/init_complete", R), U("plugin/dev_install_complete", (N) => {
|
|
382
382
|
N.data?.id === n && R();
|
|
383
|
-
}),
|
|
383
|
+
}), U("plugin/inventory_changed", R)];
|
|
384
384
|
return () => {
|
|
385
|
-
for (const N of
|
|
385
|
+
for (const N of T)
|
|
386
386
|
N();
|
|
387
387
|
};
|
|
388
388
|
}, E = [n, p, b], e[8] = b, e[9] = p, e[10] = n, e[11] = w, e[12] = E) : (w = e[11], E = e[12]), L.useEffect(w, E);
|
|
@@ -392,7 +392,7 @@ function Br(t) {
|
|
|
392
392
|
}), S = [n, b], e[13] = b, e[14] = n, e[15] = _, e[16] = S) : (_ = e[15], S = e[16]), L.useEffect(_, S), h) {
|
|
393
393
|
if (i)
|
|
394
394
|
throw new Error(h);
|
|
395
|
-
let R,
|
|
395
|
+
let R, T, N;
|
|
396
396
|
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = {
|
|
397
397
|
display: "flex",
|
|
398
398
|
flex: 1,
|
|
@@ -407,15 +407,15 @@ function Br(t) {
|
|
|
407
407
|
backgroundColor: "#1C1917",
|
|
408
408
|
padding: 20,
|
|
409
409
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
410
|
-
},
|
|
410
|
+
}, T = {
|
|
411
411
|
display: "flex",
|
|
412
412
|
alignItems: "center",
|
|
413
413
|
gap: 8,
|
|
414
414
|
marginBottom: 12
|
|
415
|
-
}, e[17] = R, e[18] =
|
|
416
|
-
let
|
|
417
|
-
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
418
|
-
/* @__PURE__ */
|
|
415
|
+
}, e[17] = R, e[18] = T, e[19] = N) : (R = e[17], T = e[18], N = e[19]);
|
|
416
|
+
let M, C;
|
|
417
|
+
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ ne("div", { style: T, children: [
|
|
418
|
+
/* @__PURE__ */ ne("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "#EF4444", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
419
419
|
/* @__PURE__ */ P("circle", { cx: "12", cy: "12", r: "10" }),
|
|
420
420
|
/* @__PURE__ */ P("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
421
421
|
/* @__PURE__ */ P("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
@@ -429,15 +429,15 @@ function Br(t) {
|
|
|
429
429
|
fontSize: 13,
|
|
430
430
|
color: "#A1A1AA",
|
|
431
431
|
margin: "0 0 16px"
|
|
432
|
-
}, e[20] =
|
|
432
|
+
}, e[20] = M, e[21] = C) : (M = e[20], C = e[21]);
|
|
433
433
|
let k;
|
|
434
434
|
e[22] !== h ? (k = /* @__PURE__ */ P("p", { style: C, children: h }), e[22] = h, e[23] = k) : k = e[23];
|
|
435
435
|
let O;
|
|
436
436
|
e[24] !== b ? (O = () => {
|
|
437
437
|
g(null), b();
|
|
438
438
|
}, e[24] = b, e[25] = O) : O = e[25];
|
|
439
|
-
let
|
|
440
|
-
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
439
|
+
let $;
|
|
440
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
|
|
441
441
|
background: "transparent",
|
|
442
442
|
color: "#F87171",
|
|
443
443
|
border: "1px solid #7F1D1D",
|
|
@@ -446,21 +446,21 @@ function Br(t) {
|
|
|
446
446
|
fontSize: 13,
|
|
447
447
|
fontWeight: 500,
|
|
448
448
|
cursor: "pointer"
|
|
449
|
-
}, e[26] =
|
|
450
|
-
let
|
|
451
|
-
e[27] !== O ? (
|
|
449
|
+
}, e[26] = $) : $ = e[26];
|
|
450
|
+
let A;
|
|
451
|
+
e[27] !== O ? (A = /* @__PURE__ */ P("button", { onClick: O, style: $, children: "Retry" }), e[27] = O, e[28] = A) : A = e[28];
|
|
452
452
|
let x;
|
|
453
|
-
return e[29] !== k || e[30] !==
|
|
454
|
-
|
|
453
|
+
return e[29] !== k || e[30] !== A ? (x = /* @__PURE__ */ P("div", { style: N, children: /* @__PURE__ */ ne("div", { style: R, children: [
|
|
454
|
+
M,
|
|
455
455
|
k,
|
|
456
|
-
|
|
457
|
-
] }) }), e[29] = k, e[30] =
|
|
456
|
+
A
|
|
457
|
+
] }) }), e[29] = k, e[30] = A, e[31] = x) : x = e[31], x;
|
|
458
458
|
}
|
|
459
459
|
if (!p) {
|
|
460
460
|
if (i)
|
|
461
461
|
return null;
|
|
462
462
|
let R;
|
|
463
|
-
return e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */
|
|
463
|
+
return e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ ne("div", { style: {
|
|
464
464
|
display: "flex",
|
|
465
465
|
flex: 1,
|
|
466
466
|
alignItems: "center",
|
|
@@ -491,13 +491,13 @@ function Jr(t) {
|
|
|
491
491
|
return e !== void 0;
|
|
492
492
|
}
|
|
493
493
|
function cn() {
|
|
494
|
-
const t =
|
|
494
|
+
const t = Me(_t);
|
|
495
495
|
if (!t)
|
|
496
496
|
throw new Error("usePluginContext must be used within a PluginContextProvider");
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
499
|
const an = Ze(void 0), vo = (t) => {
|
|
500
|
-
const e =
|
|
500
|
+
const e = F(7), {
|
|
501
501
|
children: r
|
|
502
502
|
} = t, {
|
|
503
503
|
categories: n
|
|
@@ -543,7 +543,7 @@ const an = Ze(void 0), vo = (t) => {
|
|
|
543
543
|
fullscreenDrawer: () => {
|
|
544
544
|
}
|
|
545
545
|
}, Vr = L.createContext(Hr), Yr = Ze(void 0), Zr = L.createContext(void 0), ln = L.createContext(void 0), Xr = 3e4, bo = (t) => {
|
|
546
|
-
const e =
|
|
546
|
+
const e = F(12), {
|
|
547
547
|
children: r
|
|
548
548
|
} = t;
|
|
549
549
|
let n;
|
|
@@ -588,7 +588,7 @@ const an = Ze(void 0), vo = (t) => {
|
|
|
588
588
|
let g;
|
|
589
589
|
return e[9] !== r || e[10] !== h ? (g = /* @__PURE__ */ P(ln.Provider, { value: h, children: r }), e[9] = r, e[10] = h, e[11] = g) : g = e[11], g;
|
|
590
590
|
}, Dt = L.createContext(null), wo = (t) => {
|
|
591
|
-
const e =
|
|
591
|
+
const e = F(3), {
|
|
592
592
|
actions: r,
|
|
593
593
|
children: n
|
|
594
594
|
} = t;
|
|
@@ -647,9 +647,9 @@ function Je(t) {
|
|
|
647
647
|
(function(t) {
|
|
648
648
|
t.debug = Je("debug"), t.log = Je("log"), t.warn = Je("warn"), t.error = Je("error");
|
|
649
649
|
})(yt || (yt = {}));
|
|
650
|
-
const dn = Ze(void 0), ss = () =>
|
|
650
|
+
const dn = Ze(void 0), ss = () => Me(dn);
|
|
651
651
|
function fn(t) {
|
|
652
|
-
const e =
|
|
652
|
+
const e = F(6), r = ss(), n = L.useRef(null);
|
|
653
653
|
let s;
|
|
654
654
|
e[0] !== t || e[1] !== r ? (s = (l) => {
|
|
655
655
|
let a = r?.getExtensionPoint(t), d = a?.subscribe(l);
|
|
@@ -675,13 +675,13 @@ function fn(t) {
|
|
|
675
675
|
return n.current = u, u;
|
|
676
676
|
}, e[3] = t, e[4] = r, e[5] = o) : o = e[5];
|
|
677
677
|
const c = o;
|
|
678
|
-
return
|
|
678
|
+
return Ue(i, c, c);
|
|
679
679
|
}
|
|
680
680
|
function So(t) {
|
|
681
681
|
return fn(t).store;
|
|
682
682
|
}
|
|
683
683
|
const Io = (t) => {
|
|
684
|
-
const e =
|
|
684
|
+
const e = F(5), {
|
|
685
685
|
registry: r,
|
|
686
686
|
children: n
|
|
687
687
|
} = t;
|
|
@@ -1013,7 +1013,7 @@ const ae = {
|
|
|
1013
1013
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1014
1014
|
actions: I
|
|
1015
1015
|
};
|
|
1016
|
-
i((
|
|
1016
|
+
i((T) => [...T, R].slice(-20)), D = {
|
|
1017
1017
|
label: "Details",
|
|
1018
1018
|
onClick: () => {
|
|
1019
1019
|
a(R.id), c(!0);
|
|
@@ -1027,7 +1027,7 @@ const ae = {
|
|
|
1027
1027
|
action: D ?? I?.[0]
|
|
1028
1028
|
});
|
|
1029
1029
|
};
|
|
1030
|
-
return /* @__PURE__ */
|
|
1030
|
+
return /* @__PURE__ */ ne(pn.Provider, { value: {
|
|
1031
1031
|
showSnackbar: h,
|
|
1032
1032
|
openNotifications: () => {
|
|
1033
1033
|
c(!0);
|
|
@@ -1035,11 +1035,11 @@ const ae = {
|
|
|
1035
1035
|
notificationCount: s.length
|
|
1036
1036
|
}, children: [
|
|
1037
1037
|
t,
|
|
1038
|
-
o && /* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */ P(
|
|
1041
|
-
/* @__PURE__ */ P(
|
|
1042
|
-
/* @__PURE__ */
|
|
1038
|
+
o && /* @__PURE__ */ ne(Pr, { ref: p, style: ae.Panel, size: "sm", variant: "outline", surface: "overlay", elevation: 3, "aria-label": "Notifications", tabIndex: -1, children: [
|
|
1039
|
+
/* @__PURE__ */ ne($t, { size: "sm", style: ae.Header, children: [
|
|
1040
|
+
/* @__PURE__ */ P(De, { size: "sm", weight: "semibold", children: "Notifications" }),
|
|
1041
|
+
/* @__PURE__ */ P(De, { size: "xs", tone: "muted", children: s.length }),
|
|
1042
|
+
/* @__PURE__ */ ne($t.Group, { style: ae.HeaderActions, children: [
|
|
1043
1043
|
/* @__PURE__ */ P(Be, { size: "sm", variant: "ghost", "aria-label": "Clear history", title: "Clear history", disabled: s.length === 0, onClick: () => {
|
|
1044
1044
|
i([]), a(void 0), u("");
|
|
1045
1045
|
}, children: /* @__PURE__ */ P("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ P("path", { d: "m3 3 6 6m0-6L3 9M13 6h8M3 14h18M3 20h18" }) }) }),
|
|
@@ -1048,19 +1048,19 @@ const ae = {
|
|
|
1048
1048
|
}, children: /* @__PURE__ */ P("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ P("path", { d: "m6 9 6 6 6-6" }) }) })
|
|
1049
1049
|
] })
|
|
1050
1050
|
] }),
|
|
1051
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ ne("div", { style: ae.List, children: [
|
|
1052
1052
|
s.length === 0 && /* @__PURE__ */ P(xr, { size: "sm", title: "No recent errors", description: "Error details will appear here." }),
|
|
1053
1053
|
s.slice().reverse().map((g) => {
|
|
1054
1054
|
const m = l === g.id;
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ ne("div", { style: ae.Notice, children: [
|
|
1056
|
+
/* @__PURE__ */ ne("div", { style: ae.Row, children: [
|
|
1057
|
+
/* @__PURE__ */ ne("svg", { style: ae.ErrorIcon, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-label": "Error", role: "img", children: [
|
|
1058
1058
|
/* @__PURE__ */ P("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1059
1059
|
/* @__PURE__ */ P("path", { d: "m9 9 6 6m0-6-6 6" })
|
|
1060
1060
|
] }),
|
|
1061
|
-
/* @__PURE__ */ P(
|
|
1061
|
+
/* @__PURE__ */ P(Te, { size: "sm", variant: "ghost", style: ae.Message, "aria-expanded": m, "aria-controls": `notification-${g.id}`, title: g.message, onClick: () => {
|
|
1062
1062
|
a(m ? void 0 : g.id), u("");
|
|
1063
|
-
}, children: /* @__PURE__ */ P(
|
|
1063
|
+
}, children: /* @__PURE__ */ P(De, { size: "sm", style: ae.MessageText, truncate: !m, children: g.message }) }),
|
|
1064
1064
|
/* @__PURE__ */ P(Be, { size: "sm", variant: "ghost", "aria-label": m ? "Collapse details" : "Expand details", title: m ? "Collapse details" : "Expand details", "aria-expanded": m, "aria-controls": `notification-${g.id}`, onClick: () => {
|
|
1065
1065
|
a(m ? void 0 : g.id), u("");
|
|
1066
1066
|
}, children: /* @__PURE__ */ P("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ P("path", { d: m ? "m6 15 6-6 6 6" : "m6 9 6 6 6-6" }) }) }),
|
|
@@ -1068,11 +1068,11 @@ const ae = {
|
|
|
1068
1068
|
i((y) => y.filter((b) => b.id !== g.id)), m && (a(void 0), u(""));
|
|
1069
1069
|
}, children: /* @__PURE__ */ P("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ P("path", { d: "m6 6 12 12m0-12L6 18" }) }) })
|
|
1070
1070
|
] }),
|
|
1071
|
-
/* @__PURE__ */ P("div", { id: `notification-${g.id}`, hidden: !m, style: ae.Details, children: m && /* @__PURE__ */
|
|
1072
|
-
/* @__PURE__ */ P(
|
|
1071
|
+
/* @__PURE__ */ P("div", { id: `notification-${g.id}`, hidden: !m, style: ae.Details, children: m && /* @__PURE__ */ ne(It, { children: [
|
|
1072
|
+
/* @__PURE__ */ P(De, { size: "xs", tone: "muted", children: /* @__PURE__ */ P("time", { dateTime: g.created, children: new Date(g.created).toLocaleString() }) }),
|
|
1073
1073
|
/* @__PURE__ */ P(Lr, { size: "sm", style: ae.Code, children: g.details?.length ? g.details : g.message }),
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */ P(
|
|
1074
|
+
/* @__PURE__ */ ne("div", { style: ae.Actions, children: [
|
|
1075
|
+
/* @__PURE__ */ P(Te, { size: "sm", variant: "ghost", onClick: async () => {
|
|
1076
1076
|
u("");
|
|
1077
1077
|
try {
|
|
1078
1078
|
await navigator.clipboard.writeText(`${g.message}
|
|
@@ -1082,21 +1082,21 @@ ${g.details ?? ""}`);
|
|
|
1082
1082
|
u("Copy failed. Select the diagnostic text and copy it manually.");
|
|
1083
1083
|
}
|
|
1084
1084
|
}, children: "Copy details" }),
|
|
1085
|
-
g.actions?.map((y, b) => /* @__PURE__ */ P(
|
|
1085
|
+
g.actions?.map((y, b) => /* @__PURE__ */ P(Te, { size: "sm", variant: "outline", onClick: y.onClick, children: y.label }, `${y.label}-${b}`))
|
|
1086
1086
|
] })
|
|
1087
1087
|
] }) })
|
|
1088
1088
|
] }, g.id);
|
|
1089
1089
|
})
|
|
1090
1090
|
] }),
|
|
1091
|
-
d && /* @__PURE__ */ P(
|
|
1091
|
+
d && /* @__PURE__ */ P(De, { as: "p", size: "sm", role: "status", style: ae.CopyError, children: d })
|
|
1092
1092
|
] })
|
|
1093
1093
|
] });
|
|
1094
|
-
},
|
|
1095
|
-
const t =
|
|
1094
|
+
}, ge = () => {
|
|
1095
|
+
const t = Me(pn);
|
|
1096
1096
|
if (t === void 0)
|
|
1097
1097
|
throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");
|
|
1098
1098
|
return t;
|
|
1099
|
-
},
|
|
1099
|
+
}, ke = {
|
|
1100
1100
|
all: (t) => [t, "resource-v2"],
|
|
1101
1101
|
scope: (t, e) => [t, "resource-v2", "target", e],
|
|
1102
1102
|
list: (t, e) => [t, "resource-v2", "enumerate", e],
|
|
@@ -1104,19 +1104,19 @@ ${g.details ?? ""}`);
|
|
|
1104
1104
|
resource: (t, e) => [t, "resource-v2", "get", e]
|
|
1105
1105
|
};
|
|
1106
1106
|
function Q(t) {
|
|
1107
|
-
const r =
|
|
1107
|
+
const r = Me(_t)?.pluginId ?? t;
|
|
1108
1108
|
if (!r)
|
|
1109
1109
|
throw new Error("pluginID must be provided either via PluginContext or as an explicit parameter");
|
|
1110
1110
|
return r;
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1113
|
-
let ct = 0,
|
|
1112
|
+
const pe = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map();
|
|
1113
|
+
let ct = 0, Le = [], Rt = 0;
|
|
1114
1114
|
const gn = {
|
|
1115
1115
|
phase: "checking"
|
|
1116
1116
|
};
|
|
1117
|
-
function
|
|
1117
|
+
function Re(t, e) {
|
|
1118
1118
|
const r = JSON.stringify([t, e]);
|
|
1119
|
-
let n =
|
|
1119
|
+
let n = pe.get(r);
|
|
1120
1120
|
return n || (n = {
|
|
1121
1121
|
pluginID: t,
|
|
1122
1122
|
connectionID: e,
|
|
@@ -1127,13 +1127,13 @@ function De(t, e) {
|
|
|
1127
1127
|
version: 0,
|
|
1128
1128
|
generation: ++Rt,
|
|
1129
1129
|
starts: /* @__PURE__ */ new Set()
|
|
1130
|
-
},
|
|
1130
|
+
}, pe.set(r, n)), n;
|
|
1131
1131
|
}
|
|
1132
1132
|
function Qe(t, e) {
|
|
1133
1133
|
t.snapshot.phase === "connected" && e.phase !== "connected" && (t.generation = ++Rt), t.snapshot = e;
|
|
1134
1134
|
for (const r of t.listeners) r();
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function Ne(t, e, r = !1) {
|
|
1137
1137
|
t.generation = ++Rt, t.version++, r || (t.operation = void 0), Qe(t, e);
|
|
1138
1138
|
}
|
|
1139
1139
|
function cs(t) {
|
|
@@ -1168,7 +1168,7 @@ function hn(t, e) {
|
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
1170
|
function yn(t, e) {
|
|
1171
|
-
const r =
|
|
1171
|
+
const r = be(t);
|
|
1172
1172
|
return {
|
|
1173
1173
|
phase: r.status === 401 ? "unauthorized" : r.status === 403 ? "forbidden" : r.status === 404 ? "not-found" : "error",
|
|
1174
1174
|
connection: e,
|
|
@@ -1176,64 +1176,64 @@ function yn(t, e) {
|
|
|
1176
1176
|
};
|
|
1177
1177
|
}
|
|
1178
1178
|
function at(t, e) {
|
|
1179
|
-
e = Nt(e) || "The plugin is unavailable.",
|
|
1180
|
-
for (const r of
|
|
1181
|
-
r.pluginID === t &&
|
|
1179
|
+
e = Nt(e) || "The plugin is unavailable.", We.set(t, e);
|
|
1180
|
+
for (const r of pe.values())
|
|
1181
|
+
r.pluginID === t && Ne(r, {
|
|
1182
1182
|
phase: "error",
|
|
1183
1183
|
message: e,
|
|
1184
1184
|
connection: r.snapshot.connection
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
function Wt(t) {
|
|
1188
|
-
const e =
|
|
1189
|
-
for (const r of
|
|
1190
|
-
r.pluginID === t && (!e && r.snapshot.phase === "checking" && r.operation?.kind === "check" || (
|
|
1188
|
+
const e = We.delete(t);
|
|
1189
|
+
for (const r of pe.values())
|
|
1190
|
+
r.pluginID === t && (!e && r.snapshot.phase === "checking" && r.operation?.kind === "check" || (Ne(r, {
|
|
1191
1191
|
phase: "checking",
|
|
1192
1192
|
connection: r.snapshot.connection
|
|
1193
|
-
}), r.users &&
|
|
1193
|
+
}), r.users && _e(r, "check").catch(() => {
|
|
1194
1194
|
})));
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function xe() {
|
|
1197
1197
|
if (!(typeof document < "u" && document.visibilityState === "hidden"))
|
|
1198
|
-
for (const t of
|
|
1199
|
-
t.users && !
|
|
1198
|
+
for (const t of pe.values())
|
|
1199
|
+
t.users && !We.has(t.pluginID) && _e(t, "check", !0).catch(() => {
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
1202
1202
|
function as() {
|
|
1203
|
-
|
|
1203
|
+
Le.length || (Le = [U("connection/status", ({
|
|
1204
1204
|
data: t
|
|
1205
1205
|
}) => {
|
|
1206
|
-
const e =
|
|
1207
|
-
!e ||
|
|
1206
|
+
const e = pe.get(JSON.stringify([t.pluginID, t.connectionID]));
|
|
1207
|
+
!e || We.has(t.pluginID) || e.stop && t.status !== "DISCONNECTED" || t.status !== "DISCONNECTED" && e.starts.size && e.operation?.kind !== "start" || Ne(e, hn({
|
|
1208
1208
|
status: t.status,
|
|
1209
1209
|
error: "",
|
|
1210
1210
|
details: ""
|
|
1211
1211
|
}, e.snapshot.connection), t.status === "CONNECTED");
|
|
1212
|
-
}),
|
|
1212
|
+
}), U("plugin/crash", ({
|
|
1213
1213
|
data: t
|
|
1214
|
-
}) => at(t.pluginID, t.error || "The plugin stopped unexpectedly.")),
|
|
1214
|
+
}) => at(t.pluginID, t.error || "The plugin stopped unexpectedly.")), U("plugin/crash_recovery_failed", ({
|
|
1215
1215
|
data: t
|
|
1216
|
-
}) => at(t.pluginID, t.error || "Plugin recovery failed.")),
|
|
1216
|
+
}) => at(t.pluginID, t.error || "Plugin recovery failed.")), U("plugin/recovered", ({
|
|
1217
1217
|
data: t
|
|
1218
|
-
}) => Wt(t.pluginID)),
|
|
1218
|
+
}) => Wt(t.pluginID)), U("plugin/state_change", ({
|
|
1219
1219
|
data: t
|
|
1220
1220
|
}) => {
|
|
1221
1221
|
t.to === "Running" ? Wt(t.pluginID) : at(t.pluginID, t.reason || `The plugin is ${t.to}.`);
|
|
1222
|
-
})], typeof window < "u" && (window.addEventListener("focus",
|
|
1223
|
-
window.removeEventListener("focus",
|
|
1224
|
-
})), typeof document < "u" && (document.addEventListener("visibilitychange",
|
|
1222
|
+
})], typeof window < "u" && (window.addEventListener("focus", xe), window.addEventListener("pageshow", xe), Le.push(() => {
|
|
1223
|
+
window.removeEventListener("focus", xe), window.removeEventListener("pageshow", xe);
|
|
1224
|
+
})), typeof document < "u" && (document.addEventListener("visibilitychange", xe), Le.push(() => document.removeEventListener("visibilitychange", xe))));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return
|
|
1228
|
-
if (t.users--, ct--, t.users || (
|
|
1229
|
-
for (const e of
|
|
1230
|
-
|
|
1226
|
+
function Ae(t) {
|
|
1227
|
+
return pe.set(t.key, t), t.users++, ct++, as(), () => {
|
|
1228
|
+
if (t.users--, ct--, t.users || (Ne(t, gn), pe.get(t.key) === t && pe.delete(t.key)), !ct) {
|
|
1229
|
+
for (const e of Le) e();
|
|
1230
|
+
Le = [], We.clear();
|
|
1231
1231
|
}
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function _e(t, e, r = !1) {
|
|
1235
1235
|
if (t.stop) return Promise.reject(new Error("Connection is disconnecting. Wait for it to stop before connecting."));
|
|
1236
|
-
const n =
|
|
1236
|
+
const n = We.get(t.pluginID);
|
|
1237
1237
|
if (n)
|
|
1238
1238
|
return Qe(t, {
|
|
1239
1239
|
phase: "error",
|
|
@@ -1262,27 +1262,27 @@ function Se(t, e, r = !1) {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
function Xe(t, e) {
|
|
1264
1264
|
return {
|
|
1265
|
-
getSnapshot: () =>
|
|
1265
|
+
getSnapshot: () => Re(t, e).snapshot,
|
|
1266
1266
|
subscribe: (r) => {
|
|
1267
|
-
const n =
|
|
1268
|
-
return n.listeners.add(r), s &&
|
|
1267
|
+
const n = Re(t, e), s = n.users === 0, i = Ae(n);
|
|
1268
|
+
return n.listeners.add(r), s && _e(n, "check").catch(() => {
|
|
1269
1269
|
}), () => {
|
|
1270
1270
|
n.listeners.delete(r), i();
|
|
1271
1271
|
};
|
|
1272
1272
|
},
|
|
1273
1273
|
connect: async () => {
|
|
1274
|
-
const r =
|
|
1274
|
+
const r = Re(t, e), n = Ae(r);
|
|
1275
1275
|
try {
|
|
1276
|
-
await
|
|
1276
|
+
await _e(r, "start");
|
|
1277
1277
|
} catch {
|
|
1278
1278
|
} finally {
|
|
1279
1279
|
n();
|
|
1280
1280
|
}
|
|
1281
1281
|
},
|
|
1282
1282
|
retry: async () => {
|
|
1283
|
-
const r =
|
|
1283
|
+
const r = Re(t, e), n = Ae(r);
|
|
1284
1284
|
try {
|
|
1285
|
-
await
|
|
1285
|
+
await _e(r, "check");
|
|
1286
1286
|
} catch {
|
|
1287
1287
|
} finally {
|
|
1288
1288
|
n();
|
|
@@ -1291,10 +1291,10 @@ function Xe(t, e) {
|
|
|
1291
1291
|
};
|
|
1292
1292
|
}
|
|
1293
1293
|
async function et(t, e) {
|
|
1294
|
-
const r =
|
|
1294
|
+
const r = Re(t, e), n = Ae(r);
|
|
1295
1295
|
try {
|
|
1296
1296
|
try {
|
|
1297
|
-
await
|
|
1297
|
+
await _e(r, "check", !0);
|
|
1298
1298
|
} catch {
|
|
1299
1299
|
}
|
|
1300
1300
|
if (r.snapshot.phase !== "connected")
|
|
@@ -1304,10 +1304,10 @@ async function et(t, e) {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
async function Do(t, e, r) {
|
|
1307
|
-
const n =
|
|
1307
|
+
const n = Re(t, e), s = Ae(n);
|
|
1308
1308
|
try {
|
|
1309
1309
|
try {
|
|
1310
|
-
await
|
|
1310
|
+
await _e(n, "check", !0);
|
|
1311
1311
|
} catch {
|
|
1312
1312
|
}
|
|
1313
1313
|
if (n.snapshot.phase !== "connected")
|
|
@@ -1321,43 +1321,43 @@ async function Do(t, e, r) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
1323
|
function mt(t, e) {
|
|
1324
|
-
return
|
|
1324
|
+
return pe.get(JSON.stringify([t, e]))?.generation;
|
|
1325
1325
|
}
|
|
1326
1326
|
function Ke(t, e, r) {
|
|
1327
|
-
const n =
|
|
1327
|
+
const n = pe.get(JSON.stringify([t, e]));
|
|
1328
1328
|
return r !== void 0 && n?.generation === r && n.snapshot.phase === "connected";
|
|
1329
1329
|
}
|
|
1330
1330
|
async function ls(t, e) {
|
|
1331
|
-
const r =
|
|
1331
|
+
const r = Re(t, e), n = Ae(r);
|
|
1332
1332
|
try {
|
|
1333
|
-
return await
|
|
1333
|
+
return await _e(r, "start");
|
|
1334
1334
|
} finally {
|
|
1335
1335
|
n();
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
1338
|
function mn(t, e) {
|
|
1339
|
-
const r =
|
|
1339
|
+
const r = Re(t, e);
|
|
1340
1340
|
if (r.stop) return r.stop;
|
|
1341
|
-
const n =
|
|
1341
|
+
const n = Ae(r), s = Promise.resolve().then(() => Ln(t, e)).then((i) => (Ne(r, {
|
|
1342
1342
|
phase: "disconnected",
|
|
1343
1343
|
connection: i
|
|
1344
1344
|
}), i), (i) => {
|
|
1345
|
-
throw
|
|
1345
|
+
throw Ne(r, yn(i, r.snapshot.connection)), i;
|
|
1346
1346
|
}).finally(() => {
|
|
1347
1347
|
r.stop = void 0, n();
|
|
1348
1348
|
});
|
|
1349
|
-
return r.stop = s,
|
|
1349
|
+
return r.stop = s, Ne(r, {
|
|
1350
1350
|
phase: "disconnected",
|
|
1351
1351
|
message: "Disconnecting. Wait for the connection to stop before reconnecting.",
|
|
1352
1352
|
connection: r.snapshot.connection
|
|
1353
1353
|
}), s;
|
|
1354
1354
|
}
|
|
1355
1355
|
function Qt(t, e, r = !1) {
|
|
1356
|
-
const n =
|
|
1357
|
-
n && (
|
|
1356
|
+
const n = pe.get(JSON.stringify([t, e]));
|
|
1357
|
+
n && (Ne(n, {
|
|
1358
1358
|
phase: r ? "not-found" : "checking",
|
|
1359
1359
|
connection: r ? void 0 : n.snapshot.connection
|
|
1360
|
-
}), !r && n.users &&
|
|
1360
|
+
}), !r && n.users && _e(n, "check").catch(() => {
|
|
1361
1361
|
}));
|
|
1362
1362
|
}
|
|
1363
1363
|
function lt(t) {
|
|
@@ -1365,13 +1365,13 @@ function lt(t) {
|
|
|
1365
1365
|
return t;
|
|
1366
1366
|
}
|
|
1367
1367
|
const Ro = (t) => {
|
|
1368
|
-
const e =
|
|
1368
|
+
const e = F(91), {
|
|
1369
1369
|
pluginID: r,
|
|
1370
1370
|
connectionID: n,
|
|
1371
1371
|
enabled: s
|
|
1372
1372
|
} = t, i = s === void 0 ? !0 : s, o = Q(r), c = ie(), {
|
|
1373
1373
|
showSnackbar: l
|
|
1374
|
-
} =
|
|
1374
|
+
} = ge();
|
|
1375
1375
|
let a;
|
|
1376
1376
|
e[0] !== n || e[1] !== o ? (a = [o, "connection", "detail", n], e[0] = n, e[1] = o, e[2] = a) : a = e[2];
|
|
1377
1377
|
const d = a;
|
|
@@ -1380,7 +1380,7 @@ const Ro = (t) => {
|
|
|
1380
1380
|
await Promise.all([c.invalidateQueries({
|
|
1381
1381
|
queryKey: [o, "connection"]
|
|
1382
1382
|
}), c.invalidateQueries({
|
|
1383
|
-
queryKey:
|
|
1383
|
+
queryKey: ke.all(o)
|
|
1384
1384
|
}), c.invalidateQueries({
|
|
1385
1385
|
queryKey: [o, "resource-v2", "editor-schemas"]
|
|
1386
1386
|
})]);
|
|
@@ -1394,7 +1394,7 @@ const Ro = (t) => {
|
|
|
1394
1394
|
let h;
|
|
1395
1395
|
e[10] !== n || e[11] !== o ? (h = () => ls(o, n), e[10] = n, e[11] = o, e[12] = h) : h = e[12];
|
|
1396
1396
|
let g;
|
|
1397
|
-
e[13] !== l ? (g =
|
|
1397
|
+
e[13] !== l ? (g = oe(l, "Failed to start connection"), e[13] = l, e[14] = g) : g = e[14];
|
|
1398
1398
|
let m;
|
|
1399
1399
|
e[15] !== f || e[16] !== h || e[17] !== g ? (m = {
|
|
1400
1400
|
mutationFn: h,
|
|
@@ -1403,11 +1403,11 @@ const Ro = (t) => {
|
|
|
1403
1403
|
}, e[15] = f, e[16] = h, e[17] = g, e[18] = m) : m = e[18];
|
|
1404
1404
|
const {
|
|
1405
1405
|
mutateAsync: y
|
|
1406
|
-
} =
|
|
1406
|
+
} = te(m);
|
|
1407
1407
|
let b;
|
|
1408
1408
|
e[19] !== n || e[20] !== o ? (b = () => mn(o, n), e[19] = n, e[20] = o, e[21] = b) : b = e[21];
|
|
1409
1409
|
let w;
|
|
1410
|
-
e[22] !== l ? (w =
|
|
1410
|
+
e[22] !== l ? (w = oe(l, "Failed to stop connection"), e[22] = l, e[23] = w) : w = e[23];
|
|
1411
1411
|
let E;
|
|
1412
1412
|
e[24] !== f || e[25] !== b || e[26] !== w ? (E = {
|
|
1413
1413
|
mutationFn: b,
|
|
@@ -1416,13 +1416,19 @@ const Ro = (t) => {
|
|
|
1416
1416
|
}, e[24] = f, e[25] = b, e[26] = w, e[27] = E) : E = e[27];
|
|
1417
1417
|
const {
|
|
1418
1418
|
mutateAsync: _
|
|
1419
|
-
} =
|
|
1419
|
+
} = te(E);
|
|
1420
1420
|
let S;
|
|
1421
|
-
e[28] !== o ? (S = (
|
|
1421
|
+
e[28] !== o ? (S = (fe) => {
|
|
1422
|
+
const {
|
|
1423
|
+
connection: he,
|
|
1424
|
+
credentials: Oe
|
|
1425
|
+
} = fe;
|
|
1426
|
+
return qn(o, he, Oe).then(lt);
|
|
1427
|
+
}, e[28] = o, e[29] = S) : S = e[29];
|
|
1422
1428
|
let I, D;
|
|
1423
1429
|
e[30] !== l ? (I = () => {
|
|
1424
1430
|
l("Connection profile saved", "success");
|
|
1425
|
-
}, D =
|
|
1431
|
+
}, D = oe(l, "Failed to save connection profile"), e[30] = l, e[31] = I, e[32] = D) : (I = e[31], D = e[32]);
|
|
1426
1432
|
let R;
|
|
1427
1433
|
e[33] !== v || e[34] !== S || e[35] !== I || e[36] !== D ? (R = {
|
|
1428
1434
|
mutationFn: S,
|
|
@@ -1431,91 +1437,97 @@ const Ro = (t) => {
|
|
|
1431
1437
|
onSettled: v
|
|
1432
1438
|
}, e[33] = v, e[34] = S, e[35] = I, e[36] = D, e[37] = R) : R = e[37];
|
|
1433
1439
|
const {
|
|
1434
|
-
mutateAsync:
|
|
1435
|
-
} =
|
|
1440
|
+
mutateAsync: T
|
|
1441
|
+
} = te(R);
|
|
1436
1442
|
let N;
|
|
1437
|
-
e[38] !==
|
|
1438
|
-
|
|
1439
|
-
|
|
1443
|
+
e[38] !== T ? (N = (fe, he) => T({
|
|
1444
|
+
connection: fe,
|
|
1445
|
+
credentials: he
|
|
1446
|
+
}), e[38] = T, e[39] = N) : N = e[39];
|
|
1447
|
+
const M = N;
|
|
1448
|
+
let C;
|
|
1449
|
+
e[40] !== n || e[41] !== o ? (C = () => $n(o, n).then(lt), e[40] = n, e[41] = o, e[42] = C) : C = e[42];
|
|
1450
|
+
let k, O;
|
|
1451
|
+
e[43] !== l ? (k = () => {
|
|
1440
1452
|
l("Connection profile imported", "success");
|
|
1441
|
-
},
|
|
1442
|
-
let
|
|
1443
|
-
e[
|
|
1444
|
-
mutationFn:
|
|
1445
|
-
onSuccess:
|
|
1446
|
-
onError:
|
|
1453
|
+
}, O = oe(l, "Failed to import connection profile"), e[43] = l, e[44] = k, e[45] = O) : (k = e[44], O = e[45]);
|
|
1454
|
+
let $;
|
|
1455
|
+
e[46] !== v || e[47] !== C || e[48] !== k || e[49] !== O ? ($ = {
|
|
1456
|
+
mutationFn: C,
|
|
1457
|
+
onSuccess: k,
|
|
1458
|
+
onError: O,
|
|
1447
1459
|
onSettled: v
|
|
1448
|
-
}, e[
|
|
1460
|
+
}, e[46] = v, e[47] = C, e[48] = k, e[49] = O, e[50] = $) : $ = e[50];
|
|
1449
1461
|
const {
|
|
1450
|
-
mutateAsync:
|
|
1451
|
-
} =
|
|
1452
|
-
let
|
|
1453
|
-
e[
|
|
1454
|
-
let
|
|
1455
|
-
e[
|
|
1462
|
+
mutateAsync: A
|
|
1463
|
+
} = te($);
|
|
1464
|
+
let x;
|
|
1465
|
+
e[51] !== n || e[52] !== o ? (x = () => Mn(o, n).then(lt), e[51] = n, e[52] = o, e[53] = x) : x = e[53];
|
|
1466
|
+
let q, z;
|
|
1467
|
+
e[54] !== l ? (q = () => {
|
|
1456
1468
|
l("Connection profile reset", "success");
|
|
1457
|
-
},
|
|
1458
|
-
let
|
|
1459
|
-
e[
|
|
1460
|
-
mutationFn:
|
|
1461
|
-
onSuccess:
|
|
1462
|
-
onError:
|
|
1469
|
+
}, z = oe(l, "Failed to reset connection profile"), e[54] = l, e[55] = q, e[56] = z) : (q = e[55], z = e[56]);
|
|
1470
|
+
let B;
|
|
1471
|
+
e[57] !== v || e[58] !== x || e[59] !== q || e[60] !== z ? (B = {
|
|
1472
|
+
mutationFn: x,
|
|
1473
|
+
onSuccess: q,
|
|
1474
|
+
onError: z,
|
|
1463
1475
|
onSettled: v
|
|
1464
|
-
}, e[
|
|
1476
|
+
}, e[57] = v, e[58] = x, e[59] = q, e[60] = z, e[61] = B) : B = e[61];
|
|
1465
1477
|
const {
|
|
1466
|
-
mutateAsync:
|
|
1467
|
-
} =
|
|
1478
|
+
mutateAsync: H
|
|
1479
|
+
} = te(B);
|
|
1480
|
+
let V;
|
|
1481
|
+
e[62] !== n || e[63] !== o ? (V = () => Un(o, n), e[62] = n, e[63] = o, e[64] = V) : V = e[64];
|
|
1468
1482
|
let G;
|
|
1469
|
-
e[
|
|
1470
|
-
let z;
|
|
1471
|
-
e[63] !== n || e[64] !== o || e[65] !== l ? (z = () => {
|
|
1483
|
+
e[65] !== n || e[66] !== o || e[67] !== l ? (G = () => {
|
|
1472
1484
|
Qt(o, n, !0), l("Connection disabled", "success");
|
|
1473
|
-
}, e[
|
|
1474
|
-
let
|
|
1475
|
-
e[
|
|
1476
|
-
let
|
|
1477
|
-
e[
|
|
1478
|
-
mutationFn:
|
|
1479
|
-
onSuccess:
|
|
1480
|
-
onError:
|
|
1485
|
+
}, e[65] = n, e[66] = o, e[67] = l, e[68] = G) : G = e[68];
|
|
1486
|
+
let J;
|
|
1487
|
+
e[69] !== l ? (J = oe(l, "Failed to disable connection"), e[69] = l, e[70] = J) : J = e[70];
|
|
1488
|
+
let W;
|
|
1489
|
+
e[71] !== f || e[72] !== V || e[73] !== G || e[74] !== J ? (W = {
|
|
1490
|
+
mutationFn: V,
|
|
1491
|
+
onSuccess: G,
|
|
1492
|
+
onError: J,
|
|
1481
1493
|
onSettled: f
|
|
1482
|
-
}, e[
|
|
1494
|
+
}, e[71] = f, e[72] = V, e[73] = G, e[74] = J, e[75] = W) : W = e[75];
|
|
1483
1495
|
const {
|
|
1484
|
-
mutateAsync:
|
|
1485
|
-
} =
|
|
1486
|
-
let
|
|
1487
|
-
e[
|
|
1488
|
-
const
|
|
1489
|
-
let
|
|
1490
|
-
e[
|
|
1496
|
+
mutateAsync: Y
|
|
1497
|
+
} = te(W);
|
|
1498
|
+
let de;
|
|
1499
|
+
e[76] !== n || e[77] !== o ? (de = () => Wn(o, n), e[76] = n, e[77] = o, e[78] = de) : de = e[78];
|
|
1500
|
+
const we = i && !!n;
|
|
1501
|
+
let Ee;
|
|
1502
|
+
e[79] !== d || e[80] !== de || e[81] !== we ? (Ee = {
|
|
1491
1503
|
queryKey: d,
|
|
1492
|
-
queryFn:
|
|
1493
|
-
enabled:
|
|
1494
|
-
}, e[
|
|
1495
|
-
const
|
|
1496
|
-
let
|
|
1497
|
-
return e[
|
|
1498
|
-
connection:
|
|
1504
|
+
queryFn: de,
|
|
1505
|
+
enabled: we
|
|
1506
|
+
}, e[79] = d, e[80] = de, e[81] = we, e[82] = Ee) : Ee = e[82];
|
|
1507
|
+
const Se = j(Ee);
|
|
1508
|
+
let ee;
|
|
1509
|
+
return e[83] !== Se || e[84] !== A || e[85] !== Y || e[86] !== H || e[87] !== M || e[88] !== y || e[89] !== _ ? (ee = {
|
|
1510
|
+
connection: Se,
|
|
1499
1511
|
startConnection: y,
|
|
1500
1512
|
stopConnection: _,
|
|
1501
|
-
saveConnectionProfile:
|
|
1502
|
-
importConnectionProfile:
|
|
1503
|
-
resetConnectionProfile:
|
|
1504
|
-
removeConnection:
|
|
1505
|
-
}, e[
|
|
1513
|
+
saveConnectionProfile: M,
|
|
1514
|
+
importConnectionProfile: A,
|
|
1515
|
+
resetConnectionProfile: H,
|
|
1516
|
+
removeConnection: Y
|
|
1517
|
+
}, e[83] = Se, e[84] = A, e[85] = Y, e[86] = H, e[87] = M, e[88] = y, e[89] = _, e[90] = ee) : ee = e[90], ee;
|
|
1506
1518
|
}, us = (t) => [t, "connection", "list"], No = (t) => {
|
|
1507
|
-
const e =
|
|
1519
|
+
const e = F(33), {
|
|
1508
1520
|
plugin: r
|
|
1509
1521
|
} = t, n = Q(r), s = ie(), {
|
|
1510
1522
|
showSnackbar: i
|
|
1511
|
-
} =
|
|
1523
|
+
} = ge();
|
|
1512
1524
|
let o;
|
|
1513
1525
|
e[0] !== n ? (o = us(n), e[0] = n, e[1] = o) : o = e[1];
|
|
1514
1526
|
const c = o;
|
|
1515
1527
|
let l;
|
|
1516
1528
|
e[2] !== n ? (l = (I) => Ht(n, I), e[2] = n, e[3] = l) : l = e[3];
|
|
1517
1529
|
let a;
|
|
1518
|
-
e[4] !== i ? (a =
|
|
1530
|
+
e[4] !== i ? (a = oe(i, "Failed to start connection watch"), e[4] = i, e[5] = a) : a = e[5];
|
|
1519
1531
|
let d;
|
|
1520
1532
|
e[6] !== l || e[7] !== a ? (d = {
|
|
1521
1533
|
mutationFn: l,
|
|
@@ -1523,11 +1535,11 @@ const Ro = (t) => {
|
|
|
1523
1535
|
}, e[6] = l, e[7] = a, e[8] = d) : d = e[8];
|
|
1524
1536
|
const {
|
|
1525
1537
|
mutateAsync: u
|
|
1526
|
-
} =
|
|
1538
|
+
} = te(d);
|
|
1527
1539
|
let f;
|
|
1528
1540
|
e[9] !== n ? (f = (I) => Qn(n, I), e[9] = n, e[10] = f) : f = e[10];
|
|
1529
1541
|
let p;
|
|
1530
|
-
e[11] !== i ? (p =
|
|
1542
|
+
e[11] !== i ? (p = oe(i, "Failed to stop connection watch"), e[11] = i, e[12] = p) : p = e[12];
|
|
1531
1543
|
let v;
|
|
1532
1544
|
e[13] !== f || e[14] !== p ? (v = {
|
|
1533
1545
|
mutationFn: f,
|
|
@@ -1535,7 +1547,7 @@ const Ro = (t) => {
|
|
|
1535
1547
|
}, e[13] = f, e[14] = p, e[15] = v) : v = e[15];
|
|
1536
1548
|
const {
|
|
1537
1549
|
mutateAsync: h
|
|
1538
|
-
} =
|
|
1550
|
+
} = te(v);
|
|
1539
1551
|
let g;
|
|
1540
1552
|
e[16] !== s || e[17] !== c ? (g = (I) => {
|
|
1541
1553
|
const D = I.data;
|
|
@@ -1544,7 +1556,7 @@ const Ro = (t) => {
|
|
|
1544
1556
|
const m = g;
|
|
1545
1557
|
let y, b;
|
|
1546
1558
|
e[19] !== m || e[20] !== n ? (b = () => {
|
|
1547
|
-
const I =
|
|
1559
|
+
const I = U(`${n}/connection/sync`, m);
|
|
1548
1560
|
return () => {
|
|
1549
1561
|
I();
|
|
1550
1562
|
};
|
|
@@ -1555,7 +1567,7 @@ const Ro = (t) => {
|
|
|
1555
1567
|
return await Kn(n);
|
|
1556
1568
|
} catch (I) {
|
|
1557
1569
|
const D = I;
|
|
1558
|
-
console.log(D),
|
|
1570
|
+
console.log(D), oe(i, "Failed to load connections")(D);
|
|
1559
1571
|
}
|
|
1560
1572
|
return [];
|
|
1561
1573
|
}, e[23] = n, e[24] = i, e[25] = w) : w = e[25];
|
|
@@ -1585,14 +1597,14 @@ const Ro = (t) => {
|
|
|
1585
1597
|
}
|
|
1586
1598
|
};
|
|
1587
1599
|
function le(t) {
|
|
1588
|
-
const e =
|
|
1600
|
+
const e = F(8), {
|
|
1589
1601
|
pluginID: r,
|
|
1590
1602
|
connectionID: n,
|
|
1591
1603
|
enabled: s
|
|
1592
1604
|
} = t, i = s === void 0 ? !0 : s, o = Q(r);
|
|
1593
1605
|
let c;
|
|
1594
1606
|
e[0] !== n || e[1] !== i || e[2] !== o ? (c = i ? Xe(o, n) : fs, e[0] = n, e[1] = i, e[2] = o, e[3] = c) : c = e[3];
|
|
1595
|
-
const l = c, a =
|
|
1607
|
+
const l = c, a = Ue(l.subscribe, l.getSnapshot, l.getSnapshot);
|
|
1596
1608
|
let d;
|
|
1597
1609
|
return e[4] !== a || e[5] !== l.connect || e[6] !== l.retry ? (d = {
|
|
1598
1610
|
...a,
|
|
@@ -1602,7 +1614,7 @@ function le(t) {
|
|
|
1602
1614
|
}
|
|
1603
1615
|
function ue(t, e) {
|
|
1604
1616
|
const r = ie();
|
|
1605
|
-
return
|
|
1617
|
+
return Ie(async (n, s, i, o = e) => {
|
|
1606
1618
|
const c = o, l = mt(t, c), a = () => l !== void 0 && Ke(t, c, l);
|
|
1607
1619
|
if (s.aborted || !a()) throw new je({
|
|
1608
1620
|
revert: !0
|
|
@@ -1641,7 +1653,7 @@ function ue(t, e) {
|
|
|
1641
1653
|
}, [t, e, r]);
|
|
1642
1654
|
}
|
|
1643
1655
|
const ko = (t) => {
|
|
1644
|
-
const e =
|
|
1656
|
+
const e = F(20), {
|
|
1645
1657
|
pluginID: r,
|
|
1646
1658
|
route: n,
|
|
1647
1659
|
dimension: s,
|
|
@@ -1719,29 +1731,29 @@ function bt(t, e, r) {
|
|
|
1719
1731
|
return s.states[r.type] = r.state, s;
|
|
1720
1732
|
}
|
|
1721
1733
|
function Oo() {
|
|
1722
|
-
const [t, e] =
|
|
1734
|
+
const [t, e] = me(/* @__PURE__ */ new Map()), r = re(t), n = re(/* @__PURE__ */ new Map()), s = re(/* @__PURE__ */ new Map()), [i, o] = me(!0), [c, l] = me(), a = re({
|
|
1723
1735
|
generation: 0
|
|
1724
|
-
}), [d, u] =
|
|
1725
|
-
|
|
1726
|
-
const C =
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
const
|
|
1730
|
-
return
|
|
1736
|
+
}), [d, u] = me({}), [f, p] = me(/* @__PURE__ */ new Map()), v = re(/* @__PURE__ */ new Map()), [h, g] = me(/* @__PURE__ */ new Map());
|
|
1737
|
+
ve(() => {
|
|
1738
|
+
const C = U("plugin/crash_recovery_failed", (O) => {
|
|
1739
|
+
const $ = O.data, A = $?.pluginID;
|
|
1740
|
+
A && g((x) => {
|
|
1741
|
+
const q = new Map(x);
|
|
1742
|
+
return q.set(A, $.error ?? "Crash recovery failed"), q;
|
|
1731
1743
|
});
|
|
1732
|
-
}), k =
|
|
1733
|
-
const
|
|
1734
|
-
|
|
1735
|
-
if (!x.has(
|
|
1736
|
-
const
|
|
1737
|
-
return
|
|
1744
|
+
}), k = U("plugin/recovered", (O) => {
|
|
1745
|
+
const A = O.data?.pluginID;
|
|
1746
|
+
A && g((x) => {
|
|
1747
|
+
if (!x.has(A)) return x;
|
|
1748
|
+
const q = new Map(x);
|
|
1749
|
+
return q.delete(A), q;
|
|
1738
1750
|
});
|
|
1739
1751
|
});
|
|
1740
1752
|
return () => {
|
|
1741
1753
|
C(), k();
|
|
1742
1754
|
};
|
|
1743
1755
|
}, []);
|
|
1744
|
-
const m =
|
|
1756
|
+
const m = Ie(async () => {
|
|
1745
1757
|
const C = ++a.current.generation;
|
|
1746
1758
|
n.current.clear(), s.current.clear();
|
|
1747
1759
|
let k;
|
|
@@ -1752,131 +1764,131 @@ function Oo() {
|
|
|
1752
1764
|
}
|
|
1753
1765
|
await k.then((O) => {
|
|
1754
1766
|
if (C !== a.current.generation || !O) return;
|
|
1755
|
-
const
|
|
1756
|
-
for (const [
|
|
1757
|
-
if (
|
|
1758
|
-
|
|
1759
|
-
for (const
|
|
1760
|
-
const
|
|
1761
|
-
readiness:
|
|
1762
|
-
readinessError:
|
|
1767
|
+
const $ = {}, A = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
|
|
1768
|
+
for (const [q, z] of Object.entries(O))
|
|
1769
|
+
if (z) {
|
|
1770
|
+
$[q] = z.map((B) => B.connection);
|
|
1771
|
+
for (const B of z) {
|
|
1772
|
+
const H = JSON.stringify([q, B.connection.id]), V = n.current.get(H) ?? {
|
|
1773
|
+
readiness: B.readiness,
|
|
1774
|
+
readinessError: B.readinessError
|
|
1763
1775
|
};
|
|
1764
|
-
if (
|
|
1765
|
-
const
|
|
1766
|
-
pluginID:
|
|
1767
|
-
connectionID:
|
|
1776
|
+
if (A.set(H, V), V.readiness !== "CONNECTED") continue;
|
|
1777
|
+
const G = {
|
|
1778
|
+
pluginID: q,
|
|
1779
|
+
connectionID: B.connection.id,
|
|
1768
1780
|
states: {}
|
|
1769
1781
|
};
|
|
1770
|
-
if (
|
|
1771
|
-
for (const [
|
|
1772
|
-
|
|
1773
|
-
Object.assign(
|
|
1782
|
+
if (B.resources)
|
|
1783
|
+
for (const [J, W] of Object.entries(B.resources))
|
|
1784
|
+
G.states[J] = W;
|
|
1785
|
+
Object.assign(G.states, s.current.get(H)?.states), v.current.set(H, G), x.set(H, vt(G));
|
|
1774
1786
|
}
|
|
1775
1787
|
}
|
|
1776
|
-
u(
|
|
1777
|
-
for (const [
|
|
1778
|
-
r.current =
|
|
1788
|
+
u($);
|
|
1789
|
+
for (const [q, z] of n.current) A.set(q, z);
|
|
1790
|
+
r.current = A, e(A), p(x);
|
|
1779
1791
|
}).catch((O) => {
|
|
1780
|
-
C === a.current.generation && l(
|
|
1792
|
+
C === a.current.generation && l(be(O));
|
|
1781
1793
|
}).finally(() => {
|
|
1782
1794
|
C === a.current.generation && o(!1);
|
|
1783
1795
|
});
|
|
1784
|
-
}, []), y =
|
|
1796
|
+
}, []), y = Ie(async () => {
|
|
1785
1797
|
o(!0), l(void 0), await m();
|
|
1786
1798
|
}, [m]);
|
|
1787
|
-
|
|
1799
|
+
ve(() => {
|
|
1788
1800
|
const C = a.current;
|
|
1789
1801
|
return m().catch((k) => {
|
|
1790
1802
|
console.error("Connection status refresh failed:", k);
|
|
1791
1803
|
}), () => {
|
|
1792
1804
|
++C.generation;
|
|
1793
1805
|
};
|
|
1794
|
-
}, [m]),
|
|
1806
|
+
}, [m]), ve(() => {
|
|
1795
1807
|
let C = !0, k = 0;
|
|
1796
|
-
const O =
|
|
1797
|
-
const
|
|
1798
|
-
readiness:
|
|
1808
|
+
const O = U("connection/status", ($) => {
|
|
1809
|
+
const A = $.data, x = JSON.stringify([A.pluginID, A.connectionID]), q = A.status === "DISCONNECTED" || A.status === "PENDING" || A.status === "CONNECTED" || A.status === "FAILED" ? A.status : "UNKNOWN", z = {
|
|
1810
|
+
readiness: q
|
|
1799
1811
|
};
|
|
1800
|
-
n.current.set(x,
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1803
|
-
const
|
|
1804
|
-
return
|
|
1812
|
+
n.current.set(x, z);
|
|
1813
|
+
const B = new Map(r.current);
|
|
1814
|
+
B.set(x, z), r.current = B, e(B), q !== "CONNECTED" && (p((G) => {
|
|
1815
|
+
const J = new Map(G);
|
|
1816
|
+
return J.delete(x), J;
|
|
1805
1817
|
}), v.current.delete(x), s.current.delete(x));
|
|
1806
|
-
const
|
|
1807
|
-
Bn().then((
|
|
1808
|
-
if (!C ||
|
|
1809
|
-
const
|
|
1810
|
-
for (const [
|
|
1811
|
-
|
|
1812
|
-
u(
|
|
1813
|
-
}).catch((
|
|
1814
|
-
C &&
|
|
1818
|
+
const H = ++k, V = a.current.generation;
|
|
1819
|
+
Bn().then((G) => {
|
|
1820
|
+
if (!C || H !== k || V !== a.current.generation || !G) return;
|
|
1821
|
+
const J = {};
|
|
1822
|
+
for (const [W, Y] of Object.entries(G))
|
|
1823
|
+
Y != null && (J[W] = Y);
|
|
1824
|
+
u(J);
|
|
1825
|
+
}).catch((G) => {
|
|
1826
|
+
C && H === k && V === a.current.generation && console.error("Connection metadata refresh failed:", G);
|
|
1815
1827
|
});
|
|
1816
1828
|
});
|
|
1817
1829
|
return () => {
|
|
1818
1830
|
C = !1, O();
|
|
1819
1831
|
};
|
|
1820
1832
|
}, []);
|
|
1821
|
-
const b =
|
|
1833
|
+
const b = Ie((C) => {
|
|
1822
1834
|
const k = C.data, O = kt(k.pluginID, k);
|
|
1823
1835
|
if (r.current.get(O)?.readiness !== "CONNECTED") return;
|
|
1824
|
-
const
|
|
1836
|
+
const $ = bt(v.current, k.pluginID, k);
|
|
1825
1837
|
bt(s.current, k.pluginID, k);
|
|
1826
|
-
const
|
|
1838
|
+
const A = vt($);
|
|
1827
1839
|
p((x) => {
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1840
|
+
const q = new Map(x);
|
|
1841
|
+
return q.set(O, A), q;
|
|
1830
1842
|
});
|
|
1831
1843
|
}, []);
|
|
1832
|
-
|
|
1833
|
-
const w =
|
|
1844
|
+
ve(() => U("watch/STATE", b), [b]);
|
|
1845
|
+
const w = Ie(async (C, k) => {
|
|
1834
1846
|
await mn(C, k);
|
|
1835
|
-
}, []), E =
|
|
1847
|
+
}, []), E = Ie(async (C, k) => {
|
|
1836
1848
|
if (r.current.get(JSON.stringify([C, k]))?.readiness !== "CONNECTED") return;
|
|
1837
1849
|
const O = {
|
|
1838
1850
|
connection: k
|
|
1839
|
-
},
|
|
1851
|
+
}, $ = await Ct(C, {
|
|
1840
1852
|
route: O
|
|
1841
|
-
}),
|
|
1853
|
+
}), A = await Promise.all($.types.filter((x) => x.capabilities.some((q) => q.operation === "update")).map((x) => Vt(C, {
|
|
1842
1854
|
route: O,
|
|
1843
1855
|
type: x.type
|
|
1844
1856
|
})));
|
|
1845
|
-
await Ht(C,
|
|
1846
|
-
}, []), _ =
|
|
1857
|
+
await Ht(C, A.map((x) => x.target));
|
|
1858
|
+
}, []), _ = Ie(async (C) => {
|
|
1847
1859
|
const k = h.get(C);
|
|
1848
1860
|
g((O) => {
|
|
1849
1861
|
if (!O.has(C)) return O;
|
|
1850
|
-
const
|
|
1851
|
-
return
|
|
1862
|
+
const $ = new Map(O);
|
|
1863
|
+
return $.delete(C), $;
|
|
1852
1864
|
});
|
|
1853
1865
|
try {
|
|
1854
1866
|
await zn(C);
|
|
1855
1867
|
} catch (O) {
|
|
1856
|
-
throw g((
|
|
1857
|
-
const
|
|
1858
|
-
return
|
|
1868
|
+
throw g(($) => {
|
|
1869
|
+
const A = new Map($);
|
|
1870
|
+
return A.set(C, k ?? "Reload failed"), A;
|
|
1859
1871
|
}), O;
|
|
1860
1872
|
}
|
|
1861
1873
|
}, [h]), S = [], I = new Set(t.keys());
|
|
1862
1874
|
for (const [C, k] of Object.entries(d))
|
|
1863
1875
|
for (const O of k) I.add(JSON.stringify([C, O.id]));
|
|
1864
1876
|
for (const C of I) {
|
|
1865
|
-
const [k, O] = JSON.parse(C),
|
|
1877
|
+
const [k, O] = JSON.parse(C), A = (d[k] ?? []).find((V) => V.id === O), x = t.get(C) ?? {
|
|
1866
1878
|
readiness: "UNKNOWN"
|
|
1867
|
-
},
|
|
1879
|
+
}, q = x.readiness === "CONNECTED" ? f.get(C) : void 0, z = q != null && !tt(q), B = q != null && q.errorCount > 0, H = h.get(k);
|
|
1868
1880
|
S.push({
|
|
1869
1881
|
pluginID: k,
|
|
1870
1882
|
connectionID: O,
|
|
1871
|
-
name:
|
|
1872
|
-
avatar:
|
|
1883
|
+
name: A?.name ?? O,
|
|
1884
|
+
avatar: A?.avatar ?? "",
|
|
1873
1885
|
readiness: x.readiness,
|
|
1874
1886
|
readinessError: x.readinessError,
|
|
1875
|
-
sync:
|
|
1876
|
-
isSyncing:
|
|
1877
|
-
hasErrors:
|
|
1878
|
-
pluginFailed:
|
|
1879
|
-
pluginError:
|
|
1887
|
+
sync: q,
|
|
1888
|
+
isSyncing: z,
|
|
1889
|
+
hasErrors: B || H != null || x.readiness === "FAILED" || x.readinessError != null,
|
|
1890
|
+
pluginFailed: H != null,
|
|
1891
|
+
pluginError: H
|
|
1880
1892
|
});
|
|
1881
1893
|
}
|
|
1882
1894
|
const D = /* @__PURE__ */ new Map();
|
|
@@ -1884,7 +1896,7 @@ function Oo() {
|
|
|
1884
1896
|
const k = D.get(C.pluginID) ?? [];
|
|
1885
1897
|
k.push(C), D.set(C.pluginID, k);
|
|
1886
1898
|
}
|
|
1887
|
-
const R = S.flatMap((C) => C.sync ? [C.sync] : []),
|
|
1899
|
+
const R = S.flatMap((C) => C.sync ? [C.sync] : []), T = S.filter((C) => C.isSyncing), N = S.filter((C) => C.hasErrors), M = S.filter((C) => C.pluginFailed);
|
|
1888
1900
|
return {
|
|
1889
1901
|
isLoading: i,
|
|
1890
1902
|
error: c,
|
|
@@ -1892,9 +1904,9 @@ function Oo() {
|
|
|
1892
1904
|
entries: S,
|
|
1893
1905
|
grouped: D,
|
|
1894
1906
|
connectedCount: S.filter((C) => C.readiness === "CONNECTED").length,
|
|
1895
|
-
syncingCount:
|
|
1907
|
+
syncingCount: T.length,
|
|
1896
1908
|
errorCount: N.length,
|
|
1897
|
-
failedCount:
|
|
1909
|
+
failedCount: M.length,
|
|
1898
1910
|
hasSyncing: vn(R),
|
|
1899
1911
|
aggregateProgress: bn(R),
|
|
1900
1912
|
disconnect: w,
|
|
@@ -1903,7 +1915,7 @@ function Oo() {
|
|
|
1903
1915
|
};
|
|
1904
1916
|
}
|
|
1905
1917
|
function To(t) {
|
|
1906
|
-
const e =
|
|
1918
|
+
const e = F(9), {
|
|
1907
1919
|
pluginID: r
|
|
1908
1920
|
} = t, n = Q(r);
|
|
1909
1921
|
let s, i;
|
|
@@ -2000,7 +2012,7 @@ const ps = {
|
|
|
2000
2012
|
}
|
|
2001
2013
|
};
|
|
2002
2014
|
function ws(t) {
|
|
2003
|
-
const e =
|
|
2015
|
+
const e = F(44), {
|
|
2004
2016
|
state: r,
|
|
2005
2017
|
connectionName: n,
|
|
2006
2018
|
connectionDetails: s,
|
|
@@ -2012,22 +2024,22 @@ function ws(t) {
|
|
|
2012
2024
|
return null;
|
|
2013
2025
|
const d = r.phase === "checking" || r.phase === "connecting", u = bs[r.phase], f = n ?? r.connection?.name;
|
|
2014
2026
|
let p;
|
|
2015
|
-
e[0] !== s || e[1] !== f ? (p = s ?? (f && /* @__PURE__ */ P(
|
|
2027
|
+
e[0] !== s || e[1] !== f ? (p = s ?? (f && /* @__PURE__ */ P(De, { size: "sm", tone: "muted", style: ut, children: f })), e[0] = s, e[1] = f, e[2] = p) : p = e[2];
|
|
2016
2028
|
let v;
|
|
2017
2029
|
e[3] !== d ? (v = d && /* @__PURE__ */ P(Fr, { style: vs, "aria-hidden": "true" }), e[3] = d, e[4] = v) : v = e[4];
|
|
2018
2030
|
let h;
|
|
2019
2031
|
e[5] !== a || e[6] !== u.title ? (h = /* @__PURE__ */ P("h2", { id: a, style: ys, children: u.title }), e[5] = a, e[6] = u.title, e[7] = h) : h = e[7];
|
|
2020
2032
|
let g;
|
|
2021
|
-
e[8] !== v || e[9] !== h ? (g = /* @__PURE__ */
|
|
2033
|
+
e[8] !== v || e[9] !== h ? (g = /* @__PURE__ */ ne("div", { style: hs, role: "status", "aria-live": "polite", children: [
|
|
2022
2034
|
v,
|
|
2023
2035
|
h
|
|
2024
2036
|
] }), e[8] = v, e[9] = h, e[10] = g) : g = e[10];
|
|
2025
2037
|
let m;
|
|
2026
|
-
e[11] !== u.description ? (m = /* @__PURE__ */ P(
|
|
2038
|
+
e[11] !== u.description ? (m = /* @__PURE__ */ P(De, { as: "p", size: "sm", tone: "muted", style: ut, children: u.description }), e[11] = u.description, e[12] = m) : m = e[12];
|
|
2027
2039
|
let y;
|
|
2028
|
-
e[13] !== d || e[14] !== r.message ? (y = r.message && /* @__PURE__ */ P(
|
|
2040
|
+
e[13] !== d || e[14] !== r.message ? (y = r.message && /* @__PURE__ */ P(De, { as: "p", size: "sm", style: ut, role: d ? "status" : "alert", children: r.message }), e[13] = d, e[14] = r.message, e[15] = y) : y = e[15];
|
|
2029
2041
|
let b;
|
|
2030
|
-
e[16] !== d || e[17] !== r ? (b = r.phase !== "not-found" && /* @__PURE__ */ P(
|
|
2042
|
+
e[16] !== d || e[17] !== r ? (b = r.phase !== "not-found" && /* @__PURE__ */ P(Te, { size: "sm", variant: "solid", color: "brand", disabled: d, onClick: () => {
|
|
2031
2043
|
r.connect();
|
|
2032
2044
|
}, children: "Connect and continue" }), e[16] = d, e[17] = r, e[18] = b) : b = e[18];
|
|
2033
2045
|
const w = r.phase === "checking";
|
|
@@ -2036,31 +2048,31 @@ function ws(t) {
|
|
|
2036
2048
|
r.retry();
|
|
2037
2049
|
}, e[19] = r, e[20] = E) : E = e[20];
|
|
2038
2050
|
let _;
|
|
2039
|
-
e[21] !== E || e[22] !== w ? (_ = /* @__PURE__ */ P(
|
|
2051
|
+
e[21] !== E || e[22] !== w ? (_ = /* @__PURE__ */ P(Te, { size: "sm", variant: "outline", color: "neutral", disabled: w, onClick: E, children: "Retry check" }), e[21] = E, e[22] = w, e[23] = _) : _ = e[23];
|
|
2040
2052
|
let S;
|
|
2041
|
-
e[24] !== i ? (S = i && /* @__PURE__ */ P(
|
|
2053
|
+
e[24] !== i ? (S = i && /* @__PURE__ */ P(Te, { size: "sm", variant: "outline", color: "neutral", onClick: i, children: "Edit connection" }), e[24] = i, e[25] = S) : S = e[25];
|
|
2042
2054
|
let I;
|
|
2043
|
-
e[26] !== l || e[27] !== o ? (I = o && /* @__PURE__ */ P(
|
|
2055
|
+
e[26] !== l || e[27] !== o ? (I = o && /* @__PURE__ */ P(Te, { size: "sm", variant: "outline", color: "neutral", onClick: o, children: l }), e[26] = l, e[27] = o, e[28] = I) : I = e[28];
|
|
2044
2056
|
let D;
|
|
2045
|
-
e[29] !== _ || e[30] !== S || e[31] !== I || e[32] !== b ? (D = /* @__PURE__ */
|
|
2057
|
+
e[29] !== _ || e[30] !== S || e[31] !== I || e[32] !== b ? (D = /* @__PURE__ */ ne("div", { style: ms, children: [
|
|
2046
2058
|
b,
|
|
2047
2059
|
_,
|
|
2048
2060
|
S,
|
|
2049
2061
|
I
|
|
2050
2062
|
] }), e[29] = _, e[30] = S, e[31] = I, e[32] = b, e[33] = D) : D = e[33];
|
|
2051
2063
|
let R;
|
|
2052
|
-
e[34] !== D || e[35] !== p || e[36] !== g || e[37] !== m || e[38] !== y ? (R = /* @__PURE__ */
|
|
2064
|
+
e[34] !== D || e[35] !== p || e[36] !== g || e[37] !== m || e[38] !== y ? (R = /* @__PURE__ */ ne("div", { style: gs, children: [
|
|
2053
2065
|
p,
|
|
2054
2066
|
g,
|
|
2055
2067
|
m,
|
|
2056
2068
|
y,
|
|
2057
2069
|
D
|
|
2058
2070
|
] }), e[34] = D, e[35] = p, e[36] = g, e[37] = m, e[38] = y, e[39] = R) : R = e[39];
|
|
2059
|
-
let
|
|
2060
|
-
return e[40] !== d || e[41] !== a || e[42] !== R ? (
|
|
2071
|
+
let T;
|
|
2072
|
+
return e[40] !== d || e[41] !== a || e[42] !== R ? (T = /* @__PURE__ */ P("section", { style: ps, "aria-labelledby": a, "aria-busy": d, children: R }), e[40] = d, e[41] = a, e[42] = R, e[43] = T) : T = e[43], T;
|
|
2061
2073
|
}
|
|
2062
2074
|
function Es(t) {
|
|
2063
|
-
const e =
|
|
2075
|
+
const e = F(9), {
|
|
2064
2076
|
pluginID: r,
|
|
2065
2077
|
connectionID: n,
|
|
2066
2078
|
children: s,
|
|
@@ -2080,7 +2092,7 @@ function Es(t) {
|
|
|
2080
2092
|
return e[7] !== s ? (l = /* @__PURE__ */ P(It, { children: s }), e[7] = s, e[8] = l) : l = e[8], l;
|
|
2081
2093
|
}
|
|
2082
2094
|
function Ao(t) {
|
|
2083
|
-
const e =
|
|
2095
|
+
const e = F(7), r = Q(t.pluginID);
|
|
2084
2096
|
let n;
|
|
2085
2097
|
e[0] !== r || e[1] !== t.connectionID ? (n = JSON.stringify([r, t.connectionID]), e[0] = r, e[1] = t.connectionID, e[2] = n) : n = e[2];
|
|
2086
2098
|
let s;
|
|
@@ -2090,21 +2102,21 @@ const ze = {
|
|
|
2090
2102
|
supported: void 0,
|
|
2091
2103
|
transportAvailable: !1,
|
|
2092
2104
|
isLoading: !1
|
|
2093
|
-
},
|
|
2105
|
+
}, qe = /* @__PURE__ */ new Map();
|
|
2094
2106
|
let dt, Kt = 0;
|
|
2095
|
-
function
|
|
2107
|
+
function Ce(t, e) {
|
|
2096
2108
|
const r = {
|
|
2097
2109
|
...t.state,
|
|
2098
2110
|
...e
|
|
2099
2111
|
};
|
|
2100
2112
|
Object.keys(r).every((n) => Object.is(r[n], t.state[n])) || (t.state = r, t.listeners.forEach((n) => n()));
|
|
2101
2113
|
}
|
|
2102
|
-
function
|
|
2103
|
-
let r =
|
|
2114
|
+
function $e(t, e) {
|
|
2115
|
+
let r = qe.get(t);
|
|
2104
2116
|
r || (r = {
|
|
2105
2117
|
retired: /* @__PURE__ */ new Set(),
|
|
2106
2118
|
connections: /* @__PURE__ */ new Map()
|
|
2107
|
-
},
|
|
2119
|
+
}, qe.set(t, r));
|
|
2108
2120
|
let n = r.connections.get(e);
|
|
2109
2121
|
return n || (n = {
|
|
2110
2122
|
pluginID: t,
|
|
@@ -2138,14 +2150,14 @@ function Is(t, e) {
|
|
|
2138
2150
|
};
|
|
2139
2151
|
}
|
|
2140
2152
|
function En(t, e) {
|
|
2141
|
-
const r =
|
|
2153
|
+
const r = qe.get(t.pluginID);
|
|
2142
2154
|
if (!r || r.retired.has(t.registrationID)) return;
|
|
2143
2155
|
if (r.registrationID !== t.registrationID) {
|
|
2144
2156
|
if (r.registrationID && !e) return;
|
|
2145
2157
|
if (r.registrationID) {
|
|
2146
2158
|
r.retired.add(r.registrationID);
|
|
2147
2159
|
for (const i of r.connections.values())
|
|
2148
|
-
i.epoch++, i.pending = void 0, i.revision = void 0,
|
|
2160
|
+
i.epoch++, i.pending = void 0, i.revision = void 0, Ce(i, {
|
|
2149
2161
|
...ze,
|
|
2150
2162
|
snapshot: void 0,
|
|
2151
2163
|
error: void 0
|
|
@@ -2157,10 +2169,10 @@ function En(t, e) {
|
|
|
2157
2169
|
for (const i of s) {
|
|
2158
2170
|
e && i.eventVersion++;
|
|
2159
2171
|
const o = i.state.transportAvailable, c = Ss(t.snapshot?.revision ?? t.revision);
|
|
2160
|
-
if (c !== void 0 && (i.revision === void 0 || c > i.revision) && (i.revision = c,
|
|
2172
|
+
if (c !== void 0 && (i.revision === void 0 || c > i.revision) && (i.revision = c, Ce(i, {
|
|
2161
2173
|
snapshot: t.removed ? void 0 : t.snapshot ? Is(i.state.snapshot, t.snapshot) : i.state.snapshot
|
|
2162
2174
|
})), !t.transportAvailable) {
|
|
2163
|
-
i.epoch++, i.pending = void 0,
|
|
2175
|
+
i.epoch++, i.pending = void 0, Ce(i, {
|
|
2164
2176
|
supported: t.supported,
|
|
2165
2177
|
transportAvailable: !1,
|
|
2166
2178
|
isLoading: !1
|
|
@@ -2168,16 +2180,16 @@ function En(t, e) {
|
|
|
2168
2180
|
continue;
|
|
2169
2181
|
}
|
|
2170
2182
|
if (n === void 0) {
|
|
2171
|
-
|
|
2183
|
+
Ce(i, {
|
|
2172
2184
|
supported: t.supported,
|
|
2173
2185
|
transportAvailable: !t.supported
|
|
2174
|
-
}), t.supported && i.listeners.size ? Ye(i, !1) :
|
|
2186
|
+
}), t.supported && i.listeners.size ? Ye(i, !1) : Ce(i, {
|
|
2175
2187
|
isLoading: !1,
|
|
2176
2188
|
error: void 0
|
|
2177
2189
|
});
|
|
2178
2190
|
continue;
|
|
2179
2191
|
}
|
|
2180
|
-
|
|
2192
|
+
Ce(i, {
|
|
2181
2193
|
supported: t.supported,
|
|
2182
2194
|
transportAvailable: !e || o,
|
|
2183
2195
|
isLoading: !1,
|
|
@@ -2189,7 +2201,7 @@ function Ye(t, e) {
|
|
|
2189
2201
|
if (!t.listeners.size || t.state.supported === !1) return Promise.resolve();
|
|
2190
2202
|
if (!e && t.pending) return t.pending;
|
|
2191
2203
|
const r = t.epoch, n = t.eventVersion;
|
|
2192
|
-
|
|
2204
|
+
Ce(t, {
|
|
2193
2205
|
isLoading: !0,
|
|
2194
2206
|
error: void 0
|
|
2195
2207
|
});
|
|
@@ -2204,33 +2216,33 @@ function Ye(t, e) {
|
|
|
2204
2216
|
connectionID: t.connectionID
|
|
2205
2217
|
}, !1);
|
|
2206
2218
|
}).catch((o) => {
|
|
2207
|
-
t.epoch === r && t.eventVersion === n && t.listeners.size &&
|
|
2219
|
+
t.epoch === r && t.eventVersion === n && t.listeners.size && Ce(t, {
|
|
2208
2220
|
error: o,
|
|
2209
2221
|
isLoading: !1
|
|
2210
2222
|
});
|
|
2211
2223
|
}).finally(() => {
|
|
2212
|
-
t.pending === i && (t.pending = void 0), t.epoch === r && t.listeners.size &&
|
|
2224
|
+
t.pending === i && (t.pending = void 0), t.epoch === r && t.listeners.size && Ce(t, {
|
|
2213
2225
|
isLoading: !1
|
|
2214
2226
|
});
|
|
2215
2227
|
});
|
|
2216
2228
|
return e || (t.pending = i), i;
|
|
2217
2229
|
}
|
|
2218
2230
|
function Ot(t, e) {
|
|
2219
|
-
return t.listeners.add(e), Kt++ === 0 && (dt =
|
|
2220
|
-
t.listeners.delete(e), t.listeners.size || (t.epoch++, t.pending = void 0,
|
|
2231
|
+
return t.listeners.add(e), Kt++ === 0 && (dt = U("resource/connection/metadata", (r) => En(r.data, !0))), t.listeners.size === 1 && Ye(t, !1), () => {
|
|
2232
|
+
t.listeners.delete(e), t.listeners.size || (t.epoch++, t.pending = void 0, qe.get(t.pluginID)?.connections.delete(t.connectionID)), --Kt === 0 && (dt?.(), dt = void 0, qe.clear());
|
|
2221
2233
|
};
|
|
2222
2234
|
}
|
|
2223
2235
|
function Po(t, e) {
|
|
2224
|
-
const r =
|
|
2236
|
+
const r = F(15), n = Q(t), s = n !== void 0 && e !== void 0;
|
|
2225
2237
|
let i;
|
|
2226
|
-
r[0] !== e || r[1] !== s || r[2] !== n ? (i = (p) => s ? Ot(
|
|
2238
|
+
r[0] !== e || r[1] !== s || r[2] !== n ? (i = (p) => s ? Ot($e(n, e), p) : _s, r[0] = e, r[1] = s, r[2] = n, r[3] = i) : i = r[3];
|
|
2227
2239
|
const o = i;
|
|
2228
2240
|
let c;
|
|
2229
|
-
r[4] !== e || r[5] !== s || r[6] !== n ? (c = () => s ?
|
|
2230
|
-
const a =
|
|
2241
|
+
r[4] !== e || r[5] !== s || r[6] !== n ? (c = () => s ? $e(n, e).state : ze, r[4] = e, r[5] = s, r[6] = n, r[7] = c) : c = r[7];
|
|
2242
|
+
const a = Ue(o, c, Cs);
|
|
2231
2243
|
let d;
|
|
2232
2244
|
r[8] !== e || r[9] !== s || r[10] !== n ? (d = () => {
|
|
2233
|
-
const p = s ?
|
|
2245
|
+
const p = s ? qe.get(n)?.connections.get(e) : void 0;
|
|
2234
2246
|
return p ? Ye(p, !0) : Promise.resolve();
|
|
2235
2247
|
}, r[8] = e, r[9] = s, r[10] = n, r[11] = d) : d = r[11];
|
|
2236
2248
|
const u = d;
|
|
@@ -2250,43 +2262,43 @@ function Ds(t, e) {
|
|
|
2250
2262
|
let n = /* @__PURE__ */ new Map();
|
|
2251
2263
|
return {
|
|
2252
2264
|
subscribe(s) {
|
|
2253
|
-
const i = r.map((o) => Ot(
|
|
2265
|
+
const i = r.map((o) => Ot($e(t, o), s));
|
|
2254
2266
|
return () => i.forEach((o) => o());
|
|
2255
2267
|
},
|
|
2256
2268
|
read() {
|
|
2257
|
-
const s = r.map((i) =>
|
|
2269
|
+
const s = r.map((i) => $e(t, i).state);
|
|
2258
2270
|
return (n.size !== r.length || r.some((i, o) => n.get(i) !== s[o])) && (n = new Map(r.map((i, o) => [i, s[o]]))), n;
|
|
2259
2271
|
}
|
|
2260
2272
|
};
|
|
2261
2273
|
}
|
|
2262
2274
|
function xo(t, e) {
|
|
2263
|
-
const r =
|
|
2275
|
+
const r = F(5), n = Q(t);
|
|
2264
2276
|
let s;
|
|
2265
2277
|
r[0] !== e ? (s = JSON.stringify([...new Set(e)]), r[0] = e, r[1] = s) : s = r[1];
|
|
2266
2278
|
const i = s;
|
|
2267
2279
|
let o;
|
|
2268
2280
|
r[2] !== i || r[3] !== n ? (o = Ds(n, i), r[2] = i, r[3] = n, r[4] = o) : o = r[4];
|
|
2269
2281
|
const c = o;
|
|
2270
|
-
return
|
|
2282
|
+
return Ue(c.subscribe, c.read, c.read);
|
|
2271
2283
|
}
|
|
2272
2284
|
function Rs(t, e, r) {
|
|
2273
2285
|
let n, s;
|
|
2274
2286
|
return {
|
|
2275
2287
|
read() {
|
|
2276
|
-
const i = e === void 0 ? ze :
|
|
2288
|
+
const i = e === void 0 ? ze : $e(t, e).state;
|
|
2277
2289
|
return n !== i && (s = r(i), n = i), s;
|
|
2278
2290
|
}
|
|
2279
2291
|
};
|
|
2280
2292
|
}
|
|
2281
2293
|
function Lo(t, e, r) {
|
|
2282
|
-
const n =
|
|
2294
|
+
const n = F(7), s = Q(t);
|
|
2283
2295
|
let i;
|
|
2284
|
-
n[0] !== e || n[1] !== s ? (i = (a) => e === void 0 ? Ns : Ot(
|
|
2296
|
+
n[0] !== e || n[1] !== s ? (i = (a) => e === void 0 ? Ns : Ot($e(s, e), a), n[0] = e, n[1] = s, n[2] = i) : i = n[2];
|
|
2285
2297
|
const o = i;
|
|
2286
2298
|
let c;
|
|
2287
2299
|
n[3] !== e || n[4] !== s || n[5] !== r ? (c = Rs(s, e, r), n[3] = e, n[4] = s, n[5] = r, n[6] = c) : c = n[6];
|
|
2288
2300
|
const l = c;
|
|
2289
|
-
return
|
|
2301
|
+
return Ue(o, l.read, l.read);
|
|
2290
2302
|
}
|
|
2291
2303
|
function Ns() {
|
|
2292
2304
|
}
|
|
@@ -2299,7 +2311,7 @@ function ks(t, e) {
|
|
|
2299
2311
|
return e === null ? t === null : Array.isArray(e) ? Array.isArray(t) : typeof e == "object" ? typeof t == "object" && t !== null && !Array.isArray(t) : typeof t == typeof e;
|
|
2300
2312
|
}
|
|
2301
2313
|
function qo(t, e, r) {
|
|
2302
|
-
const n =
|
|
2314
|
+
const n = F(29), s = Q(t), i = ie();
|
|
2303
2315
|
let o;
|
|
2304
2316
|
n[0] !== e || n[1] !== s ? (o = [s, "data", e], n[0] = e, n[1] = s, n[2] = o) : o = n[2];
|
|
2305
2317
|
const c = o;
|
|
@@ -2341,7 +2353,7 @@ function qo(t, e, r) {
|
|
|
2341
2353
|
onError: p,
|
|
2342
2354
|
onSettled: v
|
|
2343
2355
|
}, n[18] = u, n[19] = f, n[20] = p, n[21] = v, n[22] = h) : h = n[22];
|
|
2344
|
-
const g =
|
|
2356
|
+
const g = te(h), m = d.data ?? r;
|
|
2345
2357
|
let y;
|
|
2346
2358
|
n[23] !== g ? (y = async (w) => {
|
|
2347
2359
|
await g.mutateAsync(w);
|
|
@@ -2354,12 +2366,12 @@ function qo(t, e, r) {
|
|
|
2354
2366
|
}, n[25] = d.isLoading, n[26] = m, n[27] = y, n[28] = b) : b = n[28], b;
|
|
2355
2367
|
}
|
|
2356
2368
|
const $o = () => {
|
|
2357
|
-
const t =
|
|
2369
|
+
const t = Me(Yr);
|
|
2358
2370
|
if (!t)
|
|
2359
2371
|
throw new Error("useRightDrawer must be used within a RightDrawerProvider");
|
|
2360
2372
|
return t;
|
|
2361
2373
|
}, Sn = () => {
|
|
2362
|
-
const t =
|
|
2374
|
+
const t = Me(Vr);
|
|
2363
2375
|
if (t === void 0)
|
|
2364
2376
|
throw new Error("useBottomDrawer must be used within a BottomDrawerProvider");
|
|
2365
2377
|
return t;
|
|
@@ -2368,12 +2380,12 @@ const $o = () => {
|
|
|
2368
2380
|
}) => {
|
|
2369
2381
|
const e = Q(t), {
|
|
2370
2382
|
showSnackbar: r
|
|
2371
|
-
} =
|
|
2383
|
+
} = ge(), {
|
|
2372
2384
|
createTab: n,
|
|
2373
2385
|
updateTab: s
|
|
2374
2386
|
} = Sn();
|
|
2375
2387
|
return {
|
|
2376
|
-
createSession:
|
|
2388
|
+
createSession: te({
|
|
2377
2389
|
mutationFn: async ({
|
|
2378
2390
|
connectionID: o,
|
|
2379
2391
|
icon: c,
|
|
@@ -2421,7 +2433,7 @@ const $o = () => {
|
|
|
2421
2433
|
}
|
|
2422
2434
|
}), p;
|
|
2423
2435
|
} catch (p) {
|
|
2424
|
-
const v =
|
|
2436
|
+
const v = be(p);
|
|
2425
2437
|
return s({
|
|
2426
2438
|
id: u
|
|
2427
2439
|
}, {
|
|
@@ -2440,19 +2452,19 @@ const $o = () => {
|
|
|
2440
2452
|
raw: v.detail
|
|
2441
2453
|
}
|
|
2442
2454
|
}
|
|
2443
|
-
}),
|
|
2455
|
+
}), Pe(r, p, "Failed to start session"), null;
|
|
2444
2456
|
}
|
|
2445
2457
|
}
|
|
2446
2458
|
}).mutateAsync
|
|
2447
2459
|
};
|
|
2448
2460
|
};
|
|
2449
2461
|
function Uo(t) {
|
|
2450
|
-
const e =
|
|
2462
|
+
const e = F(29), {
|
|
2451
2463
|
pluginID: r,
|
|
2452
2464
|
resourceKey: n
|
|
2453
2465
|
} = t, s = Q(r), {
|
|
2454
2466
|
showSnackbar: i
|
|
2455
|
-
} =
|
|
2467
|
+
} = ge(), o = ie();
|
|
2456
2468
|
let c;
|
|
2457
2469
|
e[0] !== s || e[1] !== n ? (c = ["exec", "native-launch", s, n], e[0] = s, e[1] = n, e[2] = c) : c = e[2];
|
|
2458
2470
|
const l = c;
|
|
@@ -2487,15 +2499,15 @@ function Uo(t) {
|
|
|
2487
2499
|
e[14] !== s || e[15] !== i ? (b = async (D) => {
|
|
2488
2500
|
const {
|
|
2489
2501
|
connectionID: R,
|
|
2490
|
-
opts:
|
|
2502
|
+
opts: T
|
|
2491
2503
|
} = D;
|
|
2492
2504
|
try {
|
|
2493
2505
|
return await nr(s, R, tn.createFrom({
|
|
2494
2506
|
tty: !0,
|
|
2495
|
-
...
|
|
2507
|
+
...T
|
|
2496
2508
|
})), !0;
|
|
2497
2509
|
} catch (N) {
|
|
2498
|
-
return
|
|
2510
|
+
return Pe(i, N, "Failed to open native terminal"), !1;
|
|
2499
2511
|
}
|
|
2500
2512
|
}, e[14] = s, e[15] = i, e[16] = b) : b = e[16];
|
|
2501
2513
|
let w;
|
|
@@ -2506,7 +2518,7 @@ function Uo(t) {
|
|
|
2506
2518
|
}, e[17] = l, e[18] = b, e[19] = w) : w = e[19];
|
|
2507
2519
|
const {
|
|
2508
2520
|
mutateAsync: E
|
|
2509
|
-
} =
|
|
2521
|
+
} = te(w);
|
|
2510
2522
|
let _;
|
|
2511
2523
|
e[20] !== y || e[21] !== E || e[22] !== l || e[23] !== o ? (_ = async (D) => !y || o.isMutating({
|
|
2512
2524
|
mutationKey: l,
|
|
@@ -2521,11 +2533,11 @@ function Uo(t) {
|
|
|
2521
2533
|
}, e[25] = d, e[26] = y, e[27] = S, e[28] = I) : I = e[28], I;
|
|
2522
2534
|
}
|
|
2523
2535
|
const Wo = (t) => {
|
|
2524
|
-
const e =
|
|
2536
|
+
const e = F(15), {
|
|
2525
2537
|
pluginID: r
|
|
2526
2538
|
} = t, n = Q(r), {
|
|
2527
2539
|
showSnackbar: s
|
|
2528
|
-
} =
|
|
2540
|
+
} = ge(), {
|
|
2529
2541
|
createTab: i
|
|
2530
2542
|
} = Sn();
|
|
2531
2543
|
let o;
|
|
@@ -2571,21 +2583,21 @@ const Wo = (t) => {
|
|
|
2571
2583
|
}), C;
|
|
2572
2584
|
}, e[0] = i, e[1] = n, e[2] = o) : o = e[2];
|
|
2573
2585
|
let c;
|
|
2574
|
-
e[3] !== s ? (c =
|
|
2586
|
+
e[3] !== s ? (c = oe(s, "Failed to start log session"), e[3] = s, e[4] = c) : c = e[4];
|
|
2575
2587
|
let l;
|
|
2576
2588
|
e[5] !== o || e[6] !== c ? (l = {
|
|
2577
2589
|
mutationFn: o,
|
|
2578
2590
|
onError: c
|
|
2579
2591
|
}, e[5] = o, e[6] = c, e[7] = l) : l = e[7];
|
|
2580
|
-
const a =
|
|
2592
|
+
const a = te(l);
|
|
2581
2593
|
let d;
|
|
2582
|
-
e[8] !== s ? (d =
|
|
2594
|
+
e[8] !== s ? (d = oe(s, "Failed to close log session"), e[8] = s, e[9] = d) : d = e[9];
|
|
2583
2595
|
let u;
|
|
2584
2596
|
e[10] !== d ? (u = {
|
|
2585
2597
|
mutationFn: Os,
|
|
2586
2598
|
onError: d
|
|
2587
2599
|
}, e[10] = d, e[11] = u) : u = e[11];
|
|
2588
|
-
const f =
|
|
2600
|
+
const f = te(u);
|
|
2589
2601
|
let p;
|
|
2590
2602
|
return e[12] !== f.mutateAsync || e[13] !== a.mutateAsync ? (p = {
|
|
2591
2603
|
createLogSession: a.mutateAsync,
|
|
@@ -2596,7 +2608,7 @@ async function Os(t) {
|
|
|
2596
2608
|
await sr(t);
|
|
2597
2609
|
}
|
|
2598
2610
|
const Qo = () => {
|
|
2599
|
-
const t =
|
|
2611
|
+
const t = F(1);
|
|
2600
2612
|
let e;
|
|
2601
2613
|
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
2602
2614
|
queryKey: ["metric", "providers"],
|
|
@@ -2604,7 +2616,7 @@ const Qo = () => {
|
|
|
2604
2616
|
staleTime: 3e4
|
|
2605
2617
|
}, t[0] = e) : e = t[0], j(e);
|
|
2606
2618
|
}, Ts = (t) => {
|
|
2607
|
-
const e =
|
|
2619
|
+
const e = F(7);
|
|
2608
2620
|
let r, n;
|
|
2609
2621
|
e[0] !== t ? (r = ["metric", "providers", t], n = () => ir(t), e[0] = t, e[1] = r, e[2] = n) : (r = e[1], n = e[2]);
|
|
2610
2622
|
const s = !!t;
|
|
@@ -2616,7 +2628,7 @@ const Qo = () => {
|
|
|
2616
2628
|
staleTime: 3e4
|
|
2617
2629
|
}, e[3] = r, e[4] = n, e[5] = s, e[6] = i) : i = e[6], j(i);
|
|
2618
2630
|
}, Ko = (t) => {
|
|
2619
|
-
const e =
|
|
2631
|
+
const e = F(45), {
|
|
2620
2632
|
connectionID: r,
|
|
2621
2633
|
resourceKey: n,
|
|
2622
2634
|
resourceID: s,
|
|
@@ -2642,13 +2654,13 @@ const Qo = () => {
|
|
|
2642
2654
|
const I = S, D = f ? Math.max(Math.floor((f.end.getTime() - f.start.getTime()) / 250), 15e3) * 1e6 : 0;
|
|
2643
2655
|
let R;
|
|
2644
2656
|
e[4] !== f?.start ? (R = f?.start?.getTime(), e[4] = f?.start, e[5] = R) : R = e[5];
|
|
2645
|
-
let
|
|
2646
|
-
e[6] !== f?.end ? (
|
|
2657
|
+
let T;
|
|
2658
|
+
e[6] !== f?.end ? (T = f?.end?.getTime(), e[6] = f?.end, e[7] = T) : T = e[7];
|
|
2647
2659
|
let N;
|
|
2648
|
-
e[8] !== r || e[9] !== m || e[10] !== a || e[11] !== c || e[12] !== s || e[13] !== n || e[14] !== h || e[15] !== l || e[16] !== y || e[17] !== R || e[18] !==
|
|
2649
|
-
let
|
|
2650
|
-
e[20] !== r || e[21] !== m || e[22] !== a || e[23] !== c || e[24] !== o || e[25] !== s || e[26] !== n || e[27] !== h || e[28] !== l || e[29] !== y || e[30] !== D || e[31] !== f?.end || e[32] !== f?.start ? (
|
|
2651
|
-
const
|
|
2660
|
+
e[8] !== r || e[9] !== m || e[10] !== a || e[11] !== c || e[12] !== s || e[13] !== n || e[14] !== h || e[15] !== l || e[16] !== y || e[17] !== R || e[18] !== T ? (N = ["metric", "query", r, n, s, h, c, l, a, m, y, R, T], e[8] = r, e[9] = m, e[10] = a, e[11] = c, e[12] = s, e[13] = n, e[14] = h, e[15] = l, e[16] = y, e[17] = R, e[18] = T, e[19] = N) : N = e[19];
|
|
2661
|
+
let M;
|
|
2662
|
+
e[20] !== r || e[21] !== m || e[22] !== a || e[23] !== c || e[24] !== o || e[25] !== s || e[26] !== n || e[27] !== h || e[28] !== l || e[29] !== y || e[30] !== D || e[31] !== f?.end || e[32] !== f?.start ? (M = async () => {
|
|
2663
|
+
const B = await cr(r, {
|
|
2652
2664
|
resource_key: n,
|
|
2653
2665
|
resource_id: s,
|
|
2654
2666
|
resource_namespace: h,
|
|
@@ -2661,30 +2673,30 @@ const Qo = () => {
|
|
|
2661
2673
|
start_time: (f?.start ?? /* @__PURE__ */ new Date(0)).toISOString(),
|
|
2662
2674
|
end_time: (f?.end ?? /* @__PURE__ */ new Date(0)).toISOString(),
|
|
2663
2675
|
step: D
|
|
2664
|
-
}),
|
|
2665
|
-
for (const [
|
|
2666
|
-
|
|
2667
|
-
return
|
|
2668
|
-
}, e[20] = r, e[21] = m, e[22] = a, e[23] = c, e[24] = o, e[25] = s, e[26] = n, e[27] = h, e[28] = l, e[29] = y, e[30] = D, e[31] = f?.end, e[32] = f?.start, e[33] =
|
|
2676
|
+
}), H = {};
|
|
2677
|
+
for (const [V, G] of Object.entries(B))
|
|
2678
|
+
G != null && (H[V] = G);
|
|
2679
|
+
return H;
|
|
2680
|
+
}, e[20] = r, e[21] = m, e[22] = a, e[23] = c, e[24] = o, e[25] = s, e[26] = n, e[27] = h, e[28] = l, e[29] = y, e[30] = D, e[31] = f?.end, e[32] = f?.start, e[33] = M) : M = e[33];
|
|
2669
2681
|
const C = w && !!r && !!n && I.length > 0, k = b > 0 ? b : void 0;
|
|
2670
2682
|
let O;
|
|
2671
|
-
e[34] !==
|
|
2683
|
+
e[34] !== M || e[35] !== C || e[36] !== k || e[37] !== N ? (O = {
|
|
2672
2684
|
queryKey: N,
|
|
2673
|
-
queryFn:
|
|
2685
|
+
queryFn: M,
|
|
2674
2686
|
enabled: C,
|
|
2675
2687
|
refetchInterval: k,
|
|
2676
2688
|
staleTime: 5e3,
|
|
2677
2689
|
placeholderData: Jt
|
|
2678
|
-
}, e[34] =
|
|
2679
|
-
const
|
|
2680
|
-
let
|
|
2681
|
-
return e[39] !==
|
|
2682
|
-
data:
|
|
2690
|
+
}, e[34] = M, e[35] = C, e[36] = k, e[37] = N, e[38] = O) : O = e[38];
|
|
2691
|
+
const $ = j(O), A = $.data ?? void 0, x = _ || $.isLoading, q = $.error;
|
|
2692
|
+
let z;
|
|
2693
|
+
return e[39] !== $.refetch || e[40] !== I || e[41] !== A || e[42] !== x || e[43] !== q ? (z = {
|
|
2694
|
+
data: A,
|
|
2683
2695
|
providers: I,
|
|
2684
2696
|
isLoading: x,
|
|
2685
|
-
error:
|
|
2686
|
-
refetch:
|
|
2687
|
-
}, e[39] =
|
|
2697
|
+
error: q,
|
|
2698
|
+
refetch: $.refetch
|
|
2699
|
+
}, e[39] = $.refetch, e[40] = I, e[41] = A, e[42] = x, e[43] = q, e[44] = z) : z = e[44], z;
|
|
2688
2700
|
}, jo = (t) => {
|
|
2689
2701
|
const {
|
|
2690
2702
|
pluginID: e,
|
|
@@ -2699,7 +2711,7 @@ const Qo = () => {
|
|
|
2699
2711
|
metricIDs: d = [],
|
|
2700
2712
|
interval: u = 1e4,
|
|
2701
2713
|
enabled: f = !0
|
|
2702
|
-
} = t, p = Q(e), [v, h] =
|
|
2714
|
+
} = t, p = Q(e), [v, h] = me(null), [g, m] = me(null), [y, b] = me(!1), [w, E] = me(null), _ = re(null), S = Ie(async () => {
|
|
2703
2715
|
if (!(!f || !p || !r || !n))
|
|
2704
2716
|
try {
|
|
2705
2717
|
const D = await ar(p, r, {
|
|
@@ -2715,18 +2727,18 @@ const Qo = () => {
|
|
|
2715
2727
|
// ms to nanoseconds for Go time.Duration
|
|
2716
2728
|
});
|
|
2717
2729
|
m(D), b(!0), E(null);
|
|
2718
|
-
const R =
|
|
2719
|
-
const
|
|
2730
|
+
const R = U(`core/metrics/data/${D}`, (N) => {
|
|
2731
|
+
const M = N.data;
|
|
2720
2732
|
try {
|
|
2721
|
-
const C = JSON.parse(
|
|
2733
|
+
const C = JSON.parse(M);
|
|
2722
2734
|
C.results && (h(C.results), b(!0), E(null));
|
|
2723
2735
|
} catch (C) {
|
|
2724
2736
|
console.error("Failed to parse metric stream data:", C);
|
|
2725
2737
|
}
|
|
2726
|
-
}),
|
|
2727
|
-
const
|
|
2738
|
+
}), T = U(`core/metrics/error/${D}`, (N) => {
|
|
2739
|
+
const M = N.data;
|
|
2728
2740
|
try {
|
|
2729
|
-
const C = JSON.parse(
|
|
2741
|
+
const C = JSON.parse(M);
|
|
2730
2742
|
let k = "Unknown error";
|
|
2731
2743
|
if (C && typeof C == "object" && ("error" in C && typeof C.error == "string" && C.error && (k = C.error), "operation_error" in C)) {
|
|
2732
2744
|
const O = C.operation_error;
|
|
@@ -2738,12 +2750,12 @@ const Qo = () => {
|
|
|
2738
2750
|
}
|
|
2739
2751
|
});
|
|
2740
2752
|
_.current = () => {
|
|
2741
|
-
R(),
|
|
2753
|
+
R(), T();
|
|
2742
2754
|
};
|
|
2743
2755
|
} catch (D) {
|
|
2744
2756
|
E(D instanceof Error ? D.message : String(D));
|
|
2745
2757
|
}
|
|
2746
|
-
}, [p, r, n, s, i, o, c, l, a, d, u, f]), I =
|
|
2758
|
+
}, [p, r, n, s, i, o, c, l, a, d, u, f]), I = Ie(async () => {
|
|
2747
2759
|
if (g)
|
|
2748
2760
|
try {
|
|
2749
2761
|
await Lt(g);
|
|
@@ -2752,7 +2764,7 @@ const Qo = () => {
|
|
|
2752
2764
|
}
|
|
2753
2765
|
_.current && (_.current(), _.current = null), m(null), b(!1);
|
|
2754
2766
|
}, [g]);
|
|
2755
|
-
return
|
|
2767
|
+
return ve(() => () => {
|
|
2756
2768
|
g && Lt(g).catch(console.error), _.current && _.current();
|
|
2757
2769
|
}, [g]), {
|
|
2758
2770
|
data: v,
|
|
@@ -2762,42 +2774,42 @@ const Qo = () => {
|
|
|
2762
2774
|
start: S,
|
|
2763
2775
|
stop: I
|
|
2764
2776
|
};
|
|
2765
|
-
},
|
|
2777
|
+
}, Fe = ["networker", "portforward", "all-sessions"];
|
|
2766
2778
|
function Go() {
|
|
2767
|
-
const t =
|
|
2779
|
+
const t = F(17), {
|
|
2768
2780
|
showSnackbar: e
|
|
2769
|
-
} =
|
|
2781
|
+
} = ge(), r = ie();
|
|
2770
2782
|
let n;
|
|
2771
2783
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = {
|
|
2772
|
-
queryKey: [...
|
|
2784
|
+
queryKey: [...Fe],
|
|
2773
2785
|
queryFn: xs,
|
|
2774
2786
|
retry: !1
|
|
2775
2787
|
}, t[0] = n) : n = t[0];
|
|
2776
2788
|
const s = j(n);
|
|
2777
2789
|
let i, o;
|
|
2778
2790
|
t[1] !== r ? (i = () => {
|
|
2779
|
-
const v =
|
|
2791
|
+
const v = U("core/networker/portforward/created", () => {
|
|
2780
2792
|
r.invalidateQueries({
|
|
2781
|
-
queryKey: [...
|
|
2793
|
+
queryKey: [...Fe]
|
|
2782
2794
|
});
|
|
2783
|
-
}), h =
|
|
2795
|
+
}), h = U("core/networker/portforward/closed", () => {
|
|
2784
2796
|
r.invalidateQueries({
|
|
2785
|
-
queryKey: [...
|
|
2797
|
+
queryKey: [...Fe]
|
|
2786
2798
|
});
|
|
2787
2799
|
});
|
|
2788
2800
|
return () => {
|
|
2789
2801
|
v(), h();
|
|
2790
2802
|
};
|
|
2791
|
-
}, o = [r], t[1] = r, t[2] = i, t[3] = o) : (i = t[2], o = t[3]),
|
|
2803
|
+
}, o = [r], t[1] = r, t[2] = i, t[3] = o) : (i = t[2], o = t[3]), ve(i, o);
|
|
2792
2804
|
let c;
|
|
2793
2805
|
t[4] !== s.data ? (c = s.data ?? [], t[4] = s.data, t[5] = c) : c = t[5];
|
|
2794
2806
|
const l = c;
|
|
2795
2807
|
let a;
|
|
2796
|
-
t[6] !== e ? (a =
|
|
2808
|
+
t[6] !== e ? (a = oe(e, "Failed to close port forwarding session"), t[6] = e, t[7] = a) : a = t[7];
|
|
2797
2809
|
let d;
|
|
2798
2810
|
t[8] !== r ? (d = async () => {
|
|
2799
2811
|
await r.invalidateQueries({
|
|
2800
|
-
queryKey: [...
|
|
2812
|
+
queryKey: [...Fe]
|
|
2801
2813
|
});
|
|
2802
2814
|
}, t[8] = r, t[9] = d) : d = t[9];
|
|
2803
2815
|
let u;
|
|
@@ -2806,7 +2818,7 @@ function Go() {
|
|
|
2806
2818
|
onError: a,
|
|
2807
2819
|
onSuccess: d
|
|
2808
2820
|
}, t[10] = a, t[11] = d, t[12] = u) : u = t[12];
|
|
2809
|
-
const f =
|
|
2821
|
+
const f = te(u);
|
|
2810
2822
|
let p;
|
|
2811
2823
|
return t[13] !== l || t[14] !== f.mutateAsync || t[15] !== s ? (p = {
|
|
2812
2824
|
sessions: s,
|
|
@@ -2825,12 +2837,12 @@ async function xs() {
|
|
|
2825
2837
|
return lr().catch(Ls);
|
|
2826
2838
|
}
|
|
2827
2839
|
function Ls(t) {
|
|
2828
|
-
if (
|
|
2840
|
+
if (be(t).detail.includes("not found"))
|
|
2829
2841
|
return [];
|
|
2830
2842
|
throw t;
|
|
2831
2843
|
}
|
|
2832
2844
|
function zo(t) {
|
|
2833
|
-
const e =
|
|
2845
|
+
const e = F(36), {
|
|
2834
2846
|
pluginID: r,
|
|
2835
2847
|
connectionID: n,
|
|
2836
2848
|
resourceID: s
|
|
@@ -2839,13 +2851,13 @@ function zo(t) {
|
|
|
2839
2851
|
e[0] !== n || e[1] !== i || e[2] !== s ? (o = ["networker", "portforward", "sessions", i, n, s], e[0] = n, e[1] = i, e[2] = s, e[3] = o) : o = e[3];
|
|
2840
2852
|
const c = o, {
|
|
2841
2853
|
showSnackbar: l
|
|
2842
|
-
} =
|
|
2854
|
+
} = ge(), a = ie();
|
|
2843
2855
|
let d;
|
|
2844
2856
|
e[4] !== n || e[5] !== i || e[6] !== s || e[7] !== l ? (d = async () => ur(i, n, $r.createFrom({
|
|
2845
2857
|
resource_id: s,
|
|
2846
2858
|
connection_id: n
|
|
2847
2859
|
})).catch((S) => {
|
|
2848
|
-
const I =
|
|
2860
|
+
const I = be(S);
|
|
2849
2861
|
return I.detail.includes("not found") ? [] : (l({
|
|
2850
2862
|
message: "Failed to fetch port forward sessions",
|
|
2851
2863
|
status: "error",
|
|
@@ -2885,13 +2897,13 @@ function zo(t) {
|
|
|
2885
2897
|
return I.openInBrowser && en(`http://localhost:${R.local_port}`), R;
|
|
2886
2898
|
}, e[12] = n, e[13] = i, e[14] = p) : p = e[14];
|
|
2887
2899
|
let v;
|
|
2888
|
-
e[15] !== l ? (v =
|
|
2900
|
+
e[15] !== l ? (v = oe(l, "Failed to start port forwarding session"), e[15] = l, e[16] = v) : v = e[16];
|
|
2889
2901
|
let h;
|
|
2890
2902
|
e[17] !== a || e[18] !== c ? (h = async () => {
|
|
2891
2903
|
await Promise.all([a.invalidateQueries({
|
|
2892
2904
|
queryKey: c
|
|
2893
2905
|
}), a.invalidateQueries({
|
|
2894
|
-
queryKey: [...
|
|
2906
|
+
queryKey: [...Fe]
|
|
2895
2907
|
})]);
|
|
2896
2908
|
}, e[17] = a, e[18] = c, e[19] = h) : h = e[19];
|
|
2897
2909
|
let g;
|
|
@@ -2900,15 +2912,15 @@ function zo(t) {
|
|
|
2900
2912
|
onError: v,
|
|
2901
2913
|
onSuccess: h
|
|
2902
2914
|
}, e[20] = p, e[21] = v, e[22] = h, e[23] = g) : g = e[23];
|
|
2903
|
-
const m =
|
|
2915
|
+
const m = te(g);
|
|
2904
2916
|
let y;
|
|
2905
|
-
e[24] !== l ? (y =
|
|
2917
|
+
e[24] !== l ? (y = oe(l, "Failed to close port forwarding session"), e[24] = l, e[25] = y) : y = e[25];
|
|
2906
2918
|
let b;
|
|
2907
2919
|
e[26] !== a || e[27] !== c ? (b = async () => {
|
|
2908
2920
|
await Promise.all([a.invalidateQueries({
|
|
2909
2921
|
queryKey: c
|
|
2910
2922
|
}), a.invalidateQueries({
|
|
2911
|
-
queryKey: [...
|
|
2923
|
+
queryKey: [...Fe]
|
|
2912
2924
|
})]);
|
|
2913
2925
|
}, e[26] = a, e[27] = c, e[28] = b) : b = e[28];
|
|
2914
2926
|
let w;
|
|
@@ -2917,7 +2929,7 @@ function zo(t) {
|
|
|
2917
2929
|
onError: y,
|
|
2918
2930
|
onSuccess: b
|
|
2919
2931
|
}, e[29] = y, e[30] = b, e[31] = w) : w = e[31];
|
|
2920
|
-
const E =
|
|
2932
|
+
const E = te(w);
|
|
2921
2933
|
let _;
|
|
2922
2934
|
return e[32] !== E.mutateAsync || e[33] !== m.mutateAsync || e[34] !== f ? (_ = {
|
|
2923
2935
|
sessions: f,
|
|
@@ -2937,7 +2949,7 @@ const Bo = () => {
|
|
|
2937
2949
|
throw new Error("useConfirmationModal must be used within a ConfirmationModalProvider");
|
|
2938
2950
|
return t;
|
|
2939
2951
|
}, Jo = (t) => {
|
|
2940
|
-
const e =
|
|
2952
|
+
const e = F(31), {
|
|
2941
2953
|
pluginID: r,
|
|
2942
2954
|
request: n,
|
|
2943
2955
|
enabled: s
|
|
@@ -2950,9 +2962,9 @@ const Bo = () => {
|
|
|
2950
2962
|
}, e[0] = c, e[1] = o, e[2] = l, e[3] = a) : a = e[3];
|
|
2951
2963
|
const d = le(a), u = ue(o, c), f = ie(), {
|
|
2952
2964
|
showSnackbar: p
|
|
2953
|
-
} =
|
|
2965
|
+
} = ge();
|
|
2954
2966
|
let v;
|
|
2955
|
-
e[4] !== o || e[5] !== n ? (v =
|
|
2967
|
+
e[4] !== o || e[5] !== n ? (v = ke.resource(o, n), e[4] = o, e[5] = n, e[6] = v) : v = e[6];
|
|
2956
2968
|
const h = v, g = i && !!n && d.phase === "connected";
|
|
2957
2969
|
let m;
|
|
2958
2970
|
e[7] !== o || e[8] !== n ? (m = async (R) => {
|
|
@@ -2967,11 +2979,11 @@ const Bo = () => {
|
|
|
2967
2979
|
let y;
|
|
2968
2980
|
e[10] !== o || e[11] !== f ? (y = async () => {
|
|
2969
2981
|
await f.invalidateQueries({
|
|
2970
|
-
queryKey:
|
|
2982
|
+
queryKey: ke.all(o)
|
|
2971
2983
|
});
|
|
2972
2984
|
}, e[10] = o, e[11] = f, e[12] = y) : y = e[12];
|
|
2973
2985
|
let b;
|
|
2974
|
-
e[13] !== p ? (b =
|
|
2986
|
+
e[13] !== p ? (b = oe(p, "Failed to mutate resource"), e[13] = p, e[14] = b) : b = e[14];
|
|
2975
2987
|
let w;
|
|
2976
2988
|
e[15] !== m || e[16] !== y || e[17] !== b ? (w = {
|
|
2977
2989
|
mutationFn: m,
|
|
@@ -2980,14 +2992,14 @@ const Bo = () => {
|
|
|
2980
2992
|
}, e[15] = m, e[16] = y, e[17] = b, e[18] = w) : w = e[18];
|
|
2981
2993
|
const {
|
|
2982
2994
|
mutateAsync: E
|
|
2983
|
-
} =
|
|
2995
|
+
} = te(w);
|
|
2984
2996
|
let _;
|
|
2985
2997
|
e[19] !== u || e[20] !== o || e[21] !== g || e[22] !== n ? (_ = g ? (R) => {
|
|
2986
2998
|
const {
|
|
2987
|
-
signal:
|
|
2999
|
+
signal: T,
|
|
2988
3000
|
queryKey: N
|
|
2989
3001
|
} = R;
|
|
2990
|
-
return u(N,
|
|
3002
|
+
return u(N, T, () => fr(o, n));
|
|
2991
3003
|
} : ce, e[19] = u, e[20] = o, e[21] = g, e[22] = n, e[23] = _) : _ = e[23];
|
|
2992
3004
|
let S;
|
|
2993
3005
|
e[24] !== g || e[25] !== h || e[26] !== _ ? (S = {
|
|
@@ -3003,7 +3015,7 @@ const Bo = () => {
|
|
|
3003
3015
|
mutate: E
|
|
3004
3016
|
}, e[28] = E, e[29] = I, e[30] = D) : D = e[30], D;
|
|
3005
3017
|
}, Ho = (t) => {
|
|
3006
|
-
const e =
|
|
3018
|
+
const e = F(11);
|
|
3007
3019
|
let r;
|
|
3008
3020
|
e[0] !== t.area || e[1] !== t.plugin || e[2] !== t.resource ? (r = ["component", t.plugin, t.resource, t.area], e[0] = t.area, e[1] = t.plugin, e[2] = t.resource, e[3] = r) : r = e[3];
|
|
3009
3021
|
const n = r;
|
|
@@ -3020,7 +3032,7 @@ const Bo = () => {
|
|
|
3020
3032
|
component: o
|
|
3021
3033
|
}, e[9] = o, e[10] = c) : c = e[10], c;
|
|
3022
3034
|
}, Vo = (t) => {
|
|
3023
|
-
const e =
|
|
3035
|
+
const e = F(18), {
|
|
3024
3036
|
pluginID: r,
|
|
3025
3037
|
route: n,
|
|
3026
3038
|
enabled: s
|
|
@@ -3055,7 +3067,7 @@ const Bo = () => {
|
|
|
3055
3067
|
groups: v
|
|
3056
3068
|
}, e[16] = v, e[17] = h) : h = e[17], h;
|
|
3057
3069
|
}, Yo = (t) => {
|
|
3058
|
-
const e =
|
|
3070
|
+
const e = F(28), {
|
|
3059
3071
|
pluginID: r,
|
|
3060
3072
|
searches: n,
|
|
3061
3073
|
enabled: s
|
|
@@ -3086,7 +3098,7 @@ const Bo = () => {
|
|
|
3086
3098
|
subscribe: f
|
|
3087
3099
|
}, e[11] = d, e[12] = u, e[13] = f, e[14] = p) : p = e[14];
|
|
3088
3100
|
const v = p;
|
|
3089
|
-
|
|
3101
|
+
Ue(v.subscribe, v.getSnapshot, v.getSnapshot);
|
|
3090
3102
|
const h = ue(o, "");
|
|
3091
3103
|
let g;
|
|
3092
3104
|
if (e[15] !== i || e[16] !== h || e[17] !== o || e[18] !== v.stores || e[19] !== n) {
|
|
@@ -3094,7 +3106,7 @@ const Bo = () => {
|
|
|
3094
3106
|
e[21] !== i || e[22] !== h || e[23] !== o || e[24] !== v.stores ? (y = (b) => {
|
|
3095
3107
|
const w = b.request.target.route.connection, E = i && v.stores.get(w)?.getSnapshot().phase === "connected";
|
|
3096
3108
|
return {
|
|
3097
|
-
queryKey:
|
|
3109
|
+
queryKey: ke.nativeQuery(o, b),
|
|
3098
3110
|
queryFn: E ? (_) => {
|
|
3099
3111
|
const {
|
|
3100
3112
|
signal: S,
|
|
@@ -3120,7 +3132,7 @@ function $s(t) {
|
|
|
3120
3132
|
return t.getSnapshot().phase;
|
|
3121
3133
|
}
|
|
3122
3134
|
const Zo = (t) => {
|
|
3123
|
-
const e =
|
|
3135
|
+
const e = F(21), {
|
|
3124
3136
|
pluginID: r,
|
|
3125
3137
|
route: n,
|
|
3126
3138
|
type: s
|
|
@@ -3160,7 +3172,7 @@ const Zo = (t) => {
|
|
|
3160
3172
|
resourceType: h
|
|
3161
3173
|
}, e[19] = h, e[20] = g) : g = e[20], g;
|
|
3162
3174
|
}, Xo = (t) => {
|
|
3163
|
-
const e =
|
|
3175
|
+
const e = F(18), {
|
|
3164
3176
|
pluginID: r,
|
|
3165
3177
|
route: n,
|
|
3166
3178
|
enabled: s
|
|
@@ -3241,10 +3253,10 @@ function jt(t, e, r = !1, n = !1) {
|
|
|
3241
3253
|
};
|
|
3242
3254
|
}
|
|
3243
3255
|
function Us(t, e, r, n) {
|
|
3244
|
-
const s =
|
|
3256
|
+
const s = F(36);
|
|
3245
3257
|
let i;
|
|
3246
3258
|
s[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ new Map(), s[0] = i) : i = s[0];
|
|
3247
|
-
const o =
|
|
3259
|
+
const o = re(i), c = re(!1), l = re(void 0), a = re(void 0), d = re(r), u = n?.enabled ?? !0, f = n?.isCurrent, p = n?.collection ?? !1;
|
|
3248
3260
|
let v;
|
|
3249
3261
|
s[1] !== p || s[2] !== u || s[3] !== f || s[4] !== t || s[5] !== e ? (v = {
|
|
3250
3262
|
queryClient: t,
|
|
@@ -3253,7 +3265,7 @@ function Us(t, e, r, n) {
|
|
|
3253
3265
|
isCurrent: f,
|
|
3254
3266
|
collection: p
|
|
3255
3267
|
}, s[1] = p, s[2] = u, s[3] = f, s[4] = t, s[5] = e, s[6] = v) : v = s[6];
|
|
3256
|
-
const h = v, g =
|
|
3268
|
+
const h = v, g = re(void 0);
|
|
3257
3269
|
let m;
|
|
3258
3270
|
s[7] !== u || s[8] !== f || s[9] !== h ? (m = () => g.current === h && u && (!f || f()), s[7] = u, s[8] = f, s[9] = h, s[10] = m) : m = s[10];
|
|
3259
3271
|
const y = m;
|
|
@@ -3272,15 +3284,15 @@ function Us(t, e, r, n) {
|
|
|
3272
3284
|
}
|
|
3273
3285
|
if (!o.current.size && !c.current || !t.getQueryData(e) || p && t.getQueryState(e)?.fetchStatus === "fetching")
|
|
3274
3286
|
return;
|
|
3275
|
-
const N = [...o.current.values()],
|
|
3287
|
+
const N = [...o.current.values()], M = c.current;
|
|
3276
3288
|
o.current.clear(), c.current = !1;
|
|
3277
3289
|
const C = t.getQueryCache().find({
|
|
3278
3290
|
queryKey: e,
|
|
3279
3291
|
exact: !0
|
|
3280
3292
|
});
|
|
3281
3293
|
p && C?.state.status === "error" ? C.setState({
|
|
3282
|
-
data: y() ? jt(C.state.data, N,
|
|
3283
|
-
}) : t.setQueryData(e, (k) => y() ? jt(k, N,
|
|
3294
|
+
data: y() ? jt(C.state.data, N, M, p) : C.state.data
|
|
3295
|
+
}) : t.setQueryData(e, (k) => y() ? jt(k, N, M, p) : k);
|
|
3284
3296
|
for (const k of N) {
|
|
3285
3297
|
if (!y())
|
|
3286
3298
|
return;
|
|
@@ -3297,22 +3309,22 @@ function Us(t, e, r, n) {
|
|
|
3297
3309
|
s[20] !== p || s[21] !== y || s[22] !== S || s[23] !== t || s[24] !== e || s[25] !== E ? (I = (N) => {
|
|
3298
3310
|
if (!y())
|
|
3299
3311
|
return;
|
|
3300
|
-
const
|
|
3301
|
-
p || C?.records.some((k) => k.key ===
|
|
3312
|
+
const M = N.type === "DELETE" ? N.payload.key : N.payload.record.key, C = t.getQueryData(e);
|
|
3313
|
+
p || C?.records.some((k) => k.key === M) ? o.current.set(M, N) : c.current = !0, !p && N.type === "DELETE" && (c.current = !0), !(l.current !== void 0 || a.current !== void 0) && (l.current = window.setTimeout(S, E), d.current !== K.WatchStateSyncing && (a.current = requestAnimationFrame(S)));
|
|
3302
3314
|
}, s[20] = p, s[21] = y, s[22] = S, s[23] = t, s[24] = e, s[25] = E, s[26] = I) : I = s[26];
|
|
3303
3315
|
const D = I;
|
|
3304
|
-
let R,
|
|
3316
|
+
let R, T;
|
|
3305
3317
|
return s[27] !== p || s[28] !== y || s[29] !== u || s[30] !== S || s[31] !== t || s[32] !== e || s[33] !== h ? (R = () => {
|
|
3306
3318
|
if (!u)
|
|
3307
3319
|
return;
|
|
3308
3320
|
g.current = h;
|
|
3309
|
-
const N = o.current,
|
|
3321
|
+
const N = o.current, M = t.getQueryCache().subscribe((C) => {
|
|
3310
3322
|
!y() || C.type !== "updated" || C.query.queryHash !== pt(e) || (C.action.type === "fetch" ? (N.clear(), c.current = !1) : (C.action.type === "success" || p && C.action.type === "error") && S());
|
|
3311
3323
|
});
|
|
3312
3324
|
return () => {
|
|
3313
|
-
g.current = void 0,
|
|
3325
|
+
g.current = void 0, M(), window.clearTimeout(l.current), a.current !== void 0 && cancelAnimationFrame(a.current), N.clear(), c.current = !1, l.current = void 0, a.current = void 0;
|
|
3314
3326
|
};
|
|
3315
|
-
},
|
|
3327
|
+
}, T = [t, e, S, u, h, y, p], s[27] = p, s[28] = y, s[29] = u, s[30] = S, s[31] = t, s[32] = e, s[33] = h, s[34] = R, s[35] = T) : (R = s[34], T = s[35]), ft(R, T), D;
|
|
3316
3328
|
}
|
|
3317
3329
|
const Ws = {
|
|
3318
3330
|
getSnapshot: () => {
|
|
@@ -3328,7 +3340,7 @@ const Ws = {
|
|
|
3328
3340
|
}) => {
|
|
3329
3341
|
const i = Q(t), o = ie(), {
|
|
3330
3342
|
showSnackbar: c
|
|
3331
|
-
} =
|
|
3343
|
+
} = ge(), l = L.useRef(c);
|
|
3332
3344
|
L.useLayoutEffect(() => {
|
|
3333
3345
|
l.current = c;
|
|
3334
3346
|
}, [c]);
|
|
@@ -3347,38 +3359,38 @@ const Ws = {
|
|
|
3347
3359
|
}), g = L.useMemo(() => v ? {
|
|
3348
3360
|
subscribe: Xe(i, p).subscribe,
|
|
3349
3361
|
getSnapshot: () => mt(i, p)
|
|
3350
|
-
} : Ws, [i, p, v]), m = L.useSyncExternalStore(g.subscribe, g.getSnapshot, g.getSnapshot), y = ue(i, p), b = v && h.phase === "connected", w = f ? pt([i, f.targetId, f.request.target, s]) : void 0, E = L.useCallback((
|
|
3351
|
-
if (!s) return y(
|
|
3352
|
-
const
|
|
3353
|
-
let
|
|
3362
|
+
} : Ws, [i, p, v]), m = L.useSyncExternalStore(g.subscribe, g.getSnapshot, g.getSnapshot), y = ue(i, p), b = v && h.phase === "connected", w = f ? pt([i, f.targetId, f.request.target, s]) : void 0, E = L.useCallback((W) => s ? [...ke.list(i, W), "collection"] : ke.list(i, W), [i, s]), _ = L.useCallback(async (W, Y, de) => {
|
|
3363
|
+
if (!s) return y(de, Y, () => Ft(i, W));
|
|
3364
|
+
const we = mt(i, p), Ee = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Set();
|
|
3365
|
+
let ee, fe;
|
|
3354
3366
|
do {
|
|
3355
|
-
if (
|
|
3367
|
+
if (Y.aborted || we === void 0 || !Ke(i, p, we)) throw new je({
|
|
3356
3368
|
revert: !0
|
|
3357
3369
|
});
|
|
3358
|
-
const
|
|
3359
|
-
...
|
|
3370
|
+
const he = await y(de, Y, () => Ft(i, {
|
|
3371
|
+
...W,
|
|
3360
3372
|
request: {
|
|
3361
|
-
...
|
|
3362
|
-
cursor:
|
|
3373
|
+
...W.request,
|
|
3374
|
+
cursor: ee
|
|
3363
3375
|
}
|
|
3364
3376
|
}));
|
|
3365
|
-
if (
|
|
3377
|
+
if (Y.aborted || !Ke(i, p, we)) throw new je({
|
|
3366
3378
|
revert: !0
|
|
3367
3379
|
});
|
|
3368
|
-
|
|
3369
|
-
for (const
|
|
3370
|
-
if (
|
|
3371
|
-
|
|
3380
|
+
fe ??= he;
|
|
3381
|
+
for (const Oe of he.records) {
|
|
3382
|
+
if (Oe.targetId !== W.targetId) throw new Error("Collection page returned a different resource target");
|
|
3383
|
+
Ee.set(Oe.key, Oe);
|
|
3372
3384
|
}
|
|
3373
|
-
if (
|
|
3374
|
-
if (
|
|
3375
|
-
|
|
3385
|
+
if (ee = he.sourcePage.nextCursor, ee) {
|
|
3386
|
+
if (Se.has(ee)) throw new Error("Collection enumeration repeated a source cursor");
|
|
3387
|
+
Se.add(ee);
|
|
3376
3388
|
}
|
|
3377
|
-
} while (
|
|
3389
|
+
} while (ee);
|
|
3378
3390
|
return {
|
|
3379
|
-
records: [...
|
|
3391
|
+
records: [...Ee.values()],
|
|
3380
3392
|
sourcePage: {
|
|
3381
|
-
...
|
|
3393
|
+
...fe.sourcePage,
|
|
3382
3394
|
nextCursor: void 0,
|
|
3383
3395
|
count: {
|
|
3384
3396
|
kind: "unknown"
|
|
@@ -3396,26 +3408,26 @@ const Ws = {
|
|
|
3396
3408
|
}, [s, y, i, p]), S = L.useMemo(() => E(f), [E, f]), I = j({
|
|
3397
3409
|
queryKey: S,
|
|
3398
3410
|
queryFn: b ? ({
|
|
3399
|
-
signal:
|
|
3400
|
-
queryKey:
|
|
3401
|
-
}) => _(f,
|
|
3411
|
+
signal: W,
|
|
3412
|
+
queryKey: Y
|
|
3413
|
+
}) => _(f, W, Y) : ce,
|
|
3402
3414
|
enabled: b,
|
|
3403
3415
|
retry: !1,
|
|
3404
3416
|
gcTime: 0,
|
|
3405
3417
|
placeholderData: void 0
|
|
3406
3418
|
}), [D, R] = L.useState();
|
|
3407
|
-
let
|
|
3408
|
-
w && f && I.isSuccess && I.data ? (D?.identity !== w || D.requestHash !== a) && (
|
|
3419
|
+
let T = D;
|
|
3420
|
+
w && f && I.isSuccess && I.data ? (D?.identity !== w || D.requestHash !== a) && (T = {
|
|
3409
3421
|
identity: w,
|
|
3410
3422
|
requestHash: a,
|
|
3411
3423
|
request: f
|
|
3412
|
-
}, R(
|
|
3413
|
-
const N = w &&
|
|
3414
|
-
queryKey:
|
|
3424
|
+
}, R(T)) : D && D.identity !== w && (T = void 0, R(void 0));
|
|
3425
|
+
const N = w && T?.identity === w ? T.request : void 0, M = L.useMemo(() => E(N), [E, N]), C = j({
|
|
3426
|
+
queryKey: M,
|
|
3415
3427
|
queryFn: b && N ? ({
|
|
3416
|
-
signal:
|
|
3417
|
-
queryKey:
|
|
3418
|
-
}) => _(N,
|
|
3428
|
+
signal: W,
|
|
3429
|
+
queryKey: Y
|
|
3430
|
+
}) => _(N, W, Y) : ce,
|
|
3419
3431
|
enabled: !1,
|
|
3420
3432
|
retry: !1,
|
|
3421
3433
|
gcTime: 0,
|
|
@@ -3423,132 +3435,132 @@ const Ws = {
|
|
|
3423
3435
|
}), k = L.useMemo(() => N && C.data ? {
|
|
3424
3436
|
request: N,
|
|
3425
3437
|
page: C.data
|
|
3426
|
-
} : void 0, [N, C.data]), O = b && n && !!N,
|
|
3438
|
+
} : void 0, [N, C.data]), O = b && n && !!N, $ = L.useMemo(() => ({
|
|
3427
3439
|
pluginID: i,
|
|
3428
3440
|
acquiredRequest: N,
|
|
3429
3441
|
generation: m,
|
|
3430
3442
|
enabled: O
|
|
3431
|
-
}), [i, N, m, O]), [
|
|
3443
|
+
}), [i, N, m, O]), [A, x] = L.useState(), q = O && A?.scope === $ ? A.state : K.WatchStateIdle, z = O && A?.scope === $ ? A.error : void 0, B = O && A?.scope === $ && A.live, H = L.useCallback(() => m !== void 0 && Ke(i, p, m), [i, p, m]), V = Us(o, M, q, {
|
|
3432
3444
|
enabled: O,
|
|
3433
|
-
isCurrent:
|
|
3445
|
+
isCurrent: H,
|
|
3434
3446
|
collection: s
|
|
3435
|
-
}),
|
|
3447
|
+
}), G = L.useRef(Promise.resolve());
|
|
3436
3448
|
L.useEffect(() => {
|
|
3437
3449
|
if (!O || !N) return;
|
|
3438
|
-
const
|
|
3450
|
+
const W = N.request.target, Y = {
|
|
3439
3451
|
targetId: N.targetId,
|
|
3440
|
-
target:
|
|
3452
|
+
target: W
|
|
3441
3453
|
};
|
|
3442
|
-
let
|
|
3443
|
-
const
|
|
3444
|
-
|
|
3454
|
+
let de = !0, we = !1, Ee = !1, Se;
|
|
3455
|
+
const ee = () => de && m !== void 0 && Ke(i, p, m), fe = (Z) => {
|
|
3456
|
+
ee() && x((se) => ({
|
|
3445
3457
|
state: K.WatchStateIdle,
|
|
3446
3458
|
live: !1,
|
|
3447
|
-
...
|
|
3448
|
-
...
|
|
3449
|
-
scope:
|
|
3459
|
+
...se?.scope === $ ? se : {},
|
|
3460
|
+
...Z,
|
|
3461
|
+
scope: $
|
|
3450
3462
|
}));
|
|
3451
|
-
},
|
|
3452
|
-
const
|
|
3453
|
-
|
|
3463
|
+
}, he = `${i}/${W.route.connection}/${W.type}`, Oe = [U(`${he}/ADD`, (Z) => {
|
|
3464
|
+
const se = Z.data;
|
|
3465
|
+
ee() && se.record.targetId === Y.targetId && V({
|
|
3454
3466
|
type: "ADD",
|
|
3455
|
-
payload:
|
|
3467
|
+
payload: se
|
|
3456
3468
|
});
|
|
3457
|
-
}),
|
|
3458
|
-
const
|
|
3459
|
-
|
|
3469
|
+
}), U(`${he}/UPDATE`, (Z) => {
|
|
3470
|
+
const se = Z.data;
|
|
3471
|
+
ee() && se.record.targetId === Y.targetId && V({
|
|
3460
3472
|
type: "UPDATE",
|
|
3461
|
-
payload:
|
|
3473
|
+
payload: se
|
|
3462
3474
|
});
|
|
3463
|
-
}),
|
|
3464
|
-
const
|
|
3465
|
-
|
|
3475
|
+
}), U(`${he}/DELETE`, (Z) => {
|
|
3476
|
+
const se = Z.data;
|
|
3477
|
+
ee() && se.targetId === Y.targetId && V({
|
|
3466
3478
|
type: "DELETE",
|
|
3467
|
-
payload:
|
|
3479
|
+
payload: se
|
|
3468
3480
|
});
|
|
3469
|
-
}),
|
|
3470
|
-
const
|
|
3471
|
-
!
|
|
3472
|
-
state:
|
|
3473
|
-
error:
|
|
3481
|
+
}), U(`${i}/${W.route.connection}/watch/STATE`, (Z) => {
|
|
3482
|
+
const se = Z.data;
|
|
3483
|
+
!ee() || se.type !== W.type || se.route.connection !== W.route.connection || (Ee = !0, fe({
|
|
3484
|
+
state: se.state,
|
|
3485
|
+
error: se.error
|
|
3474
3486
|
}));
|
|
3475
3487
|
})], At = () => {
|
|
3476
|
-
for (const
|
|
3477
|
-
}, Pt = Xt(i,
|
|
3478
|
-
Pt.then((
|
|
3479
|
-
!
|
|
3480
|
-
state:
|
|
3488
|
+
for (const Z of Oe) Z();
|
|
3489
|
+
}, Pt = Xt(i, W.route);
|
|
3490
|
+
Pt.then((Z) => {
|
|
3491
|
+
!Ee && Z?.resources[W.type] !== void 0 && fe({
|
|
3492
|
+
state: Z.resources[W.type]
|
|
3481
3493
|
});
|
|
3482
|
-
}).catch((
|
|
3483
|
-
error:
|
|
3494
|
+
}).catch((Z) => fe({
|
|
3495
|
+
error: Z
|
|
3484
3496
|
}));
|
|
3485
|
-
const xt =
|
|
3486
|
-
|
|
3497
|
+
const xt = G.current.then(async () => {
|
|
3498
|
+
ee() && (await yr(i, Y), we = !0, ee() && (Se = mr(i, W), await Se, fe({
|
|
3487
3499
|
live: !0
|
|
3488
3500
|
})));
|
|
3489
|
-
}).catch((
|
|
3490
|
-
At(),
|
|
3491
|
-
error:
|
|
3501
|
+
}).catch((Z) => {
|
|
3502
|
+
At(), fe({
|
|
3503
|
+
error: Z,
|
|
3492
3504
|
state: K.WatchStateError,
|
|
3493
3505
|
live: !1
|
|
3494
|
-
}),
|
|
3506
|
+
}), ee() && Pe(l.current, Z, "Failed to subscribe to resource updates");
|
|
3495
3507
|
});
|
|
3496
|
-
return
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
}).catch((
|
|
3500
|
-
|
|
3508
|
+
return G.current = xt, () => {
|
|
3509
|
+
de = !1, At(), Pt.cancel(), Se?.cancel(), G.current = xt.then(async () => {
|
|
3510
|
+
we && await vr(i, Y);
|
|
3511
|
+
}).catch((Z) => {
|
|
3512
|
+
Pe(l.current, Z, "Failed to unsubscribe from resource updates");
|
|
3501
3513
|
});
|
|
3502
3514
|
};
|
|
3503
|
-
}, [i, p, N, O, m,
|
|
3504
|
-
const
|
|
3515
|
+
}, [i, p, N, O, m, $, V]);
|
|
3516
|
+
const J = k !== void 0;
|
|
3505
3517
|
return {
|
|
3506
3518
|
/** Attempted request state; an error does not rename or replace the acquired page. */
|
|
3507
3519
|
resources: I,
|
|
3508
3520
|
acquired: k,
|
|
3509
3521
|
/** Gate acquired readiness when a consumer chooses to display the attempted page instead. */
|
|
3510
|
-
isAcquiredRequestCurrent:
|
|
3522
|
+
isAcquiredRequestCurrent: J && T?.requestHash === a,
|
|
3511
3523
|
refreshAcquiredPage: C.refetch,
|
|
3512
3524
|
view: k?.page.view,
|
|
3513
3525
|
membershipStale: k?.page.view?.membershipStale ?? !1,
|
|
3514
|
-
watchState:
|
|
3515
|
-
isLive:
|
|
3516
|
-
isSyncing:
|
|
3526
|
+
watchState: J ? q : K.WatchStateIdle,
|
|
3527
|
+
isLive: J && B,
|
|
3528
|
+
isSyncing: J && q === K.WatchStateSyncing,
|
|
3517
3529
|
/** Native cache readiness only, not snapshot/update continuity. */
|
|
3518
|
-
isSynced:
|
|
3519
|
-
watchError:
|
|
3520
|
-
guarantee:
|
|
3530
|
+
isSynced: J && q === K.WatchStateSynced,
|
|
3531
|
+
watchError: J ? z ?? (q === K.WatchStateError || q === K.WatchStateFailed || q === K.WatchStateForbidden ? !0 : void 0) : void 0,
|
|
3532
|
+
guarantee: J && B ? "bestEffort" : void 0
|
|
3521
3533
|
};
|
|
3522
3534
|
}, ti = (t) => {
|
|
3523
|
-
const e =
|
|
3535
|
+
const e = F(13), {
|
|
3524
3536
|
pluginID: r
|
|
3525
3537
|
} = t, n = Q(r), s = ie(), {
|
|
3526
3538
|
showSnackbar: i
|
|
3527
|
-
} =
|
|
3539
|
+
} = ge();
|
|
3528
3540
|
let o;
|
|
3529
3541
|
e[0] !== n ? (o = async (f) => (await et(n, f.route.connection), Zt(n, f)), e[0] = n, e[1] = o) : o = e[1];
|
|
3530
3542
|
let c;
|
|
3531
3543
|
e[2] !== n || e[3] !== s ? (c = async () => {
|
|
3532
3544
|
await s.invalidateQueries({
|
|
3533
|
-
queryKey:
|
|
3545
|
+
queryKey: ke.all(n)
|
|
3534
3546
|
});
|
|
3535
3547
|
}, e[2] = n, e[3] = s, e[4] = c) : c = e[4];
|
|
3536
3548
|
let l;
|
|
3537
|
-
e[5] !== i ? (l =
|
|
3549
|
+
e[5] !== i ? (l = oe(i, "Failed to mutate resource"), e[5] = i, e[6] = l) : l = e[6];
|
|
3538
3550
|
let a;
|
|
3539
3551
|
e[7] !== o || e[8] !== c || e[9] !== l ? (a = {
|
|
3540
3552
|
mutationFn: o,
|
|
3541
3553
|
onSuccess: c,
|
|
3542
3554
|
onError: l
|
|
3543
3555
|
}, e[7] = o, e[8] = c, e[9] = l, e[10] = a) : a = e[10];
|
|
3544
|
-
const d =
|
|
3556
|
+
const d = te(a);
|
|
3545
3557
|
let u;
|
|
3546
3558
|
return e[11] !== d ? (u = {
|
|
3547
3559
|
mutate: d.mutateAsync,
|
|
3548
3560
|
mutation: d
|
|
3549
3561
|
}, e[11] = d, e[12] = u) : u = e[12], u;
|
|
3550
3562
|
}, ni = (t) => {
|
|
3551
|
-
const e =
|
|
3563
|
+
const e = F(25), {
|
|
3552
3564
|
pluginID: r,
|
|
3553
3565
|
route: n,
|
|
3554
3566
|
type: s,
|
|
@@ -3589,22 +3601,22 @@ const Ws = {
|
|
|
3589
3601
|
error: m.error
|
|
3590
3602
|
}, e[21] = m.error, e[22] = m.isLoading, e[23] = y, e[24] = b) : b = e[24], b;
|
|
3591
3603
|
}, ri = (t) => {
|
|
3592
|
-
const e =
|
|
3604
|
+
const e = F(15), {
|
|
3593
3605
|
pluginID: r
|
|
3594
3606
|
} = t, n = Q(r), s = ie(), {
|
|
3595
3607
|
showSnackbar: i
|
|
3596
|
-
} =
|
|
3608
|
+
} = ge();
|
|
3597
3609
|
let o;
|
|
3598
3610
|
e[0] !== n ? (o = async (f) => (await et(n, f.route.connection), wr(n, f)), e[0] = n, e[1] = o) : o = e[1];
|
|
3599
3611
|
let c;
|
|
3600
3612
|
e[2] !== n || e[3] !== s ? (c = async () => {
|
|
3601
3613
|
await s.invalidateQueries({
|
|
3602
|
-
queryKey:
|
|
3614
|
+
queryKey: ke.all(n)
|
|
3603
3615
|
});
|
|
3604
3616
|
}, e[2] = n, e[3] = s, e[4] = c) : c = e[4];
|
|
3605
3617
|
let l;
|
|
3606
3618
|
e[5] !== i ? (l = (f, p) => {
|
|
3607
|
-
|
|
3619
|
+
Pe(i, f, `Failed to execute action "${p.action}"`);
|
|
3608
3620
|
}, e[5] = i, e[6] = l) : l = e[6];
|
|
3609
3621
|
let a;
|
|
3610
3622
|
e[7] !== o || e[8] !== c || e[9] !== l ? (a = {
|
|
@@ -3612,7 +3624,7 @@ const Ws = {
|
|
|
3612
3624
|
onSuccess: c,
|
|
3613
3625
|
onError: l
|
|
3614
3626
|
}, e[7] = o, e[8] = c, e[9] = l, e[10] = a) : a = e[10];
|
|
3615
|
-
const d =
|
|
3627
|
+
const d = te(a);
|
|
3616
3628
|
let u;
|
|
3617
3629
|
return e[11] !== d.error || e[12] !== d.isPending || e[13] !== d.mutateAsync ? (u = {
|
|
3618
3630
|
executeAction: d.mutateAsync,
|
|
@@ -3620,7 +3632,7 @@ const Ws = {
|
|
|
3620
3632
|
error: d.error
|
|
3621
3633
|
}, e[11] = d.error, e[12] = d.isPending, e[13] = d.mutateAsync, e[14] = u) : u = e[14], u;
|
|
3622
3634
|
}, si = (t) => {
|
|
3623
|
-
const e =
|
|
3635
|
+
const e = F(27), {
|
|
3624
3636
|
pluginID: r,
|
|
3625
3637
|
route: n,
|
|
3626
3638
|
enabled: s
|
|
@@ -3646,18 +3658,18 @@ const Ws = {
|
|
|
3646
3658
|
const R = D.binding.documentRef;
|
|
3647
3659
|
if (!R)
|
|
3648
3660
|
continue;
|
|
3649
|
-
const
|
|
3650
|
-
I.has(
|
|
3661
|
+
const T = JSON.stringify([R.id, R.revision]);
|
|
3662
|
+
I.has(T) || (S.push(await c.fetchQuery({
|
|
3651
3663
|
queryKey: [o, "resource-v2", "schema-document", n, R],
|
|
3652
3664
|
queryFn: (N) => {
|
|
3653
3665
|
const {
|
|
3654
|
-
signal:
|
|
3666
|
+
signal: M,
|
|
3655
3667
|
queryKey: C
|
|
3656
3668
|
} = N;
|
|
3657
|
-
return d(C, AbortSignal.any([w,
|
|
3669
|
+
return d(C, AbortSignal.any([w, M]), () => Sr(o, n, R));
|
|
3658
3670
|
},
|
|
3659
3671
|
staleTime: 1 / 0
|
|
3660
|
-
})), I.add(
|
|
3672
|
+
})), I.add(T));
|
|
3661
3673
|
}
|
|
3662
3674
|
return {
|
|
3663
3675
|
schemas: _,
|
|
@@ -3697,7 +3709,7 @@ function Gt(t) {
|
|
|
3697
3709
|
};
|
|
3698
3710
|
}
|
|
3699
3711
|
const oi = (t) => {
|
|
3700
|
-
const e =
|
|
3712
|
+
const e = F(38), {
|
|
3701
3713
|
pluginID: r,
|
|
3702
3714
|
route: n,
|
|
3703
3715
|
enabled: s
|
|
@@ -3711,30 +3723,30 @@ const oi = (t) => {
|
|
|
3711
3723
|
const u = d;
|
|
3712
3724
|
let f;
|
|
3713
3725
|
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = [], e[5] = f) : f = e[5];
|
|
3714
|
-
const p =
|
|
3726
|
+
const p = re(f), v = re(!1);
|
|
3715
3727
|
let h;
|
|
3716
|
-
e[6] !== c || e[7] !== u ? (h = (
|
|
3728
|
+
e[6] !== c || e[7] !== u ? (h = (A) => {
|
|
3717
3729
|
c.setQueryData(u, (x) => x && Gt({
|
|
3718
3730
|
...x,
|
|
3719
3731
|
resources: {
|
|
3720
3732
|
...x.resources,
|
|
3721
|
-
[
|
|
3733
|
+
[A.type]: A.state
|
|
3722
3734
|
},
|
|
3723
3735
|
resourceCounts: {
|
|
3724
3736
|
...x.resourceCounts,
|
|
3725
|
-
[
|
|
3737
|
+
[A.type]: A.count
|
|
3726
3738
|
}
|
|
3727
3739
|
}));
|
|
3728
3740
|
}, e[6] = c, e[7] = u, e[8] = h) : h = e[8];
|
|
3729
3741
|
const g = h;
|
|
3730
3742
|
let m;
|
|
3731
3743
|
e[9] !== l || e[10] !== o ? (m = async () => {
|
|
3732
|
-
const
|
|
3744
|
+
const A = await Xt(o, {
|
|
3733
3745
|
connection: l
|
|
3734
3746
|
});
|
|
3735
|
-
if (!
|
|
3747
|
+
if (!A)
|
|
3736
3748
|
throw new Error("Failed to get watch state: null response");
|
|
3737
|
-
return Gt(
|
|
3749
|
+
return Gt(A);
|
|
3738
3750
|
}, e[9] = l, e[10] = o, e[11] = m) : m = e[11];
|
|
3739
3751
|
const y = i && !!o && !!l;
|
|
3740
3752
|
let b;
|
|
@@ -3749,42 +3761,42 @@ const oi = (t) => {
|
|
|
3749
3761
|
e[16] !== g || e[17] !== l || e[18] !== i || e[19] !== o ? (_ = () => {
|
|
3750
3762
|
if (v.current = !1, p.current = [], !i || !l)
|
|
3751
3763
|
return;
|
|
3752
|
-
const
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3764
|
+
const A = U(`${o}/${l}/watch/STATE`, (x) => {
|
|
3765
|
+
const q = x.data;
|
|
3766
|
+
q.route.connection === l && (v.current ? g(q) : p.current.push(q));
|
|
3755
3767
|
});
|
|
3756
3768
|
return () => {
|
|
3757
|
-
|
|
3769
|
+
A(), v.current = !1, p.current = [];
|
|
3758
3770
|
};
|
|
3759
|
-
}, E = [o, l, i, g], e[16] = g, e[17] = l, e[18] = i, e[19] = o, e[20] = E, e[21] = _) : (E = e[20], _ = e[21]),
|
|
3771
|
+
}, E = [o, l, i, g], e[16] = g, e[17] = l, e[18] = i, e[19] = o, e[20] = E, e[21] = _) : (E = e[20], _ = e[21]), ve(_, E);
|
|
3760
3772
|
let S, I;
|
|
3761
3773
|
e[22] !== g || e[23] !== w.data ? (S = () => {
|
|
3762
3774
|
if (!w.data || v.current)
|
|
3763
3775
|
return;
|
|
3764
3776
|
v.current = !0;
|
|
3765
|
-
const
|
|
3777
|
+
const A = p.current;
|
|
3766
3778
|
p.current = [];
|
|
3767
|
-
for (const x of
|
|
3779
|
+
for (const x of A)
|
|
3768
3780
|
g(x);
|
|
3769
|
-
}, I = [w.data, g], e[22] = g, e[23] = w.data, e[24] = S, e[25] = I) : (S = e[24], I = e[25]),
|
|
3781
|
+
}, I = [w.data, g], e[22] = g, e[23] = w.data, e[24] = S, e[25] = I) : (S = e[24], I = e[25]), ve(S, I);
|
|
3770
3782
|
let D;
|
|
3771
3783
|
e[26] !== w.data?.resources ? (D = Object.values(w.data?.resources ?? {}), e[26] = w.data?.resources, e[27] = D) : D = e[27];
|
|
3772
3784
|
const R = D;
|
|
3773
|
-
let
|
|
3774
|
-
e[28] !== R ? (
|
|
3775
|
-
const N =
|
|
3776
|
-
let
|
|
3777
|
-
e[30] !== w.data?.resources ? (
|
|
3785
|
+
let T;
|
|
3786
|
+
e[28] !== R ? (T = R.filter(js), e[28] = R, e[29] = T) : T = e[29];
|
|
3787
|
+
const N = T.length;
|
|
3788
|
+
let M;
|
|
3789
|
+
e[30] !== w.data?.resources ? (M = (A) => w.data?.resources[A], e[30] = w.data?.resources, e[31] = M) : M = e[31];
|
|
3778
3790
|
const C = R.length > 0 && N === R.length, k = R.length ? N / R.length : 0, O = w.data?.errorCount ?? 0;
|
|
3779
|
-
let
|
|
3780
|
-
return e[32] !== w || e[33] !==
|
|
3791
|
+
let $;
|
|
3792
|
+
return e[32] !== w || e[33] !== M || e[34] !== C || e[35] !== k || e[36] !== O ? ($ = {
|
|
3781
3793
|
summary: w,
|
|
3782
|
-
getResourceState:
|
|
3794
|
+
getResourceState: M,
|
|
3783
3795
|
isFullySynced: C,
|
|
3784
3796
|
syncProgress: k,
|
|
3785
3797
|
errorCount: O,
|
|
3786
3798
|
guarantee: "bestEffort"
|
|
3787
|
-
}, e[32] = w, e[33] =
|
|
3799
|
+
}, e[32] = w, e[33] = M, e[34] = C, e[35] = k, e[36] = O, e[37] = $) : $ = e[37], $;
|
|
3788
3800
|
};
|
|
3789
3801
|
function Qs(t) {
|
|
3790
3802
|
return t !== K.WatchStateIdle && t !== K.WatchStateSyncing;
|
|
@@ -3797,16 +3809,16 @@ function js(t) {
|
|
|
3797
3809
|
return t !== K.WatchStateIdle && t !== K.WatchStateSyncing;
|
|
3798
3810
|
}
|
|
3799
3811
|
const ii = () => {
|
|
3800
|
-
const t =
|
|
3812
|
+
const t = F(16);
|
|
3801
3813
|
let e;
|
|
3802
3814
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ new Map(), t[0] = e) : e = t[0];
|
|
3803
|
-
const [r, n] =
|
|
3815
|
+
const [r, n] = me(e);
|
|
3804
3816
|
let s;
|
|
3805
3817
|
t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ new Map(), t[1] = s) : s = t[1];
|
|
3806
|
-
const i =
|
|
3818
|
+
const i = re(s);
|
|
3807
3819
|
let o;
|
|
3808
3820
|
t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ new Map(), t[2] = o) : o = t[2];
|
|
3809
|
-
const c =
|
|
3821
|
+
const c = re(o);
|
|
3810
3822
|
let l;
|
|
3811
3823
|
t[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = (y) => {
|
|
3812
3824
|
const b = y.data, w = kt(b.pluginID, b), E = bt(i.current, b.pluginID, b), _ = vt(E);
|
|
@@ -3826,14 +3838,14 @@ const ii = () => {
|
|
|
3826
3838
|
const a = l;
|
|
3827
3839
|
let d, u;
|
|
3828
3840
|
t[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
3829
|
-
const y = c.current, b =
|
|
3841
|
+
const y = c.current, b = U("watch/STATE", a);
|
|
3830
3842
|
return () => {
|
|
3831
3843
|
b();
|
|
3832
3844
|
for (const w of y.values())
|
|
3833
3845
|
clearTimeout(w);
|
|
3834
3846
|
y.clear();
|
|
3835
3847
|
};
|
|
3836
|
-
}, u = [a], t[4] = d, t[5] = u) : (d = t[4], u = t[5]),
|
|
3848
|
+
}, u = [a], t[4] = d, t[5] = u) : (d = t[4], u = t[5]), ve(d, u);
|
|
3837
3849
|
let f, p, v, h;
|
|
3838
3850
|
t[6] !== r ? (v = Array.from(r.values()), f = vn(v), p = v.find(Gs) ?? v[0] ?? null, h = bn(v), t[6] = r, t[7] = f, t[8] = p, t[9] = v, t[10] = h) : (f = t[7], p = t[8], v = t[9], h = t[10]);
|
|
3839
3851
|
const g = h;
|
|
@@ -4048,7 +4060,7 @@ const ai = ({
|
|
|
4048
4060
|
}) => {
|
|
4049
4061
|
const e = Q(t), {
|
|
4050
4062
|
showSnackbar: r
|
|
4051
|
-
} =
|
|
4063
|
+
} = ge(), {
|
|
4052
4064
|
addOperation: n,
|
|
4053
4065
|
updateOperation: s
|
|
4054
4066
|
} = zs(), i = L.useRef(/* @__PURE__ */ new Set()), o = L.useCallback((a, d = !1) => {
|
|
@@ -4094,12 +4106,12 @@ const ai = ({
|
|
|
4094
4106
|
const g = h.event, m = g.data ? wt(g.data) : void 0, y = m && typeof m == "object" && !Array.isArray(m) ? m : {};
|
|
4095
4107
|
if (g.type === "error") {
|
|
4096
4108
|
u.terminal = !0;
|
|
4097
|
-
const b =
|
|
4109
|
+
const b = be(g.error);
|
|
4098
4110
|
s(f, {
|
|
4099
4111
|
status: Ve(b) ? "cancelled" : "error",
|
|
4100
4112
|
message: b.title,
|
|
4101
4113
|
completedAt: Date.now()
|
|
4102
|
-
}),
|
|
4114
|
+
}), Pe(r, b, d), o(u);
|
|
4103
4115
|
} else if (g.type === "complete") {
|
|
4104
4116
|
u.terminal = !0;
|
|
4105
4117
|
const b = typeof y.message == "string" ? y.message : `${d} completed`;
|
|
@@ -4117,16 +4129,16 @@ const ai = ({
|
|
|
4117
4129
|
} : void 0
|
|
4118
4130
|
});
|
|
4119
4131
|
};
|
|
4120
|
-
u.unsubscribe =
|
|
4132
|
+
u.unsubscribe = U(`action/stream/${f}`, (h) => p(h.data)), u.attach = Cr(f);
|
|
4121
4133
|
const v = await u.attach;
|
|
4122
4134
|
return u.attach = void 0, p(v), f;
|
|
4123
4135
|
} catch (f) {
|
|
4124
4136
|
if (u.terminal && u.handle) return u.handle;
|
|
4125
4137
|
throw u.disposed || (u.handle && s(u.handle, {
|
|
4126
4138
|
status: Ve(f) ? "cancelled" : "error",
|
|
4127
|
-
message:
|
|
4139
|
+
message: be(f).title,
|
|
4128
4140
|
completedAt: Date.now()
|
|
4129
|
-
}),
|
|
4141
|
+
}), Pe(r, f, `Failed to start "${a.action}"`)), o(u), f;
|
|
4130
4142
|
}
|
|
4131
4143
|
}, [e, n, s, r, o]), l = L.useCallback((a) => {
|
|
4132
4144
|
for (const d of i.current) if (d.handle === a) {
|
|
@@ -4143,7 +4155,7 @@ function Bs(t, e) {
|
|
|
4143
4155
|
return `${t}/${e}/graph/CHANGED`;
|
|
4144
4156
|
}
|
|
4145
4157
|
function Tt(t, e, r, n) {
|
|
4146
|
-
const s =
|
|
4158
|
+
const s = F(16), i = ie(), o = re(r);
|
|
4147
4159
|
let c, l;
|
|
4148
4160
|
s[0] !== r ? (c = () => {
|
|
4149
4161
|
o.current = r;
|
|
@@ -4155,7 +4167,7 @@ function Tt(t, e, r, n) {
|
|
|
4155
4167
|
s[5] !== e || s[6] !== n || s[7] !== t || s[8] !== i ? (u = () => {
|
|
4156
4168
|
if (!n || !t || !e)
|
|
4157
4169
|
return;
|
|
4158
|
-
const p =
|
|
4170
|
+
const p = U(Bs(t, e), () => {
|
|
4159
4171
|
i.invalidateQueries({
|
|
4160
4172
|
queryKey: o.current,
|
|
4161
4173
|
exact: !0
|
|
@@ -4166,7 +4178,7 @@ function Tt(t, e, r, n) {
|
|
|
4166
4178
|
};
|
|
4167
4179
|
}, s[5] = e, s[6] = n, s[7] = t, s[8] = i, s[9] = u) : u = s[9];
|
|
4168
4180
|
let f;
|
|
4169
|
-
s[10] !== e || s[11] !== n || s[12] !== d || s[13] !== t || s[14] !== i ? (f = [i, t, e, d, n], s[10] = e, s[11] = n, s[12] = d, s[13] = t, s[14] = i, s[15] = f) : f = s[15],
|
|
4181
|
+
s[10] !== e || s[11] !== n || s[12] !== d || s[13] !== t || s[14] !== i ? (f = [i, t, e, d, n], s[10] = e, s[11] = n, s[12] = d, s[13] = t, s[14] = i, s[15] = f) : f = s[15], ve(u, f);
|
|
4170
4182
|
}
|
|
4171
4183
|
const Js = {
|
|
4172
4184
|
owns: {
|
|
@@ -4217,7 +4229,7 @@ function Hs(t, e) {
|
|
|
4217
4229
|
});
|
|
4218
4230
|
}
|
|
4219
4231
|
const ui = (t) => {
|
|
4220
|
-
const e =
|
|
4232
|
+
const e = F(38), {
|
|
4221
4233
|
pluginID: r,
|
|
4222
4234
|
reference: n,
|
|
4223
4235
|
route: s,
|
|
@@ -4238,12 +4250,12 @@ const ui = (t) => {
|
|
|
4238
4250
|
const y = le(m), b = ue(f, s.connection), w = d && !!f && !!s.connection && !!n.address.id && y.phase === "connected";
|
|
4239
4251
|
Tt(f, s.connection, h, w);
|
|
4240
4252
|
let E;
|
|
4241
|
-
e[10] !== a || e[11] !== b || e[12] !== f || e[13] !== w || e[14] !== n || e[15] !== o || e[16] !== s ? (E = w ? (
|
|
4253
|
+
e[10] !== a || e[11] !== b || e[12] !== f || e[13] !== w || e[14] !== n || e[15] !== o || e[16] !== s ? (E = w ? (T) => {
|
|
4242
4254
|
const {
|
|
4243
4255
|
signal: N,
|
|
4244
|
-
queryKey:
|
|
4245
|
-
} =
|
|
4246
|
-
return b(
|
|
4256
|
+
queryKey: M
|
|
4257
|
+
} = T;
|
|
4258
|
+
return b(M, N, () => _r(f, n, s, a, o ?? null));
|
|
4247
4259
|
} : ce, e[10] = a, e[11] = b, e[12] = f, e[13] = w, e[14] = n, e[15] = o, e[16] = s, e[17] = E) : E = e[17];
|
|
4248
4260
|
let _;
|
|
4249
4261
|
e[18] !== w || e[19] !== h || e[20] !== u || e[21] !== E ? (_ = {
|
|
@@ -4255,12 +4267,12 @@ const ui = (t) => {
|
|
|
4255
4267
|
const S = j(_);
|
|
4256
4268
|
let I, D;
|
|
4257
4269
|
if (e[23] !== f || e[24] !== S.data || e[25] !== n || e[26] !== s) {
|
|
4258
|
-
const
|
|
4270
|
+
const T = {
|
|
4259
4271
|
pluginId: f,
|
|
4260
4272
|
reference: n
|
|
4261
4273
|
};
|
|
4262
4274
|
let N;
|
|
4263
|
-
e[29] !== S.data ? (N = S.data ?? [], e[29] = S.data, e[30] = N) : N = e[30], I = N, D = Hs(
|
|
4275
|
+
e[29] !== S.data ? (N = S.data ?? [], e[29] = S.data, e[30] = N) : N = e[30], I = N, D = Hs(T, I), e[23] = f, e[24] = S.data, e[25] = n, e[26] = s, e[27] = I, e[28] = D;
|
|
4264
4276
|
} else
|
|
4265
4277
|
I = e[27], D = e[28];
|
|
4266
4278
|
let R;
|
|
@@ -4273,7 +4285,7 @@ const ui = (t) => {
|
|
|
4273
4285
|
refetch: S.refetch
|
|
4274
4286
|
}, e[31] = I, e[32] = S.error, e[33] = S.isFetching, e[34] = S.isLoading, e[35] = S.refetch, e[36] = D, e[37] = R) : R = e[37], R;
|
|
4275
4287
|
}, di = (t) => {
|
|
4276
|
-
const e =
|
|
4288
|
+
const e = F(27), {
|
|
4277
4289
|
pluginID: r,
|
|
4278
4290
|
reference: n,
|
|
4279
4291
|
route: s,
|
|
@@ -4317,7 +4329,7 @@ const ui = (t) => {
|
|
|
4317
4329
|
refetch: E.refetch
|
|
4318
4330
|
}, e[21] = E.error, e[22] = E.isFetching, e[23] = E.isLoading, e[24] = E.refetch, e[25] = _, e[26] = S) : S = e[26], S;
|
|
4319
4331
|
}, fi = (t) => {
|
|
4320
|
-
const e =
|
|
4332
|
+
const e = F(28), {
|
|
4321
4333
|
pluginID: r,
|
|
4322
4334
|
reference: n,
|
|
4323
4335
|
route: s,
|
|
@@ -4366,7 +4378,7 @@ const ui = (t) => {
|
|
|
4366
4378
|
throw new Error("useSettings must be used within a SettingsProvider");
|
|
4367
4379
|
return t;
|
|
4368
4380
|
}, Vs = 1, gi = (t) => {
|
|
4369
|
-
const e =
|
|
4381
|
+
const e = F(19);
|
|
4370
4382
|
let r, n, s, i;
|
|
4371
4383
|
if (e[0] !== t) {
|
|
4372
4384
|
const {
|
|
@@ -4407,7 +4419,7 @@ const ui = (t) => {
|
|
|
4407
4419
|
return e[14] !== f || e[15] !== d || e[16] !== s || e[17] !== l ? (v = /* @__PURE__ */ P(Nr, { style: p, ...s, to: l, onClick: d, onAuxClick: f }), e[14] = f, e[15] = d, e[16] = s, e[17] = l, e[18] = v) : v = e[18], v;
|
|
4408
4420
|
};
|
|
4409
4421
|
function hi() {
|
|
4410
|
-
const t =
|
|
4422
|
+
const t = F(10), e = kr(), r = Or(), {
|
|
4411
4423
|
pluginId: n
|
|
4412
4424
|
} = cn();
|
|
4413
4425
|
n || console.error("usePluginRouter used outside of a plugin context");
|
|
@@ -4556,7 +4568,7 @@ function to(t, e) {
|
|
|
4556
4568
|
}
|
|
4557
4569
|
}
|
|
4558
4570
|
function no(t) {
|
|
4559
|
-
const e =
|
|
4571
|
+
const e = F(7);
|
|
4560
4572
|
let r, n;
|
|
4561
4573
|
e[0] !== t ? ({
|
|
4562
4574
|
icon: r,
|
|
@@ -4567,7 +4579,7 @@ function no(t) {
|
|
|
4567
4579
|
return e[3] !== r || e[4] !== n || e[5] !== s ? (i = /* @__PURE__ */ P(r, { ...n, "aria-hidden": s }), e[3] = r, e[4] = n, e[5] = s, e[6] = i) : i = e[6], i;
|
|
4568
4580
|
}
|
|
4569
4581
|
function bi(t) {
|
|
4570
|
-
const e =
|
|
4582
|
+
const e = F(17);
|
|
4571
4583
|
let r, n, s, i;
|
|
4572
4584
|
e[0] !== t ? ({
|
|
4573
4585
|
pluginId: n,
|
|
@@ -4604,7 +4616,7 @@ function bi(t) {
|
|
|
4604
4616
|
}
|
|
4605
4617
|
const wi = "omniview/settings/editor";
|
|
4606
4618
|
function Ei(t) {
|
|
4607
|
-
const e =
|
|
4619
|
+
const e = F(23);
|
|
4608
4620
|
let r, n, s;
|
|
4609
4621
|
e[0] !== t ? ({
|
|
4610
4622
|
pluginID: r,
|
|
@@ -4645,12 +4657,12 @@ function Ei(t) {
|
|
|
4645
4657
|
}, e[20] = h, e[21] = g, e[22] = m) : m = e[22], m;
|
|
4646
4658
|
}
|
|
4647
4659
|
export {
|
|
4648
|
-
|
|
4660
|
+
Fe as ALL_SESSIONS_KEY,
|
|
4649
4661
|
Vr as BottomDrawerContext,
|
|
4650
4662
|
Zr as ConfirmationModalContext,
|
|
4651
4663
|
Ao as ConnectionBoundary,
|
|
4652
4664
|
ws as ConnectionBoundaryFallback,
|
|
4653
|
-
|
|
4665
|
+
X as ErrorTypes,
|
|
4654
4666
|
Co as ExtensionPointRegistry,
|
|
4655
4667
|
os as ExtensionPointStore,
|
|
4656
4668
|
Io as ExtensionProvider,
|
|
@@ -4678,7 +4690,7 @@ export {
|
|
|
4678
4690
|
zr as actionToSnackbar,
|
|
4679
4691
|
jt as applyBatch,
|
|
4680
4692
|
us as connectionListQueryKey,
|
|
4681
|
-
|
|
4693
|
+
oe as createErrorHandler,
|
|
4682
4694
|
Hr as defaultState,
|
|
4683
4695
|
Bs as graphChangedEvent,
|
|
4684
4696
|
Ve as isCancelledError,
|
|
@@ -4687,17 +4699,17 @@ export {
|
|
|
4687
4699
|
Gr as navigateActivePage,
|
|
4688
4700
|
vi as openGlobalSearch,
|
|
4689
4701
|
jr as openSettings,
|
|
4690
|
-
|
|
4702
|
+
be as parseAppError,
|
|
4691
4703
|
Fo as readCurrentConnectionMetadataString,
|
|
4692
4704
|
yo as registerActivePageNavigator,
|
|
4693
4705
|
li as relationshipLabel,
|
|
4694
4706
|
et as requireConnectionReady,
|
|
4695
|
-
|
|
4707
|
+
ke as resourceQueryKeys,
|
|
4696
4708
|
Dn as sameGraphNode,
|
|
4697
4709
|
Kr as scopedSettingID,
|
|
4698
4710
|
Ur as settingsQueryKey,
|
|
4699
4711
|
sn as settingsWindowTarget,
|
|
4700
|
-
|
|
4712
|
+
Pe as showAppError,
|
|
4701
4713
|
Hs as toRelatedResources,
|
|
4702
4714
|
ii as useActiveSyncs,
|
|
4703
4715
|
Sn as useBottomDrawer,
|
|
@@ -4748,7 +4760,7 @@ export {
|
|
|
4748
4760
|
ko as useScopeValues,
|
|
4749
4761
|
rn as useScopedSettings,
|
|
4750
4762
|
pi as useSettings,
|
|
4751
|
-
|
|
4763
|
+
ge as useSnackbar,
|
|
4752
4764
|
ai as useStreamAction,
|
|
4753
4765
|
oi as useWatchState,
|
|
4754
4766
|
Eo as useWindowActions,
|