@kong-ui-public/entities-shared 2.9.5-pr.1222.bee1d939.0 → 2.10.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 +1081 -1183
- package/dist/entities-shared.umd.js +27 -27
- package/dist/style.css +1 -1
- package/dist/types/components/entity-filter/EntityFilter.vue.d.ts.map +1 -1
- package/dist/types/types/entity-base-table.d.ts +4 -0
- package/dist/types/types/entity-base-table.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { inject as In, ref as R, unref as T, computed as A, watch as
|
|
1
|
+
import { inject as In, ref as R, unref as T, computed as A, watch as Ce, defineComponent as W, openBlock as h, createBlock as M, resolveDynamicComponent as Te, normalizeClass as ye, withCtx as x, createElementBlock as S, createElementVNode as L, toDisplayString as O, createCommentVNode as U, Fragment as oe, renderList as ie, resolveComponent as $, createVNode as N, createTextVNode as V, useCssVars as Tt, useSlots as Ve, renderSlot as Y, createSlots as ve, normalizeProps as En, guardReactiveProps as Tn, mergeProps as Fn, normalizeStyle as ze, pushScopeId as We, popScopeId as Je, onBeforeMount as Ft, withModifiers as je, onMounted as On, onUnmounted as $n, withDirectives as _e, vShow as ke, Teleport as Ln } from "vue";
|
|
2
2
|
import ot from "axios";
|
|
3
3
|
import { createI18n as Nn, i18nTComponent as Bn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Rn } from "@kong/kongponents";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
var
|
|
5
|
+
import { useRouter as Mn } from "vue-router";
|
|
6
|
+
var Kn = /* @__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))(Kn || {}), Dn = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Dn || {}), pe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(pe || {}), 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 jn() {
|
|
8
8
|
return {
|
|
9
9
|
getAxiosInstance: (e = {}) => {
|
|
@@ -40,7 +40,7 @@ function Un() {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const Re = "khcp-user-table-preferences", Pn = {
|
|
44
44
|
pageSize: 30,
|
|
45
45
|
sortColumnKey: void 0,
|
|
46
46
|
sortColumnOrder: void 0
|
|
@@ -55,14 +55,14 @@ function qn() {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
}, t = () => {
|
|
58
|
-
const n = e(localStorage.getItem(
|
|
58
|
+
const n = e(localStorage.getItem(Re));
|
|
59
59
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
60
60
|
};
|
|
61
61
|
return {
|
|
62
62
|
setTablePreferences: (n, r) => {
|
|
63
63
|
try {
|
|
64
64
|
const i = t();
|
|
65
|
-
i.set(n, r), localStorage.setItem(
|
|
65
|
+
i.set(n, r), localStorage.setItem(Re, JSON.stringify(Object.fromEntries(i.entries())));
|
|
66
66
|
} catch (i) {
|
|
67
67
|
console.error("useTablePreferences(setTablePreferences)", i);
|
|
68
68
|
}
|
|
@@ -72,11 +72,11 @@ function qn() {
|
|
|
72
72
|
return (r == null ? void 0 : r.get(n)) || void 0 || Pn;
|
|
73
73
|
},
|
|
74
74
|
deleteAllTablePreferences: () => {
|
|
75
|
-
localStorage.removeItem(
|
|
75
|
+
localStorage.removeItem(Re);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ge(e = {}) {
|
|
80
80
|
const { getAxiosInstance: t } = jn();
|
|
81
81
|
return {
|
|
82
82
|
axiosInstance: t(e)
|
|
@@ -187,7 +187,7 @@ const Hn = {
|
|
|
187
187
|
errors: Zn,
|
|
188
188
|
toggleModal: Qn
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function Ze() {
|
|
191
191
|
const e = Nn("en-us", Xn);
|
|
192
192
|
return {
|
|
193
193
|
i18n: e,
|
|
@@ -244,67 +244,67 @@ function er(e, t, n, r = {
|
|
|
244
244
|
searchKeys: ["id"]
|
|
245
245
|
}) {
|
|
246
246
|
n || (n = "100");
|
|
247
|
-
const { axiosInstance: i } =
|
|
247
|
+
const { axiosInstance: i } = Ge({
|
|
248
248
|
headers: e.requestHeaders
|
|
249
|
-
}), { i18n: { t: a } } =
|
|
250
|
-
await
|
|
251
|
-
}, 200), s = R(!1), c = R(""), d = R(""), u = R([]),
|
|
252
|
-
let
|
|
253
|
-
e.app === "konnect" ?
|
|
254
|
-
const { isValidUuid: k } = Ot(),
|
|
249
|
+
}), { i18n: { t: a } } = Ze(), { debounce: o } = Un(), l = o(async (g) => {
|
|
250
|
+
await D(g);
|
|
251
|
+
}, 200), s = R(!1), c = R(""), d = R(""), u = R([]), p = R([]), f = R(void 0), C = T(t);
|
|
252
|
+
let m = `${e.apiBaseUrl}${C}`;
|
|
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: k } = Ot(), B = async () => {
|
|
255
255
|
try {
|
|
256
256
|
s.value = !0;
|
|
257
|
-
const { data:
|
|
258
|
-
|
|
257
|
+
const { data: g } = await i.get(`${m}?size=${n}`);
|
|
258
|
+
g != null && g.next || (f.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : []), p.value = r.fetchedItemsKey in g ? g[r.fetchedItemsKey] : [], u.value = p.value;
|
|
259
259
|
} catch {
|
|
260
260
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
261
261
|
} finally {
|
|
262
262
|
s.value = !1;
|
|
263
263
|
}
|
|
264
|
-
},
|
|
265
|
-
var y,
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
264
|
+
}, b = R(""), D = async (g) => {
|
|
265
|
+
var y, v, j;
|
|
266
|
+
if (b.value !== g)
|
|
267
|
+
if (b.value = g || "", f.value === void 0)
|
|
268
268
|
try {
|
|
269
269
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
270
|
-
let F =
|
|
271
|
-
|
|
272
|
-
const { data:
|
|
273
|
-
r.fetchedItemsKey in
|
|
274
|
-
} else if (
|
|
270
|
+
let F = m + "";
|
|
271
|
+
g && (F += `/${g}`);
|
|
272
|
+
const { data: w } = await i.get(`${F}?size=${n}`);
|
|
273
|
+
r.fetchedItemsKey in w ? u.value = w[r.fetchedItemsKey] : w != null && w.id ? u.value = [w] : u.value = [];
|
|
274
|
+
} else if (g) {
|
|
275
275
|
const F = [];
|
|
276
|
-
k(
|
|
277
|
-
const { data:
|
|
278
|
-
return [
|
|
276
|
+
k(g) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
277
|
+
const { data: I } = await i.get(`${m}/${g}`);
|
|
278
|
+
return [I[r.fetchedItemsKey] ?? I];
|
|
279
279
|
})()) : F.push(
|
|
280
|
-
...r.searchKeys.filter((
|
|
281
|
-
const { data:
|
|
282
|
-
return
|
|
280
|
+
...r.searchKeys.filter((I) => I !== "id").map(async (I) => {
|
|
281
|
+
const { data: E } = await i.get(`${m}?${I}=${g}`);
|
|
282
|
+
return E[r.fetchedItemsKey];
|
|
283
283
|
})
|
|
284
284
|
);
|
|
285
|
-
const
|
|
286
|
-
u.value = [], (y =
|
|
287
|
-
var
|
|
288
|
-
(
|
|
289
|
-
|
|
285
|
+
const w = await Promise.all(F), P = /* @__PURE__ */ new Set();
|
|
286
|
+
u.value = [], (y = w == null ? void 0 : w.forEach) == null || y.call(w, (I) => {
|
|
287
|
+
var E;
|
|
288
|
+
(E = I == null ? void 0 : I.forEach) == null || E.call(I, (K) => {
|
|
289
|
+
P.has(K.id) || (P.add(K.id), u.value.push(K));
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
} else
|
|
293
|
-
u.value =
|
|
293
|
+
u.value = p.value;
|
|
294
294
|
} catch (F) {
|
|
295
|
-
((
|
|
295
|
+
((v = F == null ? void 0 : F.response) == null ? void 0 : v.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
296
296
|
} finally {
|
|
297
297
|
s.value = !1;
|
|
298
298
|
}
|
|
299
299
|
else
|
|
300
|
-
s.value = !0, d.value = "",
|
|
301
|
-
var
|
|
302
|
-
let
|
|
303
|
-
for (const
|
|
304
|
-
const
|
|
305
|
-
|
|
300
|
+
s.value = !0, d.value = "", g ? (u.value = (j = f.value) == null ? void 0 : j.filter((F) => {
|
|
301
|
+
var P;
|
|
302
|
+
let w = !1;
|
|
303
|
+
for (const I of r.searchKeys) {
|
|
304
|
+
const E = typeof F[I] == "string" ? (P = F[I]) == null ? void 0 : P.toLowerCase() : F[I];
|
|
305
|
+
E != null && E.includes(g.toLowerCase()) && (w = !0);
|
|
306
306
|
}
|
|
307
|
-
return
|
|
307
|
+
return w;
|
|
308
308
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, s.value = !1;
|
|
309
309
|
};
|
|
310
310
|
return {
|
|
@@ -313,7 +313,7 @@ function er(e, t, n, r = {
|
|
|
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
|
}
|
|
@@ -324,7 +324,7 @@ function tr(e, t) {
|
|
|
324
324
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
325
325
|
}
|
|
326
326
|
function nr() {
|
|
327
|
-
const { i18n: { t: e } } =
|
|
327
|
+
const { i18n: { t: e } } = Ze();
|
|
328
328
|
return {
|
|
329
329
|
getMessageFromError: (n) => {
|
|
330
330
|
var r, i, a, o;
|
|
@@ -364,18 +364,18 @@ function rr(e) {
|
|
|
364
364
|
return console.warn("Failed to build valid URL:", r), "";
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function $t(e, t) {
|
|
368
368
|
const n = R(T(e)), r = R(T(t)), i = A(
|
|
369
369
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
370
370
|
), a = A(
|
|
371
371
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
372
372
|
);
|
|
373
373
|
return (o) => {
|
|
374
|
-
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query:
|
|
374
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: p } = o;
|
|
375
375
|
try {
|
|
376
376
|
let f = new URL(a.value.href);
|
|
377
|
-
return i.value &&
|
|
378
|
-
f.searchParams.append(
|
|
377
|
+
return i.value && p ? (f.search = "", f = n.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${p}`) : new URL(`${f.href}/${p}/`)) : (i.value || new URLSearchParams(p).forEach((C, m) => {
|
|
378
|
+
f.searchParams.append(m, C);
|
|
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
381
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -383,22 +383,22 @@ function Lt(e, t) {
|
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
385
|
function ir(e, t, n = "data") {
|
|
386
|
-
const r = T(t), { axiosInstance: i } =
|
|
386
|
+
const r = T(t), { axiosInstance: i } = Ge({
|
|
387
387
|
headers: e.requestHeaders
|
|
388
|
-
}), a =
|
|
389
|
-
status:
|
|
388
|
+
}), a = $t(e, r), o = R({
|
|
389
|
+
status: pe.Idle
|
|
390
390
|
});
|
|
391
391
|
return { fetcher: async (s) => {
|
|
392
392
|
try {
|
|
393
|
-
o.value = { status:
|
|
393
|
+
o.value = { status: pe.Loading };
|
|
394
394
|
let c = a(s);
|
|
395
395
|
c.includes("filter[name]") && (c = `${c}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
396
396
|
const { data: d } = await i.get(c), u = n && n.replace(/[^\w-_]/gi, "");
|
|
397
|
-
let
|
|
398
|
-
d[u] && Array.isArray(d[u]) ?
|
|
397
|
+
let p;
|
|
398
|
+
d[u] && Array.isArray(d[u]) ? p = d[u] : Array.isArray(d) ? p = d : p = Object.keys(d).length ? [d] : [];
|
|
399
399
|
const f = {
|
|
400
|
-
data:
|
|
401
|
-
total:
|
|
400
|
+
data: p,
|
|
401
|
+
total: p.length,
|
|
402
402
|
...d.offset ? {
|
|
403
403
|
pagination: {
|
|
404
404
|
offset: d.offset
|
|
@@ -406,7 +406,7 @@ function ir(e, t, n = "data") {
|
|
|
406
406
|
} : null
|
|
407
407
|
};
|
|
408
408
|
return o.value = {
|
|
409
|
-
status:
|
|
409
|
+
status: pe.Idle,
|
|
410
410
|
response: f
|
|
411
411
|
}, f;
|
|
412
412
|
} catch (c) {
|
|
@@ -415,11 +415,11 @@ function ir(e, t, n = "data") {
|
|
|
415
415
|
total: 0
|
|
416
416
|
};
|
|
417
417
|
return s.query && c.response.status === 404 ? (o.value = {
|
|
418
|
-
status:
|
|
418
|
+
status: pe.NoResults,
|
|
419
419
|
response: d,
|
|
420
420
|
error: c
|
|
421
421
|
}, d) : (o.value = {
|
|
422
|
-
status:
|
|
422
|
+
status: pe.Error,
|
|
423
423
|
response: d,
|
|
424
424
|
error: c
|
|
425
425
|
}, d);
|
|
@@ -433,10 +433,10 @@ function ar() {
|
|
|
433
433
|
convertKeyToTitle: e
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
const
|
|
436
|
+
const Lt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, lt = (e) => {
|
|
437
437
|
if (typeof e != "string")
|
|
438
438
|
throw new TypeError("Invalid argument expected string");
|
|
439
|
-
const t = e.match(
|
|
439
|
+
const t = e.match(Lt);
|
|
440
440
|
if (!t)
|
|
441
441
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
442
442
|
return t.shift(), t;
|
|
@@ -474,7 +474,7 @@ const $t = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
474
474
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
475
475
|
if (ft.indexOf(e) === -1)
|
|
476
476
|
throw new Error(`Invalid operator, expected one of ${ft.join("|")}`);
|
|
477
|
-
}, ur = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
477
|
+
}, ur = (e) => typeof e == "string" && /^[v\d]/.test(e) && Lt.test(e);
|
|
478
478
|
function dr(e) {
|
|
479
479
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
480
480
|
if (!t)
|
|
@@ -490,29 +490,29 @@ function dr(e) {
|
|
|
490
490
|
}
|
|
491
491
|
function fr(e) {
|
|
492
492
|
const t = R(0), n = R(0), r = R(!1);
|
|
493
|
-
return
|
|
493
|
+
return Ce(e, (a) => {
|
|
494
494
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
495
495
|
}), {
|
|
496
496
|
isTruncated: A(() => t.value < n.value)
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
499
|
const z = {
|
|
500
|
-
useAxios:
|
|
500
|
+
useAxios: Ge,
|
|
501
501
|
useDebouncedFilter: er,
|
|
502
502
|
useDeleteUrlBuilder: tr,
|
|
503
503
|
useErrors: nr,
|
|
504
504
|
useExternalLinkCreator: rr,
|
|
505
505
|
useFetcher: ir,
|
|
506
|
-
useFetchUrlBuilder:
|
|
506
|
+
useFetchUrlBuilder: $t,
|
|
507
507
|
useHelpers: Ot,
|
|
508
508
|
useStringHelpers: ar,
|
|
509
|
-
useI18n:
|
|
509
|
+
useI18n: Ze,
|
|
510
510
|
useGatewayFeatureSupported: dr,
|
|
511
511
|
useTruncationDetector: fr
|
|
512
512
|
}, pr = {
|
|
513
513
|
key: 0,
|
|
514
514
|
class: "config-card-fieldset-title"
|
|
515
|
-
}, hr = /* @__PURE__ */
|
|
515
|
+
}, hr = /* @__PURE__ */ W({
|
|
516
516
|
__name: "JsonCardItem",
|
|
517
517
|
props: {
|
|
518
518
|
item: {
|
|
@@ -536,14 +536,14 @@ const z = {
|
|
|
536
536
|
var s;
|
|
537
537
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
538
538
|
});
|
|
539
|
-
return (s, c) => (h(),
|
|
540
|
-
class:
|
|
539
|
+
return (s, c) => (h(), M(Te(e.isArrayItem ? "fieldset" : "div"), {
|
|
540
|
+
class: ye(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
541
541
|
}, {
|
|
542
542
|
default: x(() => [
|
|
543
543
|
e.isArrayItem ? (h(), S("legend", pr, [
|
|
544
|
-
|
|
545
|
-
])) :
|
|
546
|
-
(h(!0), S(oe, null, ie(Object.keys(o.value), (d, u) => (h(),
|
|
544
|
+
L("b", null, O(l.value), 1)
|
|
545
|
+
])) : U("", !0),
|
|
546
|
+
(h(!0), S(oe, null, ie(Object.keys(o.value), (d, u) => (h(), M(Rt, {
|
|
547
547
|
key: `${i.value}-property-${u}`,
|
|
548
548
|
item: {
|
|
549
549
|
key: d,
|
|
@@ -560,7 +560,7 @@ const z = {
|
|
|
560
560
|
for (const [r, i] of t)
|
|
561
561
|
n[r] = i;
|
|
562
562
|
return n;
|
|
563
|
-
}, Bt = /* @__PURE__ */ re(hr, [["__scopeId", "data-v-68ca83ec"]]), mr = /* @__PURE__ */
|
|
563
|
+
}, Bt = /* @__PURE__ */ re(hr, [["__scopeId", "data-v-68ca83ec"]]), mr = /* @__PURE__ */ W({
|
|
564
564
|
__name: "InternalLinkItem",
|
|
565
565
|
props: {
|
|
566
566
|
item: {
|
|
@@ -572,22 +572,22 @@ const z = {
|
|
|
572
572
|
setup(e) {
|
|
573
573
|
const { i18n: { t } } = z.useI18n();
|
|
574
574
|
return (n, r) => {
|
|
575
|
-
const i =
|
|
575
|
+
const i = $("KButton");
|
|
576
576
|
return h(), S("div", null, [
|
|
577
|
-
|
|
577
|
+
N(i, {
|
|
578
578
|
appearance: "tertiary",
|
|
579
579
|
class: "navigation-button",
|
|
580
580
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
581
581
|
}, {
|
|
582
582
|
default: x(() => [
|
|
583
|
-
V(
|
|
583
|
+
V(O(e.item.value || T(t)("baseConfigCard.commonFields.link")), 1)
|
|
584
584
|
]),
|
|
585
585
|
_: 1
|
|
586
586
|
})
|
|
587
587
|
]);
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
}), gr = /* @__PURE__ */ re(mr, [["__scopeId", "data-v-c96811e5"]]), yr = /* @__PURE__ */
|
|
590
|
+
}), gr = /* @__PURE__ */ re(mr, [["__scopeId", "data-v-c96811e5"]]), yr = /* @__PURE__ */ W({
|
|
591
591
|
__name: "StatusBadge",
|
|
592
592
|
props: {
|
|
593
593
|
status: {
|
|
@@ -598,22 +598,22 @@ const z = {
|
|
|
598
598
|
setup(e) {
|
|
599
599
|
const { i18n: { t } } = z.useI18n();
|
|
600
600
|
return (n, r) => {
|
|
601
|
-
const i =
|
|
602
|
-
return h(),
|
|
601
|
+
const i = $("KBadge");
|
|
602
|
+
return h(), M(i, {
|
|
603
603
|
appearance: e.status ? "success" : "neutral"
|
|
604
604
|
}, {
|
|
605
605
|
default: x(() => [
|
|
606
|
-
V(
|
|
606
|
+
V(O(e.status ? T(t)("baseConfigCard.statusBadge.enabledLabel") : T(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
607
607
|
]),
|
|
608
608
|
_: 1
|
|
609
609
|
}, 8, ["appearance"]);
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
|
-
}), vr = "#0044f4", br = "#e0e4ea", xr = "#3a3f51", Cr = "#
|
|
612
|
+
}), vr = "#0044f4", br = "#e0e4ea", xr = "#3a3f51", Cr = "#0044f4", _r = "1px", kr = "16px", Ar = "20px", wr = { class: "config-card-details-row" }, Sr = ["data-testid"], Ir = ["data-testid"], Er = ["data-testid"], Tr = ["data-testid"], Fr = { key: 1 }, Or = ["data-testid"], $r = ["data-testid"], Lr = ["data-testid"], Nr = ["data-testid"], Br = {
|
|
613
613
|
name: "ConfigCardItem",
|
|
614
614
|
components: { JsonCardItem: Bt, StatusBadge: yr, InternalLinkItem: gr }
|
|
615
|
-
},
|
|
616
|
-
...
|
|
615
|
+
}, Rr = /* @__PURE__ */ W({
|
|
616
|
+
...Br,
|
|
617
617
|
props: {
|
|
618
618
|
item: {
|
|
619
619
|
type: Object,
|
|
@@ -632,15 +632,15 @@ const z = {
|
|
|
632
632
|
},
|
|
633
633
|
emits: ["navigation-click"],
|
|
634
634
|
setup(e, { emit: t }) {
|
|
635
|
-
Tt((
|
|
636
|
-
"07753575": d.value ? "none" : `solid ${T(
|
|
635
|
+
Tt((C) => ({
|
|
636
|
+
"07753575": d.value ? "none" : `solid ${T(_r)} ${T(br)}`,
|
|
637
637
|
"32d44ea8": c.value && l.value ? "block" : "flex",
|
|
638
638
|
"5036b738": c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
639
639
|
"5038fd13": c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
640
640
|
}));
|
|
641
|
-
const n = e, r = t, i =
|
|
641
|
+
const n = e, r = t, i = Ve(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.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(() => {
|
|
642
642
|
switch (n.item.type) {
|
|
643
|
-
case
|
|
643
|
+
case H.ID:
|
|
644
644
|
return {
|
|
645
645
|
tag: "KCopy",
|
|
646
646
|
attrs: {
|
|
@@ -649,7 +649,7 @@ const z = {
|
|
|
649
649
|
text: n.item.value
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
|
-
case
|
|
652
|
+
case H.IdArray:
|
|
653
653
|
return {
|
|
654
654
|
tag: "div",
|
|
655
655
|
additionalComponent: "KCopy",
|
|
@@ -657,7 +657,7 @@ const z = {
|
|
|
657
657
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
|
-
case
|
|
660
|
+
case H.Redacted:
|
|
661
661
|
return {
|
|
662
662
|
tag: "KCopy",
|
|
663
663
|
attrs: {
|
|
@@ -667,7 +667,7 @@ const z = {
|
|
|
667
667
|
text: n.item.value
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
case
|
|
670
|
+
case H.RedactedArray:
|
|
671
671
|
return {
|
|
672
672
|
tag: "div",
|
|
673
673
|
additionalComponent: "KCopy",
|
|
@@ -676,7 +676,7 @@ const z = {
|
|
|
676
676
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
|
-
case
|
|
679
|
+
case H.Date:
|
|
680
680
|
return {
|
|
681
681
|
tag: "div",
|
|
682
682
|
attrs: {
|
|
@@ -684,7 +684,7 @@ const z = {
|
|
|
684
684
|
},
|
|
685
685
|
text: o(n.item.value)
|
|
686
686
|
};
|
|
687
|
-
case
|
|
687
|
+
case H.BadgeStatus:
|
|
688
688
|
return {
|
|
689
689
|
tag: "StatusBadge",
|
|
690
690
|
attrs: {
|
|
@@ -692,28 +692,28 @@ const z = {
|
|
|
692
692
|
status: n.item.value
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
|
-
case
|
|
695
|
+
case H.BadgeTag:
|
|
696
696
|
return {
|
|
697
697
|
tag: "div",
|
|
698
698
|
additionalComponent: "KBadge"
|
|
699
699
|
};
|
|
700
|
-
case
|
|
700
|
+
case H.BadgeMethod:
|
|
701
701
|
return {
|
|
702
702
|
tag: "div",
|
|
703
703
|
additionalComponent: "KMethodBadge"
|
|
704
704
|
};
|
|
705
|
-
case
|
|
705
|
+
case H.LinkInternal:
|
|
706
706
|
return {
|
|
707
707
|
tag: "InternalLinkItem",
|
|
708
708
|
attrs: {
|
|
709
709
|
"data-testid": `${n.item.key}-internal-link`,
|
|
710
710
|
item: n.item,
|
|
711
|
-
onNavigationClick: (
|
|
712
|
-
r("navigation-click",
|
|
711
|
+
onNavigationClick: (C) => {
|
|
712
|
+
r("navigation-click", C);
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
case
|
|
716
|
+
case H.LinkExternal:
|
|
717
717
|
return {
|
|
718
718
|
tag: "KExternalLink",
|
|
719
719
|
attrs: {
|
|
@@ -722,7 +722,7 @@ const z = {
|
|
|
722
722
|
},
|
|
723
723
|
text: n.item.value
|
|
724
724
|
};
|
|
725
|
-
case
|
|
725
|
+
case H.Json:
|
|
726
726
|
return {
|
|
727
727
|
tag: "JsonCardItem",
|
|
728
728
|
attrs: {
|
|
@@ -730,7 +730,7 @@ const z = {
|
|
|
730
730
|
item: n.item
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
|
-
case
|
|
733
|
+
case H.JsonArray:
|
|
734
734
|
return {
|
|
735
735
|
tag: "div",
|
|
736
736
|
additionalComponent: "JsonCardItem",
|
|
@@ -748,111 +748,111 @@ const z = {
|
|
|
748
748
|
text: n.item.value
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
}),
|
|
752
|
-
return (
|
|
753
|
-
const k =
|
|
754
|
-
return h(), S("div",
|
|
755
|
-
|
|
751
|
+
}), p = R(), { isTruncated: f } = z.useTruncationDetector(p);
|
|
752
|
+
return (C, m) => {
|
|
753
|
+
const k = $("KLabel"), B = $("KBadge"), b = $("KCopy"), D = $("KTooltip");
|
|
754
|
+
return h(), S("div", wr, [
|
|
755
|
+
L("div", {
|
|
756
756
|
class: "config-card-details-label",
|
|
757
757
|
"data-testid": `${e.item.key}-label`
|
|
758
758
|
}, [
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
Y(C.$slots, "label", { item: e.item }, () => [
|
|
760
|
+
N(k, { "tooltip-attributes": { maxWidth: "500px" } }, ve({
|
|
761
761
|
default: x(() => [
|
|
762
|
-
V(
|
|
762
|
+
V(O(e.item.label) + " ", 1)
|
|
763
763
|
]),
|
|
764
764
|
_: 2
|
|
765
765
|
}, [
|
|
766
766
|
s.value ? {
|
|
767
767
|
name: "tooltip",
|
|
768
768
|
fn: x(() => [
|
|
769
|
-
|
|
769
|
+
L("div", {
|
|
770
770
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
771
771
|
}, [
|
|
772
|
-
|
|
773
|
-
V(
|
|
772
|
+
Y(C.$slots, "label-tooltip", {}, () => [
|
|
773
|
+
V(O(e.item.tooltip), 1)
|
|
774
774
|
], !0)
|
|
775
|
-
], 8,
|
|
775
|
+
], 8, Ir)
|
|
776
776
|
]),
|
|
777
777
|
key: "0"
|
|
778
778
|
} : void 0
|
|
779
779
|
]), 1024)
|
|
780
780
|
], !0)
|
|
781
|
-
], 8,
|
|
782
|
-
|
|
781
|
+
], 8, Sr),
|
|
782
|
+
L("div", {
|
|
783
783
|
class: "config-card-details-value",
|
|
784
784
|
"data-testid": `${e.item.key}-property-value`
|
|
785
785
|
}, [
|
|
786
|
-
|
|
786
|
+
Y(C.$slots, e.item.key, {
|
|
787
787
|
rowValue: e.item.value
|
|
788
788
|
}, () => [
|
|
789
|
-
l.value ? (h(), S("div",
|
|
790
|
-
(h(),
|
|
789
|
+
l.value ? (h(), S("div", Fr, [
|
|
790
|
+
(h(), M(Te(u.value.tag), En(Tn(u.value.attrs)), {
|
|
791
791
|
default: x(() => [
|
|
792
792
|
u.value.additionalComponent === "KBadge" ? (h(), S("div", {
|
|
793
793
|
key: 0,
|
|
794
794
|
"data-testid": `${e.item.key}-badge-tags`
|
|
795
795
|
}, [
|
|
796
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
796
|
+
(h(!0), S(oe, null, ie(e.item.value, (g, y) => (h(), M(B, {
|
|
797
797
|
key: `${e.item.key}-badge-tag-${y}`,
|
|
798
798
|
class: "config-badge",
|
|
799
799
|
"data-testid": `${e.item.key}-badge-tag-${y}`,
|
|
800
|
-
tooltip:
|
|
800
|
+
tooltip: g,
|
|
801
801
|
"truncation-tooltip": ""
|
|
802
802
|
}, {
|
|
803
803
|
default: x(() => [
|
|
804
|
-
V(
|
|
804
|
+
V(O(g), 1)
|
|
805
805
|
]),
|
|
806
806
|
_: 2
|
|
807
807
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
808
|
-
], 8,
|
|
808
|
+
], 8, Or)) : U("", !0),
|
|
809
809
|
u.value.additionalComponent === "KCopy" ? (h(), S("div", {
|
|
810
810
|
key: 1,
|
|
811
811
|
class: "copy-uuid-array",
|
|
812
812
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
813
813
|
}, [
|
|
814
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
814
|
+
(h(!0), S(oe, null, ie(e.item.value, (g, y) => (h(), M(b, Fn(u.value.childAttrs, {
|
|
815
815
|
key: `${e.item.key}-copy-uuid-${y}`,
|
|
816
816
|
"data-testid": `${e.item.key}-copy-uuid-${y}`,
|
|
817
|
-
text:
|
|
817
|
+
text: g
|
|
818
818
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
819
819
|
], 8, $r)) : u.value.additionalComponent === "KMethodBadge" ? (h(), S("div", {
|
|
820
820
|
key: 2,
|
|
821
821
|
class: "method-badge-array",
|
|
822
822
|
"data-testid": `${e.item.key}-badge-methods`
|
|
823
823
|
}, [
|
|
824
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
824
|
+
(h(!0), S(oe, null, ie(e.item.value, (g, y) => (h(), M(B, {
|
|
825
825
|
key: `${e.item.key}-badge-method-${y}`,
|
|
826
|
-
appearance: Object.values(T(Rn)).includes(
|
|
826
|
+
appearance: Object.values(T(Rn)).includes(g.toLowerCase()) ? g.toLowerCase() : "custom",
|
|
827
827
|
class: "config-badge",
|
|
828
828
|
"data-testid": `${e.item.key}-badge-method-${y}`
|
|
829
829
|
}, {
|
|
830
830
|
default: x(() => [
|
|
831
|
-
V(
|
|
831
|
+
V(O(g), 1)
|
|
832
832
|
]),
|
|
833
833
|
_: 2
|
|
834
834
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
835
|
-
], 8,
|
|
835
|
+
], 8, Lr)) : U("", !0),
|
|
836
836
|
u.value.additionalComponent === "JsonCardItem" ? (h(), S("div", {
|
|
837
837
|
key: 3,
|
|
838
838
|
"data-testid": `${n.item.key}-json-array-content`
|
|
839
839
|
}, [
|
|
840
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
840
|
+
(h(!0), S(oe, null, ie(e.item.value, (g, y) => (h(), M(Bt, {
|
|
841
841
|
key: `json-array-item-${y}`,
|
|
842
842
|
index: y,
|
|
843
843
|
"is-array-item": "",
|
|
844
|
-
item:
|
|
844
|
+
item: g
|
|
845
845
|
}, null, 8, ["index", "item"]))), 128))
|
|
846
|
-
], 8,
|
|
846
|
+
], 8, Nr)) : (h(), M(D, {
|
|
847
847
|
key: 4,
|
|
848
848
|
text: T(f) ? e.item.value : ""
|
|
849
849
|
}, {
|
|
850
850
|
default: x(() => [
|
|
851
|
-
|
|
851
|
+
L("span", {
|
|
852
852
|
ref_key: "textContent",
|
|
853
|
-
ref:
|
|
854
|
-
class:
|
|
855
|
-
},
|
|
853
|
+
ref: p,
|
|
854
|
+
class: ye(["attrs-data-text", { truncated: e.truncated }])
|
|
855
|
+
}, O(u.value.text), 3)
|
|
856
856
|
]),
|
|
857
857
|
_: 1
|
|
858
858
|
}, 8, ["text"]))
|
|
@@ -862,16 +862,16 @@ const z = {
|
|
|
862
862
|
])) : (h(), S("div", {
|
|
863
863
|
key: 0,
|
|
864
864
|
"data-testid": `${e.item.key}-no-value`
|
|
865
|
-
}, " – ", 8,
|
|
865
|
+
}, " – ", 8, Tr))
|
|
866
866
|
], !0)
|
|
867
|
-
], 8,
|
|
867
|
+
], 8, Er)
|
|
868
868
|
]);
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
|
-
}), Rt = /* @__PURE__ */ re(
|
|
871
|
+
}), Rt = /* @__PURE__ */ re(Rr, [["__scopeId", "data-v-d056663c"]]), Mr = { class: "json-config" }, Kr = {
|
|
872
872
|
key: 0,
|
|
873
873
|
class: "json-endpoint"
|
|
874
|
-
},
|
|
874
|
+
}, Mt = /* @__PURE__ */ W({
|
|
875
875
|
__name: "JsonCodeBlock",
|
|
876
876
|
props: {
|
|
877
877
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -911,70 +911,70 @@ const z = {
|
|
|
911
911
|
});
|
|
912
912
|
return (i, a) => {
|
|
913
913
|
var s;
|
|
914
|
-
const o =
|
|
914
|
+
const o = $("KBadge"), l = $("KCodeBlock");
|
|
915
915
|
return h(), S("div", Mr, [
|
|
916
|
-
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (h(), S("div",
|
|
917
|
-
|
|
916
|
+
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (h(), S("div", Kr, [
|
|
917
|
+
N(o, {
|
|
918
918
|
appearance: t.requestMethod
|
|
919
919
|
}, {
|
|
920
920
|
default: x(() => [
|
|
921
|
-
V(
|
|
921
|
+
V(O(t.requestMethod), 1)
|
|
922
922
|
]),
|
|
923
923
|
_: 1
|
|
924
924
|
}, 8, ["appearance"]),
|
|
925
|
-
|
|
925
|
+
N(l, {
|
|
926
926
|
id: "json-endpoint-codeblock",
|
|
927
927
|
code: t.fetcherUrl,
|
|
928
928
|
"is-single-line": "",
|
|
929
929
|
language: "json",
|
|
930
930
|
theme: "dark"
|
|
931
931
|
}, null, 8, ["code"])
|
|
932
|
-
])) :
|
|
933
|
-
t.jsonRecord ? (h(),
|
|
932
|
+
])) : U("", !0),
|
|
933
|
+
t.jsonRecord ? (h(), M(l, {
|
|
934
934
|
key: 1,
|
|
935
935
|
id: "json-codeblock",
|
|
936
|
-
class:
|
|
936
|
+
class: ye({ "json-content": t.fetcherUrl }),
|
|
937
937
|
code: JSON.stringify(n.value, null, 2),
|
|
938
938
|
language: "json",
|
|
939
939
|
theme: "dark"
|
|
940
|
-
}, null, 8, ["class", "code"])) :
|
|
940
|
+
}, null, 8, ["class", "code"])) : U("", !0)
|
|
941
941
|
]);
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
944
|
});
|
|
945
945
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
946
|
-
function
|
|
946
|
+
function Kt(e) {
|
|
947
947
|
return typeof e > "u" || e === null;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Dr(e) {
|
|
950
950
|
return typeof e == "object" && e !== null;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return Array.isArray(e) ? e :
|
|
952
|
+
function jr(e) {
|
|
953
|
+
return Array.isArray(e) ? e : Kt(e) ? [] : [e];
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Ur(e, t) {
|
|
956
956
|
var n, r, i, a;
|
|
957
957
|
if (t)
|
|
958
958
|
for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1)
|
|
959
959
|
i = a[n], e[i] = t[i];
|
|
960
960
|
return e;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Pr(e, t) {
|
|
963
963
|
var n = "", r;
|
|
964
964
|
for (r = 0; r < t; r += 1)
|
|
965
965
|
n += e;
|
|
966
966
|
return n;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function qr(e) {
|
|
969
969
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
970
970
|
}
|
|
971
|
-
var Yr =
|
|
972
|
-
isNothing:
|
|
973
|
-
isObject:
|
|
974
|
-
toArray:
|
|
975
|
-
repeat:
|
|
976
|
-
isNegativeZero:
|
|
977
|
-
extend:
|
|
971
|
+
var Hr = Kt, Yr = Dr, Vr = jr, zr = Pr, Wr = qr, Jr = Ur, Z = {
|
|
972
|
+
isNothing: Hr,
|
|
973
|
+
isObject: Yr,
|
|
974
|
+
toArray: Vr,
|
|
975
|
+
repeat: zr,
|
|
976
|
+
isNegativeZero: Wr,
|
|
977
|
+
extend: Jr
|
|
978
978
|
};
|
|
979
979
|
function Dt(e, t) {
|
|
980
980
|
var n = "", r = e.reason || "(unknown reason)";
|
|
@@ -982,16 +982,16 @@ function Dt(e, t) {
|
|
|
982
982
|
|
|
983
983
|
` + e.mark.snippet), r + " " + n) : r;
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function we(e, t) {
|
|
986
986
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Dt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
987
987
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
we.prototype = Object.create(Error.prototype);
|
|
989
|
+
we.prototype.constructor = we;
|
|
990
|
+
we.prototype.toString = function(t) {
|
|
991
991
|
return this.name + ": " + Dt(this, t);
|
|
992
992
|
};
|
|
993
|
-
var
|
|
994
|
-
function
|
|
993
|
+
var ee = we;
|
|
994
|
+
function Me(e, t, n, r, i) {
|
|
995
995
|
var a = "", o = "", l = Math.floor(i / 2) - 1;
|
|
996
996
|
return r - t > l && (a = " ... ", t = r - l + a.length), n - r > l && (o = " ...", n = r + l - o.length), {
|
|
997
997
|
str: a + e.slice(t, n).replace(/\t/g, "→") + o,
|
|
@@ -999,10 +999,10 @@ function Ue(e, t, n, r, i) {
|
|
|
999
999
|
// relative position
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
1002
|
+
function Ke(e, t) {
|
|
1003
|
+
return Z.repeat(" ", t - e.length) + e;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Gr(e, t) {
|
|
1006
1006
|
if (t = Object.create(t || null), !e.buffer)
|
|
1007
1007
|
return null;
|
|
1008
1008
|
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);
|
|
@@ -1011,28 +1011,28 @@ function Zr(e, t) {
|
|
|
1011
1011
|
o < 0 && (o = r.length - 1);
|
|
1012
1012
|
var l = "", s, c, d = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1013
1013
|
for (s = 1; s <= t.linesBefore && !(o - s < 0); s++)
|
|
1014
|
-
c =
|
|
1014
|
+
c = Me(
|
|
1015
1015
|
e.buffer,
|
|
1016
1016
|
r[o - s],
|
|
1017
1017
|
i[o - s],
|
|
1018
1018
|
e.position - (r[o] - r[o - s]),
|
|
1019
1019
|
u
|
|
1020
|
-
), l =
|
|
1020
|
+
), l = Z.repeat(" ", t.indent) + Ke((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1021
1021
|
` + l;
|
|
1022
|
-
for (c =
|
|
1023
|
-
`, l +=
|
|
1022
|
+
for (c = Me(e.buffer, r[o], i[o], e.position, u), l += Z.repeat(" ", t.indent) + Ke((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1023
|
+
`, l += Z.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1024
1024
|
`, s = 1; s <= t.linesAfter && !(o + s >= i.length); s++)
|
|
1025
|
-
c =
|
|
1025
|
+
c = Me(
|
|
1026
1026
|
e.buffer,
|
|
1027
1027
|
r[o + s],
|
|
1028
1028
|
i[o + s],
|
|
1029
1029
|
e.position - (r[o] - r[o + s]),
|
|
1030
1030
|
u
|
|
1031
|
-
), l +=
|
|
1031
|
+
), l += Z.repeat(" ", t.indent) + Ke((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1032
1032
|
`;
|
|
1033
1033
|
return l.replace(/\n$/, "");
|
|
1034
1034
|
}
|
|
1035
|
-
var
|
|
1035
|
+
var Zr = Gr, Qr = [
|
|
1036
1036
|
"kind",
|
|
1037
1037
|
"multi",
|
|
1038
1038
|
"resolve",
|
|
@@ -1043,12 +1043,12 @@ var Qr = Zr, Xr = [
|
|
|
1043
1043
|
"representName",
|
|
1044
1044
|
"defaultStyle",
|
|
1045
1045
|
"styleAliases"
|
|
1046
|
-
],
|
|
1046
|
+
], Xr = [
|
|
1047
1047
|
"scalar",
|
|
1048
1048
|
"sequence",
|
|
1049
1049
|
"mapping"
|
|
1050
1050
|
];
|
|
1051
|
-
function
|
|
1051
|
+
function ei(e) {
|
|
1052
1052
|
var t = {};
|
|
1053
1053
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1054
1054
|
e[n].forEach(function(r) {
|
|
@@ -1056,18 +1056,18 @@ function ti(e) {
|
|
|
1056
1056
|
});
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function ti(e, t) {
|
|
1060
1060
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1061
|
-
if (
|
|
1062
|
-
throw new
|
|
1061
|
+
if (Qr.indexOf(n) === -1)
|
|
1062
|
+
throw new ee('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1063
1063
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1064
1064
|
return !0;
|
|
1065
1065
|
}, this.construct = t.construct || function(n) {
|
|
1066
1066
|
return n;
|
|
1067
|
-
}, 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 =
|
|
1068
|
-
throw new
|
|
1067
|
+
}, 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 = ei(t.styleAliases || null), Xr.indexOf(this.kind) === -1)
|
|
1068
|
+
throw new ee('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1069
1069
|
}
|
|
1070
|
-
var
|
|
1070
|
+
var Q = ti;
|
|
1071
1071
|
function pt(e, t) {
|
|
1072
1072
|
var n = [];
|
|
1073
1073
|
return e[t].forEach(function(r) {
|
|
@@ -1077,7 +1077,7 @@ function pt(e, t) {
|
|
|
1077
1077
|
}), n[i] = r;
|
|
1078
1078
|
}), n;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function ni() {
|
|
1081
1081
|
var e = {
|
|
1082
1082
|
scalar: {},
|
|
1083
1083
|
sequence: {},
|
|
@@ -1097,44 +1097,44 @@ function ri() {
|
|
|
1097
1097
|
arguments[t].forEach(r);
|
|
1098
1098
|
return e;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ue(e) {
|
|
1101
1101
|
return this.extend(e);
|
|
1102
1102
|
}
|
|
1103
|
-
|
|
1103
|
+
Ue.prototype.extend = function(t) {
|
|
1104
1104
|
var n = [], r = [];
|
|
1105
|
-
if (t instanceof
|
|
1105
|
+
if (t instanceof Q)
|
|
1106
1106
|
r.push(t);
|
|
1107
1107
|
else if (Array.isArray(t))
|
|
1108
1108
|
r = r.concat(t);
|
|
1109
1109
|
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit)))
|
|
1110
1110
|
t.implicit && (n = n.concat(t.implicit)), t.explicit && (r = r.concat(t.explicit));
|
|
1111
1111
|
else
|
|
1112
|
-
throw new
|
|
1112
|
+
throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1113
1113
|
n.forEach(function(a) {
|
|
1114
|
-
if (!(a instanceof
|
|
1115
|
-
throw new
|
|
1114
|
+
if (!(a instanceof Q))
|
|
1115
|
+
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1116
1116
|
if (a.loadKind && a.loadKind !== "scalar")
|
|
1117
|
-
throw new
|
|
1117
|
+
throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1118
1118
|
if (a.multi)
|
|
1119
|
-
throw new
|
|
1119
|
+
throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1120
1120
|
}), r.forEach(function(a) {
|
|
1121
|
-
if (!(a instanceof
|
|
1122
|
-
throw new
|
|
1121
|
+
if (!(a instanceof Q))
|
|
1122
|
+
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1123
1123
|
});
|
|
1124
|
-
var i = Object.create(
|
|
1125
|
-
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = pt(i, "implicit"), i.compiledExplicit = pt(i, "explicit"), i.compiledTypeMap =
|
|
1124
|
+
var i = Object.create(Ue.prototype);
|
|
1125
|
+
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = pt(i, "implicit"), i.compiledExplicit = pt(i, "explicit"), i.compiledTypeMap = ni(i.compiledImplicit, i.compiledExplicit), i;
|
|
1126
1126
|
};
|
|
1127
|
-
var jt =
|
|
1127
|
+
var jt = Ue, Ut = new Q("tag:yaml.org,2002:str", {
|
|
1128
1128
|
kind: "scalar",
|
|
1129
1129
|
construct: function(e) {
|
|
1130
1130
|
return e !== null ? e : "";
|
|
1131
1131
|
}
|
|
1132
|
-
}), Pt = new
|
|
1132
|
+
}), Pt = new Q("tag:yaml.org,2002:seq", {
|
|
1133
1133
|
kind: "sequence",
|
|
1134
1134
|
construct: function(e) {
|
|
1135
1135
|
return e !== null ? e : [];
|
|
1136
1136
|
}
|
|
1137
|
-
}), qt = new
|
|
1137
|
+
}), qt = new Q("tag:yaml.org,2002:map", {
|
|
1138
1138
|
kind: "mapping",
|
|
1139
1139
|
construct: function(e) {
|
|
1140
1140
|
return e !== null ? e : {};
|
|
@@ -1146,23 +1146,23 @@ var jt = Ye, Ut = new Z("tag:yaml.org,2002:str", {
|
|
|
1146
1146
|
qt
|
|
1147
1147
|
]
|
|
1148
1148
|
});
|
|
1149
|
-
function
|
|
1149
|
+
function ri(e) {
|
|
1150
1150
|
if (e === null)
|
|
1151
1151
|
return !0;
|
|
1152
1152
|
var t = e.length;
|
|
1153
1153
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function ii() {
|
|
1156
1156
|
return null;
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function ai(e) {
|
|
1159
1159
|
return e === null;
|
|
1160
1160
|
}
|
|
1161
|
-
var Yt = new
|
|
1161
|
+
var Yt = new Q("tag:yaml.org,2002:null", {
|
|
1162
1162
|
kind: "scalar",
|
|
1163
|
-
resolve:
|
|
1164
|
-
construct:
|
|
1165
|
-
predicate:
|
|
1163
|
+
resolve: ri,
|
|
1164
|
+
construct: ii,
|
|
1165
|
+
predicate: ai,
|
|
1166
1166
|
represent: {
|
|
1167
1167
|
canonical: function() {
|
|
1168
1168
|
return "~";
|
|
@@ -1182,23 +1182,23 @@ var Yt = new Z("tag:yaml.org,2002:null", {
|
|
|
1182
1182
|
},
|
|
1183
1183
|
defaultStyle: "lowercase"
|
|
1184
1184
|
});
|
|
1185
|
-
function
|
|
1185
|
+
function oi(e) {
|
|
1186
1186
|
if (e === null)
|
|
1187
1187
|
return !1;
|
|
1188
1188
|
var t = e.length;
|
|
1189
1189
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function li(e) {
|
|
1192
1192
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function si(e) {
|
|
1195
1195
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1196
1196
|
}
|
|
1197
|
-
var Vt = new
|
|
1197
|
+
var Vt = new Q("tag:yaml.org,2002:bool", {
|
|
1198
1198
|
kind: "scalar",
|
|
1199
|
-
resolve:
|
|
1200
|
-
construct:
|
|
1201
|
-
predicate:
|
|
1199
|
+
resolve: oi,
|
|
1200
|
+
construct: li,
|
|
1201
|
+
predicate: si,
|
|
1202
1202
|
represent: {
|
|
1203
1203
|
lowercase: function(e) {
|
|
1204
1204
|
return e ? "true" : "false";
|
|
@@ -1212,16 +1212,16 @@ var Vt = new Z("tag:yaml.org,2002:bool", {
|
|
|
1212
1212
|
},
|
|
1213
1213
|
defaultStyle: "lowercase"
|
|
1214
1214
|
});
|
|
1215
|
-
function
|
|
1215
|
+
function ci(e) {
|
|
1216
1216
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function ui(e) {
|
|
1219
1219
|
return 48 <= e && e <= 55;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function di(e) {
|
|
1222
1222
|
return 48 <= e && e <= 57;
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function fi(e) {
|
|
1225
1225
|
if (e === null)
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
var t = e.length, n = 0, r = !1, i;
|
|
@@ -1242,7 +1242,7 @@ function pi(e) {
|
|
|
1242
1242
|
if (i === "x") {
|
|
1243
1243
|
for (n++; n < t; n++)
|
|
1244
1244
|
if (i = e[n], i !== "_") {
|
|
1245
|
-
if (!
|
|
1245
|
+
if (!ci(e.charCodeAt(n)))
|
|
1246
1246
|
return !1;
|
|
1247
1247
|
r = !0;
|
|
1248
1248
|
}
|
|
@@ -1251,7 +1251,7 @@ function pi(e) {
|
|
|
1251
1251
|
if (i === "o") {
|
|
1252
1252
|
for (n++; n < t; n++)
|
|
1253
1253
|
if (i = e[n], i !== "_") {
|
|
1254
|
-
if (!
|
|
1254
|
+
if (!ui(e.charCodeAt(n)))
|
|
1255
1255
|
return !1;
|
|
1256
1256
|
r = !0;
|
|
1257
1257
|
}
|
|
@@ -1262,13 +1262,13 @@ function pi(e) {
|
|
|
1262
1262
|
return !1;
|
|
1263
1263
|
for (; n < t; n++)
|
|
1264
1264
|
if (i = e[n], i !== "_") {
|
|
1265
|
-
if (!
|
|
1265
|
+
if (!di(e.charCodeAt(n)))
|
|
1266
1266
|
return !1;
|
|
1267
1267
|
r = !0;
|
|
1268
1268
|
}
|
|
1269
1269
|
return !(!r || i === "_");
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function pi(e) {
|
|
1272
1272
|
var t = e, n = 1, r;
|
|
1273
1273
|
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")
|
|
1274
1274
|
return 0;
|
|
@@ -1282,14 +1282,14 @@ function hi(e) {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
return n * parseInt(t, 10);
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1285
|
+
function hi(e) {
|
|
1286
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Z.isNegativeZero(e);
|
|
1287
1287
|
}
|
|
1288
|
-
var zt = new
|
|
1288
|
+
var zt = new Q("tag:yaml.org,2002:int", {
|
|
1289
1289
|
kind: "scalar",
|
|
1290
|
-
resolve:
|
|
1291
|
-
construct:
|
|
1292
|
-
predicate:
|
|
1290
|
+
resolve: fi,
|
|
1291
|
+
construct: pi,
|
|
1292
|
+
predicate: hi,
|
|
1293
1293
|
represent: {
|
|
1294
1294
|
binary: function(e) {
|
|
1295
1295
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1312,21 +1312,21 @@ var zt = new Z("tag:yaml.org,2002:int", {
|
|
|
1312
1312
|
decimal: [10, "dec"],
|
|
1313
1313
|
hexadecimal: [16, "hex"]
|
|
1314
1314
|
}
|
|
1315
|
-
}),
|
|
1315
|
+
}), mi = new RegExp(
|
|
1316
1316
|
// 2.5e4, 2.5 and integers
|
|
1317
1317
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1318
1318
|
);
|
|
1319
|
-
function
|
|
1320
|
-
return !(e === null || !
|
|
1319
|
+
function gi(e) {
|
|
1320
|
+
return !(e === null || !mi.test(e) || // Quick hack to not allow integers end with `_`
|
|
1321
1321
|
// Probably should update regexp & check speed
|
|
1322
1322
|
e[e.length - 1] === "_");
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function yi(e) {
|
|
1325
1325
|
var t, n;
|
|
1326
1326
|
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);
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1328
|
+
var vi = /^[-+]?[0-9]+e/;
|
|
1329
|
+
function bi(e, t) {
|
|
1330
1330
|
var n;
|
|
1331
1331
|
if (isNaN(e))
|
|
1332
1332
|
switch (t) {
|
|
@@ -1355,19 +1355,19 @@ function xi(e, t) {
|
|
|
1355
1355
|
case "camelcase":
|
|
1356
1356
|
return "-.Inf";
|
|
1357
1357
|
}
|
|
1358
|
-
else if (
|
|
1358
|
+
else if (Z.isNegativeZero(e))
|
|
1359
1359
|
return "-0.0";
|
|
1360
|
-
return n = e.toString(10),
|
|
1360
|
+
return n = e.toString(10), vi.test(n) ? n.replace("e", ".e") : n;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1362
|
+
function xi(e) {
|
|
1363
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Z.isNegativeZero(e));
|
|
1364
1364
|
}
|
|
1365
|
-
var Wt = new
|
|
1365
|
+
var Wt = new Q("tag:yaml.org,2002:float", {
|
|
1366
1366
|
kind: "scalar",
|
|
1367
|
-
resolve:
|
|
1368
|
-
construct:
|
|
1369
|
-
predicate:
|
|
1370
|
-
represent:
|
|
1367
|
+
resolve: gi,
|
|
1368
|
+
construct: yi,
|
|
1369
|
+
predicate: xi,
|
|
1370
|
+
represent: bi,
|
|
1371
1371
|
defaultStyle: "lowercase"
|
|
1372
1372
|
}), Jt = Ht.extend({
|
|
1373
1373
|
implicit: [
|
|
@@ -1381,11 +1381,11 @@ var Wt = new Z("tag:yaml.org,2002:float", {
|
|
|
1381
1381
|
), Qt = new RegExp(
|
|
1382
1382
|
"^([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]))?))?$"
|
|
1383
1383
|
);
|
|
1384
|
-
function
|
|
1384
|
+
function Ci(e) {
|
|
1385
1385
|
return e === null ? !1 : Zt.exec(e) !== null || Qt.exec(e) !== null;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
var t, n, r, i, a, o, l, s = 0, c = null, d, u,
|
|
1387
|
+
function _i(e) {
|
|
1388
|
+
var t, n, r, i, a, o, l, s = 0, c = null, d, u, p;
|
|
1389
1389
|
if (t = Zt.exec(e), t === null && (t = Qt.exec(e)), t === null)
|
|
1390
1390
|
throw new Error("Date resolve error");
|
|
1391
1391
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1395,30 +1395,30 @@ function ki(e) {
|
|
|
1395
1395
|
s += "0";
|
|
1396
1396
|
s = +s;
|
|
1397
1397
|
}
|
|
1398
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)),
|
|
1398
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), p = new Date(Date.UTC(n, r, i, a, o, l, s)), c && p.setTime(p.getTime() - c), p;
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function ki(e) {
|
|
1401
1401
|
return e.toISOString();
|
|
1402
1402
|
}
|
|
1403
|
-
var Xt = new
|
|
1403
|
+
var Xt = new Q("tag:yaml.org,2002:timestamp", {
|
|
1404
1404
|
kind: "scalar",
|
|
1405
|
-
resolve:
|
|
1406
|
-
construct:
|
|
1405
|
+
resolve: Ci,
|
|
1406
|
+
construct: _i,
|
|
1407
1407
|
instanceOf: Date,
|
|
1408
|
-
represent:
|
|
1408
|
+
represent: ki
|
|
1409
1409
|
});
|
|
1410
|
-
function
|
|
1410
|
+
function Ai(e) {
|
|
1411
1411
|
return e === "<<" || e === null;
|
|
1412
1412
|
}
|
|
1413
|
-
var en = new
|
|
1413
|
+
var en = new Q("tag:yaml.org,2002:merge", {
|
|
1414
1414
|
kind: "scalar",
|
|
1415
|
-
resolve:
|
|
1416
|
-
}),
|
|
1415
|
+
resolve: Ai
|
|
1416
|
+
}), Qe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1417
1417
|
\r`;
|
|
1418
|
-
function
|
|
1418
|
+
function wi(e) {
|
|
1419
1419
|
if (e === null)
|
|
1420
1420
|
return !1;
|
|
1421
|
-
var t, n, r = 0, i = e.length, a =
|
|
1421
|
+
var t, n, r = 0, i = e.length, a = Qe;
|
|
1422
1422
|
for (n = 0; n < i; n++)
|
|
1423
1423
|
if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1424
1424
|
if (t < 0)
|
|
@@ -1427,37 +1427,37 @@ function Si(e) {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
return r % 8 === 0;
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1431
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a =
|
|
1430
|
+
function Si(e) {
|
|
1431
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = Qe, o = 0, l = [];
|
|
1432
1432
|
for (t = 0; t < i; t++)
|
|
1433
1433
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
|
|
1434
1434
|
return n = i % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
var t = "", n = 0, r, i, a = e.length, o =
|
|
1436
|
+
function Ii(e) {
|
|
1437
|
+
var t = "", n = 0, r, i, a = e.length, o = Qe;
|
|
1438
1438
|
for (r = 0; r < a; r++)
|
|
1439
1439
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1440
1440
|
return i = a % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function Ei(e) {
|
|
1443
1443
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1444
1444
|
}
|
|
1445
|
-
var tn = new
|
|
1445
|
+
var tn = new Q("tag:yaml.org,2002:binary", {
|
|
1446
1446
|
kind: "scalar",
|
|
1447
|
-
resolve:
|
|
1448
|
-
construct:
|
|
1449
|
-
predicate:
|
|
1450
|
-
represent:
|
|
1451
|
-
}),
|
|
1452
|
-
function
|
|
1447
|
+
resolve: wi,
|
|
1448
|
+
construct: Si,
|
|
1449
|
+
predicate: Ei,
|
|
1450
|
+
represent: Ii
|
|
1451
|
+
}), Ti = Object.prototype.hasOwnProperty, Fi = Object.prototype.toString;
|
|
1452
|
+
function Oi(e) {
|
|
1453
1453
|
if (e === null)
|
|
1454
1454
|
return !0;
|
|
1455
1455
|
var t = [], n, r, i, a, o, l = e;
|
|
1456
1456
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1457
|
-
if (i = l[n], o = !1,
|
|
1457
|
+
if (i = l[n], o = !1, Fi.call(i) !== "[object Object]")
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
for (a in i)
|
|
1460
|
-
if (
|
|
1460
|
+
if (Ti.call(i, a))
|
|
1461
1461
|
if (!o)
|
|
1462
1462
|
o = !0;
|
|
1463
1463
|
else
|
|
@@ -1474,23 +1474,23 @@ function Li(e) {
|
|
|
1474
1474
|
function $i(e) {
|
|
1475
1475
|
return e !== null ? e : [];
|
|
1476
1476
|
}
|
|
1477
|
-
var nn = new
|
|
1477
|
+
var nn = new Q("tag:yaml.org,2002:omap", {
|
|
1478
1478
|
kind: "sequence",
|
|
1479
|
-
resolve:
|
|
1479
|
+
resolve: Oi,
|
|
1480
1480
|
construct: $i
|
|
1481
|
-
}),
|
|
1482
|
-
function
|
|
1481
|
+
}), Li = Object.prototype.toString;
|
|
1482
|
+
function Ni(e) {
|
|
1483
1483
|
if (e === null)
|
|
1484
1484
|
return !0;
|
|
1485
1485
|
var t, n, r, i, a, o = e;
|
|
1486
1486
|
for (a = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1487
|
-
if (r = o[t],
|
|
1487
|
+
if (r = o[t], Li.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1))
|
|
1488
1488
|
return !1;
|
|
1489
1489
|
a[t] = [i[0], r[i[0]]];
|
|
1490
1490
|
}
|
|
1491
1491
|
return !0;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Bi(e) {
|
|
1494
1494
|
if (e === null)
|
|
1495
1495
|
return [];
|
|
1496
1496
|
var t, n, r, i, a, o = e;
|
|
@@ -1498,28 +1498,28 @@ function Ri(e) {
|
|
|
1498
1498
|
r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
|
|
1499
1499
|
return a;
|
|
1500
1500
|
}
|
|
1501
|
-
var rn = new
|
|
1501
|
+
var rn = new Q("tag:yaml.org,2002:pairs", {
|
|
1502
1502
|
kind: "sequence",
|
|
1503
|
-
resolve:
|
|
1504
|
-
construct:
|
|
1505
|
-
}),
|
|
1503
|
+
resolve: Ni,
|
|
1504
|
+
construct: Bi
|
|
1505
|
+
}), Ri = Object.prototype.hasOwnProperty;
|
|
1506
1506
|
function Mi(e) {
|
|
1507
1507
|
if (e === null)
|
|
1508
1508
|
return !0;
|
|
1509
1509
|
var t, n = e;
|
|
1510
1510
|
for (t in n)
|
|
1511
|
-
if (
|
|
1511
|
+
if (Ri.call(n, t) && n[t] !== null)
|
|
1512
1512
|
return !1;
|
|
1513
1513
|
return !0;
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function Ki(e) {
|
|
1516
1516
|
return e !== null ? e : {};
|
|
1517
1517
|
}
|
|
1518
|
-
var an = new
|
|
1518
|
+
var an = new Q("tag:yaml.org,2002:set", {
|
|
1519
1519
|
kind: "mapping",
|
|
1520
1520
|
resolve: Mi,
|
|
1521
|
-
construct:
|
|
1522
|
-
}),
|
|
1521
|
+
construct: Ki
|
|
1522
|
+
}), Xe = Gt.extend({
|
|
1523
1523
|
implicit: [
|
|
1524
1524
|
Xt,
|
|
1525
1525
|
en
|
|
@@ -1530,47 +1530,47 @@ var an = new Z("tag:yaml.org,2002:set", {
|
|
|
1530
1530
|
rn,
|
|
1531
1531
|
an
|
|
1532
1532
|
]
|
|
1533
|
-
}),
|
|
1533
|
+
}), ce = Object.prototype.hasOwnProperty, Fe = 1, on = 2, ln = 3, Oe = 4, De = 1, Di = 2, ht = 3, ji = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ui = /[\x85\u2028\u2029]/, Pi = /[,\[\]\{\}]/, sn = /^(?:!|!!|![a-z\-]+!)$/i, cn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1534
1534
|
function mt(e) {
|
|
1535
1535
|
return Object.prototype.toString.call(e);
|
|
1536
1536
|
}
|
|
1537
1537
|
function ae(e) {
|
|
1538
1538
|
return e === 10 || e === 13;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function de(e) {
|
|
1541
1541
|
return e === 9 || e === 32;
|
|
1542
1542
|
}
|
|
1543
1543
|
function te(e) {
|
|
1544
1544
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function me(e) {
|
|
1547
1547
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function qi(e) {
|
|
1550
1550
|
var t;
|
|
1551
1551
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function Hi(e) {
|
|
1554
1554
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function Yi(e) {
|
|
1557
1557
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1558
1558
|
}
|
|
1559
1559
|
function gt(e) {
|
|
1560
1560
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1561
1561
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Vi(e) {
|
|
1564
1564
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1565
1565
|
(e - 65536 >> 10) + 55296,
|
|
1566
1566
|
(e - 65536 & 1023) + 56320
|
|
1567
1567
|
);
|
|
1568
1568
|
}
|
|
1569
1569
|
var un = new Array(256), dn = new Array(256);
|
|
1570
|
-
for (var
|
|
1571
|
-
un[
|
|
1572
|
-
function
|
|
1573
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1570
|
+
for (var fe = 0; fe < 256; fe++)
|
|
1571
|
+
un[fe] = gt(fe) ? 1 : 0, dn[fe] = gt(fe);
|
|
1572
|
+
function zi(e, t) {
|
|
1573
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Xe, 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 = [];
|
|
1574
1574
|
}
|
|
1575
1575
|
function fn(e, t) {
|
|
1576
1576
|
var n = {
|
|
@@ -1581,26 +1581,26 @@ function fn(e, t) {
|
|
|
1581
1581
|
line: e.line,
|
|
1582
1582
|
column: e.position - e.lineStart
|
|
1583
1583
|
};
|
|
1584
|
-
return n.snippet =
|
|
1584
|
+
return n.snippet = Zr(n), new ee(t, n);
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function _(e, t) {
|
|
1587
1587
|
throw fn(e, t);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function $e(e, t) {
|
|
1590
1590
|
e.onWarning && e.onWarning.call(null, fn(e, t));
|
|
1591
1591
|
}
|
|
1592
1592
|
var yt = {
|
|
1593
1593
|
YAML: function(t, n, r) {
|
|
1594
1594
|
var i, a, o;
|
|
1595
|
-
t.version !== null &&
|
|
1595
|
+
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"), a = parseInt(i[1], 10), o = parseInt(i[2], 10), a !== 1 && _(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = o < 2, o !== 1 && o !== 2 && $e(t, "unsupported YAML version of the document");
|
|
1596
1596
|
},
|
|
1597
1597
|
TAG: function(t, n, r) {
|
|
1598
1598
|
var i, a;
|
|
1599
|
-
r.length !== 2 &&
|
|
1599
|
+
r.length !== 2 && _(t, "TAG directive accepts exactly two arguments"), i = r[0], a = r[1], sn.test(i) || _(t, "ill-formed tag handle (first argument) of the TAG directive"), ce.call(t.tagMap, i) && _(t, 'there is a previously declared suffix for "' + i + '" tag handle'), cn.test(a) || _(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1600
1600
|
try {
|
|
1601
1601
|
a = decodeURIComponent(a);
|
|
1602
1602
|
} catch {
|
|
1603
|
-
|
|
1603
|
+
_(t, "tag prefix is malformed: " + a);
|
|
1604
1604
|
}
|
|
1605
1605
|
t.tagMap[i] = a;
|
|
1606
1606
|
}
|
|
@@ -1610,22 +1610,22 @@ function se(e, t, n, r) {
|
|
|
1610
1610
|
if (t < n) {
|
|
1611
1611
|
if (l = e.input.slice(t, n), r)
|
|
1612
1612
|
for (i = 0, a = l.length; i < a; i += 1)
|
|
1613
|
-
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1613
|
+
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || _(e, "expected valid JSON character");
|
|
1614
1614
|
else
|
|
1615
|
-
|
|
1615
|
+
ji.test(l) && _(e, "the stream contains non-printable characters");
|
|
1616
1616
|
e.result += l;
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
1619
|
function vt(e, t, n, r) {
|
|
1620
1620
|
var i, a, o, l;
|
|
1621
|
-
for (
|
|
1622
|
-
a = i[o],
|
|
1621
|
+
for (Z.isObject(n) || _(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, l = i.length; o < l; o += 1)
|
|
1622
|
+
a = i[o], ce.call(t, a) || (t[a] = n[a], r[a] = !0);
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function ge(e, t, n, r, i, a, o, l, s) {
|
|
1625
1625
|
var c, d;
|
|
1626
1626
|
if (Array.isArray(i))
|
|
1627
1627
|
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1628
|
-
Array.isArray(i[c]) &&
|
|
1628
|
+
Array.isArray(i[c]) && _(e, "nested arrays are not supported inside keys"), typeof i == "object" && mt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1629
1629
|
if (typeof i == "object" && mt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1630
1630
|
if (Array.isArray(a))
|
|
1631
1631
|
for (c = 0, d = a.length; c < d; c += 1)
|
|
@@ -1633,7 +1633,7 @@ function xe(e, t, n, r, i, a, o, l, s) {
|
|
|
1633
1633
|
else
|
|
1634
1634
|
vt(e, t, a, n);
|
|
1635
1635
|
else
|
|
1636
|
-
!e.json && !
|
|
1636
|
+
!e.json && !ce.call(n, i) && ce.call(t, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, _(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1637
1637
|
configurable: !0,
|
|
1638
1638
|
enumerable: !0,
|
|
1639
1639
|
writable: !0,
|
|
@@ -1641,50 +1641,50 @@ function xe(e, t, n, r, i, a, o, l, s) {
|
|
|
1641
1641
|
}) : t[i] = a, delete n[i];
|
|
1642
1642
|
return t;
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function et(e) {
|
|
1645
1645
|
var t;
|
|
1646
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1646
|
+
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;
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1648
|
+
function J(e, t, n) {
|
|
1649
1649
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1650
|
-
for (;
|
|
1650
|
+
for (; de(i); )
|
|
1651
1651
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1652
1652
|
if (t && i === 35)
|
|
1653
1653
|
do
|
|
1654
1654
|
i = e.input.charCodeAt(++e.position);
|
|
1655
1655
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1656
1656
|
if (ae(i))
|
|
1657
|
-
for (
|
|
1657
|
+
for (et(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1658
1658
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1659
1659
|
else
|
|
1660
1660
|
break;
|
|
1661
1661
|
}
|
|
1662
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
1662
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && $e(e, "deficient indentation"), r;
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function Be(e) {
|
|
1665
1665
|
var t = e.position, n;
|
|
1666
1666
|
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)));
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1669
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1668
|
+
function tt(e, t) {
|
|
1669
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += Z.repeat(`
|
|
1670
1670
|
`, t - 1));
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1673
|
-
var r, i, a, o, l, s, c, d, u = e.kind,
|
|
1674
|
-
if (f = e.input.charCodeAt(e.position), te(f) ||
|
|
1672
|
+
function Wi(e, t, n) {
|
|
1673
|
+
var r, i, a, o, l, s, c, d, u = e.kind, p = e.result, f;
|
|
1674
|
+
if (f = e.input.charCodeAt(e.position), te(f) || me(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 && me(i)))
|
|
1675
1675
|
return !1;
|
|
1676
1676
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; f !== 0; ) {
|
|
1677
1677
|
if (f === 58) {
|
|
1678
|
-
if (i = e.input.charCodeAt(e.position + 1), te(i) || n &&
|
|
1678
|
+
if (i = e.input.charCodeAt(e.position + 1), te(i) || n && me(i))
|
|
1679
1679
|
break;
|
|
1680
1680
|
} else if (f === 35) {
|
|
1681
1681
|
if (r = e.input.charCodeAt(e.position - 1), te(r))
|
|
1682
1682
|
break;
|
|
1683
1683
|
} else {
|
|
1684
|
-
if (e.position === e.lineStart &&
|
|
1684
|
+
if (e.position === e.lineStart && Be(e) || n && me(f))
|
|
1685
1685
|
break;
|
|
1686
1686
|
if (ae(f))
|
|
1687
|
-
if (s = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1687
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, J(e, !1, -1), e.lineIndent >= t) {
|
|
1688
1688
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1689
1689
|
continue;
|
|
1690
1690
|
} else {
|
|
@@ -1692,11 +1692,11 @@ function Ji(e, t, n) {
|
|
|
1692
1692
|
break;
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
|
-
l && (se(e, a, o, !1),
|
|
1695
|
+
l && (se(e, a, o, !1), tt(e, e.line - s), a = o = e.position, l = !1), de(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1696
1696
|
}
|
|
1697
|
-
return se(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1697
|
+
return se(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function Ji(e, t) {
|
|
1700
1700
|
var n, r, i;
|
|
1701
1701
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1702
1702
|
return !1;
|
|
@@ -1707,10 +1707,10 @@ function Gi(e, t) {
|
|
|
1707
1707
|
else
|
|
1708
1708
|
return !0;
|
|
1709
1709
|
else
|
|
1710
|
-
ae(n) ? (se(e, r, i, !0),
|
|
1711
|
-
|
|
1710
|
+
ae(n) ? (se(e, r, i, !0), tt(e, J(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Be(e) ? _(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1711
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function Gi(e, t) {
|
|
1714
1714
|
var n, r, i, a, o, l;
|
|
1715
1715
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1716
1716
|
return !1;
|
|
@@ -1719,38 +1719,38 @@ function Zi(e, t) {
|
|
|
1719
1719
|
return se(e, n, e.position, !0), e.position++, !0;
|
|
1720
1720
|
if (l === 92) {
|
|
1721
1721
|
if (se(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ae(l))
|
|
1722
|
-
|
|
1722
|
+
J(e, !1, t);
|
|
1723
1723
|
else if (l < 256 && un[l])
|
|
1724
1724
|
e.result += dn[l], e.position++;
|
|
1725
|
-
else if ((o =
|
|
1725
|
+
else if ((o = Hi(l)) > 0) {
|
|
1726
1726
|
for (i = o, a = 0; i > 0; i--)
|
|
1727
|
-
l = e.input.charCodeAt(++e.position), (o =
|
|
1728
|
-
e.result +=
|
|
1727
|
+
l = e.input.charCodeAt(++e.position), (o = qi(l)) >= 0 ? a = (a << 4) + o : _(e, "expected hexadecimal character");
|
|
1728
|
+
e.result += Vi(a), e.position++;
|
|
1729
1729
|
} else
|
|
1730
|
-
|
|
1730
|
+
_(e, "unknown escape sequence");
|
|
1731
1731
|
n = r = e.position;
|
|
1732
1732
|
} else
|
|
1733
|
-
ae(l) ? (se(e, n, r, !0),
|
|
1733
|
+
ae(l) ? (se(e, n, r, !0), tt(e, J(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Be(e) ? _(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1734
1734
|
}
|
|
1735
|
-
|
|
1735
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u,
|
|
1739
|
-
if (
|
|
1737
|
+
function Zi(e, t) {
|
|
1738
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u, p, f, C = /* @__PURE__ */ Object.create(null), m, k, B, b;
|
|
1739
|
+
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1740
1740
|
d = 93, f = !1, l = [];
|
|
1741
|
-
else if (
|
|
1741
|
+
else if (b === 123)
|
|
1742
1742
|
d = 125, f = !0, l = {};
|
|
1743
1743
|
else
|
|
1744
1744
|
return !1;
|
|
1745
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1746
|
-
if (
|
|
1745
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1746
|
+
if (J(e, !0, t), b = e.input.charCodeAt(e.position), b === d)
|
|
1747
1747
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1748
|
-
n ?
|
|
1748
|
+
n ? b === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries"), k = m = B = null, u = p = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), te(c) && (u = p = !0, e.position++, J(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, be(e, t, Fe, !1, !0), k = e.tag, m = e.result, J(e, !0, t), b = e.input.charCodeAt(e.position), (p || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), J(e, !0, t), be(e, t, Fe, !1, !0), B = e.result), f ? ge(e, l, C, k, m, B, r, i, a) : u ? l.push(ge(e, null, C, k, m, B, r, i, a)) : l.push(m), J(e, !0, t), b = e.input.charCodeAt(e.position), b === 44 ? (n = !0, b = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1749
1749
|
}
|
|
1750
|
-
|
|
1750
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1753
|
-
var n, r, i =
|
|
1752
|
+
function Qi(e, t) {
|
|
1753
|
+
var n, r, i = De, a = !1, o = !1, l = t, s = 0, c = !1, d, u;
|
|
1754
1754
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1755
1755
|
r = !1;
|
|
1756
1756
|
else if (u === 62)
|
|
@@ -1759,37 +1759,37 @@ function Xi(e, t) {
|
|
|
1759
1759
|
return !1;
|
|
1760
1760
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1761
1761
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1762
|
-
|
|
1763
|
-
else if ((d =
|
|
1764
|
-
d === 0 ?
|
|
1762
|
+
De === i ? i = u === 43 ? ht : Di : _(e, "repeat of a chomping mode identifier");
|
|
1763
|
+
else if ((d = Yi(u)) >= 0)
|
|
1764
|
+
d === 0 ? _(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? _(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1765
1765
|
else
|
|
1766
1766
|
break;
|
|
1767
|
-
if (
|
|
1767
|
+
if (de(u)) {
|
|
1768
1768
|
do
|
|
1769
1769
|
u = e.input.charCodeAt(++e.position);
|
|
1770
|
-
while (
|
|
1770
|
+
while (de(u));
|
|
1771
1771
|
if (u === 35)
|
|
1772
1772
|
do
|
|
1773
1773
|
u = e.input.charCodeAt(++e.position);
|
|
1774
1774
|
while (!ae(u) && u !== 0);
|
|
1775
1775
|
}
|
|
1776
1776
|
for (; u !== 0; ) {
|
|
1777
|
-
for (
|
|
1777
|
+
for (et(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && u === 32; )
|
|
1778
1778
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1779
1779
|
if (!o && e.lineIndent > l && (l = e.lineIndent), ae(u)) {
|
|
1780
1780
|
s++;
|
|
1781
1781
|
continue;
|
|
1782
1782
|
}
|
|
1783
1783
|
if (e.lineIndent < l) {
|
|
1784
|
-
i === ht ? e.result +=
|
|
1785
|
-
`, a ? 1 + s : s) : i ===
|
|
1784
|
+
i === ht ? e.result += Z.repeat(`
|
|
1785
|
+
`, a ? 1 + s : s) : i === De && a && (e.result += `
|
|
1786
1786
|
`);
|
|
1787
1787
|
break;
|
|
1788
1788
|
}
|
|
1789
|
-
for (r ?
|
|
1790
|
-
`, a ? 1 + s : s)) : c ? (c = !1, e.result +=
|
|
1791
|
-
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result +=
|
|
1792
|
-
`, s) : e.result +=
|
|
1789
|
+
for (r ? de(u) ? (c = !0, e.result += Z.repeat(`
|
|
1790
|
+
`, a ? 1 + s : s)) : c ? (c = !1, e.result += Z.repeat(`
|
|
1791
|
+
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result += Z.repeat(`
|
|
1792
|
+
`, s) : e.result += Z.repeat(`
|
|
1793
1793
|
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !ae(u) && u !== 0; )
|
|
1794
1794
|
u = e.input.charCodeAt(++e.position);
|
|
1795
1795
|
se(e, n, e.position, !1);
|
|
@@ -1800,120 +1800,120 @@ function bt(e, t) {
|
|
|
1800
1800
|
var n, r = e.tag, i = e.anchor, a = [], o, l = !1, s;
|
|
1801
1801
|
if (e.firstTabInLine !== -1)
|
|
1802
1802
|
return !1;
|
|
1803
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1804
|
-
if (l = !0, e.position++,
|
|
1803
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), 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 || (o = e.input.charCodeAt(e.position + 1), !te(o)))); ) {
|
|
1804
|
+
if (l = !0, e.position++, J(e, !0, -1) && e.lineIndent <= t) {
|
|
1805
1805
|
a.push(null), s = e.input.charCodeAt(e.position);
|
|
1806
1806
|
continue;
|
|
1807
1807
|
}
|
|
1808
|
-
if (n = e.line,
|
|
1809
|
-
|
|
1808
|
+
if (n = e.line, be(e, t, ln, !1, !0), a.push(e.result), J(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1809
|
+
_(e, "bad indentation of a sequence entry");
|
|
1810
1810
|
else if (e.lineIndent < t)
|
|
1811
1811
|
break;
|
|
1812
1812
|
}
|
|
1813
1813
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1816
|
-
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {},
|
|
1815
|
+
function Xi(e, t, n) {
|
|
1816
|
+
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), f = null, C = null, m = null, k = !1, B = !1, b;
|
|
1817
1817
|
if (e.firstTabInLine !== -1)
|
|
1818
1818
|
return !1;
|
|
1819
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1820
|
-
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1821
|
-
|
|
1819
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1820
|
+
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), a = e.line, (b === 63 || b === 58) && te(r))
|
|
1821
|
+
b === 63 ? (k && (ge(e, u, p, f, C, null, o, l, s), f = C = 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, b = r;
|
|
1822
1822
|
else {
|
|
1823
|
-
if (o = e.line, l = e.lineStart, s = e.position, !
|
|
1823
|
+
if (o = e.line, l = e.lineStart, s = e.position, !be(e, n, on, !1, !0))
|
|
1824
1824
|
break;
|
|
1825
1825
|
if (e.line === a) {
|
|
1826
|
-
for (
|
|
1827
|
-
|
|
1828
|
-
if (
|
|
1829
|
-
|
|
1830
|
-
else if (
|
|
1831
|
-
|
|
1826
|
+
for (b = e.input.charCodeAt(e.position); de(b); )
|
|
1827
|
+
b = e.input.charCodeAt(++e.position);
|
|
1828
|
+
if (b === 58)
|
|
1829
|
+
b = e.input.charCodeAt(++e.position), te(b) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (ge(e, u, p, f, C, null, o, l, s), f = C = m = null), B = !0, k = !1, i = !1, f = e.tag, C = e.result;
|
|
1830
|
+
else if (B)
|
|
1831
|
+
_(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1832
1832
|
else
|
|
1833
1833
|
return e.tag = c, e.anchor = d, !0;
|
|
1834
|
-
} else if (
|
|
1835
|
-
|
|
1834
|
+
} else if (B)
|
|
1835
|
+
_(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1836
1836
|
else
|
|
1837
1837
|
return e.tag = c, e.anchor = d, !0;
|
|
1838
1838
|
}
|
|
1839
|
-
if ((e.line === a || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position),
|
|
1840
|
-
|
|
1839
|
+
if ((e.line === a || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), be(e, t, Oe, !0, i) && (k ? C = e.result : m = e.result), k || (ge(e, u, p, f, C, m, o, l, s), f = C = m = null), J(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && b !== 0)
|
|
1840
|
+
_(e, "bad indentation of a mapping entry");
|
|
1841
1841
|
else if (e.lineIndent < t)
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
|
-
return k &&
|
|
1844
|
+
return k && ge(e, u, p, f, C, null, o, l, s), B && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), B;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function ea(e) {
|
|
1847
1847
|
var t, n = !1, r = !1, i, a, o;
|
|
1848
1848
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1849
1849
|
return !1;
|
|
1850
|
-
if (e.tag !== null &&
|
|
1850
|
+
if (e.tag !== null && _(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1851
1851
|
do
|
|
1852
1852
|
o = e.input.charCodeAt(++e.position);
|
|
1853
1853
|
while (o !== 0 && o !== 62);
|
|
1854
|
-
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
1854
|
+
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : _(e, "unexpected end of the stream within a verbatim tag");
|
|
1855
1855
|
} else {
|
|
1856
1856
|
for (; o !== 0 && !te(o); )
|
|
1857
|
-
o === 33 && (r ?
|
|
1858
|
-
a = e.input.slice(t, e.position),
|
|
1857
|
+
o === 33 && (r ? _(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), sn.test(i) || _(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1858
|
+
a = e.input.slice(t, e.position), Pi.test(a) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
1859
1859
|
}
|
|
1860
|
-
a && !cn.test(a) &&
|
|
1860
|
+
a && !cn.test(a) && _(e, "tag name cannot contain such characters: " + a);
|
|
1861
1861
|
try {
|
|
1862
1862
|
a = decodeURIComponent(a);
|
|
1863
1863
|
} catch {
|
|
1864
|
-
|
|
1864
|
+
_(e, "tag name is malformed: " + a);
|
|
1865
1865
|
}
|
|
1866
|
-
return n ? e.tag = a :
|
|
1866
|
+
return n ? e.tag = a : ce.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : _(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function ta(e) {
|
|
1869
1869
|
var t, n;
|
|
1870
1870
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1871
1871
|
return !1;
|
|
1872
|
-
for (e.anchor !== null &&
|
|
1872
|
+
for (e.anchor !== null && _(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !te(n) && !me(n); )
|
|
1873
1873
|
n = e.input.charCodeAt(++e.position);
|
|
1874
|
-
return e.position === t &&
|
|
1874
|
+
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;
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1876
|
+
function na(e) {
|
|
1877
1877
|
var t, n, r;
|
|
1878
1878
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
1879
1879
|
return !1;
|
|
1880
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !te(r) && !
|
|
1880
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !te(r) && !me(r); )
|
|
1881
1881
|
r = e.input.charCodeAt(++e.position);
|
|
1882
|
-
return e.position === t &&
|
|
1883
|
-
}
|
|
1884
|
-
function
|
|
1885
|
-
var a, o, l, s = 1, c = !1, d = !1, u,
|
|
1886
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Oe === n || ln === n, r &&
|
|
1887
|
-
for (;
|
|
1888
|
-
|
|
1889
|
-
if (l && (l = c || i), (s === 1 || Oe === n) && (Fe === n || on === n ?
|
|
1882
|
+
return e.position === t && _(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ce.call(e.anchorMap, n) || _(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], J(e, !0, -1), !0;
|
|
1883
|
+
}
|
|
1884
|
+
function be(e, t, n, r, i) {
|
|
1885
|
+
var a, o, l, s = 1, c = !1, d = !1, u, p, f, C, m, k;
|
|
1886
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Oe === n || ln === 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)
|
|
1887
|
+
for (; ea(e) || ta(e); )
|
|
1888
|
+
J(e, !0, -1) ? (c = !0, l = a, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1889
|
+
if (l && (l = c || i), (s === 1 || Oe === n) && (Fe === n || on === n ? m = t : m = t + 1, k = e.position - e.lineStart, s === 1 ? l && (bt(e, k) || Xi(e, k, m)) || Zi(e, m) ? d = !0 : (o && Qi(e, m) || Ji(e, m) || Gi(e, m) ? d = !0 : na(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && _(e, "alias node should not have any properties")) : Wi(e, m, Fe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && bt(e, k))), e.tag === null)
|
|
1890
1890
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1891
1891
|
else if (e.tag === "?") {
|
|
1892
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1893
|
-
if (
|
|
1894
|
-
e.result =
|
|
1892
|
+
for (e.result !== null && e.kind !== "scalar" && _(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
1893
|
+
if (C = e.implicitTypes[u], C.resolve(e.result)) {
|
|
1894
|
+
e.result = C.construct(e.result), e.tag = C.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1895
1895
|
break;
|
|
1896
1896
|
}
|
|
1897
1897
|
} else if (e.tag !== "!") {
|
|
1898
|
-
if (
|
|
1899
|
-
|
|
1898
|
+
if (ce.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1899
|
+
C = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1900
1900
|
else
|
|
1901
|
-
for (
|
|
1901
|
+
for (C = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, p = f.length; u < p; u += 1)
|
|
1902
1902
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
1903
|
-
|
|
1903
|
+
C = f[u];
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
1906
|
-
|
|
1906
|
+
C || _(e, "unknown tag !<" + e.tag + ">"), e.result !== null && C.kind !== e.kind && _(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + C.kind + '", not "' + e.kind + '"'), C.resolve(e.result, e.tag) ? (e.result = C.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : _(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1907
1907
|
}
|
|
1908
1908
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function ra(e) {
|
|
1911
1911
|
var t = e.position, n, r, i, a = !1, o;
|
|
1912
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (
|
|
1912
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (J(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
1913
1913
|
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !te(o); )
|
|
1914
1914
|
o = e.input.charCodeAt(++e.position);
|
|
1915
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1916
|
-
for (;
|
|
1915
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && _(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
1916
|
+
for (; de(o); )
|
|
1917
1917
|
o = e.input.charCodeAt(++e.position);
|
|
1918
1918
|
if (o === 35) {
|
|
1919
1919
|
do
|
|
@@ -1927,28 +1927,28 @@ function ia(e) {
|
|
|
1927
1927
|
o = e.input.charCodeAt(++e.position);
|
|
1928
1928
|
i.push(e.input.slice(n, e.position));
|
|
1929
1929
|
}
|
|
1930
|
-
o !== 0 &&
|
|
1930
|
+
o !== 0 && et(e), ce.call(yt, r) ? yt[r](e, r, i) : $e(e, 'unknown document directive "' + r + '"');
|
|
1931
1931
|
}
|
|
1932
|
-
if (
|
|
1933
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1932
|
+
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)) : a && _(e, "directives end mark is expected"), be(e, e.lineIndent - 1, Oe, !1, !0), J(e, !0, -1), e.checkLineBreaks && Ui.test(e.input.slice(t, e.position)) && $e(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Be(e)) {
|
|
1933
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, J(e, !0, -1));
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
1936
|
if (e.position < e.length - 1)
|
|
1937
|
-
|
|
1937
|
+
_(e, "end of the stream or a document separator is expected");
|
|
1938
1938
|
else
|
|
1939
1939
|
return;
|
|
1940
1940
|
}
|
|
1941
1941
|
function pn(e, t) {
|
|
1942
1942
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1943
1943
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1944
|
-
var n = new
|
|
1945
|
-
for (r !== -1 && (n.position = r,
|
|
1944
|
+
var n = new zi(e, t), r = e.indexOf("\0");
|
|
1945
|
+
for (r !== -1 && (n.position = r, _(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1946
1946
|
n.lineIndent += 1, n.position += 1;
|
|
1947
1947
|
for (; n.position < n.length - 1; )
|
|
1948
|
-
|
|
1948
|
+
ra(n);
|
|
1949
1949
|
return n.documents;
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1951
|
+
function ia(e, t, n) {
|
|
1952
1952
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1953
1953
|
var r = pn(e, n);
|
|
1954
1954
|
if (typeof t != "function")
|
|
@@ -1956,34 +1956,34 @@ function aa(e, t, n) {
|
|
|
1956
1956
|
for (var i = 0, a = r.length; i < a; i += 1)
|
|
1957
1957
|
t(r[i]);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function aa(e, t) {
|
|
1960
1960
|
var n = pn(e, t);
|
|
1961
1961
|
if (n.length !== 0) {
|
|
1962
1962
|
if (n.length === 1)
|
|
1963
1963
|
return n[0];
|
|
1964
|
-
throw new
|
|
1964
|
+
throw new ee("expected a single document in the stream, but found more");
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
|
-
var
|
|
1968
|
-
loadAll:
|
|
1969
|
-
load:
|
|
1970
|
-
}, mn = Object.prototype.toString, gn = Object.prototype.hasOwnProperty,
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
var
|
|
1967
|
+
var oa = ia, la = aa, hn = {
|
|
1968
|
+
loadAll: oa,
|
|
1969
|
+
load: la
|
|
1970
|
+
}, mn = Object.prototype.toString, gn = Object.prototype.hasOwnProperty, nt = 65279, sa = 9, Se = 10, ca = 13, ua = 32, da = 33, fa = 34, Pe = 35, pa = 37, ha = 38, ma = 39, ga = 42, yn = 44, ya = 45, Le = 58, va = 61, ba = 62, xa = 63, Ca = 64, vn = 91, bn = 93, _a = 96, xn = 123, ka = 124, Cn = 125, X = {};
|
|
1971
|
+
X[0] = "\\0";
|
|
1972
|
+
X[7] = "\\a";
|
|
1973
|
+
X[8] = "\\b";
|
|
1974
|
+
X[9] = "\\t";
|
|
1975
|
+
X[10] = "\\n";
|
|
1976
|
+
X[11] = "\\v";
|
|
1977
|
+
X[12] = "\\f";
|
|
1978
|
+
X[13] = "\\r";
|
|
1979
|
+
X[27] = "\\e";
|
|
1980
|
+
X[34] = '\\"';
|
|
1981
|
+
X[92] = "\\\\";
|
|
1982
|
+
X[133] = "\\N";
|
|
1983
|
+
X[160] = "\\_";
|
|
1984
|
+
X[8232] = "\\L";
|
|
1985
|
+
X[8233] = "\\P";
|
|
1986
|
+
var Aa = [
|
|
1987
1987
|
"y",
|
|
1988
1988
|
"Y",
|
|
1989
1989
|
"yes",
|
|
@@ -2000,8 +2000,8 @@ var wa = [
|
|
|
2000
2000
|
"off",
|
|
2001
2001
|
"Off",
|
|
2002
2002
|
"OFF"
|
|
2003
|
-
],
|
|
2004
|
-
function
|
|
2003
|
+
], wa = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2004
|
+
function Sa(e, t) {
|
|
2005
2005
|
var n, r, i, a, o, l, s;
|
|
2006
2006
|
if (t === null)
|
|
2007
2007
|
return {};
|
|
@@ -2009,7 +2009,7 @@ function Ia(e, t) {
|
|
|
2009
2009
|
o = r[i], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && gn.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[o] = l;
|
|
2010
2010
|
return n;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function Ia(e) {
|
|
2013
2013
|
var t, n, r;
|
|
2014
2014
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2015
2015
|
n = "x", r = 2;
|
|
@@ -2018,25 +2018,25 @@ function Ea(e) {
|
|
|
2018
2018
|
else if (e <= 4294967295)
|
|
2019
2019
|
n = "U", r = 8;
|
|
2020
2020
|
else
|
|
2021
|
-
throw new
|
|
2022
|
-
return "\\" + n +
|
|
2021
|
+
throw new ee("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2022
|
+
return "\\" + n + Z.repeat("0", r - t.length) + t;
|
|
2023
2023
|
}
|
|
2024
|
-
var
|
|
2025
|
-
function
|
|
2026
|
-
this.schema = e.schema ||
|
|
2024
|
+
var Ea = 1, Ie = 2;
|
|
2025
|
+
function Ta(e) {
|
|
2026
|
+
this.schema = e.schema || Xe, 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 = Sa(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 === '"' ? Ie : Ea, 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;
|
|
2027
2027
|
}
|
|
2028
2028
|
function xt(e, t) {
|
|
2029
|
-
for (var n =
|
|
2029
|
+
for (var n = Z.repeat(" ", t), r = 0, i = -1, a = "", o, l = e.length; r < l; )
|
|
2030
2030
|
i = e.indexOf(`
|
|
2031
2031
|
`, r), i === -1 ? (o = e.slice(r), r = l) : (o = e.slice(r, i + 1), r = i + 1), o.length && o !== `
|
|
2032
2032
|
` && (a += n), a += o;
|
|
2033
2033
|
return a;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function qe(e, t) {
|
|
2036
2036
|
return `
|
|
2037
|
-
` +
|
|
2037
|
+
` + Z.repeat(" ", e.indent * t);
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2039
|
+
function Fa(e, t) {
|
|
2040
2040
|
var n, r, i;
|
|
2041
2041
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2042
2042
|
if (i = e.implicitTypes[n], i.resolve(t))
|
|
@@ -2044,13 +2044,13 @@ function Oa(e, t) {
|
|
|
2044
2044
|
return !1;
|
|
2045
2045
|
}
|
|
2046
2046
|
function Ne(e) {
|
|
2047
|
-
return e ===
|
|
2047
|
+
return e === ua || e === sa;
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2050
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2049
|
+
function Ee(e) {
|
|
2050
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== nt || 65536 <= e && e <= 1114111;
|
|
2051
2051
|
}
|
|
2052
2052
|
function Ct(e) {
|
|
2053
|
-
return
|
|
2053
|
+
return Ee(e) && e !== nt && e !== ca && e !== Se;
|
|
2054
2054
|
}
|
|
2055
2055
|
function _t(e, t, n) {
|
|
2056
2056
|
var r = Ct(e), i = r && !Ne(e);
|
|
@@ -2059,16 +2059,16 @@ function _t(e, t, n) {
|
|
|
2059
2059
|
(n ? (
|
|
2060
2060
|
// c = flow-in
|
|
2061
2061
|
r
|
|
2062
|
-
) : r && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn) && e !==
|
|
2062
|
+
) : r && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn) && e !== Pe && !(t === Le && !i) || Ct(t) && !Ne(t) && e === Pe || t === Le && i
|
|
2063
2063
|
);
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return
|
|
2065
|
+
function Oa(e) {
|
|
2066
|
+
return Ee(e) && e !== nt && !Ne(e) && e !== ya && e !== xa && e !== Le && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn && e !== Pe && e !== ha && e !== ga && e !== da && e !== ka && e !== va && e !== ba && e !== ma && e !== fa && e !== pa && e !== Ca && e !== _a;
|
|
2067
2067
|
}
|
|
2068
2068
|
function $a(e) {
|
|
2069
|
-
return !Ne(e) && e !==
|
|
2069
|
+
return !Ne(e) && e !== Le;
|
|
2070
2070
|
}
|
|
2071
|
-
function
|
|
2071
|
+
function Ae(e, t) {
|
|
2072
2072
|
var n = e.charCodeAt(t), r;
|
|
2073
2073
|
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;
|
|
2074
2074
|
}
|
|
@@ -2076,39 +2076,39 @@ function _n(e) {
|
|
|
2076
2076
|
var t = /^\n* /;
|
|
2077
2077
|
return t.test(e);
|
|
2078
2078
|
}
|
|
2079
|
-
var kn = 1,
|
|
2080
|
-
function
|
|
2081
|
-
var s, c = 0, d = null, u = !1,
|
|
2079
|
+
var kn = 1, He = 2, An = 3, wn = 4, he = 5;
|
|
2080
|
+
function La(e, t, n, r, i, a, o, l) {
|
|
2081
|
+
var s, c = 0, d = null, u = !1, p = !1, f = r !== -1, C = -1, m = Oa(Ae(e, 0)) && $a(Ae(e, e.length - 1));
|
|
2082
2082
|
if (t || o)
|
|
2083
2083
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2084
|
-
if (c =
|
|
2085
|
-
return
|
|
2086
|
-
|
|
2084
|
+
if (c = Ae(e, s), !Ee(c))
|
|
2085
|
+
return he;
|
|
2086
|
+
m = m && _t(c, d, l), d = c;
|
|
2087
2087
|
}
|
|
2088
2088
|
else {
|
|
2089
2089
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2090
|
-
if (c =
|
|
2091
|
-
u = !0, f && (
|
|
2092
|
-
s -
|
|
2093
|
-
else if (!
|
|
2094
|
-
return
|
|
2095
|
-
|
|
2090
|
+
if (c = Ae(e, s), c === Se)
|
|
2091
|
+
u = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
2092
|
+
s - C - 1 > r && e[C + 1] !== " ", C = s);
|
|
2093
|
+
else if (!Ee(c))
|
|
2094
|
+
return he;
|
|
2095
|
+
m = m && _t(c, d, l), d = c;
|
|
2096
2096
|
}
|
|
2097
|
-
|
|
2097
|
+
p = p || f && s - C - 1 > r && e[C + 1] !== " ";
|
|
2098
2098
|
}
|
|
2099
|
-
return !u && !
|
|
2099
|
+
return !u && !p ? m && !o && !i(e) ? kn : a === Ie ? he : He : n > 9 && _n(e) ? he : o ? a === Ie ? he : He : p ? wn : An;
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function Na(e, t, n, r, i) {
|
|
2102
2102
|
e.dump = function() {
|
|
2103
2103
|
if (t.length === 0)
|
|
2104
|
-
return e.quotingType ===
|
|
2105
|
-
if (!e.noCompatMode && (
|
|
2106
|
-
return e.quotingType ===
|
|
2104
|
+
return e.quotingType === Ie ? '""' : "''";
|
|
2105
|
+
if (!e.noCompatMode && (Aa.indexOf(t) !== -1 || wa.test(t)))
|
|
2106
|
+
return e.quotingType === Ie ? '"' + t + '"' : "'" + t + "'";
|
|
2107
2107
|
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2108
2108
|
function s(c) {
|
|
2109
|
-
return
|
|
2109
|
+
return Fa(e, c);
|
|
2110
2110
|
}
|
|
2111
|
-
switch (
|
|
2111
|
+
switch (La(
|
|
2112
2112
|
t,
|
|
2113
2113
|
l,
|
|
2114
2114
|
e.indent,
|
|
@@ -2120,16 +2120,16 @@ function Ba(e, t, n, r, i) {
|
|
|
2120
2120
|
)) {
|
|
2121
2121
|
case kn:
|
|
2122
2122
|
return t;
|
|
2123
|
-
case
|
|
2123
|
+
case He:
|
|
2124
2124
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2125
2125
|
case An:
|
|
2126
2126
|
return "|" + kt(t, e.indent) + At(xt(t, a));
|
|
2127
2127
|
case wn:
|
|
2128
|
-
return ">" + kt(t, e.indent) + At(xt(
|
|
2129
|
-
case
|
|
2130
|
-
return '"' +
|
|
2128
|
+
return ">" + kt(t, e.indent) + At(xt(Ba(t, o), a));
|
|
2129
|
+
case he:
|
|
2130
|
+
return '"' + Ra(t) + '"';
|
|
2131
2131
|
default:
|
|
2132
|
-
throw new
|
|
2132
|
+
throw new ee("impossible error: invalid scalar style");
|
|
2133
2133
|
}
|
|
2134
2134
|
}();
|
|
2135
2135
|
}
|
|
@@ -2145,7 +2145,7 @@ function At(e) {
|
|
|
2145
2145
|
return e[e.length - 1] === `
|
|
2146
2146
|
` ? e.slice(0, -1) : e;
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2148
|
+
function Ba(e, t) {
|
|
2149
2149
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2150
2150
|
var c = e.indexOf(`
|
|
2151
2151
|
`);
|
|
@@ -2168,9 +2168,9 @@ function wt(e, t) {
|
|
|
2168
2168
|
`, e.length - i > t && o > i ? s += e.slice(i, o) + `
|
|
2169
2169
|
` + e.slice(o + 1) : s += e.slice(i), s.slice(1);
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2171
|
+
function Ra(e) {
|
|
2172
2172
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2173
|
-
n =
|
|
2173
|
+
n = Ae(e, i), r = X[n], !r && Ee(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Ia(n);
|
|
2174
2174
|
return t;
|
|
2175
2175
|
}
|
|
2176
2176
|
function Ma(e, t, n) {
|
|
@@ -2182,25 +2182,25 @@ function Ma(e, t, n) {
|
|
|
2182
2182
|
function St(e, t, n, r) {
|
|
2183
2183
|
var i = "", a = e.tag, o, l, s;
|
|
2184
2184
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2185
|
-
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), 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 +=
|
|
2185
|
+
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), 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 += qe(e, t)), e.dump && Se === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2186
2186
|
e.tag = a, e.dump = i || "[]";
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function Ka(e, t, n) {
|
|
2189
2189
|
var r = "", i = e.tag, a = Object.keys(n), o, l, s, c, d;
|
|
2190
2190
|
for (o = 0, l = a.length; o < l; o += 1)
|
|
2191
2191
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], 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));
|
|
2192
2192
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u,
|
|
2194
|
+
function Da(e, t, n, r) {
|
|
2195
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u, p;
|
|
2196
2196
|
if (e.sortKeys === !0)
|
|
2197
2197
|
o.sort();
|
|
2198
2198
|
else if (typeof e.sortKeys == "function")
|
|
2199
2199
|
o.sort(e.sortKeys);
|
|
2200
2200
|
else if (e.sortKeys)
|
|
2201
|
-
throw new
|
|
2201
|
+
throw new ee("sortKeys must be a boolean or a function");
|
|
2202
2202
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2203
|
-
|
|
2203
|
+
p = "", (!r || i !== "") && (p += qe(e, t)), c = o[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 && Se === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, u && (p += qe(e, t)), le(e, t + 1, d, !0, u) && (e.dump && Se === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
2204
2204
|
e.tag = a, e.dump = i || "{}";
|
|
2205
2205
|
}
|
|
2206
2206
|
function It(e, t, n) {
|
|
@@ -2213,7 +2213,7 @@ function It(e, t, n) {
|
|
|
2213
2213
|
else if (gn.call(l.represent, s))
|
|
2214
2214
|
r = l.represent[s](t, s);
|
|
2215
2215
|
else
|
|
2216
|
-
throw new
|
|
2216
|
+
throw new ee("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2217
2217
|
e.dump = r;
|
|
2218
2218
|
}
|
|
2219
2219
|
return !0;
|
|
@@ -2224,22 +2224,22 @@ function le(e, t, n, r, i, a, o) {
|
|
|
2224
2224
|
e.tag = null, e.dump = n, It(e, n, !1) || It(e, n, !0);
|
|
2225
2225
|
var l = mn.call(e.dump), s = r, c;
|
|
2226
2226
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2227
|
-
var d = l === "[object Object]" || l === "[object Array]", u,
|
|
2228
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2227
|
+
var d = l === "[object Object]" || l === "[object Array]", u, p;
|
|
2228
|
+
if (d && (u = e.duplicates.indexOf(n), p = u !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (i = !1), p && e.usedDuplicates[u])
|
|
2229
2229
|
e.dump = "*ref_" + u;
|
|
2230
2230
|
else {
|
|
2231
|
-
if (d &&
|
|
2232
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2231
|
+
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2232
|
+
r && Object.keys(e.dump).length !== 0 ? (Da(e, t, e.dump, i), p && (e.dump = "&ref_" + u + e.dump)) : (Ka(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2233
2233
|
else if (l === "[object Array]")
|
|
2234
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i),
|
|
2234
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i), p && (e.dump = "&ref_" + u + e.dump)) : (Ma(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2235
2235
|
else if (l === "[object String]")
|
|
2236
|
-
e.tag !== "?" &&
|
|
2236
|
+
e.tag !== "?" && Na(e, e.dump, t, a, s);
|
|
2237
2237
|
else {
|
|
2238
2238
|
if (l === "[object Undefined]")
|
|
2239
2239
|
return !1;
|
|
2240
2240
|
if (e.skipInvalid)
|
|
2241
2241
|
return !1;
|
|
2242
|
-
throw new
|
|
2242
|
+
throw new ee("unacceptable kind of an object to dump " + l);
|
|
2243
2243
|
}
|
|
2244
2244
|
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2245
2245
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2247,41 +2247,41 @@ function le(e, t, n, r, i, a, o) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
return !0;
|
|
2249
2249
|
}
|
|
2250
|
-
function
|
|
2250
|
+
function ja(e, t) {
|
|
2251
2251
|
var n = [], r = [], i, a;
|
|
2252
|
-
for (
|
|
2252
|
+
for (Ye(e, n, r), i = 0, a = r.length; i < a; i += 1)
|
|
2253
2253
|
t.duplicates.push(n[r[i]]);
|
|
2254
2254
|
t.usedDuplicates = new Array(a);
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function Ye(e, t, n) {
|
|
2257
2257
|
var r, i, a;
|
|
2258
2258
|
if (e !== null && typeof e == "object")
|
|
2259
2259
|
if (i = t.indexOf(e), i !== -1)
|
|
2260
2260
|
n.indexOf(i) === -1 && n.push(i);
|
|
2261
2261
|
else if (t.push(e), Array.isArray(e))
|
|
2262
2262
|
for (i = 0, a = e.length; i < a; i += 1)
|
|
2263
|
-
|
|
2263
|
+
Ye(e[i], t, n);
|
|
2264
2264
|
else
|
|
2265
2265
|
for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1)
|
|
2266
|
-
|
|
2266
|
+
Ye(e[r[i]], t, n);
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function Ua(e, t) {
|
|
2269
2269
|
t = t || {};
|
|
2270
|
-
var n = new
|
|
2271
|
-
n.noRefs ||
|
|
2270
|
+
var n = new Ta(t);
|
|
2271
|
+
n.noRefs || ja(e, n);
|
|
2272
2272
|
var r = e;
|
|
2273
2273
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), le(n, 0, r, !0, !0) ? n.dump + `
|
|
2274
2274
|
` : "";
|
|
2275
2275
|
}
|
|
2276
|
-
var
|
|
2277
|
-
dump:
|
|
2276
|
+
var Pa = Ua, qa = {
|
|
2277
|
+
dump: Pa
|
|
2278
2278
|
};
|
|
2279
|
-
function
|
|
2279
|
+
function rt(e, t) {
|
|
2280
2280
|
return function() {
|
|
2281
2281
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2282
2282
|
};
|
|
2283
2283
|
}
|
|
2284
|
-
var
|
|
2284
|
+
var Ha = Q, Ya = jt, Va = Ht, za = Jt, Wa = Gt, Ja = Xe, Ga = hn.load, Za = hn.loadAll, Qa = qa.dump, Xa = ee, eo = {
|
|
2285
2285
|
binary: tn,
|
|
2286
2286
|
float: Wt,
|
|
2287
2287
|
map: qt,
|
|
@@ -2295,23 +2295,23 @@ var Ya = Z, Va = jt, za = Ht, Wa = Jt, Ja = Gt, Ga = et, Za = hn.load, Qa = hn.l
|
|
|
2295
2295
|
omap: nn,
|
|
2296
2296
|
seq: Pt,
|
|
2297
2297
|
str: Ut
|
|
2298
|
-
},
|
|
2299
|
-
Type:
|
|
2300
|
-
Schema:
|
|
2301
|
-
FAILSAFE_SCHEMA:
|
|
2302
|
-
JSON_SCHEMA:
|
|
2303
|
-
CORE_SCHEMA:
|
|
2304
|
-
DEFAULT_SCHEMA:
|
|
2305
|
-
load:
|
|
2306
|
-
loadAll:
|
|
2307
|
-
dump:
|
|
2308
|
-
YAMLException:
|
|
2309
|
-
types:
|
|
2310
|
-
safeLoad:
|
|
2311
|
-
safeLoadAll:
|
|
2312
|
-
safeDump:
|
|
2298
|
+
}, to = rt("safeLoad", "load"), no = rt("safeLoadAll", "loadAll"), ro = rt("safeDump", "dump"), io = {
|
|
2299
|
+
Type: Ha,
|
|
2300
|
+
Schema: Ya,
|
|
2301
|
+
FAILSAFE_SCHEMA: Va,
|
|
2302
|
+
JSON_SCHEMA: za,
|
|
2303
|
+
CORE_SCHEMA: Wa,
|
|
2304
|
+
DEFAULT_SCHEMA: Ja,
|
|
2305
|
+
load: Ga,
|
|
2306
|
+
loadAll: Za,
|
|
2307
|
+
dump: Qa,
|
|
2308
|
+
YAMLException: Xa,
|
|
2309
|
+
types: eo,
|
|
2310
|
+
safeLoad: to,
|
|
2311
|
+
safeLoadAll: no,
|
|
2312
|
+
safeDump: ro
|
|
2313
2313
|
};
|
|
2314
|
-
const
|
|
2314
|
+
const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
2315
2315
|
__name: "YamlCodeBlock",
|
|
2316
2316
|
props: {
|
|
2317
2317
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2323,28 +2323,28 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2323
2323
|
setup(e) {
|
|
2324
2324
|
const t = e, n = A(() => {
|
|
2325
2325
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2326
|
-
return Object.keys(r).length === 0 && r.constructor === Object ? "" :
|
|
2326
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : io.dump(r).trim();
|
|
2327
2327
|
});
|
|
2328
2328
|
return (r, i) => {
|
|
2329
|
-
const a =
|
|
2330
|
-
return h(), S("div",
|
|
2331
|
-
t.yamlRecord ? (h(),
|
|
2329
|
+
const a = $("KCodeBlock");
|
|
2330
|
+
return h(), S("div", ao, [
|
|
2331
|
+
t.yamlRecord ? (h(), M(a, {
|
|
2332
2332
|
key: 0,
|
|
2333
2333
|
id: "yaml-codeblock",
|
|
2334
2334
|
code: n.value,
|
|
2335
2335
|
language: "yaml",
|
|
2336
2336
|
theme: "dark"
|
|
2337
|
-
}, null, 8, ["code"])) :
|
|
2337
|
+
}, null, 8, ["code"])) : U("", !0)
|
|
2338
2338
|
]);
|
|
2339
2339
|
};
|
|
2340
2340
|
}
|
|
2341
|
-
}),
|
|
2341
|
+
}), oo = {
|
|
2342
2342
|
key: 0,
|
|
2343
2343
|
class: "config-card-display-form"
|
|
2344
|
-
},
|
|
2344
|
+
}, lo = ["data-testid"], so = {
|
|
2345
2345
|
key: 0,
|
|
2346
2346
|
class: "config-card-prop-section-title"
|
|
2347
|
-
},
|
|
2347
|
+
}, co = /* @__PURE__ */ W({
|
|
2348
2348
|
__name: "ConfigCardDisplay",
|
|
2349
2349
|
props: {
|
|
2350
2350
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2383,29 +2383,29 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2383
2383
|
}
|
|
2384
2384
|
},
|
|
2385
2385
|
setup(e) {
|
|
2386
|
-
const t = e, n =
|
|
2386
|
+
const t = e, n = Ve(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = A(() => {
|
|
2387
2387
|
if (!t.record)
|
|
2388
2388
|
return t.record;
|
|
2389
2389
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2390
2390
|
return delete o.created_at, delete o.updated_at, o;
|
|
2391
2391
|
});
|
|
2392
2392
|
return (o, l) => (h(), S(oe, null, [
|
|
2393
|
-
e.format === "structured" ? (h(), S("div",
|
|
2393
|
+
e.format === "structured" ? (h(), S("div", oo, [
|
|
2394
2394
|
(h(!0), S(oe, null, ie(e.propListTypes, (s) => (h(), S("div", {
|
|
2395
2395
|
key: `config-card-details-${s}-props`,
|
|
2396
|
-
class:
|
|
2396
|
+
class: ye(`config-card-details-${s}-props`),
|
|
2397
2397
|
"data-testid": `config-card-details-${s}-props`
|
|
2398
2398
|
}, [
|
|
2399
|
-
s !== "basic" ? (h(), S("div",
|
|
2400
|
-
(h(!0), S(oe, null, ie(e.propertyCollections[s], (c) => (h(),
|
|
2399
|
+
s !== "basic" ? (h(), S("div", so, O(s === "advanced" ? T(r)("baseConfigCard.sections.advanced") : T(r)("baseConfigCard.sections.plugin")), 1)) : U("", !0),
|
|
2400
|
+
(h(!0), S(oe, null, ie(e.propertyCollections[s], (c) => (h(), M(Rt, {
|
|
2401
2401
|
key: c.key,
|
|
2402
2402
|
item: c
|
|
2403
|
-
},
|
|
2403
|
+
}, ve({
|
|
2404
2404
|
label: x(() => [
|
|
2405
|
-
|
|
2405
|
+
Y(o.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2406
2406
|
]),
|
|
2407
2407
|
[c.key]: x(({ rowValue: d }) => [
|
|
2408
|
-
|
|
2408
|
+
Y(o.$slots, c.key, {
|
|
2409
2409
|
row: c,
|
|
2410
2410
|
rowValue: d
|
|
2411
2411
|
}, void 0, !0)
|
|
@@ -2415,38 +2415,38 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2415
2415
|
i(c) ? {
|
|
2416
2416
|
name: "label-tooltip",
|
|
2417
2417
|
fn: x(() => [
|
|
2418
|
-
|
|
2418
|
+
Y(o.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2419
2419
|
]),
|
|
2420
2420
|
key: "0"
|
|
2421
2421
|
} : void 0
|
|
2422
2422
|
]), 1032, ["item"]))), 128))
|
|
2423
|
-
], 10,
|
|
2424
|
-
])) :
|
|
2425
|
-
e.format === "json" && t.record ? (h(),
|
|
2423
|
+
], 10, lo))), 128))
|
|
2424
|
+
])) : U("", !0),
|
|
2425
|
+
e.format === "json" && t.record ? (h(), M(Mt, {
|
|
2426
2426
|
key: 1,
|
|
2427
2427
|
config: t.config,
|
|
2428
2428
|
"fetcher-url": t.fetcherUrl,
|
|
2429
2429
|
"json-record": a.value,
|
|
2430
2430
|
"request-method": "get"
|
|
2431
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2432
|
-
e.format === "yaml" && t.record ? (h(),
|
|
2431
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : U("", !0),
|
|
2432
|
+
e.format === "yaml" && t.record ? (h(), M(Sn, {
|
|
2433
2433
|
key: 2,
|
|
2434
2434
|
"yaml-record": a.value
|
|
2435
|
-
}, null, 8, ["yaml-record"])) :
|
|
2435
|
+
}, null, 8, ["yaml-record"])) : U("", !0)
|
|
2436
2436
|
], 64));
|
|
2437
2437
|
}
|
|
2438
|
-
}),
|
|
2438
|
+
}), uo = /* @__PURE__ */ re(co, [["__scopeId", "data-v-147a2f70"]]), xe = "24px", it = (e, t) => {
|
|
2439
2439
|
const n = e.__vccOpts || e;
|
|
2440
2440
|
for (const [r, i] of t)
|
|
2441
2441
|
n[r] = i;
|
|
2442
2442
|
return n;
|
|
2443
|
-
},
|
|
2443
|
+
}, fo = (e) => (We("data-v-40a7f387"), e = e(), Je(), e), po = ["aria-hidden"], ho = {
|
|
2444
2444
|
key: 0,
|
|
2445
2445
|
"data-testid": "kui-icon-svg-title"
|
|
2446
|
-
},
|
|
2446
|
+
}, mo = /* @__PURE__ */ fo(() => /* @__PURE__ */ L("path", {
|
|
2447
2447
|
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",
|
|
2448
2448
|
fill: "currentColor"
|
|
2449
|
-
}, null, -1)),
|
|
2449
|
+
}, null, -1)), go = /* @__PURE__ */ W({
|
|
2450
2450
|
__name: "BookIcon",
|
|
2451
2451
|
props: {
|
|
2452
2452
|
/** The accessibility text provided to screen readers */
|
|
@@ -2477,7 +2477,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2477
2477
|
size: {
|
|
2478
2478
|
type: [Number, String],
|
|
2479
2479
|
required: !1,
|
|
2480
|
-
default:
|
|
2480
|
+
default: xe,
|
|
2481
2481
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2482
2482
|
validator: (e) => {
|
|
2483
2483
|
if (typeof e == "number" && e > 0)
|
|
@@ -2506,7 +2506,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2506
2506
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2507
2507
|
return `${a}px`;
|
|
2508
2508
|
}
|
|
2509
|
-
return
|
|
2509
|
+
return xe;
|
|
2510
2510
|
}), r = A(() => ({
|
|
2511
2511
|
boxSizing: "border-box",
|
|
2512
2512
|
color: t.color,
|
|
@@ -2515,11 +2515,11 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2515
2515
|
lineHeight: "0",
|
|
2516
2516
|
width: n.value
|
|
2517
2517
|
}));
|
|
2518
|
-
return (i, a) => (h(),
|
|
2518
|
+
return (i, a) => (h(), M(Te(e.as), {
|
|
2519
2519
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2520
2520
|
class: "kui-icon book-icon",
|
|
2521
2521
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2522
|
-
style:
|
|
2522
|
+
style: ze(r.value)
|
|
2523
2523
|
}, {
|
|
2524
2524
|
default: x(() => [
|
|
2525
2525
|
(h(), S("svg", {
|
|
@@ -2532,119 +2532,20 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2532
2532
|
width: "100%",
|
|
2533
2533
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2534
2534
|
}, [
|
|
2535
|
-
e.title ? (h(), S("title",
|
|
2536
|
-
|
|
2537
|
-
], 8,
|
|
2535
|
+
e.title ? (h(), S("title", ho, O(e.title), 1)) : U("", !0),
|
|
2536
|
+
mo
|
|
2537
|
+
], 8, po))
|
|
2538
2538
|
]),
|
|
2539
2539
|
_: 1
|
|
2540
2540
|
}, 8, ["aria-hidden", "style"]));
|
|
2541
2541
|
}
|
|
2542
|
-
}),
|
|
2542
|
+
}), yo = /* @__PURE__ */ it(go, [["__scopeId", "data-v-40a7f387"]]), vo = (e) => (We("data-v-19f4cbbe"), e = e(), Je(), e), bo = ["aria-hidden"], xo = {
|
|
2543
2543
|
key: 0,
|
|
2544
2544
|
"data-testid": "kui-icon-svg-title"
|
|
2545
|
-
},
|
|
2546
|
-
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2547
|
-
fill: "currentColor"
|
|
2548
|
-
}, null, -1)), ko = /* @__PURE__ */ Y({
|
|
2549
|
-
__name: "ChevronDownIcon",
|
|
2550
|
-
props: {
|
|
2551
|
-
/** The accessibility text provided to screen readers */
|
|
2552
|
-
title: {
|
|
2553
|
-
type: String,
|
|
2554
|
-
required: !1,
|
|
2555
|
-
default: ""
|
|
2556
|
-
},
|
|
2557
|
-
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
2558
|
-
color: {
|
|
2559
|
-
type: String,
|
|
2560
|
-
required: !1,
|
|
2561
|
-
default: "currentColor"
|
|
2562
|
-
},
|
|
2563
|
-
/** The CSS display property for the icon. Defaults to `block` */
|
|
2564
|
-
display: {
|
|
2565
|
-
type: String,
|
|
2566
|
-
required: !1,
|
|
2567
|
-
default: "block"
|
|
2568
|
-
},
|
|
2569
|
-
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
2570
|
-
decorative: {
|
|
2571
|
-
type: Boolean,
|
|
2572
|
-
required: !1,
|
|
2573
|
-
default: !1
|
|
2574
|
-
},
|
|
2575
|
-
/** The icon size */
|
|
2576
|
-
size: {
|
|
2577
|
-
type: [Number, String],
|
|
2578
|
-
required: !1,
|
|
2579
|
-
default: de,
|
|
2580
|
-
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2581
|
-
validator: (e) => {
|
|
2582
|
-
if (typeof e == "number" && e > 0)
|
|
2583
|
-
return !0;
|
|
2584
|
-
if (typeof e == "string") {
|
|
2585
|
-
const t = String(e).replace(/px/gi, ""), n = Number(t);
|
|
2586
|
-
if (n && !isNaN(n) && Number.isInteger(n) && n > 0)
|
|
2587
|
-
return !0;
|
|
2588
|
-
}
|
|
2589
|
-
return !1;
|
|
2590
|
-
}
|
|
2591
|
-
},
|
|
2592
|
-
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
2593
|
-
as: {
|
|
2594
|
-
type: String,
|
|
2595
|
-
required: !1,
|
|
2596
|
-
default: "span"
|
|
2597
|
-
}
|
|
2598
|
-
},
|
|
2599
|
-
setup(e) {
|
|
2600
|
-
const t = e, n = A(() => {
|
|
2601
|
-
if (typeof t.size == "number" && t.size > 0)
|
|
2602
|
-
return `${t.size}px`;
|
|
2603
|
-
if (typeof t.size == "string") {
|
|
2604
|
-
const i = String(t.size).replace(/px/gi, ""), a = Number(i);
|
|
2605
|
-
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2606
|
-
return `${a}px`;
|
|
2607
|
-
}
|
|
2608
|
-
return de;
|
|
2609
|
-
}), r = A(() => ({
|
|
2610
|
-
boxSizing: "border-box",
|
|
2611
|
-
color: t.color,
|
|
2612
|
-
display: t.display,
|
|
2613
|
-
height: n.value,
|
|
2614
|
-
lineHeight: "0",
|
|
2615
|
-
width: n.value
|
|
2616
|
-
}));
|
|
2617
|
-
return (i, a) => (h(), K(Ae(e.as), {
|
|
2618
|
-
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2619
|
-
class: "kui-icon chevron-down-icon",
|
|
2620
|
-
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2621
|
-
style: Be(r.value)
|
|
2622
|
-
}, {
|
|
2623
|
-
default: x(() => [
|
|
2624
|
-
(h(), S("svg", {
|
|
2625
|
-
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2626
|
-
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2627
|
-
fill: "none",
|
|
2628
|
-
height: "100%",
|
|
2629
|
-
role: "img",
|
|
2630
|
-
viewBox: "0 0 24 24",
|
|
2631
|
-
width: "100%",
|
|
2632
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2633
|
-
}, [
|
|
2634
|
-
e.title ? (h(), S("title", Co, L(e.title), 1)) : D("", !0),
|
|
2635
|
-
_o
|
|
2636
|
-
], 8, xo))
|
|
2637
|
-
]),
|
|
2638
|
-
_: 1
|
|
2639
|
-
}, 8, ["aria-hidden", "style"]));
|
|
2640
|
-
}
|
|
2641
|
-
}), Ao = /* @__PURE__ */ De(ko, [["__scopeId", "data-v-98c34919"]]), wo = (e) => (Re("data-v-19f4cbbe"), e = e(), Ke(), e), So = ["aria-hidden"], Io = {
|
|
2642
|
-
key: 0,
|
|
2643
|
-
"data-testid": "kui-icon-svg-title"
|
|
2644
|
-
}, Eo = /* @__PURE__ */ wo(() => /* @__PURE__ */ $("path", {
|
|
2545
|
+
}, Co = /* @__PURE__ */ vo(() => /* @__PURE__ */ L("path", {
|
|
2645
2546
|
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",
|
|
2646
2547
|
fill: "currentColor"
|
|
2647
|
-
}, null, -1)),
|
|
2548
|
+
}, null, -1)), _o = /* @__PURE__ */ W({
|
|
2648
2549
|
__name: "CloseIcon",
|
|
2649
2550
|
props: {
|
|
2650
2551
|
/** The accessibility text provided to screen readers */
|
|
@@ -2675,7 +2576,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2675
2576
|
size: {
|
|
2676
2577
|
type: [Number, String],
|
|
2677
2578
|
required: !1,
|
|
2678
|
-
default:
|
|
2579
|
+
default: xe,
|
|
2679
2580
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2680
2581
|
validator: (e) => {
|
|
2681
2582
|
if (typeof e == "number" && e > 0)
|
|
@@ -2704,7 +2605,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2704
2605
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2705
2606
|
return `${a}px`;
|
|
2706
2607
|
}
|
|
2707
|
-
return
|
|
2608
|
+
return xe;
|
|
2708
2609
|
}), r = A(() => ({
|
|
2709
2610
|
boxSizing: "border-box",
|
|
2710
2611
|
color: t.color,
|
|
@@ -2713,11 +2614,11 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2713
2614
|
lineHeight: "0",
|
|
2714
2615
|
width: n.value
|
|
2715
2616
|
}));
|
|
2716
|
-
return (i, a) => (h(),
|
|
2617
|
+
return (i, a) => (h(), M(Te(e.as), {
|
|
2717
2618
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2718
2619
|
class: "kui-icon close-icon",
|
|
2719
2620
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2720
|
-
style:
|
|
2621
|
+
style: ze(r.value)
|
|
2721
2622
|
}, {
|
|
2722
2623
|
default: x(() => [
|
|
2723
2624
|
(h(), S("svg", {
|
|
@@ -2730,20 +2631,20 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2730
2631
|
width: "100%",
|
|
2731
2632
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2732
2633
|
}, [
|
|
2733
|
-
e.title ? (h(), S("title",
|
|
2734
|
-
|
|
2735
|
-
], 8,
|
|
2634
|
+
e.title ? (h(), S("title", xo, O(e.title), 1)) : U("", !0),
|
|
2635
|
+
Co
|
|
2636
|
+
], 8, bo))
|
|
2736
2637
|
]),
|
|
2737
2638
|
_: 1
|
|
2738
2639
|
}, 8, ["aria-hidden", "style"]));
|
|
2739
2640
|
}
|
|
2740
|
-
}),
|
|
2641
|
+
}), ko = /* @__PURE__ */ it(_o, [["__scopeId", "data-v-19f4cbbe"]]), Ao = (e) => (We("data-v-13f41aa3"), e = e(), Je(), e), wo = ["aria-hidden"], So = {
|
|
2741
2642
|
key: 0,
|
|
2742
2643
|
"data-testid": "kui-icon-svg-title"
|
|
2743
|
-
},
|
|
2644
|
+
}, Io = /* @__PURE__ */ Ao(() => /* @__PURE__ */ L("path", {
|
|
2744
2645
|
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",
|
|
2745
2646
|
fill: "currentColor"
|
|
2746
|
-
}, null, -1)),
|
|
2647
|
+
}, null, -1)), Eo = /* @__PURE__ */ W({
|
|
2747
2648
|
__name: "CopyIcon",
|
|
2748
2649
|
props: {
|
|
2749
2650
|
/** The accessibility text provided to screen readers */
|
|
@@ -2774,7 +2675,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2774
2675
|
size: {
|
|
2775
2676
|
type: [Number, String],
|
|
2776
2677
|
required: !1,
|
|
2777
|
-
default:
|
|
2678
|
+
default: xe,
|
|
2778
2679
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2779
2680
|
validator: (e) => {
|
|
2780
2681
|
if (typeof e == "number" && e > 0)
|
|
@@ -2803,7 +2704,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2803
2704
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2804
2705
|
return `${a}px`;
|
|
2805
2706
|
}
|
|
2806
|
-
return
|
|
2707
|
+
return xe;
|
|
2807
2708
|
}), r = A(() => ({
|
|
2808
2709
|
boxSizing: "border-box",
|
|
2809
2710
|
color: t.color,
|
|
@@ -2812,11 +2713,11 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2812
2713
|
lineHeight: "0",
|
|
2813
2714
|
width: n.value
|
|
2814
2715
|
}));
|
|
2815
|
-
return (i, a) => (h(),
|
|
2716
|
+
return (i, a) => (h(), M(Te(e.as), {
|
|
2816
2717
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2817
2718
|
class: "kui-icon copy-icon",
|
|
2818
2719
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2819
|
-
style:
|
|
2720
|
+
style: ze(r.value)
|
|
2820
2721
|
}, {
|
|
2821
2722
|
default: x(() => [
|
|
2822
2723
|
(h(), S("svg", {
|
|
@@ -2829,14 +2730,14 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2829
2730
|
width: "100%",
|
|
2830
2731
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2831
2732
|
}, [
|
|
2832
|
-
e.title ? (h(), S("title",
|
|
2833
|
-
|
|
2834
|
-
], 8,
|
|
2733
|
+
e.title ? (h(), S("title", So, O(e.title), 1)) : U("", !0),
|
|
2734
|
+
Io
|
|
2735
|
+
], 8, wo))
|
|
2835
2736
|
]),
|
|
2836
2737
|
_: 1
|
|
2837
2738
|
}, 8, ["aria-hidden", "style"]));
|
|
2838
2739
|
}
|
|
2839
|
-
}),
|
|
2740
|
+
}), To = /* @__PURE__ */ it(Eo, [["__scopeId", "data-v-13f41aa3"]]), Fo = { "data-testid": "config-card-title" }, Oo = { class: "config-card-actions" }, $o = ["href"], Lo = { class: "config-card-details-section" }, No = /* @__PURE__ */ W({
|
|
2840
2741
|
__name: "EntityBaseConfigCard",
|
|
2841
2742
|
props: {
|
|
2842
2743
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2927,11 +2828,11 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2927
2828
|
label: "YAML",
|
|
2928
2829
|
value: "yaml"
|
|
2929
2830
|
}
|
|
2930
|
-
], c = R("structured"), d = (
|
|
2931
|
-
c.value =
|
|
2831
|
+
], c = R("structured"), d = (v) => {
|
|
2832
|
+
c.value = v == null ? void 0 : v.value;
|
|
2932
2833
|
}, u = {
|
|
2933
2834
|
id: {
|
|
2934
|
-
type:
|
|
2835
|
+
type: H.ID,
|
|
2935
2836
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
2936
2837
|
order: 0,
|
|
2937
2838
|
section: ne.Basic
|
|
@@ -2941,185 +2842,185 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
2941
2842
|
section: ne.Basic
|
|
2942
2843
|
},
|
|
2943
2844
|
enabled: {
|
|
2944
|
-
type:
|
|
2845
|
+
type: H.BadgeStatus,
|
|
2945
2846
|
order: 2,
|
|
2946
2847
|
section: ne.Basic
|
|
2947
2848
|
},
|
|
2948
2849
|
updated_at: {
|
|
2949
|
-
type:
|
|
2850
|
+
type: H.Date,
|
|
2950
2851
|
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
2951
2852
|
order: 3,
|
|
2952
2853
|
section: ne.Basic
|
|
2953
2854
|
},
|
|
2954
2855
|
created_at: {
|
|
2955
|
-
type:
|
|
2856
|
+
type: H.Date,
|
|
2956
2857
|
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
2957
2858
|
order: 4,
|
|
2958
2859
|
section: ne.Basic
|
|
2959
2860
|
},
|
|
2960
2861
|
tags: {
|
|
2961
|
-
type:
|
|
2862
|
+
type: H.BadgeTag,
|
|
2962
2863
|
order: -1,
|
|
2963
2864
|
// the last property displayed
|
|
2964
2865
|
section: ne.Basic
|
|
2965
2866
|
}
|
|
2966
|
-
},
|
|
2967
|
-
var F,
|
|
2968
|
-
if (!
|
|
2867
|
+
}, p = R(!1), f = R(!1), C = R(""), m = R({}), k = A(() => {
|
|
2868
|
+
var F, w, P;
|
|
2869
|
+
if (!m.value)
|
|
2969
2870
|
return [];
|
|
2970
|
-
const
|
|
2971
|
-
for (const
|
|
2972
|
-
const
|
|
2973
|
-
let
|
|
2974
|
-
(
|
|
2871
|
+
const v = [], j = Object.keys(m.value).length;
|
|
2872
|
+
for (const I in m.value) {
|
|
2873
|
+
const E = (w = (F = r.configSchema) == null ? void 0 : F[I]) == null ? void 0 : w.order, K = (P = u[I]) == null ? void 0 : P.order;
|
|
2874
|
+
let q = j;
|
|
2875
|
+
(K || K === 0) && (q = K === -1 ? j + 1 : K), E && (q = E === -1 ? j + 1 : E), v.push([I, q]);
|
|
2975
2876
|
}
|
|
2976
|
-
return
|
|
2977
|
-
return
|
|
2978
|
-
}),
|
|
2979
|
-
var
|
|
2980
|
-
const
|
|
2877
|
+
return v.sort(function(I, E) {
|
|
2878
|
+
return I[1] - E[1];
|
|
2879
|
+
}), v.map((I) => {
|
|
2880
|
+
var ue, at;
|
|
2881
|
+
const E = I[0], K = (ue = m.value) == null ? void 0 : ue[E], q = ((at = r.configSchema) == null ? void 0 : at[E]) || {}, G = u[E];
|
|
2981
2882
|
return {
|
|
2982
|
-
key:
|
|
2983
|
-
value:
|
|
2984
|
-
hidden:
|
|
2985
|
-
type:
|
|
2986
|
-
label:
|
|
2987
|
-
tooltip:
|
|
2988
|
-
section:
|
|
2883
|
+
key: E,
|
|
2884
|
+
value: K,
|
|
2885
|
+
hidden: q.hidden || !1,
|
|
2886
|
+
type: q.type ?? ((G == null ? void 0 : G.type) || H.Text),
|
|
2887
|
+
label: q.label ?? ((G == null ? void 0 : G.label) || o(E)),
|
|
2888
|
+
tooltip: q.tooltip ?? ((G == null ? void 0 : G.tooltip) || void 0),
|
|
2889
|
+
section: q.section ?? ((G == null ? void 0 : G.section) || ne.Advanced)
|
|
2989
2890
|
};
|
|
2990
|
-
}).filter((
|
|
2991
|
-
}),
|
|
2992
|
-
var
|
|
2993
|
-
if (!
|
|
2891
|
+
}).filter((I) => !I.hidden && I.key !== r.pluginConfigKey);
|
|
2892
|
+
}), B = A(() => {
|
|
2893
|
+
var w, P;
|
|
2894
|
+
if (!m.value || !r.pluginConfigKey)
|
|
2994
2895
|
return [];
|
|
2995
|
-
const
|
|
2996
|
-
for (const
|
|
2997
|
-
const
|
|
2998
|
-
let
|
|
2999
|
-
|
|
2896
|
+
const v = m.value[r.pluginConfigKey] || {}, j = Object.keys(v).length, F = [];
|
|
2897
|
+
for (const I in v) {
|
|
2898
|
+
const E = (P = (w = r.pluginConfigSchema) == null ? void 0 : w[I]) == null ? void 0 : P.order, K = v[I];
|
|
2899
|
+
let q = K != null && K !== "" ? j - 1 : j;
|
|
2900
|
+
E && (q = E === -1 ? j + 1 : E), F.push([I, q]);
|
|
3000
2901
|
}
|
|
3001
|
-
return F.sort(function(
|
|
3002
|
-
return
|
|
3003
|
-
}), F.map((
|
|
3004
|
-
var
|
|
3005
|
-
const
|
|
2902
|
+
return F.sort(function(I, E) {
|
|
2903
|
+
return I[1] - E[1];
|
|
2904
|
+
}), F.map((I) => {
|
|
2905
|
+
var G;
|
|
2906
|
+
const E = I[0], K = v[E], q = ((G = r.pluginConfigSchema) == null ? void 0 : G[E]) || {};
|
|
3006
2907
|
return {
|
|
3007
|
-
key:
|
|
3008
|
-
value:
|
|
3009
|
-
hidden:
|
|
3010
|
-
type:
|
|
3011
|
-
label:
|
|
3012
|
-
tooltip:
|
|
2908
|
+
key: E,
|
|
2909
|
+
value: K,
|
|
2910
|
+
hidden: q.hidden || !1,
|
|
2911
|
+
type: q.type ?? H.Text,
|
|
2912
|
+
label: q.label ?? o(E),
|
|
2913
|
+
tooltip: q.tooltip ?? void 0,
|
|
3013
2914
|
section: ne.Plugin
|
|
3014
2915
|
};
|
|
3015
|
-
}).filter((
|
|
3016
|
-
}),
|
|
3017
|
-
var
|
|
2916
|
+
}).filter((I) => !I.hidden);
|
|
2917
|
+
}), b = A(() => {
|
|
2918
|
+
var v, j, F, w;
|
|
3018
2919
|
return {
|
|
3019
|
-
basic: (
|
|
3020
|
-
advanced: (
|
|
3021
|
-
plugin: (
|
|
2920
|
+
basic: (v = k.value) == null ? void 0 : v.filter((P) => P.section === ne.Basic),
|
|
2921
|
+
advanced: (j = k.value) == null ? void 0 : j.filter((P) => P.section === ne.Advanced),
|
|
2922
|
+
plugin: (w = B.value) == null ? void 0 : w.concat((F = k.value) == null ? void 0 : F.filter((P) => P.section === ne.Plugin))
|
|
3022
2923
|
};
|
|
3023
|
-
}),
|
|
3024
|
-
const
|
|
3025
|
-
return
|
|
3026
|
-
}),
|
|
3027
|
-
var
|
|
3028
|
-
let
|
|
3029
|
-
return r.config.app === "konnect" ?
|
|
2924
|
+
}), D = A(() => {
|
|
2925
|
+
const v = [];
|
|
2926
|
+
return b.value.basic.length && v.push("basic"), b.value.advanced.length && v.push("advanced"), b.value.plugin.length && v.push("plugin"), v;
|
|
2927
|
+
}), g = A(() => {
|
|
2928
|
+
var j, F;
|
|
2929
|
+
let v = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2930
|
+
return r.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((j = r.config) == null ? void 0 : j.controlPlaneId) || "") : r.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), v = v.replace(/{id}/gi, r.config.entityId), v;
|
|
3030
2931
|
});
|
|
3031
|
-
return
|
|
3032
|
-
n("loading",
|
|
2932
|
+
return Ce(p, (v) => {
|
|
2933
|
+
n("loading", v);
|
|
3033
2934
|
}, { immediate: !0 }), Ft(async () => {
|
|
3034
|
-
f.value = !1,
|
|
2935
|
+
f.value = !1, p.value = !0;
|
|
3035
2936
|
try {
|
|
3036
|
-
const { data:
|
|
2937
|
+
const { data: v } = await l.get(g.value);
|
|
3037
2938
|
if (r.dataKey)
|
|
3038
|
-
if (typeof
|
|
3039
|
-
|
|
2939
|
+
if (typeof v[r.dataKey] < "u")
|
|
2940
|
+
m.value = { ...v[r.dataKey] };
|
|
3040
2941
|
else
|
|
3041
2942
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3042
2943
|
else
|
|
3043
|
-
|
|
2944
|
+
m.value = { ...v };
|
|
3044
2945
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
3045
|
-
|
|
3046
|
-
}), n("fetch:success",
|
|
3047
|
-
} catch (
|
|
3048
|
-
const
|
|
3049
|
-
|
|
2946
|
+
m.value && typeof m.value[F] > "u" && (m.value[F] = null);
|
|
2947
|
+
}), n("fetch:success", v);
|
|
2948
|
+
} catch (v) {
|
|
2949
|
+
const j = a(v);
|
|
2950
|
+
C.value = j.startsWith("code") ? i("baseConfigCard.errors.load") : j, f.value = !0, n("fetch:error", v);
|
|
3050
2951
|
} finally {
|
|
3051
|
-
|
|
2952
|
+
p.value = !1;
|
|
3052
2953
|
}
|
|
3053
|
-
}), (
|
|
3054
|
-
const F =
|
|
3055
|
-
return h(), K
|
|
2954
|
+
}), (v, j) => {
|
|
2955
|
+
const F = $("KLabel"), w = $("KSelect"), P = $("KButton"), I = $("KSkeleton"), E = $("KEmptyState"), K = $("KCard");
|
|
2956
|
+
return h(), M(K, { class: "kong-ui-entity-base-config-card" }, ve({
|
|
3056
2957
|
actions: x(() => [
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
2958
|
+
L("div", Oo, [
|
|
2959
|
+
Y(v.$slots, "actions", {}, void 0, !0),
|
|
2960
|
+
N(F, {
|
|
3060
2961
|
class: "config-format-select-label",
|
|
3061
2962
|
"data-testid": "config-format-select-label"
|
|
3062
2963
|
}, {
|
|
3063
2964
|
default: x(() => [
|
|
3064
|
-
V(
|
|
2965
|
+
V(O(e.label), 1)
|
|
3065
2966
|
]),
|
|
3066
2967
|
_: 1
|
|
3067
2968
|
}),
|
|
3068
|
-
|
|
2969
|
+
N(w, {
|
|
3069
2970
|
"data-testid": "select-config-format",
|
|
3070
2971
|
items: s,
|
|
3071
2972
|
onChange: d
|
|
3072
2973
|
}),
|
|
3073
|
-
e.configCardDoc ? (h(),
|
|
2974
|
+
e.configCardDoc ? (h(), M(P, {
|
|
3074
2975
|
key: 0,
|
|
3075
2976
|
appearance: "tertiary",
|
|
3076
2977
|
class: "book-icon",
|
|
3077
2978
|
"data-testid": "book-icon"
|
|
3078
2979
|
}, {
|
|
3079
2980
|
default: x(() => [
|
|
3080
|
-
|
|
2981
|
+
L("a", {
|
|
3081
2982
|
href: e.configCardDoc,
|
|
3082
2983
|
rel: "noopener",
|
|
3083
2984
|
target: "_blank"
|
|
3084
2985
|
}, [
|
|
3085
|
-
|
|
3086
|
-
], 8,
|
|
2986
|
+
N(T(yo), { size: T(Ar) }, null, 8, ["size"])
|
|
2987
|
+
], 8, $o)
|
|
3087
2988
|
]),
|
|
3088
2989
|
_: 1
|
|
3089
|
-
})) :
|
|
2990
|
+
})) : U("", !0)
|
|
3090
2991
|
])
|
|
3091
2992
|
]),
|
|
3092
2993
|
default: x(() => [
|
|
3093
|
-
|
|
2994
|
+
p.value ? (h(), M(I, {
|
|
3094
2995
|
key: 0,
|
|
3095
2996
|
"data-testid": "config-card-loader",
|
|
3096
2997
|
"table-columns": 2,
|
|
3097
2998
|
type: "table"
|
|
3098
|
-
})) : f.value ? (h(),
|
|
2999
|
+
})) : f.value ? (h(), M(E, {
|
|
3099
3000
|
key: 1,
|
|
3100
3001
|
"data-testid": "config-card-fetch-error",
|
|
3101
3002
|
"is-error": ""
|
|
3102
3003
|
}, {
|
|
3103
3004
|
message: x(() => [
|
|
3104
|
-
|
|
3005
|
+
L("h3", null, O(C.value), 1)
|
|
3105
3006
|
]),
|
|
3106
3007
|
_: 1
|
|
3107
|
-
})) :
|
|
3108
|
-
|
|
3109
|
-
|
|
3008
|
+
})) : U("", !0),
|
|
3009
|
+
L("div", Lo, [
|
|
3010
|
+
N(uo, {
|
|
3110
3011
|
config: e.config,
|
|
3111
|
-
"fetcher-url":
|
|
3012
|
+
"fetcher-url": g.value,
|
|
3112
3013
|
format: c.value,
|
|
3113
|
-
"prop-list-types":
|
|
3114
|
-
"property-collections":
|
|
3115
|
-
record:
|
|
3116
|
-
},
|
|
3117
|
-
ie(Object.keys(
|
|
3118
|
-
name:
|
|
3119
|
-
fn: x(({ row:
|
|
3120
|
-
|
|
3121
|
-
row:
|
|
3122
|
-
rowValue:
|
|
3014
|
+
"prop-list-types": D.value,
|
|
3015
|
+
"property-collections": b.value,
|
|
3016
|
+
record: m.value
|
|
3017
|
+
}, ve({ _: 2 }, [
|
|
3018
|
+
ie(Object.keys(v.$slots), (q) => ({
|
|
3019
|
+
name: q,
|
|
3020
|
+
fn: x(({ row: G, rowValue: ue }) => [
|
|
3021
|
+
Y(v.$slots, q, {
|
|
3022
|
+
row: G,
|
|
3023
|
+
rowValue: ue
|
|
3123
3024
|
}, void 0, !0)
|
|
3124
3025
|
])
|
|
3125
3026
|
}))
|
|
@@ -3131,9 +3032,9 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3131
3032
|
e.hideTitle ? void 0 : {
|
|
3132
3033
|
name: "title",
|
|
3133
3034
|
fn: x(() => [
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
V(
|
|
3035
|
+
L("div", Fo, [
|
|
3036
|
+
Y(v.$slots, "title", {}, () => [
|
|
3037
|
+
V(O(T(i)("baseConfigCard.title")), 1)
|
|
3137
3038
|
], !0)
|
|
3138
3039
|
])
|
|
3139
3040
|
]),
|
|
@@ -3142,10 +3043,10 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3142
3043
|
]), 1024);
|
|
3143
3044
|
};
|
|
3144
3045
|
}
|
|
3145
|
-
}),
|
|
3046
|
+
}), kl = /* @__PURE__ */ re(No, [["__scopeId", "data-v-090c7580"]]), Bo = {
|
|
3146
3047
|
class: "form-actions",
|
|
3147
3048
|
"data-testid": "form-actions"
|
|
3148
|
-
},
|
|
3049
|
+
}, Ro = { key: 0 }, Mo = /* @__PURE__ */ W({
|
|
3149
3050
|
__name: "EntityBaseForm",
|
|
3150
3051
|
props: {
|
|
3151
3052
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3199,22 +3100,22 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3199
3100
|
},
|
|
3200
3101
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3201
3102
|
setup(e, { emit: t }) {
|
|
3202
|
-
var
|
|
3203
|
-
const n = t, r = e, i =
|
|
3204
|
-
headers: (
|
|
3205
|
-
}), s = R(!1), c = R(!1), d = R(""), u = A(() => r.canSubmit === !1 || r.isReadonly),
|
|
3206
|
-
var y,
|
|
3207
|
-
let
|
|
3208
|
-
return r.config.app === "konnect" ?
|
|
3209
|
-
}),
|
|
3210
|
-
|
|
3211
|
-
},
|
|
3103
|
+
var D;
|
|
3104
|
+
const n = t, r = e, i = Mn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios({
|
|
3105
|
+
headers: (D = r.config) == null ? void 0 : D.requestHeaders
|
|
3106
|
+
}), s = R(!1), c = R(!1), d = R(""), u = A(() => r.canSubmit === !1 || r.isReadonly), p = R(!1), f = A(() => {
|
|
3107
|
+
var y, v;
|
|
3108
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3109
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((y = r.config) == null ? void 0 : y.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), r.editId ? (g = g.replace(/{id}/gi, r.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3110
|
+
}), C = () => {
|
|
3111
|
+
p.value = !p.value;
|
|
3112
|
+
}, m = () => {
|
|
3212
3113
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : k();
|
|
3213
3114
|
}, k = () => {
|
|
3214
3115
|
n("cancel");
|
|
3215
|
-
},
|
|
3116
|
+
}, B = () => {
|
|
3216
3117
|
u.value || n("submit");
|
|
3217
|
-
},
|
|
3118
|
+
}, b = R([
|
|
3218
3119
|
{
|
|
3219
3120
|
title: a("baseForm.configuration.yaml"),
|
|
3220
3121
|
hash: "#yaml"
|
|
@@ -3224,107 +3125,107 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3224
3125
|
hash: "#json"
|
|
3225
3126
|
}
|
|
3226
3127
|
]);
|
|
3227
|
-
return
|
|
3228
|
-
n("loading",
|
|
3128
|
+
return Ce(() => s.value, (g) => {
|
|
3129
|
+
n("loading", g);
|
|
3229
3130
|
}, { immediate: !0 }), Ft(async () => {
|
|
3230
3131
|
if (r.editId)
|
|
3231
3132
|
try {
|
|
3232
3133
|
c.value = !1, s.value = !0;
|
|
3233
|
-
const { data:
|
|
3234
|
-
n("fetch:success",
|
|
3235
|
-
} catch (
|
|
3236
|
-
const y = o(
|
|
3237
|
-
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, c.value = !0, n("fetch:error",
|
|
3134
|
+
const { data: g } = await l.get(f.value);
|
|
3135
|
+
n("fetch:success", g);
|
|
3136
|
+
} catch (g) {
|
|
3137
|
+
const y = o(g);
|
|
3138
|
+
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, c.value = !0, n("fetch:error", g);
|
|
3238
3139
|
} finally {
|
|
3239
3140
|
s.value = !1;
|
|
3240
3141
|
}
|
|
3241
|
-
}), (
|
|
3242
|
-
const
|
|
3243
|
-
return h(),
|
|
3142
|
+
}), (g, y) => {
|
|
3143
|
+
const v = $("KSkeleton"), j = $("KEmptyState"), F = $("KAlert"), w = $("KButton"), P = $("KTabs"), I = $("KSlideout"), E = $("KCard");
|
|
3144
|
+
return h(), M(E, { class: "kong-ui-entity-base-form" }, {
|
|
3244
3145
|
default: x(() => [
|
|
3245
|
-
s.value ? (h(),
|
|
3146
|
+
s.value ? (h(), M(v, {
|
|
3246
3147
|
key: 0,
|
|
3247
3148
|
type: "form"
|
|
3248
|
-
})) : c.value ? (h(),
|
|
3149
|
+
})) : c.value ? (h(), M(j, {
|
|
3249
3150
|
key: 1,
|
|
3250
3151
|
"cta-text": T(a)("baseForm.actions.back"),
|
|
3251
3152
|
"data-testid": "form-fetch-error",
|
|
3252
|
-
"handle-click":
|
|
3153
|
+
"handle-click": m,
|
|
3253
3154
|
"is-error": !0
|
|
3254
3155
|
}, {
|
|
3255
3156
|
message: x(() => [
|
|
3256
|
-
|
|
3157
|
+
L("h3", null, O(d.value), 1)
|
|
3257
3158
|
]),
|
|
3258
3159
|
_: 1
|
|
3259
3160
|
}, 8, ["cta-text"])) : (h(), S("form", {
|
|
3260
3161
|
key: 2,
|
|
3261
3162
|
"data-testid": "form-content",
|
|
3262
|
-
onReset:
|
|
3263
|
-
onSubmit:
|
|
3163
|
+
onReset: je(k, ["prevent"]),
|
|
3164
|
+
onSubmit: je(B, ["prevent"])
|
|
3264
3165
|
}, [
|
|
3265
|
-
|
|
3266
|
-
e.errorMessage ? (h(),
|
|
3166
|
+
Y(g.$slots, "default", {}, void 0, !0),
|
|
3167
|
+
e.errorMessage ? (h(), M(F, {
|
|
3267
3168
|
key: 0,
|
|
3268
3169
|
"alert-message": e.errorMessage,
|
|
3269
3170
|
appearance: "danger",
|
|
3270
3171
|
"data-testid": "form-error"
|
|
3271
|
-
}, null, 8, ["alert-message"])) :
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
e.config.jsonYamlFormsEnabled ? (h(), S("div",
|
|
3275
|
-
|
|
3172
|
+
}, null, 8, ["alert-message"])) : U("", !0),
|
|
3173
|
+
L("div", Bo, [
|
|
3174
|
+
Y(g.$slots, "form-actions", {}, () => [
|
|
3175
|
+
e.config.jsonYamlFormsEnabled ? (h(), S("div", Ro, [
|
|
3176
|
+
N(w, {
|
|
3276
3177
|
appearance: "tertiary",
|
|
3277
3178
|
"data-testid": "form-view-configuration",
|
|
3278
|
-
onClick: y[0] || (y[0] = (
|
|
3179
|
+
onClick: y[0] || (y[0] = (K) => C())
|
|
3279
3180
|
}, {
|
|
3280
3181
|
default: x(() => [
|
|
3281
|
-
V(
|
|
3182
|
+
V(O(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3282
3183
|
]),
|
|
3283
3184
|
_: 1
|
|
3284
3185
|
})
|
|
3285
|
-
])) :
|
|
3286
|
-
|
|
3186
|
+
])) : U("", !0),
|
|
3187
|
+
N(w, {
|
|
3287
3188
|
appearance: "secondary",
|
|
3288
3189
|
"data-testid": "form-cancel",
|
|
3289
3190
|
disabled: e.isReadonly,
|
|
3290
3191
|
type: "reset"
|
|
3291
3192
|
}, {
|
|
3292
3193
|
default: x(() => [
|
|
3293
|
-
V(
|
|
3194
|
+
V(O(T(a)("baseForm.actions.cancel")), 1)
|
|
3294
3195
|
]),
|
|
3295
3196
|
_: 1
|
|
3296
3197
|
}, 8, ["disabled"]),
|
|
3297
|
-
|
|
3198
|
+
N(w, {
|
|
3298
3199
|
appearance: "primary",
|
|
3299
3200
|
"data-testid": "form-submit",
|
|
3300
3201
|
disabled: u.value,
|
|
3301
3202
|
type: "submit"
|
|
3302
3203
|
}, {
|
|
3303
3204
|
default: x(() => [
|
|
3304
|
-
V(
|
|
3205
|
+
V(O(T(a)("baseForm.actions.save")), 1)
|
|
3305
3206
|
]),
|
|
3306
3207
|
_: 1
|
|
3307
3208
|
}, 8, ["disabled"])
|
|
3308
3209
|
], !0)
|
|
3309
3210
|
])
|
|
3310
3211
|
], 32)),
|
|
3311
|
-
|
|
3212
|
+
N(I, {
|
|
3312
3213
|
"close-on-blur": !1,
|
|
3313
3214
|
"data-testid": "form-view-configuration-slideout",
|
|
3314
3215
|
"has-overlay": !1,
|
|
3315
3216
|
"offset-top": 60,
|
|
3316
3217
|
title: T(a)("baseForm.configuration.title"),
|
|
3317
|
-
visible:
|
|
3318
|
-
onClose: y[1] || (y[1] = (
|
|
3218
|
+
visible: p.value,
|
|
3219
|
+
onClose: y[1] || (y[1] = (K) => C())
|
|
3319
3220
|
}, {
|
|
3320
3221
|
default: x(() => [
|
|
3321
|
-
|
|
3322
|
-
|
|
3222
|
+
L("div", null, O(T(a)("baseForm.configuration.message")), 1),
|
|
3223
|
+
N(P, {
|
|
3323
3224
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3324
|
-
tabs:
|
|
3225
|
+
tabs: b.value
|
|
3325
3226
|
}, {
|
|
3326
3227
|
json: x(() => [
|
|
3327
|
-
|
|
3228
|
+
N(Mt, {
|
|
3328
3229
|
config: e.config,
|
|
3329
3230
|
"fetcher-url": f.value,
|
|
3330
3231
|
"json-record": r.formFields,
|
|
@@ -3332,7 +3233,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3332
3233
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3333
3234
|
]),
|
|
3334
3235
|
yaml: x(() => [
|
|
3335
|
-
|
|
3236
|
+
N(Sn, {
|
|
3336
3237
|
"yaml-record": r.formFields
|
|
3337
3238
|
}, null, 8, ["yaml-record"])
|
|
3338
3239
|
]),
|
|
@@ -3346,10 +3247,10 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3346
3247
|
});
|
|
3347
3248
|
};
|
|
3348
3249
|
}
|
|
3349
|
-
}),
|
|
3250
|
+
}), Al = /* @__PURE__ */ re(Mo, [["__scopeId", "data-v-2e2d1350"]]), Ko = {
|
|
3350
3251
|
key: 0,
|
|
3351
3252
|
"data-testid": "first-col"
|
|
3352
|
-
},
|
|
3253
|
+
}, Do = /* @__PURE__ */ W({
|
|
3353
3254
|
__name: "EntityBaseTableCell",
|
|
3354
3255
|
props: {
|
|
3355
3256
|
keyName: {
|
|
@@ -3363,67 +3264,67 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3363
3264
|
},
|
|
3364
3265
|
setup(e) {
|
|
3365
3266
|
const t = e, n = A(() => {
|
|
3366
|
-
var
|
|
3367
|
-
return ((
|
|
3267
|
+
var m;
|
|
3268
|
+
return ((m = t.rowEl) == null ? void 0 : m.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3368
3269
|
}), r = A(() => {
|
|
3369
|
-
var
|
|
3370
|
-
return ((
|
|
3270
|
+
var m;
|
|
3271
|
+
return ((m = n.value) == null ? void 0 : m.querySelector('[data-testid="first-col"]')) || null;
|
|
3371
3272
|
}), i = A(() => {
|
|
3372
|
-
var k,
|
|
3373
|
-
const
|
|
3374
|
-
return
|
|
3273
|
+
var k, B;
|
|
3274
|
+
const m = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3275
|
+
return m ? ((B = m[0]) == null ? void 0 : B.getAttribute("data-testid")) === t.keyName : !1;
|
|
3375
3276
|
});
|
|
3376
3277
|
let a;
|
|
3377
3278
|
const o = () => {
|
|
3378
3279
|
a && (a.disconnect(), a = void 0);
|
|
3379
3280
|
}, l = () => {
|
|
3380
|
-
var
|
|
3381
|
-
c.value = ((
|
|
3382
|
-
}, s = R({}), c = R(0), d = R(0), u = R(""),
|
|
3383
|
-
|
|
3384
|
-
(
|
|
3281
|
+
var m, k, B;
|
|
3282
|
+
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) || "";
|
|
3283
|
+
}, s = R({}), c = R(0), d = R(0), u = R(""), p = A(() => [r.value, n.value]), f = Ce(
|
|
3284
|
+
p,
|
|
3285
|
+
(m) => {
|
|
3385
3286
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3386
3287
|
a = new ResizeObserver((k) => {
|
|
3387
3288
|
window.requestAnimationFrame(() => {
|
|
3388
3289
|
!Array.isArray(k) || !k.length || l();
|
|
3389
3290
|
});
|
|
3390
3291
|
});
|
|
3391
|
-
for (const k of
|
|
3292
|
+
for (const k of m)
|
|
3392
3293
|
k && a.observe(k);
|
|
3393
3294
|
}
|
|
3394
3295
|
},
|
|
3395
3296
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3396
|
-
),
|
|
3297
|
+
), C = A(() => i.value ? c.value > d.value : !1);
|
|
3397
3298
|
return On(() => {
|
|
3398
3299
|
l();
|
|
3399
|
-
}),
|
|
3300
|
+
}), $n(() => {
|
|
3400
3301
|
f();
|
|
3401
|
-
}), (
|
|
3402
|
-
const
|
|
3302
|
+
}), (m, k) => {
|
|
3303
|
+
const B = $("KTooltip");
|
|
3403
3304
|
return h(), S("span", {
|
|
3404
3305
|
ref_key: "contentRef",
|
|
3405
3306
|
ref: s,
|
|
3406
3307
|
class: "content-wrapper"
|
|
3407
3308
|
}, [
|
|
3408
|
-
i.value ? (h(), S("span",
|
|
3409
|
-
B
|
|
3309
|
+
i.value ? (h(), S("span", Ko, [
|
|
3310
|
+
N(B, {
|
|
3410
3311
|
"max-width": "300",
|
|
3411
3312
|
placement: "bottomStart",
|
|
3412
|
-
text:
|
|
3313
|
+
text: C.value ? u.value : ""
|
|
3413
3314
|
}, {
|
|
3414
3315
|
default: x(() => [
|
|
3415
|
-
|
|
3316
|
+
Y(m.$slots, "default", {}, void 0, !0)
|
|
3416
3317
|
]),
|
|
3417
3318
|
_: 3
|
|
3418
3319
|
}, 8, ["text"])
|
|
3419
|
-
])) :
|
|
3320
|
+
])) : Y(m.$slots, "default", { key: 1 }, void 0, !0)
|
|
3420
3321
|
], 512);
|
|
3421
3322
|
};
|
|
3422
3323
|
}
|
|
3423
|
-
}),
|
|
3324
|
+
}), jo = /* @__PURE__ */ re(Do, [["__scopeId", "data-v-c4379fd4"]]), Uo = { class: "toolbar-container" }, Po = {
|
|
3424
3325
|
key: 0,
|
|
3425
3326
|
class: "toolbar-button-container"
|
|
3426
|
-
},
|
|
3327
|
+
}, qo = ["data-testid"], Ho = /* @__PURE__ */ W({
|
|
3427
3328
|
__name: "EntityBaseTable",
|
|
3428
3329
|
props: {
|
|
3429
3330
|
// table header configuration
|
|
@@ -3534,7 +3435,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3534
3435
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3535
3436
|
setup(e, { emit: t }) {
|
|
3536
3437
|
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = A(() => {
|
|
3537
|
-
var y,
|
|
3438
|
+
var y, v;
|
|
3538
3439
|
return typeof n.errorMessage == "string" ? {
|
|
3539
3440
|
hasError: !!n.errorMessage,
|
|
3540
3441
|
title: n.errorMessage,
|
|
@@ -3542,15 +3443,15 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3542
3443
|
} : {
|
|
3543
3444
|
hasError: !!n.errorMessage,
|
|
3544
3445
|
title: (y = n.errorMessage) == null ? void 0 : y.title,
|
|
3545
|
-
message: (
|
|
3446
|
+
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3546
3447
|
};
|
|
3547
3448
|
}), o = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (y) => y.hasData || !!n.query, s = A(() => {
|
|
3548
3449
|
const y = [];
|
|
3549
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3550
|
-
const F = n.tableHeaders[
|
|
3450
|
+
return Object.keys(n.tableHeaders).forEach((j) => {
|
|
3451
|
+
const F = n.tableHeaders[j];
|
|
3551
3452
|
y.push({
|
|
3552
|
-
label: F.label ??
|
|
3553
|
-
key:
|
|
3453
|
+
label: F.label ?? j,
|
|
3454
|
+
key: j,
|
|
3554
3455
|
sortable: F.sortable ?? !1
|
|
3555
3456
|
});
|
|
3556
3457
|
}), n.enableEntityActions && y.push({
|
|
@@ -3562,47 +3463,47 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3562
3463
|
"data-testid": y.name,
|
|
3563
3464
|
...n.rowAttributes(y)
|
|
3564
3465
|
}), d = R({}), u = (y) => {
|
|
3565
|
-
var
|
|
3566
|
-
return (
|
|
3567
|
-
},
|
|
3568
|
-
const
|
|
3466
|
+
var v;
|
|
3467
|
+
return (v = d.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
3468
|
+
}, p = (y) => {
|
|
3469
|
+
const v = {
|
|
3569
3470
|
"data-testid": y.headerKey,
|
|
3570
3471
|
...n.cellAttributes(y)
|
|
3571
3472
|
};
|
|
3572
|
-
return y.colIndex === 0 && (
|
|
3473
|
+
return y.colIndex === 0 && (v.style = {
|
|
3573
3474
|
maxWidth: "250px",
|
|
3574
3475
|
overflowX: "hidden",
|
|
3575
3476
|
textOverflow: "ellipsis"
|
|
3576
|
-
}),
|
|
3477
|
+
}), v;
|
|
3577
3478
|
}, f = () => {
|
|
3578
|
-
r("empty-state-cta-clicked"),
|
|
3579
|
-
},
|
|
3479
|
+
r("empty-state-cta-clicked"), C();
|
|
3480
|
+
}, C = () => {
|
|
3580
3481
|
r("clear-search-input");
|
|
3581
|
-
},
|
|
3582
|
-
r("click:row",
|
|
3482
|
+
}, m = A(() => n.disableRowClick ? void 0 : (y, v) => {
|
|
3483
|
+
r("click:row", v);
|
|
3583
3484
|
}), k = (y) => {
|
|
3584
3485
|
r("sort", y);
|
|
3585
|
-
}, { setTablePreferences:
|
|
3586
|
-
const y =
|
|
3486
|
+
}, { setTablePreferences: B, getTablePreferences: b } = qn(), D = A(() => {
|
|
3487
|
+
const y = b(n.preferencesStorageKey);
|
|
3587
3488
|
return {
|
|
3588
3489
|
...n.initialFetcherParams,
|
|
3589
3490
|
...y
|
|
3590
3491
|
};
|
|
3591
|
-
}),
|
|
3592
|
-
n.preferencesStorageKey &&
|
|
3492
|
+
}), g = (y) => {
|
|
3493
|
+
n.preferencesStorageKey && B(n.preferencesStorageKey, y);
|
|
3593
3494
|
};
|
|
3594
|
-
return (y,
|
|
3595
|
-
const
|
|
3596
|
-
return h(),
|
|
3495
|
+
return (y, v) => {
|
|
3496
|
+
const j = $("KIcon"), F = $("KButton"), w = $("KDropdown"), P = $("KTable"), I = $("KCard");
|
|
3497
|
+
return h(), M(I, {
|
|
3597
3498
|
class: "kong-ui-entity-base-table",
|
|
3598
3499
|
title: e.title
|
|
3599
3500
|
}, {
|
|
3600
3501
|
default: x(() => [
|
|
3601
|
-
|
|
3502
|
+
N(P, {
|
|
3602
3503
|
ref_key: "tableRefs",
|
|
3603
3504
|
ref: d,
|
|
3604
3505
|
"cache-identifier": o.value,
|
|
3605
|
-
"cell-attrs":
|
|
3506
|
+
"cell-attrs": p,
|
|
3606
3507
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3607
3508
|
"disable-sorting": e.disableSorting,
|
|
3608
3509
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3620,50 +3521,50 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3620
3521
|
"has-error": a.value.hasError,
|
|
3621
3522
|
headers: s.value,
|
|
3622
3523
|
"hide-pagination-when-optional": "",
|
|
3623
|
-
"initial-fetcher-params":
|
|
3524
|
+
"initial-fetcher-params": D.value,
|
|
3624
3525
|
"is-loading": e.isLoading,
|
|
3625
3526
|
"pagination-type": e.paginationType,
|
|
3626
3527
|
"row-attrs": c,
|
|
3627
3528
|
"search-input": e.query,
|
|
3628
3529
|
onKtableEmptyStateCtaClicked: f,
|
|
3629
|
-
"onRow:click":
|
|
3630
|
-
onSort:
|
|
3631
|
-
"onUpdate:tablePreferences":
|
|
3632
|
-
},
|
|
3633
|
-
toolbar: x(({ state:
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
y.$slots["toolbar-button"] ? (h(), S("div",
|
|
3637
|
-
|
|
3638
|
-
])) :
|
|
3530
|
+
"onRow:click": m.value,
|
|
3531
|
+
onSort: v[0] || (v[0] = (E) => k(E)),
|
|
3532
|
+
"onUpdate:tablePreferences": g
|
|
3533
|
+
}, ve({
|
|
3534
|
+
toolbar: x(({ state: E }) => [
|
|
3535
|
+
_e(L("div", Uo, [
|
|
3536
|
+
Y(y.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3537
|
+
y.$slots["toolbar-button"] ? (h(), S("div", Po, [
|
|
3538
|
+
Y(y.$slots, "toolbar-button", {}, void 0, !0)
|
|
3539
|
+
])) : U("", !0)
|
|
3639
3540
|
], 512), [
|
|
3640
|
-
[
|
|
3541
|
+
[ke, l(E)]
|
|
3641
3542
|
])
|
|
3642
3543
|
]),
|
|
3643
|
-
actions: x(({ row:
|
|
3644
|
-
|
|
3544
|
+
actions: x(({ row: E, rowKey: K, rowValue: q }) => [
|
|
3545
|
+
L("div", {
|
|
3645
3546
|
class: "actions-container",
|
|
3646
|
-
"data-testid":
|
|
3547
|
+
"data-testid": E.name
|
|
3647
3548
|
}, [
|
|
3648
|
-
|
|
3549
|
+
N(w, {
|
|
3649
3550
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3650
3551
|
width: e.dropdownMenuWidth
|
|
3651
3552
|
}, {
|
|
3652
3553
|
items: x(() => [
|
|
3653
|
-
|
|
3654
|
-
row:
|
|
3655
|
-
rowKey:
|
|
3656
|
-
rowValue:
|
|
3554
|
+
Y(y.$slots, "actions", {
|
|
3555
|
+
row: E,
|
|
3556
|
+
rowKey: K,
|
|
3557
|
+
rowValue: q
|
|
3657
3558
|
}, void 0, !0)
|
|
3658
3559
|
]),
|
|
3659
3560
|
default: x(() => [
|
|
3660
|
-
|
|
3561
|
+
N(F, {
|
|
3661
3562
|
class: "actions-trigger",
|
|
3662
3563
|
"data-testid": "overflow-actions-button",
|
|
3663
3564
|
size: "small"
|
|
3664
3565
|
}, {
|
|
3665
3566
|
icon: x(() => [
|
|
3666
|
-
|
|
3567
|
+
N(j, {
|
|
3667
3568
|
color: T(xr),
|
|
3668
3569
|
icon: "more",
|
|
3669
3570
|
size: "16"
|
|
@@ -3674,24 +3575,24 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3674
3575
|
]),
|
|
3675
3576
|
_: 2
|
|
3676
3577
|
}, 1032, ["width"])
|
|
3677
|
-
], 8,
|
|
3578
|
+
], 8, qo)
|
|
3678
3579
|
]),
|
|
3679
3580
|
_: 2
|
|
3680
3581
|
}, [
|
|
3681
|
-
ie(e.tableHeaders, (
|
|
3682
|
-
name:
|
|
3683
|
-
fn: x(({ row:
|
|
3684
|
-
|
|
3685
|
-
"key-name": String(
|
|
3686
|
-
"row-el": u(
|
|
3582
|
+
ie(e.tableHeaders, (E, K) => ({
|
|
3583
|
+
name: K,
|
|
3584
|
+
fn: x(({ row: q, rowKey: G, rowValue: ue }) => [
|
|
3585
|
+
N(jo, {
|
|
3586
|
+
"key-name": String(K),
|
|
3587
|
+
"row-el": u(q)
|
|
3687
3588
|
}, {
|
|
3688
3589
|
default: x(() => [
|
|
3689
|
-
|
|
3690
|
-
row:
|
|
3691
|
-
rowKey:
|
|
3692
|
-
rowValue:
|
|
3590
|
+
Y(y.$slots, K, {
|
|
3591
|
+
row: q,
|
|
3592
|
+
rowKey: G,
|
|
3593
|
+
rowValue: ue
|
|
3693
3594
|
}, () => [
|
|
3694
|
-
V(
|
|
3595
|
+
V(O(ue), 1)
|
|
3695
3596
|
], !0)
|
|
3696
3597
|
]),
|
|
3697
3598
|
_: 2
|
|
@@ -3704,13 +3605,13 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3704
3605
|
}, 8, ["title"]);
|
|
3705
3606
|
};
|
|
3706
3607
|
}
|
|
3707
|
-
}),
|
|
3608
|
+
}), wl = /* @__PURE__ */ re(Ho, [["__scopeId", "data-v-ecfaa7cf"]]), Yo = {
|
|
3708
3609
|
key: 0,
|
|
3709
3610
|
class: "kong-ui-entity-delete-error"
|
|
3710
|
-
},
|
|
3611
|
+
}, Vo = {
|
|
3711
3612
|
key: 1,
|
|
3712
3613
|
class: "description"
|
|
3713
|
-
},
|
|
3614
|
+
}, zo = /* @__PURE__ */ W({
|
|
3714
3615
|
__name: "EntityDeleteModal",
|
|
3715
3616
|
props: {
|
|
3716
3617
|
visible: {
|
|
@@ -3755,8 +3656,8 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3755
3656
|
i("proceed");
|
|
3756
3657
|
};
|
|
3757
3658
|
return (s, c) => {
|
|
3758
|
-
const d =
|
|
3759
|
-
return h(),
|
|
3659
|
+
const d = $("KAlert"), u = $("KPrompt");
|
|
3660
|
+
return h(), M(u, {
|
|
3760
3661
|
"action-button-appearance": "danger",
|
|
3761
3662
|
"action-button-disabled": e.actionPending,
|
|
3762
3663
|
"action-button-text": "Yes, delete",
|
|
@@ -3768,49 +3669,49 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3768
3669
|
onProceed: l
|
|
3769
3670
|
}, {
|
|
3770
3671
|
default: x(() => [
|
|
3771
|
-
e.error ? (h(), S("div",
|
|
3772
|
-
|
|
3672
|
+
e.error ? (h(), S("div", Yo, [
|
|
3673
|
+
N(d, { appearance: "danger" }, {
|
|
3773
3674
|
alertMessage: x(() => [
|
|
3774
|
-
V(
|
|
3675
|
+
V(O(e.error), 1)
|
|
3775
3676
|
]),
|
|
3776
3677
|
_: 1
|
|
3777
3678
|
})
|
|
3778
|
-
])) :
|
|
3779
|
-
|
|
3679
|
+
])) : U("", !0),
|
|
3680
|
+
N(T(n), {
|
|
3780
3681
|
class: "message",
|
|
3781
3682
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3782
3683
|
tag: "p"
|
|
3783
|
-
},
|
|
3684
|
+
}, ve({
|
|
3784
3685
|
entityType: x(() => [
|
|
3785
|
-
V(
|
|
3686
|
+
V(O(r.entityType), 1)
|
|
3786
3687
|
]),
|
|
3787
3688
|
_: 2
|
|
3788
3689
|
}, [
|
|
3789
3690
|
r.entityName ? {
|
|
3790
3691
|
name: "entityName",
|
|
3791
3692
|
fn: x(() => [
|
|
3792
|
-
|
|
3693
|
+
L("strong", null, O(r.entityName), 1)
|
|
3793
3694
|
]),
|
|
3794
3695
|
key: "0"
|
|
3795
3696
|
} : void 0
|
|
3796
3697
|
]), 1032, ["keypath"]),
|
|
3797
|
-
r.description || s.$slots.description ? (h(), S("div",
|
|
3798
|
-
|
|
3799
|
-
|
|
3698
|
+
r.description || s.$slots.description ? (h(), S("div", Vo, [
|
|
3699
|
+
Y(s.$slots, "description", {}, () => [
|
|
3700
|
+
L("p", null, O(r.description), 1)
|
|
3800
3701
|
], !0)
|
|
3801
|
-
])) :
|
|
3702
|
+
])) : U("", !0)
|
|
3802
3703
|
]),
|
|
3803
3704
|
_: 3
|
|
3804
3705
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3805
3706
|
};
|
|
3806
3707
|
}
|
|
3807
|
-
}),
|
|
3708
|
+
}), Sl = /* @__PURE__ */ re(zo, [["__scopeId", "data-v-efe8f34b"]]), Wo = {
|
|
3808
3709
|
fill: "none",
|
|
3809
3710
|
height: "20",
|
|
3810
3711
|
viewBox: "0 0 20 20",
|
|
3811
3712
|
width: "20",
|
|
3812
3713
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3813
|
-
},
|
|
3714
|
+
}, Jo = {
|
|
3814
3715
|
id: "mask0_180_20349",
|
|
3815
3716
|
height: "20",
|
|
3816
3717
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3818,7 +3719,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3818
3719
|
width: "20",
|
|
3819
3720
|
x: "0",
|
|
3820
3721
|
y: "0"
|
|
3821
|
-
},
|
|
3722
|
+
}, Go = ["fill"], Zo = { mask: "url(#mask0_180_20349)" }, Qo = ["fill"], Et = /* @__PURE__ */ W({
|
|
3822
3723
|
__name: "IconFilter",
|
|
3823
3724
|
props: {
|
|
3824
3725
|
color: {
|
|
@@ -3827,26 +3728,26 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3827
3728
|
}
|
|
3828
3729
|
},
|
|
3829
3730
|
setup(e) {
|
|
3830
|
-
return (t, n) => (h(), S("svg",
|
|
3831
|
-
|
|
3832
|
-
|
|
3731
|
+
return (t, n) => (h(), S("svg", Wo, [
|
|
3732
|
+
L("mask", Jo, [
|
|
3733
|
+
L("rect", {
|
|
3833
3734
|
fill: e.color,
|
|
3834
3735
|
height: "20",
|
|
3835
3736
|
width: "20"
|
|
3836
|
-
}, null, 8,
|
|
3737
|
+
}, null, 8, Go)
|
|
3837
3738
|
]),
|
|
3838
|
-
|
|
3839
|
-
|
|
3739
|
+
L("g", Zo, [
|
|
3740
|
+
L("path", {
|
|
3840
3741
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3841
3742
|
fill: e.color
|
|
3842
|
-
}, null, 8,
|
|
3743
|
+
}, null, 8, Qo)
|
|
3843
3744
|
])
|
|
3844
3745
|
]));
|
|
3845
3746
|
}
|
|
3846
|
-
}),
|
|
3747
|
+
}), Xo = {
|
|
3847
3748
|
key: 1,
|
|
3848
3749
|
class: "kong-ui-entity-filter"
|
|
3849
|
-
},
|
|
3750
|
+
}, el = { class: "menu-item-title" }, tl = { class: "menu-item-indicator" }, nl = { class: "menu-item-body" }, rl = ["for"], il = { class: "menu-item-buttons" }, al = { class: "filter-clear-button-container" }, ol = /* @__PURE__ */ W({
|
|
3850
3751
|
__name: "EntityFilter",
|
|
3851
3752
|
props: {
|
|
3852
3753
|
// filter config, either exact match or fuzzy match
|
|
@@ -3866,185 +3767,182 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
3866
3767
|
},
|
|
3867
3768
|
emits: ["update:modelValue"],
|
|
3868
3769
|
setup(e, { emit: t }) {
|
|
3869
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l =
|
|
3870
|
-
const
|
|
3871
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3872
|
-
|
|
3873
|
-
}),
|
|
3874
|
-
}),
|
|
3875
|
-
const
|
|
3876
|
-
return Object.keys(
|
|
3877
|
-
label:
|
|
3878
|
-
value:
|
|
3879
|
-
expanded: !1
|
|
3770
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = A(() => {
|
|
3771
|
+
const b = [];
|
|
3772
|
+
return new URLSearchParams(r.modelValue).forEach((D, g) => {
|
|
3773
|
+
D !== "" && b.push(g);
|
|
3774
|
+
}), b;
|
|
3775
|
+
}), s = A(() => {
|
|
3776
|
+
const b = r.config.fields;
|
|
3777
|
+
return Object.keys(b).filter((D) => b[D].searchable).map((D) => ({
|
|
3778
|
+
label: b[D].label || D,
|
|
3779
|
+
value: D
|
|
3880
3780
|
}));
|
|
3881
3781
|
});
|
|
3882
|
-
|
|
3883
|
-
o.value = {}, new URLSearchParams(
|
|
3884
|
-
o.value[g] =
|
|
3782
|
+
Ce(() => r.modelValue, (b) => {
|
|
3783
|
+
o.value = {}, new URLSearchParams(b).forEach((D, g) => {
|
|
3784
|
+
o.value[g] = D;
|
|
3885
3785
|
});
|
|
3886
3786
|
});
|
|
3887
|
-
const
|
|
3787
|
+
const c = () => {
|
|
3888
3788
|
a.value = !a.value;
|
|
3889
|
-
},
|
|
3890
|
-
|
|
3891
|
-
},
|
|
3892
|
-
|
|
3893
|
-
}, f = () => {
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
value: O,
|
|
3899
|
-
label: O
|
|
3789
|
+
}, d = (b) => {
|
|
3790
|
+
i("update:modelValue", b);
|
|
3791
|
+
}, u = () => {
|
|
3792
|
+
d("");
|
|
3793
|
+
}, p = (b) => `filter-${b}`, f = (b) => {
|
|
3794
|
+
var D, g;
|
|
3795
|
+
return (((g = (D = r.config.schema) == null ? void 0 : D[b]) == null ? void 0 : g.values) ?? []).map((y) => ({
|
|
3796
|
+
value: y,
|
|
3797
|
+
label: y
|
|
3900
3798
|
}));
|
|
3901
|
-
},
|
|
3902
|
-
var
|
|
3903
|
-
return ((g = (
|
|
3904
|
-
},
|
|
3799
|
+
}, C = (b) => {
|
|
3800
|
+
var D, g;
|
|
3801
|
+
return ((g = (D = r.config.schema) == null ? void 0 : D[b]) == null ? void 0 : g.type) ?? "text";
|
|
3802
|
+
}, m = (b) => {
|
|
3905
3803
|
o.value = {
|
|
3906
3804
|
...o.value,
|
|
3907
|
-
[
|
|
3908
|
-
},
|
|
3909
|
-
},
|
|
3910
|
-
o.value = {},
|
|
3911
|
-
},
|
|
3912
|
-
const
|
|
3913
|
-
|
|
3805
|
+
[b]: ""
|
|
3806
|
+
}, B();
|
|
3807
|
+
}, k = () => {
|
|
3808
|
+
o.value = {}, B(!0);
|
|
3809
|
+
}, B = (b = !1) => {
|
|
3810
|
+
const D = Object.keys(o.value).reduce((g, y) => (o.value[y] && (g[y] = `${o.value[y]}`), g), {});
|
|
3811
|
+
b && (a.value = !1), i("update:modelValue", new URLSearchParams(D).toString());
|
|
3914
3812
|
};
|
|
3915
|
-
return (
|
|
3916
|
-
const g =
|
|
3917
|
-
return e.config.isExactMatch ? (h(),
|
|
3813
|
+
return (b, D) => {
|
|
3814
|
+
const g = $("KInput"), y = $("KButton"), v = $("KSelect"), j = $("KMenuItem"), F = $("KMenu");
|
|
3815
|
+
return e.config.isExactMatch ? (h(), M(g, {
|
|
3918
3816
|
key: 0,
|
|
3919
3817
|
autocomplete: "off",
|
|
3920
3818
|
class: "kong-ui-entity-filter-input",
|
|
3921
3819
|
"data-testid": "search-input",
|
|
3922
3820
|
"model-value": e.modelValue,
|
|
3923
3821
|
placeholder: e.config.placeholder,
|
|
3924
|
-
"onUpdate:modelValue":
|
|
3822
|
+
"onUpdate:modelValue": d
|
|
3925
3823
|
}, {
|
|
3926
3824
|
before: x(() => [
|
|
3927
|
-
|
|
3825
|
+
N(Et)
|
|
3928
3826
|
]),
|
|
3929
3827
|
after: x(() => [
|
|
3930
|
-
|
|
3828
|
+
_e(N(T(ko), {
|
|
3931
3829
|
class: "kong-ui-entity-filter-clear",
|
|
3932
|
-
onClick:
|
|
3830
|
+
onClick: u
|
|
3933
3831
|
}, null, 512), [
|
|
3934
|
-
[
|
|
3832
|
+
[ke, e.modelValue !== ""]
|
|
3935
3833
|
])
|
|
3936
3834
|
]),
|
|
3937
3835
|
_: 1
|
|
3938
|
-
}, 8, ["model-value", "placeholder"])) : (h(), S("div",
|
|
3939
|
-
|
|
3836
|
+
}, 8, ["model-value", "placeholder"])) : (h(), S("div", Xo, [
|
|
3837
|
+
N(y, {
|
|
3940
3838
|
appearance: "tertiary",
|
|
3941
3839
|
"data-testid": "filter-button",
|
|
3942
|
-
onClick:
|
|
3840
|
+
onClick: c
|
|
3943
3841
|
}, {
|
|
3944
3842
|
default: x(() => [
|
|
3945
|
-
|
|
3946
|
-
V(" " +
|
|
3843
|
+
N(Et),
|
|
3844
|
+
V(" " + O(T(n)("filter.filterButtonText")) + " " + O(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
3947
3845
|
]),
|
|
3948
3846
|
_: 1
|
|
3949
3847
|
}),
|
|
3950
|
-
|
|
3848
|
+
_e(L("div", {
|
|
3951
3849
|
class: "kong-ui-entity-filter-backdrop",
|
|
3952
|
-
onClick:
|
|
3850
|
+
onClick: c
|
|
3953
3851
|
}, null, 512), [
|
|
3954
|
-
[
|
|
3852
|
+
[ke, a.value]
|
|
3955
3853
|
]),
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
"
|
|
3963
|
-
}, [
|
|
3964
|
-
$("span", {
|
|
3965
|
-
class: ce(["menu-item-title", { expanded: l.value.has(_.value) }]),
|
|
3966
|
-
onClick: (w) => u(_.value)
|
|
3967
|
-
}, [
|
|
3968
|
-
V(L(_.label) + " ", 1),
|
|
3969
|
-
pe($("span", ul, null, 512), [
|
|
3970
|
-
[he, s.value.includes(_.value)]
|
|
3971
|
-
]),
|
|
3972
|
-
B(T(Ao), {
|
|
3973
|
-
class: ce(["menu-item-expand-icon", { expanded: l.value.has(_.value) }]),
|
|
3974
|
-
color: T(Cr)
|
|
3975
|
-
}, null, 8, ["class", "color"])
|
|
3976
|
-
], 10, cl),
|
|
3977
|
-
pe($("div", dl, [
|
|
3978
|
-
$("label", {
|
|
3979
|
-
class: "menu-item-label",
|
|
3980
|
-
for: b(_.value)
|
|
3981
|
-
}, L(T(n)("filter.fieldLabel")), 9, fl),
|
|
3982
|
-
((E = (j = e.config.schema) == null ? void 0 : j[_.value]) == null ? void 0 : E.type) === "select" ? (h(), K(F, {
|
|
3983
|
-
key: 0,
|
|
3984
|
-
id: b(_.value),
|
|
3985
|
-
modelValue: o.value[_.value],
|
|
3986
|
-
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
3987
|
-
items: v(_.value),
|
|
3988
|
-
placeholder: T(n)("filter.selectPlaceholder")
|
|
3989
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(g, {
|
|
3990
|
-
key: 1,
|
|
3991
|
-
id: b(_.value),
|
|
3992
|
-
modelValue: o.value[_.value],
|
|
3993
|
-
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
3994
|
-
autocomplete: "off",
|
|
3995
|
-
placeholder: T(n)("filter.inputPlaceholder"),
|
|
3996
|
-
type: k(_.value)
|
|
3997
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3998
|
-
], 512), [
|
|
3999
|
-
[he, l.value.has(_.value)]
|
|
4000
|
-
]),
|
|
4001
|
-
pe($("div", pl, [
|
|
4002
|
-
B(O, {
|
|
4003
|
-
appearance: "tertiary",
|
|
4004
|
-
"data-testid": "apply-filter",
|
|
4005
|
-
size: "small",
|
|
4006
|
-
onClick: y[0] || (y[0] = (w) => ee(!0))
|
|
4007
|
-
}, {
|
|
4008
|
-
default: x(() => [
|
|
4009
|
-
V(L(T(n)("filter.applyButtonText")), 1)
|
|
4010
|
-
]),
|
|
4011
|
-
_: 1
|
|
4012
|
-
}),
|
|
4013
|
-
B(O, {
|
|
4014
|
-
appearance: "tertiary",
|
|
4015
|
-
"data-testid": "clear-filter",
|
|
4016
|
-
size: "small",
|
|
4017
|
-
onClick: (w) => M(_.value)
|
|
4018
|
-
}, {
|
|
4019
|
-
default: x(() => [
|
|
4020
|
-
V(L(T(n)("filter.clearButtonText")), 1)
|
|
4021
|
-
]),
|
|
4022
|
-
_: 2
|
|
4023
|
-
}, 1032, ["onClick"])
|
|
4024
|
-
], 512), [
|
|
4025
|
-
[he, l.value.has(_.value)]
|
|
4026
|
-
])
|
|
4027
|
-
], 8, sl);
|
|
4028
|
-
}), 128)),
|
|
4029
|
-
$("div", hl, [
|
|
4030
|
-
B(O, {
|
|
4031
|
-
appearance: "tertiary",
|
|
4032
|
-
size: "small",
|
|
4033
|
-
onClick: I
|
|
3854
|
+
_e(N(F, { class: "kong-ui-entity-filter-menu" }, {
|
|
3855
|
+
body: x(() => [
|
|
3856
|
+
(h(!0), S(oe, null, ie(s.value, (w, P) => (h(), M(j, {
|
|
3857
|
+
key: w.value,
|
|
3858
|
+
"data-testid": w.value,
|
|
3859
|
+
expandable: "",
|
|
3860
|
+
"last-menu-item": P === s.value.length - 1
|
|
4034
3861
|
}, {
|
|
4035
|
-
|
|
4036
|
-
|
|
3862
|
+
itemTitle: x(() => [
|
|
3863
|
+
L("span", el, [
|
|
3864
|
+
V(O(w.label) + " ", 1),
|
|
3865
|
+
_e(L("span", tl, null, 512), [
|
|
3866
|
+
[ke, l.value.includes(w.value)]
|
|
3867
|
+
])
|
|
3868
|
+
])
|
|
4037
3869
|
]),
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
3870
|
+
itemBody: x(() => {
|
|
3871
|
+
var I, E;
|
|
3872
|
+
return [
|
|
3873
|
+
L("div", nl, [
|
|
3874
|
+
L("label", {
|
|
3875
|
+
class: "menu-item-label",
|
|
3876
|
+
for: p(w.value)
|
|
3877
|
+
}, O(T(n)("filter.fieldLabel")), 9, rl),
|
|
3878
|
+
((E = (I = e.config.schema) == null ? void 0 : I[w.value]) == null ? void 0 : E.type) === "select" ? (h(), M(v, {
|
|
3879
|
+
key: 0,
|
|
3880
|
+
id: p(w.value),
|
|
3881
|
+
modelValue: o.value[w.value],
|
|
3882
|
+
"onUpdate:modelValue": (K) => o.value[w.value] = K,
|
|
3883
|
+
items: f(w.value),
|
|
3884
|
+
placeholder: T(n)("filter.selectPlaceholder")
|
|
3885
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), M(g, {
|
|
3886
|
+
key: 1,
|
|
3887
|
+
id: p(w.value),
|
|
3888
|
+
modelValue: o.value[w.value],
|
|
3889
|
+
"onUpdate:modelValue": (K) => o.value[w.value] = K,
|
|
3890
|
+
autocomplete: "off",
|
|
3891
|
+
placeholder: T(n)("filter.inputPlaceholder"),
|
|
3892
|
+
type: C(w.value)
|
|
3893
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3894
|
+
]),
|
|
3895
|
+
L("div", il, [
|
|
3896
|
+
N(y, {
|
|
3897
|
+
appearance: "tertiary",
|
|
3898
|
+
"data-testid": "apply-filter",
|
|
3899
|
+
size: "small",
|
|
3900
|
+
onClick: D[0] || (D[0] = (K) => B(!0))
|
|
3901
|
+
}, {
|
|
3902
|
+
default: x(() => [
|
|
3903
|
+
V(O(T(n)("filter.applyButtonText")), 1)
|
|
3904
|
+
]),
|
|
3905
|
+
_: 1
|
|
3906
|
+
}),
|
|
3907
|
+
N(y, {
|
|
3908
|
+
appearance: "tertiary",
|
|
3909
|
+
"data-testid": "clear-filter",
|
|
3910
|
+
size: "small",
|
|
3911
|
+
onClick: (K) => m(w.value)
|
|
3912
|
+
}, {
|
|
3913
|
+
default: x(() => [
|
|
3914
|
+
V(O(T(n)("filter.clearButtonText")), 1)
|
|
3915
|
+
]),
|
|
3916
|
+
_: 2
|
|
3917
|
+
}, 1032, ["onClick"])
|
|
3918
|
+
])
|
|
3919
|
+
];
|
|
3920
|
+
}),
|
|
3921
|
+
_: 2
|
|
3922
|
+
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3923
|
+
]),
|
|
3924
|
+
actionButton: x(() => [
|
|
3925
|
+
L("div", al, [
|
|
3926
|
+
N(y, {
|
|
3927
|
+
appearance: "tertiary",
|
|
3928
|
+
size: "small",
|
|
3929
|
+
onClick: k
|
|
3930
|
+
}, {
|
|
3931
|
+
default: x(() => [
|
|
3932
|
+
V(O(T(n)("filter.clearAllButtonText")), 1)
|
|
3933
|
+
]),
|
|
3934
|
+
_: 1
|
|
3935
|
+
})
|
|
3936
|
+
])
|
|
3937
|
+
]),
|
|
3938
|
+
_: 1
|
|
3939
|
+
}, 512), [
|
|
3940
|
+
[ke, a.value]
|
|
4043
3941
|
])
|
|
4044
3942
|
]));
|
|
4045
3943
|
};
|
|
4046
3944
|
}
|
|
4047
|
-
}),
|
|
3945
|
+
}), Il = /* @__PURE__ */ re(ol, [["__scopeId", "data-v-206cc415"]]), El = /* @__PURE__ */ W({
|
|
4048
3946
|
__name: "EntityToggleModal",
|
|
4049
3947
|
props: {
|
|
4050
3948
|
visible: {
|
|
@@ -4092,10 +3990,10 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4092
3990
|
}
|
|
4093
3991
|
}
|
|
4094
3992
|
};
|
|
4095
|
-
return (u,
|
|
4096
|
-
const f =
|
|
4097
|
-
return h(),
|
|
4098
|
-
|
|
3993
|
+
return (u, p) => {
|
|
3994
|
+
const f = $("KPrompt");
|
|
3995
|
+
return h(), M(Ln, { to: "body" }, [
|
|
3996
|
+
N(f, {
|
|
4099
3997
|
"action-button-disabled": o.value,
|
|
4100
3998
|
"action-button-text": s.value,
|
|
4101
3999
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4105,15 +4003,15 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4105
4003
|
onProceed: d
|
|
4106
4004
|
}, {
|
|
4107
4005
|
default: x(() => [
|
|
4108
|
-
|
|
4006
|
+
N(T(r), {
|
|
4109
4007
|
keypath: `toggleModal.${i.action}.message`,
|
|
4110
4008
|
scope: "global"
|
|
4111
4009
|
}, {
|
|
4112
4010
|
entityType: x(() => [
|
|
4113
|
-
V(
|
|
4011
|
+
V(O(e.entityType), 1)
|
|
4114
4012
|
]),
|
|
4115
4013
|
entityName: x(() => [
|
|
4116
|
-
|
|
4014
|
+
L("strong", null, O(e.entityName), 1)
|
|
4117
4015
|
]),
|
|
4118
4016
|
_: 1
|
|
4119
4017
|
}, 8, ["keypath"])
|
|
@@ -4123,7 +4021,7 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4123
4021
|
]);
|
|
4124
4022
|
};
|
|
4125
4023
|
}
|
|
4126
|
-
}),
|
|
4024
|
+
}), Tl = /* @__PURE__ */ W({
|
|
4127
4025
|
__name: "PermissionsWrapper",
|
|
4128
4026
|
props: {
|
|
4129
4027
|
/**
|
|
@@ -4146,23 +4044,23 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4146
4044
|
},
|
|
4147
4045
|
setup(e) {
|
|
4148
4046
|
const t = e, n = R(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4149
|
-
return
|
|
4047
|
+
return Ce(() => t.authFunction, async () => {
|
|
4150
4048
|
n.value = await t.authFunction();
|
|
4151
|
-
}, { immediate: !0 }), (i, a) => r.value ?
|
|
4049
|
+
}, { immediate: !0 }), (i, a) => r.value ? Y(i.$slots, "default", {
|
|
4152
4050
|
key: 0,
|
|
4153
4051
|
isAllowed: n.value
|
|
4154
|
-
}) :
|
|
4052
|
+
}) : U("", !0);
|
|
4155
4053
|
}
|
|
4156
|
-
}),
|
|
4054
|
+
}), ll = { class: "form-section-wrapper" }, sl = {
|
|
4157
4055
|
key: 0,
|
|
4158
4056
|
class: "form-section-title"
|
|
4159
|
-
},
|
|
4057
|
+
}, cl = {
|
|
4160
4058
|
key: 1,
|
|
4161
4059
|
class: "form-section-description"
|
|
4162
|
-
},
|
|
4060
|
+
}, ul = {
|
|
4163
4061
|
key: 2,
|
|
4164
4062
|
class: "form-section-footer"
|
|
4165
|
-
},
|
|
4063
|
+
}, dl = { class: "form-section-content" }, fl = /* @__PURE__ */ W({
|
|
4166
4064
|
__name: "EntityFormSection",
|
|
4167
4065
|
props: {
|
|
4168
4066
|
title: {
|
|
@@ -4187,38 +4085,38 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4187
4085
|
}
|
|
4188
4086
|
},
|
|
4189
4087
|
setup(e) {
|
|
4190
|
-
const t =
|
|
4088
|
+
const t = Ve();
|
|
4191
4089
|
return (n, r) => (h(), S("fieldset", {
|
|
4192
|
-
class:
|
|
4090
|
+
class: ye(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4193
4091
|
}, [
|
|
4194
|
-
|
|
4195
|
-
e.hideInfoHeader ?
|
|
4092
|
+
L("div", ll, [
|
|
4093
|
+
e.hideInfoHeader ? U("", !0) : (h(), S("div", {
|
|
4196
4094
|
key: 0,
|
|
4197
|
-
class:
|
|
4095
|
+
class: ye(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4198
4096
|
}, [
|
|
4199
|
-
e.title ? (h(), S("h4",
|
|
4200
|
-
e.description || T(t).description ? (h(), S("div",
|
|
4201
|
-
|
|
4202
|
-
|
|
4097
|
+
e.title ? (h(), S("h4", sl, O(e.title), 1)) : U("", !0),
|
|
4098
|
+
e.description || T(t).description ? (h(), S("div", cl, [
|
|
4099
|
+
Y(n.$slots, "description", {}, () => [
|
|
4100
|
+
L("p", null, O(e.description), 1)
|
|
4203
4101
|
], !0)
|
|
4204
|
-
])) :
|
|
4205
|
-
T(t).footer ? (h(), S("div",
|
|
4206
|
-
|
|
4207
|
-
])) :
|
|
4102
|
+
])) : U("", !0),
|
|
4103
|
+
T(t).footer ? (h(), S("div", ul, [
|
|
4104
|
+
Y(n.$slots, "footer", {}, void 0, !0)
|
|
4105
|
+
])) : U("", !0)
|
|
4208
4106
|
], 2)),
|
|
4209
|
-
|
|
4210
|
-
|
|
4107
|
+
L("div", dl, [
|
|
4108
|
+
Y(n.$slots, "default", {}, void 0, !0)
|
|
4211
4109
|
])
|
|
4212
4110
|
])
|
|
4213
4111
|
], 2));
|
|
4214
4112
|
}
|
|
4215
|
-
}),
|
|
4113
|
+
}), Fl = /* @__PURE__ */ re(fl, [["__scopeId", "data-v-3565daa7"]]), pl = {
|
|
4216
4114
|
class: "kong-ui-public-entity-link",
|
|
4217
4115
|
"data-testid": "entity-link-parent"
|
|
4218
|
-
},
|
|
4116
|
+
}, hl = {
|
|
4219
4117
|
key: 0,
|
|
4220
4118
|
class: "deleted-entity"
|
|
4221
|
-
},
|
|
4119
|
+
}, ml = { key: 1 }, gl = ["onClick"], yl = /* @__PURE__ */ W({
|
|
4222
4120
|
__name: "EntityLink",
|
|
4223
4121
|
props: {
|
|
4224
4122
|
entityLinkData: {
|
|
@@ -4247,10 +4145,10 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4247
4145
|
o.value = a;
|
|
4248
4146
|
}, 1800));
|
|
4249
4147
|
};
|
|
4250
|
-
return (u,
|
|
4251
|
-
const f =
|
|
4252
|
-
return h(), S("div",
|
|
4253
|
-
l.value ? (h(), S("div",
|
|
4148
|
+
return (u, p) => {
|
|
4149
|
+
const f = $("KTooltip"), C = $("KExternalLink"), m = $("KClipboardProvider");
|
|
4150
|
+
return h(), S("div", pl, [
|
|
4151
|
+
l.value ? (h(), S("div", hl, O(c.value), 1)) : s.value ? s.value ? (h(), M(C, {
|
|
4254
4152
|
key: 2,
|
|
4255
4153
|
class: "entity-link",
|
|
4256
4154
|
"hide-icon": !e.newWindow,
|
|
@@ -4258,22 +4156,22 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4258
4156
|
target: e.newWindow ? "_blank" : "_self"
|
|
4259
4157
|
}, {
|
|
4260
4158
|
default: x(() => [
|
|
4261
|
-
|
|
4159
|
+
N(f, {
|
|
4262
4160
|
text: T(r) && e.entityLinkData.label || ""
|
|
4263
4161
|
}, {
|
|
4264
4162
|
default: x(() => [
|
|
4265
|
-
|
|
4163
|
+
L("span", {
|
|
4266
4164
|
ref_key: "textContent",
|
|
4267
4165
|
ref: n,
|
|
4268
4166
|
class: "entity-link-label"
|
|
4269
|
-
},
|
|
4167
|
+
}, O(e.entityLinkData.label), 513)
|
|
4270
4168
|
]),
|
|
4271
4169
|
_: 1
|
|
4272
4170
|
}, 8, ["text"])
|
|
4273
4171
|
]),
|
|
4274
4172
|
_: 1
|
|
4275
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4276
|
-
s.value && e.allowCopy ? (h(),
|
|
4173
|
+
}, 8, ["hide-icon", "href", "target"])) : U("", !0) : (h(), S("div", ml, O(" – "))),
|
|
4174
|
+
s.value && e.allowCopy ? (h(), M(f, {
|
|
4277
4175
|
key: o.value,
|
|
4278
4176
|
class: "copy-uuid-tooltip",
|
|
4279
4177
|
"max-width": "160",
|
|
@@ -4281,58 +4179,58 @@ const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
|
4281
4179
|
text: o.value
|
|
4282
4180
|
}, {
|
|
4283
4181
|
default: x(() => [
|
|
4284
|
-
|
|
4182
|
+
N(m, null, {
|
|
4285
4183
|
default: x(({ copyToClipboard: k }) => [
|
|
4286
|
-
|
|
4184
|
+
L("span", {
|
|
4287
4185
|
class: "entity-link-copy-id",
|
|
4288
|
-
onClick:
|
|
4186
|
+
onClick: je((B) => d(k), ["stop"])
|
|
4289
4187
|
}, [
|
|
4290
|
-
|
|
4188
|
+
N(T(To), {
|
|
4291
4189
|
class: "copy-icon",
|
|
4292
|
-
color: T(
|
|
4190
|
+
color: T(Cr),
|
|
4293
4191
|
"data-testid": "copy-id",
|
|
4294
|
-
size: T(
|
|
4192
|
+
size: T(kr)
|
|
4295
4193
|
}, null, 8, ["color", "size"])
|
|
4296
|
-
], 8,
|
|
4194
|
+
], 8, gl)
|
|
4297
4195
|
]),
|
|
4298
4196
|
_: 1
|
|
4299
4197
|
})
|
|
4300
4198
|
]),
|
|
4301
4199
|
_: 1
|
|
4302
|
-
}, 8, ["text"])) :
|
|
4200
|
+
}, 8, ["text"])) : U("", !0)
|
|
4303
4201
|
]);
|
|
4304
4202
|
};
|
|
4305
4203
|
}
|
|
4306
|
-
}),
|
|
4204
|
+
}), Ol = /* @__PURE__ */ re(yl, [["__scopeId", "data-v-ff8e5179"]]), { useAxios: $l, useDeleteUrlBuilder: Ll, useErrors: Nl, useExternalLinkCreator: Bl, useFetchUrlBuilder: Rl, useFetcher: Ml, useDebouncedFilter: Kl, useStringHelpers: Dl, useHelpers: jl, useGatewayFeatureSupported: Ul, useTruncationDetector: Pl } = z;
|
|
4307
4205
|
export {
|
|
4308
|
-
|
|
4206
|
+
uo as ConfigCardDisplay,
|
|
4309
4207
|
Rt as ConfigCardItem,
|
|
4310
4208
|
ne as ConfigurationSchemaSection,
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4209
|
+
H as ConfigurationSchemaType,
|
|
4210
|
+
kl as EntityBaseConfigCard,
|
|
4211
|
+
Al as EntityBaseForm,
|
|
4314
4212
|
Dn as EntityBaseFormType,
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4213
|
+
wl as EntityBaseTable,
|
|
4214
|
+
Sl as EntityDeleteModal,
|
|
4215
|
+
Il as EntityFilter,
|
|
4216
|
+
Fl as EntityFormSection,
|
|
4217
|
+
Ol as EntityLink,
|
|
4218
|
+
El as EntityToggleModal,
|
|
4219
|
+
Kn as EntityTypes,
|
|
4220
|
+
pe as FetcherStatus,
|
|
4323
4221
|
gr as InternalLinkItem,
|
|
4324
|
-
|
|
4325
|
-
|
|
4222
|
+
Mt as JsonCodeBlock,
|
|
4223
|
+
Tl as PermissionsWrapper,
|
|
4326
4224
|
Sn as YamlCodeBlock,
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4225
|
+
$l as useAxios,
|
|
4226
|
+
Kl as useDebouncedFilter,
|
|
4227
|
+
Ll as useDeleteUrlBuilder,
|
|
4228
|
+
Nl as useErrors,
|
|
4229
|
+
Bl as useExternalLinkCreator,
|
|
4230
|
+
Rl as useFetchUrlBuilder,
|
|
4231
|
+
Ml as useFetcher,
|
|
4232
|
+
Ul as useGatewayFeatureSupported,
|
|
4233
|
+
jl as useHelpers,
|
|
4234
|
+
Dl as useStringHelpers,
|
|
4235
|
+
Pl as useTruncationDetector
|
|
4338
4236
|
};
|