@kong-ui-public/entities-shared 3.10.16 → 3.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +1145 -1137
- package/dist/entities-shared.umd.js +40 -40
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts +14 -5
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/dist/types/composables/useFetcher.d.ts +1 -0
- package/dist/types/composables/useFetcher.d.ts.map +1 -1
- package/dist/types/types/entity-base-table.d.ts +4 -0
- package/dist/types/types/entity-base-table.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { BadgeMethodAppearances as
|
|
5
|
-
import { BookIcon as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
var
|
|
8
|
-
const
|
|
1
|
+
import { inject as Rt, ref as B, computed as $, unref as T, watch as ge, toValue as Bn, provide as Bt, toRef as Kn, defineComponent as z, openBlock as v, createBlock as D, resolveDynamicComponent as De, normalizeClass as fe, withCtx as C, createElementBlock as R, createElementVNode as M, toDisplayString as K, createCommentVNode as q, Fragment as le, renderList as oe, resolveComponent as j, createVNode as N, createTextVNode as V, useCssVars as Kt, useSlots as et, renderSlot as W, createSlots as ke, normalizeProps as Nn, guardReactiveProps as Mn, mergeProps as Dn, onBeforeMount as Nt, withModifiers as Le, onMounted as jn, onUnmounted as Un, withDirectives as ye, vShow as ve, withKeys as Pn, Teleport as qn } from "vue";
|
|
2
|
+
import ut from "axios";
|
|
3
|
+
import { createI18n as Hn, i18nTComponent as Yn } from "@kong-ui-public/i18n";
|
|
4
|
+
import { BadgeMethodAppearances as Vn, KTruncate as Wn, KBadge as Jn } from "@kong/kongponents";
|
|
5
|
+
import { BookIcon as Gn, AddIcon as zn, CloseIcon as Qn, ChevronDownIcon as Zn, CopyIcon as Xn } from "@kong/icons";
|
|
6
|
+
import { useRouter as er } from "vue-router";
|
|
7
|
+
var tr = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(tr || {}), nr = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(nr || {}), ue = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(ue || {}), tt = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Other = "other", e))(tt || {});
|
|
8
|
+
const je = Object.values(tt);
|
|
9
9
|
var P = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(P || {}), ie = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ie || {});
|
|
10
|
-
function
|
|
10
|
+
function rr() {
|
|
11
11
|
return {
|
|
12
12
|
getAxiosInstance: (e = {}) => {
|
|
13
13
|
try {
|
|
14
|
-
const t =
|
|
15
|
-
return typeof t == "function" ? t(e) :
|
|
14
|
+
const t = Rt("get-axios-instance", void 0);
|
|
15
|
+
return typeof t == "function" ? t(e) : ut.create({
|
|
16
16
|
withCredentials: !0,
|
|
17
17
|
timeout: 3e4,
|
|
18
18
|
...e
|
|
19
19
|
});
|
|
20
20
|
} catch (t) {
|
|
21
|
-
return console.warn("getAxiosInstance:", t.message || t),
|
|
21
|
+
return console.warn("getAxiosInstance:", t.message || t), ut.create({
|
|
22
22
|
withCredentials: !0,
|
|
23
23
|
timeout: 3e4,
|
|
24
24
|
...e
|
|
@@ -31,7 +31,7 @@ function nr() {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ir() {
|
|
35
35
|
return {
|
|
36
36
|
debounce: (e, t) => {
|
|
37
37
|
let n;
|
|
@@ -43,13 +43,13 @@ function rr() {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const qe = "khcp-user-table-preferences", ar = {
|
|
47
47
|
pageSize: 30,
|
|
48
48
|
sortColumnKey: void 0,
|
|
49
49
|
sortColumnOrder: void 0,
|
|
50
50
|
columnVisibility: {}
|
|
51
51
|
};
|
|
52
|
-
function
|
|
52
|
+
function or() {
|
|
53
53
|
const e = (n) => {
|
|
54
54
|
if (typeof n == "string")
|
|
55
55
|
try {
|
|
@@ -59,44 +59,44 @@ function ar() {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
}, t = () => {
|
|
62
|
-
const n = e(localStorage.getItem(
|
|
62
|
+
const n = e(localStorage.getItem(qe));
|
|
63
63
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
64
64
|
};
|
|
65
65
|
return {
|
|
66
66
|
setTablePreferences: (n, r) => {
|
|
67
67
|
try {
|
|
68
68
|
const i = t();
|
|
69
|
-
i.set(n, r), localStorage.setItem(
|
|
69
|
+
i.set(n, r), localStorage.setItem(qe, JSON.stringify(Object.fromEntries(i.entries())));
|
|
70
70
|
} catch (i) {
|
|
71
71
|
console.error("useTablePreferences(setTablePreferences)", i);
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
getTablePreferences: (n, r) => {
|
|
75
75
|
const i = t();
|
|
76
|
-
return (i == null ? void 0 : i.get(n)) || void 0 || r ||
|
|
76
|
+
return (i == null ? void 0 : i.get(n)) || void 0 || r || ar;
|
|
77
77
|
},
|
|
78
78
|
deleteAllTablePreferences: () => {
|
|
79
|
-
localStorage.removeItem(
|
|
79
|
+
localStorage.removeItem(qe);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const { getAxiosInstance: t } =
|
|
83
|
+
function nt(e = {}) {
|
|
84
|
+
const { getAxiosInstance: t } = rr();
|
|
85
85
|
return {
|
|
86
86
|
axiosInstance: t(e)
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
const
|
|
89
|
+
const lr = {
|
|
90
90
|
actions: {
|
|
91
91
|
copyId: "Copy ID",
|
|
92
92
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
93
93
|
copyToClipboard: "Copied successfully!",
|
|
94
94
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, cr = {
|
|
97
97
|
message: "Are you sure you want to delete this {entityType}?",
|
|
98
98
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
99
|
-
},
|
|
99
|
+
}, sr = {
|
|
100
100
|
actions: {
|
|
101
101
|
viewConfiguration: "View Configuration",
|
|
102
102
|
save: "Save",
|
|
@@ -113,13 +113,13 @@ const or = {
|
|
|
113
113
|
errors: {
|
|
114
114
|
edit: "The entity could not be edited at this time."
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, ur = {
|
|
117
117
|
emptyState: {
|
|
118
118
|
noSearchResultsTitle: "No results found",
|
|
119
119
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
120
120
|
noSearchResultsCtaText: "Clear"
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, dr = {
|
|
123
123
|
title: "Configuration",
|
|
124
124
|
actions: {
|
|
125
125
|
copy: "Copy JSON"
|
|
@@ -154,7 +154,7 @@ const or = {
|
|
|
154
154
|
entryTitle: "Entry {index}",
|
|
155
155
|
structuredFormat: "Structured"
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, fr = {
|
|
158
158
|
filterButtonText: "Filter",
|
|
159
159
|
fieldLabel: "Filter by:",
|
|
160
160
|
inputPlaceholder: "Enter a value",
|
|
@@ -162,17 +162,17 @@ const or = {
|
|
|
162
162
|
applyButtonText: "Apply",
|
|
163
163
|
clearButtonText: "Clear",
|
|
164
164
|
clearAllButtonText: "Clear all filters"
|
|
165
|
-
},
|
|
165
|
+
}, pr = {
|
|
166
166
|
errors: {
|
|
167
167
|
fetch: "Could not fetch available items",
|
|
168
168
|
invalid: "Please select a valid value"
|
|
169
169
|
}
|
|
170
|
-
},
|
|
170
|
+
}, mr = {
|
|
171
171
|
unexpected: "An unexpected error has occurred",
|
|
172
172
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
173
|
-
}, mr = {
|
|
174
|
-
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
175
173
|
}, hr = {
|
|
174
|
+
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
175
|
+
}, gr = {
|
|
176
176
|
enable: {
|
|
177
177
|
title: "Enable {entityType}",
|
|
178
178
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -183,33 +183,33 @@ const or = {
|
|
|
183
183
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
184
184
|
confirmText: "Yes, disable"
|
|
185
185
|
}
|
|
186
|
-
},
|
|
187
|
-
global:
|
|
188
|
-
deleteModal:
|
|
189
|
-
baseForm:
|
|
190
|
-
baseTable:
|
|
191
|
-
baseConfigCard:
|
|
192
|
-
filter:
|
|
193
|
-
debouncedFilter:
|
|
194
|
-
errors:
|
|
195
|
-
validationErrors:
|
|
196
|
-
toggleModal:
|
|
186
|
+
}, yr = {
|
|
187
|
+
global: lr,
|
|
188
|
+
deleteModal: cr,
|
|
189
|
+
baseForm: sr,
|
|
190
|
+
baseTable: ur,
|
|
191
|
+
baseConfigCard: dr,
|
|
192
|
+
filter: fr,
|
|
193
|
+
debouncedFilter: pr,
|
|
194
|
+
errors: mr,
|
|
195
|
+
validationErrors: hr,
|
|
196
|
+
toggleModal: gr
|
|
197
197
|
};
|
|
198
|
-
function
|
|
199
|
-
const e =
|
|
198
|
+
function Ue() {
|
|
199
|
+
const e = Hn("en-us", yr);
|
|
200
200
|
return {
|
|
201
201
|
i18n: e,
|
|
202
|
-
i18nT:
|
|
202
|
+
i18nT: Yn(e)
|
|
203
203
|
// Translation component <i18n-t>
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Mt() {
|
|
207
207
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
208
208
|
if (o.length !== a.length) return !1;
|
|
209
209
|
const l = /* @__PURE__ */ new Set([...o, ...a]);
|
|
210
210
|
for (const c of l) {
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
211
|
+
const u = o.filter((s) => s === c).length, d = a.filter((s) => s === c).length;
|
|
212
|
+
if (u !== d) return !1;
|
|
213
213
|
}
|
|
214
214
|
return !0;
|
|
215
215
|
};
|
|
@@ -239,98 +239,98 @@ function Kt() {
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
sortAlpha: (o) => (a, l) => {
|
|
242
|
-
let c = a[o] === void 0 || a[o] === null ? "" : a[o],
|
|
243
|
-
return Array.isArray(a[o]) && (c = a[o][0]), Array.isArray(l[o]) && (
|
|
242
|
+
let c = a[o] === void 0 || a[o] === null ? "" : a[o], u = l[o] === void 0 || l[o] === null ? "" : l[o];
|
|
243
|
+
return Array.isArray(a[o]) && (c = a[o][0]), Array.isArray(l[o]) && (u = l[o][0]), c.localeCompare(u);
|
|
244
244
|
},
|
|
245
245
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function vr(e, t, n, r = {
|
|
249
249
|
fetchedItemsKey: "data",
|
|
250
250
|
searchKeys: ["id"]
|
|
251
251
|
}) {
|
|
252
252
|
n || (n = "1000");
|
|
253
|
-
const { axiosInstance: i } =
|
|
254
|
-
await
|
|
255
|
-
}, 200), c =
|
|
256
|
-
const
|
|
257
|
-
return e.app === "konnect" ?
|
|
258
|
-
}), { isValidUuid:
|
|
253
|
+
const { axiosInstance: i } = nt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } = ir(), l = a(async (L) => {
|
|
254
|
+
await y(L);
|
|
255
|
+
}, 200), c = B(!1), u = B(""), d = B(""), s = B([]), p = B([]), f = B(void 0), g = $(() => {
|
|
256
|
+
const L = `${e.apiBaseUrl}${T(t)}`;
|
|
257
|
+
return e.app === "konnect" ? L.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? L.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : L;
|
|
258
|
+
}), { isValidUuid: h } = Mt(), x = async () => {
|
|
259
259
|
try {
|
|
260
260
|
c.value = !0;
|
|
261
|
-
const { data:
|
|
262
|
-
|
|
261
|
+
const { data: L } = await i.get(`${g.value}?size=${n}`);
|
|
262
|
+
L != null && L.next || (f.value = r.fetchedItemsKey in L ? L[r.fetchedItemsKey] : []), p.value = r.fetchedItemsKey in L ? L[r.fetchedItemsKey] : [], s.value = p.value;
|
|
263
263
|
} catch {
|
|
264
|
-
|
|
264
|
+
s.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
265
265
|
} finally {
|
|
266
266
|
c.value = !1;
|
|
267
267
|
}
|
|
268
|
-
}, E =
|
|
269
|
-
var
|
|
270
|
-
if (E.value !==
|
|
271
|
-
if (E.value =
|
|
272
|
-
|
|
268
|
+
}, E = B(""), y = async (L) => {
|
|
269
|
+
var F, I, m;
|
|
270
|
+
if (E.value !== L) {
|
|
271
|
+
if (E.value = L ?? "", !L) {
|
|
272
|
+
s.value = p.value;
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
275
|
if (f.value === void 0)
|
|
276
276
|
try {
|
|
277
|
-
if (c.value = !0,
|
|
278
|
-
const A = `${
|
|
279
|
-
r.fetchedItemsKey in S ?
|
|
277
|
+
if (c.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
278
|
+
const A = `${g.value}/${L}`, { data: S } = await i.get(`${A}?size=${n}`);
|
|
279
|
+
r.fetchedItemsKey in S ? s.value = S[r.fetchedItemsKey] : S != null && S[r.exactMatchKey ?? "id"] ? s.value = [S] : s.value = [];
|
|
280
280
|
} else {
|
|
281
281
|
const A = [];
|
|
282
|
-
|
|
283
|
-
const { data:
|
|
284
|
-
return [
|
|
282
|
+
h(L) && r.searchKeys.includes("id") ? A.push((async () => {
|
|
283
|
+
const { data: b } = await i.get(`${g.value}/${L}`);
|
|
284
|
+
return [b[r.fetchedItemsKey] ?? b];
|
|
285
285
|
})()) : A.push(
|
|
286
|
-
...r.searchKeys.filter((
|
|
287
|
-
const { data: _ } = await i.get(`${
|
|
286
|
+
...r.searchKeys.filter((b) => b !== "id").map(async (b) => {
|
|
287
|
+
const { data: _ } = await i.get(`${g.value}?${b}=${L}`);
|
|
288
288
|
return _[r.fetchedItemsKey];
|
|
289
289
|
})
|
|
290
290
|
);
|
|
291
291
|
const S = await Promise.all(A), w = /* @__PURE__ */ new Set();
|
|
292
|
-
|
|
292
|
+
s.value = [], (F = S == null ? void 0 : S.forEach) == null || F.call(S, (b) => {
|
|
293
293
|
var _;
|
|
294
|
-
(_ =
|
|
295
|
-
w.has(
|
|
294
|
+
(_ = b == null ? void 0 : b.forEach) == null || _.call(b, (O) => {
|
|
295
|
+
w.has(O.id) || (w.add(O.id), s.value.push(O));
|
|
296
296
|
});
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
} catch (A) {
|
|
300
|
-
((
|
|
300
|
+
((I = A == null ? void 0 : A.response) == null ? void 0 : I.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (s.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
301
301
|
} finally {
|
|
302
302
|
c.value = !1;
|
|
303
303
|
}
|
|
304
304
|
else
|
|
305
|
-
c.value = !0, d.value = "",
|
|
305
|
+
c.value = !0, d.value = "", s.value = (m = f.value) == null ? void 0 : m.filter((A) => {
|
|
306
306
|
var w;
|
|
307
307
|
let S = !1;
|
|
308
|
-
for (const
|
|
309
|
-
const _ = typeof A[
|
|
310
|
-
_ != null && _.includes(
|
|
308
|
+
for (const b of r.searchKeys) {
|
|
309
|
+
const _ = typeof A[b] == "string" ? (w = A[b]) == null ? void 0 : w.toLowerCase() : A[b];
|
|
310
|
+
_ != null && _.includes(L.toLowerCase()) && (S = !0);
|
|
311
311
|
}
|
|
312
312
|
return S;
|
|
313
|
-
}), (!
|
|
313
|
+
}), (!s.value || !s.value.length) && (d.value = o("debouncedFilter.errors.invalid")), c.value = !1;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
return {
|
|
317
317
|
loading: c,
|
|
318
|
-
error:
|
|
318
|
+
error: u,
|
|
319
319
|
validationError: d,
|
|
320
|
-
results:
|
|
320
|
+
results: s,
|
|
321
321
|
allRecords: f,
|
|
322
322
|
loadItems: x,
|
|
323
323
|
debouncedQueryChange: l
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
const n =
|
|
326
|
+
function br(e, t) {
|
|
327
|
+
const n = T(t), r = $(
|
|
328
328
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
329
329
|
);
|
|
330
330
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
const { i18n: { t: e } } =
|
|
332
|
+
function xr() {
|
|
333
|
+
const { i18n: { t: e } } = Ue();
|
|
334
334
|
return {
|
|
335
335
|
getMessageFromError: (n) => {
|
|
336
336
|
var r, i, o, a;
|
|
@@ -359,7 +359,7 @@ function br() {
|
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Cr(e) {
|
|
363
363
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
364
364
|
try {
|
|
365
365
|
const r = e.join("/"), i = `${n}${r}`, o = e.some((l) => l.trim() === "");
|
|
@@ -370,124 +370,127 @@ function xr(e) {
|
|
|
370
370
|
return console.warn("Failed to build valid URL:", r), "";
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
373
|
+
function Dt(e, t) {
|
|
374
|
+
const n = B(T(e)), r = B(T(t)), i = $(
|
|
375
375
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
376
376
|
), o = $(
|
|
377
377
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
378
378
|
);
|
|
379
379
|
return (a) => {
|
|
380
|
-
const { page: l, pageSize: c, offset:
|
|
380
|
+
const { page: l, pageSize: c, offset: u, sortColumnKey: d, sortColumnOrder: s, query: p } = a;
|
|
381
381
|
try {
|
|
382
382
|
let f = new URL(o.value.href);
|
|
383
|
-
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((
|
|
384
|
-
f.searchParams.append(
|
|
385
|
-
}), d && f.searchParams.append("sort_by", d),
|
|
383
|
+
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((g, h) => {
|
|
384
|
+
f.searchParams.append(h, g);
|
|
385
|
+
}), d && f.searchParams.append("sort_by", d), s === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(c))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
386
386
|
} catch (f) {
|
|
387
387
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
const Fe = /* @__PURE__ */ new Map();
|
|
392
|
+
function Ar(e, t, n) {
|
|
393
|
+
const r = B(!0), i = T(t), { axiosInstance: o } = nt(e.axiosRequestConfig), a = Dt(e, i), l = B({
|
|
393
394
|
status: ue.Idle
|
|
394
|
-
})
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const d = Rn(n) || "data";
|
|
395
|
+
}), c = async (s) => {
|
|
396
|
+
var f;
|
|
397
|
+
const p = Bn(n) || "data";
|
|
398
398
|
try {
|
|
399
399
|
l.value = r.value ? { status: ue.InitialLoad } : { status: ue.Loading }, r.value = !1;
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
throw
|
|
405
|
-
const
|
|
406
|
-
let
|
|
407
|
-
|
|
408
|
-
const
|
|
409
|
-
data:
|
|
410
|
-
total:
|
|
411
|
-
...
|
|
400
|
+
let g = a(s);
|
|
401
|
+
g.includes("filter[name]") && (g = `${g}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
402
|
+
const h = await o.get(g);
|
|
403
|
+
if (h.status >= 400)
|
|
404
|
+
throw h;
|
|
405
|
+
const x = h.data, E = p && p.replace(/[^\w-_]/gi, "");
|
|
406
|
+
let y;
|
|
407
|
+
x[E] ? y = Array.isArray(x[E]) ? x[E] : [x[E]] : Array.isArray(x) ? y = x : y = Object.keys(x).length ? [x] : [];
|
|
408
|
+
const L = {
|
|
409
|
+
data: y,
|
|
410
|
+
total: y.length,
|
|
411
|
+
...x.offset ? {
|
|
412
412
|
pagination: {
|
|
413
|
-
offset:
|
|
413
|
+
offset: x.offset
|
|
414
414
|
}
|
|
415
415
|
} : null
|
|
416
416
|
};
|
|
417
|
-
return
|
|
417
|
+
return L.data.length === 0 && !s.query ? l.value = {
|
|
418
418
|
status: ue.NoRecords,
|
|
419
|
-
response:
|
|
419
|
+
response: L
|
|
420
420
|
} : l.value = {
|
|
421
421
|
status: ue.Idle,
|
|
422
|
-
response:
|
|
423
|
-
},
|
|
424
|
-
} catch (
|
|
425
|
-
const
|
|
422
|
+
response: L
|
|
423
|
+
}, L;
|
|
424
|
+
} catch (g) {
|
|
425
|
+
const h = {
|
|
426
426
|
data: [],
|
|
427
427
|
total: 0
|
|
428
428
|
};
|
|
429
|
-
return s.query && (((
|
|
429
|
+
return s.query && (((f = g.response) == null ? void 0 : f.status) === 404 || g.status === 404) ? (l.value = {
|
|
430
430
|
status: ue.NoResults,
|
|
431
|
-
response:
|
|
432
|
-
error:
|
|
433
|
-
},
|
|
431
|
+
response: h,
|
|
432
|
+
error: g.response ? g : { response: g }
|
|
433
|
+
}, h) : (l.value = {
|
|
434
434
|
status: ue.Error,
|
|
435
|
-
response:
|
|
436
|
-
error:
|
|
437
|
-
},
|
|
435
|
+
response: h,
|
|
436
|
+
error: g.response ? g : { response: g }
|
|
437
|
+
}, h);
|
|
438
438
|
}
|
|
439
|
-
},
|
|
439
|
+
}, u = e.cacheIdentifier, d = B(1);
|
|
440
|
+
return u && (Fe.has(u) ? d.value = Fe.get(u) : Fe.set(u, d.value)), ge(d, (s) => {
|
|
441
|
+
u && Fe.set(u, s);
|
|
442
|
+
}), { fetcher: c, fetcherState: l, fetcherCacheKey: d };
|
|
440
443
|
}
|
|
441
|
-
function
|
|
444
|
+
function kr() {
|
|
442
445
|
const e = (r, i = "_") => r ? r.split(i).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
443
446
|
return {
|
|
444
447
|
capitalize: (r) => r ? r.replace(t, (i) => i.toUpperCase()) : "",
|
|
445
448
|
convertKeyToTitle: e
|
|
446
449
|
};
|
|
447
450
|
}
|
|
448
|
-
const
|
|
451
|
+
const jt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, dt = (e) => {
|
|
449
452
|
if (typeof e != "string")
|
|
450
453
|
throw new TypeError("Invalid argument expected string");
|
|
451
|
-
const t = e.match(
|
|
454
|
+
const t = e.match(jt);
|
|
452
455
|
if (!t)
|
|
453
456
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
454
457
|
return t.shift(), t;
|
|
455
|
-
},
|
|
458
|
+
}, ft = (e) => e === "*" || e === "x" || e === "X", pt = (e) => {
|
|
456
459
|
const t = parseInt(e, 10);
|
|
457
460
|
return isNaN(t) ? e : t;
|
|
458
|
-
},
|
|
459
|
-
if (
|
|
461
|
+
}, _r = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], wr = (e, t) => {
|
|
462
|
+
if (ft(e) || ft(t))
|
|
460
463
|
return 0;
|
|
461
|
-
const [n, r] =
|
|
464
|
+
const [n, r] = _r(pt(e), pt(t));
|
|
462
465
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
463
|
-
},
|
|
466
|
+
}, mt = (e, t) => {
|
|
464
467
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
465
|
-
const r =
|
|
468
|
+
const r = wr(e[n] || "0", t[n] || "0");
|
|
466
469
|
if (r !== 0)
|
|
467
470
|
return r;
|
|
468
471
|
}
|
|
469
472
|
return 0;
|
|
470
|
-
},
|
|
471
|
-
const n =
|
|
472
|
-
return a !== 0 ? a : i && o ?
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
const r =
|
|
476
|
-
return
|
|
477
|
-
},
|
|
473
|
+
}, Sr = (e, t) => {
|
|
474
|
+
const n = dt(e), r = dt(t), i = n.pop(), o = r.pop(), a = mt(n, r);
|
|
475
|
+
return a !== 0 ? a : i && o ? mt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
476
|
+
}, ht = (e, t, n) => {
|
|
477
|
+
Ir(n);
|
|
478
|
+
const r = Sr(e, t);
|
|
479
|
+
return Ut[n].includes(r);
|
|
480
|
+
}, Ut = {
|
|
478
481
|
">": [1],
|
|
479
482
|
">=": [0, 1],
|
|
480
483
|
"=": [0],
|
|
481
484
|
"<=": [-1, 0],
|
|
482
485
|
"<": [-1],
|
|
483
486
|
"!=": [-1, 1]
|
|
484
|
-
},
|
|
487
|
+
}, gt = Object.keys(Ut), Ir = (e) => {
|
|
485
488
|
if (typeof e != "string")
|
|
486
489
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
487
|
-
if (
|
|
488
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
489
|
-
}, Tr = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
490
|
-
function
|
|
490
|
+
if (gt.indexOf(e) === -1)
|
|
491
|
+
throw new Error(`Invalid operator, expected one of ${gt.join("|")}`);
|
|
492
|
+
}, Tr = (e) => typeof e == "string" && /^[v\d]/.test(e) && jt.test(e);
|
|
493
|
+
function $r(e) {
|
|
491
494
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
492
495
|
if (!t)
|
|
493
496
|
return !0;
|
|
@@ -498,48 +501,48 @@ function Ir(e) {
|
|
|
498
501
|
if (!o)
|
|
499
502
|
return !1;
|
|
500
503
|
const [a, l] = o;
|
|
501
|
-
return !(a &&
|
|
504
|
+
return !(a && ht(i, a, "<") || l && ht(i, l, ">"));
|
|
502
505
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
505
|
-
return
|
|
506
|
+
function Er(e) {
|
|
507
|
+
const t = B(0), n = B(0), r = B(!1);
|
|
508
|
+
return ge(e, (o) => {
|
|
506
509
|
o && !r.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, r.value = !0);
|
|
507
510
|
}), {
|
|
508
511
|
isTruncated: $(() => t.value < n.value)
|
|
509
512
|
};
|
|
510
513
|
}
|
|
511
|
-
function
|
|
512
|
-
const { i18n: { t: e } } =
|
|
514
|
+
function Fr() {
|
|
515
|
+
const { i18n: { t: e } } = Ue();
|
|
513
516
|
return {
|
|
514
517
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
515
518
|
};
|
|
516
519
|
}
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
},
|
|
520
|
+
const Je = Symbol("schema"), Or = (e) => {
|
|
521
|
+
Bt(Je, e);
|
|
522
|
+
}, Lr = (e) => {
|
|
520
523
|
var i, o;
|
|
521
|
-
const t =
|
|
522
|
-
return
|
|
524
|
+
const t = Rt(Je, void 0), n = (o = (i = t == null ? void 0 : t.value) == null ? void 0 : i.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), r = Kn(n == null ? void 0 : n[e]);
|
|
525
|
+
return Bt(Je, r), r;
|
|
523
526
|
}, H = {
|
|
524
|
-
useAxios:
|
|
525
|
-
useDebouncedFilter:
|
|
526
|
-
useDeleteUrlBuilder:
|
|
527
|
-
useErrors:
|
|
528
|
-
useExternalLinkCreator:
|
|
529
|
-
useFetcher:
|
|
530
|
-
useFetchUrlBuilder:
|
|
531
|
-
useHelpers:
|
|
532
|
-
useStringHelpers:
|
|
533
|
-
useI18n:
|
|
534
|
-
useGatewayFeatureSupported:
|
|
535
|
-
useTruncationDetector:
|
|
536
|
-
useValidators:
|
|
527
|
+
useAxios: nt,
|
|
528
|
+
useDebouncedFilter: vr,
|
|
529
|
+
useDeleteUrlBuilder: br,
|
|
530
|
+
useErrors: xr,
|
|
531
|
+
useExternalLinkCreator: Cr,
|
|
532
|
+
useFetcher: Ar,
|
|
533
|
+
useFetchUrlBuilder: Dt,
|
|
534
|
+
useHelpers: Mt,
|
|
535
|
+
useStringHelpers: kr,
|
|
536
|
+
useI18n: Ue,
|
|
537
|
+
useGatewayFeatureSupported: $r,
|
|
538
|
+
useTruncationDetector: Er,
|
|
539
|
+
useValidators: Fr,
|
|
537
540
|
useSchemaProvider: Or,
|
|
538
|
-
useSubSchema:
|
|
539
|
-
},
|
|
541
|
+
useSubSchema: Lr
|
|
542
|
+
}, Rr = {
|
|
540
543
|
key: 0,
|
|
541
544
|
class: "config-card-fieldset-title"
|
|
542
|
-
},
|
|
545
|
+
}, Br = /* @__PURE__ */ z({
|
|
543
546
|
__name: "JsonCardItem",
|
|
544
547
|
props: {
|
|
545
548
|
item: {
|
|
@@ -563,18 +566,18 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
563
566
|
var c;
|
|
564
567
|
return t.isArrayItem ? (c = o.value) != null && c.name ? r(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
565
568
|
});
|
|
566
|
-
return (c,
|
|
569
|
+
return (c, u) => (v(), D(De(e.isArrayItem ? "fieldset" : "div"), {
|
|
567
570
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
568
571
|
}, {
|
|
569
572
|
default: C(() => [
|
|
570
|
-
e.isArrayItem ? (
|
|
571
|
-
M("b", null,
|
|
573
|
+
e.isArrayItem ? (v(), R("legend", Rr, [
|
|
574
|
+
M("b", null, K(l.value), 1)
|
|
572
575
|
])) : q("", !0),
|
|
573
|
-
(
|
|
574
|
-
key: `${i.value}-property-${
|
|
576
|
+
(v(!0), R(le, null, oe(Object.keys(a.value), (d, s) => (v(), D(qt, {
|
|
577
|
+
key: `${i.value}-property-${s}`,
|
|
575
578
|
item: {
|
|
576
579
|
key: d,
|
|
577
|
-
label:
|
|
580
|
+
label: T(r)(d),
|
|
578
581
|
value: a.value[d]
|
|
579
582
|
}
|
|
580
583
|
}, null, 8, ["item"]))), 128))
|
|
@@ -587,7 +590,7 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
587
590
|
for (const [r, i] of t)
|
|
588
591
|
n[r] = i;
|
|
589
592
|
return n;
|
|
590
|
-
},
|
|
593
|
+
}, Pt = /* @__PURE__ */ ae(Br, [["__scopeId", "data-v-68ca83ec"]]), Kr = /* @__PURE__ */ z({
|
|
591
594
|
__name: "InternalLinkItem",
|
|
592
595
|
props: {
|
|
593
596
|
item: {
|
|
@@ -600,21 +603,21 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
600
603
|
const { i18n: { t } } = H.useI18n();
|
|
601
604
|
return (n, r) => {
|
|
602
605
|
const i = j("KButton");
|
|
603
|
-
return
|
|
604
|
-
|
|
606
|
+
return v(), R("div", null, [
|
|
607
|
+
N(i, {
|
|
605
608
|
appearance: "tertiary",
|
|
606
609
|
class: "navigation-button",
|
|
607
610
|
onClick: r[0] || (r[0] = (o) => n.$emit("navigation-click", e.item))
|
|
608
611
|
}, {
|
|
609
612
|
default: C(() => [
|
|
610
|
-
V(
|
|
613
|
+
V(K(e.item.value || T(t)("baseConfigCard.commonFields.link")), 1)
|
|
611
614
|
]),
|
|
612
615
|
_: 1
|
|
613
616
|
})
|
|
614
617
|
]);
|
|
615
618
|
};
|
|
616
619
|
}
|
|
617
|
-
}), Nr = /* @__PURE__ */ ae(
|
|
620
|
+
}), Nr = /* @__PURE__ */ ae(Kr, [["__scopeId", "data-v-c96811e5"]]), Mr = /* @__PURE__ */ z({
|
|
618
621
|
__name: "StatusBadge",
|
|
619
622
|
props: {
|
|
620
623
|
status: {
|
|
@@ -626,21 +629,21 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
626
629
|
const { i18n: { t } } = H.useI18n();
|
|
627
630
|
return (n, r) => {
|
|
628
631
|
const i = j("KBadge");
|
|
629
|
-
return
|
|
632
|
+
return v(), D(i, {
|
|
630
633
|
appearance: e.status ? "success" : "neutral"
|
|
631
634
|
}, {
|
|
632
635
|
default: C(() => [
|
|
633
|
-
V(
|
|
636
|
+
V(K(e.status ? T(t)("baseConfigCard.statusBadge.enabledLabel") : T(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
634
637
|
]),
|
|
635
638
|
_: 1
|
|
636
639
|
}, 8, ["appearance"]);
|
|
637
640
|
};
|
|
638
641
|
}
|
|
639
|
-
}),
|
|
642
|
+
}), Dr = "#0044f4", jr = "#e0e4ea", Ur = "#afb7c5", Pr = "#0044f4", qr = "1px", Hr = "16px", Yr = "20px", Vr = { class: "config-card-details-row" }, Wr = ["data-testid"], Jr = ["data-testid"], Gr = ["data-testid"], zr = ["data-testid"], Qr = { key: 1 }, Zr = ["data-testid"], Xr = ["data-testid"], ei = ["data-testid"], ti = ["data-testid"], ni = {
|
|
640
643
|
name: "ConfigCardItem",
|
|
641
|
-
components: { JsonCardItem:
|
|
642
|
-
},
|
|
643
|
-
...
|
|
644
|
+
components: { JsonCardItem: Pt, StatusBadge: Mr, InternalLinkItem: Nr }
|
|
645
|
+
}, ri = /* @__PURE__ */ z({
|
|
646
|
+
...ni,
|
|
644
647
|
props: {
|
|
645
648
|
item: {
|
|
646
649
|
type: Object,
|
|
@@ -659,15 +662,15 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
659
662
|
},
|
|
660
663
|
emits: ["navigation-click"],
|
|
661
664
|
setup(e, { emit: t }) {
|
|
662
|
-
|
|
663
|
-
"3ccdd5d2": d.value ? "none" : `solid ${
|
|
664
|
-
"4b1da305":
|
|
665
|
-
cd20788a:
|
|
666
|
-
cd1becd4:
|
|
665
|
+
Kt((y) => ({
|
|
666
|
+
"3ccdd5d2": d.value ? "none" : `solid ${T(qr)} ${T(jr)}`,
|
|
667
|
+
"4b1da305": u.value && l.value ? "block" : "flex",
|
|
668
|
+
cd20788a: u.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
669
|
+
cd1becd4: u.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
667
670
|
}));
|
|
668
|
-
const n = e, r = t, i =
|
|
669
|
-
var
|
|
670
|
-
return n.item.type ? n.item.type : (
|
|
671
|
+
const n = e, r = t, i = et(), { i18n: { t: o, formatUnixTimeStamp: a } } = H.useI18n(), l = $(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), c = $(() => !!(n.item.tooltip || i["label-tooltip"])), u = $(() => n.item.type === P.Json || n.item.type === P.JsonArray), d = $(() => n.item.type === P.JsonArray), s = H.useSubSchema(n.item.key), p = $(() => {
|
|
672
|
+
var y;
|
|
673
|
+
return n.item.type ? n.item.type : (y = s == null ? void 0 : s.value) != null && y.encrypted ? P.Redacted : void 0;
|
|
671
674
|
}), f = $(() => {
|
|
672
675
|
switch (p.value) {
|
|
673
676
|
case P.ID:
|
|
@@ -749,8 +752,8 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
749
752
|
attrs: {
|
|
750
753
|
"data-testid": `${n.item.key}-internal-link`,
|
|
751
754
|
item: n.item,
|
|
752
|
-
onNavigationClick: (
|
|
753
|
-
r("navigation-click",
|
|
755
|
+
onNavigationClick: (y) => {
|
|
756
|
+
r("navigation-click", y);
|
|
754
757
|
}
|
|
755
758
|
}
|
|
756
759
|
};
|
|
@@ -789,26 +792,26 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
789
792
|
text: n.item.value
|
|
790
793
|
};
|
|
791
794
|
}
|
|
792
|
-
}),
|
|
793
|
-
return (
|
|
794
|
-
const
|
|
795
|
-
return
|
|
795
|
+
}), g = B(), h = B(), { isTruncated: x } = H.useTruncationDetector(g), { isTruncated: E } = H.useTruncationDetector(h);
|
|
796
|
+
return (y, L) => {
|
|
797
|
+
const F = j("KTooltip"), I = j("KLabel"), m = j("KBadge"), A = j("KCopy");
|
|
798
|
+
return v(), R("div", Vr, [
|
|
796
799
|
M("div", {
|
|
797
800
|
class: "config-card-details-label",
|
|
798
801
|
"data-testid": `${e.item.key}-label`
|
|
799
802
|
}, [
|
|
800
|
-
W(
|
|
801
|
-
|
|
803
|
+
W(y.$slots, "label", { item: e.item }, () => [
|
|
804
|
+
N(I, { "tooltip-attributes": { maxWidth: "500px" } }, ke({
|
|
802
805
|
default: C(() => [
|
|
803
|
-
|
|
804
|
-
text:
|
|
806
|
+
N(F, {
|
|
807
|
+
text: T(x) ? e.item.label : ""
|
|
805
808
|
}, {
|
|
806
809
|
default: C(() => [
|
|
807
810
|
M("span", {
|
|
808
811
|
ref_key: "labelContent",
|
|
809
|
-
ref:
|
|
812
|
+
ref: g,
|
|
810
813
|
class: "label-content"
|
|
811
|
-
},
|
|
814
|
+
}, K(e.item.label), 513)
|
|
812
815
|
]),
|
|
813
816
|
_: 1
|
|
814
817
|
}, 8, ["text"])
|
|
@@ -821,31 +824,31 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
821
824
|
M("div", {
|
|
822
825
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
823
826
|
}, [
|
|
824
|
-
W(
|
|
825
|
-
V(
|
|
827
|
+
W(y.$slots, "label-tooltip", {}, () => [
|
|
828
|
+
V(K(e.item.tooltip), 1)
|
|
826
829
|
], !0)
|
|
827
|
-
], 8,
|
|
830
|
+
], 8, Jr)
|
|
828
831
|
]),
|
|
829
832
|
key: "0"
|
|
830
833
|
} : void 0
|
|
831
834
|
]), 1024)
|
|
832
835
|
], !0)
|
|
833
|
-
], 8,
|
|
836
|
+
], 8, Wr),
|
|
834
837
|
M("div", {
|
|
835
838
|
class: "config-card-details-value",
|
|
836
839
|
"data-testid": `${e.item.key}-property-value`
|
|
837
840
|
}, [
|
|
838
|
-
W(
|
|
841
|
+
W(y.$slots, e.item.key, {
|
|
839
842
|
rowValue: e.item.value
|
|
840
843
|
}, () => [
|
|
841
|
-
l.value ? (
|
|
842
|
-
(
|
|
844
|
+
l.value ? (v(), R("div", Qr, [
|
|
845
|
+
(v(), D(De(f.value.tag), Nn(Mn(f.value.attrs)), {
|
|
843
846
|
default: C(() => [
|
|
844
|
-
f.value.additionalComponent === "KBadge" ? (
|
|
847
|
+
f.value.additionalComponent === "KBadge" ? (v(), R("div", {
|
|
845
848
|
key: 0,
|
|
846
849
|
"data-testid": `${e.item.key}-badge-tags`
|
|
847
850
|
}, [
|
|
848
|
-
(
|
|
851
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(m, {
|
|
849
852
|
key: `${e.item.key}-badge-tag-${w}`,
|
|
850
853
|
class: "config-badge",
|
|
851
854
|
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
@@ -853,77 +856,77 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
853
856
|
"truncation-tooltip": ""
|
|
854
857
|
}, {
|
|
855
858
|
default: C(() => [
|
|
856
|
-
V(
|
|
859
|
+
V(K(S), 1)
|
|
857
860
|
]),
|
|
858
861
|
_: 2
|
|
859
862
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
860
|
-
], 8,
|
|
861
|
-
f.value.additionalComponent === "KCopy" ? (
|
|
863
|
+
], 8, Zr)) : q("", !0),
|
|
864
|
+
f.value.additionalComponent === "KCopy" ? (v(), R("div", {
|
|
862
865
|
key: 1,
|
|
863
866
|
class: "copy-uuid-array",
|
|
864
867
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
865
868
|
}, [
|
|
866
|
-
(
|
|
869
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(A, Dn({ ref_for: !0 }, f.value.childAttrs, {
|
|
867
870
|
key: `${e.item.key}-copy-uuid-${w}`,
|
|
868
871
|
"data-testid": `${e.item.key}-copy-uuid-${w}`,
|
|
869
872
|
text: S
|
|
870
873
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
871
|
-
], 8,
|
|
874
|
+
], 8, Xr)) : f.value.additionalComponent === "KMethodBadge" ? (v(), R("div", {
|
|
872
875
|
key: 2,
|
|
873
876
|
class: "method-badge-array",
|
|
874
877
|
"data-testid": `${e.item.key}-badge-methods`
|
|
875
878
|
}, [
|
|
876
|
-
(
|
|
879
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(m, {
|
|
877
880
|
key: `${e.item.key}-badge-method-${w}`,
|
|
878
|
-
appearance: Object.values(
|
|
881
|
+
appearance: Object.values(T(Vn)).includes(S.toLowerCase()) ? S.toLowerCase() : "custom",
|
|
879
882
|
class: "config-badge",
|
|
880
883
|
"data-testid": `${e.item.key}-badge-method-${w}`
|
|
881
884
|
}, {
|
|
882
885
|
default: C(() => [
|
|
883
|
-
V(
|
|
886
|
+
V(K(S), 1)
|
|
884
887
|
]),
|
|
885
888
|
_: 2
|
|
886
889
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
887
|
-
], 8,
|
|
888
|
-
f.value.additionalComponent === "JsonCardItem" ? (
|
|
890
|
+
], 8, ei)) : q("", !0),
|
|
891
|
+
f.value.additionalComponent === "JsonCardItem" ? (v(), R("div", {
|
|
889
892
|
key: 3,
|
|
890
893
|
"data-testid": `${n.item.key}-json-array-content`
|
|
891
894
|
}, [
|
|
892
|
-
(
|
|
895
|
+
(v(!0), R(le, null, oe(e.item.value, (S, w) => (v(), D(Pt, {
|
|
893
896
|
key: `json-array-item-${w}`,
|
|
894
897
|
index: w,
|
|
895
898
|
"is-array-item": "",
|
|
896
899
|
item: S
|
|
897
900
|
}, null, 8, ["index", "item"]))), 128))
|
|
898
|
-
], 8,
|
|
901
|
+
], 8, ti)) : (v(), D(F, {
|
|
899
902
|
key: 4,
|
|
900
|
-
text:
|
|
903
|
+
text: T(E) ? e.item.value : ""
|
|
901
904
|
}, {
|
|
902
905
|
default: C(() => [
|
|
903
906
|
M("span", {
|
|
904
907
|
ref_key: "textContent",
|
|
905
|
-
ref:
|
|
908
|
+
ref: h,
|
|
906
909
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
907
|
-
},
|
|
910
|
+
}, K(f.value.text), 3)
|
|
908
911
|
]),
|
|
909
912
|
_: 1
|
|
910
913
|
}, 8, ["text"]))
|
|
911
914
|
]),
|
|
912
915
|
_: 1
|
|
913
916
|
}, 16))
|
|
914
|
-
])) : (
|
|
917
|
+
])) : (v(), R("div", {
|
|
915
918
|
key: 0,
|
|
916
919
|
"data-testid": `${e.item.key}-no-value`
|
|
917
|
-
}, " – ", 8,
|
|
920
|
+
}, " – ", 8, zr))
|
|
918
921
|
], !0)
|
|
919
|
-
], 8,
|
|
922
|
+
], 8, Gr)
|
|
920
923
|
]);
|
|
921
924
|
};
|
|
922
925
|
}
|
|
923
|
-
}),
|
|
926
|
+
}), qt = /* @__PURE__ */ ae(ri, [["__scopeId", "data-v-761f7e64"]]), ii = { class: "json-config" }, ai = {
|
|
924
927
|
key: 0,
|
|
925
928
|
class: "json-endpoint"
|
|
926
|
-
},
|
|
929
|
+
}, Ht = /* @__PURE__ */ z({
|
|
927
930
|
__name: "JsonCodeBlock",
|
|
928
931
|
props: {
|
|
929
932
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -951,7 +954,7 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
951
954
|
}
|
|
952
955
|
},
|
|
953
956
|
setup(e) {
|
|
954
|
-
|
|
957
|
+
Kt((i) => ({
|
|
955
958
|
"454fa8c4": `${r.value}ch`
|
|
956
959
|
}));
|
|
957
960
|
const t = e, n = $(() => t.entityRecord), r = $(() => {
|
|
@@ -963,17 +966,17 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
963
966
|
});
|
|
964
967
|
return (i, o) => {
|
|
965
968
|
const a = j("KBadge"), l = j("KCodeBlock");
|
|
966
|
-
return
|
|
967
|
-
t.fetcherUrl ? (
|
|
968
|
-
|
|
969
|
+
return v(), R("div", ii, [
|
|
970
|
+
t.fetcherUrl ? (v(), R("div", ai, [
|
|
971
|
+
N(a, {
|
|
969
972
|
appearance: t.requestMethod
|
|
970
973
|
}, {
|
|
971
974
|
default: C(() => [
|
|
972
|
-
V(
|
|
975
|
+
V(K(t.requestMethod), 1)
|
|
973
976
|
]),
|
|
974
977
|
_: 1
|
|
975
978
|
}, 8, ["appearance"]),
|
|
976
|
-
|
|
979
|
+
N(l, {
|
|
977
980
|
id: "json-endpoint-codeblock",
|
|
978
981
|
code: t.fetcherUrl,
|
|
979
982
|
language: "json",
|
|
@@ -981,7 +984,7 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
981
984
|
theme: "dark"
|
|
982
985
|
}, null, 8, ["code"])
|
|
983
986
|
])) : q("", !0),
|
|
984
|
-
t.entityRecord ? (
|
|
987
|
+
t.entityRecord ? (v(), D(l, {
|
|
985
988
|
key: 1,
|
|
986
989
|
id: "json-codeblock",
|
|
987
990
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
@@ -994,55 +997,55 @@ const We = Symbol("schema"), Or = (e) => {
|
|
|
994
997
|
}
|
|
995
998
|
});
|
|
996
999
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
997
|
-
function
|
|
1000
|
+
function Yt(e) {
|
|
998
1001
|
return typeof e > "u" || e === null;
|
|
999
1002
|
}
|
|
1000
|
-
function
|
|
1003
|
+
function oi(e) {
|
|
1001
1004
|
return typeof e == "object" && e !== null;
|
|
1002
1005
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return Array.isArray(e) ? e :
|
|
1006
|
+
function li(e) {
|
|
1007
|
+
return Array.isArray(e) ? e : Yt(e) ? [] : [e];
|
|
1005
1008
|
}
|
|
1006
|
-
function
|
|
1009
|
+
function ci(e, t) {
|
|
1007
1010
|
var n, r, i, o;
|
|
1008
1011
|
if (t)
|
|
1009
1012
|
for (o = Object.keys(t), n = 0, r = o.length; n < r; n += 1)
|
|
1010
1013
|
i = o[n], e[i] = t[i];
|
|
1011
1014
|
return e;
|
|
1012
1015
|
}
|
|
1013
|
-
function
|
|
1016
|
+
function si(e, t) {
|
|
1014
1017
|
var n = "", r;
|
|
1015
1018
|
for (r = 0; r < t; r += 1)
|
|
1016
1019
|
n += e;
|
|
1017
1020
|
return n;
|
|
1018
1021
|
}
|
|
1019
|
-
function
|
|
1022
|
+
function ui(e) {
|
|
1020
1023
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1021
1024
|
}
|
|
1022
|
-
var
|
|
1023
|
-
isNothing:
|
|
1024
|
-
isObject:
|
|
1025
|
-
toArray:
|
|
1026
|
-
repeat:
|
|
1027
|
-
isNegativeZero:
|
|
1028
|
-
extend:
|
|
1025
|
+
var di = Yt, fi = oi, pi = li, mi = si, hi = ui, gi = ci, Q = {
|
|
1026
|
+
isNothing: di,
|
|
1027
|
+
isObject: fi,
|
|
1028
|
+
toArray: pi,
|
|
1029
|
+
repeat: mi,
|
|
1030
|
+
isNegativeZero: hi,
|
|
1031
|
+
extend: gi
|
|
1029
1032
|
};
|
|
1030
|
-
function
|
|
1033
|
+
function Vt(e, t) {
|
|
1031
1034
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1032
1035
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1033
1036
|
|
|
1034
1037
|
` + e.mark.snippet), r + " " + n) : r;
|
|
1035
1038
|
}
|
|
1036
1039
|
function Se(e, t) {
|
|
1037
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1040
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Vt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1038
1041
|
}
|
|
1039
1042
|
Se.prototype = Object.create(Error.prototype);
|
|
1040
1043
|
Se.prototype.constructor = Se;
|
|
1041
1044
|
Se.prototype.toString = function(t) {
|
|
1042
|
-
return this.name + ": " +
|
|
1045
|
+
return this.name + ": " + Vt(this, t);
|
|
1043
1046
|
};
|
|
1044
1047
|
var ne = Se;
|
|
1045
|
-
function
|
|
1048
|
+
function He(e, t, n, r, i) {
|
|
1046
1049
|
var o = "", a = "", l = Math.floor(i / 2) - 1;
|
|
1047
1050
|
return r - t > l && (o = " ... ", t = r - l + o.length), n - r > l && (a = " ...", n = r + l - a.length), {
|
|
1048
1051
|
str: o + e.slice(t, n).replace(/\t/g, "→") + a,
|
|
@@ -1050,39 +1053,39 @@ function qe(e, t, n, r, i) {
|
|
|
1050
1053
|
// relative position
|
|
1051
1054
|
};
|
|
1052
1055
|
}
|
|
1053
|
-
function
|
|
1056
|
+
function Ye(e, t) {
|
|
1054
1057
|
return Q.repeat(" ", t - e.length) + e;
|
|
1055
1058
|
}
|
|
1056
|
-
function
|
|
1059
|
+
function yi(e, t) {
|
|
1057
1060
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1058
1061
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1059
1062
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1060
1063
|
i.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = r.length - 2);
|
|
1061
1064
|
a < 0 && (a = r.length - 1);
|
|
1062
|
-
var l = "", c,
|
|
1065
|
+
var l = "", c, u, d = Math.min(e.line + t.linesAfter, i.length).toString().length, s = t.maxLength - (t.indent + d + 3);
|
|
1063
1066
|
for (c = 1; c <= t.linesBefore && !(a - c < 0); c++)
|
|
1064
|
-
|
|
1067
|
+
u = He(
|
|
1065
1068
|
e.buffer,
|
|
1066
1069
|
r[a - c],
|
|
1067
1070
|
i[a - c],
|
|
1068
1071
|
e.position - (r[a] - r[a - c]),
|
|
1069
|
-
|
|
1070
|
-
), l = Q.repeat(" ", t.indent) +
|
|
1072
|
+
s
|
|
1073
|
+
), l = Q.repeat(" ", t.indent) + Ye((e.line - c + 1).toString(), d) + " | " + u.str + `
|
|
1071
1074
|
` + l;
|
|
1072
|
-
for (
|
|
1073
|
-
`, l += Q.repeat("-", t.indent + d + 3 +
|
|
1075
|
+
for (u = He(e.buffer, r[a], i[a], e.position, s), l += Q.repeat(" ", t.indent) + Ye((e.line + 1).toString(), d) + " | " + u.str + `
|
|
1076
|
+
`, l += Q.repeat("-", t.indent + d + 3 + u.pos) + `^
|
|
1074
1077
|
`, c = 1; c <= t.linesAfter && !(a + c >= i.length); c++)
|
|
1075
|
-
|
|
1078
|
+
u = He(
|
|
1076
1079
|
e.buffer,
|
|
1077
1080
|
r[a + c],
|
|
1078
1081
|
i[a + c],
|
|
1079
1082
|
e.position - (r[a] - r[a + c]),
|
|
1080
|
-
|
|
1081
|
-
), l += Q.repeat(" ", t.indent) +
|
|
1083
|
+
s
|
|
1084
|
+
), l += Q.repeat(" ", t.indent) + Ye((e.line + c + 1).toString(), d) + " | " + u.str + `
|
|
1082
1085
|
`;
|
|
1083
1086
|
return l.replace(/\n$/, "");
|
|
1084
1087
|
}
|
|
1085
|
-
var
|
|
1088
|
+
var vi = yi, bi = [
|
|
1086
1089
|
"kind",
|
|
1087
1090
|
"multi",
|
|
1088
1091
|
"resolve",
|
|
@@ -1093,12 +1096,12 @@ var yi = gi, vi = [
|
|
|
1093
1096
|
"representName",
|
|
1094
1097
|
"defaultStyle",
|
|
1095
1098
|
"styleAliases"
|
|
1096
|
-
],
|
|
1099
|
+
], xi = [
|
|
1097
1100
|
"scalar",
|
|
1098
1101
|
"sequence",
|
|
1099
1102
|
"mapping"
|
|
1100
1103
|
];
|
|
1101
|
-
function
|
|
1104
|
+
function Ci(e) {
|
|
1102
1105
|
var t = {};
|
|
1103
1106
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1104
1107
|
e[n].forEach(function(r) {
|
|
@@ -1106,19 +1109,19 @@ function xi(e) {
|
|
|
1106
1109
|
});
|
|
1107
1110
|
}), t;
|
|
1108
1111
|
}
|
|
1109
|
-
function
|
|
1112
|
+
function Ai(e, t) {
|
|
1110
1113
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1111
|
-
if (
|
|
1114
|
+
if (bi.indexOf(n) === -1)
|
|
1112
1115
|
throw new ne('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1113
1116
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1114
1117
|
return !0;
|
|
1115
1118
|
}, this.construct = t.construct || function(n) {
|
|
1116
1119
|
return n;
|
|
1117
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1120
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = Ci(t.styleAliases || null), xi.indexOf(this.kind) === -1)
|
|
1118
1121
|
throw new ne('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1119
1122
|
}
|
|
1120
|
-
var X =
|
|
1121
|
-
function
|
|
1123
|
+
var X = Ai;
|
|
1124
|
+
function yt(e, t) {
|
|
1122
1125
|
var n = [];
|
|
1123
1126
|
return e[t].forEach(function(r) {
|
|
1124
1127
|
var i = n.length;
|
|
@@ -1127,7 +1130,7 @@ function gt(e, t) {
|
|
|
1127
1130
|
}), n[i] = r;
|
|
1128
1131
|
}), n;
|
|
1129
1132
|
}
|
|
1130
|
-
function
|
|
1133
|
+
function ki() {
|
|
1131
1134
|
var e = {
|
|
1132
1135
|
scalar: {},
|
|
1133
1136
|
sequence: {},
|
|
@@ -1147,10 +1150,10 @@ function Ai() {
|
|
|
1147
1150
|
arguments[t].forEach(r);
|
|
1148
1151
|
return e;
|
|
1149
1152
|
}
|
|
1150
|
-
function
|
|
1153
|
+
function Ge(e) {
|
|
1151
1154
|
return this.extend(e);
|
|
1152
1155
|
}
|
|
1153
|
-
|
|
1156
|
+
Ge.prototype.extend = function(t) {
|
|
1154
1157
|
var n = [], r = [];
|
|
1155
1158
|
if (t instanceof X)
|
|
1156
1159
|
r.push(t);
|
|
@@ -1171,47 +1174,47 @@ Je.prototype.extend = function(t) {
|
|
|
1171
1174
|
if (!(o instanceof X))
|
|
1172
1175
|
throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1173
1176
|
});
|
|
1174
|
-
var i = Object.create(
|
|
1175
|
-
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit =
|
|
1177
|
+
var i = Object.create(Ge.prototype);
|
|
1178
|
+
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = yt(i, "implicit"), i.compiledExplicit = yt(i, "explicit"), i.compiledTypeMap = ki(i.compiledImplicit, i.compiledExplicit), i;
|
|
1176
1179
|
};
|
|
1177
|
-
var
|
|
1180
|
+
var Wt = Ge, Jt = new X("tag:yaml.org,2002:str", {
|
|
1178
1181
|
kind: "scalar",
|
|
1179
1182
|
construct: function(e) {
|
|
1180
1183
|
return e !== null ? e : "";
|
|
1181
1184
|
}
|
|
1182
|
-
}),
|
|
1185
|
+
}), Gt = new X("tag:yaml.org,2002:seq", {
|
|
1183
1186
|
kind: "sequence",
|
|
1184
1187
|
construct: function(e) {
|
|
1185
1188
|
return e !== null ? e : [];
|
|
1186
1189
|
}
|
|
1187
|
-
}),
|
|
1190
|
+
}), zt = new X("tag:yaml.org,2002:map", {
|
|
1188
1191
|
kind: "mapping",
|
|
1189
1192
|
construct: function(e) {
|
|
1190
1193
|
return e !== null ? e : {};
|
|
1191
1194
|
}
|
|
1192
|
-
}),
|
|
1195
|
+
}), Qt = new Wt({
|
|
1193
1196
|
explicit: [
|
|
1194
|
-
Wt,
|
|
1195
1197
|
Jt,
|
|
1196
|
-
Gt
|
|
1198
|
+
Gt,
|
|
1199
|
+
zt
|
|
1197
1200
|
]
|
|
1198
1201
|
});
|
|
1199
|
-
function
|
|
1202
|
+
function _i(e) {
|
|
1200
1203
|
if (e === null) return !0;
|
|
1201
1204
|
var t = e.length;
|
|
1202
1205
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1203
1206
|
}
|
|
1204
|
-
function
|
|
1207
|
+
function wi() {
|
|
1205
1208
|
return null;
|
|
1206
1209
|
}
|
|
1207
|
-
function
|
|
1210
|
+
function Si(e) {
|
|
1208
1211
|
return e === null;
|
|
1209
1212
|
}
|
|
1210
|
-
var
|
|
1213
|
+
var Zt = new X("tag:yaml.org,2002:null", {
|
|
1211
1214
|
kind: "scalar",
|
|
1212
|
-
resolve:
|
|
1213
|
-
construct:
|
|
1214
|
-
predicate:
|
|
1215
|
+
resolve: _i,
|
|
1216
|
+
construct: wi,
|
|
1217
|
+
predicate: Si,
|
|
1215
1218
|
represent: {
|
|
1216
1219
|
canonical: function() {
|
|
1217
1220
|
return "~";
|
|
@@ -1231,7 +1234,7 @@ var Qt = new X("tag:yaml.org,2002:null", {
|
|
|
1231
1234
|
},
|
|
1232
1235
|
defaultStyle: "lowercase"
|
|
1233
1236
|
});
|
|
1234
|
-
function
|
|
1237
|
+
function Ii(e) {
|
|
1235
1238
|
if (e === null) return !1;
|
|
1236
1239
|
var t = e.length;
|
|
1237
1240
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
@@ -1239,14 +1242,14 @@ function Si(e) {
|
|
|
1239
1242
|
function Ti(e) {
|
|
1240
1243
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1241
1244
|
}
|
|
1242
|
-
function
|
|
1245
|
+
function $i(e) {
|
|
1243
1246
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1244
1247
|
}
|
|
1245
|
-
var
|
|
1248
|
+
var Xt = new X("tag:yaml.org,2002:bool", {
|
|
1246
1249
|
kind: "scalar",
|
|
1247
|
-
resolve:
|
|
1250
|
+
resolve: Ii,
|
|
1248
1251
|
construct: Ti,
|
|
1249
|
-
predicate:
|
|
1252
|
+
predicate: $i,
|
|
1250
1253
|
represent: {
|
|
1251
1254
|
lowercase: function(e) {
|
|
1252
1255
|
return e ? "true" : "false";
|
|
@@ -1260,16 +1263,16 @@ var Zt = new X("tag:yaml.org,2002:bool", {
|
|
|
1260
1263
|
},
|
|
1261
1264
|
defaultStyle: "lowercase"
|
|
1262
1265
|
});
|
|
1263
|
-
function
|
|
1266
|
+
function Ei(e) {
|
|
1264
1267
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1265
1268
|
}
|
|
1266
|
-
function
|
|
1269
|
+
function Fi(e) {
|
|
1267
1270
|
return 48 <= e && e <= 55;
|
|
1268
1271
|
}
|
|
1269
1272
|
function Oi(e) {
|
|
1270
1273
|
return 48 <= e && e <= 57;
|
|
1271
1274
|
}
|
|
1272
|
-
function
|
|
1275
|
+
function Li(e) {
|
|
1273
1276
|
if (e === null) return !1;
|
|
1274
1277
|
var t = e.length, n = 0, r = !1, i;
|
|
1275
1278
|
if (!t) return !1;
|
|
@@ -1286,7 +1289,7 @@ function Fi(e) {
|
|
|
1286
1289
|
if (i === "x") {
|
|
1287
1290
|
for (n++; n < t; n++)
|
|
1288
1291
|
if (i = e[n], i !== "_") {
|
|
1289
|
-
if (
|
|
1292
|
+
if (!Ei(e.charCodeAt(n))) return !1;
|
|
1290
1293
|
r = !0;
|
|
1291
1294
|
}
|
|
1292
1295
|
return r && i !== "_";
|
|
@@ -1294,7 +1297,7 @@ function Fi(e) {
|
|
|
1294
1297
|
if (i === "o") {
|
|
1295
1298
|
for (n++; n < t; n++)
|
|
1296
1299
|
if (i = e[n], i !== "_") {
|
|
1297
|
-
if (!
|
|
1300
|
+
if (!Fi(e.charCodeAt(n))) return !1;
|
|
1298
1301
|
r = !0;
|
|
1299
1302
|
}
|
|
1300
1303
|
return r && i !== "_";
|
|
@@ -1309,7 +1312,7 @@ function Fi(e) {
|
|
|
1309
1312
|
}
|
|
1310
1313
|
return !(!r || i === "_");
|
|
1311
1314
|
}
|
|
1312
|
-
function
|
|
1315
|
+
function Ri(e) {
|
|
1313
1316
|
var t = e, n = 1, r;
|
|
1314
1317
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
|
|
1315
1318
|
if (r === "0") {
|
|
@@ -1319,14 +1322,14 @@ function Li(e) {
|
|
|
1319
1322
|
}
|
|
1320
1323
|
return n * parseInt(t, 10);
|
|
1321
1324
|
}
|
|
1322
|
-
function
|
|
1325
|
+
function Bi(e) {
|
|
1323
1326
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Q.isNegativeZero(e);
|
|
1324
1327
|
}
|
|
1325
|
-
var
|
|
1328
|
+
var en = new X("tag:yaml.org,2002:int", {
|
|
1326
1329
|
kind: "scalar",
|
|
1327
|
-
resolve:
|
|
1328
|
-
construct:
|
|
1329
|
-
predicate:
|
|
1330
|
+
resolve: Li,
|
|
1331
|
+
construct: Ri,
|
|
1332
|
+
predicate: Bi,
|
|
1330
1333
|
represent: {
|
|
1331
1334
|
binary: function(e) {
|
|
1332
1335
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1349,21 +1352,21 @@ var Xt = new X("tag:yaml.org,2002:int", {
|
|
|
1349
1352
|
decimal: [10, "dec"],
|
|
1350
1353
|
hexadecimal: [16, "hex"]
|
|
1351
1354
|
}
|
|
1352
|
-
}),
|
|
1355
|
+
}), Ki = new RegExp(
|
|
1353
1356
|
// 2.5e4, 2.5 and integers
|
|
1354
1357
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1355
1358
|
);
|
|
1356
1359
|
function Ni(e) {
|
|
1357
|
-
return !(e === null || !
|
|
1360
|
+
return !(e === null || !Ki.test(e) || // Quick hack to not allow integers end with `_`
|
|
1358
1361
|
// Probably should update regexp & check speed
|
|
1359
1362
|
e[e.length - 1] === "_");
|
|
1360
1363
|
}
|
|
1361
|
-
function
|
|
1364
|
+
function Mi(e) {
|
|
1362
1365
|
var t, n;
|
|
1363
1366
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1364
1367
|
}
|
|
1365
|
-
var
|
|
1366
|
-
function
|
|
1368
|
+
var Di = /^[-+]?[0-9]+e/;
|
|
1369
|
+
function ji(e, t) {
|
|
1367
1370
|
var n;
|
|
1368
1371
|
if (isNaN(e))
|
|
1369
1372
|
switch (t) {
|
|
@@ -1394,36 +1397,36 @@ function Di(e, t) {
|
|
|
1394
1397
|
}
|
|
1395
1398
|
else if (Q.isNegativeZero(e))
|
|
1396
1399
|
return "-0.0";
|
|
1397
|
-
return n = e.toString(10),
|
|
1400
|
+
return n = e.toString(10), Di.test(n) ? n.replace("e", ".e") : n;
|
|
1398
1401
|
}
|
|
1399
|
-
function
|
|
1402
|
+
function Ui(e) {
|
|
1400
1403
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Q.isNegativeZero(e));
|
|
1401
1404
|
}
|
|
1402
|
-
var
|
|
1405
|
+
var tn = new X("tag:yaml.org,2002:float", {
|
|
1403
1406
|
kind: "scalar",
|
|
1404
1407
|
resolve: Ni,
|
|
1405
|
-
construct:
|
|
1406
|
-
predicate:
|
|
1407
|
-
represent:
|
|
1408
|
+
construct: Mi,
|
|
1409
|
+
predicate: Ui,
|
|
1410
|
+
represent: ji,
|
|
1408
1411
|
defaultStyle: "lowercase"
|
|
1409
|
-
}),
|
|
1412
|
+
}), nn = Qt.extend({
|
|
1410
1413
|
implicit: [
|
|
1411
|
-
Qt,
|
|
1412
1414
|
Zt,
|
|
1413
1415
|
Xt,
|
|
1414
|
-
en
|
|
1416
|
+
en,
|
|
1417
|
+
tn
|
|
1415
1418
|
]
|
|
1416
|
-
}),
|
|
1419
|
+
}), rn = nn, an = new RegExp(
|
|
1417
1420
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1418
|
-
),
|
|
1421
|
+
), on = new RegExp(
|
|
1419
1422
|
"^([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]))?))?$"
|
|
1420
1423
|
);
|
|
1421
|
-
function Ui(e) {
|
|
1422
|
-
return e === null ? !1 : rn.exec(e) !== null || an.exec(e) !== null;
|
|
1423
|
-
}
|
|
1424
1424
|
function Pi(e) {
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
return e === null ? !1 : an.exec(e) !== null || on.exec(e) !== null;
|
|
1426
|
+
}
|
|
1427
|
+
function qi(e) {
|
|
1428
|
+
var t, n, r, i, o, a, l, c = 0, u = null, d, s, p;
|
|
1429
|
+
if (t = an.exec(e), t === null && (t = on.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1427
1430
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
1428
1431
|
return new Date(Date.UTC(n, r, i));
|
|
1429
1432
|
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
@@ -1431,29 +1434,29 @@ function Pi(e) {
|
|
|
1431
1434
|
c += "0";
|
|
1432
1435
|
c = +c;
|
|
1433
1436
|
}
|
|
1434
|
-
return t[9] && (d = +t[10],
|
|
1437
|
+
return t[9] && (d = +t[10], s = +(t[11] || 0), u = (d * 60 + s) * 6e4, t[9] === "-" && (u = -u)), p = new Date(Date.UTC(n, r, i, o, a, l, c)), u && p.setTime(p.getTime() - u), p;
|
|
1435
1438
|
}
|
|
1436
|
-
function
|
|
1439
|
+
function Hi(e) {
|
|
1437
1440
|
return e.toISOString();
|
|
1438
1441
|
}
|
|
1439
|
-
var
|
|
1442
|
+
var ln = new X("tag:yaml.org,2002:timestamp", {
|
|
1440
1443
|
kind: "scalar",
|
|
1441
|
-
resolve:
|
|
1442
|
-
construct:
|
|
1444
|
+
resolve: Pi,
|
|
1445
|
+
construct: qi,
|
|
1443
1446
|
instanceOf: Date,
|
|
1444
|
-
represent:
|
|
1447
|
+
represent: Hi
|
|
1445
1448
|
});
|
|
1446
|
-
function
|
|
1449
|
+
function Yi(e) {
|
|
1447
1450
|
return e === "<<" || e === null;
|
|
1448
1451
|
}
|
|
1449
|
-
var
|
|
1452
|
+
var cn = new X("tag:yaml.org,2002:merge", {
|
|
1450
1453
|
kind: "scalar",
|
|
1451
|
-
resolve:
|
|
1452
|
-
}),
|
|
1454
|
+
resolve: Yi
|
|
1455
|
+
}), rt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1453
1456
|
\r`;
|
|
1454
|
-
function
|
|
1457
|
+
function Vi(e) {
|
|
1455
1458
|
if (e === null) return !1;
|
|
1456
|
-
var t, n, r = 0, i = e.length, o =
|
|
1459
|
+
var t, n, r = 0, i = e.length, o = rt;
|
|
1457
1460
|
for (n = 0; n < i; n++)
|
|
1458
1461
|
if (t = o.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1459
1462
|
if (t < 0) return !1;
|
|
@@ -1461,35 +1464,35 @@ function Yi(e) {
|
|
|
1461
1464
|
}
|
|
1462
1465
|
return r % 8 === 0;
|
|
1463
1466
|
}
|
|
1464
|
-
function
|
|
1465
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, o =
|
|
1467
|
+
function Wi(e) {
|
|
1468
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, o = rt, a = 0, l = [];
|
|
1466
1469
|
for (t = 0; t < i; t++)
|
|
1467
1470
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(r.charAt(t));
|
|
1468
1471
|
return n = i % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1469
1472
|
}
|
|
1470
|
-
function
|
|
1471
|
-
var t = "", n = 0, r, i, o = e.length, a =
|
|
1473
|
+
function Ji(e) {
|
|
1474
|
+
var t = "", n = 0, r, i, o = e.length, a = rt;
|
|
1472
1475
|
for (r = 0; r < o; r++)
|
|
1473
1476
|
r % 3 === 0 && r && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[r];
|
|
1474
1477
|
return i = o % 3, i === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : i === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : i === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1475
1478
|
}
|
|
1476
|
-
function
|
|
1479
|
+
function Gi(e) {
|
|
1477
1480
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1478
1481
|
}
|
|
1479
|
-
var
|
|
1482
|
+
var sn = new X("tag:yaml.org,2002:binary", {
|
|
1480
1483
|
kind: "scalar",
|
|
1481
|
-
resolve:
|
|
1482
|
-
construct:
|
|
1483
|
-
predicate:
|
|
1484
|
-
represent:
|
|
1485
|
-
}),
|
|
1486
|
-
function
|
|
1484
|
+
resolve: Vi,
|
|
1485
|
+
construct: Wi,
|
|
1486
|
+
predicate: Gi,
|
|
1487
|
+
represent: Ji
|
|
1488
|
+
}), zi = Object.prototype.hasOwnProperty, Qi = Object.prototype.toString;
|
|
1489
|
+
function Zi(e) {
|
|
1487
1490
|
if (e === null) return !0;
|
|
1488
1491
|
var t = [], n, r, i, o, a, l = e;
|
|
1489
1492
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1490
|
-
if (i = l[n], a = !1,
|
|
1493
|
+
if (i = l[n], a = !1, Qi.call(i) !== "[object Object]") return !1;
|
|
1491
1494
|
for (o in i)
|
|
1492
|
-
if (
|
|
1495
|
+
if (zi.call(i, o))
|
|
1493
1496
|
if (!a) a = !0;
|
|
1494
1497
|
else return !1;
|
|
1495
1498
|
if (!a) return !1;
|
|
@@ -1498,63 +1501,63 @@ function Qi(e) {
|
|
|
1498
1501
|
}
|
|
1499
1502
|
return !0;
|
|
1500
1503
|
}
|
|
1501
|
-
function
|
|
1504
|
+
function Xi(e) {
|
|
1502
1505
|
return e !== null ? e : [];
|
|
1503
1506
|
}
|
|
1504
|
-
var
|
|
1507
|
+
var un = new X("tag:yaml.org,2002:omap", {
|
|
1505
1508
|
kind: "sequence",
|
|
1506
|
-
resolve:
|
|
1507
|
-
construct:
|
|
1508
|
-
}),
|
|
1509
|
-
function
|
|
1509
|
+
resolve: Zi,
|
|
1510
|
+
construct: Xi
|
|
1511
|
+
}), ea = Object.prototype.toString;
|
|
1512
|
+
function ta(e) {
|
|
1510
1513
|
if (e === null) return !0;
|
|
1511
1514
|
var t, n, r, i, o, a = e;
|
|
1512
1515
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1513
|
-
if (r = a[t],
|
|
1516
|
+
if (r = a[t], ea.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
|
|
1514
1517
|
o[t] = [i[0], r[i[0]]];
|
|
1515
1518
|
}
|
|
1516
1519
|
return !0;
|
|
1517
1520
|
}
|
|
1518
|
-
function
|
|
1521
|
+
function na(e) {
|
|
1519
1522
|
if (e === null) return [];
|
|
1520
1523
|
var t, n, r, i, o, a = e;
|
|
1521
1524
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1522
1525
|
r = a[t], i = Object.keys(r), o[t] = [i[0], r[i[0]]];
|
|
1523
1526
|
return o;
|
|
1524
1527
|
}
|
|
1525
|
-
var
|
|
1528
|
+
var dn = new X("tag:yaml.org,2002:pairs", {
|
|
1526
1529
|
kind: "sequence",
|
|
1527
|
-
resolve:
|
|
1528
|
-
construct:
|
|
1529
|
-
}),
|
|
1530
|
-
function
|
|
1530
|
+
resolve: ta,
|
|
1531
|
+
construct: na
|
|
1532
|
+
}), ra = Object.prototype.hasOwnProperty;
|
|
1533
|
+
function ia(e) {
|
|
1531
1534
|
if (e === null) return !0;
|
|
1532
1535
|
var t, n = e;
|
|
1533
1536
|
for (t in n)
|
|
1534
|
-
if (
|
|
1537
|
+
if (ra.call(n, t) && n[t] !== null)
|
|
1535
1538
|
return !1;
|
|
1536
1539
|
return !0;
|
|
1537
1540
|
}
|
|
1538
|
-
function
|
|
1541
|
+
function aa(e) {
|
|
1539
1542
|
return e !== null ? e : {};
|
|
1540
1543
|
}
|
|
1541
|
-
var
|
|
1544
|
+
var fn = new X("tag:yaml.org,2002:set", {
|
|
1542
1545
|
kind: "mapping",
|
|
1543
|
-
resolve:
|
|
1544
|
-
construct:
|
|
1545
|
-
}),
|
|
1546
|
+
resolve: ia,
|
|
1547
|
+
construct: aa
|
|
1548
|
+
}), it = rn.extend({
|
|
1546
1549
|
implicit: [
|
|
1547
|
-
|
|
1548
|
-
|
|
1550
|
+
ln,
|
|
1551
|
+
cn
|
|
1549
1552
|
],
|
|
1550
1553
|
explicit: [
|
|
1551
|
-
cn,
|
|
1552
1554
|
sn,
|
|
1553
1555
|
un,
|
|
1554
|
-
dn
|
|
1556
|
+
dn,
|
|
1557
|
+
fn
|
|
1555
1558
|
]
|
|
1556
|
-
}), pe = Object.prototype.hasOwnProperty,
|
|
1557
|
-
function
|
|
1559
|
+
}), pe = Object.prototype.hasOwnProperty, Re = 1, pn = 2, mn = 3, Be = 4, Ve = 1, oa = 2, vt = 3, la = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ca = /[\x85\u2028\u2029]/, sa = /[,\[\]\{\}]/, hn = /^(?:!|!!|![a-z\-]+!)$/i, gn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1560
|
+
function bt(e) {
|
|
1558
1561
|
return Object.prototype.toString.call(e);
|
|
1559
1562
|
}
|
|
1560
1563
|
function ce(e) {
|
|
@@ -1566,36 +1569,36 @@ function he(e) {
|
|
|
1566
1569
|
function re(e) {
|
|
1567
1570
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1568
1571
|
}
|
|
1569
|
-
function
|
|
1572
|
+
function Ce(e) {
|
|
1570
1573
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1571
1574
|
}
|
|
1572
|
-
function
|
|
1575
|
+
function ua(e) {
|
|
1573
1576
|
var t;
|
|
1574
1577
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1575
1578
|
}
|
|
1576
|
-
function
|
|
1579
|
+
function da(e) {
|
|
1577
1580
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1578
1581
|
}
|
|
1579
|
-
function
|
|
1582
|
+
function fa(e) {
|
|
1580
1583
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1581
1584
|
}
|
|
1582
|
-
function
|
|
1585
|
+
function xt(e) {
|
|
1583
1586
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1584
1587
|
` : 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" : "";
|
|
1585
1588
|
}
|
|
1586
|
-
function
|
|
1589
|
+
function pa(e) {
|
|
1587
1590
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1588
1591
|
(e - 65536 >> 10) + 55296,
|
|
1589
1592
|
(e - 65536 & 1023) + 56320
|
|
1590
1593
|
);
|
|
1591
1594
|
}
|
|
1592
|
-
var
|
|
1593
|
-
for (var
|
|
1594
|
-
|
|
1595
|
-
function
|
|
1596
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1595
|
+
var yn = new Array(256), vn = new Array(256);
|
|
1596
|
+
for (var be = 0; be < 256; be++)
|
|
1597
|
+
yn[be] = xt(be) ? 1 : 0, vn[be] = xt(be);
|
|
1598
|
+
function ma(e, t) {
|
|
1599
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || it, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1597
1600
|
}
|
|
1598
|
-
function
|
|
1601
|
+
function bn(e, t) {
|
|
1599
1602
|
var n = {
|
|
1600
1603
|
name: e.filename,
|
|
1601
1604
|
buffer: e.input.slice(0, -1),
|
|
@@ -1604,22 +1607,22 @@ function vn(e, t) {
|
|
|
1604
1607
|
line: e.line,
|
|
1605
1608
|
column: e.position - e.lineStart
|
|
1606
1609
|
};
|
|
1607
|
-
return n.snippet =
|
|
1610
|
+
return n.snippet = vi(n), new ne(t, n);
|
|
1608
1611
|
}
|
|
1609
1612
|
function k(e, t) {
|
|
1610
|
-
throw
|
|
1613
|
+
throw bn(e, t);
|
|
1611
1614
|
}
|
|
1612
|
-
function
|
|
1613
|
-
e.onWarning && e.onWarning.call(null,
|
|
1615
|
+
function Ke(e, t) {
|
|
1616
|
+
e.onWarning && e.onWarning.call(null, bn(e, t));
|
|
1614
1617
|
}
|
|
1615
|
-
var
|
|
1618
|
+
var Ct = {
|
|
1616
1619
|
YAML: function(t, n, r) {
|
|
1617
1620
|
var i, o, a;
|
|
1618
|
-
t.version !== null && k(t, "duplication of %YAML directive"), r.length !== 1 && k(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && k(t, "ill-formed argument of the YAML directive"), o = parseInt(i[1], 10), a = parseInt(i[2], 10), o !== 1 && k(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 &&
|
|
1621
|
+
t.version !== null && k(t, "duplication of %YAML directive"), r.length !== 1 && k(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && k(t, "ill-formed argument of the YAML directive"), o = parseInt(i[1], 10), a = parseInt(i[2], 10), o !== 1 && k(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Ke(t, "unsupported YAML version of the document");
|
|
1619
1622
|
},
|
|
1620
1623
|
TAG: function(t, n, r) {
|
|
1621
1624
|
var i, o;
|
|
1622
|
-
r.length !== 2 && k(t, "TAG directive accepts exactly two arguments"), i = r[0], o = r[1],
|
|
1625
|
+
r.length !== 2 && k(t, "TAG directive accepts exactly two arguments"), i = r[0], o = r[1], hn.test(i) || k(t, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(t.tagMap, i) && k(t, 'there is a previously declared suffix for "' + i + '" tag handle'), gn.test(o) || k(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1623
1626
|
try {
|
|
1624
1627
|
o = decodeURIComponent(o);
|
|
1625
1628
|
} catch {
|
|
@@ -1634,26 +1637,26 @@ function de(e, t, n, r) {
|
|
|
1634
1637
|
if (l = e.input.slice(t, n), r)
|
|
1635
1638
|
for (i = 0, o = l.length; i < o; i += 1)
|
|
1636
1639
|
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || k(e, "expected valid JSON character");
|
|
1637
|
-
else
|
|
1640
|
+
else la.test(l) && k(e, "the stream contains non-printable characters");
|
|
1638
1641
|
e.result += l;
|
|
1639
1642
|
}
|
|
1640
1643
|
}
|
|
1641
|
-
function
|
|
1644
|
+
function At(e, t, n, r) {
|
|
1642
1645
|
var i, o, a, l;
|
|
1643
1646
|
for (Q.isObject(n) || k(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), a = 0, l = i.length; a < l; a += 1)
|
|
1644
1647
|
o = i[a], pe.call(t, o) || (t[o] = n[o], r[o] = !0);
|
|
1645
1648
|
}
|
|
1646
|
-
function
|
|
1647
|
-
var
|
|
1649
|
+
function Ae(e, t, n, r, i, o, a, l, c) {
|
|
1650
|
+
var u, d;
|
|
1648
1651
|
if (Array.isArray(i))
|
|
1649
|
-
for (i = Array.prototype.slice.call(i),
|
|
1650
|
-
Array.isArray(i[
|
|
1651
|
-
if (typeof i == "object" &&
|
|
1652
|
+
for (i = Array.prototype.slice.call(i), u = 0, d = i.length; u < d; u += 1)
|
|
1653
|
+
Array.isArray(i[u]) && k(e, "nested arrays are not supported inside keys"), typeof i == "object" && bt(i[u]) === "[object Object]" && (i[u] = "[object Object]");
|
|
1654
|
+
if (typeof i == "object" && bt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1652
1655
|
if (Array.isArray(o))
|
|
1653
|
-
for (
|
|
1654
|
-
|
|
1656
|
+
for (u = 0, d = o.length; u < d; u += 1)
|
|
1657
|
+
At(e, t, o[u], n);
|
|
1655
1658
|
else
|
|
1656
|
-
|
|
1659
|
+
At(e, t, o, n);
|
|
1657
1660
|
else
|
|
1658
1661
|
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = c || e.position, k(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1659
1662
|
configurable: !0,
|
|
@@ -1663,7 +1666,7 @@ function Ce(e, t, n, r, i, o, a, l, c) {
|
|
|
1663
1666
|
}) : t[i] = o, delete n[i];
|
|
1664
1667
|
return t;
|
|
1665
1668
|
}
|
|
1666
|
-
function
|
|
1669
|
+
function at(e) {
|
|
1667
1670
|
var t;
|
|
1668
1671
|
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : k(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1669
1672
|
}
|
|
@@ -1676,49 +1679,49 @@ function G(e, t, n) {
|
|
|
1676
1679
|
i = e.input.charCodeAt(++e.position);
|
|
1677
1680
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1678
1681
|
if (ce(i))
|
|
1679
|
-
for (
|
|
1682
|
+
for (at(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1680
1683
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1681
1684
|
else
|
|
1682
1685
|
break;
|
|
1683
1686
|
}
|
|
1684
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
1687
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && Ke(e, "deficient indentation"), r;
|
|
1685
1688
|
}
|
|
1686
|
-
function
|
|
1689
|
+
function Pe(e) {
|
|
1687
1690
|
var t = e.position, n;
|
|
1688
1691
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || re(n)));
|
|
1689
1692
|
}
|
|
1690
|
-
function
|
|
1693
|
+
function ot(e, t) {
|
|
1691
1694
|
t === 1 ? e.result += " " : t > 1 && (e.result += Q.repeat(`
|
|
1692
1695
|
`, t - 1));
|
|
1693
1696
|
}
|
|
1694
|
-
function
|
|
1695
|
-
var r, i, o, a, l, c,
|
|
1696
|
-
if (f = e.input.charCodeAt(e.position), re(f) ||
|
|
1697
|
+
function ha(e, t, n) {
|
|
1698
|
+
var r, i, o, a, l, c, u, d, s = e.kind, p = e.result, f;
|
|
1699
|
+
if (f = e.input.charCodeAt(e.position), re(f) || Ce(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), re(i) || n && Ce(i)))
|
|
1697
1700
|
return !1;
|
|
1698
1701
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
1699
1702
|
if (f === 58) {
|
|
1700
|
-
if (i = e.input.charCodeAt(e.position + 1), re(i) || n &&
|
|
1703
|
+
if (i = e.input.charCodeAt(e.position + 1), re(i) || n && Ce(i))
|
|
1701
1704
|
break;
|
|
1702
1705
|
} else if (f === 35) {
|
|
1703
1706
|
if (r = e.input.charCodeAt(e.position - 1), re(r))
|
|
1704
1707
|
break;
|
|
1705
1708
|
} else {
|
|
1706
|
-
if (e.position === e.lineStart &&
|
|
1709
|
+
if (e.position === e.lineStart && Pe(e) || n && Ce(f))
|
|
1707
1710
|
break;
|
|
1708
1711
|
if (ce(f))
|
|
1709
|
-
if (c = e.line,
|
|
1712
|
+
if (c = e.line, u = e.lineStart, d = e.lineIndent, G(e, !1, -1), e.lineIndent >= t) {
|
|
1710
1713
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1711
1714
|
continue;
|
|
1712
1715
|
} else {
|
|
1713
|
-
e.position = a, e.line = c, e.lineStart =
|
|
1716
|
+
e.position = a, e.line = c, e.lineStart = u, e.lineIndent = d;
|
|
1714
1717
|
break;
|
|
1715
1718
|
}
|
|
1716
1719
|
}
|
|
1717
|
-
l && (de(e, o, a, !1),
|
|
1720
|
+
l && (de(e, o, a, !1), ot(e, e.line - c), o = a = e.position, l = !1), he(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1718
1721
|
}
|
|
1719
|
-
return de(e, o, a, !1), e.result ? !0 : (e.kind =
|
|
1722
|
+
return de(e, o, a, !1), e.result ? !0 : (e.kind = s, e.result = p, !1);
|
|
1720
1723
|
}
|
|
1721
|
-
function
|
|
1724
|
+
function ga(e, t) {
|
|
1722
1725
|
var n, r, i;
|
|
1723
1726
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1724
1727
|
return !1;
|
|
@@ -1728,10 +1731,10 @@ function ha(e, t) {
|
|
|
1728
1731
|
r = e.position, e.position++, i = e.position;
|
|
1729
1732
|
else
|
|
1730
1733
|
return !0;
|
|
1731
|
-
else ce(n) ? (de(e, r, i, !0),
|
|
1734
|
+
else ce(n) ? (de(e, r, i, !0), ot(e, G(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Pe(e) ? k(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1732
1735
|
k(e, "unexpected end of the stream within a single quoted scalar");
|
|
1733
1736
|
}
|
|
1734
|
-
function
|
|
1737
|
+
function ya(e, t) {
|
|
1735
1738
|
var n, r, i, o, a, l;
|
|
1736
1739
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1737
1740
|
return !1;
|
|
@@ -1741,82 +1744,82 @@ function ga(e, t) {
|
|
|
1741
1744
|
if (l === 92) {
|
|
1742
1745
|
if (de(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ce(l))
|
|
1743
1746
|
G(e, !1, t);
|
|
1744
|
-
else if (l < 256 &&
|
|
1745
|
-
e.result +=
|
|
1746
|
-
else if ((a =
|
|
1747
|
+
else if (l < 256 && yn[l])
|
|
1748
|
+
e.result += vn[l], e.position++;
|
|
1749
|
+
else if ((a = da(l)) > 0) {
|
|
1747
1750
|
for (i = a, o = 0; i > 0; i--)
|
|
1748
|
-
l = e.input.charCodeAt(++e.position), (a =
|
|
1749
|
-
e.result +=
|
|
1751
|
+
l = e.input.charCodeAt(++e.position), (a = ua(l)) >= 0 ? o = (o << 4) + a : k(e, "expected hexadecimal character");
|
|
1752
|
+
e.result += pa(o), e.position++;
|
|
1750
1753
|
} else
|
|
1751
1754
|
k(e, "unknown escape sequence");
|
|
1752
1755
|
n = r = e.position;
|
|
1753
|
-
} else ce(l) ? (de(e, n, r, !0),
|
|
1756
|
+
} else ce(l) ? (de(e, n, r, !0), ot(e, G(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Pe(e) ? k(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1754
1757
|
}
|
|
1755
1758
|
k(e, "unexpected end of the stream within a double quoted scalar");
|
|
1756
1759
|
}
|
|
1757
|
-
function
|
|
1758
|
-
var n = !0, r, i, o, a = e.tag, l, c = e.anchor,
|
|
1759
|
-
if (
|
|
1760
|
+
function va(e, t) {
|
|
1761
|
+
var n = !0, r, i, o, a = e.tag, l, c = e.anchor, u, d, s, p, f, g = /* @__PURE__ */ Object.create(null), h, x, E, y;
|
|
1762
|
+
if (y = e.input.charCodeAt(e.position), y === 91)
|
|
1760
1763
|
d = 93, f = !1, l = [];
|
|
1761
|
-
else if (
|
|
1764
|
+
else if (y === 123)
|
|
1762
1765
|
d = 125, f = !0, l = {};
|
|
1763
1766
|
else
|
|
1764
1767
|
return !1;
|
|
1765
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1766
|
-
if (G(e, !0, t),
|
|
1768
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), y = e.input.charCodeAt(++e.position); y !== 0; ) {
|
|
1769
|
+
if (G(e, !0, t), y = e.input.charCodeAt(e.position), y === d)
|
|
1767
1770
|
return e.position++, e.tag = a, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1768
|
-
n ?
|
|
1771
|
+
n ? y === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), x = h = E = null, s = p = !1, y === 63 && (u = e.input.charCodeAt(e.position + 1), re(u) && (s = p = !0, e.position++, G(e, !0, t))), r = e.line, i = e.lineStart, o = e.position, _e(e, t, Re, !1, !0), x = e.tag, h = e.result, G(e, !0, t), y = e.input.charCodeAt(e.position), (p || e.line === r) && y === 58 && (s = !0, y = e.input.charCodeAt(++e.position), G(e, !0, t), _e(e, t, Re, !1, !0), E = e.result), f ? Ae(e, l, g, x, h, E, r, i, o) : s ? l.push(Ae(e, null, g, x, h, E, r, i, o)) : l.push(h), G(e, !0, t), y = e.input.charCodeAt(e.position), y === 44 ? (n = !0, y = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1769
1772
|
}
|
|
1770
1773
|
k(e, "unexpected end of the stream within a flow collection");
|
|
1771
1774
|
}
|
|
1772
|
-
function
|
|
1773
|
-
var n, r, i =
|
|
1774
|
-
if (
|
|
1775
|
+
function ba(e, t) {
|
|
1776
|
+
var n, r, i = Ve, o = !1, a = !1, l = t, c = 0, u = !1, d, s;
|
|
1777
|
+
if (s = e.input.charCodeAt(e.position), s === 124)
|
|
1775
1778
|
r = !1;
|
|
1776
|
-
else if (
|
|
1779
|
+
else if (s === 62)
|
|
1777
1780
|
r = !0;
|
|
1778
1781
|
else
|
|
1779
1782
|
return !1;
|
|
1780
|
-
for (e.kind = "scalar", e.result = "";
|
|
1781
|
-
if (
|
|
1782
|
-
|
|
1783
|
-
else if ((d =
|
|
1783
|
+
for (e.kind = "scalar", e.result = ""; s !== 0; )
|
|
1784
|
+
if (s = e.input.charCodeAt(++e.position), s === 43 || s === 45)
|
|
1785
|
+
Ve === i ? i = s === 43 ? vt : oa : k(e, "repeat of a chomping mode identifier");
|
|
1786
|
+
else if ((d = fa(s)) >= 0)
|
|
1784
1787
|
d === 0 ? k(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? k(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1785
1788
|
else
|
|
1786
1789
|
break;
|
|
1787
|
-
if (he(
|
|
1790
|
+
if (he(s)) {
|
|
1788
1791
|
do
|
|
1789
|
-
|
|
1790
|
-
while (he(
|
|
1791
|
-
if (
|
|
1792
|
+
s = e.input.charCodeAt(++e.position);
|
|
1793
|
+
while (he(s));
|
|
1794
|
+
if (s === 35)
|
|
1792
1795
|
do
|
|
1793
|
-
|
|
1794
|
-
while (!ce(
|
|
1796
|
+
s = e.input.charCodeAt(++e.position);
|
|
1797
|
+
while (!ce(s) && s !== 0);
|
|
1795
1798
|
}
|
|
1796
|
-
for (;
|
|
1797
|
-
for (
|
|
1798
|
-
e.lineIndent++,
|
|
1799
|
-
if (!a && e.lineIndent > l && (l = e.lineIndent), ce(
|
|
1799
|
+
for (; s !== 0; ) {
|
|
1800
|
+
for (at(e), e.lineIndent = 0, s = e.input.charCodeAt(e.position); (!a || e.lineIndent < l) && s === 32; )
|
|
1801
|
+
e.lineIndent++, s = e.input.charCodeAt(++e.position);
|
|
1802
|
+
if (!a && e.lineIndent > l && (l = e.lineIndent), ce(s)) {
|
|
1800
1803
|
c++;
|
|
1801
1804
|
continue;
|
|
1802
1805
|
}
|
|
1803
1806
|
if (e.lineIndent < l) {
|
|
1804
|
-
i ===
|
|
1805
|
-
`, o ? 1 + c : c) : i ===
|
|
1807
|
+
i === vt ? e.result += Q.repeat(`
|
|
1808
|
+
`, o ? 1 + c : c) : i === Ve && o && (e.result += `
|
|
1806
1809
|
`);
|
|
1807
1810
|
break;
|
|
1808
1811
|
}
|
|
1809
|
-
for (r ? he(
|
|
1810
|
-
`, o ? 1 + c : c)) :
|
|
1812
|
+
for (r ? he(s) ? (u = !0, e.result += Q.repeat(`
|
|
1813
|
+
`, o ? 1 + c : c)) : u ? (u = !1, e.result += Q.repeat(`
|
|
1811
1814
|
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += Q.repeat(`
|
|
1812
1815
|
`, c) : e.result += Q.repeat(`
|
|
1813
|
-
`, o ? 1 + c : c), o = !0, a = !0, c = 0, n = e.position; !ce(
|
|
1814
|
-
|
|
1816
|
+
`, o ? 1 + c : c), o = !0, a = !0, c = 0, n = e.position; !ce(s) && s !== 0; )
|
|
1817
|
+
s = e.input.charCodeAt(++e.position);
|
|
1815
1818
|
de(e, n, e.position, !1);
|
|
1816
1819
|
}
|
|
1817
1820
|
return !0;
|
|
1818
1821
|
}
|
|
1819
|
-
function
|
|
1822
|
+
function kt(e, t) {
|
|
1820
1823
|
var n, r = e.tag, i = e.anchor, o = [], a, l = !1, c;
|
|
1821
1824
|
if (e.firstTabInLine !== -1) return !1;
|
|
1822
1825
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), !(c !== 45 || (a = e.input.charCodeAt(e.position + 1), !re(a)))); ) {
|
|
@@ -1824,44 +1827,44 @@ function At(e, t) {
|
|
|
1824
1827
|
o.push(null), c = e.input.charCodeAt(e.position);
|
|
1825
1828
|
continue;
|
|
1826
1829
|
}
|
|
1827
|
-
if (n = e.line,
|
|
1830
|
+
if (n = e.line, _e(e, t, mn, !1, !0), o.push(e.result), G(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0)
|
|
1828
1831
|
k(e, "bad indentation of a sequence entry");
|
|
1829
1832
|
else if (e.lineIndent < t)
|
|
1830
1833
|
break;
|
|
1831
1834
|
}
|
|
1832
1835
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1833
1836
|
}
|
|
1834
|
-
function
|
|
1835
|
-
var r, i, o, a, l, c,
|
|
1837
|
+
function xa(e, t, n) {
|
|
1838
|
+
var r, i, o, a, l, c, u = e.tag, d = e.anchor, s = {}, p = /* @__PURE__ */ Object.create(null), f = null, g = null, h = null, x = !1, E = !1, y;
|
|
1836
1839
|
if (e.firstTabInLine !== -1) return !1;
|
|
1837
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1838
|
-
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (
|
|
1839
|
-
|
|
1840
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), y = e.input.charCodeAt(e.position); y !== 0; ) {
|
|
1841
|
+
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (y === 63 || y === 58) && re(r))
|
|
1842
|
+
y === 63 ? (x && (Ae(e, s, p, f, g, null, a, l, c), f = g = h = null), E = !0, x = !0, i = !0) : x ? (x = !1, i = !0) : k(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, y = r;
|
|
1840
1843
|
else {
|
|
1841
|
-
if (a = e.line, l = e.lineStart, c = e.position, !
|
|
1844
|
+
if (a = e.line, l = e.lineStart, c = e.position, !_e(e, n, pn, !1, !0))
|
|
1842
1845
|
break;
|
|
1843
1846
|
if (e.line === o) {
|
|
1844
|
-
for (
|
|
1845
|
-
|
|
1846
|
-
if (
|
|
1847
|
-
|
|
1847
|
+
for (y = e.input.charCodeAt(e.position); he(y); )
|
|
1848
|
+
y = e.input.charCodeAt(++e.position);
|
|
1849
|
+
if (y === 58)
|
|
1850
|
+
y = e.input.charCodeAt(++e.position), re(y) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ae(e, s, p, f, g, null, a, l, c), f = g = h = null), E = !0, x = !1, i = !1, f = e.tag, g = e.result;
|
|
1848
1851
|
else if (E)
|
|
1849
1852
|
k(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1850
1853
|
else
|
|
1851
|
-
return e.tag =
|
|
1854
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1852
1855
|
} else if (E)
|
|
1853
1856
|
k(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1854
1857
|
else
|
|
1855
|
-
return e.tag =
|
|
1858
|
+
return e.tag = u, e.anchor = d, !0;
|
|
1856
1859
|
}
|
|
1857
|
-
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position),
|
|
1860
|
+
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position), _e(e, t, Be, !0, i) && (x ? g = e.result : h = e.result), x || (Ae(e, s, p, f, g, h, a, l, c), f = g = h = null), G(e, !0, -1), y = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && y !== 0)
|
|
1858
1861
|
k(e, "bad indentation of a mapping entry");
|
|
1859
1862
|
else if (e.lineIndent < t)
|
|
1860
1863
|
break;
|
|
1861
1864
|
}
|
|
1862
|
-
return x &&
|
|
1865
|
+
return x && Ae(e, s, p, f, g, null, a, l, c), E && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = s), E;
|
|
1863
1866
|
}
|
|
1864
|
-
function
|
|
1867
|
+
function Ca(e) {
|
|
1865
1868
|
var t, n = !1, r = !1, i, o, a;
|
|
1866
1869
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1867
1870
|
if (e.tag !== null && k(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (r = !0, i = "!!", a = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
@@ -1871,10 +1874,10 @@ function xa(e) {
|
|
|
1871
1874
|
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : k(e, "unexpected end of the stream within a verbatim tag");
|
|
1872
1875
|
} else {
|
|
1873
1876
|
for (; a !== 0 && !re(a); )
|
|
1874
|
-
a === 33 && (r ? k(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1),
|
|
1875
|
-
o = e.input.slice(t, e.position),
|
|
1877
|
+
a === 33 && (r ? k(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), hn.test(i) || k(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1878
|
+
o = e.input.slice(t, e.position), sa.test(o) && k(e, "tag suffix cannot contain flow indicator characters");
|
|
1876
1879
|
}
|
|
1877
|
-
o && !
|
|
1880
|
+
o && !gn.test(o) && k(e, "tag name cannot contain such characters: " + o);
|
|
1878
1881
|
try {
|
|
1879
1882
|
o = decodeURIComponent(o);
|
|
1880
1883
|
} catch {
|
|
@@ -1882,47 +1885,47 @@ function xa(e) {
|
|
|
1882
1885
|
}
|
|
1883
1886
|
return n ? e.tag = o : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : k(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1884
1887
|
}
|
|
1885
|
-
function
|
|
1888
|
+
function Aa(e) {
|
|
1886
1889
|
var t, n;
|
|
1887
1890
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1888
|
-
for (e.anchor !== null && k(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !re(n) && !
|
|
1891
|
+
for (e.anchor !== null && k(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !re(n) && !Ce(n); )
|
|
1889
1892
|
n = e.input.charCodeAt(++e.position);
|
|
1890
1893
|
return e.position === t && k(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1891
1894
|
}
|
|
1892
|
-
function
|
|
1895
|
+
function ka(e) {
|
|
1893
1896
|
var t, n, r;
|
|
1894
1897
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
1895
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !re(r) && !
|
|
1898
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !re(r) && !Ce(r); )
|
|
1896
1899
|
r = e.input.charCodeAt(++e.position);
|
|
1897
1900
|
return e.position === t && k(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || k(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], G(e, !0, -1), !0;
|
|
1898
1901
|
}
|
|
1899
|
-
function
|
|
1900
|
-
var o, a, l, c = 1,
|
|
1901
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l =
|
|
1902
|
-
for (;
|
|
1903
|
-
G(e, !0, -1) ? (
|
|
1904
|
-
if (l && (l =
|
|
1902
|
+
function _e(e, t, n, r, i) {
|
|
1903
|
+
var o, a, l, c = 1, u = !1, d = !1, s, p, f, g, h, x;
|
|
1904
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Be === n || mn === n, r && G(e, !0, -1) && (u = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
1905
|
+
for (; Ca(e) || Aa(e); )
|
|
1906
|
+
G(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : l = !1;
|
|
1907
|
+
if (l && (l = u || i), (c === 1 || Be === n) && (Re === n || pn === n ? h = t : h = t + 1, x = e.position - e.lineStart, c === 1 ? l && (kt(e, x) || xa(e, x, h)) || va(e, h) ? d = !0 : (a && ba(e, h) || ga(e, h) || ya(e, h) ? d = !0 : ka(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && k(e, "alias node should not have any properties")) : ha(e, h, Re === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (d = l && kt(e, x))), e.tag === null)
|
|
1905
1908
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1906
1909
|
else if (e.tag === "?") {
|
|
1907
|
-
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'),
|
|
1908
|
-
if (
|
|
1909
|
-
e.result =
|
|
1910
|
+
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), s = 0, p = e.implicitTypes.length; s < p; s += 1)
|
|
1911
|
+
if (g = e.implicitTypes[s], g.resolve(e.result)) {
|
|
1912
|
+
e.result = g.construct(e.result), e.tag = g.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1910
1913
|
break;
|
|
1911
1914
|
}
|
|
1912
1915
|
} else if (e.tag !== "!") {
|
|
1913
1916
|
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1914
|
-
|
|
1917
|
+
g = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1915
1918
|
else
|
|
1916
|
-
for (
|
|
1917
|
-
if (e.tag.slice(0, f[
|
|
1918
|
-
|
|
1919
|
+
for (g = null, f = e.typeMap.multi[e.kind || "fallback"], s = 0, p = f.length; s < p; s += 1)
|
|
1920
|
+
if (e.tag.slice(0, f[s].tag.length) === f[s].tag) {
|
|
1921
|
+
g = f[s];
|
|
1919
1922
|
break;
|
|
1920
1923
|
}
|
|
1921
|
-
|
|
1924
|
+
g || k(e, "unknown tag !<" + e.tag + ">"), e.result !== null && g.kind !== e.kind && k(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + g.kind + '", not "' + e.kind + '"'), g.resolve(e.result, e.tag) ? (e.result = g.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : k(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1922
1925
|
}
|
|
1923
1926
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1924
1927
|
}
|
|
1925
|
-
function
|
|
1928
|
+
function _a(e) {
|
|
1926
1929
|
var t = e.position, n, r, i, o = !1, a;
|
|
1927
1930
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (G(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
1928
1931
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !re(a); )
|
|
@@ -1941,9 +1944,9 @@ function ka(e) {
|
|
|
1941
1944
|
a = e.input.charCodeAt(++e.position);
|
|
1942
1945
|
i.push(e.input.slice(n, e.position));
|
|
1943
1946
|
}
|
|
1944
|
-
a !== 0 &&
|
|
1947
|
+
a !== 0 && at(e), pe.call(Ct, r) ? Ct[r](e, r, i) : Ke(e, 'unknown document directive "' + r + '"');
|
|
1945
1948
|
}
|
|
1946
|
-
if (G(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, G(e, !0, -1)) : o && k(e, "directives end mark is expected"),
|
|
1949
|
+
if (G(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, G(e, !0, -1)) : o && k(e, "directives end mark is expected"), _e(e, e.lineIndent - 1, Be, !1, !0), G(e, !0, -1), e.checkLineBreaks && ca.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Pe(e)) {
|
|
1947
1950
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, G(e, !0, -1));
|
|
1948
1951
|
return;
|
|
1949
1952
|
}
|
|
@@ -1952,36 +1955,36 @@ function ka(e) {
|
|
|
1952
1955
|
else
|
|
1953
1956
|
return;
|
|
1954
1957
|
}
|
|
1955
|
-
function
|
|
1958
|
+
function xn(e, t) {
|
|
1956
1959
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1957
1960
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1958
|
-
var n = new
|
|
1961
|
+
var n = new ma(e, t), r = e.indexOf("\0");
|
|
1959
1962
|
for (r !== -1 && (n.position = r, k(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1960
1963
|
n.lineIndent += 1, n.position += 1;
|
|
1961
1964
|
for (; n.position < n.length - 1; )
|
|
1962
|
-
|
|
1965
|
+
_a(n);
|
|
1963
1966
|
return n.documents;
|
|
1964
1967
|
}
|
|
1965
|
-
function
|
|
1968
|
+
function wa(e, t, n) {
|
|
1966
1969
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1967
|
-
var r =
|
|
1970
|
+
var r = xn(e, n);
|
|
1968
1971
|
if (typeof t != "function")
|
|
1969
1972
|
return r;
|
|
1970
1973
|
for (var i = 0, o = r.length; i < o; i += 1)
|
|
1971
1974
|
t(r[i]);
|
|
1972
1975
|
}
|
|
1973
|
-
function
|
|
1974
|
-
var n =
|
|
1976
|
+
function Sa(e, t) {
|
|
1977
|
+
var n = xn(e, t);
|
|
1975
1978
|
if (n.length !== 0) {
|
|
1976
1979
|
if (n.length === 1)
|
|
1977
1980
|
return n[0];
|
|
1978
1981
|
throw new ne("expected a single document in the stream, but found more");
|
|
1979
1982
|
}
|
|
1980
1983
|
}
|
|
1981
|
-
var
|
|
1982
|
-
loadAll:
|
|
1984
|
+
var Ia = wa, Ta = Sa, Cn = {
|
|
1985
|
+
loadAll: Ia,
|
|
1983
1986
|
load: Ta
|
|
1984
|
-
},
|
|
1987
|
+
}, An = Object.prototype.toString, kn = Object.prototype.hasOwnProperty, lt = 65279, $a = 9, Ie = 10, Ea = 13, Fa = 32, Oa = 33, La = 34, ze = 35, Ra = 37, Ba = 38, Ka = 39, Na = 42, _n = 44, Ma = 45, Ne = 58, Da = 61, ja = 62, Ua = 63, Pa = 64, wn = 91, Sn = 93, qa = 96, In = 123, Ha = 124, Tn = 125, ee = {};
|
|
1985
1988
|
ee[0] = "\\0";
|
|
1986
1989
|
ee[7] = "\\a";
|
|
1987
1990
|
ee[8] = "\\b";
|
|
@@ -1997,7 +2000,7 @@ ee[133] = "\\N";
|
|
|
1997
2000
|
ee[160] = "\\_";
|
|
1998
2001
|
ee[8232] = "\\L";
|
|
1999
2002
|
ee[8233] = "\\P";
|
|
2000
|
-
var
|
|
2003
|
+
var Ya = [
|
|
2001
2004
|
"y",
|
|
2002
2005
|
"Y",
|
|
2003
2006
|
"yes",
|
|
@@ -2014,15 +2017,15 @@ var Ha = [
|
|
|
2014
2017
|
"off",
|
|
2015
2018
|
"Off",
|
|
2016
2019
|
"OFF"
|
|
2017
|
-
],
|
|
2018
|
-
function
|
|
2020
|
+
], Va = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2021
|
+
function Wa(e, t) {
|
|
2019
2022
|
var n, r, i, o, a, l, c;
|
|
2020
2023
|
if (t === null) return {};
|
|
2021
2024
|
for (n = {}, r = Object.keys(t), i = 0, o = r.length; i < o; i += 1)
|
|
2022
|
-
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), c = e.compiledTypeMap.fallback[a], c &&
|
|
2025
|
+
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), c = e.compiledTypeMap.fallback[a], c && kn.call(c.styleAliases, l) && (l = c.styleAliases[l]), n[a] = l;
|
|
2023
2026
|
return n;
|
|
2024
2027
|
}
|
|
2025
|
-
function
|
|
2028
|
+
function Ja(e) {
|
|
2026
2029
|
var t, n, r;
|
|
2027
2030
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2028
2031
|
n = "x", r = 2;
|
|
@@ -2034,94 +2037,94 @@ function Wa(e) {
|
|
|
2034
2037
|
throw new ne("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2035
2038
|
return "\\" + n + Q.repeat("0", r - t.length) + t;
|
|
2036
2039
|
}
|
|
2037
|
-
var
|
|
2038
|
-
function
|
|
2039
|
-
this.schema = e.schema ||
|
|
2040
|
+
var Ga = 1, Te = 2;
|
|
2041
|
+
function za(e) {
|
|
2042
|
+
this.schema = e.schema || it, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Q.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Wa(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 === '"' ? Te : Ga, 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;
|
|
2040
2043
|
}
|
|
2041
|
-
function
|
|
2044
|
+
function _t(e, t) {
|
|
2042
2045
|
for (var n = Q.repeat(" ", t), r = 0, i = -1, o = "", a, l = e.length; r < l; )
|
|
2043
2046
|
i = e.indexOf(`
|
|
2044
2047
|
`, r), i === -1 ? (a = e.slice(r), r = l) : (a = e.slice(r, i + 1), r = i + 1), a.length && a !== `
|
|
2045
2048
|
` && (o += n), o += a;
|
|
2046
2049
|
return o;
|
|
2047
2050
|
}
|
|
2048
|
-
function
|
|
2051
|
+
function Qe(e, t) {
|
|
2049
2052
|
return `
|
|
2050
2053
|
` + Q.repeat(" ", e.indent * t);
|
|
2051
2054
|
}
|
|
2052
|
-
function
|
|
2055
|
+
function Qa(e, t) {
|
|
2053
2056
|
var n, r, i;
|
|
2054
2057
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2055
2058
|
if (i = e.implicitTypes[n], i.resolve(t))
|
|
2056
2059
|
return !0;
|
|
2057
2060
|
return !1;
|
|
2058
2061
|
}
|
|
2059
|
-
function
|
|
2060
|
-
return e ===
|
|
2062
|
+
function Me(e) {
|
|
2063
|
+
return e === Fa || e === $a;
|
|
2061
2064
|
}
|
|
2062
2065
|
function $e(e) {
|
|
2063
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2066
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== lt || 65536 <= e && e <= 1114111;
|
|
2064
2067
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return $e(e) && e !==
|
|
2068
|
+
function wt(e) {
|
|
2069
|
+
return $e(e) && e !== lt && e !== Ea && e !== Ie;
|
|
2067
2070
|
}
|
|
2068
|
-
function
|
|
2069
|
-
var r =
|
|
2071
|
+
function St(e, t, n) {
|
|
2072
|
+
var r = wt(e), i = r && !Me(e);
|
|
2070
2073
|
return (
|
|
2071
2074
|
// ns-plain-safe
|
|
2072
2075
|
(n ? (
|
|
2073
2076
|
// c = flow-in
|
|
2074
2077
|
r
|
|
2075
|
-
) : r && e !==
|
|
2078
|
+
) : r && e !== _n && e !== wn && e !== Sn && e !== In && e !== Tn) && e !== ze && !(t === Ne && !i) || wt(t) && !Me(t) && e === ze || t === Ne && i
|
|
2076
2079
|
);
|
|
2077
2080
|
}
|
|
2078
|
-
function Qa(e) {
|
|
2079
|
-
return $e(e) && e !== ot && !Ke(e) && e !== Ka && e !== ja && e !== Ne && e !== kn && e !== _n && e !== wn && e !== Sn && e !== Tn && e !== Ge && e !== Ra && e !== Na && e !== Oa && e !== qa && e !== Ma && e !== Da && e !== Ba && e !== Fa && e !== La && e !== Ua && e !== Pa;
|
|
2080
|
-
}
|
|
2081
2081
|
function Za(e) {
|
|
2082
|
-
return !
|
|
2082
|
+
return $e(e) && e !== lt && !Me(e) && e !== Ma && e !== Ua && e !== Ne && e !== _n && e !== wn && e !== Sn && e !== In && e !== Tn && e !== ze && e !== Ba && e !== Na && e !== Oa && e !== Ha && e !== Da && e !== ja && e !== Ka && e !== La && e !== Ra && e !== Pa && e !== qa;
|
|
2083
|
+
}
|
|
2084
|
+
function Xa(e) {
|
|
2085
|
+
return !Me(e) && e !== Ne;
|
|
2083
2086
|
}
|
|
2084
2087
|
function we(e, t) {
|
|
2085
2088
|
var n = e.charCodeAt(t), r;
|
|
2086
2089
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2087
2090
|
}
|
|
2088
|
-
function
|
|
2091
|
+
function $n(e) {
|
|
2089
2092
|
var t = /^\n* /;
|
|
2090
2093
|
return t.test(e);
|
|
2091
2094
|
}
|
|
2092
|
-
var
|
|
2093
|
-
function
|
|
2094
|
-
var c,
|
|
2095
|
+
var En = 1, Ze = 2, Fn = 3, On = 4, xe = 5;
|
|
2096
|
+
function eo(e, t, n, r, i, o, a, l) {
|
|
2097
|
+
var c, u = 0, d = null, s = !1, p = !1, f = r !== -1, g = -1, h = Za(we(e, 0)) && Xa(we(e, e.length - 1));
|
|
2095
2098
|
if (t || a)
|
|
2096
|
-
for (c = 0; c < e.length;
|
|
2097
|
-
if (
|
|
2098
|
-
return
|
|
2099
|
-
|
|
2099
|
+
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
2100
|
+
if (u = we(e, c), !$e(u))
|
|
2101
|
+
return xe;
|
|
2102
|
+
h = h && St(u, d, l), d = u;
|
|
2100
2103
|
}
|
|
2101
2104
|
else {
|
|
2102
|
-
for (c = 0; c < e.length;
|
|
2103
|
-
if (
|
|
2104
|
-
|
|
2105
|
-
c -
|
|
2106
|
-
else if (!$e(
|
|
2107
|
-
return
|
|
2108
|
-
|
|
2105
|
+
for (c = 0; c < e.length; u >= 65536 ? c += 2 : c++) {
|
|
2106
|
+
if (u = we(e, c), u === Ie)
|
|
2107
|
+
s = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
2108
|
+
c - g - 1 > r && e[g + 1] !== " ", g = c);
|
|
2109
|
+
else if (!$e(u))
|
|
2110
|
+
return xe;
|
|
2111
|
+
h = h && St(u, d, l), d = u;
|
|
2109
2112
|
}
|
|
2110
|
-
p = p || f && c -
|
|
2113
|
+
p = p || f && c - g - 1 > r && e[g + 1] !== " ";
|
|
2111
2114
|
}
|
|
2112
|
-
return !
|
|
2115
|
+
return !s && !p ? h && !a && !i(e) ? En : o === Te ? xe : Ze : n > 9 && $n(e) ? xe : a ? o === Te ? xe : Ze : p ? On : Fn;
|
|
2113
2116
|
}
|
|
2114
|
-
function
|
|
2117
|
+
function to(e, t, n, r, i) {
|
|
2115
2118
|
e.dump = function() {
|
|
2116
2119
|
if (t.length === 0)
|
|
2117
|
-
return e.quotingType ===
|
|
2118
|
-
if (!e.noCompatMode && (
|
|
2119
|
-
return e.quotingType ===
|
|
2120
|
+
return e.quotingType === Te ? '""' : "''";
|
|
2121
|
+
if (!e.noCompatMode && (Ya.indexOf(t) !== -1 || Va.test(t)))
|
|
2122
|
+
return e.quotingType === Te ? '"' + t + '"' : "'" + t + "'";
|
|
2120
2123
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2121
|
-
function c(
|
|
2122
|
-
return
|
|
2124
|
+
function c(u) {
|
|
2125
|
+
return Qa(e, u);
|
|
2123
2126
|
}
|
|
2124
|
-
switch (
|
|
2127
|
+
switch (eo(
|
|
2125
2128
|
t,
|
|
2126
2129
|
l,
|
|
2127
2130
|
e.indent,
|
|
@@ -2131,23 +2134,23 @@ function eo(e, t, n, r, i) {
|
|
|
2131
2134
|
e.forceQuotes && !r,
|
|
2132
2135
|
i
|
|
2133
2136
|
)) {
|
|
2134
|
-
case
|
|
2137
|
+
case En:
|
|
2135
2138
|
return t;
|
|
2136
|
-
case
|
|
2139
|
+
case Ze:
|
|
2137
2140
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2138
|
-
case
|
|
2139
|
-
return "|" +
|
|
2141
|
+
case Fn:
|
|
2142
|
+
return "|" + It(t, e.indent) + Tt(_t(t, o));
|
|
2140
2143
|
case On:
|
|
2141
|
-
return ">" +
|
|
2142
|
-
case
|
|
2143
|
-
return '"' +
|
|
2144
|
+
return ">" + It(t, e.indent) + Tt(_t(no(t, a), o));
|
|
2145
|
+
case xe:
|
|
2146
|
+
return '"' + ro(t) + '"';
|
|
2144
2147
|
default:
|
|
2145
2148
|
throw new ne("impossible error: invalid scalar style");
|
|
2146
2149
|
}
|
|
2147
2150
|
}();
|
|
2148
2151
|
}
|
|
2149
|
-
function
|
|
2150
|
-
var n =
|
|
2152
|
+
function It(e, t) {
|
|
2153
|
+
var n = $n(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
2151
2154
|
`, i = r && (e[e.length - 2] === `
|
|
2152
2155
|
` || e === `
|
|
2153
2156
|
`), o = i ? "+" : r ? "" : "-";
|
|
@@ -2158,20 +2161,20 @@ function Tt(e) {
|
|
|
2158
2161
|
return e[e.length - 1] === `
|
|
2159
2162
|
` ? e.slice(0, -1) : e;
|
|
2160
2163
|
}
|
|
2161
|
-
function
|
|
2164
|
+
function no(e, t) {
|
|
2162
2165
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2163
|
-
var
|
|
2166
|
+
var u = e.indexOf(`
|
|
2164
2167
|
`);
|
|
2165
|
-
return
|
|
2168
|
+
return u = u !== -1 ? u : e.length, n.lastIndex = u, $t(e.slice(0, u), t);
|
|
2166
2169
|
}(), i = e[0] === `
|
|
2167
2170
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2168
2171
|
var l = a[1], c = a[2];
|
|
2169
2172
|
o = c[0] === " ", r += l + (!i && !o && c !== "" ? `
|
|
2170
|
-
` : "") +
|
|
2173
|
+
` : "") + $t(c, t), i = o;
|
|
2171
2174
|
}
|
|
2172
2175
|
return r;
|
|
2173
2176
|
}
|
|
2174
|
-
function
|
|
2177
|
+
function $t(e, t) {
|
|
2175
2178
|
if (e === "" || e[0] === " ") return e;
|
|
2176
2179
|
for (var n = / [^ ]/g, r, i = 0, o, a = 0, l = 0, c = ""; r = n.exec(e); )
|
|
2177
2180
|
l = r.index, l - i > t && (o = a > i ? a : l, c += `
|
|
@@ -2180,31 +2183,31 @@ function It(e, t) {
|
|
|
2180
2183
|
`, e.length - i > t && a > i ? c += e.slice(i, a) + `
|
|
2181
2184
|
` + e.slice(a + 1) : c += e.slice(i), c.slice(1);
|
|
2182
2185
|
}
|
|
2183
|
-
function
|
|
2186
|
+
function ro(e) {
|
|
2184
2187
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2185
|
-
n = we(e, i), r = ee[n], !r && $e(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r ||
|
|
2188
|
+
n = we(e, i), r = ee[n], !r && $e(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Ja(n);
|
|
2186
2189
|
return t;
|
|
2187
2190
|
}
|
|
2188
|
-
function
|
|
2191
|
+
function io(e, t, n) {
|
|
2189
2192
|
var r = "", i = e.tag, o, a, l;
|
|
2190
2193
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2191
2194
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (se(e, t, l, !1, !1) || typeof l > "u" && se(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2192
2195
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2193
2196
|
}
|
|
2194
|
-
function
|
|
2197
|
+
function Et(e, t, n, r) {
|
|
2195
2198
|
var i = "", o = e.tag, a, l, c;
|
|
2196
2199
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2197
|
-
c = n[a], e.replacer && (c = e.replacer.call(n, String(a), c)), (se(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && se(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i +=
|
|
2200
|
+
c = n[a], e.replacer && (c = e.replacer.call(n, String(a), c)), (se(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && se(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += Qe(e, t)), e.dump && Ie === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2198
2201
|
e.tag = o, e.dump = i || "[]";
|
|
2199
2202
|
}
|
|
2200
|
-
function
|
|
2201
|
-
var r = "", i = e.tag, o = Object.keys(n), a, l, c,
|
|
2203
|
+
function ao(e, t, n) {
|
|
2204
|
+
var r = "", i = e.tag, o = Object.keys(n), a, l, c, u, d;
|
|
2202
2205
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2203
|
-
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), c = o[a],
|
|
2206
|
+
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), c = o[a], u = n[c], e.replacer && (u = e.replacer.call(n, c, u)), se(e, t, c, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), se(e, t, u, !1, !1) && (d += e.dump, r += d));
|
|
2204
2207
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2205
2208
|
}
|
|
2206
|
-
function
|
|
2207
|
-
var i = "", o = e.tag, a = Object.keys(n), l, c,
|
|
2209
|
+
function oo(e, t, n, r) {
|
|
2210
|
+
var i = "", o = e.tag, a = Object.keys(n), l, c, u, d, s, p;
|
|
2208
2211
|
if (e.sortKeys === !0)
|
|
2209
2212
|
a.sort();
|
|
2210
2213
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2212,17 +2215,17 @@ function ao(e, t, n, r) {
|
|
|
2212
2215
|
else if (e.sortKeys)
|
|
2213
2216
|
throw new ne("sortKeys must be a boolean or a function");
|
|
2214
2217
|
for (l = 0, c = a.length; l < c; l += 1)
|
|
2215
|
-
p = "", (!r || i !== "") && (p +=
|
|
2218
|
+
p = "", (!r || i !== "") && (p += Qe(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), se(e, t + 1, u, !0, !0, !0) && (s = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, s && (e.dump && Ie === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, s && (p += Qe(e, t)), se(e, t + 1, d, !0, s) && (e.dump && Ie === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
2216
2219
|
e.tag = o, e.dump = i || "{}";
|
|
2217
2220
|
}
|
|
2218
|
-
function
|
|
2221
|
+
function Ft(e, t, n) {
|
|
2219
2222
|
var r, i, o, a, l, c;
|
|
2220
2223
|
for (i = n ? e.explicitTypes : e.implicitTypes, o = 0, a = i.length; o < a; o += 1)
|
|
2221
2224
|
if (l = i[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2222
2225
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2223
|
-
if (c = e.styleMap[l.tag] || l.defaultStyle,
|
|
2226
|
+
if (c = e.styleMap[l.tag] || l.defaultStyle, An.call(l.represent) === "[object Function]")
|
|
2224
2227
|
r = l.represent(t, c);
|
|
2225
|
-
else if (
|
|
2228
|
+
else if (kn.call(l.represent, c))
|
|
2226
2229
|
r = l.represent[c](t, c);
|
|
2227
2230
|
else
|
|
2228
2231
|
throw new ne("!<" + l.tag + '> tag resolver accepts not "' + c + '" style');
|
|
@@ -2233,96 +2236,96 @@ function Et(e, t, n) {
|
|
|
2233
2236
|
return !1;
|
|
2234
2237
|
}
|
|
2235
2238
|
function se(e, t, n, r, i, o, a) {
|
|
2236
|
-
e.tag = null, e.dump = n,
|
|
2237
|
-
var l =
|
|
2239
|
+
e.tag = null, e.dump = n, Ft(e, n, !1) || Ft(e, n, !0);
|
|
2240
|
+
var l = An.call(e.dump), c = r, u;
|
|
2238
2241
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2239
|
-
var d = l === "[object Object]" || l === "[object Array]",
|
|
2240
|
-
if (d && (
|
|
2241
|
-
e.dump = "*ref_" +
|
|
2242
|
+
var d = l === "[object Object]" || l === "[object Array]", s, p;
|
|
2243
|
+
if (d && (s = e.duplicates.indexOf(n), p = s !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (i = !1), p && e.usedDuplicates[s])
|
|
2244
|
+
e.dump = "*ref_" + s;
|
|
2242
2245
|
else {
|
|
2243
|
-
if (d && p && !e.usedDuplicates[
|
|
2244
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2246
|
+
if (d && p && !e.usedDuplicates[s] && (e.usedDuplicates[s] = !0), l === "[object Object]")
|
|
2247
|
+
r && Object.keys(e.dump).length !== 0 ? (oo(e, t, e.dump, i), p && (e.dump = "&ref_" + s + e.dump)) : (ao(e, t, e.dump), p && (e.dump = "&ref_" + s + " " + e.dump));
|
|
2245
2248
|
else if (l === "[object Array]")
|
|
2246
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ?
|
|
2249
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Et(e, t - 1, e.dump, i) : Et(e, t, e.dump, i), p && (e.dump = "&ref_" + s + e.dump)) : (io(e, t, e.dump), p && (e.dump = "&ref_" + s + " " + e.dump));
|
|
2247
2250
|
else if (l === "[object String]")
|
|
2248
|
-
e.tag !== "?" &&
|
|
2251
|
+
e.tag !== "?" && to(e, e.dump, t, o, c);
|
|
2249
2252
|
else {
|
|
2250
2253
|
if (l === "[object Undefined]")
|
|
2251
2254
|
return !1;
|
|
2252
2255
|
if (e.skipInvalid) return !1;
|
|
2253
2256
|
throw new ne("unacceptable kind of an object to dump " + l);
|
|
2254
2257
|
}
|
|
2255
|
-
e.tag !== null && e.tag !== "?" && (
|
|
2258
|
+
e.tag !== null && e.tag !== "?" && (u = encodeURI(
|
|
2256
2259
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2257
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ?
|
|
2260
|
+
).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
|
|
2258
2261
|
}
|
|
2259
2262
|
return !0;
|
|
2260
2263
|
}
|
|
2261
|
-
function
|
|
2264
|
+
function lo(e, t) {
|
|
2262
2265
|
var n = [], r = [], i, o;
|
|
2263
|
-
for (
|
|
2266
|
+
for (Xe(e, n, r), i = 0, o = r.length; i < o; i += 1)
|
|
2264
2267
|
t.duplicates.push(n[r[i]]);
|
|
2265
2268
|
t.usedDuplicates = new Array(o);
|
|
2266
2269
|
}
|
|
2267
|
-
function
|
|
2270
|
+
function Xe(e, t, n) {
|
|
2268
2271
|
var r, i, o;
|
|
2269
2272
|
if (e !== null && typeof e == "object")
|
|
2270
2273
|
if (i = t.indexOf(e), i !== -1)
|
|
2271
2274
|
n.indexOf(i) === -1 && n.push(i);
|
|
2272
2275
|
else if (t.push(e), Array.isArray(e))
|
|
2273
2276
|
for (i = 0, o = e.length; i < o; i += 1)
|
|
2274
|
-
|
|
2277
|
+
Xe(e[i], t, n);
|
|
2275
2278
|
else
|
|
2276
2279
|
for (r = Object.keys(e), i = 0, o = r.length; i < o; i += 1)
|
|
2277
|
-
|
|
2280
|
+
Xe(e[r[i]], t, n);
|
|
2278
2281
|
}
|
|
2279
|
-
function
|
|
2282
|
+
function co(e, t) {
|
|
2280
2283
|
t = t || {};
|
|
2281
|
-
var n = new
|
|
2282
|
-
n.noRefs ||
|
|
2284
|
+
var n = new za(t);
|
|
2285
|
+
n.noRefs || lo(e, n);
|
|
2283
2286
|
var r = e;
|
|
2284
2287
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), se(n, 0, r, !0, !0) ? n.dump + `
|
|
2285
2288
|
` : "";
|
|
2286
2289
|
}
|
|
2287
|
-
var
|
|
2288
|
-
dump:
|
|
2290
|
+
var so = co, uo = {
|
|
2291
|
+
dump: so
|
|
2289
2292
|
};
|
|
2290
|
-
function
|
|
2293
|
+
function ct(e, t) {
|
|
2291
2294
|
return function() {
|
|
2292
2295
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2293
2296
|
};
|
|
2294
2297
|
}
|
|
2295
|
-
var
|
|
2296
|
-
binary:
|
|
2297
|
-
float:
|
|
2298
|
-
map:
|
|
2299
|
-
null:
|
|
2300
|
-
pairs:
|
|
2301
|
-
set:
|
|
2302
|
-
timestamp:
|
|
2303
|
-
bool:
|
|
2304
|
-
int:
|
|
2305
|
-
merge:
|
|
2306
|
-
omap:
|
|
2307
|
-
seq:
|
|
2308
|
-
str:
|
|
2309
|
-
},
|
|
2310
|
-
Type:
|
|
2311
|
-
Schema:
|
|
2312
|
-
FAILSAFE_SCHEMA:
|
|
2313
|
-
JSON_SCHEMA:
|
|
2314
|
-
CORE_SCHEMA:
|
|
2315
|
-
DEFAULT_SCHEMA:
|
|
2316
|
-
load:
|
|
2317
|
-
loadAll:
|
|
2318
|
-
dump:
|
|
2319
|
-
YAMLException:
|
|
2320
|
-
types:
|
|
2321
|
-
safeLoad:
|
|
2322
|
-
safeLoadAll:
|
|
2323
|
-
safeDump:
|
|
2298
|
+
var fo = X, po = Wt, mo = Qt, ho = nn, go = rn, yo = it, vo = Cn.load, bo = Cn.loadAll, xo = uo.dump, Co = ne, Ao = {
|
|
2299
|
+
binary: sn,
|
|
2300
|
+
float: tn,
|
|
2301
|
+
map: zt,
|
|
2302
|
+
null: Zt,
|
|
2303
|
+
pairs: dn,
|
|
2304
|
+
set: fn,
|
|
2305
|
+
timestamp: ln,
|
|
2306
|
+
bool: Xt,
|
|
2307
|
+
int: en,
|
|
2308
|
+
merge: cn,
|
|
2309
|
+
omap: un,
|
|
2310
|
+
seq: Gt,
|
|
2311
|
+
str: Jt
|
|
2312
|
+
}, ko = ct("safeLoad", "load"), _o = ct("safeLoadAll", "loadAll"), wo = ct("safeDump", "dump"), So = {
|
|
2313
|
+
Type: fo,
|
|
2314
|
+
Schema: po,
|
|
2315
|
+
FAILSAFE_SCHEMA: mo,
|
|
2316
|
+
JSON_SCHEMA: ho,
|
|
2317
|
+
CORE_SCHEMA: go,
|
|
2318
|
+
DEFAULT_SCHEMA: yo,
|
|
2319
|
+
load: vo,
|
|
2320
|
+
loadAll: bo,
|
|
2321
|
+
dump: xo,
|
|
2322
|
+
YAMLException: Co,
|
|
2323
|
+
types: Ao,
|
|
2324
|
+
safeLoad: ko,
|
|
2325
|
+
safeLoadAll: _o,
|
|
2326
|
+
safeDump: wo
|
|
2324
2327
|
};
|
|
2325
|
-
const
|
|
2328
|
+
const Io = { class: "yaml-config" }, Ln = /* @__PURE__ */ z({
|
|
2326
2329
|
__name: "YamlCodeBlock",
|
|
2327
2330
|
props: {
|
|
2328
2331
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2334,12 +2337,12 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2334
2337
|
setup(e) {
|
|
2335
2338
|
const t = e, n = $(() => {
|
|
2336
2339
|
const r = Object.fromEntries(Object.entries(t.entityRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2337
|
-
return Object.keys(r).length === 0 && r.constructor === Object ? "" :
|
|
2340
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : So.dump(r).trim();
|
|
2338
2341
|
});
|
|
2339
2342
|
return (r, i) => {
|
|
2340
2343
|
const o = j("KCodeBlock");
|
|
2341
|
-
return
|
|
2342
|
-
t.entityRecord ? (
|
|
2344
|
+
return v(), R("div", Io, [
|
|
2345
|
+
t.entityRecord ? (v(), D(o, {
|
|
2343
2346
|
key: 0,
|
|
2344
2347
|
id: "yaml-codeblock",
|
|
2345
2348
|
code: n.value,
|
|
@@ -2349,7 +2352,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2349
2352
|
]);
|
|
2350
2353
|
};
|
|
2351
2354
|
}
|
|
2352
|
-
}), To = { class: "terraform-config" }, te = " ",
|
|
2355
|
+
}), To = { class: "terraform-config" }, te = " ", Rn = /* @__PURE__ */ z({
|
|
2353
2356
|
__name: "TerraformCodeBlock",
|
|
2354
2357
|
props: {
|
|
2355
2358
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2360,7 +2363,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2360
2363
|
entityType: {
|
|
2361
2364
|
type: String,
|
|
2362
2365
|
required: !0,
|
|
2363
|
-
validator: (e) =>
|
|
2366
|
+
validator: (e) => je.includes(e)
|
|
2364
2367
|
},
|
|
2365
2368
|
credentialType: {
|
|
2366
2369
|
type: String,
|
|
@@ -2369,74 +2372,74 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2369
2372
|
},
|
|
2370
2373
|
setup(e) {
|
|
2371
2374
|
const t = e, n = (l, c) => {
|
|
2372
|
-
const
|
|
2375
|
+
const u = te;
|
|
2373
2376
|
let d = "";
|
|
2374
|
-
return typeof l == "string" ? d += `${
|
|
2375
|
-
` : d += `${
|
|
2377
|
+
return typeof l == "string" ? d += `${u}${c} = "${l}"
|
|
2378
|
+
` : d += `${u}${c} = ${String(l ?? "")}
|
|
2376
2379
|
`, d;
|
|
2377
|
-
}, r = (l, c,
|
|
2380
|
+
}, r = (l, c, u = "") => {
|
|
2378
2381
|
if (typeof l != "object")
|
|
2379
2382
|
return "Invalid object";
|
|
2380
|
-
const d = te +
|
|
2381
|
-
let
|
|
2382
|
-
if (c && (
|
|
2383
|
+
const d = te + u;
|
|
2384
|
+
let s = "";
|
|
2385
|
+
if (c && (s += `${d}${c} = {
|
|
2383
2386
|
`), l === null)
|
|
2384
|
-
return c ?
|
|
2385
|
-
const p = Object.fromEntries(Object.entries(l).filter(([,
|
|
2387
|
+
return c ? s += `${d}}` : s = "{}", s;
|
|
2388
|
+
const p = Object.fromEntries(Object.entries(l).filter(([, g]) => g !== null));
|
|
2386
2389
|
let f = "";
|
|
2387
|
-
for (const [
|
|
2388
|
-
Array.isArray(
|
|
2389
|
-
`, f += i(
|
|
2390
|
-
`, f += r(
|
|
2390
|
+
for (const [g, h] of Object.entries(p))
|
|
2391
|
+
Array.isArray(h) ? h.length === 0 ? f = "[]" : (f = `[
|
|
2392
|
+
`, f += i(h, void 0, d), f += `${d}${te}]`) : h && typeof h == "object" ? (f = `{
|
|
2393
|
+
`, f += r(h, void 0, d), f += `${d}${te}}`) : f = String(h ?? ""), typeof h == "string" && (f = `"${f}"`), s += `${d}${te}${g} = ${f}
|
|
2391
2394
|
`;
|
|
2392
|
-
return c ?
|
|
2393
|
-
` :
|
|
2394
|
-
}, i = (l, c,
|
|
2395
|
+
return c ? s += `${d}}
|
|
2396
|
+
` : s;
|
|
2397
|
+
}, i = (l, c, u = "") => {
|
|
2395
2398
|
if (!Array.isArray(l))
|
|
2396
2399
|
return "Invalid array";
|
|
2397
|
-
const d = te +
|
|
2398
|
-
let
|
|
2399
|
-
c && (l.length === 0 ?
|
|
2400
|
+
const d = te + u;
|
|
2401
|
+
let s = "";
|
|
2402
|
+
c && (l.length === 0 ? s += `${d}${c} = [` : s += `${d}${c} = [
|
|
2400
2403
|
`);
|
|
2401
2404
|
for (let p = 0; p < l.length; p++) {
|
|
2402
2405
|
const f = l[p];
|
|
2403
|
-
typeof f == "object" ? (
|
|
2404
|
-
`,
|
|
2406
|
+
typeof f == "object" ? (s += `${d}${te}{
|
|
2407
|
+
`, s += r(f, void 0, d), s += `${d}${te}}`) : typeof f == "string" ? s += `${d}${te}"${f}"` : s += `${d}${te}${String(f ?? "")}`, p < l.length - 1 && (s += ","), s += `
|
|
2405
2408
|
`;
|
|
2406
2409
|
}
|
|
2407
|
-
return c && (l.length === 0 ?
|
|
2408
|
-
` :
|
|
2409
|
-
`),
|
|
2410
|
+
return c && (l.length === 0 ? s += `]
|
|
2411
|
+
` : s += `${d}]
|
|
2412
|
+
`), s;
|
|
2410
2413
|
}, o = (l) => {
|
|
2411
2414
|
let c = "";
|
|
2412
|
-
for (const [
|
|
2413
|
-
Array.isArray(d) ? c += i(d,
|
|
2415
|
+
for (const [u, d] of Object.entries(l))
|
|
2416
|
+
Array.isArray(d) ? c += i(d, u) : typeof d == "object" ? c += r(d, u) : c += n(d, u);
|
|
2414
2417
|
return c;
|
|
2415
2418
|
}, a = $(() => {
|
|
2416
|
-
var
|
|
2417
|
-
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2419
|
+
var s, p, f, g, h, x, E;
|
|
2420
|
+
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, y]) => y != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((s = t.entityRecord) == null ? void 0 : s.config).filter(([, y]) => y != null)) : void 0;
|
|
2418
2421
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2419
2422
|
return "";
|
|
2420
2423
|
delete l.id;
|
|
2421
|
-
let
|
|
2422
|
-
if ((p = l.service) != null && p.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (
|
|
2423
|
-
const
|
|
2424
|
-
delete l.name,
|
|
2424
|
+
let u = "", d = "";
|
|
2425
|
+
if ((p = l.service) != null && p.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (g = l.consumer) != null && g.id ? (d = "consumer", delete l.consumer) : (h = l.consumer_group) != null && h.id ? (d = "consumer_group", delete l.consumer_group) : (x = l.certificate) != null && x.id ? (d = "certificate", delete l.certificate) : (E = l.set) != null && E.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2426
|
+
const y = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2427
|
+
delete l.name, u += `resource "konnect_gateway_plugin_${y}" "my_${y}" {
|
|
2425
2428
|
`;
|
|
2426
2429
|
} else
|
|
2427
|
-
|
|
2430
|
+
u += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
2428
2431
|
`;
|
|
2429
|
-
return
|
|
2430
|
-
`, d && (
|
|
2431
|
-
`,
|
|
2432
|
-
`,
|
|
2433
|
-
`),
|
|
2434
|
-
`,
|
|
2432
|
+
return u += o(l), u += `${te}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
|
|
2433
|
+
`, d && (u += `${te}${d} = {
|
|
2434
|
+
`, u += `${te}${te}id = konnect_gateway_${d}.my_${d}.id
|
|
2435
|
+
`, u += `${te}}
|
|
2436
|
+
`), u += `}
|
|
2437
|
+
`, u;
|
|
2435
2438
|
});
|
|
2436
2439
|
return (l, c) => {
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2439
|
-
t.entityRecord ? (
|
|
2440
|
+
const u = j("KCodeBlock");
|
|
2441
|
+
return v(), R("div", To, [
|
|
2442
|
+
t.entityRecord ? (v(), D(u, {
|
|
2440
2443
|
key: 0,
|
|
2441
2444
|
id: "terraform-codeblock",
|
|
2442
2445
|
code: a.value,
|
|
@@ -2446,10 +2449,10 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2446
2449
|
]);
|
|
2447
2450
|
};
|
|
2448
2451
|
}
|
|
2449
|
-
}),
|
|
2452
|
+
}), $o = {
|
|
2450
2453
|
key: 0,
|
|
2451
2454
|
class: "config-card-display-form"
|
|
2452
|
-
},
|
|
2455
|
+
}, Eo = ["data-testid"], Fo = {
|
|
2453
2456
|
key: 0,
|
|
2454
2457
|
class: "config-card-prop-section-title"
|
|
2455
2458
|
}, Oo = /* @__PURE__ */ z({
|
|
@@ -2464,7 +2467,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2464
2467
|
entityType: {
|
|
2465
2468
|
type: String,
|
|
2466
2469
|
required: !0,
|
|
2467
|
-
validator: (e) =>
|
|
2470
|
+
validator: (e) => je.includes(e)
|
|
2468
2471
|
},
|
|
2469
2472
|
propertyCollections: {
|
|
2470
2473
|
type: Object,
|
|
@@ -2496,67 +2499,67 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2496
2499
|
}
|
|
2497
2500
|
},
|
|
2498
2501
|
setup(e) {
|
|
2499
|
-
const t = e, n =
|
|
2502
|
+
const t = e, n = et(), { i18n: { t: r } } = H.useI18n(), i = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o = $(() => {
|
|
2500
2503
|
if (!t.record)
|
|
2501
2504
|
return t.record;
|
|
2502
2505
|
const a = JSON.parse(JSON.stringify(t.record));
|
|
2503
2506
|
return delete a.created_at, delete a.updated_at, a;
|
|
2504
2507
|
});
|
|
2505
|
-
return (a, l) => (
|
|
2506
|
-
e.format === "structured" ? (
|
|
2507
|
-
(
|
|
2508
|
+
return (a, l) => (v(), R(le, null, [
|
|
2509
|
+
e.format === "structured" ? (v(), R("div", $o, [
|
|
2510
|
+
(v(!0), R(le, null, oe(e.propListTypes, (c) => (v(), R("div", {
|
|
2508
2511
|
key: `config-card-details-${c}-props`,
|
|
2509
2512
|
class: fe(`config-card-details-${c}-props`),
|
|
2510
2513
|
"data-testid": `config-card-details-${c}-props`
|
|
2511
2514
|
}, [
|
|
2512
|
-
c !== "basic" ? (
|
|
2513
|
-
(
|
|
2514
|
-
key:
|
|
2515
|
-
item:
|
|
2516
|
-
},
|
|
2515
|
+
c !== "basic" ? (v(), R("div", Fo, K(c === "advanced" ? T(r)("baseConfigCard.sections.advanced") : T(r)("baseConfigCard.sections.plugin")), 1)) : q("", !0),
|
|
2516
|
+
(v(!0), R(le, null, oe(e.propertyCollections[c], (u) => (v(), D(qt, {
|
|
2517
|
+
key: u.key,
|
|
2518
|
+
item: u
|
|
2519
|
+
}, ke({
|
|
2517
2520
|
label: C(() => [
|
|
2518
|
-
W(a.$slots, `${
|
|
2521
|
+
W(a.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2519
2522
|
]),
|
|
2520
|
-
[
|
|
2521
|
-
W(a.$slots,
|
|
2522
|
-
row:
|
|
2523
|
+
[u.key]: C(({ rowValue: d }) => [
|
|
2524
|
+
W(a.$slots, u.key, {
|
|
2525
|
+
row: u,
|
|
2523
2526
|
rowValue: d
|
|
2524
2527
|
}, void 0, !0)
|
|
2525
2528
|
]),
|
|
2526
2529
|
_: 2
|
|
2527
2530
|
}, [
|
|
2528
|
-
i(
|
|
2531
|
+
i(u) ? {
|
|
2529
2532
|
name: "label-tooltip",
|
|
2530
2533
|
fn: C(() => [
|
|
2531
|
-
W(a.$slots, `${
|
|
2534
|
+
W(a.$slots, `${u.key}-label-tooltip`, { row: u }, void 0, !0)
|
|
2532
2535
|
]),
|
|
2533
2536
|
key: "0"
|
|
2534
2537
|
} : void 0
|
|
2535
2538
|
]), 1032, ["item"]))), 128))
|
|
2536
|
-
], 10,
|
|
2539
|
+
], 10, Eo))), 128))
|
|
2537
2540
|
])) : q("", !0),
|
|
2538
|
-
e.format === "json" && o.value ? (
|
|
2541
|
+
e.format === "json" && o.value ? (v(), D(Ht, {
|
|
2539
2542
|
key: 1,
|
|
2540
2543
|
config: t.config,
|
|
2541
2544
|
"entity-record": o.value,
|
|
2542
2545
|
"fetcher-url": t.fetcherUrl,
|
|
2543
2546
|
"request-method": "get"
|
|
2544
2547
|
}, null, 8, ["config", "entity-record", "fetcher-url"])) : q("", !0),
|
|
2545
|
-
e.format === "yaml" && o.value ? (
|
|
2548
|
+
e.format === "yaml" && o.value ? (v(), D(Ln, {
|
|
2546
2549
|
key: 2,
|
|
2547
2550
|
"entity-record": o.value
|
|
2548
2551
|
}, null, 8, ["entity-record"])) : q("", !0),
|
|
2549
|
-
e.format === "terraform" && o.value ? (
|
|
2552
|
+
e.format === "terraform" && o.value ? (v(), D(Rn, {
|
|
2550
2553
|
key: 3,
|
|
2551
2554
|
"entity-record": o.value,
|
|
2552
2555
|
"entity-type": t.entityType
|
|
2553
2556
|
}, null, 8, ["entity-record", "entity-type"])) : q("", !0)
|
|
2554
2557
|
], 64));
|
|
2555
2558
|
}
|
|
2556
|
-
}),
|
|
2559
|
+
}), Lo = /* @__PURE__ */ ae(Oo, [["__scopeId", "data-v-d15be7fe"]]), Ro = {
|
|
2557
2560
|
class: "config-card-title",
|
|
2558
2561
|
"data-testid": "config-card-title"
|
|
2559
|
-
},
|
|
2562
|
+
}, Bo = { class: "config-card-actions" }, Ko = ["href"], No = { class: "config-card-details-section" }, Mo = /* @__PURE__ */ z({
|
|
2560
2563
|
__name: "EntityBaseConfigCard",
|
|
2561
2564
|
props: {
|
|
2562
2565
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2577,7 +2580,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2577
2580
|
entityType: {
|
|
2578
2581
|
type: String,
|
|
2579
2582
|
required: !0,
|
|
2580
|
-
validator: (e) =>
|
|
2583
|
+
validator: (e) => je.includes(e)
|
|
2581
2584
|
},
|
|
2582
2585
|
/** Record key that contains the plugin configuration */
|
|
2583
2586
|
pluginConfigKey: {
|
|
@@ -2642,10 +2645,10 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2642
2645
|
},
|
|
2643
2646
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
2644
2647
|
setup(e, { emit: t }) {
|
|
2645
|
-
var
|
|
2648
|
+
var I;
|
|
2646
2649
|
const n = t, r = e, { i18n: { t: i } } = H.useI18n(), { getMessageFromError: o } = H.useErrors(), { convertKeyToTitle: a } = H.useStringHelpers();
|
|
2647
2650
|
H.useSubSchema(r.pluginConfigKey);
|
|
2648
|
-
const { axiosInstance: l } = H.useAxios((
|
|
2651
|
+
const { axiosInstance: l } = H.useAxios((I = r.config) == null ? void 0 : I.axiosRequestConfig), c = [
|
|
2649
2652
|
{
|
|
2650
2653
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
2651
2654
|
value: "structured",
|
|
@@ -2664,9 +2667,9 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2664
2667
|
label: i("baseForm.configuration.terraform"),
|
|
2665
2668
|
value: "terraform"
|
|
2666
2669
|
});
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2669
|
-
},
|
|
2670
|
+
const u = B("structured"), d = (m) => {
|
|
2671
|
+
u.value = m == null ? void 0 : m.value;
|
|
2672
|
+
}, s = {
|
|
2670
2673
|
id: {
|
|
2671
2674
|
type: P.ID,
|
|
2672
2675
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
@@ -2700,117 +2703,117 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2700
2703
|
// the last property displayed
|
|
2701
2704
|
section: ie.Basic
|
|
2702
2705
|
}
|
|
2703
|
-
}, p =
|
|
2704
|
-
var S, w,
|
|
2705
|
-
if (!
|
|
2706
|
+
}, p = B(!1), f = B(!1), g = B(""), h = B({}), x = $(() => {
|
|
2707
|
+
var S, w, b;
|
|
2708
|
+
if (!h.value)
|
|
2706
2709
|
return [];
|
|
2707
|
-
const m = [], A = Object.keys(
|
|
2708
|
-
for (const _ in
|
|
2709
|
-
const
|
|
2710
|
+
const m = [], A = Object.keys(h.value).length;
|
|
2711
|
+
for (const _ in h.value) {
|
|
2712
|
+
const O = (w = (S = r.configSchema) == null ? void 0 : S[_]) == null ? void 0 : w.order, Y = (b = s[_]) == null ? void 0 : b.order;
|
|
2710
2713
|
let U = A;
|
|
2711
|
-
(Y || Y === 0) && (U = Y === -1 ? A + 1 : Y),
|
|
2714
|
+
(Y || Y === 0) && (U = Y === -1 ? A + 1 : Y), O && (U = O === -1 ? A + 1 : O), m.push([_, U]);
|
|
2712
2715
|
}
|
|
2713
|
-
return m.sort(function(_,
|
|
2714
|
-
return _[1] -
|
|
2716
|
+
return m.sort(function(_, O) {
|
|
2717
|
+
return _[1] - O[1];
|
|
2715
2718
|
}), m.map((_) => {
|
|
2716
2719
|
var me, Ee;
|
|
2717
|
-
const
|
|
2720
|
+
const O = _[0], Y = (me = h.value) == null ? void 0 : me[O], U = ((Ee = r.configSchema) == null ? void 0 : Ee[O]) || {}, J = s[O];
|
|
2718
2721
|
return {
|
|
2719
|
-
key:
|
|
2722
|
+
key: O,
|
|
2720
2723
|
value: Y,
|
|
2721
2724
|
hidden: U.hidden || !1,
|
|
2722
2725
|
type: U.type ?? ((J == null ? void 0 : J.type) || P.Text),
|
|
2723
|
-
label: U.label ?? ((J == null ? void 0 : J.label) || a(
|
|
2726
|
+
label: U.label ?? ((J == null ? void 0 : J.label) || a(O)),
|
|
2724
2727
|
tooltip: U.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
2725
2728
|
section: U.section ?? ((J == null ? void 0 : J.section) || ie.Advanced)
|
|
2726
2729
|
};
|
|
2727
2730
|
}).filter((_) => !_.hidden && _.key !== r.pluginConfigKey);
|
|
2728
2731
|
}), E = $(() => {
|
|
2729
|
-
var w,
|
|
2730
|
-
if (!
|
|
2732
|
+
var w, b;
|
|
2733
|
+
if (!h.value || !r.pluginConfigKey)
|
|
2731
2734
|
return [];
|
|
2732
|
-
const m =
|
|
2735
|
+
const m = h.value[r.pluginConfigKey] || {}, A = Object.keys(m).length, S = [];
|
|
2733
2736
|
for (const _ in m) {
|
|
2734
|
-
const
|
|
2737
|
+
const O = (b = (w = r.pluginConfigSchema) == null ? void 0 : w[_]) == null ? void 0 : b.order, Y = m[_];
|
|
2735
2738
|
let U = Y != null && Y !== "" ? A - 1 : A;
|
|
2736
|
-
|
|
2739
|
+
O && (U = O === -1 ? A + 1 : O), S.push([_, U]);
|
|
2737
2740
|
}
|
|
2738
|
-
return S.sort(function(_,
|
|
2739
|
-
return _[1] -
|
|
2741
|
+
return S.sort(function(_, O) {
|
|
2742
|
+
return _[1] - O[1];
|
|
2740
2743
|
}), S.map((_) => {
|
|
2741
2744
|
var J;
|
|
2742
|
-
const
|
|
2745
|
+
const O = _[0], Y = m[O], U = ((J = r.pluginConfigSchema) == null ? void 0 : J[O]) || {};
|
|
2743
2746
|
return {
|
|
2744
|
-
key:
|
|
2747
|
+
key: O,
|
|
2745
2748
|
value: Y,
|
|
2746
2749
|
hidden: U.hidden || !1,
|
|
2747
2750
|
type: U.type ?? P.Text,
|
|
2748
|
-
label: U.label ?? a(
|
|
2751
|
+
label: U.label ?? a(O),
|
|
2749
2752
|
tooltip: U.tooltip ?? void 0,
|
|
2750
2753
|
section: ie.Plugin
|
|
2751
2754
|
};
|
|
2752
2755
|
}).filter((_) => !_.hidden);
|
|
2753
|
-
}),
|
|
2756
|
+
}), y = $(() => {
|
|
2754
2757
|
var m, A, S, w;
|
|
2755
2758
|
return {
|
|
2756
|
-
basic: (m = x.value) == null ? void 0 : m.filter((
|
|
2757
|
-
advanced: (A = x.value) == null ? void 0 : A.filter((
|
|
2758
|
-
plugin: (w = E.value) == null ? void 0 : w.concat((S = x.value) == null ? void 0 : S.filter((
|
|
2759
|
+
basic: (m = x.value) == null ? void 0 : m.filter((b) => b.section === ie.Basic),
|
|
2760
|
+
advanced: (A = x.value) == null ? void 0 : A.filter((b) => b.section === ie.Advanced),
|
|
2761
|
+
plugin: (w = E.value) == null ? void 0 : w.concat((S = x.value) == null ? void 0 : S.filter((b) => b.section === ie.Plugin))
|
|
2759
2762
|
};
|
|
2760
|
-
}),
|
|
2763
|
+
}), L = $(() => {
|
|
2761
2764
|
const m = [];
|
|
2762
|
-
return
|
|
2763
|
-
}),
|
|
2765
|
+
return y.value.basic.length && m.push("basic"), y.value.advanced.length && m.push("advanced"), y.value.plugin.length && m.push("plugin"), m;
|
|
2766
|
+
}), F = $(() => {
|
|
2764
2767
|
var A, S;
|
|
2765
2768
|
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2766
2769
|
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), m = m.replace(/{id}/gi, r.config.entityId), m;
|
|
2767
2770
|
});
|
|
2768
|
-
return
|
|
2771
|
+
return ge(p, (m) => {
|
|
2769
2772
|
n("loading", m);
|
|
2770
2773
|
}, { immediate: !0 }), Nt(async () => {
|
|
2771
2774
|
f.value = !1, p.value = !0;
|
|
2772
2775
|
try {
|
|
2773
|
-
const { data: m } = await l.get(
|
|
2776
|
+
const { data: m } = await l.get(F.value);
|
|
2774
2777
|
if (r.dataKey)
|
|
2775
2778
|
if (typeof m[r.dataKey] < "u")
|
|
2776
|
-
|
|
2779
|
+
h.value = { ...m[r.dataKey] };
|
|
2777
2780
|
else
|
|
2778
2781
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2779
2782
|
else
|
|
2780
|
-
|
|
2783
|
+
h.value = { ...m };
|
|
2781
2784
|
Object.keys(r.configSchema).filter((S) => r.configSchema[S].forceShow).forEach((S) => {
|
|
2782
|
-
|
|
2785
|
+
h.value && typeof h.value[S] > "u" && (h.value[S] = null);
|
|
2783
2786
|
}), n("fetch:success", m);
|
|
2784
2787
|
} catch (m) {
|
|
2785
2788
|
const A = o(m);
|
|
2786
|
-
|
|
2789
|
+
g.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, f.value = !0, n("fetch:error", m);
|
|
2787
2790
|
} finally {
|
|
2788
2791
|
p.value = !1;
|
|
2789
2792
|
}
|
|
2790
2793
|
}), (m, A) => {
|
|
2791
|
-
const S = j("KLabel"), w = j("KSelect"),
|
|
2792
|
-
return
|
|
2794
|
+
const S = j("KLabel"), w = j("KSelect"), b = j("KButton"), _ = j("KSkeleton"), O = j("KEmptyState"), Y = j("KCard");
|
|
2795
|
+
return v(), D(Y, {
|
|
2793
2796
|
class: "kong-ui-entity-base-config-card",
|
|
2794
2797
|
"title-tag": e.titleTag
|
|
2795
|
-
},
|
|
2798
|
+
}, ke({
|
|
2796
2799
|
actions: C(() => [
|
|
2797
|
-
M("div",
|
|
2800
|
+
M("div", Bo, [
|
|
2798
2801
|
W(m.$slots, "actions", {}, void 0, !0),
|
|
2799
|
-
|
|
2802
|
+
N(S, {
|
|
2800
2803
|
class: "config-format-select-label",
|
|
2801
2804
|
"data-testid": "config-format-select-label"
|
|
2802
2805
|
}, {
|
|
2803
2806
|
default: C(() => [
|
|
2804
|
-
V(
|
|
2807
|
+
V(K(e.label), 1)
|
|
2805
2808
|
]),
|
|
2806
2809
|
_: 1
|
|
2807
2810
|
}),
|
|
2808
|
-
|
|
2811
|
+
N(w, {
|
|
2809
2812
|
"data-testid": "select-config-format",
|
|
2810
2813
|
items: c,
|
|
2811
2814
|
onChange: d
|
|
2812
2815
|
}),
|
|
2813
|
-
e.configCardDoc ? (
|
|
2816
|
+
e.configCardDoc ? (v(), D(b, {
|
|
2814
2817
|
key: 0,
|
|
2815
2818
|
appearance: "tertiary",
|
|
2816
2819
|
class: "book-icon",
|
|
@@ -2822,39 +2825,39 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2822
2825
|
rel: "noopener",
|
|
2823
2826
|
target: "_blank"
|
|
2824
2827
|
}, [
|
|
2825
|
-
|
|
2826
|
-
], 8,
|
|
2828
|
+
N(T(Gn), { size: T(Yr) }, null, 8, ["size"])
|
|
2829
|
+
], 8, Ko)
|
|
2827
2830
|
]),
|
|
2828
2831
|
_: 1
|
|
2829
2832
|
})) : q("", !0)
|
|
2830
2833
|
])
|
|
2831
2834
|
]),
|
|
2832
2835
|
default: C(() => [
|
|
2833
|
-
p.value ? (
|
|
2836
|
+
p.value ? (v(), D(_, {
|
|
2834
2837
|
key: 0,
|
|
2835
2838
|
"data-testid": "config-card-loader",
|
|
2836
2839
|
"table-columns": 2,
|
|
2837
2840
|
type: "table"
|
|
2838
|
-
})) : f.value ? (
|
|
2841
|
+
})) : f.value ? (v(), D(O, {
|
|
2839
2842
|
key: 1,
|
|
2840
2843
|
"data-testid": "config-card-fetch-error",
|
|
2841
2844
|
"icon-variant": "error"
|
|
2842
2845
|
}, {
|
|
2843
2846
|
default: C(() => [
|
|
2844
|
-
M("h3", null,
|
|
2847
|
+
M("h3", null, K(g.value), 1)
|
|
2845
2848
|
]),
|
|
2846
2849
|
_: 1
|
|
2847
2850
|
})) : q("", !0),
|
|
2848
2851
|
M("div", No, [
|
|
2849
|
-
|
|
2852
|
+
N(Lo, {
|
|
2850
2853
|
config: e.config,
|
|
2851
2854
|
"entity-type": e.entityType,
|
|
2852
|
-
"fetcher-url":
|
|
2853
|
-
format:
|
|
2854
|
-
"prop-list-types":
|
|
2855
|
-
"property-collections":
|
|
2856
|
-
record:
|
|
2857
|
-
},
|
|
2855
|
+
"fetcher-url": F.value,
|
|
2856
|
+
format: u.value,
|
|
2857
|
+
"prop-list-types": L.value,
|
|
2858
|
+
"property-collections": y.value,
|
|
2859
|
+
record: h.value
|
|
2860
|
+
}, ke({ _: 2 }, [
|
|
2858
2861
|
oe(Object.keys(m.$slots), (U) => ({
|
|
2859
2862
|
name: U,
|
|
2860
2863
|
fn: C(({ row: J, rowValue: me }) => [
|
|
@@ -2872,9 +2875,9 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2872
2875
|
e.hideTitle ? void 0 : {
|
|
2873
2876
|
name: "title",
|
|
2874
2877
|
fn: C(() => [
|
|
2875
|
-
M("span",
|
|
2878
|
+
M("span", Ro, [
|
|
2876
2879
|
W(m.$slots, "title", {}, () => [
|
|
2877
|
-
V(
|
|
2880
|
+
V(K(T(i)("baseConfigCard.title")), 1)
|
|
2878
2881
|
], !0)
|
|
2879
2882
|
])
|
|
2880
2883
|
]),
|
|
@@ -2883,10 +2886,10 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2883
2886
|
]), 1032, ["title-tag"]);
|
|
2884
2887
|
};
|
|
2885
2888
|
}
|
|
2886
|
-
}),
|
|
2889
|
+
}), Bl = /* @__PURE__ */ ae(Mo, [["__scopeId", "data-v-7ef5c755"]]), Do = ["novalidate"], jo = {
|
|
2887
2890
|
class: "form-actions",
|
|
2888
2891
|
"data-testid": "form-actions"
|
|
2889
|
-
},
|
|
2892
|
+
}, Uo = /* @__PURE__ */ z({
|
|
2890
2893
|
__name: "EntityBaseForm",
|
|
2891
2894
|
props: {
|
|
2892
2895
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2907,7 +2910,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2907
2910
|
entityType: {
|
|
2908
2911
|
type: String,
|
|
2909
2912
|
required: !0,
|
|
2910
|
-
validator: (e) =>
|
|
2913
|
+
validator: (e) => je.includes(e)
|
|
2911
2914
|
},
|
|
2912
2915
|
/**
|
|
2913
2916
|
* Fetch url for the item to edit. We will handle the replacement of {controlPlaneId}, {workspace}, and {id}.
|
|
@@ -2962,20 +2965,20 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2962
2965
|
},
|
|
2963
2966
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2964
2967
|
setup(e, { emit: t }) {
|
|
2965
|
-
var
|
|
2966
|
-
const n = t, r = e, i =
|
|
2968
|
+
var F;
|
|
2969
|
+
const n = t, r = e, i = er(), { i18n: { t: o } } = H.useI18n(), { getMessageFromError: a } = H.useErrors(), { axiosInstance: l } = H.useAxios((F = r.config) == null ? void 0 : F.axiosRequestConfig), c = B(!1), u = $(() => !!r.editId), d = B(!1), s = B(""), p = $(() => r.canSubmit === !1 || r.isReadonly), f = B(!1), g = $(() => {
|
|
2967
2970
|
var m, A;
|
|
2968
|
-
let
|
|
2969
|
-
return r.config.app === "konnect" ?
|
|
2970
|
-
}),
|
|
2971
|
+
let I = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2972
|
+
return r.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((m = r.config) == null ? void 0 : m.controlPlaneId) || "") : r.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), r.editId ? (I = I.replace(/{id}/gi, r.editId), I) : (I = I.replace(/\/{id}/gi, ""), I);
|
|
2973
|
+
}), h = () => {
|
|
2971
2974
|
f.value = !f.value;
|
|
2972
2975
|
}, x = () => {
|
|
2973
2976
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : E();
|
|
2974
2977
|
}, E = () => {
|
|
2975
2978
|
n("cancel");
|
|
2976
|
-
},
|
|
2979
|
+
}, y = () => {
|
|
2977
2980
|
p.value || n("submit");
|
|
2978
|
-
},
|
|
2981
|
+
}, L = B([
|
|
2979
2982
|
{
|
|
2980
2983
|
title: o("baseForm.configuration.json"),
|
|
2981
2984
|
hash: "#json"
|
|
@@ -2985,122 +2988,122 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
2985
2988
|
hash: "#yaml"
|
|
2986
2989
|
}
|
|
2987
2990
|
]);
|
|
2988
|
-
return r.config.app === "konnect" && r.entityType !==
|
|
2991
|
+
return r.config.app === "konnect" && r.entityType !== tt.Other && L.value.splice(1, 0, {
|
|
2989
2992
|
title: o("baseForm.configuration.terraform"),
|
|
2990
2993
|
hash: "#terraform"
|
|
2991
|
-
}),
|
|
2992
|
-
n("loading",
|
|
2994
|
+
}), ge(() => c.value, (I) => {
|
|
2995
|
+
n("loading", I);
|
|
2993
2996
|
}, { immediate: !0 }), Nt(async () => {
|
|
2994
2997
|
if (r.editId)
|
|
2995
2998
|
try {
|
|
2996
2999
|
d.value = !1, c.value = !0;
|
|
2997
|
-
const { data:
|
|
2998
|
-
n("fetch:success",
|
|
2999
|
-
} catch (
|
|
3000
|
-
const m = a(
|
|
3001
|
-
|
|
3000
|
+
const { data: I } = await l.get(g.value);
|
|
3001
|
+
n("fetch:success", I);
|
|
3002
|
+
} catch (I) {
|
|
3003
|
+
const m = a(I);
|
|
3004
|
+
s.value = m.startsWith("code") ? o("baseForm.errors.edit") : m, d.value = !0, n("fetch:error", I);
|
|
3002
3005
|
} finally {
|
|
3003
3006
|
c.value = !1;
|
|
3004
3007
|
}
|
|
3005
|
-
}), (
|
|
3006
|
-
const A = j("KSkeleton"), S = j("KEmptyState"), w = j("KAlert"),
|
|
3007
|
-
return
|
|
3008
|
+
}), (I, m) => {
|
|
3009
|
+
const A = j("KSkeleton"), S = j("KEmptyState"), w = j("KAlert"), b = j("KButton"), _ = j("KTabs"), O = j("KSlideout");
|
|
3010
|
+
return v(), D(De(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3008
3011
|
default: C(() => [
|
|
3009
|
-
c.value ? (
|
|
3012
|
+
c.value ? (v(), D(A, {
|
|
3010
3013
|
key: 0,
|
|
3011
3014
|
type: "form"
|
|
3012
|
-
})) : d.value ? (
|
|
3015
|
+
})) : d.value ? (v(), D(S, {
|
|
3013
3016
|
key: 1,
|
|
3014
|
-
"action-button-text":
|
|
3017
|
+
"action-button-text": T(o)("baseForm.actions.back"),
|
|
3015
3018
|
"data-testid": "form-fetch-error",
|
|
3016
3019
|
"icon-variant": "error",
|
|
3017
3020
|
onClickAction: x
|
|
3018
3021
|
}, {
|
|
3019
3022
|
default: C(() => [
|
|
3020
|
-
M("h3", null,
|
|
3023
|
+
M("h3", null, K(s.value), 1)
|
|
3021
3024
|
]),
|
|
3022
3025
|
_: 1
|
|
3023
|
-
}, 8, ["action-button-text"])) : (
|
|
3026
|
+
}, 8, ["action-button-text"])) : (v(), R("form", {
|
|
3024
3027
|
key: 2,
|
|
3025
3028
|
"data-testid": "form-content",
|
|
3026
3029
|
novalidate: r.noValidate,
|
|
3027
|
-
onReset:
|
|
3028
|
-
onSubmit:
|
|
3030
|
+
onReset: Le(E, ["prevent"]),
|
|
3031
|
+
onSubmit: Le(y, ["prevent"])
|
|
3029
3032
|
}, [
|
|
3030
|
-
W(
|
|
3031
|
-
e.errorMessage ? (
|
|
3033
|
+
W(I.$slots, "default", {}, void 0, !0),
|
|
3034
|
+
e.errorMessage ? (v(), D(w, {
|
|
3032
3035
|
key: 0,
|
|
3033
3036
|
appearance: "danger",
|
|
3034
3037
|
"data-testid": "form-error",
|
|
3035
3038
|
message: e.errorMessage
|
|
3036
3039
|
}, null, 8, ["message"])) : q("", !0),
|
|
3037
|
-
M("div",
|
|
3038
|
-
W(
|
|
3039
|
-
|
|
3040
|
+
M("div", jo, [
|
|
3041
|
+
W(I.$slots, "form-actions", {}, () => [
|
|
3042
|
+
N(b, {
|
|
3040
3043
|
appearance: "tertiary",
|
|
3041
|
-
"data-testid": `${e.entityType}-${
|
|
3042
|
-
onClick: m[0] || (m[0] = (Y) =>
|
|
3044
|
+
"data-testid": `${e.entityType}-${u.value ? "edit" : "create"}-form-view-configuration`,
|
|
3045
|
+
onClick: m[0] || (m[0] = (Y) => h())
|
|
3043
3046
|
}, {
|
|
3044
3047
|
default: C(() => [
|
|
3045
|
-
V(
|
|
3048
|
+
V(K(T(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3046
3049
|
]),
|
|
3047
3050
|
_: 1
|
|
3048
3051
|
}, 8, ["data-testid"]),
|
|
3049
|
-
|
|
3052
|
+
N(b, {
|
|
3050
3053
|
appearance: "secondary",
|
|
3051
|
-
"data-testid": `${e.entityType}-${
|
|
3054
|
+
"data-testid": `${e.entityType}-${u.value ? "edit" : "create"}-form-cancel`,
|
|
3052
3055
|
disabled: e.isReadonly,
|
|
3053
3056
|
type: "reset"
|
|
3054
3057
|
}, {
|
|
3055
3058
|
default: C(() => [
|
|
3056
|
-
V(
|
|
3059
|
+
V(K(T(o)("baseForm.actions.cancel")), 1)
|
|
3057
3060
|
]),
|
|
3058
3061
|
_: 1
|
|
3059
3062
|
}, 8, ["data-testid", "disabled"]),
|
|
3060
|
-
|
|
3063
|
+
N(b, {
|
|
3061
3064
|
appearance: "primary",
|
|
3062
|
-
"data-testid": `${e.entityType}-${
|
|
3065
|
+
"data-testid": `${e.entityType}-${u.value ? "edit" : "create"}-form-submit`,
|
|
3063
3066
|
disabled: p.value,
|
|
3064
3067
|
type: "submit"
|
|
3065
3068
|
}, {
|
|
3066
3069
|
default: C(() => [
|
|
3067
|
-
V(
|
|
3070
|
+
V(K(T(o)("baseForm.actions.save")), 1)
|
|
3068
3071
|
]),
|
|
3069
3072
|
_: 1
|
|
3070
3073
|
}, 8, ["data-testid", "disabled"])
|
|
3071
3074
|
], !0)
|
|
3072
3075
|
])
|
|
3073
|
-
], 40,
|
|
3074
|
-
|
|
3076
|
+
], 40, Do)),
|
|
3077
|
+
N(O, {
|
|
3075
3078
|
"close-on-blur": !1,
|
|
3076
3079
|
"data-testid": "form-view-configuration-slideout",
|
|
3077
3080
|
"has-overlay": !1,
|
|
3078
3081
|
"offset-top": 60,
|
|
3079
|
-
title:
|
|
3082
|
+
title: T(o)("baseForm.configuration.title"),
|
|
3080
3083
|
visible: f.value,
|
|
3081
|
-
onClose: m[1] || (m[1] = (Y) =>
|
|
3084
|
+
onClose: m[1] || (m[1] = (Y) => h())
|
|
3082
3085
|
}, {
|
|
3083
3086
|
default: C(() => [
|
|
3084
|
-
M("div", null,
|
|
3085
|
-
|
|
3087
|
+
M("div", null, K(T(o)("baseForm.configuration.message")), 1),
|
|
3088
|
+
N(_, {
|
|
3086
3089
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3087
|
-
tabs:
|
|
3090
|
+
tabs: L.value
|
|
3088
3091
|
}, {
|
|
3089
3092
|
json: C(() => [
|
|
3090
|
-
|
|
3093
|
+
N(Ht, {
|
|
3091
3094
|
config: e.config,
|
|
3092
3095
|
"entity-record": r.formFields,
|
|
3093
|
-
"fetcher-url":
|
|
3096
|
+
"fetcher-url": g.value,
|
|
3094
3097
|
"request-method": r.editId ? "put" : "post"
|
|
3095
3098
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3096
3099
|
]),
|
|
3097
3100
|
yaml: C(() => [
|
|
3098
|
-
|
|
3101
|
+
N(Ln, {
|
|
3099
3102
|
"entity-record": r.formFields
|
|
3100
3103
|
}, null, 8, ["entity-record"])
|
|
3101
3104
|
]),
|
|
3102
3105
|
terraform: C(() => [
|
|
3103
|
-
|
|
3106
|
+
N(Rn, {
|
|
3104
3107
|
"entity-record": r.formFields,
|
|
3105
3108
|
"entity-type": e.entityType
|
|
3106
3109
|
}, null, 8, ["entity-record", "entity-type"])
|
|
@@ -3115,7 +3118,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3115
3118
|
});
|
|
3116
3119
|
};
|
|
3117
3120
|
}
|
|
3118
|
-
}),
|
|
3121
|
+
}), Kl = /* @__PURE__ */ ae(Uo, [["__scopeId", "data-v-6210a67a"]]), Po = ["data-truncate"], qo = /* @__PURE__ */ z({
|
|
3119
3122
|
__name: "EntityBaseTableCell",
|
|
3120
3123
|
props: {
|
|
3121
3124
|
keyName: {
|
|
@@ -3139,22 +3142,22 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3139
3142
|
var x;
|
|
3140
3143
|
return ((x = n.value) == null ? void 0 : x.querySelector('[data-truncate="true"]')) || null;
|
|
3141
3144
|
}), i = $(() => {
|
|
3142
|
-
var E,
|
|
3145
|
+
var E, y;
|
|
3143
3146
|
const x = (E = t.rowEl) == null ? void 0 : E.querySelectorAll("td");
|
|
3144
|
-
return x ? ((
|
|
3147
|
+
return x ? ((y = x[0]) == null ? void 0 : y.getAttribute("data-testid")) === t.keyName : !0;
|
|
3145
3148
|
}), o = $(() => i.value || t.tooltip);
|
|
3146
3149
|
let a;
|
|
3147
3150
|
const l = () => {
|
|
3148
3151
|
a && (a.disconnect(), a = void 0);
|
|
3149
3152
|
}, c = () => {
|
|
3150
|
-
var E,
|
|
3153
|
+
var E, y, L;
|
|
3151
3154
|
let x = ((E = n.value) == null ? void 0 : E.clientWidth) || 0;
|
|
3152
3155
|
if (n.value && "getComputedStyle" in window) {
|
|
3153
|
-
const
|
|
3154
|
-
x -= (parseFloat(
|
|
3156
|
+
const F = window.getComputedStyle(n.value);
|
|
3157
|
+
x -= (parseFloat(F.paddingLeft) || 0) + (parseFloat(F.paddingRight) || 0);
|
|
3155
3158
|
}
|
|
3156
|
-
d.value = ((
|
|
3157
|
-
},
|
|
3159
|
+
d.value = ((y = r.value) == null ? void 0 : y.getBoundingClientRect().width) || 0, s.value = x, p.value = ((L = u.value) == null ? void 0 : L.innerText) || "";
|
|
3160
|
+
}, u = B({}), d = B(0), s = B(0), p = B(""), f = $(() => [r.value, n.value]), g = ge(
|
|
3158
3161
|
f,
|
|
3159
3162
|
(x) => {
|
|
3160
3163
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
@@ -3168,40 +3171,40 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3168
3171
|
}
|
|
3169
3172
|
},
|
|
3170
3173
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3171
|
-
),
|
|
3172
|
-
return
|
|
3174
|
+
), h = $(() => o.value ? d.value > s.value : !1);
|
|
3175
|
+
return jn(() => {
|
|
3173
3176
|
c();
|
|
3174
|
-
}),
|
|
3175
|
-
|
|
3177
|
+
}), Un(() => {
|
|
3178
|
+
g();
|
|
3176
3179
|
}), (x, E) => {
|
|
3177
|
-
const
|
|
3178
|
-
return
|
|
3180
|
+
const y = j("KTooltip");
|
|
3181
|
+
return v(), R("span", {
|
|
3179
3182
|
ref_key: "contentRef",
|
|
3180
|
-
ref:
|
|
3183
|
+
ref: u,
|
|
3181
3184
|
class: "content-wrapper"
|
|
3182
3185
|
}, [
|
|
3183
|
-
o.value ? (
|
|
3186
|
+
o.value ? (v(), R("span", {
|
|
3184
3187
|
key: 0,
|
|
3185
3188
|
"data-truncate": o.value || void 0
|
|
3186
3189
|
}, [
|
|
3187
|
-
|
|
3190
|
+
N(y, {
|
|
3188
3191
|
"max-width": "300",
|
|
3189
3192
|
placement: "bottom-start",
|
|
3190
|
-
text:
|
|
3193
|
+
text: h.value ? p.value : ""
|
|
3191
3194
|
}, {
|
|
3192
3195
|
default: C(() => [
|
|
3193
3196
|
W(x.$slots, "default", {}, void 0, !0)
|
|
3194
3197
|
]),
|
|
3195
3198
|
_: 3
|
|
3196
3199
|
}, 8, ["text"])
|
|
3197
|
-
], 8,
|
|
3200
|
+
], 8, Po)) : W(x.$slots, "default", { key: 1 }, void 0, !0)
|
|
3198
3201
|
], 512);
|
|
3199
3202
|
};
|
|
3200
3203
|
}
|
|
3201
|
-
}),
|
|
3204
|
+
}), Ho = /* @__PURE__ */ ae(qo, [["__scopeId", "data-v-b252463e"]]), Yo = { class: "toolbar-container" }, Vo = {
|
|
3202
3205
|
key: 0,
|
|
3203
3206
|
class: "toolbar-button-container"
|
|
3204
|
-
},
|
|
3207
|
+
}, Wo = /* @__PURE__ */ z({
|
|
3205
3208
|
__name: "EntityBaseTable",
|
|
3206
3209
|
props: {
|
|
3207
3210
|
// table header configuration
|
|
@@ -3223,6 +3226,10 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3223
3226
|
type: Object,
|
|
3224
3227
|
default: null
|
|
3225
3228
|
},
|
|
3229
|
+
rowKey: {
|
|
3230
|
+
type: [String, Function],
|
|
3231
|
+
default: "id"
|
|
3232
|
+
},
|
|
3226
3233
|
// used to identify the cache entry
|
|
3227
3234
|
cacheIdentifier: {
|
|
3228
3235
|
type: String,
|
|
@@ -3328,43 +3335,43 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3328
3335
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3329
3336
|
setup(e, { emit: t }) {
|
|
3330
3337
|
const n = e, r = t, { i18n: { t: i } } = H.useI18n(), o = $(() => {
|
|
3331
|
-
var
|
|
3338
|
+
var b, _;
|
|
3332
3339
|
return typeof n.errorMessage == "string" ? {
|
|
3333
3340
|
hasError: !!n.errorMessage,
|
|
3334
3341
|
title: n.errorMessage,
|
|
3335
3342
|
message: void 0
|
|
3336
3343
|
} : {
|
|
3337
3344
|
hasError: !!n.errorMessage,
|
|
3338
|
-
title: (
|
|
3345
|
+
title: (b = n.errorMessage) == null ? void 0 : b.title,
|
|
3339
3346
|
message: (_ = n.errorMessage) == null ? void 0 : _.message
|
|
3340
3347
|
};
|
|
3341
3348
|
}), a = $(() => n.cacheIdentifier || n.preferencesStorageKey), l = $(() => {
|
|
3342
|
-
const
|
|
3343
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3344
|
-
const Y = n.tableHeaders[
|
|
3345
|
-
|
|
3346
|
-
label: Y.label ??
|
|
3347
|
-
key:
|
|
3349
|
+
const b = [];
|
|
3350
|
+
return Object.keys(n.tableHeaders).forEach((O) => {
|
|
3351
|
+
const Y = n.tableHeaders[O];
|
|
3352
|
+
b.push({
|
|
3353
|
+
label: Y.label ?? O,
|
|
3354
|
+
key: O,
|
|
3348
3355
|
sortable: Y.sortable ?? !1,
|
|
3349
3356
|
hidable: Y.hidable ?? !0
|
|
3350
3357
|
});
|
|
3351
|
-
}), n.enableEntityActions &&
|
|
3358
|
+
}), n.enableEntityActions && b.push({
|
|
3352
3359
|
key: "actions",
|
|
3353
3360
|
hideLabel: !0
|
|
3354
|
-
}),
|
|
3355
|
-
}), c = (
|
|
3356
|
-
"data-rowid":
|
|
3357
|
-
"data-testid":
|
|
3358
|
-
...n.rowAttributes(
|
|
3359
|
-
}),
|
|
3361
|
+
}), b;
|
|
3362
|
+
}), c = (b) => ({
|
|
3363
|
+
"data-rowid": b.id,
|
|
3364
|
+
"data-testid": b.name,
|
|
3365
|
+
...n.rowAttributes(b)
|
|
3366
|
+
}), u = B({}), d = (b) => {
|
|
3360
3367
|
var _;
|
|
3361
|
-
return (_ =
|
|
3362
|
-
},
|
|
3368
|
+
return (_ = u.value) == null ? void 0 : _.$el.querySelector(`[data-rowid="${b.id}"]`);
|
|
3369
|
+
}, s = (b) => {
|
|
3363
3370
|
const _ = {
|
|
3364
|
-
"data-testid":
|
|
3365
|
-
...n.cellAttributes(
|
|
3371
|
+
"data-testid": b.headerKey,
|
|
3372
|
+
...n.cellAttributes(b)
|
|
3366
3373
|
};
|
|
3367
|
-
return
|
|
3374
|
+
return b.colIndex === 0 && (_.style = {
|
|
3368
3375
|
maxWidth: "250px",
|
|
3369
3376
|
overflowX: "hidden",
|
|
3370
3377
|
textOverflow: "ellipsis"
|
|
@@ -3373,44 +3380,44 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3373
3380
|
r("empty-state-cta-clicked"), f();
|
|
3374
3381
|
}, f = () => {
|
|
3375
3382
|
r("clear-search-input");
|
|
3376
|
-
},
|
|
3383
|
+
}, g = $(() => n.disableRowClick ? void 0 : (b, _) => {
|
|
3377
3384
|
r("click:row", _);
|
|
3378
|
-
}),
|
|
3379
|
-
r("sort",
|
|
3385
|
+
}), h = (b) => {
|
|
3386
|
+
r("sort", b);
|
|
3380
3387
|
};
|
|
3381
3388
|
let x = "";
|
|
3382
|
-
const E =
|
|
3383
|
-
|
|
3384
|
-
}, { setTablePreferences:
|
|
3385
|
-
const
|
|
3389
|
+
const E = B(!1), y = B(null), L = $(() => E.value ? !1 : y.value ? !y.value.hasData && !n.query : !0), F = (b) => {
|
|
3390
|
+
b.hasData ? E.value = !0 : b.state === "success" && !b.hasData && !x && (E.value = !1), x = n.query, y.value = { ...b };
|
|
3391
|
+
}, { setTablePreferences: I, getTablePreferences: m } = or(), A = B(m(a.value, n.defaultTablePreferences)), S = $(() => {
|
|
3392
|
+
const b = m(a.value);
|
|
3386
3393
|
return {
|
|
3387
3394
|
...n.initialFetcherParams,
|
|
3388
|
-
...
|
|
3395
|
+
...b
|
|
3389
3396
|
};
|
|
3390
|
-
}), w = (
|
|
3391
|
-
A.value =
|
|
3397
|
+
}), w = (b) => {
|
|
3398
|
+
A.value = b, l.value.forEach((_) => {
|
|
3392
3399
|
!("hidable" in _) || !A.value.columnVisibility || _.hidable === !1 && (A.value.columnVisibility[_.key] = !0);
|
|
3393
|
-
}), a.value &&
|
|
3400
|
+
}), a.value && I(a.value, b);
|
|
3394
3401
|
};
|
|
3395
|
-
return (
|
|
3396
|
-
const
|
|
3397
|
-
return
|
|
3402
|
+
return (b, _) => {
|
|
3403
|
+
const O = j("KTableData"), Y = j("KCard");
|
|
3404
|
+
return v(), D(Y, {
|
|
3398
3405
|
class: "kong-ui-entity-base-table",
|
|
3399
3406
|
title: e.title,
|
|
3400
3407
|
"title-tag": e.titleTag
|
|
3401
3408
|
}, {
|
|
3402
3409
|
default: C(() => [
|
|
3403
|
-
|
|
3410
|
+
N(O, {
|
|
3404
3411
|
ref_key: "tableRefs",
|
|
3405
|
-
ref:
|
|
3412
|
+
ref: u,
|
|
3406
3413
|
"cache-identifier": a.value,
|
|
3407
|
-
"cell-attrs":
|
|
3414
|
+
"cell-attrs": s,
|
|
3408
3415
|
"client-sort": e.enableClientSort,
|
|
3409
|
-
"empty-state-action-message": e.query ?
|
|
3416
|
+
"empty-state-action-message": e.query ? T(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3410
3417
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3411
3418
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3412
|
-
"empty-state-message": e.query ?
|
|
3413
|
-
"empty-state-title": e.query ?
|
|
3419
|
+
"empty-state-message": e.query ? T(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3420
|
+
"empty-state-title": e.query ? T(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3414
3421
|
error: o.value.hasError,
|
|
3415
3422
|
"error-state-message": o.value.message,
|
|
3416
3423
|
"error-state-title": o.value.title,
|
|
@@ -3419,50 +3426,51 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3419
3426
|
headers: l.value,
|
|
3420
3427
|
"hide-pagination": e.hidePagination,
|
|
3421
3428
|
"hide-pagination-when-optional": "",
|
|
3422
|
-
"hide-toolbar": e.hideToolbar ??
|
|
3429
|
+
"hide-toolbar": e.hideToolbar ?? L.value,
|
|
3423
3430
|
"initial-fetcher-params": S.value,
|
|
3424
3431
|
loading: e.isLoading,
|
|
3425
3432
|
"pagination-attributes": { disablePageJump: e.disablePaginationPageJump, offset: e.paginationType === "offset" },
|
|
3426
3433
|
"resize-columns": "",
|
|
3427
3434
|
"row-attrs": c,
|
|
3435
|
+
"row-key": e.rowKey,
|
|
3428
3436
|
"search-input": e.query,
|
|
3429
3437
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3430
3438
|
sortable: !e.disableSorting,
|
|
3431
3439
|
"table-preferences": A.value,
|
|
3432
3440
|
onEmptyStateActionClick: p,
|
|
3433
|
-
"onRow:click":
|
|
3434
|
-
onSort: _[0] || (_[0] = (U) =>
|
|
3435
|
-
onState:
|
|
3441
|
+
"onRow:click": g.value,
|
|
3442
|
+
onSort: _[0] || (_[0] = (U) => h(U)),
|
|
3443
|
+
onState: F,
|
|
3436
3444
|
"onUpdate:tablePreferences": w
|
|
3437
|
-
},
|
|
3445
|
+
}, ke({
|
|
3438
3446
|
toolbar: C(() => [
|
|
3439
|
-
M("div",
|
|
3440
|
-
W(
|
|
3441
|
-
|
|
3442
|
-
W(
|
|
3447
|
+
M("div", Yo, [
|
|
3448
|
+
W(b.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3449
|
+
b.$slots["toolbar-button"] ? (v(), R("div", Vo, [
|
|
3450
|
+
W(b.$slots, "toolbar-button", {}, void 0, !0)
|
|
3443
3451
|
])) : q("", !0)
|
|
3444
3452
|
])
|
|
3445
3453
|
]),
|
|
3446
3454
|
"action-items": C(({ row: U }) => [
|
|
3447
|
-
W(
|
|
3455
|
+
W(b.$slots, "actions", { row: U }, void 0, !0)
|
|
3448
3456
|
]),
|
|
3449
3457
|
_: 2
|
|
3450
3458
|
}, [
|
|
3451
3459
|
oe(e.tableHeaders, (U, J) => ({
|
|
3452
3460
|
name: J,
|
|
3453
|
-
fn: C(({ row: me, rowKey: Ee, rowValue:
|
|
3454
|
-
|
|
3461
|
+
fn: C(({ row: me, rowKey: Ee, rowValue: st }) => [
|
|
3462
|
+
N(Ho, {
|
|
3455
3463
|
"key-name": String(J),
|
|
3456
3464
|
"row-el": d(me),
|
|
3457
3465
|
tooltip: U.tooltip
|
|
3458
3466
|
}, {
|
|
3459
3467
|
default: C(() => [
|
|
3460
|
-
W(
|
|
3468
|
+
W(b.$slots, J, {
|
|
3461
3469
|
row: me,
|
|
3462
3470
|
rowKey: Ee,
|
|
3463
|
-
rowValue:
|
|
3471
|
+
rowValue: st
|
|
3464
3472
|
}, () => [
|
|
3465
|
-
V(
|
|
3473
|
+
V(K(st), 1)
|
|
3466
3474
|
], !0)
|
|
3467
3475
|
]),
|
|
3468
3476
|
_: 2
|
|
@@ -3472,23 +3480,23 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3472
3480
|
e.query ? void 0 : {
|
|
3473
3481
|
name: "empty-state-action-icon",
|
|
3474
3482
|
fn: C(() => [
|
|
3475
|
-
|
|
3483
|
+
N(T(zn))
|
|
3476
3484
|
]),
|
|
3477
3485
|
key: "0"
|
|
3478
3486
|
}
|
|
3479
|
-
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"])
|
|
3487
|
+
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"])
|
|
3480
3488
|
]),
|
|
3481
3489
|
_: 3
|
|
3482
3490
|
}, 8, ["title", "title-tag"]);
|
|
3483
3491
|
};
|
|
3484
3492
|
}
|
|
3485
|
-
}), Nl = /* @__PURE__ */ ae(
|
|
3493
|
+
}), Nl = /* @__PURE__ */ ae(Wo, [["__scopeId", "data-v-6f28b73b"]]), Jo = {
|
|
3486
3494
|
key: 0,
|
|
3487
3495
|
class: "kong-ui-entity-delete-error"
|
|
3488
|
-
},
|
|
3496
|
+
}, Go = {
|
|
3489
3497
|
key: 1,
|
|
3490
3498
|
class: "description"
|
|
3491
|
-
},
|
|
3499
|
+
}, zo = /* @__PURE__ */ z({
|
|
3492
3500
|
__name: "EntityDeleteModal",
|
|
3493
3501
|
props: {
|
|
3494
3502
|
visible: {
|
|
@@ -3532,9 +3540,9 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3532
3540
|
}, l = () => {
|
|
3533
3541
|
i("proceed");
|
|
3534
3542
|
};
|
|
3535
|
-
return (c,
|
|
3536
|
-
const d = j("KAlert"),
|
|
3537
|
-
return
|
|
3543
|
+
return (c, u) => {
|
|
3544
|
+
const d = j("KAlert"), s = j("KPrompt");
|
|
3545
|
+
return v(), D(s, {
|
|
3538
3546
|
"action-button-appearance": "danger",
|
|
3539
3547
|
"action-button-disabled": e.actionPending,
|
|
3540
3548
|
"action-button-text": "Yes, delete",
|
|
@@ -3546,35 +3554,35 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3546
3554
|
onProceed: l
|
|
3547
3555
|
}, {
|
|
3548
3556
|
default: C(() => [
|
|
3549
|
-
e.error ? (
|
|
3550
|
-
|
|
3557
|
+
e.error ? (v(), R("div", Jo, [
|
|
3558
|
+
N(d, { appearance: "danger" }, {
|
|
3551
3559
|
default: C(() => [
|
|
3552
|
-
V(
|
|
3560
|
+
V(K(e.error), 1)
|
|
3553
3561
|
]),
|
|
3554
3562
|
_: 1
|
|
3555
3563
|
})
|
|
3556
3564
|
])) : q("", !0),
|
|
3557
|
-
|
|
3565
|
+
N(T(n), {
|
|
3558
3566
|
class: "message",
|
|
3559
3567
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3560
3568
|
tag: "p"
|
|
3561
|
-
},
|
|
3569
|
+
}, ke({
|
|
3562
3570
|
entityType: C(() => [
|
|
3563
|
-
V(
|
|
3571
|
+
V(K(r.entityType), 1)
|
|
3564
3572
|
]),
|
|
3565
3573
|
_: 2
|
|
3566
3574
|
}, [
|
|
3567
3575
|
r.entityName ? {
|
|
3568
3576
|
name: "entityName",
|
|
3569
3577
|
fn: C(() => [
|
|
3570
|
-
M("strong", null,
|
|
3578
|
+
M("strong", null, K(r.entityName), 1)
|
|
3571
3579
|
]),
|
|
3572
3580
|
key: "0"
|
|
3573
3581
|
} : void 0
|
|
3574
3582
|
]), 1032, ["keypath"]),
|
|
3575
|
-
r.description || c.$slots.description ? (
|
|
3583
|
+
r.description || c.$slots.description ? (v(), R("div", Go, [
|
|
3576
3584
|
W(c.$slots, "description", {}, () => [
|
|
3577
|
-
M("p", null,
|
|
3585
|
+
M("p", null, K(r.description), 1)
|
|
3578
3586
|
], !0)
|
|
3579
3587
|
])) : q("", !0)
|
|
3580
3588
|
]),
|
|
@@ -3582,13 +3590,13 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3582
3590
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3583
3591
|
};
|
|
3584
3592
|
}
|
|
3585
|
-
}),
|
|
3593
|
+
}), Ml = /* @__PURE__ */ ae(zo, [["__scopeId", "data-v-4361d622"]]), Qo = {
|
|
3586
3594
|
fill: "none",
|
|
3587
3595
|
height: "20",
|
|
3588
3596
|
viewBox: "0 0 20 20",
|
|
3589
3597
|
width: "20",
|
|
3590
3598
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3591
|
-
},
|
|
3599
|
+
}, Zo = {
|
|
3592
3600
|
id: "mask0_180_20349",
|
|
3593
3601
|
height: "20",
|
|
3594
3602
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3596,35 +3604,35 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3596
3604
|
width: "20",
|
|
3597
3605
|
x: "0",
|
|
3598
3606
|
y: "0"
|
|
3599
|
-
},
|
|
3607
|
+
}, Xo = ["fill"], el = { mask: "url(#mask0_180_20349)" }, tl = ["fill"], Ot = /* @__PURE__ */ z({
|
|
3600
3608
|
__name: "IconFilter",
|
|
3601
3609
|
props: {
|
|
3602
3610
|
color: {
|
|
3603
3611
|
type: String,
|
|
3604
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3612
|
+
default: `var(--kong-ui-entity-filter-color, ${Dr})`
|
|
3605
3613
|
}
|
|
3606
3614
|
},
|
|
3607
3615
|
setup(e) {
|
|
3608
|
-
return (t, n) => (
|
|
3609
|
-
M("mask",
|
|
3616
|
+
return (t, n) => (v(), R("svg", Qo, [
|
|
3617
|
+
M("mask", Zo, [
|
|
3610
3618
|
M("rect", {
|
|
3611
3619
|
fill: e.color,
|
|
3612
3620
|
height: "20",
|
|
3613
3621
|
width: "20"
|
|
3614
|
-
}, null, 8,
|
|
3622
|
+
}, null, 8, Xo)
|
|
3615
3623
|
]),
|
|
3616
|
-
M("g",
|
|
3624
|
+
M("g", el, [
|
|
3617
3625
|
M("path", {
|
|
3618
3626
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3619
3627
|
fill: e.color
|
|
3620
|
-
}, null, 8,
|
|
3628
|
+
}, null, 8, tl)
|
|
3621
3629
|
])
|
|
3622
3630
|
]));
|
|
3623
3631
|
}
|
|
3624
|
-
}),
|
|
3632
|
+
}), nl = {
|
|
3625
3633
|
key: 1,
|
|
3626
3634
|
class: "kong-ui-entity-filter"
|
|
3627
|
-
},
|
|
3635
|
+
}, rl = { class: "kong-ui-entity-filter-menu" }, il = ["data-testid"], al = ["onClick", "onKeydown"], ol = { class: "menu-item-indicator" }, ll = { class: "menu-item-body" }, cl = ["for"], sl = { class: "menu-item-buttons" }, ul = { class: "filter-clear-button-container" }, dl = /* @__PURE__ */ z({
|
|
3628
3636
|
__name: "EntityFilter",
|
|
3629
3637
|
props: {
|
|
3630
3638
|
// filter config, either exact match or fuzzy match
|
|
@@ -3644,58 +3652,58 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3644
3652
|
},
|
|
3645
3653
|
emits: ["update:modelValue"],
|
|
3646
3654
|
setup(e, { emit: t }) {
|
|
3647
|
-
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o =
|
|
3648
|
-
const
|
|
3649
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3650
|
-
|
|
3651
|
-
}),
|
|
3652
|
-
}),
|
|
3653
|
-
const
|
|
3654
|
-
return Object.keys(
|
|
3655
|
+
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o = B(!1), a = B({}), l = B(/* @__PURE__ */ new Set()), c = $(() => {
|
|
3656
|
+
const F = [];
|
|
3657
|
+
return new URLSearchParams(r.modelValue).forEach((I, m) => {
|
|
3658
|
+
I !== "" && F.push(m);
|
|
3659
|
+
}), F;
|
|
3660
|
+
}), u = $(() => {
|
|
3661
|
+
const F = r.config.fields;
|
|
3662
|
+
return Object.keys(F).filter((I) => {
|
|
3655
3663
|
var m;
|
|
3656
|
-
return (m =
|
|
3657
|
-
}).map((
|
|
3658
|
-
label:
|
|
3659
|
-
value:
|
|
3664
|
+
return (m = F == null ? void 0 : F[I]) == null ? void 0 : m.searchable;
|
|
3665
|
+
}).map((I) => ({
|
|
3666
|
+
label: F[I].label || I,
|
|
3667
|
+
value: I,
|
|
3660
3668
|
expanded: !1
|
|
3661
3669
|
}));
|
|
3662
3670
|
});
|
|
3663
|
-
|
|
3664
|
-
a.value = {}, new URLSearchParams(
|
|
3665
|
-
a.value[m] =
|
|
3671
|
+
ge(() => r.modelValue, (F) => {
|
|
3672
|
+
a.value = {}, new URLSearchParams(F).forEach((I, m) => {
|
|
3673
|
+
a.value[m] = I;
|
|
3666
3674
|
});
|
|
3667
3675
|
});
|
|
3668
3676
|
const d = () => {
|
|
3669
3677
|
o.value = !o.value;
|
|
3670
|
-
},
|
|
3671
|
-
l.value.has(
|
|
3672
|
-
}, p = (
|
|
3673
|
-
i("update:modelValue",
|
|
3678
|
+
}, s = (F) => {
|
|
3679
|
+
l.value.has(F) ? l.value.delete(F) : l.value.add(F);
|
|
3680
|
+
}, p = (F) => {
|
|
3681
|
+
i("update:modelValue", F);
|
|
3674
3682
|
}, f = () => {
|
|
3675
3683
|
p("");
|
|
3676
|
-
},
|
|
3677
|
-
var
|
|
3678
|
-
return (((m = (
|
|
3684
|
+
}, g = (F) => `filter-${F}`, h = (F) => {
|
|
3685
|
+
var I, m;
|
|
3686
|
+
return (((m = (I = r.config.schema) == null ? void 0 : I[F]) == null ? void 0 : m.values) ?? []).map((A) => ({
|
|
3679
3687
|
value: A,
|
|
3680
3688
|
label: A
|
|
3681
3689
|
}));
|
|
3682
|
-
}, x = (
|
|
3683
|
-
var
|
|
3684
|
-
return ((m = (
|
|
3685
|
-
}, E = (
|
|
3690
|
+
}, x = (F) => {
|
|
3691
|
+
var I, m;
|
|
3692
|
+
return ((m = (I = r.config.schema) == null ? void 0 : I[F]) == null ? void 0 : m.type) ?? "text";
|
|
3693
|
+
}, E = (F) => {
|
|
3686
3694
|
a.value = {
|
|
3687
3695
|
...a.value,
|
|
3688
|
-
[
|
|
3689
|
-
},
|
|
3690
|
-
},
|
|
3691
|
-
a.value = {},
|
|
3692
|
-
},
|
|
3693
|
-
const
|
|
3694
|
-
|
|
3696
|
+
[F]: ""
|
|
3697
|
+
}, L();
|
|
3698
|
+
}, y = () => {
|
|
3699
|
+
a.value = {}, L(!0);
|
|
3700
|
+
}, L = (F = !1) => {
|
|
3701
|
+
const I = Object.keys(a.value).reduce((m, A) => (a.value[A] && (m[A] = `${a.value[A]}`), m), {});
|
|
3702
|
+
F && (o.value = !1), i("update:modelValue", new URLSearchParams(I).toString());
|
|
3695
3703
|
};
|
|
3696
|
-
return (
|
|
3704
|
+
return (F, I) => {
|
|
3697
3705
|
const m = j("KInput"), A = j("KButton"), S = j("KSelect");
|
|
3698
|
-
return e.config.isExactMatch ? (
|
|
3706
|
+
return e.config.isExactMatch ? (v(), D(m, {
|
|
3699
3707
|
key: 0,
|
|
3700
3708
|
autocomplete: "off",
|
|
3701
3709
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3705,41 +3713,41 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3705
3713
|
"onUpdate:modelValue": p
|
|
3706
3714
|
}, {
|
|
3707
3715
|
before: C(() => [
|
|
3708
|
-
|
|
3716
|
+
N(Ot)
|
|
3709
3717
|
]),
|
|
3710
3718
|
after: C(() => [
|
|
3711
|
-
|
|
3719
|
+
ye(N(T(Qn), {
|
|
3712
3720
|
class: "kong-ui-entity-filter-clear",
|
|
3713
3721
|
role: "button",
|
|
3714
3722
|
tabindex: "0",
|
|
3715
3723
|
onClick: f
|
|
3716
3724
|
}, null, 512), [
|
|
3717
|
-
[
|
|
3725
|
+
[ve, e.modelValue !== ""]
|
|
3718
3726
|
])
|
|
3719
3727
|
]),
|
|
3720
3728
|
_: 1
|
|
3721
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3722
|
-
|
|
3729
|
+
}, 8, ["model-value", "placeholder"])) : (v(), R("div", nl, [
|
|
3730
|
+
N(A, {
|
|
3723
3731
|
appearance: "tertiary",
|
|
3724
3732
|
"data-testid": "filter-button",
|
|
3725
3733
|
onClick: d
|
|
3726
3734
|
}, {
|
|
3727
3735
|
default: C(() => [
|
|
3728
|
-
|
|
3729
|
-
V(" " +
|
|
3736
|
+
N(Ot),
|
|
3737
|
+
V(" " + K(T(n)("filter.filterButtonText")) + " " + K(c.value.length > 0 ? `(${c.value.length})` : ""), 1)
|
|
3730
3738
|
]),
|
|
3731
3739
|
_: 1
|
|
3732
3740
|
}),
|
|
3733
|
-
|
|
3741
|
+
ye(M("div", {
|
|
3734
3742
|
class: "kong-ui-entity-filter-backdrop",
|
|
3735
3743
|
onClick: d
|
|
3736
3744
|
}, null, 512), [
|
|
3737
|
-
[
|
|
3745
|
+
[ve, o.value]
|
|
3738
3746
|
]),
|
|
3739
|
-
|
|
3740
|
-
(
|
|
3741
|
-
var
|
|
3742
|
-
return
|
|
3747
|
+
ye(M("div", rl, [
|
|
3748
|
+
(v(!0), R(le, null, oe(u.value, (w) => {
|
|
3749
|
+
var b, _;
|
|
3750
|
+
return v(), R("div", {
|
|
3743
3751
|
key: w.value,
|
|
3744
3752
|
class: "kong-ui-entity-filter-menu-item",
|
|
3745
3753
|
"data-testid": w.value
|
|
@@ -3748,89 +3756,89 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3748
3756
|
class: fe(["menu-item-title", { expanded: l.value.has(w.value) }]),
|
|
3749
3757
|
role: "button",
|
|
3750
3758
|
tabindex: "0",
|
|
3751
|
-
onClick: (
|
|
3752
|
-
onKeydown:
|
|
3759
|
+
onClick: (O) => s(w.value),
|
|
3760
|
+
onKeydown: Pn((O) => s(w.value), ["enter"])
|
|
3753
3761
|
}, [
|
|
3754
|
-
V(
|
|
3755
|
-
|
|
3756
|
-
[
|
|
3762
|
+
V(K(w.label) + " ", 1),
|
|
3763
|
+
ye(M("span", ol, null, 512), [
|
|
3764
|
+
[ve, c.value.includes(w.value)]
|
|
3757
3765
|
]),
|
|
3758
|
-
|
|
3766
|
+
N(T(Zn), {
|
|
3759
3767
|
class: fe(["menu-item-expand-icon", { expanded: l.value.has(w.value) }]),
|
|
3760
|
-
color:
|
|
3768
|
+
color: T(Ur)
|
|
3761
3769
|
}, null, 8, ["class", "color"])
|
|
3762
|
-
], 42,
|
|
3763
|
-
|
|
3770
|
+
], 42, al),
|
|
3771
|
+
ye(M("div", ll, [
|
|
3764
3772
|
M("label", {
|
|
3765
3773
|
class: "menu-item-label",
|
|
3766
|
-
for:
|
|
3767
|
-
},
|
|
3768
|
-
((_ = (
|
|
3774
|
+
for: g(w.value)
|
|
3775
|
+
}, K(T(n)("filter.fieldLabel")), 9, cl),
|
|
3776
|
+
((_ = (b = e.config.schema) == null ? void 0 : b[w.value]) == null ? void 0 : _.type) === "select" ? (v(), D(S, {
|
|
3769
3777
|
key: 0,
|
|
3770
|
-
id:
|
|
3778
|
+
id: g(w.value),
|
|
3771
3779
|
modelValue: a.value[w.value],
|
|
3772
|
-
"onUpdate:modelValue": (
|
|
3773
|
-
items:
|
|
3774
|
-
placeholder:
|
|
3775
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3780
|
+
"onUpdate:modelValue": (O) => a.value[w.value] = O,
|
|
3781
|
+
items: h(w.value),
|
|
3782
|
+
placeholder: T(n)("filter.selectPlaceholder")
|
|
3783
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(), D(m, {
|
|
3776
3784
|
key: 1,
|
|
3777
|
-
id:
|
|
3785
|
+
id: g(w.value),
|
|
3778
3786
|
modelValue: a.value[w.value],
|
|
3779
|
-
"onUpdate:modelValue": (
|
|
3787
|
+
"onUpdate:modelValue": (O) => a.value[w.value] = O,
|
|
3780
3788
|
autocomplete: "off",
|
|
3781
|
-
placeholder:
|
|
3789
|
+
placeholder: T(n)("filter.inputPlaceholder"),
|
|
3782
3790
|
type: x(w.value)
|
|
3783
3791
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3784
3792
|
], 512), [
|
|
3785
|
-
[
|
|
3793
|
+
[ve, l.value.has(w.value)]
|
|
3786
3794
|
]),
|
|
3787
|
-
|
|
3788
|
-
|
|
3795
|
+
ye(M("div", sl, [
|
|
3796
|
+
N(A, {
|
|
3789
3797
|
appearance: "tertiary",
|
|
3790
3798
|
"data-testid": "apply-filter",
|
|
3791
3799
|
size: "small",
|
|
3792
|
-
onClick:
|
|
3800
|
+
onClick: I[0] || (I[0] = (O) => L(!0))
|
|
3793
3801
|
}, {
|
|
3794
3802
|
default: C(() => [
|
|
3795
|
-
V(
|
|
3803
|
+
V(K(T(n)("filter.applyButtonText")), 1)
|
|
3796
3804
|
]),
|
|
3797
3805
|
_: 1
|
|
3798
3806
|
}),
|
|
3799
|
-
|
|
3807
|
+
N(A, {
|
|
3800
3808
|
appearance: "tertiary",
|
|
3801
3809
|
"data-testid": "clear-filter",
|
|
3802
3810
|
size: "small",
|
|
3803
|
-
onClick: (
|
|
3811
|
+
onClick: (O) => E(w.value)
|
|
3804
3812
|
}, {
|
|
3805
3813
|
default: C(() => [
|
|
3806
|
-
V(
|
|
3814
|
+
V(K(T(n)("filter.clearButtonText")), 1)
|
|
3807
3815
|
]),
|
|
3808
3816
|
_: 2
|
|
3809
3817
|
}, 1032, ["onClick"])
|
|
3810
3818
|
], 512), [
|
|
3811
|
-
[
|
|
3819
|
+
[ve, l.value.has(w.value)]
|
|
3812
3820
|
])
|
|
3813
|
-
], 8,
|
|
3821
|
+
], 8, il);
|
|
3814
3822
|
}), 128)),
|
|
3815
|
-
M("div",
|
|
3816
|
-
|
|
3823
|
+
M("div", ul, [
|
|
3824
|
+
N(A, {
|
|
3817
3825
|
appearance: "tertiary",
|
|
3818
3826
|
size: "small",
|
|
3819
|
-
onClick:
|
|
3827
|
+
onClick: y
|
|
3820
3828
|
}, {
|
|
3821
3829
|
default: C(() => [
|
|
3822
|
-
V(
|
|
3830
|
+
V(K(T(n)("filter.clearAllButtonText")), 1)
|
|
3823
3831
|
]),
|
|
3824
3832
|
_: 1
|
|
3825
3833
|
})
|
|
3826
3834
|
])
|
|
3827
3835
|
], 512), [
|
|
3828
|
-
[
|
|
3836
|
+
[ve, o.value]
|
|
3829
3837
|
])
|
|
3830
3838
|
]));
|
|
3831
3839
|
};
|
|
3832
3840
|
}
|
|
3833
|
-
}),
|
|
3841
|
+
}), Dl = /* @__PURE__ */ ae(dl, [["__scopeId", "data-v-10fa27a5"]]), jl = /* @__PURE__ */ z({
|
|
3834
3842
|
__name: "EntityToggleModal",
|
|
3835
3843
|
props: {
|
|
3836
3844
|
visible: {
|
|
@@ -3862,44 +3870,44 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3862
3870
|
},
|
|
3863
3871
|
emits: ["cancel", "proceed"],
|
|
3864
3872
|
setup(e, { emit: t }) {
|
|
3865
|
-
const { i18n: { t: n }, i18nT: r } = H.useI18n(), i = e, o = t, a =
|
|
3873
|
+
const { i18n: { t: n }, i18nT: r } = H.useI18n(), i = e, o = t, a = B(!1), l = $(
|
|
3866
3874
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
3867
3875
|
), c = $(
|
|
3868
3876
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
3869
|
-
),
|
|
3877
|
+
), u = () => o("cancel"), d = async () => {
|
|
3870
3878
|
if (i.onConfirm) {
|
|
3871
3879
|
a.value = !0;
|
|
3872
3880
|
try {
|
|
3873
3881
|
await i.onConfirm(), o("proceed");
|
|
3874
|
-
} catch (
|
|
3875
|
-
console.error(
|
|
3882
|
+
} catch (s) {
|
|
3883
|
+
console.error(s);
|
|
3876
3884
|
} finally {
|
|
3877
3885
|
a.value = !1;
|
|
3878
3886
|
}
|
|
3879
3887
|
}
|
|
3880
3888
|
};
|
|
3881
|
-
return (
|
|
3889
|
+
return (s, p) => {
|
|
3882
3890
|
const f = j("KPrompt");
|
|
3883
|
-
return
|
|
3884
|
-
|
|
3891
|
+
return v(), D(qn, { to: "body" }, [
|
|
3892
|
+
N(f, {
|
|
3885
3893
|
"action-button-disabled": a.value,
|
|
3886
3894
|
"action-button-text": c.value,
|
|
3887
3895
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
3888
3896
|
title: l.value,
|
|
3889
3897
|
visible: e.visible,
|
|
3890
|
-
onCancel:
|
|
3898
|
+
onCancel: u,
|
|
3891
3899
|
onProceed: d
|
|
3892
3900
|
}, {
|
|
3893
3901
|
default: C(() => [
|
|
3894
|
-
|
|
3902
|
+
N(T(r), {
|
|
3895
3903
|
keypath: `toggleModal.${i.action}.message`,
|
|
3896
3904
|
scope: "global"
|
|
3897
3905
|
}, {
|
|
3898
3906
|
entityType: C(() => [
|
|
3899
|
-
V(
|
|
3907
|
+
V(K(e.entityType), 1)
|
|
3900
3908
|
]),
|
|
3901
3909
|
entityName: C(() => [
|
|
3902
|
-
M("strong", null,
|
|
3910
|
+
M("strong", null, K(e.entityName), 1)
|
|
3903
3911
|
]),
|
|
3904
3912
|
_: 1
|
|
3905
3913
|
}, 8, ["keypath"])
|
|
@@ -3909,7 +3917,7 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3909
3917
|
]);
|
|
3910
3918
|
};
|
|
3911
3919
|
}
|
|
3912
|
-
}),
|
|
3920
|
+
}), Ul = /* @__PURE__ */ z({
|
|
3913
3921
|
__name: "PermissionsWrapper",
|
|
3914
3922
|
props: {
|
|
3915
3923
|
/**
|
|
@@ -3931,8 +3939,8 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3931
3939
|
}
|
|
3932
3940
|
},
|
|
3933
3941
|
setup(e) {
|
|
3934
|
-
const t = e, n =
|
|
3935
|
-
return
|
|
3942
|
+
const t = e, n = B(void 0), r = $(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
3943
|
+
return ge(() => t.authFunction, async () => {
|
|
3936
3944
|
n.value = await t.authFunction();
|
|
3937
3945
|
}, { immediate: !0 }), (i, o) => r.value ? W(i.$slots, "default", {
|
|
3938
3946
|
key: 0,
|
|
@@ -3941,35 +3949,35 @@ const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
|
3941
3949
|
}
|
|
3942
3950
|
});
|
|
3943
3951
|
var Z = [];
|
|
3944
|
-
for (var
|
|
3945
|
-
Z.push((
|
|
3946
|
-
function
|
|
3952
|
+
for (var We = 0; We < 256; ++We)
|
|
3953
|
+
Z.push((We + 256).toString(16).slice(1));
|
|
3954
|
+
function fl(e, t = 0) {
|
|
3947
3955
|
return (Z[e[t + 0]] + Z[e[t + 1]] + Z[e[t + 2]] + Z[e[t + 3]] + "-" + Z[e[t + 4]] + Z[e[t + 5]] + "-" + Z[e[t + 6]] + Z[e[t + 7]] + "-" + Z[e[t + 8]] + Z[e[t + 9]] + "-" + Z[e[t + 10]] + Z[e[t + 11]] + Z[e[t + 12]] + Z[e[t + 13]] + Z[e[t + 14]] + Z[e[t + 15]]).toLowerCase();
|
|
3948
3956
|
}
|
|
3949
|
-
var Oe,
|
|
3950
|
-
function
|
|
3957
|
+
var Oe, pl = new Uint8Array(16);
|
|
3958
|
+
function ml() {
|
|
3951
3959
|
if (!Oe && (Oe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Oe))
|
|
3952
3960
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3953
|
-
return Oe(
|
|
3961
|
+
return Oe(pl);
|
|
3954
3962
|
}
|
|
3955
|
-
var
|
|
3956
|
-
const
|
|
3957
|
-
randomUUID:
|
|
3963
|
+
var hl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3964
|
+
const Lt = {
|
|
3965
|
+
randomUUID: hl
|
|
3958
3966
|
};
|
|
3959
|
-
function
|
|
3960
|
-
if (
|
|
3961
|
-
return
|
|
3967
|
+
function gl(e, t, n) {
|
|
3968
|
+
if (Lt.randomUUID && !t && !e)
|
|
3969
|
+
return Lt.randomUUID();
|
|
3962
3970
|
e = e || {};
|
|
3963
|
-
var r = e.random || (e.rng ||
|
|
3964
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
3971
|
+
var r = e.random || (e.rng || ml)();
|
|
3972
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, fl(r);
|
|
3965
3973
|
}
|
|
3966
|
-
const
|
|
3974
|
+
const yl = ["aria-labelledby"], vl = { class: "form-section-wrapper" }, bl = {
|
|
3967
3975
|
key: 1,
|
|
3968
3976
|
class: "form-section-description"
|
|
3969
|
-
},
|
|
3977
|
+
}, xl = {
|
|
3970
3978
|
key: 2,
|
|
3971
3979
|
class: "form-section-footer"
|
|
3972
|
-
},
|
|
3980
|
+
}, Cl = { class: "form-section-content" }, Al = /* @__PURE__ */ z({
|
|
3973
3981
|
__name: "EntityFormSection",
|
|
3974
3982
|
props: {
|
|
3975
3983
|
title: {
|
|
@@ -3998,49 +4006,49 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
3998
4006
|
}
|
|
3999
4007
|
},
|
|
4000
4008
|
setup(e) {
|
|
4001
|
-
const t =
|
|
4002
|
-
return (r, i) => (
|
|
4003
|
-
"aria-labelledby": e.title ?
|
|
4009
|
+
const t = et(), n = gl();
|
|
4010
|
+
return (r, i) => (v(), R("div", {
|
|
4011
|
+
"aria-labelledby": e.title ? T(n) : void 0,
|
|
4004
4012
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4005
4013
|
role: "group"
|
|
4006
4014
|
}, [
|
|
4007
|
-
M("div",
|
|
4008
|
-
e.hideInfoHeader ? q("", !0) : (
|
|
4015
|
+
M("div", vl, [
|
|
4016
|
+
e.hideInfoHeader ? q("", !0) : (v(), R("div", {
|
|
4009
4017
|
key: 0,
|
|
4010
4018
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4011
4019
|
}, [
|
|
4012
|
-
e.title ? (
|
|
4020
|
+
e.title ? (v(), D(De(e.titleTag), {
|
|
4013
4021
|
key: 0,
|
|
4014
|
-
id:
|
|
4022
|
+
id: T(n),
|
|
4015
4023
|
class: "form-section-title"
|
|
4016
4024
|
}, {
|
|
4017
4025
|
default: C(() => [
|
|
4018
|
-
V(
|
|
4026
|
+
V(K(e.title), 1)
|
|
4019
4027
|
]),
|
|
4020
4028
|
_: 1
|
|
4021
4029
|
}, 8, ["id"])) : q("", !0),
|
|
4022
|
-
e.description ||
|
|
4030
|
+
e.description || T(t).description ? (v(), R("div", bl, [
|
|
4023
4031
|
W(r.$slots, "description", {}, () => [
|
|
4024
|
-
M("p", null,
|
|
4032
|
+
M("p", null, K(e.description), 1)
|
|
4025
4033
|
], !0)
|
|
4026
4034
|
])) : q("", !0),
|
|
4027
|
-
|
|
4035
|
+
T(t).footer ? (v(), R("div", xl, [
|
|
4028
4036
|
W(r.$slots, "footer", {}, void 0, !0)
|
|
4029
4037
|
])) : q("", !0)
|
|
4030
4038
|
], 2)),
|
|
4031
|
-
M("div",
|
|
4039
|
+
M("div", Cl, [
|
|
4032
4040
|
W(r.$slots, "default", {}, void 0, !0)
|
|
4033
4041
|
])
|
|
4034
4042
|
])
|
|
4035
|
-
], 10,
|
|
4043
|
+
], 10, yl));
|
|
4036
4044
|
}
|
|
4037
|
-
}),
|
|
4045
|
+
}), Pl = /* @__PURE__ */ ae(Al, [["__scopeId", "data-v-b1f74200"]]), kl = {
|
|
4038
4046
|
class: "kong-ui-public-entity-link",
|
|
4039
4047
|
"data-testid": "entity-link-parent"
|
|
4040
|
-
},
|
|
4048
|
+
}, _l = {
|
|
4041
4049
|
key: 0,
|
|
4042
4050
|
class: "deleted-entity"
|
|
4043
|
-
},
|
|
4051
|
+
}, wl = { key: 1 }, Sl = ["onClick"], Il = /* @__PURE__ */ z({
|
|
4044
4052
|
__name: "EntityLink",
|
|
4045
4053
|
props: {
|
|
4046
4054
|
entityLinkData: {
|
|
@@ -4064,21 +4072,21 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
4064
4072
|
}
|
|
4065
4073
|
},
|
|
4066
4074
|
setup(e) {
|
|
4067
|
-
const t = e, n =
|
|
4068
|
-
var
|
|
4069
|
-
return (
|
|
4070
|
-
}),
|
|
4071
|
-
var
|
|
4072
|
-
return `${(
|
|
4073
|
-
}), d = async (
|
|
4074
|
-
await
|
|
4075
|
+
const t = e, n = B(), { isTruncated: r } = H.useTruncationDetector(n), { i18n: { t: i } } = H.useI18n(), o = i("global.actions.copyId"), a = B(o), l = $(() => t.entityLinkData.deleted ?? !1), c = $(() => {
|
|
4076
|
+
var s;
|
|
4077
|
+
return (s = t.entityLinkData.id) != null && s.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4078
|
+
}), u = $(() => {
|
|
4079
|
+
var s;
|
|
4080
|
+
return `${(s = c.value) == null ? void 0 : s.toString().slice(0, 5)} (deleted)`;
|
|
4081
|
+
}), d = async (s) => {
|
|
4082
|
+
await s(c.value || "") && (a.value = i("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4075
4083
|
a.value = o;
|
|
4076
4084
|
}, 1800));
|
|
4077
4085
|
};
|
|
4078
|
-
return (
|
|
4079
|
-
const f = j("KTooltip"),
|
|
4080
|
-
return
|
|
4081
|
-
l.value ? (
|
|
4086
|
+
return (s, p) => {
|
|
4087
|
+
const f = j("KTooltip"), g = j("KExternalLink"), h = j("KClipboardProvider");
|
|
4088
|
+
return v(), R("div", kl, [
|
|
4089
|
+
l.value ? (v(), R("div", _l, K(u.value), 1)) : c.value ? c.value ? (v(), D(g, {
|
|
4082
4090
|
key: 2,
|
|
4083
4091
|
class: "entity-link",
|
|
4084
4092
|
"hide-icon": !e.newWindow,
|
|
@@ -4086,22 +4094,22 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
4086
4094
|
target: e.newWindow ? "_blank" : "_self"
|
|
4087
4095
|
}, {
|
|
4088
4096
|
default: C(() => [
|
|
4089
|
-
|
|
4090
|
-
text:
|
|
4097
|
+
N(f, {
|
|
4098
|
+
text: T(r) && e.entityLinkData.label || ""
|
|
4091
4099
|
}, {
|
|
4092
4100
|
default: C(() => [
|
|
4093
4101
|
M("span", {
|
|
4094
4102
|
ref_key: "textContent",
|
|
4095
4103
|
ref: n,
|
|
4096
4104
|
class: "entity-link-label"
|
|
4097
|
-
},
|
|
4105
|
+
}, K(e.entityLinkData.label), 513)
|
|
4098
4106
|
]),
|
|
4099
4107
|
_: 1
|
|
4100
4108
|
}, 8, ["text"])
|
|
4101
4109
|
]),
|
|
4102
4110
|
_: 1
|
|
4103
|
-
}, 8, ["hide-icon", "href", "target"])) : q("", !0) : (
|
|
4104
|
-
c.value && e.allowCopy ? (
|
|
4111
|
+
}, 8, ["hide-icon", "href", "target"])) : q("", !0) : (v(), R("div", wl, K(" – "))),
|
|
4112
|
+
c.value && e.allowCopy ? (v(), D(f, {
|
|
4105
4113
|
key: a.value,
|
|
4106
4114
|
class: "copy-uuid-tooltip",
|
|
4107
4115
|
"max-width": "160",
|
|
@@ -4109,19 +4117,19 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
4109
4117
|
text: a.value
|
|
4110
4118
|
}, {
|
|
4111
4119
|
default: C(() => [
|
|
4112
|
-
|
|
4120
|
+
N(h, null, {
|
|
4113
4121
|
default: C(({ copyToClipboard: x }) => [
|
|
4114
4122
|
M("span", {
|
|
4115
4123
|
class: "entity-link-copy-id",
|
|
4116
|
-
onClick:
|
|
4124
|
+
onClick: Le((E) => d(x), ["stop"])
|
|
4117
4125
|
}, [
|
|
4118
|
-
|
|
4126
|
+
N(T(Xn), {
|
|
4119
4127
|
class: "copy-icon",
|
|
4120
|
-
color:
|
|
4128
|
+
color: T(Pr),
|
|
4121
4129
|
"data-testid": "copy-id",
|
|
4122
|
-
size:
|
|
4130
|
+
size: T(Hr)
|
|
4123
4131
|
}, null, 8, ["color", "size"])
|
|
4124
|
-
], 8,
|
|
4132
|
+
], 8, Sl)
|
|
4125
4133
|
]),
|
|
4126
4134
|
_: 1
|
|
4127
4135
|
})
|
|
@@ -4131,7 +4139,7 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
4131
4139
|
]);
|
|
4132
4140
|
};
|
|
4133
4141
|
}
|
|
4134
|
-
}),
|
|
4142
|
+
}), ql = /* @__PURE__ */ ae(Il, [["__scopeId", "data-v-60e3ef7c"]]), Tl = { key: 1 }, Hl = /* @__PURE__ */ z({
|
|
4135
4143
|
__name: "TableTags",
|
|
4136
4144
|
props: {
|
|
4137
4145
|
/** The tags to display in the table */
|
|
@@ -4159,60 +4167,60 @@ const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
|
4159
4167
|
});
|
|
4160
4168
|
return (r, i) => {
|
|
4161
4169
|
var o;
|
|
4162
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (
|
|
4170
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (v(), D(T(Wn), { key: 0 }, {
|
|
4163
4171
|
default: C(() => [
|
|
4164
|
-
(
|
|
4172
|
+
(v(!0), R(le, null, oe(n.value, (a) => (v(), D(T(Jn), {
|
|
4165
4173
|
key: a,
|
|
4166
4174
|
"max-width": e.tagMaxWidth,
|
|
4167
|
-
onClick: i[0] || (i[0] =
|
|
4175
|
+
onClick: i[0] || (i[0] = Le(() => {
|
|
4168
4176
|
}, ["stop"]))
|
|
4169
4177
|
}, {
|
|
4170
4178
|
default: C(() => [
|
|
4171
|
-
V(
|
|
4179
|
+
V(K(a), 1)
|
|
4172
4180
|
]),
|
|
4173
4181
|
_: 2
|
|
4174
4182
|
}, 1032, ["max-width"]))), 128))
|
|
4175
4183
|
]),
|
|
4176
4184
|
_: 1
|
|
4177
|
-
})) : (
|
|
4185
|
+
})) : (v(), R("span", Tl, "-"));
|
|
4178
4186
|
};
|
|
4179
4187
|
}
|
|
4180
|
-
}), { useAxios:
|
|
4188
|
+
}), { useAxios: Yl, useDeleteUrlBuilder: Vl, useErrors: Wl, useExternalLinkCreator: Jl, useFetchUrlBuilder: Gl, useFetcher: zl, useDebouncedFilter: Ql, useStringHelpers: Zl, useHelpers: Xl, useGatewayFeatureSupported: ec, useTruncationDetector: tc, useValidators: nc, useSchemaProvider: rc } = H;
|
|
4181
4189
|
export {
|
|
4182
|
-
|
|
4183
|
-
|
|
4190
|
+
Lo as ConfigCardDisplay,
|
|
4191
|
+
qt as ConfigCardItem,
|
|
4184
4192
|
ie as ConfigurationSchemaSection,
|
|
4185
4193
|
P as ConfigurationSchemaType,
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4194
|
+
Bl as EntityBaseConfigCard,
|
|
4195
|
+
Kl as EntityBaseForm,
|
|
4196
|
+
nr as EntityBaseFormType,
|
|
4189
4197
|
Nl as EntityBaseTable,
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4198
|
+
Ml as EntityDeleteModal,
|
|
4199
|
+
Dl as EntityFilter,
|
|
4200
|
+
Pl as EntityFormSection,
|
|
4201
|
+
ql as EntityLink,
|
|
4202
|
+
jl as EntityToggleModal,
|
|
4203
|
+
tr as EntityTypes,
|
|
4196
4204
|
ue as FetcherStatus,
|
|
4197
4205
|
Nr as InternalLinkItem,
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4206
|
+
Ht as JsonCodeBlock,
|
|
4207
|
+
Ul as PermissionsWrapper,
|
|
4208
|
+
tt as SupportedEntityType,
|
|
4209
|
+
je as SupportedEntityTypesArray,
|
|
4210
|
+
Hl as TableTags,
|
|
4211
|
+
Rn as TerraformCodeBlock,
|
|
4212
|
+
Ln as YamlCodeBlock,
|
|
4213
|
+
Yl as useAxios,
|
|
4214
|
+
Ql as useDebouncedFilter,
|
|
4215
|
+
Vl as useDeleteUrlBuilder,
|
|
4216
|
+
Wl as useErrors,
|
|
4217
|
+
Jl as useExternalLinkCreator,
|
|
4218
|
+
Gl as useFetchUrlBuilder,
|
|
4219
|
+
zl as useFetcher,
|
|
4220
|
+
ec as useGatewayFeatureSupported,
|
|
4221
|
+
Xl as useHelpers,
|
|
4222
|
+
rc as useSchemaProvider,
|
|
4223
|
+
Zl as useStringHelpers,
|
|
4224
|
+
tc as useTruncationDetector,
|
|
4225
|
+
nc as useValidators
|
|
4218
4226
|
};
|