@kong-ui-public/entities-consumer-groups 2.0.1 → 2.0.2-pr.891.7200aace.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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as re, ref as O, computed as T, watch as
|
|
1
|
+
import { defineComponent as re, ref as O, computed as T, watch as Se, renderSlot as W, createCommentVNode as G, unref as y, useSlots as ut, onBeforeMount as Qe, resolveComponent as q, openBlock as m, createBlock as R, createSlots as Te, withCtx as h, createElementVNode as V, createTextVNode as Z, toDisplayString as F, createVNode as N, createElementBlock as $, renderList as ye, Fragment as ve, normalizeClass as Ne, withModifiers as rt, withDirectives as et, vShow as tt, useCssVars as mr, resolveDynamicComponent as Ve, normalizeProps as gr, guardReactiveProps as yr, mergeProps as ht, onMounted as hr, onUnmounted as vr, normalizeStyle as pn, inject as br, pushScopeId as fn, popScopeId as mn, reactive as Pt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Cr from "axios";
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
5
|
+
import { MethodsArray as kr } from "@kong/kongponents";
|
|
6
|
+
const _r = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -95,11 +95,11 @@ const wr = {
|
|
|
95
95
|
name: "The name can be any string containing letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
consumer_groups:
|
|
98
|
+
}, wr = {
|
|
99
|
+
consumer_groups: _r
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
const e = It("en-us",
|
|
101
|
+
function Ir() {
|
|
102
|
+
const e = It("en-us", wr);
|
|
103
103
|
return {
|
|
104
104
|
i18n: e,
|
|
105
105
|
i18nT: gn(e)
|
|
@@ -107,7 +107,7 @@ function Ar() {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
|
-
useI18n:
|
|
110
|
+
useI18n: Ir
|
|
111
111
|
}, Ie = "/api/runtime_groups/{controlPlaneId}", Ae = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
@@ -150,7 +150,7 @@ function At(e = {}) {
|
|
|
150
150
|
})
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ar() {
|
|
154
154
|
return {
|
|
155
155
|
debounce: (e, n) => {
|
|
156
156
|
let t;
|
|
@@ -167,7 +167,7 @@ const ft = "khcp-user-table-preferences", xr = {
|
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Sr() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -198,14 +198,14 @@ function Tr() {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Tr = {
|
|
202
202
|
actions: {
|
|
203
203
|
copyId: "Copy ID",
|
|
204
204
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
205
205
|
copyToClipboard: "Copied successfully!",
|
|
206
206
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, $r = {
|
|
209
209
|
message: "Are you sure you want to delete this {entityType}?",
|
|
210
210
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
211
211
|
}, jr = {
|
|
@@ -217,13 +217,13 @@ const $r = {
|
|
|
217
217
|
errors: {
|
|
218
218
|
edit: "The entity could not be edited at this time."
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Mr = {
|
|
221
221
|
emptyState: {
|
|
222
222
|
noSearchResultsTitle: "No results found",
|
|
223
223
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
224
224
|
noSearchResultsCtaText: "Clear"
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, Er = {
|
|
227
227
|
title: "Configuration",
|
|
228
228
|
actions: {
|
|
229
229
|
copy: "Copy JSON"
|
|
@@ -258,7 +258,7 @@ const $r = {
|
|
|
258
258
|
entryTitle: "Entry {index}",
|
|
259
259
|
structuredFormat: "Structured"
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, Or = {
|
|
262
262
|
filterButtonText: "Filter",
|
|
263
263
|
fieldLabel: "Filter by:",
|
|
264
264
|
inputPlaceholder: "Enter a value",
|
|
@@ -271,10 +271,10 @@ const $r = {
|
|
|
271
271
|
fetch: "Could not fetch available items",
|
|
272
272
|
invalid: "Please select a valid value"
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Nr = {
|
|
275
275
|
unexpected: "An unexpected error has occurred",
|
|
276
276
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
277
|
-
},
|
|
277
|
+
}, Kr = {
|
|
278
278
|
enable: {
|
|
279
279
|
title: "Enable {entityType}",
|
|
280
280
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -285,19 +285,19 @@ const $r = {
|
|
|
285
285
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
286
286
|
confirmText: "Yes, disable"
|
|
287
287
|
}
|
|
288
|
-
},
|
|
289
|
-
global:
|
|
290
|
-
deleteModal:
|
|
288
|
+
}, Br = {
|
|
289
|
+
global: Tr,
|
|
290
|
+
deleteModal: $r,
|
|
291
291
|
baseForm: jr,
|
|
292
|
-
baseTable:
|
|
293
|
-
baseConfigCard:
|
|
294
|
-
filter:
|
|
292
|
+
baseTable: Mr,
|
|
293
|
+
baseConfigCard: Er,
|
|
294
|
+
filter: Or,
|
|
295
295
|
debouncedFilter: Fr,
|
|
296
|
-
errors:
|
|
297
|
-
toggleModal:
|
|
296
|
+
errors: Nr,
|
|
297
|
+
toggleModal: Kr
|
|
298
298
|
};
|
|
299
|
-
function
|
|
300
|
-
const e = It("en-us",
|
|
299
|
+
function xt() {
|
|
300
|
+
const e = It("en-us", Br);
|
|
301
301
|
return {
|
|
302
302
|
i18n: e,
|
|
303
303
|
i18nT: gn(e)
|
|
@@ -348,19 +348,19 @@ function hn() {
|
|
|
348
348
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Pr(e, n, t, r = {
|
|
352
352
|
fetchedItemsKey: "data",
|
|
353
353
|
searchKeys: ["id"]
|
|
354
354
|
}) {
|
|
355
355
|
t || (t = "100");
|
|
356
356
|
const { axiosInstance: o } = At({
|
|
357
357
|
headers: e.requestHeaders
|
|
358
|
-
}), { i18n: { t: a } } =
|
|
358
|
+
}), { i18n: { t: a } } = xt(), { debounce: i } = Ar(), s = i(async (A) => {
|
|
359
359
|
await C(A);
|
|
360
360
|
}, 200), l = O(!1), c = O(""), d = O(""), u = O([]), g = O([]), f = O(void 0), I = y(n);
|
|
361
361
|
let v = `${e.apiBaseUrl}${I}`;
|
|
362
362
|
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
363
|
-
const { isValidUuid: p } = hn(),
|
|
363
|
+
const { isValidUuid: p } = hn(), x = async () => {
|
|
364
364
|
try {
|
|
365
365
|
l.value = !0;
|
|
366
366
|
const { data: A } = await o.get(`${v}?size=${t}`);
|
|
@@ -387,15 +387,15 @@ function Lr(e, n, t, r = {
|
|
|
387
387
|
return [k[r.fetchedItemsKey] ?? k];
|
|
388
388
|
})()) : w.push(
|
|
389
389
|
...r.searchKeys.filter((k) => k !== "id").map(async (k) => {
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
390
|
+
const { data: S } = await o.get(`${v}?${k}=${A}`);
|
|
391
|
+
return S[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
394
|
const K = await Promise.all(w), B = /* @__PURE__ */ new Set();
|
|
395
395
|
u.value = [], (ne = K == null ? void 0 : K.forEach) == null || ne.call(K, (k) => {
|
|
396
|
-
var
|
|
397
|
-
(
|
|
398
|
-
B.has(
|
|
396
|
+
var S;
|
|
397
|
+
(S = k == null ? void 0 : k.forEach) == null || S.call(k, (j) => {
|
|
398
|
+
B.has(j.id) || (B.add(j.id), u.value.push(j));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
@@ -410,8 +410,8 @@ function Lr(e, n, t, r = {
|
|
|
410
410
|
var K;
|
|
411
411
|
let B = !1;
|
|
412
412
|
for (const k of r.searchKeys) {
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const S = typeof w[k] == "string" ? (K = w[k]) == null ? void 0 : K.toLowerCase() : w[k];
|
|
414
|
+
S != null && S.includes(A.toLowerCase()) && (B = !0);
|
|
415
415
|
}
|
|
416
416
|
return B;
|
|
417
417
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
@@ -422,18 +422,18 @@ function Lr(e, n, t, r = {
|
|
|
422
422
|
validationError: d,
|
|
423
423
|
results: u,
|
|
424
424
|
allRecords: f,
|
|
425
|
-
loadItems:
|
|
425
|
+
loadItems: x,
|
|
426
426
|
debouncedQueryChange: s
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Lr(e, n) {
|
|
430
430
|
const t = y(n), r = T(
|
|
431
431
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
432
432
|
);
|
|
433
433
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
const { i18n: { t: e } } =
|
|
435
|
+
function qr() {
|
|
436
|
+
const { i18n: { t: e } } = xt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
439
439
|
var t, r, o;
|
|
@@ -460,7 +460,7 @@ function Ur() {
|
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Ur(e) {
|
|
464
464
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
465
465
|
try {
|
|
466
466
|
const r = e.join("/"), o = `${t}${r}`, a = e.some((i) => i.trim() === "");
|
|
@@ -481,7 +481,7 @@ function vn(e, n) {
|
|
|
481
481
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
482
482
|
try {
|
|
483
483
|
let f = new URL(a.value.href);
|
|
484
|
-
return o.value && g ? (f.search = "", f = new URL(`${f.href}
|
|
484
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}?filter[name][contains]=${g}`)) : (o.value || new URLSearchParams(g).forEach((I, v) => {
|
|
485
485
|
f.searchParams.append(v, I);
|
|
486
486
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), c && s !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
487
487
|
} catch (f) {
|
|
@@ -489,7 +489,7 @@ function vn(e, n) {
|
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Vr(e, n, t = "data") {
|
|
493
493
|
const r = y(n), { axiosInstance: o } = At({
|
|
494
494
|
headers: e.requestHeaders
|
|
495
495
|
}), a = vn(e, r), i = O({
|
|
@@ -500,7 +500,7 @@ function Rr(e, n, t = "data") {
|
|
|
500
500
|
i.value = { status: Oe.Loading };
|
|
501
501
|
const l = a(s), { data: c } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
502
502
|
let u;
|
|
503
|
-
c[d] && Array.isArray(c[d]) ? u = c[d] : u = Object.keys(c).length ? [c] : [];
|
|
503
|
+
c[d] && Array.isArray(c[d]) ? u = c[d] : Array.isArray(c) ? u = c : u = Object.keys(c).length ? [c] : [];
|
|
504
504
|
const g = {
|
|
505
505
|
data: u,
|
|
506
506
|
total: u.length,
|
|
@@ -531,7 +531,7 @@ function Rr(e, n, t = "data") {
|
|
|
531
531
|
}
|
|
532
532
|
}, fetcherState: i };
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Rr() {
|
|
535
535
|
const e = (t, r = "_") => t ? t.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
|
|
536
536
|
return {
|
|
537
537
|
capitalize: (t) => t ? t.replace(n, (r) => r.toUpperCase()) : "",
|
|
@@ -548,24 +548,24 @@ const bn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
548
548
|
}, qt = (e) => e === "*" || e === "x" || e === "X", Ut = (e) => {
|
|
549
549
|
const n = parseInt(e, 10);
|
|
550
550
|
return isNaN(n) ? e : n;
|
|
551
|
-
},
|
|
551
|
+
}, Dr = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Gr = (e, n) => {
|
|
552
552
|
if (qt(e) || qt(n))
|
|
553
553
|
return 0;
|
|
554
|
-
const [t, r] =
|
|
554
|
+
const [t, r] = Dr(Ut(e), Ut(n));
|
|
555
555
|
return t > r ? 1 : t < r ? -1 : 0;
|
|
556
556
|
}, Vt = (e, n) => {
|
|
557
557
|
for (let t = 0; t < Math.max(e.length, n.length); t++) {
|
|
558
|
-
const r =
|
|
558
|
+
const r = Gr(e[t] || "0", n[t] || "0");
|
|
559
559
|
if (r !== 0)
|
|
560
560
|
return r;
|
|
561
561
|
}
|
|
562
562
|
return 0;
|
|
563
|
-
},
|
|
563
|
+
}, zr = (e, n) => {
|
|
564
564
|
const t = Lt(e), r = Lt(n), o = t.pop(), a = r.pop(), i = Vt(t, r);
|
|
565
565
|
return i !== 0 ? i : o && a ? Vt(o.split("."), a.split(".")) : o || a ? o ? -1 : 1 : 0;
|
|
566
566
|
}, Rt = (e, n, t) => {
|
|
567
|
-
|
|
568
|
-
const r =
|
|
567
|
+
Hr(t);
|
|
568
|
+
const r = zr(e, n);
|
|
569
569
|
return Cn[t].includes(r);
|
|
570
570
|
}, Cn = {
|
|
571
571
|
">": [1],
|
|
@@ -574,18 +574,18 @@ const bn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
574
574
|
"<=": [-1, 0],
|
|
575
575
|
"<": [-1],
|
|
576
576
|
"!=": [-1, 1]
|
|
577
|
-
}, Dt = Object.keys(Cn),
|
|
577
|
+
}, Dt = Object.keys(Cn), Hr = (e) => {
|
|
578
578
|
if (typeof e != "string")
|
|
579
579
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
580
580
|
if (Dt.indexOf(e) === -1)
|
|
581
581
|
throw new Error(`Invalid operator, expected one of ${Dt.join("|")}`);
|
|
582
|
-
},
|
|
583
|
-
function
|
|
582
|
+
}, Jr = (e) => typeof e == "string" && /^[v\d]/.test(e) && bn.test(e);
|
|
583
|
+
function Yr(e) {
|
|
584
584
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
585
585
|
if (!n)
|
|
586
586
|
return !0;
|
|
587
587
|
const { edition: r, version: o } = n;
|
|
588
|
-
if (!
|
|
588
|
+
if (!Jr(o))
|
|
589
589
|
return console.error("Invalid version"), !1;
|
|
590
590
|
const a = t[r];
|
|
591
591
|
if (!a)
|
|
@@ -593,65 +593,48 @@ function Wr(e) {
|
|
|
593
593
|
const [i, s] = a;
|
|
594
594
|
return !(i && Rt(o, i, "<") || s && Rt(o, s, ">"));
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Wr(e) {
|
|
597
597
|
const n = O(0), t = O(0), r = O(!1);
|
|
598
|
-
return
|
|
598
|
+
return Se(e, (o) => {
|
|
599
599
|
o && !r.value && (n.value = o.offsetWidth, t.value = o.scrollWidth, r.value = !0);
|
|
600
600
|
}), {
|
|
601
601
|
isTruncated: T(() => n.value < t.value)
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
const Qr = new kr();
|
|
605
|
-
function Xr() {
|
|
606
|
-
return {
|
|
607
|
-
notify: async (e) => {
|
|
608
|
-
const n = {
|
|
609
|
-
appearance: "success",
|
|
610
|
-
message: "Success",
|
|
611
|
-
timeoutMilliseconds: 3e3
|
|
612
|
-
};
|
|
613
|
-
Qr.open({
|
|
614
|
-
...n,
|
|
615
|
-
...e
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
604
|
const ue = {
|
|
621
605
|
useAxios: At,
|
|
622
|
-
useDebouncedFilter:
|
|
623
|
-
useDeleteUrlBuilder:
|
|
624
|
-
useErrors:
|
|
625
|
-
useExternalLinkCreator:
|
|
626
|
-
useFetcher:
|
|
606
|
+
useDebouncedFilter: Pr,
|
|
607
|
+
useDeleteUrlBuilder: Lr,
|
|
608
|
+
useErrors: qr,
|
|
609
|
+
useExternalLinkCreator: Ur,
|
|
610
|
+
useFetcher: Vr,
|
|
627
611
|
useFetchUrlBuilder: vn,
|
|
628
612
|
useHelpers: hn,
|
|
629
|
-
useStringHelpers:
|
|
630
|
-
useI18n:
|
|
631
|
-
useGatewayFeatureSupported:
|
|
632
|
-
useTruncationDetector:
|
|
633
|
-
|
|
634
|
-
}, eo = {
|
|
613
|
+
useStringHelpers: Rr,
|
|
614
|
+
useI18n: xt,
|
|
615
|
+
useGatewayFeatureSupported: Yr,
|
|
616
|
+
useTruncationDetector: Wr
|
|
617
|
+
}, Zr = {
|
|
635
618
|
fail: "Failed to copy id to clipboard",
|
|
636
619
|
success: {
|
|
637
620
|
prefix: "Successfully",
|
|
638
621
|
content: " copied to clipboard"
|
|
639
622
|
}
|
|
640
|
-
},
|
|
641
|
-
message:
|
|
642
|
-
iconTitle:
|
|
643
|
-
},
|
|
623
|
+
}, Qr = "Copy to clipboard", Xr = {
|
|
624
|
+
message: Zr,
|
|
625
|
+
iconTitle: Qr
|
|
626
|
+
}, eo = "kong-ui-copy-uuid-notify", Gt = "24px", to = (e, n) => {
|
|
644
627
|
const t = e.__vccOpts || e;
|
|
645
628
|
for (const [r, o] of n)
|
|
646
629
|
t[r] = o;
|
|
647
630
|
return t;
|
|
648
|
-
},
|
|
631
|
+
}, no = (e) => (fn("data-v-9971cc79"), e = e(), mn(), e), ro = ["aria-hidden"], oo = {
|
|
649
632
|
key: 0,
|
|
650
633
|
"data-testid": "kui-icon-svg-title"
|
|
651
|
-
},
|
|
634
|
+
}, ao = /* @__PURE__ */ no(() => /* @__PURE__ */ V("path", {
|
|
652
635
|
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",
|
|
653
636
|
fill: "currentColor"
|
|
654
|
-
}, null, -1)),
|
|
637
|
+
}, null, -1)), io = /* @__PURE__ */ re({
|
|
655
638
|
__name: "CopyIcon",
|
|
656
639
|
props: {
|
|
657
640
|
/** The accessibility text provided to screen readers */
|
|
@@ -737,14 +720,14 @@ const ue = {
|
|
|
737
720
|
width: "100%",
|
|
738
721
|
xmlns: "http://www.w3.org/2000/svg"
|
|
739
722
|
}, [
|
|
740
|
-
e.title ? (m(), $("title",
|
|
741
|
-
|
|
742
|
-
], 8,
|
|
723
|
+
e.title ? (m(), $("title", oo, F(e.title), 1)) : G("", !0),
|
|
724
|
+
ao
|
|
725
|
+
], 8, ro))
|
|
743
726
|
]),
|
|
744
727
|
_: 1
|
|
745
728
|
}, 8, ["aria-hidden", "style"]));
|
|
746
729
|
}
|
|
747
|
-
}),
|
|
730
|
+
}), so = /* @__PURE__ */ to(io, [["__scopeId", "data-v-9971cc79"]]), lo = "16px", uo = { class: "kong-ui-copy-uuid" }, co = ["onClick"], zt = 15, po = /* @__PURE__ */ re({
|
|
748
731
|
__name: "CopyUuid",
|
|
749
732
|
props: {
|
|
750
733
|
uuid: {
|
|
@@ -788,7 +771,7 @@ const ue = {
|
|
|
788
771
|
},
|
|
789
772
|
emits: ["success", "error"],
|
|
790
773
|
setup(e, { emit: n }) {
|
|
791
|
-
const t = e, { t: r } = It("en-us",
|
|
774
|
+
const t = e, { t: r } = It("en-us", Xr), o = t.notify || br(eo, () => {
|
|
792
775
|
}), a = T(() => t.idTooltip ? {
|
|
793
776
|
label: t.idTooltip,
|
|
794
777
|
positionFixed: !0,
|
|
@@ -824,22 +807,22 @@ const ue = {
|
|
|
824
807
|
};
|
|
825
808
|
return (g, f) => {
|
|
826
809
|
const I = q("KClipboardProvider");
|
|
827
|
-
return m(), $("div",
|
|
810
|
+
return m(), $("div", uo, [
|
|
828
811
|
e.format !== "hidden" ? (m(), R(Ve(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
829
812
|
default: h(() => [
|
|
830
813
|
V("div", {
|
|
831
|
-
class:
|
|
814
|
+
class: Ne([
|
|
832
815
|
"uuid-container",
|
|
833
816
|
e.truncated ? "truncated-uuid" : null,
|
|
834
817
|
e.useMono ? "mono" : null
|
|
835
818
|
])
|
|
836
|
-
},
|
|
819
|
+
}, F(c.value), 3)
|
|
837
820
|
]),
|
|
838
821
|
_: 1
|
|
839
822
|
}, 16)) : G("", !0),
|
|
840
823
|
(m(), R(Ve(e.tooltip ? "KTooltip" : "div"), ht(l.value, { class: "uuid-icon-wrapper" }), {
|
|
841
824
|
default: h(() => [
|
|
842
|
-
|
|
825
|
+
N(I, null, {
|
|
843
826
|
default: h(({ copyToClipboard: v }) => [
|
|
844
827
|
V("span", {
|
|
845
828
|
"data-testid": "copy-to-clipboard",
|
|
@@ -847,14 +830,14 @@ const ue = {
|
|
|
847
830
|
tabindex: "0",
|
|
848
831
|
onClick: rt((p) => u(v), ["stop"])
|
|
849
832
|
}, [
|
|
850
|
-
|
|
833
|
+
N(y(so), {
|
|
851
834
|
class: "uuid-icon",
|
|
852
835
|
color: e.iconColor,
|
|
853
836
|
decorative: !!e.tooltip,
|
|
854
|
-
size: y(
|
|
837
|
+
size: y(lo),
|
|
855
838
|
title: y(r)("iconTitle")
|
|
856
839
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
857
|
-
], 8,
|
|
840
|
+
], 8, co)
|
|
858
841
|
]),
|
|
859
842
|
_: 1
|
|
860
843
|
})
|
|
@@ -864,15 +847,15 @@ const ue = {
|
|
|
864
847
|
]);
|
|
865
848
|
};
|
|
866
849
|
}
|
|
867
|
-
}),
|
|
850
|
+
}), fo = (e, n) => {
|
|
868
851
|
const t = e.__vccOpts || e;
|
|
869
852
|
for (const [r, o] of n)
|
|
870
853
|
t[r] = o;
|
|
871
854
|
return t;
|
|
872
|
-
}, kn = /* @__PURE__ */
|
|
855
|
+
}, kn = /* @__PURE__ */ fo(po, [["__scopeId", "data-v-0c07874b"]]), mo = {
|
|
873
856
|
key: 0,
|
|
874
857
|
class: "config-card-fieldset-title"
|
|
875
|
-
},
|
|
858
|
+
}, go = /* @__PURE__ */ re({
|
|
876
859
|
__name: "JsonCardItem",
|
|
877
860
|
props: {
|
|
878
861
|
item: {
|
|
@@ -897,13 +880,13 @@ const ue = {
|
|
|
897
880
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
898
881
|
});
|
|
899
882
|
return (l, c) => (m(), R(Ve(e.isArrayItem ? "fieldset" : "div"), {
|
|
900
|
-
class:
|
|
883
|
+
class: Ne(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
901
884
|
}, {
|
|
902
885
|
default: h(() => [
|
|
903
|
-
e.isArrayItem ? (m(), $("legend",
|
|
904
|
-
V("b", null,
|
|
886
|
+
e.isArrayItem ? (m(), $("legend", mo, [
|
|
887
|
+
V("b", null, F(s.value), 1)
|
|
905
888
|
])) : G("", !0),
|
|
906
|
-
(m(!0), $(ve, null, ye(Object.keys(i.value), (d, u) => (m(), R(
|
|
889
|
+
(m(!0), $(ve, null, ye(Object.keys(i.value), (d, u) => (m(), R(St, {
|
|
907
890
|
key: `${o.value}-property-${u}`,
|
|
908
891
|
item: {
|
|
909
892
|
key: d,
|
|
@@ -920,7 +903,7 @@ const ue = {
|
|
|
920
903
|
for (const [r, o] of n)
|
|
921
904
|
t[r] = o;
|
|
922
905
|
return t;
|
|
923
|
-
}, _n = /* @__PURE__ */ ke(
|
|
906
|
+
}, _n = /* @__PURE__ */ ke(go, [["__scopeId", "data-v-68ca83ec"]]), yo = /* @__PURE__ */ re({
|
|
924
907
|
__name: "InternalLinkItem",
|
|
925
908
|
props: {
|
|
926
909
|
item: {
|
|
@@ -934,20 +917,20 @@ const ue = {
|
|
|
934
917
|
return (t, r) => {
|
|
935
918
|
const o = q("KButton");
|
|
936
919
|
return m(), $("div", null, [
|
|
937
|
-
|
|
920
|
+
N(o, {
|
|
938
921
|
appearance: "tertiary",
|
|
939
922
|
class: "navigation-button",
|
|
940
923
|
onClick: r[0] || (r[0] = (a) => t.$emit("navigation-click", e.item))
|
|
941
924
|
}, {
|
|
942
925
|
default: h(() => [
|
|
943
|
-
Z(
|
|
926
|
+
Z(F(e.item.value || y(n)("baseConfigCard.commonFields.link")), 1)
|
|
944
927
|
]),
|
|
945
928
|
_: 1
|
|
946
929
|
})
|
|
947
930
|
]);
|
|
948
931
|
};
|
|
949
932
|
}
|
|
950
|
-
}),
|
|
933
|
+
}), ho = /* @__PURE__ */ ke(yo, [["__scopeId", "data-v-c96811e5"]]), vo = /* @__PURE__ */ re({
|
|
951
934
|
__name: "StatusBadge",
|
|
952
935
|
props: {
|
|
953
936
|
status: {
|
|
@@ -963,17 +946,17 @@ const ue = {
|
|
|
963
946
|
appearance: e.status ? "success" : "neutral"
|
|
964
947
|
}, {
|
|
965
948
|
default: h(() => [
|
|
966
|
-
Z(
|
|
949
|
+
Z(F(e.status ? y(n)("baseConfigCard.statusBadge.enabledLabel") : y(n)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
967
950
|
]),
|
|
968
951
|
_: 1
|
|
969
952
|
}, 8, ["appearance"]);
|
|
970
953
|
};
|
|
971
954
|
}
|
|
972
|
-
}),
|
|
955
|
+
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"], xo = ["data-testid"], So = ["data-testid"], To = ["data-testid"], $o = { key: 1 }, jo = ["data-testid"], Mo = ["data-testid"], Eo = ["data-testid"], Oo = ["data-testid"], Fo = {
|
|
973
956
|
name: "ConfigCardItem",
|
|
974
|
-
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge:
|
|
975
|
-
},
|
|
976
|
-
...
|
|
957
|
+
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge: vo, InternalLinkItem: ho }
|
|
958
|
+
}, No = /* @__PURE__ */ re({
|
|
959
|
+
...Fo,
|
|
977
960
|
props: {
|
|
978
961
|
item: {
|
|
979
962
|
type: Object,
|
|
@@ -994,7 +977,7 @@ const ue = {
|
|
|
994
977
|
setup(e, { emit: n }) {
|
|
995
978
|
const t = e;
|
|
996
979
|
mr((f) => ({
|
|
997
|
-
"1df60db4": c.value ? "none" : `solid ${y(
|
|
980
|
+
"1df60db4": c.value ? "none" : `solid ${y(_o)} ${y(Co)}`,
|
|
998
981
|
"21d1d34e": l.value && i.value ? "block" : "flex",
|
|
999
982
|
"4d3dc7e7": l.value && i.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1000
983
|
"4d400dc2": l.value && i.value ? "100%" : t.slim ? "50%" : "75%"
|
|
@@ -1127,16 +1110,16 @@ const ue = {
|
|
|
1127
1110
|
}
|
|
1128
1111
|
}), u = O(), { isTruncated: g } = ue.useTruncationDetector(u);
|
|
1129
1112
|
return (f, I) => {
|
|
1130
|
-
const v = q("KLabel"), p = q("KBadge"),
|
|
1131
|
-
return m(), $("div",
|
|
1113
|
+
const v = q("KLabel"), p = q("KBadge"), x = q("KMethodBadge"), b = q("KTooltip");
|
|
1114
|
+
return m(), $("div", Io, [
|
|
1132
1115
|
V("div", {
|
|
1133
1116
|
class: "config-card-details-label",
|
|
1134
1117
|
"data-testid": `${e.item.key}-label`
|
|
1135
1118
|
}, [
|
|
1136
1119
|
W(f.$slots, "label", { item: e.item }, () => [
|
|
1137
|
-
|
|
1120
|
+
N(v, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1138
1121
|
default: h(() => [
|
|
1139
|
-
Z(
|
|
1122
|
+
Z(F(e.item.label) + " ", 1)
|
|
1140
1123
|
]),
|
|
1141
1124
|
_: 2
|
|
1142
1125
|
}, [
|
|
@@ -1147,15 +1130,15 @@ const ue = {
|
|
|
1147
1130
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1148
1131
|
}, [
|
|
1149
1132
|
W(f.$slots, "label-tooltip", {}, () => [
|
|
1150
|
-
Z(
|
|
1133
|
+
Z(F(e.item.tooltip), 1)
|
|
1151
1134
|
], !0)
|
|
1152
|
-
], 8,
|
|
1135
|
+
], 8, xo)
|
|
1153
1136
|
]),
|
|
1154
1137
|
key: "0"
|
|
1155
1138
|
} : void 0
|
|
1156
1139
|
]), 1024)
|
|
1157
1140
|
], !0)
|
|
1158
|
-
], 8,
|
|
1141
|
+
], 8, Ao),
|
|
1159
1142
|
V("div", {
|
|
1160
1143
|
class: "config-card-details-value",
|
|
1161
1144
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -1163,7 +1146,7 @@ const ue = {
|
|
|
1163
1146
|
W(f.$slots, e.item.key, {
|
|
1164
1147
|
rowValue: e.item.value
|
|
1165
1148
|
}, () => [
|
|
1166
|
-
i.value ? (m(), $("div",
|
|
1149
|
+
i.value ? (m(), $("div", $o, [
|
|
1167
1150
|
(m(), R(Ve(d.value.tag), gr(yr(d.value.attrs)), {
|
|
1168
1151
|
default: h(() => [
|
|
1169
1152
|
d.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
@@ -1177,11 +1160,11 @@ const ue = {
|
|
|
1177
1160
|
"truncation-tooltip": C
|
|
1178
1161
|
}, {
|
|
1179
1162
|
default: h(() => [
|
|
1180
|
-
Z(
|
|
1163
|
+
Z(F(C), 1)
|
|
1181
1164
|
]),
|
|
1182
1165
|
_: 2
|
|
1183
1166
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1184
|
-
], 8,
|
|
1167
|
+
], 8, jo)) : G("", !0),
|
|
1185
1168
|
d.value.additionalComponent === "CopyUuid" ? (m(), $("div", {
|
|
1186
1169
|
key: 1,
|
|
1187
1170
|
class: "copy-uuid-array",
|
|
@@ -1192,25 +1175,25 @@ const ue = {
|
|
|
1192
1175
|
"data-testid": `${e.item.key}-copy-uuid-${A}`,
|
|
1193
1176
|
uuid: C
|
|
1194
1177
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1195
|
-
], 8,
|
|
1178
|
+
], 8, Mo)) : d.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
1196
1179
|
key: 2,
|
|
1197
1180
|
class: "method-badge-array",
|
|
1198
1181
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1199
1182
|
}, [
|
|
1200
|
-
(m(!0), $(ve, null, ye(e.item.value, (C, A) => (m(), R(
|
|
1183
|
+
(m(!0), $(ve, null, ye(e.item.value, (C, A) => (m(), R(x, {
|
|
1201
1184
|
key: `${e.item.key}-badge-method-${A}`,
|
|
1202
1185
|
class: "config-badge",
|
|
1203
1186
|
"data-testid": `${e.item.key}-badge-method-${A}`,
|
|
1204
1187
|
"is-rounded": "",
|
|
1205
1188
|
label: C,
|
|
1206
|
-
method: y(
|
|
1189
|
+
method: y(kr).includes(C.toLowerCase()) ? C.toLowerCase() : "custom"
|
|
1207
1190
|
}, {
|
|
1208
1191
|
default: h(() => [
|
|
1209
|
-
Z(
|
|
1192
|
+
Z(F(C), 1)
|
|
1210
1193
|
]),
|
|
1211
1194
|
_: 2
|
|
1212
1195
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1213
|
-
], 8,
|
|
1196
|
+
], 8, Eo)) : G("", !0),
|
|
1214
1197
|
d.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
1215
1198
|
key: 3,
|
|
1216
1199
|
"data-testid": `${t.item.key}-json-array-content`
|
|
@@ -1221,7 +1204,7 @@ const ue = {
|
|
|
1221
1204
|
"is-array-item": "",
|
|
1222
1205
|
item: C
|
|
1223
1206
|
}, null, 8, ["index", "item"]))), 128))
|
|
1224
|
-
], 8,
|
|
1207
|
+
], 8, Oo)) : (m(), R(b, {
|
|
1225
1208
|
key: 4,
|
|
1226
1209
|
label: y(g) ? e.item.value : ""
|
|
1227
1210
|
}, {
|
|
@@ -1229,8 +1212,8 @@ const ue = {
|
|
|
1229
1212
|
V("span", {
|
|
1230
1213
|
ref_key: "textContent",
|
|
1231
1214
|
ref: u,
|
|
1232
|
-
class:
|
|
1233
|
-
},
|
|
1215
|
+
class: Ne(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
|
+
}, F(d.value.text), 3)
|
|
1234
1217
|
]),
|
|
1235
1218
|
_: 1
|
|
1236
1219
|
}, 8, ["label"]))
|
|
@@ -1240,46 +1223,46 @@ const ue = {
|
|
|
1240
1223
|
])) : (m(), $("div", {
|
|
1241
1224
|
key: 0,
|
|
1242
1225
|
"data-testid": `${e.item.key}-no-value`
|
|
1243
|
-
}, " – ", 8,
|
|
1226
|
+
}, " – ", 8, To))
|
|
1244
1227
|
], !0)
|
|
1245
|
-
], 8,
|
|
1228
|
+
], 8, So)
|
|
1246
1229
|
]);
|
|
1247
1230
|
};
|
|
1248
1231
|
}
|
|
1249
|
-
}),
|
|
1232
|
+
}), St = /* @__PURE__ */ ke(No, [["__scopeId", "data-v-307ab96d"]]);
|
|
1250
1233
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1251
1234
|
function wn(e) {
|
|
1252
1235
|
return typeof e > "u" || e === null;
|
|
1253
1236
|
}
|
|
1254
|
-
function
|
|
1237
|
+
function Ko(e) {
|
|
1255
1238
|
return typeof e == "object" && e !== null;
|
|
1256
1239
|
}
|
|
1257
|
-
function
|
|
1240
|
+
function Bo(e) {
|
|
1258
1241
|
return Array.isArray(e) ? e : wn(e) ? [] : [e];
|
|
1259
1242
|
}
|
|
1260
|
-
function
|
|
1243
|
+
function Po(e, n) {
|
|
1261
1244
|
var t, r, o, a;
|
|
1262
1245
|
if (n)
|
|
1263
1246
|
for (a = Object.keys(n), t = 0, r = a.length; t < r; t += 1)
|
|
1264
1247
|
o = a[t], e[o] = n[o];
|
|
1265
1248
|
return e;
|
|
1266
1249
|
}
|
|
1267
|
-
function
|
|
1250
|
+
function Lo(e, n) {
|
|
1268
1251
|
var t = "", r;
|
|
1269
1252
|
for (r = 0; r < n; r += 1)
|
|
1270
1253
|
t += e;
|
|
1271
1254
|
return t;
|
|
1272
1255
|
}
|
|
1273
|
-
function
|
|
1256
|
+
function qo(e) {
|
|
1274
1257
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1275
1258
|
}
|
|
1276
|
-
var
|
|
1277
|
-
isNothing:
|
|
1278
|
-
isObject:
|
|
1279
|
-
toArray:
|
|
1280
|
-
repeat:
|
|
1281
|
-
isNegativeZero:
|
|
1282
|
-
extend:
|
|
1259
|
+
var Uo = wn, Vo = Ko, Ro = Bo, Do = Lo, Go = qo, zo = Po, se = {
|
|
1260
|
+
isNothing: Uo,
|
|
1261
|
+
isObject: Vo,
|
|
1262
|
+
toArray: Ro,
|
|
1263
|
+
repeat: Do,
|
|
1264
|
+
isNegativeZero: Go,
|
|
1265
|
+
extend: zo
|
|
1283
1266
|
};
|
|
1284
1267
|
function In(e, n) {
|
|
1285
1268
|
var t = "", r = e.reason || "(unknown reason)";
|
|
@@ -1307,7 +1290,7 @@ function mt(e, n, t, r, o) {
|
|
|
1307
1290
|
function gt(e, n) {
|
|
1308
1291
|
return se.repeat(" ", n - e.length) + e;
|
|
1309
1292
|
}
|
|
1310
|
-
function
|
|
1293
|
+
function Ho(e, n) {
|
|
1311
1294
|
if (n = Object.create(n || null), !e.buffer)
|
|
1312
1295
|
return null;
|
|
1313
1296
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
@@ -1337,7 +1320,7 @@ function Wo(e, n) {
|
|
|
1337
1320
|
`;
|
|
1338
1321
|
return s.replace(/\n$/, "");
|
|
1339
1322
|
}
|
|
1340
|
-
var
|
|
1323
|
+
var Jo = Ho, Yo = [
|
|
1341
1324
|
"kind",
|
|
1342
1325
|
"multi",
|
|
1343
1326
|
"resolve",
|
|
@@ -1348,12 +1331,12 @@ var Zo = Wo, Qo = [
|
|
|
1348
1331
|
"representName",
|
|
1349
1332
|
"defaultStyle",
|
|
1350
1333
|
"styleAliases"
|
|
1351
|
-
],
|
|
1334
|
+
], Wo = [
|
|
1352
1335
|
"scalar",
|
|
1353
1336
|
"sequence",
|
|
1354
1337
|
"mapping"
|
|
1355
1338
|
];
|
|
1356
|
-
function
|
|
1339
|
+
function Zo(e) {
|
|
1357
1340
|
var n = {};
|
|
1358
1341
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1359
1342
|
e[t].forEach(function(r) {
|
|
@@ -1361,18 +1344,18 @@ function ea(e) {
|
|
|
1361
1344
|
});
|
|
1362
1345
|
}), n;
|
|
1363
1346
|
}
|
|
1364
|
-
function
|
|
1347
|
+
function Qo(e, n) {
|
|
1365
1348
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1366
|
-
if (
|
|
1349
|
+
if (Yo.indexOf(t) === -1)
|
|
1367
1350
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1368
1351
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1369
1352
|
return !0;
|
|
1370
1353
|
}, this.construct = n.construct || function(t) {
|
|
1371
1354
|
return t;
|
|
1372
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1355
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Zo(n.styleAliases || null), Wo.indexOf(this.kind) === -1)
|
|
1373
1356
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1374
1357
|
}
|
|
1375
|
-
var de =
|
|
1358
|
+
var de = Qo;
|
|
1376
1359
|
function Ht(e, n) {
|
|
1377
1360
|
var t = [];
|
|
1378
1361
|
return e[n].forEach(function(r) {
|
|
@@ -1382,7 +1365,7 @@ function Ht(e, n) {
|
|
|
1382
1365
|
}), t[o] = r;
|
|
1383
1366
|
}), t;
|
|
1384
1367
|
}
|
|
1385
|
-
function
|
|
1368
|
+
function Xo() {
|
|
1386
1369
|
var e = {
|
|
1387
1370
|
scalar: {},
|
|
1388
1371
|
sequence: {},
|
|
@@ -1427,14 +1410,14 @@ vt.prototype.extend = function(e) {
|
|
|
1427
1410
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1428
1411
|
});
|
|
1429
1412
|
var r = Object.create(vt.prototype);
|
|
1430
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap =
|
|
1413
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Ht(r, "implicit"), r.compiledExplicit = Ht(r, "explicit"), r.compiledTypeMap = Xo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1431
1414
|
};
|
|
1432
|
-
var An = vt,
|
|
1415
|
+
var An = vt, xn = new de("tag:yaml.org,2002:str", {
|
|
1433
1416
|
kind: "scalar",
|
|
1434
1417
|
construct: function(e) {
|
|
1435
1418
|
return e !== null ? e : "";
|
|
1436
1419
|
}
|
|
1437
|
-
}),
|
|
1420
|
+
}), Sn = new de("tag:yaml.org,2002:seq", {
|
|
1438
1421
|
kind: "sequence",
|
|
1439
1422
|
construct: function(e) {
|
|
1440
1423
|
return e !== null ? e : [];
|
|
@@ -1446,28 +1429,28 @@ var An = vt, Sn = new de("tag:yaml.org,2002:str", {
|
|
|
1446
1429
|
}
|
|
1447
1430
|
}), $n = new An({
|
|
1448
1431
|
explicit: [
|
|
1449
|
-
Sn,
|
|
1450
1432
|
xn,
|
|
1433
|
+
Sn,
|
|
1451
1434
|
Tn
|
|
1452
1435
|
]
|
|
1453
1436
|
});
|
|
1454
|
-
function
|
|
1437
|
+
function ea(e) {
|
|
1455
1438
|
if (e === null)
|
|
1456
1439
|
return !0;
|
|
1457
1440
|
var n = e.length;
|
|
1458
1441
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1459
1442
|
}
|
|
1460
|
-
function
|
|
1443
|
+
function ta() {
|
|
1461
1444
|
return null;
|
|
1462
1445
|
}
|
|
1463
|
-
function
|
|
1446
|
+
function na(e) {
|
|
1464
1447
|
return e === null;
|
|
1465
1448
|
}
|
|
1466
|
-
var
|
|
1449
|
+
var jn = new de("tag:yaml.org,2002:null", {
|
|
1467
1450
|
kind: "scalar",
|
|
1468
|
-
resolve:
|
|
1469
|
-
construct:
|
|
1470
|
-
predicate:
|
|
1451
|
+
resolve: ea,
|
|
1452
|
+
construct: ta,
|
|
1453
|
+
predicate: na,
|
|
1471
1454
|
represent: {
|
|
1472
1455
|
canonical: function() {
|
|
1473
1456
|
return "~";
|
|
@@ -1487,23 +1470,23 @@ var Mn = new de("tag:yaml.org,2002:null", {
|
|
|
1487
1470
|
},
|
|
1488
1471
|
defaultStyle: "lowercase"
|
|
1489
1472
|
});
|
|
1490
|
-
function
|
|
1473
|
+
function ra(e) {
|
|
1491
1474
|
if (e === null)
|
|
1492
1475
|
return !1;
|
|
1493
1476
|
var n = e.length;
|
|
1494
1477
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1495
1478
|
}
|
|
1496
|
-
function
|
|
1479
|
+
function oa(e) {
|
|
1497
1480
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1498
1481
|
}
|
|
1499
|
-
function
|
|
1482
|
+
function aa(e) {
|
|
1500
1483
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1501
1484
|
}
|
|
1502
|
-
var
|
|
1485
|
+
var Mn = new de("tag:yaml.org,2002:bool", {
|
|
1503
1486
|
kind: "scalar",
|
|
1504
|
-
resolve:
|
|
1505
|
-
construct:
|
|
1506
|
-
predicate:
|
|
1487
|
+
resolve: ra,
|
|
1488
|
+
construct: oa,
|
|
1489
|
+
predicate: aa,
|
|
1507
1490
|
represent: {
|
|
1508
1491
|
lowercase: function(e) {
|
|
1509
1492
|
return e ? "true" : "false";
|
|
@@ -1517,16 +1500,16 @@ var jn = new de("tag:yaml.org,2002:bool", {
|
|
|
1517
1500
|
},
|
|
1518
1501
|
defaultStyle: "lowercase"
|
|
1519
1502
|
});
|
|
1520
|
-
function
|
|
1503
|
+
function ia(e) {
|
|
1521
1504
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1522
1505
|
}
|
|
1523
|
-
function
|
|
1506
|
+
function sa(e) {
|
|
1524
1507
|
return 48 <= e && e <= 55;
|
|
1525
1508
|
}
|
|
1526
|
-
function
|
|
1509
|
+
function la(e) {
|
|
1527
1510
|
return 48 <= e && e <= 57;
|
|
1528
1511
|
}
|
|
1529
|
-
function
|
|
1512
|
+
function ua(e) {
|
|
1530
1513
|
if (e === null)
|
|
1531
1514
|
return !1;
|
|
1532
1515
|
var n = e.length, t = 0, r = !1, o;
|
|
@@ -1547,7 +1530,7 @@ function pa(e) {
|
|
|
1547
1530
|
if (o === "x") {
|
|
1548
1531
|
for (t++; t < n; t++)
|
|
1549
1532
|
if (o = e[t], o !== "_") {
|
|
1550
|
-
if (!
|
|
1533
|
+
if (!ia(e.charCodeAt(t)))
|
|
1551
1534
|
return !1;
|
|
1552
1535
|
r = !0;
|
|
1553
1536
|
}
|
|
@@ -1556,7 +1539,7 @@ function pa(e) {
|
|
|
1556
1539
|
if (o === "o") {
|
|
1557
1540
|
for (t++; t < n; t++)
|
|
1558
1541
|
if (o = e[t], o !== "_") {
|
|
1559
|
-
if (!
|
|
1542
|
+
if (!sa(e.charCodeAt(t)))
|
|
1560
1543
|
return !1;
|
|
1561
1544
|
r = !0;
|
|
1562
1545
|
}
|
|
@@ -1567,13 +1550,13 @@ function pa(e) {
|
|
|
1567
1550
|
return !1;
|
|
1568
1551
|
for (; t < n; t++)
|
|
1569
1552
|
if (o = e[t], o !== "_") {
|
|
1570
|
-
if (!
|
|
1553
|
+
if (!la(e.charCodeAt(t)))
|
|
1571
1554
|
return !1;
|
|
1572
1555
|
r = !0;
|
|
1573
1556
|
}
|
|
1574
1557
|
return !(!r || o === "_");
|
|
1575
1558
|
}
|
|
1576
|
-
function
|
|
1559
|
+
function ca(e) {
|
|
1577
1560
|
var n = e, t = 1, r;
|
|
1578
1561
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), r = n[0], (r === "-" || r === "+") && (r === "-" && (t = -1), n = n.slice(1), r = n[0]), n === "0")
|
|
1579
1562
|
return 0;
|
|
@@ -1587,14 +1570,14 @@ function fa(e) {
|
|
|
1587
1570
|
}
|
|
1588
1571
|
return t * parseInt(n, 10);
|
|
1589
1572
|
}
|
|
1590
|
-
function
|
|
1573
|
+
function da(e) {
|
|
1591
1574
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !se.isNegativeZero(e);
|
|
1592
1575
|
}
|
|
1593
1576
|
var En = new de("tag:yaml.org,2002:int", {
|
|
1594
1577
|
kind: "scalar",
|
|
1595
|
-
resolve:
|
|
1596
|
-
construct:
|
|
1597
|
-
predicate:
|
|
1578
|
+
resolve: ua,
|
|
1579
|
+
construct: ca,
|
|
1580
|
+
predicate: da,
|
|
1598
1581
|
represent: {
|
|
1599
1582
|
binary: function(e) {
|
|
1600
1583
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1617,21 +1600,21 @@ var En = new de("tag:yaml.org,2002:int", {
|
|
|
1617
1600
|
decimal: [10, "dec"],
|
|
1618
1601
|
hexadecimal: [16, "hex"]
|
|
1619
1602
|
}
|
|
1620
|
-
}),
|
|
1603
|
+
}), pa = new RegExp(
|
|
1621
1604
|
// 2.5e4, 2.5 and integers
|
|
1622
1605
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1623
1606
|
);
|
|
1624
|
-
function
|
|
1625
|
-
return !(e === null || !
|
|
1607
|
+
function fa(e) {
|
|
1608
|
+
return !(e === null || !pa.test(e) || // Quick hack to not allow integers end with `_`
|
|
1626
1609
|
// Probably should update regexp & check speed
|
|
1627
1610
|
e[e.length - 1] === "_");
|
|
1628
1611
|
}
|
|
1629
|
-
function
|
|
1612
|
+
function ma(e) {
|
|
1630
1613
|
var n, t;
|
|
1631
1614
|
return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
|
|
1632
1615
|
}
|
|
1633
|
-
var
|
|
1634
|
-
function
|
|
1616
|
+
var ga = /^[-+]?[0-9]+e/;
|
|
1617
|
+
function ya(e, n) {
|
|
1635
1618
|
var t;
|
|
1636
1619
|
if (isNaN(e))
|
|
1637
1620
|
switch (n) {
|
|
@@ -1662,34 +1645,34 @@ function ba(e, n) {
|
|
|
1662
1645
|
}
|
|
1663
1646
|
else if (se.isNegativeZero(e))
|
|
1664
1647
|
return "-0.0";
|
|
1665
|
-
return t = e.toString(10),
|
|
1648
|
+
return t = e.toString(10), ga.test(t) ? t.replace("e", ".e") : t;
|
|
1666
1649
|
}
|
|
1667
|
-
function
|
|
1650
|
+
function ha(e) {
|
|
1668
1651
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || se.isNegativeZero(e));
|
|
1669
1652
|
}
|
|
1670
1653
|
var On = new de("tag:yaml.org,2002:float", {
|
|
1671
1654
|
kind: "scalar",
|
|
1672
|
-
resolve:
|
|
1673
|
-
construct:
|
|
1674
|
-
predicate:
|
|
1675
|
-
represent:
|
|
1655
|
+
resolve: fa,
|
|
1656
|
+
construct: ma,
|
|
1657
|
+
predicate: ha,
|
|
1658
|
+
represent: ya,
|
|
1676
1659
|
defaultStyle: "lowercase"
|
|
1677
|
-
}),
|
|
1660
|
+
}), Fn = $n.extend({
|
|
1678
1661
|
implicit: [
|
|
1679
|
-
Mn,
|
|
1680
1662
|
jn,
|
|
1663
|
+
Mn,
|
|
1681
1664
|
En,
|
|
1682
1665
|
On
|
|
1683
1666
|
]
|
|
1684
|
-
}),
|
|
1667
|
+
}), Nn = Fn, Kn = new RegExp(
|
|
1685
1668
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1686
1669
|
), Bn = new RegExp(
|
|
1687
1670
|
"^([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]))?))?$"
|
|
1688
1671
|
);
|
|
1689
|
-
function
|
|
1672
|
+
function va(e) {
|
|
1690
1673
|
return e === null ? !1 : Kn.exec(e) !== null || Bn.exec(e) !== null;
|
|
1691
1674
|
}
|
|
1692
|
-
function
|
|
1675
|
+
function ba(e) {
|
|
1693
1676
|
var n, t, r, o, a, i, s, l = 0, c = null, d, u, g;
|
|
1694
1677
|
if (n = Kn.exec(e), n === null && (n = Bn.exec(e)), n === null)
|
|
1695
1678
|
throw new Error("Date resolve error");
|
|
@@ -1702,25 +1685,25 @@ function _a(e) {
|
|
|
1702
1685
|
}
|
|
1703
1686
|
return n[9] && (d = +n[10], u = +(n[11] || 0), c = (d * 60 + u) * 6e4, n[9] === "-" && (c = -c)), g = new Date(Date.UTC(t, r, o, a, i, s, l)), c && g.setTime(g.getTime() - c), g;
|
|
1704
1687
|
}
|
|
1705
|
-
function
|
|
1688
|
+
function Ca(e) {
|
|
1706
1689
|
return e.toISOString();
|
|
1707
1690
|
}
|
|
1708
1691
|
var Pn = new de("tag:yaml.org,2002:timestamp", {
|
|
1709
1692
|
kind: "scalar",
|
|
1710
|
-
resolve:
|
|
1711
|
-
construct:
|
|
1693
|
+
resolve: va,
|
|
1694
|
+
construct: ba,
|
|
1712
1695
|
instanceOf: Date,
|
|
1713
|
-
represent:
|
|
1696
|
+
represent: Ca
|
|
1714
1697
|
});
|
|
1715
|
-
function
|
|
1698
|
+
function ka(e) {
|
|
1716
1699
|
return e === "<<" || e === null;
|
|
1717
1700
|
}
|
|
1718
1701
|
var Ln = new de("tag:yaml.org,2002:merge", {
|
|
1719
1702
|
kind: "scalar",
|
|
1720
|
-
resolve:
|
|
1703
|
+
resolve: ka
|
|
1721
1704
|
}), Tt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1722
1705
|
\r`;
|
|
1723
|
-
function
|
|
1706
|
+
function _a(e) {
|
|
1724
1707
|
if (e === null)
|
|
1725
1708
|
return !1;
|
|
1726
1709
|
var n, t, r = 0, o = e.length, a = Tt;
|
|
@@ -1732,37 +1715,37 @@ function Aa(e) {
|
|
|
1732
1715
|
}
|
|
1733
1716
|
return r % 8 === 0;
|
|
1734
1717
|
}
|
|
1735
|
-
function
|
|
1718
|
+
function wa(e) {
|
|
1736
1719
|
var n, t, r = e.replace(/[\r\n=]/g, ""), o = r.length, a = Tt, i = 0, s = [];
|
|
1737
1720
|
for (n = 0; n < o; n++)
|
|
1738
1721
|
n % 4 === 0 && n && (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)), i = i << 6 | a.indexOf(r.charAt(n));
|
|
1739
1722
|
return t = o % 4 * 6, t === 0 ? (s.push(i >> 16 & 255), s.push(i >> 8 & 255), s.push(i & 255)) : t === 18 ? (s.push(i >> 10 & 255), s.push(i >> 2 & 255)) : t === 12 && s.push(i >> 4 & 255), new Uint8Array(s);
|
|
1740
1723
|
}
|
|
1741
|
-
function
|
|
1724
|
+
function Ia(e) {
|
|
1742
1725
|
var n = "", t = 0, r, o, a = e.length, i = Tt;
|
|
1743
1726
|
for (r = 0; r < a; r++)
|
|
1744
1727
|
r % 3 === 0 && r && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[r];
|
|
1745
1728
|
return o = a % 3, o === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : o === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : o === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
|
|
1746
1729
|
}
|
|
1747
|
-
function
|
|
1730
|
+
function Aa(e) {
|
|
1748
1731
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1749
1732
|
}
|
|
1750
1733
|
var qn = new de("tag:yaml.org,2002:binary", {
|
|
1751
1734
|
kind: "scalar",
|
|
1752
|
-
resolve:
|
|
1753
|
-
construct:
|
|
1754
|
-
predicate:
|
|
1755
|
-
represent:
|
|
1756
|
-
}),
|
|
1757
|
-
function
|
|
1735
|
+
resolve: _a,
|
|
1736
|
+
construct: wa,
|
|
1737
|
+
predicate: Aa,
|
|
1738
|
+
represent: Ia
|
|
1739
|
+
}), xa = Object.prototype.hasOwnProperty, Sa = Object.prototype.toString;
|
|
1740
|
+
function Ta(e) {
|
|
1758
1741
|
if (e === null)
|
|
1759
1742
|
return !0;
|
|
1760
1743
|
var n = [], t, r, o, a, i, s = e;
|
|
1761
1744
|
for (t = 0, r = s.length; t < r; t += 1) {
|
|
1762
|
-
if (o = s[t], i = !1,
|
|
1745
|
+
if (o = s[t], i = !1, Sa.call(o) !== "[object Object]")
|
|
1763
1746
|
return !1;
|
|
1764
1747
|
for (a in o)
|
|
1765
|
-
if (
|
|
1748
|
+
if (xa.call(o, a))
|
|
1766
1749
|
if (!i)
|
|
1767
1750
|
i = !0;
|
|
1768
1751
|
else
|
|
@@ -1776,26 +1759,26 @@ function ja(e) {
|
|
|
1776
1759
|
}
|
|
1777
1760
|
return !0;
|
|
1778
1761
|
}
|
|
1779
|
-
function
|
|
1762
|
+
function $a(e) {
|
|
1780
1763
|
return e !== null ? e : [];
|
|
1781
1764
|
}
|
|
1782
1765
|
var Un = new de("tag:yaml.org,2002:omap", {
|
|
1783
1766
|
kind: "sequence",
|
|
1784
|
-
resolve:
|
|
1785
|
-
construct:
|
|
1786
|
-
}),
|
|
1787
|
-
function
|
|
1767
|
+
resolve: Ta,
|
|
1768
|
+
construct: $a
|
|
1769
|
+
}), ja = Object.prototype.toString;
|
|
1770
|
+
function Ma(e) {
|
|
1788
1771
|
if (e === null)
|
|
1789
1772
|
return !0;
|
|
1790
1773
|
var n, t, r, o, a, i = e;
|
|
1791
1774
|
for (a = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
|
|
1792
|
-
if (r = i[n],
|
|
1775
|
+
if (r = i[n], ja.call(r) !== "[object Object]" || (o = Object.keys(r), o.length !== 1))
|
|
1793
1776
|
return !1;
|
|
1794
1777
|
a[n] = [o[0], r[o[0]]];
|
|
1795
1778
|
}
|
|
1796
1779
|
return !0;
|
|
1797
1780
|
}
|
|
1798
|
-
function
|
|
1781
|
+
function Ea(e) {
|
|
1799
1782
|
if (e === null)
|
|
1800
1783
|
return [];
|
|
1801
1784
|
var n, t, r, o, a, i = e;
|
|
@@ -1805,26 +1788,26 @@ function Fa(e) {
|
|
|
1805
1788
|
}
|
|
1806
1789
|
var Vn = new de("tag:yaml.org,2002:pairs", {
|
|
1807
1790
|
kind: "sequence",
|
|
1808
|
-
resolve:
|
|
1809
|
-
construct:
|
|
1810
|
-
}),
|
|
1811
|
-
function
|
|
1791
|
+
resolve: Ma,
|
|
1792
|
+
construct: Ea
|
|
1793
|
+
}), Oa = Object.prototype.hasOwnProperty;
|
|
1794
|
+
function Fa(e) {
|
|
1812
1795
|
if (e === null)
|
|
1813
1796
|
return !0;
|
|
1814
1797
|
var n, t = e;
|
|
1815
1798
|
for (n in t)
|
|
1816
|
-
if (
|
|
1799
|
+
if (Oa.call(t, n) && t[n] !== null)
|
|
1817
1800
|
return !1;
|
|
1818
1801
|
return !0;
|
|
1819
1802
|
}
|
|
1820
|
-
function
|
|
1803
|
+
function Na(e) {
|
|
1821
1804
|
return e !== null ? e : {};
|
|
1822
1805
|
}
|
|
1823
1806
|
var Rn = new de("tag:yaml.org,2002:set", {
|
|
1824
1807
|
kind: "mapping",
|
|
1825
|
-
resolve:
|
|
1826
|
-
construct:
|
|
1827
|
-
}), $t =
|
|
1808
|
+
resolve: Fa,
|
|
1809
|
+
construct: Na
|
|
1810
|
+
}), $t = Nn.extend({
|
|
1828
1811
|
implicit: [
|
|
1829
1812
|
Pn,
|
|
1830
1813
|
Ln
|
|
@@ -1835,14 +1818,14 @@ var Rn = new de("tag:yaml.org,2002:set", {
|
|
|
1835
1818
|
Vn,
|
|
1836
1819
|
Rn
|
|
1837
1820
|
]
|
|
1838
|
-
}),
|
|
1821
|
+
}), Me = Object.prototype.hasOwnProperty, ot = 1, Dn = 2, Gn = 3, at = 4, yt = 1, Ka = 2, Jt = 3, Ba = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pa = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, zn = /^(?:!|!!|![a-z\-]+!)$/i, Hn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1839
1822
|
function Yt(e) {
|
|
1840
1823
|
return Object.prototype.toString.call(e);
|
|
1841
1824
|
}
|
|
1842
1825
|
function we(e) {
|
|
1843
1826
|
return e === 10 || e === 13;
|
|
1844
1827
|
}
|
|
1845
|
-
function
|
|
1828
|
+
function Fe(e) {
|
|
1846
1829
|
return e === 9 || e === 32;
|
|
1847
1830
|
}
|
|
1848
1831
|
function he(e) {
|
|
@@ -1851,21 +1834,21 @@ function he(e) {
|
|
|
1851
1834
|
function qe(e) {
|
|
1852
1835
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1853
1836
|
}
|
|
1854
|
-
function
|
|
1837
|
+
function qa(e) {
|
|
1855
1838
|
var n;
|
|
1856
1839
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1857
1840
|
}
|
|
1858
|
-
function
|
|
1841
|
+
function Ua(e) {
|
|
1859
1842
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1860
1843
|
}
|
|
1861
|
-
function
|
|
1844
|
+
function Va(e) {
|
|
1862
1845
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1863
1846
|
}
|
|
1864
1847
|
function Wt(e) {
|
|
1865
1848
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1866
1849
|
` : 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" : "";
|
|
1867
1850
|
}
|
|
1868
|
-
function
|
|
1851
|
+
function Ra(e) {
|
|
1869
1852
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1870
1853
|
(e - 65536 >> 10) + 55296,
|
|
1871
1854
|
(e - 65536 & 1023) + 56320
|
|
@@ -1874,7 +1857,7 @@ function za(e) {
|
|
|
1874
1857
|
var Jn = new Array(256), Yn = new Array(256);
|
|
1875
1858
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1876
1859
|
Jn[Pe] = Wt(Pe) ? 1 : 0, Yn[Pe] = Wt(Pe);
|
|
1877
|
-
function
|
|
1860
|
+
function Da(e, n) {
|
|
1878
1861
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || $t, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.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 = [];
|
|
1879
1862
|
}
|
|
1880
1863
|
function Wn(e, n) {
|
|
@@ -1886,9 +1869,9 @@ function Wn(e, n) {
|
|
|
1886
1869
|
line: e.line,
|
|
1887
1870
|
column: e.position - e.lineStart
|
|
1888
1871
|
};
|
|
1889
|
-
return t.snippet =
|
|
1872
|
+
return t.snippet = Jo(t), new me(n, t);
|
|
1890
1873
|
}
|
|
1891
|
-
function
|
|
1874
|
+
function M(e, n) {
|
|
1892
1875
|
throw Wn(e, n);
|
|
1893
1876
|
}
|
|
1894
1877
|
function it(e, n) {
|
|
@@ -1897,40 +1880,40 @@ function it(e, n) {
|
|
|
1897
1880
|
var Zt = {
|
|
1898
1881
|
YAML: function(e, n, t) {
|
|
1899
1882
|
var r, o, a;
|
|
1900
|
-
e.version !== null &&
|
|
1883
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && it(e, "unsupported YAML version of the document");
|
|
1901
1884
|
},
|
|
1902
1885
|
TAG: function(e, n, t) {
|
|
1903
1886
|
var r, o;
|
|
1904
|
-
t.length !== 2 &&
|
|
1887
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], zn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Me.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Hn.test(o) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1905
1888
|
try {
|
|
1906
1889
|
o = decodeURIComponent(o);
|
|
1907
1890
|
} catch {
|
|
1908
|
-
|
|
1891
|
+
M(e, "tag prefix is malformed: " + o);
|
|
1909
1892
|
}
|
|
1910
1893
|
e.tagMap[r] = o;
|
|
1911
1894
|
}
|
|
1912
1895
|
};
|
|
1913
|
-
function
|
|
1896
|
+
function je(e, n, t, r) {
|
|
1914
1897
|
var o, a, i, s;
|
|
1915
1898
|
if (n < t) {
|
|
1916
1899
|
if (s = e.input.slice(n, t), r)
|
|
1917
1900
|
for (o = 0, a = s.length; o < a; o += 1)
|
|
1918
|
-
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 ||
|
|
1901
|
+
i = s.charCodeAt(o), i === 9 || 32 <= i && i <= 1114111 || M(e, "expected valid JSON character");
|
|
1919
1902
|
else
|
|
1920
|
-
|
|
1903
|
+
Ba.test(s) && M(e, "the stream contains non-printable characters");
|
|
1921
1904
|
e.result += s;
|
|
1922
1905
|
}
|
|
1923
1906
|
}
|
|
1924
1907
|
function Qt(e, n, t, r) {
|
|
1925
1908
|
var o, a, i, s;
|
|
1926
|
-
for (se.isObject(t) ||
|
|
1927
|
-
a = o[i],
|
|
1909
|
+
for (se.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1910
|
+
a = o[i], Me.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1928
1911
|
}
|
|
1929
1912
|
function Ue(e, n, t, r, o, a, i, s, l) {
|
|
1930
1913
|
var c, d;
|
|
1931
1914
|
if (Array.isArray(o))
|
|
1932
1915
|
for (o = Array.prototype.slice.call(o), c = 0, d = o.length; c < d; c += 1)
|
|
1933
|
-
Array.isArray(o[c]) &&
|
|
1916
|
+
Array.isArray(o[c]) && M(e, "nested arrays are not supported inside keys"), typeof o == "object" && Yt(o[c]) === "[object Object]" && (o[c] = "[object Object]");
|
|
1934
1917
|
if (typeof o == "object" && Yt(o) === "[object Object]" && (o = "[object Object]"), o = String(o), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1935
1918
|
if (Array.isArray(a))
|
|
1936
1919
|
for (c = 0, d = a.length; c < d; c += 1)
|
|
@@ -1938,7 +1921,7 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1938
1921
|
else
|
|
1939
1922
|
Qt(e, n, a, t);
|
|
1940
1923
|
else
|
|
1941
|
-
!e.json && !
|
|
1924
|
+
!e.json && !Me.call(t, o) && Me.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1942
1925
|
configurable: !0,
|
|
1943
1926
|
enumerable: !0,
|
|
1944
1927
|
writable: !0,
|
|
@@ -1946,20 +1929,20 @@ function Ue(e, n, t, r, o, a, i, s, l) {
|
|
|
1946
1929
|
}) : n[o] = a, delete t[o];
|
|
1947
1930
|
return n;
|
|
1948
1931
|
}
|
|
1949
|
-
function
|
|
1932
|
+
function jt(e) {
|
|
1950
1933
|
var n;
|
|
1951
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1934
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1952
1935
|
}
|
|
1953
1936
|
function ae(e, n, t) {
|
|
1954
1937
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1955
|
-
for (;
|
|
1938
|
+
for (; Fe(o); )
|
|
1956
1939
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1957
1940
|
if (n && o === 35)
|
|
1958
1941
|
do
|
|
1959
1942
|
o = e.input.charCodeAt(++e.position);
|
|
1960
1943
|
while (o !== 10 && o !== 13 && o !== 0);
|
|
1961
1944
|
if (we(o))
|
|
1962
|
-
for (
|
|
1945
|
+
for (jt(e), o = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; o === 32; )
|
|
1963
1946
|
e.lineIndent++, o = e.input.charCodeAt(++e.position);
|
|
1964
1947
|
else
|
|
1965
1948
|
break;
|
|
@@ -1970,11 +1953,11 @@ function dt(e) {
|
|
|
1970
1953
|
var n = e.position, t;
|
|
1971
1954
|
return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || he(t)));
|
|
1972
1955
|
}
|
|
1973
|
-
function
|
|
1956
|
+
function Mt(e, n) {
|
|
1974
1957
|
n === 1 ? e.result += " " : n > 1 && (e.result += se.repeat(`
|
|
1975
1958
|
`, n - 1));
|
|
1976
1959
|
}
|
|
1977
|
-
function
|
|
1960
|
+
function Ga(e, n, t) {
|
|
1978
1961
|
var r, o, a, i, s, l, c, d, u = e.kind, g = e.result, f;
|
|
1979
1962
|
if (f = e.input.charCodeAt(e.position), he(f) || qe(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) && (o = e.input.charCodeAt(e.position + 1), he(o) || t && qe(o)))
|
|
1980
1963
|
return !1;
|
|
@@ -1997,50 +1980,50 @@ function Ja(e, n, t) {
|
|
|
1997
1980
|
break;
|
|
1998
1981
|
}
|
|
1999
1982
|
}
|
|
2000
|
-
s && (
|
|
1983
|
+
s && (je(e, a, i, !1), Mt(e, e.line - l), a = i = e.position, s = !1), Fe(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
2001
1984
|
}
|
|
2002
|
-
return
|
|
1985
|
+
return je(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
2003
1986
|
}
|
|
2004
|
-
function
|
|
1987
|
+
function za(e, n) {
|
|
2005
1988
|
var t, r, o;
|
|
2006
1989
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
2007
1990
|
return !1;
|
|
2008
1991
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2009
1992
|
if (t === 39)
|
|
2010
|
-
if (
|
|
1993
|
+
if (je(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2011
1994
|
r = e.position, e.position++, o = e.position;
|
|
2012
1995
|
else
|
|
2013
1996
|
return !0;
|
|
2014
1997
|
else
|
|
2015
|
-
we(t) ? (
|
|
2016
|
-
|
|
1998
|
+
we(t) ? (je(e, r, o, !0), Mt(e, ae(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1999
|
+
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2017
2000
|
}
|
|
2018
|
-
function
|
|
2001
|
+
function Ha(e, n) {
|
|
2019
2002
|
var t, r, o, a, i, s;
|
|
2020
2003
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
2021
2004
|
return !1;
|
|
2022
2005
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2023
2006
|
if (s === 34)
|
|
2024
|
-
return
|
|
2007
|
+
return je(e, t, e.position, !0), e.position++, !0;
|
|
2025
2008
|
if (s === 92) {
|
|
2026
|
-
if (
|
|
2009
|
+
if (je(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
2027
2010
|
ae(e, !1, n);
|
|
2028
2011
|
else if (s < 256 && Jn[s])
|
|
2029
2012
|
e.result += Yn[s], e.position++;
|
|
2030
|
-
else if ((i =
|
|
2013
|
+
else if ((i = Ua(s)) > 0) {
|
|
2031
2014
|
for (o = i, a = 0; o > 0; o--)
|
|
2032
|
-
s = e.input.charCodeAt(++e.position), (i =
|
|
2033
|
-
e.result +=
|
|
2015
|
+
s = e.input.charCodeAt(++e.position), (i = qa(s)) >= 0 ? a = (a << 4) + i : M(e, "expected hexadecimal character");
|
|
2016
|
+
e.result += Ra(a), e.position++;
|
|
2034
2017
|
} else
|
|
2035
|
-
|
|
2018
|
+
M(e, "unknown escape sequence");
|
|
2036
2019
|
t = r = e.position;
|
|
2037
2020
|
} else
|
|
2038
|
-
we(s) ? (
|
|
2021
|
+
we(s) ? (je(e, t, r, !0), Mt(e, ae(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2039
2022
|
}
|
|
2040
|
-
|
|
2023
|
+
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2041
2024
|
}
|
|
2042
|
-
function
|
|
2043
|
-
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), v, p,
|
|
2025
|
+
function Ja(e, n) {
|
|
2026
|
+
var t = !0, r, o, a, i = e.tag, s, l = e.anchor, c, d, u, g, f, I = /* @__PURE__ */ Object.create(null), v, p, x, b;
|
|
2044
2027
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
2045
2028
|
d = 93, f = !1, s = [];
|
|
2046
2029
|
else if (b === 123)
|
|
@@ -2050,11 +2033,11 @@ function Za(e, n) {
|
|
|
2050
2033
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
2051
2034
|
if (ae(e, !0, n), b = e.input.charCodeAt(e.position), b === d)
|
|
2052
2035
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2053
|
-
t ? b === 44 &&
|
|
2036
|
+
t ? b === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), p = v = x = null, u = g = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), he(c) && (u = g = !0, e.position++, ae(e, !0, n))), r = e.line, o = e.lineStart, a = e.position, Re(e, n, ot, !1, !0), p = e.tag, v = e.result, ae(e, !0, n), b = e.input.charCodeAt(e.position), (g || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), ae(e, !0, n), Re(e, n, ot, !1, !0), x = e.result), f ? Ue(e, s, I, p, v, x, r, o, a) : u ? s.push(Ue(e, null, I, p, v, x, r, o, a)) : s.push(v), ae(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (t = !0, b = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2054
2037
|
}
|
|
2055
|
-
|
|
2038
|
+
M(e, "unexpected end of the stream within a flow collection");
|
|
2056
2039
|
}
|
|
2057
|
-
function
|
|
2040
|
+
function Ya(e, n) {
|
|
2058
2041
|
var t, r, o = yt, a = !1, i = !1, s = n, l = 0, c = !1, d, u;
|
|
2059
2042
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
2060
2043
|
r = !1;
|
|
@@ -2064,22 +2047,22 @@ function Qa(e, n) {
|
|
|
2064
2047
|
return !1;
|
|
2065
2048
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
2066
2049
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
2067
|
-
yt === o ? o = u === 43 ? Jt :
|
|
2068
|
-
else if ((d =
|
|
2069
|
-
d === 0 ?
|
|
2050
|
+
yt === o ? o = u === 43 ? Jt : Ka : M(e, "repeat of a chomping mode identifier");
|
|
2051
|
+
else if ((d = Va(u)) >= 0)
|
|
2052
|
+
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2070
2053
|
else
|
|
2071
2054
|
break;
|
|
2072
|
-
if (
|
|
2055
|
+
if (Fe(u)) {
|
|
2073
2056
|
do
|
|
2074
2057
|
u = e.input.charCodeAt(++e.position);
|
|
2075
|
-
while (
|
|
2058
|
+
while (Fe(u));
|
|
2076
2059
|
if (u === 35)
|
|
2077
2060
|
do
|
|
2078
2061
|
u = e.input.charCodeAt(++e.position);
|
|
2079
2062
|
while (!we(u) && u !== 0);
|
|
2080
2063
|
}
|
|
2081
2064
|
for (; u !== 0; ) {
|
|
2082
|
-
for (
|
|
2065
|
+
for (jt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!i || e.lineIndent < s) && u === 32; )
|
|
2083
2066
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
2084
2067
|
if (!i && e.lineIndent > s && (s = e.lineIndent), we(u)) {
|
|
2085
2068
|
l++;
|
|
@@ -2091,13 +2074,13 @@ function Qa(e, n) {
|
|
|
2091
2074
|
`);
|
|
2092
2075
|
break;
|
|
2093
2076
|
}
|
|
2094
|
-
for (r ?
|
|
2077
|
+
for (r ? Fe(u) ? (c = !0, e.result += se.repeat(`
|
|
2095
2078
|
`, a ? 1 + l : l)) : c ? (c = !1, e.result += se.repeat(`
|
|
2096
2079
|
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += se.repeat(`
|
|
2097
2080
|
`, l) : e.result += se.repeat(`
|
|
2098
2081
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
2099
2082
|
u = e.input.charCodeAt(++e.position);
|
|
2100
|
-
|
|
2083
|
+
je(e, t, e.position, !1);
|
|
2101
2084
|
}
|
|
2102
2085
|
return !0;
|
|
2103
2086
|
}
|
|
@@ -2105,102 +2088,102 @@ function Xt(e, n) {
|
|
|
2105
2088
|
var t, r = e.tag, o = e.anchor, a = [], i, s = !1, l;
|
|
2106
2089
|
if (e.firstTabInLine !== -1)
|
|
2107
2090
|
return !1;
|
|
2108
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2091
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(l !== 45 || (i = e.input.charCodeAt(e.position + 1), !he(i)))); ) {
|
|
2109
2092
|
if (s = !0, e.position++, ae(e, !0, -1) && e.lineIndent <= n) {
|
|
2110
2093
|
a.push(null), l = e.input.charCodeAt(e.position);
|
|
2111
2094
|
continue;
|
|
2112
2095
|
}
|
|
2113
2096
|
if (t = e.line, Re(e, n, Gn, !1, !0), a.push(e.result), ae(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && l !== 0)
|
|
2114
|
-
|
|
2097
|
+
M(e, "bad indentation of a sequence entry");
|
|
2115
2098
|
else if (e.lineIndent < n)
|
|
2116
2099
|
break;
|
|
2117
2100
|
}
|
|
2118
2101
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = a, !0) : !1;
|
|
2119
2102
|
}
|
|
2120
|
-
function
|
|
2121
|
-
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, v = null, p = !1,
|
|
2103
|
+
function Wa(e, n, t) {
|
|
2104
|
+
var r, o, a, i, s, l, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, I = null, v = null, p = !1, x = !1, b;
|
|
2122
2105
|
if (e.firstTabInLine !== -1)
|
|
2123
2106
|
return !1;
|
|
2124
2107
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
2125
|
-
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2126
|
-
b === 63 ? (p && (Ue(e, u, g, f, I, null, i, s, l), f = I = v = null),
|
|
2108
|
+
if (!p && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (b === 63 || b === 58) && he(r))
|
|
2109
|
+
b === 63 ? (p && (Ue(e, u, g, f, I, null, i, s, l), f = I = v = null), x = !0, p = !0, o = !0) : p ? (p = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
2127
2110
|
else {
|
|
2128
2111
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Dn, !1, !0))
|
|
2129
2112
|
break;
|
|
2130
2113
|
if (e.line === a) {
|
|
2131
|
-
for (b = e.input.charCodeAt(e.position);
|
|
2114
|
+
for (b = e.input.charCodeAt(e.position); Fe(b); )
|
|
2132
2115
|
b = e.input.charCodeAt(++e.position);
|
|
2133
2116
|
if (b === 58)
|
|
2134
|
-
b = e.input.charCodeAt(++e.position), he(b) ||
|
|
2135
|
-
else if (
|
|
2136
|
-
|
|
2117
|
+
b = e.input.charCodeAt(++e.position), he(b) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ue(e, u, g, f, I, null, i, s, l), f = I = v = null), x = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
2118
|
+
else if (x)
|
|
2119
|
+
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2137
2120
|
else
|
|
2138
2121
|
return e.tag = c, e.anchor = d, !0;
|
|
2139
|
-
} else if (
|
|
2140
|
-
|
|
2122
|
+
} else if (x)
|
|
2123
|
+
M(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2141
2124
|
else
|
|
2142
2125
|
return e.tag = c, e.anchor = d, !0;
|
|
2143
2126
|
}
|
|
2144
2127
|
if ((e.line === a || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Re(e, n, at, !0, o) && (p ? I = e.result : v = e.result), p || (Ue(e, u, g, f, I, v, i, s, l), f = I = v = null), ae(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > n) && b !== 0)
|
|
2145
|
-
|
|
2128
|
+
M(e, "bad indentation of a mapping entry");
|
|
2146
2129
|
else if (e.lineIndent < n)
|
|
2147
2130
|
break;
|
|
2148
2131
|
}
|
|
2149
|
-
return p && Ue(e, u, g, f, I, null, i, s, l),
|
|
2132
|
+
return p && Ue(e, u, g, f, I, null, i, s, l), x && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), x;
|
|
2150
2133
|
}
|
|
2151
|
-
function
|
|
2134
|
+
function Za(e) {
|
|
2152
2135
|
var n, t = !1, r = !1, o, a, i;
|
|
2153
2136
|
if (i = e.input.charCodeAt(e.position), i !== 33)
|
|
2154
2137
|
return !1;
|
|
2155
|
-
if (e.tag !== null &&
|
|
2138
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, o = "!!", i = e.input.charCodeAt(++e.position)) : o = "!", n = e.position, t) {
|
|
2156
2139
|
do
|
|
2157
2140
|
i = e.input.charCodeAt(++e.position);
|
|
2158
2141
|
while (i !== 0 && i !== 62);
|
|
2159
|
-
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) :
|
|
2142
|
+
e.position < e.length ? (a = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2160
2143
|
} else {
|
|
2161
2144
|
for (; i !== 0 && !he(i); )
|
|
2162
|
-
i === 33 && (r ?
|
|
2163
|
-
a = e.input.slice(n, e.position),
|
|
2145
|
+
i === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(n - 1, e.position + 1), zn.test(o) || M(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
|
|
2146
|
+
a = e.input.slice(n, e.position), La.test(a) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2164
2147
|
}
|
|
2165
|
-
a && !Hn.test(a) &&
|
|
2148
|
+
a && !Hn.test(a) && M(e, "tag name cannot contain such characters: " + a);
|
|
2166
2149
|
try {
|
|
2167
2150
|
a = decodeURIComponent(a);
|
|
2168
2151
|
} catch {
|
|
2169
|
-
|
|
2152
|
+
M(e, "tag name is malformed: " + a);
|
|
2170
2153
|
}
|
|
2171
|
-
return t ? e.tag = a :
|
|
2154
|
+
return t ? e.tag = a : Me.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : M(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2172
2155
|
}
|
|
2173
|
-
function
|
|
2156
|
+
function Qa(e) {
|
|
2174
2157
|
var n, t;
|
|
2175
2158
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2176
2159
|
return !1;
|
|
2177
|
-
for (e.anchor !== null &&
|
|
2160
|
+
for (e.anchor !== null && M(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !he(t) && !qe(t); )
|
|
2178
2161
|
t = e.input.charCodeAt(++e.position);
|
|
2179
|
-
return e.position === n &&
|
|
2162
|
+
return e.position === n && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2180
2163
|
}
|
|
2181
|
-
function
|
|
2164
|
+
function Xa(e) {
|
|
2182
2165
|
var n, t, r;
|
|
2183
2166
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2184
2167
|
return !1;
|
|
2185
2168
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !he(r) && !qe(r); )
|
|
2186
2169
|
r = e.input.charCodeAt(++e.position);
|
|
2187
|
-
return e.position === n &&
|
|
2170
|
+
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Me.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ae(e, !0, -1), !0;
|
|
2188
2171
|
}
|
|
2189
2172
|
function Re(e, n, t, r, o) {
|
|
2190
2173
|
var a, i, s, l = 1, c = !1, d = !1, u, g, f, I, v, p;
|
|
2191
2174
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = i = s = at === t || Gn === t, r && ae(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2192
|
-
for (;
|
|
2175
|
+
for (; Za(e) || Qa(e); )
|
|
2193
2176
|
ae(e, !0, -1) ? (c = !0, s = a, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2194
|
-
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Xt(e, p) ||
|
|
2177
|
+
if (s && (s = c || o), (l === 1 || at === t) && (ot === t || Dn === t ? v = n : v = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Xt(e, p) || Wa(e, p, v)) || Ja(e, v) ? d = !0 : (i && Ya(e, v) || za(e, v) || Ha(e, v) ? d = !0 : Xa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Ga(e, v, ot === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Xt(e, p))), e.tag === null)
|
|
2195
2178
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2196
2179
|
else if (e.tag === "?") {
|
|
2197
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2180
|
+
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, g = e.implicitTypes.length; u < g; u += 1)
|
|
2198
2181
|
if (I = e.implicitTypes[u], I.resolve(e.result)) {
|
|
2199
2182
|
e.result = I.construct(e.result), e.tag = I.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2200
2183
|
break;
|
|
2201
2184
|
}
|
|
2202
2185
|
} else if (e.tag !== "!") {
|
|
2203
|
-
if (
|
|
2186
|
+
if (Me.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2204
2187
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2205
2188
|
else
|
|
2206
2189
|
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
@@ -2208,17 +2191,17 @@ function Re(e, n, t, r, o) {
|
|
|
2208
2191
|
I = f[u];
|
|
2209
2192
|
break;
|
|
2210
2193
|
}
|
|
2211
|
-
I ||
|
|
2194
|
+
I || M(e, "unknown tag !<" + e.tag + ">"), e.result !== null && I.kind !== e.kind && M(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + I.kind + '", not "' + e.kind + '"'), I.resolve(e.result, e.tag) ? (e.result = I.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : M(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2212
2195
|
}
|
|
2213
2196
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2214
2197
|
}
|
|
2215
|
-
function
|
|
2198
|
+
function ei(e) {
|
|
2216
2199
|
var n = e.position, t, r, o, a = !1, i;
|
|
2217
2200
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (ae(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
|
|
2218
2201
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !he(i); )
|
|
2219
2202
|
i = e.input.charCodeAt(++e.position);
|
|
2220
|
-
for (r = e.input.slice(t, e.position), o = [], r.length < 1 &&
|
|
2221
|
-
for (;
|
|
2203
|
+
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2204
|
+
for (; Fe(i); )
|
|
2222
2205
|
i = e.input.charCodeAt(++e.position);
|
|
2223
2206
|
if (i === 35) {
|
|
2224
2207
|
do
|
|
@@ -2232,28 +2215,28 @@ function ri(e) {
|
|
|
2232
2215
|
i = e.input.charCodeAt(++e.position);
|
|
2233
2216
|
o.push(e.input.slice(t, e.position));
|
|
2234
2217
|
}
|
|
2235
|
-
i !== 0 &&
|
|
2218
|
+
i !== 0 && jt(e), Me.call(Zt, r) ? Zt[r](e, r, o) : it(e, 'unknown document directive "' + r + '"');
|
|
2236
2219
|
}
|
|
2237
|
-
if (ae(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, ae(e, !0, -1)) : a &&
|
|
2220
|
+
if (ae(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, ae(e, !0, -1)) : a && M(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, at, !1, !0), ae(e, !0, -1), e.checkLineBreaks && Pa.test(e.input.slice(n, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2238
2221
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ae(e, !0, -1));
|
|
2239
2222
|
return;
|
|
2240
2223
|
}
|
|
2241
2224
|
if (e.position < e.length - 1)
|
|
2242
|
-
|
|
2225
|
+
M(e, "end of the stream or a document separator is expected");
|
|
2243
2226
|
else
|
|
2244
2227
|
return;
|
|
2245
2228
|
}
|
|
2246
2229
|
function Zn(e, n) {
|
|
2247
2230
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2248
2231
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2249
|
-
var t = new
|
|
2250
|
-
for (r !== -1 && (t.position = r,
|
|
2232
|
+
var t = new Da(e, n), r = e.indexOf("\0");
|
|
2233
|
+
for (r !== -1 && (t.position = r, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2251
2234
|
t.lineIndent += 1, t.position += 1;
|
|
2252
2235
|
for (; t.position < t.length - 1; )
|
|
2253
|
-
|
|
2236
|
+
ei(t);
|
|
2254
2237
|
return t.documents;
|
|
2255
2238
|
}
|
|
2256
|
-
function
|
|
2239
|
+
function ti(e, n, t) {
|
|
2257
2240
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2258
2241
|
var r = Zn(e, t);
|
|
2259
2242
|
if (typeof n != "function")
|
|
@@ -2261,7 +2244,7 @@ function oi(e, n, t) {
|
|
|
2261
2244
|
for (var o = 0, a = r.length; o < a; o += 1)
|
|
2262
2245
|
n(r[o]);
|
|
2263
2246
|
}
|
|
2264
|
-
function
|
|
2247
|
+
function ni(e, n) {
|
|
2265
2248
|
var t = Zn(e, n);
|
|
2266
2249
|
if (t.length !== 0) {
|
|
2267
2250
|
if (t.length === 1)
|
|
@@ -2269,10 +2252,10 @@ function ai(e, n) {
|
|
|
2269
2252
|
throw new me("expected a single document in the stream, but found more");
|
|
2270
2253
|
}
|
|
2271
2254
|
}
|
|
2272
|
-
var
|
|
2273
|
-
loadAll:
|
|
2274
|
-
load:
|
|
2275
|
-
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty, Et = 65279,
|
|
2255
|
+
var ri = ti, oi = ni, Qn = {
|
|
2256
|
+
loadAll: ri,
|
|
2257
|
+
load: oi
|
|
2258
|
+
}, Xn = Object.prototype.toString, er = Object.prototype.hasOwnProperty, Et = 65279, ai = 9, Ye = 10, ii = 13, si = 32, li = 33, ui = 34, bt = 35, ci = 37, di = 38, pi = 39, fi = 42, tr = 44, mi = 45, st = 58, gi = 61, yi = 62, hi = 63, vi = 64, nr = 91, rr = 93, bi = 96, or = 123, Ci = 124, ar = 125, fe = {};
|
|
2276
2259
|
fe[0] = "\\0";
|
|
2277
2260
|
fe[7] = "\\a";
|
|
2278
2261
|
fe[8] = "\\b";
|
|
@@ -2288,7 +2271,7 @@ fe[133] = "\\N";
|
|
|
2288
2271
|
fe[160] = "\\_";
|
|
2289
2272
|
fe[8232] = "\\L";
|
|
2290
2273
|
fe[8233] = "\\P";
|
|
2291
|
-
var
|
|
2274
|
+
var ki = [
|
|
2292
2275
|
"y",
|
|
2293
2276
|
"Y",
|
|
2294
2277
|
"yes",
|
|
@@ -2305,8 +2288,8 @@ var Ii = [
|
|
|
2305
2288
|
"off",
|
|
2306
2289
|
"Off",
|
|
2307
2290
|
"OFF"
|
|
2308
|
-
],
|
|
2309
|
-
function
|
|
2291
|
+
], _i = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2292
|
+
function wi(e, n) {
|
|
2310
2293
|
var t, r, o, a, i, s, l;
|
|
2311
2294
|
if (n === null)
|
|
2312
2295
|
return {};
|
|
@@ -2314,7 +2297,7 @@ function Si(e, n) {
|
|
|
2314
2297
|
i = r[o], s = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), l = e.compiledTypeMap.fallback[i], l && er.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[i] = s;
|
|
2315
2298
|
return t;
|
|
2316
2299
|
}
|
|
2317
|
-
function
|
|
2300
|
+
function Ii(e) {
|
|
2318
2301
|
var n, t, r;
|
|
2319
2302
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2320
2303
|
t = "x", r = 2;
|
|
@@ -2326,9 +2309,9 @@ function xi(e) {
|
|
|
2326
2309
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2327
2310
|
return "\\" + t + se.repeat("0", r - n.length) + n;
|
|
2328
2311
|
}
|
|
2329
|
-
var
|
|
2330
|
-
function
|
|
2331
|
-
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2312
|
+
var Ai = 1, We = 2;
|
|
2313
|
+
function xi(e) {
|
|
2314
|
+
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wi(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 === '"' ? We : Ai, 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;
|
|
2332
2315
|
}
|
|
2333
2316
|
function en(e, n) {
|
|
2334
2317
|
for (var t = se.repeat(" ", n), r = 0, o = -1, a = "", i, s = e.length; r < s; )
|
|
@@ -2341,7 +2324,7 @@ function Ct(e, n) {
|
|
|
2341
2324
|
return `
|
|
2342
2325
|
` + se.repeat(" ", e.indent * n);
|
|
2343
2326
|
}
|
|
2344
|
-
function
|
|
2327
|
+
function Si(e, n) {
|
|
2345
2328
|
var t, r, o;
|
|
2346
2329
|
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2347
2330
|
if (o = e.implicitTypes[t], o.resolve(n))
|
|
@@ -2349,13 +2332,13 @@ function Mi(e, n) {
|
|
|
2349
2332
|
return !1;
|
|
2350
2333
|
}
|
|
2351
2334
|
function lt(e) {
|
|
2352
|
-
return e ===
|
|
2335
|
+
return e === si || e === ai;
|
|
2353
2336
|
}
|
|
2354
2337
|
function Ze(e) {
|
|
2355
2338
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Et || 65536 <= e && e <= 1114111;
|
|
2356
2339
|
}
|
|
2357
2340
|
function tn(e) {
|
|
2358
|
-
return Ze(e) && e !== Et && e !==
|
|
2341
|
+
return Ze(e) && e !== Et && e !== ii && e !== Ye;
|
|
2359
2342
|
}
|
|
2360
2343
|
function nn(e, n, t) {
|
|
2361
2344
|
var r = tn(e), o = r && !lt(e);
|
|
@@ -2367,10 +2350,10 @@ function nn(e, n, t) {
|
|
|
2367
2350
|
) : r && e !== tr && e !== nr && e !== rr && e !== or && e !== ar) && e !== bt && !(n === st && !o) || tn(n) && !lt(n) && e === bt || n === st && o
|
|
2368
2351
|
);
|
|
2369
2352
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return Ze(e) && e !== Et && !lt(e) && e !==
|
|
2353
|
+
function Ti(e) {
|
|
2354
|
+
return Ze(e) && e !== Et && !lt(e) && e !== mi && e !== hi && e !== st && e !== tr && e !== nr && e !== rr && e !== or && e !== ar && e !== bt && e !== di && e !== fi && e !== li && e !== Ci && e !== gi && e !== yi && e !== pi && e !== ui && e !== ci && e !== vi && e !== bi;
|
|
2372
2355
|
}
|
|
2373
|
-
function
|
|
2356
|
+
function $i(e) {
|
|
2374
2357
|
return !lt(e) && e !== st;
|
|
2375
2358
|
}
|
|
2376
2359
|
function He(e, n) {
|
|
@@ -2382,8 +2365,8 @@ function ir(e) {
|
|
|
2382
2365
|
return n.test(e);
|
|
2383
2366
|
}
|
|
2384
2367
|
var sr = 1, kt = 2, lr = 3, ur = 4, Le = 5;
|
|
2385
|
-
function
|
|
2386
|
-
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1, v =
|
|
2368
|
+
function ji(e, n, t, r, o, a, i, s) {
|
|
2369
|
+
var l, c = 0, d = null, u = !1, g = !1, f = r !== -1, I = -1, v = Ti(He(e, 0)) && $i(He(e, e.length - 1));
|
|
2387
2370
|
if (n || i)
|
|
2388
2371
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2389
2372
|
if (c = He(e, l), !Ze(c))
|
|
@@ -2403,17 +2386,17 @@ function Oi(e, n, t, r, o, a, i, s) {
|
|
|
2403
2386
|
}
|
|
2404
2387
|
return !u && !g ? v && !i && !o(e) ? sr : a === We ? Le : kt : t > 9 && ir(e) ? Le : i ? a === We ? Le : kt : g ? ur : lr;
|
|
2405
2388
|
}
|
|
2406
|
-
function
|
|
2389
|
+
function Mi(e, n, t, r, o) {
|
|
2407
2390
|
e.dump = function() {
|
|
2408
2391
|
if (n.length === 0)
|
|
2409
2392
|
return e.quotingType === We ? '""' : "''";
|
|
2410
|
-
if (!e.noCompatMode && (
|
|
2393
|
+
if (!e.noCompatMode && (ki.indexOf(n) !== -1 || _i.test(n)))
|
|
2411
2394
|
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2412
2395
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2413
2396
|
function l(c) {
|
|
2414
|
-
return
|
|
2397
|
+
return Si(e, c);
|
|
2415
2398
|
}
|
|
2416
|
-
switch (
|
|
2399
|
+
switch (ji(
|
|
2417
2400
|
n,
|
|
2418
2401
|
s,
|
|
2419
2402
|
e.indent,
|
|
@@ -2430,9 +2413,9 @@ function Ni(e, n, t, r, o) {
|
|
|
2430
2413
|
case lr:
|
|
2431
2414
|
return "|" + rn(n, e.indent) + on(en(n, a));
|
|
2432
2415
|
case ur:
|
|
2433
|
-
return ">" + rn(n, e.indent) + on(en(
|
|
2416
|
+
return ">" + rn(n, e.indent) + on(en(Ei(n, i), a));
|
|
2434
2417
|
case Le:
|
|
2435
|
-
return '"' +
|
|
2418
|
+
return '"' + Oi(n) + '"';
|
|
2436
2419
|
default:
|
|
2437
2420
|
throw new me("impossible error: invalid scalar style");
|
|
2438
2421
|
}
|
|
@@ -2450,7 +2433,7 @@ function on(e) {
|
|
|
2450
2433
|
return e[e.length - 1] === `
|
|
2451
2434
|
` ? e.slice(0, -1) : e;
|
|
2452
2435
|
}
|
|
2453
|
-
function
|
|
2436
|
+
function Ei(e, n) {
|
|
2454
2437
|
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2455
2438
|
var c = e.indexOf(`
|
|
2456
2439
|
`);
|
|
@@ -2473,30 +2456,30 @@ function an(e, n) {
|
|
|
2473
2456
|
`, e.length - o > n && i > o ? l += e.slice(o, i) + `
|
|
2474
2457
|
` + e.slice(i + 1) : l += e.slice(o), l.slice(1);
|
|
2475
2458
|
}
|
|
2476
|
-
function
|
|
2459
|
+
function Oi(e) {
|
|
2477
2460
|
for (var n = "", t = 0, r, o = 0; o < e.length; t >= 65536 ? o += 2 : o++)
|
|
2478
|
-
t = He(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r ||
|
|
2461
|
+
t = He(e, o), r = fe[t], !r && Ze(t) ? (n += e[o], t >= 65536 && (n += e[o + 1])) : n += r || Ii(t);
|
|
2479
2462
|
return n;
|
|
2480
2463
|
}
|
|
2481
|
-
function
|
|
2464
|
+
function Fi(e, n, t) {
|
|
2482
2465
|
var r = "", o = e.tag, a, i, s;
|
|
2483
2466
|
for (a = 0, i = t.length; a < i; a += 1)
|
|
2484
|
-
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (
|
|
2467
|
+
s = t[a], e.replacer && (s = e.replacer.call(t, String(a), s)), (xe(e, n, s, !1, !1) || typeof s > "u" && xe(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2485
2468
|
e.tag = o, e.dump = "[" + r + "]";
|
|
2486
2469
|
}
|
|
2487
2470
|
function sn(e, n, t, r) {
|
|
2488
2471
|
var o = "", a = e.tag, i, s, l;
|
|
2489
2472
|
for (i = 0, s = t.length; i < s; i += 1)
|
|
2490
|
-
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (
|
|
2473
|
+
l = t[i], e.replacer && (l = e.replacer.call(t, String(i), l)), (xe(e, n + 1, l, !0, !0, !1, !0) || typeof l > "u" && xe(e, n + 1, null, !0, !0, !1, !0)) && ((!r || o !== "") && (o += Ct(e, n)), e.dump && Ye === e.dump.charCodeAt(0) ? o += "-" : o += "- ", o += e.dump);
|
|
2491
2474
|
e.tag = a, e.dump = o || "[]";
|
|
2492
2475
|
}
|
|
2493
|
-
function
|
|
2476
|
+
function Ni(e, n, t) {
|
|
2494
2477
|
var r = "", o = e.tag, a = Object.keys(t), i, s, l, c, d;
|
|
2495
2478
|
for (i = 0, s = a.length; i < s; i += 1)
|
|
2496
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)),
|
|
2479
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = a[i], c = t[l], e.replacer && (c = e.replacer.call(t, l, c)), xe(e, n, l, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), xe(e, n, c, !1, !1) && (d += e.dump, r += d));
|
|
2497
2480
|
e.tag = o, e.dump = "{" + r + "}";
|
|
2498
2481
|
}
|
|
2499
|
-
function
|
|
2482
|
+
function Ki(e, n, t, r) {
|
|
2500
2483
|
var o = "", a = e.tag, i = Object.keys(t), s, l, c, d, u, g;
|
|
2501
2484
|
if (e.sortKeys === !0)
|
|
2502
2485
|
i.sort();
|
|
@@ -2505,7 +2488,7 @@ function Li(e, n, t, r) {
|
|
|
2505
2488
|
else if (e.sortKeys)
|
|
2506
2489
|
throw new me("sortKeys must be a boolean or a function");
|
|
2507
2490
|
for (s = 0, l = i.length; s < l; s += 1)
|
|
2508
|
-
g = "", (!r || o !== "") && (g += Ct(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)),
|
|
2491
|
+
g = "", (!r || o !== "") && (g += Ct(e, n)), c = i[s], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), xe(e, n + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ye === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += Ct(e, n)), xe(e, n + 1, d, !0, u) && (e.dump && Ye === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, o += g));
|
|
2509
2492
|
e.tag = a, e.dump = o || "{}";
|
|
2510
2493
|
}
|
|
2511
2494
|
function ln(e, n, t) {
|
|
@@ -2525,7 +2508,7 @@ function ln(e, n, t) {
|
|
|
2525
2508
|
}
|
|
2526
2509
|
return !1;
|
|
2527
2510
|
}
|
|
2528
|
-
function
|
|
2511
|
+
function xe(e, n, t, r, o, a, i) {
|
|
2529
2512
|
e.tag = null, e.dump = t, ln(e, t, !1) || ln(e, t, !0);
|
|
2530
2513
|
var s = Xn.call(e.dump), l = r, c;
|
|
2531
2514
|
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
@@ -2534,11 +2517,11 @@ function Se(e, n, t, r, o, a, i) {
|
|
|
2534
2517
|
e.dump = "*ref_" + u;
|
|
2535
2518
|
else {
|
|
2536
2519
|
if (d && g && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2537
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2520
|
+
r && Object.keys(e.dump).length !== 0 ? (Ki(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (Ni(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2538
2521
|
else if (s === "[object Array]")
|
|
2539
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? sn(e, n - 1, e.dump, o) : sn(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (
|
|
2522
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? sn(e, n - 1, e.dump, o) : sn(e, n, e.dump, o), g && (e.dump = "&ref_" + u + e.dump)) : (Fi(e, n, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2540
2523
|
else if (s === "[object String]")
|
|
2541
|
-
e.tag !== "?" &&
|
|
2524
|
+
e.tag !== "?" && Mi(e, e.dump, n, a, l);
|
|
2542
2525
|
else {
|
|
2543
2526
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2544
2527
|
return !1;
|
|
@@ -2550,7 +2533,7 @@ function Se(e, n, t, r, o, a, i) {
|
|
|
2550
2533
|
}
|
|
2551
2534
|
return !0;
|
|
2552
2535
|
}
|
|
2553
|
-
function
|
|
2536
|
+
function Bi(e, n) {
|
|
2554
2537
|
var t = [], r = [], o, a;
|
|
2555
2538
|
for (_t(e, t, r), o = 0, a = r.length; o < a; o += 1)
|
|
2556
2539
|
n.duplicates.push(t[r[o]]);
|
|
@@ -2568,65 +2551,65 @@ function _t(e, n, t) {
|
|
|
2568
2551
|
for (r = Object.keys(e), o = 0, a = r.length; o < a; o += 1)
|
|
2569
2552
|
_t(e[r[o]], n, t);
|
|
2570
2553
|
}
|
|
2571
|
-
function
|
|
2554
|
+
function Pi(e, n) {
|
|
2572
2555
|
n = n || {};
|
|
2573
|
-
var t = new
|
|
2574
|
-
t.noRefs ||
|
|
2556
|
+
var t = new xi(n);
|
|
2557
|
+
t.noRefs || Bi(e, t);
|
|
2575
2558
|
var r = e;
|
|
2576
|
-
return t.replacer && (r = t.replacer.call({ "": r }, "", r)),
|
|
2559
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), xe(t, 0, r, !0, !0) ? t.dump + `
|
|
2577
2560
|
` : "";
|
|
2578
2561
|
}
|
|
2579
|
-
var
|
|
2580
|
-
dump:
|
|
2562
|
+
var Li = Pi, qi = {
|
|
2563
|
+
dump: Li
|
|
2581
2564
|
};
|
|
2582
2565
|
function Ot(e, n) {
|
|
2583
2566
|
return function() {
|
|
2584
2567
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2585
2568
|
};
|
|
2586
2569
|
}
|
|
2587
|
-
var
|
|
2570
|
+
var Ui = de, Vi = An, Ri = $n, Di = Fn, Gi = Nn, zi = $t, Hi = Qn.load, Ji = Qn.loadAll, Yi = qi.dump, Wi = me, Zi = {
|
|
2588
2571
|
binary: qn,
|
|
2589
2572
|
float: On,
|
|
2590
2573
|
map: Tn,
|
|
2591
|
-
null:
|
|
2574
|
+
null: jn,
|
|
2592
2575
|
pairs: Vn,
|
|
2593
2576
|
set: Rn,
|
|
2594
2577
|
timestamp: Pn,
|
|
2595
|
-
bool:
|
|
2578
|
+
bool: Mn,
|
|
2596
2579
|
int: En,
|
|
2597
2580
|
merge: Ln,
|
|
2598
2581
|
omap: Un,
|
|
2599
|
-
seq:
|
|
2600
|
-
str:
|
|
2601
|
-
},
|
|
2602
|
-
Type:
|
|
2603
|
-
Schema:
|
|
2604
|
-
FAILSAFE_SCHEMA:
|
|
2605
|
-
JSON_SCHEMA:
|
|
2606
|
-
CORE_SCHEMA:
|
|
2607
|
-
DEFAULT_SCHEMA:
|
|
2608
|
-
load:
|
|
2609
|
-
loadAll:
|
|
2610
|
-
dump:
|
|
2611
|
-
YAMLException:
|
|
2612
|
-
types:
|
|
2613
|
-
safeLoad:
|
|
2614
|
-
safeLoadAll:
|
|
2615
|
-
safeDump:
|
|
2582
|
+
seq: Sn,
|
|
2583
|
+
str: xn
|
|
2584
|
+
}, Qi = Ot("safeLoad", "load"), Xi = Ot("safeLoadAll", "loadAll"), es = Ot("safeDump", "dump"), ts = {
|
|
2585
|
+
Type: Ui,
|
|
2586
|
+
Schema: Vi,
|
|
2587
|
+
FAILSAFE_SCHEMA: Ri,
|
|
2588
|
+
JSON_SCHEMA: Di,
|
|
2589
|
+
CORE_SCHEMA: Gi,
|
|
2590
|
+
DEFAULT_SCHEMA: zi,
|
|
2591
|
+
load: Hi,
|
|
2592
|
+
loadAll: Ji,
|
|
2593
|
+
dump: Yi,
|
|
2594
|
+
YAMLException: Wi,
|
|
2595
|
+
types: Zi,
|
|
2596
|
+
safeLoad: Qi,
|
|
2597
|
+
safeLoadAll: Xi,
|
|
2598
|
+
safeDump: es
|
|
2616
2599
|
};
|
|
2617
|
-
const
|
|
2600
|
+
const ns = {
|
|
2618
2601
|
key: 0,
|
|
2619
2602
|
class: "config-card-display-form"
|
|
2620
|
-
},
|
|
2603
|
+
}, rs = ["data-testid"], os = {
|
|
2621
2604
|
key: 0,
|
|
2622
2605
|
class: "config-card-prop-section-title"
|
|
2623
|
-
},
|
|
2606
|
+
}, as = {
|
|
2624
2607
|
key: 1,
|
|
2625
2608
|
class: "config-card-display-json"
|
|
2626
|
-
},
|
|
2609
|
+
}, is = {
|
|
2627
2610
|
key: 2,
|
|
2628
2611
|
class: "config-card-display-yaml"
|
|
2629
|
-
},
|
|
2612
|
+
}, ss = /* @__PURE__ */ re({
|
|
2630
2613
|
__name: "ConfigCardDisplay",
|
|
2631
2614
|
props: {
|
|
2632
2615
|
propertyCollections: {
|
|
@@ -2653,19 +2636,19 @@ const as = {
|
|
|
2653
2636
|
},
|
|
2654
2637
|
setup(e) {
|
|
2655
2638
|
const n = e, t = ut(), { i18n: { t: r } } = ue.useI18n(), o = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), a = O(""), i = O("");
|
|
2656
|
-
return
|
|
2657
|
-
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value =
|
|
2639
|
+
return Se(() => n.format, (s) => {
|
|
2640
|
+
s === "json" ? a.value = JSON.stringify(n.record, null, 2) : s === "yaml" && (i.value = ts.dump(n.record));
|
|
2658
2641
|
}, { immediate: !0 }), (s, l) => {
|
|
2659
2642
|
const c = q("KCodeBlock");
|
|
2660
2643
|
return m(), $(ve, null, [
|
|
2661
|
-
e.format === "structured" ? (m(), $("div",
|
|
2644
|
+
e.format === "structured" ? (m(), $("div", ns, [
|
|
2662
2645
|
(m(!0), $(ve, null, ye(e.propListTypes, (d) => (m(), $("div", {
|
|
2663
2646
|
key: `config-card-details-${d}-props`,
|
|
2664
|
-
class:
|
|
2647
|
+
class: Ne(`config-card-details-${d}-props`),
|
|
2665
2648
|
"data-testid": `config-card-details-${d}-props`
|
|
2666
2649
|
}, [
|
|
2667
|
-
d !== "basic" ? (m(), $("div",
|
|
2668
|
-
(m(!0), $(ve, null, ye(e.propertyCollections[d], (u) => (m(), R(
|
|
2650
|
+
d !== "basic" ? (m(), $("div", os, F(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
2651
|
+
(m(!0), $(ve, null, ye(e.propertyCollections[d], (u) => (m(), R(St, {
|
|
2669
2652
|
key: u.key,
|
|
2670
2653
|
item: u
|
|
2671
2654
|
}, Te({
|
|
@@ -2688,18 +2671,18 @@ const as = {
|
|
|
2688
2671
|
key: "0"
|
|
2689
2672
|
} : void 0
|
|
2690
2673
|
]), 1032, ["item"]))), 128))
|
|
2691
|
-
], 10,
|
|
2674
|
+
], 10, rs))), 128))
|
|
2692
2675
|
])) : G("", !0),
|
|
2693
|
-
e.format === "json" ? (m(), $("div",
|
|
2694
|
-
|
|
2676
|
+
e.format === "json" ? (m(), $("div", as, [
|
|
2677
|
+
N(c, {
|
|
2695
2678
|
id: "config-card-codeblock",
|
|
2696
2679
|
code: a.value,
|
|
2697
2680
|
language: "json",
|
|
2698
2681
|
theme: "dark"
|
|
2699
2682
|
}, null, 8, ["code"])
|
|
2700
2683
|
])) : G("", !0),
|
|
2701
|
-
e.format === "yaml" ? (m(), $("div",
|
|
2702
|
-
|
|
2684
|
+
e.format === "yaml" ? (m(), $("div", is, [
|
|
2685
|
+
N(c, {
|
|
2703
2686
|
id: "config-card-codeblock",
|
|
2704
2687
|
code: i.value,
|
|
2705
2688
|
language: "yaml",
|
|
@@ -2709,18 +2692,18 @@ const as = {
|
|
|
2709
2692
|
], 64);
|
|
2710
2693
|
};
|
|
2711
2694
|
}
|
|
2712
|
-
}),
|
|
2695
|
+
}), ls = /* @__PURE__ */ ke(ss, [["__scopeId", "data-v-6c45e9e4"]]), un = "24px", us = (e, n) => {
|
|
2713
2696
|
const t = e.__vccOpts || e;
|
|
2714
2697
|
for (const [r, o] of n)
|
|
2715
2698
|
t[r] = o;
|
|
2716
2699
|
return t;
|
|
2717
|
-
},
|
|
2700
|
+
}, cs = (e) => (fn("data-v-dd88a2bb"), e = e(), mn(), e), ds = ["aria-hidden"], ps = {
|
|
2718
2701
|
key: 0,
|
|
2719
2702
|
"data-testid": "kui-icon-svg-title"
|
|
2720
|
-
},
|
|
2703
|
+
}, fs = /* @__PURE__ */ cs(() => /* @__PURE__ */ V("path", {
|
|
2721
2704
|
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",
|
|
2722
2705
|
fill: "currentColor"
|
|
2723
|
-
}, null, -1)),
|
|
2706
|
+
}, null, -1)), ms = /* @__PURE__ */ re({
|
|
2724
2707
|
__name: "BookIcon",
|
|
2725
2708
|
props: {
|
|
2726
2709
|
/** The accessibility text provided to screen readers */
|
|
@@ -2806,23 +2789,23 @@ const as = {
|
|
|
2806
2789
|
width: "100%",
|
|
2807
2790
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2808
2791
|
}, [
|
|
2809
|
-
e.title ? (m(), $("title",
|
|
2810
|
-
|
|
2811
|
-
], 8,
|
|
2792
|
+
e.title ? (m(), $("title", ps, F(e.title), 1)) : G("", !0),
|
|
2793
|
+
fs
|
|
2794
|
+
], 8, ds))
|
|
2812
2795
|
]),
|
|
2813
2796
|
_: 1
|
|
2814
2797
|
}, 8, ["aria-hidden", "style"]));
|
|
2815
2798
|
}
|
|
2816
|
-
}),
|
|
2799
|
+
}), gs = /* @__PURE__ */ us(ms, [["__scopeId", "data-v-dd88a2bb"]]), ys = { "data-testid": "config-card-title" }, hs = { class: "config-card-actions" }, vs = ["href"], bs = {
|
|
2817
2800
|
key: 2,
|
|
2818
2801
|
class: "config-card-details-section"
|
|
2819
|
-
},
|
|
2802
|
+
}, Cs = {
|
|
2820
2803
|
key: 3,
|
|
2821
2804
|
class: "config-card-details-section"
|
|
2822
|
-
},
|
|
2805
|
+
}, ks = ["data-testid"], _s = {
|
|
2823
2806
|
key: 0,
|
|
2824
2807
|
class: "config-card-prop-section-title"
|
|
2825
|
-
},
|
|
2808
|
+
}, ws = /* @__PURE__ */ re({
|
|
2826
2809
|
__name: "EntityBaseConfigCard",
|
|
2827
2810
|
props: {
|
|
2828
2811
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2949,21 +2932,21 @@ const as = {
|
|
|
2949
2932
|
// the last property displayed
|
|
2950
2933
|
section: be.Basic
|
|
2951
2934
|
}
|
|
2952
|
-
}, f = O(!1), I = O(!1), v = O(""), p = O(),
|
|
2935
|
+
}, f = O(!1), I = O(!1), v = O(""), p = O(), x = T(() => {
|
|
2953
2936
|
var w, K, B;
|
|
2954
2937
|
if (!p.value)
|
|
2955
2938
|
return [];
|
|
2956
|
-
const k = [],
|
|
2957
|
-
for (const
|
|
2958
|
-
const P = (K = (w = r.configSchema) == null ? void 0 : w[
|
|
2959
|
-
let Q =
|
|
2960
|
-
(J || J === 0) && (Q = J === -1 ?
|
|
2939
|
+
const k = [], S = Object.keys(p.value).length;
|
|
2940
|
+
for (const j in p.value) {
|
|
2941
|
+
const P = (K = (w = r.configSchema) == null ? void 0 : w[j]) == null ? void 0 : K.order, J = (B = g[j]) == null ? void 0 : B.order;
|
|
2942
|
+
let Q = S;
|
|
2943
|
+
(J || J === 0) && (Q = J === -1 ? S + 1 : J), P && (Q = P === -1 ? S + 1 : P), k.push([j, Q]);
|
|
2961
2944
|
}
|
|
2962
|
-
return k.sort(function(
|
|
2963
|
-
return
|
|
2964
|
-
}), k.map((
|
|
2945
|
+
return k.sort(function(j, P) {
|
|
2946
|
+
return j[1] - P[1];
|
|
2947
|
+
}), k.map((j) => {
|
|
2965
2948
|
var P, J;
|
|
2966
|
-
const Q =
|
|
2949
|
+
const Q = j[0], X = (P = p.value) == null ? void 0 : P[Q], ee = ((J = r.configSchema) == null ? void 0 : J[Q]) || {}, ie = g[Q];
|
|
2967
2950
|
return {
|
|
2968
2951
|
key: Q,
|
|
2969
2952
|
value: X,
|
|
@@ -2973,22 +2956,22 @@ const as = {
|
|
|
2973
2956
|
tooltip: ee.tooltip ?? ((ie == null ? void 0 : ie.tooltip) || void 0),
|
|
2974
2957
|
section: ee.section ?? ((ie == null ? void 0 : ie.section) || be.Advanced)
|
|
2975
2958
|
};
|
|
2976
|
-
}).filter((
|
|
2959
|
+
}).filter((j) => !j.hidden && j.key !== r.pluginConfigKey);
|
|
2977
2960
|
}), b = T(() => {
|
|
2978
2961
|
var w, K;
|
|
2979
2962
|
if (!p.value || !r.pluginConfigKey)
|
|
2980
2963
|
return [];
|
|
2981
|
-
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length,
|
|
2982
|
-
for (const
|
|
2983
|
-
const P = (K = (w = r.pluginConfigSchema) == null ? void 0 : w[
|
|
2964
|
+
const B = p.value[r.pluginConfigKey] || {}, k = Object.keys(B).length, S = [];
|
|
2965
|
+
for (const j in B) {
|
|
2966
|
+
const P = (K = (w = r.pluginConfigSchema) == null ? void 0 : w[j]) == null ? void 0 : K.order, J = B[j];
|
|
2984
2967
|
let Q = J != null && J !== "" ? k - 1 : k;
|
|
2985
|
-
P && (Q = P === -1 ? k + 1 : P),
|
|
2968
|
+
P && (Q = P === -1 ? k + 1 : P), S.push([j, Q]);
|
|
2986
2969
|
}
|
|
2987
|
-
return
|
|
2988
|
-
return
|
|
2989
|
-
}),
|
|
2970
|
+
return S.sort(function(j, P) {
|
|
2971
|
+
return j[1] - P[1];
|
|
2972
|
+
}), S.map((j) => {
|
|
2990
2973
|
var P;
|
|
2991
|
-
const J =
|
|
2974
|
+
const J = j[0], Q = B[J], X = ((P = r.pluginConfigSchema) == null ? void 0 : P[J]) || {};
|
|
2992
2975
|
return {
|
|
2993
2976
|
key: J,
|
|
2994
2977
|
value: Q,
|
|
@@ -2998,13 +2981,13 @@ const as = {
|
|
|
2998
2981
|
tooltip: X.tooltip ?? void 0,
|
|
2999
2982
|
section: be.Plugin
|
|
3000
2983
|
};
|
|
3001
|
-
}).filter((
|
|
2984
|
+
}).filter((j) => !j.hidden);
|
|
3002
2985
|
}), C = T(() => {
|
|
3003
2986
|
var w, K, B, k;
|
|
3004
2987
|
return {
|
|
3005
|
-
basic: (w =
|
|
3006
|
-
advanced: (K =
|
|
3007
|
-
plugin: (k = b.value) == null ? void 0 : k.concat((B =
|
|
2988
|
+
basic: (w = x.value) == null ? void 0 : w.filter((S) => S.section === be.Basic),
|
|
2989
|
+
advanced: (K = x.value) == null ? void 0 : K.filter((S) => S.section === be.Advanced),
|
|
2990
|
+
plugin: (k = b.value) == null ? void 0 : k.concat((B = x.value) == null ? void 0 : B.filter((S) => S.section === be.Plugin))
|
|
3008
2991
|
};
|
|
3009
2992
|
}), A = T(() => {
|
|
3010
2993
|
const w = [];
|
|
@@ -3016,7 +2999,7 @@ const as = {
|
|
|
3016
2999
|
}), z = (w) => {
|
|
3017
3000
|
p.value && w(JSON.stringify(p.value)) ? n("copy:success", p.value) : n("copy:error");
|
|
3018
3001
|
};
|
|
3019
|
-
return
|
|
3002
|
+
return Se(f, (w) => {
|
|
3020
3003
|
n("loading", w);
|
|
3021
3004
|
}, { immediate: !0 }), Qe(async () => {
|
|
3022
3005
|
I.value = !1, f.value = !0;
|
|
@@ -3039,10 +3022,10 @@ const as = {
|
|
|
3039
3022
|
f.value = !1;
|
|
3040
3023
|
}
|
|
3041
3024
|
}), (w, K) => {
|
|
3042
|
-
const B = q("KLabel"), k = q("KSelect"),
|
|
3025
|
+
const B = q("KLabel"), k = q("KSelect"), S = q("KButton"), j = q("KClipboardProvider"), P = q("KSkeleton"), J = q("KEmptyState"), Q = q("KCard");
|
|
3043
3026
|
return m(), R(Q, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
3044
3027
|
actions: h(() => [
|
|
3045
|
-
V("div",
|
|
3028
|
+
V("div", hs, [
|
|
3046
3029
|
W(w.$slots, "actions", {}, void 0, !0),
|
|
3047
3030
|
e.config.jsonYamlEnabled ? (m(), R(B, {
|
|
3048
3031
|
key: 0,
|
|
@@ -3050,7 +3033,7 @@ const as = {
|
|
|
3050
3033
|
"data-testid": "config-format-select-label"
|
|
3051
3034
|
}, {
|
|
3052
3035
|
default: h(() => [
|
|
3053
|
-
Z(
|
|
3036
|
+
Z(F(e.label), 1)
|
|
3054
3037
|
]),
|
|
3055
3038
|
_: 1
|
|
3056
3039
|
})) : G("", !0),
|
|
@@ -3061,7 +3044,7 @@ const as = {
|
|
|
3061
3044
|
items: c,
|
|
3062
3045
|
onChange: u
|
|
3063
3046
|
})) : G("", !0),
|
|
3064
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(
|
|
3047
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(S, {
|
|
3065
3048
|
key: 2,
|
|
3066
3049
|
appearance: "tertiary",
|
|
3067
3050
|
class: "book-icon",
|
|
@@ -3073,21 +3056,21 @@ const as = {
|
|
|
3073
3056
|
rel: "noopener",
|
|
3074
3057
|
target: "_blank"
|
|
3075
3058
|
}, [
|
|
3076
|
-
|
|
3077
|
-
], 8,
|
|
3059
|
+
N(y(gs), { size: y(wo) }, null, 8, ["size"])
|
|
3060
|
+
], 8, vs)
|
|
3078
3061
|
]),
|
|
3079
3062
|
_: 1
|
|
3080
3063
|
})) : G("", !0),
|
|
3081
|
-
e.config.jsonYamlEnabled ? G("", !0) : (m(), R(
|
|
3064
|
+
e.config.jsonYamlEnabled ? G("", !0) : (m(), R(j, { key: 3 }, {
|
|
3082
3065
|
default: h(({ copyToClipboard: X }) => [
|
|
3083
|
-
!f.value && !I.value ? (m(), R(
|
|
3066
|
+
!f.value && !I.value ? (m(), R(S, {
|
|
3084
3067
|
key: 0,
|
|
3085
3068
|
appearance: "tertiary",
|
|
3086
3069
|
"data-testid": "json-copy-button",
|
|
3087
3070
|
onClick: (ee) => z(X)
|
|
3088
3071
|
}, {
|
|
3089
3072
|
default: h(() => [
|
|
3090
|
-
Z(
|
|
3073
|
+
Z(F(y(a)("baseConfigCard.actions.copy")), 1)
|
|
3091
3074
|
]),
|
|
3092
3075
|
_: 2
|
|
3093
3076
|
}, 1032, ["onClick"])) : G("", !0)
|
|
@@ -3108,12 +3091,12 @@ const as = {
|
|
|
3108
3091
|
"is-error": ""
|
|
3109
3092
|
}, {
|
|
3110
3093
|
message: h(() => [
|
|
3111
|
-
V("h3", null,
|
|
3094
|
+
V("h3", null, F(v.value), 1)
|
|
3112
3095
|
]),
|
|
3113
3096
|
_: 1
|
|
3114
3097
|
})) : G("", !0),
|
|
3115
|
-
e.config.jsonYamlEnabled ? (m(), $("div",
|
|
3116
|
-
|
|
3098
|
+
e.config.jsonYamlEnabled ? (m(), $("div", bs, [
|
|
3099
|
+
N(ls, {
|
|
3117
3100
|
format: d.value,
|
|
3118
3101
|
"prop-list-types": A.value,
|
|
3119
3102
|
"property-collections": C.value,
|
|
@@ -3129,14 +3112,14 @@ const as = {
|
|
|
3129
3112
|
])
|
|
3130
3113
|
}))
|
|
3131
3114
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3132
|
-
])) : (m(), $("div",
|
|
3115
|
+
])) : (m(), $("div", Cs, [
|
|
3133
3116
|
(m(!0), $(ve, null, ye(A.value, (X) => (m(), $("div", {
|
|
3134
3117
|
key: `config-card-details-${X}-props`,
|
|
3135
|
-
class:
|
|
3118
|
+
class: Ne(`config-card-details-${X}-props`),
|
|
3136
3119
|
"data-testid": `config-card-details-${X}-props`
|
|
3137
3120
|
}, [
|
|
3138
|
-
X !== "basic" ? (m(), $("div",
|
|
3139
|
-
(m(!0), $(ve, null, ye(C.value[X], (ee) => (m(), R(
|
|
3121
|
+
X !== "basic" ? (m(), $("div", _s, F(X === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3122
|
+
(m(!0), $(ve, null, ye(C.value[X], (ee) => (m(), R(St, {
|
|
3140
3123
|
key: ee.key,
|
|
3141
3124
|
item: ee
|
|
3142
3125
|
}, Te({
|
|
@@ -3159,7 +3142,7 @@ const as = {
|
|
|
3159
3142
|
key: "0"
|
|
3160
3143
|
} : void 0
|
|
3161
3144
|
]), 1032, ["item"]))), 128))
|
|
3162
|
-
], 10,
|
|
3145
|
+
], 10, ks))), 128))
|
|
3163
3146
|
]))
|
|
3164
3147
|
]),
|
|
3165
3148
|
_: 2
|
|
@@ -3167,9 +3150,9 @@ const as = {
|
|
|
3167
3150
|
e.hideTitle ? void 0 : {
|
|
3168
3151
|
name: "title",
|
|
3169
3152
|
fn: h(() => [
|
|
3170
|
-
V("div",
|
|
3153
|
+
V("div", ys, [
|
|
3171
3154
|
W(w.$slots, "title", {}, () => [
|
|
3172
|
-
Z(
|
|
3155
|
+
Z(F(y(a)("baseConfigCard.title")), 1)
|
|
3173
3156
|
], !0)
|
|
3174
3157
|
])
|
|
3175
3158
|
]),
|
|
@@ -3178,10 +3161,10 @@ const as = {
|
|
|
3178
3161
|
]), 1024);
|
|
3179
3162
|
};
|
|
3180
3163
|
}
|
|
3181
|
-
}),
|
|
3164
|
+
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"], xs = {
|
|
3182
3165
|
class: "form-actions",
|
|
3183
3166
|
"data-testid": "form-actions"
|
|
3184
|
-
},
|
|
3167
|
+
}, Ss = /* @__PURE__ */ re({
|
|
3185
3168
|
__name: "EntityBaseForm",
|
|
3186
3169
|
props: {
|
|
3187
3170
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3234,11 +3217,11 @@ const as = {
|
|
|
3234
3217
|
const r = e, o = wt(), { i18n: { t: a } } = ue.useI18n(), { getMessageFromError: i } = ue.useErrors(), { axiosInstance: s } = ue.useAxios({
|
|
3235
3218
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3236
3219
|
}), l = O(!1), c = O(!1), d = O(""), u = T(() => r.canSubmit === !1 || r.isReadonly), g = T(() => {
|
|
3237
|
-
var p,
|
|
3220
|
+
var p, x;
|
|
3238
3221
|
if (!r.editId)
|
|
3239
3222
|
return "";
|
|
3240
3223
|
let b = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3241
|
-
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (
|
|
3224
|
+
return r.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((p = r.config) == null ? void 0 : p.controlPlaneId) || "") : r.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (x = r.config) != null && x.workspace ? `/${r.config.workspace}` : "")), b = b.replace(/{id}/gi, r.editId), b;
|
|
3242
3225
|
}), f = () => {
|
|
3243
3226
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : I();
|
|
3244
3227
|
}, I = () => {
|
|
@@ -3246,7 +3229,7 @@ const as = {
|
|
|
3246
3229
|
}, v = () => {
|
|
3247
3230
|
u.value || n("submit");
|
|
3248
3231
|
};
|
|
3249
|
-
return
|
|
3232
|
+
return Se(() => l.value, (p) => {
|
|
3250
3233
|
n("loading", p);
|
|
3251
3234
|
}, { immediate: !0 }), Qe(async () => {
|
|
3252
3235
|
if (r.editId)
|
|
@@ -3255,12 +3238,12 @@ const as = {
|
|
|
3255
3238
|
const { data: p } = await s.get(g.value);
|
|
3256
3239
|
n("fetch:success", p);
|
|
3257
3240
|
} catch (p) {
|
|
3258
|
-
const
|
|
3259
|
-
d.value =
|
|
3241
|
+
const x = i(p);
|
|
3242
|
+
d.value = x.startsWith("code") ? a("baseForm.errors.edit") : x, c.value = !0, n("fetch:error", p);
|
|
3260
3243
|
} finally {
|
|
3261
3244
|
l.value = !1;
|
|
3262
3245
|
}
|
|
3263
|
-
}), (p,
|
|
3246
|
+
}), (p, x) => {
|
|
3264
3247
|
const b = q("KSkeleton"), C = q("KEmptyState"), A = q("KAlert"), ne = q("KButton"), pe = q("KCard");
|
|
3265
3248
|
return m(), R(pe, { class: "kong-ui-entity-base-form" }, {
|
|
3266
3249
|
body: h(() => [
|
|
@@ -3275,7 +3258,7 @@ const as = {
|
|
|
3275
3258
|
"is-error": !0
|
|
3276
3259
|
}, {
|
|
3277
3260
|
message: h(() => [
|
|
3278
|
-
V("h3", null,
|
|
3261
|
+
V("h3", null, F(d.value), 1)
|
|
3279
3262
|
]),
|
|
3280
3263
|
_: 1
|
|
3281
3264
|
}, 8, ["cta-text"])) : (m(), $("form", {
|
|
@@ -3291,42 +3274,42 @@ const as = {
|
|
|
3291
3274
|
appearance: "danger",
|
|
3292
3275
|
"data-testid": "form-error"
|
|
3293
3276
|
}, null, 8, ["alert-message"])) : G("", !0),
|
|
3294
|
-
V("div",
|
|
3277
|
+
V("div", xs, [
|
|
3295
3278
|
W(p.$slots, "form-actions", {}, () => [
|
|
3296
|
-
|
|
3279
|
+
N(ne, {
|
|
3297
3280
|
appearance: "secondary",
|
|
3298
3281
|
"data-testid": "form-cancel",
|
|
3299
3282
|
disabled: e.isReadonly,
|
|
3300
3283
|
type: "reset"
|
|
3301
3284
|
}, {
|
|
3302
3285
|
default: h(() => [
|
|
3303
|
-
Z(
|
|
3286
|
+
Z(F(y(a)("baseForm.actions.cancel")), 1)
|
|
3304
3287
|
]),
|
|
3305
3288
|
_: 1
|
|
3306
3289
|
}, 8, ["disabled"]),
|
|
3307
|
-
|
|
3290
|
+
N(ne, {
|
|
3308
3291
|
appearance: "primary",
|
|
3309
3292
|
"data-testid": "form-submit",
|
|
3310
3293
|
disabled: u.value,
|
|
3311
3294
|
type: "submit"
|
|
3312
3295
|
}, {
|
|
3313
3296
|
default: h(() => [
|
|
3314
|
-
Z(
|
|
3297
|
+
Z(F(y(a)("baseForm.actions.save")), 1)
|
|
3315
3298
|
]),
|
|
3316
3299
|
_: 1
|
|
3317
3300
|
}, 8, ["disabled"])
|
|
3318
3301
|
], !0)
|
|
3319
3302
|
])
|
|
3320
|
-
], 40,
|
|
3303
|
+
], 40, As))
|
|
3321
3304
|
]),
|
|
3322
3305
|
_: 3
|
|
3323
3306
|
});
|
|
3324
3307
|
};
|
|
3325
3308
|
}
|
|
3326
|
-
}),
|
|
3309
|
+
}), Ts = /* @__PURE__ */ ke(Ss, [["__scopeId", "data-v-81612aef"]]), $s = {
|
|
3327
3310
|
key: 0,
|
|
3328
3311
|
"data-testid": "first-col"
|
|
3329
|
-
},
|
|
3312
|
+
}, js = /* @__PURE__ */ re({
|
|
3330
3313
|
__name: "EntityBaseTableCell",
|
|
3331
3314
|
props: {
|
|
3332
3315
|
keyName: {
|
|
@@ -3347,16 +3330,16 @@ const as = {
|
|
|
3347
3330
|
return ((v = t.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3348
3331
|
}), o = T(() => {
|
|
3349
3332
|
var v, p;
|
|
3350
|
-
const
|
|
3351
|
-
return
|
|
3333
|
+
const x = (v = n.rowEl) == null ? void 0 : v.querySelectorAll("td");
|
|
3334
|
+
return x ? ((p = x[0]) == null ? void 0 : p.getAttribute("data-testid")) === n.keyName : !1;
|
|
3352
3335
|
});
|
|
3353
3336
|
let a;
|
|
3354
3337
|
const i = () => {
|
|
3355
3338
|
a && (a.disconnect(), a = void 0);
|
|
3356
3339
|
}, s = () => {
|
|
3357
|
-
var v, p,
|
|
3358
|
-
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((
|
|
3359
|
-
}, l = O({}), c = O(0), d = O(0), u = O(""), g = T(() => [r.value, t.value]), f =
|
|
3340
|
+
var v, p, x;
|
|
3341
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((p = t.value) == null ? void 0 : p.clientWidth) || 0, u.value = ((x = l.value) == null ? void 0 : x.innerText) || "";
|
|
3342
|
+
}, l = O({}), c = O(0), d = O(0), u = O(""), g = T(() => [r.value, t.value]), f = Se(
|
|
3360
3343
|
g,
|
|
3361
3344
|
(v) => {
|
|
3362
3345
|
if (o.value && (i(), "ResizeObserver" in window && window)) {
|
|
@@ -3376,14 +3359,14 @@ const as = {
|
|
|
3376
3359
|
}), vr(() => {
|
|
3377
3360
|
f();
|
|
3378
3361
|
}), (v, p) => {
|
|
3379
|
-
const
|
|
3362
|
+
const x = q("KTooltip");
|
|
3380
3363
|
return m(), $("span", {
|
|
3381
3364
|
ref_key: "contentRef",
|
|
3382
3365
|
ref: l,
|
|
3383
3366
|
class: "content-wrapper"
|
|
3384
3367
|
}, [
|
|
3385
|
-
o.value ? (m(), $("span",
|
|
3386
|
-
|
|
3368
|
+
o.value ? (m(), $("span", $s, [
|
|
3369
|
+
N(x, {
|
|
3387
3370
|
label: I.value ? u.value : "",
|
|
3388
3371
|
"max-width": "300",
|
|
3389
3372
|
placement: "bottomStart"
|
|
@@ -3397,10 +3380,10 @@ const as = {
|
|
|
3397
3380
|
], 512);
|
|
3398
3381
|
};
|
|
3399
3382
|
}
|
|
3400
|
-
}),
|
|
3383
|
+
}), Ms = /* @__PURE__ */ ke(js, [["__scopeId", "data-v-e42a20c9"]]), Es = { class: "toolbar-container" }, Os = {
|
|
3401
3384
|
key: 0,
|
|
3402
3385
|
class: "toolbar-button-container"
|
|
3403
|
-
},
|
|
3386
|
+
}, Fs = ["data-testid"], Ns = /* @__PURE__ */ re({
|
|
3404
3387
|
__name: "EntityBaseTable",
|
|
3405
3388
|
props: {
|
|
3406
3389
|
// table header configuration
|
|
@@ -3547,7 +3530,7 @@ const as = {
|
|
|
3547
3530
|
n("click:row", A);
|
|
3548
3531
|
}), I = (C) => {
|
|
3549
3532
|
n("sort", C);
|
|
3550
|
-
}, { setTablePreferences: v, getTablePreferences: p } =
|
|
3533
|
+
}, { setTablePreferences: v, getTablePreferences: p } = Sr(), x = T(() => {
|
|
3551
3534
|
const C = p(t.preferencesStorageKey);
|
|
3552
3535
|
return {
|
|
3553
3536
|
...t.initialFetcherParams,
|
|
@@ -3563,7 +3546,7 @@ const as = {
|
|
|
3563
3546
|
title: e.title
|
|
3564
3547
|
}, {
|
|
3565
3548
|
body: h(() => [
|
|
3566
|
-
|
|
3549
|
+
N(w, {
|
|
3567
3550
|
ref_key: "tableRefs",
|
|
3568
3551
|
ref: l,
|
|
3569
3552
|
"cache-identifier": o.value,
|
|
@@ -3584,7 +3567,7 @@ const as = {
|
|
|
3584
3567
|
"has-error": !!e.errorMessage,
|
|
3585
3568
|
headers: i.value,
|
|
3586
3569
|
"hide-pagination-when-optional": "",
|
|
3587
|
-
"initial-fetcher-params":
|
|
3570
|
+
"initial-fetcher-params": x.value,
|
|
3588
3571
|
"is-loading": e.isLoading,
|
|
3589
3572
|
"pagination-type": e.paginationType,
|
|
3590
3573
|
"row-attrs": s,
|
|
@@ -3595,21 +3578,21 @@ const as = {
|
|
|
3595
3578
|
"onUpdate:tablePreferences": b
|
|
3596
3579
|
}, Te({
|
|
3597
3580
|
toolbar: h(({ state: B }) => [
|
|
3598
|
-
et(V("div",
|
|
3581
|
+
et(V("div", Es, [
|
|
3599
3582
|
W(C.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3600
|
-
C.$slots["toolbar-button"] ? (m(), $("div",
|
|
3583
|
+
C.$slots["toolbar-button"] ? (m(), $("div", Os, [
|
|
3601
3584
|
W(C.$slots, "toolbar-button", {}, void 0, !0)
|
|
3602
3585
|
])) : G("", !0)
|
|
3603
3586
|
], 512), [
|
|
3604
3587
|
[tt, a(B)]
|
|
3605
3588
|
])
|
|
3606
3589
|
]),
|
|
3607
|
-
actions: h(({ row: B, rowKey: k, rowValue:
|
|
3590
|
+
actions: h(({ row: B, rowKey: k, rowValue: S }) => [
|
|
3608
3591
|
V("div", {
|
|
3609
3592
|
class: "actions-container",
|
|
3610
3593
|
"data-testid": B.name
|
|
3611
3594
|
}, [
|
|
3612
|
-
|
|
3595
|
+
N(z, {
|
|
3613
3596
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3614
3597
|
width: e.dropdownMenuWidth
|
|
3615
3598
|
}, {
|
|
@@ -3617,18 +3600,18 @@ const as = {
|
|
|
3617
3600
|
W(C.$slots, "actions", {
|
|
3618
3601
|
row: B,
|
|
3619
3602
|
rowKey: k,
|
|
3620
|
-
rowValue:
|
|
3603
|
+
rowValue: S
|
|
3621
3604
|
}, void 0, !0)
|
|
3622
3605
|
]),
|
|
3623
3606
|
default: h(() => [
|
|
3624
|
-
|
|
3607
|
+
N(pe, {
|
|
3625
3608
|
class: "actions-trigger",
|
|
3626
3609
|
"data-testid": "overflow-actions-button",
|
|
3627
3610
|
size: "small"
|
|
3628
3611
|
}, {
|
|
3629
3612
|
icon: h(() => [
|
|
3630
|
-
|
|
3631
|
-
color: y(
|
|
3613
|
+
N(ne, {
|
|
3614
|
+
color: y(ko),
|
|
3632
3615
|
icon: "more",
|
|
3633
3616
|
size: "16"
|
|
3634
3617
|
}, null, 8, ["color"])
|
|
@@ -3638,24 +3621,24 @@ const as = {
|
|
|
3638
3621
|
]),
|
|
3639
3622
|
_: 2
|
|
3640
3623
|
}, 1032, ["width"])
|
|
3641
|
-
], 8,
|
|
3624
|
+
], 8, Fs)
|
|
3642
3625
|
]),
|
|
3643
3626
|
_: 2
|
|
3644
3627
|
}, [
|
|
3645
3628
|
ye(e.tableHeaders, (B, k) => ({
|
|
3646
3629
|
name: k,
|
|
3647
|
-
fn: h(({ row:
|
|
3648
|
-
|
|
3630
|
+
fn: h(({ row: S, rowKey: j, rowValue: P }) => [
|
|
3631
|
+
N(Ms, {
|
|
3649
3632
|
"key-name": String(k),
|
|
3650
|
-
"row-el": c(
|
|
3633
|
+
"row-el": c(S)
|
|
3651
3634
|
}, {
|
|
3652
3635
|
default: h(() => [
|
|
3653
3636
|
W(C.$slots, k, {
|
|
3654
|
-
row:
|
|
3655
|
-
rowKey:
|
|
3637
|
+
row: S,
|
|
3638
|
+
rowKey: j,
|
|
3656
3639
|
rowValue: P
|
|
3657
3640
|
}, () => [
|
|
3658
|
-
Z(
|
|
3641
|
+
Z(F(P), 1)
|
|
3659
3642
|
], !0)
|
|
3660
3643
|
]),
|
|
3661
3644
|
_: 2
|
|
@@ -3668,13 +3651,13 @@ const as = {
|
|
|
3668
3651
|
}, 8, ["title"]);
|
|
3669
3652
|
};
|
|
3670
3653
|
}
|
|
3671
|
-
}),
|
|
3654
|
+
}), Ks = /* @__PURE__ */ ke(Ns, [["__scopeId", "data-v-86d2d2a3"]]), Bs = {
|
|
3672
3655
|
key: 0,
|
|
3673
3656
|
class: "kong-ui-entity-delete-error"
|
|
3674
|
-
},
|
|
3657
|
+
}, Ps = {
|
|
3675
3658
|
key: 1,
|
|
3676
3659
|
class: "description"
|
|
3677
|
-
},
|
|
3660
|
+
}, Ls = /* @__PURE__ */ re({
|
|
3678
3661
|
__name: "EntityDeleteModal",
|
|
3679
3662
|
props: {
|
|
3680
3663
|
visible: {
|
|
@@ -3732,35 +3715,35 @@ const as = {
|
|
|
3732
3715
|
onProceed: i
|
|
3733
3716
|
}, {
|
|
3734
3717
|
"body-content": h(() => [
|
|
3735
|
-
e.error ? (m(), $("div",
|
|
3736
|
-
|
|
3718
|
+
e.error ? (m(), $("div", Bs, [
|
|
3719
|
+
N(c, { appearance: "danger" }, {
|
|
3737
3720
|
alertMessage: h(() => [
|
|
3738
|
-
Z(
|
|
3721
|
+
Z(F(e.error), 1)
|
|
3739
3722
|
]),
|
|
3740
3723
|
_: 1
|
|
3741
3724
|
})
|
|
3742
3725
|
])) : G("", !0),
|
|
3743
|
-
|
|
3726
|
+
N(y(r), {
|
|
3744
3727
|
class: "message",
|
|
3745
3728
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3746
3729
|
tag: "p"
|
|
3747
3730
|
}, Te({
|
|
3748
3731
|
entityType: h(() => [
|
|
3749
|
-
Z(
|
|
3732
|
+
Z(F(t.entityType), 1)
|
|
3750
3733
|
]),
|
|
3751
3734
|
_: 2
|
|
3752
3735
|
}, [
|
|
3753
3736
|
t.entityName ? {
|
|
3754
3737
|
name: "entityName",
|
|
3755
3738
|
fn: h(() => [
|
|
3756
|
-
V("strong", null,
|
|
3739
|
+
V("strong", null, F(t.entityName), 1)
|
|
3757
3740
|
]),
|
|
3758
3741
|
key: "0"
|
|
3759
3742
|
} : void 0
|
|
3760
3743
|
]), 1032, ["keypath"]),
|
|
3761
|
-
t.description || s.$slots.description ? (m(), $("div",
|
|
3744
|
+
t.description || s.$slots.description ? (m(), $("div", Ps, [
|
|
3762
3745
|
W(s.$slots, "description", {}, () => [
|
|
3763
|
-
V("p", null,
|
|
3746
|
+
V("p", null, F(t.description), 1)
|
|
3764
3747
|
], !0)
|
|
3765
3748
|
])) : G("", !0)
|
|
3766
3749
|
]),
|
|
@@ -3768,13 +3751,13 @@ const as = {
|
|
|
3768
3751
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3769
3752
|
};
|
|
3770
3753
|
}
|
|
3771
|
-
}),
|
|
3754
|
+
}), qs = /* @__PURE__ */ ke(Ls, [["__scopeId", "data-v-1c9a2a07"]]), Us = {
|
|
3772
3755
|
fill: "none",
|
|
3773
3756
|
height: "20",
|
|
3774
3757
|
viewBox: "0 0 20 20",
|
|
3775
3758
|
width: "20",
|
|
3776
3759
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3777
|
-
},
|
|
3760
|
+
}, Vs = {
|
|
3778
3761
|
id: "mask0_180_20349",
|
|
3779
3762
|
height: "20",
|
|
3780
3763
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3782,35 +3765,35 @@ const as = {
|
|
|
3782
3765
|
width: "20",
|
|
3783
3766
|
x: "0",
|
|
3784
3767
|
y: "0"
|
|
3785
|
-
},
|
|
3768
|
+
}, Rs = ["fill"], Ds = { mask: "url(#mask0_180_20349)" }, Gs = ["fill"], cn = /* @__PURE__ */ re({
|
|
3786
3769
|
__name: "IconFilter",
|
|
3787
3770
|
props: {
|
|
3788
3771
|
color: {
|
|
3789
3772
|
type: String,
|
|
3790
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3773
|
+
default: `var(--kong-ui-entity-filter-color, ${bo})`
|
|
3791
3774
|
}
|
|
3792
3775
|
},
|
|
3793
3776
|
setup(e) {
|
|
3794
|
-
return (n, t) => (m(), $("svg",
|
|
3795
|
-
V("mask",
|
|
3777
|
+
return (n, t) => (m(), $("svg", Us, [
|
|
3778
|
+
V("mask", Vs, [
|
|
3796
3779
|
V("rect", {
|
|
3797
3780
|
fill: e.color,
|
|
3798
3781
|
height: "20",
|
|
3799
3782
|
width: "20"
|
|
3800
|
-
}, null, 8,
|
|
3783
|
+
}, null, 8, Rs)
|
|
3801
3784
|
]),
|
|
3802
|
-
V("g",
|
|
3785
|
+
V("g", Ds, [
|
|
3803
3786
|
V("path", {
|
|
3804
3787
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3805
3788
|
fill: e.color
|
|
3806
|
-
}, null, 8,
|
|
3789
|
+
}, null, 8, Gs)
|
|
3807
3790
|
])
|
|
3808
3791
|
]));
|
|
3809
3792
|
}
|
|
3810
|
-
}),
|
|
3793
|
+
}), zs = {
|
|
3811
3794
|
key: 1,
|
|
3812
3795
|
class: "kong-ui-entity-filter"
|
|
3813
|
-
},
|
|
3796
|
+
}, Hs = { class: "menu-item-title" }, Js = { class: "menu-item-indicator" }, Ys = { class: "menu-item-body" }, Ws = ["for"], Zs = { class: "menu-item-buttons" }, Qs = { class: "filter-clear-button-container" }, Xs = /* @__PURE__ */ re({
|
|
3814
3797
|
__name: "EntityFilter",
|
|
3815
3798
|
props: {
|
|
3816
3799
|
// filter config, either exact match or fuzzy match
|
|
@@ -3832,19 +3815,19 @@ const as = {
|
|
|
3832
3815
|
setup(e, { emit: n }) {
|
|
3833
3816
|
const t = e, { i18n: { t: r } } = ue.useI18n(), o = O(!1), a = O({}), i = T(() => {
|
|
3834
3817
|
const p = [];
|
|
3835
|
-
return new URLSearchParams(t.modelValue).forEach((
|
|
3836
|
-
|
|
3818
|
+
return new URLSearchParams(t.modelValue).forEach((x, b) => {
|
|
3819
|
+
x !== "" && p.push(b);
|
|
3837
3820
|
}), p;
|
|
3838
3821
|
}), s = T(() => {
|
|
3839
3822
|
const p = t.config.fields;
|
|
3840
|
-
return Object.keys(p).filter((
|
|
3841
|
-
label: p[
|
|
3842
|
-
value:
|
|
3823
|
+
return Object.keys(p).filter((x) => p[x].searchable).map((x) => ({
|
|
3824
|
+
label: p[x].label || x,
|
|
3825
|
+
value: x
|
|
3843
3826
|
}));
|
|
3844
3827
|
});
|
|
3845
|
-
|
|
3846
|
-
a.value = {}, new URLSearchParams(p).forEach((
|
|
3847
|
-
a.value[b] =
|
|
3828
|
+
Se(() => t.modelValue, (p) => {
|
|
3829
|
+
a.value = {}, new URLSearchParams(p).forEach((x, b) => {
|
|
3830
|
+
a.value[b] = x;
|
|
3848
3831
|
});
|
|
3849
3832
|
});
|
|
3850
3833
|
const l = () => {
|
|
@@ -3852,14 +3835,14 @@ const as = {
|
|
|
3852
3835
|
}, c = (p) => {
|
|
3853
3836
|
n("update:modelValue", p);
|
|
3854
3837
|
}, d = (p) => `filter-${p}`, u = (p) => {
|
|
3855
|
-
var
|
|
3856
|
-
return (((b = (
|
|
3838
|
+
var x, b;
|
|
3839
|
+
return (((b = (x = t.config.schema) == null ? void 0 : x[p]) == null ? void 0 : b.values) ?? []).map((C) => ({
|
|
3857
3840
|
value: C,
|
|
3858
3841
|
label: C
|
|
3859
3842
|
}));
|
|
3860
3843
|
}, g = (p) => {
|
|
3861
|
-
var
|
|
3862
|
-
return ((b = (
|
|
3844
|
+
var x, b;
|
|
3845
|
+
return ((b = (x = t.config.schema) == null ? void 0 : x[p]) == null ? void 0 : b.type) ?? "text";
|
|
3863
3846
|
}, f = (p) => {
|
|
3864
3847
|
a.value = {
|
|
3865
3848
|
...a.value,
|
|
@@ -3868,10 +3851,10 @@ const as = {
|
|
|
3868
3851
|
}, I = () => {
|
|
3869
3852
|
a.value = {}, v(!0);
|
|
3870
3853
|
}, v = (p = !1) => {
|
|
3871
|
-
const
|
|
3872
|
-
p && (o.value = !1), n("update:modelValue", new URLSearchParams(
|
|
3854
|
+
const x = Object.keys(a.value).reduce((b, C) => (a.value[C] && (b[C] = `${a.value[C]}`), b), {});
|
|
3855
|
+
p && (o.value = !1), n("update:modelValue", new URLSearchParams(x).toString());
|
|
3873
3856
|
};
|
|
3874
|
-
return (p,
|
|
3857
|
+
return (p, x) => {
|
|
3875
3858
|
const b = q("KInput"), C = q("KButton"), A = q("KSelect"), ne = q("KMenuItem"), pe = q("KMenu");
|
|
3876
3859
|
return e.config.isExactMatch ? (m(), R(b, {
|
|
3877
3860
|
key: 0,
|
|
@@ -3883,18 +3866,18 @@ const as = {
|
|
|
3883
3866
|
"onUpdate:modelValue": c
|
|
3884
3867
|
}, {
|
|
3885
3868
|
before: h(() => [
|
|
3886
|
-
|
|
3869
|
+
N(cn)
|
|
3887
3870
|
]),
|
|
3888
3871
|
_: 1
|
|
3889
|
-
}, 8, ["model-value", "placeholder"])) : (m(), $("div",
|
|
3890
|
-
|
|
3872
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", zs, [
|
|
3873
|
+
N(C, {
|
|
3891
3874
|
appearance: "tertiary",
|
|
3892
3875
|
"data-testid": "filter-button",
|
|
3893
3876
|
onClick: l
|
|
3894
3877
|
}, {
|
|
3895
3878
|
default: h(() => [
|
|
3896
|
-
|
|
3897
|
-
Z(" " +
|
|
3879
|
+
N(cn),
|
|
3880
|
+
Z(" " + F(y(r)("filter.filterButtonText")) + " " + F(i.value.length > 0 ? `(${i.value.length})` : ""), 1)
|
|
3898
3881
|
]),
|
|
3899
3882
|
_: 1
|
|
3900
3883
|
}),
|
|
@@ -3904,7 +3887,7 @@ const as = {
|
|
|
3904
3887
|
}, null, 512), [
|
|
3905
3888
|
[tt, o.value]
|
|
3906
3889
|
]),
|
|
3907
|
-
et(
|
|
3890
|
+
et(N(pe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3908
3891
|
body: h(() => [
|
|
3909
3892
|
(m(!0), $(ve, null, ye(s.value, (z, w) => (m(), R(ne, {
|
|
3910
3893
|
key: z.value,
|
|
@@ -3913,9 +3896,9 @@ const as = {
|
|
|
3913
3896
|
"last-menu-item": w === s.value.length - 1
|
|
3914
3897
|
}, {
|
|
3915
3898
|
itemTitle: h(() => [
|
|
3916
|
-
V("span",
|
|
3917
|
-
Z(
|
|
3918
|
-
et(V("span",
|
|
3899
|
+
V("span", Hs, [
|
|
3900
|
+
Z(F(z.label) + " ", 1),
|
|
3901
|
+
et(V("span", Js, null, 512), [
|
|
3919
3902
|
[tt, i.value.includes(z.value)]
|
|
3920
3903
|
])
|
|
3921
3904
|
])
|
|
@@ -3923,11 +3906,11 @@ const as = {
|
|
|
3923
3906
|
itemBody: h(() => {
|
|
3924
3907
|
var K, B;
|
|
3925
3908
|
return [
|
|
3926
|
-
V("div",
|
|
3909
|
+
V("div", Ys, [
|
|
3927
3910
|
V("label", {
|
|
3928
3911
|
class: "menu-item-label",
|
|
3929
3912
|
for: d(z.value)
|
|
3930
|
-
},
|
|
3913
|
+
}, F(y(r)("filter.fieldLabel")), 9, Ws),
|
|
3931
3914
|
((B = (K = e.config.schema) == null ? void 0 : K[z.value]) == null ? void 0 : B.type) === "select" ? (m(), R(A, {
|
|
3932
3915
|
key: 0,
|
|
3933
3916
|
id: d(z.value),
|
|
@@ -3946,26 +3929,26 @@ const as = {
|
|
|
3946
3929
|
type: g(z.value)
|
|
3947
3930
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3948
3931
|
]),
|
|
3949
|
-
V("div",
|
|
3950
|
-
|
|
3932
|
+
V("div", Zs, [
|
|
3933
|
+
N(C, {
|
|
3951
3934
|
appearance: "tertiary",
|
|
3952
3935
|
"data-testid": "apply-filter",
|
|
3953
3936
|
size: "small",
|
|
3954
|
-
onClick:
|
|
3937
|
+
onClick: x[0] || (x[0] = (k) => v(!0))
|
|
3955
3938
|
}, {
|
|
3956
3939
|
default: h(() => [
|
|
3957
|
-
Z(
|
|
3940
|
+
Z(F(y(r)("filter.applyButtonText")), 1)
|
|
3958
3941
|
]),
|
|
3959
3942
|
_: 1
|
|
3960
3943
|
}),
|
|
3961
|
-
|
|
3944
|
+
N(C, {
|
|
3962
3945
|
appearance: "tertiary",
|
|
3963
3946
|
"data-testid": "clear-filter",
|
|
3964
3947
|
size: "small",
|
|
3965
3948
|
onClick: (k) => f(z.value)
|
|
3966
3949
|
}, {
|
|
3967
3950
|
default: h(() => [
|
|
3968
|
-
Z(
|
|
3951
|
+
Z(F(y(r)("filter.clearButtonText")), 1)
|
|
3969
3952
|
]),
|
|
3970
3953
|
_: 2
|
|
3971
3954
|
}, 1032, ["onClick"])
|
|
@@ -3976,13 +3959,13 @@ const as = {
|
|
|
3976
3959
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
3977
3960
|
]),
|
|
3978
3961
|
actionButton: h(() => [
|
|
3979
|
-
V("div",
|
|
3980
|
-
|
|
3962
|
+
V("div", Qs, [
|
|
3963
|
+
N(C, {
|
|
3981
3964
|
size: "small",
|
|
3982
3965
|
onClick: I
|
|
3983
3966
|
}, {
|
|
3984
3967
|
default: h(() => [
|
|
3985
|
-
Z(
|
|
3968
|
+
Z(F(y(r)("filter.clearAllButtonText")), 1)
|
|
3986
3969
|
]),
|
|
3987
3970
|
_: 1
|
|
3988
3971
|
})
|
|
@@ -3995,7 +3978,7 @@ const as = {
|
|
|
3995
3978
|
]));
|
|
3996
3979
|
};
|
|
3997
3980
|
}
|
|
3998
|
-
}),
|
|
3981
|
+
}), el = /* @__PURE__ */ ke(Xs, [["__scopeId", "data-v-4ea260f0"]]), Xe = /* @__PURE__ */ re({
|
|
3999
3982
|
__name: "PermissionsWrapper",
|
|
4000
3983
|
props: {
|
|
4001
3984
|
/**
|
|
@@ -4018,23 +4001,23 @@ const as = {
|
|
|
4018
4001
|
},
|
|
4019
4002
|
setup(e) {
|
|
4020
4003
|
const n = e, t = O(void 0), r = T(() => t.value === !0 || t.value !== void 0 && n.forceShow === !0);
|
|
4021
|
-
return
|
|
4004
|
+
return Se(() => n.authFunction, async () => {
|
|
4022
4005
|
t.value = await n.authFunction();
|
|
4023
4006
|
}, { immediate: !0 }), (o, a) => r.value ? W(o.$slots, "default", {
|
|
4024
4007
|
key: 0,
|
|
4025
4008
|
isAllowed: t.value
|
|
4026
4009
|
}) : G("", !0);
|
|
4027
4010
|
}
|
|
4028
|
-
}),
|
|
4011
|
+
}), tl = { class: "form-section-wrapper" }, nl = {
|
|
4029
4012
|
key: 0,
|
|
4030
4013
|
class: "form-section-title"
|
|
4031
|
-
},
|
|
4014
|
+
}, rl = {
|
|
4032
4015
|
key: 1,
|
|
4033
4016
|
class: "form-section-description"
|
|
4034
|
-
},
|
|
4017
|
+
}, ol = {
|
|
4035
4018
|
key: 2,
|
|
4036
4019
|
class: "form-section-footer"
|
|
4037
|
-
},
|
|
4020
|
+
}, al = { class: "form-section-content" }, il = /* @__PURE__ */ re({
|
|
4038
4021
|
__name: "EntityFormSection",
|
|
4039
4022
|
props: {
|
|
4040
4023
|
title: {
|
|
@@ -4061,34 +4044,34 @@ const as = {
|
|
|
4061
4044
|
setup(e) {
|
|
4062
4045
|
const n = ut();
|
|
4063
4046
|
return (t, r) => (m(), $("fieldset", {
|
|
4064
|
-
class:
|
|
4047
|
+
class: Ne(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4065
4048
|
}, [
|
|
4066
|
-
V("div",
|
|
4049
|
+
V("div", tl, [
|
|
4067
4050
|
e.hideInfoHeader ? G("", !0) : (m(), $("div", {
|
|
4068
4051
|
key: 0,
|
|
4069
|
-
class:
|
|
4052
|
+
class: Ne(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4070
4053
|
}, [
|
|
4071
|
-
e.title ? (m(), $("h4",
|
|
4072
|
-
e.description || y(n).description ? (m(), $("div",
|
|
4054
|
+
e.title ? (m(), $("h4", nl, F(e.title), 1)) : G("", !0),
|
|
4055
|
+
e.description || y(n).description ? (m(), $("div", rl, [
|
|
4073
4056
|
W(t.$slots, "description", {}, () => [
|
|
4074
|
-
V("p", null,
|
|
4057
|
+
V("p", null, F(e.description), 1)
|
|
4075
4058
|
], !0)
|
|
4076
4059
|
])) : G("", !0),
|
|
4077
|
-
y(n).footer ? (m(), $("div",
|
|
4060
|
+
y(n).footer ? (m(), $("div", ol, [
|
|
4078
4061
|
W(t.$slots, "footer", {}, void 0, !0)
|
|
4079
4062
|
])) : G("", !0)
|
|
4080
4063
|
], 2)),
|
|
4081
|
-
V("div",
|
|
4064
|
+
V("div", al, [
|
|
4082
4065
|
W(t.$slots, "default", {}, void 0, !0)
|
|
4083
4066
|
])
|
|
4084
4067
|
])
|
|
4085
4068
|
], 2));
|
|
4086
4069
|
}
|
|
4087
|
-
}), dn = /* @__PURE__ */ ke(
|
|
4088
|
-
const
|
|
4070
|
+
}), dn = /* @__PURE__ */ ke(il, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: Ft, useDeleteUrlBuilder: sl, useErrors: ll, useExternalLinkCreator: $l, useFetchUrlBuilder: jl, useFetcher: ul, useDebouncedFilter: cr, useStringHelpers: Ml, useHelpers: El, useGatewayFeatureSupported: Ol, useTruncationDetector: Fl } = ue;
|
|
4071
|
+
const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group-cta-text" }, pl = {
|
|
4089
4072
|
key: 0,
|
|
4090
4073
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4091
|
-
},
|
|
4074
|
+
}, fl = { key: 0 }, ml = /* @__PURE__ */ re({
|
|
4092
4075
|
__name: "AddToGroupModal",
|
|
4093
4076
|
props: {
|
|
4094
4077
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4106,7 +4089,7 @@ const fl = { class: "add-to-group-form-container" }, ml = { class: "add-to-group
|
|
|
4106
4089
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4107
4090
|
setup(e, { emit: n }) {
|
|
4108
4091
|
var B;
|
|
4109
|
-
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } =
|
|
4092
|
+
const t = e, { i18n: { t: r } } = ct.useI18n(), { axiosInstance: o } = Ft({
|
|
4110
4093
|
headers: (B = t.config) == null ? void 0 : B.requestHeaders
|
|
4111
4094
|
}), a = O([]), {
|
|
4112
4095
|
debouncedQueryChange: i,
|
|
@@ -4130,10 +4113,10 @@ const fl = { class: "add-to-group-form-container" }, ml = { class: "add-to-group
|
|
|
4130
4113
|
data: k
|
|
4131
4114
|
// we need this to determine whether or not to show the description text
|
|
4132
4115
|
}))), p = (k) => {
|
|
4133
|
-
var
|
|
4134
|
-
const
|
|
4135
|
-
return
|
|
4136
|
-
},
|
|
4116
|
+
var j;
|
|
4117
|
+
const S = I.value ? u.value.find((P) => P.id === k) : (j = l.value) == null ? void 0 : j.find((P) => P.id === k);
|
|
4118
|
+
return S ? S.name : k;
|
|
4119
|
+
}, x = () => {
|
|
4137
4120
|
A.value = "", b.value = [], w.value = [], n("cancel");
|
|
4138
4121
|
}, b = O([]), C = O(!1), A = O(""), ne = async () => {
|
|
4139
4122
|
if (!a.value.length) {
|
|
@@ -4142,58 +4125,58 @@ const fl = { class: "add-to-group-form-container" }, ml = { class: "add-to-group
|
|
|
4142
4125
|
}
|
|
4143
4126
|
C.value = !0, A.value = "", b.value = [], w.value = [];
|
|
4144
4127
|
try {
|
|
4145
|
-
const k = a.value.map((P) => z(P)),
|
|
4146
|
-
let
|
|
4147
|
-
|
|
4148
|
-
P.status !== "fulfilled" && (
|
|
4149
|
-
}),
|
|
4128
|
+
const k = a.value.map((P) => z(P)), S = await Promise.allSettled(k);
|
|
4129
|
+
let j = !0;
|
|
4130
|
+
S.forEach((P) => {
|
|
4131
|
+
P.status !== "fulfilled" && (j = !1);
|
|
4132
|
+
}), j ? (b.value = [], w.value = [], n("add:success", a.value), a.value = []) : (b.value.length && n("add:partial-success", b.value), a.value = [], K(S));
|
|
4150
4133
|
} catch {
|
|
4151
4134
|
A.value = r("consumer_groups.errors.add"), n("error", A.value);
|
|
4152
4135
|
} finally {
|
|
4153
4136
|
C.value = !1;
|
|
4154
4137
|
}
|
|
4155
4138
|
}, pe = T(() => {
|
|
4156
|
-
var
|
|
4139
|
+
var S, j, P, J;
|
|
4157
4140
|
let k = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4158
|
-
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((
|
|
4141
|
+
return t.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((S = t.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{consumerId}/gi, ((j = t.config) == null ? void 0 : j.consumerId) || "") : t.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), k;
|
|
4159
4142
|
}), z = async (k) => {
|
|
4160
|
-
const
|
|
4143
|
+
const S = {
|
|
4161
4144
|
group: k
|
|
4162
4145
|
};
|
|
4163
4146
|
try {
|
|
4164
|
-
const
|
|
4165
|
-
return b.value.push(k),
|
|
4166
|
-
} catch (
|
|
4167
|
-
let P = `${p(k)} - ${
|
|
4168
|
-
return
|
|
4147
|
+
const j = await o.post(pe.value, S);
|
|
4148
|
+
return b.value.push(k), j;
|
|
4149
|
+
} catch (j) {
|
|
4150
|
+
let P = `${p(k)} - ${j.message}`;
|
|
4151
|
+
return j.response.status === 409 && (P = `${p(k)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(P));
|
|
4169
4152
|
}
|
|
4170
4153
|
}, w = O([]), K = (k) => {
|
|
4171
|
-
w.value = k.map((
|
|
4172
|
-
var
|
|
4173
|
-
return (
|
|
4154
|
+
w.value = k.map((S) => {
|
|
4155
|
+
var j;
|
|
4156
|
+
return (j = S.reason) == null ? void 0 : j.message;
|
|
4174
4157
|
}).filter(Boolean);
|
|
4175
4158
|
};
|
|
4176
|
-
return
|
|
4159
|
+
return Se(v, () => {
|
|
4177
4160
|
f.value++;
|
|
4178
4161
|
}, { immediate: !0, deep: !0 }), Qe(async () => {
|
|
4179
4162
|
await d();
|
|
4180
|
-
}), (k,
|
|
4181
|
-
const
|
|
4163
|
+
}), (k, S) => {
|
|
4164
|
+
const j = q("KMultiselect"), P = q("KAlert"), J = q("KPrompt");
|
|
4182
4165
|
return m(), R(J, {
|
|
4183
4166
|
"action-pending": C.value,
|
|
4184
4167
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4185
4168
|
"data-testid": "add-to-group-modal",
|
|
4186
4169
|
"is-visible": e.visible,
|
|
4187
4170
|
title: y(r)("consumer_groups.consumers.add.title"),
|
|
4188
|
-
onCanceled:
|
|
4171
|
+
onCanceled: x,
|
|
4189
4172
|
onProceed: ne
|
|
4190
4173
|
}, {
|
|
4191
4174
|
"body-content": h(() => [
|
|
4192
|
-
V("div",
|
|
4193
|
-
V("p",
|
|
4194
|
-
|
|
4175
|
+
V("div", cl, [
|
|
4176
|
+
V("p", dl, F(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4177
|
+
N(j, {
|
|
4195
4178
|
modelValue: a.value,
|
|
4196
|
-
"onUpdate:modelValue":
|
|
4179
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Q) => a.value = Q),
|
|
4197
4180
|
autosuggest: "",
|
|
4198
4181
|
"data-testid": "add-to-groups-multiselect",
|
|
4199
4182
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4206,14 +4189,14 @@ const fl = { class: "add-to-group-form-container" }, ml = { class: "add-to-group
|
|
|
4206
4189
|
width: "100%",
|
|
4207
4190
|
onQueryChange: y(i)
|
|
4208
4191
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4209
|
-
A.value || g.value || w.value.length ? (m(), $("div",
|
|
4210
|
-
|
|
4192
|
+
A.value || g.value || w.value.length ? (m(), $("div", pl, [
|
|
4193
|
+
N(P, { appearance: "danger" }, {
|
|
4211
4194
|
alertMessage: h(() => [
|
|
4212
|
-
V("p", null,
|
|
4213
|
-
w.value.length ? (m(), $("ul",
|
|
4214
|
-
(m(!0), $(ve, null, ye(w.value, (Q, X) => (m(), $("li", { key: X },
|
|
4195
|
+
V("p", null, F(y(r)("consumer_groups.errors.add")), 1),
|
|
4196
|
+
w.value.length ? (m(), $("ul", fl, [
|
|
4197
|
+
(m(!0), $(ve, null, ye(w.value, (Q, X) => (m(), $("li", { key: X }, F(Q), 1))), 128))
|
|
4215
4198
|
])) : G("", !0),
|
|
4216
|
-
V("div", null,
|
|
4199
|
+
V("div", null, F(A.value || g.value), 1)
|
|
4217
4200
|
]),
|
|
4218
4201
|
_: 1
|
|
4219
4202
|
})
|
|
@@ -4225,12 +4208,12 @@ const fl = { class: "add-to-group-form-container" }, ml = { class: "add-to-group
|
|
|
4225
4208
|
};
|
|
4226
4209
|
}
|
|
4227
4210
|
});
|
|
4228
|
-
const
|
|
4211
|
+
const Nt = (e, n) => {
|
|
4229
4212
|
const t = e.__vccOpts || e;
|
|
4230
4213
|
for (const [r, o] of n)
|
|
4231
4214
|
t[r] = o;
|
|
4232
4215
|
return t;
|
|
4233
|
-
},
|
|
4216
|
+
}, gl = /* @__PURE__ */ Nt(ml, [["__scopeId", "data-v-4d30f3c5"]]), yl = { class: "kong-ui-entities-consumer-groups-list" }, hl = { key: 1 }, vl = /* @__PURE__ */ re({
|
|
4234
4217
|
__name: "ConsumerGroupList",
|
|
4235
4218
|
props: {
|
|
4236
4219
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4272,7 +4255,7 @@ const Ft = (e, n) => {
|
|
|
4272
4255
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4273
4256
|
setup(e, { emit: n }) {
|
|
4274
4257
|
var Kt;
|
|
4275
|
-
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } =
|
|
4258
|
+
const t = e, { i18nT: r, i18n: { t: o } } = ct.useI18n(), a = wt(), { axiosInstance: i } = Ft({
|
|
4276
4259
|
headers: (Kt = t.config) == null ? void 0 : Kt.requestHeaders
|
|
4277
4260
|
}), s = O(1), l = T(() => !!t.config.consumerId), c = T(() => t.config.app !== "kongManager" || !!t.config.disableSorting), d = {
|
|
4278
4261
|
name: { label: o("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
@@ -4300,7 +4283,7 @@ const Ft = (e, n) => {
|
|
|
4300
4283
|
},
|
|
4301
4284
|
schema: t.config.filterSchema
|
|
4302
4285
|
};
|
|
4303
|
-
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher:
|
|
4286
|
+
}), p = T(() => l.value ? "consumer_groups" : void 0), { fetcher: x, fetcherState: b } = ul(t.config, f.value, p.value), C = () => {
|
|
4304
4287
|
I.value = "";
|
|
4305
4288
|
}, A = () => {
|
|
4306
4289
|
s.value++;
|
|
@@ -4341,20 +4324,20 @@ const Ft = (e, n) => {
|
|
|
4341
4324
|
}), B = (E) => ({
|
|
4342
4325
|
label: o("consumer_groups.actions.edit"),
|
|
4343
4326
|
to: t.config.getEditRoute(E)
|
|
4344
|
-
}), k = O(void 0),
|
|
4345
|
-
k.value = E,
|
|
4327
|
+
}), k = O(void 0), S = O(!1), j = O(!1), P = O(""), J = sl(t.config, f.value), Q = (E) => {
|
|
4328
|
+
k.value = E, S.value = !0;
|
|
4346
4329
|
}, X = () => {
|
|
4347
|
-
|
|
4330
|
+
S.value = !1;
|
|
4348
4331
|
}, ee = async () => {
|
|
4349
4332
|
var E, H, le;
|
|
4350
4333
|
if ((E = k.value) != null && E.id) {
|
|
4351
|
-
|
|
4334
|
+
j.value = !0;
|
|
4352
4335
|
try {
|
|
4353
|
-
await i.delete(J(k.value.id)),
|
|
4336
|
+
await i.delete(J(k.value.id)), j.value = !1, S.value = !1, s.value++, n("delete:success", k.value);
|
|
4354
4337
|
} catch (Ce) {
|
|
4355
4338
|
P.value = ((le = (H = Ce.response) == null ? void 0 : H.data) == null ? void 0 : le.message) || Ce.message || o("consumer_groups.errors.delete"), n("error", Ce);
|
|
4356
4339
|
} finally {
|
|
4357
|
-
|
|
4340
|
+
j.value = !1;
|
|
4358
4341
|
}
|
|
4359
4342
|
}
|
|
4360
4343
|
}, ie = O(!1), De = () => {
|
|
@@ -4386,7 +4369,7 @@ const Ft = (e, n) => {
|
|
|
4386
4369
|
}
|
|
4387
4370
|
}
|
|
4388
4371
|
};
|
|
4389
|
-
|
|
4372
|
+
Se(b, (E) => {
|
|
4390
4373
|
if (E.status === Oe.Error) {
|
|
4391
4374
|
ne.value = o("consumer_groups.errors.general"), n("error", E.error);
|
|
4392
4375
|
return;
|
|
@@ -4403,8 +4386,8 @@ const Ft = (e, n) => {
|
|
|
4403
4386
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4404
4387
|
}), (E, H) => {
|
|
4405
4388
|
const le = q("KButton"), Ce = q("KBadge"), Ee = q("KTruncate"), ze = q("KDropdownItem"), Bt = q("KClipboardProvider"), pr = q("KPrompt");
|
|
4406
|
-
return m(), $("div",
|
|
4407
|
-
|
|
4389
|
+
return m(), $("div", yl, [
|
|
4390
|
+
N(y(Ks), {
|
|
4408
4391
|
"cache-identifier": e.cacheIdentifier,
|
|
4409
4392
|
"disable-pagination": l.value,
|
|
4410
4393
|
"disable-pagination-page-jump": "",
|
|
@@ -4412,7 +4395,7 @@ const Ft = (e, n) => {
|
|
|
4412
4395
|
"empty-state-options": pt.value,
|
|
4413
4396
|
"enable-entity-actions": "",
|
|
4414
4397
|
"error-message": ne.value,
|
|
4415
|
-
fetcher: y(
|
|
4398
|
+
fetcher: y(x),
|
|
4416
4399
|
"fetcher-cache-key": s.value,
|
|
4417
4400
|
"pagination-type": "offset",
|
|
4418
4401
|
"preferences-storage-key": "kong-ui-entities-consumer-groups-list",
|
|
@@ -4425,7 +4408,7 @@ const Ft = (e, n) => {
|
|
|
4425
4408
|
onSort: A
|
|
4426
4409
|
}, {
|
|
4427
4410
|
"toolbar-filter": h(() => [
|
|
4428
|
-
l.value ? G("", !0) : (m(), R(y(
|
|
4411
|
+
l.value ? G("", !0) : (m(), R(y(el), {
|
|
4429
4412
|
key: 0,
|
|
4430
4413
|
modelValue: I.value,
|
|
4431
4414
|
"onUpdate:modelValue": H[0] || (H[0] = (Y) => I.value = Y),
|
|
@@ -4433,11 +4416,11 @@ const Ft = (e, n) => {
|
|
|
4433
4416
|
}, null, 8, ["modelValue", "config"]))
|
|
4434
4417
|
]),
|
|
4435
4418
|
"toolbar-button": h(() => [
|
|
4436
|
-
|
|
4419
|
+
N(y(Xe), {
|
|
4437
4420
|
"auth-function": () => e.canCreate()
|
|
4438
4421
|
}, {
|
|
4439
4422
|
default: h(() => [
|
|
4440
|
-
|
|
4423
|
+
N(le, {
|
|
4441
4424
|
appearance: "primary",
|
|
4442
4425
|
"data-testid": "toolbar-add-consumer-group",
|
|
4443
4426
|
icon: "plus",
|
|
@@ -4445,7 +4428,7 @@ const Ft = (e, n) => {
|
|
|
4445
4428
|
onClick: H[1] || (H[1] = () => e.config.consumerId ? De() : void 0)
|
|
4446
4429
|
}, {
|
|
4447
4430
|
default: h(() => [
|
|
4448
|
-
Z(
|
|
4431
|
+
Z(F(e.config.consumerId ? y(o)("consumer_groups.actions.add_to_group") : y(o)("consumer_groups.list.toolbar_actions.new_consumer_group")), 1)
|
|
4449
4432
|
]),
|
|
4450
4433
|
_: 1
|
|
4451
4434
|
}, 8, ["to"])
|
|
@@ -4454,10 +4437,10 @@ const Ft = (e, n) => {
|
|
|
4454
4437
|
}, 8, ["auth-function"])
|
|
4455
4438
|
]),
|
|
4456
4439
|
name: h(({ rowValue: Y }) => [
|
|
4457
|
-
V("b", null,
|
|
4440
|
+
V("b", null, F(Y ?? "-"), 1)
|
|
4458
4441
|
]),
|
|
4459
4442
|
consumers_count: h(({ rowValue: Y }) => [
|
|
4460
|
-
Z(
|
|
4443
|
+
Z(F(Y ?? "-"), 1)
|
|
4461
4444
|
]),
|
|
4462
4445
|
tags: h(({ rowValue: Y }) => [
|
|
4463
4446
|
(Y == null ? void 0 : Y.length) > 0 ? (m(), R(Ee, { key: 0 }, {
|
|
@@ -4468,48 +4451,48 @@ const Ft = (e, n) => {
|
|
|
4468
4451
|
}, ["stop"]))
|
|
4469
4452
|
}, {
|
|
4470
4453
|
default: h(() => [
|
|
4471
|
-
Z(
|
|
4454
|
+
Z(F(Be), 1)
|
|
4472
4455
|
]),
|
|
4473
4456
|
_: 2
|
|
4474
4457
|
}, 1024))), 128))
|
|
4475
4458
|
]),
|
|
4476
4459
|
_: 2
|
|
4477
|
-
}, 1024)) : (m(), $("span",
|
|
4460
|
+
}, 1024)) : (m(), $("span", hl, "-"))
|
|
4478
4461
|
]),
|
|
4479
4462
|
actions: h(({ row: Y }) => [
|
|
4480
|
-
|
|
4463
|
+
N(Bt, null, {
|
|
4481
4464
|
default: h(({ copyToClipboard: Be }) => [
|
|
4482
|
-
|
|
4465
|
+
N(ze, {
|
|
4483
4466
|
"data-testid": "action-entity-copy-id",
|
|
4484
4467
|
onClick: (fr) => pe(Y, Be)
|
|
4485
4468
|
}, {
|
|
4486
4469
|
default: h(() => [
|
|
4487
|
-
Z(
|
|
4470
|
+
Z(F(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
4488
4471
|
]),
|
|
4489
4472
|
_: 2
|
|
4490
4473
|
}, 1032, ["onClick"])
|
|
4491
4474
|
]),
|
|
4492
4475
|
_: 2
|
|
4493
4476
|
}, 1024),
|
|
4494
|
-
|
|
4477
|
+
N(Bt, null, {
|
|
4495
4478
|
default: h(({ copyToClipboard: Be }) => [
|
|
4496
|
-
|
|
4479
|
+
N(ze, {
|
|
4497
4480
|
"data-testid": "action-entity-copy-json",
|
|
4498
4481
|
onClick: (fr) => z(Y, Be)
|
|
4499
4482
|
}, {
|
|
4500
4483
|
default: h(() => [
|
|
4501
|
-
Z(
|
|
4484
|
+
Z(F(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
4502
4485
|
]),
|
|
4503
4486
|
_: 2
|
|
4504
4487
|
}, 1032, ["onClick"])
|
|
4505
4488
|
]),
|
|
4506
4489
|
_: 2
|
|
4507
4490
|
}, 1024),
|
|
4508
|
-
|
|
4491
|
+
N(y(Xe), {
|
|
4509
4492
|
"auth-function": () => e.canRetrieve(Y)
|
|
4510
4493
|
}, {
|
|
4511
4494
|
default: h(() => [
|
|
4512
|
-
|
|
4495
|
+
N(ze, {
|
|
4513
4496
|
"data-testid": "action-entity-view",
|
|
4514
4497
|
"has-divider": "",
|
|
4515
4498
|
item: K(Y.id)
|
|
@@ -4517,29 +4500,29 @@ const Ft = (e, n) => {
|
|
|
4517
4500
|
]),
|
|
4518
4501
|
_: 2
|
|
4519
4502
|
}, 1032, ["auth-function"]),
|
|
4520
|
-
|
|
4503
|
+
N(y(Xe), {
|
|
4521
4504
|
"auth-function": () => e.canEdit(Y)
|
|
4522
4505
|
}, {
|
|
4523
4506
|
default: h(() => [
|
|
4524
|
-
|
|
4507
|
+
N(ze, {
|
|
4525
4508
|
"data-testid": "action-entity-edit",
|
|
4526
4509
|
item: B(Y.id)
|
|
4527
4510
|
}, null, 8, ["item"])
|
|
4528
4511
|
]),
|
|
4529
4512
|
_: 2
|
|
4530
4513
|
}, 1032, ["auth-function"]),
|
|
4531
|
-
|
|
4514
|
+
N(y(Xe), {
|
|
4532
4515
|
"auth-function": () => e.canDelete(Y)
|
|
4533
4516
|
}, {
|
|
4534
4517
|
default: h(() => [
|
|
4535
|
-
|
|
4518
|
+
N(ze, {
|
|
4536
4519
|
danger: "",
|
|
4537
4520
|
"data-testid": "action-entity-delete",
|
|
4538
4521
|
"has-divider": "",
|
|
4539
4522
|
onClick: () => e.config.consumerId ? _e(Y) : Q(Y)
|
|
4540
4523
|
}, {
|
|
4541
4524
|
default: h(() => [
|
|
4542
|
-
Z(
|
|
4525
|
+
Z(F(e.config.consumerId ? y(o)("consumer_groups.actions.exit") : y(o)("consumer_groups.actions.delete")), 1)
|
|
4543
4526
|
]),
|
|
4544
4527
|
_: 2
|
|
4545
4528
|
}, 1032, ["onClick"])
|
|
@@ -4549,19 +4532,19 @@ const Ft = (e, n) => {
|
|
|
4549
4532
|
]),
|
|
4550
4533
|
_: 1
|
|
4551
4534
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4552
|
-
|
|
4553
|
-
"action-pending":
|
|
4535
|
+
N(y(qs), {
|
|
4536
|
+
"action-pending": j.value,
|
|
4554
4537
|
"data-testid": "delete-consumer-group-modal",
|
|
4555
4538
|
description: y(o)("consumer_groups.delete.description"),
|
|
4556
4539
|
"entity-name": k.value && (k.value.name || k.value.id),
|
|
4557
4540
|
"entity-type": y(yn).ConsumerGroup,
|
|
4558
4541
|
error: P.value,
|
|
4559
4542
|
title: y(o)("consumer_groups.delete.title"),
|
|
4560
|
-
visible:
|
|
4543
|
+
visible: S.value,
|
|
4561
4544
|
onCancel: X,
|
|
4562
4545
|
onProceed: ee
|
|
4563
4546
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
4564
|
-
e.config.consumerId ? (m(), R(
|
|
4547
|
+
e.config.consumerId ? (m(), R(gl, {
|
|
4565
4548
|
key: 0,
|
|
4566
4549
|
config: e.config,
|
|
4567
4550
|
"data-testid": "add-to-group-modal",
|
|
@@ -4580,25 +4563,25 @@ const Ft = (e, n) => {
|
|
|
4580
4563
|
onProceed: dr
|
|
4581
4564
|
}, {
|
|
4582
4565
|
"body-content": h(() => [
|
|
4583
|
-
|
|
4566
|
+
N(y(r), {
|
|
4584
4567
|
class: "exit-modal-message",
|
|
4585
4568
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4586
4569
|
tag: "p"
|
|
4587
4570
|
}, Te({
|
|
4588
4571
|
consumerGroup: h(() => [
|
|
4589
|
-
V("strong", null,
|
|
4572
|
+
V("strong", null, F(U.value.name || U.value.id), 1)
|
|
4590
4573
|
]),
|
|
4591
4574
|
_: 2
|
|
4592
4575
|
}, [
|
|
4593
4576
|
e.config.consumerUsername ? {
|
|
4594
4577
|
name: "consumer",
|
|
4595
4578
|
fn: h(() => [
|
|
4596
|
-
V("strong", null,
|
|
4579
|
+
V("strong", null, F(e.config.consumerUsername), 1)
|
|
4597
4580
|
]),
|
|
4598
4581
|
key: "0"
|
|
4599
4582
|
} : void 0
|
|
4600
4583
|
]), 1032, ["keypath"]),
|
|
4601
|
-
V("p", null,
|
|
4584
|
+
V("p", null, F(y(o)("consumer_groups.consumers.exit.description")), 1)
|
|
4602
4585
|
]),
|
|
4603
4586
|
_: 1
|
|
4604
4587
|
}, 8, ["is-visible", "title"])) : G("", !0)
|
|
@@ -4606,10 +4589,10 @@ const Ft = (e, n) => {
|
|
|
4606
4589
|
};
|
|
4607
4590
|
}
|
|
4608
4591
|
});
|
|
4609
|
-
const
|
|
4592
|
+
const Nl = /* @__PURE__ */ Nt(vl, [["__scopeId", "data-v-e2fa781a"]]), bl = { class: "kong-ui-entities-consumer-group-form" }, Cl = { class: "select-item-label" }, kl = {
|
|
4610
4593
|
key: 0,
|
|
4611
4594
|
class: "select-item-desc"
|
|
4612
|
-
},
|
|
4595
|
+
}, _l = /* @__PURE__ */ re({
|
|
4613
4596
|
__name: "ConsumerGroupForm",
|
|
4614
4597
|
props: {
|
|
4615
4598
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4649,9 +4632,9 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4649
4632
|
} = cr(t.config, (ie = $e.form[(ee = t.config) == null ? void 0 : ee.app]) == null ? void 0 : ie.consumersList, "", {
|
|
4650
4633
|
fetchedItemsKey: "data",
|
|
4651
4634
|
searchKeys: ["username", "custom_id", "id"]
|
|
4652
|
-
}), { axiosInstance: g } =
|
|
4635
|
+
}), { axiosInstance: g } = Ft({
|
|
4653
4636
|
headers: (De = t.config) == null ? void 0 : De.requestHeaders
|
|
4654
|
-
}), { getMessageFromError: f } =
|
|
4637
|
+
}), { getMessageFromError: f } = ll(), I = T(() => u.value.map((_) => ({
|
|
4655
4638
|
label: _.username || _.custom_id,
|
|
4656
4639
|
value: _.id,
|
|
4657
4640
|
selected: a.fields.consumers.includes(_.id),
|
|
@@ -4660,7 +4643,7 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4660
4643
|
}))), v = T(() => {
|
|
4661
4644
|
var _, L;
|
|
4662
4645
|
return (L = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : L.edit;
|
|
4663
|
-
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create),
|
|
4646
|
+
}), p = T(() => t.consumerGroupId ? nt.Edit : nt.Create), x = T(() => !!a.fields.name && !w.value), b = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), C = (_, L = "", oe = "") => {
|
|
4664
4647
|
var D, ge, _e, ce, Ke, Ge;
|
|
4665
4648
|
let U = `${(D = t.config) == null ? void 0 : D.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4666
4649
|
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((ce = t.config) == null ? void 0 : ce.controlPlaneId) || "") : ((Ke = t.config) == null ? void 0 : Ke.app) === "kongManager" && (U = U.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), U = U.replace(/{id}/gi, L || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (U = U.replace(/{consumerId}/gi, oe)), U;
|
|
@@ -4682,7 +4665,7 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4682
4665
|
const { data: ce } = await g.get(C("getConsumers"));
|
|
4683
4666
|
a.fields.consumers = "consumers" in ce ? (_e = ce == null ? void 0 : ce.consumers) == null ? void 0 : _e.map((Ke) => Ke.id) : [];
|
|
4684
4667
|
} catch (ce) {
|
|
4685
|
-
|
|
4668
|
+
S(ce);
|
|
4686
4669
|
}
|
|
4687
4670
|
Object.assign(i, a.fields);
|
|
4688
4671
|
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), K = () => {
|
|
@@ -4691,57 +4674,57 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4691
4674
|
name: a.fields.name,
|
|
4692
4675
|
tags: (L = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((oe) => String(oe || "").trim())) == null ? void 0 : L.filter((oe) => oe !== "")
|
|
4693
4676
|
};
|
|
4694
|
-
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)),
|
|
4677
|
+
}, B = async (_, L = "") => await g.post(C("addConsumer", L, _), { consumer: _ }), k = async (_, L = "") => await g.delete(C("removeConsumer", L, _)), S = (_) => {
|
|
4695
4678
|
a.errorMessage = f(_), n("error", _);
|
|
4696
|
-
},
|
|
4679
|
+
}, j = (_ = t.consumerGroupId) => {
|
|
4697
4680
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4698
4681
|
}, P = (_, L, oe = t.consumerGroupId) => {
|
|
4699
4682
|
const U = _ == null ? void 0 : _.find((D) => D.status !== "fulfilled");
|
|
4700
|
-
U ?
|
|
4683
|
+
U ? S({
|
|
4701
4684
|
code: U.status,
|
|
4702
4685
|
message: L
|
|
4703
|
-
}) :
|
|
4686
|
+
}) : j(oe);
|
|
4704
4687
|
}, J = async () => {
|
|
4705
4688
|
let _ = "";
|
|
4706
4689
|
try {
|
|
4707
4690
|
const { data: L } = await g.post(C("create"), K());
|
|
4708
4691
|
_ = "item" in L ? L.item.id : L.id;
|
|
4709
4692
|
} catch (L) {
|
|
4710
|
-
|
|
4693
|
+
S(L);
|
|
4711
4694
|
}
|
|
4712
4695
|
if (a.fields.consumers.length > 0 && _)
|
|
4713
4696
|
try {
|
|
4714
4697
|
const L = a.fields.consumers.map((U) => B(U, _)), oe = await Promise.allSettled(L);
|
|
4715
4698
|
P(oe, r("consumer_groups.errors.add_consumer"), _);
|
|
4716
4699
|
} catch (L) {
|
|
4717
|
-
|
|
4700
|
+
S(L);
|
|
4718
4701
|
}
|
|
4719
4702
|
else
|
|
4720
|
-
a.fields.consumers.length === 0 && _ &&
|
|
4703
|
+
a.fields.consumers.length === 0 && _ && j(_);
|
|
4721
4704
|
}, Q = async () => {
|
|
4722
4705
|
var oe;
|
|
4723
4706
|
try {
|
|
4724
4707
|
((oe = t.config) == null ? void 0 : oe.app) === "konnect" ? await g.put(C("edit"), K()) : await g.patch(C("edit"), K());
|
|
4725
4708
|
} catch (U) {
|
|
4726
|
-
|
|
4709
|
+
S(U);
|
|
4727
4710
|
}
|
|
4728
4711
|
const _ = a.fields.consumers.filter((U) => !i.consumers.includes(U)), L = i.consumers.filter((U) => !a.fields.consumers.includes(U));
|
|
4729
4712
|
if (L.length === 0 && _.length === 0)
|
|
4730
|
-
|
|
4713
|
+
j();
|
|
4731
4714
|
else {
|
|
4732
4715
|
if (L.length > 0)
|
|
4733
4716
|
try {
|
|
4734
4717
|
const U = L.map((ge) => k(ge)), D = await Promise.allSettled(U);
|
|
4735
4718
|
P(D, r("consumer_groups.errors.remove_consumer"));
|
|
4736
4719
|
} catch (U) {
|
|
4737
|
-
|
|
4720
|
+
S(U);
|
|
4738
4721
|
}
|
|
4739
4722
|
if (_.length > 0)
|
|
4740
4723
|
try {
|
|
4741
4724
|
const U = _.map((ge) => B(ge)), D = await Promise.allSettled(U);
|
|
4742
4725
|
P(D, r("consumer_groups.errors.add_consumer"));
|
|
4743
4726
|
} catch (U) {
|
|
4744
|
-
|
|
4727
|
+
S(U);
|
|
4745
4728
|
}
|
|
4746
4729
|
}
|
|
4747
4730
|
}, X = async () => {
|
|
@@ -4755,9 +4738,9 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4755
4738
|
await d();
|
|
4756
4739
|
}), (_, L) => {
|
|
4757
4740
|
const oe = q("KInput"), U = q("KMultiselect");
|
|
4758
|
-
return m(), $("div",
|
|
4759
|
-
|
|
4760
|
-
"can-submit":
|
|
4741
|
+
return m(), $("div", bl, [
|
|
4742
|
+
N(y(Ts), {
|
|
4743
|
+
"can-submit": x.value && b.value,
|
|
4761
4744
|
config: e.config,
|
|
4762
4745
|
"edit-id": e.consumerGroupId,
|
|
4763
4746
|
"error-message": a.errorMessage || y(c) || w.value,
|
|
@@ -4770,12 +4753,12 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4770
4753
|
onSubmit: X
|
|
4771
4754
|
}, {
|
|
4772
4755
|
default: h(() => [
|
|
4773
|
-
|
|
4756
|
+
N(y(dn), {
|
|
4774
4757
|
description: y(r)("consumer_groups.form.general_info.description"),
|
|
4775
4758
|
title: y(r)("consumer_groups.form.general_info.title")
|
|
4776
4759
|
}, {
|
|
4777
4760
|
default: h(() => [
|
|
4778
|
-
|
|
4761
|
+
N(oe, {
|
|
4779
4762
|
modelValue: a.fields.name,
|
|
4780
4763
|
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.fields.name = D),
|
|
4781
4764
|
modelModifiers: { trim: !0 },
|
|
@@ -4786,7 +4769,7 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4786
4769
|
required: "",
|
|
4787
4770
|
type: "text"
|
|
4788
4771
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
4789
|
-
|
|
4772
|
+
N(oe, {
|
|
4790
4773
|
modelValue: a.fields.tags,
|
|
4791
4774
|
"onUpdate:modelValue": L[1] || (L[1] = (D) => a.fields.tags = D),
|
|
4792
4775
|
modelModifiers: { trim: !0 },
|
|
@@ -4804,13 +4787,13 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4804
4787
|
]),
|
|
4805
4788
|
_: 1
|
|
4806
4789
|
}, 8, ["description", "title"]),
|
|
4807
|
-
|
|
4790
|
+
N(y(dn), {
|
|
4808
4791
|
description: y(r)("consumer_groups.form.consumers.description"),
|
|
4809
4792
|
"has-divider": "",
|
|
4810
4793
|
title: y(r)("consumer_groups.form.consumers.title")
|
|
4811
4794
|
}, {
|
|
4812
4795
|
default: h(() => [
|
|
4813
|
-
|
|
4796
|
+
N(U, {
|
|
4814
4797
|
modelValue: a.fields.consumers,
|
|
4815
4798
|
"onUpdate:modelValue": L[2] || (L[2] = (D) => a.fields.consumers = D),
|
|
4816
4799
|
appearance: "select",
|
|
@@ -4826,8 +4809,8 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4826
4809
|
"item-template": h(({ item: D }) => {
|
|
4827
4810
|
var ge, _e, ce;
|
|
4828
4811
|
return [
|
|
4829
|
-
V("div",
|
|
4830
|
-
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (m(), $("div",
|
|
4812
|
+
V("div", Cl, F(D.label), 1),
|
|
4813
|
+
(ge = D == null ? void 0 : D.data) != null && ge.username && ((_e = D == null ? void 0 : D.data) != null && _e.custom_id) ? (m(), $("div", kl, F((ce = D == null ? void 0 : D.data) == null ? void 0 : ce.custom_id), 1)) : G("", !0)
|
|
4831
4814
|
];
|
|
4832
4815
|
}),
|
|
4833
4816
|
_: 1
|
|
@@ -4842,7 +4825,7 @@ const Pl = /* @__PURE__ */ Ft(kl, [["__scopeId", "data-v-e2fa781a"]]), _l = { cl
|
|
|
4842
4825
|
};
|
|
4843
4826
|
}
|
|
4844
4827
|
});
|
|
4845
|
-
const
|
|
4828
|
+
const Kl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { class: "kong-ui-consumer-group-entity-config-card" }, Bl = /* @__PURE__ */ re({
|
|
4846
4829
|
__name: "ConsumerGroupConfigCard",
|
|
4847
4830
|
props: {
|
|
4848
4831
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4878,8 +4861,8 @@ const Ll = /* @__PURE__ */ Ft(Al, [["__scopeId", "data-v-102d40d2"]]), Sl = { cl
|
|
|
4878
4861
|
tooltip: t("consumer_groups.form.fields.tags.tooltip")
|
|
4879
4862
|
}
|
|
4880
4863
|
});
|
|
4881
|
-
return (a, i) => (m(), $("div",
|
|
4882
|
-
|
|
4864
|
+
return (a, i) => (m(), $("div", wl, [
|
|
4865
|
+
N(y(Is), {
|
|
4883
4866
|
config: e.config,
|
|
4884
4867
|
"config-card-doc": e.configCardDoc,
|
|
4885
4868
|
"config-schema": o.value,
|
|
@@ -4895,7 +4878,7 @@ const Ll = /* @__PURE__ */ Ft(Al, [["__scopeId", "data-v-102d40d2"]]), Sl = { cl
|
|
|
4895
4878
|
}
|
|
4896
4879
|
});
|
|
4897
4880
|
export {
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4881
|
+
Bl as ConsumerGroupConfigCard,
|
|
4882
|
+
Kl as ConsumerGroupForm,
|
|
4883
|
+
Nl as ConsumerGroupList
|
|
4901
4884
|
};
|