@kong-ui-public/entities-shared 2.8.1-pr.1209.d127b949.0 → 2.9.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/entities-shared.es.js +1123 -1230
- package/dist/entities-shared.umd.js +16 -16
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { inject as
|
|
1
|
+
import { inject as $t, ref as K, unref as I, computed as A, watch as _e, defineComponent as V, resolveComponent as N, openBlock as p, createElementBlock as w, createBlock as R, resolveDynamicComponent as ce, mergeProps as He, withCtx as b, createElementVNode as L, normalizeClass as pe, toDisplayString as O, createCommentVNode as U, createVNode as M, withModifiers as Fe, normalizeStyle as Me, pushScopeId as Re, popScopeId as Ke, Fragment as ae, renderList as ie, createTextVNode as z, useCssVars as Lt, useSlots as Ge, renderSlot as Y, createSlots as be, normalizeProps as Ln, guardReactiveProps as Nn, onBeforeMount as Nt, onMounted as Bn, onUnmounted as Mn, withDirectives as ke, vShow as Ae, Teleport as Rn } from "vue";
|
|
2
2
|
import lt from "axios";
|
|
3
3
|
import { createI18n as Bt, i18nTComponent as Kn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Dn } from "@kong/kongponents";
|
|
5
5
|
import { useRouter as jn } from "vue-router";
|
|
6
|
-
var Un = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Un || {}), qn = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(qn || {}),
|
|
6
|
+
var Un = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Un || {}), qn = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(qn || {}), me = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(me || {}), H = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(H || {}), ne = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ne || {});
|
|
7
7
|
function Pn() {
|
|
8
8
|
return {
|
|
9
9
|
getAxiosInstance: (e = {}) => {
|
|
10
10
|
try {
|
|
11
|
-
const t =
|
|
11
|
+
const t = $t("get-axios-instance", void 0);
|
|
12
12
|
return typeof t == "function" ? t(e) : lt.create({
|
|
13
13
|
withCredentials: !0,
|
|
14
14
|
timeout: 3e4,
|
|
@@ -32,15 +32,15 @@ function Hn() {
|
|
|
32
32
|
return {
|
|
33
33
|
debounce: (e, t) => {
|
|
34
34
|
let n;
|
|
35
|
-
return (...
|
|
35
|
+
return (...r) => {
|
|
36
36
|
clearTimeout(n), n = window == null ? void 0 : window.setTimeout(() => {
|
|
37
|
-
e(...
|
|
37
|
+
e(...r);
|
|
38
38
|
}, t);
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const je = "khcp-user-table-preferences", Vn = {
|
|
44
44
|
pageSize: 30,
|
|
45
45
|
sortColumnKey: void 0,
|
|
46
46
|
sortColumnOrder: void 0
|
|
@@ -50,33 +50,33 @@ function Yn() {
|
|
|
50
50
|
if (typeof n == "string")
|
|
51
51
|
try {
|
|
52
52
|
return JSON.parse(n);
|
|
53
|
-
} catch (
|
|
54
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
53
|
+
} catch (r) {
|
|
54
|
+
console.error("useTablePreferences(tryParseJson)", r);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
}, t = () => {
|
|
58
|
-
const n = e(localStorage.getItem(
|
|
58
|
+
const n = e(localStorage.getItem(je));
|
|
59
59
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
60
60
|
};
|
|
61
61
|
return {
|
|
62
|
-
setTablePreferences: (n,
|
|
62
|
+
setTablePreferences: (n, r) => {
|
|
63
63
|
try {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
} catch (
|
|
67
|
-
console.error("useTablePreferences(setTablePreferences)",
|
|
64
|
+
const i = t();
|
|
65
|
+
i.set(n, r), localStorage.setItem(je, JSON.stringify(Object.fromEntries(i.entries())));
|
|
66
|
+
} catch (i) {
|
|
67
|
+
console.error("useTablePreferences(setTablePreferences)", i);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
getTablePreferences: (n) => {
|
|
71
|
-
const
|
|
72
|
-
return (
|
|
71
|
+
const r = t();
|
|
72
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || Vn;
|
|
73
73
|
},
|
|
74
74
|
deleteAllTablePreferences: () => {
|
|
75
|
-
localStorage.removeItem(
|
|
75
|
+
localStorage.removeItem(je);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ze(e = {}) {
|
|
80
80
|
const { getAxiosInstance: t } = Pn();
|
|
81
81
|
return {
|
|
82
82
|
axiosInstance: t(e)
|
|
@@ -162,10 +162,10 @@ const zn = {
|
|
|
162
162
|
fetch: "Could not fetch available items",
|
|
163
163
|
invalid: "Please select a valid value"
|
|
164
164
|
}
|
|
165
|
-
},
|
|
165
|
+
}, er = {
|
|
166
166
|
unexpected: "An unexpected error has occurred",
|
|
167
167
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
168
|
-
},
|
|
168
|
+
}, tr = {
|
|
169
169
|
enable: {
|
|
170
170
|
title: "Enable {entityType}",
|
|
171
171
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -176,7 +176,7 @@ const zn = {
|
|
|
176
176
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
177
177
|
confirmText: "Yes, disable"
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, nr = {
|
|
180
180
|
global: zn,
|
|
181
181
|
deleteModal: Wn,
|
|
182
182
|
baseForm: Jn,
|
|
@@ -184,11 +184,11 @@ const zn = {
|
|
|
184
184
|
baseConfigCard: Zn,
|
|
185
185
|
filter: Qn,
|
|
186
186
|
debouncedFilter: Xn,
|
|
187
|
-
errors:
|
|
188
|
-
toggleModal:
|
|
187
|
+
errors: er,
|
|
188
|
+
toggleModal: tr
|
|
189
189
|
};
|
|
190
|
-
function
|
|
191
|
-
const e = Bt("en-us",
|
|
190
|
+
function Qe() {
|
|
191
|
+
const e = Bt("en-us", nr);
|
|
192
192
|
return {
|
|
193
193
|
i18n: e,
|
|
194
194
|
i18nT: Kn(e)
|
|
@@ -239,51 +239,51 @@ function Mt() {
|
|
|
239
239
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function rr(e, t, n, r = {
|
|
243
243
|
fetchedItemsKey: "data",
|
|
244
244
|
searchKeys: ["id"]
|
|
245
245
|
}) {
|
|
246
246
|
n || (n = "100");
|
|
247
|
-
const { axiosInstance:
|
|
247
|
+
const { axiosInstance: i } = Ze({
|
|
248
248
|
headers: e.requestHeaders
|
|
249
|
-
}), { i18n: { t: o } } =
|
|
249
|
+
}), { i18n: { t: o } } = Qe(), { debounce: a } = Hn(), l = a(async (g) => {
|
|
250
250
|
await $(g);
|
|
251
|
-
}, 200), s = K(!1), c = K(""), d = K(""), u = K([]), h = K([]), f = K(void 0), x =
|
|
251
|
+
}, 200), s = K(!1), c = K(""), d = K(""), u = K([]), h = K([]), f = K(void 0), x = I(t);
|
|
252
252
|
let m = `${e.apiBaseUrl}${x}`;
|
|
253
253
|
e.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
254
|
-
const { isValidUuid:
|
|
254
|
+
const { isValidUuid: k } = Mt(), B = async () => {
|
|
255
255
|
try {
|
|
256
256
|
s.value = !0;
|
|
257
|
-
const { data: g } = await
|
|
258
|
-
g != null && g.next || (f.value =
|
|
257
|
+
const { data: g } = await i.get(`${m}?size=${n}`);
|
|
258
|
+
g != null && g.next || (f.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : []), h.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : [], u.value = h.value;
|
|
259
259
|
} catch {
|
|
260
260
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
261
261
|
} finally {
|
|
262
262
|
s.value = !1;
|
|
263
263
|
}
|
|
264
|
-
},
|
|
264
|
+
}, v = K(""), $ = async (g) => {
|
|
265
265
|
var C, y, j;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
266
|
+
if (v.value !== g)
|
|
267
|
+
if (v.value = g || "", f.value === void 0)
|
|
268
268
|
try {
|
|
269
269
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
270
270
|
let F = m + "";
|
|
271
271
|
g && (F += `/${g}`);
|
|
272
|
-
const { data:
|
|
273
|
-
|
|
272
|
+
const { data: S } = await i.get(`${F}?size=${n}`);
|
|
273
|
+
r.fetchedItemsKey in S ? u.value = S[r.fetchedItemsKey] : S != null && S.id ? u.value = [S] : u.value = [];
|
|
274
274
|
} else if (g) {
|
|
275
275
|
const F = [];
|
|
276
|
-
|
|
277
|
-
const { data: E } = await
|
|
278
|
-
return [E[
|
|
276
|
+
k(g) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
277
|
+
const { data: E } = await i.get(`${m}/${g}`);
|
|
278
|
+
return [E[r.fetchedItemsKey] ?? E];
|
|
279
279
|
})()) : F.push(
|
|
280
|
-
...
|
|
281
|
-
const { data: T } = await
|
|
282
|
-
return T[
|
|
280
|
+
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
281
|
+
const { data: T } = await i.get(`${m}?${E}=${g}`);
|
|
282
|
+
return T[r.fetchedItemsKey];
|
|
283
283
|
})
|
|
284
284
|
);
|
|
285
|
-
const
|
|
286
|
-
u.value = [], (C =
|
|
285
|
+
const S = await Promise.all(F), q = /* @__PURE__ */ new Set();
|
|
286
|
+
u.value = [], (C = S == null ? void 0 : S.forEach) == null || C.call(S, (E) => {
|
|
287
287
|
var T;
|
|
288
288
|
(T = E == null ? void 0 : E.forEach) == null || T.call(E, (D) => {
|
|
289
289
|
q.has(D.id) || (q.add(D.id), u.value.push(D));
|
|
@@ -299,12 +299,12 @@ function ii(e, t, n, i = {
|
|
|
299
299
|
else
|
|
300
300
|
s.value = !0, d.value = "", g ? (u.value = (j = f.value) == null ? void 0 : j.filter((F) => {
|
|
301
301
|
var q;
|
|
302
|
-
let
|
|
303
|
-
for (const E of
|
|
302
|
+
let S = !1;
|
|
303
|
+
for (const E of r.searchKeys) {
|
|
304
304
|
const T = typeof F[E] == "string" ? (q = F[E]) == null ? void 0 : q.toLowerCase() : F[E];
|
|
305
|
-
T != null && T.includes(g.toLowerCase()) && (
|
|
305
|
+
T != null && T.includes(g.toLowerCase()) && (S = !0);
|
|
306
306
|
}
|
|
307
|
-
return
|
|
307
|
+
return S;
|
|
308
308
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : u.value = f.value, s.value = !1;
|
|
309
309
|
};
|
|
310
310
|
return {
|
|
@@ -313,26 +313,26 @@ function ii(e, t, n, i = {
|
|
|
313
313
|
validationError: d,
|
|
314
314
|
results: u,
|
|
315
315
|
allRecords: f,
|
|
316
|
-
loadItems:
|
|
316
|
+
loadItems: B,
|
|
317
317
|
debouncedQueryChange: l
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
const n =
|
|
320
|
+
function ir(e, t) {
|
|
321
|
+
const n = I(t), r = A(
|
|
322
322
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
323
323
|
);
|
|
324
|
-
return
|
|
324
|
+
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
const { i18n: { t: e } } =
|
|
326
|
+
function or() {
|
|
327
|
+
const { i18n: { t: e } } = Qe();
|
|
328
328
|
return {
|
|
329
329
|
getMessageFromError: (n) => {
|
|
330
|
-
var
|
|
330
|
+
var r, i, o, a;
|
|
331
331
|
if (!n)
|
|
332
332
|
return e("errors.unexpected");
|
|
333
|
-
if (((
|
|
333
|
+
if (((r = n == null ? void 0 : n.response) == null ? void 0 : r.status) === 401)
|
|
334
334
|
return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."), "";
|
|
335
|
-
if ((
|
|
335
|
+
if ((i = n == null ? void 0 : n.response) != null && i.data) {
|
|
336
336
|
if (n.response.data.detail)
|
|
337
337
|
return n.response.data.detail;
|
|
338
338
|
if ((o = n.response.data.details) != null && o.length)
|
|
@@ -353,47 +353,47 @@ function oi() {
|
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function ar(e) {
|
|
357
357
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
358
358
|
try {
|
|
359
|
-
const
|
|
360
|
-
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(
|
|
361
|
-
return `${n}${
|
|
359
|
+
const r = e.join("/"), i = `${n}${r}`, o = e.some((l) => l.trim() === "");
|
|
360
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(i) && !o && new URL(i))
|
|
361
|
+
return `${n}${r}`;
|
|
362
362
|
throw new Error("Invalid url");
|
|
363
|
-
} catch (
|
|
364
|
-
return console.warn("Failed to build valid URL:",
|
|
363
|
+
} catch (r) {
|
|
364
|
+
return console.warn("Failed to build valid URL:", r), "";
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
function Rt(e, t) {
|
|
368
|
-
const n = K(
|
|
368
|
+
const n = K(I(e)), r = K(I(t)), i = A(
|
|
369
369
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
370
|
-
), o =
|
|
371
|
-
() =>
|
|
370
|
+
), o = A(
|
|
371
|
+
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
372
372
|
);
|
|
373
373
|
return (a) => {
|
|
374
374
|
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: h } = a;
|
|
375
375
|
try {
|
|
376
376
|
let f = new URL(o.value.href);
|
|
377
|
-
return
|
|
377
|
+
return i.value && h ? (f.search = "", f = n.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${h}`) : new URL(`${f.href}/${h}/`)) : (i.value || new URLSearchParams(h).forEach((x, m) => {
|
|
378
378
|
f.searchParams.append(m, x);
|
|
379
379
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), c && l !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
380
380
|
} catch (f) {
|
|
381
|
-
return console.error("RouteList(fetcher)", f),
|
|
381
|
+
return console.error("RouteList(fetcher)", f), r.value;
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
const
|
|
385
|
+
function lr(e, t, n = "data") {
|
|
386
|
+
const r = I(t), { axiosInstance: i } = Ze({
|
|
387
387
|
headers: e.requestHeaders
|
|
388
|
-
}), o = Rt(e,
|
|
389
|
-
status:
|
|
388
|
+
}), o = Rt(e, r), a = K({
|
|
389
|
+
status: me.Idle
|
|
390
390
|
});
|
|
391
391
|
return { fetcher: async (s) => {
|
|
392
392
|
try {
|
|
393
|
-
a.value = { status:
|
|
393
|
+
a.value = { status: me.Loading };
|
|
394
394
|
let c = o(s);
|
|
395
395
|
c.includes("filter[name]") && (c = `${c}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
396
|
-
const { data: d } = await
|
|
396
|
+
const { data: d } = await i.get(c), u = n && n.replace(/[^\w-_]/gi, "");
|
|
397
397
|
let h;
|
|
398
398
|
d[u] && Array.isArray(d[u]) ? h = d[u] : Array.isArray(d) ? h = d : h = Object.keys(d).length ? [d] : [];
|
|
399
399
|
const f = {
|
|
@@ -406,7 +406,7 @@ function li(e, t, n = "data") {
|
|
|
406
406
|
} : null
|
|
407
407
|
};
|
|
408
408
|
return a.value = {
|
|
409
|
-
status:
|
|
409
|
+
status: me.Idle,
|
|
410
410
|
response: f
|
|
411
411
|
}, f;
|
|
412
412
|
} catch (c) {
|
|
@@ -415,21 +415,21 @@ function li(e, t, n = "data") {
|
|
|
415
415
|
total: 0
|
|
416
416
|
};
|
|
417
417
|
return s.query && c.response.status === 404 ? (a.value = {
|
|
418
|
-
status:
|
|
418
|
+
status: me.NoResults,
|
|
419
419
|
response: d,
|
|
420
420
|
error: c
|
|
421
421
|
}, d) : (a.value = {
|
|
422
|
-
status:
|
|
422
|
+
status: me.Error,
|
|
423
423
|
response: d,
|
|
424
424
|
error: c
|
|
425
425
|
}, d);
|
|
426
426
|
}
|
|
427
427
|
}, fetcherState: a };
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
const e = (
|
|
429
|
+
function sr() {
|
|
430
|
+
const e = (r, i = "_") => r ? r.split(i).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
431
431
|
return {
|
|
432
|
-
capitalize: (
|
|
432
|
+
capitalize: (r) => r ? r.replace(t, (i) => i.toUpperCase()) : "",
|
|
433
433
|
convertKeyToTitle: e
|
|
434
434
|
};
|
|
435
435
|
}
|
|
@@ -443,25 +443,25 @@ const Kt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
443
443
|
}, ct = (e) => e === "*" || e === "x" || e === "X", ut = (e) => {
|
|
444
444
|
const t = parseInt(e, 10);
|
|
445
445
|
return isNaN(t) ? e : t;
|
|
446
|
-
},
|
|
446
|
+
}, cr = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], ur = (e, t) => {
|
|
447
447
|
if (ct(e) || ct(t))
|
|
448
448
|
return 0;
|
|
449
|
-
const [n,
|
|
450
|
-
return n >
|
|
449
|
+
const [n, r] = cr(ut(e), ut(t));
|
|
450
|
+
return n > r ? 1 : n < r ? -1 : 0;
|
|
451
451
|
}, dt = (e, t) => {
|
|
452
452
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
return
|
|
453
|
+
const r = ur(e[n] || "0", t[n] || "0");
|
|
454
|
+
if (r !== 0)
|
|
455
|
+
return r;
|
|
456
456
|
}
|
|
457
457
|
return 0;
|
|
458
|
-
},
|
|
459
|
-
const n = st(e),
|
|
460
|
-
return a !== 0 ? a :
|
|
458
|
+
}, dr = (e, t) => {
|
|
459
|
+
const n = st(e), r = st(t), i = n.pop(), o = r.pop(), a = dt(n, r);
|
|
460
|
+
return a !== 0 ? a : i && o ? dt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
461
461
|
}, ft = (e, t, n) => {
|
|
462
|
-
|
|
463
|
-
const
|
|
464
|
-
return Dt[n].includes(
|
|
462
|
+
fr(n);
|
|
463
|
+
const r = dr(e, t);
|
|
464
|
+
return Dt[n].includes(r);
|
|
465
465
|
}, Dt = {
|
|
466
466
|
">": [1],
|
|
467
467
|
">=": [0, 1],
|
|
@@ -469,67 +469,67 @@ const Kt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
469
469
|
"<=": [-1, 0],
|
|
470
470
|
"<": [-1],
|
|
471
471
|
"!=": [-1, 1]
|
|
472
|
-
}, pt = Object.keys(Dt),
|
|
472
|
+
}, pt = Object.keys(Dt), fr = (e) => {
|
|
473
473
|
if (typeof e != "string")
|
|
474
474
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
475
475
|
if (pt.indexOf(e) === -1)
|
|
476
476
|
throw new Error(`Invalid operator, expected one of ${pt.join("|")}`);
|
|
477
|
-
},
|
|
478
|
-
function
|
|
477
|
+
}, pr = (e) => typeof e == "string" && /^[v\d]/.test(e) && Kt.test(e);
|
|
478
|
+
function hr(e) {
|
|
479
479
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
480
480
|
if (!t)
|
|
481
481
|
return !0;
|
|
482
|
-
const { edition:
|
|
483
|
-
if (!
|
|
482
|
+
const { edition: r, version: i } = t;
|
|
483
|
+
if (!pr(i))
|
|
484
484
|
return console.error("Invalid version"), !1;
|
|
485
|
-
const o = n[
|
|
485
|
+
const o = n[r];
|
|
486
486
|
if (!o)
|
|
487
487
|
return !1;
|
|
488
488
|
const [a, l] = o;
|
|
489
|
-
return !(a && ft(
|
|
489
|
+
return !(a && ft(i, a, "<") || l && ft(i, l, ">"));
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
const t = K(0), n = K(0),
|
|
491
|
+
function mr(e) {
|
|
492
|
+
const t = K(0), n = K(0), r = K(!1);
|
|
493
493
|
return _e(e, (o) => {
|
|
494
|
-
o && !
|
|
494
|
+
o && !r.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, r.value = !0);
|
|
495
495
|
}), {
|
|
496
|
-
isTruncated:
|
|
496
|
+
isTruncated: A(() => t.value < n.value)
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
499
|
const W = {
|
|
500
|
-
useAxios:
|
|
501
|
-
useDebouncedFilter:
|
|
502
|
-
useDeleteUrlBuilder:
|
|
503
|
-
useErrors:
|
|
504
|
-
useExternalLinkCreator:
|
|
505
|
-
useFetcher:
|
|
500
|
+
useAxios: Ze,
|
|
501
|
+
useDebouncedFilter: rr,
|
|
502
|
+
useDeleteUrlBuilder: ir,
|
|
503
|
+
useErrors: or,
|
|
504
|
+
useExternalLinkCreator: ar,
|
|
505
|
+
useFetcher: lr,
|
|
506
506
|
useFetchUrlBuilder: Rt,
|
|
507
507
|
useHelpers: Mt,
|
|
508
|
-
useStringHelpers:
|
|
509
|
-
useI18n:
|
|
510
|
-
useGatewayFeatureSupported:
|
|
511
|
-
useTruncationDetector:
|
|
512
|
-
},
|
|
508
|
+
useStringHelpers: sr,
|
|
509
|
+
useI18n: Qe,
|
|
510
|
+
useGatewayFeatureSupported: hr,
|
|
511
|
+
useTruncationDetector: mr
|
|
512
|
+
}, gr = {
|
|
513
513
|
fail: "Failed to copy id to clipboard",
|
|
514
514
|
success: {
|
|
515
515
|
prefix: "Successfully",
|
|
516
516
|
content: " copied to clipboard"
|
|
517
517
|
}
|
|
518
|
-
},
|
|
519
|
-
message:
|
|
520
|
-
iconTitle:
|
|
521
|
-
},
|
|
518
|
+
}, yr = "Copy to clipboard", vr = {
|
|
519
|
+
message: gr,
|
|
520
|
+
iconTitle: yr
|
|
521
|
+
}, br = "kong-ui-copy-uuid-notify", ht = "24px", xr = (e, t) => {
|
|
522
522
|
const n = e.__vccOpts || e;
|
|
523
|
-
for (const [
|
|
524
|
-
n[
|
|
523
|
+
for (const [r, i] of t)
|
|
524
|
+
n[r] = i;
|
|
525
525
|
return n;
|
|
526
|
-
},
|
|
526
|
+
}, Cr = (e) => (Re("data-v-13f41aa3"), e = e(), Ke(), e), _r = ["aria-hidden"], kr = {
|
|
527
527
|
key: 0,
|
|
528
528
|
"data-testid": "kui-icon-svg-title"
|
|
529
|
-
},
|
|
529
|
+
}, Ar = /* @__PURE__ */ Cr(() => /* @__PURE__ */ L("path", {
|
|
530
530
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
531
531
|
fill: "currentColor"
|
|
532
|
-
}, null, -1)),
|
|
532
|
+
}, null, -1)), wr = /* @__PURE__ */ V({
|
|
533
533
|
__name: "CopyIcon",
|
|
534
534
|
props: {
|
|
535
535
|
/** The accessibility text provided to screen readers */
|
|
@@ -581,16 +581,16 @@ const W = {
|
|
|
581
581
|
}
|
|
582
582
|
},
|
|
583
583
|
setup(e) {
|
|
584
|
-
const t = e, n =
|
|
584
|
+
const t = e, n = A(() => {
|
|
585
585
|
if (typeof t.size == "number" && t.size > 0)
|
|
586
586
|
return `${t.size}px`;
|
|
587
587
|
if (typeof t.size == "string") {
|
|
588
|
-
const
|
|
588
|
+
const i = String(t.size).replace(/px/gi, ""), o = Number(i);
|
|
589
589
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
590
590
|
return `${o}px`;
|
|
591
591
|
}
|
|
592
592
|
return ht;
|
|
593
|
-
}),
|
|
593
|
+
}), r = A(() => ({
|
|
594
594
|
boxSizing: "border-box",
|
|
595
595
|
color: t.color,
|
|
596
596
|
display: t.display,
|
|
@@ -598,13 +598,13 @@ const W = {
|
|
|
598
598
|
lineHeight: "0",
|
|
599
599
|
width: n.value
|
|
600
600
|
}));
|
|
601
|
-
return (
|
|
601
|
+
return (i, o) => (p(), R(ce(e.as), {
|
|
602
602
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
603
603
|
class: "kui-icon copy-icon",
|
|
604
604
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
605
|
-
style:
|
|
605
|
+
style: Me(r.value)
|
|
606
606
|
}, {
|
|
607
|
-
default:
|
|
607
|
+
default: b(() => [
|
|
608
608
|
(p(), w("svg", {
|
|
609
609
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
610
610
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -615,14 +615,14 @@ const W = {
|
|
|
615
615
|
width: "100%",
|
|
616
616
|
xmlns: "http://www.w3.org/2000/svg"
|
|
617
617
|
}, [
|
|
618
|
-
e.title ? (p(), w("title",
|
|
619
|
-
|
|
620
|
-
], 8,
|
|
618
|
+
e.title ? (p(), w("title", kr, O(e.title), 1)) : U("", !0),
|
|
619
|
+
Ar
|
|
620
|
+
], 8, _r))
|
|
621
621
|
]),
|
|
622
622
|
_: 1
|
|
623
623
|
}, 8, ["aria-hidden", "style"]));
|
|
624
624
|
}
|
|
625
|
-
}),
|
|
625
|
+
}), Sr = /* @__PURE__ */ xr(wr, [["__scopeId", "data-v-13f41aa3"]]), Ir = "16px", Er = { class: "kong-ui-copy-uuid" }, Tr = ["onClick"], mt = 15, Fr = /* @__PURE__ */ V({
|
|
626
626
|
__name: "CopyUuid",
|
|
627
627
|
props: {
|
|
628
628
|
uuid: {
|
|
@@ -666,73 +666,73 @@ const W = {
|
|
|
666
666
|
},
|
|
667
667
|
emits: ["success", "error"],
|
|
668
668
|
setup(e, { emit: t }) {
|
|
669
|
-
const { t: n } = Bt("en-us",
|
|
670
|
-
}), a =
|
|
671
|
-
label:
|
|
669
|
+
const { t: n } = Bt("en-us", vr), r = e, i = t, o = r.notify || $t(br, () => {
|
|
670
|
+
}), a = A(() => r.idTooltip ? {
|
|
671
|
+
label: r.idTooltip,
|
|
672
672
|
positionFixed: !0,
|
|
673
673
|
placement: "bottomStart"
|
|
674
674
|
} : {
|
|
675
|
-
title:
|
|
676
|
-
}), l =
|
|
675
|
+
title: r.uuid
|
|
676
|
+
}), l = A(() => !!(r.tooltip && r.successTooltip)), s = K(r.tooltip), c = A(() => r.tooltip ? {
|
|
677
677
|
label: s.value,
|
|
678
678
|
positionFixed: !0,
|
|
679
679
|
maxWidth: "500px",
|
|
680
680
|
placement: "bottomStart"
|
|
681
|
-
} : {}), d =
|
|
681
|
+
} : {}), d = A(() => {
|
|
682
682
|
var f;
|
|
683
|
-
return
|
|
683
|
+
return r.format === "redacted" ? "*****" : r.format === "deleted" ? `*${(f = r.uuid) == null ? void 0 : f.substring(0, 5)}` : r.uuid;
|
|
684
684
|
}), u = (f) => {
|
|
685
685
|
s.value = f, setTimeout(() => {
|
|
686
|
-
s.value =
|
|
686
|
+
s.value = r.tooltip;
|
|
687
687
|
}, 1800);
|
|
688
688
|
}, h = (f) => {
|
|
689
689
|
var x, m;
|
|
690
|
-
if (!f(
|
|
690
|
+
if (!f(r.uuid)) {
|
|
691
691
|
typeof o == "function" && o({
|
|
692
692
|
type: "error",
|
|
693
693
|
message: n("message.fail")
|
|
694
|
-
}), l.value ? u(n("message.fail")) :
|
|
694
|
+
}), l.value ? u(n("message.fail")) : i("error", r.uuid);
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
|
-
const
|
|
697
|
+
const k = ((x = r.uuid) == null ? void 0 : x.length) > mt, B = r.format === "hidden" || r.format === "redacted" ? n("message.success.prefix") : `"${((m = r.uuid) == null ? void 0 : m.substring(0, mt)) + (k ? "..." : "")}"`;
|
|
698
698
|
typeof o == "function" && o({
|
|
699
699
|
type: "success",
|
|
700
|
-
message: `${
|
|
701
|
-
}), l.value ? u(
|
|
700
|
+
message: `${B}${n("message.success.content")}`
|
|
701
|
+
}), l.value ? u(r.successTooltip) : i("success", r.uuid);
|
|
702
702
|
};
|
|
703
703
|
return (f, x) => {
|
|
704
|
-
const m =
|
|
705
|
-
return p(), w("div",
|
|
706
|
-
e.format !== "hidden" ? (p(), R(
|
|
707
|
-
default:
|
|
708
|
-
|
|
709
|
-
class:
|
|
704
|
+
const m = N("KClipboardProvider");
|
|
705
|
+
return p(), w("div", Er, [
|
|
706
|
+
e.format !== "hidden" ? (p(), R(ce(e.idTooltip ? "KTooltip" : "div"), He({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
707
|
+
default: b(() => [
|
|
708
|
+
L("div", {
|
|
709
|
+
class: pe([
|
|
710
710
|
"uuid-container",
|
|
711
711
|
e.truncated ? "truncated-uuid" : null,
|
|
712
712
|
e.useMono ? "mono" : null
|
|
713
713
|
])
|
|
714
|
-
},
|
|
714
|
+
}, O(d.value), 3)
|
|
715
715
|
]),
|
|
716
716
|
_: 1
|
|
717
717
|
}, 16)) : U("", !0),
|
|
718
|
-
(p(), R(
|
|
719
|
-
default:
|
|
720
|
-
|
|
721
|
-
default:
|
|
722
|
-
|
|
718
|
+
(p(), R(ce(e.tooltip ? "KTooltip" : "div"), He(c.value, { class: "uuid-icon-wrapper" }), {
|
|
719
|
+
default: b(() => [
|
|
720
|
+
M(m, null, {
|
|
721
|
+
default: b(({ copyToClipboard: k }) => [
|
|
722
|
+
L("span", {
|
|
723
723
|
"data-testid": "copy-to-clipboard",
|
|
724
724
|
role: "button",
|
|
725
725
|
tabindex: "0",
|
|
726
|
-
onClick:
|
|
726
|
+
onClick: Fe((B) => h(k), ["stop"])
|
|
727
727
|
}, [
|
|
728
|
-
|
|
728
|
+
M(I(Sr), {
|
|
729
729
|
class: "uuid-icon",
|
|
730
730
|
color: e.iconColor,
|
|
731
731
|
decorative: !!e.tooltip,
|
|
732
|
-
size:
|
|
733
|
-
title:
|
|
732
|
+
size: I(Ir),
|
|
733
|
+
title: I(n)("iconTitle")
|
|
734
734
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
735
|
-
], 8,
|
|
735
|
+
], 8, Tr)
|
|
736
736
|
]),
|
|
737
737
|
_: 1
|
|
738
738
|
})
|
|
@@ -742,15 +742,15 @@ const W = {
|
|
|
742
742
|
]);
|
|
743
743
|
};
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
745
|
+
}), Or = (e, t) => {
|
|
746
746
|
const n = e.__vccOpts || e;
|
|
747
|
-
for (const [
|
|
748
|
-
n[
|
|
747
|
+
for (const [r, i] of t)
|
|
748
|
+
n[r] = i;
|
|
749
749
|
return n;
|
|
750
|
-
}, jt = /* @__PURE__ */
|
|
750
|
+
}, jt = /* @__PURE__ */ Or(Fr, [["__scopeId", "data-v-0c07874b"]]), $r = {
|
|
751
751
|
key: 0,
|
|
752
752
|
class: "config-card-fieldset-title"
|
|
753
|
-
},
|
|
753
|
+
}, Lr = /* @__PURE__ */ V({
|
|
754
754
|
__name: "JsonCardItem",
|
|
755
755
|
props: {
|
|
756
756
|
item: {
|
|
@@ -767,25 +767,25 @@ const W = {
|
|
|
767
767
|
}
|
|
768
768
|
},
|
|
769
769
|
setup(e) {
|
|
770
|
-
const t = e, { i18n: { t: n } } = W.useI18n(), { convertKeyToTitle:
|
|
770
|
+
const t = e, { i18n: { t: n } } = W.useI18n(), { convertKeyToTitle: r } = W.useStringHelpers(), i = A(() => t.item.key ?? "json-array-item"), o = A(() => t.item.value ?? t.item), a = A(() => {
|
|
771
771
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
772
772
|
return t.isArrayItem && delete s.name, s;
|
|
773
|
-
}), l =
|
|
773
|
+
}), l = A(() => {
|
|
774
774
|
var s;
|
|
775
|
-
return t.isArrayItem ? (s = o.value) != null && s.name ?
|
|
775
|
+
return t.isArrayItem ? (s = o.value) != null && s.name ? r(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
776
776
|
});
|
|
777
|
-
return (s, c) => (p(), R(
|
|
778
|
-
class:
|
|
777
|
+
return (s, c) => (p(), R(ce(e.isArrayItem ? "fieldset" : "div"), {
|
|
778
|
+
class: pe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
779
779
|
}, {
|
|
780
|
-
default:
|
|
781
|
-
e.isArrayItem ? (p(), w("legend",
|
|
782
|
-
|
|
780
|
+
default: b(() => [
|
|
781
|
+
e.isArrayItem ? (p(), w("legend", $r, [
|
|
782
|
+
L("b", null, O(l.value), 1)
|
|
783
783
|
])) : U("", !0),
|
|
784
|
-
(p(!0), w(ae, null,
|
|
785
|
-
key: `${
|
|
784
|
+
(p(!0), w(ae, null, ie(Object.keys(a.value), (d, u) => (p(), R(qt, {
|
|
785
|
+
key: `${i.value}-property-${u}`,
|
|
786
786
|
item: {
|
|
787
787
|
key: d,
|
|
788
|
-
label:
|
|
788
|
+
label: I(r)(d),
|
|
789
789
|
value: a.value[d]
|
|
790
790
|
}
|
|
791
791
|
}, null, 8, ["item"]))), 128))
|
|
@@ -793,12 +793,12 @@ const W = {
|
|
|
793
793
|
_: 1
|
|
794
794
|
}, 8, ["class"]));
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), re = (e, t) => {
|
|
797
797
|
const n = e.__vccOpts || e;
|
|
798
|
-
for (const [
|
|
799
|
-
n[
|
|
798
|
+
for (const [r, i] of t)
|
|
799
|
+
n[r] = i;
|
|
800
800
|
return n;
|
|
801
|
-
}, Ut = /* @__PURE__ */
|
|
801
|
+
}, Ut = /* @__PURE__ */ re(Lr, [["__scopeId", "data-v-68ca83ec"]]), Nr = /* @__PURE__ */ V({
|
|
802
802
|
__name: "InternalLinkItem",
|
|
803
803
|
props: {
|
|
804
804
|
item: {
|
|
@@ -809,23 +809,23 @@ const W = {
|
|
|
809
809
|
emits: ["navigation-click"],
|
|
810
810
|
setup(e) {
|
|
811
811
|
const { i18n: { t } } = W.useI18n();
|
|
812
|
-
return (n,
|
|
813
|
-
const
|
|
812
|
+
return (n, r) => {
|
|
813
|
+
const i = N("KButton");
|
|
814
814
|
return p(), w("div", null, [
|
|
815
|
-
|
|
815
|
+
M(i, {
|
|
816
816
|
appearance: "tertiary",
|
|
817
817
|
class: "navigation-button",
|
|
818
|
-
onClick:
|
|
818
|
+
onClick: r[0] || (r[0] = (o) => n.$emit("navigation-click", e.item))
|
|
819
819
|
}, {
|
|
820
|
-
default:
|
|
821
|
-
z(
|
|
820
|
+
default: b(() => [
|
|
821
|
+
z(O(e.item.value || I(t)("baseConfigCard.commonFields.link")), 1)
|
|
822
822
|
]),
|
|
823
823
|
_: 1
|
|
824
824
|
})
|
|
825
825
|
]);
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
|
-
}),
|
|
828
|
+
}), Br = /* @__PURE__ */ re(Nr, [["__scopeId", "data-v-c96811e5"]]), Mr = /* @__PURE__ */ V({
|
|
829
829
|
__name: "StatusBadge",
|
|
830
830
|
props: {
|
|
831
831
|
status: {
|
|
@@ -835,23 +835,23 @@ const W = {
|
|
|
835
835
|
},
|
|
836
836
|
setup(e) {
|
|
837
837
|
const { i18n: { t } } = W.useI18n();
|
|
838
|
-
return (n,
|
|
839
|
-
const
|
|
840
|
-
return p(), R(
|
|
838
|
+
return (n, r) => {
|
|
839
|
+
const i = N("KBadge");
|
|
840
|
+
return p(), R(i, {
|
|
841
841
|
appearance: e.status ? "success" : "neutral"
|
|
842
842
|
}, {
|
|
843
|
-
default:
|
|
844
|
-
z(
|
|
843
|
+
default: b(() => [
|
|
844
|
+
z(O(e.status ? I(t)("baseConfigCard.statusBadge.enabledLabel") : I(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
845
845
|
]),
|
|
846
846
|
_: 1
|
|
847
847
|
}, 8, ["appearance"]);
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
-
}),
|
|
850
|
+
}), Rr = "#0044f4", Kr = "#e0e4ea", Dr = "#3a3f51", jr = "#0044f4", Ur = "1px", qr = "16px", Pr = "20px", Hr = { class: "config-card-details-row" }, Vr = ["data-testid"], Yr = ["data-testid"], zr = ["data-testid"], Wr = ["data-testid"], Jr = { key: 1 }, Gr = ["data-testid"], Zr = ["data-testid"], Qr = ["data-testid"], Xr = ["data-testid"], ei = {
|
|
851
851
|
name: "ConfigCardItem",
|
|
852
|
-
components: { CopyUuid: jt, JsonCardItem: Ut, StatusBadge:
|
|
853
|
-
},
|
|
854
|
-
...
|
|
852
|
+
components: { CopyUuid: jt, JsonCardItem: Ut, StatusBadge: Mr, InternalLinkItem: Br }
|
|
853
|
+
}, ti = /* @__PURE__ */ V({
|
|
854
|
+
...ei,
|
|
855
855
|
props: {
|
|
856
856
|
item: {
|
|
857
857
|
type: Object,
|
|
@@ -870,15 +870,15 @@ const W = {
|
|
|
870
870
|
},
|
|
871
871
|
emits: ["navigation-click"],
|
|
872
872
|
setup(e, { emit: t }) {
|
|
873
|
-
|
|
874
|
-
"5ae2770e": d.value ? "none" : `solid ${
|
|
873
|
+
Lt((x) => ({
|
|
874
|
+
"5ae2770e": d.value ? "none" : `solid ${I(Ur)} ${I(Kr)}`,
|
|
875
875
|
"4db3977e": c.value && l.value ? "block" : "flex",
|
|
876
876
|
"1a7c5e02": c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
877
877
|
"1a77d24c": c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
878
878
|
}));
|
|
879
|
-
const n = e,
|
|
879
|
+
const n = e, r = t, i = Ge(), { i18n: { t: o, formatUnixTimeStamp: a } } = W.useI18n(), l = A(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = A(() => !!(n.item.tooltip || i["label-tooltip"])), c = A(() => n.item.type === H.Json || n.item.type === H.JsonArray), d = A(() => n.item.type === H.JsonArray), u = A(() => {
|
|
880
880
|
switch (n.item.type) {
|
|
881
|
-
case
|
|
881
|
+
case H.ID:
|
|
882
882
|
return {
|
|
883
883
|
tag: "CopyUuid",
|
|
884
884
|
attrs: {
|
|
@@ -891,7 +891,7 @@ const W = {
|
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
|
-
case
|
|
894
|
+
case H.IdArray:
|
|
895
895
|
return {
|
|
896
896
|
tag: "div",
|
|
897
897
|
additionalComponent: "CopyUuid",
|
|
@@ -903,7 +903,7 @@ const W = {
|
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
};
|
|
906
|
-
case
|
|
906
|
+
case H.Redacted:
|
|
907
907
|
return {
|
|
908
908
|
tag: "CopyUuid",
|
|
909
909
|
attrs: {
|
|
@@ -917,7 +917,7 @@ const W = {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
};
|
|
920
|
-
case
|
|
920
|
+
case H.RedactedArray:
|
|
921
921
|
return {
|
|
922
922
|
tag: "div",
|
|
923
923
|
additionalComponent: "CopyUuid",
|
|
@@ -930,7 +930,7 @@ const W = {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
};
|
|
933
|
-
case
|
|
933
|
+
case H.Date:
|
|
934
934
|
return {
|
|
935
935
|
tag: "div",
|
|
936
936
|
attrs: {
|
|
@@ -938,7 +938,7 @@ const W = {
|
|
|
938
938
|
},
|
|
939
939
|
text: a(n.item.value)
|
|
940
940
|
};
|
|
941
|
-
case
|
|
941
|
+
case H.BadgeStatus:
|
|
942
942
|
return {
|
|
943
943
|
tag: "StatusBadge",
|
|
944
944
|
attrs: {
|
|
@@ -946,28 +946,28 @@ const W = {
|
|
|
946
946
|
status: n.item.value
|
|
947
947
|
}
|
|
948
948
|
};
|
|
949
|
-
case
|
|
949
|
+
case H.BadgeTag:
|
|
950
950
|
return {
|
|
951
951
|
tag: "div",
|
|
952
952
|
additionalComponent: "KBadge"
|
|
953
953
|
};
|
|
954
|
-
case
|
|
954
|
+
case H.BadgeMethod:
|
|
955
955
|
return {
|
|
956
956
|
tag: "div",
|
|
957
957
|
additionalComponent: "KMethodBadge"
|
|
958
958
|
};
|
|
959
|
-
case
|
|
959
|
+
case H.LinkInternal:
|
|
960
960
|
return {
|
|
961
961
|
tag: "InternalLinkItem",
|
|
962
962
|
attrs: {
|
|
963
963
|
"data-testid": `${n.item.key}-internal-link`,
|
|
964
964
|
item: n.item,
|
|
965
965
|
onNavigationClick: (x) => {
|
|
966
|
-
|
|
966
|
+
r("navigation-click", x);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
case
|
|
970
|
+
case H.LinkExternal:
|
|
971
971
|
return {
|
|
972
972
|
tag: "KExternalLink",
|
|
973
973
|
attrs: {
|
|
@@ -976,7 +976,7 @@ const W = {
|
|
|
976
976
|
},
|
|
977
977
|
text: n.item.value
|
|
978
978
|
};
|
|
979
|
-
case
|
|
979
|
+
case H.Json:
|
|
980
980
|
return {
|
|
981
981
|
tag: "JsonCardItem",
|
|
982
982
|
attrs: {
|
|
@@ -984,7 +984,7 @@ const W = {
|
|
|
984
984
|
item: n.item
|
|
985
985
|
}
|
|
986
986
|
};
|
|
987
|
-
case
|
|
987
|
+
case H.JsonArray:
|
|
988
988
|
return {
|
|
989
989
|
tag: "div",
|
|
990
990
|
additionalComponent: "JsonCardItem",
|
|
@@ -1004,109 +1004,109 @@ const W = {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
}), h = K(), { isTruncated: f } = W.useTruncationDetector(h);
|
|
1006
1006
|
return (x, m) => {
|
|
1007
|
-
const
|
|
1008
|
-
return p(), w("div",
|
|
1009
|
-
|
|
1007
|
+
const k = N("KLabel"), B = N("KBadge"), v = N("KTooltip");
|
|
1008
|
+
return p(), w("div", Hr, [
|
|
1009
|
+
L("div", {
|
|
1010
1010
|
class: "config-card-details-label",
|
|
1011
1011
|
"data-testid": `${e.item.key}-label`
|
|
1012
1012
|
}, [
|
|
1013
1013
|
Y(x.$slots, "label", { item: e.item }, () => [
|
|
1014
|
-
|
|
1015
|
-
default:
|
|
1016
|
-
z(
|
|
1014
|
+
M(k, { "tooltip-attributes": { maxWidth: "500px" } }, be({
|
|
1015
|
+
default: b(() => [
|
|
1016
|
+
z(O(e.item.label) + " ", 1)
|
|
1017
1017
|
]),
|
|
1018
1018
|
_: 2
|
|
1019
1019
|
}, [
|
|
1020
1020
|
s.value ? {
|
|
1021
1021
|
name: "tooltip",
|
|
1022
|
-
fn:
|
|
1023
|
-
|
|
1022
|
+
fn: b(() => [
|
|
1023
|
+
L("div", {
|
|
1024
1024
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1025
1025
|
}, [
|
|
1026
1026
|
Y(x.$slots, "label-tooltip", {}, () => [
|
|
1027
|
-
z(
|
|
1027
|
+
z(O(e.item.tooltip), 1)
|
|
1028
1028
|
], !0)
|
|
1029
|
-
], 8,
|
|
1029
|
+
], 8, Yr)
|
|
1030
1030
|
]),
|
|
1031
1031
|
key: "0"
|
|
1032
1032
|
} : void 0
|
|
1033
1033
|
]), 1024)
|
|
1034
1034
|
], !0)
|
|
1035
|
-
], 8,
|
|
1036
|
-
|
|
1035
|
+
], 8, Vr),
|
|
1036
|
+
L("div", {
|
|
1037
1037
|
class: "config-card-details-value",
|
|
1038
1038
|
"data-testid": `${e.item.key}-property-value`
|
|
1039
1039
|
}, [
|
|
1040
1040
|
Y(x.$slots, e.item.key, {
|
|
1041
1041
|
rowValue: e.item.value
|
|
1042
1042
|
}, () => [
|
|
1043
|
-
l.value ? (p(), w("div",
|
|
1044
|
-
(p(), R(
|
|
1045
|
-
default:
|
|
1043
|
+
l.value ? (p(), w("div", Jr, [
|
|
1044
|
+
(p(), R(ce(u.value.tag), Ln(Nn(u.value.attrs)), {
|
|
1045
|
+
default: b(() => [
|
|
1046
1046
|
u.value.additionalComponent === "KBadge" ? (p(), w("div", {
|
|
1047
1047
|
key: 0,
|
|
1048
1048
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1049
1049
|
}, [
|
|
1050
|
-
(p(!0), w(ae, null,
|
|
1050
|
+
(p(!0), w(ae, null, ie(e.item.value, ($, g) => (p(), R(B, {
|
|
1051
1051
|
key: `${e.item.key}-badge-tag-${g}`,
|
|
1052
1052
|
class: "config-badge",
|
|
1053
1053
|
"data-testid": `${e.item.key}-badge-tag-${g}`,
|
|
1054
1054
|
tooltip: $,
|
|
1055
1055
|
"truncation-tooltip": ""
|
|
1056
1056
|
}, {
|
|
1057
|
-
default:
|
|
1058
|
-
z(
|
|
1057
|
+
default: b(() => [
|
|
1058
|
+
z(O($), 1)
|
|
1059
1059
|
]),
|
|
1060
1060
|
_: 2
|
|
1061
1061
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1062
|
-
], 8,
|
|
1062
|
+
], 8, Gr)) : U("", !0),
|
|
1063
1063
|
u.value.additionalComponent === "CopyUuid" ? (p(), w("div", {
|
|
1064
1064
|
key: 1,
|
|
1065
1065
|
class: "copy-uuid-array",
|
|
1066
1066
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1067
1067
|
}, [
|
|
1068
|
-
(p(!0), w(ae, null,
|
|
1068
|
+
(p(!0), w(ae, null, ie(e.item.value, ($, g) => (p(), R(I(jt), He(u.value.childAttrs, {
|
|
1069
1069
|
key: `${e.item.key}-copy-uuid-${g}`,
|
|
1070
1070
|
"data-testid": `${e.item.key}-copy-uuid-${g}`,
|
|
1071
1071
|
uuid: $
|
|
1072
1072
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1073
|
-
], 8,
|
|
1073
|
+
], 8, Zr)) : u.value.additionalComponent === "KMethodBadge" ? (p(), w("div", {
|
|
1074
1074
|
key: 2,
|
|
1075
1075
|
class: "method-badge-array",
|
|
1076
1076
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1077
1077
|
}, [
|
|
1078
|
-
(p(!0), w(ae, null,
|
|
1078
|
+
(p(!0), w(ae, null, ie(e.item.value, ($, g) => (p(), R(B, {
|
|
1079
1079
|
key: `${e.item.key}-badge-method-${g}`,
|
|
1080
|
-
appearance: Object.values(
|
|
1080
|
+
appearance: Object.values(I(Dn)).includes($.toLowerCase()) ? $.toLowerCase() : "custom",
|
|
1081
1081
|
class: "config-badge",
|
|
1082
1082
|
"data-testid": `${e.item.key}-badge-method-${g}`
|
|
1083
1083
|
}, {
|
|
1084
|
-
default:
|
|
1085
|
-
z(
|
|
1084
|
+
default: b(() => [
|
|
1085
|
+
z(O($), 1)
|
|
1086
1086
|
]),
|
|
1087
1087
|
_: 2
|
|
1088
1088
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1089
|
-
], 8,
|
|
1089
|
+
], 8, Qr)) : U("", !0),
|
|
1090
1090
|
u.value.additionalComponent === "JsonCardItem" ? (p(), w("div", {
|
|
1091
1091
|
key: 3,
|
|
1092
1092
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1093
1093
|
}, [
|
|
1094
|
-
(p(!0), w(ae, null,
|
|
1094
|
+
(p(!0), w(ae, null, ie(e.item.value, ($, g) => (p(), R(Ut, {
|
|
1095
1095
|
key: `json-array-item-${g}`,
|
|
1096
1096
|
index: g,
|
|
1097
1097
|
"is-array-item": "",
|
|
1098
1098
|
item: $
|
|
1099
1099
|
}, null, 8, ["index", "item"]))), 128))
|
|
1100
|
-
], 8,
|
|
1100
|
+
], 8, Xr)) : (p(), R(v, {
|
|
1101
1101
|
key: 4,
|
|
1102
|
-
text:
|
|
1102
|
+
text: I(f) ? e.item.value : ""
|
|
1103
1103
|
}, {
|
|
1104
|
-
default:
|
|
1105
|
-
|
|
1104
|
+
default: b(() => [
|
|
1105
|
+
L("span", {
|
|
1106
1106
|
ref_key: "textContent",
|
|
1107
1107
|
ref: h,
|
|
1108
|
-
class:
|
|
1109
|
-
},
|
|
1108
|
+
class: pe(["attrs-data-text", { truncated: e.truncated }])
|
|
1109
|
+
}, O(u.value.text), 3)
|
|
1110
1110
|
]),
|
|
1111
1111
|
_: 1
|
|
1112
1112
|
}, 8, ["text"]))
|
|
@@ -1116,16 +1116,16 @@ const W = {
|
|
|
1116
1116
|
])) : (p(), w("div", {
|
|
1117
1117
|
key: 0,
|
|
1118
1118
|
"data-testid": `${e.item.key}-no-value`
|
|
1119
|
-
}, " – ", 8,
|
|
1119
|
+
}, " – ", 8, Wr))
|
|
1120
1120
|
], !0)
|
|
1121
|
-
], 8,
|
|
1121
|
+
], 8, zr)
|
|
1122
1122
|
]);
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
}), qt = /* @__PURE__ */
|
|
1125
|
+
}), qt = /* @__PURE__ */ re(ti, [["__scopeId", "data-v-f65fc52c"]]), ni = { class: "json-config" }, ri = {
|
|
1126
1126
|
key: 0,
|
|
1127
1127
|
class: "json-endpoint"
|
|
1128
|
-
}, Pt = /* @__PURE__ */
|
|
1128
|
+
}, Pt = /* @__PURE__ */ V({
|
|
1129
1129
|
__name: "JsonCodeBlock",
|
|
1130
1130
|
props: {
|
|
1131
1131
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1153,30 +1153,30 @@ const W = {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
setup(e) {
|
|
1156
|
-
|
|
1157
|
-
"2d178975": `${
|
|
1156
|
+
Lt((i) => ({
|
|
1157
|
+
"2d178975": `${r.value}ch`
|
|
1158
1158
|
}));
|
|
1159
|
-
const t = e, n =
|
|
1159
|
+
const t = e, n = A(() => t.jsonRecord), r = A(() => {
|
|
1160
1160
|
var a;
|
|
1161
1161
|
if (!t.fetcherUrl)
|
|
1162
1162
|
return 0;
|
|
1163
|
-
const
|
|
1164
|
-
return
|
|
1163
|
+
const i = (a = t.fetcherUrl) == null ? void 0 : a.split("/");
|
|
1164
|
+
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1165
1165
|
});
|
|
1166
|
-
return (
|
|
1166
|
+
return (i, o) => {
|
|
1167
1167
|
var s;
|
|
1168
|
-
const a =
|
|
1169
|
-
return p(), w("div",
|
|
1170
|
-
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (p(), w("div",
|
|
1171
|
-
|
|
1168
|
+
const a = N("KBadge"), l = N("KCodeBlock");
|
|
1169
|
+
return p(), w("div", ni, [
|
|
1170
|
+
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (p(), w("div", ri, [
|
|
1171
|
+
M(a, {
|
|
1172
1172
|
appearance: t.requestMethod
|
|
1173
1173
|
}, {
|
|
1174
|
-
default:
|
|
1175
|
-
z(
|
|
1174
|
+
default: b(() => [
|
|
1175
|
+
z(O(t.requestMethod), 1)
|
|
1176
1176
|
]),
|
|
1177
1177
|
_: 1
|
|
1178
1178
|
}, 8, ["appearance"]),
|
|
1179
|
-
|
|
1179
|
+
M(l, {
|
|
1180
1180
|
id: "json-endpoint-codeblock",
|
|
1181
1181
|
code: t.fetcherUrl,
|
|
1182
1182
|
"is-single-line": "",
|
|
@@ -1187,7 +1187,7 @@ const W = {
|
|
|
1187
1187
|
t.jsonRecord ? (p(), R(l, {
|
|
1188
1188
|
key: 1,
|
|
1189
1189
|
id: "json-codeblock",
|
|
1190
|
-
class:
|
|
1190
|
+
class: pe({ "json-content": t.fetcherUrl }),
|
|
1191
1191
|
code: JSON.stringify(n.value, null, 2),
|
|
1192
1192
|
language: "json",
|
|
1193
1193
|
theme: "dark"
|
|
@@ -1200,41 +1200,41 @@ const W = {
|
|
|
1200
1200
|
function Ht(e) {
|
|
1201
1201
|
return typeof e > "u" || e === null;
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function ii(e) {
|
|
1204
1204
|
return typeof e == "object" && e !== null;
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function oi(e) {
|
|
1207
1207
|
return Array.isArray(e) ? e : Ht(e) ? [] : [e];
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1210
|
-
var n,
|
|
1209
|
+
function ai(e, t) {
|
|
1210
|
+
var n, r, i, o;
|
|
1211
1211
|
if (t)
|
|
1212
|
-
for (o = Object.keys(t), n = 0,
|
|
1213
|
-
|
|
1212
|
+
for (o = Object.keys(t), n = 0, r = o.length; n < r; n += 1)
|
|
1213
|
+
i = o[n], e[i] = t[i];
|
|
1214
1214
|
return e;
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
var n = "",
|
|
1218
|
-
for (
|
|
1216
|
+
function li(e, t) {
|
|
1217
|
+
var n = "", r;
|
|
1218
|
+
for (r = 0; r < t; r += 1)
|
|
1219
1219
|
n += e;
|
|
1220
1220
|
return n;
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function si(e) {
|
|
1223
1223
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1224
1224
|
}
|
|
1225
|
-
var
|
|
1226
|
-
isNothing:
|
|
1227
|
-
isObject:
|
|
1228
|
-
toArray:
|
|
1229
|
-
repeat:
|
|
1230
|
-
isNegativeZero:
|
|
1231
|
-
extend:
|
|
1225
|
+
var ci = Ht, ui = ii, di = oi, fi = li, pi = si, hi = ai, Z = {
|
|
1226
|
+
isNothing: ci,
|
|
1227
|
+
isObject: ui,
|
|
1228
|
+
toArray: di,
|
|
1229
|
+
repeat: fi,
|
|
1230
|
+
isNegativeZero: pi,
|
|
1231
|
+
extend: hi
|
|
1232
1232
|
};
|
|
1233
1233
|
function Vt(e, t) {
|
|
1234
|
-
var n = "",
|
|
1234
|
+
var n = "", r = e.reason || "(unknown reason)";
|
|
1235
1235
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1236
1236
|
|
|
1237
|
-
` + e.mark.snippet),
|
|
1237
|
+
` + e.mark.snippet), r + " " + n) : r;
|
|
1238
1238
|
}
|
|
1239
1239
|
function Se(e, t) {
|
|
1240
1240
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Vt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
@@ -1245,48 +1245,48 @@ Se.prototype.toString = function(t) {
|
|
|
1245
1245
|
return this.name + ": " + Vt(this, t);
|
|
1246
1246
|
};
|
|
1247
1247
|
var ee = Se;
|
|
1248
|
-
function
|
|
1249
|
-
var o = "", a = "", l = Math.floor(
|
|
1250
|
-
return
|
|
1248
|
+
function Ue(e, t, n, r, i) {
|
|
1249
|
+
var o = "", a = "", l = Math.floor(i / 2) - 1;
|
|
1250
|
+
return r - t > l && (o = " ... ", t = r - l + o.length), n - r > l && (a = " ...", n = r + l - a.length), {
|
|
1251
1251
|
str: o + e.slice(t, n).replace(/\t/g, "→") + a,
|
|
1252
|
-
pos:
|
|
1252
|
+
pos: r - t + o.length
|
|
1253
1253
|
// relative position
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function qe(e, t) {
|
|
1257
1257
|
return Z.repeat(" ", t - e.length) + e;
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function mi(e, t) {
|
|
1260
1260
|
if (t = Object.create(t || null), !e.buffer)
|
|
1261
1261
|
return null;
|
|
1262
1262
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1263
|
-
for (var n = /\r?\n|\r|\0/g,
|
|
1264
|
-
|
|
1265
|
-
a < 0 && (a =
|
|
1266
|
-
var l = "", s, c, d = Math.min(e.line + t.linesAfter,
|
|
1263
|
+
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1264
|
+
i.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = r.length - 2);
|
|
1265
|
+
a < 0 && (a = r.length - 1);
|
|
1266
|
+
var l = "", s, c, d = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1267
1267
|
for (s = 1; s <= t.linesBefore && !(a - s < 0); s++)
|
|
1268
|
-
c =
|
|
1268
|
+
c = Ue(
|
|
1269
1269
|
e.buffer,
|
|
1270
|
-
i[a - s],
|
|
1271
1270
|
r[a - s],
|
|
1272
|
-
|
|
1271
|
+
i[a - s],
|
|
1272
|
+
e.position - (r[a] - r[a - s]),
|
|
1273
1273
|
u
|
|
1274
|
-
), l = Z.repeat(" ", t.indent) +
|
|
1274
|
+
), l = Z.repeat(" ", t.indent) + qe((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1275
1275
|
` + l;
|
|
1276
|
-
for (c =
|
|
1276
|
+
for (c = Ue(e.buffer, r[a], i[a], e.position, u), l += Z.repeat(" ", t.indent) + qe((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1277
1277
|
`, l += Z.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1278
|
-
`, s = 1; s <= t.linesAfter && !(a + s >=
|
|
1279
|
-
c =
|
|
1278
|
+
`, s = 1; s <= t.linesAfter && !(a + s >= i.length); s++)
|
|
1279
|
+
c = Ue(
|
|
1280
1280
|
e.buffer,
|
|
1281
|
-
i[a + s],
|
|
1282
1281
|
r[a + s],
|
|
1283
|
-
|
|
1282
|
+
i[a + s],
|
|
1283
|
+
e.position - (r[a] - r[a + s]),
|
|
1284
1284
|
u
|
|
1285
|
-
), l += Z.repeat(" ", t.indent) +
|
|
1285
|
+
), l += Z.repeat(" ", t.indent) + qe((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1286
1286
|
`;
|
|
1287
1287
|
return l.replace(/\n$/, "");
|
|
1288
1288
|
}
|
|
1289
|
-
var
|
|
1289
|
+
var gi = mi, yi = [
|
|
1290
1290
|
"kind",
|
|
1291
1291
|
"multi",
|
|
1292
1292
|
"resolve",
|
|
@@ -1297,41 +1297,41 @@ var gr = mr, yr = [
|
|
|
1297
1297
|
"representName",
|
|
1298
1298
|
"defaultStyle",
|
|
1299
1299
|
"styleAliases"
|
|
1300
|
-
],
|
|
1300
|
+
], vi = [
|
|
1301
1301
|
"scalar",
|
|
1302
1302
|
"sequence",
|
|
1303
1303
|
"mapping"
|
|
1304
1304
|
];
|
|
1305
|
-
function
|
|
1305
|
+
function bi(e) {
|
|
1306
1306
|
var t = {};
|
|
1307
1307
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1308
|
-
e[n].forEach(function(
|
|
1309
|
-
t[String(
|
|
1308
|
+
e[n].forEach(function(r) {
|
|
1309
|
+
t[String(r)] = n;
|
|
1310
1310
|
});
|
|
1311
1311
|
}), t;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function xi(e, t) {
|
|
1314
1314
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1315
|
-
if (
|
|
1315
|
+
if (yi.indexOf(n) === -1)
|
|
1316
1316
|
throw new ee('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1317
1317
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1318
1318
|
return !0;
|
|
1319
1319
|
}, this.construct = t.construct || function(n) {
|
|
1320
1320
|
return n;
|
|
1321
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1321
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = bi(t.styleAliases || null), vi.indexOf(this.kind) === -1)
|
|
1322
1322
|
throw new ee('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1323
1323
|
}
|
|
1324
|
-
var Q =
|
|
1324
|
+
var Q = xi;
|
|
1325
1325
|
function gt(e, t) {
|
|
1326
1326
|
var n = [];
|
|
1327
|
-
return e[t].forEach(function(
|
|
1328
|
-
var
|
|
1327
|
+
return e[t].forEach(function(r) {
|
|
1328
|
+
var i = n.length;
|
|
1329
1329
|
n.forEach(function(o, a) {
|
|
1330
|
-
o.tag ===
|
|
1331
|
-
}), n[
|
|
1330
|
+
o.tag === r.tag && o.kind === r.kind && o.multi === r.multi && (i = a);
|
|
1331
|
+
}), n[i] = r;
|
|
1332
1332
|
}), n;
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function Ci() {
|
|
1335
1335
|
var e = {
|
|
1336
1336
|
scalar: {},
|
|
1337
1337
|
sequence: {},
|
|
@@ -1344,24 +1344,24 @@ function Cr() {
|
|
|
1344
1344
|
fallback: []
|
|
1345
1345
|
}
|
|
1346
1346
|
}, t, n;
|
|
1347
|
-
function i
|
|
1348
|
-
|
|
1347
|
+
function r(i) {
|
|
1348
|
+
i.multi ? (e.multi[i.kind].push(i), e.multi.fallback.push(i)) : e[i.kind][i.tag] = e.fallback[i.tag] = i;
|
|
1349
1349
|
}
|
|
1350
1350
|
for (t = 0, n = arguments.length; t < n; t += 1)
|
|
1351
|
-
arguments[t].forEach(
|
|
1351
|
+
arguments[t].forEach(r);
|
|
1352
1352
|
return e;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Ve(e) {
|
|
1355
1355
|
return this.extend(e);
|
|
1356
1356
|
}
|
|
1357
|
-
|
|
1358
|
-
var n = [],
|
|
1357
|
+
Ve.prototype.extend = function(t) {
|
|
1358
|
+
var n = [], r = [];
|
|
1359
1359
|
if (t instanceof Q)
|
|
1360
|
-
|
|
1360
|
+
r.push(t);
|
|
1361
1361
|
else if (Array.isArray(t))
|
|
1362
|
-
|
|
1362
|
+
r = r.concat(t);
|
|
1363
1363
|
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit)))
|
|
1364
|
-
t.implicit && (n = n.concat(t.implicit)), t.explicit && (
|
|
1364
|
+
t.implicit && (n = n.concat(t.implicit)), t.explicit && (r = r.concat(t.explicit));
|
|
1365
1365
|
else
|
|
1366
1366
|
throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1367
1367
|
n.forEach(function(o) {
|
|
@@ -1371,14 +1371,14 @@ Ye.prototype.extend = function(t) {
|
|
|
1371
1371
|
throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1372
1372
|
if (o.multi)
|
|
1373
1373
|
throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1374
|
-
}),
|
|
1374
|
+
}), r.forEach(function(o) {
|
|
1375
1375
|
if (!(o instanceof Q))
|
|
1376
1376
|
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1377
1377
|
});
|
|
1378
|
-
var
|
|
1379
|
-
return
|
|
1378
|
+
var i = Object.create(Ve.prototype);
|
|
1379
|
+
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = gt(i, "implicit"), i.compiledExplicit = gt(i, "explicit"), i.compiledTypeMap = Ci(i.compiledImplicit, i.compiledExplicit), i;
|
|
1380
1380
|
};
|
|
1381
|
-
var Yt =
|
|
1381
|
+
var Yt = Ve, zt = new Q("tag:yaml.org,2002:str", {
|
|
1382
1382
|
kind: "scalar",
|
|
1383
1383
|
construct: function(e) {
|
|
1384
1384
|
return e !== null ? e : "";
|
|
@@ -1400,23 +1400,23 @@ var Yt = Ye, zt = new Q("tag:yaml.org,2002:str", {
|
|
|
1400
1400
|
Jt
|
|
1401
1401
|
]
|
|
1402
1402
|
});
|
|
1403
|
-
function
|
|
1403
|
+
function _i(e) {
|
|
1404
1404
|
if (e === null)
|
|
1405
1405
|
return !0;
|
|
1406
1406
|
var t = e.length;
|
|
1407
1407
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function ki() {
|
|
1410
1410
|
return null;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Ai(e) {
|
|
1413
1413
|
return e === null;
|
|
1414
1414
|
}
|
|
1415
1415
|
var Zt = new Q("tag:yaml.org,2002:null", {
|
|
1416
1416
|
kind: "scalar",
|
|
1417
|
-
resolve:
|
|
1418
|
-
construct:
|
|
1419
|
-
predicate:
|
|
1417
|
+
resolve: _i,
|
|
1418
|
+
construct: ki,
|
|
1419
|
+
predicate: Ai,
|
|
1420
1420
|
represent: {
|
|
1421
1421
|
canonical: function() {
|
|
1422
1422
|
return "~";
|
|
@@ -1436,23 +1436,23 @@ var Zt = new Q("tag:yaml.org,2002:null", {
|
|
|
1436
1436
|
},
|
|
1437
1437
|
defaultStyle: "lowercase"
|
|
1438
1438
|
});
|
|
1439
|
-
function
|
|
1439
|
+
function wi(e) {
|
|
1440
1440
|
if (e === null)
|
|
1441
1441
|
return !1;
|
|
1442
1442
|
var t = e.length;
|
|
1443
1443
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function Si(e) {
|
|
1446
1446
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function Ii(e) {
|
|
1449
1449
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1450
1450
|
}
|
|
1451
1451
|
var Qt = new Q("tag:yaml.org,2002:bool", {
|
|
1452
1452
|
kind: "scalar",
|
|
1453
|
-
resolve:
|
|
1454
|
-
construct:
|
|
1455
|
-
predicate:
|
|
1453
|
+
resolve: wi,
|
|
1454
|
+
construct: Si,
|
|
1455
|
+
predicate: Ii,
|
|
1456
1456
|
represent: {
|
|
1457
1457
|
lowercase: function(e) {
|
|
1458
1458
|
return e ? "true" : "false";
|
|
@@ -1466,67 +1466,67 @@ var Qt = new Q("tag:yaml.org,2002:bool", {
|
|
|
1466
1466
|
},
|
|
1467
1467
|
defaultStyle: "lowercase"
|
|
1468
1468
|
});
|
|
1469
|
-
function
|
|
1469
|
+
function Ei(e) {
|
|
1470
1470
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Ti(e) {
|
|
1473
1473
|
return 48 <= e && e <= 55;
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function Fi(e) {
|
|
1476
1476
|
return 48 <= e && e <= 57;
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Oi(e) {
|
|
1479
1479
|
if (e === null)
|
|
1480
1480
|
return !1;
|
|
1481
|
-
var t = e.length, n = 0,
|
|
1481
|
+
var t = e.length, n = 0, r = !1, i;
|
|
1482
1482
|
if (!t)
|
|
1483
1483
|
return !1;
|
|
1484
|
-
if (
|
|
1484
|
+
if (i = e[n], (i === "-" || i === "+") && (i = e[++n]), i === "0") {
|
|
1485
1485
|
if (n + 1 === t)
|
|
1486
1486
|
return !0;
|
|
1487
|
-
if (
|
|
1487
|
+
if (i = e[++n], i === "b") {
|
|
1488
1488
|
for (n++; n < t; n++)
|
|
1489
|
-
if (
|
|
1490
|
-
if (
|
|
1489
|
+
if (i = e[n], i !== "_") {
|
|
1490
|
+
if (i !== "0" && i !== "1")
|
|
1491
1491
|
return !1;
|
|
1492
|
-
|
|
1492
|
+
r = !0;
|
|
1493
1493
|
}
|
|
1494
|
-
return
|
|
1494
|
+
return r && i !== "_";
|
|
1495
1495
|
}
|
|
1496
|
-
if (
|
|
1496
|
+
if (i === "x") {
|
|
1497
1497
|
for (n++; n < t; n++)
|
|
1498
|
-
if (
|
|
1499
|
-
if (!
|
|
1498
|
+
if (i = e[n], i !== "_") {
|
|
1499
|
+
if (!Ei(e.charCodeAt(n)))
|
|
1500
1500
|
return !1;
|
|
1501
|
-
|
|
1501
|
+
r = !0;
|
|
1502
1502
|
}
|
|
1503
|
-
return
|
|
1503
|
+
return r && i !== "_";
|
|
1504
1504
|
}
|
|
1505
|
-
if (
|
|
1505
|
+
if (i === "o") {
|
|
1506
1506
|
for (n++; n < t; n++)
|
|
1507
|
-
if (
|
|
1508
|
-
if (!
|
|
1507
|
+
if (i = e[n], i !== "_") {
|
|
1508
|
+
if (!Ti(e.charCodeAt(n)))
|
|
1509
1509
|
return !1;
|
|
1510
|
-
|
|
1510
|
+
r = !0;
|
|
1511
1511
|
}
|
|
1512
|
-
return
|
|
1512
|
+
return r && i !== "_";
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
if (
|
|
1515
|
+
if (i === "_")
|
|
1516
1516
|
return !1;
|
|
1517
1517
|
for (; n < t; n++)
|
|
1518
|
-
if (
|
|
1519
|
-
if (!
|
|
1518
|
+
if (i = e[n], i !== "_") {
|
|
1519
|
+
if (!Fi(e.charCodeAt(n)))
|
|
1520
1520
|
return !1;
|
|
1521
|
-
|
|
1521
|
+
r = !0;
|
|
1522
1522
|
}
|
|
1523
|
-
return !(!
|
|
1523
|
+
return !(!r || i === "_");
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
var t = e, n = 1,
|
|
1527
|
-
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")),
|
|
1525
|
+
function $i(e) {
|
|
1526
|
+
var t = e, n = 1, r;
|
|
1527
|
+
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0")
|
|
1528
1528
|
return 0;
|
|
1529
|
-
if (
|
|
1529
|
+
if (r === "0") {
|
|
1530
1530
|
if (t[1] === "b")
|
|
1531
1531
|
return n * parseInt(t.slice(2), 2);
|
|
1532
1532
|
if (t[1] === "x")
|
|
@@ -1536,14 +1536,14 @@ function Or(e) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
return n * parseInt(t, 10);
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1539
|
+
function Li(e) {
|
|
1540
1540
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Z.isNegativeZero(e);
|
|
1541
1541
|
}
|
|
1542
1542
|
var Xt = new Q("tag:yaml.org,2002:int", {
|
|
1543
1543
|
kind: "scalar",
|
|
1544
|
-
resolve:
|
|
1545
|
-
construct:
|
|
1546
|
-
predicate:
|
|
1544
|
+
resolve: Oi,
|
|
1545
|
+
construct: $i,
|
|
1546
|
+
predicate: Li,
|
|
1547
1547
|
represent: {
|
|
1548
1548
|
binary: function(e) {
|
|
1549
1549
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1566,21 +1566,21 @@ var Xt = new Q("tag:yaml.org,2002:int", {
|
|
|
1566
1566
|
decimal: [10, "dec"],
|
|
1567
1567
|
hexadecimal: [16, "hex"]
|
|
1568
1568
|
}
|
|
1569
|
-
}),
|
|
1569
|
+
}), Ni = new RegExp(
|
|
1570
1570
|
// 2.5e4, 2.5 and integers
|
|
1571
1571
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1572
1572
|
);
|
|
1573
|
-
function
|
|
1574
|
-
return !(e === null || !
|
|
1573
|
+
function Bi(e) {
|
|
1574
|
+
return !(e === null || !Ni.test(e) || // Quick hack to not allow integers end with `_`
|
|
1575
1575
|
// Probably should update regexp & check speed
|
|
1576
1576
|
e[e.length - 1] === "_");
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Mi(e) {
|
|
1579
1579
|
var t, n;
|
|
1580
1580
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1581
1581
|
}
|
|
1582
|
-
var
|
|
1583
|
-
function
|
|
1582
|
+
var Ri = /^[-+]?[0-9]+e/;
|
|
1583
|
+
function Ki(e, t) {
|
|
1584
1584
|
var n;
|
|
1585
1585
|
if (isNaN(e))
|
|
1586
1586
|
switch (t) {
|
|
@@ -1611,17 +1611,17 @@ function Kr(e, t) {
|
|
|
1611
1611
|
}
|
|
1612
1612
|
else if (Z.isNegativeZero(e))
|
|
1613
1613
|
return "-0.0";
|
|
1614
|
-
return n = e.toString(10),
|
|
1614
|
+
return n = e.toString(10), Ri.test(n) ? n.replace("e", ".e") : n;
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function Di(e) {
|
|
1617
1617
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Z.isNegativeZero(e));
|
|
1618
1618
|
}
|
|
1619
1619
|
var en = new Q("tag:yaml.org,2002:float", {
|
|
1620
1620
|
kind: "scalar",
|
|
1621
|
-
resolve:
|
|
1622
|
-
construct:
|
|
1623
|
-
predicate:
|
|
1624
|
-
represent:
|
|
1621
|
+
resolve: Bi,
|
|
1622
|
+
construct: Mi,
|
|
1623
|
+
predicate: Di,
|
|
1624
|
+
represent: Ki,
|
|
1625
1625
|
defaultStyle: "lowercase"
|
|
1626
1626
|
}), tn = Gt.extend({
|
|
1627
1627
|
implicit: [
|
|
@@ -1635,83 +1635,83 @@ var en = new Q("tag:yaml.org,2002:float", {
|
|
|
1635
1635
|
), on = new RegExp(
|
|
1636
1636
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1637
1637
|
);
|
|
1638
|
-
function
|
|
1638
|
+
function ji(e) {
|
|
1639
1639
|
return e === null ? !1 : rn.exec(e) !== null || on.exec(e) !== null;
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1642
|
-
var t, n,
|
|
1641
|
+
function Ui(e) {
|
|
1642
|
+
var t, n, r, i, o, a, l, s = 0, c = null, d, u, h;
|
|
1643
1643
|
if (t = rn.exec(e), t === null && (t = on.exec(e)), t === null)
|
|
1644
1644
|
throw new Error("Date resolve error");
|
|
1645
|
-
if (n = +t[1],
|
|
1646
|
-
return new Date(Date.UTC(n,
|
|
1645
|
+
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
1646
|
+
return new Date(Date.UTC(n, r, i));
|
|
1647
1647
|
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
1648
1648
|
for (s = t[7].slice(0, 3); s.length < 3; )
|
|
1649
1649
|
s += "0";
|
|
1650
1650
|
s = +s;
|
|
1651
1651
|
}
|
|
1652
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), h = new Date(Date.UTC(n,
|
|
1652
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), h = new Date(Date.UTC(n, r, i, o, a, l, s)), c && h.setTime(h.getTime() - c), h;
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function qi(e) {
|
|
1655
1655
|
return e.toISOString();
|
|
1656
1656
|
}
|
|
1657
1657
|
var an = new Q("tag:yaml.org,2002:timestamp", {
|
|
1658
1658
|
kind: "scalar",
|
|
1659
|
-
resolve:
|
|
1660
|
-
construct:
|
|
1659
|
+
resolve: ji,
|
|
1660
|
+
construct: Ui,
|
|
1661
1661
|
instanceOf: Date,
|
|
1662
|
-
represent:
|
|
1662
|
+
represent: qi
|
|
1663
1663
|
});
|
|
1664
|
-
function
|
|
1664
|
+
function Pi(e) {
|
|
1665
1665
|
return e === "<<" || e === null;
|
|
1666
1666
|
}
|
|
1667
1667
|
var ln = new Q("tag:yaml.org,2002:merge", {
|
|
1668
1668
|
kind: "scalar",
|
|
1669
|
-
resolve:
|
|
1670
|
-
}),
|
|
1669
|
+
resolve: Pi
|
|
1670
|
+
}), Xe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1671
1671
|
\r`;
|
|
1672
|
-
function
|
|
1672
|
+
function Hi(e) {
|
|
1673
1673
|
if (e === null)
|
|
1674
1674
|
return !1;
|
|
1675
|
-
var t, n,
|
|
1676
|
-
for (n = 0; n <
|
|
1675
|
+
var t, n, r = 0, i = e.length, o = Xe;
|
|
1676
|
+
for (n = 0; n < i; n++)
|
|
1677
1677
|
if (t = o.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1678
1678
|
if (t < 0)
|
|
1679
1679
|
return !1;
|
|
1680
|
-
|
|
1680
|
+
r += 6;
|
|
1681
1681
|
}
|
|
1682
|
-
return
|
|
1682
|
+
return r % 8 === 0;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1685
|
-
var t, n,
|
|
1686
|
-
for (t = 0; t <
|
|
1687
|
-
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(
|
|
1688
|
-
return n =
|
|
1684
|
+
function Vi(e) {
|
|
1685
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, o = Xe, a = 0, l = [];
|
|
1686
|
+
for (t = 0; t < i; t++)
|
|
1687
|
+
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(r.charAt(t));
|
|
1688
|
+
return n = i % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1689
1689
|
}
|
|
1690
|
-
function
|
|
1691
|
-
var t = "", n = 0,
|
|
1692
|
-
for (
|
|
1693
|
-
|
|
1694
|
-
return
|
|
1690
|
+
function Yi(e) {
|
|
1691
|
+
var t = "", n = 0, r, i, o = e.length, a = Xe;
|
|
1692
|
+
for (r = 0; r < o; r++)
|
|
1693
|
+
r % 3 === 0 && r && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[r];
|
|
1694
|
+
return i = o % 3, i === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : i === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : i === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function zi(e) {
|
|
1697
1697
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1698
1698
|
}
|
|
1699
1699
|
var sn = new Q("tag:yaml.org,2002:binary", {
|
|
1700
1700
|
kind: "scalar",
|
|
1701
|
-
resolve:
|
|
1702
|
-
construct:
|
|
1703
|
-
predicate:
|
|
1704
|
-
represent:
|
|
1705
|
-
}),
|
|
1706
|
-
function
|
|
1701
|
+
resolve: Hi,
|
|
1702
|
+
construct: Vi,
|
|
1703
|
+
predicate: zi,
|
|
1704
|
+
represent: Yi
|
|
1705
|
+
}), Wi = Object.prototype.hasOwnProperty, Ji = Object.prototype.toString;
|
|
1706
|
+
function Gi(e) {
|
|
1707
1707
|
if (e === null)
|
|
1708
1708
|
return !0;
|
|
1709
|
-
var t = [], n,
|
|
1710
|
-
for (n = 0,
|
|
1711
|
-
if (
|
|
1709
|
+
var t = [], n, r, i, o, a, l = e;
|
|
1710
|
+
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1711
|
+
if (i = l[n], a = !1, Ji.call(i) !== "[object Object]")
|
|
1712
1712
|
return !1;
|
|
1713
|
-
for (o in
|
|
1714
|
-
if (
|
|
1713
|
+
for (o in i)
|
|
1714
|
+
if (Wi.call(i, o))
|
|
1715
1715
|
if (!a)
|
|
1716
1716
|
a = !0;
|
|
1717
1717
|
else
|
|
@@ -1725,36 +1725,36 @@ function Gr(e) {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
return !0;
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Zi(e) {
|
|
1729
1729
|
return e !== null ? e : [];
|
|
1730
1730
|
}
|
|
1731
1731
|
var cn = new Q("tag:yaml.org,2002:omap", {
|
|
1732
1732
|
kind: "sequence",
|
|
1733
|
-
resolve:
|
|
1734
|
-
construct:
|
|
1735
|
-
}),
|
|
1736
|
-
function
|
|
1733
|
+
resolve: Gi,
|
|
1734
|
+
construct: Zi
|
|
1735
|
+
}), Qi = Object.prototype.toString;
|
|
1736
|
+
function Xi(e) {
|
|
1737
1737
|
if (e === null)
|
|
1738
1738
|
return !0;
|
|
1739
|
-
var t, n,
|
|
1739
|
+
var t, n, r, i, o, a = e;
|
|
1740
1740
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1741
|
-
if (
|
|
1741
|
+
if (r = a[t], Qi.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1))
|
|
1742
1742
|
return !1;
|
|
1743
|
-
o[t] = [
|
|
1743
|
+
o[t] = [i[0], r[i[0]]];
|
|
1744
1744
|
}
|
|
1745
1745
|
return !0;
|
|
1746
1746
|
}
|
|
1747
1747
|
function eo(e) {
|
|
1748
1748
|
if (e === null)
|
|
1749
1749
|
return [];
|
|
1750
|
-
var t, n,
|
|
1750
|
+
var t, n, r, i, o, a = e;
|
|
1751
1751
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1752
|
-
|
|
1752
|
+
r = a[t], i = Object.keys(r), o[t] = [i[0], r[i[0]]];
|
|
1753
1753
|
return o;
|
|
1754
1754
|
}
|
|
1755
1755
|
var un = new Q("tag:yaml.org,2002:pairs", {
|
|
1756
1756
|
kind: "sequence",
|
|
1757
|
-
resolve:
|
|
1757
|
+
resolve: Xi,
|
|
1758
1758
|
construct: eo
|
|
1759
1759
|
}), to = Object.prototype.hasOwnProperty;
|
|
1760
1760
|
function no(e) {
|
|
@@ -1766,14 +1766,14 @@ function no(e) {
|
|
|
1766
1766
|
return !1;
|
|
1767
1767
|
return !0;
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function ro(e) {
|
|
1770
1770
|
return e !== null ? e : {};
|
|
1771
1771
|
}
|
|
1772
1772
|
var dn = new Q("tag:yaml.org,2002:set", {
|
|
1773
1773
|
kind: "mapping",
|
|
1774
1774
|
resolve: no,
|
|
1775
|
-
construct:
|
|
1776
|
-
}),
|
|
1775
|
+
construct: ro
|
|
1776
|
+
}), et = nn.extend({
|
|
1777
1777
|
implicit: [
|
|
1778
1778
|
an,
|
|
1779
1779
|
ln
|
|
@@ -1784,20 +1784,20 @@ var dn = new Q("tag:yaml.org,2002:set", {
|
|
|
1784
1784
|
un,
|
|
1785
1785
|
dn
|
|
1786
1786
|
]
|
|
1787
|
-
}), ue = Object.prototype.hasOwnProperty,
|
|
1787
|
+
}), ue = Object.prototype.hasOwnProperty, Oe = 1, fn = 2, pn = 3, $e = 4, Pe = 1, io = 2, yt = 3, oo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ao = /[\x85\u2028\u2029]/, lo = /[,\[\]\{\}]/, hn = /^(?:!|!!|![a-z\-]+!)$/i, mn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1788
1788
|
function vt(e) {
|
|
1789
1789
|
return Object.prototype.toString.call(e);
|
|
1790
1790
|
}
|
|
1791
1791
|
function oe(e) {
|
|
1792
1792
|
return e === 10 || e === 13;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function fe(e) {
|
|
1795
1795
|
return e === 9 || e === 32;
|
|
1796
1796
|
}
|
|
1797
1797
|
function te(e) {
|
|
1798
1798
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function ye(e) {
|
|
1801
1801
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1802
1802
|
}
|
|
1803
1803
|
function so(e) {
|
|
@@ -1821,10 +1821,10 @@ function fo(e) {
|
|
|
1821
1821
|
);
|
|
1822
1822
|
}
|
|
1823
1823
|
var gn = new Array(256), yn = new Array(256);
|
|
1824
|
-
for (var
|
|
1825
|
-
gn[
|
|
1824
|
+
for (var he = 0; he < 256; he++)
|
|
1825
|
+
gn[he] = bt(he) ? 1 : 0, yn[he] = bt(he);
|
|
1826
1826
|
function po(e, t) {
|
|
1827
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1827
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || et, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1828
1828
|
}
|
|
1829
1829
|
function vn(e, t) {
|
|
1830
1830
|
var n = {
|
|
@@ -1835,107 +1835,107 @@ function vn(e, t) {
|
|
|
1835
1835
|
line: e.line,
|
|
1836
1836
|
column: e.position - e.lineStart
|
|
1837
1837
|
};
|
|
1838
|
-
return n.snippet =
|
|
1838
|
+
return n.snippet = gi(n), new ee(t, n);
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function _(e, t) {
|
|
1841
1841
|
throw vn(e, t);
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function Le(e, t) {
|
|
1844
1844
|
e.onWarning && e.onWarning.call(null, vn(e, t));
|
|
1845
1845
|
}
|
|
1846
1846
|
var xt = {
|
|
1847
|
-
YAML: function(t, n,
|
|
1848
|
-
var
|
|
1849
|
-
t.version !== null &&
|
|
1847
|
+
YAML: function(t, n, r) {
|
|
1848
|
+
var i, o, a;
|
|
1849
|
+
t.version !== null && _(t, "duplication of %YAML directive"), r.length !== 1 && _(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && _(t, "ill-formed argument of the YAML directive"), o = parseInt(i[1], 10), a = parseInt(i[2], 10), o !== 1 && _(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Le(t, "unsupported YAML version of the document");
|
|
1850
1850
|
},
|
|
1851
|
-
TAG: function(t, n,
|
|
1852
|
-
var
|
|
1853
|
-
|
|
1851
|
+
TAG: function(t, n, r) {
|
|
1852
|
+
var i, o;
|
|
1853
|
+
r.length !== 2 && _(t, "TAG directive accepts exactly two arguments"), i = r[0], o = r[1], hn.test(i) || _(t, "ill-formed tag handle (first argument) of the TAG directive"), ue.call(t.tagMap, i) && _(t, 'there is a previously declared suffix for "' + i + '" tag handle'), mn.test(o) || _(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1854
1854
|
try {
|
|
1855
1855
|
o = decodeURIComponent(o);
|
|
1856
1856
|
} catch {
|
|
1857
|
-
|
|
1857
|
+
_(t, "tag prefix is malformed: " + o);
|
|
1858
1858
|
}
|
|
1859
|
-
t.tagMap[
|
|
1859
|
+
t.tagMap[i] = o;
|
|
1860
1860
|
}
|
|
1861
1861
|
};
|
|
1862
|
-
function
|
|
1863
|
-
var
|
|
1862
|
+
function se(e, t, n, r) {
|
|
1863
|
+
var i, o, a, l;
|
|
1864
1864
|
if (t < n) {
|
|
1865
|
-
if (l = e.input.slice(t, n),
|
|
1866
|
-
for (
|
|
1867
|
-
a = l.charCodeAt(
|
|
1865
|
+
if (l = e.input.slice(t, n), r)
|
|
1866
|
+
for (i = 0, o = l.length; i < o; i += 1)
|
|
1867
|
+
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || _(e, "expected valid JSON character");
|
|
1868
1868
|
else
|
|
1869
|
-
oo.test(l) &&
|
|
1869
|
+
oo.test(l) && _(e, "the stream contains non-printable characters");
|
|
1870
1870
|
e.result += l;
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
function Ct(e, t, n,
|
|
1874
|
-
var
|
|
1875
|
-
for (Z.isObject(n) ||
|
|
1876
|
-
o =
|
|
1873
|
+
function Ct(e, t, n, r) {
|
|
1874
|
+
var i, o, a, l;
|
|
1875
|
+
for (Z.isObject(n) || _(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), a = 0, l = i.length; a < l; a += 1)
|
|
1876
|
+
o = i[a], ue.call(t, o) || (t[o] = n[o], r[o] = !0);
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function ve(e, t, n, r, i, o, a, l, s) {
|
|
1879
1879
|
var c, d;
|
|
1880
|
-
if (Array.isArray(
|
|
1881
|
-
for (
|
|
1882
|
-
Array.isArray(
|
|
1883
|
-
if (typeof
|
|
1880
|
+
if (Array.isArray(i))
|
|
1881
|
+
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1882
|
+
Array.isArray(i[c]) && _(e, "nested arrays are not supported inside keys"), typeof i == "object" && vt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1883
|
+
if (typeof i == "object" && vt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1884
1884
|
if (Array.isArray(o))
|
|
1885
1885
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1886
1886
|
Ct(e, t, o[c], n);
|
|
1887
1887
|
else
|
|
1888
1888
|
Ct(e, t, o, n);
|
|
1889
1889
|
else
|
|
1890
|
-
!e.json && !ue.call(n,
|
|
1890
|
+
!e.json && !ue.call(n, i) && ue.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, _(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1891
1891
|
configurable: !0,
|
|
1892
1892
|
enumerable: !0,
|
|
1893
1893
|
writable: !0,
|
|
1894
1894
|
value: o
|
|
1895
|
-
}) : t[
|
|
1895
|
+
}) : t[i] = o, delete n[i];
|
|
1896
1896
|
return t;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function tt(e) {
|
|
1899
1899
|
var t;
|
|
1900
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1900
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : _(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1901
1901
|
}
|
|
1902
1902
|
function J(e, t, n) {
|
|
1903
|
-
for (var
|
|
1904
|
-
for (;
|
|
1905
|
-
|
|
1906
|
-
if (t &&
|
|
1903
|
+
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1904
|
+
for (; fe(i); )
|
|
1905
|
+
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1906
|
+
if (t && i === 35)
|
|
1907
1907
|
do
|
|
1908
|
-
|
|
1909
|
-
while (
|
|
1910
|
-
if (oe(
|
|
1911
|
-
for (
|
|
1912
|
-
e.lineIndent++,
|
|
1908
|
+
i = e.input.charCodeAt(++e.position);
|
|
1909
|
+
while (i !== 10 && i !== 13 && i !== 0);
|
|
1910
|
+
if (oe(i))
|
|
1911
|
+
for (tt(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1912
|
+
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1913
1913
|
else
|
|
1914
1914
|
break;
|
|
1915
1915
|
}
|
|
1916
|
-
return n !== -1 &&
|
|
1916
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && Le(e, "deficient indentation"), r;
|
|
1917
1917
|
}
|
|
1918
1918
|
function De(e) {
|
|
1919
1919
|
var t = e.position, n;
|
|
1920
1920
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || te(n)));
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1922
|
+
function nt(e, t) {
|
|
1923
1923
|
t === 1 ? e.result += " " : t > 1 && (e.result += Z.repeat(`
|
|
1924
1924
|
`, t - 1));
|
|
1925
1925
|
}
|
|
1926
1926
|
function ho(e, t, n) {
|
|
1927
|
-
var
|
|
1928
|
-
if (f = e.input.charCodeAt(e.position), te(f) ||
|
|
1927
|
+
var r, i, o, a, l, s, c, d, u = e.kind, h = e.result, f;
|
|
1928
|
+
if (f = e.input.charCodeAt(e.position), te(f) || ye(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), te(i) || n && ye(i)))
|
|
1929
1929
|
return !1;
|
|
1930
1930
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
1931
1931
|
if (f === 58) {
|
|
1932
|
-
if (
|
|
1932
|
+
if (i = e.input.charCodeAt(e.position + 1), te(i) || n && ye(i))
|
|
1933
1933
|
break;
|
|
1934
1934
|
} else if (f === 35) {
|
|
1935
|
-
if (
|
|
1935
|
+
if (r = e.input.charCodeAt(e.position - 1), te(r))
|
|
1936
1936
|
break;
|
|
1937
1937
|
} else {
|
|
1938
|
-
if (e.position === e.lineStart && De(e) || n &&
|
|
1938
|
+
if (e.position === e.lineStart && De(e) || n && ye(f))
|
|
1939
1939
|
break;
|
|
1940
1940
|
if (oe(f))
|
|
1941
1941
|
if (s = e.line, c = e.lineStart, d = e.lineIndent, J(e, !1, -1), e.lineIndent >= t) {
|
|
@@ -1946,204 +1946,204 @@ function ho(e, t, n) {
|
|
|
1946
1946
|
break;
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
|
-
l && (
|
|
1949
|
+
l && (se(e, o, a, !1), nt(e, e.line - s), o = a = e.position, l = !1), fe(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1950
1950
|
}
|
|
1951
|
-
return
|
|
1951
|
+
return se(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = h, !1);
|
|
1952
1952
|
}
|
|
1953
1953
|
function mo(e, t) {
|
|
1954
|
-
var n,
|
|
1954
|
+
var n, r, i;
|
|
1955
1955
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1956
1956
|
return !1;
|
|
1957
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
1957
|
+
for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1958
1958
|
if (n === 39)
|
|
1959
|
-
if (
|
|
1960
|
-
|
|
1959
|
+
if (se(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1960
|
+
r = e.position, e.position++, i = e.position;
|
|
1961
1961
|
else
|
|
1962
1962
|
return !0;
|
|
1963
1963
|
else
|
|
1964
|
-
oe(n) ? (
|
|
1965
|
-
|
|
1964
|
+
oe(n) ? (se(e, r, i, !0), nt(e, J(e, !1, t)), r = i = e.position) : e.position === e.lineStart && De(e) ? _(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1965
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
1966
1966
|
}
|
|
1967
1967
|
function go(e, t) {
|
|
1968
|
-
var n,
|
|
1968
|
+
var n, r, i, o, a, l;
|
|
1969
1969
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1970
1970
|
return !1;
|
|
1971
|
-
for (e.kind = "scalar", e.result = "", e.position++, n =
|
|
1971
|
+
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1972
1972
|
if (l === 34)
|
|
1973
|
-
return
|
|
1973
|
+
return se(e, n, e.position, !0), e.position++, !0;
|
|
1974
1974
|
if (l === 92) {
|
|
1975
|
-
if (
|
|
1975
|
+
if (se(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), oe(l))
|
|
1976
1976
|
J(e, !1, t);
|
|
1977
1977
|
else if (l < 256 && gn[l])
|
|
1978
1978
|
e.result += yn[l], e.position++;
|
|
1979
1979
|
else if ((a = co(l)) > 0) {
|
|
1980
|
-
for (
|
|
1981
|
-
l = e.input.charCodeAt(++e.position), (a = so(l)) >= 0 ? o = (o << 4) + a :
|
|
1980
|
+
for (i = a, o = 0; i > 0; i--)
|
|
1981
|
+
l = e.input.charCodeAt(++e.position), (a = so(l)) >= 0 ? o = (o << 4) + a : _(e, "expected hexadecimal character");
|
|
1982
1982
|
e.result += fo(o), e.position++;
|
|
1983
1983
|
} else
|
|
1984
|
-
|
|
1985
|
-
n =
|
|
1984
|
+
_(e, "unknown escape sequence");
|
|
1985
|
+
n = r = e.position;
|
|
1986
1986
|
} else
|
|
1987
|
-
oe(l) ? (
|
|
1987
|
+
oe(l) ? (se(e, n, r, !0), nt(e, J(e, !1, t)), n = r = e.position) : e.position === e.lineStart && De(e) ? _(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1988
1988
|
}
|
|
1989
|
-
|
|
1989
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
1990
1990
|
}
|
|
1991
1991
|
function yo(e, t) {
|
|
1992
|
-
var n = !0,
|
|
1993
|
-
if (
|
|
1992
|
+
var n = !0, r, i, o, a = e.tag, l, s = e.anchor, c, d, u, h, f, x = /* @__PURE__ */ Object.create(null), m, k, B, v;
|
|
1993
|
+
if (v = e.input.charCodeAt(e.position), v === 91)
|
|
1994
1994
|
d = 93, f = !1, l = [];
|
|
1995
|
-
else if (
|
|
1995
|
+
else if (v === 123)
|
|
1996
1996
|
d = 125, f = !0, l = {};
|
|
1997
1997
|
else
|
|
1998
1998
|
return !1;
|
|
1999
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
2000
|
-
if (J(e, !0, t),
|
|
1999
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), v = e.input.charCodeAt(++e.position); v !== 0; ) {
|
|
2000
|
+
if (J(e, !0, t), v = e.input.charCodeAt(e.position), v === d)
|
|
2001
2001
|
return e.position++, e.tag = a, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
2002
|
-
n ?
|
|
2002
|
+
n ? v === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries"), k = m = B = null, u = h = !1, v === 63 && (c = e.input.charCodeAt(e.position + 1), te(c) && (u = h = !0, e.position++, J(e, !0, t))), r = e.line, i = e.lineStart, o = e.position, xe(e, t, Oe, !1, !0), k = e.tag, m = e.result, J(e, !0, t), v = e.input.charCodeAt(e.position), (h || e.line === r) && v === 58 && (u = !0, v = e.input.charCodeAt(++e.position), J(e, !0, t), xe(e, t, Oe, !1, !0), B = e.result), f ? ve(e, l, x, k, m, B, r, i, o) : u ? l.push(ve(e, null, x, k, m, B, r, i, o)) : l.push(m), J(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
|
|
2003
2003
|
}
|
|
2004
|
-
|
|
2004
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
2005
2005
|
}
|
|
2006
2006
|
function vo(e, t) {
|
|
2007
|
-
var n,
|
|
2007
|
+
var n, r, i = Pe, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
2008
2008
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
2009
|
-
|
|
2009
|
+
r = !1;
|
|
2010
2010
|
else if (u === 62)
|
|
2011
|
-
|
|
2011
|
+
r = !0;
|
|
2012
2012
|
else
|
|
2013
2013
|
return !1;
|
|
2014
2014
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2015
2015
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2016
|
-
|
|
2016
|
+
Pe === i ? i = u === 43 ? yt : io : _(e, "repeat of a chomping mode identifier");
|
|
2017
2017
|
else if ((d = uo(u)) >= 0)
|
|
2018
|
-
d === 0 ?
|
|
2018
|
+
d === 0 ? _(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? _(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
2019
2019
|
else
|
|
2020
2020
|
break;
|
|
2021
|
-
if (
|
|
2021
|
+
if (fe(u)) {
|
|
2022
2022
|
do
|
|
2023
2023
|
u = e.input.charCodeAt(++e.position);
|
|
2024
|
-
while (
|
|
2024
|
+
while (fe(u));
|
|
2025
2025
|
if (u === 35)
|
|
2026
2026
|
do
|
|
2027
2027
|
u = e.input.charCodeAt(++e.position);
|
|
2028
2028
|
while (!oe(u) && u !== 0);
|
|
2029
2029
|
}
|
|
2030
2030
|
for (; u !== 0; ) {
|
|
2031
|
-
for (
|
|
2031
|
+
for (tt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!a || e.lineIndent < l) && u === 32; )
|
|
2032
2032
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
2033
2033
|
if (!a && e.lineIndent > l && (l = e.lineIndent), oe(u)) {
|
|
2034
2034
|
s++;
|
|
2035
2035
|
continue;
|
|
2036
2036
|
}
|
|
2037
2037
|
if (e.lineIndent < l) {
|
|
2038
|
-
|
|
2039
|
-
`, o ? 1 + s : s) :
|
|
2038
|
+
i === yt ? e.result += Z.repeat(`
|
|
2039
|
+
`, o ? 1 + s : s) : i === Pe && o && (e.result += `
|
|
2040
2040
|
`);
|
|
2041
2041
|
break;
|
|
2042
2042
|
}
|
|
2043
|
-
for (
|
|
2043
|
+
for (r ? fe(u) ? (c = !0, e.result += Z.repeat(`
|
|
2044
2044
|
`, o ? 1 + s : s)) : c ? (c = !1, e.result += Z.repeat(`
|
|
2045
2045
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += Z.repeat(`
|
|
2046
2046
|
`, s) : e.result += Z.repeat(`
|
|
2047
2047
|
`, o ? 1 + s : s), o = !0, a = !0, s = 0, n = e.position; !oe(u) && u !== 0; )
|
|
2048
2048
|
u = e.input.charCodeAt(++e.position);
|
|
2049
|
-
|
|
2049
|
+
se(e, n, e.position, !1);
|
|
2050
2050
|
}
|
|
2051
2051
|
return !0;
|
|
2052
2052
|
}
|
|
2053
2053
|
function _t(e, t) {
|
|
2054
|
-
var n,
|
|
2054
|
+
var n, r = e.tag, i = e.anchor, o = [], a, l = !1, s;
|
|
2055
2055
|
if (e.firstTabInLine !== -1)
|
|
2056
2056
|
return !1;
|
|
2057
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2057
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !te(a)))); ) {
|
|
2058
2058
|
if (l = !0, e.position++, J(e, !0, -1) && e.lineIndent <= t) {
|
|
2059
2059
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
2060
2060
|
continue;
|
|
2061
2061
|
}
|
|
2062
|
-
if (n = e.line,
|
|
2063
|
-
|
|
2062
|
+
if (n = e.line, xe(e, t, pn, !1, !0), o.push(e.result), J(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
2063
|
+
_(e, "bad indentation of a sequence entry");
|
|
2064
2064
|
else if (e.lineIndent < t)
|
|
2065
2065
|
break;
|
|
2066
2066
|
}
|
|
2067
|
-
return l ? (e.tag =
|
|
2067
|
+
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2068
2068
|
}
|
|
2069
2069
|
function bo(e, t, n) {
|
|
2070
|
-
var
|
|
2070
|
+
var r, i, o, a, l, s, c = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), f = null, x = null, m = null, k = !1, B = !1, v;
|
|
2071
2071
|
if (e.firstTabInLine !== -1)
|
|
2072
2072
|
return !1;
|
|
2073
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
2074
|
-
if (!
|
|
2075
|
-
|
|
2073
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), v = e.input.charCodeAt(e.position); v !== 0; ) {
|
|
2074
|
+
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (v === 63 || v === 58) && te(r))
|
|
2075
|
+
v === 63 ? (k && (ve(e, u, h, f, x, null, a, l, s), f = x = m = null), B = !0, k = !0, i = !0) : k ? (k = !1, i = !0) : _(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = r;
|
|
2076
2076
|
else {
|
|
2077
|
-
if (a = e.line, l = e.lineStart, s = e.position, !
|
|
2077
|
+
if (a = e.line, l = e.lineStart, s = e.position, !xe(e, n, fn, !1, !0))
|
|
2078
2078
|
break;
|
|
2079
2079
|
if (e.line === o) {
|
|
2080
|
-
for (
|
|
2081
|
-
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2084
|
-
else if (
|
|
2085
|
-
|
|
2080
|
+
for (v = e.input.charCodeAt(e.position); fe(v); )
|
|
2081
|
+
v = e.input.charCodeAt(++e.position);
|
|
2082
|
+
if (v === 58)
|
|
2083
|
+
v = e.input.charCodeAt(++e.position), te(v) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (ve(e, u, h, f, x, null, a, l, s), f = x = m = null), B = !0, k = !1, i = !1, f = e.tag, x = e.result;
|
|
2084
|
+
else if (B)
|
|
2085
|
+
_(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2086
2086
|
else
|
|
2087
2087
|
return e.tag = c, e.anchor = d, !0;
|
|
2088
|
-
} else if (
|
|
2089
|
-
|
|
2088
|
+
} else if (B)
|
|
2089
|
+
_(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2090
2090
|
else
|
|
2091
2091
|
return e.tag = c, e.anchor = d, !0;
|
|
2092
2092
|
}
|
|
2093
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
2094
|
-
|
|
2093
|
+
if ((e.line === o || e.lineIndent > t) && (k && (a = e.line, l = e.lineStart, s = e.position), xe(e, t, $e, !0, i) && (k ? x = e.result : m = e.result), k || (ve(e, u, h, f, x, m, a, l, s), f = x = m = null), J(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && v !== 0)
|
|
2094
|
+
_(e, "bad indentation of a mapping entry");
|
|
2095
2095
|
else if (e.lineIndent < t)
|
|
2096
2096
|
break;
|
|
2097
2097
|
}
|
|
2098
|
-
return
|
|
2098
|
+
return k && ve(e, u, h, f, x, null, a, l, s), B && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), B;
|
|
2099
2099
|
}
|
|
2100
2100
|
function xo(e) {
|
|
2101
|
-
var t, n = !1,
|
|
2101
|
+
var t, n = !1, r = !1, i, o, a;
|
|
2102
2102
|
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
2103
2103
|
return !1;
|
|
2104
|
-
if (e.tag !== null &&
|
|
2104
|
+
if (e.tag !== null && _(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (r = !0, i = "!!", a = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
2105
2105
|
do
|
|
2106
2106
|
a = e.input.charCodeAt(++e.position);
|
|
2107
2107
|
while (a !== 0 && a !== 62);
|
|
2108
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
2108
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : _(e, "unexpected end of the stream within a verbatim tag");
|
|
2109
2109
|
} else {
|
|
2110
2110
|
for (; a !== 0 && !te(a); )
|
|
2111
|
-
a === 33 && (
|
|
2112
|
-
o = e.input.slice(t, e.position), lo.test(o) &&
|
|
2111
|
+
a === 33 && (r ? _(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), hn.test(i) || _(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
2112
|
+
o = e.input.slice(t, e.position), lo.test(o) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
2113
2113
|
}
|
|
2114
|
-
o && !mn.test(o) &&
|
|
2114
|
+
o && !mn.test(o) && _(e, "tag name cannot contain such characters: " + o);
|
|
2115
2115
|
try {
|
|
2116
2116
|
o = decodeURIComponent(o);
|
|
2117
2117
|
} catch {
|
|
2118
|
-
|
|
2118
|
+
_(e, "tag name is malformed: " + o);
|
|
2119
2119
|
}
|
|
2120
|
-
return n ? e.tag = o : ue.call(e.tagMap,
|
|
2120
|
+
return n ? e.tag = o : ue.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : _(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2121
2121
|
}
|
|
2122
2122
|
function Co(e) {
|
|
2123
2123
|
var t, n;
|
|
2124
2124
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
2125
2125
|
return !1;
|
|
2126
|
-
for (e.anchor !== null &&
|
|
2126
|
+
for (e.anchor !== null && _(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !te(n) && !ye(n); )
|
|
2127
2127
|
n = e.input.charCodeAt(++e.position);
|
|
2128
|
-
return e.position === t &&
|
|
2128
|
+
return e.position === t && _(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2129
2129
|
}
|
|
2130
2130
|
function _o(e) {
|
|
2131
|
-
var t, n,
|
|
2132
|
-
if (
|
|
2131
|
+
var t, n, r;
|
|
2132
|
+
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2133
2133
|
return !1;
|
|
2134
|
-
for (
|
|
2135
|
-
|
|
2136
|
-
return e.position === t &&
|
|
2134
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !te(r) && !ye(r); )
|
|
2135
|
+
r = e.input.charCodeAt(++e.position);
|
|
2136
|
+
return e.position === t && _(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ue.call(e.anchorMap, n) || _(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], J(e, !0, -1), !0;
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2139
|
-
var o, a, l, s = 1, c = !1, d = !1, u, h, f, x, m,
|
|
2140
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l =
|
|
2138
|
+
function xe(e, t, n, r, i) {
|
|
2139
|
+
var o, a, l, s = 1, c = !1, d = !1, u, h, f, x, m, k;
|
|
2140
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = $e === n || pn === n, r && J(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2141
2141
|
for (; xo(e) || Co(e); )
|
|
2142
2142
|
J(e, !0, -1) ? (c = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2143
|
-
if (l && (l = c ||
|
|
2143
|
+
if (l && (l = c || i), (s === 1 || $e === n) && (Oe === n || fn === n ? m = t : m = t + 1, k = e.position - e.lineStart, s === 1 ? l && (_t(e, k) || bo(e, k, m)) || yo(e, m) ? d = !0 : (a && vo(e, m) || mo(e, m) || go(e, m) ? d = !0 : _o(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && _(e, "alias node should not have any properties")) : ho(e, m, Oe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && _t(e, k))), e.tag === null)
|
|
2144
2144
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2145
2145
|
else if (e.tag === "?") {
|
|
2146
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2146
|
+
for (e.result !== null && e.kind !== "scalar" && _(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
2147
2147
|
if (x = e.implicitTypes[u], x.resolve(e.result)) {
|
|
2148
2148
|
e.result = x.construct(e.result), e.tag = x.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2149
2149
|
break;
|
|
@@ -2157,17 +2157,17 @@ function Ce(e, t, n, i, r) {
|
|
|
2157
2157
|
x = f[u];
|
|
2158
2158
|
break;
|
|
2159
2159
|
}
|
|
2160
|
-
x ||
|
|
2160
|
+
x || _(e, "unknown tag !<" + e.tag + ">"), e.result !== null && x.kind !== e.kind && _(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + x.kind + '", not "' + e.kind + '"'), x.resolve(e.result, e.tag) ? (e.result = x.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : _(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2161
2161
|
}
|
|
2162
2162
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2163
2163
|
}
|
|
2164
2164
|
function ko(e) {
|
|
2165
|
-
var t = e.position, n,
|
|
2165
|
+
var t = e.position, n, r, i, o = !1, a;
|
|
2166
2166
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (J(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2167
2167
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !te(a); )
|
|
2168
2168
|
a = e.input.charCodeAt(++e.position);
|
|
2169
|
-
for (
|
|
2170
|
-
for (;
|
|
2169
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && _(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2170
|
+
for (; fe(a); )
|
|
2171
2171
|
a = e.input.charCodeAt(++e.position);
|
|
2172
2172
|
if (a === 35) {
|
|
2173
2173
|
do
|
|
@@ -2179,24 +2179,24 @@ function ko(e) {
|
|
|
2179
2179
|
break;
|
|
2180
2180
|
for (n = e.position; a !== 0 && !te(a); )
|
|
2181
2181
|
a = e.input.charCodeAt(++e.position);
|
|
2182
|
-
|
|
2182
|
+
i.push(e.input.slice(n, e.position));
|
|
2183
2183
|
}
|
|
2184
|
-
a !== 0 &&
|
|
2184
|
+
a !== 0 && tt(e), ue.call(xt, r) ? xt[r](e, r, i) : Le(e, 'unknown document directive "' + r + '"');
|
|
2185
2185
|
}
|
|
2186
|
-
if (J(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, J(e, !0, -1)) : o &&
|
|
2186
|
+
if (J(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, J(e, !0, -1)) : o && _(e, "directives end mark is expected"), xe(e, e.lineIndent - 1, $e, !1, !0), J(e, !0, -1), e.checkLineBreaks && ao.test(e.input.slice(t, e.position)) && Le(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && De(e)) {
|
|
2187
2187
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, J(e, !0, -1));
|
|
2188
2188
|
return;
|
|
2189
2189
|
}
|
|
2190
2190
|
if (e.position < e.length - 1)
|
|
2191
|
-
|
|
2191
|
+
_(e, "end of the stream or a document separator is expected");
|
|
2192
2192
|
else
|
|
2193
2193
|
return;
|
|
2194
2194
|
}
|
|
2195
2195
|
function bn(e, t) {
|
|
2196
2196
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2197
2197
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2198
|
-
var n = new po(e, t),
|
|
2199
|
-
for (
|
|
2198
|
+
var n = new po(e, t), r = e.indexOf("\0");
|
|
2199
|
+
for (r !== -1 && (n.position = r, _(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2200
2200
|
n.lineIndent += 1, n.position += 1;
|
|
2201
2201
|
for (; n.position < n.length - 1; )
|
|
2202
2202
|
ko(n);
|
|
@@ -2204,11 +2204,11 @@ function bn(e, t) {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
function Ao(e, t, n) {
|
|
2206
2206
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2207
|
-
var
|
|
2207
|
+
var r = bn(e, n);
|
|
2208
2208
|
if (typeof t != "function")
|
|
2209
|
-
return
|
|
2210
|
-
for (var
|
|
2211
|
-
t(i
|
|
2209
|
+
return r;
|
|
2210
|
+
for (var i = 0, o = r.length; i < o; i += 1)
|
|
2211
|
+
t(r[i]);
|
|
2212
2212
|
}
|
|
2213
2213
|
function wo(e, t) {
|
|
2214
2214
|
var n = bn(e, t);
|
|
@@ -2221,7 +2221,7 @@ function wo(e, t) {
|
|
|
2221
2221
|
var So = Ao, Io = wo, xn = {
|
|
2222
2222
|
loadAll: So,
|
|
2223
2223
|
load: Io
|
|
2224
|
-
}, Cn = Object.prototype.toString, _n = Object.prototype.hasOwnProperty, rt = 65279, Eo = 9, Ie = 10, To = 13, Fo = 32,
|
|
2224
|
+
}, Cn = Object.prototype.toString, _n = Object.prototype.hasOwnProperty, rt = 65279, Eo = 9, Ie = 10, To = 13, Fo = 32, Oo = 33, $o = 34, Ye = 35, Lo = 37, No = 38, Bo = 39, Mo = 42, kn = 44, Ro = 45, Ne = 58, Ko = 61, Do = 62, jo = 63, Uo = 64, An = 91, wn = 93, qo = 96, Sn = 123, Po = 124, In = 125, X = {};
|
|
2225
2225
|
X[0] = "\\0";
|
|
2226
2226
|
X[7] = "\\a";
|
|
2227
2227
|
X[8] = "\\b";
|
|
@@ -2256,48 +2256,48 @@ var Ho = [
|
|
|
2256
2256
|
"OFF"
|
|
2257
2257
|
], Vo = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2258
2258
|
function Yo(e, t) {
|
|
2259
|
-
var n,
|
|
2259
|
+
var n, r, i, o, a, l, s;
|
|
2260
2260
|
if (t === null)
|
|
2261
2261
|
return {};
|
|
2262
|
-
for (n = {},
|
|
2263
|
-
a = i
|
|
2262
|
+
for (n = {}, r = Object.keys(t), i = 0, o = r.length; i < o; i += 1)
|
|
2263
|
+
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && _n.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
2264
2264
|
return n;
|
|
2265
2265
|
}
|
|
2266
2266
|
function zo(e) {
|
|
2267
|
-
var t, n,
|
|
2267
|
+
var t, n, r;
|
|
2268
2268
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2269
|
-
n = "x",
|
|
2269
|
+
n = "x", r = 2;
|
|
2270
2270
|
else if (e <= 65535)
|
|
2271
|
-
n = "u",
|
|
2271
|
+
n = "u", r = 4;
|
|
2272
2272
|
else if (e <= 4294967295)
|
|
2273
|
-
n = "U",
|
|
2273
|
+
n = "U", r = 8;
|
|
2274
2274
|
else
|
|
2275
2275
|
throw new ee("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2276
|
-
return "\\" + n + Z.repeat("0",
|
|
2276
|
+
return "\\" + n + Z.repeat("0", r - t.length) + t;
|
|
2277
2277
|
}
|
|
2278
2278
|
var Wo = 1, Ee = 2;
|
|
2279
2279
|
function Jo(e) {
|
|
2280
|
-
this.schema = e.schema ||
|
|
2280
|
+
this.schema = e.schema || et, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Z.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Yo(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Ee : Wo, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2281
2281
|
}
|
|
2282
2282
|
function kt(e, t) {
|
|
2283
|
-
for (var n = Z.repeat(" ", t),
|
|
2284
|
-
|
|
2285
|
-
`,
|
|
2283
|
+
for (var n = Z.repeat(" ", t), r = 0, i = -1, o = "", a, l = e.length; r < l; )
|
|
2284
|
+
i = e.indexOf(`
|
|
2285
|
+
`, r), i === -1 ? (a = e.slice(r), r = l) : (a = e.slice(r, i + 1), r = i + 1), a.length && a !== `
|
|
2286
2286
|
` && (o += n), o += a;
|
|
2287
2287
|
return o;
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2289
|
+
function ze(e, t) {
|
|
2290
2290
|
return `
|
|
2291
2291
|
` + Z.repeat(" ", e.indent * t);
|
|
2292
2292
|
}
|
|
2293
2293
|
function Go(e, t) {
|
|
2294
|
-
var n,
|
|
2295
|
-
for (n = 0,
|
|
2296
|
-
if (
|
|
2294
|
+
var n, r, i;
|
|
2295
|
+
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2296
|
+
if (i = e.implicitTypes[n], i.resolve(t))
|
|
2297
2297
|
return !0;
|
|
2298
2298
|
return !1;
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Be(e) {
|
|
2301
2301
|
return e === Fo || e === Eo;
|
|
2302
2302
|
}
|
|
2303
2303
|
function Te(e) {
|
|
@@ -2307,58 +2307,58 @@ function At(e) {
|
|
|
2307
2307
|
return Te(e) && e !== rt && e !== To && e !== Ie;
|
|
2308
2308
|
}
|
|
2309
2309
|
function wt(e, t, n) {
|
|
2310
|
-
var
|
|
2310
|
+
var r = At(e), i = r && !Be(e);
|
|
2311
2311
|
return (
|
|
2312
2312
|
// ns-plain-safe
|
|
2313
2313
|
(n ? (
|
|
2314
2314
|
// c = flow-in
|
|
2315
|
-
|
|
2316
|
-
) :
|
|
2315
|
+
r
|
|
2316
|
+
) : r && e !== kn && e !== An && e !== wn && e !== Sn && e !== In) && e !== Ye && !(t === Ne && !i) || At(t) && !Be(t) && e === Ye || t === Ne && i
|
|
2317
2317
|
);
|
|
2318
2318
|
}
|
|
2319
2319
|
function Zo(e) {
|
|
2320
|
-
return Te(e) && e !== rt && !
|
|
2320
|
+
return Te(e) && e !== rt && !Be(e) && e !== Ro && e !== jo && e !== Ne && e !== kn && e !== An && e !== wn && e !== Sn && e !== In && e !== Ye && e !== No && e !== Mo && e !== Oo && e !== Po && e !== Ko && e !== Do && e !== Bo && e !== $o && e !== Lo && e !== Uo && e !== qo;
|
|
2321
2321
|
}
|
|
2322
2322
|
function Qo(e) {
|
|
2323
|
-
return !
|
|
2323
|
+
return !Be(e) && e !== Ne;
|
|
2324
2324
|
}
|
|
2325
2325
|
function we(e, t) {
|
|
2326
|
-
var n = e.charCodeAt(t),
|
|
2327
|
-
return n >= 55296 && n <= 56319 && t + 1 < e.length && (
|
|
2326
|
+
var n = e.charCodeAt(t), r;
|
|
2327
|
+
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2328
2328
|
}
|
|
2329
2329
|
function En(e) {
|
|
2330
2330
|
var t = /^\n* /;
|
|
2331
2331
|
return t.test(e);
|
|
2332
2332
|
}
|
|
2333
|
-
var Tn = 1,
|
|
2334
|
-
function Xo(e, t, n,
|
|
2335
|
-
var s, c = 0, d = null, u = !1, h = !1, f =
|
|
2333
|
+
var Tn = 1, We = 2, Fn = 3, On = 4, ge = 5;
|
|
2334
|
+
function Xo(e, t, n, r, i, o, a, l) {
|
|
2335
|
+
var s, c = 0, d = null, u = !1, h = !1, f = r !== -1, x = -1, m = Zo(we(e, 0)) && Qo(we(e, e.length - 1));
|
|
2336
2336
|
if (t || a)
|
|
2337
2337
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2338
2338
|
if (c = we(e, s), !Te(c))
|
|
2339
|
-
return
|
|
2339
|
+
return ge;
|
|
2340
2340
|
m = m && wt(c, d, l), d = c;
|
|
2341
2341
|
}
|
|
2342
2342
|
else {
|
|
2343
2343
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2344
2344
|
if (c = we(e, s), c === Ie)
|
|
2345
2345
|
u = !0, f && (h = h || // Foldable line = too long, and not more-indented.
|
|
2346
|
-
s - x - 1 >
|
|
2346
|
+
s - x - 1 > r && e[x + 1] !== " ", x = s);
|
|
2347
2347
|
else if (!Te(c))
|
|
2348
|
-
return
|
|
2348
|
+
return ge;
|
|
2349
2349
|
m = m && wt(c, d, l), d = c;
|
|
2350
2350
|
}
|
|
2351
|
-
h = h || f && s - x - 1 >
|
|
2351
|
+
h = h || f && s - x - 1 > r && e[x + 1] !== " ";
|
|
2352
2352
|
}
|
|
2353
|
-
return !u && !h ? m && !a && !
|
|
2353
|
+
return !u && !h ? m && !a && !i(e) ? Tn : o === Ee ? ge : We : n > 9 && En(e) ? ge : a ? o === Ee ? ge : We : h ? On : Fn;
|
|
2354
2354
|
}
|
|
2355
|
-
function ea(e, t, n,
|
|
2355
|
+
function ea(e, t, n, r, i) {
|
|
2356
2356
|
e.dump = function() {
|
|
2357
2357
|
if (t.length === 0)
|
|
2358
2358
|
return e.quotingType === Ee ? '""' : "''";
|
|
2359
2359
|
if (!e.noCompatMode && (Ho.indexOf(t) !== -1 || Vo.test(t)))
|
|
2360
2360
|
return e.quotingType === Ee ? '"' + t + '"' : "'" + t + "'";
|
|
2361
|
-
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l =
|
|
2361
|
+
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2362
2362
|
function s(c) {
|
|
2363
2363
|
return Go(e, c);
|
|
2364
2364
|
}
|
|
@@ -2369,18 +2369,18 @@ function ea(e, t, n, i, r) {
|
|
|
2369
2369
|
a,
|
|
2370
2370
|
s,
|
|
2371
2371
|
e.quotingType,
|
|
2372
|
-
e.forceQuotes && !
|
|
2373
|
-
|
|
2372
|
+
e.forceQuotes && !r,
|
|
2373
|
+
i
|
|
2374
2374
|
)) {
|
|
2375
2375
|
case Tn:
|
|
2376
2376
|
return t;
|
|
2377
|
-
case
|
|
2377
|
+
case We:
|
|
2378
2378
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2379
2379
|
case Fn:
|
|
2380
2380
|
return "|" + St(t, e.indent) + It(kt(t, o));
|
|
2381
|
-
case
|
|
2381
|
+
case On:
|
|
2382
2382
|
return ">" + St(t, e.indent) + It(kt(ta(t, a), o));
|
|
2383
|
-
case
|
|
2383
|
+
case ge:
|
|
2384
2384
|
return '"' + na(t) + '"';
|
|
2385
2385
|
default:
|
|
2386
2386
|
throw new ee("impossible error: invalid scalar style");
|
|
@@ -2388,10 +2388,10 @@ function ea(e, t, n, i, r) {
|
|
|
2388
2388
|
}();
|
|
2389
2389
|
}
|
|
2390
2390
|
function St(e, t) {
|
|
2391
|
-
var n = En(e) ? String(t) : "",
|
|
2392
|
-
`,
|
|
2391
|
+
var n = En(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
2392
|
+
`, i = r && (e[e.length - 2] === `
|
|
2393
2393
|
` || e === `
|
|
2394
|
-
`), o =
|
|
2394
|
+
`), o = i ? "+" : r ? "" : "-";
|
|
2395
2395
|
return n + o + `
|
|
2396
2396
|
`;
|
|
2397
2397
|
}
|
|
@@ -2400,53 +2400,53 @@ function It(e) {
|
|
|
2400
2400
|
` ? e.slice(0, -1) : e;
|
|
2401
2401
|
}
|
|
2402
2402
|
function ta(e, t) {
|
|
2403
|
-
for (var n = /(\n+)([^\n]*)/g,
|
|
2403
|
+
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2404
2404
|
var c = e.indexOf(`
|
|
2405
2405
|
`);
|
|
2406
2406
|
return c = c !== -1 ? c : e.length, n.lastIndex = c, Et(e.slice(0, c), t);
|
|
2407
|
-
}(),
|
|
2407
|
+
}(), i = e[0] === `
|
|
2408
2408
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2409
2409
|
var l = a[1], s = a[2];
|
|
2410
|
-
o = s[0] === " ",
|
|
2411
|
-
` : "") + Et(s, t),
|
|
2410
|
+
o = s[0] === " ", r += l + (!i && !o && s !== "" ? `
|
|
2411
|
+
` : "") + Et(s, t), i = o;
|
|
2412
2412
|
}
|
|
2413
|
-
return
|
|
2413
|
+
return r;
|
|
2414
2414
|
}
|
|
2415
2415
|
function Et(e, t) {
|
|
2416
2416
|
if (e === "" || e[0] === " ")
|
|
2417
2417
|
return e;
|
|
2418
|
-
for (var n = / [^ ]/g,
|
|
2419
|
-
l =
|
|
2420
|
-
` + e.slice(
|
|
2418
|
+
for (var n = / [^ ]/g, r, i = 0, o, a = 0, l = 0, s = ""; r = n.exec(e); )
|
|
2419
|
+
l = r.index, l - i > t && (o = a > i ? a : l, s += `
|
|
2420
|
+
` + e.slice(i, o), i = o + 1), a = l;
|
|
2421
2421
|
return s += `
|
|
2422
|
-
`, e.length -
|
|
2423
|
-
` + e.slice(a + 1) : s += e.slice(
|
|
2422
|
+
`, e.length - i > t && a > i ? s += e.slice(i, a) + `
|
|
2423
|
+
` + e.slice(a + 1) : s += e.slice(i), s.slice(1);
|
|
2424
2424
|
}
|
|
2425
2425
|
function na(e) {
|
|
2426
|
-
for (var t = "", n = 0,
|
|
2427
|
-
n = we(e,
|
|
2426
|
+
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2427
|
+
n = we(e, i), r = X[n], !r && Te(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || zo(n);
|
|
2428
2428
|
return t;
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2431
|
-
var
|
|
2430
|
+
function ra(e, t, n) {
|
|
2431
|
+
var r = "", i = e.tag, o, a, l;
|
|
2432
2432
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2433
|
-
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (
|
|
2434
|
-
e.tag =
|
|
2433
|
+
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (le(e, t, l, !1, !1) || typeof l > "u" && le(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2434
|
+
e.tag = i, e.dump = "[" + r + "]";
|
|
2435
2435
|
}
|
|
2436
|
-
function Tt(e, t, n,
|
|
2437
|
-
var
|
|
2436
|
+
function Tt(e, t, n, r) {
|
|
2437
|
+
var i = "", o = e.tag, a, l, s;
|
|
2438
2438
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2439
|
-
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (
|
|
2440
|
-
e.tag = o, e.dump =
|
|
2439
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (le(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && le(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += ze(e, t)), e.dump && Ie === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2440
|
+
e.tag = o, e.dump = i || "[]";
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2443
|
-
var
|
|
2442
|
+
function ia(e, t, n) {
|
|
2443
|
+
var r = "", i = e.tag, o = Object.keys(n), a, l, s, c, d;
|
|
2444
2444
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2445
|
-
d = "",
|
|
2446
|
-
e.tag =
|
|
2445
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), le(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), le(e, t, c, !1, !1) && (d += e.dump, r += d));
|
|
2446
|
+
e.tag = i, e.dump = "{" + r + "}";
|
|
2447
2447
|
}
|
|
2448
|
-
function oa(e, t, n,
|
|
2449
|
-
var
|
|
2448
|
+
function oa(e, t, n, r) {
|
|
2449
|
+
var i = "", o = e.tag, a = Object.keys(n), l, s, c, d, u, h;
|
|
2450
2450
|
if (e.sortKeys === !0)
|
|
2451
2451
|
a.sort();
|
|
2452
2452
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2454,38 +2454,38 @@ function oa(e, t, n, i) {
|
|
|
2454
2454
|
else if (e.sortKeys)
|
|
2455
2455
|
throw new ee("sortKeys must be a boolean or a function");
|
|
2456
2456
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
2457
|
-
h = "", (!
|
|
2458
|
-
e.tag = o, e.dump =
|
|
2457
|
+
h = "", (!r || i !== "") && (h += ze(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), le(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ie === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, u && (h += ze(e, t)), le(e, t + 1, d, !0, u) && (e.dump && Ie === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, i += h));
|
|
2458
|
+
e.tag = o, e.dump = i || "{}";
|
|
2459
2459
|
}
|
|
2460
2460
|
function Ft(e, t, n) {
|
|
2461
|
-
var
|
|
2462
|
-
for (
|
|
2463
|
-
if (l =
|
|
2461
|
+
var r, i, o, a, l, s;
|
|
2462
|
+
for (i = n ? e.explicitTypes : e.implicitTypes, o = 0, a = i.length; o < a; o += 1)
|
|
2463
|
+
if (l = i[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2464
2464
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2465
2465
|
if (s = e.styleMap[l.tag] || l.defaultStyle, Cn.call(l.represent) === "[object Function]")
|
|
2466
|
-
|
|
2466
|
+
r = l.represent(t, s);
|
|
2467
2467
|
else if (_n.call(l.represent, s))
|
|
2468
|
-
|
|
2468
|
+
r = l.represent[s](t, s);
|
|
2469
2469
|
else
|
|
2470
2470
|
throw new ee("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2471
|
-
e.dump =
|
|
2471
|
+
e.dump = r;
|
|
2472
2472
|
}
|
|
2473
2473
|
return !0;
|
|
2474
2474
|
}
|
|
2475
2475
|
return !1;
|
|
2476
2476
|
}
|
|
2477
|
-
function
|
|
2477
|
+
function le(e, t, n, r, i, o, a) {
|
|
2478
2478
|
e.tag = null, e.dump = n, Ft(e, n, !1) || Ft(e, n, !0);
|
|
2479
|
-
var l = Cn.call(e.dump), s =
|
|
2480
|
-
|
|
2479
|
+
var l = Cn.call(e.dump), s = r, c;
|
|
2480
|
+
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2481
2481
|
var d = l === "[object Object]" || l === "[object Array]", u, h;
|
|
2482
|
-
if (d && (u = e.duplicates.indexOf(n), h = u !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && t > 0) && (
|
|
2482
|
+
if (d && (u = e.duplicates.indexOf(n), h = u !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && t > 0) && (i = !1), h && e.usedDuplicates[u])
|
|
2483
2483
|
e.dump = "*ref_" + u;
|
|
2484
2484
|
else {
|
|
2485
2485
|
if (d && h && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2486
|
-
|
|
2486
|
+
r && Object.keys(e.dump).length !== 0 ? (oa(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (ia(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2487
2487
|
else if (l === "[object Array]")
|
|
2488
|
-
|
|
2488
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Tt(e, t - 1, e.dump, i) : Tt(e, t, e.dump, i), h && (e.dump = "&ref_" + u + e.dump)) : (ra(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2489
2489
|
else if (l === "[object String]")
|
|
2490
2490
|
e.tag !== "?" && ea(e, e.dump, t, o, s);
|
|
2491
2491
|
else {
|
|
@@ -2502,40 +2502,40 @@ function se(e, t, n, i, r, o, a) {
|
|
|
2502
2502
|
return !0;
|
|
2503
2503
|
}
|
|
2504
2504
|
function aa(e, t) {
|
|
2505
|
-
var n = [],
|
|
2506
|
-
for (
|
|
2507
|
-
t.duplicates.push(n[i
|
|
2505
|
+
var n = [], r = [], i, o;
|
|
2506
|
+
for (Je(e, n, r), i = 0, o = r.length; i < o; i += 1)
|
|
2507
|
+
t.duplicates.push(n[r[i]]);
|
|
2508
2508
|
t.usedDuplicates = new Array(o);
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2511
|
-
var
|
|
2510
|
+
function Je(e, t, n) {
|
|
2511
|
+
var r, i, o;
|
|
2512
2512
|
if (e !== null && typeof e == "object")
|
|
2513
|
-
if (
|
|
2514
|
-
n.indexOf(
|
|
2513
|
+
if (i = t.indexOf(e), i !== -1)
|
|
2514
|
+
n.indexOf(i) === -1 && n.push(i);
|
|
2515
2515
|
else if (t.push(e), Array.isArray(e))
|
|
2516
|
-
for (
|
|
2517
|
-
|
|
2516
|
+
for (i = 0, o = e.length; i < o; i += 1)
|
|
2517
|
+
Je(e[i], t, n);
|
|
2518
2518
|
else
|
|
2519
|
-
for (
|
|
2520
|
-
|
|
2519
|
+
for (r = Object.keys(e), i = 0, o = r.length; i < o; i += 1)
|
|
2520
|
+
Je(e[r[i]], t, n);
|
|
2521
2521
|
}
|
|
2522
2522
|
function la(e, t) {
|
|
2523
2523
|
t = t || {};
|
|
2524
2524
|
var n = new Jo(t);
|
|
2525
2525
|
n.noRefs || aa(e, n);
|
|
2526
|
-
var
|
|
2527
|
-
return n.replacer && (
|
|
2526
|
+
var r = e;
|
|
2527
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), le(n, 0, r, !0, !0) ? n.dump + `
|
|
2528
2528
|
` : "";
|
|
2529
2529
|
}
|
|
2530
2530
|
var sa = la, ca = {
|
|
2531
2531
|
dump: sa
|
|
2532
2532
|
};
|
|
2533
|
-
function
|
|
2533
|
+
function it(e, t) {
|
|
2534
2534
|
return function() {
|
|
2535
2535
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2536
2536
|
};
|
|
2537
2537
|
}
|
|
2538
|
-
var ua = Q, da = Yt, fa = Gt, pa = tn, ha = nn, ma =
|
|
2538
|
+
var ua = Q, da = Yt, fa = Gt, pa = tn, ha = nn, ma = et, ga = xn.load, ya = xn.loadAll, va = ca.dump, ba = ee, xa = {
|
|
2539
2539
|
binary: sn,
|
|
2540
2540
|
float: en,
|
|
2541
2541
|
map: Jt,
|
|
@@ -2549,7 +2549,7 @@ var ua = Q, da = Yt, fa = Gt, pa = tn, ha = nn, ma = tt, ga = xn.load, ya = xn.l
|
|
|
2549
2549
|
omap: cn,
|
|
2550
2550
|
seq: Wt,
|
|
2551
2551
|
str: zt
|
|
2552
|
-
}, Ca =
|
|
2552
|
+
}, Ca = it("safeLoad", "load"), _a = it("safeLoadAll", "loadAll"), ka = it("safeDump", "dump"), Aa = {
|
|
2553
2553
|
Type: ua,
|
|
2554
2554
|
Schema: da,
|
|
2555
2555
|
FAILSAFE_SCHEMA: fa,
|
|
@@ -2565,7 +2565,7 @@ var ua = Q, da = Yt, fa = Gt, pa = tn, ha = nn, ma = tt, ga = xn.load, ya = xn.l
|
|
|
2565
2565
|
safeLoadAll: _a,
|
|
2566
2566
|
safeDump: ka
|
|
2567
2567
|
};
|
|
2568
|
-
const wa = { class: "yaml-config" },
|
|
2568
|
+
const wa = { class: "yaml-config" }, $n = /* @__PURE__ */ V({
|
|
2569
2569
|
__name: "YamlCodeBlock",
|
|
2570
2570
|
props: {
|
|
2571
2571
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2575,12 +2575,12 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2575
2575
|
}
|
|
2576
2576
|
},
|
|
2577
2577
|
setup(e) {
|
|
2578
|
-
const t = e, n =
|
|
2579
|
-
const
|
|
2580
|
-
return Object.keys(
|
|
2578
|
+
const t = e, n = A(() => {
|
|
2579
|
+
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2580
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : Aa.dump(r).trim();
|
|
2581
2581
|
});
|
|
2582
|
-
return (
|
|
2583
|
-
const o =
|
|
2582
|
+
return (r, i) => {
|
|
2583
|
+
const o = N("KCodeBlock");
|
|
2584
2584
|
return p(), w("div", wa, [
|
|
2585
2585
|
t.yamlRecord ? (p(), R(o, {
|
|
2586
2586
|
key: 0,
|
|
@@ -2598,7 +2598,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2598
2598
|
}, Ia = ["data-testid"], Ea = {
|
|
2599
2599
|
key: 0,
|
|
2600
2600
|
class: "config-card-prop-section-title"
|
|
2601
|
-
}, Ta = /* @__PURE__ */
|
|
2601
|
+
}, Ta = /* @__PURE__ */ V({
|
|
2602
2602
|
__name: "ConfigCardDisplay",
|
|
2603
2603
|
props: {
|
|
2604
2604
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2637,7 +2637,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2637
2637
|
}
|
|
2638
2638
|
},
|
|
2639
2639
|
setup(e) {
|
|
2640
|
-
const t = e, n =
|
|
2640
|
+
const t = e, n = Ge(), { i18n: { t: r } } = W.useI18n(), i = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o = A(() => {
|
|
2641
2641
|
if (!t.record)
|
|
2642
2642
|
return t.record;
|
|
2643
2643
|
const a = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2645,20 +2645,20 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2645
2645
|
});
|
|
2646
2646
|
return (a, l) => (p(), w(ae, null, [
|
|
2647
2647
|
e.format === "structured" ? (p(), w("div", Sa, [
|
|
2648
|
-
(p(!0), w(ae, null,
|
|
2648
|
+
(p(!0), w(ae, null, ie(e.propListTypes, (s) => (p(), w("div", {
|
|
2649
2649
|
key: `config-card-details-${s}-props`,
|
|
2650
|
-
class:
|
|
2650
|
+
class: pe(`config-card-details-${s}-props`),
|
|
2651
2651
|
"data-testid": `config-card-details-${s}-props`
|
|
2652
2652
|
}, [
|
|
2653
|
-
s !== "basic" ? (p(), w("div", Ea,
|
|
2654
|
-
(p(!0), w(ae, null,
|
|
2653
|
+
s !== "basic" ? (p(), w("div", Ea, O(s === "advanced" ? I(r)("baseConfigCard.sections.advanced") : I(r)("baseConfigCard.sections.plugin")), 1)) : U("", !0),
|
|
2654
|
+
(p(!0), w(ae, null, ie(e.propertyCollections[s], (c) => (p(), R(qt, {
|
|
2655
2655
|
key: c.key,
|
|
2656
2656
|
item: c
|
|
2657
|
-
},
|
|
2658
|
-
label:
|
|
2657
|
+
}, be({
|
|
2658
|
+
label: b(() => [
|
|
2659
2659
|
Y(a.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2660
2660
|
]),
|
|
2661
|
-
[c.key]:
|
|
2661
|
+
[c.key]: b(({ rowValue: d }) => [
|
|
2662
2662
|
Y(a.$slots, c.key, {
|
|
2663
2663
|
row: c,
|
|
2664
2664
|
rowValue: d
|
|
@@ -2666,9 +2666,9 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2666
2666
|
]),
|
|
2667
2667
|
_: 2
|
|
2668
2668
|
}, [
|
|
2669
|
-
|
|
2669
|
+
i(c) ? {
|
|
2670
2670
|
name: "label-tooltip",
|
|
2671
|
-
fn:
|
|
2671
|
+
fn: b(() => [
|
|
2672
2672
|
Y(a.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2673
2673
|
]),
|
|
2674
2674
|
key: "0"
|
|
@@ -2683,24 +2683,24 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2683
2683
|
"json-record": o.value,
|
|
2684
2684
|
"request-method": "get"
|
|
2685
2685
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : U("", !0),
|
|
2686
|
-
e.format === "yaml" && t.record ? (p(), R(
|
|
2686
|
+
e.format === "yaml" && t.record ? (p(), R($n, {
|
|
2687
2687
|
key: 2,
|
|
2688
2688
|
"yaml-record": o.value
|
|
2689
2689
|
}, null, 8, ["yaml-record"])) : U("", !0)
|
|
2690
2690
|
], 64));
|
|
2691
2691
|
}
|
|
2692
|
-
}), Fa = /* @__PURE__ */
|
|
2692
|
+
}), Fa = /* @__PURE__ */ re(Ta, [["__scopeId", "data-v-2b74ac63"]]), Ce = "24px", ot = (e, t) => {
|
|
2693
2693
|
const n = e.__vccOpts || e;
|
|
2694
|
-
for (const [
|
|
2695
|
-
n[
|
|
2694
|
+
for (const [r, i] of t)
|
|
2695
|
+
n[r] = i;
|
|
2696
2696
|
return n;
|
|
2697
|
-
},
|
|
2697
|
+
}, Oa = (e) => (Re("data-v-40a7f387"), e = e(), Ke(), e), $a = ["aria-hidden"], La = {
|
|
2698
2698
|
key: 0,
|
|
2699
2699
|
"data-testid": "kui-icon-svg-title"
|
|
2700
|
-
}, Na = /* @__PURE__ */
|
|
2700
|
+
}, Na = /* @__PURE__ */ Oa(() => /* @__PURE__ */ L("path", {
|
|
2701
2701
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2702
2702
|
fill: "currentColor"
|
|
2703
|
-
}, null, -1)), Ba = /* @__PURE__ */
|
|
2703
|
+
}, null, -1)), Ba = /* @__PURE__ */ V({
|
|
2704
2704
|
__name: "BookIcon",
|
|
2705
2705
|
props: {
|
|
2706
2706
|
/** The accessibility text provided to screen readers */
|
|
@@ -2731,7 +2731,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2731
2731
|
size: {
|
|
2732
2732
|
type: [Number, String],
|
|
2733
2733
|
required: !1,
|
|
2734
|
-
default:
|
|
2734
|
+
default: Ce,
|
|
2735
2735
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2736
2736
|
validator: (e) => {
|
|
2737
2737
|
if (typeof e == "number" && e > 0)
|
|
@@ -2752,16 +2752,16 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2752
2752
|
}
|
|
2753
2753
|
},
|
|
2754
2754
|
setup(e) {
|
|
2755
|
-
const t = e, n =
|
|
2755
|
+
const t = e, n = A(() => {
|
|
2756
2756
|
if (typeof t.size == "number" && t.size > 0)
|
|
2757
2757
|
return `${t.size}px`;
|
|
2758
2758
|
if (typeof t.size == "string") {
|
|
2759
|
-
const
|
|
2759
|
+
const i = String(t.size).replace(/px/gi, ""), o = Number(i);
|
|
2760
2760
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2761
2761
|
return `${o}px`;
|
|
2762
2762
|
}
|
|
2763
|
-
return
|
|
2764
|
-
}),
|
|
2763
|
+
return Ce;
|
|
2764
|
+
}), r = A(() => ({
|
|
2765
2765
|
boxSizing: "border-box",
|
|
2766
2766
|
color: t.color,
|
|
2767
2767
|
display: t.display,
|
|
@@ -2769,13 +2769,13 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2769
2769
|
lineHeight: "0",
|
|
2770
2770
|
width: n.value
|
|
2771
2771
|
}));
|
|
2772
|
-
return (
|
|
2772
|
+
return (i, o) => (p(), R(ce(e.as), {
|
|
2773
2773
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2774
2774
|
class: "kui-icon book-icon",
|
|
2775
2775
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2776
|
-
style:
|
|
2776
|
+
style: Me(r.value)
|
|
2777
2777
|
}, {
|
|
2778
|
-
default:
|
|
2778
|
+
default: b(() => [
|
|
2779
2779
|
(p(), w("svg", {
|
|
2780
2780
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2781
2781
|
"data-testid": "kui-icon-svg-book-icon",
|
|
@@ -2786,20 +2786,20 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2786
2786
|
width: "100%",
|
|
2787
2787
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2788
2788
|
}, [
|
|
2789
|
-
e.title ? (p(), w("title",
|
|
2789
|
+
e.title ? (p(), w("title", La, O(e.title), 1)) : U("", !0),
|
|
2790
2790
|
Na
|
|
2791
|
-
], 8,
|
|
2791
|
+
], 8, $a))
|
|
2792
2792
|
]),
|
|
2793
2793
|
_: 1
|
|
2794
2794
|
}, 8, ["aria-hidden", "style"]));
|
|
2795
2795
|
}
|
|
2796
|
-
}), Ma = /* @__PURE__ */
|
|
2796
|
+
}), Ma = /* @__PURE__ */ ot(Ba, [["__scopeId", "data-v-40a7f387"]]), Ra = (e) => (Re("data-v-19f4cbbe"), e = e(), Ke(), e), Ka = ["aria-hidden"], Da = {
|
|
2797
2797
|
key: 0,
|
|
2798
2798
|
"data-testid": "kui-icon-svg-title"
|
|
2799
|
-
}, ja = /* @__PURE__ */ Ra(() => /* @__PURE__ */
|
|
2799
|
+
}, ja = /* @__PURE__ */ Ra(() => /* @__PURE__ */ L("path", {
|
|
2800
2800
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2801
2801
|
fill: "currentColor"
|
|
2802
|
-
}, null, -1)), Ua = /* @__PURE__ */
|
|
2802
|
+
}, null, -1)), Ua = /* @__PURE__ */ V({
|
|
2803
2803
|
__name: "CloseIcon",
|
|
2804
2804
|
props: {
|
|
2805
2805
|
/** The accessibility text provided to screen readers */
|
|
@@ -2830,7 +2830,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2830
2830
|
size: {
|
|
2831
2831
|
type: [Number, String],
|
|
2832
2832
|
required: !1,
|
|
2833
|
-
default:
|
|
2833
|
+
default: Ce,
|
|
2834
2834
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2835
2835
|
validator: (e) => {
|
|
2836
2836
|
if (typeof e == "number" && e > 0)
|
|
@@ -2851,16 +2851,16 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2851
2851
|
}
|
|
2852
2852
|
},
|
|
2853
2853
|
setup(e) {
|
|
2854
|
-
const t = e, n =
|
|
2854
|
+
const t = e, n = A(() => {
|
|
2855
2855
|
if (typeof t.size == "number" && t.size > 0)
|
|
2856
2856
|
return `${t.size}px`;
|
|
2857
2857
|
if (typeof t.size == "string") {
|
|
2858
|
-
const
|
|
2858
|
+
const i = String(t.size).replace(/px/gi, ""), o = Number(i);
|
|
2859
2859
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2860
2860
|
return `${o}px`;
|
|
2861
2861
|
}
|
|
2862
|
-
return
|
|
2863
|
-
}),
|
|
2862
|
+
return Ce;
|
|
2863
|
+
}), r = A(() => ({
|
|
2864
2864
|
boxSizing: "border-box",
|
|
2865
2865
|
color: t.color,
|
|
2866
2866
|
display: t.display,
|
|
@@ -2868,13 +2868,13 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2868
2868
|
lineHeight: "0",
|
|
2869
2869
|
width: n.value
|
|
2870
2870
|
}));
|
|
2871
|
-
return (
|
|
2871
|
+
return (i, o) => (p(), R(ce(e.as), {
|
|
2872
2872
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2873
2873
|
class: "kui-icon close-icon",
|
|
2874
2874
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2875
|
-
style:
|
|
2875
|
+
style: Me(r.value)
|
|
2876
2876
|
}, {
|
|
2877
|
-
default:
|
|
2877
|
+
default: b(() => [
|
|
2878
2878
|
(p(), w("svg", {
|
|
2879
2879
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2880
2880
|
"data-testid": "kui-icon-svg-close-icon",
|
|
@@ -2885,20 +2885,20 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2885
2885
|
width: "100%",
|
|
2886
2886
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2887
2887
|
}, [
|
|
2888
|
-
e.title ? (p(), w("title", Da,
|
|
2888
|
+
e.title ? (p(), w("title", Da, O(e.title), 1)) : U("", !0),
|
|
2889
2889
|
ja
|
|
2890
2890
|
], 8, Ka))
|
|
2891
2891
|
]),
|
|
2892
2892
|
_: 1
|
|
2893
2893
|
}, 8, ["aria-hidden", "style"]));
|
|
2894
2894
|
}
|
|
2895
|
-
}), qa = /* @__PURE__ */
|
|
2895
|
+
}), qa = /* @__PURE__ */ ot(Ua, [["__scopeId", "data-v-19f4cbbe"]]), Pa = (e) => (Re("data-v-13f41aa3"), e = e(), Ke(), e), Ha = ["aria-hidden"], Va = {
|
|
2896
2896
|
key: 0,
|
|
2897
2897
|
"data-testid": "kui-icon-svg-title"
|
|
2898
|
-
}, Ya = /* @__PURE__ */ Pa(() => /* @__PURE__ */
|
|
2898
|
+
}, Ya = /* @__PURE__ */ Pa(() => /* @__PURE__ */ L("path", {
|
|
2899
2899
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
2900
2900
|
fill: "currentColor"
|
|
2901
|
-
}, null, -1)), za = /* @__PURE__ */
|
|
2901
|
+
}, null, -1)), za = /* @__PURE__ */ V({
|
|
2902
2902
|
__name: "CopyIcon",
|
|
2903
2903
|
props: {
|
|
2904
2904
|
/** The accessibility text provided to screen readers */
|
|
@@ -2929,7 +2929,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2929
2929
|
size: {
|
|
2930
2930
|
type: [Number, String],
|
|
2931
2931
|
required: !1,
|
|
2932
|
-
default:
|
|
2932
|
+
default: Ce,
|
|
2933
2933
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2934
2934
|
validator: (e) => {
|
|
2935
2935
|
if (typeof e == "number" && e > 0)
|
|
@@ -2950,16 +2950,16 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2950
2950
|
}
|
|
2951
2951
|
},
|
|
2952
2952
|
setup(e) {
|
|
2953
|
-
const t = e, n =
|
|
2953
|
+
const t = e, n = A(() => {
|
|
2954
2954
|
if (typeof t.size == "number" && t.size > 0)
|
|
2955
2955
|
return `${t.size}px`;
|
|
2956
2956
|
if (typeof t.size == "string") {
|
|
2957
|
-
const
|
|
2957
|
+
const i = String(t.size).replace(/px/gi, ""), o = Number(i);
|
|
2958
2958
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2959
2959
|
return `${o}px`;
|
|
2960
2960
|
}
|
|
2961
|
-
return
|
|
2962
|
-
}),
|
|
2961
|
+
return Ce;
|
|
2962
|
+
}), r = A(() => ({
|
|
2963
2963
|
boxSizing: "border-box",
|
|
2964
2964
|
color: t.color,
|
|
2965
2965
|
display: t.display,
|
|
@@ -2967,13 +2967,13 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2967
2967
|
lineHeight: "0",
|
|
2968
2968
|
width: n.value
|
|
2969
2969
|
}));
|
|
2970
|
-
return (
|
|
2970
|
+
return (i, o) => (p(), R(ce(e.as), {
|
|
2971
2971
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2972
2972
|
class: "kui-icon copy-icon",
|
|
2973
2973
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2974
|
-
style:
|
|
2974
|
+
style: Me(r.value)
|
|
2975
2975
|
}, {
|
|
2976
|
-
default:
|
|
2976
|
+
default: b(() => [
|
|
2977
2977
|
(p(), w("svg", {
|
|
2978
2978
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2979
2979
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
@@ -2984,115 +2984,14 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
2984
2984
|
width: "100%",
|
|
2985
2985
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2986
2986
|
}, [
|
|
2987
|
-
e.title ? (p(), w("title", Va,
|
|
2987
|
+
e.title ? (p(), w("title", Va, O(e.title), 1)) : U("", !0),
|
|
2988
2988
|
Ya
|
|
2989
2989
|
], 8, Ha))
|
|
2990
2990
|
]),
|
|
2991
2991
|
_: 1
|
|
2992
2992
|
}, 8, ["aria-hidden", "style"]));
|
|
2993
2993
|
}
|
|
2994
|
-
}), Wa = /* @__PURE__ */
|
|
2995
|
-
key: 0,
|
|
2996
|
-
"data-testid": "kui-icon-svg-title"
|
|
2997
|
-
}, Qa = /* @__PURE__ */ Ja(() => /* @__PURE__ */ O("path", {
|
|
2998
|
-
"clip-rule": "evenodd",
|
|
2999
|
-
d: "M8.56654 17.8134H12.2371L14.1429 20.2096L13.8152 21.026H9.0731L9.18942 20.2096L8.07153 18.4462L8.56654 17.8134ZM11.193 7.28639L13.1602 7.28343L22 17.822L21.3132 21.026H17.5245L17.7604 20.1233L9.50009 10.2732L11.193 7.28639ZM14.6686 3L18.778 6.22975L18.2519 6.77265L18.9644 7.76492V8.82592L16.9157 10.496L13.4703 6.42551H11.4644L12.272 4.94512L14.6686 3ZM6.04318 13.3443L8.90974 10.853L12.7144 15.4313L11.6342 17.1086H8.12603L5.69899 20.2934L5.14469 21.026H2V17.1183L4.93106 13.3443H6.04318Z",
|
|
3000
|
-
fill: "currentColor",
|
|
3001
|
-
"fill-rule": "evenodd"
|
|
3002
|
-
}, null, -1)), Xa = /* @__PURE__ */ H({
|
|
3003
|
-
__name: "KongIcon",
|
|
3004
|
-
props: {
|
|
3005
|
-
/** The accessibility text provided to screen readers */
|
|
3006
|
-
title: {
|
|
3007
|
-
type: String,
|
|
3008
|
-
required: !1,
|
|
3009
|
-
default: ""
|
|
3010
|
-
},
|
|
3011
|
-
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
3012
|
-
color: {
|
|
3013
|
-
type: String,
|
|
3014
|
-
required: !1,
|
|
3015
|
-
default: "currentColor"
|
|
3016
|
-
},
|
|
3017
|
-
/** The CSS display property for the icon. Defaults to `block` */
|
|
3018
|
-
display: {
|
|
3019
|
-
type: String,
|
|
3020
|
-
required: !1,
|
|
3021
|
-
default: "block"
|
|
3022
|
-
},
|
|
3023
|
-
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
3024
|
-
decorative: {
|
|
3025
|
-
type: Boolean,
|
|
3026
|
-
required: !1,
|
|
3027
|
-
default: !1
|
|
3028
|
-
},
|
|
3029
|
-
/** The icon size */
|
|
3030
|
-
size: {
|
|
3031
|
-
type: [Number, String],
|
|
3032
|
-
required: !1,
|
|
3033
|
-
default: de,
|
|
3034
|
-
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
3035
|
-
validator: (e) => {
|
|
3036
|
-
if (typeof e == "number" && e > 0)
|
|
3037
|
-
return !0;
|
|
3038
|
-
if (typeof e == "string") {
|
|
3039
|
-
const t = String(e).replace(/px/gi, ""), n = Number(t);
|
|
3040
|
-
if (n && !isNaN(n) && Number.isInteger(n) && n > 0)
|
|
3041
|
-
return !0;
|
|
3042
|
-
}
|
|
3043
|
-
return !1;
|
|
3044
|
-
}
|
|
3045
|
-
},
|
|
3046
|
-
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
3047
|
-
as: {
|
|
3048
|
-
type: String,
|
|
3049
|
-
required: !1,
|
|
3050
|
-
default: "span"
|
|
3051
|
-
}
|
|
3052
|
-
},
|
|
3053
|
-
setup(e) {
|
|
3054
|
-
const t = e, n = _(() => {
|
|
3055
|
-
if (typeof t.size == "number" && t.size > 0)
|
|
3056
|
-
return `${t.size}px`;
|
|
3057
|
-
if (typeof t.size == "string") {
|
|
3058
|
-
const r = String(t.size).replace(/px/gi, ""), o = Number(r);
|
|
3059
|
-
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
3060
|
-
return `${o}px`;
|
|
3061
|
-
}
|
|
3062
|
-
return de;
|
|
3063
|
-
}), i = _(() => ({
|
|
3064
|
-
boxSizing: "border-box",
|
|
3065
|
-
color: t.color,
|
|
3066
|
-
display: t.display,
|
|
3067
|
-
height: n.value,
|
|
3068
|
-
lineHeight: "0",
|
|
3069
|
-
width: n.value
|
|
3070
|
-
}));
|
|
3071
|
-
return (r, o) => (p(), R(le(e.as), {
|
|
3072
|
-
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3073
|
-
class: "kui-icon kong-icon",
|
|
3074
|
-
"data-testid": "kui-icon-wrapper-kong-icon",
|
|
3075
|
-
style: Fe(i.value)
|
|
3076
|
-
}, {
|
|
3077
|
-
default: v(() => [
|
|
3078
|
-
(p(), w("svg", {
|
|
3079
|
-
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3080
|
-
"data-testid": "kui-icon-svg-kong-icon",
|
|
3081
|
-
fill: "none",
|
|
3082
|
-
height: "100%",
|
|
3083
|
-
role: "img",
|
|
3084
|
-
viewBox: "0 0 24 24",
|
|
3085
|
-
width: "100%",
|
|
3086
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3087
|
-
}, [
|
|
3088
|
-
e.title ? (p(), w("title", Za, L(e.title), 1)) : U("", !0),
|
|
3089
|
-
Qa
|
|
3090
|
-
], 8, Ga))
|
|
3091
|
-
]),
|
|
3092
|
-
_: 1
|
|
3093
|
-
}, 8, ["aria-hidden", "style"]));
|
|
3094
|
-
}
|
|
3095
|
-
}), el = /* @__PURE__ */ je(Xa, [["__scopeId", "data-v-a06a6263"]]), tl = { "data-testid": "config-card-title" }, nl = { class: "config-card-actions" }, il = ["href"], rl = { class: "config-card-details-section" }, ol = /* @__PURE__ */ H({
|
|
2994
|
+
}), Wa = /* @__PURE__ */ ot(za, [["__scopeId", "data-v-13f41aa3"]]), Ja = { "data-testid": "config-card-title" }, Ga = { class: "config-card-actions" }, Za = ["href"], Qa = { class: "config-card-details-section" }, Xa = /* @__PURE__ */ V({
|
|
3096
2995
|
__name: "EntityBaseConfigCard",
|
|
3097
2996
|
props: {
|
|
3098
2997
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3167,11 +3066,11 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3167
3066
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
3168
3067
|
setup(e, { emit: t }) {
|
|
3169
3068
|
var C;
|
|
3170
|
-
const n = t,
|
|
3171
|
-
headers: (C =
|
|
3069
|
+
const n = t, r = e, { i18n: { t: i } } = W.useI18n(), { getMessageFromError: o } = W.useErrors(), { convertKeyToTitle: a } = W.useStringHelpers(), { axiosInstance: l } = W.useAxios({
|
|
3070
|
+
headers: (C = r.config) == null ? void 0 : C.requestHeaders
|
|
3172
3071
|
}), s = [
|
|
3173
3072
|
{
|
|
3174
|
-
label:
|
|
3073
|
+
label: i("baseConfigCard.general.structuredFormat"),
|
|
3175
3074
|
value: "structured",
|
|
3176
3075
|
selected: !0
|
|
3177
3076
|
},
|
|
@@ -3187,8 +3086,8 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3187
3086
|
c.value = y == null ? void 0 : y.value;
|
|
3188
3087
|
}, u = {
|
|
3189
3088
|
id: {
|
|
3190
|
-
type:
|
|
3191
|
-
label:
|
|
3089
|
+
type: H.ID,
|
|
3090
|
+
label: i("baseConfigCard.commonFields.id_label"),
|
|
3192
3091
|
order: 0,
|
|
3193
3092
|
section: ne.Basic
|
|
3194
3093
|
},
|
|
@@ -3197,60 +3096,60 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3197
3096
|
section: ne.Basic
|
|
3198
3097
|
},
|
|
3199
3098
|
enabled: {
|
|
3200
|
-
type:
|
|
3099
|
+
type: H.BadgeStatus,
|
|
3201
3100
|
order: 2,
|
|
3202
3101
|
section: ne.Basic
|
|
3203
3102
|
},
|
|
3204
3103
|
updated_at: {
|
|
3205
|
-
type:
|
|
3206
|
-
label:
|
|
3104
|
+
type: H.Date,
|
|
3105
|
+
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
3207
3106
|
order: 3,
|
|
3208
3107
|
section: ne.Basic
|
|
3209
3108
|
},
|
|
3210
3109
|
created_at: {
|
|
3211
|
-
type:
|
|
3212
|
-
label:
|
|
3110
|
+
type: H.Date,
|
|
3111
|
+
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
3213
3112
|
order: 4,
|
|
3214
3113
|
section: ne.Basic
|
|
3215
3114
|
},
|
|
3216
3115
|
tags: {
|
|
3217
|
-
type:
|
|
3116
|
+
type: H.BadgeTag,
|
|
3218
3117
|
order: -1,
|
|
3219
3118
|
// the last property displayed
|
|
3220
3119
|
section: ne.Basic
|
|
3221
3120
|
}
|
|
3222
|
-
}, h = K(!1), f = K(!1), x = K(""), m = K({}),
|
|
3223
|
-
var F,
|
|
3121
|
+
}, h = K(!1), f = K(!1), x = K(""), m = K({}), k = A(() => {
|
|
3122
|
+
var F, S, q;
|
|
3224
3123
|
if (!m.value)
|
|
3225
3124
|
return [];
|
|
3226
3125
|
const y = [], j = Object.keys(m.value).length;
|
|
3227
3126
|
for (const E in m.value) {
|
|
3228
|
-
const T = (
|
|
3127
|
+
const T = (S = (F = r.configSchema) == null ? void 0 : F[E]) == null ? void 0 : S.order, D = (q = u[E]) == null ? void 0 : q.order;
|
|
3229
3128
|
let P = j;
|
|
3230
3129
|
(D || D === 0) && (P = D === -1 ? j + 1 : D), T && (P = T === -1 ? j + 1 : T), y.push([E, P]);
|
|
3231
3130
|
}
|
|
3232
3131
|
return y.sort(function(E, T) {
|
|
3233
3132
|
return E[1] - T[1];
|
|
3234
3133
|
}), y.map((E) => {
|
|
3235
|
-
var
|
|
3236
|
-
const T = E[0], D = (
|
|
3134
|
+
var de, at;
|
|
3135
|
+
const T = E[0], D = (de = m.value) == null ? void 0 : de[T], P = ((at = r.configSchema) == null ? void 0 : at[T]) || {}, G = u[T];
|
|
3237
3136
|
return {
|
|
3238
3137
|
key: T,
|
|
3239
3138
|
value: D,
|
|
3240
3139
|
hidden: P.hidden || !1,
|
|
3241
|
-
type: P.type ?? ((G == null ? void 0 : G.type) ||
|
|
3140
|
+
type: P.type ?? ((G == null ? void 0 : G.type) || H.Text),
|
|
3242
3141
|
label: P.label ?? ((G == null ? void 0 : G.label) || a(T)),
|
|
3243
3142
|
tooltip: P.tooltip ?? ((G == null ? void 0 : G.tooltip) || void 0),
|
|
3244
3143
|
section: P.section ?? ((G == null ? void 0 : G.section) || ne.Advanced)
|
|
3245
3144
|
};
|
|
3246
|
-
}).filter((E) => !E.hidden && E.key !==
|
|
3247
|
-
}),
|
|
3248
|
-
var
|
|
3249
|
-
if (!m.value || !
|
|
3145
|
+
}).filter((E) => !E.hidden && E.key !== r.pluginConfigKey);
|
|
3146
|
+
}), B = A(() => {
|
|
3147
|
+
var S, q;
|
|
3148
|
+
if (!m.value || !r.pluginConfigKey)
|
|
3250
3149
|
return [];
|
|
3251
|
-
const y = m.value[
|
|
3150
|
+
const y = m.value[r.pluginConfigKey] || {}, j = Object.keys(y).length, F = [];
|
|
3252
3151
|
for (const E in y) {
|
|
3253
|
-
const T = (q = (
|
|
3152
|
+
const T = (q = (S = r.pluginConfigSchema) == null ? void 0 : S[E]) == null ? void 0 : q.order, D = y[E];
|
|
3254
3153
|
let P = D != null && D !== "" ? j - 1 : j;
|
|
3255
3154
|
T && (P = T === -1 ? j + 1 : T), F.push([E, P]);
|
|
3256
3155
|
}
|
|
@@ -3258,31 +3157,31 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3258
3157
|
return E[1] - T[1];
|
|
3259
3158
|
}), F.map((E) => {
|
|
3260
3159
|
var G;
|
|
3261
|
-
const T = E[0], D = y[T], P = ((G =
|
|
3160
|
+
const T = E[0], D = y[T], P = ((G = r.pluginConfigSchema) == null ? void 0 : G[T]) || {};
|
|
3262
3161
|
return {
|
|
3263
3162
|
key: T,
|
|
3264
3163
|
value: D,
|
|
3265
3164
|
hidden: P.hidden || !1,
|
|
3266
|
-
type: P.type ??
|
|
3165
|
+
type: P.type ?? H.Text,
|
|
3267
3166
|
label: P.label ?? a(T),
|
|
3268
3167
|
tooltip: P.tooltip ?? void 0,
|
|
3269
3168
|
section: ne.Plugin
|
|
3270
3169
|
};
|
|
3271
3170
|
}).filter((E) => !E.hidden);
|
|
3272
|
-
}),
|
|
3273
|
-
var y, j, F,
|
|
3171
|
+
}), v = A(() => {
|
|
3172
|
+
var y, j, F, S;
|
|
3274
3173
|
return {
|
|
3275
|
-
basic: (y =
|
|
3276
|
-
advanced: (j =
|
|
3277
|
-
plugin: (
|
|
3174
|
+
basic: (y = k.value) == null ? void 0 : y.filter((q) => q.section === ne.Basic),
|
|
3175
|
+
advanced: (j = k.value) == null ? void 0 : j.filter((q) => q.section === ne.Advanced),
|
|
3176
|
+
plugin: (S = B.value) == null ? void 0 : S.concat((F = k.value) == null ? void 0 : F.filter((q) => q.section === ne.Plugin))
|
|
3278
3177
|
};
|
|
3279
|
-
}), $ =
|
|
3178
|
+
}), $ = A(() => {
|
|
3280
3179
|
const y = [];
|
|
3281
|
-
return
|
|
3282
|
-
}), g =
|
|
3180
|
+
return v.value.basic.length && y.push("basic"), v.value.advanced.length && y.push("advanced"), v.value.plugin.length && y.push("plugin"), y;
|
|
3181
|
+
}), g = A(() => {
|
|
3283
3182
|
var j, F;
|
|
3284
|
-
let y = `${
|
|
3285
|
-
return
|
|
3183
|
+
let y = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3184
|
+
return r.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((j = r.config) == null ? void 0 : j.controlPlaneId) || "") : r.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), y = y.replace(/{id}/gi, r.config.entityId), y;
|
|
3286
3185
|
});
|
|
3287
3186
|
return _e(h, (y) => {
|
|
3288
3187
|
n("loading", y);
|
|
@@ -3290,38 +3189,38 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3290
3189
|
f.value = !1, h.value = !0;
|
|
3291
3190
|
try {
|
|
3292
3191
|
const { data: y } = await l.get(g.value);
|
|
3293
|
-
if (
|
|
3294
|
-
if (typeof y[
|
|
3295
|
-
m.value = { ...y[
|
|
3192
|
+
if (r.dataKey)
|
|
3193
|
+
if (typeof y[r.dataKey] < "u")
|
|
3194
|
+
m.value = { ...y[r.dataKey] };
|
|
3296
3195
|
else
|
|
3297
|
-
throw new Error(
|
|
3196
|
+
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3298
3197
|
else
|
|
3299
3198
|
m.value = { ...y };
|
|
3300
|
-
Object.keys(
|
|
3199
|
+
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3301
3200
|
m.value && typeof m.value[F] > "u" && (m.value[F] = null);
|
|
3302
3201
|
}), n("fetch:success", y);
|
|
3303
3202
|
} catch (y) {
|
|
3304
3203
|
const j = o(y);
|
|
3305
|
-
x.value = j.startsWith("code") ?
|
|
3204
|
+
x.value = j.startsWith("code") ? i("baseConfigCard.errors.load") : j, f.value = !0, n("fetch:error", y);
|
|
3306
3205
|
} finally {
|
|
3307
3206
|
h.value = !1;
|
|
3308
3207
|
}
|
|
3309
3208
|
}), (y, j) => {
|
|
3310
|
-
const F =
|
|
3311
|
-
return p(), R(D, { class: "kong-ui-entity-base-config-card" },
|
|
3312
|
-
actions:
|
|
3313
|
-
|
|
3209
|
+
const F = N("KLabel"), S = N("KSelect"), q = N("KButton"), E = N("KSkeleton"), T = N("KEmptyState"), D = N("KCard");
|
|
3210
|
+
return p(), R(D, { class: "kong-ui-entity-base-config-card" }, be({
|
|
3211
|
+
actions: b(() => [
|
|
3212
|
+
L("div", Ga, [
|
|
3314
3213
|
Y(y.$slots, "actions", {}, void 0, !0),
|
|
3315
|
-
|
|
3214
|
+
M(F, {
|
|
3316
3215
|
class: "config-format-select-label",
|
|
3317
3216
|
"data-testid": "config-format-select-label"
|
|
3318
3217
|
}, {
|
|
3319
|
-
default:
|
|
3320
|
-
z(
|
|
3218
|
+
default: b(() => [
|
|
3219
|
+
z(O(e.label), 1)
|
|
3321
3220
|
]),
|
|
3322
3221
|
_: 1
|
|
3323
3222
|
}),
|
|
3324
|
-
|
|
3223
|
+
M(S, {
|
|
3325
3224
|
"data-testid": "select-config-format",
|
|
3326
3225
|
items: s,
|
|
3327
3226
|
onChange: d
|
|
@@ -3332,20 +3231,20 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3332
3231
|
class: "book-icon",
|
|
3333
3232
|
"data-testid": "book-icon"
|
|
3334
3233
|
}, {
|
|
3335
|
-
default:
|
|
3336
|
-
|
|
3234
|
+
default: b(() => [
|
|
3235
|
+
L("a", {
|
|
3337
3236
|
href: e.configCardDoc,
|
|
3338
3237
|
rel: "noopener",
|
|
3339
3238
|
target: "_blank"
|
|
3340
3239
|
}, [
|
|
3341
|
-
|
|
3342
|
-
], 8,
|
|
3240
|
+
M(I(Ma), { size: I(Pr) }, null, 8, ["size"])
|
|
3241
|
+
], 8, Za)
|
|
3343
3242
|
]),
|
|
3344
3243
|
_: 1
|
|
3345
3244
|
})) : U("", !0)
|
|
3346
3245
|
])
|
|
3347
3246
|
]),
|
|
3348
|
-
default:
|
|
3247
|
+
default: b(() => [
|
|
3349
3248
|
h.value ? (p(), R(E, {
|
|
3350
3249
|
key: 0,
|
|
3351
3250
|
"data-testid": "config-card-loader",
|
|
@@ -3354,28 +3253,28 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3354
3253
|
})) : f.value ? (p(), R(T, {
|
|
3355
3254
|
key: 1,
|
|
3356
3255
|
"data-testid": "config-card-fetch-error",
|
|
3357
|
-
"
|
|
3256
|
+
"is-error": ""
|
|
3358
3257
|
}, {
|
|
3359
|
-
|
|
3360
|
-
|
|
3258
|
+
message: b(() => [
|
|
3259
|
+
L("h3", null, O(x.value), 1)
|
|
3361
3260
|
]),
|
|
3362
3261
|
_: 1
|
|
3363
3262
|
})) : U("", !0),
|
|
3364
|
-
|
|
3365
|
-
|
|
3263
|
+
L("div", Qa, [
|
|
3264
|
+
M(Fa, {
|
|
3366
3265
|
config: e.config,
|
|
3367
3266
|
"fetcher-url": g.value,
|
|
3368
3267
|
format: c.value,
|
|
3369
3268
|
"prop-list-types": $.value,
|
|
3370
|
-
"property-collections":
|
|
3269
|
+
"property-collections": v.value,
|
|
3371
3270
|
record: m.value
|
|
3372
|
-
},
|
|
3373
|
-
|
|
3271
|
+
}, be({ _: 2 }, [
|
|
3272
|
+
ie(Object.keys(y.$slots), (P) => ({
|
|
3374
3273
|
name: P,
|
|
3375
|
-
fn:
|
|
3274
|
+
fn: b(({ row: G, rowValue: de }) => [
|
|
3376
3275
|
Y(y.$slots, P, {
|
|
3377
3276
|
row: G,
|
|
3378
|
-
rowValue:
|
|
3277
|
+
rowValue: de
|
|
3379
3278
|
}, void 0, !0)
|
|
3380
3279
|
])
|
|
3381
3280
|
}))
|
|
@@ -3386,10 +3285,10 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3386
3285
|
}, [
|
|
3387
3286
|
e.hideTitle ? void 0 : {
|
|
3388
3287
|
name: "title",
|
|
3389
|
-
fn:
|
|
3390
|
-
|
|
3288
|
+
fn: b(() => [
|
|
3289
|
+
L("div", Ja, [
|
|
3391
3290
|
Y(y.$slots, "title", {}, () => [
|
|
3392
|
-
z(
|
|
3291
|
+
z(O(I(i)("baseConfigCard.title")), 1)
|
|
3393
3292
|
], !0)
|
|
3394
3293
|
])
|
|
3395
3294
|
]),
|
|
@@ -3398,10 +3297,10 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3398
3297
|
]), 1024);
|
|
3399
3298
|
};
|
|
3400
3299
|
}
|
|
3401
|
-
}),
|
|
3300
|
+
}), ql = /* @__PURE__ */ re(Xa, [["__scopeId", "data-v-090c7580"]]), el = {
|
|
3402
3301
|
class: "form-actions",
|
|
3403
3302
|
"data-testid": "form-actions"
|
|
3404
|
-
},
|
|
3303
|
+
}, tl = { key: 0 }, nl = /* @__PURE__ */ V({
|
|
3405
3304
|
__name: "EntityBaseForm",
|
|
3406
3305
|
props: {
|
|
3407
3306
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3456,21 +3355,21 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3456
3355
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3457
3356
|
setup(e, { emit: t }) {
|
|
3458
3357
|
var $;
|
|
3459
|
-
const n = t,
|
|
3460
|
-
headers: ($ =
|
|
3461
|
-
}), s = K(!1), c = K(!1), d = K(""), u =
|
|
3358
|
+
const n = t, r = e, i = jn(), { i18n: { t: o } } = W.useI18n(), { getMessageFromError: a } = W.useErrors(), { axiosInstance: l } = W.useAxios({
|
|
3359
|
+
headers: ($ = r.config) == null ? void 0 : $.requestHeaders
|
|
3360
|
+
}), s = K(!1), c = K(!1), d = K(""), u = A(() => r.canSubmit === !1 || r.isReadonly), h = K(!1), f = A(() => {
|
|
3462
3361
|
var C, y;
|
|
3463
|
-
let g = `${
|
|
3464
|
-
return
|
|
3362
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3363
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((C = r.config) == null ? void 0 : C.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), r.editId ? (g = g.replace(/{id}/gi, r.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3465
3364
|
}), x = () => {
|
|
3466
3365
|
h.value = !h.value;
|
|
3467
3366
|
}, m = () => {
|
|
3468
|
-
|
|
3469
|
-
},
|
|
3367
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : k();
|
|
3368
|
+
}, k = () => {
|
|
3470
3369
|
n("cancel");
|
|
3471
|
-
},
|
|
3370
|
+
}, B = () => {
|
|
3472
3371
|
u.value || n("submit");
|
|
3473
|
-
},
|
|
3372
|
+
}, v = K([
|
|
3474
3373
|
{
|
|
3475
3374
|
title: o("baseForm.configuration.yaml"),
|
|
3476
3375
|
hash: "#yaml"
|
|
@@ -3483,7 +3382,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3483
3382
|
return _e(() => s.value, (g) => {
|
|
3484
3383
|
n("loading", g);
|
|
3485
3384
|
}, { immediate: !0 }), Nt(async () => {
|
|
3486
|
-
if (
|
|
3385
|
+
if (r.editId)
|
|
3487
3386
|
try {
|
|
3488
3387
|
c.value = !1, s.value = !0;
|
|
3489
3388
|
const { data: g } = await l.get(f.value);
|
|
@@ -3495,101 +3394,101 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3495
3394
|
s.value = !1;
|
|
3496
3395
|
}
|
|
3497
3396
|
}), (g, C) => {
|
|
3498
|
-
const y =
|
|
3397
|
+
const y = N("KSkeleton"), j = N("KEmptyState"), F = N("KAlert"), S = N("KButton"), q = N("KTabs"), E = N("KSlideout"), T = N("KCard");
|
|
3499
3398
|
return p(), R(T, { class: "kong-ui-entity-base-form" }, {
|
|
3500
|
-
default:
|
|
3399
|
+
default: b(() => [
|
|
3501
3400
|
s.value ? (p(), R(y, {
|
|
3502
3401
|
key: 0,
|
|
3503
3402
|
type: "form"
|
|
3504
3403
|
})) : c.value ? (p(), R(j, {
|
|
3505
3404
|
key: 1,
|
|
3506
|
-
"
|
|
3405
|
+
"cta-text": I(o)("baseForm.actions.back"),
|
|
3507
3406
|
"data-testid": "form-fetch-error",
|
|
3508
|
-
"
|
|
3509
|
-
|
|
3407
|
+
"handle-click": m,
|
|
3408
|
+
"is-error": !0
|
|
3510
3409
|
}, {
|
|
3511
|
-
|
|
3512
|
-
|
|
3410
|
+
message: b(() => [
|
|
3411
|
+
L("h3", null, O(d.value), 1)
|
|
3513
3412
|
]),
|
|
3514
3413
|
_: 1
|
|
3515
|
-
}, 8, ["
|
|
3414
|
+
}, 8, ["cta-text"])) : (p(), w("form", {
|
|
3516
3415
|
key: 2,
|
|
3517
3416
|
"data-testid": "form-content",
|
|
3518
|
-
onReset:
|
|
3519
|
-
onSubmit:
|
|
3417
|
+
onReset: Fe(k, ["prevent"]),
|
|
3418
|
+
onSubmit: Fe(B, ["prevent"])
|
|
3520
3419
|
}, [
|
|
3521
3420
|
Y(g.$slots, "default", {}, void 0, !0),
|
|
3522
3421
|
e.errorMessage ? (p(), R(F, {
|
|
3523
3422
|
key: 0,
|
|
3423
|
+
"alert-message": e.errorMessage,
|
|
3524
3424
|
appearance: "danger",
|
|
3525
|
-
"data-testid": "form-error"
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
O("div", al, [
|
|
3425
|
+
"data-testid": "form-error"
|
|
3426
|
+
}, null, 8, ["alert-message"])) : U("", !0),
|
|
3427
|
+
L("div", el, [
|
|
3529
3428
|
Y(g.$slots, "form-actions", {}, () => [
|
|
3530
|
-
e.config.jsonYamlFormsEnabled ? (p(), w("div",
|
|
3531
|
-
|
|
3429
|
+
e.config.jsonYamlFormsEnabled ? (p(), w("div", tl, [
|
|
3430
|
+
M(S, {
|
|
3532
3431
|
appearance: "tertiary",
|
|
3533
3432
|
"data-testid": "form-view-configuration",
|
|
3534
3433
|
onClick: C[0] || (C[0] = (D) => x())
|
|
3535
3434
|
}, {
|
|
3536
|
-
default:
|
|
3537
|
-
z(
|
|
3435
|
+
default: b(() => [
|
|
3436
|
+
z(O(I(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3538
3437
|
]),
|
|
3539
3438
|
_: 1
|
|
3540
3439
|
})
|
|
3541
3440
|
])) : U("", !0),
|
|
3542
|
-
|
|
3441
|
+
M(S, {
|
|
3543
3442
|
appearance: "secondary",
|
|
3544
3443
|
"data-testid": "form-cancel",
|
|
3545
3444
|
disabled: e.isReadonly,
|
|
3546
3445
|
type: "reset"
|
|
3547
3446
|
}, {
|
|
3548
|
-
default:
|
|
3549
|
-
z(
|
|
3447
|
+
default: b(() => [
|
|
3448
|
+
z(O(I(o)("baseForm.actions.cancel")), 1)
|
|
3550
3449
|
]),
|
|
3551
3450
|
_: 1
|
|
3552
3451
|
}, 8, ["disabled"]),
|
|
3553
|
-
|
|
3452
|
+
M(S, {
|
|
3554
3453
|
appearance: "primary",
|
|
3555
3454
|
"data-testid": "form-submit",
|
|
3556
3455
|
disabled: u.value,
|
|
3557
3456
|
type: "submit"
|
|
3558
3457
|
}, {
|
|
3559
|
-
default:
|
|
3560
|
-
z(
|
|
3458
|
+
default: b(() => [
|
|
3459
|
+
z(O(I(o)("baseForm.actions.save")), 1)
|
|
3561
3460
|
]),
|
|
3562
3461
|
_: 1
|
|
3563
3462
|
}, 8, ["disabled"])
|
|
3564
3463
|
], !0)
|
|
3565
3464
|
])
|
|
3566
3465
|
], 32)),
|
|
3567
|
-
|
|
3466
|
+
M(E, {
|
|
3568
3467
|
"close-on-blur": !1,
|
|
3569
3468
|
"data-testid": "form-view-configuration-slideout",
|
|
3570
3469
|
"has-overlay": !1,
|
|
3571
3470
|
"offset-top": 60,
|
|
3572
|
-
title:
|
|
3471
|
+
title: I(o)("baseForm.configuration.title"),
|
|
3573
3472
|
visible: h.value,
|
|
3574
3473
|
onClose: C[1] || (C[1] = (D) => x())
|
|
3575
3474
|
}, {
|
|
3576
|
-
default:
|
|
3577
|
-
|
|
3578
|
-
|
|
3475
|
+
default: b(() => [
|
|
3476
|
+
L("div", null, O(I(o)("baseForm.configuration.message")), 1),
|
|
3477
|
+
M(q, {
|
|
3579
3478
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3580
|
-
tabs:
|
|
3479
|
+
tabs: v.value
|
|
3581
3480
|
}, {
|
|
3582
|
-
json:
|
|
3583
|
-
|
|
3481
|
+
json: b(() => [
|
|
3482
|
+
M(Pt, {
|
|
3584
3483
|
config: e.config,
|
|
3585
3484
|
"fetcher-url": f.value,
|
|
3586
|
-
"json-record":
|
|
3587
|
-
"request-method":
|
|
3485
|
+
"json-record": r.formFields,
|
|
3486
|
+
"request-method": r.editId ? "put" : "post"
|
|
3588
3487
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3589
3488
|
]),
|
|
3590
|
-
yaml:
|
|
3591
|
-
|
|
3592
|
-
"yaml-record":
|
|
3489
|
+
yaml: b(() => [
|
|
3490
|
+
M($n, {
|
|
3491
|
+
"yaml-record": r.formFields
|
|
3593
3492
|
}, null, 8, ["yaml-record"])
|
|
3594
3493
|
]),
|
|
3595
3494
|
_: 1
|
|
@@ -3602,10 +3501,10 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3602
3501
|
});
|
|
3603
3502
|
};
|
|
3604
3503
|
}
|
|
3605
|
-
}),
|
|
3504
|
+
}), Pl = /* @__PURE__ */ re(nl, [["__scopeId", "data-v-2e2d1350"]]), rl = {
|
|
3606
3505
|
key: 0,
|
|
3607
3506
|
"data-testid": "first-col"
|
|
3608
|
-
},
|
|
3507
|
+
}, il = /* @__PURE__ */ V({
|
|
3609
3508
|
__name: "EntityBaseTableCell",
|
|
3610
3509
|
props: {
|
|
3611
3510
|
keyName: {
|
|
@@ -3618,56 +3517,56 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3618
3517
|
}
|
|
3619
3518
|
},
|
|
3620
3519
|
setup(e) {
|
|
3621
|
-
const t = e, n =
|
|
3520
|
+
const t = e, n = A(() => {
|
|
3622
3521
|
var m;
|
|
3623
3522
|
return ((m = t.rowEl) == null ? void 0 : m.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3624
|
-
}),
|
|
3523
|
+
}), r = A(() => {
|
|
3625
3524
|
var m;
|
|
3626
3525
|
return ((m = n.value) == null ? void 0 : m.querySelector('[data-testid="first-col"]')) || null;
|
|
3627
|
-
}),
|
|
3628
|
-
var
|
|
3629
|
-
const m = (
|
|
3630
|
-
return m ? ((
|
|
3526
|
+
}), i = A(() => {
|
|
3527
|
+
var k, B;
|
|
3528
|
+
const m = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3529
|
+
return m ? ((B = m[0]) == null ? void 0 : B.getAttribute("data-testid")) === t.keyName : !1;
|
|
3631
3530
|
});
|
|
3632
3531
|
let o;
|
|
3633
3532
|
const a = () => {
|
|
3634
3533
|
o && (o.disconnect(), o = void 0);
|
|
3635
3534
|
}, l = () => {
|
|
3636
|
-
var m,
|
|
3637
|
-
c.value = ((m =
|
|
3638
|
-
}, s = K({}), c = K(0), d = K(0), u = K(""), h =
|
|
3535
|
+
var m, k, B;
|
|
3536
|
+
c.value = ((m = r.value) == null ? void 0 : m.getBoundingClientRect().width) || 0, d.value = ((k = n.value) == null ? void 0 : k.clientWidth) || 0, u.value = ((B = s.value) == null ? void 0 : B.innerText) || "";
|
|
3537
|
+
}, s = K({}), c = K(0), d = K(0), u = K(""), h = A(() => [r.value, n.value]), f = _e(
|
|
3639
3538
|
h,
|
|
3640
3539
|
(m) => {
|
|
3641
|
-
if (
|
|
3642
|
-
o = new ResizeObserver((
|
|
3540
|
+
if (i.value && (a(), "ResizeObserver" in window && window)) {
|
|
3541
|
+
o = new ResizeObserver((k) => {
|
|
3643
3542
|
window.requestAnimationFrame(() => {
|
|
3644
|
-
!Array.isArray(
|
|
3543
|
+
!Array.isArray(k) || !k.length || l();
|
|
3645
3544
|
});
|
|
3646
3545
|
});
|
|
3647
|
-
for (const
|
|
3648
|
-
|
|
3546
|
+
for (const k of m)
|
|
3547
|
+
k && o.observe(k);
|
|
3649
3548
|
}
|
|
3650
3549
|
},
|
|
3651
3550
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3652
|
-
), x =
|
|
3551
|
+
), x = A(() => i.value ? c.value > d.value : !1);
|
|
3653
3552
|
return Bn(() => {
|
|
3654
3553
|
l();
|
|
3655
3554
|
}), Mn(() => {
|
|
3656
3555
|
f();
|
|
3657
|
-
}), (m,
|
|
3658
|
-
const
|
|
3556
|
+
}), (m, k) => {
|
|
3557
|
+
const B = N("KTooltip");
|
|
3659
3558
|
return p(), w("span", {
|
|
3660
3559
|
ref_key: "contentRef",
|
|
3661
3560
|
ref: s,
|
|
3662
3561
|
class: "content-wrapper"
|
|
3663
3562
|
}, [
|
|
3664
|
-
|
|
3665
|
-
|
|
3563
|
+
i.value ? (p(), w("span", rl, [
|
|
3564
|
+
M(B, {
|
|
3666
3565
|
"max-width": "300",
|
|
3667
3566
|
placement: "bottomStart",
|
|
3668
3567
|
text: x.value ? u.value : ""
|
|
3669
3568
|
}, {
|
|
3670
|
-
default:
|
|
3569
|
+
default: b(() => [
|
|
3671
3570
|
Y(m.$slots, "default", {}, void 0, !0)
|
|
3672
3571
|
]),
|
|
3673
3572
|
_: 3
|
|
@@ -3676,10 +3575,10 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3676
3575
|
], 512);
|
|
3677
3576
|
};
|
|
3678
3577
|
}
|
|
3679
|
-
}),
|
|
3578
|
+
}), ol = /* @__PURE__ */ re(il, [["__scopeId", "data-v-c4379fd4"]]), al = { class: "toolbar-container" }, ll = {
|
|
3680
3579
|
key: 0,
|
|
3681
3580
|
class: "toolbar-button-container"
|
|
3682
|
-
},
|
|
3581
|
+
}, sl = ["data-testid"], cl = /* @__PURE__ */ V({
|
|
3683
3582
|
__name: "EntityBaseTable",
|
|
3684
3583
|
props: {
|
|
3685
3584
|
// table header configuration
|
|
@@ -3789,7 +3688,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3789
3688
|
},
|
|
3790
3689
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3791
3690
|
setup(e, { emit: t }) {
|
|
3792
|
-
const n = e,
|
|
3691
|
+
const n = e, r = t, { i18n: { t: i } } = W.useI18n(), o = A(() => {
|
|
3793
3692
|
var C, y;
|
|
3794
3693
|
return typeof n.errorMessage == "string" ? {
|
|
3795
3694
|
hasError: !!n.errorMessage,
|
|
@@ -3800,7 +3699,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3800
3699
|
title: (C = n.errorMessage) == null ? void 0 : C.title,
|
|
3801
3700
|
message: (y = n.errorMessage) == null ? void 0 : y.message
|
|
3802
3701
|
};
|
|
3803
|
-
}), a =
|
|
3702
|
+
}), a = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (C) => C.hasData || !!n.query, s = A(() => {
|
|
3804
3703
|
const C = [];
|
|
3805
3704
|
return Object.keys(n.tableHeaders).forEach((j) => {
|
|
3806
3705
|
const F = n.tableHeaders[j];
|
|
@@ -3831,42 +3730,43 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3831
3730
|
textOverflow: "ellipsis"
|
|
3832
3731
|
}), y;
|
|
3833
3732
|
}, f = () => {
|
|
3834
|
-
|
|
3733
|
+
r("empty-state-cta-clicked"), x();
|
|
3835
3734
|
}, x = () => {
|
|
3836
|
-
|
|
3837
|
-
}, m =
|
|
3838
|
-
|
|
3839
|
-
}),
|
|
3840
|
-
|
|
3841
|
-
}, { setTablePreferences:
|
|
3842
|
-
const C =
|
|
3735
|
+
r("clear-search-input");
|
|
3736
|
+
}, m = A(() => n.disableRowClick ? void 0 : (C, y) => {
|
|
3737
|
+
r("click:row", y);
|
|
3738
|
+
}), k = (C) => {
|
|
3739
|
+
r("sort", C);
|
|
3740
|
+
}, { setTablePreferences: B, getTablePreferences: v } = Yn(), $ = A(() => {
|
|
3741
|
+
const C = v(n.preferencesStorageKey);
|
|
3843
3742
|
return {
|
|
3844
3743
|
...n.initialFetcherParams,
|
|
3845
3744
|
...C
|
|
3846
3745
|
};
|
|
3847
3746
|
}), g = (C) => {
|
|
3848
|
-
n.preferencesStorageKey &&
|
|
3747
|
+
n.preferencesStorageKey && B(n.preferencesStorageKey, C);
|
|
3849
3748
|
};
|
|
3850
3749
|
return (C, y) => {
|
|
3851
|
-
const j =
|
|
3750
|
+
const j = N("KIcon"), F = N("KButton"), S = N("KDropdown"), q = N("KTable"), E = N("KCard");
|
|
3852
3751
|
return p(), R(E, {
|
|
3853
3752
|
class: "kong-ui-entity-base-table",
|
|
3854
3753
|
title: e.title
|
|
3855
3754
|
}, {
|
|
3856
|
-
default:
|
|
3857
|
-
|
|
3755
|
+
default: b(() => [
|
|
3756
|
+
M(q, {
|
|
3858
3757
|
ref_key: "tableRefs",
|
|
3859
3758
|
ref: d,
|
|
3860
3759
|
"cache-identifier": a.value,
|
|
3861
3760
|
"cell-attrs": h,
|
|
3862
3761
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3863
3762
|
"disable-sorting": e.disableSorting,
|
|
3864
|
-
"empty-state-action-button-
|
|
3865
|
-
"empty-state-action-message": e.query ?
|
|
3763
|
+
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3764
|
+
"empty-state-action-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3866
3765
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3867
|
-
"empty-state-icon
|
|
3868
|
-
"empty-state-
|
|
3869
|
-
"empty-state-
|
|
3766
|
+
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3767
|
+
"empty-state-icon-size": "96",
|
|
3768
|
+
"empty-state-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3769
|
+
"empty-state-title": e.query ? I(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3870
3770
|
"enable-client-sort": e.enableClientSort,
|
|
3871
3771
|
"error-state-message": o.value.message,
|
|
3872
3772
|
"error-state-title": o.value.title,
|
|
@@ -3882,44 +3782,44 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3882
3782
|
"search-input": e.query,
|
|
3883
3783
|
onKtableEmptyStateCtaClicked: f,
|
|
3884
3784
|
"onRow:click": m.value,
|
|
3885
|
-
onSort: y[0] || (y[0] = (T) =>
|
|
3785
|
+
onSort: y[0] || (y[0] = (T) => k(T)),
|
|
3886
3786
|
"onUpdate:tablePreferences": g
|
|
3887
|
-
},
|
|
3888
|
-
toolbar:
|
|
3889
|
-
ke(
|
|
3787
|
+
}, be({
|
|
3788
|
+
toolbar: b(({ state: T }) => [
|
|
3789
|
+
ke(L("div", al, [
|
|
3890
3790
|
Y(C.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3891
|
-
C.$slots["toolbar-button"] ? (p(), w("div",
|
|
3791
|
+
C.$slots["toolbar-button"] ? (p(), w("div", ll, [
|
|
3892
3792
|
Y(C.$slots, "toolbar-button", {}, void 0, !0)
|
|
3893
3793
|
])) : U("", !0)
|
|
3894
3794
|
], 512), [
|
|
3895
3795
|
[Ae, l(T)]
|
|
3896
3796
|
])
|
|
3897
3797
|
]),
|
|
3898
|
-
actions:
|
|
3899
|
-
|
|
3798
|
+
actions: b(({ row: T, rowKey: D, rowValue: P }) => [
|
|
3799
|
+
L("div", {
|
|
3900
3800
|
class: "actions-container",
|
|
3901
3801
|
"data-testid": T.name
|
|
3902
3802
|
}, [
|
|
3903
|
-
|
|
3803
|
+
M(S, {
|
|
3904
3804
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3905
3805
|
width: e.dropdownMenuWidth
|
|
3906
3806
|
}, {
|
|
3907
|
-
items:
|
|
3807
|
+
items: b(() => [
|
|
3908
3808
|
Y(C.$slots, "actions", {
|
|
3909
3809
|
row: T,
|
|
3910
3810
|
rowKey: D,
|
|
3911
3811
|
rowValue: P
|
|
3912
3812
|
}, void 0, !0)
|
|
3913
3813
|
]),
|
|
3914
|
-
default:
|
|
3915
|
-
|
|
3814
|
+
default: b(() => [
|
|
3815
|
+
M(F, {
|
|
3916
3816
|
class: "actions-trigger",
|
|
3917
3817
|
"data-testid": "overflow-actions-button",
|
|
3918
3818
|
size: "small"
|
|
3919
3819
|
}, {
|
|
3920
|
-
icon:
|
|
3921
|
-
|
|
3922
|
-
color:
|
|
3820
|
+
icon: b(() => [
|
|
3821
|
+
M(j, {
|
|
3822
|
+
color: I(Dr),
|
|
3923
3823
|
icon: "more",
|
|
3924
3824
|
size: "16"
|
|
3925
3825
|
}, null, 8, ["color"])
|
|
@@ -3929,50 +3829,43 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
3929
3829
|
]),
|
|
3930
3830
|
_: 2
|
|
3931
3831
|
}, 1032, ["width"])
|
|
3932
|
-
], 8,
|
|
3832
|
+
], 8, sl)
|
|
3933
3833
|
]),
|
|
3934
3834
|
_: 2
|
|
3935
3835
|
}, [
|
|
3936
|
-
e.
|
|
3937
|
-
name: "empty-state-icon",
|
|
3938
|
-
fn: v(() => [
|
|
3939
|
-
N(S(el))
|
|
3940
|
-
]),
|
|
3941
|
-
key: "0"
|
|
3942
|
-
},
|
|
3943
|
-
re(e.tableHeaders, (T, D) => ({
|
|
3836
|
+
ie(e.tableHeaders, (T, D) => ({
|
|
3944
3837
|
name: D,
|
|
3945
|
-
fn:
|
|
3946
|
-
|
|
3838
|
+
fn: b(({ row: P, rowKey: G, rowValue: de }) => [
|
|
3839
|
+
M(ol, {
|
|
3947
3840
|
"key-name": String(D),
|
|
3948
3841
|
"row-el": u(P)
|
|
3949
3842
|
}, {
|
|
3950
|
-
default:
|
|
3843
|
+
default: b(() => [
|
|
3951
3844
|
Y(C.$slots, D, {
|
|
3952
3845
|
row: P,
|
|
3953
3846
|
rowKey: G,
|
|
3954
|
-
rowValue:
|
|
3847
|
+
rowValue: de
|
|
3955
3848
|
}, () => [
|
|
3956
|
-
z(
|
|
3849
|
+
z(O(de), 1)
|
|
3957
3850
|
], !0)
|
|
3958
3851
|
]),
|
|
3959
3852
|
_: 2
|
|
3960
3853
|
}, 1032, ["key-name", "row-el"])
|
|
3961
3854
|
])
|
|
3962
3855
|
}))
|
|
3963
|
-
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-
|
|
3856
|
+
]), 1032, ["cache-identifier", "disable-pagination-page-jump", "disable-sorting", "empty-state-action-button-icon", "empty-state-action-message", "empty-state-action-route", "empty-state-icon", "empty-state-message", "empty-state-title", "enable-client-sort", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "has-error", "headers", "initial-fetcher-params", "is-loading", "pagination-type", "search-input", "onRow:click"])
|
|
3964
3857
|
]),
|
|
3965
3858
|
_: 3
|
|
3966
3859
|
}, 8, ["title"]);
|
|
3967
3860
|
};
|
|
3968
3861
|
}
|
|
3969
|
-
}),
|
|
3862
|
+
}), Hl = /* @__PURE__ */ re(cl, [["__scopeId", "data-v-ecfaa7cf"]]), ul = {
|
|
3970
3863
|
key: 0,
|
|
3971
3864
|
class: "kong-ui-entity-delete-error"
|
|
3972
|
-
},
|
|
3865
|
+
}, dl = {
|
|
3973
3866
|
key: 1,
|
|
3974
3867
|
class: "description"
|
|
3975
|
-
},
|
|
3868
|
+
}, fl = /* @__PURE__ */ V({
|
|
3976
3869
|
__name: "EntityDeleteModal",
|
|
3977
3870
|
props: {
|
|
3978
3871
|
visible: {
|
|
@@ -4011,13 +3904,13 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4011
3904
|
},
|
|
4012
3905
|
emits: ["cancel", "proceed"],
|
|
4013
3906
|
setup(e, { emit: t }) {
|
|
4014
|
-
const { i18nT: n } = W.useI18n(),
|
|
4015
|
-
|
|
3907
|
+
const { i18nT: n } = W.useI18n(), r = e, i = t, o = A(() => r.needConfirm ? r.entityName : ""), a = () => {
|
|
3908
|
+
i("cancel");
|
|
4016
3909
|
}, l = () => {
|
|
4017
|
-
|
|
3910
|
+
i("proceed");
|
|
4018
3911
|
};
|
|
4019
3912
|
return (s, c) => {
|
|
4020
|
-
const d =
|
|
3913
|
+
const d = N("KAlert"), u = N("KPrompt");
|
|
4021
3914
|
return p(), R(u, {
|
|
4022
3915
|
"action-button-appearance": "danger",
|
|
4023
3916
|
"action-button-disabled": e.actionPending,
|
|
@@ -4029,36 +3922,36 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4029
3922
|
onCancel: a,
|
|
4030
3923
|
onProceed: l
|
|
4031
3924
|
}, {
|
|
4032
|
-
default:
|
|
4033
|
-
e.error ? (p(), w("div",
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
z(
|
|
3925
|
+
default: b(() => [
|
|
3926
|
+
e.error ? (p(), w("div", ul, [
|
|
3927
|
+
M(d, { appearance: "danger" }, {
|
|
3928
|
+
alertMessage: b(() => [
|
|
3929
|
+
z(O(e.error), 1)
|
|
4037
3930
|
]),
|
|
4038
3931
|
_: 1
|
|
4039
3932
|
})
|
|
4040
3933
|
])) : U("", !0),
|
|
4041
|
-
|
|
3934
|
+
M(I(n), {
|
|
4042
3935
|
class: "message",
|
|
4043
|
-
keypath:
|
|
3936
|
+
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4044
3937
|
tag: "p"
|
|
4045
|
-
},
|
|
4046
|
-
entityType:
|
|
4047
|
-
z(
|
|
3938
|
+
}, be({
|
|
3939
|
+
entityType: b(() => [
|
|
3940
|
+
z(O(r.entityType), 1)
|
|
4048
3941
|
]),
|
|
4049
3942
|
_: 2
|
|
4050
3943
|
}, [
|
|
4051
|
-
|
|
3944
|
+
r.entityName ? {
|
|
4052
3945
|
name: "entityName",
|
|
4053
|
-
fn:
|
|
4054
|
-
|
|
3946
|
+
fn: b(() => [
|
|
3947
|
+
L("strong", null, O(r.entityName), 1)
|
|
4055
3948
|
]),
|
|
4056
3949
|
key: "0"
|
|
4057
3950
|
} : void 0
|
|
4058
3951
|
]), 1032, ["keypath"]),
|
|
4059
|
-
|
|
3952
|
+
r.description || s.$slots.description ? (p(), w("div", dl, [
|
|
4060
3953
|
Y(s.$slots, "description", {}, () => [
|
|
4061
|
-
|
|
3954
|
+
L("p", null, O(r.description), 1)
|
|
4062
3955
|
], !0)
|
|
4063
3956
|
])) : U("", !0)
|
|
4064
3957
|
]),
|
|
@@ -4066,13 +3959,13 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4066
3959
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
4067
3960
|
};
|
|
4068
3961
|
}
|
|
4069
|
-
}),
|
|
3962
|
+
}), Vl = /* @__PURE__ */ re(fl, [["__scopeId", "data-v-efe8f34b"]]), pl = {
|
|
4070
3963
|
fill: "none",
|
|
4071
3964
|
height: "20",
|
|
4072
3965
|
viewBox: "0 0 20 20",
|
|
4073
3966
|
width: "20",
|
|
4074
3967
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4075
|
-
},
|
|
3968
|
+
}, hl = {
|
|
4076
3969
|
id: "mask0_180_20349",
|
|
4077
3970
|
height: "20",
|
|
4078
3971
|
maskUnits: "userSpaceOnUse",
|
|
@@ -4080,35 +3973,35 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4080
3973
|
width: "20",
|
|
4081
3974
|
x: "0",
|
|
4082
3975
|
y: "0"
|
|
4083
|
-
},
|
|
3976
|
+
}, ml = ["fill"], gl = { mask: "url(#mask0_180_20349)" }, yl = ["fill"], Ot = /* @__PURE__ */ V({
|
|
4084
3977
|
__name: "IconFilter",
|
|
4085
3978
|
props: {
|
|
4086
3979
|
color: {
|
|
4087
3980
|
type: String,
|
|
4088
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3981
|
+
default: `var(--kong-ui-entity-filter-color, ${Rr})`
|
|
4089
3982
|
}
|
|
4090
3983
|
},
|
|
4091
3984
|
setup(e) {
|
|
4092
|
-
return (t, n) => (p(), w("svg",
|
|
4093
|
-
|
|
4094
|
-
|
|
3985
|
+
return (t, n) => (p(), w("svg", pl, [
|
|
3986
|
+
L("mask", hl, [
|
|
3987
|
+
L("rect", {
|
|
4095
3988
|
fill: e.color,
|
|
4096
3989
|
height: "20",
|
|
4097
3990
|
width: "20"
|
|
4098
|
-
}, null, 8,
|
|
3991
|
+
}, null, 8, ml)
|
|
4099
3992
|
]),
|
|
4100
|
-
|
|
4101
|
-
|
|
3993
|
+
L("g", gl, [
|
|
3994
|
+
L("path", {
|
|
4102
3995
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4103
3996
|
fill: e.color
|
|
4104
|
-
}, null, 8,
|
|
3997
|
+
}, null, 8, yl)
|
|
4105
3998
|
])
|
|
4106
3999
|
]));
|
|
4107
4000
|
}
|
|
4108
|
-
}),
|
|
4001
|
+
}), vl = {
|
|
4109
4002
|
key: 1,
|
|
4110
4003
|
class: "kong-ui-entity-filter"
|
|
4111
|
-
},
|
|
4004
|
+
}, bl = { class: "menu-item-title" }, xl = { class: "menu-item-indicator" }, Cl = { class: "menu-item-body" }, _l = ["for"], kl = { class: "menu-item-buttons" }, Al = { class: "filter-clear-button-container" }, wl = /* @__PURE__ */ V({
|
|
4112
4005
|
__name: "EntityFilter",
|
|
4113
4006
|
props: {
|
|
4114
4007
|
// filter config, either exact match or fuzzy match
|
|
@@ -4128,51 +4021,51 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4128
4021
|
},
|
|
4129
4022
|
emits: ["update:modelValue"],
|
|
4130
4023
|
setup(e, { emit: t }) {
|
|
4131
|
-
const { i18n: { t: n } } = W.useI18n(),
|
|
4132
|
-
const
|
|
4133
|
-
return new URLSearchParams(
|
|
4134
|
-
$ !== "" &&
|
|
4135
|
-
}),
|
|
4136
|
-
}), s =
|
|
4137
|
-
const
|
|
4138
|
-
return Object.keys(
|
|
4139
|
-
label:
|
|
4024
|
+
const { i18n: { t: n } } = W.useI18n(), r = e, i = t, o = K(!1), a = K({}), l = A(() => {
|
|
4025
|
+
const v = [];
|
|
4026
|
+
return new URLSearchParams(r.modelValue).forEach(($, g) => {
|
|
4027
|
+
$ !== "" && v.push(g);
|
|
4028
|
+
}), v;
|
|
4029
|
+
}), s = A(() => {
|
|
4030
|
+
const v = r.config.fields;
|
|
4031
|
+
return Object.keys(v).filter(($) => v[$].searchable).map(($) => ({
|
|
4032
|
+
label: v[$].label || $,
|
|
4140
4033
|
value: $
|
|
4141
4034
|
}));
|
|
4142
4035
|
});
|
|
4143
|
-
_e(() =>
|
|
4144
|
-
a.value = {}, new URLSearchParams(
|
|
4036
|
+
_e(() => r.modelValue, (v) => {
|
|
4037
|
+
a.value = {}, new URLSearchParams(v).forEach(($, g) => {
|
|
4145
4038
|
a.value[g] = $;
|
|
4146
4039
|
});
|
|
4147
4040
|
});
|
|
4148
4041
|
const c = () => {
|
|
4149
4042
|
o.value = !o.value;
|
|
4150
|
-
}, d = (
|
|
4151
|
-
|
|
4043
|
+
}, d = (v) => {
|
|
4044
|
+
i("update:modelValue", v);
|
|
4152
4045
|
}, u = () => {
|
|
4153
4046
|
d("");
|
|
4154
|
-
}, h = (
|
|
4047
|
+
}, h = (v) => `filter-${v}`, f = (v) => {
|
|
4155
4048
|
var $, g;
|
|
4156
|
-
return (((g = ($ =
|
|
4049
|
+
return (((g = ($ = r.config.schema) == null ? void 0 : $[v]) == null ? void 0 : g.values) ?? []).map((C) => ({
|
|
4157
4050
|
value: C,
|
|
4158
4051
|
label: C
|
|
4159
4052
|
}));
|
|
4160
|
-
}, x = (
|
|
4053
|
+
}, x = (v) => {
|
|
4161
4054
|
var $, g;
|
|
4162
|
-
return ((g = ($ =
|
|
4163
|
-
}, m = (
|
|
4055
|
+
return ((g = ($ = r.config.schema) == null ? void 0 : $[v]) == null ? void 0 : g.type) ?? "text";
|
|
4056
|
+
}, m = (v) => {
|
|
4164
4057
|
a.value = {
|
|
4165
4058
|
...a.value,
|
|
4166
|
-
[
|
|
4167
|
-
},
|
|
4168
|
-
},
|
|
4169
|
-
a.value = {},
|
|
4170
|
-
},
|
|
4059
|
+
[v]: ""
|
|
4060
|
+
}, B();
|
|
4061
|
+
}, k = () => {
|
|
4062
|
+
a.value = {}, B(!0);
|
|
4063
|
+
}, B = (v = !1) => {
|
|
4171
4064
|
const $ = Object.keys(a.value).reduce((g, C) => (a.value[C] && (g[C] = `${a.value[C]}`), g), {});
|
|
4172
|
-
|
|
4065
|
+
v && (o.value = !1), i("update:modelValue", new URLSearchParams($).toString());
|
|
4173
4066
|
};
|
|
4174
|
-
return (
|
|
4175
|
-
const g =
|
|
4067
|
+
return (v, $) => {
|
|
4068
|
+
const g = N("KInput"), C = N("KButton"), y = N("KSelect"), j = N("KMenuItem"), F = N("KMenu");
|
|
4176
4069
|
return e.config.isExactMatch ? (p(), R(g, {
|
|
4177
4070
|
key: 0,
|
|
4178
4071
|
autocomplete: "off",
|
|
@@ -4182,11 +4075,11 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4182
4075
|
placeholder: e.config.placeholder,
|
|
4183
4076
|
"onUpdate:modelValue": d
|
|
4184
4077
|
}, {
|
|
4185
|
-
before:
|
|
4186
|
-
|
|
4078
|
+
before: b(() => [
|
|
4079
|
+
M(Ot)
|
|
4187
4080
|
]),
|
|
4188
|
-
after:
|
|
4189
|
-
ke(
|
|
4081
|
+
after: b(() => [
|
|
4082
|
+
ke(M(I(qa), {
|
|
4190
4083
|
class: "kong-ui-entity-filter-clear",
|
|
4191
4084
|
onClick: u
|
|
4192
4085
|
}, null, 512), [
|
|
@@ -4194,85 +4087,85 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4194
4087
|
])
|
|
4195
4088
|
]),
|
|
4196
4089
|
_: 1
|
|
4197
|
-
}, 8, ["model-value", "placeholder"])) : (p(), w("div",
|
|
4198
|
-
|
|
4090
|
+
}, 8, ["model-value", "placeholder"])) : (p(), w("div", vl, [
|
|
4091
|
+
M(C, {
|
|
4199
4092
|
appearance: "tertiary",
|
|
4200
4093
|
"data-testid": "filter-button",
|
|
4201
4094
|
onClick: c
|
|
4202
4095
|
}, {
|
|
4203
|
-
default:
|
|
4204
|
-
|
|
4205
|
-
z(" " +
|
|
4096
|
+
default: b(() => [
|
|
4097
|
+
M(Ot),
|
|
4098
|
+
z(" " + O(I(n)("filter.filterButtonText")) + " " + O(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4206
4099
|
]),
|
|
4207
4100
|
_: 1
|
|
4208
4101
|
}),
|
|
4209
|
-
ke(
|
|
4102
|
+
ke(L("div", {
|
|
4210
4103
|
class: "kong-ui-entity-filter-backdrop",
|
|
4211
4104
|
onClick: c
|
|
4212
4105
|
}, null, 512), [
|
|
4213
4106
|
[Ae, o.value]
|
|
4214
4107
|
]),
|
|
4215
|
-
ke(
|
|
4216
|
-
body:
|
|
4217
|
-
(p(!0), w(ae, null,
|
|
4218
|
-
key:
|
|
4219
|
-
"data-testid":
|
|
4108
|
+
ke(M(F, { class: "kong-ui-entity-filter-menu" }, {
|
|
4109
|
+
body: b(() => [
|
|
4110
|
+
(p(!0), w(ae, null, ie(s.value, (S, q) => (p(), R(j, {
|
|
4111
|
+
key: S.value,
|
|
4112
|
+
"data-testid": S.value,
|
|
4220
4113
|
expandable: "",
|
|
4221
4114
|
"last-menu-item": q === s.value.length - 1
|
|
4222
4115
|
}, {
|
|
4223
|
-
itemTitle:
|
|
4224
|
-
|
|
4225
|
-
z(
|
|
4226
|
-
ke(
|
|
4227
|
-
[Ae, l.value.includes(
|
|
4116
|
+
itemTitle: b(() => [
|
|
4117
|
+
L("span", bl, [
|
|
4118
|
+
z(O(S.label) + " ", 1),
|
|
4119
|
+
ke(L("span", xl, null, 512), [
|
|
4120
|
+
[Ae, l.value.includes(S.value)]
|
|
4228
4121
|
])
|
|
4229
4122
|
])
|
|
4230
4123
|
]),
|
|
4231
|
-
itemBody:
|
|
4124
|
+
itemBody: b(() => {
|
|
4232
4125
|
var E, T;
|
|
4233
4126
|
return [
|
|
4234
|
-
|
|
4235
|
-
|
|
4127
|
+
L("div", Cl, [
|
|
4128
|
+
L("label", {
|
|
4236
4129
|
class: "menu-item-label",
|
|
4237
|
-
for: h(
|
|
4238
|
-
},
|
|
4239
|
-
((T = (E = e.config.schema) == null ? void 0 : E[
|
|
4130
|
+
for: h(S.value)
|
|
4131
|
+
}, O(I(n)("filter.fieldLabel")), 9, _l),
|
|
4132
|
+
((T = (E = e.config.schema) == null ? void 0 : E[S.value]) == null ? void 0 : T.type) === "select" ? (p(), R(y, {
|
|
4240
4133
|
key: 0,
|
|
4241
|
-
id: h(
|
|
4242
|
-
modelValue: a.value[
|
|
4243
|
-
"onUpdate:modelValue": (D) => a.value[
|
|
4244
|
-
items: f(
|
|
4245
|
-
placeholder:
|
|
4134
|
+
id: h(S.value),
|
|
4135
|
+
modelValue: a.value[S.value],
|
|
4136
|
+
"onUpdate:modelValue": (D) => a.value[S.value] = D,
|
|
4137
|
+
items: f(S.value),
|
|
4138
|
+
placeholder: I(n)("filter.selectPlaceholder")
|
|
4246
4139
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(), R(g, {
|
|
4247
4140
|
key: 1,
|
|
4248
|
-
id: h(
|
|
4249
|
-
modelValue: a.value[
|
|
4250
|
-
"onUpdate:modelValue": (D) => a.value[
|
|
4141
|
+
id: h(S.value),
|
|
4142
|
+
modelValue: a.value[S.value],
|
|
4143
|
+
"onUpdate:modelValue": (D) => a.value[S.value] = D,
|
|
4251
4144
|
autocomplete: "off",
|
|
4252
|
-
placeholder:
|
|
4253
|
-
type: x(
|
|
4145
|
+
placeholder: I(n)("filter.inputPlaceholder"),
|
|
4146
|
+
type: x(S.value)
|
|
4254
4147
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4255
4148
|
]),
|
|
4256
|
-
|
|
4257
|
-
|
|
4149
|
+
L("div", kl, [
|
|
4150
|
+
M(C, {
|
|
4258
4151
|
appearance: "tertiary",
|
|
4259
4152
|
"data-testid": "apply-filter",
|
|
4260
4153
|
size: "small",
|
|
4261
|
-
onClick: $[0] || ($[0] = (D) =>
|
|
4154
|
+
onClick: $[0] || ($[0] = (D) => B(!0))
|
|
4262
4155
|
}, {
|
|
4263
|
-
default:
|
|
4264
|
-
z(
|
|
4156
|
+
default: b(() => [
|
|
4157
|
+
z(O(I(n)("filter.applyButtonText")), 1)
|
|
4265
4158
|
]),
|
|
4266
4159
|
_: 1
|
|
4267
4160
|
}),
|
|
4268
|
-
|
|
4161
|
+
M(C, {
|
|
4269
4162
|
appearance: "tertiary",
|
|
4270
4163
|
"data-testid": "clear-filter",
|
|
4271
4164
|
size: "small",
|
|
4272
|
-
onClick: (D) => m(
|
|
4165
|
+
onClick: (D) => m(S.value)
|
|
4273
4166
|
}, {
|
|
4274
|
-
default:
|
|
4275
|
-
z(
|
|
4167
|
+
default: b(() => [
|
|
4168
|
+
z(O(I(n)("filter.clearButtonText")), 1)
|
|
4276
4169
|
]),
|
|
4277
4170
|
_: 2
|
|
4278
4171
|
}, 1032, ["onClick"])
|
|
@@ -4282,15 +4175,15 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4282
4175
|
_: 2
|
|
4283
4176
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
4284
4177
|
]),
|
|
4285
|
-
actionButton:
|
|
4286
|
-
|
|
4287
|
-
|
|
4178
|
+
actionButton: b(() => [
|
|
4179
|
+
L("div", Al, [
|
|
4180
|
+
M(C, {
|
|
4288
4181
|
appearance: "tertiary",
|
|
4289
4182
|
size: "small",
|
|
4290
|
-
onClick:
|
|
4183
|
+
onClick: k
|
|
4291
4184
|
}, {
|
|
4292
|
-
default:
|
|
4293
|
-
z(
|
|
4185
|
+
default: b(() => [
|
|
4186
|
+
z(O(I(n)("filter.clearAllButtonText")), 1)
|
|
4294
4187
|
]),
|
|
4295
4188
|
_: 1
|
|
4296
4189
|
})
|
|
@@ -4303,7 +4196,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4303
4196
|
]));
|
|
4304
4197
|
};
|
|
4305
4198
|
}
|
|
4306
|
-
}),
|
|
4199
|
+
}), Yl = /* @__PURE__ */ re(wl, [["__scopeId", "data-v-206cc415"]]), zl = /* @__PURE__ */ V({
|
|
4307
4200
|
__name: "EntityToggleModal",
|
|
4308
4201
|
props: {
|
|
4309
4202
|
visible: {
|
|
@@ -4335,15 +4228,15 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4335
4228
|
},
|
|
4336
4229
|
emits: ["cancel", "proceed"],
|
|
4337
4230
|
setup(e, { emit: t }) {
|
|
4338
|
-
const { i18n: { t: n }, i18nT:
|
|
4339
|
-
() =>
|
|
4340
|
-
), s =
|
|
4341
|
-
() =>
|
|
4231
|
+
const { i18n: { t: n }, i18nT: r } = W.useI18n(), i = e, o = t, a = K(!1), l = A(
|
|
4232
|
+
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
4233
|
+
), s = A(
|
|
4234
|
+
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4342
4235
|
), c = () => o("cancel"), d = async () => {
|
|
4343
|
-
if (
|
|
4236
|
+
if (i.onConfirm) {
|
|
4344
4237
|
a.value = !0;
|
|
4345
4238
|
try {
|
|
4346
|
-
await
|
|
4239
|
+
await i.onConfirm(), o("proceed");
|
|
4347
4240
|
} catch (u) {
|
|
4348
4241
|
console.error(u);
|
|
4349
4242
|
} finally {
|
|
@@ -4352,9 +4245,9 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4352
4245
|
}
|
|
4353
4246
|
};
|
|
4354
4247
|
return (u, h) => {
|
|
4355
|
-
const f =
|
|
4248
|
+
const f = N("KPrompt");
|
|
4356
4249
|
return p(), R(Rn, { to: "body" }, [
|
|
4357
|
-
|
|
4250
|
+
M(f, {
|
|
4358
4251
|
"action-button-disabled": a.value,
|
|
4359
4252
|
"action-button-text": s.value,
|
|
4360
4253
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4363,16 +4256,16 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4363
4256
|
onCancel: c,
|
|
4364
4257
|
onProceed: d
|
|
4365
4258
|
}, {
|
|
4366
|
-
default:
|
|
4367
|
-
|
|
4368
|
-
keypath: `toggleModal.${
|
|
4259
|
+
default: b(() => [
|
|
4260
|
+
M(I(r), {
|
|
4261
|
+
keypath: `toggleModal.${i.action}.message`,
|
|
4369
4262
|
scope: "global"
|
|
4370
4263
|
}, {
|
|
4371
|
-
entityType:
|
|
4372
|
-
z(
|
|
4264
|
+
entityType: b(() => [
|
|
4265
|
+
z(O(e.entityType), 1)
|
|
4373
4266
|
]),
|
|
4374
|
-
entityName:
|
|
4375
|
-
|
|
4267
|
+
entityName: b(() => [
|
|
4268
|
+
L("strong", null, O(e.entityName), 1)
|
|
4376
4269
|
]),
|
|
4377
4270
|
_: 1
|
|
4378
4271
|
}, 8, ["keypath"])
|
|
@@ -4382,7 +4275,7 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4382
4275
|
]);
|
|
4383
4276
|
};
|
|
4384
4277
|
}
|
|
4385
|
-
}),
|
|
4278
|
+
}), Wl = /* @__PURE__ */ V({
|
|
4386
4279
|
__name: "PermissionsWrapper",
|
|
4387
4280
|
props: {
|
|
4388
4281
|
/**
|
|
@@ -4404,24 +4297,24 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4404
4297
|
}
|
|
4405
4298
|
},
|
|
4406
4299
|
setup(e) {
|
|
4407
|
-
const t = e, n = K(void 0),
|
|
4300
|
+
const t = e, n = K(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4408
4301
|
return _e(() => t.authFunction, async () => {
|
|
4409
4302
|
n.value = await t.authFunction();
|
|
4410
|
-
}, { immediate: !0 }), (
|
|
4303
|
+
}, { immediate: !0 }), (i, o) => r.value ? Y(i.$slots, "default", {
|
|
4411
4304
|
key: 0,
|
|
4412
4305
|
isAllowed: n.value
|
|
4413
4306
|
}) : U("", !0);
|
|
4414
4307
|
}
|
|
4415
|
-
}),
|
|
4308
|
+
}), Sl = { class: "form-section-wrapper" }, Il = {
|
|
4416
4309
|
key: 0,
|
|
4417
4310
|
class: "form-section-title"
|
|
4418
|
-
},
|
|
4311
|
+
}, El = {
|
|
4419
4312
|
key: 1,
|
|
4420
4313
|
class: "form-section-description"
|
|
4421
|
-
},
|
|
4314
|
+
}, Tl = {
|
|
4422
4315
|
key: 2,
|
|
4423
4316
|
class: "form-section-footer"
|
|
4424
|
-
},
|
|
4317
|
+
}, Fl = { class: "form-section-content" }, Ol = /* @__PURE__ */ V({
|
|
4425
4318
|
__name: "EntityFormSection",
|
|
4426
4319
|
props: {
|
|
4427
4320
|
title: {
|
|
@@ -4446,38 +4339,38 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4446
4339
|
}
|
|
4447
4340
|
},
|
|
4448
4341
|
setup(e) {
|
|
4449
|
-
const t =
|
|
4450
|
-
return (n,
|
|
4451
|
-
class:
|
|
4342
|
+
const t = Ge();
|
|
4343
|
+
return (n, r) => (p(), w("fieldset", {
|
|
4344
|
+
class: pe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4452
4345
|
}, [
|
|
4453
|
-
|
|
4346
|
+
L("div", Sl, [
|
|
4454
4347
|
e.hideInfoHeader ? U("", !0) : (p(), w("div", {
|
|
4455
4348
|
key: 0,
|
|
4456
|
-
class:
|
|
4349
|
+
class: pe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4457
4350
|
}, [
|
|
4458
|
-
e.title ? (p(), w("h4",
|
|
4459
|
-
e.description ||
|
|
4351
|
+
e.title ? (p(), w("h4", Il, O(e.title), 1)) : U("", !0),
|
|
4352
|
+
e.description || I(t).description ? (p(), w("div", El, [
|
|
4460
4353
|
Y(n.$slots, "description", {}, () => [
|
|
4461
|
-
|
|
4354
|
+
L("p", null, O(e.description), 1)
|
|
4462
4355
|
], !0)
|
|
4463
4356
|
])) : U("", !0),
|
|
4464
|
-
|
|
4357
|
+
I(t).footer ? (p(), w("div", Tl, [
|
|
4465
4358
|
Y(n.$slots, "footer", {}, void 0, !0)
|
|
4466
4359
|
])) : U("", !0)
|
|
4467
4360
|
], 2)),
|
|
4468
|
-
|
|
4361
|
+
L("div", Fl, [
|
|
4469
4362
|
Y(n.$slots, "default", {}, void 0, !0)
|
|
4470
4363
|
])
|
|
4471
4364
|
])
|
|
4472
4365
|
], 2));
|
|
4473
4366
|
}
|
|
4474
|
-
}),
|
|
4367
|
+
}), Jl = /* @__PURE__ */ re(Ol, [["__scopeId", "data-v-3565daa7"]]), $l = {
|
|
4475
4368
|
class: "kong-ui-public-entity-link",
|
|
4476
4369
|
"data-testid": "entity-link-parent"
|
|
4477
|
-
},
|
|
4370
|
+
}, Ll = {
|
|
4478
4371
|
key: 0,
|
|
4479
4372
|
class: "deleted-entity"
|
|
4480
|
-
},
|
|
4373
|
+
}, Nl = { key: 1 }, Bl = ["onClick"], Ml = /* @__PURE__ */ V({
|
|
4481
4374
|
__name: "EntityLink",
|
|
4482
4375
|
props: {
|
|
4483
4376
|
entityLinkData: {
|
|
@@ -4501,37 +4394,37 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4501
4394
|
}
|
|
4502
4395
|
},
|
|
4503
4396
|
setup(e) {
|
|
4504
|
-
const t = e, n = K(), { isTruncated:
|
|
4505
|
-
await u(s.value || "") && (a.value =
|
|
4397
|
+
const t = e, n = K(), { isTruncated: r } = W.useTruncationDetector(n), { i18n: { t: i } } = W.useI18n(), o = i("global.actions.copyId"), a = K(o), l = A(() => t.entityLinkData.deleted ?? !1), s = A(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), c = A(() => `${s.value.toString().slice(0, 5)} (deleted)`), d = async (u) => {
|
|
4398
|
+
await u(s.value || "") && (a.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4506
4399
|
a.value = o;
|
|
4507
4400
|
}, 1800));
|
|
4508
4401
|
};
|
|
4509
4402
|
return (u, h) => {
|
|
4510
|
-
const f =
|
|
4511
|
-
return p(), w("div",
|
|
4512
|
-
l.value ? (p(), w("div",
|
|
4403
|
+
const f = N("KTooltip"), x = N("KExternalLink"), m = N("KClipboardProvider");
|
|
4404
|
+
return p(), w("div", $l, [
|
|
4405
|
+
l.value ? (p(), w("div", Ll, O(c.value), 1)) : s.value ? s.value ? (p(), R(x, {
|
|
4513
4406
|
key: 2,
|
|
4514
4407
|
class: "entity-link",
|
|
4515
4408
|
"hide-icon": !e.newWindow,
|
|
4516
4409
|
href: e.externalLink,
|
|
4517
4410
|
target: e.newWindow ? "_blank" : "_self"
|
|
4518
4411
|
}, {
|
|
4519
|
-
default:
|
|
4520
|
-
|
|
4521
|
-
text:
|
|
4412
|
+
default: b(() => [
|
|
4413
|
+
M(f, {
|
|
4414
|
+
text: I(r) && e.entityLinkData.label || ""
|
|
4522
4415
|
}, {
|
|
4523
|
-
default:
|
|
4524
|
-
|
|
4416
|
+
default: b(() => [
|
|
4417
|
+
L("span", {
|
|
4525
4418
|
ref_key: "textContent",
|
|
4526
4419
|
ref: n,
|
|
4527
4420
|
class: "entity-link-label"
|
|
4528
|
-
},
|
|
4421
|
+
}, O(e.entityLinkData.label), 513)
|
|
4529
4422
|
]),
|
|
4530
4423
|
_: 1
|
|
4531
4424
|
}, 8, ["text"])
|
|
4532
4425
|
]),
|
|
4533
4426
|
_: 1
|
|
4534
|
-
}, 8, ["hide-icon", "href", "target"])) : U("", !0) : (p(), w("div",
|
|
4427
|
+
}, 8, ["hide-icon", "href", "target"])) : U("", !0) : (p(), w("div", Nl, O(" – "))),
|
|
4535
4428
|
s.value && e.allowCopy ? (p(), R(f, {
|
|
4536
4429
|
key: a.value,
|
|
4537
4430
|
class: "copy-uuid-tooltip",
|
|
@@ -4539,20 +4432,20 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4539
4432
|
placement: "bottomEnd",
|
|
4540
4433
|
text: a.value
|
|
4541
4434
|
}, {
|
|
4542
|
-
default:
|
|
4543
|
-
|
|
4544
|
-
default:
|
|
4545
|
-
|
|
4435
|
+
default: b(() => [
|
|
4436
|
+
M(m, null, {
|
|
4437
|
+
default: b(({ copyToClipboard: k }) => [
|
|
4438
|
+
L("span", {
|
|
4546
4439
|
class: "entity-link-copy-id",
|
|
4547
|
-
onClick:
|
|
4440
|
+
onClick: Fe((B) => d(k), ["stop"])
|
|
4548
4441
|
}, [
|
|
4549
|
-
|
|
4442
|
+
M(I(Wa), {
|
|
4550
4443
|
class: "copy-icon",
|
|
4551
|
-
color:
|
|
4444
|
+
color: I(jr),
|
|
4552
4445
|
"data-testid": "copy-id",
|
|
4553
|
-
size:
|
|
4446
|
+
size: I(qr)
|
|
4554
4447
|
}, null, 8, ["color", "size"])
|
|
4555
|
-
], 8,
|
|
4448
|
+
], 8, Bl)
|
|
4556
4449
|
]),
|
|
4557
4450
|
_: 1
|
|
4558
4451
|
})
|
|
@@ -4562,36 +4455,36 @@ const wa = { class: "yaml-config" }, On = /* @__PURE__ */ H({
|
|
|
4562
4455
|
]);
|
|
4563
4456
|
};
|
|
4564
4457
|
}
|
|
4565
|
-
}),
|
|
4458
|
+
}), Gl = /* @__PURE__ */ re(Ml, [["__scopeId", "data-v-ff8e5179"]]), { useAxios: Zl, useDeleteUrlBuilder: Ql, useErrors: Xl, useExternalLinkCreator: es, useFetchUrlBuilder: ts, useFetcher: ns, useDebouncedFilter: rs, useStringHelpers: is, useHelpers: os, useGatewayFeatureSupported: as, useTruncationDetector: ls } = W;
|
|
4566
4459
|
export {
|
|
4567
4460
|
Fa as ConfigCardDisplay,
|
|
4568
4461
|
qt as ConfigCardItem,
|
|
4569
4462
|
ne as ConfigurationSchemaSection,
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4463
|
+
H as ConfigurationSchemaType,
|
|
4464
|
+
ql as EntityBaseConfigCard,
|
|
4465
|
+
Pl as EntityBaseForm,
|
|
4573
4466
|
qn as EntityBaseFormType,
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4467
|
+
Hl as EntityBaseTable,
|
|
4468
|
+
Vl as EntityDeleteModal,
|
|
4469
|
+
Yl as EntityFilter,
|
|
4470
|
+
Jl as EntityFormSection,
|
|
4471
|
+
Gl as EntityLink,
|
|
4472
|
+
zl as EntityToggleModal,
|
|
4580
4473
|
Un as EntityTypes,
|
|
4581
|
-
|
|
4582
|
-
|
|
4474
|
+
me as FetcherStatus,
|
|
4475
|
+
Br as InternalLinkItem,
|
|
4583
4476
|
Pt as JsonCodeBlock,
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4477
|
+
Wl as PermissionsWrapper,
|
|
4478
|
+
$n as YamlCodeBlock,
|
|
4479
|
+
Zl as useAxios,
|
|
4480
|
+
rs as useDebouncedFilter,
|
|
4481
|
+
Ql as useDeleteUrlBuilder,
|
|
4482
|
+
Xl as useErrors,
|
|
4483
|
+
es as useExternalLinkCreator,
|
|
4484
|
+
ts as useFetchUrlBuilder,
|
|
4485
|
+
ns as useFetcher,
|
|
4486
|
+
as as useGatewayFeatureSupported,
|
|
4487
|
+
os as useHelpers,
|
|
4488
|
+
is as useStringHelpers,
|
|
4489
|
+
ls as useTruncationDetector
|
|
4597
4490
|
};
|